@camstack/system 1.2.457 → 1.2.459

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 (106) hide show
  1. package/dist/addon-runner.js +163 -27
  2. package/dist/addon-runner.mjs +193 -57
  3. package/dist/{agent-https-CoyOZ3pC.js → agent-https-Dnr_nIVx.js} +3 -723
  4. package/dist/{agent-https-CK9Z4sSR.mjs → agent-https-Iw3RSQup.mjs} +4 -616
  5. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  9. package/dist/builtins/alerts/alerts.addon.js +5 -7
  10. package/dist/builtins/alerts/alerts.addon.mjs +5 -7
  11. package/dist/builtins/alerts/record-kinds.d.ts +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 +242 -4
  15. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +240 -2
  16. package/dist/builtins/calendars/calendars.addon.js +2 -10
  17. package/dist/builtins/calendars/calendars.addon.mjs +2 -3
  18. package/dist/builtins/calendars/record-kinds.d.ts +1 -1
  19. package/dist/builtins/camera-grid/index.js +1 -1
  20. package/dist/builtins/camera-grid/index.mjs +1 -1
  21. package/dist/builtins/composer/composer.addon.js +2 -2
  22. package/dist/builtins/composer/composer.addon.mjs +2 -2
  23. package/dist/builtins/console-logging/index.js +1 -1
  24. package/dist/builtins/console-logging/index.mjs +1 -1
  25. package/dist/builtins/core-blocks/core-blocks.addon.js +4 -6
  26. package/dist/builtins/core-blocks/core-blocks.addon.mjs +4 -6
  27. package/dist/builtins/device-history/device-history.addon.d.ts +13 -0
  28. package/dist/builtins/device-history/device-history.addon.js +296 -233
  29. package/dist/builtins/device-history/device-history.addon.mjs +296 -233
  30. package/dist/builtins/device-history/ingest/producer-ingest.d.ts +11 -1
  31. package/dist/builtins/device-manager/device-manager.addon.js +2 -4
  32. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -4
  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.js +41 -43
  36. package/dist/builtins/keychain/index.mjs +41 -43
  37. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  38. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  39. package/dist/builtins/local-auth/local-auth.addon.js +24 -40
  40. package/dist/builtins/local-auth/local-auth.addon.mjs +24 -40
  41. package/dist/builtins/local-network/local-network.addon.js +2 -2
  42. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  43. package/dist/builtins/loki-logging/index.js +1 -1
  44. package/dist/builtins/loki-logging/index.mjs +1 -1
  45. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  46. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  47. package/dist/builtins/native-metrics/node-metrics-history-recorder.d.ts +1 -2
  48. package/dist/builtins/platform-probe/coral-accelerators.d.ts +26 -9
  49. package/dist/builtins/platform-probe/index.js +11 -68
  50. package/dist/builtins/platform-probe/index.mjs +11 -68
  51. package/dist/builtins/record-entries/index.js +1 -1
  52. package/dist/builtins/record-entries/index.mjs +1 -1
  53. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  54. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  55. package/dist/builtins/snapshot/index.js +1 -1
  56. package/dist/builtins/snapshot/index.mjs +1 -1
  57. package/dist/builtins/sqlite-storage/file-host-protocol.d.ts +0 -15
  58. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  59. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  60. package/dist/builtins/sqlite-storage/index.js +1 -1
  61. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  62. package/dist/builtins/sqlite-storage/owned-sqlite-file.d.ts +0 -44
  63. package/dist/builtins/sqlite-storage/records/records-catalog.d.ts +0 -2
  64. package/dist/builtins/sqlite-storage/records/records-engine-types.d.ts +0 -21
  65. package/dist/builtins/sqlite-storage/records/records-engine.d.ts +3 -20
  66. package/dist/builtins/sqlite-storage/records/records-provider.d.ts +4 -18
  67. package/dist/builtins/sqlite-storage/records/records-sql.d.ts +1 -1
  68. package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +0 -17
  69. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +21 -196
  70. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +21 -196
  71. package/dist/builtins/sqlite-storage/storage-admin-provider.d.ts +6 -14
  72. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +2 -2
  73. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +7 -9
  74. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +7 -9
  75. package/dist/builtins/system-config/system-config.addon.js +667 -40
  76. package/dist/builtins/system-config/system-config.addon.mjs +625 -15
  77. package/dist/builtins/winston-logging/index.js +1 -1
  78. package/dist/builtins/winston-logging/index.mjs +1 -1
  79. package/dist/{composition-sources-B_jeZDRJ.mjs → composition-sources-DNRZWR1j.mjs} +1 -1
  80. package/dist/{composition-sources-qKyvMAvc.js → composition-sources-b0e_2I-D.js} +1 -1
  81. package/dist/{constants-B_X9cWEK.js → constants-6OeJiZgi.js} +1 -1
  82. package/dist/{constants-cxKcZRMi.mjs → constants-BnkOdj9Q.mjs} +1 -1
  83. package/dist/coral-accelerators-Bi_c3Rft.js +175 -0
  84. package/dist/coral-accelerators-DcnZvctM.mjs +162 -0
  85. package/dist/{device-ca-BB6nHAL5.mjs → device-ca-Bnkw8GyU.mjs} +1 -1
  86. package/dist/{device-ca-CVK3YcR_.js → device-ca-CPTDs--d.js} +1 -1
  87. package/dist/{dist-C89nqNnn.js → dist-Bn-RNanh.js} +84 -140
  88. package/dist/{dist-Dhux90yB.mjs → dist-Wy8cTxg6.mjs} +85 -123
  89. package/dist/file-host-worker.js +1 -1
  90. package/dist/file-host-worker.mjs +1 -1
  91. package/dist/{hub-mdns-ciao-B8olZqqd.mjs → hub-mdns-ciao-CJu0nhla.mjs} +2 -2
  92. package/dist/{hub-mdns-ciao-DB1Y9agt.js → hub-mdns-ciao-CTBTlia4.js} +2 -2
  93. package/dist/index.js +32 -58
  94. package/dist/index.mjs +16 -42
  95. package/dist/kernel/hwaccel/hwaccel-resolver.d.ts +7 -3
  96. package/dist/{restore-archive-DyOaPeAr.mjs → restore-archive-CmP-iiG9.mjs} +84 -331
  97. package/dist/{restore-archive-4DOUR5Gu.js → restore-archive-DM1OBYq4.js} +89 -342
  98. package/dist/{wal-maintenance-DVN-DiVP.js → wal-maintenance-DUHEp_09.js} +0 -0
  99. package/dist/{wal-maintenance-BMiX6UIa.mjs → wal-maintenance-NKbwWovZ.mjs} +0 -0
  100. package/package.json +1 -1
  101. package/dist/builtins/records/legacy-table-row-count.d.ts +0 -5
  102. package/dist/builtins/records/phase6-declare-gate.d.ts +0 -28
  103. package/dist/builtins/sqlite-storage/records/count-settings-array-legacy.d.ts +0 -5
  104. package/dist/builtins/sqlite-storage/records/count-settings-brokers-legacy.d.ts +0 -6
  105. package/dist/phase6-declare-gate-BO-_jLh_.js +0 -98
  106. package/dist/phase6-declare-gate-x9ZCbQJP.mjs +0 -93
