@camstack/addon-provider-rtsp 0.1.26 → 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.mjs CHANGED
@@ -10386,51 +10386,6 @@ const AuthResultSchema = object({
10386
10386
  validateToken: method(object({ token: string() }), AuthResultSchema.nullable())
10387
10387
  }
10388
10388
  });
10389
- const AuthProviderInfoSchema = object({
10390
- /** Stable id matching the addon id (used for `getLoginUrl({addonId,…})`). */
10391
- addonId: string(),
10392
- /**
10393
- * Per-instance id when one addon registers multiple "logical"
10394
- * providers (e.g. OIDC with Google + Microsoft + custom). The login
10395
- * URL becomes `/addon/${addonId}/${instanceId}/start` — handler reads
10396
- * `:instanceId` from the route. Empty/unset means the addon is a
10397
- * single-instance provider; the URL is `/addon/${addonId}/start`.
10398
- */
10399
- instanceId: string().optional(),
10400
- /** Display label shown on the login button + admin row. */
10401
- displayName: string(),
10402
- /** Optional iconography hint (lucide-react icon name OR emoji). */
10403
- icon: string().optional(),
10404
- /** When true, the provider exposes a redirect-based login flow
10405
- * (`getLoginUrl` returns a URL the browser navigates to). */
10406
- hasRedirectFlow: boolean(),
10407
- /** When true, the provider exposes a credential-form login flow
10408
- * (`validateCredentials` accepts username + password). */
10409
- hasCredentialFlow: boolean(),
10410
- /** Provider kind, drives admin-UI hint dispatch (oidc / saml / totp / …). */
10411
- kind: string().optional(),
10412
- /** Operator-facing status string (e.g. "Connected to https://login.acme.com"). */
10413
- status: string().optional(),
10414
- /** When false, the provider is registered but disabled by config; the
10415
- * UI surfaces it as inactive without enumerating it for login. */
10416
- enabled: boolean()
10417
- });
10418
- ({
10419
- methods: {
10420
- /** All registered auth providers, both enabled and disabled. */
10421
- listProviders: method(_void(), array(AuthProviderInfoSchema).readonly()),
10422
- /**
10423
- * Toggle a provider's enabled flag. Disabled providers stay
10424
- * registered but aren't surfaced on the login page. The orchestrator
10425
- * persists the state in `addon-settings` so it survives restarts.
10426
- */
10427
- setProviderEnabled: method(
10428
- object({ addonId: string(), enabled: boolean() }),
10429
- object({ success: literal(true) }),
10430
- { kind: "mutation", auth: "admin" }
10431
- )
10432
- }
10433
- });
10434
10389
  const NetworkEndpointSchema = object({
10435
10390
  url: string(),
10436
10391
  hostname: string(),
@@ -10462,55 +10417,13 @@ const NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
10462
10417
  getEndpoint: method(_void(), NetworkEndpointSchema.nullable()),
10463
10418
  getStatus: method(_void(), NetworkAccessStatusSchema),
10464
10419
  /**
10465
- * Enumerate every active ingress entry. Default implementation (when
10466
- * the provider omits this method) is derived from `getEndpoint()` —
10467
- * see the remote-access orchestrator for the fallback path.
10420
+ * Enumerate every active ingress entry. Providers that expose only a
10421
+ * single endpoint may omit this method; callers fall back to
10422
+ * `getEndpoint()` in that case.
10468
10423
  */
10469
10424
  listEndpoints: method(_void(), array(NetworkEndpointEntrySchema).readonly())
10470
10425
  }
10471
10426
  });
10472
- const RemoteAccessEndpointSchema = object({
10473
- url: string(),
10474
- hostname: string(),
10475
- port: number(),
10476
- protocol: _enum(["http", "https"])
10477
- });
10478
- const RemoteAccessProviderInfoSchema = object({
10479
- /** Stable id matching the addon id. */
10480
- addonId: string(),
10481
- /** Display label shown on the admin row — sourced from the addon manifest. */
10482
- displayName: string(),
10483
- /** When false, the provider is registered but disabled. */
10484
- enabled: boolean(),
10485
- /** True when the underlying tunnel/connection is up. */
10486
- connected: boolean(),
10487
- /** Public-facing endpoint, when connected. Null otherwise. */
10488
- endpoint: RemoteAccessEndpointSchema.nullable(),
10489
- /** Last error message (when connected=false), if available. */
10490
- error: string().optional()
10491
- });
10492
- ({
10493
- methods: {
10494
- /** All registered remote-access providers + their live status. */
10495
- listProviders: method(_void(), array(RemoteAccessProviderInfoSchema).readonly()),
10496
- /**
10497
- * Start a specific provider's tunnel. Per-provider config still
10498
- * lives on the addon's settings panel; this is just the on/off
10499
- * trigger so the admin UI can manage the lifecycle from one place.
10500
- */
10501
- startProvider: method(
10502
- object({ addonId: string() }),
10503
- RemoteAccessEndpointSchema,
10504
- { kind: "mutation", auth: "admin" }
10505
- ),
10506
- /** Stop a specific provider's tunnel (idempotent on already-stopped). */
10507
- stopProvider: method(
10508
- object({ addonId: string() }),
10509
- object({ success: literal(true) }),
10510
- { kind: "mutation", auth: "admin" }
10511
- )
10512
- }
10513
- });
10514
10427
  const TurnServerSchema = object({
10515
10428
  /** Single URL or list of URLs (e.g. "turn:turn.example.com:3478?transport=udp"). */
10516
10429
  urls: union([string(), array(string())]),
@@ -10530,45 +10443,6 @@ const TurnServerSchema = object({
10530
10443
  )
10531
10444
  }
10532
10445
  });
