@adea-ai/app-framework 0.0.0-stage → 0.24.0

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 (474) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +30 -0
  3. package/README.md +967 -2
  4. package/dist/app/application.d.ts +47 -0
  5. package/dist/app/application.js +115 -0
  6. package/dist/app/create-application.d.ts +13 -0
  7. package/dist/app/create-application.js +178 -0
  8. package/dist/app/service-registry.d.ts +44 -0
  9. package/dist/app/service-registry.js +116 -0
  10. package/dist/appearance/appearance-host.d.ts +62 -0
  11. package/dist/appearance/appearance-host.js +115 -0
  12. package/dist/appearance/appearance-preferences.d.ts +106 -0
  13. package/dist/appearance/appearance-preferences.js +175 -0
  14. package/dist/appearance/composition.d.ts +11 -0
  15. package/dist/appearance/composition.js +16 -0
  16. package/dist/appearance/custom-theme-import.d.ts +14 -0
  17. package/dist/appearance/custom-theme-import.js +315 -0
  18. package/dist/appearance/custom-theme-library.d.ts +146 -0
  19. package/dist/appearance/custom-theme-library.js +378 -0
  20. package/dist/appearance/editor.d.ts +20 -0
  21. package/dist/appearance/editor.js +47 -0
  22. package/dist/appearance/theme-file-importer.d.ts +23 -0
  23. package/dist/appearance/theme-file-importer.js +66 -0
  24. package/dist/appearance/theme-record-adapter.d.ts +26 -0
  25. package/dist/appearance/theme-record-adapter.js +64 -0
  26. package/dist/appearance/theme-registry.d.ts +10 -0
  27. package/dist/appearance/theme-registry.js +16 -0
  28. package/dist/appearance/window-surface.d.ts +5 -0
  29. package/dist/appearance/window-surface.js +9 -0
  30. package/dist/ci/toolchain-identity.d.ts +39 -0
  31. package/dist/ci/toolchain-identity.js +196 -0
  32. package/dist/cli/cef-helper-cli.d.ts +2 -0
  33. package/dist/cli/cef-helper-cli.js +18 -0
  34. package/dist/cli/cli-runner.d.ts +8 -0
  35. package/dist/cli/cli-runner.js +23 -0
  36. package/dist/cli/create-application-cli.d.ts +2 -0
  37. package/dist/cli/create-application-cli.js +40 -0
  38. package/dist/cli/electrobun-shortcut-patch-cli.d.ts +2 -0
  39. package/dist/cli/electrobun-shortcut-patch-cli.js +17 -0
  40. package/dist/cli/framework-update-cli.d.ts +2 -0
  41. package/dist/cli/framework-update-cli.js +40 -0
  42. package/dist/cli/release-assets-plan-cli.d.ts +2 -0
  43. package/dist/cli/release-assets-plan-cli.js +14 -0
  44. package/dist/cli/release-cut-cli.d.ts +2 -0
  45. package/dist/cli/release-cut-cli.js +27 -0
  46. package/dist/cli/release-descriptor-staging-cli.d.ts +2 -0
  47. package/dist/cli/release-descriptor-staging-cli.js +45 -0
  48. package/dist/cli/release-finalize-cli.d.ts +1 -0
  49. package/dist/cli/release-finalize-cli.js +30 -0
  50. package/dist/cli/release-promote-cli.d.ts +2 -0
  51. package/dist/cli/release-promote-cli.js +32 -0
  52. package/dist/cli/release-publish-cli.d.ts +2 -0
  53. package/dist/cli/release-publish-cli.js +48 -0
  54. package/dist/cli/release-sign-cli.d.ts +2 -0
  55. package/dist/cli/release-sign-cli.js +13 -0
  56. package/dist/cli/release-step-cli.d.ts +2 -0
  57. package/dist/cli/release-step-cli.js +44 -0
  58. package/dist/cli/toolchain-identity-cli.d.ts +2 -0
  59. package/dist/cli/toolchain-identity-cli.js +10 -0
  60. package/dist/cli/update-helper-cli.d.ts +1 -0
  61. package/dist/cli/update-helper-cli.js +10 -0
  62. package/dist/cli/windows-runtime-patch-cli.d.ts +2 -0
  63. package/dist/cli/windows-runtime-patch-cli.js +17 -0
  64. package/dist/desktop/application-command-client.d.ts +15 -0
  65. package/dist/desktop/application-command-client.js +21 -0
  66. package/dist/desktop/channel-handshake.d.ts +32 -0
  67. package/dist/desktop/channel-handshake.js +111 -0
  68. package/dist/desktop/channel-proof.d.ts +43 -0
  69. package/dist/desktop/channel-proof.js +85 -0
  70. package/dist/desktop/client-assets.d.ts +7 -0
  71. package/dist/desktop/client-assets.js +59 -0
  72. package/dist/desktop/desktop-client.d.ts +23 -0
  73. package/dist/desktop/desktop-client.js +231 -0
  74. package/dist/desktop/desktop-gateway.d.ts +18 -0
  75. package/dist/desktop/desktop-gateway.js +146 -0
  76. package/dist/desktop/desktop-host.d.ts +48 -0
  77. package/dist/desktop/desktop-host.js +208 -0
  78. package/dist/desktop/desktop-stream.d.ts +36 -0
  79. package/dist/desktop/desktop-stream.js +231 -0
  80. package/dist/desktop/loopback-policy.d.ts +19 -0
  81. package/dist/desktop/loopback-policy.js +23 -0
  82. package/dist/desktop/open-url-channel.d.ts +15 -0
  83. package/dist/desktop/open-url-channel.js +55 -0
  84. package/dist/desktop/string-policy.d.ts +2 -0
  85. package/dist/desktop/string-policy.js +11 -0
  86. package/dist/framework-source.json +1 -0
  87. package/dist/installer/archive-entry.d.ts +6 -0
  88. package/dist/installer/archive-entry.js +14 -0
  89. package/dist/installer/command-artifact.d.ts +47 -0
  90. package/dist/installer/command-artifact.js +261 -0
  91. package/dist/installer/command-qualification-command.d.ts +12 -0
  92. package/dist/installer/command-qualification-command.js +71 -0
  93. package/dist/installer/hosted-runner.d.ts +4 -0
  94. package/dist/installer/hosted-runner.js +10 -0
  95. package/dist/installer/installed-payload.d.ts +29 -0
  96. package/dist/installer/installed-payload.js +312 -0
  97. package/dist/installer/installer-ci-bootstrap.d.ts +26 -0
  98. package/dist/installer/installer-ci-bootstrap.js +160 -0
  99. package/dist/installer/installer-ci-preflight.d.ts +1 -0
  100. package/dist/installer/installer-ci-preflight.js +49 -0
  101. package/dist/installer/installer-ci-worker.d.ts +1 -0
  102. package/dist/installer/installer-ci-worker.js +105 -0
  103. package/dist/installer/installer-extraction.d.ts +14 -0
  104. package/dist/installer/installer-extraction.js +289 -0
  105. package/dist/installer/installer-fetch-guard.d.ts +15 -0
  106. package/dist/installer/installer-fetch-guard.js +50 -0
  107. package/dist/installer/installer-identity.d.ts +23 -0
  108. package/dist/installer/installer-identity.js +286 -0
  109. package/dist/installer/installer-layout.d.ts +21 -0
  110. package/dist/installer/installer-layout.js +89 -0
  111. package/dist/installer/installer-observation.d.ts +64 -0
  112. package/dist/installer/installer-observation.js +473 -0
  113. package/dist/installer/installer-process-cleanup.d.ts +18 -0
  114. package/dist/installer/installer-process-cleanup.js +158 -0
  115. package/dist/installer/installer-qualification-command.d.ts +11 -0
  116. package/dist/installer/installer-qualification-command.js +71 -0
  117. package/dist/installer/installer-renderer-evidence.d.ts +43 -0
  118. package/dist/installer/installer-renderer-evidence.js +136 -0
  119. package/dist/installer/installer-upgrade-command.d.ts +37 -0
  120. package/dist/installer/installer-upgrade-command.js +172 -0
  121. package/dist/installer/installer-worker-guard.d.ts +21 -0
  122. package/dist/installer/installer-worker-guard.js +72 -0
  123. package/dist/installer/native-executable.d.ts +5 -0
  124. package/dist/installer/native-executable.js +21 -0
  125. package/dist/installer/upgrade-asset-download.d.ts +13 -0
  126. package/dist/installer/upgrade-asset-download.js +41 -0
  127. package/dist/installer/write-all.d.ts +6 -0
  128. package/dist/installer/write-all.js +11 -0
  129. package/dist/native/app-bundle.d.ts +28 -0
  130. package/dist/native/app-bundle.js +60 -0
  131. package/dist/native/cef-helper.d.ts +28 -0
  132. package/dist/native/cef-helper.js +402 -0
  133. package/dist/native/desktop-build-hook.d.ts +7 -0
  134. package/dist/native/desktop-build-hook.js +20 -0
  135. package/dist/native/electrobun-source-patch.d.ts +25 -0
  136. package/dist/native/electrobun-source-patch.js +93 -0
  137. package/dist/native/linux-cef-links.d.ts +2 -0
  138. package/dist/native/linux-cef-links.js +15 -0
  139. package/dist/native/native-secret-store.d.ts +27 -0
  140. package/dist/native/native-secret-store.js +70 -0
  141. package/dist/native/native-utilities.d.ts +24 -0
  142. package/dist/native/native-utilities.js +85 -0
  143. package/dist/native/partitioned-window.d.ts +34 -0
  144. package/dist/native/partitioned-window.js +44 -0
  145. package/dist/native/renderer-profile.d.ts +53 -0
  146. package/dist/native/renderer-profile.js +30 -0
  147. package/dist/native/secure-window.d.ts +38 -0
  148. package/dist/native/secure-window.js +77 -0
  149. package/dist/native/sidecar-services.d.ts +23 -0
  150. package/dist/native/sidecar-services.js +46 -0
  151. package/dist/native/sidecar.d.ts +81 -0
  152. package/dist/native/sidecar.js +250 -0
  153. package/dist/native/window-bootstrap.d.ts +24 -0
  154. package/dist/native/window-bootstrap.js +63 -0
  155. package/dist/native/window-options.d.ts +32 -0
  156. package/dist/native/window-options.js +23 -0
  157. package/dist/native/windows-build-hook-internal.d.ts +2 -0
  158. package/dist/native/windows-build-hook-internal.js +32 -0
  159. package/dist/native/windows-build-hook.d.ts +2 -0
  160. package/dist/native/windows-build-hook.js +12 -0
  161. package/dist/native/windows-runtime-patch-internal.d.ts +3 -0
  162. package/dist/native/windows-runtime-patch-internal.js +20 -0
  163. package/dist/native/windows-runtime-patch.d.ts +4 -0
  164. package/dist/native/windows-runtime-patch.js +12 -0
  165. package/dist/release/feed-release-cut.d.ts +23 -0
  166. package/dist/release/feed-release-cut.js +93 -0
  167. package/dist/release/feed-state.d.ts +25 -0
  168. package/dist/release/feed-state.js +81 -0
  169. package/dist/release/framework-package-publish.d.ts +21 -0
  170. package/dist/release/framework-package-publish.js +125 -0
  171. package/dist/release/framework-update.d.ts +30 -0
  172. package/dist/release/framework-update.js +139 -0
  173. package/dist/release/github-cli.d.ts +6 -0
  174. package/dist/release/github-cli.js +16 -0
  175. package/dist/release/github-release-assets.d.ts +3 -0
  176. package/dist/release/github-release-assets.js +24 -0
  177. package/dist/release/github-release-cut.d.ts +14 -0
  178. package/dist/release/github-release-cut.js +174 -0
  179. package/dist/release/github-release-lookup.d.ts +7 -0
  180. package/dist/release/github-release-lookup.js +29 -0
  181. package/dist/release/github-release-promotion.d.ts +10 -0
  182. package/dist/release/github-release-promotion.js +78 -0
  183. package/dist/release/github-release-provenance.d.ts +9 -0
  184. package/dist/release/github-release-provenance.js +27 -0
  185. package/dist/release/github-release-publisher.d.ts +9 -0
  186. package/dist/release/github-release-publisher.js +63 -0
  187. package/dist/release/github-release-qualification.d.ts +12 -0
  188. package/dist/release/github-release-qualification.js +80 -0
  189. package/dist/release/local-provenance.d.ts +24 -0
  190. package/dist/release/local-provenance.js +72 -0
  191. package/dist/release/local-release.d.ts +133 -0
  192. package/dist/release/local-release.js +387 -0
  193. package/dist/release/macos-dmg.d.ts +22 -0
  194. package/dist/release/macos-dmg.js +91 -0
  195. package/dist/release/release-artifact.d.ts +6 -0
  196. package/dist/release/release-artifact.js +38 -0
  197. package/dist/release/release-assets-plan.d.ts +14 -0
  198. package/dist/release/release-assets-plan.js +65 -0
  199. package/dist/release/release-config.d.ts +76 -0
  200. package/dist/release/release-config.js +180 -0
  201. package/dist/release/release-cut-command.d.ts +13 -0
  202. package/dist/release/release-cut-command.js +39 -0
  203. package/dist/release/release-cut.d.ts +54 -0
  204. package/dist/release/release-cut.js +76 -0
  205. package/dist/release/release-descriptor-staging.d.ts +34 -0
  206. package/dist/release/release-descriptor-staging.js +147 -0
  207. package/dist/release/release-finalize.d.ts +16 -0
  208. package/dist/release/release-finalize.js +104 -0
  209. package/dist/release/release-promotion-command.d.ts +12 -0
  210. package/dist/release/release-promotion-command.js +28 -0
  211. package/dist/release/release-promotion.d.ts +29 -0
  212. package/dist/release/release-promotion.js +57 -0
  213. package/dist/release/release-publication.d.ts +33 -0
  214. package/dist/release/release-publication.js +138 -0
  215. package/dist/release/release-publish-command.d.ts +7 -0
  216. package/dist/release/release-publish-command.js +91 -0
  217. package/dist/release/release-qualification.d.ts +106 -0
  218. package/dist/release/release-qualification.js +135 -0
  219. package/dist/release/release-staging.d.ts +9 -0
  220. package/dist/release/release-staging.js +61 -0
  221. package/dist/release/release-steps.d.ts +38 -0
  222. package/dist/release/release-steps.js +147 -0
  223. package/dist/release/retained-release-build.d.ts +19 -0
  224. package/dist/release/retained-release-build.js +122 -0
  225. package/dist/shell/app-shell.d.ts +61 -0
  226. package/dist/shell/app-shell.js +318 -0
  227. package/dist/shell/app-utilities.d.ts +122 -0
  228. package/dist/shell/app-utilities.js +334 -0
  229. package/dist/shell/application-menu-commands.d.ts +5 -0
  230. package/dist/shell/application-menu-commands.js +11 -0
  231. package/dist/shell/application-menu.d.ts +61 -0
  232. package/dist/shell/application-menu.js +208 -0
  233. package/dist/shell/help-shortcuts.d.ts +12 -0
  234. package/dist/shell/help-shortcuts.js +22 -0
  235. package/dist/shell/settings-sections.d.ts +31 -0
  236. package/dist/shell/settings-sections.js +50 -0
  237. package/dist/shell/shortcut-platform.d.ts +17 -0
  238. package/dist/shell/shortcut-platform.js +25 -0
  239. package/dist/update-helper.bundle.js +260 -0
  240. package/dist/updates/channel-update-manager.d.ts +46 -0
  241. package/dist/updates/channel-update-manager.js +114 -0
  242. package/dist/updates/desktop-updater.d.ts +104 -0
  243. package/dist/updates/desktop-updater.js +345 -0
  244. package/dist/updates/release-feed.d.ts +61 -0
  245. package/dist/updates/release-feed.js +111 -0
  246. package/dist/updates/release-location.d.ts +9 -0
  247. package/dist/updates/release-location.js +80 -0
  248. package/dist/updates/release-version.d.ts +12 -0
  249. package/dist/updates/release-version.js +43 -0
  250. package/dist/updates/signed-release.d.ts +63 -0
  251. package/dist/updates/signed-release.js +162 -0
  252. package/dist/updates/stable-file.d.ts +10 -0
  253. package/dist/updates/stable-file.js +22 -0
  254. package/dist/updates/update-adapter.d.ts +57 -0
  255. package/dist/updates/update-adapter.js +72 -0
  256. package/dist/updates/update-arm.d.ts +24 -0
  257. package/dist/updates/update-arm.js +95 -0
  258. package/dist/updates/update-channel-store.d.ts +8 -0
  259. package/dist/updates/update-channel-store.js +72 -0
  260. package/dist/updates/update-discovery.d.ts +13 -0
  261. package/dist/updates/update-discovery.js +56 -0
  262. package/dist/updates/update-download.d.ts +14 -0
  263. package/dist/updates/update-download.js +67 -0
  264. package/dist/updates/update-exclusive-rename.d.ts +2 -0
  265. package/dist/updates/update-exclusive-rename.js +52 -0
  266. package/dist/updates/update-extraction.d.ts +18 -0
  267. package/dist/updates/update-extraction.js +183 -0
  268. package/dist/updates/update-handoff-plan.d.ts +22 -0
  269. package/dist/updates/update-handoff-plan.js +28 -0
  270. package/dist/updates/update-helper.d.ts +24 -0
  271. package/dist/updates/update-helper.js +56 -0
  272. package/dist/updates/update-launch.d.ts +5 -0
  273. package/dist/updates/update-launch.js +27 -0
  274. package/dist/updates/update-manager.d.ts +40 -0
  275. package/dist/updates/update-manager.js +83 -0
  276. package/dist/updates/update-process-fence.d.ts +10 -0
  277. package/dist/updates/update-process-fence.js +114 -0
  278. package/dist/updates/update-resume.d.ts +13 -0
  279. package/dist/updates/update-resume.js +34 -0
  280. package/dist/updates/update-shutdown.d.ts +15 -0
  281. package/dist/updates/update-shutdown.js +29 -0
  282. package/dist/updates/update-state.d.ts +30 -0
  283. package/dist/updates/update-state.js +18 -0
  284. package/dist/updates/update-swap-stage.d.ts +27 -0
  285. package/dist/updates/update-swap-stage.js +58 -0
  286. package/dist/updates/update-swap.d.ts +10 -0
  287. package/dist/updates/update-swap.js +30 -0
  288. package/dist/views/app-about.d.ts +22 -0
  289. package/dist/views/app-about.js +43 -0
  290. package/dist/views/app-appearance.d.ts +11 -0
  291. package/dist/views/app-appearance.js +42 -0
  292. package/dist/views/app-help.d.ts +17 -0
  293. package/dist/views/app-help.js +42 -0
  294. package/dist/views/app-settings.d.ts +26 -0
  295. package/dist/views/app-settings.js +97 -0
  296. package/dist/views/appearance-surface.d.ts +9 -0
  297. package/dist/views/appearance-surface.js +334 -0
  298. package/dist/views/update-surface.d.ts +34 -0
  299. package/dist/views/update-surface.js +64 -0
  300. package/package.json +363 -4
  301. package/src/app/application.tsx +138 -0
  302. package/src/app/create-application.ts +245 -0
  303. package/src/app/service-registry.ts +124 -0
  304. package/src/appearance/appearance-host.tsx +205 -0
  305. package/src/appearance/appearance-preferences.ts +287 -0
  306. package/src/appearance/composition.ts +29 -0
  307. package/src/appearance/custom-theme-import.ts +424 -0
  308. package/src/appearance/custom-theme-library.ts +600 -0
  309. package/src/appearance/editor.ts +94 -0
  310. package/src/appearance/theme-file-importer.ts +103 -0
  311. package/src/appearance/theme-record-adapter.ts +106 -0
  312. package/src/appearance/theme-registry.ts +20 -0
  313. package/src/appearance/window-surface.ts +18 -0
  314. package/src/ci/toolchain-identity.ts +244 -0
  315. package/src/cli/cef-helper-cli.ts +21 -0
  316. package/src/cli/cli-runner.ts +29 -0
  317. package/src/cli/create-application-cli.ts +62 -0
  318. package/src/cli/electrobun-shortcut-patch-cli.ts +24 -0
  319. package/src/cli/framework-update-cli.ts +41 -0
  320. package/src/cli/release-assets-plan-cli.ts +14 -0
  321. package/src/cli/release-cut-cli.ts +41 -0
  322. package/src/cli/release-descriptor-staging-cli.ts +57 -0
  323. package/src/cli/release-finalize-cli.ts +34 -0
  324. package/src/cli/release-promote-cli.ts +31 -0
  325. package/src/cli/release-publish-cli.ts +46 -0
  326. package/src/cli/release-sign-cli.ts +24 -0
  327. package/src/cli/release-step-cli.ts +71 -0
  328. package/src/cli/toolchain-identity-cli.ts +12 -0
  329. package/src/cli/update-helper-cli.ts +12 -0
  330. package/src/cli/windows-runtime-patch-cli.ts +17 -0
  331. package/src/desktop/application-command-client.ts +43 -0
  332. package/src/desktop/channel-handshake.ts +136 -0
  333. package/src/desktop/channel-proof.ts +122 -0
  334. package/src/desktop/client-assets.ts +75 -0
  335. package/src/desktop/desktop-client.ts +303 -0
  336. package/src/desktop/desktop-gateway.ts +189 -0
  337. package/src/desktop/desktop-host.ts +335 -0
  338. package/src/desktop/desktop-stream.ts +324 -0
  339. package/src/desktop/loopback-policy.ts +41 -0
  340. package/src/desktop/open-url-channel.ts +79 -0
  341. package/src/desktop/string-policy.ts +9 -0
  342. package/src/installer/archive-entry.ts +32 -0
  343. package/src/installer/command-artifact.ts +307 -0
  344. package/src/installer/command-qualification-command.ts +75 -0
  345. package/src/installer/hosted-runner.ts +11 -0
  346. package/src/installer/installed-payload.ts +408 -0
  347. package/src/installer/installer-ci-bootstrap.ts +199 -0
  348. package/src/installer/installer-ci-preflight.ts +61 -0
  349. package/src/installer/installer-ci-worker.ts +105 -0
  350. package/src/installer/installer-extraction.ts +367 -0
  351. package/src/installer/installer-fetch-guard.ts +75 -0
  352. package/src/installer/installer-identity.ts +331 -0
  353. package/src/installer/installer-layout.ts +167 -0
  354. package/src/installer/installer-observation.ts +671 -0
  355. package/src/installer/installer-process-cleanup.ts +167 -0
  356. package/src/installer/installer-qualification-command.ts +81 -0
  357. package/src/installer/installer-renderer-evidence.ts +268 -0
  358. package/src/installer/installer-upgrade-command.ts +226 -0
  359. package/src/installer/installer-worker-guard.ts +112 -0
  360. package/src/installer/native-executable.ts +37 -0
  361. package/src/installer/upgrade-asset-download.ts +72 -0
  362. package/src/installer/write-all.ts +19 -0
  363. package/src/native/app-bundle.ts +86 -0
  364. package/src/native/cef-helper.ts +471 -0
  365. package/src/native/desktop-build-hook.ts +21 -0
  366. package/src/native/electrobun-cef-main-frame-bridges.patch +63 -0
  367. package/src/native/electrobun-source-patch.ts +107 -0
  368. package/src/native/electrobun-windows-shortcut-com.patch +923 -0
  369. package/src/native/linux-cef-links.ts +14 -0
  370. package/src/native/native-secret-store.ts +99 -0
  371. package/src/native/native-utilities.ts +166 -0
  372. package/src/native/partitioned-window.ts +62 -0
  373. package/src/native/renderer-profile.ts +27 -0
  374. package/src/native/secure-window.ts +115 -0
  375. package/src/native/sidecar-services.ts +71 -0
  376. package/src/native/sidecar.ts +387 -0
  377. package/src/native/window-bootstrap.ts +77 -0
  378. package/src/native/window-options.ts +24 -0
  379. package/src/native/windows-build-hook-internal.ts +49 -0
  380. package/src/native/windows-build-hook.ts +12 -0
  381. package/src/native/windows-runtime-patch-internal.ts +48 -0
  382. package/src/native/windows-runtime-patch.ts +15 -0
  383. package/src/release/feed-release-cut.ts +110 -0
  384. package/src/release/feed-state.ts +135 -0
  385. package/src/release/framework-package-publish.ts +163 -0
  386. package/src/release/framework-update.ts +196 -0
  387. package/src/release/github-cli.ts +27 -0
  388. package/src/release/github-release-assets.ts +36 -0
  389. package/src/release/github-release-cut.ts +237 -0
  390. package/src/release/github-release-lookup.ts +39 -0
  391. package/src/release/github-release-promotion.ts +112 -0
  392. package/src/release/github-release-provenance.ts +65 -0
  393. package/src/release/github-release-publisher.ts +90 -0
  394. package/src/release/github-release-qualification.ts +144 -0
  395. package/src/release/local-provenance.ts +92 -0
  396. package/src/release/local-release.ts +525 -0
  397. package/src/release/macos-dmg.ts +113 -0
  398. package/src/release/release-artifact.ts +53 -0
  399. package/src/release/release-assets-plan.ts +118 -0
  400. package/src/release/release-config.ts +420 -0
  401. package/src/release/release-cut-command.ts +80 -0
  402. package/src/release/release-cut.ts +133 -0
  403. package/src/release/release-descriptor-staging.ts +242 -0
  404. package/src/release/release-finalize.ts +191 -0
  405. package/src/release/release-promotion-command.ts +36 -0
  406. package/src/release/release-promotion.ts +132 -0
  407. package/src/release/release-publication.ts +213 -0
  408. package/src/release/release-publish-command.ts +163 -0
  409. package/src/release/release-qualification.ts +397 -0
  410. package/src/release/release-staging.ts +87 -0
  411. package/src/release/release-steps.ts +173 -0
  412. package/src/release/retained-release-build.ts +217 -0
  413. package/src/shell/app-shell.tsx +285 -0
  414. package/src/shell/app-utilities.tsx +437 -0
  415. package/src/shell/application-menu-commands.ts +6 -0
  416. package/src/shell/application-menu.ts +250 -0
  417. package/src/shell/help-shortcuts.ts +24 -0
  418. package/src/shell/settings-sections.ts +74 -0
  419. package/src/shell/shortcut-platform.ts +35 -0
  420. package/src/updates/channel-update-manager.ts +127 -0
  421. package/src/updates/desktop-updater.ts +440 -0
  422. package/src/updates/release-feed.ts +187 -0
  423. package/src/updates/release-location.ts +101 -0
  424. package/src/updates/release-version.ts +57 -0
  425. package/src/updates/signed-release.ts +311 -0
  426. package/src/updates/stable-file.ts +32 -0
  427. package/src/updates/update-adapter.ts +129 -0
  428. package/src/updates/update-arm.ts +107 -0
  429. package/src/updates/update-channel-store.ts +86 -0
  430. package/src/updates/update-discovery.ts +113 -0
  431. package/src/updates/update-download.ts +82 -0
  432. package/src/updates/update-exclusive-rename.ts +58 -0
  433. package/src/updates/update-extraction.ts +261 -0
  434. package/src/updates/update-handoff-plan.ts +75 -0
  435. package/src/updates/update-helper.ts +87 -0
  436. package/src/updates/update-launch.ts +33 -0
  437. package/src/updates/update-manager.ts +130 -0
  438. package/src/updates/update-process-fence.ts +125 -0
  439. package/src/updates/update-resume.ts +34 -0
  440. package/src/updates/update-shutdown.ts +37 -0
  441. package/src/updates/update-state.ts +34 -0
  442. package/src/updates/update-swap-stage.ts +75 -0
  443. package/src/updates/update-swap.ts +30 -0
  444. package/src/views/app-about.tsx +44 -0
  445. package/src/views/app-appearance.tsx +32 -0
  446. package/src/views/app-help.tsx +43 -0
  447. package/src/views/app-settings.tsx +88 -0
  448. package/src/views/appearance-surface.tsx +427 -0
  449. package/src/views/update-surface.tsx +85 -0
  450. package/templates/application/.gitattributes +1 -0
  451. package/templates/application/.github/workflows/release-assets.yml +29 -0
  452. package/templates/application/.github/workflows/release-finalize.yml +29 -0
  453. package/templates/application/.github/workflows/release-please.yml +19 -0
  454. package/templates/application/.github/workflows/release.yml +29 -0
  455. package/templates/application/.github/workflows/validation.yml +28 -0
  456. package/templates/application/.oxfmtrc.json +6 -0
  457. package/templates/application/.oxlintrc.json +48 -0
  458. package/templates/application/.release-please-manifest.json +3 -0
  459. package/templates/application/README.md +47 -0
  460. package/templates/application/electrobun.config.ts +22 -0
  461. package/templates/application/release-please-config.json +12 -0
  462. package/templates/application/scripts/app-version.ts +9 -0
  463. package/templates/application/scripts/build-desktop.ts +34 -0
  464. package/templates/application/scripts/secure-build.ts +1 -0
  465. package/templates/application/scripts/stage-release.ts +21 -0
  466. package/templates/application/src/bun/index.ts +80 -0
  467. package/templates/application/src/electrobun.d.ts +27 -0
  468. package/templates/application/src/web/index.html +12 -0
  469. package/templates/application/src/web/main.tsx +97 -0
  470. package/templates/application/src/web/public/icon.svg +1 -0
  471. package/templates/application/src/web/style.css +3 -0
  472. package/templates/application/tests/app-config.test.ts +9 -0
  473. package/templates/application/tsconfig.json +15 -0
  474. package/templates/application/vite.config.ts +10 -0