@@ -745,7 +745,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
745
745
  return EventCategory;
746
746
  }({});
747
747
  //#endregion
748
- //#region ../types/dist/sleep-BSuCCFjf.mjs
748
+ //#region ../types/dist/sleep-CSuN0thG.mjs
749
749
  /**
750
750
  * The audio chunk plane's byte format, and the ONE expansion from a coded
751
751
  * window to float samples (D455).
@@ -3657,7 +3657,13 @@ var RecordKindDeclarationSchema = zod.z.object({
3657
3657
  secretPaths: zod.z.array(zod.z.string().min(1)).default([]),
3658
3658
  /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
3659
3659
  secretArrayKeys: zod.z.record(zod.z.string(), zod.z.string()).default({}),
3660
- /** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
3660
+ /**
3661
+ * RETIRED (D900): the legacy table a kind adopted from during the records
3662
+ * migration. Nothing declares it any more and nothing reads it; the schema
3663
+ * still ACCEPTS it because the catalog rows the migration wrote carry it
3664
+ * (an orphaned kind is never redeclared) and an addon built before the
3665
+ * removal still sends it. Never set it.
3666
+ */
3661
3667
  adoptsFrom: zod.z.string().min(1).optional(),
3662
3668
  /** Kinds that must agree through `transact` sit in one file under one family name. */
3663
3669
  transactFamily: zod.z.string().min(1).optional(),