10533
- const TurnProviderInfoSchema = object({
10534
- /** Stable id matching the addon id. */
10535
- addonId: string(),
10536
- /** Display label shown on the admin row — sourced from the addon manifest. */
10537
- displayName: string(),
10538
- /** When false, the provider is registered but disabled. */
10539
- enabled: boolean(),
10540
- /** Number of servers this provider is currently exposing. */
10541
- serverCount: number(),
10542
- /**
10543
- * Flat list of every TURN/STUN URL this provider currently exposes.
10544
- * One row per URL (multi-URL ICE server entries are flattened). The
10545
- * admin UI shows this in a compact per-provider list so operators
10546
- * can verify what's actually being negotiated without having to dig
10547
- * into the combined `getAllServers` output.
10548
- */
10549
- urls: array(string()).readonly(),
10550
- /** Last fetch error (when serverCount=0 due to API failure), if any. */
10551
- error: string().optional()
10552
- });
10553
- ({
10554
- methods: {
10555
- /** All registered TURN providers + per-provider stats. */
10556
- listProviders: method(_void(), array(TurnProviderInfoSchema).readonly()),
10557
- /**
10558
- * Combined list of TURN/STUN servers from all ENABLED providers.
10559
- * Consumed by the WebRTC layer at session-creation time —
10560
- * implementations may fetch fresh short-lived credentials each
10561
- * call (e.g. Cloudflare API), so consumers SHOULD call per-session.
10562
- */
10563
- getAllServers: method(_void(), array(TurnServerSchema).readonly()),
10564
- /** Toggle a provider's enabled flag. */
10565
- setProviderEnabled: method(
10566
- object({ addonId: string(), enabled: boolean() }),
10567
- object({ success: literal(true) }),
10568
- { kind: "mutation", auth: "admin" }
10569
- )
10570
- }
10571
- });
10572
10446
  const SnapshotImageSchema = object({
10573
10447
  base64: string(),
10574
10448
  contentType: string()
@@ -12048,7 +11922,7 @@ const AllowedAddressesSchema = object({
12048
11922
  )
12049
11923
  }
12050
11924
  });
