@camstack/addon-provider-rtsp 0.1.25 → 0.1.26

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
@@ -8695,10 +8695,30 @@ const StatusSchema = object({
8695
8695
  }
8696
8696
  });
8697
8697
  const LinkStateSchema = _enum(["unlinked", "linked", "error"]);
8698
+ const ExportSetupFieldSchema = object({
8699
+ label: string(),
8700
+ value: string(),
8701
+ /** Mask the value by default + render a reveal toggle (client id, secrets). */
8702
+ secret: boolean().optional()
8703
+ });
8704
+ const ExportSetupSchema = object({
8705
+ /** A string to render as a scannable QR — HAP `X-HM://…` URI, a pairing URL, etc. Omitted when there's nothing to scan. */
8706
+ qr: string().optional(),
8707
+ /** Label/value rows shown with a copy button (HAP setup code, OAuth URLs, client id, linked-account count, …). */
8708
+ fields: array(ExportSetupFieldSchema).readonly().optional(),
8709
+ /** Free-form operator instructions rendered above the fields. */
8710
+ note: string().optional()
8711
+ });
8698
8712
  const DeviceExportStatusSchema = object({
8699
8713
  linkState: LinkStateSchema,
8700
8714
  exposedDeviceCount: number(),
8701
- error: string().optional()
8715
+ error: string().optional(),
8716
+ /**
8717
+ * Optional pairing/account info the panel renders in a generic
8718
+ * "Setup" section. Addon-agnostic — the addon id identifies the
8719
+ * export target, never an `ecosystem` key here.
8720
+ */
8721
+ setup: ExportSetupSchema.optional()
8702
8722
  });
8703
8723
  const DeviceKindSchema = string();