@@ -3732,7 +3738,6 @@ function defineRecordKinds(specs) {
3732
3738
  maxDataBytes: spec.maxDataBytes,
3733
3739
  secretPaths: [...secretPaths],
3734
3740
  secretArrayKeys: spec.secretArrayKeys === void 0 ? void 0 : { ...spec.secretArrayKeys },
3735
- adoptsFrom: spec.adoptsFrom,
3736
3741
  transactFamily: spec.transactFamily,
3737
3742
  entry: spec.entry === void 0 ? void 0 : {
3738
3743
  title: spec.entry.title,
@@ -3749,30 +3754,6 @@ function defineRecordKinds(specs) {
3749
3754
  }
3750
3755
  return out;
3751
3756
  }
3752
- /** The wire form of a package's kinds: name -> declaration. */
3753
- function declarationsOf(kinds) {
3754
- return Object.fromEntries(Object.entries(kinds).map(([name, kind]) => [name, kind.declaration]));
3755
- }
3756
- /** When non-null, `from` names an addon-settings brokers blob, not a SQL table. */
3757
- function parseSettingsBrokersAdoptsFrom(from) {
3758
- if (!from.startsWith("@settings-brokers/")) return null;
3759
- const addonId = from.slice(18);
3760
- return addonId.length > 0 ? addonId : null;
3761
- }
3762
- /** When non-null, `from` names an addon-settings array blob, not a SQL table. */
3763
- function parseSettingsArrayAdoptsFrom(from) {
3764
- if (!from.startsWith("@settings-array/")) return null;
3765
- const rest = from.slice(16);
3766
- const slash = rest.indexOf("/");
3767
- if (slash <= 0 || slash >= rest.length - 1) return null;
3768
- const addonId = rest.slice(0, slash);
3769
- const settingsKey = rest.slice(slash + 1);
3770
- if (addonId.length === 0 || settingsKey.length === 0) return null;
3771
- return {
3772
- addonId,
3773
- settingsKey
3774
- };
3775
- }
3776
3757
  /** Shared Zod schemas used across streaming capabilities. */
3777
3758
  var CamProfileSchema = zod.z.enum([
3778
3759
  "high",
@@ -17227,11 +17208,12 @@ var DeclareKindResultSchema = zod.z.object({
17227
17208
  kindId: zod.z.number().int(),
17228
17209
  state: RecordKindStateSchema,
17229
17210
  createdIndexes: zod.z.array(zod.z.string()),
17230
- /** The boot guard: the kind is empty while its legacy table still holds rows. */
17231
- adoptionPending: zod.z.object({
17232
- legacyTable: zod.z.string(),
17233
- legacyRows: zod.z.number().int()
17234
- }).nullable()
17211
+ /**
17212
+ * RETIRED (D900): always `null`. It carried the records-migration boot guard;
17213
+ * it stays on the wire, null, because an addon built before the removal reads
17214
+ * an ABSENT field as "adoption pending" and refuses to start.
17215
+ */
17216
+ adoptionPending: zod.z.null()
17235
17217
  });
17236
17218
  /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
17237
17219
  var SecretRefsList = zod.z.array(zod.z.string());
@@ -17419,13 +17401,13 @@ var StorageKindSchema = zod.z.object({
17419
17401
  declaration: RecordKindDeclarationSchema
17420
17402
  });
17421
17403
  /**
17422
- * The collections retired by exact name: the D870 ones (their data became keys
17423
- * of the camera's settings) and the three D871 leftovers (the `stats-5m` tables
17424
- * superseded by `stats-5m-v2`, and the unread `vec_object_clip`). No addon
17425
- * declares any of them any more; the engine still refuses one a running addon
17426
- * declared this boot. `dropCollection` may remove these, the
17427
- * per-addon scoped `addon-settings` / `addon-devices` / `sections` tables, and
17428
- * the tables of owners that are no longer installed - nothing else.
17404
+ * The collections retired by exact name by D870 (their data became keys of the
17405
+ * camera's settings). No addon declares any of them any more; the engine still
17406
+ * refuses one a running addon declared this boot. `dropCollection` may remove
17407
+ * these, the per-addon scoped `addon-settings` / `addon-devices` / `sections`
17408
+ * tables, and the tables of owners that are no longer installed - nothing else.
17409
+ * The records-migration leftovers (D871 `stats-5m`, the phase-0 tables) were
17410
+ * dropped by hand on the operator hubs and left this list with D900.
17429
17411
  */
17430
17412
  var STORAGE_ADMIN_MOVED_COLLECTIONS = [
17431
17413
  "stream-broker:probe-snapshots",
@@ -17433,19 +17415,7 @@ var STORAGE_ADMIN_MOVED_COLLECTIONS = [
17433
17415
  "stream-broker:rtsp-tokens",
17434
17416
  "notification-center:device-mutes",
17435
17417
  "recorder:recording-configs",
17436
- "pipeline-orchestrator:device-features",
17437
- "pipeline-analytics:stats-5m",
17438
- "pipeline-orchestrator:stats-5m",
17439
- "vec_object_clip",
17440
- "addon-devices",
17441
- "sections",
17442
- "provider-settings",
17443
- "device-settings",
17444
- "ai:budgets",
17445
- "pipeline-analytics:retrain-dataset-versions",
17446
- "training:dataset-versions",
17447
- "benchmark:replay-runs",
17448
- "viewer-settings-snapshots"
17418
+ "pipeline-orchestrator:device-features"
17449
17419
  ];
17450
17420
  /** The per-addon blob tables a scoped name may carry. */
17451
17421
  var STORAGE_ADMIN_SCOPED_BASES = [
@@ -17509,42 +17479,7 @@ var storageAdminCapability = {
17509
17479
  readRecords: method(RecordQueryInputSchema.extend({
17510
17480
  owner: zod.z.string().min(1),
17511
17481
  kind: RecordKindNameSchema
17512
- }), RecordQueryResultSchema, { auth: "admin" }),
17513
- /**
17514
- * The migration copy path (D881): write rows into a kind AS ITS DECLARED
17515
- * OWNER. Refused when that owner's manifest does not declare the kind.
17516
- * Idempotent (a put by id, so a re-run resumes). A secret field carries a
17517
- * keychain marker bound to the row's own ref - the operator script imports
17518
- * the value first - and a plain string there is refused.
17519
- */
17520
- adoptRecords: method(zod.z.object({
17521
- owner: zod.z.string().min(1),
17522
- kind: RecordKindNameSchema,
17523
- records: zod.z.array(RecordInputSchema).max(RECORD_BATCH_MAX),
17524
- /** The LAST batch: the copy is complete, the boot guard stops asking. */
17525
- complete: zod.z.boolean().optional()
17526
- }).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), zod.z.object({ adopted: zod.z.number().int() }), {
17527
- kind: "mutation",
17528
- auth: "admin"
17529
- }),
17530
- /**
17531
- * Read rows from a legacy KV table by physical name, without a running
17532
- * `declareCollection`. Used by `records-adopt.ts` when the owner already
17533
- * moved to records and the collection door refuses the name.
17534
- */
17535
- readLegacyCollection: method(zod.z.object({
17536
- collection: zod.z.string().min(1),
17537
- cursor: zod.z.string().optional(),
17538
- limit: zod.z.number().int().min(1).max(1e3).optional()
17539
- }), zod.z.object({
17540
- rows: zod.z.array(zod.z.object({
17541
- id: zod.z.string(),
17542
- data: zod.z.record(zod.z.string(), zod.z.unknown())
17543
- })),
17544
- nextCursor: zod.z.string().nullable()
17545
- }), { auth: "admin" }),
17546
- /** True when a declared kind lists `collection` as `adoptsFrom` and adoption finished. */
17547
- isAdoptedLegacyTable: method(zod.z.object({ collection: zod.z.string().min(1) }), zod.z.object({ adopted: zod.z.boolean() }), { auth: "admin" })
17482
+ }), RecordQueryResultSchema, { auth: "admin" })
17548
17483
  }
17549
17484
  };
