@camstack/addon-admin-ui 0.1.34 → 0.1.35

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.
Files changed (31) hide show
  1. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CZpDKvbm.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DYU-qDnu.js} +1 -1
  2. package/dist/assets/{devices-DFv560M2.js → devices-D4k34mru.js} +1 -1
  3. package/dist/assets/{hostInit-bYpW6FId.js → hostInit-CBKchP1G.js} +1 -1
  4. package/dist/assets/index-BEewR-UX.js +1 -0
  5. package/dist/assets/{index-BuBZuTof.js → index-BGZqVJZt.js} +1 -1
  6. package/dist/assets/{index-DOOUOoL9.js → index-BI3Z7SSi.js} +1 -1
  7. package/dist/assets/index-BhNfKRLZ.js +1156 -0
  8. package/dist/assets/index-BqMPfvQx.js +1 -0
  9. package/dist/assets/{index-DAxxrrPB.js → index-Bwcmc2hW.js} +1 -1
  10. package/dist/assets/{index-CtaWAhdy.js → index-CP1R6E2R.js} +7 -7
  11. package/dist/assets/{index-D4HNoPqG.js → index-CwjnPcOV.js} +37 -37
  12. package/dist/assets/{index-xQgtnvQh.js → index-D92THlot.js} +1 -1
  13. package/dist/assets/index-Dmon2mdO.js +1 -0
  14. package/dist/assets/index-KlKJOjpC.js +1 -0
  15. package/dist/assets/index-bBEaoekV.css +1 -0
  16. package/dist/assets/method-access-map-BFPyQ2-G.js +1 -0
  17. package/dist/assets/{remoteEntry-DToxOPzT.js → remoteEntry-BRybuw2S.js} +1 -1
  18. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-C3bnYyiP.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DUkp33c_.js} +2 -2
  19. package/dist/index.html +6 -6
  20. package/dist/mf-entry-bootstrap-0.js +2 -2
  21. package/dist/server/addon.js +28 -230
  22. package/dist/server/addon.js.map +1 -1
  23. package/dist/sw.js +1 -1
  24. package/package.json +1 -1
  25. package/dist/assets/index-8vQS4K6d.js +0 -1
  26. package/dist/assets/index-B3RV989b.js +0 -1
  27. package/dist/assets/index-CJmL3_yz.css +0 -1
  28. package/dist/assets/index-DJ0oJxIB.js +0 -1
  29. package/dist/assets/index-DUltPrcr.js +0 -1
  30. package/dist/assets/index-N4SZRZr8.js +0 -1156
  31. package/dist/assets/method-access-map-DLph6s5D.js +0 -1
@@ -10195,51 +10195,6 @@ const AuthResultSchema = object({
10195
10195
  validateToken: method(object({ token: string() }), AuthResultSchema.nullable())
10196
10196
  }
10197
10197
  });
