@camstack/addon-advanced-notifier 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
@@ -10190,51 +10190,6 @@ const AuthResultSchema = object({
10190
10190
  validateToken: method(object({ token: string() }), AuthResultSchema.nullable())
10191
10191
  }
10192
10192
  });
10193
- const AuthProviderInfoSchema = object({
10194
- /** Stable id matching the addon id (used for `getLoginUrl({addonId,…})`). */
10195
- addonId: string(),
10196
- /**
10197
- * Per-instance id when one addon registers multiple "logical"
10198
- * providers (e.g. OIDC with Google + Microsoft + custom). The login
10199
- * URL becomes `/addon/${addonId}/${instanceId}/start` — handler reads
10200
- * `:instanceId` from the route. Empty/unset means the addon is a
10201
- * single-instance provider; the URL is `/addon/${addonId}/start`.
10202
- */
10203
- instanceId: string().optional(),
10204
- /** Display label shown on the login button + admin row. */
10205
- displayName: string(),
10206
- /** Optional iconography hint (lucide-react icon name OR emoji). */
10207
- icon: string().optional(),
10208
- /** When true, the provider exposes a redirect-based login flow
10209
- * (`getLoginUrl` returns a URL the browser navigates to). */
10210
- hasRedirectFlow: boolean(),
10211
- /** When true, the provider exposes a credential-form login flow
10212
- * (`validateCredentials` accepts username + password). */
10213
- hasCredentialFlow: boolean(),
10214
- /** Provider kind, drives admin-UI hint dispatch (oidc / saml / totp / …). */
10215
- kind: string().optional(),
10216
- /** Operator-facing status string (e.g. "Connected to https://login.acme.com"). */
10217
- status: string().optional(),
10218
- /** When false, the provider is registered but disabled by config; the
10219
- * UI surfaces it as inactive without enumerating it for login. */
10220
- enabled: boolean()
10221
- });
10222
- ({
10223
- methods: {
10224
- /** All registered auth providers, both enabled and disabled. */
10225
- listProviders: method(_void(), array(AuthProviderInfoSchema).readonly()),
10226
- /**
10227
- * Toggle a provider's enabled flag. Disabled providers stay
10228
- * registered but aren't surfaced on the login page. The orchestrator
10229
- * persists the state in `addon-settings` so it survives restarts.
10230
- */
10231
- setProviderEnabled: method(
10232
- object({ addonId: string(), enabled: boolean() }),
10233
- object({ success: literal(true) }),
10234
- { kind: "mutation", auth: "admin" }
10235
- )
10236
- }
10237
- });
10238
10193
  const NetworkEndpointSchema = object({
10239
10194
  url: string(),
10240
10195
  hostname: string(),
@@ -10266,55 +10221,13 @@ const NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
10266
10221
  getEndpoint: method(_void(), NetworkEndpointSchema.nullable()),
10267
10222
  getStatus: method(_void(), NetworkAccessStatusSchema),
10268
10223
  /**
10269
- * Enumerate every active ingress entry. Default implementation (when
10270
- * the provider omits this method) is derived from `getEndpoint()` —
10271
- * see the remote-access orchestrator for the fallback path.
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.
10272
10227
  */
10273
10228
  listEndpoints: method(_void(), array(NetworkEndpointEntrySchema).readonly())
10274
10229
  }
10275
10230
  });
10276
- const RemoteAccessEndpointSchema = object({
10277
- url: string(),
10278
- hostname: string(),
10279
- port: number(),
10280
- protocol: _enum(["http", "https"])
10281
- });
10282
- const RemoteAccessProviderInfoSchema = object({
10283
- /** Stable id matching the addon id. */
10284
- addonId: string(),
10285
- /** Display label shown on the admin row — sourced from the addon manifest. */
10286
- displayName: string(),
10287
- /** When false, the provider is registered but disabled. */
10288
- enabled: boolean(),
10289
- /** True when the underlying tunnel/connection is up. */
10290
- connected: boolean(),
10291
- /** Public-facing endpoint, when connected. Null otherwise. */
10292
- endpoint: RemoteAccessEndpointSchema.nullable(),
10293
- /** Last error message (when connected=false), if available. */
10294
- error: string().optional()
10295
- });
10296
- ({
10297
- methods: {
10298
- /** All registered remote-access providers + their live status. */
10299
- listProviders: method(_void(), array(RemoteAccessProviderInfoSchema).readonly()),
10300
- /**
10301
- * Start a specific provider's tunnel. Per-provider config still
10302
- * lives on the addon's settings panel; this is just the on/off
10303
- * trigger so the admin UI can manage the lifecycle from one place.
10304
- */
10305
- startProvider: method(
10306
- object({ addonId: string() }),
10307
- RemoteAccessEndpointSchema,
10308
- { kind: "mutation", auth: "admin" }
10309
- ),
10310
- /** Stop a specific provider's tunnel (idempotent on already-stopped). */
10311
- stopProvider: method(
10312
- object({ addonId: string() }),
10313
- object({ success: literal(true) }),
10314
- { kind: "mutation", auth: "admin" }
10315
- )
10316
- }
10317
- });
10318
10231
  const TurnServerSchema = object({
10319
10232
  /** Single URL or list of URLs (e.g. "turn:turn.example.com:3478?transport=udp"). */
10320
10233
  urls: union([string(), array(string())]),
@@ -10334,45 +10247,6 @@ const TurnServerSchema = object({
10334
10247
  )
10335
10248
  }
10336
10249
  });