17550
17485
  /**
@@ -66843,9 +66778,24 @@ var NpuInfoSchema = zod.z.object({
66843
66778
  name: zod.z.string().optional(),
66844
66779
  generation: zod.z.enum(["xdna1", "xdna2"]).optional()
66845
66780
  });
66781
+ var CoralBusSchema = zod.z.enum(["usb", "pci"]);
66846
66782
  var CoralInfoSchema = zod.z.object({
66847
66783
  type: zod.z.literal("coral-edgetpu"),
66848
- bus: zod.z.string().optional()
66784
+ /** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
66785
+ bus: zod.z.string().optional(),
66786
+ /** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
66787
+ count: zod.z.number().int().nonnegative().optional(),
66788
+ /** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
66789
+ units: zod.z.array(zod.z.object({
66790
+ bus: CoralBusSchema,
66791
+ count: zod.z.number().int().nonnegative()
66792
+ })).readonly().optional(),
66793
+ /** Present-but-unusable units, each with its typed reason (never "absent"). */
66794
+ unavailable: zod.z.array(zod.z.object({
66795
+ bus: CoralBusSchema,
66796
+ count: zod.z.number().int().nonnegative(),
66797
+ reason: zod.z.enum(["driver-missing", "device-not-accessible"])
66798
+ })).readonly().optional()
66849
66799
  });
