@camstack/addon-pipeline-orchestrator 1.2.112 → 1.2.114

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/index.mjs CHANGED
@@ -8316,6 +8316,111 @@ function composeSwitchedOff(input) {
8316
8316
  };
8317
8317
  }
8318
8318
  /**
8319
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
8320
+ * an addon declares its channels in.
8321
+ *
8322
+ * ## Two axes, deliberately separated
8323
+ *
8324
+ * - **DECLARATION** — which channels exist. Only the addon knows:
8325
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
8326
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
8327
+ * and rots silently. So a channel is declared where it is consulted, and the
8328
+ * `log-channels` capability enumerates the declarations.
8329
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
8330
+ * thing: the logging settings document on the `system` cap. Two authorities
8331
+ * over the values is the exact defect
8332
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
8333
+ * remove; re-introducing it from the cure side would be grotesque.
8334
+ *
8335
+ * Nothing in this file reads a clock, an env var or a store. The registry is
8336
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
8337
+ * the hot path with a value somebody actually read, and by
8338
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
8339
+ * never reaches here, so it can neither disarm an armed channel nor arm a
8340
+ * disarmed one (D49).
8341
+ *
8342
+ * ## The canonical call shape
8343
+ *
8344
+ * ```ts
8345
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
8346
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
8347
+ * }
8348
+ * ```
8349
+ *
8350
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
8351
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
8352
+ * object literal is never constructed because it lives inside the branch. It
8353
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
8354
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
8355
+ * destination floor (measured at 1.93 ns/call when off).
8356
+ *
8357
+ * ## Why a channel emits at `info`
8358
+ *
8359
+ * `loki-logging.addon.ts` pins the destination default at `info` and
8360
+ * `loki-destination.ts` drops everything below it, so a line emitted at
8361
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
8362
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
8363
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
8364
+ * emits at the channel's declared level, whose schema floor is `info`.
8365
+ */
8366
+ /**
8367
+ * The level a channel writes at once armed.
8368
+ *
8369
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
8370
+ * not leave the process for Loki, and the whole point of arming a channel is
8371
+ * to read it later.
8372
+ */
8373
+ var LogChannelLevelSchema = _enum([
8374
+ "info",
8375
+ "warn",
8376
+ "error"
8377
+ ]);
8378
+ /**
8379
+ * What an addon declares about one channel. No value, no state — a
8380
+ * declaration is inert.
8381
+ */
8382
+ var LogChannelDescriptorSchema = object({
8383
+ /**
8384
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
8385
+ * the addon's short name so an operator reading a channel list can tell who
8386
+ * owns it without a second lookup.
8387
+ */
8388
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
8389
+ /** One sentence: what the operator will SEE after arming it. */
8390
+ description: string().min(1),
8391
+ /** The level its lines are emitted at. Never below `info`. */
8392
+ defaultLevel: LogChannelLevelSchema,
8393
+ /**
8394
+ * Whether this channel can be narrowed to a camera.
8395
+ *
8396
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
8397
+ * consulted with the numeric device id, AND every line the channel admits
8398
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
8399
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
8400
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
8401
+ * the body is the only way to filter.
8402
+ *
8403
+ * A channel whose lines carry the device only in `meta` (or not at all) is
8404
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
8405
+ * the operator narrows to one camera, sees nothing, and concludes the code
8406
+ * path was never taken.
8407
+ */
8408
+ perDevice: boolean()
8409
+ });
8410
+ /**
8411
+ * An armed window over one channel, as the document hands it to a mirror.
8412
+ *
8413
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
8414
+ * expires by itself, which is the one failure a boolean cannot avoid.
8415
+ */
8416
+ var LogChannelWindowSchema = object({
8417
+ channel: string().min(1),
8418
+ /** Epoch ms the window closes at. */
8419
+ armedUntilMs: number(),
8420
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
8421
+ deviceIds: array(number().int()).readonly().nullable()
8422
+ });
8423
+ /**
8319
8424
  * Ops-log — the durable, append-only operations audit shared by the
8320
8425
  * recordings and events management surfaces.
8321
8426
  *
@@ -11913,6 +12018,35 @@ var MutationFilterSchema = object({
11913
12018
  whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
11914
12019
  whereNot: record(string(), unknown()).optional()
11915
12020
  });
12021
+ /**
12022
+ * One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
12023
+ *
12024
+ * `as` names the slot in the result, so the SAME column may be asked twice with
12025
+ * two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
12026
+ * a `Record<column, op>` shape could not express.
12027
+ */
12028
+ var AggregateFieldSchema = object({
12029
+ /** Result key. */
12030
+ as: string().min(1),
12031
+ /** Column to aggregate. Must be a real column of a declared collection. */
12032
+ field: string().min(1),
12033
+ op: _enum([
12034
+ "sum",
12035
+ "min",
12036
+ "max"
12037
+ ])
12038
+ });
12039
+ /**
12040
+ * `COUNT(*)` plus one number per requested field.
12041
+ *
12042
+ * `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
12043
+ * that really is 0 are different facts, and an accounting caller that renders
12044
+ * "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
12045
+ */
12046
+ var AggregateResultSchema = object({
12047
+ count: number().int(),
12048
+ values: record(string(), number().nullable())
12049
+ });
11916
12050
  /** A single stored record: `{ id, data }`. */
