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