12051
- const MeshEndpointSchema$1 = object({
11925
+ const MeshEndpointSchema = object({
12052
11926
  /** Stable identifier within the provider (e.g. `mesh-ipv4`, `magicdns`, `funnel`). */
12053
11927
  id: string(),
12054
11928
  /** Operator-facing label (e.g. "Mesh IPv4", "MagicDNS"). */
@@ -12121,7 +11995,7 @@ const MeshStatusSchema = object({
12121
11995
  /** Number of peers visible to this host (excluding self). */
12122
11996
  peerCount: number(),
12123
11997
  /** Every endpoint this provider exposes for the current host. */
12124
- endpoints: array(MeshEndpointSchema$1).readonly(),
11998
+ endpoints: array(MeshEndpointSchema).readonly(),
12125
11999
  /** Last error from the daemon, when not joined. */
12126
12000
  error: string().optional(),
12127
12001
  // ── Account / tenant identity (generic across providers) ────────
@@ -12284,105 +12158,6 @@ const MeshStatusSchema = object({
12284
12158
  // tabs driven by this cap.
12285
12159
  }
12286
12160
  });
12287
- const MeshEndpointSchema = object({
12288
- id: string(),
12289
- label: string(),
12290
- scope: _enum(["mesh", "public"]),
12291
- url: string(),
12292
- hostname: string(),
12293
- port: number(),
12294
- protocol: _enum(["http", "https"])
12295
- });
12296
- const MeshProviderInfoSchema = object({
12297
- /** Stable id matching the addon id. */
12298
- addonId: string(),
12299
- /** Display label shown on the admin row — sourced from the addon manifest. */
12300
- displayName: string(),
12301
- /** True when the host is joined to this provider's mesh. */
12302
- joined: boolean(),
12303
- /** Local mesh IP (empty when not joined). */
12304
- meshIp: string(),
12305
- /** MagicDNS / mesh hostname (empty when not configured). */
12306
- magicDnsHostname: string(),
12307
- /** Peer count (excluding self). */
12308
- peerCount: number(),
12309
- /** Active endpoints (mesh IP + MagicDNS + optional public Funnel). */
12310
- endpoints: array(MeshEndpointSchema).readonly(),
12311
- /** Last error reported by the provider. */
12312
- error: string().optional(),
12313
- // ── Generic identity fields mirrored from MeshStatus ─────────────
12314
- /** Tenant / tailnet / network display name. Empty pre-join. */
12315
- tenantName: string(),
12316
- /** Mesh DNS suffix (e.g. tailXXXX.ts.net). Empty when not configured. */
12317
- magicDnsSuffix: string(),
12318
- /** Authenticated user / account login. Null for token-only providers. */
12319
- userLogin: string().nullable(),
12320
- /** Provider control-plane URL. */
12321
- controlPlaneUrl: string(),
12322
- /** Machine-key expiry (epoch ms). Null when keys don't rotate. */
12323
- keyExpiry: number().nullable()
12324
- });
12325
- ({
12326
- methods: {
12327
- /** All registered mesh-network providers + live status. */
12328
- listProviders: method(_void(), array(MeshProviderInfoSchema).readonly()),
12329
- /**
12330
- * Join the mesh of a specific provider. Per-provider config still
12331
- * lives on its settings panel; the orchestrator forwards.
12332
- */
12333
- joinProvider: method(
12334
- object({
12335
- addonId: string(),
12336
- authKey: string().min(8),
12337
- hostname: string().optional()
12338
- }),
12339
- object({ joined: literal(true) }),
12340
- { kind: "mutation" }
12341
- ),
12342
- leaveProvider: method(
12343
- object({ addonId: string() }),
12344
- object({ success: literal(true) }),
12345
- { kind: "mutation" }
12346
- ),
12347
- /**
12348
- * Browser-redirect login flow. Forwards to the named provider's
12349
- * `mesh-network.startLogin` and returns the URL the daemon
12350
- * prints. UI opens it in a new tab, then polls `listProviders`
12351
- * for `joined: true`.
12352
- */
12353
- startLoginProvider: method(
12354
- object({
12355
- addonId: string(),
12356
- hostname: string().optional()
12357
- }),
12358
- object({ loginUrl: string() }),
12359
- { kind: "mutation" }
12360
- ),
12361
- /**
12362
- * Sign out of the provider's account entirely (`mesh-network.logout`).
12363
- * Distinct from `leaveProvider` which only takes the host off-mesh;
12364
- * `logoutProvider` wipes credentials so the next start requires a
12365
- * fresh login.
12366
- */
12367
- logoutProvider: method(
12368
- object({ addonId: string() }),
12369
- object({ loggedOut: literal(true) }),
12370
- { kind: "mutation" }
12371
- ),
12372
- /**
12373
- * Per-provider peer list. Forwards to `mesh-network.listPeers` on
12374
- * the addressed provider. Separate from `listProviders` because
12375
- * peer payloads can be large on a heavily-populated tailnet —
12376
- * fetch only when the operator opens the Peers tab.
12377
- */
12378
- listProviderPeers: method(
12379
- object({ addonId: string() }),
12380
- object({
12381
- peers: array(MeshPeerSchema).readonly()
12382
- })
12383
- )
12384
- }
12385
- });
12386
12161
  const MethodAccessSchema = _enum(["view", "create", "delete"]);
12387
12162
  const AllowedProviderSchema = union([literal("*"), array(string())]);
12388
12163
  const AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
@@ -13252,6 +13027,29 @@ const CustomActionInputSchema = object({
13252
13027
  isActive: boolean()
13253
13028
  })).readonly()
13254
13029
  ),
13030
+ /**
13031
+ * Toggle a single collection-cap provider on/off. Generic write-side
13032
+ * counterpart of `listCapabilityProviders` — drives the per-provider
13033
+ * Enable/Disable affordance in admin pages (TURN servers, etc.)
13034
+ * without needing a bespoke orchestrator cap.
13035
+ *
13036
+ * Reaches the hub's `CapabilityRegistry` directly:
13037
+ * `enableCollectionProvider` / `disableCollectionProvider` flip the
13038
+ * registry-level `disabledProviders` set. `getCollectionEntries`
13039
+ * already filters disabled providers out, so a disabled provider
13040
+ * drops out of every collection aggregate immediately. Only valid
13041
+ * for `mode: 'collection'` caps — the registry no-ops + warns for
13042
+ * singletons.
13043
+ */
13044
+ setCapabilityProviderEnabled: method(
13045
+ object({
13046
+ capName: string().min(1),
13047
+ addonId: string().min(1),
13048
+ enabled: boolean()
13049
+ }),
13050
+ object({ success: literal(true) }),
13051
+ { kind: "mutation", auth: "admin" }
13052
+ ),
13255
13053
  /**
13256
13054
  * Live-update one of the framework packages marked
13257
13055
  * `camstack.system: true` (`@camstack/types|kernel|core|sdk|ui-library`).