@camstack/server 1.2.943 → 1.2.944

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 (157) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/closure-pins.json +350 -0
  3. package/dist/api/core/auth-sessions.procedures.js +18 -0
  4. package/dist/api/core/auth.router.js +19 -6
  5. package/dist/api/server-upload.js +17 -1
  6. package/dist/api/trpc/generated-cap-routers.js +83 -0
  7. package/dist/auth/native-return.js +9 -3
  8. package/dist/auth/sso-routes.js +5 -1
  9. package/dist/core/addon/instance-lifecycle.js +4 -1
  10. package/dist/core/auth/handoff-code.service.js +35 -1
  11. package/dist/server-root/index.js +313 -70
  12. package/package.json +21 -11
  13. package/system/dist/{action-index-B1fgpQBt.mjs → action-index-DpYmsOKh.mjs} +1 -1
  14. package/system/dist/{action-index-B_cLRwXJ.js → action-index-Dz9rd1qa.js} +1 -1
  15. package/system/dist/{addon-settings.cap-CZ4MC7ha.mjs → addon-settings.cap-CHpmuaQG.mjs} +1 -1
  16. package/system/dist/{addon-settings.cap-DrLdMFIe.js → addon-settings.cap-nZVHPo3X.js} +1 -1
  17. package/system/dist/{alert-episode-Be--PngO.mjs → alert-episode-D-1VUUkZ.mjs} +1 -1
  18. package/system/dist/{alert-episode-Bqktmt-i.js → alert-episode-DaQ3prSe.js} +1 -1
  19. package/system/dist/{base-addon-CRsXtYFG.js → base-addon-BG7p06Hb.js} +136 -15
  20. package/system/dist/{base-addon-BcS6r1cT.mjs → base-addon-BcVoYZbC.mjs} +136 -15
  21. package/system/dist/{base-device-DAdWzDOl.js → base-device-DeSNiwZ4.js} +4 -4
  22. package/system/dist/{base-device-DJXF5eDN.mjs → base-device-w_MD0Bf4.mjs} +4 -4
  23. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  24. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  25. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  26. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  27. package/system/dist/builtins/alerts/alerts.addon.js +3 -3
  28. package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
  29. package/system/dist/builtins/autotrack/index.js +1 -1
  30. package/system/dist/builtins/autotrack/index.mjs +1 -1
  31. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  32. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  33. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  34. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  35. package/system/dist/builtins/camera-grid/index.js +3 -3
  36. package/system/dist/builtins/camera-grid/index.mjs +3 -3
  37. package/system/dist/builtins/composer/composer.addon.js +7 -7
  38. package/system/dist/builtins/composer/composer.addon.mjs +7 -7
  39. package/system/dist/builtins/console-logging/index.js +1 -1
  40. package/system/dist/builtins/console-logging/index.mjs +1 -1
  41. package/system/dist/builtins/core-blocks/actions-store.d.ts +2 -0
  42. package/system/dist/builtins/core-blocks/block-supervisor.d.ts +16 -4
  43. package/system/dist/builtins/core-blocks/core-block-store.d.ts +2 -0
  44. package/system/dist/builtins/core-blocks/core-blocks.addon.js +1018 -323
  45. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +986 -291
  46. package/system/dist/builtins/core-blocks/migrations/index.d.ts +5 -2
  47. package/system/dist/builtins/core-blocks/migrations/tag-ids.d.ts +42 -0
  48. package/system/dist/builtins/core-blocks/migrations/tags-as-records.d.ts +47 -0
  49. package/system/dist/builtins/core-blocks/record-kinds.d.ts +12 -1
  50. package/system/dist/builtins/core-blocks/runs-api.d.ts +3 -1
  51. package/system/dist/builtins/core-blocks/runs-ledger.d.ts +3 -1
  52. package/system/dist/builtins/core-blocks/scheduler/scheduler-store.d.ts +2 -0
  53. package/system/dist/builtins/core-blocks/tags-service.d.ts +52 -27
  54. package/system/dist/builtins/core-blocks/tags-wiring.d.ts +2 -0
  55. package/system/dist/builtins/core-notifier/core-notifier.addon.js +76 -67
  56. package/system/dist/builtins/core-notifier/core-notifier.addon.mjs +76 -67
  57. package/system/dist/builtins/device-history/device-history.addon.js +4 -4
  58. package/system/dist/builtins/device-history/device-history.addon.mjs +4 -4
  59. package/system/dist/builtins/device-manager/device-manager.addon.js +1602 -760
  60. package/system/dist/builtins/device-manager/device-manager.addon.mjs +1588 -746
  61. package/system/dist/builtins/device-manager/device-meta-actions.d.ts +13 -136
  62. package/system/dist/builtins/device-manager/device-meta-types.d.ts +5 -1
  63. package/system/dist/builtins/device-manager/device-provider-context.d.ts +9 -0
  64. package/system/dist/builtins/device-manager/device-row-store.d.ts +21 -4
  65. package/system/dist/builtins/device-manager/device-search.d.ts +6 -0
  66. package/system/dist/builtins/device-manager/location-alignment.d.ts +9 -2
  67. package/system/dist/builtins/device-manager/migrate-device.d.ts +7 -2
  68. package/system/dist/builtins/device-manager/migrate-hardware-state.d.ts +132 -1
  69. package/system/dist/builtins/device-manager/migrations/device-tag-ids.d.ts +25 -0
  70. package/system/dist/builtins/device-manager/migrations/index.d.ts +16 -0
  71. package/system/dist/builtins/device-manager/migrations/orphan-children.d.ts +33 -0
  72. package/system/dist/builtins/device-manager/migrations/ports.d.ts +17 -0
  73. package/system/dist/builtins/device-manager/migrations/rooms-as-records.d.ts +52 -0
  74. package/system/dist/builtins/device-manager/record-kinds.d.ts +3 -1
  75. package/system/dist/builtins/device-manager/removal-cleanup.d.ts +7 -0
  76. package/system/dist/builtins/device-manager/room-actions.d.ts +27 -0
  77. package/system/dist/builtins/device-manager/room-store.d.ts +19 -0
  78. package/system/dist/builtins/device-manager/tag-names.d.ts +32 -0
  79. package/system/dist/builtins/device-manager/wireable-enum-catalog.d.ts +18 -0
  80. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  81. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  82. package/system/dist/builtins/keychain/index.js +2 -2
  83. package/system/dist/builtins/keychain/index.mjs +2 -2
  84. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  85. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  86. package/system/dist/builtins/local-auth/local-auth.addon.js +1 -1
  87. package/system/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  88. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  89. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  90. package/system/dist/builtins/loki-logging/index.js +2 -2
  91. package/system/dist/builtins/loki-logging/index.mjs +2 -2
  92. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  93. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  94. package/system/dist/builtins/platform-probe/index.js +1 -1
  95. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  96. package/system/dist/builtins/record-entries/index.js +1 -1
  97. package/system/dist/builtins/record-entries/index.mjs +1 -1
  98. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  99. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  100. package/system/dist/builtins/snapshot/index.js +1 -1
  101. package/system/dist/builtins/snapshot/index.mjs +1 -1
  102. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  103. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  104. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  105. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  106. package/system/dist/builtins/sqlite-storage/migrations/migration-engine.d.ts +3 -1
  107. package/system/dist/builtins/sqlite-storage/migrations/migrations-provider.d.ts +1 -0
  108. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +15 -10
  109. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +15 -10
  110. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  111. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  112. package/system/dist/builtins/system-config/system-config.addon.js +1 -1
  113. package/system/dist/builtins/system-config/system-config.addon.mjs +1 -1
  114. package/system/dist/builtins/winston-logging/index.js +2 -2
  115. package/system/dist/builtins/winston-logging/index.mjs +2 -2
  116. package/system/dist/{command-catalog-C29hVOOg.js → command-catalog-CI0tu1Nt.js} +1 -1
  117. package/system/dist/{command-catalog-xAeqxbZk.mjs → command-catalog-zwlIA3T5.mjs} +1 -1
  118. package/system/dist/{composition-sources-C327LGFn.mjs → composition-sources-CXxXfh1z.mjs} +1 -1
  119. package/system/dist/{composition-sources-Do5qM6EB.js → composition-sources-DNgSItK-.js} +1 -1
  120. package/system/dist/{core-blocks.cap-CdTGUKtr.js → core-blocks.cap-BHEok4VO.js} +125 -373
  121. package/system/dist/{core-blocks.cap-DLkEfV5b.mjs → core-blocks.cap-CPgZRcpj.mjs} +109 -327
  122. package/system/dist/{device-manager.cap-DJs8izI6.js → device-manager.cap-B9qVf7ag.js} +163 -22
  123. package/system/dist/{device-manager.cap-eYrj1Ezp.mjs → device-manager.cap-CV4KGp3e.mjs} +134 -17
  124. package/system/dist/{error.cap-CU1FB6uE.mjs → error.cap-B8l7L8e4.mjs} +7 -1
  125. package/system/dist/{error.cap-BuKbL3Ac.js → error.cap-BqlvgBJd.js} +7 -1
  126. package/system/dist/file-host-worker.js +1 -1
  127. package/system/dist/file-host-worker.mjs +1 -1
  128. package/system/dist/index.js +7 -7
  129. package/system/dist/index.mjs +6 -6
  130. package/system/dist/{legacy-integration-rows-door-CdqYAj-o.js → legacy-integration-rows-door-BK8eoGlF.js} +1 -1
  131. package/system/dist/{legacy-integration-rows-door-LSgpClpX.mjs → legacy-integration-rows-door-CwzC5XNk.mjs} +1 -1
  132. package/system/dist/{migration-DGAc6ywR.mjs → migration-BvbfW9g-.mjs} +6 -0
  133. package/system/dist/{migration-BOQlFZCN.js → migration-CHPdAdNh.js} +6 -0
  134. package/system/dist/{prefix-walk-BFnw8NBu.js → named-entity-store-DFwLij9c.js} +244 -90
  135. package/system/dist/{prefix-walk-Mtij0NNT.mjs → named-entity-store-DOnyyFFf.mjs} +195 -89
  136. package/system/dist/{notification-rules.cap-BUIuYPlQ.mjs → notification-rules.cap-ClvK6QT1.mjs} +10 -5
  137. package/system/dist/{notification-rules.cap-BJKUjizS.js → notification-rules.cap-uSLoe2pA.js} +10 -5
  138. package/system/dist/{notification-targets-DMW7xgR2.js → notification-targets-ChqpBbtR.js} +2 -2
  139. package/system/dist/{notification-targets-4bGYH5J7.mjs → notification-targets-DUA6-F2t.mjs} +2 -2
  140. package/system/dist/{device-row-store-CTocYKqC.mjs → record-kinds-BD2xv4Pd.mjs} +222 -93
  141. package/system/dist/{device-row-store-C0P2H18h.js → record-kinds-BV8Gcpsx.js} +246 -93
  142. package/system/dist/records/named-entity-store.d.ts +60 -0
  143. package/system/dist/{rename-composition-block-Cdh-dRmY.mjs → rename-composition-block-C3QQ9UUE.mjs} +134 -33
  144. package/system/dist/{rename-composition-block-D9Uc1AF7.js → rename-composition-block-Cx3X8QSm.js} +134 -33
  145. package/system/dist/{retention-source.cap-C6Hy0hlM.js → retention-source.cap-A-TMhU5O.js} +1 -1
  146. package/system/dist/{retention-source.cap-550kkyp5.mjs → retention-source.cap-Ct07pM30.mjs} +1 -1
  147. package/system/dist/{storage-admin.cap-Ci4QbL6P.mjs → storage-admin.cap-C54s9_B9.mjs} +8 -2
  148. package/system/dist/{storage-admin.cap-DqW1ol4j.js → storage-admin.cap-DSPHi7ut.js} +8 -2
  149. package/system/dist/{stream-catalog.cap-CjEQFknc.js → stream-catalog.cap-7WPsugOy.js} +1 -1
  150. package/system/dist/{stream-catalog.cap-DVniDdRD.mjs → stream-catalog.cap-CzwRDaqT.mjs} +1 -1
  151. package/system/dist/{tag-BxLazvVb.js → tag-BLraBqvp.js} +12 -0
  152. package/system/dist/{tag-uZBAq6ox.mjs → tag-DU8pm9Bi.mjs} +7 -1
  153. package/system/dist/time-window-B6UhCArd.js +679 -0
  154. package/system/dist/time-window-BnUBULgu.mjs +578 -0
  155. package/system/dist/{wal-maintenance-BgYiAy5b.js → wal-maintenance-CkPfVApC.js} +0 -0
  156. package/system/dist/{wal-maintenance-Bey5ChBb.mjs → wal-maintenance-u84_1sVl.mjs} +0 -0
  157. package/system/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.944] - 2026-11-24