10198
- const AuthProviderInfoSchema = object({
10199
- /** Stable id matching the addon id (used for `getLoginUrl({addonId,…})`). */
10200
- addonId: string(),
10201
- /**
10202
- * Per-instance id when one addon registers multiple "logical"
10203
- * providers (e.g. OIDC with Google + Microsoft + custom). The login
10204
- * URL becomes `/addon/${addonId}/${instanceId}/start` — handler reads
10205
- * `:instanceId` from the route. Empty/unset means the addon is a
10206
- * single-instance provider; the URL is `/addon/${addonId}/start`.
10207
- */
10208
- instanceId: string().optional(),
10209
- /** Display label shown on the login button + admin row. */
10210
- displayName: string(),
10211
- /** Optional iconography hint (lucide-react icon name OR emoji). */
10212
- icon: string().optional(),
10213
- /** When true, the provider exposes a redirect-based login flow
10214
- * (`getLoginUrl` returns a URL the browser navigates to). */
10215
- hasRedirectFlow: boolean(),
10216
- /** When true, the provider exposes a credential-form login flow
10217
- * (`validateCredentials` accepts username + password). */
10218
- hasCredentialFlow: boolean(),
10219
- /** Provider kind, drives admin-UI hint dispatch (oidc / saml / totp / …). */
10220
- kind: string().optional(),
10221
- /** Operator-facing status string (e.g. "Connected to https://login.acme.com"). */
10222
- status: string().optional(),
10223
- /** When false, the provider is registered but disabled by config; the
10224
- * UI surfaces it as inactive without enumerating it for login. */
10225
- enabled: boolean()
10226
- });
10227
- ({
10228
- methods: {
10229
- /** All registered auth providers, both enabled and disabled. */
10230
- listProviders: method(_void(), array(AuthProviderInfoSchema).readonly()),
10231
- /**
10232
- * Toggle a provider's enabled flag. Disabled providers stay
10233
- * registered but aren't surfaced on the login page. The orchestrator
10234
- * persists the state in `addon-settings` so it survives restarts.
10235
- */
10236
- setProviderEnabled: method(
10237
- object({ addonId: string(), enabled: boolean() }),
10238
- object({ success: literal(true) }),
10239
- { kind: "mutation", auth: "admin" }
10240
- )
10241
- }
10242
- });
10243
10198
  const NetworkEndpointSchema = object({
10244
10199
  url: string(),
10245
10200
  hostname: string(),
@@ -10271,55 +10226,13 @@ const NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
10271
10226
  getEndpoint: method(_void(), NetworkEndpointSchema.nullable()),
10272
10227
  getStatus: method(_void(), NetworkAccessStatusSchema),
10273
10228
  /**
10274
- * Enumerate every active ingress entry. Default implementation (when
10275
- * the provider omits this method) is derived from `getEndpoint()` —
10276
- * see the remote-access orchestrator for the fallback path.
10229
+ * Enumerate every active ingress entry. Providers that expose only a
10230
+ * single endpoint may omit this method; callers fall back to
10231
+ * `getEndpoint()` in that case.
10277
10232
  */
10278
10233
  listEndpoints: method(_void(), array(NetworkEndpointEntrySchema).readonly())
10279
10234
  }
10280
10235
  });
10281
- const RemoteAccessEndpointSchema = object({
10282
- url: string(),
10283
- hostname: string(),
10284
- port: number(),
10285
- protocol: _enum(["http", "https"])
10286
- });
10287
- const RemoteAccessProviderInfoSchema = object({
10288
- /** Stable id matching the addon id. */
10289
- addonId: string(),
10290
- /** Display label shown on the admin row — sourced from the addon manifest. */
10291
- displayName: string(),
10292
- /** When false, the provider is registered but disabled. */
10293
- enabled: boolean(),
10294
- /** True when the underlying tunnel/connection is up. */
10295
- connected: boolean(),
10296
- /** Public-facing endpoint, when connected. Null otherwise. */
10297
- endpoint: RemoteAccessEndpointSchema.nullable(),
10298
- /** Last error message (when connected=false), if available. */
10299
- error: string().optional()
10300
- });
10301
- ({
10302
- methods: {
10303
- /** All registered remote-access providers + their live status. */
10304
- listProviders: method(_void(), array(RemoteAccessProviderInfoSchema).readonly()),
10305
- /**
10306
- * Start a specific provider's tunnel. Per-provider config still
10307
- * lives on the addon's settings panel; this is just the on/off
10308
- * trigger so the admin UI can manage the lifecycle from one place.
10309
- */
10310
- startProvider: method(
10311
- object({ addonId: string() }),
10312
- RemoteAccessEndpointSchema,
10313
- { kind: "mutation", auth: "admin" }
10314
- ),
10315
- /** Stop a specific provider's tunnel (idempotent on already-stopped). */
10316
- stopProvider: method(
10317
- object({ addonId: string() }),
10318
- object({ success: literal(true) }),
10319
- { kind: "mutation", auth: "admin" }
10320
- )
10321
- }
10322
- });
10323
10236
  const TurnServerSchema = object({
10324
10237
  /** Single URL or list of URLs (e.g. "turn:turn.example.com:3478?transport=udp"). */
10325
10238
  urls: union([string(), array(string())]),
@@ -10339,45 +10252,6 @@ const TurnServerSchema = object({
10339
10252
  )
10340
10253
  }
10341
10254
  });
