@camstack/addon-advanced-notifier 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.mjs CHANGED
@@ -8497,10 +8497,30 @@ const StatusSchema = object({
8497
8497
  }
8498
8498
  });
8499
8499
  const LinkStateSchema = _enum(["unlinked", "linked", "error"]);
8500
+ const ExportSetupFieldSchema = object({
8501
+ label: string(),
8502
+ value: string(),
8503
+ /** Mask the value by default + render a reveal toggle (client id, secrets). */
8504
+ secret: boolean().optional()
8505
+ });
8506
+ const ExportSetupSchema = object({
8507
+ /** A string to render as a scannable QR — HAP `X-HM://…` URI, a pairing URL, etc. Omitted when there's nothing to scan. */
8508
+ qr: string().optional(),
8509
+ /** Label/value rows shown with a copy button (HAP setup code, OAuth URLs, client id, linked-account count, …). */
8510
+ fields: array(ExportSetupFieldSchema).readonly().optional(),
8511
+ /** Free-form operator instructions rendered above the fields. */
8512
+ note: string().optional()
8513
+ });
8500
8514
  const DeviceExportStatusSchema = object({
8501
8515
  linkState: LinkStateSchema,
8502
8516
  exposedDeviceCount: number(),
8503
- error: string().optional()
8517
+ error: string().optional(),
8518
+ /**
8519
+ * Optional pairing/account info the panel renders in a generic
8520
+ * "Setup" section. Addon-agnostic — the addon id identifies the
8521
+ * export target, never an `ecosystem` key here.
8522
+ */
8523
+ setup: ExportSetupSchema.optional()
8504
8524
  });
8505
8525
  const DeviceKindSchema = string();
