@camstack/addon-pipeline-orchestrator 0.1.12 → 0.1.14
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/@mf-types.zip +0 -0
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-DJg6MN3o.mjs +20 -0
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-DFjvaOLq.mjs +34 -0
- package/dist/_stub.js +2 -2
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-CZZSgPaO.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-sOGV7J8L.mjs} +6 -6
- package/dist/{hostInit-DbBZuH8a.mjs → hostInit-ClDM91fS.mjs} +6 -6
- package/dist/index-BP0-1QYT.mjs +13140 -0
- package/dist/{index-D_PTJwoG.mjs → index-D3EnGJOk.mjs} +7065 -5705
- package/dist/{index-BCQTm8xW.mjs → index-culBovFl.mjs} +1 -1
- package/dist/index.js +196 -235
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +196 -235
- package/dist/index.mjs.map +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/schemas-ChN4Ih0h.mjs +3584 -0
- package/package.json +1 -1
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-zU1ROtkq.mjs +0 -18
- package/dist/__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-CmFbjOgN.mjs +0 -34
- package/dist/index-Bpv0NSqI.mjs +0 -16780
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as _e, b as x, A as be, n as ve } from "./__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-D4eEXltm.mjs";
|
|
2
|
-
import { a as V, b as Ee } from "./__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-
|
|
2
|
+
import { a as V, b as Ee } from "./__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-DJg6MN3o.mjs";
|
|
3
3
|
class Pe {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
package/dist/index.js
CHANGED
|
@@ -8593,10 +8593,30 @@ const StatusSchema = object({
|
|
|
8593
8593
|
}
|
|
8594
8594
|
});
|
|
8595
8595
|
const LinkStateSchema = _enum(["unlinked", "linked", "error"]);
|
|
8596
|
+
const ExportSetupFieldSchema = object({
|
|
8597
|
+
label: string(),
|
|
8598
|
+
value: string(),
|
|
8599
|
+
/** Mask the value by default + render a reveal toggle (client id, secrets). */
|
|
8600
|
+
secret: boolean().optional()
|
|
8601
|
+
});
|
|
8602
|
+
const ExportSetupSchema = object({
|
|
8603
|
+
/** A string to render as a scannable QR — HAP `X-HM://…` URI, a pairing URL, etc. Omitted when there's nothing to scan. */
|
|
8604
|
+
qr: string().optional(),
|
|
8605
|
+
/** Label/value rows shown with a copy button (HAP setup code, OAuth URLs, client id, linked-account count, …). */
|
|
8606
|
+
fields: array(ExportSetupFieldSchema).readonly().optional(),
|
|
8607
|
+
/** Free-form operator instructions rendered above the fields. */
|
|
8608
|
+
note: string().optional()
|
|
8609
|
+
});
|
|
8596
8610
|
const DeviceExportStatusSchema = object({
|
|
8597
8611
|
linkState: LinkStateSchema,
|
|
8598
8612
|
exposedDeviceCount: number(),
|
|
8599
|
-
error: string().optional()
|
|
8613
|
+
error: string().optional(),
|
|
8614
|
+
/**
|
|
8615
|
+
* Optional pairing/account info the panel renders in a generic
|
|
8616
|
+
* "Setup" section. Addon-agnostic — the addon id identifies the
|
|
8617
|
+
* export target, never an `ecosystem` key here.
|
|
8618
|
+
*/
|
|
8619
|
+
setup: ExportSetupSchema.optional()
|
|
8600
8620
|
});
|
|
8601
8621
|
const DeviceKindSchema = string();
|
|
8602
8622
|
const ExposedDeviceSchema = object({
|
|
@@ -10274,51 +10294,6 @@ const AuthResultSchema = object({
|
|
|
10274
10294
|
validateToken: method(object({ token: string() }), AuthResultSchema.nullable())
|
|
10275
10295
|
}
|
|
10276
10296
|
});
|
|
10277
|
-
const AuthProviderInfoSchema = object({
|
|
10278
|
-
/** Stable id matching the addon id (used for `getLoginUrl({addonId,…})`). */
|
|
10279
|
-
addonId: string(),
|
|
10280
|
-
/**
|
|
10281
|
-
* Per-instance id when one addon registers multiple "logical"
|
|
10282
|
-
* providers (e.g. OIDC with Google + Microsoft + custom). The login
|
|
10283
|
-
* URL becomes `/addon/${addonId}/${instanceId}/start` — handler reads
|
|
10284
|
-
* `:instanceId` from the route. Empty/unset means the addon is a
|
|
10285
|
-
* single-instance provider; the URL is `/addon/${addonId}/start`.
|
|
10286
|
-
*/
|
|
10287
|
-
instanceId: string().optional(),
|
|
10288
|
-
/** Display label shown on the login button + admin row. */
|
|
10289
|
-
displayName: string(),
|
|
10290
|
-
/** Optional iconography hint (lucide-react icon name OR emoji). */
|
|
10291
|
-
icon: string().optional(),
|
|
10292
|
-
/** When true, the provider exposes a redirect-based login flow
|
|
10293
|
-
* (`getLoginUrl` returns a URL the browser navigates to). */
|
|
10294
|
-
hasRedirectFlow: boolean(),
|
|
10295
|
-
/** When true, the provider exposes a credential-form login flow
|
|
10296
|
-
* (`validateCredentials` accepts username + password). */
|
|
10297
|
-
hasCredentialFlow: boolean(),
|
|
10298
|
-
/** Provider kind, drives admin-UI hint dispatch (oidc / saml / totp / …). */
|
|
10299
|
-
kind: string().optional(),
|
|
10300
|
-
/** Operator-facing status string (e.g. "Connected to https://login.acme.com"). */
|
|
10301
|
-
status: string().optional(),
|
|
10302
|
-
/** When false, the provider is registered but disabled by config; the
|
|
10303
|
-
* UI surfaces it as inactive without enumerating it for login. */
|
|
10304
|
-
enabled: boolean()
|
|
10305
|
-
});
|
|
10306
|
-
({
|
|
10307
|
-
methods: {
|
|
10308
|
-
/** All registered auth providers, both enabled and disabled. */
|
|
10309
|
-
listProviders: method(_void(), array(AuthProviderInfoSchema).readonly()),
|
|
10310
|
-
/**
|
|
10311
|
-
* Toggle a provider's enabled flag. Disabled providers stay
|
|
10312
|
-
* registered but aren't surfaced on the login page. The orchestrator
|
|
10313
|
-
* persists the state in `addon-settings` so it survives restarts.
|
|
10314
|
-
*/
|
|
10315
|
-
setProviderEnabled: method(
|
|
10316
|
-
object({ addonId: string(), enabled: boolean() }),
|
|
10317
|
-
object({ success: literal(true) }),
|
|
10318
|
-
{ kind: "mutation", auth: "admin" }
|
|
10319
|
-
)
|
|
10320
|
-
}
|
|
10321
|
-
});
|
|
10322
10297
|
const NetworkEndpointSchema = object({
|
|
10323
10298
|
url: string(),
|
|
10324
10299
|
hostname: string(),
|
|
@@ -10350,55 +10325,13 @@ const NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
|
|
|
10350
10325
|
getEndpoint: method(_void(), NetworkEndpointSchema.nullable()),
|
|
10351
10326
|
getStatus: method(_void(), NetworkAccessStatusSchema),
|
|
10352
10327
|
/**
|
|
10353
|
-
* Enumerate every active ingress entry.
|
|
10354
|
-
*
|
|
10355
|
-
*
|
|
10328
|
+
* Enumerate every active ingress entry. Providers that expose only a
|
|
10329
|
+
* single endpoint may omit this method; callers fall back to
|
|
10330
|
+
* `getEndpoint()` in that case.
|
|
10356
10331
|
*/
|
|
10357
10332
|
listEndpoints: method(_void(), array(NetworkEndpointEntrySchema).readonly())
|
|
10358
10333
|
}
|
|
10359
10334
|
});
|
|
10360
|
-
const RemoteAccessEndpointSchema = object({
|
|
10361
|
-
url: string(),
|
|
10362
|
-
hostname: string(),
|
|
10363
|
-
port: number(),
|
|
10364
|
-
protocol: _enum(["http", "https"])
|
|
10365
|
-
});
|
|
10366
|
-
const RemoteAccessProviderInfoSchema = object({
|
|
10367
|
-
/** Stable id matching the addon id. */
|
|
10368
|
-
addonId: string(),
|
|
10369
|
-
/** Display label shown on the admin row — sourced from the addon manifest. */
|
|
10370
|
-
displayName: string(),
|
|
10371
|
-
/** When false, the provider is registered but disabled. */
|
|
10372
|
-
enabled: boolean(),
|
|
10373
|
-
/** True when the underlying tunnel/connection is up. */
|
|
10374
|
-
connected: boolean(),
|
|
10375
|
-
/** Public-facing endpoint, when connected. Null otherwise. */
|
|
10376
|
-
endpoint: RemoteAccessEndpointSchema.nullable(),
|
|
10377
|
-
/** Last error message (when connected=false), if available. */
|
|
10378
|
-
error: string().optional()
|
|
10379
|
-
});
|
|
10380
|
-
({
|
|
10381
|
-
methods: {
|
|
10382
|
-
/** All registered remote-access providers + their live status. */
|
|
10383
|
-
listProviders: method(_void(), array(RemoteAccessProviderInfoSchema).readonly()),
|
|
10384
|
-
/**
|
|
10385
|
-
* Start a specific provider's tunnel. Per-provider config still
|
|
10386
|
-
* lives on the addon's settings panel; this is just the on/off
|
|
10387
|
-
* trigger so the admin UI can manage the lifecycle from one place.
|
|
10388
|
-
*/
|
|
10389
|
-
startProvider: method(
|
|
10390
|
-
object({ addonId: string() }),
|
|
10391
|
-
RemoteAccessEndpointSchema,
|
|
10392
|
-
{ kind: "mutation", auth: "admin" }
|
|
10393
|
-
),
|
|
10394
|
-
/** Stop a specific provider's tunnel (idempotent on already-stopped). */
|
|
10395
|
-
stopProvider: method(
|
|
10396
|
-
object({ addonId: string() }),
|
|
10397
|
-
object({ success: literal(true) }),
|
|
10398
|
-
{ kind: "mutation", auth: "admin" }
|
|
10399
|
-
)
|
|
10400
|
-
}
|
|
10401
|
-
});
|
|
10402
10335
|
const TurnServerSchema = object({
|
|
10403
10336
|
/** Single URL or list of URLs (e.g. "turn:turn.example.com:3478?transport=udp"). */
|
|
10404
10337
|
urls: union([string(), array(string())]),
|
|
@@ -10418,45 +10351,6 @@ const TurnServerSchema = object({
|
|
|
10418
10351
|
)
|
|
10419
10352
|
}
|
|
10420
10353
|
});
|
|
10421
|
-
const TurnProviderInfoSchema = object({
|
|
10422
|
-
/** Stable id matching the addon id. */
|
|
10423
|
-
addonId: string(),
|
|
10424
|
-
/** Display label shown on the admin row — sourced from the addon manifest. */
|
|
10425
|
-
displayName: string(),
|
|
10426
|
-
/** When false, the provider is registered but disabled. */
|
|
10427
|
-
enabled: boolean(),
|
|
10428
|
-
/** Number of servers this provider is currently exposing. */
|
|
10429
|
-
serverCount: number(),
|
|
10430
|
-
/**
|
|
10431
|
-
* Flat list of every TURN/STUN URL this provider currently exposes.
|
|
10432
|
-
* One row per URL (multi-URL ICE server entries are flattened). The
|
|
10433
|
-
* admin UI shows this in a compact per-provider list so operators
|
|
10434
|
-
* can verify what's actually being negotiated without having to dig
|
|
10435
|
-
* into the combined `getAllServers` output.
|
|
10436
|
-
*/
|
|
10437
|
-
urls: array(string()).readonly(),
|
|
10438
|
-
/** Last fetch error (when serverCount=0 due to API failure), if any. */
|
|
10439
|
-
error: string().optional()
|
|
10440
|
-
});
|
|
10441
|
-
({
|
|
10442
|
-
methods: {
|
|
10443
|
-
/** All registered TURN providers + per-provider stats. */
|
|
10444
|
-
listProviders: method(_void(), array(TurnProviderInfoSchema).readonly()),
|
|
10445
|
-
/**
|
|
10446
|
-
* Combined list of TURN/STUN servers from all ENABLED providers.
|
|
10447
|
-
* Consumed by the WebRTC layer at session-creation time —
|
|
10448
|
-
* implementations may fetch fresh short-lived credentials each
|
|
10449
|
-
* call (e.g. Cloudflare API), so consumers SHOULD call per-session.
|
|
10450
|
-
*/
|
|
10451
|
-
getAllServers: method(_void(), array(TurnServerSchema).readonly()),
|
|
10452
|
-
/** Toggle a provider's enabled flag. */
|
|
10453
|
-
setProviderEnabled: method(
|
|
10454
|
-
object({ addonId: string(), enabled: boolean() }),
|
|
10455
|
-
object({ success: literal(true) }),
|
|
10456
|
-
{ kind: "mutation", auth: "admin" }
|
|
10457
|
-
)
|
|
10458
|
-
}
|
|
10459
|
-
});
|
|
10460
10354
|
const SnapshotImageSchema = object({
|
|
10461
10355
|
base64: string(),
|
|
10462
10356
|
contentType: string()
|
|
@@ -11924,7 +11818,7 @@ const AllowedAddressesSchema = object({
|
|
|
11924
11818
|
)
|
|
11925
11819
|
}
|
|
11926
11820
|
});
|
|
11927
|
-
const MeshEndpointSchema
|
|
11821
|
+
const MeshEndpointSchema = object({
|
|
11928
11822
|
/** Stable identifier within the provider (e.g. `mesh-ipv4`, `magicdns`, `funnel`). */
|
|
11929
11823
|
id: string(),
|
|
11930
11824
|
/** Operator-facing label (e.g. "Mesh IPv4", "MagicDNS"). */
|
|
@@ -11997,7 +11891,7 @@ const MeshStatusSchema = object({
|
|
|
11997
11891
|
/** Number of peers visible to this host (excluding self). */
|
|
11998
11892
|
peerCount: number(),
|
|
11999
11893
|
/** Every endpoint this provider exposes for the current host. */
|
|
12000
|
-
endpoints: array(MeshEndpointSchema
|
|
11894
|
+
endpoints: array(MeshEndpointSchema).readonly(),
|
|
12001
11895
|
/** Last error from the daemon, when not joined. */
|
|
12002
11896
|
error: string().optional(),
|
|
12003
11897
|
// ── Account / tenant identity (generic across providers) ────────
|
|
@@ -12030,7 +11924,25 @@ const MeshStatusSchema = object({
|
|
|
12030
11924
|
* doesn't rotate keys for the bound host. Operator-facing surface
|
|
12031
11925
|
* for "your access expires on …" banners.
|
|
12032
11926
|
*/
|
|
12033
|
-
keyExpiry: number().nullable()
|
|
11927
|
+
keyExpiry: number().nullable(),
|
|
11928
|
+
// ── Onboard-daemon handoff (Tailscale, generic slot) ────────────
|
|
11929
|
+
/**
|
|
11930
|
+
* When the provider runs its OWN mesh daemon (e.g. the Tailscale
|
|
11931
|
+
* client addon in `onboard` mode spawns a private `tailscaled`),
|
|
11932
|
+
* this carries the local control-socket path. Companion addons that
|
|
11933
|
+
* must drive the SAME daemon — chiefly `tailscale-ingress` for
|
|
11934
|
+
* Serve/Funnel — read it to point their CLI at the right socket
|
|
11935
|
+
* instead of the system default. Empty when the provider uses the
|
|
11936
|
+
* host's system daemon (or doesn't have the concept).
|
|
11937
|
+
*/
|
|
11938
|
+
daemonSocket: string().optional(),
|
|
11939
|
+
/**
|
|
11940
|
+
* Path to the mesh CLI binary the provider downloaded for onboard
|
|
11941
|
+
* mode. Companion addons reuse it so they don't need a system
|
|
11942
|
+
* install when the operator chose a fully self-contained mesh.
|
|
11943
|
+
* Empty in host mode.
|
|
11944
|
+
*/
|
|
11945
|
+
daemonCliPath: string().optional()
|
|
12034
11946
|
});
|
|
12035
11947
|
({
|
|
12036
11948
|
methods: {
|
|
@@ -12142,105 +12054,6 @@ const MeshStatusSchema = object({
|
|
|
12142
12054
|
// tabs driven by this cap.
|
|
12143
12055
|
}
|
|
12144
12056
|
});
|
|
12145
|
-
const MeshEndpointSchema = object({
|
|
12146
|
-
id: string(),
|
|
12147
|
-
label: string(),
|
|
12148
|
-
scope: _enum(["mesh", "public"]),
|
|
12149
|
-
url: string(),
|
|
12150
|
-
hostname: string(),
|
|
12151
|
-
port: number(),
|
|
12152
|
-
protocol: _enum(["http", "https"])
|
|
12153
|
-
});
|
|
12154
|
-
const MeshProviderInfoSchema = object({
|
|
12155
|
-
/** Stable id matching the addon id. */
|
|
12156
|
-
addonId: string(),
|
|
12157
|
-
/** Display label shown on the admin row — sourced from the addon manifest. */
|
|
12158
|
-
displayName: string(),
|
|
12159
|
-
/** True when the host is joined to this provider's mesh. */
|
|
12160
|
-
joined: boolean(),
|
|
12161
|
-
/** Local mesh IP (empty when not joined). */
|
|
12162
|
-
meshIp: string(),
|
|
12163
|
-
/** MagicDNS / mesh hostname (empty when not configured). */
|
|
12164
|
-
magicDnsHostname: string(),
|
|
12165
|
-
/** Peer count (excluding self). */
|
|
12166
|
-
peerCount: number(),
|
|
12167
|
-
/** Active endpoints (mesh IP + MagicDNS + optional public Funnel). */
|
|
12168
|
-
endpoints: array(MeshEndpointSchema).readonly(),
|
|
12169
|
-
/** Last error reported by the provider. */
|
|
12170
|
-
error: string().optional(),
|
|
12171
|
-
// ── Generic identity fields mirrored from MeshStatus ─────────────
|
|
12172
|
-
/** Tenant / tailnet / network display name. Empty pre-join. */
|
|
12173
|
-
tenantName: string(),
|
|
12174
|
-
/** Mesh DNS suffix (e.g. tailXXXX.ts.net). Empty when not configured. */
|
|
12175
|
-
magicDnsSuffix: string(),
|
|
12176
|
-
/** Authenticated user / account login. Null for token-only providers. */
|
|
12177
|
-
userLogin: string().nullable(),
|
|
12178
|
-
/** Provider control-plane URL. */
|
|
12179
|
-
controlPlaneUrl: string(),
|
|
12180
|
-
/** Machine-key expiry (epoch ms). Null when keys don't rotate. */
|
|
12181
|
-
keyExpiry: number().nullable()
|
|
12182
|
-
});
|
|
12183
|
-
({
|
|
12184
|
-
methods: {
|
|
12185
|
-
/** All registered mesh-network providers + live status. */
|
|
12186
|
-
listProviders: method(_void(), array(MeshProviderInfoSchema).readonly()),
|
|
12187
|
-
/**
|
|
12188
|
-
* Join the mesh of a specific provider. Per-provider config still
|
|
12189
|
-
* lives on its settings panel; the orchestrator forwards.
|
|
12190
|
-
*/
|
|
12191
|
-
joinProvider: method(
|
|
12192
|
-
object({
|
|
12193
|
-
addonId: string(),
|
|
12194
|
-
authKey: string().min(8),
|
|
12195
|
-
hostname: string().optional()
|
|
12196
|
-
}),
|
|
12197
|
-
object({ joined: literal(true) }),
|
|
12198
|
-
{ kind: "mutation" }
|
|
12199
|
-
),
|
|
12200
|
-
leaveProvider: method(
|
|
12201
|
-
object({ addonId: string() }),
|
|
12202
|
-
object({ success: literal(true) }),
|
|
12203
|
-
{ kind: "mutation" }
|
|
12204
|
-
),
|
|
12205
|
-
/**
|
|
12206
|
-
* Browser-redirect login flow. Forwards to the named provider's
|
|
12207
|
-
* `mesh-network.startLogin` and returns the URL the daemon
|
|
12208
|
-
* prints. UI opens it in a new tab, then polls `listProviders`
|
|
12209
|
-
* for `joined: true`.
|
|
12210
|
-
*/
|
|
12211
|
-
startLoginProvider: method(
|
|
12212
|
-
object({
|
|
12213
|
-
addonId: string(),
|
|
12214
|
-
hostname: string().optional()
|
|
12215
|
-
}),
|
|
12216
|
-
object({ loginUrl: string() }),
|
|
12217
|
-
{ kind: "mutation" }
|
|
12218
|
-
),
|
|
12219
|
-
/**
|
|
12220
|
-
* Sign out of the provider's account entirely (`mesh-network.logout`).
|
|
12221
|
-
* Distinct from `leaveProvider` which only takes the host off-mesh;
|
|
12222
|
-
* `logoutProvider` wipes credentials so the next start requires a
|
|
12223
|
-
* fresh login.
|
|
12224
|
-
*/
|
|
12225
|
-
logoutProvider: method(
|
|
12226
|
-
object({ addonId: string() }),
|
|
12227
|
-
object({ loggedOut: literal(true) }),
|
|
12228
|
-
{ kind: "mutation" }
|
|
12229
|
-
),
|
|
12230
|
-
/**
|
|
12231
|
-
* Per-provider peer list. Forwards to `mesh-network.listPeers` on
|
|
12232
|
-
* the addressed provider. Separate from `listProviders` because
|
|
12233
|
-
* peer payloads can be large on a heavily-populated tailnet —
|
|
12234
|
-
* fetch only when the operator opens the Peers tab.
|
|
12235
|
-
*/
|
|
12236
|
-
listProviderPeers: method(
|
|
12237
|
-
object({ addonId: string() }),
|
|
12238
|
-
object({
|
|
12239
|
-
peers: array(MeshPeerSchema).readonly()
|
|
12240
|
-
})
|
|
12241
|
-
)
|
|
12242
|
-
}
|
|
12243
|
-
});
|
|
12244
12057
|
const MethodAccessSchema = _enum(["view", "create", "delete"]);
|
|
12245
12058
|
const AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12246
12059
|
const AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
@@ -12916,6 +12729,21 @@ const AddonAutoUpdateSchema = ChannelWithInheritSchema;
|
|
|
12916
12729
|
const RestartAddonResultSchema = unknown();
|
|
12917
12730
|
const InstallPackageResultSchema = unknown();
|
|
12918
12731
|
const ReloadPackagesResultSchema = unknown();
|
|
12732
|
+
const UpdateFrameworkPackageResultSchema = object({
|
|
12733
|
+
packageName: string(),
|
|
12734
|
+
fromVersion: string(),
|
|
12735
|
+
toVersion: string(),
|
|
12736
|
+
/** Ms-epoch the server scheduled its self-restart. */
|
|
12737
|
+
restartingAt: number()
|
|
12738
|
+
});
|
|
12739
|
+
const FrameworkPackageStatusSchema = object({
|
|
12740
|
+
packageName: string(),
|
|
12741
|
+
currentVersion: string(),
|
|
12742
|
+
latestVersion: string().nullable(),
|
|
12743
|
+
hasUpdate: boolean(),
|
|
12744
|
+
/** Optional manifest description for the row tooltip. */
|
|
12745
|
+
description: string().optional()
|
|
12746
|
+
});
|
|
12919
12747
|
const LogStreamEntrySchema = object({
|
|
12920
12748
|
timestamp: string(),
|
|
12921
12749
|
level: string(),
|
|
@@ -12975,13 +12803,29 @@ const CustomActionInputSchema = object({
|
|
|
12975
12803
|
object({ query: string().optional() }),
|
|
12976
12804
|
array(SearchResultSchema)
|
|
12977
12805
|
),
|
|
12806
|
+
/**
|
|
12807
|
+
* Available package updates for a node. `nodeId` omitted (or
|
|
12808
|
+
* `'hub'`) checks the hub's own installed packages; an agent
|
|
12809
|
+
* `nodeId` checks that agent's installed roster against npm
|
|
12810
|
+
* (the hub does the npm lookups + diff — agents stay npm-free).
|
|
12811
|
+
*/
|
|
12978
12812
|
listUpdates: method(
|
|
12979
|
-
|
|
12813
|
+
object({ nodeId: string().optional() }),
|
|
12980
12814
|
array(PackageUpdateSchema).readonly(),
|
|
12981
12815
|
{ auth: "admin" }
|
|
12982
12816
|
),
|
|
12817
|
+
/**
|
|
12818
|
+
* Update one package on a node. `nodeId` omitted (or `'hub'`)
|
|
12819
|
+
* installs on the hub via npm; an agent `nodeId` makes the hub
|
|
12820
|
+
* pack the resolved version and push the tarball to that agent
|
|
12821
|
+
* (`$agent.deploy` + `$agent.reload`) — agents need no npm runtime.
|
|
12822
|
+
*/
|
|
12983
12823
|
updatePackage: method(
|
|
12984
|
-
object({
|
|
12824
|
+
object({
|
|
12825
|
+
name: string().min(1),
|
|
12826
|
+
version: string().optional(),
|
|
12827
|
+
nodeId: string().optional()
|
|
12828
|
+
}),
|
|
12985
12829
|
unknown(),
|
|
12986
12830
|
{ kind: "mutation", auth: "admin" }
|
|
12987
12831
|
),
|
|
@@ -13002,12 +12846,128 @@ const CustomActionInputSchema = object({
|
|
|
13002
12846
|
object({ rolledBackTo: string().nullable() }),
|
|
13003
12847
|
{ kind: "mutation", auth: "admin" }
|
|
13004
12848
|
),
|
|
13005
|
-
|
|
12849
|
+
/** Re-check updates for a node, bypassing any cache. `nodeId`
|
|
12850
|
+
* omitted (or `'hub'`) refreshes the hub; an agent `nodeId`
|
|
12851
|
+
* re-checks that agent's roster. */
|
|
12852
|
+
forceRefresh: method(
|
|
12853
|
+
object({ nodeId: string().optional() }),
|
|
12854
|
+
unknown(),
|
|
12855
|
+
{ kind: "mutation", auth: "admin" }
|
|
12856
|
+
),
|
|
13006
12857
|
restartServer: method(
|
|
13007
12858
|
object({ confirm: literal(true) }),
|
|
13008
12859
|
unknown(),
|
|
13009
12860
|
{ kind: "mutation", auth: "admin" }
|
|
13010
12861
|
),
|
|
12862
|
+
/**
|
|
12863
|
+
* Most-recent restart marker (kind / packageName / from→to versions
|
|
12864
|
+
* / requestedBy / requestedAt). Returns `null` when this process
|
|
12865
|
+
* didn't boot from a tracked restart, or when the
|
|
12866
|
+
* post-boot retention window (5 min) has elapsed.
|
|
12867
|
+
*
|
|
12868
|
+
* Drives the admin-UI reconnect overlay's success toast — the
|
|
12869
|
+
* `system.restart-completed` event itself is fired before the
|
|
12870
|
+
* client has time to re-subscribe, so the client queries this on
|
|
12871
|
+
* first reconnect instead.
|
|
12872
|
+
*/
|
|
12873
|
+
getLastRestart: method(
|
|
12874
|
+
_void(),
|
|
12875
|
+
object({
|
|
12876
|
+
kind: _enum(["framework-update", "manual", "system"]),
|
|
12877
|
+
packageName: string().optional(),
|
|
12878
|
+
fromVersion: string().optional(),
|
|
12879
|
+
toVersion: string().optional(),
|
|
12880
|
+
requestedBy: string().optional(),
|
|
12881
|
+
requestedAt: number()
|
|
12882
|
+
}).nullable(),
|
|
12883
|
+
{ auth: "admin" }
|
|
12884
|
+
),
|
|
12885
|
+
/**
|
|
12886
|
+
* Snapshot of the framework packages installed under the hub's
|
|
12887
|
+
* `<appRoot>/node_modules/`. Each row carries the currently
|
|
12888
|
+
* installed version and (best-effort) the latest version
|
|
12889
|
+
* available on npm. Drives the admin-UI "System packages" panel.
|
|
12890
|
+
*
|
|
12891
|
+
* Spec: docs/superpowers/specs/2026-05-14-framework-live-update-design.md
|
|
12892
|
+
*/
|
|
12893
|
+
listFrameworkPackages: method(
|
|
12894
|
+
_void(),
|
|
12895
|
+
array(FrameworkPackageStatusSchema).readonly(),
|
|
12896
|
+
{ auth: "admin" }
|
|
12897
|
+
),
|
|
12898
|
+
/**
|
|
12899
|
+
* Cluster-wide capability-provider discovery. Returns the list of
|
|
12900
|
+
* `{ addonId, mode, isActive }` tuples for whatever addon(s)
|
|
12901
|
+
* currently provide the requested capability across the cluster.
|
|
12902
|
+
*
|
|
12903
|
+
* Why this lives on `addons` (and not on a `capabilities` cap of
|
|
12904
|
+
* its own): the hub's main-process `CapabilityRegistry` already
|
|
12905
|
+
* aggregates registrations from every forked group-runner and
|
|
12906
|
+
* remote agent via Moleculer event propagation — there's no
|
|
12907
|
+
* cross-process registry mirror to build, just an introspection
|
|
12908
|
+
* shim.
|
|
12909
|
+
*
|
|
12910
|
+
* Use this from addon code when you need to know whether another
|
|
12911
|
+
* addon has registered a specific cap (e.g. `tailscale-ingress`
|
|
12912
|
+
* checking `tailscale-client` is up before calling `tailscale
|
|
12913
|
+
* serve`). Don't reach for `ctx.capabilities.getCollectionEntries`
|
|
12914
|
+
* — that reads the LOCAL registry of the calling addon's group
|
|
12915
|
+
* runner and never sees providers in other processes. See
|
|
12916
|
+
* `CLAUDE.md` → Critical rules → ctx.api vs ctx.capabilities.
|
|
12917
|
+
*/
|
|
12918
|
+
listCapabilityProviders: method(
|
|
12919
|
+
object({ capName: string().min(1) }),
|
|
12920
|
+
array(object({
|
|
12921
|
+
addonId: string(),
|
|
12922
|
+
mode: _enum(["singleton", "collection"]),
|
|
12923
|
+
isActive: boolean()
|
|
12924
|
+
})).readonly()
|
|
12925
|
+
),
|
|
12926
|
+
/**
|
|
12927
|
+
* Toggle a single collection-cap provider on/off. Generic write-side
|
|
12928
|
+
* counterpart of `listCapabilityProviders` — drives the per-provider
|
|
12929
|
+
* Enable/Disable affordance in admin pages (TURN servers, etc.)
|
|
12930
|
+
* without needing a bespoke orchestrator cap.
|
|
12931
|
+
*
|
|
12932
|
+
* Reaches the hub's `CapabilityRegistry` directly:
|
|
12933
|
+
* `enableCollectionProvider` / `disableCollectionProvider` flip the
|
|
12934
|
+
* registry-level `disabledProviders` set. `getCollectionEntries`
|
|
12935
|
+
* already filters disabled providers out, so a disabled provider
|
|
12936
|
+
* drops out of every collection aggregate immediately. Only valid
|
|
12937
|
+
* for `mode: 'collection'` caps — the registry no-ops + warns for
|
|
12938
|
+
* singletons.
|
|
12939
|
+
*/
|
|
12940
|
+
setCapabilityProviderEnabled: method(
|
|
12941
|
+
object({
|
|
12942
|
+
capName: string().min(1),
|
|
12943
|
+
addonId: string().min(1),
|
|
12944
|
+
enabled: boolean()
|
|
12945
|
+
}),
|
|
12946
|
+
object({ success: literal(true) }),
|
|
12947
|
+
{ kind: "mutation", auth: "admin" }
|
|
12948
|
+
),
|
|
12949
|
+
/**
|
|
12950
|
+
* Live-update one of the framework packages marked
|
|
12951
|
+
* `camstack.system: true` (`@camstack/types|kernel|core|sdk|ui-library`).
|
|
12952
|
+
* Runs `npm install --prefix <appRoot> <name>@<version> --no-save`,
|
|
12953
|
+
* writes a `.restart-pending` marker, emits `system.restarting`
|
|
12954
|
+
* and schedules a graceful process exit. The supervisor (Docker /
|
|
12955
|
+
* Electron / systemd) brings the hub back up; on first boot after
|
|
12956
|
+
* the restart the marker fires `system.restart-completed`.
|
|
12957
|
+
*
|
|
12958
|
+
* `version` defaults to `'latest'`. The allow-list of valid
|
|
12959
|
+
* `packageName` values is enforced server-side.
|
|
12960
|
+
*
|
|
12961
|
+
* Spec: docs/superpowers/specs/2026-05-14-framework-live-update-design.md
|
|
12962
|
+
*/
|
|
12963
|
+
updateFrameworkPackage: method(
|
|
12964
|
+
object({
|
|
12965
|
+
packageName: string().min(1),
|
|
12966
|
+
version: string().optional()
|
|
12967
|
+
}),
|
|
12968
|
+
UpdateFrameworkPackageResultSchema,
|
|
12969
|
+
{ kind: "mutation", auth: "admin" }
|
|
12970
|
+
),
|
|
13011
12971
|
getVersions: method(
|
|
13012
12972
|
object({ name: string() }),
|
|
13013
12973
|
array(PackageVersionInfoSchema).readonly()
|
|
@@ -13078,6 +13038,7 @@ var EventCategory = /* @__PURE__ */ ((EventCategory2) => {
|
|
|
13078
13038
|
EventCategory2["SystemBoot"] = "system.boot";
|
|
13079
13039
|
EventCategory2["SystemAddonsReady"] = "system.addons-ready";
|
|
13080
13040
|
EventCategory2["SystemRestarting"] = "system.restarting";
|
|
13041
|
+
EventCategory2["SystemRestartCompleted"] = "system.restart-completed";
|
|
13081
13042
|
EventCategory2["SystemReadyState"] = "system.ready-state";
|
|
13082
13043
|
EventCategory2["AddonStarted"] = "addon.started";
|
|
13083
13044
|
EventCategory2["AddonStopped"] = "addon.stopped";
|