@camstack/addon-export-hap 0.1.2 → 0.1.4

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 (42) hide show
  1. package/dist/export-hap.addon.js +155 -268
  2. package/dist/export-hap.addon.js.map +1 -1
  3. package/dist/export-hap.addon.mjs +155 -268
  4. package/dist/export-hap.addon.mjs.map +1 -1
  5. package/package.json +3 -29
  6. package/dist/@mf-types/compiled-types/page/HomeKitOverviewPage.d.ts +0 -24
  7. package/dist/@mf-types/compiled-types/page/HomeKitOverviewPage.d.ts.map +0 -1
  8. package/dist/@mf-types/compiled-types/page/page.d.ts +0 -12
  9. package/dist/@mf-types/compiled-types/page/page.d.ts.map +0 -1
  10. package/dist/@mf-types/page.d.ts +0 -2
  11. package/dist/@mf-types.d.ts +0 -3
  12. package/dist/@mf-types.zip +0 -0
  13. package/dist/__mfe_internal__addon_export_hap_page__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.mjs-B7qZNHZC.mjs +0 -12
  14. package/dist/__mfe_internal__addon_export_hap_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-B3wGuKgV.mjs +0 -12
  15. package/dist/__mfe_internal__addon_export_hap_page__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-D4zYQtXk.mjs +0 -73
  16. package/dist/__mfe_internal__addon_export_hap_page__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-DrrRnQpW.mjs +0 -42
  17. package/dist/__mfe_internal__addon_export_hap_page__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-BEeMNLCX.mjs +0 -46
  18. package/dist/__mfe_internal__addon_export_hap_page__loadShare__react__loadShare__.mjs-BPYrKf_3.mjs +0 -56
  19. package/dist/__mfe_internal__addon_export_hap_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-x684zh94.mjs +0 -18
  20. package/dist/__mfe_internal__addon_export_hap_page__loadShare__react_mf_2_dom__loadShare__.mjs-CHMNar3q.mjs +0 -28
  21. package/dist/__mfe_internal__addon_export_hap_page__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-CM8j15CX.mjs +0 -18
  22. package/dist/_stub.js +0 -3223
  23. package/dist/_virtual_mf-localSharedImportMap___mfe_internal__addon_export_hap_page-DtbdD5CL.mjs +0 -156
  24. package/dist/addon-export-hap.css +0 -3
  25. package/dist/browser-i_dCVxwk.mjs +0 -1227
  26. package/dist/client-COVrSAyU.mjs +0 -7592
  27. package/dist/dist-B4EgL9KT.mjs +0 -12922
  28. package/dist/dist-BLWGlNFD.mjs +0 -2483
  29. package/dist/dist-DOK7aZoj.mjs +0 -662
  30. package/dist/dist-DvB1ylHP.mjs +0 -1275
  31. package/dist/dist-RCwIG6iQ.mjs +0 -2229
  32. package/dist/dist-v8qx0EEt.mjs +0 -17192
  33. package/dist/getErrorShape-BPSzUA7W-m6tLWUI0.mjs +0 -189
  34. package/dist/hostInit-CWjIaYbZ.mjs +0 -144
  35. package/dist/jsx-runtime-C-bO5vlp.mjs +0 -22
  36. package/dist/modern-DN59UY0v.mjs +0 -2184
  37. package/dist/react-Bl6eCS2o.mjs +0 -293
  38. package/dist/react-dom-lYY58-MR.mjs +0 -131
  39. package/dist/remoteEntry.js +0 -83
  40. package/dist/rolldown-runtime-DC4cgjXG.mjs +0 -20
  41. package/dist/schemas-DswVYZsq.mjs +0 -3483
  42. package/dist/virtualExposes-Biq8M5a-.mjs +0 -27
@@ -4649,7 +4649,7 @@ function _instanceof(cls, params = {}) {
4649
4649
  return inst;
4650
4650
  }
4651
4651
  //#endregion