11
+
12
+ ### Changed
13
+
14
+ - Migrating a device now keeps each number's saved passwords and its room on that number; a pair swapped earlier can be repaired from the admin API.
15
+ - Rooms and tags become records with an id; renaming one edits a single record. Existing rooms, zones and tags are migrated on first start; the old names keep working for one release.
16
+ - A browser handoff can land on the Admin UI, and signing out of the viewer ends the Admin sessions it opened
17
+ - Linked triggers accept an optional device-state limit (only while a device reads a value), so a night derived from a luminosity sensor can gate them.
18
+ - a dev-uploaded closure now installs with npm --before set to its build time, so later npm publishes cannot enter it (#681)
19
+ - A registry update installs every third-party package at the version the release was tested with (closure-pins.json), so a package published after the release can no longer break an update
20
+ - A dev-uploaded closure installs third-party packages at the versions its closure-pins.json lists, so later npm publishes cannot enter it
21
+
22
+ ### Fixed
23
+
24
+ - Addons no longer raise a false 'Database is newer than this version' warning at boot for migrations they declare in a later phase
25
+ - Deleting a device no longer waits on its removal hooks one after the other; they run together, and one that fails is logged and retried without delaying the rest.
26
+ - Deleting an integration reads only that integration's own devices when it claims legacy untagged ones, instead of listing the whole fleet.
27
+ - Deleting a composition releases its claims with one composer apply instead of waiting behind a full block converge pass.
28
+ - A composition deleted while a block converge pass was running is no longer re-applied by that pass.
29
+
10
30
  ## [1.2.943] - 2026-11-23
11
31
 
12
32
  ### Fixed
@@ -0,0 +1,350 @@
1
+ {
2
+ "@babel/runtime": "7.29.7",
3
+ "@colors/colors": "1.6.0",
4
+ "@dabh/diagnostics": "2.0.8",
5
+ "@emnapi/runtime": "1.11.1",
6
+ "@esbuild/aix-ppc64": "0.27.7",
7
+ "@esbuild/android-arm": "0.27.7",
8
+ "@esbuild/android-arm64": "0.27.7",
9
+ "@esbuild/android-x64": "0.27.7",
10
+ "@esbuild/darwin-arm64": "0.27.7",
11
+ "@esbuild/darwin-x64": "0.27.7",
12
+ "@esbuild/freebsd-arm64": "0.27.7",
13
+ "@esbuild/freebsd-x64": "0.27.7",
14
+ "@esbuild/linux-arm": "0.27.7",
15
+ "@esbuild/linux-arm64": "0.27.7",
16
+ "@esbuild/linux-ia32": "0.27.7",
17
+ "@esbuild/linux-loong64": "0.27.7",
18
+ "@esbuild/linux-mips64el": "0.27.7",
19
+ "@esbuild/linux-ppc64": "0.27.7",
20
+ "@esbuild/linux-riscv64": "0.27.7",
21
+ "@esbuild/linux-s390x": "0.27.7",
22
+ "@esbuild/linux-x64": "0.27.7",
23
+ "@esbuild/netbsd-arm64": "0.27.7",
24
+ "@esbuild/netbsd-x64": "0.27.7",
25
+ "@esbuild/openbsd-arm64": "0.27.7",
26
+ "@esbuild/openbsd-x64": "0.27.7",
27
+ "@esbuild/openharmony-arm64": "0.27.7",
28
+ "@esbuild/sunos-x64": "0.27.7",
29
+ "@esbuild/win32-arm64": "0.27.7",
30
+ "@esbuild/win32-ia32": "0.27.7",
31
+ "@esbuild/win32-x64": "0.27.7",
32
+ "@eshaz/web-worker": "1.2.2",
33
+ "@fastify/accept-negotiator": "2.0.1",
34
+ "@fastify/ajv-compiler": "4.0.5",
35
+ "@fastify/busboy": "3.2.0",
36
+ "@fastify/compress": "9.0.0",
37
+ "@fastify/cookie": "11.0.2",
38
+ "@fastify/cors": "11.2.0",
39
+ "@fastify/deepmerge": "3.2.1",
40
+ "@fastify/error": "4.2.0",
41
+ "@fastify/fast-json-stringify-compiler": "5.0.3",
42
+ "@fastify/forwarded": "3.0.1",
43
+ "@fastify/merge-json-schemas": "0.2.1",
44
+ "@fastify/multipart": "10.0.0",
45
+ "@fastify/proxy-addr": "5.1.0",
46
+ "@fastify/send": "4.1.0",
47
+ "@fastify/static": "9.1.3",
48
+ "@fidm/asn1": "1.0.4",
49
+ "@fidm/x509": "1.2.1",
50
+ "@hexagon/base64": "1.1.28",
51
+ "@img/colour": "1.1.0",
52
+ "@img/sharp-darwin-arm64": "0.35.2",
53
+ "@img/sharp-darwin-x64": "0.35.2",
54
+ "@img/sharp-freebsd-wasm32": "0.35.2",
55
+ "@img/sharp-libvips-darwin-arm64": "1.3.1",
56
+ "@img/sharp-libvips-darwin-x64": "1.3.1",
57
+ "@img/sharp-libvips-linux-arm": "1.3.1",
58
+ "@img/sharp-libvips-linux-arm64": "1.3.1",
59
+ "@img/sharp-libvips-linux-ppc64": "1.3.1",
60
+ "@img/sharp-libvips-linux-riscv64": "1.3.1",
61
+ "@img/sharp-libvips-linux-s390x": "1.3.1",
62
+ "@img/sharp-libvips-linux-x64": "1.3.1",
63
+ "@img/sharp-libvips-linuxmusl-arm64": "1.3.1",
64
+ "@img/sharp-libvips-linuxmusl-x64": "1.3.1",
65
+ "@img/sharp-linux-arm": "0.35.2",
66
+ "@img/sharp-linux-arm64": "0.35.2",
67
+ "@img/sharp-linux-ppc64": "0.35.2",
68
+ "@img/sharp-linux-riscv64": "0.35.2",
69
+ "@img/sharp-linux-s390x": "0.35.2",
70
+ "@img/sharp-linux-x64": "0.35.2",
71
+ "@img/sharp-linuxmusl-arm64": "0.35.2",
72
+ "@img/sharp-linuxmusl-x64": "0.35.2",
73
+ "@img/sharp-wasm32": "0.35.2",
74
+ "@img/sharp-webcontainers-wasm32": "0.35.2",
75
+ "@img/sharp-win32-arm64": "0.35.2",
76
+ "@img/sharp-win32-ia32": "0.35.2",
77
+ "@img/sharp-win32-x64": "0.35.2",
78
+ "@isaacs/fs-minipass": "4.0.1",
79
+ "@leichtgewicht/ip-codec": "2.0.5",
80
+ "@levischuck/tiny-cbor": "0.2.11",
81
+ "@lukeed/ms": "2.0.2",
82
+ "@minhducsun2002/leb128": "1.0.0",
83
+ "@msgpack/msgpack": "3.1.3",
84
+ "@noble/curves": "1.9.7",
85
+ "@otplib/core": "13.4.1",
86
+ "@otplib/hotp": "13.4.1",
87
+ "@otplib/plugin-base32-scure": "13.4.1",
88
+ "@otplib/plugin-crypto-noble": "13.4.1",
89
+ "@otplib/totp": "13.4.1",
90
+ "@otplib/uri": "13.4.1",
91
+ "@peculiar/asn1-android": "2.8.0",
92
+ "@peculiar/asn1-cms": "2.8.0",
93
+ "@peculiar/asn1-csr": "2.8.0",
94
+ "@peculiar/asn1-ecc": "2.8.0",
95
+ "@peculiar/asn1-pfx": "2.8.0",
96
+ "@peculiar/asn1-pkcs8": "2.8.0",
97
+ "@peculiar/asn1-pkcs9": "2.8.0",
98
+ "@peculiar/asn1-rsa": "2.8.0",
99
+ "@peculiar/asn1-schema": "2.8.0",
100
+ "@peculiar/asn1-x509": "2.8.0",
101
+ "@peculiar/asn1-x509-attr": "2.8.0",
102
+ "@peculiar/utils": "2.0.3",
103
+ "@peculiar/x509": "1.14.3",
104
+ "@pinojs/redact": "0.4.0",
105
+ "@scure/base": "2.2.0",
106
+ "@seydx/node-av-darwin-arm64": "6.1.0",
107
+ "@seydx/node-av-darwin-x64": "6.1.0",
108
+ "@seydx/node-av-linux-arm64": "6.1.0",
109
+ "@seydx/node-av-linux-x64": "6.1.0",
110
+ "@seydx/node-av-win32-arm64-mingw": "6.1.0",
111
+ "@seydx/node-av-win32-arm64-msvc": "6.1.0",
112
+ "@seydx/node-av-win32-x64-mingw": "6.1.0",
113
+ "@seydx/node-av-win32-x64-msvc": "6.1.0",
114
+ "@shinyoshiaki/binary-data": "0.6.1",
115
+ "@shinyoshiaki/jspack": "0.0.6",
116
+ "@simplewebauthn/browser": "11.0.0",
117
+ "@simplewebauthn/server": "11.0.0",
118
+ "@simplewebauthn/types": "11.0.0",
119
+ "@so-ric/colorspace": "1.1.6",
120
+ "@tanstack/query-core": "5.101.0",
121
+ "@tanstack/react-query": "5.101.0",
122
+ "@trpc/client": "11.18.0",
123
+ "@trpc/server": "11.18.0",
124
+ "@types/triple-beam": "1.3.5",
125
+ "@wasm-audio-decoders/common": "9.0.7",
126
+ "abort-controller": "3.0.0",
127
+ "abstract-logging": "2.0.1",
128
+ "aes-js": "3.1.2",
129
+ "ajv": "8.20.0",
130
+ "ajv-formats": "3.0.1",
131
+ "ansi-styles": "3.2.1",
132
+ "args": "5.0.3",
133
+ "asn1": "0.2.6",
134
+ "asn1js": "3.0.10",
135
+ "async": "3.2.6",
136
+ "atomic-sleep": "1.0.0",
137
+ "avvio": "9.2.0",
138
+ "balanced-match": "4.0.4",
139
+ "base64-js": "1.5.1",
140
+ "bcrypt-pbkdf": "1.0.2",
141
+ "bcryptjs": "3.0.3",
142
+ "better-sqlite3": "12.11.1",
143
+ "bindings": "1.5.0",
144
+ "bl": "4.1.0",
145
+ "bluebird": "3.7.2",
146
+ "brace-expansion": "5.0.7",
147
+ "buffer-crc32": "1.0.0",
148
+ "buffer-equal-constant-time": "1.0.1",
149
+ "buffer-from": "1.1.2",
150
+ "buildcheck": "0.0.7",
151
+ "camelcase": "5.0.0",
152
+ "chalk": "2.4.2",
153
+ "color": "5.0.3",
154
+ "color-string": "2.1.4",
155
+ "content-disposition": "1.1.0",
156
+ "cookie": "1.1.1",
157
+ "copy-anything": "4.0.5",
158
+ "core-util-is": "1.0.3",
159
+ "cpu-features": "0.0.10",
160
+ "croner": "10.0.1",
161
+ "cross-fetch": "4.1.0",
162
+ "date-fns": "2.30.0",
163
+ "decompress-response": "6.0.0",
164
+ "deep-extend": "0.6.0",
165
+ "depd": "2.0.0",
166
+ "dequal": "2.0.3",
167
+ "detect-libc": "2.1.2",
168
+ "dns-packet": "5.6.1",
169
+ "duplexer2": "0.1.4",
170
+ "duplexify": "3.7.1",
171
+ "ecdsa-sig-formatter": "1.0.11",
172
+ "enabled": "2.0.0",
173
+ "end-of-stream": "1.4.5",
174
+ "esbuild": "0.27.7",
175
+ "escape-html": "1.0.3",
176
+ "escape-string-regexp": "1.0.5",
177
+ "event-target-shim": "5.0.1",
178
+ "eventemitter2": "6.4.9",
179
+ "events": "3.3.0",
180
+ "expand-template": "2.0.3",
181
+ "fast-decode-uri-component": "1.0.1",
182
+ "fast-deep-equal": "3.1.3",
183
+ "fast-json-stringify": "6.4.0",
184
+ "fast-querystring": "1.1.2",
185
+ "fast-uri": "3.1.2",
186
+ "fastest-validator": "1.19.1",
187
+ "fastify": "5.8.5",
188
+ "fastify-plugin": "5.1.0",
189
+ "fastq": "1.20.1",
190
+ "fecha": "4.2.3",
191
+ "file-stream-rotator": "0.6.1",
192
+ "file-uri-to-path": "1.0.0",
193
+ "find-my-way": "9.6.0",
194
+ "fn.name": "1.1.0",
195
+ "fs-constants": "1.0.0",
196
+ "fs-extra": "11.3.1",
197
+ "generate-function": "2.3.1",
198
+ "github-from-package": "0.0.0",
199
+ "glob": "13.0.6",
200
+ "graceful-fs": "4.2.11",
201
+ "has-flag": "3.0.0",
202
+ "http-errors": "2.0.1",
203
+ "ieee754": "1.2.1",
204
+ "inherits": "2.0.4",
205
+ "ini": "1.3.8",
206
+ "int64-buffer": "1.1.0",
207
+ "ip": "2.0.1",
208
+ "ipaddr.js": "2.4.0",
209
+ "is-plain-object": "2.0.4",
210
+ "is-property": "1.0.2",
211
+ "is-stream": "2.0.1",
212
+ "is-what": "5.5.0",
213
+ "isarray": "1.0.0",
214
+ "isobject": "3.0.1",
215
+ "jose": "6.2.12",
216
+ "json-schema-ref-resolver": "3.0.0",
217
+ "json-schema-traverse": "1.0.0",
218
+ "jsonfile": "6.2.1",
219
+ "jsonwebtoken": "9.0.3",
220
+ "jwa": "2.0.1",
221
+ "jws": "4.0.1",
222
+ "kleur": "4.1.5",
223
+ "kuler": "2.0.0",
224
+ "leven": "2.1.0",
225
+ "light-my-request": "6.6.0",
226
+ "lodash": "4.18.1",
227
+ "lodash.includes": "4.3.0",
228
+ "lodash.isboolean": "3.0.3",
229
+ "lodash.isinteger": "4.0.4",
230
+ "lodash.isnumber": "3.0.3",
231
+ "lodash.isplainobject": "4.0.6",
232
+ "lodash.isstring": "4.0.1",
233
+ "lodash.once": "4.1.1",
234
+ "logform": "2.7.0",
235
+ "lru-cache": "11.5.1",
236
+ "mime": "3.0.0",
237
+ "mime-db": "1.52.0",
238
+ "mimic-response": "3.1.0",
239
+ "minimatch": "10.2.5",
240
+ "minimist": "1.2.8",
241
+ "minipass": "7.1.3",
242
+ "minizlib": "3.1.0",
243
+ "mkdirp-classic": "0.5.3",
244
+ "moleculer": "0.15.0",
245
+ "moment": "2.30.1",
246
+ "mp4box": "0.5.4",
247
+ "mri": "1.1.4",
248
+ "ms": "2.1.3",
249
+ "multicast-dns": "7.2.5",
250
+ "nan": "2.27.0",
251
+ "napi-build-utils": "2.0.0",
252
+ "node-abi": "3.92.0",
253
+ "node-addon-api": "7.1.1",
254
+ "node-av": "6.1.0",
255
+ "node-fetch": "2.7.0",
256
+ "node-int64": "0.4.0",
257
+ "node-pty": "1.1.0",
258
+ "object-hash": "3.0.0",
259
+ "on-exit-leak-free": "2.1.2",
260
+ "once": "1.4.0",
261
+ "one-time": "1.0.0",
262
+ "opus-decoder": "0.7.11",
263
+ "otplib": "13.4.1",
264
+ "p-cancelable": "2.1.1",
265
+ "path-scurry": "2.0.2",
266
+ "peek-stream": "1.1.3",
267
+ "pino": "10.3.1",
268
+ "pino-abstract-transport": "3.0.0",
269
+ "pino-std-serializers": "7.1.0",
270
+ "prebuild-install": "7.1.3",
271
+ "process": "0.11.10",
272
+ "process-nextick-args": "2.0.1",
273
+ "pump": "3.0.4",
274
+ "pvtsutils": "1.3.6",
275
+ "pvutils": "1.1.5",
276
+ "quick-format-unescaped": "4.0.4",
277
+ "rc": "1.2.8",
278
+ "react": "19.2.7",
279
+ "react-dom": "19.2.7",
280
+ "recursive-watch": "1.1.4",
281
+ "reflect-metadata": "0.2.2",
282
+ "require-from-string": "2.0.2",
283
+ "ret": "0.5.0",
284
+ "reusify": "1.1.0",
285
+ "rfdc": "1.4.1",
286
+ "rx.mini": "1.4.0",
287
+ "safe-regex2": "5.1.1",
288
+ "safe-stable-stringify": "2.5.0",
289
+ "safer-buffer": "2.1.2",
290
+ "scheduler": "0.27.0",
291
+ "secure-json-parse": "4.1.0",
292
+ "semver": "7.8.5",
293
+ "set-cookie-parser": "2.7.2",
294
+ "setprototypeof": "1.2.0",
295
+ "sharp": "0.35.2",
296
+ "simple-concat": "1.0.1",
297
+ "simple-get": "4.0.1",
298
+ "simple-yenc": "1.0.4",
299
+ "sonic-boom": "4.2.1",
300
+ "split2": "4.2.0",
301
+ "sqlite-vec": "0.1.9",
302
+ "sqlite-vec-darwin-arm64": "0.1.9",
303
+ "sqlite-vec-darwin-x64": "0.1.9",
304
+ "sqlite-vec-linux-arm64": "0.1.9",
305
+ "sqlite-vec-linux-x64": "0.1.9",
306
+ "sqlite-vec-windows-x64": "0.1.9",
307
+ "ssh2": "1.17.0",
308
+ "stack-trace": "0.0.10",
309
+ "statuses": "2.0.2",
310
+ "stream-shift": "1.0.3",
311
+ "strip-json-comments": "2.0.1",
312
+ "superjson": "2.2.6",
313
+ "supports-color": "5.5.0",
314
+ "systeminformation": "5.31.7",
315
+ "tailwindcss": "4.3.1",
316
+ "tar": "7.5.16",
317
+ "tar-fs": "2.1.4",
318
+ "tar-stream": "2.2.0",
319
+ "text-hex": "1.0.0",
320
+ "thread-stream": "4.2.0",
321
+ "through2": "2.0.5",
322
+ "thunky": "1.1.0",
323
+ "toad-cache": "3.7.1",
324
+ "toidentifier": "1.0.1",
325
+ "tr46": "0.0.3",
326
+ "triple-beam": "1.4.1",
327
+ "tsyringe": "4.10.0",
328
+ "ttl": "1.3.1",
329
+ "tunnel-agent": "0.6.0",
330
+ "typescript": "6.0.3",
331
+ "undici": "7.28.0",
332
+ "universalify": "2.0.1",
333
+ "unzipper": "0.12.5",
334
+ "util-deprecate": "1.0.2",
335
+ "webidl-conversions": "3.0.1",
336
+ "werift-common": "0.0.3",
337
+ "werift-dtls": "0.5.7",
338
+ "werift-ice": "0.2.2",
339
+ "werift-rtp": "0.8.8",
340
+ "werift-sctp": "0.0.11",
341
+ "whatwg-url": "5.0.0",
342
+ "winston": "3.19.0",
343
+ "winston-daily-rotate-file": "5.0.0",
344
+ "winston-transport": "4.9.0",
345
+ "wrappy": "1.0.2",
346
+ "ws": "8.21.0",
347
+ "xtend": "4.0.2",
348
+ "yallist": "5.0.0",
349
+ "zod": "4.4.3"
350
+ }
@@ -136,10 +136,28 @@ function createSessionProcedures(deps) {
136
136
  const revoked = await sessions.revokeAllForUser(ctx.user.id, {
137
137
  reason: 'logout-everywhere',
138
138
  });
139
+ // Every session of the user is gone, children included: forget the tie.
140
+ if (ctx.user.sessionId !== undefined)
141
+ deps.handoffs?.takeChildSessions(ctx.user.sessionId);
139
142
  return { success: true, revoked };
140
143
  }
141
144
  const sessionId = ctx.user.sessionId;
145
+ // The caller's own session goes FIRST: nothing below may keep the user signed in.
142
146
  const revoked = sessionId === undefined ? false : await sessions.revoke(sessionId, 'logout');
147
+ // The Admin sessions it opened through a browser handoff end with it, each isolated.
148
+ if (sessionId !== undefined) {
149
+ for (const child of deps.handoffs?.takeChildSessions(sessionId) ?? []) {
150
+ try {
151
+ await sessions.revoke(child, 'logout');
152
+ }
153
+ catch (error) {
154
+ deps.logger?.warn('Logout could not revoke a handoff child session', {
155
+ tags: { userId: ctx.user.id },
156
+ meta: { error: error instanceof Error ? error.message : String(error) },
157
+ });
158
+ }
159
+ }
160
+ }
143
161
  return { success: true, revoked: revoked ? 1 : 0 };
144
162
  }),