@@ -0,0 +1,315 @@
1
+ import { flatVariantTokens, setCustomThemes, validateThemeRegistry } from "./custom-theme-library.js";
2
+ import { colorToHex, contrastRatio, ensureContrast, parseColor } from "@adea-ai/ui/lib/accent-roles";
3
+ import { defaultThemeRecord, editorRolesHex, oklchToHex, parseOklchColor, shadcnDestructiveProjection, shadcnVariables, syntaxRolesHex, toXtermTheme } from "@adea-ai/ui/lib/theme-projection";
4
+ // src/appearance/custom-theme-import.ts
5
+ var CANONICAL_COLOR_KEYS = [
6
+ "background",
7
+ "foreground",
8
+ "surface",
9
+ "surfaceElevated",
10
+ "surfaceHover",
11
+ "surfaceActive",
12
+ "border",
13
+ "borderMuted",
14
+ "text",
15
+ "textMuted",
16
+ "textSubtle",
17
+ "accent",
18
+ "accentForeground",
19
+ "success",
20
+ "warning",
21
+ "error",
22
+ "info"
23
+ ];
24
+ var ANSI_KEYS = [
25
+ "black",
26
+ "red",
27
+ "green",
28
+ "yellow",
29
+ "blue",
30
+ "magenta",
31
+ "cyan",
32
+ "white",
33
+ "brightBlack",
34
+ "brightRed",
35
+ "brightGreen",
36
+ "brightYellow",
37
+ "brightBlue",
38
+ "brightMagenta",
39
+ "brightCyan",
40
+ "brightWhite"
41
+ ];
42
+ /** The published syntax-role mapping, used when a file needs roles derived. */
43
+ var SYNTAX_SOURCES = {
44
+ keyword: "magenta",
45
+ string: "green",
46
+ number: "yellow",
47
+ comment: "brightBlack",
48
+ function: "blue",
49
+ variable: "cyan",
50
+ type: "cyan",
51
+ tag: "red",
52
+ attribute: "yellow",
53
+ operator: "foreground",
54
+ heading: "magenta",
55
+ link: "blue",
56
+ diffAdd: "green",
57
+ diffDelete: "red",
58
+ diffHunk: "brightBlack",
59
+ searchMatch: "yellow"
60
+ };
61
+ function slug(value) {
62
+ return value.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 32) || "theme";
63
+ }
64
+ function normalizeHex(value) {
65
+ const parsed = parseColor(value);
66
+ return parsed ? `#${[
67
+ parsed.r,
68
+ parsed.g,
69
+ parsed.b
70
+ ].map((byte) => byte.toString(16).padStart(2, "0")).join("")}` : value;
71
+ }
72
+ function isHex(value) {
73
+ return typeof value === "string" && parseColor(value) !== void 0;
74
+ }
75
+ /** Repair one foreground/background pair to the readable floor, reporting it. */
76
+ function repairToFloor(foreground, background, notes, role) {
77
+ const front = parseColor(foreground);
78
+ const back = parseColor(background);
79
+ if (!front || !back) return foreground;
80
+ if (contrastRatio(front, back) >= 4.5) return foreground;
81
+ const repaired = ensureContrast(front, back, 4.5);
82
+ notes.push(`“${role}” was adjusted for readable contrast.`);
83
+ return colorToHex(repaired);
84
+ }
85
+ function hexOf(value) {
86
+ const parsed = parseOklchColor(value);
87
+ return parsed ? oklchToHex(parsed) : value;
88
+ }
89
+ /**
90
+ * Project a validated canonical theme into the runtime variant shape, the same
91
+ * adapters the generated built-in registry uses.
92
+ */
93
+ function projectCanonical(theme) {
94
+ const action = shadcnDestructiveProjection(theme);
95
+ const shadcn = {
96
+ ...shadcnVariables(theme),
97
+ "--destructive-action": action.fill,
98
+ "--destructive-action-foreground": action.foreground
99
+ };
100
+ const colors = Object.fromEntries(Object.entries({
101
+ background: "background",
102
+ foreground: "foreground",
103
+ card: "card",
104
+ "card-foreground": "cardForeground",
105
+ popover: "popover",
106
+ "popover-foreground": "popoverForeground",
107
+ primary: "primary",
108
+ "primary-foreground": "primaryForeground",
109
+ secondary: "secondary",
110
+ "secondary-foreground": "secondaryForeground",
111
+ muted: "muted",
112
+ "muted-foreground": "mutedForeground",
113
+ accent: "accent",
114
+ "accent-foreground": "accentForeground",
115
+ destructive: "destructive",
116
+ "destructive-action": "destructiveAction",
117
+ "destructive-action-foreground": "destructiveActionForeground",
118
+ success: "success",
119
+ border: "border",
120
+ input: "input",
121
+ ring: "ring"
122
+ }).map(([name, property]) => [property, hexOf(shadcn[`--${name}`])]));
123
+ const terminalSource = toXtermTheme(theme);
124
+ const ansi = [
125
+ terminalSource.black,
126
+ terminalSource.red,
127
+ terminalSource.green,
128
+ terminalSource.yellow,
129
+ terminalSource.blue,
130
+ terminalSource.magenta,
131
+ terminalSource.cyan,
132
+ terminalSource.white,
133
+ terminalSource.brightBlack,
134
+ terminalSource.brightRed,
135
+ terminalSource.brightGreen,
136
+ terminalSource.brightYellow,
137
+ terminalSource.brightBlue,
138
+ terminalSource.brightMagenta,
139
+ terminalSource.brightCyan,
140
+ terminalSource.brightWhite
141
+ ].map((value) => hexOf(value));
142
+ let editor;
143
+ try {
144
+ editor = { ...editorRolesHex(theme) };
145
+ } catch {
146
+ const raw = syntaxRolesHex(theme);
147
+ editor = Object.fromEntries(Object.entries(raw).filter(([role]) => role in SYNTAX_SOURCES).map(([role, value]) => [role, hexOf(value)]));
148
+ }
149
+ const charts = {
150
+ chart1: ansi[4],
151
+ chart2: ansi[5],
152
+ chart3: ansi[6],
153
+ chart4: ansi[2],
154
+ chart5: ansi[3],
155
+ chart6: ansi[1]
156
+ };
157
+ return {
158
+ id: theme.id,
159
+ familyId: "imported",
160
+ familyName: "Imported",
161
+ name: theme.name,
162
+ appearance: theme.appearance,
163
+ colors,
164
+ terminal: {
165
+ background: hexOf(terminalSource.background),
166
+ foreground: hexOf(terminalSource.foreground),
167
+ cursor: hexOf(terminalSource.cursor),
168
+ selection: hexOf(terminalSource.selectionBackground),
169
+ ansi
170
+ },
171
+ editor,
172
+ charts
173
+ };
174
+ }
175
+ /**
176
+ * Parse and store an uploaded theme. The only hard failure is unparseable
177
+ * JSON: everything else normalizes, fills from the same-appearance default,
178
+ * and reports what it had to adjust.
179
+ */
180
+ function importCustomTheme(text, storage, existing) {
181
+ let source;
182
+ try {
183
+ source = JSON.parse(text);
184
+ } catch {
185
+ return {
186
+ ok: false,
187
+ error: "That file is not valid JSON."
188
+ };
189
+ }
190
+ const record = typeof source === "object" && source !== null && "theme" in source ? source.theme : source;
191
+ if (typeof record !== "object" || record === null) return {
192
+ ok: false,
193
+ error: "That file does not describe a theme."
194
+ };
195
+ const notes = [];
196
+ const rawColors = record.colors ?? {};
197
+ const appearance = record.appearance === "light" || record.appearance === "dark" ? record.appearance : rawColors.background === void 0 ? "dark" : "light";
198
+ const base = defaultThemeRecord(appearance);
199
+ const name = typeof record.name === "string" && record.name.trim().length > 0 ? record.name.trim().slice(0, 64) : typeof record.label === "string" && record.label.trim().length > 0 ? record.label.trim().slice(0, 64) : "Imported theme";
200
+ const colors = {};
201
+ for (const key of CANONICAL_COLOR_KEYS) {
202
+ const value = rawColors[key];
203
+ if (isHex(value)) colors[key] = normalizeHex(value);
204
+ }
205
+ if (colors.text === void 0 && isHex(rawColors.foreground)) colors.text = normalizeHex(rawColors.foreground);
206
+ if (colors.textMuted === void 0 && isHex(rawColors.mutedForeground)) colors.textMuted = normalizeHex(rawColors.mutedForeground);
207
+ const filled = CANONICAL_COLOR_KEYS.filter((key) => colors[key] === void 0);
208
+ if (filled.length > 0) {
209
+ for (const key of filled) colors[key] = base.colors[key];
210
+ notes.push("Missing roles were filled from the default theme.");
211
+ }
212
+ colors.text = repairToFloor(colors.text, colors.background, notes, "text");
213
+ colors.textMuted = repairToFloor(colors.textMuted, colors.background, notes, "muted text");
214
+ colors.textSubtle = repairToFloor(colors.textSubtle, colors.background, notes, "subtle text");
215
+ const ansiRecord = record.ansi ?? {};
216
+ const ansi = ANSI_KEYS.map((key) => {
217
+ const value = ansiRecord[key];
218
+ return isHex(value) ? normalizeHex(value) : base.ansi[key];
219
+ });
220
+ if (Object.keys(ansiRecord).length === 0) notes.push("No ANSI ramp in the file; the default ramp was kept.");
221
+ const canonical = {
222
+ id: "pending",
223
+ name,
224
+ appearance,
225
+ colors,
226
+ ansi: Object.fromEntries(ANSI_KEYS.map((key, index) => [key, ansi[index]])),
227
+ cursor: isHex(record.cursor) ? normalizeHex(record.cursor) : base.cursor,
228
+ selection: isHex(record.selection) ? normalizeHex(record.selection) : base.selection
229
+ };
230
+ let variant;
231
+ try {
232
+ variant = projectCanonical(canonical);
233
+ } catch {
234
+ variant = projectHostFallback(name, appearance, canonical.colors, ansi);
235
+ notes.push("Syntax roles were approximated from the ANSI ramp.");
236
+ }
237
+ variant = {
238
+ ...variant,
239
+ id: `custom-${slug(name)}-${Date.now().toString(36)}`,
240
+ name
241
+ };
242
+ const issues = validateThemeRegistry([variant]).filter((issue) => issue.severity === "error");
243
+ for (const issue of issues) notes.push(`${issue.variantId}: ${issue.message}`);
244
+ const stored = {
245
+ id: variant.id,
246
+ name: variant.name,
247
+ appearance,
248
+ importedAt: (/* @__PURE__ */ new Date()).toISOString(),
249
+ variant,
250
+ flatTokens: flatVariantTokens(variant),
251
+ notes
252
+ };
253
+ if (!setCustomThemes([...existing, stored], storage)) return {
254
+ ok: false,
255
+ error: "The theme could not be saved. Check your storage and try again."
256
+ };
257
+ return {
258
+ ok: true,
259
+ theme: stored
260
+ };
261
+ }
262
+ /** Direct host projection for inputs the canonical adapters reject. */
263
+ function projectHostFallback(name, appearance, colors, ansi) {
264
+ const ramp = (index) => ansi[index] ?? colors.foreground;
265
+ const editor = Object.fromEntries(Object.entries(SYNTAX_SOURCES).map(([role, source]) => {
266
+ return [role, repairToFloor(source === "foreground" ? colors.foreground : ramp(ANSI_KEYS.indexOf(source)), colors.background, [], role)];
267
+ }));
268
+ return {
269
+ id: "pending",
270
+ familyId: "imported",
271
+ familyName: "Imported",
272
+ name,
273
+ appearance,
274
+ colors: {
275
+ background: colors.background,
276
+ foreground: colors.foreground,
277
+ card: colors.surface,
278
+ cardForeground: colors.text,
279
+ popover: colors.surfaceElevated,
280
+ popoverForeground: colors.text,
281
+ primary: colors.accent,
282
+ primaryForeground: colors.accentForeground,
283
+ secondary: colors.surfaceHover,
284
+ secondaryForeground: colors.text,
285
+ muted: colors.surfaceHover,
286
+ mutedForeground: colors.textMuted,
287
+ accent: colors.surfaceActive,
288
+ accentForeground: colors.text,
289
+ destructive: colors.error,
290
+ destructiveAction: colors.error,
291
+ destructiveActionForeground: colors.accentForeground,
292
+ success: colors.success,
293
+ border: colors.border,
294
+ input: colors.border,
295
+ ring: colors.accent
296
+ },
297
+ terminal: {
298
+ background: colors.background,
299
+ foreground: colors.foreground,
300
+ cursor: ramp(6),
301
+ selection: ramp(0),
302
+ ansi: [...ansi]
303
+ },
304
+ editor,
305
+ charts: {
306
+ chart1: ramp(4),
307
+ chart2: ramp(5),
308
+ chart3: ramp(6),
309
+ chart4: ramp(2),
310
+ chart5: ramp(3),
311
+ chart6: ramp(1)
312
+ }
313
+ };
314
+ }
315
+ export { importCustomTheme };
@@ -0,0 +1,146 @@
1
+ import type { AdeaThemeRecord } from '@adea-ai/ui/lib/theme-records';
2
+ import type { ThemeVariant as UiThemeVariant } from '@adea-ai/ui/lib/themes';
3
+ /**
4
+ * The custom theme library: themes the user imported from a file, stored in
5
+ * `localStorage` and handed to the provider as extra variants. Import and
6
+ * projection live in dev-view (the lazy appearance chunk); this module owns the
7
+ * stored shape, the in-memory view, validation and the translation to the shared
8
+ * variant shape.
9
+ *
10
+ * The stored shape is a compatibility surface. Imported themes written by any
11
+ * earlier build keep resolving: `variant` stays in the host shape below and
12
+ * `flatTokens` stays the verbatim token map, so what a user imported is what is
13
+ * painted.
14
+ */
15
+ export type StoredThemeAppearance = 'light' | 'dark';
16
+ export type StoredThemeTerminal = Readonly<{
17
+ background: string;
18
+ foreground: string;
19
+ cursor: string;
20
+ selection: string;
21
+ /** The 16 xterm ANSI slots, in protocol order. */
22
+ ansi: readonly string[];
23
+ }>;
24
+ export type StoredThemeEditorRoles = Readonly<{
25
+ keyword: string;
26
+ string: string;
27
+ number: string;
28
+ comment: string;
29
+ function: string;
30
+ variable: string;
31
+ type: string;
32
+ tag: string;
33
+ attribute: string;
34
+ operator: string;
35
+ heading: string;
36
+ link: string;
37
+ diffAdd: string;
38
+ diffDelete: string;
39
+ diffHunk: string;
40
+ searchMatch: string;
41
+ }>;
42
+ export type StoredThemeChartRoles = Readonly<{
43
+ chart1: string;
44
+ chart2: string;
45
+ chart3: string;
46
+ chart4: string;
47
+ chart5: string;
48
+ chart6: string;
49
+ }>;
50
+ export type StoredThemeColors = Readonly<{
51
+ background: string;
52
+ foreground: string;
53
+ card: string;
54
+ cardForeground: string;
55
+ popover: string;
56
+ popoverForeground: string;
57
+ primary: string;
58
+ primaryForeground: string;
59
+ secondary: string;
60
+ secondaryForeground: string;
61
+ muted: string;
62
+ mutedForeground: string;
63
+ accent: string;
64
+ accentForeground: string;
65
+ destructive: string;
66
+ destructiveAction: string;
67
+ destructiveActionForeground: string;
68
+ success: string;
69
+ border: string;
70
+ input: string;
71
+ ring: string;
72
+ }>;
73
+ /** The variant shape the library has always stored for an imported theme. */
74
+ export type StoredThemeVariant = Readonly<{
75
+ id: string;
76
+ familyId: string;
77
+ familyName: string;
78
+ name: string;
79
+ appearance: StoredThemeAppearance;
80
+ colors: StoredThemeColors;
81
+ terminal: StoredThemeTerminal;
82
+ editor: StoredThemeEditorRoles;
83
+ charts: StoredThemeChartRoles;
84
+ }>;
85
+ export type CustomThemeStored = Readonly<{
86
+ /** Stable id, namespaced so it can never collide with a catalogue id. */
87
+ id: string;
88
+ name: string;
89
+ appearance: StoredThemeAppearance;
90
+ importedAt: string;
91
+ variant: StoredThemeVariant;
92
+ /** The flat token map the no-flash script applies for a stored selection. */
93
+ flatTokens: Readonly<Record<string, string>>;
94
+ /** Non-fatal adjustments made while normalizing the file, for the UI. */
95
+ notes: readonly string[];
96
+ }>;
97
+ export type AppearanceStorage = Pick<Storage, 'getItem' | 'setItem'>;
98
+ export declare const CUSTOM_THEME_LIBRARY_STORAGE_KEY = "appearance.library";
99
+ /**
100
+ * Where an unreadable library is quarantined. It is its own key: the library and
101
+ * the appearance preference used to share `appearance.recovery`, so one could
102
+ * overwrite the other's capture.
103
+ */
104
+ export declare const CUSTOM_THEME_LIBRARY_RECOVERY_KEY = "appearance.library.recovery";
105
+ export type ValidationIssue = Readonly<{
106
+ variantId: string;
107
+ severity: 'error' | 'warning';
108
+ message: string;
109
+ }>;
110
+ export declare function validateThemeRegistry(registry: readonly StoredThemeVariant[]): ValidationIssue[];
111
+ /** The custom properties an imported variant owns, as a flat map. */
112
+ export declare function flatVariantTokens(variant: StoredThemeVariant): Record<string, string>;
113
+ /**
114
+ * The catalogue-shaped record for an imported variant. The editor reads only its
115
+ * surface, text, border and accent roles; warning and info are the ANSI yellow and
116
+ * blue because the stored variant has no such roles.
117
+ */
118
+ export declare function storedVariantRecord(variant: StoredThemeVariant): AdeaThemeRecord;
119
+ /**
120
+ * The shared-provider variant for a stored theme: derived roles from the
121
+ * reconstructed record, then `flatTokens` verbatim.
122
+ *
123
+ * A record the shared projection cannot map falls back to the default theme of the
124
+ * same appearance under the stored identity, so an import that the projection
125
+ * rejects still paints from its tokens instead of vanishing.
126
+ */
127
+ export declare function toUiVariant(stored: CustomThemeStored): UiThemeVariant;
128
+ /** The imported themes' stored variants, in import order. */
129
+ export declare function customThemeVariants(): readonly StoredThemeVariant[];
130
+ /** The imported themes as shared-provider variants: what the provider's `themes` takes. */
131
+ export declare function customUiVariants(): readonly UiThemeVariant[];
132
+ export declare function subscribeCustomThemes(listener: () => void): () => void;
133
+ /**
134
+ * Replace the imported-theme set, persist it, and tell subscribers. A theme whose id
135
+ * is not custom-namespaced is namespaced here, so a library file can never shadow a
136
+ * catalogue id.
137
+ */
138
+ export declare function setCustomThemes(themes: readonly CustomThemeStored[], storage: AppearanceStorage | undefined): boolean;
139
+ /**
140
+ * Read the stored library. A malformed document starts an empty library and
141
+ * quarantines the raw bytes into the library's own recovery key, mirroring the
142
+ * appearance-preference recovery contract; individual invalid records are dropped,
143
+ * not fatal.
144
+ */
145
+ export declare function readCustomThemeLibrary(storage: AppearanceStorage | undefined): readonly CustomThemeStored[];
146
+ export declare function removeCustomTheme(id: string, storage: AppearanceStorage | undefined): boolean;