10337
- const TurnProviderInfoSchema = object({
10338
- /** Stable id matching the addon id. */
10339
- addonId: string(),
10340
- /** Display label shown on the admin row — sourced from the addon manifest. */
10341
- displayName: string(),
10342
- /** When false, the provider is registered but disabled. */
10343
- enabled: boolean(),
10344
- /** Number of servers this provider is currently exposing. */
10345
- serverCount: number(),
10346
- /**
10347
- * Flat list of every TURN/STUN URL this provider currently exposes.
10348
- * One row per URL (multi-URL ICE server entries are flattened). The
10349
- * admin UI shows this in a compact per-provider list so operators
10350
- * can verify what's actually being negotiated without having to dig
10351
- * into the combined `getAllServers` output.
10352
- */
10353
- urls: array(string()).readonly(),
10354
- /** Last fetch error (when serverCount=0 due to API failure), if any. */
10355
- error: string().optional()
10356
- });
10357
- ({
10358
- methods: {
10359
- /** All registered TURN providers + per-provider stats. */
10360
- listProviders: method(_void(), array(TurnProviderInfoSchema).readonly()),
10361
- /**
10362
- * Combined list of TURN/STUN servers from all ENABLED providers.
10363
- * Consumed by the WebRTC layer at session-creation time —
10364
- * implementations may fetch fresh short-lived credentials each
10365
- * call (e.g. Cloudflare API), so consumers SHOULD call per-session.
10366
- */
10367
- getAllServers: method(_void(), array(TurnServerSchema).readonly()),
10368
- /** Toggle a provider's enabled flag. */
10369
- setProviderEnabled: method(
10370
- object({ addonId: string(), enabled: boolean() }),
10371
- object({ success: literal(true) }),
10372
- { kind: "mutation", auth: "admin" }
10373
- )
10374
- }
10375
- });
10376
10250
  const SnapshotImageSchema = object({
10377
10251
  base64: string(),
10378
10252
  contentType: string()
@@ -11847,7 +11721,7 @@ const AllowedAddressesSchema = object({
11847
11721
  )
11848
11722
  }
11849
11723
  });
