@camstack/system 1.2.375 → 1.2.377

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.
Files changed (99) hide show
  1. package/dist/addon-runner.js +9 -4
  2. package/dist/addon-runner.mjs +10 -5
  3. package/dist/addon-utils.js +1 -1
  4. package/dist/addon-utils.mjs +1 -1
  5. package/dist/auth/external-identity-manager.d.ts +43 -0
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  7. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  9. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  10. package/dist/builtins/alerts/alerts.addon.js +1 -1
  11. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  12. package/dist/builtins/autotrack/index.js +1 -1
  13. package/dist/builtins/autotrack/index.mjs +1 -1
  14. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  15. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  16. package/dist/builtins/calendars/calendars.addon.js +1 -1
  17. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  18. package/dist/builtins/camera-grid/index.js +1 -1
  19. package/dist/builtins/camera-grid/index.mjs +1 -1
  20. package/dist/builtins/composer/composer.addon.js +2 -2
  21. package/dist/builtins/composer/composer.addon.mjs +2 -2
  22. package/dist/builtins/console-logging/index.js +1 -1
  23. package/dist/builtins/console-logging/index.mjs +1 -1
  24. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  25. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  26. package/dist/builtins/device-manager/device-config-secrets.d.ts +21 -0
  27. package/dist/builtins/device-manager/device-manager.addon.d.ts +2 -0
  28. package/dist/builtins/device-manager/device-manager.addon.js +119 -6
  29. package/dist/builtins/device-manager/device-manager.addon.mjs +119 -6
  30. package/dist/builtins/device-manager/device-projection.d.ts +2 -1
  31. package/dist/builtins/device-manager/device-provider-context.d.ts +3 -0
  32. package/dist/builtins/device-manager/secret-config-paths.d.ts +24 -0
  33. package/dist/builtins/hub-forwarder/index.js +1 -1
  34. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  35. package/dist/builtins/keychain/index.d.ts +1 -0
  36. package/dist/builtins/keychain/index.js +1416 -0
  37. package/dist/builtins/keychain/index.mjs +1409 -0
  38. package/dist/builtins/keychain/key-sources.d.ts +37 -0
  39. package/dist/builtins/keychain/keychain-crypto.d.ts +28 -0
  40. package/dist/builtins/keychain/keychain-service.d.ts +103 -0
  41. package/dist/builtins/keychain/keychain-store.d.ts +82 -0
  42. package/dist/builtins/keychain/keychain-usage.d.ts +6 -0
  43. package/dist/builtins/keychain/keychain.addon.d.ts +11 -0
  44. package/dist/builtins/keychain/platform-key-source.d.ts +24 -0
  45. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  46. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  47. package/dist/builtins/local-auth/auth-schema.d.ts +14 -0
  48. package/dist/builtins/local-auth/local-auth.addon.d.ts +1 -0
  49. package/dist/builtins/local-auth/local-auth.addon.js +1358 -1129
  50. package/dist/builtins/local-auth/local-auth.addon.mjs +1358 -1129
  51. package/dist/builtins/local-network/local-network.addon.js +1 -1
  52. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  53. package/dist/builtins/loki-logging/index.js +1 -1
  54. package/dist/builtins/loki-logging/index.mjs +1 -1
  55. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  56. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  57. package/dist/builtins/platform-probe/index.js +1 -1
  58. package/dist/builtins/platform-probe/index.mjs +1 -1
  59. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  60. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  61. package/dist/builtins/snapshot/index.js +1 -1
  62. package/dist/builtins/snapshot/index.mjs +1 -1
  63. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  64. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  65. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  66. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  67. package/dist/builtins/storage-orchestrator/location-store.d.ts +6 -0
  68. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +15 -0
  69. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +74 -14
  70. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +74 -14
  71. package/dist/builtins/system-config/system-config.addon.js +1 -1
  72. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  73. package/dist/builtins/winston-logging/index.js +1 -1
  74. package/dist/builtins/winston-logging/index.mjs +1 -1
  75. package/dist/{child-cap-dispatch-B9kziY4L.mjs → child-cap-dispatch-CgmOo0yl.mjs} +184 -29
  76. package/dist/{child-cap-dispatch-Bfdgkbq3.js → child-cap-dispatch-DlDSoqm1.js} +212 -27
  77. package/dist/{composition-sources-DYlXX2qW.js → composition-sources-BNyXPSs_.js} +1 -1
  78. package/dist/{composition-sources-BfZgiTYD.mjs → composition-sources-D39bl0nP.mjs} +1 -1
  79. package/dist/{dist-ZdSg09GJ.mjs → dist-BWNoS-1S.mjs} +2454 -108
  80. package/dist/{dist-CNbnikIh.js → dist-D_a9mUiM.js} +2525 -107
  81. package/dist/{event-loop-stall-monitor-DKcYBHdH.mjs → event-loop-stall-monitor-ClPhfx7Y.mjs} +1 -1
  82. package/dist/{event-loop-stall-monitor-CpEH3CoV.js → event-loop-stall-monitor-DuOn8H1n.js} +1 -1
  83. package/dist/{hub-cap-forward-BdT320dq.mjs → hub-cap-forward-CH6_VWVO.mjs} +13 -4
  84. package/dist/{hub-cap-forward-DmHNjbB0.js → hub-cap-forward-COCmYaup.js} +13 -4
  85. package/dist/index.d.ts +2 -0
  86. package/dist/index.js +20 -6
  87. package/dist/index.mjs +13 -7
  88. package/dist/kernel/config-schema.d.ts +4 -0
  89. package/dist/kernel/moleculer/child-addon-call-dispatch.d.ts +6 -0
  90. package/dist/kernel/transport/cap-route-resolver.d.ts +19 -0
  91. package/dist/kernel/transport/hub-cap-forward.d.ts +22 -1
  92. package/dist/kernel/transport/index.d.ts +2 -2
  93. package/dist/kernel/transport/local-child-registry.d.ts +4 -3
  94. package/dist/logging/log-redactor.d.ts +9 -0
  95. package/dist/platform-key-source-BWlq0jjn.mjs +23 -0
  96. package/dist/platform-key-source-Di7HrlGR.js +40 -0
  97. package/dist/{retired-settings-keys-CcWvdy6u.js → retired-settings-keys-CDyOGAje.js} +1 -1
  98. package/dist/{retired-settings-keys-B4ZeKrbR.mjs → retired-settings-keys-iGcmzwLV.mjs} +1 -1
  99. package/package.json +17 -1
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-CNbnikIh.js");
2
+ const require_dist = require("./dist-D_a9mUiM.js");
3
3
  const require_proc_stat = require("./proc-stat-DL-WUOhl.js");