11917
12051
  var SettingsRecordSchema = object({
11918
12052
  id: string(),
@@ -11997,6 +12131,11 @@ method(object({
11997
12131
  collection: string(),
11998
12132
  filter: QueryFilterSchema.optional()
11999
12133
  }), number()), method(object({
12134
+ namespace: string().optional(),
12135
+ collection: string(),
12136
+ fields: array(AggregateFieldSchema).readonly(),
12137
+ filter: QueryFilterSchema.optional()
12138
+ }), AggregateResultSchema), method(object({
12000
12139
  namespace: string().optional(),
12001
12140
  collection: string(),
12002
12141
  field: string(),
@@ -12113,6 +12252,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
12113
12252
  collection: string(),
12114
12253
  filter: QueryFilterSchema.optional()
12115
12254
  }), number(), { auth: "admin" }), method(object({
12255
+ namespace: string().optional(),
12256
+ collection: string(),
12257
+ fields: array(AggregateFieldSchema).readonly(),
12258
+ filter: QueryFilterSchema.optional()
12259
+ }), AggregateResultSchema, { auth: "admin" }), method(object({
12116
12260
  namespace: string().optional(),
12117
12261
  collection: string(),
12118
12262
  field: string(),
@@ -12674,24 +12818,6 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
12674
12818
  kind: "mutation",
12675
12819
  auth: "admin"
12676
12820
  });
12677
- /**
12678
- * Device Manager capability — hub-side singleton that unifies device persistence,
12679
- * live registry access, and all management operations into a single tRPC surface.
12680
- *
12681
- * Replaces:
12682
- * - `device-persistence` capability (persistence methods absorbed here)
12683
- * - `device-management.router.ts` (deleted in Phase 2)
12684
- * - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
12685
- *
12686
- * All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
12687
- * fork into separate processes but never run on remote cluster agents. Therefore:
12688
- * - No nodeId routing needed — this is a pure hub singleton.
12689
- * - The hub's DeviceRegistry is the single source of truth for all live devices.
12690
- * - No shadow registry or cross-node aggregation required.
12691
- *
12692
- * Forked workers register devices back to the hub via `ctx.devices`
12693
- * (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
12694
- */
12695
12821
  /** One child-placement directive on a container's `childLayout`. Structurally
12696
12822
  * identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
12697
12823
  * shape for the same field. The child is identified by its re-sync-stable
@@ -13060,7 +13186,7 @@ method(object({
13060
13186
  * it answers today and the caller filters as it already does.
13061
13187
  */
13062
13188
  deviceIds: array(number()).optional()
13063
- }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
13189
+ }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ parentDeviceIds: array(number()).max(256) }), record(string(), array(DeviceInfoSchema))), method(object({ deviceId: number() }), object({
13064
13190
  mode: LinkedDevicesModeSchema,
13065
13191
  devices: array(LinkedDeviceSchema)
13066
13192
  })), method(object({ deviceIds: array(number()) }), array(LinkedDevicesForDeviceSchema)), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