4652
- //#region ../types/dist/index-YnRVILXN.mjs
4652
+ //#region ../types/dist/index-CWhQOnm9.mjs
4653
4653
  var MODEL_FORMATS = [
4654
4654
  "onnx",
4655
4655
  "coreml",
@@ -7321,14 +7321,35 @@ var StatusSchema = object({
7321
7321
  embeddedRunning: boolean()
7322
7322
  });
7323
7323
  method(_void(), array(BrokerInfoSchema)), method(IdInputSchema, BrokerConnectionDetailsSchema), method(AddBrokerInputSchema, AddBrokerResultSchema, { kind: "mutation" }), method(IdInputSchema, _void(), { kind: "mutation" }), method(IdInputSchema, TestResultSchema, { kind: "mutation" }), method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, { kind: "mutation" }), method(IdInputSchema, _void(), { kind: "mutation" }), method(_void(), StatusSchema);
7324
+ var LinkStateSchema = _enum([
7325
+ "unlinked",
7326
+ "linked",
7327
+ "error"
7328
+ ]);
7329
+ var ExportSetupFieldSchema = object({
7330
+ label: string(),
7331
+ value: string(),
7332
+ /** Mask the value by default + render a reveal toggle (client id, secrets). */
7333
+ secret: boolean().optional()
7334
+ });
7335
+ var ExportSetupSchema = object({
7336
+ /** A string to render as a scannable QR — HAP `X-HM://…` URI, a pairing URL, etc. Omitted when there's nothing to scan. */
7337
+ qr: string().optional(),
7338
+ /** Label/value rows shown with a copy button (HAP setup code, OAuth URLs, client id, linked-account count, …). */
7339
+ fields: array(ExportSetupFieldSchema).readonly().optional(),
7340
+ /** Free-form operator instructions rendered above the fields. */
7341
+ note: string().optional()
7342
+ });
7324
7343
  var DeviceExportStatusSchema = object({
7325
- linkState: _enum([
7326
- "unlinked",
7327
- "linked",
7328
- "error"
7329
- ]),
7344
+ linkState: LinkStateSchema,
7330
7345
  exposedDeviceCount: number(),
7331
- error: string().optional()
7346
+ error: string().optional(),
7347
+ /**
7348
+ * Optional pairing/account info the panel renders in a generic
7349
+ * "Setup" section. Addon-agnostic — the addon id identifies the
7350
+ * export target, never an `ecosystem` key here.
7351
+ */
7352
+ setup: ExportSetupSchema.optional()
7332
7353
  });
7333
7354
  var DeviceKindSchema = string();