8506
8526
  const ExposedDeviceSchema = object({
@@ -11933,7 +11953,25 @@ const MeshStatusSchema = object({
11933
11953
  * doesn't rotate keys for the bound host. Operator-facing surface
11934
11954
  * for "your access expires on …" banners.
11935
11955
  */
11936
- keyExpiry: number().nullable()
11956
+ keyExpiry: number().nullable(),
11957
+ // ── Onboard-daemon handoff (Tailscale, generic slot) ────────────
11958
+ /**
11959
+ * When the provider runs its OWN mesh daemon (e.g. the Tailscale
11960
+ * client addon in `onboard` mode spawns a private `tailscaled`),
11961
+ * this carries the local control-socket path. Companion addons that
11962
+ * must drive the SAME daemon — chiefly `tailscale-ingress` for
11963
+ * Serve/Funnel — read it to point their CLI at the right socket
11964
+ * instead of the system default. Empty when the provider uses the
11965
+ * host's system daemon (or doesn't have the concept).
11966
+ */
11967
+ daemonSocket: string().optional(),
11968
+ /**
11969
+ * Path to the mesh CLI binary the provider downloaded for onboard
11970
+ * mode. Companion addons reuse it so they don't need a system
11971
+ * install when the operator chose a fully self-contained mesh.
11972
+ * Empty in host mode.
11973
+ */
11974
+ daemonCliPath: string().optional()
11937
11975
  });
11938
11976
  ({
11939
11977
  methods: {
@@ -12819,6 +12857,21 @@ const AddonAutoUpdateSchema = ChannelWithInheritSchema;
12819
12857
  const RestartAddonResultSchema = unknown();
12820
12858
  const InstallPackageResultSchema = unknown();
12821
12859
  const ReloadPackagesResultSchema = unknown();
12860
+ const UpdateFrameworkPackageResultSchema = object({
12861
+ packageName: string(),
12862
+ fromVersion: string(),
12863
+ toVersion: string(),
12864
+ /** Ms-epoch the server scheduled its self-restart. */
12865
+ restartingAt: number()
12866
+ });
12867
+ const FrameworkPackageStatusSchema = object({
12868
+ packageName: string(),
12869
+ currentVersion: string(),
12870
+ latestVersion: string().nullable(),
12871
+ hasUpdate: boolean(),
12872
+ /** Optional manifest description for the row tooltip. */
12873
+ description: string().optional()
12874
+ });
12822
12875
  const LogStreamEntrySchema = object({
12823
12876
  timestamp: string(),
12824
12877
  level: string(),
@@ -12878,13 +12931,29 @@ const CustomActionInputSchema = object({
12878
12931
  object({ query: string().optional() }),
12879
12932
  array(SearchResultSchema)
12880
12933
  ),
12934
+ /**
12935
+ * Available package updates for a node. `nodeId` omitted (or
12936
+ * `'hub'`) checks the hub's own installed packages; an agent
12937
+ * `nodeId` checks that agent's installed roster against npm
12938
+ * (the hub does the npm lookups + diff — agents stay npm-free).
12939
+ */
12881
12940
  listUpdates: method(
12882
- _void(),
12941
+ object({ nodeId: string().optional() }),
12883
12942
  array(PackageUpdateSchema).readonly(),
12884
12943
  { auth: "admin" }
12885
12944
  ),
12945
+ /**
12946
+ * Update one package on a node. `nodeId` omitted (or `'hub'`)
12947
+ * installs on the hub via npm; an agent `nodeId` makes the hub
12948
+ * pack the resolved version and push the tarball to that agent
12949
+ * (`$agent.deploy` + `$agent.reload`) — agents need no npm runtime.
12950
+ */
12886
12951
  updatePackage: method(
12887
- object({ name: string().min(1), version: string().optional() }),
12952
+ object({
12953
+ name: string().min(1),
12954
+ version: string().optional(),
12955
+ nodeId: string().optional()
12956
+ }),
12888
12957
  unknown(),
12889
12958
  { kind: "mutation", auth: "admin" }
12890
12959
  ),
@@ -12905,12 +12974,105 @@ const CustomActionInputSchema = object({
12905
12974
  object({ rolledBackTo: string().nullable() }),
12906
12975
  { kind: "mutation", auth: "admin" }
12907
12976
  ),
12908
- forceRefresh: method(_void(), unknown(), { kind: "mutation", auth: "admin" }),
12977
+ /** Re-check updates for a node, bypassing any cache. `nodeId`
12978
+ * omitted (or `'hub'`) refreshes the hub; an agent `nodeId`
12979
+ * re-checks that agent's roster. */
12980
+ forceRefresh: method(
12981
+ object({ nodeId: string().optional() }),
12982
+ unknown(),
12983
+ { kind: "mutation", auth: "admin" }
12984
+ ),
12909
12985
  restartServer: method(
12910
12986
  object({ confirm: literal(true) }),
12911
12987
  unknown(),
12912
12988
  { kind: "mutation", auth: "admin" }
12913
12989
  ),
12990
+ /**
12991
+ * Most-recent restart marker (kind / packageName / from→to versions
12992
+ * / requestedBy / requestedAt). Returns `null` when this process
12993
+ * didn't boot from a tracked restart, or when the
12994
+ * post-boot retention window (5 min) has elapsed.
12995
+ *
12996
+ * Drives the admin-UI reconnect overlay's success toast — the
12997
+ * `system.restart-completed` event itself is fired before the
12998
+ * client has time to re-subscribe, so the client queries this on
12999
+ * first reconnect instead.
13000
+ */
13001
+ getLastRestart: method(
13002
+ _void(),
13003
+ object({
13004
+ kind: _enum(["framework-update", "manual", "system"]),
13005
+ packageName: string().optional(),
13006
+ fromVersion: string().optional(),
13007
+ toVersion: string().optional(),
13008
+ requestedBy: string().optional(),
13009
+ requestedAt: number()
13010
+ }).nullable(),
13011
+ { auth: "admin" }
13012
+ ),
13013
+ /**
13014
+ * Snapshot of the framework packages installed under the hub's
13015
+ * `<appRoot>/node_modules/`. Each row carries the currently
13016
+ * installed version and (best-effort) the latest version
13017
+ * available on npm. Drives the admin-UI "System packages" panel.
13018
+ *
13019
+ * Spec: docs/superpowers/specs/2026-05-14-framework-live-update-design.md
13020
+ */
13021
+ listFrameworkPackages: method(
13022
+ _void(),
13023
+ array(FrameworkPackageStatusSchema).readonly(),
13024
+ { auth: "admin" }
13025
+ ),
13026
+ /**
13027
+ * Cluster-wide capability-provider discovery. Returns the list of
13028
+ * `{ addonId, mode, isActive }` tuples for whatever addon(s)
13029
+ * currently provide the requested capability across the cluster.
13030
+ *
13031
+ * Why this lives on `addons` (and not on a `capabilities` cap of
13032
+ * its own): the hub's main-process `CapabilityRegistry` already
13033
+ * aggregates registrations from every forked group-runner and
13034
+ * remote agent via Moleculer event propagation — there's no
13035
+ * cross-process registry mirror to build, just an introspection
13036
+ * shim.
13037
+ *
13038
+ * Use this from addon code when you need to know whether another
13039
+ * addon has registered a specific cap (e.g. `tailscale-ingress`
13040
+ * checking `tailscale-client` is up before calling `tailscale
13041
+ * serve`). Don't reach for `ctx.capabilities.getCollectionEntries`
13042
+ * — that reads the LOCAL registry of the calling addon's group
13043
+ * runner and never sees providers in other processes. See
13044
+ * `CLAUDE.md` → Critical rules → ctx.api vs ctx.capabilities.
13045
+ */
13046
+ listCapabilityProviders: method(
13047
+ object({ capName: string().min(1) }),
13048
+ array(object({
13049
+ addonId: string(),
13050
+ mode: _enum(["singleton", "collection"]),
13051
+ isActive: boolean()
13052
+ })).readonly()
13053
+ ),
13054
+ /**
13055
+ * Live-update one of the framework packages marked
13056
+ * `camstack.system: true` (`@camstack/types|kernel|core|sdk|ui-library`).
13057
+ * Runs `npm install --prefix <appRoot> <name>@<version> --no-save`,
13058
+ * writes a `.restart-pending` marker, emits `system.restarting`
13059
+ * and schedules a graceful process exit. The supervisor (Docker /
13060
+ * Electron / systemd) brings the hub back up; on first boot after
13061
+ * the restart the marker fires `system.restart-completed`.
13062
+ *
13063
+ * `version` defaults to `'latest'`. The allow-list of valid
13064
+ * `packageName` values is enforced server-side.
13065
+ *
13066
+ * Spec: docs/superpowers/specs/2026-05-14-framework-live-update-design.md
13067
+ */
13068
+ updateFrameworkPackage: method(
13069
+ object({
13070
+ packageName: string().min(1),
13071
+ version: string().optional()
13072
+ }),
13073
+ UpdateFrameworkPackageResultSchema,
13074
+ { kind: "mutation", auth: "admin" }
13075
+ ),
12914
13076
  getVersions: method(
12915
13077
  object({ name: string() }),
12916
13078
  array(PackageVersionInfoSchema).readonly()
@@ -12981,6 +13143,7 @@ var EventCategory = /* @__PURE__ */ ((EventCategory2) => {
12981
13143
  EventCategory2["SystemBoot"] = "system.boot";
12982
13144
  EventCategory2["SystemAddonsReady"] = "system.addons-ready";
12983
13145
  EventCategory2["SystemRestarting"] = "system.restarting";
13146
+ EventCategory2["SystemRestartCompleted"] = "system.restart-completed";
12984
13147
  EventCategory2["SystemReadyState"] = "system.ready-state";
12985
13148
  EventCategory2["AddonStarted"] = "addon.started";
12986
13149
  EventCategory2["AddonStopped"] = "addon.stopped";