4
- require("./hub-cap-forward-DmHNjbB0.js");
4
+ require("./hub-cap-forward-COCmYaup.js");
5
5
  let node_crypto = require("node:crypto");
6
6
  node_crypto = require_chunk.__toESM(node_crypto);
7
7
  let _camstack_types_node = require("@camstack/types/node");
@@ -3178,6 +3178,118 @@ function createAddonPeerBytesFacility(args) {
3178
3178
  };
3179
3179
  }
3180
3180
  //#endregion
3181
+ //#region src/logging/log-redactor.ts
3182
+ /**
3183
+ * The central log redactor (D787 §8). Every line passes through it before any
3184
+ * destination, ring buffer or subscriber sees it — in hub-main's `LogManager`,
3185
+ * in a forked runner's UDS logger (which alone knows the values that runner
3186
+ * resolved), and on an agent before a child's line is forwarded to the hub.
3187
+ *
3188
+ * Three nets, cheapest first:
3189
+ * 1. KNOWN VALUES — every secret this process resolved through `ctx.secrets`
3190
+ * is replaced wherever it appears (`‹secret:<ref hash>›`). The only net
3191
+ * that catches a value inside a library's error message.
3192
+ * 2. URL CREDENTIALS — `user:pass@` and credential query params in any URL
3193
+ * inside a string (`maskUrlCredentials`), and the value after a
3194
+ * credential-looking CLI flag (`--token X`, `--auth-key=X`).
3195
+ * 3. KEY NAMES — a `meta` value under a credential-named key, at any depth.
3196
+ *
3197
+ * Key names are a LOG heuristic only: whether a field is STORED in the
3198
+ * keychain is decided by its schema type, never by its name.
3199
+ *
3200
+ * Hot path: a line with no meta, no `://`, no `--` and no registered values
3201
+ * costs a few `includes` checks.
3202
+ */
3203
+ var REDACTED = "***";
3204
+ /** Credential-named keys. Substring, case-insensitive; only STRING values are replaced. */
3205
+ var SECRET_KEY_SUBSTRINGS = [
3206
+ "password",
3207
+ "passwd",
3208
+ "secret",
3209
+ "token",
3210
+ "apikey",
3211
+ "api_key",
3212
+ "authkey",
3213
+ "auth_key",
3214
+ "privatekey",
3215
+ "private_key",
3216
+ "passphrase",
3217
+ "credential",
3218
+ "cookie"
3219
+ ];
3220
+ /** True when a meta key names a credential. */
3221
+ function isCredentialKeyName(key) {
3222
+ const lower = key.toLowerCase();
3223
+ return SECRET_KEY_SUBSTRINGS.some((needle) => lower.includes(needle));
3224
+ }
3225
+ var URL_IN_TEXT = /\b[a-z][a-z0-9+.-]*:\/\/[^\s"'<>`]+/gi;
3226
+ var CREDENTIAL_FLAG = /(--(?:token|auth-?key|password|passwd|pass|secret|api-?key|access-?token|refresh-?token)(?:=|\s+))(\S+)/gi;
3227
+ /** Redact one free-form string. */
3228
+ function redactLogText(text) {
3229
+ let out = require_dist.scrubKnownSecrets(text);
3230
+ if (out.includes("://")) out = out.replace(URL_IN_TEXT, (url) => require_dist.maskUrlCredentials(url));
3231
+ if (out.includes("--")) out = out.replace(CREDENTIAL_FLAG, (_m, flag, value) => value.startsWith("‹secret:") ? `${flag}${value}` : `${flag}${REDACTED}`);
3232
+ return out;
3233
+ }
3234
+ /** Bounds on the meta walk — a log line is not a place to traverse a graph. */
3235
+ var MAX_DEPTH = 8;
3236
+ var MAX_NODES = 2e3;
3237
+ /**
3238
+ * Redact a value, returning the SAME reference when nothing in it changed —
3239
+ * most lines carry clean meta, and copying every one would put an allocation
3240
+ * per log line on hub-main's event loop.
3241
+ */
3242
+ function redactValue(value, depth, budget, seen) {
3243
+ if (budget.nodes++ > MAX_NODES) return value;
3244
+ if (typeof value === "string") return redactLogText(value);
3245
+ if (value === null || typeof value !== "object") return value;
3246
+ if (depth >= MAX_DEPTH || seen.has(value)) return value;
3247
+ if (value instanceof Error) {
3248
+ const message = redactLogText(value.message);
3249
+ return message === value.message ? value : message;
3250
+ }
3251
+ if (value instanceof Date || ArrayBuffer.isView(value) || value instanceof ArrayBuffer) return value;
3252
+ seen.add(value);
3253
+ if (Array.isArray(value)) {
3254
+ let copy = null;
3255
+ for (let i = 0; i < value.length; i++) {
3256
+ const item = value[i];
3257
+ const next = redactValue(item, depth + 1, budget, seen);
3258
+ if (next !== item) {
3259
+ copy ??= [...value];
3260
+ copy[i] = next;
3261
+ }
3262
+ }
3263
+ return copy ?? value;
3264
+ }
3265
+ let copy = null;
3266
+ for (const [key, child] of Object.entries(value)) {
3267
+ const next = typeof child === "string" && child.length > 0 && isCredentialKeyName(key) ? REDACTED : redactValue(child, depth + 1, budget, seen);
3268
+ if (next !== child) {
3269
+ copy ??= { ...value };
3270
+ copy[key] = next;
3271
+ }
3272
+ }
3273
+ return copy ?? value;
3274
+ }
3275
+ /** Redact a `meta` record; the same object back when it was already clean. */
3276
+ function redactLogMeta(meta) {
3277
+ const out = redactValue(meta, 0, { nodes: 0 }, /* @__PURE__ */ new WeakSet());
3278
+ if (out === meta) return meta;
3279
+ return out !== null && typeof out === "object" && !Array.isArray(out) ? Object.fromEntries(Object.entries(out)) : meta;
3280
+ }
3281
+ /** Redact a whole entry: message and meta. Tags are identifiers, left alone. */
3282
+ function redactLogEntry(entry) {
3283
+ const message = redactLogText(entry.message);
3284
+ const meta = entry.meta !== void 0 ? redactLogMeta(entry.meta) : void 0;
3285
+ if (message === entry.message && meta === entry.meta) return entry;
3286
+ return {
3287
+ ...entry,
3288
+ message,
3289
+ ...meta !== void 0 ? { meta } : {}
3290
+ };
3291
+ }
3292
+ //#endregion
3181
3293
  //#region src/kernel/deps/npm-command.ts
3182
3294
  /**
3183
3295
  * npm invocation resolver — makes "is npm available?" a solved problem for
@@ -4712,6 +4824,16 @@ function buildDeviceOpsProvider(device) {
4712
4824
  }
4713
4825
  };
4714
4826
  }
4827
+ /**
4828
+ * The secret paths a live device's config schema declares (D783). A device
4829
+ * whose `config` carries no readable schema (a test double) declares none —
4830
+ * the hub's keyword backstop still applies to it.
4831
+ */
4832
+ function declaredSecretConfigPaths(device) {
4833
+ const schema = device.config?.schema;
4834
+ if (schema === void 0 || schema === null || typeof schema !== "object") return [];
4835
+ return [...(0, _camstack_types_addon.collectZodSecretPaths)(schema)];
4836
+ }
4715
4837
  function callDeviceManager(api, method, input) {
4716
4838
  const leaf = Reflect.get(Reflect.get(api, "deviceManager"), method);
4717
4839
  return (leaf.mutate ?? leaf.query)(input);
@@ -4763,12 +4885,13 @@ function createBrokerDeviceManagerApi(opts) {
4763
4885
  bindRuntimeState: (state) => {
4764
4886
  runtimeStateRef = state;
4765
4887
  },
4766
- persistConfig: async (data) => {
4888
+ persistConfig: async (data, options) => {
4767
4889
  const dataRecord = toPlainRecord(data);
4768
4890
  if (!dataRecord) throw new Error(`worker-device-manager: persistConfig expected a plain object, got ${data === null ? "null" : typeof data}`);
4769
4891
  await callDeviceManager(api, "persistConfig", {
4770
4892
  deviceId: id,
4771
- data: dataRecord
4893
+ data: dataRecord,
4894
+ ...options?.secretConfigPaths !== void 0 ? { secretConfigPaths: [...options.secretConfigPaths] } : {}
4772
4895
  });
4773
4896
  },
4774
4897
  initialRuntimeState,
@@ -5158,7 +5281,8 @@ function createBrokerDeviceManagerApi(opts) {
5158
5281
  name: device.name,
5159
5282
  parentDeviceId: device.parentDeviceId,
5160
5283
  features: [...device.features],
5161
- config: {}
5284
+ config: {},
5285
+ secretConfigPaths: declaredSecretConfigPaths(device)
5162
5286
  });
5163
5287
  } catch (err) {
5164
5288
  registry.remove(device.id);
@@ -5177,7 +5301,8 @@ function createBrokerDeviceManagerApi(opts) {
5177
5301
  name: device.name,
5178
5302
  parentDeviceId: device.parentDeviceId,
5179
5303
  features: [...device.features],
5180
- config: {}
5304
+ config: {},
5305
+ secretConfigPaths: declaredSecretConfigPaths(device)
5181
5306
  });
5182
5307
  } catch (err) {
5183
5308
  opts.logger.debug("post-probe features meta refresh failed (non-fatal)", {
@@ -8289,22 +8414,33 @@ function extractNodeId(args) {
8289
8414
  return typeof raw === "string" && raw.length > 0 ? raw : void 0;
8290
8415
  }
8291
8416
  /**
8292
- * Merge `callerAddonId` into `args` as an extra field — the SAME "provider
8417
+ * Stamp the CALLER identity into a cap call's args — the SAME "provider
8293
8418
  * destructures what it needs and ignores the rest" convention
8294
8419
  * {@link extractNodeId} already relies on for the inline `nodeId` pin.
8295
- * `undefined` (the overwhelmingly common case: no caller hint, or the census
8296
- * consuming it is disarmed) returns `args` unchanged — no allocation. A
8297
- * non-object `args` (or `null`/array) is returned unchanged too: there is
8298
- * nowhere to attach an extra key without changing the payload's shape, and a
8299
- * provider taking a bare value never reads `callerAddonId` off it anyway.
8300
- */
8301
- function withCallerAddonId(args, callerAddonId) {
8302
- if (callerAddonId === void 0) return args;
8420
+ *
8421
+ * The stamp is the transport's, never the caller's (D787):
8422
+ * - a stamp (`callerAddonId` known to the transport) OVERWRITES whatever the
8423
+ * args carry under that key;
8424
+ * - NO stamp STRIPS the key: a call that crossed a wire with no identity the
8425
+ * transport can vouch for must not arrive carrying a claimed one. The
8426
+ * keychain owner-checks on this field, and until 2026-10-08 an unstamped
8427
+ * call let a child's own `callerAddonId` through untouched.
8428
+ *
8429
+ * A hub in-process caller never reaches this function (`localProviderLink`
8430
+ * calls the provider directly), which is the one place a stated identity is
8431
+ * trusted. A non-object `args` (or `null`/array) is returned unchanged: there
8432
+ * is nowhere to attach a key, and nowhere one could hide.
8433
+ */
8434
+ function stampCallerAddonId(args, callerAddonId) {
8303
8435
  if (args === null || typeof args !== "object" || Array.isArray(args)) return args;
8304
- return {
8436
+ if (callerAddonId !== void 0) return {
8305
8437
  ...args,
8306
8438
  callerAddonId
8307
8439
  };
8440
+ if (!Object.prototype.hasOwnProperty.call(args, "callerAddonId")) return args;
8441
+ const rest = {};
8442
+ for (const [key, value] of Object.entries(args)) if (key !== "callerAddonId") rest[key] = value;
8443
+ return rest;
8308
8444
  }
8309
8445
  var CapRouteResolver = class {
8310
8446
  hubNodeId;
@@ -8408,7 +8544,7 @@ var CapRouteResolver = class {
8408
8544
  */
8409
8545
  async dispatchInner(route, method, args, addonId, callerAddonId) {
8410
8546
  switch (route.kind) {
8411
- case "hub-in-process": return route.ref.invoke(method, withCallerAddonId(args, callerAddonId));
8547
+ case "hub-in-process": return route.ref.invoke(method, stampCallerAddonId(args, callerAddonId));
8412
8548
  case "hub-local-uds": {
8413
8549
  const registry = this.hubLocalRegistry;
8414
8550
  if (registry === null) throw new CapRouteError(route.capName, method, {
@@ -8968,7 +9104,8 @@ var LocalChildRegistry = class {
8968
9104
  method: input.method,
8969
9105
  args: input.args,
8970
9106
  ...input.deviceId !== void 0 ? { deviceId: input.deviceId } : {},
8971
- ...input.addonId !== void 0 ? { addonId: input.addonId } : {}
9107
+ ...input.addonId !== void 0 ? { addonId: input.addonId } : {},
9108
+ ...input.callerAddonId !== void 0 ? { callerAddonId: input.callerAddonId } : {}
8972
9109
  };
8973
9110
  }
8974
9111
  listChildren() {
@@ -9242,7 +9379,8 @@ var LocalChildRegistry = class {
9242
9379
  capName: out.capName,
9243
9380
  method: out.method,
9244
9381
  args: void 0,
9245
- ...out.deviceId !== void 0 ? { deviceId: out.deviceId } : {}
9382
+ ...out.deviceId !== void 0 ? { deviceId: out.deviceId } : {},
9383
+ ...childId !== null ? { callerAddonId: childId } : {}
9246
9384
  };
9247
9385
  const declared = this.capTimeoutMs?.(out.capName, out.method);
9248
9386
  return entry.channel.request(forward, {
@@ -9467,13 +9605,14 @@ var LocalChildClient = class {
9467
9605
  channel.onRequest(async (body, payload) => {
9468
9606
  const msg = body;
9469
9607
  if (msg.kind === "cap-call") {
9470
- const args = payload !== void 0 ? unpackPayload(payload) : msg.args;
9608
+ const args = stampCallerAddonId(payload !== void 0 ? unpackPayload(payload) : msg.args, msg.callerAddonId);
9471
9609
  const result = await this.options.dispatch({
9472
9610
  capName: msg.capName,
9473
9611
  method: msg.method,
9474
9612
  args,
9475
9613
  ...msg.deviceId !== void 0 ? { deviceId: msg.deviceId } : {},
9476
- ...msg.addonId !== void 0 ? { addonId: msg.addonId } : {}
9614
+ ...msg.addonId !== void 0 ? { addonId: msg.addonId } : {},
9615
+ ...msg.callerAddonId !== void 0 ? { callerAddonId: msg.callerAddonId } : {}
9477
9616
  });
9478
9617
  if (payload !== void 0 && result !== void 0) return new PayloadReply(void 0, packPayload(result));
9479
9618
  return result;
@@ -9656,12 +9795,12 @@ function createUdsLoggerWithState(client, addonId, nodeId, levelState, scope, ta
9656
9795
  } : baseTags;
9657
9796
  const entry = {
9658
9797
  level,
9659
- message,
9798
+ message: redactLogText(message),
9660
9799
  addonId,
9661
9800
  nodeId,
9662
9801
  ...scope !== void 0 ? { scope } : {},
9663
9802
  tags: mergedTags,
9664
- ...extras?.meta !== void 0 ? { meta: extras.meta } : {}
9803
+ ...extras?.meta !== void 0 ? { meta: redactLogMeta(extras.meta) } : {}
9665
9804
  };
9666
9805
  client.sendLog(entry);
9667
9806
  }
@@ -9883,7 +10022,8 @@ function createParentUnownedCallHandler(deps) {
9883
10022
  method: input.method,
9884
10023
  args: input.args,
9885
10024
  deviceId,
9886
- native: true
10025
+ native: true,
10026
+ ...input.callerAddonId !== void 0 ? { callerAddonId: input.callerAddonId } : {}
9887
10027
  });
9888
10028
  throw new Error(`no native provider for capability "${input.capName}" on device ${String(deviceId)}`);
9889
10029
  }
@@ -9943,7 +10083,8 @@ function createParentUnownedCallHandler(deps) {
9943
10083
  method: input.method,
9944
10084
  args: input.args,
9945
10085
  deviceId,
9946
- nodeId: owner.nodeId
10086
+ nodeId: owner.nodeId,
10087
+ ...input.callerAddonId !== void 0 ? { callerAddonId: input.callerAddonId } : {}
9947
10088
  });
9948
10089
  return await brokerCallForCap(deps.broker, input.capName, input.method, input.args, { nodeId: owner.nodeId });
9949
10090
  }
@@ -9953,7 +10094,8 @@ function createParentUnownedCallHandler(deps) {
9953
10094
  method: input.method,
9954
10095
  args: input.args,
9955
10096
  ...deviceId !== void 0 ? { deviceId } : {},
9956
- ...nodeId !== void 0 ? { nodeId } : {}
10097
+ ...nodeId !== void 0 ? { nodeId } : {},
10098
+ ...input.callerAddonId !== void 0 ? { callerAddonId: input.callerAddonId } : {}
9957
10099
  });
9958
10100
  if (deps.isCoreServiceCap !== void 0 && !deps.isCoreServiceCap(input.capName)) {
9959
10101
  for (let attempt = 1; attempt <= ADDON_CAP_RETRY_ATTEMPTS; attempt++) {
@@ -9964,7 +10106,7 @@ function createParentUnownedCallHandler(deps) {
9964
10106
  ...nodeId !== void 0 ? { nodeId } : {},
9965
10107
  ...deviceId !== void 0 ? { deviceId } : {}
9966
10108
  });
9967
- return await retryResolver.dispatch(route, input.method, input.args);
10109
+ return input.callerAddonId !== void 0 ? await retryResolver.dispatch(route, input.method, input.args, void 0, input.callerAddonId) : await retryResolver.dispatch(route, input.method, input.args);
9968
10110
  } catch (err) {
9969
10111
  if (!(err instanceof CapRouteError) || err.reason !== "no-provider") throw err;
9970
10112
  }
@@ -11927,6 +12069,19 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
11927
12069
  api,
11928
12070
  deps: new AddonDepsManager(addonDataDir, scopedLogger),
11929
12071
  settings: settingsView,
12072
+ secrets: (0, _camstack_types_addon.createSecretsAccess)({
12073
+ owner: addonId,
12074
+ transport: {
12075
+ put: (input) => api.keychain.put.mutate({
12076
+ ref: input.ref,
12077
+ value: input.value
12078
+ }),
12079
+ resolve: (input) => api.keychain.resolve.query({ refs: [...input.refs] }),
12080
+ delete: (input) => api.keychain.delete.mutate({ refs: [...input.refs] }),
12081
+ getState: () => api.keychain.getState.query({})
12082
+ },
12083
+ eventBus: scopedEventBus
12084
+ }),
11930
12085
  kernel: (() => {
11931
12086
  const streamProbe = runtime.mode === "broker" ? {
11932
12087
  probe: (url, probeOptions) => runtime.broker.call("$stream-probe.probe", {
@@ -13545,6 +13700,12 @@ Object.defineProperty(exports, "isArrayBufferCensusReport", {
13545
13700
  return isArrayBufferCensusReport;
13546
13701
  }
13547
13702
  });
13703
+ Object.defineProperty(exports, "isCredentialKeyName", {
13704
+ enumerable: true,
13705
+ get: function() {
13706
+ return isCredentialKeyName;
13707
+ }
13708
+ });
13548
13709
  Object.defineProperty(exports, "killOwnRunnerGroupAfterParentLoss", {
13549
13710
  enumerable: true,
13550
13711
  get: function() {
@@ -13617,6 +13778,24 @@ Object.defineProperty(exports, "recordSocketFrame", {
13617
13778
  return recordSocketFrame;
13618
13779
  }
13619
13780
  });
13781
+ Object.defineProperty(exports, "redactLogEntry", {
13782
+ enumerable: true,
13783
+ get: function() {
13784
+ return redactLogEntry;
13785
+ }
13786
+ });
13787
+ Object.defineProperty(exports, "redactLogMeta", {
13788
+ enumerable: true,
13789
+ get: function() {
13790
+ return redactLogMeta;
13791
+ }
13792
+ });
13793
+ Object.defineProperty(exports, "redactLogText", {
13794
+ enumerable: true,
13795
+ get: function() {
13796
+ return redactLogText;
13797
+ }
13798
+ });
13620
13799
  Object.defineProperty(exports, "registerEventBusService", {
13621
13800
  enumerable: true,
13622
13801
  get: function() {
@@ -13725,6 +13904,12 @@ Object.defineProperty(exports, "socketDirectionMessages", {
13725
13904
  return socketDirectionMessages;
13726
13905
  }
13727
13906
  });
13907
+ Object.defineProperty(exports, "stampCallerAddonId", {
13908
+ enumerable: true,
13909
+ get: function() {
13910
+ return stampCallerAddonId;
13911
+ }
13912
+ });
13728
13913
  Object.defineProperty(exports, "startHeapWatch", {
13729
13914
  enumerable: true,
13730
13915
  get: function() {
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-CNbnikIh.js");
1
+ const require_dist = require("./dist-D_a9mUiM.js");
2
2
  //#region src/builtins/core-blocks/composition-sources.ts
3
3
  /**
4
4
  * Describe what a composition reads and writes for SAVE-time validation
@@ -1,4 +1,4 @@
1
- import { er as compositionSourceKey, sr as errMsg } from "./dist-ZdSg09GJ.mjs";
1
+ import { cr as errMsg, tr as compositionSourceKey } from "./dist-BWNoS-1S.mjs";
2
2
  //#region src/builtins/core-blocks/composition-sources.ts
3
3
  /**
4
4
  * Describe what a composition reads and writes for SAVE-time validation