@@ -13784,6 +13910,59 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13784
13910
  kind: "mutation",
13785
13911
  auth: "admin"
13786
13912
  });
13913
+ /**
13914
+ * `log-channels` — the capability an addon DECLARES its diagnostic channels
13915
+ * through. It stores nothing.
13916
+ *
13917
+ * ## Why a capability at all, and why this shape
13918
+ *
13919
+ * Which channels exist is knowledge only the addon has: `stream-broker` knows
13920
+ * webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
13921
+ * maintained by hand rots at the first addition and rots INVISIBLY — nothing
13922
+ * fails, an operator just never sees the channel somebody added. So the list
13923
+ * is assembled from declarations at runtime.
13924
+ *
13925
+ * The shape is copied from `log-destination.cap.ts`, which already does
13926
+ * exactly this job: `mode: 'collection'`, `internal: true`,
13927
+ * `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
13928
+ * `addons.listCapabilityProviders` still enumerates it, and the hub's
13929
+ * `CapabilityRegistry` still holds an RPC proxy per provider so a forked
13930
+ * runner's declarations reach hub-main over the transport that already exists.
13931
+ * No new UDS message, no second registry.
13932
+ *
13933
+ * ## What it deliberately does NOT own
13934
+ *
13935
+ * The VALUES — which channel is armed, for which cameras, until when — live in
13936
+ * ONE place: the logging settings document on the `system` cap
13937
+ * (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
13938
+ * value is the defect the plan behind this work exists to remove, and
13939
+ * `setRequestCensus` was retired (D245) rather than allowed to be a second
13940
+ * one. {@link logChannelsCapability} therefore has no getter for a level, no
13941
+ * setter for a window and no persistence of any kind.
13942
+ *
13943
+ * ## Why `apply` is here even so
13944
+ *
13945
+ * The gate lives in the addon's PROCESS; the document lives in hub-main. Some
13946
+ * seam has to carry the value from the authority to the mirror, and a channel
13947
+ * that cannot be reached is precisely the dead knob this whole slice exists to
13948
+ * make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
13949
+ * `apply` is that seam and nothing more: it writes an in-memory mirror, it
13950
+ * persists nothing, it is never the source of a value, and it is called only
13951
+ * with a set the hub actually read (D49 — a read that fails does not call it
13952
+ * at all, so no channel is silently disarmed by a bad read).
13953
+ */
13954
+ /** What `apply` reports back — enough to log, not enough to be a second state. */
13955
+ var LogChannelApplyResultSchema = object({
13956
+ /** How many declared channels are armed in this process after the call. */
13957
+ armed: number().int().min(0),
13958
+ /**
13959
+ * Names the document armed that this process does not declare. Reported
13960
+ * rather than swallowed: a name here is either a typo or an addon that has
13961
+ * not booted, and both deserve a line instead of silence.
13962
+ */
13963
+ unknown: array(string()).readonly()
13964
+ });
13965
+ method(_void(), array(LogChannelDescriptorSchema).readonly()), method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" });
13787
13966
  var LogLevelSchema = _enum([
13788
13967
  "debug",
13789
13968
  "info",
@@ -27744,17 +27923,60 @@ var SetSiteLocationInputSchema = object({
27744
27923
  longitude: number().min(-180).max(180)
27745
27924
  }).nullable();
27746
27925
  /**
27747
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
27926
+ * The TRANSPORT a call arrived on.
27927
+ *
27928
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
27929
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
27930
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
27931
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
27932
+ * checkable rather than asserted.
27933
+ *
27934
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
27935
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
27936
+ * connection; the viewer talks to the hub over `wsLink`
27937
+ * exclusively, so this is the plane the HTTP census could not see.
27938
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
27939
+ * never touches a socket and therefore never touched a census.
27940
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
27941
+ * that is exactly what its `0` asserts: every plane the hub has can name
27942
+ * itself. It is an output bucket, never a knob — a call that arrives on a
27943
+ * plane nobody instrumented lands here instead of vanishing from the total.
27944
+ */
27945
+ var TransportPlaneSchema = _enum([
27946
+ "http",
27947
+ "ws",
27948
+ "mesh",
27949
+ "unknown"
27950
+ ]);
27951
+ /**
27952
+ * Calls per plane. Every key is always present, `0` included — an absent plane
27953
+ * reads as "not instrumented", which is the one thing this census must never
27954
+ * make an operator wonder about.
27955
+ */
27956
+ var TransportPlaneCountsSchema = object({
27957
+ http: number(),
27958
+ ws: number(),
27959
+ mesh: number(),
27960
+ unknown: number()
27961
+ });
27962
+ /**
27963
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
27748
27964
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
27749
27965
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
27750
27966
  * already prints - never a token, never an `Authorization` header.
27967
+ *
27968
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
27969
+ * and lives for hours, so folding it into a call count makes one long-lived
27970
+ * stream look like a storm.
27751
27971
  */
27752
27972
  var RequestCensusGroupSchema = object({
27973
+ plane: TransportPlaneSchema,
27753
27974
  procedure: string(),
27754
27975
  userAgent: string(),
27755
27976
  ip: string(),
27756
27977
  principal: string(),
27757
27978
  calls: number(),
27979
+ subscriptions: number(),
27758
27980
  perMin: number()
27759
27981
  });
27760
27982
  /**
@@ -27767,6 +27989,14 @@ var RequestCensusGroupSchema = object({
27767
27989
  var RequestCensusProcedureSchema = object({
27768
27990
  procedure: string(),
27769
27991
  calls: number(),
27992
+ /**
27993
+ * The same total, split by transport. THIS is the row that answers the
27994
+ * question the census exists for: one look at `deviceManager.listAll` says
27995
+ * which plane carried the 4 960, without joining two log lines by eye.
27996
+ */
27997
+ planes: TransportPlaneCountsSchema,
27998
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
27999
+ subscriptions: number(),
27770
28000
  perMin: number()
27771
28001
  });