7334
7355
  var ExposedDeviceSchema = object({
@@ -7403,13 +7424,7 @@ var AddonPageDeclarationSchema = object({
7403
7424
  */
7404
7425
  bundle: string()
7405
7426
  });
7406
- var addonPagesSourceCapability = {
7407
- name: "addon-pages-source",
7408
- scope: "system",
7409
- mode: "collection",
7410
- internal: true,
7411
- methods: { listPages: method(_void(), array(AddonPageDeclarationSchema).readonly()) }
7412
- };
7427
+ method(_void(), array(AddonPageDeclarationSchema).readonly());
7413
7428
  var WidgetHostEnum = _enum([
7414
7429
  "device-tab",
7415
7430
  "dashboard",
@@ -8273,42 +8288,6 @@ method(object({
8273
8288
  username: string(),
8274
8289
  password: string()
8275
8290
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
8276
- var AuthProviderInfoSchema = object({
8277
- /** Stable id matching the addon id (used for `getLoginUrl({addonId,…})`). */
8278
- addonId: string(),
8279
- /**
8280
- * Per-instance id when one addon registers multiple "logical"
8281
- * providers (e.g. OIDC with Google + Microsoft + custom). The login
8282
- * URL becomes `/addon/${addonId}/${instanceId}/start` — handler reads
8283
- * `:instanceId` from the route. Empty/unset means the addon is a
8284
- * single-instance provider; the URL is `/addon/${addonId}/start`.
8285
- */
8286
- instanceId: string().optional(),
8287
- /** Display label shown on the login button + admin row. */
8288
- displayName: string(),
8289
- /** Optional iconography hint (lucide-react icon name OR emoji). */
8290
- icon: string().optional(),
8291
- /** When true, the provider exposes a redirect-based login flow
8292
- * (`getLoginUrl` returns a URL the browser navigates to). */
8293
- hasRedirectFlow: boolean(),
8294
- /** When true, the provider exposes a credential-form login flow
8295
- * (`validateCredentials` accepts username + password). */
8296
- hasCredentialFlow: boolean(),
8297
- /** Provider kind, drives admin-UI hint dispatch (oidc / saml / totp / …). */
8298
- kind: string().optional(),
8299
- /** Operator-facing status string (e.g. "Connected to https://login.acme.com"). */
8300
- status: string().optional(),
8301
- /** When false, the provider is registered but disabled by config; the
8302
- * UI surfaces it as inactive without enumerating it for login. */
8303
- enabled: boolean()
8304
- });
8305
- method(_void(), array(AuthProviderInfoSchema).readonly()), method(object({
8306
- addonId: string(),
8307
- enabled: boolean()
8308
- }), object({ success: literal(true) }), {
8309
- kind: "mutation",
8310
- auth: "admin"
8311
- });
8312
8291
  var NetworkEndpointSchema = object({
8313
8292
  url: string(),
8314
8293
  hostname: string(),
@@ -8334,33 +8313,6 @@ var NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
8334
8313
  sourcePort: number().optional()
8335
8314
  });
8336
8315
  method(_void(), NetworkEndpointSchema, { kind: "mutation" }), method(_void(), _void(), { kind: "mutation" }), method(_void(), NetworkEndpointSchema.nullable()), method(_void(), NetworkAccessStatusSchema), method(_void(), array(NetworkEndpointEntrySchema).readonly());
8337
- var RemoteAccessEndpointSchema = object({
8338
- url: string(),
8339
- hostname: string(),
8340
- port: number(),
8341
- protocol: _enum(["http", "https"])
8342
- });
8343
- var RemoteAccessProviderInfoSchema = object({
8344
- /** Stable id matching the addon id. */
8345
- addonId: string(),
8346
- /** Display label shown on the admin row — sourced from the addon manifest. */
8347
- displayName: string(),
8348
- /** When false, the provider is registered but disabled. */
8349
- enabled: boolean(),
8350
- /** True when the underlying tunnel/connection is up. */
8351
- connected: boolean(),
8352
- /** Public-facing endpoint, when connected. Null otherwise. */
8353
- endpoint: RemoteAccessEndpointSchema.nullable(),
8354
- /** Last error message (when connected=false), if available. */
8355
- error: string().optional()
8356
- });
8357
- method(_void(), array(RemoteAccessProviderInfoSchema).readonly()), method(object({ addonId: string() }), RemoteAccessEndpointSchema, {
8358
- kind: "mutation",
8359
- auth: "admin"
8360
- }), method(object({ addonId: string() }), object({ success: literal(true) }), {
8361
- kind: "mutation",
8362
- auth: "admin"
8363
- });
8364
8316
  var TurnServerSchema = object({
8365
8317
  /** Single URL or list of URLs (e.g. "turn:turn.example.com:3478?transport=udp"). */
8366
8318
  urls: union([string(), array(string())]),
@@ -8368,33 +8320,6 @@ var TurnServerSchema = object({
8368
8320
  credential: string().optional()
8369
8321
  });
8370
8322
  method(_void(), array(TurnServerSchema).readonly());
8371
- var TurnProviderInfoSchema = object({
8372
- /** Stable id matching the addon id. */
8373
- addonId: string(),
8374
- /** Display label shown on the admin row — sourced from the addon manifest. */
8375
- displayName: string(),
8376
- /** When false, the provider is registered but disabled. */
8377
- enabled: boolean(),
8378
- /** Number of servers this provider is currently exposing. */
8379
- serverCount: number(),
8380
- /**
8381
- * Flat list of every TURN/STUN URL this provider currently exposes.
8382
- * One row per URL (multi-URL ICE server entries are flattened). The
8383
- * admin UI shows this in a compact per-provider list so operators
8384
- * can verify what's actually being negotiated without having to dig
8385
- * into the combined `getAllServers` output.
8386
- */
8387
- urls: array(string()).readonly(),
8388
- /** Last fetch error (when serverCount=0 due to API failure), if any. */
8389
- error: string().optional()
8390
- });
8391
- method(_void(), array(TurnProviderInfoSchema).readonly()), method(_void(), array(TurnServerSchema).readonly()), method(object({
8392
- addonId: string(),
8393
- enabled: boolean()
8394
- }), object({ success: literal(true) }), {
8395
- kind: "mutation",
8396
- auth: "admin"
8397
- });
8398
8323
  var SnapshotImageSchema = object({
8399
8324
  base64: string(),
8400
8325
  contentType: string()
@@ -9488,7 +9413,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
9488
9413
  * tunnel always emits `https://` regardless. */
9489
9414
  scheme: _enum(["http", "https"]).optional()
9490
9415
  }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
9491
- var MeshEndpointSchema$1 = object({
9416
+ var MeshEndpointSchema = object({
9492
9417
  /** Stable identifier within the provider (e.g. `mesh-ipv4`, `magicdns`, `funnel`). */
9493
9418
  id: string(),
9494
9419
  /** Operator-facing label (e.g. "Mesh IPv4", "MagicDNS"). */
@@ -9565,7 +9490,7 @@ var MeshStatusSchema = object({
9565
9490
  /** Number of peers visible to this host (excluding self). */
9566
9491
  peerCount: number(),
9567
9492
  /** Every endpoint this provider exposes for the current host. */
9568
- endpoints: array(MeshEndpointSchema$1).readonly(),
9493
+ endpoints: array(MeshEndpointSchema).readonly(),
9569
9494
  /** Last error from the daemon, when not joined. */
9570
9495
  error: string().optional(),
9571
9496
  /**
@@ -9597,7 +9522,24 @@ var MeshStatusSchema = object({
9597
9522
  * doesn't rotate keys for the bound host. Operator-facing surface
9598
9523
  * for "your access expires on …" banners.
9599
9524
  */
9600
- keyExpiry: number().nullable()
9525
+ keyExpiry: number().nullable(),
9526
+ /**
9527
+ * When the provider runs its OWN mesh daemon (e.g. the Tailscale
9528
+ * client addon in `onboard` mode spawns a private `tailscaled`),
9529
+ * this carries the local control-socket path. Companion addons that
9530
+ * must drive the SAME daemon — chiefly `tailscale-ingress` for
9531
+ * Serve/Funnel — read it to point their CLI at the right socket
9532
+ * instead of the system default. Empty when the provider uses the
9533
+ * host's system daemon (or doesn't have the concept).
9534
+ */
9535
+ daemonSocket: string().optional(),
9536
+ /**
9537
+ * Path to the mesh CLI binary the provider downloaded for onboard
9538
+ * mode. Companion addons reuse it so they don't need a system
9539
+ * install when the operator chose a fully self-contained mesh.
9540
+ * Empty in host mode.
9541
+ */
9542
+ daemonCliPath: string().optional()
9601
9543
  });
9602
9544
  method(_void(), MeshStatusSchema), method(object({
9603
9545
  /** Provider-specific auth key. For Tailscale this is the
@@ -9623,51 +9565,6 @@ authKey: string().optional() }), object({
9623
9565
  /** Human-readable error when `ok: false`. */
9624
9566
  error: string().optional()
9625
9567
  }), { kind: "mutation" });
9626
- var MeshEndpointSchema = object({
9627
- id: string(),
9628
- label: string(),
9629
- scope: _enum(["mesh", "public"]),
9630
- url: string(),
9631
- hostname: string(),
9632
- port: number(),
9633
- protocol: _enum(["http", "https"])
9634
- });
9635
- var MeshProviderInfoSchema = object({
9636
- /** Stable id matching the addon id. */
9637
- addonId: string(),
9638
- /** Display label shown on the admin row — sourced from the addon manifest. */
9639
- displayName: string(),
9640
- /** True when the host is joined to this provider's mesh. */
9641
- joined: boolean(),
9642
- /** Local mesh IP (empty when not joined). */
9643
- meshIp: string(),
9644
- /** MagicDNS / mesh hostname (empty when not configured). */
9645
- magicDnsHostname: string(),
9646
- /** Peer count (excluding self). */
9647
- peerCount: number(),
9648
- /** Active endpoints (mesh IP + MagicDNS + optional public Funnel). */
9649
- endpoints: array(MeshEndpointSchema).readonly(),
9650
- /** Last error reported by the provider. */
9651
- error: string().optional(),
9652
- /** Tenant / tailnet / network display name. Empty pre-join. */
9653
- tenantName: string(),
9654
- /** Mesh DNS suffix (e.g. tailXXXX.ts.net). Empty when not configured. */
9655
- magicDnsSuffix: string(),
9656
- /** Authenticated user / account login. Null for token-only providers. */
9657
- userLogin: string().nullable(),
9658
- /** Provider control-plane URL. */
9659
- controlPlaneUrl: string(),
9660
- /** Machine-key expiry (epoch ms). Null when keys don't rotate. */
9661
- keyExpiry: number().nullable()
9662
- });
9663
- method(_void(), array(MeshProviderInfoSchema).readonly()), method(object({
9664
- addonId: string(),
9665
- authKey: string().min(8),
9666
- hostname: string().optional()
9667
- }), object({ joined: literal(true) }), { kind: "mutation" }), method(object({ addonId: string() }), object({ success: literal(true) }), { kind: "mutation" }), method(object({
9668
- addonId: string(),
9669
- hostname: string().optional()
9670
- }), object({ loginUrl: string() }), { kind: "mutation" }), method(object({ addonId: string() }), object({ loggedOut: literal(true) }), { kind: "mutation" }), method(object({ addonId: string() }), object({ peers: array(MeshPeerSchema).readonly() }));
9671
9568
  var MethodAccessSchema = _enum([
9672
9569
  "view",
9673
9570
  "create",
@@ -10279,6 +10176,21 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
10279
10176
  var RestartAddonResultSchema = unknown();
10280
10177
  var InstallPackageResultSchema = unknown();
10281
10178
  var ReloadPackagesResultSchema = unknown();
10179
+ var UpdateFrameworkPackageResultSchema = object({
10180
+ packageName: string(),
10181
+ fromVersion: string(),
10182
+ toVersion: string(),
10183
+ /** Ms-epoch the server scheduled its self-restart. */
10184
+ restartingAt: number()
10185
+ });
10186
+ var FrameworkPackageStatusSchema = object({
10187
+ packageName: string(),
10188
+ currentVersion: string(),
10189
+ latestVersion: string().nullable(),
10190
+ hasUpdate: boolean(),
10191
+ /** Optional manifest description for the row tooltip. */
10192
+ description: string().optional()
10193
+ });
10282
10194
  var LogStreamEntrySchema = object({
10283
10195
  timestamp: string(),
10284
10196
  level: string(),
@@ -10310,21 +10222,50 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
10310
10222
  }), method(_void(), ReloadPackagesResultSchema, {
10311
10223
  kind: "mutation",
10312
10224
  auth: "admin"
10313
- }), method(object({ query: string().optional() }), array(SearchResultSchema)), method(_void(), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
10225
+ }), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
10314
10226
  name: string().min(1),
10315
- version: string().optional()
10227
+ version: string().optional(),
10228
+ nodeId: string().optional()
10316
10229
  }), unknown(), {
10317
10230
  kind: "mutation",
10318
10231
  auth: "admin"
10319
10232
  }), method(object({ name: string().min(1) }), object({ rolledBackTo: string().nullable() }), {
10320
10233
  kind: "mutation",
10321
10234
  auth: "admin"
10322
- }), method(_void(), unknown(), {
10235
+ }), method(object({ nodeId: string().optional() }), unknown(), {
10323
10236
  kind: "mutation",
10324
10237
  auth: "admin"
10325
10238
  }), method(object({ confirm: literal(true) }), unknown(), {
10326
10239
  kind: "mutation",
10327
10240
  auth: "admin"
10241
+ }), method(_void(), object({
10242
+ kind: _enum([
10243
+ "framework-update",
10244
+ "manual",
10245
+ "system"
10246
+ ]),
10247
+ packageName: string().optional(),
10248
+ fromVersion: string().optional(),
10249
+ toVersion: string().optional(),
10250
+ requestedBy: string().optional(),
10251
+ requestedAt: number()
10252
+ }).nullable(), { auth: "admin" }), method(_void(), array(FrameworkPackageStatusSchema).readonly(), { auth: "admin" }), method(object({ capName: string().min(1) }), array(object({
10253
+ addonId: string(),
10254
+ mode: _enum(["singleton", "collection"]),
10255
+ isActive: boolean()
10256
+ })).readonly()), method(object({
10257
+ capName: string().min(1),
10258
+ addonId: string().min(1),
10259
+ enabled: boolean()
10260
+ }), object({ success: literal(true) }), {
10261
+ kind: "mutation",
10262
+ auth: "admin"
10263
+ }), method(object({
10264
+ packageName: string().min(1),
10265
+ version: string().optional()
10266
+ }), UpdateFrameworkPackageResultSchema, {
10267
+ kind: "mutation",
10268
+ auth: "admin"
10328
10269
  }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
10329
10270
  kind: "mutation",
10330
10271
  auth: "admin"
@@ -10356,6 +10297,7 @@ var EventCategory = /* @__PURE__ */ ((EventCategory2) => {
10356
10297
  EventCategory2["SystemBoot"] = "system.boot";
10357
10298
  EventCategory2["SystemAddonsReady"] = "system.addons-ready";
10358
10299
  EventCategory2["SystemRestarting"] = "system.restarting";
10300
+ EventCategory2["SystemRestartCompleted"] = "system.restart-completed";
10359
10301
  EventCategory2["SystemReadyState"] = "system.ready-state";
10360
10302
  EventCategory2["AddonStarted"] = "addon.started";
10361
10303
  EventCategory2["AddonStopped"] = "addon.stopped";
@@ -10886,6 +10828,12 @@ Object.freeze({
10886
10828
  addonId: null,
10887
10829
  access: "view"
10888
10830
  },
10831
+ "addons.getLastRestart": {
10832
+ capName: "addons",
10833
+ capScope: "system",
10834
+ addonId: null,
10835
+ access: "view"
10836
+ },
10889
10837
  "addons.getLogs": {
10890
10838
  capName: "addons",
10891
10839
  capScope: "system",
@@ -10922,6 +10870,18 @@ Object.freeze({
10922
10870
  addonId: null,
10923
10871
  access: "view"
10924
10872
  },
10873
+ "addons.listCapabilityProviders": {
10874
+ capName: "addons",
10875
+ capScope: "system",
10876
+ addonId: null,
10877
+ access: "view"
10878
+ },
10879
+ "addons.listFrameworkPackages": {
10880
+ capName: "addons",
10881
+ capScope: "system",
10882
+ addonId: null,
10883
+ access: "view"
10884
+ },
10925
10885
  "addons.listPackages": {
10926
10886
  capName: "addons",
10927
10887
  capScope: "system",
@@ -10994,12 +10954,24 @@ Object.freeze({
10994
10954
  addonId: null,
10995
10955
  access: "create"
10996
10956
  },
10957
+ "addons.setCapabilityProviderEnabled": {
10958
+ capName: "addons",
10959
+ capScope: "system",
10960
+ addonId: null,
10961
+ access: "create"
10962
+ },
10997
10963
  "addons.uninstallPackage": {
10998
10964
  capName: "addons",
10999
10965
  capScope: "system",
11000
10966
  addonId: null,
11001
10967
  access: "delete"
11002
10968
  },
10969
+ "addons.updateFrameworkPackage": {
10970
+ capName: "addons",
10971
+ capScope: "system",
10972
+ addonId: null,
10973
+ access: "create"
10974
+ },
11003
10975
  "addons.updatePackage": {
11004
10976
  capName: "addons",
11005
10977
  capScope: "system",
@@ -11240,18 +11212,6 @@ Object.freeze({
11240
11212
  addonId: null,
11241
11213
  access: "view"
11242
11214
  },
11243
- "authentication.listProviders": {
11244
- capName: "authentication",
11245
- capScope: "system",
11246
- addonId: null,
11247
- access: "view"
11248
- },
11249
- "authentication.setProviderEnabled": {
11250
- capName: "authentication",
11251
- capScope: "system",
11252
- addonId: null,
11253
- access: "create"
11254
- },
11255
11215
  "authProvider.getLoginUrl": {
11256
11216
  capName: "auth-provider",
11257
11217
  capScope: "system",
@@ -12098,42 +12058,6 @@ Object.freeze({
12098
12058
  addonId: null,
12099
12059
  access: "create"
12100
12060
  },
12101
- "meshOrchestrator.joinProvider": {
12102
- capName: "mesh-orchestrator",
12103
- capScope: "system",
12104
- addonId: null,
12105
- access: "create"
12106
- },
12107
- "meshOrchestrator.leaveProvider": {
12108
- capName: "mesh-orchestrator",
12109
- capScope: "system",
12110
- addonId: null,
12111
- access: "create"
12112
- },
12113
- "meshOrchestrator.listProviderPeers": {
12114
- capName: "mesh-orchestrator",
12115
- capScope: "system",
12116
- addonId: null,
12117
- access: "view"
12118
- },
12119
- "meshOrchestrator.listProviders": {
12120
- capName: "mesh-orchestrator",
12121
- capScope: "system",
12122
- addonId: null,
12123
- access: "view"
12124
- },
12125
- "meshOrchestrator.logoutProvider": {
12126
- capName: "mesh-orchestrator",
12127
- capScope: "system",
12128
- addonId: null,
12129
- access: "create"
12130
- },
12131
- "meshOrchestrator.startLoginProvider": {
12132
- capName: "mesh-orchestrator",
12133
- capScope: "system",
12134
- addonId: null,
12135
- access: "create"
12136
- },
12137
12061
  "metricsProvider.collectSnapshot": {
12138
12062
  capName: "metrics-provider",
12139
12063
  capScope: "system",
@@ -13160,24 +13084,6 @@ Object.freeze({
13160
13084
  addonId: null,
13161
13085
  access: "create"
13162
13086
  },
13163
- "remoteAccess.listProviders": {
13164
- capName: "remote-access",
13165
- capScope: "system",
13166
- addonId: null,
13167
- access: "view"
13168
- },
13169
- "remoteAccess.startProvider": {
13170
- capName: "remote-access",
13171
- capScope: "system",
13172
- addonId: null,
13173
- access: "create"
13174
- },
13175
- "remoteAccess.stopProvider": {
13176
- capName: "remote-access",
13177
- capScope: "system",
13178
- addonId: null,
13179
- access: "create"
13180
- },
13181
13087
  "restreamer.getExposedResources": {
13182
13088
  capName: "restreamer",
13183
13089
  capScope: "system",
@@ -13736,24 +13642,6 @@ Object.freeze({
13736
13642
  addonId: null,
13737
13643
  access: "view"
13738
13644
  },
13739
- "turnOrchestrator.getAllServers": {
13740
- capName: "turn-orchestrator",
13741
- capScope: "system",
13742
- addonId: null,
13743
- access: "view"
13744
- },
13745
- "turnOrchestrator.listProviders": {
13746
- capName: "turn-orchestrator",
13747
- capScope: "system",
13748
- addonId: null,
13749
- access: "view"
13750
- },
13751
- "turnOrchestrator.setProviderEnabled": {
13752
- capName: "turn-orchestrator",
13753
- capScope: "system",
13754
- addonId: null,
13755
- access: "create"
13756
- },
13757
13645
  "turnProvider.getTurnServers": {
13758
13646
  capName: "turn-provider",
13759
13647
  capScope: "system",
@@ -71356,20 +71244,6 @@ var DEFAULT_CONFIG = {
71356
71244
  },
71357
71245
  exposed: []
71358
71246
  };
71359
- /**
71360
- * Module-federation page declarations — picked up by the
71361
- * `addon-pages-source` aggregator and surfaced on admin-ui's
71362
- * Integrations page (Configure button) once the federation bundle
71363
- * is built. See `src/page/HomeKitOverviewPage.tsx`.
71364
- */
71365
- var HOMEKIT_OVERVIEW_PAGES = [{
71366
- id: "export-hap",
71367
- label: "HomeKit Export",
71368
- icon: "home",
71369
- path: "/addon/export-hap",
71370
- remoteName: "addon_export_hap_page",
71371
- bundle: "remoteEntry.js"
71372
- }];
71373
71247
  var BANNED_PINCODES = new Set([
71374
71248
  "000-00-000",
71375
71249
  "111-11-111",
@@ -71446,10 +71320,13 @@ var ExportHapAddon = class extends BaseAddon {
71446
71320
  provider: {
71447
71321
  getStatus: async () => {
71448
71322
  const state = this.bridge?.getState() ?? null;
71323
+ const linkState = this.lastError ? "error" : state?.paired ? "linked" : "unlinked";
71324
+ const setup = this.buildSetupBlock();
71449
71325
  return {
71450
- linkState: this.lastError ? "error" : state?.paired ? "linked" : "unlinked",
71326
+ linkState,
71451
71327
  exposedDeviceCount: this.exposed.size,
71452
- ...this.lastError ? { error: this.lastError } : {}
71328
+ ...this.lastError ? { error: this.lastError } : {},
71329
+ ...setup ? { setup } : {}
71453
71330
  };
71454
71331
  },
71455
71332
  listSupportedDeviceKinds: async () => [...SUPPORTED_MAPPER_KINDS],
@@ -71467,12 +71344,6 @@ var ExportHapAddon = class extends BaseAddon {
71467
71344
  getDeviceLiveContribution: async () => null,
71468
71345
  applyDeviceSettingsPatch: (input) => this.applyDeviceSettingsPatch(input.deviceId, input.patch)
71469
71346
  }
71470
- }, {
71471
- capability: addonPagesSourceCapability,
71472
- provider: {
71473
- id: "export-hap",
71474
- listPages: () => HOMEKIT_OVERVIEW_PAGES
71475
- }
71476
71347
  }];
71477
71348
  }
71478
71349
  async onConfigChanged() {
@@ -71516,6 +71387,28 @@ var ExportHapAddon = class extends BaseAddon {
71516
71387
  this.ctx.logger.info("export-hap: generated bridge identity on first boot", { meta: { username: fresh.username } });
71517
71388
  return fresh;
71518
71389
  }
71390
+ /**
71391
+ * Build the generic `device-export` `setup` block surfaced via
71392
+ * `getStatus` and rendered by the shared `DeviceExportPanel`: the
71393
+ * `X-HM://…` setup URI as a scannable QR, the 8-digit setup code as
71394
+ * a copyable field, and a short pairing instruction. Returns `null`
71395
+ * until the bridge has booted and produced both values.
71396
+ */
71397
+ buildSetupBlock() {
71398
+ const state = this.bridge?.getState() ?? null;
71399
+ const setupCode = state?.identity.pincode || this.config.identity.pincode;
71400
+ const setupUri = state?.setupURI ?? "";
71401
+ if (!setupCode) return null;
71402
+ const paired = state?.paired === true;
71403
+ return {
71404
+ ...setupUri ? { qr: setupUri } : {},
71405
+ fields: [{
71406
+ label: "Setup code",
71407
+ value: setupCode
71408
+ }],
71409
+ note: paired ? "This bridge is currently paired. To re-pair, scan the QR in the iOS Home app (+ → Add Accessory) or enter the setup code manually." : "Open the iOS Home app, tap + → Add Accessory, then scan this QR — or enter the setup code manually."
71410
+ };
71411
+ }
71519
71412
  async exposeDevice(deviceId, capabilities) {
71520
71413
  if (this.exposed.has(deviceId)) {
71521
71414
  this.ctx.logger.debug("export-hap: device already exposed — refreshing capabilities", { meta: { deviceId } });
@@ -71609,15 +71502,9 @@ var ExportHapAddon = class extends BaseAddon {
71609
71502
  return this.schema({ sections: [{
71610
71503
  id: "export-hap",
71611
71504
  title: "HomeKit Export",
71612
- description: "Publishes a HomeKit bridge. After the addon boots, open the iOS Home app, tap +, then \"Add Accessory\", then scan the QR code in the addon page (or type the setup code shown there). After pairing, mark individual devices as \"Expose to HomeKit\" on each device's settings page.",
71505
+ description: "Publishes a HomeKit bridge. After the addon boots, scan the pairing QR (or enter the setup code) from the Exported devices panel in the iOS Home app. After pairing, mark individual devices as \"Expose to HomeKit\" on each device's settings page.",
71613
71506
  columns: 1,
71614
71507
  fields: [
71615
- {
71616
- type: "info",
71617
- key: "__pair-instructions",
71618
- label: "Pairing",
71619
- content: "Setup code + QR are surfaced via the \"HomeKit Export\" integration page once the bridge has booted. Changing the bridge name or port requires a restart of the addon — handled automatically when you save."
71620
- },
71621
71508
  this.field({
71622
71509
  type: "text",
71623
71510
  key: "bridgeName",