145
163
  /** The caller's live sessions, newest first; `current` marks this one. */
@@ -1158,7 +1158,13 @@ function createAuthRouter(auth, registry, moleculer = null, handoffCodes = new h
1158
1158
  enabled: input.enabled,
1159
1159
  });
1160
1160
  }),
1161
- ...(0, auth_sessions_procedures_js_1.createSessionProcedures)({ registry, minter, credentialProcedure }),
1161
+ ...(0, auth_sessions_procedures_js_1.createSessionProcedures)({
1162
+ registry,
1163
+ minter,
1164
+ credentialProcedure,
1165
+ ...(nativeLink !== null ? { handoffs: nativeLink.browserHandoffs } : {}),
1166
+ ...(options.logger !== undefined ? { logger: options.logger } : {}),
1167
+ }),
1162
1168
  ...(0, auth_cli_login_procedures_js_1.createCliLoginProcedures)({
1163
1169
  cliApprovals: options.cliApprovals ?? cliApprovals,
1164
1170
  beginProcedure: credentialProcedure,
@@ -1283,13 +1289,14 @@ function createAuthRouter(auth, registry, moleculer = null, handoffCodes = new h
1283
1289
  /**
1284
1290
  * A one-time code that opens the hub's account page signed in as the
1285
1291
  * caller, in a browser (D801) — for what only a browser can do at the
1286
- * hub's origin: a passkey's WebAuthn ceremony. Single-use, 60 s, and it
1287
- * lands on that page only: the route takes no destination.
1292
+ * hub's origin: a passkey's WebAuthn ceremony. Single-use, 60 s. It lands
1293
+ * on the account page, or — `destination: 'admin'`, the viewer's Admin
1294
+ * app (D1094) — on the admin UI's root; no other destination exists.
1288
1295
  */
1289
1296
  createBrowserHandoff: selfCodeProcedure
1290
- .input(zod_1.z.void())
1297
+ .input(zod_1.z.object({ destination: zod_1.z.enum(['account', 'admin']).optional() }).optional())
1291
1298
  .output(zod_1.z.object({ path: zod_1.z.string(), expiresAt: zod_1.z.number() }))
1292
- .mutation(({ ctx }) => {
1299
+ .mutation(({ ctx, input }) => {
1293
1300
  if (!ctx.user)
1294
1301
  throw new server_1.TRPCError({ code: 'UNAUTHORIZED' });
1295
1302
  assertRealUserSession(ctx.user, 'Opening the account page in a browser');
@@ -1300,11 +1307,17 @@ function createAuthRouter(auth, registry, moleculer = null, handoffCodes = new h
1300
1307
  });
1301
1308
  }
1302
1309
  const parentCredential = credentialOfSession(ctx.user.sessionId);
1310
+ const destination = input?.destination ?? 'account';
1303
1311
  const { code, expiresAt } = nativeLink.browserHandoffs.create(ctx.user.id, {
1304
1312
  purpose: 'new-session',
1313
+ ...(ctx.user.sessionId !== undefined ? { sessionId: ctx.user.sessionId } : {}),
1305
1314
  ...(parentCredential !== undefined ? { credentialId: parentCredential } : {}),
1306
1315
  });
1307
- return { path: `${exports.BROWSER_HANDOFF_PATH}?code=${encodeURIComponent(code)}`, expiresAt };
1316
+ const query = new URLSearchParams({
1317
+ code,
1318
+ ...(destination === 'admin' ? { destination } : {}),
1319
+ });
1320
+ return { path: `${exports.BROWSER_HANDOFF_PATH}?${query.toString()}`, expiresAt };
1308
1321
  }),
1309
1322
  /** The caller's linked identities; `available: false` when the provider instance is gone or off. */
1310
1323
  listOwnExternalIdentities: trpc_middleware_js_1.protectedProcedure
@@ -126,6 +126,13 @@ function validateTarballSet(files, version) {
126
126
  }
127
127
  return validated;
128
128
  }
129
+ /** The CLI's closure build time (epoch ms); anything else is treated as absent. */
130
+ function parseBuildTimeMs(raw) {
131
+ if (raw === null)
132
+ return null;
133
+ const value = Number(raw);
134
+ return Number.isFinite(value) && value > 0 ? value : null;
135
+ }
129
136
  function registerServerUploadRoute(fastify, options) {
130
137
  const { authService, addonRegistry, logger } = options;
131
138
  fastify.post('/api/server-upload', async (request, reply) => {
@@ -140,6 +147,7 @@ function registerServerUploadRoute(fastify, options) {
140
147
  // Drain the multipart stream first (files can precede or follow the
141
148
  // version field), then validate the whole set before touching disk.
142
149
  let version = null;
150
+ let buildTimeRaw = null;
143
151
  const files = [];
144
152
  for await (const part of request.parts()) {
145
153
  if (part.type === 'file') {
@@ -148,6 +156,9 @@ function registerServerUploadRoute(fastify, options) {
148
156
  else if (part.fieldname === 'version' && typeof part.value === 'string') {
149
157
  version = part.value;
150
158
  }
159
+ else if (part.fieldname === 'buildTime' && typeof part.value === 'string') {
160
+ buildTimeRaw = part.value;
161
+ }
151
162
  }
152
163
  if (version === null || version.length === 0) {
153
164
  return reply.status(400).send({ error: 'Missing "version" field' });
@@ -175,7 +186,12 @@ function registerServerUploadRoute(fastify, options) {
175
186
  fs.writeFileSync(path.join(versionDir, tgzName), pkg.buffer);
176
187
  packages[pkg.name] = tgzName;
177
188
  }
178
- (0, index_js_1.writeDevUploadManifest)(versionDir, { version, packages });
189
+ const buildTimeMs = parseBuildTimeMs(buildTimeRaw);
190
+ (0, index_js_1.writeDevUploadManifest)(versionDir, {
191
+ version,
192
+ packages,
193
+ ...(buildTimeMs === null ? {} : { buildTimeMs }),
194
+ });
179
195
  logger.info('server-upload stored dev closure', {
180
196
  meta: { version, packages: Object.keys(packages), dir: versionDir },
181
197
  });
@@ -3485,6 +3485,16 @@ function createCapRouter_deviceManager(getProvider, createRemoteProxy) {
3485
3485
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
3486
3486
  return p.migrateDevice(methodInput);
3487
3487
  }),
3488
+ repairMigrationSecrets: trpc_middleware_js_1.adminProcedure
3489
+ .input(types_52.deviceManagerCapability.methods.repairMigrationSecrets.input.loose())
3490
+ .output(types_52.deviceManagerCapability.methods.repairMigrationSecrets.output)
3491
+ .mutation(async ({ input, ctx }) => {
3492
+ const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
3493
+ const { nodeId, ...methodInput } = parsedInput;
3494
+ const p = resolveProvider('device-manager', nodeId, () => getProvider(ctx), createRemoteProxy);
3495
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
3496
+ return p.repairMigrationSecrets(methodInput);
3497
+ }),
3488
3498
  registerDevice: trpc_middleware_js_1.protectedProcedure
3489
3499
  .input(types_52.deviceManagerCapability.methods.registerDevice.input.loose())
3490
3500
  .output(types_52.deviceManagerCapability.methods.registerDevice.output)
@@ -3815,6 +3825,43 @@ function createCapRouter_deviceManager(getProvider, createRemoteProxy) {
3815
3825
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
3816
3826
  return p.relinkIdentity(methodInput);
3817
3827
  }),
3828
+ ensureRoom: trpc_middleware_js_1.adminProcedure
3829
+ .input(types_52.deviceManagerCapability.methods.ensureRoom.input.loose())
3830
+ .output(types_52.deviceManagerCapability.methods.ensureRoom.output)
3831
+ .mutation(async ({ input, ctx }) => {
3832
+ const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
3833
+ const { nodeId, ...methodInput } = parsedInput;
3834
+ const p = resolveProvider('device-manager', nodeId, () => getProvider(ctx), createRemoteProxy);
3835
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
3836
+ return p.ensureRoom(methodInput);
3837
+ }),
3838
+ listRooms: trpc_middleware_js_1.protectedProcedure
3839
+ .input(zod_1.z.object({ nodeId: zod_1.z.string().optional() }).optional())
3840
+ .output(types_52.deviceManagerCapability.methods.listRooms.output)
3841
+ .query(async ({ input, ctx }) => {
3842
+ const p = resolveProvider('device-manager', input?.nodeId, () => getProvider(ctx), createRemoteProxy);
3843
+ return p.listRooms();
3844
+ }),
3845
+ updateRoom: trpc_middleware_js_1.adminProcedure
3846
+ .input(types_52.deviceManagerCapability.methods.updateRoom.input.loose())
3847
+ .output(types_52.deviceManagerCapability.methods.updateRoom.output)
3848
+ .mutation(async ({ input, ctx }) => {
3849
+ const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
3850
+ const { nodeId, ...methodInput } = parsedInput;
3851
+ const p = resolveProvider('device-manager', nodeId, () => getProvider(ctx), createRemoteProxy);
3852
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
3853
+ return p.updateRoom(methodInput);
3854
+ }),
3855
+ deleteRoom: trpc_middleware_js_1.adminProcedure
3856
+ .input(types_52.deviceManagerCapability.methods.deleteRoom.input.loose())
3857
+ .output(types_52.deviceManagerCapability.methods.deleteRoom.output)
3858
+ .mutation(async ({ input, ctx }) => {
3859
+ const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
3860
+ const { nodeId, ...methodInput } = parsedInput;
3861
+ const p = resolveProvider('device-manager', nodeId, () => getProvider(ctx), createRemoteProxy);
3862
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
3863
+ return p.deleteRoom(methodInput);
3864
+ }),
3818
3865
  listLocations: trpc_middleware_js_1.protectedProcedure
3819
3866
  .input(zod_1.z.object({ nodeId: zod_1.z.string().optional() }).optional())
3820
3867
  .output(types_52.deviceManagerCapability.methods.listLocations.output)
@@ -13838,6 +13885,42 @@ function createCapRouter_system(getProvider, createRemoteProxy) {
13838
13885
  }
13839
13886
  function createCapRouter_tags(getProvider, createRemoteProxy) {
13840
13887
  return (0, trpc_middleware_js_1.trpcRouter)({
13888
+ ensureTag: trpc_middleware_js_1.adminProcedure
13889
+ .input(types_159.tagsCapability.methods.ensureTag.input.loose())
13890
+ .output(types_159.tagsCapability.methods.ensureTag.output)
13891
+ .mutation(async ({ input, ctx }) => {
13892
+ const { nodeId, ...methodInput } = input;
13893
+ const p = resolveProvider('tags', nodeId, () => getProvider(ctx), createRemoteProxy);
13894
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
13895
+ return p.ensureTag(methodInput);
13896
+ }),
13897
+ listTags: trpc_middleware_js_1.protectedProcedure
13898
+ .input(types_159.tagsCapability.methods.listTags.input.loose())
13899
+ .output(types_159.tagsCapability.methods.listTags.output)
13900
+ .query(async ({ input, ctx }) => {
13901
+ const { nodeId, ...methodInput } = input;
13902
+ const p = resolveProvider('tags', nodeId, () => getProvider(ctx), createRemoteProxy);
13903
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
13904
+ return p.listTags(methodInput);
13905
+ }),
13906
+ updateTag: trpc_middleware_js_1.adminProcedure
13907
+ .input(types_159.tagsCapability.methods.updateTag.input.loose())
13908
+ .output(types_159.tagsCapability.methods.updateTag.output)
13909
+ .mutation(async ({ input, ctx }) => {
13910
+ const { nodeId, ...methodInput } = input;
13911
+ const p = resolveProvider('tags', nodeId, () => getProvider(ctx), createRemoteProxy);
13912
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
13913
+ return p.updateTag(methodInput);
13914
+ }),
13915
+ deleteTag: trpc_middleware_js_1.adminProcedure
13916
+ .input(types_159.tagsCapability.methods.deleteTag.input.loose())
13917
+ .output(types_159.tagsCapability.methods.deleteTag.output)
13918
+ .mutation(async ({ input, ctx }) => {
13919
+ const { nodeId, ...methodInput } = input;
13920
+ const p = resolveProvider('tags', nodeId, () => getProvider(ctx), createRemoteProxy);
13921
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
13922
+ return p.deleteTag(methodInput);
13923
+ }),
13841
13924
  list: trpc_middleware_js_1.protectedProcedure
13842
13925
  .input(types_159.tagsCapability.methods.list.input.loose())
13843
13926
  .output(types_159.tagsCapability.methods.list.output)
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseBrowserHandoffDestination = parseBrowserHandoffDestination;
3
4
  exports.ssoReturnLocation = ssoReturnLocation;
4
5
  exports.browserHandoffLocation = browserHandoffLocation;
5
6
  /**
@@ -9,10 +10,14 @@ exports.browserHandoffLocation = browserHandoffLocation;
9
10
  * - an SSO return is an admin-ui path relative to the hub's mount — EXCEPT a
10
11
  * native app return (`camstack://auth-callback?…`), which is not a hub path
11
12
  * and must never be prefixed;
12
- * - a browser handoff lands on the account page and nowhere else.
13
+ * - a browser handoff lands on the account page by default, or on the admin
14
+ * UI's root when the caller asked for `admin` — and on nothing else.
13
15
  */
14
16
  const types_1 = require("@camstack/types");
15
17
  const sso_finish_js_1 = require("./sso-finish.js");
18
+ function parseBrowserHandoffDestination(raw) {
19
+ return raw === 'admin' ? 'admin' : 'account';
20
+ }
16
21
  function ssoReturnLocation(mount, location) {
17
22
  return (0, types_1.hasUrlScheme)(location) ? location : `${mount}${location}`;
18
23
  }
@@ -21,12 +26,13 @@ function ssoReturnLocation(mount, location) {
21
26
  * auth boot consumes (`#token=…&next=…`, as an SSO login return). Without a
22
27
  * session — unknown, used or expired code — the plain login page.
23
28
  */
24
- function browserHandoffLocation(mount, session) {
29
+ function browserHandoffLocation(mount, session, destination = 'account') {
25
30
  if (session === null)
26
31
  return `${mount}${sso_finish_js_1.SSO_LOGIN_PATH}`;
32
+ // `admin` names no `next`: the admin UI's auth boot lands on its root.
27
33
  const fragment = new URLSearchParams({
28
34
  ...(0, sso_finish_js_1.sessionFragmentParams)(session),
29
- next: sso_finish_js_1.SSO_PROFILE_PATH,
35
+ ...(destination === 'account' ? { next: sso_finish_js_1.SSO_PROFILE_PATH } : {}),
30
36
  provider: 'browser-handoff',
31
37
  });
32
38
  return `${mount}${sso_finish_js_1.SSO_LOGIN_PATH}#${fragment.toString()}`;