27772
28002
  /**
@@ -27794,14 +28024,45 @@ var RequestCensusStatusSchema = object({
27794
28024
  */
27795
28025
  procedureCalls: number(),
27796
28026
  /**
28027
+ * `procedureCalls` split by transport. The four keys sum to
28028
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
28029
+ * `planesExplainTotal` is that identity, checked rather than assumed.
28030
+ */
28031
+ planes: TransportPlaneCountsSchema,
28032
+ /**
28033
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
28034
+ * on no plane at all - which is a RESULT (a plane is missing from the
28035
+ * instrument), not a failure, and it has to be visible to be read as one.
28036
+ */
28037
+ planesExplainTotal: boolean(),
28038
+ /**
27797
28039
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
27798
- * transport resolves one context per connection - but the number that says
27799
- * whether a plane this census cannot see was busy while HTTP was quiet.
28040
+ * adapter resolves one context per connection - kept because a plane's call
28041
+ * count of zero against 37 open connections says something different from a
28042
+ * plane with no connections at all.
27800
28043
  */
27801
28044
  wsConnections: number(),
28045
+ /**
28046
+ * Client frames the WS plane looked at. `wsMessages` far above
28047
+ * `planes.ws + subscriptions` means most traffic is not operations
28048
+ * (keepalives, connection params) - which is itself an answer.
28049
+ */
28050
+ wsMessages: number(),
28051
+ /**
28052
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
28053
+ * purpose: one live-events stream opened at boot and held for six hours is
28054
+ * one subscription, and counting it as a call would let a quiet plane
28055
+ * masquerade as the storm.
28056
+ */
28057
+ subscriptions: number(),
28058
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
28059
+ subscriptionStops: number(),
27802
28060
  distinctGroups: number(),