8704
8724
  const ExposedDeviceSchema = object({
@@ -12136,7 +12156,25 @@ const MeshStatusSchema = object({
12136
12156
  * doesn't rotate keys for the bound host. Operator-facing surface
12137
12157
  * for "your access expires on …" banners.
12138
12158
  */
12139
- keyExpiry: number().nullable()
12159
+ keyExpiry: number().nullable(),
12160
+ // ── Onboard-daemon handoff (Tailscale, generic slot) ────────────
12161
+ /**
12162
+ * When the provider runs its OWN mesh daemon (e.g. the Tailscale
12163
+ * client addon in `onboard` mode spawns a private `tailscaled`),
12164
+ * this carries the local control-socket path. Companion addons that
12165
+ * must drive the SAME daemon — chiefly `tailscale-ingress` for
12166
+ * Serve/Funnel — read it to point their CLI at the right socket
12167
+ * instead of the system default. Empty when the provider uses the
12168
+ * host's system daemon (or doesn't have the concept).
12169
+ */
12170
+ daemonSocket: string().optional(),
12171
+ /**
12172
+ * Path to the mesh CLI binary the provider downloaded for onboard
12173
+ * mode. Companion addons reuse it so they don't need a system
12174
+ * install when the operator chose a fully self-contained mesh.
12175
+ * Empty in host mode.
12176
+ */
12177
+ daemonCliPath: string().optional()
12140
12178
  });
12141
12179
  ({
12142
12180
  methods: {
@@ -13022,6 +13060,21 @@ const AddonAutoUpdateSchema = ChannelWithInheritSchema;
13022
13060
  const RestartAddonResultSchema = unknown();
13023
13061
  const InstallPackageResultSchema = unknown();
13024
13062
  const ReloadPackagesResultSchema = unknown();
13063
+ const UpdateFrameworkPackageResultSchema = object({
13064
+ packageName: string(),
13065
+ fromVersion: string(),
13066
+ toVersion: string(),
13067
+ /** Ms-epoch the server scheduled its self-restart. */
13068
+ restartingAt: number()
13069
+ });
13070
+ const FrameworkPackageStatusSchema = object({
13071
+ packageName: string(),
13072
+ currentVersion: string(),
13073
+ latestVersion: string().nullable(),
13074
+ hasUpdate: boolean(),
13075
+ /** Optional manifest description for the row tooltip. */
13076
+ description: string().optional()
13077
+ });
13025
13078
  const LogStreamEntrySchema = object({
13026
13079
  timestamp: string(),
13027
13080
  level: string(),
@@ -13081,13 +13134,29 @@ const CustomActionInputSchema = object({
13081
13134
  object({ query: string().optional() }),
13082
13135
  array(SearchResultSchema)
13083
13136
  ),
13137
+ /**
13138
+ * Available package updates for a node. `nodeId` omitted (or
13139
+ * `'hub'`) checks the hub's own installed packages; an agent
13140
+ * `nodeId` checks that agent's installed roster against npm
13141
+ * (the hub does the npm lookups + diff — agents stay npm-free).
13142
+ */
13084
13143
  listUpdates: method(
13085
- _void(),
13144
+ object({ nodeId: string().optional() }),
13086
13145
  array(PackageUpdateSchema).readonly(),
13087
13146
  { auth: "admin" }
13088
13147
  ),
13148
+ /**
13149
+ * Update one package on a node. `nodeId` omitted (or `'hub'`)
13150
+ * installs on the hub via npm; an agent `nodeId` makes the hub
13151
+ * pack the resolved version and push the tarball to that agent
13152
+ * (`$agent.deploy` + `$agent.reload`) — agents need no npm runtime.
13153
+ */
13089
13154
  updatePackage: method(
13090
- object({ name: string().min(1), version: string().optional() }),
13155
+ object({
13156
+ name: string().min(1),
13157
+ version: string().optional(),
13158
+ nodeId: string().optional()
13159
+ }),
13091
13160
  unknown(),
13092
13161
  { kind: "mutation", auth: "admin" }
13093
13162
  ),
@@ -13108,12 +13177,105 @@ const CustomActionInputSchema = object({
13108
13177
  object({ rolledBackTo: string().nullable() }),
13109
13178
  { kind: "mutation", auth: "admin" }
13110
13179
  ),
13111
- forceRefresh: method(_void(), unknown(), { kind: "mutation", auth: "admin" }),
13180
+ /** Re-check updates for a node, bypassing any cache. `nodeId`
13181
+ * omitted (or `'hub'`) refreshes the hub; an agent `nodeId`
13182
+ * re-checks that agent's roster. */
13183
+ forceRefresh: method(
13184
+ object({ nodeId: string().optional() }),
13185
+ unknown(),
13186
+ { kind: "mutation", auth: "admin" }
13187
+ ),
13112
13188
  restartServer: method(
13113
13189
  object({ confirm: literal(true) }),
13114
13190
  unknown(),
13115
13191
  { kind: "mutation", auth: "admin" }
13116
13192
  ),
13193
+ /**
13194
+ * Most-recent restart marker (kind / packageName / from→to versions
13195
+ * / requestedBy / requestedAt). Returns `null` when this process
13196
+ * didn't boot from a tracked restart, or when the
13197
+ * post-boot retention window (5 min) has elapsed.
13198
+ *
13199
+ * Drives the admin-UI reconnect overlay's success toast — the
13200
+ * `system.restart-completed` event itself is fired before the
13201
+ * client has time to re-subscribe, so the client queries this on
13202
+ * first reconnect instead.
13203
+ */
13204
+ getLastRestart: method(
13205
+ _void(),
13206
+ object({
13207
+ kind: _enum(["framework-update", "manual", "system"]),
13208
+ packageName: string().optional(),
13209
+ fromVersion: string().optional(),
13210
+ toVersion: string().optional(),
13211
+ requestedBy: string().optional(),
13212
+ requestedAt: number()
13213
+ }).nullable(),
13214
+ { auth: "admin" }
13215
+ ),
13216
+ /**
13217
+ * Snapshot of the framework packages installed under the hub's
13218
+ * `<appRoot>/node_modules/`. Each row carries the currently
13219
+ * installed version and (best-effort) the latest version
13220
+ * available on npm. Drives the admin-UI "System packages" panel.
13221
+ *
13222
+ * Spec: docs/superpowers/specs/2026-05-14-framework-live-update-design.md
13223
+ */
13224
+ listFrameworkPackages: method(
13225
+ _void(),
13226
+ array(FrameworkPackageStatusSchema).readonly(),
13227
+ { auth: "admin" }
13228
+ ),
13229
+ /**
13230
+ * Cluster-wide capability-provider discovery. Returns the list of
13231
+ * `{ addonId, mode, isActive }` tuples for whatever addon(s)
13232
+ * currently provide the requested capability across the cluster.
13233
+ *
13234
+ * Why this lives on `addons` (and not on a `capabilities` cap of
13235
+ * its own): the hub's main-process `CapabilityRegistry` already
13236
+ * aggregates registrations from every forked group-runner and
13237
+ * remote agent via Moleculer event propagation — there's no
13238
+ * cross-process registry mirror to build, just an introspection
13239
+ * shim.
13240
+ *
13241
+ * Use this from addon code when you need to know whether another
13242
+ * addon has registered a specific cap (e.g. `tailscale-ingress`
13243
+ * checking `tailscale-client` is up before calling `tailscale
13244
+ * serve`). Don't reach for `ctx.capabilities.getCollectionEntries`
13245
+ * — that reads the LOCAL registry of the calling addon's group
13246
+ * runner and never sees providers in other processes. See
13247
+ * `CLAUDE.md` → Critical rules → ctx.api vs ctx.capabilities.
13248
+ */
13249
+ listCapabilityProviders: method(
13250
+ object({ capName: string().min(1) }),
13251
+ array(object({
13252
+ addonId: string(),
13253
+ mode: _enum(["singleton", "collection"]),
13254
+ isActive: boolean()
13255
+ })).readonly()
13256
+ ),
13257
+ /**
13258
+ * Live-update one of the framework packages marked
13259
+ * `camstack.system: true` (`@camstack/types|kernel|core|sdk|ui-library`).
13260
+ * Runs `npm install --prefix <appRoot> <name>@<version> --no-save`,
13261
+ * writes a `.restart-pending` marker, emits `system.restarting`
13262
+ * and schedules a graceful process exit. The supervisor (Docker /
13263
+ * Electron / systemd) brings the hub back up; on first boot after
13264
+ * the restart the marker fires `system.restart-completed`.
13265
+ *
13266
+ * `version` defaults to `'latest'`. The allow-list of valid
13267
+ * `packageName` values is enforced server-side.
13268
+ *
13269
+ * Spec: docs/superpowers/specs/2026-05-14-framework-live-update-design.md
13270
+ */
13271
+ updateFrameworkPackage: method(
13272
+ object({
13273
+ packageName: string().min(1),
13274
+ version: string().optional()
13275
+ }),
13276
+ UpdateFrameworkPackageResultSchema,
13277
+ { kind: "mutation", auth: "admin" }
13278
+ ),
13117
13279
  getVersions: method(
13118
13280
  object({ name: string() }),
13119
13281
  array(PackageVersionInfoSchema).readonly()
@@ -13184,6 +13346,7 @@ var EventCategory = /* @__PURE__ */ ((EventCategory2) => {
13184
13346
  EventCategory2["SystemBoot"] = "system.boot";
13185
13347
  EventCategory2["SystemAddonsReady"] = "system.addons-ready";
13186
13348
  EventCategory2["SystemRestarting"] = "system.restarting";
13349
+ EventCategory2["SystemRestartCompleted"] = "system.restart-completed";
13187
13350
  EventCategory2["SystemReadyState"] = "system.ready-state";
13188
13351
  EventCategory2["AddonStarted"] = "addon.started";
13189
13352
  EventCategory2["AddonStopped"] = "addon.stopped";