10342
- const TurnProviderInfoSchema = object({
10343
- /** Stable id matching the addon id. */
10344
- addonId: string(),
10345
- /** Display label shown on the admin row — sourced from the addon manifest. */
10346
- displayName: string(),
10347
- /** When false, the provider is registered but disabled. */
10348
- enabled: boolean(),
10349
- /** Number of servers this provider is currently exposing. */
10350
- serverCount: number(),
10351
- /**
10352
- * Flat list of every TURN/STUN URL this provider currently exposes.
10353
- * One row per URL (multi-URL ICE server entries are flattened). The
10354
- * admin UI shows this in a compact per-provider list so operators
10355
- * can verify what's actually being negotiated without having to dig
10356
- * into the combined `getAllServers` output.
10357
- */
10358
- urls: array(string()).readonly(),
10359
- /** Last fetch error (when serverCount=0 due to API failure), if any. */
10360
- error: string().optional()
10361
- });
10362
- ({
10363
- methods: {
10364
- /** All registered TURN providers + per-provider stats. */
10365
- listProviders: method(_void(), array(TurnProviderInfoSchema).readonly()),
10366
- /**
10367
- * Combined list of TURN/STUN servers from all ENABLED providers.
10368
- * Consumed by the WebRTC layer at session-creation time —
10369
- * implementations may fetch fresh short-lived credentials each
10370
- * call (e.g. Cloudflare API), so consumers SHOULD call per-session.
10371
- */
10372
- getAllServers: method(_void(), array(TurnServerSchema).readonly()),
10373
- /** Toggle a provider's enabled flag. */
10374
- setProviderEnabled: method(
10375
- object({ addonId: string(), enabled: boolean() }),
10376
- object({ success: literal(true) }),
10377
- { kind: "mutation", auth: "admin" }
10378
- )
10379
- }
10380
- });
10381
10255
  const SnapshotImageSchema = object({
10382
10256
  base64: string(),
10383
10257
  contentType: string()
@@ -11845,7 +11719,7 @@ const AllowedAddressesSchema = object({
11845
11719
  )
11846
11720
  }
11847
11721
  });