27803
- /** Calls counted in the totals whose group attribution was shed at the
27804
- * cardinality bound. */
28061
+ /**
28062
+ * Operations counted in the totals whose CALLER attribution was shed at the
28063
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
28064
+ * which transport they arrived on, they just lost their group row.
28065
+ */
27805
28066
  unattributedCalls: number(),
27806
28067
  procedures: array(RequestCensusProcedureSchema).readonly(),
27807
28068
  groups: array(RequestCensusGroupSchema).readonly()
@@ -27824,10 +28085,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
27824
28085
  * The layers of the level hierarchy, general → specific. The most specific
27825
28086
  * layer that carries an explicit value wins.
27826
28087
  *
27827
- * `component` is DECLARED and not yet resolvable: the per-component channels
27828
- * are a later slice of the same plan, and a `levelSource` enum that has to
27829
- * grow later would force every consumer of this document to change with it.
27830
- * Nothing returns `component` today.
28088
+ * `component` became RESOLVABLE on 2026-08-27: a component is a declared log
28089
+ * CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
28090
+ * `scopeComponent`. It was declared-but-dark in the first slice precisely so
28091
+ * that turning it on would not force every consumer of this document to widen
28092
+ * a `levelSource` enum — which is what has now not happened.
27831
28093
  */
27832
28094
  var LoggingScopeKindSchema = _enum([
27833
28095
  "cluster",
@@ -27854,6 +28116,14 @@ var LoggingLevelLayerSchema = object({
27854
28116
  scope: LoggingScopeKindSchema,
27855
28117
  /** The node this layer speaks for; `null` on the cluster layer. */
27856
28118
  nodeId: string().nullable(),
28119
+ /**
28120
+ * The declared channel this layer speaks for; `null` on every layer but
28121
+ * `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
28122
+ * by design — the convention this repo settled on is one orchestrator-wide
28123
+ * setting, never per node (D52) — so a component layer that carried a node
28124
+ * would invite a per-node copy of a value that has no per-node meaning.
28125
+ */
28126
+ component: string().nullable(),
27857
28127
  /** Explicitly set here, or `null` when this layer inherits. */
27858
28128
  level: LogLevelSchema$1.nullable()
27859
28129
  });
@@ -27895,6 +28165,49 @@ var DiagnosticWindowPatchSchema = object({
27895
28165
  reportEveryMs: number().int().positive().optional()
27896
28166
  });
27897
28167
  /**
28168
+ * A channel ARMED, as the document reports it.
28169
+ *
28170
+ * `armMs` is not echoed back: what an operator needs to see is the deadline
28171
+ * and the time left, because a diagnostic left running is itself an incident
28172
+ * and "armed for 10 minutes" said an hour ago is not an answer.
28173
+ */
28174
+ var LogChannelWindowStateSchema = object({
28175
+ channel: string(),
28176
+ armed: boolean(),
28177
+ /** Epoch ms the window closes at. 0 when disarmed. */
28178
+ armedUntilMs: number(),
28179
+ /** Ms left before it expires on its own. 0 when disarmed. */
28180
+ remainingMs: number(),
28181
+ /**
28182
+ * The cameras it is narrowed to, or `null` for every camera.
28183
+ *
28184
+ * A channel declared `perDevice: false` can only ever report `null` here:
28185
+ * its lines do not carry `tags: { deviceId }`, so narrowing them would
28186
+ * produce a filter that silently matches nothing. The server REFUSES such a
28187
+ * patch rather than quietly widening it — ignoring the request would teach
28188
+ * the operator that per-camera filtering works on that channel when it does
28189
+ * not.
28190
+ */
28191
+ deviceIds: array(number().int()).readonly().nullable()
28192
+ });
28193
+ /**
28194
+ * `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
28195
+ * for the same reason: a channel is a window with a deadline, never a switch.
28196
+ */
28197
+ var LogChannelWindowPatchSchema = object({
28198
+ channel: string().min(1),
28199
+ armMs: number().int().min(0),
28200
+ /**
28201
+ * Narrow to these numeric device ids. Absent or `null` = every camera.
28202
+ *
28203
+ * Numeric because the repo's own rule makes it possible: every log line
28204
+ * about a device carries `tags: { deviceId }` with the numeric id. That rule
28205
+ * was paid for with a 22% thumbnail gap and a 3-hour media blackout both
28206
+ * diagnosed by hand, and this is the first thing that collects on it.
28207
+ */
28208
+ deviceIds: array(number().int()).readonly().nullable().optional()
28209
+ });
28210
+ /**
27898
28211
  * A PATCH, and patches MERGE.
27899
28212
  *
27900
28213
  * A field absent from the patch is left exactly as it was — arming a
@@ -27913,7 +28226,14 @@ var LoggingSettingsPatchSchema = object({
27913
28226
  * Only the diagnostics NAMED here change. An armed window that is not listed
27914
28227
  * keeps running — a patch is never a full replacement.
27915
28228
  */
27916
- diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
28229
+ diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
28230
+ /**
28231
+ * Only the channels NAMED here change. An armed channel that is not listed
28232
+ * keeps running — same rule as `diagnostics`, because a patch that silently
28233
+ * disarmed the channels it did not mention would make the Levels page and
28234
+ * the Diagnostics page fight over the same value.
28235
+ */
28236
+ channels: array(LogChannelWindowPatchSchema).readonly().optional()
27917
28237
  });
