@camstack/server 1.2.592 → 1.2.593

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.
@@ -110,10 +110,6 @@ function isSettingsStore(backend) {
110
110
  'getAllSystem',
111
111
  'getAllAddon',
112
112
  'setAllAddon',
113
- 'getAllProvider',
114
- 'setProvider',
115
- 'getAllDevice',
116
- 'setDevice',
117
113
  'getDeviceRuntimeState',
118
114
  'setDeviceRuntimeState',
119
115
  'clearDeviceRuntimeState',
@@ -1170,6 +1166,47 @@ class AddonRegistryService {
1170
1166
  eventBus: this.eventBusService,
1171
1167
  });
1172
1168
  }
1169
+ /**
1170
+ * A hub in-process records handle acting for `owner` (D881): the provider is
1171
+ * reached straight, with the caller STATED - the one place a claim is trusted,
1172
+ * as for the keychain. Only a system builtin's `ctx.records.forOwner` ever
1173
+ * reaches a different owner.
1174
+ */
1175
+ recordsForOwner(owner, secrets) {
1176
+ return (0, types_1.createRecordsAccess)({
1177
+ owner,
1178
+ transport: this.inProcessRecordsTransport(owner),
1179
+ transportForOwner: (other) => this.inProcessRecordsTransport(other),
1180
+ secrets,
1181
+ });
1182
+ }
1183
+ inProcessRecordsTransport(owner) {
1184
+ const provider = () => {
1185
+ const p = this.capabilityRegistry.getSingleton('records');
1186
+ if (p === null || p === undefined)
1187
+ throw new Error('records provider is not registered');
1188
+ return p;
1189
+ };
1190
+ const as = (input) => Object.assign({}, input, { callerAddonId: owner });
1191
+ return {
1192
+ declareKinds: (input) => provider().declareKinds(as(input)),
1193
+ get: (input) => provider().get(as(input)),
1194
+ getMany: (input) => provider().getMany(as(input)),
1195
+ secretRefs: (input) => provider().secretRefs(as(input)),
1196
+ put: (input) => provider().put(as(input)),
1197
+ putMany: (input) => provider().putMany(as(input)),
1198
+ patch: (input) => provider().patch(as(input)),
1199
+ delete: (input) => provider().delete(as(input)),
1200
+ deleteMany: (input) => provider().deleteMany(as(input)),
1201
+ query: (input) => provider().query(as(input)),
1202
+ count: (input) => provider().count(as(input)),
1203
+ histogram: (input) => provider().histogram(as(input)),
1204
+ aggregate: (input) => provider().aggregate(as(input)),
1205
+ deleteWhere: (input) => provider().deleteWhere(as(input)),
1206
+ deleteDevice: (input) => provider().deleteDevice(as(input)),
1207
+ allocateId: (input) => provider().allocateId(as(input)),
1208
+ };
1209
+ }
1173
1210
  childIdForAddon(addonId) {
1174
1211
  const decl = this.addonEntries.get(addonId)?.declaration;
1175
1212
  return decl ? (0, types_1.resolveRunnerId)(decl, addonId) : addonId;
@@ -2896,6 +2933,16 @@ class AddonRegistryService {
2896
2933
  nodeId: this.broker.nodeID,
2897
2934
  });
2898
2935
  this.getOrCreateDisposerChain(addonId).add(() => peerBytesFacility.dispose());
2936
+ // This builtin's keychain values (D787). In-process, so the caller is
2937
+ // STATED (no wire, no stamp) - the one place the keychain trusts a claim.
2938
+ // `forOwner` is the door a system builtin (device-manager,
2939
+ // storage-orchestrator) uses to keep another addon's values.
2940
+ const secrets = (0, types_1.createSecretsAccess)({
2941
+ owner: addonId,
2942
+ transport: this.inProcessKeychainTransport(addonId),
2943
+ transportForOwner: (owner) => this.inProcessKeychainTransport(owner),
2944
+ eventBus: this.eventBusService,
2945
+ });
2899
2946
  const ctx = {
2900
2947
  id: `addon:${addonId}`,
2901
2948
  logger,
@@ -2983,16 +3030,12 @@ class AddonRegistryService {
2983
3030
  return (0, types_1.createDeviceProxy)(api, binding);
2984
3031
  },
2985
3032
  settings: settingsView,
2986
- // This builtin's keychain values (D787). In-process, so the caller is
2987
- // STATED (no wire, no stamp) — the one place the keychain trusts a
2988
- // claim. `forOwner` is the door a system builtin (device-manager,
2989
- // storage-orchestrator) uses to keep another addon's values.
2990
- secrets: (0, types_1.createSecretsAccess)({
2991
- owner: addonId,
2992
- transport: this.inProcessKeychainTransport(addonId),
2993
- transportForOwner: (owner) => this.inProcessKeychainTransport(owner),
2994
- eventBus: this.eventBusService,
2995
- }),
3033
+ secrets,
3034
+ // This builtin's record kinds (D881). In-process, so the caller is STATED
3035
+ // (no wire, no stamp): the same single place identity is trusted as for
3036
+ // the keychain. `ctx.records` is the owner's own door; a builtin that
3037
+ // acts for another owner (the entries service) builds one with `recordsForOwner`.
3038
+ records: this.recordsForOwner(addonId, secrets),
2996
3039
  useCapability(capName, scope = { type: 'global' }) {
2997
3040
  return getOrCreateHandle(capName, scope, 15_000);
2998
3041
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/server",
3
- "version": "1.2.592",
3
+ "version": "1.2.593",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "files": [
@@ -38,19 +38,19 @@
38
38
  ]
39
39
  },
40
40
  "dependencies": {
41
- "@camstack/addon-admin-ui": "1.2.434",
42
- "@camstack/addon-agent-ui": "1.2.241",
41
+ "@camstack/addon-admin-ui": "1.2.435",
42
+ "@camstack/addon-agent-ui": "1.2.242",
43
43
  "@camstack/addon-auth": "1.2.148",
44
44
  "@camstack/addon-decoder-nodeav": "1.2.123",
45
45
  "@camstack/addon-notifiers": "1.2.135",
46
- "@camstack/addon-pipeline": "1.2.374",
46
+ "@camstack/addon-pipeline": "1.2.375",
47
47
  "@camstack/addon-pipeline-orchestrator": "1.2.332",
48
- "@camstack/addon-post-analysis": "1.2.373",
48
+ "@camstack/addon-post-analysis": "1.2.374",
49
49
  "@camstack/develop": "0.1.11",
50
50
  "@camstack/sdk": "1.2.132",
51
- "@camstack/system": "1.2.443",
52
- "@camstack/types": "1.2.379",
53
- "@camstack/ui-library": "1.2.297",
51
+ "@camstack/system": "1.2.444",
52
+ "@camstack/types": "1.2.380",
53
+ "@camstack/ui-library": "1.2.298",
54
54
  "@fastify/compress": "^9.0.0",
55
55
  "@fastify/cookie": "^11.0.2",
56
56
  "@fastify/cors": "^11.2.0",