@camstack/addon-matter-broker 0.2.133 → 0.2.135

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/dist/addon.js CHANGED
@@ -5561,7 +5561,7 @@ var ZodIssueCode = {
5561
5561
  var ZodFirstPartyTypeKind;
5562
5562
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5563
5563
  //#endregion
5564
- //#region ../types/dist/sleep-BSuCCFjf.mjs
5564
+ //#region ../types/dist/sleep-CSuN0thG.mjs
5565
5565
  /**
5566
5566
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5567
5567
  * window to float samples (D455).
@@ -8179,7 +8179,13 @@ var RecordKindDeclarationSchema = object({
8179
8179
  secretPaths: array(string$2().min(1)).default([]),
8180
8180
  /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
8181
8181
  secretArrayKeys: record(string$2(), string$2()).default({}),
8182
- /** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
8182
+ /**
8183
+ * RETIRED (D900): the legacy table a kind adopted from during the records
8184
+ * migration. Nothing declares it any more and nothing reads it; the schema
8185
+ * still ACCEPTS it because the catalog rows the migration wrote carry it
8186
+ * (an orphaned kind is never redeclared) and an addon built before the
8187
+ * removal still sends it. Never set it.
8188
+ */
8183
8189
  adoptsFrom: string$2().min(1).optional(),
8184
8190
  /** Kinds that must agree through `transact` sit in one file under one family name. */
8185
8191
  transactFamily: string$2().min(1).optional(),
@@ -8254,7 +8260,6 @@ function defineRecordKinds(specs) {
8254
8260
  maxDataBytes: spec.maxDataBytes,
8255
8261
  secretPaths: [...secretPaths],
8256
8262
  secretArrayKeys: spec.secretArrayKeys === void 0 ? void 0 : { ...spec.secretArrayKeys },
8257
- adoptsFrom: spec.adoptsFrom,
8258
8263
  transactFamily: spec.transactFamily,
8259
8264
  entry: spec.entry === void 0 ? void 0 : {
8260
8265
  title: spec.entry.title,
@@ -8298,7 +8303,6 @@ function defineEntryKind(name, spec) {
8298
8303
  ...spec.database === void 0 ? {} : { database: spec.database },
8299
8304
  ...spec.indexes === void 0 ? {} : { indexes: spec.indexes },
8300
8305
  ...spec.secretArrayKeys === void 0 ? {} : { secretArrayKeys: spec.secretArrayKeys },
8301
- ...spec.adoptsFrom === void 0 ? {} : { adoptsFrom: spec.adoptsFrom },
8302
8306
  entry: {
8303
8307
  title: spec.title,
8304
8308
  ...spec.nameField === void 0 ? {} : { nameField: spec.nameField }
@@ -8307,16 +8311,6 @@ function defineEntryKind(name, spec) {
8307
8311
  if (defined === void 0) throw new DeclarationRefusedError(`entry kind "${name}" was not built`);
8308
8312
  return defined;
8309
8313
  }
8310
- /**
8311
- * Legacy source for broker entry adoption (B2): brokers live in addon-settings
8312
- * as one row `<addonId>.brokers` whose value is an array until records-adopt
8313
- * copies them into the entry kind.
8314
- */
8315
- var SETTINGS_BROKERS_ADOPTS_PREFIX = "@settings-brokers/";
8316
- /** The `adoptsFrom` value for an addon's broker entry kind. */
8317
- function settingsBrokersAdoptsFrom(addonId) {
8318
- return `${SETTINGS_BROKERS_ADOPTS_PREFIX}${addonId}`;
8319
- }
8320
8314
  /** Shared Zod schemas used across streaming capabilities. */
8321
8315
  var CamProfileSchema = _enum([
8322
8316
  "high",
@@ -17030,11 +17024,12 @@ var DeclareKindResultSchema = object({
17030
17024
  kindId: number().int(),
17031
17025
  state: RecordKindStateSchema,
17032
17026
  createdIndexes: array(string$2()),
17033
- /** The boot guard: the kind is empty while its legacy table still holds rows. */
17034
- adoptionPending: object({
17035
- legacyTable: string$2(),
17036
- legacyRows: number().int()
17037
- }).nullable()
17027
+ /**
17028
+ * RETIRED (D900): always `null`. It carried the records-migration boot guard;
17029
+ * it stays on the wire, null, because an addon built before the removal reads
17030
+ * an ABSENT field as "adoption pending" and refuses to start.
17031
+ */
17032
+ adoptionPending: _null()
17038
17033
  });
17039
17034
  /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
17040
17035
  var SecretRefsList = array(string$2());
@@ -17207,26 +17202,7 @@ method(object({ ownerPrefix: string$2().min(1).optional() }), object({ tables: a
17207
17202
  }), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
17208
17203
  owner: string$2().min(1),
17209
17204
  kind: RecordKindNameSchema
17210
- }), RecordQueryResultSchema, { auth: "admin" }), method(object({
17211
- owner: string$2().min(1),
17212
- kind: RecordKindNameSchema,
17213
- records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
17214
- /** The LAST batch: the copy is complete, the boot guard stops asking. */
17215
- complete: boolean().optional()
17216
- }).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
17217
- kind: "mutation",
17218
- auth: "admin"
17219
- }), method(object({
17220
- collection: string$2().min(1),
17221
- cursor: string$2().optional(),
17222
- limit: number().int().min(1).max(1e3).optional()
17223
- }), object({
17224
- rows: array(object({
17225
- id: string$2(),
17226
- data: record(string$2(), unknown())
17227
- })),
17228
- nextCursor: string$2().nullable()
17229
- }), { auth: "admin" }), method(object({ collection: string$2().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
17205
+ }), RecordQueryResultSchema, { auth: "admin" });
17230
17206
  /**
17231
17207
  * record-entries - the ONE admin surface for every list of user-created entries
17232
17208
  * (D881): notification targets, brokers, LLM profiles, anything an addon
@@ -60754,9 +60730,24 @@ var NpuInfoSchema = object({
60754
60730
  name: string$2().optional(),
60755
60731
  generation: _enum(["xdna1", "xdna2"]).optional()
60756
60732
  });
60733
+ var CoralBusSchema = _enum(["usb", "pci"]);
60757
60734
  var CoralInfoSchema = object({
60758
60735
  type: literal("coral-edgetpu"),
60759
- bus: string$2().optional()
60736
+ /** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
60737
+ bus: string$2().optional(),
60738
+ /** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
60739
+ count: number().int().nonnegative().optional(),
60740
+ /** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
60741
+ units: array(object({
60742
+ bus: CoralBusSchema,
60743
+ count: number().int().nonnegative()
60744
+ })).readonly().optional(),
60745
+ /** Present-but-unusable units, each with its typed reason (never "absent"). */
60746
+ unavailable: array(object({
60747
+ bus: CoralBusSchema,
60748
+ count: number().int().nonnegative(),
60749
+ reason: _enum(["driver-missing", "device-not-accessible"])
60750
+ })).readonly().optional()
60760
60751
  });
60761
60752
  var HardwareInfoSchema = object({
60762
60753
  platform: HardwarePlatformSchema,
@@ -69503,6 +69494,12 @@ Object.freeze({
69503
69494
  addonId: null,
69504
69495
  access: "view"
69505
69496
  },
69497
+ "deviceHistory.queryMany": {
69498
+ capName: "device-history",
69499
+ capScope: "system",
69500
+ addonId: null,
69501
+ access: "view"
69502
+ },
69506
69503
  "deviceHistory.queryNode": {
69507
69504
  capName: "device-history",
69508
69505
  capScope: "system",
@@ -74723,24 +74720,12 @@ Object.freeze({
74723
74720
  addonId: null,
74724
74721
  access: "create"
74725
74722
  },
74726
- "storageAdmin.adoptRecords": {
74727
- capName: "storage-admin",
74728
- capScope: "system",
74729
- addonId: null,
74730
- access: "create"
74731
- },
74732
74723
  "storageAdmin.dropCollection": {
74733
74724
  capName: "storage-admin",
74734
74725
  capScope: "system",
74735
74726
  addonId: null,
74736
74727
  access: "delete"
74737
74728
  },
74738
- "storageAdmin.isAdoptedLegacyTable": {
74739
- capName: "storage-admin",
74740
- capScope: "system",
74741
- addonId: null,
74742
- access: "view"
74743
- },
74744
74729
  "storageAdmin.listKinds": {
74745
74730
  capName: "storage-admin",
74746
74731
  capScope: "system",
@@ -74753,12 +74738,6 @@ Object.freeze({
74753
74738
  addonId: null,
74754
74739
  access: "view"
74755
74740
  },
74756
- "storageAdmin.readLegacyCollection": {
74757
- capName: "storage-admin",
74758
- capScope: "system",
74759
- addonId: null,
74760
- access: "view"
74761
- },
74762
74741
  "storageAdmin.readRecords": {
74763
74742
  capName: "storage-admin",
74764
74743
  capScope: "system",
@@ -78573,12 +78552,6 @@ Object.freeze({
78573
78552
  form: "single",
78574
78553
  optional: false
78575
78554
  }],
78576
- "storageAdmin.adoptRecords": [{
78577
- name: "records",
78578
- form: "object-array",
78579
- optional: false,
78580
- itemField: "deviceId"
78581
- }],
78582
78555
  "storageAdmin.readRecords": [{
78583
78556
  name: "deviceId",
78584
78557
  form: "single",
@@ -191015,8 +190988,7 @@ var matterBrokersEntryKind = defineEntryKind("brokers", {
191015
190988
  connection: MatterBrokerEntrySchema.shape.connection,
191016
190989
  integrationId: string$2().optional()
191017
190990
  }),
191018
- writeTrigger: "an operator adds, edits or removes a Matter fabric broker",
191019
- adoptsFrom: settingsBrokersAdoptsFrom("matter-broker")
190991
+ writeTrigger: "an operator adds, edits or removes a Matter fabric broker"
191020
190992
  });
191021
190993
  //#endregion
191022
190994
  //#region src/matter-broker-store.ts
package/dist/addon.mjs CHANGED
@@ -5559,7 +5559,7 @@ var ZodIssueCode = {
5559
5559
  var ZodFirstPartyTypeKind;
5560
5560
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5561
5561
  //#endregion
5562
- //#region ../types/dist/sleep-BSuCCFjf.mjs
5562
+ //#region ../types/dist/sleep-CSuN0thG.mjs
5563
5563
  /**
5564
5564
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5565
5565
  * window to float samples (D455).
@@ -8177,7 +8177,13 @@ var RecordKindDeclarationSchema = object({
8177
8177
  secretPaths: array(string$2().min(1)).default([]),
8178
8178
  /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
8179
8179
  secretArrayKeys: record(string$2(), string$2()).default({}),
8180
- /** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
8180
+ /**
8181
+ * RETIRED (D900): the legacy table a kind adopted from during the records
8182
+ * migration. Nothing declares it any more and nothing reads it; the schema
8183
+ * still ACCEPTS it because the catalog rows the migration wrote carry it
8184
+ * (an orphaned kind is never redeclared) and an addon built before the
8185
+ * removal still sends it. Never set it.
8186
+ */
8181
8187
  adoptsFrom: string$2().min(1).optional(),
8182
8188
  /** Kinds that must agree through `transact` sit in one file under one family name. */
8183
8189
  transactFamily: string$2().min(1).optional(),
@@ -8252,7 +8258,6 @@ function defineRecordKinds(specs) {
8252
8258
  maxDataBytes: spec.maxDataBytes,
8253
8259
  secretPaths: [...secretPaths],
8254
8260
  secretArrayKeys: spec.secretArrayKeys === void 0 ? void 0 : { ...spec.secretArrayKeys },
8255
- adoptsFrom: spec.adoptsFrom,
8256
8261
  transactFamily: spec.transactFamily,
8257
8262
  entry: spec.entry === void 0 ? void 0 : {
8258
8263
  title: spec.entry.title,
@@ -8296,7 +8301,6 @@ function defineEntryKind(name, spec) {
8296
8301
  ...spec.database === void 0 ? {} : { database: spec.database },
8297
8302
  ...spec.indexes === void 0 ? {} : { indexes: spec.indexes },
8298
8303
  ...spec.secretArrayKeys === void 0 ? {} : { secretArrayKeys: spec.secretArrayKeys },
8299
- ...spec.adoptsFrom === void 0 ? {} : { adoptsFrom: spec.adoptsFrom },
8300
8304
  entry: {
8301
8305
  title: spec.title,
8302
8306
  ...spec.nameField === void 0 ? {} : { nameField: spec.nameField }
@@ -8305,16 +8309,6 @@ function defineEntryKind(name, spec) {
8305
8309
  if (defined === void 0) throw new DeclarationRefusedError(`entry kind "${name}" was not built`);
8306
8310
  return defined;
8307
8311
  }
8308
- /**
8309
- * Legacy source for broker entry adoption (B2): brokers live in addon-settings
8310
- * as one row `<addonId>.brokers` whose value is an array until records-adopt
8311
- * copies them into the entry kind.
8312
- */
8313
- var SETTINGS_BROKERS_ADOPTS_PREFIX = "@settings-brokers/";
8314
- /** The `adoptsFrom` value for an addon's broker entry kind. */
8315
- function settingsBrokersAdoptsFrom(addonId) {
8316
- return `${SETTINGS_BROKERS_ADOPTS_PREFIX}${addonId}`;
8317
- }
8318
8312
  /** Shared Zod schemas used across streaming capabilities. */
8319
8313
  var CamProfileSchema = _enum([
8320
8314
  "high",
@@ -17028,11 +17022,12 @@ var DeclareKindResultSchema = object({
17028
17022
  kindId: number().int(),
17029
17023
  state: RecordKindStateSchema,
17030
17024
  createdIndexes: array(string$2()),
17031
- /** The boot guard: the kind is empty while its legacy table still holds rows. */
17032
- adoptionPending: object({
17033
- legacyTable: string$2(),
17034
- legacyRows: number().int()
17035
- }).nullable()
17025
+ /**
17026
+ * RETIRED (D900): always `null`. It carried the records-migration boot guard;
17027
+ * it stays on the wire, null, because an addon built before the removal reads
17028
+ * an ABSENT field as "adoption pending" and refuses to start.
17029
+ */
17030
+ adoptionPending: _null()
17036
17031
  });
17037
17032
  /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
17038
17033
  var SecretRefsList = array(string$2());
@@ -17205,26 +17200,7 @@ method(object({ ownerPrefix: string$2().min(1).optional() }), object({ tables: a
17205
17200
  }), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
17206
17201
  owner: string$2().min(1),
17207
17202
  kind: RecordKindNameSchema
17208
- }), RecordQueryResultSchema, { auth: "admin" }), method(object({
17209
- owner: string$2().min(1),
17210
- kind: RecordKindNameSchema,
17211
- records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
17212
- /** The LAST batch: the copy is complete, the boot guard stops asking. */
17213
- complete: boolean().optional()
17214
- }).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
17215
- kind: "mutation",
17216
- auth: "admin"
17217
- }), method(object({
17218
- collection: string$2().min(1),
17219
- cursor: string$2().optional(),
17220
- limit: number().int().min(1).max(1e3).optional()
17221
- }), object({
17222
- rows: array(object({
17223
- id: string$2(),
17224
- data: record(string$2(), unknown())
17225
- })),
17226
- nextCursor: string$2().nullable()
17227
- }), { auth: "admin" }), method(object({ collection: string$2().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
17203
+ }), RecordQueryResultSchema, { auth: "admin" });
17228
17204
  /**
17229
17205
  * record-entries - the ONE admin surface for every list of user-created entries
17230
17206
  * (D881): notification targets, brokers, LLM profiles, anything an addon
@@ -60752,9 +60728,24 @@ var NpuInfoSchema = object({
60752
60728
  name: string$2().optional(),
60753
60729
  generation: _enum(["xdna1", "xdna2"]).optional()
60754
60730
  });
60731
+ var CoralBusSchema = _enum(["usb", "pci"]);
60755
60732
  var CoralInfoSchema = object({
60756
60733
  type: literal("coral-edgetpu"),
60757
- bus: string$2().optional()
60734
+ /** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
60735
+ bus: string$2().optional(),
60736
+ /** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
60737
+ count: number().int().nonnegative().optional(),
60738
+ /** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
60739
+ units: array(object({
60740
+ bus: CoralBusSchema,
60741
+ count: number().int().nonnegative()
60742
+ })).readonly().optional(),
60743
+ /** Present-but-unusable units, each with its typed reason (never "absent"). */
60744
+ unavailable: array(object({
60745
+ bus: CoralBusSchema,
60746
+ count: number().int().nonnegative(),
60747
+ reason: _enum(["driver-missing", "device-not-accessible"])
60748
+ })).readonly().optional()
60758
60749
  });
60759
60750
  var HardwareInfoSchema = object({
60760
60751
  platform: HardwarePlatformSchema,
@@ -69501,6 +69492,12 @@ Object.freeze({
69501
69492
  addonId: null,
69502
69493
  access: "view"
69503
69494
  },
69495
+ "deviceHistory.queryMany": {
69496
+ capName: "device-history",
69497
+ capScope: "system",
69498
+ addonId: null,
69499
+ access: "view"
69500
+ },
69504
69501
  "deviceHistory.queryNode": {
69505
69502
  capName: "device-history",
69506
69503
  capScope: "system",
@@ -74721,24 +74718,12 @@ Object.freeze({
74721
74718
  addonId: null,
74722
74719
  access: "create"
74723
74720
  },
74724
- "storageAdmin.adoptRecords": {
74725
- capName: "storage-admin",
74726
- capScope: "system",
74727
- addonId: null,
74728
- access: "create"
74729
- },
74730
74721
  "storageAdmin.dropCollection": {
74731
74722
  capName: "storage-admin",
74732
74723
  capScope: "system",
74733
74724
  addonId: null,
74734
74725
  access: "delete"
74735
74726
  },
74736
- "storageAdmin.isAdoptedLegacyTable": {
74737
- capName: "storage-admin",
74738
- capScope: "system",
74739
- addonId: null,
74740
- access: "view"
74741
- },
74742
74727
  "storageAdmin.listKinds": {
74743
74728
  capName: "storage-admin",
74744
74729
  capScope: "system",
@@ -74751,12 +74736,6 @@ Object.freeze({
74751
74736
  addonId: null,
74752
74737
  access: "view"
74753
74738
  },
74754
- "storageAdmin.readLegacyCollection": {
74755
- capName: "storage-admin",
74756
- capScope: "system",
74757
- addonId: null,
74758
- access: "view"
74759
- },
74760
74739
  "storageAdmin.readRecords": {
74761
74740
  capName: "storage-admin",
74762
74741
  capScope: "system",
@@ -78571,12 +78550,6 @@ Object.freeze({
78571
78550
  form: "single",
78572
78551
  optional: false
78573
78552
  }],
78574
- "storageAdmin.adoptRecords": [{
78575
- name: "records",
78576
- form: "object-array",
78577
- optional: false,
78578
- itemField: "deviceId"
78579
- }],
78580
78553
  "storageAdmin.readRecords": [{
78581
78554
  name: "deviceId",
78582
78555
  form: "single",
@@ -191013,8 +190986,7 @@ var matterBrokersEntryKind = defineEntryKind("brokers", {
191013
190986
  connection: MatterBrokerEntrySchema.shape.connection,
191014
190987
  integrationId: string$2().optional()
191015
190988
  }),
191016
- writeTrigger: "an operator adds, edits or removes a Matter fabric broker",
191017
- adoptsFrom: settingsBrokersAdoptsFrom("matter-broker")
190989
+ writeTrigger: "an operator adds, edits or removes a Matter fabric broker"
191018
190990
  });
191019
190991
  //#endregion
191020
190992
  //#region src/matter-broker-store.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-matter-broker",
3
- "version": "0.2.133",
3
+ "version": "0.2.135",
4
4
  "description": "Matter broker addon for CamStack — owns a Matter fabric (commissioning + the long-lived controller) via the matter.js controller and brokers commissioned Matter nodes into CamStack",
5
5
  "keywords": [
6
6
  "camstack",