27918
28238
  /**
27919
28239
  * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
@@ -27926,9 +28246,22 @@ var LoggingSettingsPatchSchema = object({
27926
28246
  * authority over the whole hierarchy and answers for every layer, so the
27927
28247
  * layer selector needs a name the transport does not already own.
27928
28248
  */
27929
- var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
28249
+ var GetLoggingSettingsInputSchema = object({
28250
+ scopeNodeId: string().optional(),
28251
+ /**
28252
+ * The declared CHANNEL this document is addressed at, when the caller wants
28253
+ * the `component` layer. Absent = the node/cluster hierarchy only.
28254
+ *
28255
+ * Naming it separately rather than overloading `scopeNodeId` keeps the two
28256
+ * axes from collapsing: a component level is cluster-wide, a node level is
28257
+ * not, and one selector for both would make "which of these two did I just
28258
+ * set" unanswerable — the exact ambiguity `explicit` exists to remove.
28259
+ */
28260
+ scopeComponent: string().optional()
28261
+ });
27930
28262
  var SetLoggingSettingsInputSchema = object({
27931
28263
  scopeNodeId: string().optional(),
28264
+ scopeComponent: string().optional(),
27932
28265
  patch: LoggingSettingsPatchSchema
27933
28266
  });
27934
28267
  /**
@@ -27943,9 +28276,20 @@ var SetLoggingSettingsInputSchema = object({
27943
28276
  var LoggingSettingsStateSchema = object({
27944
28277
  /** The layer this document was read at. `null` = the cluster layer. */
27945
28278
  scopeNodeId: string().nullable(),
28279
+ /** The channel this document was read at. `null` = no component layer. */
28280
+ scopeComponent: string().nullable(),
27946
28281
  effective: LoggingEffectiveSchema,
27947
28282
  explicit: LoggingExplicitSchema,
27948
28283
  activeWindows: array(DiagnosticWindowSchema).readonly(),