66850
66800
  var HardwareInfoSchema = zod.z.object({
66851
66801
  platform: HardwarePlatformSchema,
@@ -76951,6 +76901,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
76951
76901
  addonId: null,
76952
76902
  access: "view"
76953
76903
  },
76904
+ "deviceHistory.queryMany": {
76905
+ capName: "device-history",
76906
+ capScope: "system",
76907
+ addonId: null,
76908
+ access: "view"
76909
+ },
76954
76910
  "deviceHistory.queryNode": {
76955
76911
  capName: "device-history",
76956
76912
  capScope: "system",
@@ -82171,24 +82127,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
82171
82127
  addonId: null,
82172
82128
  access: "create"
82173
82129
  },
82174
- "storageAdmin.adoptRecords": {
82175
- capName: "storage-admin",
82176
- capScope: "system",
82177
- addonId: null,
82178
- access: "create"
82179
- },
82180
82130
  "storageAdmin.dropCollection": {
82181
82131
  capName: "storage-admin",
82182
82132
  capScope: "system",
82183
82133
  addonId: null,
82184
82134
  access: "delete"
82185
82135
  },
82186
- "storageAdmin.isAdoptedLegacyTable": {
82187
- capName: "storage-admin",
82188
- capScope: "system",
82189
- addonId: null,
82190
- access: "view"
82191
- },
82192
82136
  "storageAdmin.listKinds": {
82193
82137
  capName: "storage-admin",
82194
82138
  capScope: "system",
@@ -82201,12 +82145,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
82201
82145
  addonId: null,
82202
82146
  access: "view"
82203
82147
  },
82204
- "storageAdmin.readLegacyCollection": {
82205
- capName: "storage-admin",
82206
- capScope: "system",
82207
- addonId: null,
82208
- access: "view"
82209
- },
82210
82148
  "storageAdmin.readRecords": {
82211
82149
  capName: "storage-admin",
82212
82150
  capScope: "system",
@@ -86292,12 +86230,6 @@ Object.freeze({
86292
86230
  form: "single",
86293
86231
  optional: false
86294
86232
  }],
86295
- "storageAdmin.adoptRecords": [{
86296
- name: "records",
86297
- form: "object-array",
86298
- optional: false,
86299
- itemField: "deviceId"
86300
- }],
86301
86233
  "storageAdmin.readRecords": [{
86302
86234
  name: "deviceId",
86303
86235
  form: "single",
@@ -88579,6 +88511,29 @@ function decodeVectorBase64(encoded) {
88579
88511
  function vectorDimFromBase64(encoded) {
88580
88512
  return Math.floor(Buffer.from(encoded, "base64").byteLength / 4);
88581
88513
  }
88514
+ /** Bus order of the enumeration: USB first (the historical key), then PCIe. */
88515
+ var BUS_ORDER = ["usb", "pci"];
88516
+ function unitDevice(bus, index) {
88517
+ return index === 0 ? bus : `${bus}:${index}`;
88518
+ }
88519
+ function countOn(coral, bus) {
88520
+ if (coral.units !== void 0) return coral.units.filter((u) => u.bus === bus).reduce((n, u) => n + Math.max(0, u.count), 0);
88521
+ return bus === (coral.bus === "pci" ? "pci" : "usb") ? Math.max(1, coral.count ?? 1) : 0;
88522
+ }
88523
+ /** Every usable Coral unit on a node, USB first then PCIe, in ordinal order. */
88524
+ function coralUsableUnits(coral) {
88525
+ if (coral == null) return [];
88526
+ const out = [];
88527
+ for (const bus of BUS_ORDER) {
88528
+ const count = countOn(coral, bus);
88529
+ for (let index = 0; index < count; index++) out.push({
88530
+ bus,
88531
+ index,
88532
+ device: unitDevice(bus, index)
88533
+ });
88534
+ }
88535
+ return out;
88536
+ }
88582
88537
  var AUTO = {
88583
88538
  value: "auto",
88584
88539
  label: "Auto"
@@ -88591,6 +88546,14 @@ var USB = {
88591
88546
  value: "usb",
88592
88547
  label: "Coral USB"
88593
88548
  };
88549
+ function coralUnitOption(unit) {
88550
+ const bus = unit.bus === "pci" ? "PCIe" : "USB";
88551
+ const label = unit.index === 0 ? `Coral ${bus}` : `Coral ${bus} ${unit.index + 1}`;
88552
+ return {
88553
+ value: unit.device,
88554
+ label
88555
+ };
88556
+ }
88594
88557
  var RUNTIMES = [
88595
88558
  {
88596
88559
  id: "onnx",
@@ -88657,8 +88620,11 @@ var RUNTIMES = [
88657
88620
  },
88658
88621
  {
88659
88622
  id: "edgetpu",
88660
- supports: (hw) => hw?.coral != null,
88661
- devices: () => [USB],
88623
+ supports: (hw) => coralUsableUnits(hw?.coral).length > 0,
88624
+ devices: (hw) => {
88625
+ const units = coralUsableUnits(hw?.coral);
88626
+ return units.length > 0 ? units.map(coralUnitOption) : [USB];
88627
+ },
88662
88628
  defaultDevice: "usb"
88663
88629
  }
88664
88630
  ];
@@ -88676,7 +88642,7 @@ function supportedRuntimes(hw) {
88676
88642
  * - coreml: score 95, darwin+arm64
88677
88643
  * - cuda: score 85, nvidia gpu
88678
88644
  * - openvino: score 90 if intel-npu present, else 80 if intel gpu
88679
- * - edgetpu: score 70, coral usb present
88645
+ * - edgetpu: score 70, a usable Coral unit (USB or PCIe)
88680
88646
  * - cpu: score 50 (universal floor, always included)
88681
88647
  *
88682
88648
  * All hardware-matched entries are `available: true`.
@@ -88730,7 +88696,7 @@ function scoreRuntimes(hw) {
88730
88696
  available: true
88731
88697
  });
88732
88698
  }
88733
- if (hw.coral != null) scores.push({
88699
+ if (coralUsableUnits(hw.coral).length > 0) scores.push({
88734
88700
  runtime: "python",
88735
88701
  backend: "edgetpu",
88736
88702
  format: "tflite",
@@ -88789,11 +88755,7 @@ function enumerateInferenceDevices(hw) {
88789
88755
  continue;
88790
88756
  }
88791
88757
  if (s.backend === "edgetpu") {
88792
- const coralCount = Math.max(1, hw.coral?.count ?? 1);
88793
- for (let i = 0; i < coralCount; i++) {
88794
- const dev = i === 0 ? "usb" : `usb:${i}`;
88795
- out.push(device("edgetpu", dev, s.format, s.score));
88796
- }
88758
+ for (const unit of coralUsableUnits(hw.coral)) out.push(device("edgetpu", unit.device, s.format, s.score));
88797
88759
  continue;
88798
88760
  }
88799
88761
  if (s.backend === "onnx" && s.reason.startsWith("ONNX WebGPU")) {
@@ -89830,12 +89792,6 @@ Object.defineProperty(exports, "declarationOwnerNodeId", {
89830
89792
  return declarationOwnerNodeId;
89831
89793
  }
89832
89794
  });
89833
- Object.defineProperty(exports, "declarationsOf", {
89834
- enumerable: true,
89835
- get: function() {
89836
- return declarationsOf;
89837
- }
89838
- });
89839
89795
  Object.defineProperty(exports, "decodeVectorBase64", {
89840
89796
  enumerable: true,
89841
89797
  get: function() {
@@ -90316,18 +90272,6 @@ Object.defineProperty(exports, "parseSecretRef", {
90316
90272
  return parseSecretRef;
90317
90273
  }
90318
90274
  });
90319
- Object.defineProperty(exports, "parseSettingsArrayAdoptsFrom", {
90320
- enumerable: true,
90321
- get: function() {
90322
- return parseSettingsArrayAdoptsFrom;
90323
- }
90324
- });
90325
- Object.defineProperty(exports, "parseSettingsBrokersAdoptsFrom", {
90326
- enumerable: true,
90327
- get: function() {
90328
- return parseSettingsBrokersAdoptsFrom;
90329
- }
90330
- });
90331
90275
  Object.defineProperty(exports, "parseStreamParamsFormPatch", {
90332
90276
  enumerable: true,
90333
90277
  get: function() {