11848
- const MeshEndpointSchema$1 = object({
11722
+ const MeshEndpointSchema = object({
11849
11723
  /** Stable identifier within the provider (e.g. `mesh-ipv4`, `magicdns`, `funnel`). */
11850
11724
  id: string(),
11851
11725
  /** Operator-facing label (e.g. "Mesh IPv4", "MagicDNS"). */
@@ -11918,7 +11792,7 @@ const MeshStatusSchema = object({
11918
11792
  /** Number of peers visible to this host (excluding self). */
11919
11793
  peerCount: number(),
11920
11794
  /** Every endpoint this provider exposes for the current host. */
11921
- endpoints: array(MeshEndpointSchema$1).readonly(),
11795
+ endpoints: array(MeshEndpointSchema).readonly(),
11922
11796
  /** Last error from the daemon, when not joined. */
11923
11797
  error: string().optional(),
11924
11798
  // ── Account / tenant identity (generic across providers) ────────
@@ -12081,105 +11955,6 @@ const MeshStatusSchema = object({
12081
11955
  // tabs driven by this cap.
12082
11956
  }
12083
11957
  });
12084
- const MeshEndpointSchema = object({
12085
- id: string(),
12086
- label: string(),
12087
- scope: _enum(["mesh", "public"]),
12088
- url: string(),
12089
- hostname: string(),
12090
- port: number(),
12091
- protocol: _enum(["http", "https"])
12092
- });
12093
- const MeshProviderInfoSchema = object({
12094
- /** Stable id matching the addon id. */
12095
- addonId: string(),
12096
- /** Display label shown on the admin row — sourced from the addon manifest. */
12097
- displayName: string(),
12098
- /** True when the host is joined to this provider's mesh. */
12099
- joined: boolean(),
12100
- /** Local mesh IP (empty when not joined). */
12101
- meshIp: string(),
12102
- /** MagicDNS / mesh hostname (empty when not configured). */
12103
- magicDnsHostname: string(),
12104
- /** Peer count (excluding self). */
12105
- peerCount: number(),
12106
- /** Active endpoints (mesh IP + MagicDNS + optional public Funnel). */
12107
- endpoints: array(MeshEndpointSchema).readonly(),
12108
- /** Last error reported by the provider. */
12109
- error: string().optional(),
12110
- // ── Generic identity fields mirrored from MeshStatus ─────────────
12111
- /** Tenant / tailnet / network display name. Empty pre-join. */
12112
- tenantName: string(),
12113
- /** Mesh DNS suffix (e.g. tailXXXX.ts.net). Empty when not configured. */
12114
- magicDnsSuffix: string(),
12115
- /** Authenticated user / account login. Null for token-only providers. */
12116
- userLogin: string().nullable(),
12117
- /** Provider control-plane URL. */
12118
- controlPlaneUrl: string(),
12119
- /** Machine-key expiry (epoch ms). Null when keys don't rotate. */
12120
- keyExpiry: number().nullable()
12121
- });
12122
- ({
12123
- methods: {
12124
- /** All registered mesh-network providers + live status. */
12125
- listProviders: method(_void(), array(MeshProviderInfoSchema).readonly()),
12126
- /**
12127
- * Join the mesh of a specific provider. Per-provider config still
12128
- * lives on its settings panel; the orchestrator forwards.
12129
- */
12130
- joinProvider: method(
12131
- object({
12132
- addonId: string(),
12133
- authKey: string().min(8),
12134
- hostname: string().optional()
12135
- }),
12136
- object({ joined: literal(true) }),
12137
- { kind: "mutation" }
12138
- ),
12139
- leaveProvider: method(
12140
- object({ addonId: string() }),
12141
- object({ success: literal(true) }),
12142
- { kind: "mutation" }
12143
- ),
12144
- /**
12145
- * Browser-redirect login flow. Forwards to the named provider's
12146
- * `mesh-network.startLogin` and returns the URL the daemon
12147
- * prints. UI opens it in a new tab, then polls `listProviders`
12148
- * for `joined: true`.
12149
- */
12150
- startLoginProvider: method(
12151
- object({
12152
- addonId: string(),
12153
- hostname: string().optional()
12154
- }),
12155
- object({ loginUrl: string() }),
12156
- { kind: "mutation" }
12157
- ),
12158
- /**
12159
- * Sign out of the provider's account entirely (`mesh-network.logout`).
12160
- * Distinct from `leaveProvider` which only takes the host off-mesh;
12161
- * `logoutProvider` wipes credentials so the next start requires a
12162
- * fresh login.
12163
- */
12164
- logoutProvider: method(
12165
- object({ addonId: string() }),
12166
- object({ loggedOut: literal(true) }),
12167
- { kind: "mutation" }
12168
- ),
12169
- /**
12170
- * Per-provider peer list. Forwards to `mesh-network.listPeers` on
12171
- * the addressed provider. Separate from `listProviders` because
12172
- * peer payloads can be large on a heavily-populated tailnet —
12173
- * fetch only when the operator opens the Peers tab.
12174
- */
12175
- listProviderPeers: method(
12176
- object({ addonId: string() }),
12177
- object({
12178
- peers: array(MeshPeerSchema).readonly()
12179
- })
12180
- )
12181
- }
12182
- });
12183
11958
  const MethodAccessSchema = _enum(["view", "create", "delete"]);
12184
11959
  const AllowedProviderSchema = union([literal("*"), array(string())]);
12185
11960
  const AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
@@ -13049,6 +12824,29 @@ const CustomActionInputSchema = object({
13049
12824
  isActive: boolean()
13050
12825
  })).readonly()
13051
12826
  ),
12827
+ /**
12828
+ * Toggle a single collection-cap provider on/off. Generic write-side
12829
+ * counterpart of `listCapabilityProviders` — drives the per-provider
12830
+ * Enable/Disable affordance in admin pages (TURN servers, etc.)
12831
+ * without needing a bespoke orchestrator cap.
12832
+ *
12833
+ * Reaches the hub's `CapabilityRegistry` directly:
12834
+ * `enableCollectionProvider` / `disableCollectionProvider` flip the
12835
+ * registry-level `disabledProviders` set. `getCollectionEntries`
12836
+ * already filters disabled providers out, so a disabled provider
12837
+ * drops out of every collection aggregate immediately. Only valid
12838
+ * for `mode: 'collection'` caps — the registry no-ops + warns for
12839
+ * singletons.
12840
+ */
12841
+ setCapabilityProviderEnabled: method(
12842
+ object({
12843
+ capName: string().min(1),
12844
+ addonId: string().min(1),
12845
+ enabled: boolean()
12846
+ }),
12847
+ object({ success: literal(true) }),
12848
+ { kind: "mutation", auth: "admin" }
12849
+ ),
13052
12850
  /**
13053
12851
  * Live-update one of the framework packages marked
13054
12852
  * `camstack.system: true` (`@camstack/types|kernel|core|sdk|ui-library`).