28284
+ /**
28285
+ * Every channel the cluster's addons DECLARE, gathered from the
28286
+ * `log-channels` providers. Not stored anywhere: assembled per read, so a
28287
+ * channel added by a redeployed addon appears without anybody editing a
28288
+ * list, and a channel whose addon is gone stops being offered.
28289
+ */
28290
+ channels: array(LogChannelDescriptorSchema).readonly(),
28291
+ /** The channels ARMED right now, each with its deadline. */
28292
+ activeChannels: array(LogChannelWindowStateSchema).readonly(),
27949
28293
  persisted: boolean()
27950
28294
  });
27951
28295
  method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), method(_void(), FeatureManifestSchema), method(_void(), array(NetworkAddressSchema).readonly()), method(_void(), unknown().nullable(), { auth: "admin" }), method(record(string(), unknown()), _null(), {
@@ -29606,6 +29950,12 @@ Object.freeze({
29606
29950
  addonId: null,
29607
29951
  access: "view"
29608
29952
  },
29953
+ "dataStoreProvider.aggregate": {
29954
+ capName: "data-store-provider",
29955
+ capScope: "system",
29956
+ addonId: null,
29957
+ access: "view"
29958
+ },
29609
29959
  "dataStoreProvider.count": {
29610
29960
  capName: "data-store-provider",
29611
29961
  capScope: "system",
@@ -30020,6 +30370,12 @@ Object.freeze({
30020
30370
  addonId: null,
30021
30371
  access: "view"
30022
30372
  },
30373
+ "deviceManager.getChildrenBatch": {
30374
+ capName: "device-manager",
30375
+ capScope: "system",
30376
+ addonId: null,
30377
+ access: "view"
30378
+ },
30023
30379
  "deviceManager.getConfigSchema": {
30024
30380
  capName: "device-manager",
30025
30381
  capScope: "system",
@@ -31070,6 +31426,18 @@ Object.freeze({
31070
31426
  addonId: null,
31071
31427
  access: "create"
31072
31428
  },
31429
+ "logChannels.apply": {
31430
+ capName: "log-channels",
31431
+ capScope: "system",
31432
+ addonId: null,
31433
+ access: "create"
31434
+ },
31435
+ "logChannels.list": {
31436
+ capName: "log-channels",
31437
+ capScope: "system",
31438
+ addonId: null,
31439
+ access: "view"
31440
+ },
31073
31441
  "logDestination.query": {
31074
31442
  capName: "log-destination",
31075
31443
  capScope: "system",
@@ -33224,6 +33592,12 @@ Object.freeze({
33224
33592
  addonId: null,
33225
33593
  access: "create"
33226
33594
  },
33595
+ "settingsStore.aggregate": {
33596
+ capName: "settings-store",
33597
+ capScope: "system",
33598
+ addonId: null,
33599
+ access: "view"
33600
+ },
33227
33601
  "settingsStore.count": {
33228
33602
  capName: "settings-store",
33229
33603
  capScope: "system",
@@ -34803,6 +35177,11 @@ Object.freeze({
34803
35177
  form: "single",
34804
35178
  optional: false
34805
35179
  }],
35180
+ "deviceManager.getChildrenBatch": [{
35181
+ name: "parentDeviceIds",
35182
+ form: "array",
35183
+ optional: false
35184
+ }],
34806
35185
  "deviceManager.getConfigSchema": [{
34807
35186
  name: "deviceId",
34808
35187
  form: "single",
@@ -30,7 +30,7 @@ async function d(e) {
30
30
  }
31
31
  }
32
32
  async function f() {
33
- return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-DFCmCsCV.mjs")).catch((e) => {
33
+ return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-CcCaZHUX.mjs")).catch((e) => {
34
34
  throw l = void 0, e;
35
35
  }), l;
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-pipeline-orchestrator",
3
- "version": "1.2.112",
3
+ "version": "1.2.114",
4
4
  "description": "Hub-side camera-to-agent load balancer — tracks runner capacity and dispatches attachCamera calls to the optimal pipeline-runner instance",
5
5
  "keywords": [
6
6
  "camstack",