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