@camstack/addon-advanced-notifier 0.1.25 → 0.1.27
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 +196 -235
- package/dist/addon.js.map +1 -1
- package/dist/addon.mjs +196 -235
- package/dist/addon.mjs.map +1 -1
- package/package.json +1 -1
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({
|
|
@@ -10170,51 +10190,6 @@ const AuthResultSchema = object({
|
|
|
10170
10190
|
validateToken: method(object({ token: string() }), AuthResultSchema.nullable())
|
|
10171
10191
|
}
|
|
10172
10192
|
});
|
|
10173
|
-
const AuthProviderInfoSchema = object({
|
|
10174
|
-
/** Stable id matching the addon id (used for `getLoginUrl({addonId,…})`). */
|
|
10175
|
-
addonId: string(),
|
|
10176
|
-
/**
|
|
10177
|
-
* Per-instance id when one addon registers multiple "logical"
|
|
10178
|
-
* providers (e.g. OIDC with Google + Microsoft + custom). The login
|
|
10179
|
-
* URL becomes `/addon/${addonId}/${instanceId}/start` — handler reads
|
|
10180
|
-
* `:instanceId` from the route. Empty/unset means the addon is a
|
|
10181
|
-
* single-instance provider; the URL is `/addon/${addonId}/start`.
|
|
10182
|
-
*/
|
|
10183
|
-
instanceId: string().optional(),
|
|
10184
|
-
/** Display label shown on the login button + admin row. */
|
|
10185
|
-
displayName: string(),
|
|
10186
|
-
/** Optional iconography hint (lucide-react icon name OR emoji). */
|
|
10187
|
-
icon: string().optional(),
|
|
10188
|
-
/** When true, the provider exposes a redirect-based login flow
|
|
10189
|
-
* (`getLoginUrl` returns a URL the browser navigates to). */
|
|
10190
|
-
hasRedirectFlow: boolean(),
|
|
10191
|
-
/** When true, the provider exposes a credential-form login flow
|
|
10192
|
-
* (`validateCredentials` accepts username + password). */
|
|
10193
|
-
hasCredentialFlow: boolean(),
|
|
10194
|
-
/** Provider kind, drives admin-UI hint dispatch (oidc / saml / totp / …). */
|
|
10195
|
-
kind: string().optional(),
|
|
10196
|
-
/** Operator-facing status string (e.g. "Connected to https://login.acme.com"). */
|
|
10197
|
-
status: string().optional(),
|
|
10198
|
-
/** When false, the provider is registered but disabled by config; the
|
|
10199
|
-
* UI surfaces it as inactive without enumerating it for login. */
|
|
10200
|
-
enabled: boolean()
|
|
10201
|
-
});
|
|
10202
|
-
({
|
|
10203
|
-
methods: {
|
|
10204
|
-
/** All registered auth providers, both enabled and disabled. */
|
|
10205
|
-
listProviders: method(_void(), array(AuthProviderInfoSchema).readonly()),
|
|
10206
|
-
/**
|
|
10207
|
-
* Toggle a provider's enabled flag. Disabled providers stay
|
|
10208
|
-
* registered but aren't surfaced on the login page. The orchestrator
|
|
10209
|
-
* persists the state in `addon-settings` so it survives restarts.
|
|
10210
|
-
*/
|
|
10211
|
-
setProviderEnabled: method(
|
|
10212
|
-
object({ addonId: string(), enabled: boolean() }),
|
|
10213
|
-
object({ success: literal(true) }),
|
|
10214
|
-
{ kind: "mutation", auth: "admin" }
|
|
10215
|
-
)
|
|
10216
|
-
}
|
|
10217
|
-
});
|
|
10218
10193
|
const NetworkEndpointSchema = object({
|
|
10219
10194
|
url: string(),
|
|
10220
10195
|
hostname: string(),
|
|
@@ -10246,55 +10221,13 @@ const NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
|
|
|
10246
10221
|
getEndpoint: method(_void(), NetworkEndpointSchema.nullable()),
|
|
10247
10222
|
getStatus: method(_void(), NetworkAccessStatusSchema),
|
|
10248
10223
|
/**
|
|
10249
|
-
* Enumerate every active ingress entry.
|
|
10250
|
-
*
|
|
10251
|
-
*
|
|
10224
|
+
* Enumerate every active ingress entry. Providers that expose only a
|
|
10225
|
+
* single endpoint may omit this method; callers fall back to
|
|
10226
|
+
* `getEndpoint()` in that case.
|
|
10252
10227
|
*/
|
|
10253
10228
|
listEndpoints: method(_void(), array(NetworkEndpointEntrySchema).readonly())
|
|
10254
10229
|
}
|
|
10255
10230
|
});
|
|
10256
|
-
const RemoteAccessEndpointSchema = object({
|
|
10257
|
-
url: string(),
|
|
10258
|
-
hostname: string(),
|
|
10259
|
-
port: number(),
|
|
10260
|
-
protocol: _enum(["http", "https"])
|
|
10261
|
-
});
|
|
10262
|
-
const RemoteAccessProviderInfoSchema = object({
|
|
10263
|
-
/** Stable id matching the addon id. */
|
|
10264
|
-
addonId: string(),
|
|
10265
|
-
/** Display label shown on the admin row — sourced from the addon manifest. */
|
|
10266
|
-
displayName: string(),
|
|
10267
|
-
/** When false, the provider is registered but disabled. */
|
|
10268
|
-
enabled: boolean(),
|
|
10269
|
-
/** True when the underlying tunnel/connection is up. */
|
|
10270
|
-
connected: boolean(),
|
|
10271
|
-
/** Public-facing endpoint, when connected. Null otherwise. */
|
|
10272
|
-
endpoint: RemoteAccessEndpointSchema.nullable(),
|
|
10273
|
-
/** Last error message (when connected=false), if available. */
|
|
10274
|
-
error: string().optional()
|
|
10275
|
-
});
|
|
10276
|
-
({
|
|
10277
|
-
methods: {
|
|
10278
|
-
/** All registered remote-access providers + their live status. */
|
|
10279
|
-
listProviders: method(_void(), array(RemoteAccessProviderInfoSchema).readonly()),
|
|
10280
|
-
/**
|
|
10281
|
-
* Start a specific provider's tunnel. Per-provider config still
|
|
10282
|
-
* lives on the addon's settings panel; this is just the on/off
|
|
10283
|
-
* trigger so the admin UI can manage the lifecycle from one place.
|
|
10284
|
-
*/
|
|
10285
|
-
startProvider: method(
|
|
10286
|
-
object({ addonId: string() }),
|
|
10287
|
-
RemoteAccessEndpointSchema,
|
|
10288
|
-
{ kind: "mutation", auth: "admin" }
|
|
10289
|
-
),
|
|
10290
|
-
/** Stop a specific provider's tunnel (idempotent on already-stopped). */
|
|
10291
|
-
stopProvider: method(
|
|
10292
|
-
object({ addonId: string() }),
|
|
10293
|
-
object({ success: literal(true) }),
|
|
10294
|
-
{ kind: "mutation", auth: "admin" }
|
|
10295
|
-
)
|
|
10296
|
-
}
|
|
10297
|
-
});
|
|
10298
10231
|
const TurnServerSchema = object({
|
|
10299
10232
|
/** Single URL or list of URLs (e.g. "turn:turn.example.com:3478?transport=udp"). */
|
|
10300
10233
|
urls: union([string(), array(string())]),
|
|
@@ -10314,45 +10247,6 @@ const TurnServerSchema = object({
|
|
|
10314
10247
|
)
|
|
10315
10248
|
}
|
|
10316
10249
|
});
|
|
10317
|
-
const TurnProviderInfoSchema = object({
|
|
10318
|
-
/** Stable id matching the addon id. */
|
|
10319
|
-
addonId: string(),
|
|
10320
|
-
/** Display label shown on the admin row — sourced from the addon manifest. */
|
|
10321
|
-
displayName: string(),
|
|
10322
|
-
/** When false, the provider is registered but disabled. */
|
|
10323
|
-
enabled: boolean(),
|
|
10324
|
-
/** Number of servers this provider is currently exposing. */
|
|
10325
|
-
serverCount: number(),
|
|
10326
|
-
/**
|
|
10327
|
-
* Flat list of every TURN/STUN URL this provider currently exposes.
|
|
10328
|
-
* One row per URL (multi-URL ICE server entries are flattened). The
|
|
10329
|
-
* admin UI shows this in a compact per-provider list so operators
|
|
10330
|
-
* can verify what's actually being negotiated without having to dig
|
|
10331
|
-
* into the combined `getAllServers` output.
|
|
10332
|
-
*/
|
|
10333
|
-
urls: array(string()).readonly(),
|
|
10334
|
-
/** Last fetch error (when serverCount=0 due to API failure), if any. */
|
|
10335
|
-
error: string().optional()
|
|
10336
|
-
});
|
|
10337
|
-
({
|
|
10338
|
-
methods: {
|
|
10339
|
-
/** All registered TURN providers + per-provider stats. */
|
|
10340
|
-
listProviders: method(_void(), array(TurnProviderInfoSchema).readonly()),
|
|
10341
|
-
/**
|
|
10342
|
-
* Combined list of TURN/STUN servers from all ENABLED providers.
|
|
10343
|
-
* Consumed by the WebRTC layer at session-creation time —
|
|
10344
|
-
* implementations may fetch fresh short-lived credentials each
|
|
10345
|
-
* call (e.g. Cloudflare API), so consumers SHOULD call per-session.
|
|
10346
|
-
*/
|
|
10347
|
-
getAllServers: method(_void(), array(TurnServerSchema).readonly()),
|
|
10348
|
-
/** Toggle a provider's enabled flag. */
|
|
10349
|
-
setProviderEnabled: method(
|
|
10350
|
-
object({ addonId: string(), enabled: boolean() }),
|
|
10351
|
-
object({ success: literal(true) }),
|
|
10352
|
-
{ kind: "mutation", auth: "admin" }
|
|
10353
|
-
)
|
|
10354
|
-
}
|
|
10355
|
-
});
|
|
10356
10250
|
const SnapshotImageSchema = object({
|
|
10357
10251
|
base64: string(),
|
|
10358
10252
|
contentType: string()
|
|
@@ -11827,7 +11721,7 @@ const AllowedAddressesSchema = object({
|
|
|
11827
11721
|
)
|
|
11828
11722
|
}
|
|
11829
11723
|
});
|
|
11830
|
-
const MeshEndpointSchema
|
|
11724
|
+
const MeshEndpointSchema = object({
|
|
11831
11725
|
/** Stable identifier within the provider (e.g. `mesh-ipv4`, `magicdns`, `funnel`). */
|
|
11832
11726
|
id: string(),
|
|
11833
11727
|
/** Operator-facing label (e.g. "Mesh IPv4", "MagicDNS"). */
|
|
@@ -11900,7 +11794,7 @@ const MeshStatusSchema = object({
|
|
|
11900
11794
|
/** Number of peers visible to this host (excluding self). */
|
|
11901
11795
|
peerCount: number(),
|
|
11902
11796
|
/** Every endpoint this provider exposes for the current host. */
|
|
11903
|
-
endpoints: array(MeshEndpointSchema
|
|
11797
|
+
endpoints: array(MeshEndpointSchema).readonly(),
|
|
11904
11798
|
/** Last error from the daemon, when not joined. */
|
|
11905
11799
|
error: string().optional(),
|
|
11906
11800
|
// ── Account / tenant identity (generic across providers) ────────
|
|
@@ -11933,7 +11827,25 @@ const MeshStatusSchema = object({
|
|
|
11933
11827
|
* doesn't rotate keys for the bound host. Operator-facing surface
|
|
11934
11828
|
* for "your access expires on …" banners.
|
|
11935
11829
|
*/
|
|
11936
|
-
keyExpiry: number().nullable()
|
|
11830
|
+
keyExpiry: number().nullable(),
|
|
11831
|
+
// ── Onboard-daemon handoff (Tailscale, generic slot) ────────────
|
|
11832
|
+
/**
|
|
11833
|
+
* When the provider runs its OWN mesh daemon (e.g. the Tailscale
|
|
11834
|
+
* client addon in `onboard` mode spawns a private `tailscaled`),
|
|
11835
|
+
* this carries the local control-socket path. Companion addons that
|
|
11836
|
+
* must drive the SAME daemon — chiefly `tailscale-ingress` for
|
|
11837
|
+
* Serve/Funnel — read it to point their CLI at the right socket
|
|
11838
|
+
* instead of the system default. Empty when the provider uses the
|
|
11839
|
+
* host's system daemon (or doesn't have the concept).
|
|
11840
|
+
*/
|
|
11841
|
+
daemonSocket: string().optional(),
|
|
11842
|
+
/**
|
|
11843
|
+
* Path to the mesh CLI binary the provider downloaded for onboard
|
|
11844
|
+
* mode. Companion addons reuse it so they don't need a system
|
|
11845
|
+
* install when the operator chose a fully self-contained mesh.
|
|
11846
|
+
* Empty in host mode.
|
|
11847
|
+
*/
|
|
11848
|
+
daemonCliPath: string().optional()
|
|
11937
11849
|
});
|
|
11938
11850
|
({
|
|
11939
11851
|
methods: {
|
|
@@ -12045,105 +11957,6 @@ const MeshStatusSchema = object({
|
|
|
12045
11957
|
// tabs driven by this cap.
|
|
12046
11958
|
}
|
|
12047
11959
|
});
|
|
12048
|
-
const MeshEndpointSchema = object({
|
|
12049
|
-
id: string(),
|
|
12050
|
-
label: string(),
|
|
12051
|
-
scope: _enum(["mesh", "public"]),
|
|
12052
|
-
url: string(),
|
|
12053
|
-
hostname: string(),
|
|
12054
|
-
port: number(),
|
|
12055
|
-
protocol: _enum(["http", "https"])
|
|
12056
|
-
});
|
|
12057
|
-
const MeshProviderInfoSchema = object({
|
|
12058
|
-
/** Stable id matching the addon id. */
|
|
12059
|
-
addonId: string(),
|
|
12060
|
-
/** Display label shown on the admin row — sourced from the addon manifest. */
|
|
12061
|
-
displayName: string(),
|
|
12062
|
-
/** True when the host is joined to this provider's mesh. */
|
|
12063
|
-
joined: boolean(),
|
|
12064
|
-
/** Local mesh IP (empty when not joined). */
|
|
12065
|
-
meshIp: string(),
|
|
12066
|
-
/** MagicDNS / mesh hostname (empty when not configured). */
|
|
12067
|
-
magicDnsHostname: string(),
|
|
12068
|
-
/** Peer count (excluding self). */
|
|
12069
|
-
peerCount: number(),
|
|
12070
|
-
/** Active endpoints (mesh IP + MagicDNS + optional public Funnel). */
|
|
12071
|
-
endpoints: array(MeshEndpointSchema).readonly(),
|
|
12072
|
-
/** Last error reported by the provider. */
|
|
12073
|
-
error: string().optional(),
|
|
12074
|
-
// ── Generic identity fields mirrored from MeshStatus ─────────────
|
|
12075
|
-
/** Tenant / tailnet / network display name. Empty pre-join. */
|
|
12076
|
-
tenantName: string(),
|
|
12077
|
-
/** Mesh DNS suffix (e.g. tailXXXX.ts.net). Empty when not configured. */
|
|
12078
|
-
magicDnsSuffix: string(),
|
|
12079
|
-
/** Authenticated user / account login. Null for token-only providers. */
|
|
12080
|
-
userLogin: string().nullable(),
|
|
12081
|
-
/** Provider control-plane URL. */
|
|
12082
|
-
controlPlaneUrl: string(),
|
|
12083
|
-
/** Machine-key expiry (epoch ms). Null when keys don't rotate. */
|
|
12084
|
-
keyExpiry: number().nullable()
|
|
12085
|
-
});
|
|
12086
|
-
({
|
|
12087
|
-
methods: {
|
|
12088
|
-
/** All registered mesh-network providers + live status. */
|
|
12089
|
-
listProviders: method(_void(), array(MeshProviderInfoSchema).readonly()),
|
|
12090
|
-
/**
|
|
12091
|
-
* Join the mesh of a specific provider. Per-provider config still
|
|
12092
|
-
* lives on its settings panel; the orchestrator forwards.
|
|
12093
|
-
*/
|
|
12094
|
-
joinProvider: method(
|
|
12095
|
-
object({
|
|
12096
|
-
addonId: string(),
|
|
12097
|
-
authKey: string().min(8),
|
|
12098
|
-
hostname: string().optional()
|
|
12099
|
-
}),
|
|
12100
|
-
object({ joined: literal(true) }),
|
|
12101
|
-
{ kind: "mutation" }
|
|
12102
|
-
),
|
|
12103
|
-
leaveProvider: method(
|
|
12104
|
-
object({ addonId: string() }),
|
|
12105
|
-
object({ success: literal(true) }),
|
|
12106
|
-
{ kind: "mutation" }
|
|
12107
|
-
),
|
|
12108
|
-
/**
|
|
12109
|
-
* Browser-redirect login flow. Forwards to the named provider's
|
|
12110
|
-
* `mesh-network.startLogin` and returns the URL the daemon
|
|
12111
|
-
* prints. UI opens it in a new tab, then polls `listProviders`
|
|
12112
|
-
* for `joined: true`.
|
|
12113
|
-
*/
|
|
12114
|
-
startLoginProvider: method(
|
|
12115
|
-
object({
|
|
12116
|
-
addonId: string(),
|
|
12117
|
-
hostname: string().optional()
|
|
12118
|
-
}),
|
|
12119
|
-
object({ loginUrl: string() }),
|
|
12120
|
-
{ kind: "mutation" }
|
|
12121
|
-
),
|
|
12122
|
-
/**
|
|
12123
|
-
* Sign out of the provider's account entirely (`mesh-network.logout`).
|
|
12124
|
-
* Distinct from `leaveProvider` which only takes the host off-mesh;
|
|
12125
|
-
* `logoutProvider` wipes credentials so the next start requires a
|
|
12126
|
-
* fresh login.
|
|
12127
|
-
*/
|
|
12128
|
-
logoutProvider: method(
|
|
12129
|
-
object({ addonId: string() }),
|
|
12130
|
-
object({ loggedOut: literal(true) }),
|
|
12131
|
-
{ kind: "mutation" }
|
|
12132
|
-
),
|
|
12133
|
-
/**
|
|
12134
|
-
* Per-provider peer list. Forwards to `mesh-network.listPeers` on
|
|
12135
|
-
* the addressed provider. Separate from `listProviders` because
|
|
12136
|
-
* peer payloads can be large on a heavily-populated tailnet —
|
|
12137
|
-
* fetch only when the operator opens the Peers tab.
|
|
12138
|
-
*/
|
|
12139
|
-
listProviderPeers: method(
|
|
12140
|
-
object({ addonId: string() }),
|
|
12141
|
-
object({
|
|
12142
|
-
peers: array(MeshPeerSchema).readonly()
|
|
12143
|
-
})
|
|
12144
|
-
)
|
|
12145
|
-
}
|
|
12146
|
-
});
|
|
12147
11960
|
const MethodAccessSchema = _enum(["view", "create", "delete"]);
|
|
12148
11961
|
const AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12149
11962
|
const AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
@@ -12819,6 +12632,21 @@ const AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
|
12819
12632
|
const RestartAddonResultSchema = unknown();
|
|
12820
12633
|
const InstallPackageResultSchema = unknown();
|
|
12821
12634
|
const ReloadPackagesResultSchema = unknown();
|
|
12635
|
+
const UpdateFrameworkPackageResultSchema = object({
|
|
12636
|
+
packageName: string(),
|
|
12637
|
+
fromVersion: string(),
|
|
12638
|
+
toVersion: string(),
|
|
12639
|
+
/** Ms-epoch the server scheduled its self-restart. */
|
|
12640
|
+
restartingAt: number()
|
|
12641
|
+
});
|
|
12642
|
+
const FrameworkPackageStatusSchema = object({
|
|
12643
|
+
packageName: string(),
|
|
12644
|
+
currentVersion: string(),
|
|
12645
|
+
latestVersion: string().nullable(),
|
|
12646
|
+
hasUpdate: boolean(),
|
|
12647
|
+
/** Optional manifest description for the row tooltip. */
|
|
12648
|
+
description: string().optional()
|
|
12649
|
+
});
|
|
12822
12650
|
const LogStreamEntrySchema = object({
|
|
12823
12651
|
timestamp: string(),
|
|
12824
12652
|
level: string(),
|
|
@@ -12878,13 +12706,29 @@ const CustomActionInputSchema = object({
|
|
|
12878
12706
|
object({ query: string().optional() }),
|
|
12879
12707
|
array(SearchResultSchema)
|
|
12880
12708
|
),
|
|
12709
|
+
/**
|
|
12710
|
+
* Available package updates for a node. `nodeId` omitted (or
|
|
12711
|
+
* `'hub'`) checks the hub's own installed packages; an agent
|
|
12712
|
+
* `nodeId` checks that agent's installed roster against npm
|
|
12713
|
+
* (the hub does the npm lookups + diff — agents stay npm-free).
|
|
12714
|
+
*/
|
|
12881
12715
|
listUpdates: method(
|
|
12882
|
-
|
|
12716
|
+
object({ nodeId: string().optional() }),
|
|
12883
12717
|
array(PackageUpdateSchema).readonly(),
|
|
12884
12718
|
{ auth: "admin" }
|
|
12885
12719
|
),
|
|
12720
|
+
/**
|
|
12721
|
+
* Update one package on a node. `nodeId` omitted (or `'hub'`)
|
|
12722
|
+
* installs on the hub via npm; an agent `nodeId` makes the hub
|
|
12723
|
+
* pack the resolved version and push the tarball to that agent
|
|
12724
|
+
* (`$agent.deploy` + `$agent.reload`) — agents need no npm runtime.
|
|
12725
|
+
*/
|
|
12886
12726
|
updatePackage: method(
|
|
12887
|
-
object({
|
|
12727
|
+
object({
|
|
12728
|
+
name: string().min(1),
|
|
12729
|
+
version: string().optional(),
|
|
12730
|
+
nodeId: string().optional()
|
|
12731
|
+
}),
|
|
12888
12732
|
unknown(),
|
|
12889
12733
|
{ kind: "mutation", auth: "admin" }
|
|
12890
12734
|
),
|
|
@@ -12905,12 +12749,128 @@ const CustomActionInputSchema = object({
|
|
|
12905
12749
|
object({ rolledBackTo: string().nullable() }),
|
|
12906
12750
|
{ kind: "mutation", auth: "admin" }
|
|
12907
12751
|
),
|
|
12908
|
-
|
|
12752
|
+
/** Re-check updates for a node, bypassing any cache. `nodeId`
|
|
12753
|
+
* omitted (or `'hub'`) refreshes the hub; an agent `nodeId`
|
|
12754
|
+
* re-checks that agent's roster. */
|
|
12755
|
+
forceRefresh: method(
|
|
12756
|
+
object({ nodeId: string().optional() }),
|
|
12757
|
+
unknown(),
|
|
12758
|
+
{ kind: "mutation", auth: "admin" }
|
|
12759
|
+
),
|
|
12909
12760
|
restartServer: method(
|
|
12910
12761
|
object({ confirm: literal(true) }),
|
|
12911
12762
|
unknown(),
|
|
12912
12763
|
{ kind: "mutation", auth: "admin" }
|
|
12913
12764
|
),
|
|
12765
|
+
/**
|
|
12766
|
+
* Most-recent restart marker (kind / packageName / from→to versions
|
|
12767
|
+
* / requestedBy / requestedAt). Returns `null` when this process
|
|
12768
|
+
* didn't boot from a tracked restart, or when the
|
|
12769
|
+
* post-boot retention window (5 min) has elapsed.
|
|
12770
|
+
*
|
|
12771
|
+
* Drives the admin-UI reconnect overlay's success toast — the
|
|
12772
|
+
* `system.restart-completed` event itself is fired before the
|
|
12773
|
+
* client has time to re-subscribe, so the client queries this on
|
|
12774
|
+
* first reconnect instead.
|
|
12775
|
+
*/
|
|
12776
|
+
getLastRestart: method(
|
|
12777
|
+
_void(),
|
|
12778
|
+
object({
|
|
12779
|
+
kind: _enum(["framework-update", "manual", "system"]),
|
|
12780
|
+
packageName: string().optional(),
|
|
12781
|
+
fromVersion: string().optional(),
|
|
12782
|
+
toVersion: string().optional(),
|
|
12783
|
+
requestedBy: string().optional(),
|
|
12784
|
+
requestedAt: number()
|
|
12785
|
+
}).nullable(),
|
|
12786
|
+
{ auth: "admin" }
|
|
12787
|
+
),
|
|
12788
|
+
/**
|
|
12789
|
+
* Snapshot of the framework packages installed under the hub's
|
|
12790
|
+
* `<appRoot>/node_modules/`. Each row carries the currently
|
|
12791
|
+
* installed version and (best-effort) the latest version
|
|
12792
|
+
* available on npm. Drives the admin-UI "System packages" panel.
|
|
12793
|
+
*
|
|
12794
|
+
* Spec: docs/superpowers/specs/2026-05-14-framework-live-update-design.md
|
|
12795
|
+
*/
|
|
12796
|
+
listFrameworkPackages: method(
|
|
12797
|
+
_void(),
|
|
12798
|
+
array(FrameworkPackageStatusSchema).readonly(),
|
|
12799
|
+
{ auth: "admin" }
|
|
12800
|
+
),
|
|
12801
|
+
/**
|
|
12802
|
+
* Cluster-wide capability-provider discovery. Returns the list of
|
|
12803
|
+
* `{ addonId, mode, isActive }` tuples for whatever addon(s)
|
|
12804
|
+
* currently provide the requested capability across the cluster.
|
|
12805
|
+
*
|
|
12806
|
+
* Why this lives on `addons` (and not on a `capabilities` cap of
|
|
12807
|
+
* its own): the hub's main-process `CapabilityRegistry` already
|
|
12808
|
+
* aggregates registrations from every forked group-runner and
|
|
12809
|
+
* remote agent via Moleculer event propagation — there's no
|
|
12810
|
+
* cross-process registry mirror to build, just an introspection
|
|
12811
|
+
* shim.
|
|
12812
|
+
*
|
|
12813
|
+
* Use this from addon code when you need to know whether another
|
|
12814
|
+
* addon has registered a specific cap (e.g. `tailscale-ingress`
|
|
12815
|
+
* checking `tailscale-client` is up before calling `tailscale
|
|
12816
|
+
* serve`). Don't reach for `ctx.capabilities.getCollectionEntries`
|
|
12817
|
+
* — that reads the LOCAL registry of the calling addon's group
|
|
12818
|
+
* runner and never sees providers in other processes. See
|
|
12819
|
+
* `CLAUDE.md` → Critical rules → ctx.api vs ctx.capabilities.
|
|
12820
|
+
*/
|
|
12821
|
+
listCapabilityProviders: method(
|
|
12822
|
+
object({ capName: string().min(1) }),
|
|
12823
|
+
array(object({
|
|
12824
|
+
addonId: string(),
|
|
12825
|
+
mode: _enum(["singleton", "collection"]),
|
|
12826
|
+
isActive: boolean()
|
|
12827
|
+
})).readonly()
|
|
12828
|
+
),
|
|
12829
|
+
/**
|
|
12830
|
+
* Toggle a single collection-cap provider on/off. Generic write-side
|
|
12831
|
+
* counterpart of `listCapabilityProviders` — drives the per-provider
|
|
12832
|
+
* Enable/Disable affordance in admin pages (TURN servers, etc.)
|
|
12833
|
+
* without needing a bespoke orchestrator cap.
|
|
12834
|
+
*
|
|
12835
|
+
* Reaches the hub's `CapabilityRegistry` directly:
|
|
12836
|
+
* `enableCollectionProvider` / `disableCollectionProvider` flip the
|
|
12837
|
+
* registry-level `disabledProviders` set. `getCollectionEntries`
|
|
12838
|
+
* already filters disabled providers out, so a disabled provider
|
|
12839
|
+
* drops out of every collection aggregate immediately. Only valid
|
|
12840
|
+
* for `mode: 'collection'` caps — the registry no-ops + warns for
|
|
12841
|
+
* singletons.
|
|
12842
|
+
*/
|
|
12843
|
+
setCapabilityProviderEnabled: method(
|
|
12844
|
+
object({
|
|
12845
|
+
capName: string().min(1),
|
|
12846
|
+
addonId: string().min(1),
|
|
12847
|
+
enabled: boolean()
|
|
12848
|
+
}),
|
|
12849
|
+
object({ success: literal(true) }),
|
|
12850
|
+
{ kind: "mutation", auth: "admin" }
|
|
12851
|
+
),
|
|
12852
|
+
/**
|
|
12853
|
+
* Live-update one of the framework packages marked
|
|
12854
|
+
* `camstack.system: true` (`@camstack/types|kernel|core|sdk|ui-library`).
|
|
12855
|
+
* Runs `npm install --prefix <appRoot> <name>@<version> --no-save`,
|
|
12856
|
+
* writes a `.restart-pending` marker, emits `system.restarting`
|
|
12857
|
+
* and schedules a graceful process exit. The supervisor (Docker /
|
|
12858
|
+
* Electron / systemd) brings the hub back up; on first boot after
|
|
12859
|
+
* the restart the marker fires `system.restart-completed`.
|
|
12860
|
+
*
|
|
12861
|
+
* `version` defaults to `'latest'`. The allow-list of valid
|
|
12862
|
+
* `packageName` values is enforced server-side.
|
|
12863
|
+
*
|
|
12864
|
+
* Spec: docs/superpowers/specs/2026-05-14-framework-live-update-design.md
|
|
12865
|
+
*/
|
|
12866
|
+
updateFrameworkPackage: method(
|
|
12867
|
+
object({
|
|
12868
|
+
packageName: string().min(1),
|
|
12869
|
+
version: string().optional()
|
|
12870
|
+
}),
|
|
12871
|
+
UpdateFrameworkPackageResultSchema,
|
|
12872
|
+
{ kind: "mutation", auth: "admin" }
|
|
12873
|
+
),
|
|
12914
12874
|
getVersions: method(
|
|
12915
12875
|
object({ name: string() }),
|
|
12916
12876
|
array(PackageVersionInfoSchema).readonly()
|
|
@@ -12981,6 +12941,7 @@ var EventCategory = /* @__PURE__ */ ((EventCategory2) => {
|
|
|
12981
12941
|
EventCategory2["SystemBoot"] = "system.boot";
|
|
12982
12942
|
EventCategory2["SystemAddonsReady"] = "system.addons-ready";
|
|
12983
12943
|
EventCategory2["SystemRestarting"] = "system.restarting";
|
|
12944
|
+
EventCategory2["SystemRestartCompleted"] = "system.restart-completed";
|
|
12984
12945
|
EventCategory2["SystemReadyState"] = "system.ready-state";
|
|
12985
12946
|
EventCategory2["AddonStarted"] = "addon.started";
|
|
12986
12947
|
EventCategory2["AddonStopped"] = "addon.stopped";
|