11850
- const MeshEndpointSchema$1 = object({
11724
+ const MeshEndpointSchema = object({
11851
11725
  /** Stable identifier within the provider (e.g. `mesh-ipv4`, `magicdns`, `funnel`). */
11852
11726
  id: string(),
11853
11727
  /** Operator-facing label (e.g. "Mesh IPv4", "MagicDNS"). */
@@ -11920,7 +11794,7 @@ const MeshStatusSchema = object({
11920
11794
  /** Number of peers visible to this host (excluding self). */
11921
11795
  peerCount: number(),
11922
11796
  /** Every endpoint this provider exposes for the current host. */
11923
- endpoints: array(MeshEndpointSchema$1).readonly(),
11797
+ endpoints: array(MeshEndpointSchema).readonly(),
11924
11798
  /** Last error from the daemon, when not joined. */
11925
11799
  error: string().optional(),
11926
11800
  // ── Account / tenant identity (generic across providers) ────────
@@ -12083,105 +11957,6 @@ const MeshStatusSchema = object({
12083
11957
  // tabs driven by this cap.
12084
11958
  }
12085
11959
  });
12086
- const MeshEndpointSchema = object({
12087
- id: string(),
12088
- label: string(),
12089
- scope: _enum(["mesh", "public"]),
12090
- url: string(),
12091
- hostname: string(),
12092
- port: number(),
12093
- protocol: _enum(["http", "https"])
12094
- });
12095
- const MeshProviderInfoSchema = object({
12096
- /** Stable id matching the addon id. */
12097
- addonId: string(),
12098
- /** Display label shown on the admin row — sourced from the addon manifest. */
12099
- displayName: string(),
12100
- /** True when the host is joined to this provider's mesh. */
12101
- joined: boolean(),
12102
- /** Local mesh IP (empty when not joined). */
12103
- meshIp: string(),
12104
- /** MagicDNS / mesh hostname (empty when not configured). */
12105
- magicDnsHostname: string(),
12106
- /** Peer count (excluding self). */
12107
- peerCount: number(),
12108
- /** Active endpoints (mesh IP + MagicDNS + optional public Funnel). */
12109
- endpoints: array(MeshEndpointSchema).readonly(),
12110
- /** Last error reported by the provider. */
12111
- error: string().optional(),
12112
- // ── Generic identity fields mirrored from MeshStatus ─────────────
12113
- /** Tenant / tailnet / network display name. Empty pre-join. */
12114
- tenantName: string(),
12115
- /** Mesh DNS suffix (e.g. tailXXXX.ts.net). Empty when not configured. */
12116
- magicDnsSuffix: string(),
12117
- /** Authenticated user / account login. Null for token-only providers. */
12118
- userLogin: string().nullable(),
12119
- /** Provider control-plane URL. */
12120
- controlPlaneUrl: string(),
12121
- /** Machine-key expiry (epoch ms). Null when keys don't rotate. */
12122
- keyExpiry: number().nullable()
12123
- });
12124
- ({
12125
- methods: {
12126
- /** All registered mesh-network providers + live status. */
12127
- listProviders: method(_void(), array(MeshProviderInfoSchema).readonly()),
12128
- /**
12129
- * Join the mesh of a specific provider. Per-provider config still
12130
- * lives on its settings panel; the orchestrator forwards.
12131
- */
12132
- joinProvider: method(
12133
- object({
12134
- addonId: string(),
12135
- authKey: string().min(8),
12136
- hostname: string().optional()
12137
- }),
12138
- object({ joined: literal(true) }),
12139
- { kind: "mutation" }
12140
- ),
12141
- leaveProvider: method(
12142
- object({ addonId: string() }),
12143
- object({ success: literal(true) }),
12144
- { kind: "mutation" }
12145
- ),
12146
- /**
12147
- * Browser-redirect login flow. Forwards to the named provider's
12148
- * `mesh-network.startLogin` and returns the URL the daemon
12149
- * prints. UI opens it in a new tab, then polls `listProviders`
12150
- * for `joined: true`.
12151
- */
12152
- startLoginProvider: method(
12153
- object({
12154
- addonId: string(),
12155
- hostname: string().optional()
12156
- }),
12157
- object({ loginUrl: string() }),
12158
- { kind: "mutation" }
12159
- ),
12160
- /**
12161
- * Sign out of the provider's account entirely (`mesh-network.logout`).
12162
- * Distinct from `leaveProvider` which only takes the host off-mesh;
12163
- * `logoutProvider` wipes credentials so the next start requires a
12164
- * fresh login.
12165
- */
12166
- logoutProvider: method(
12167
- object({ addonId: string() }),
12168
- object({ loggedOut: literal(true) }),
12169
- { kind: "mutation" }
12170
- ),
12171
- /**
12172
- * Per-provider peer list. Forwards to `mesh-network.listPeers` on
12173
- * the addressed provider. Separate from `listProviders` because
12174
- * peer payloads can be large on a heavily-populated tailnet —
12175
- * fetch only when the operator opens the Peers tab.
12176
- */
12177
- listProviderPeers: method(
12178
- object({ addonId: string() }),
12179
- object({
12180
- peers: array(MeshPeerSchema).readonly()
12181
- })
12182
- )
12183
- }
12184
- });
12185
11960
  const MethodAccessSchema = _enum(["view", "create", "delete"]);
12186
11961
  const AllowedProviderSchema = union([literal("*"), array(string())]);
12187
11962
  const AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
@@ -13051,6 +12826,29 @@ const CustomActionInputSchema = object({
13051
12826
  isActive: boolean()
13052
12827
  })).readonly()
13053
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
+ ),
13054
12852
  /**
13055
12853
  * Live-update one of the framework packages marked
13056
12854
  * `camstack.system: true` (`@camstack/types|kernel|core|sdk|ui-library`).