aegisone 1.0.34 → 1.0.37

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 (372) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +1 -1
  3. package/SOURCE-OFFER.txt +9 -0
  4. package/bin/aegis.js +1 -322
  5. package/package.json +4 -5
  6. package/scripts/bump.mjs +1 -211
  7. package/scripts/bundle.js +1 -129
  8. package/scripts/predist.mjs +1 -976
  9. package/src/child.js +1 -285
  10. package/src/dispatch.js +1 -269
  11. package/src/doctor.js +1 -639
  12. package/src/host.js +1 -111
  13. package/src/iface/paths.js +3 -0
  14. package/src/iface/pty.js +3 -0
  15. package/src/iface/update.js +3 -0
  16. package/src/iface/window.js +3 -0
  17. package/src/permissions.js +1 -383
  18. package/src/probes.js +1 -159
  19. package/src/protocol.js +3 -0
  20. package/src/release.js +1 -409
  21. package/src/selfhost.js +3 -0
  22. package/vendor/cli/package.json +3 -7
  23. package/vendor/cli/scripts/check.mjs +1 -52
  24. package/vendor/cli/scripts/demo.mjs +1 -94
  25. package/vendor/cli/scripts/predist.mjs +1 -75
  26. package/vendor/cli/scripts/runtests.mjs +1 -56
  27. package/vendor/cli/scripts/seal-gate.mjs +1 -74
  28. package/vendor/cli/src/agents.js +1 -139
  29. package/vendor/cli/src/app.js +1 -2957
  30. package/vendor/cli/src/art.js +1 -289
  31. package/vendor/cli/src/chatflow.js +1 -3023
  32. package/vendor/cli/src/checkpoint.js +1 -90
  33. package/vendor/cli/src/clipboard.js +1 -424
  34. package/vendor/cli/src/cloudsync.js +1 -528
  35. package/vendor/cli/src/commands.js +1 -4089
  36. package/vendor/cli/src/config.js +1 -581
  37. package/vendor/cli/src/connect.js +1 -349
  38. package/vendor/cli/src/credentials.js +1 -33
  39. package/vendor/cli/src/deps.js +1 -232
  40. package/vendor/cli/src/devrun.js +1 -187
  41. package/vendor/cli/src/diff.js +1 -333
  42. package/vendor/cli/src/diffview.js +1 -296
  43. package/vendor/cli/src/engine.js +1 -297
  44. package/vendor/cli/src/entitlement.js +1 -355
  45. package/vendor/cli/src/events.js +1 -707
  46. package/vendor/cli/src/export.js +1 -67
  47. package/vendor/cli/src/filepreview.js +1 -153
  48. package/vendor/cli/src/fingerprint.js +1 -592
  49. package/vendor/cli/src/format.js +1 -259
  50. package/vendor/cli/src/fuzzy.js +1 -119
  51. package/vendor/cli/src/history.js +1 -423
  52. package/vendor/cli/src/init.js +1 -175
  53. package/vendor/cli/src/input.js +1 -139
  54. package/vendor/cli/src/keys.js +1 -183
  55. package/vendor/cli/src/markdown.js +1 -306
  56. package/vendor/cli/src/models.js +1 -507
  57. package/vendor/cli/src/naming.js +1 -57
  58. package/vendor/cli/src/overlays.js +1 -462
  59. package/vendor/cli/src/panels.js +1 -1418
  60. package/vendor/cli/src/ping.js +1 -226
  61. package/vendor/cli/src/presence.js +1 -238
  62. package/vendor/cli/src/render.js +1 -516
  63. package/vendor/cli/src/screen.js +1 -518
  64. package/vendor/cli/src/screens.js +1 -896
  65. package/vendor/cli/src/secret.js +1 -59
  66. package/vendor/cli/src/securefs.js +1 -359
  67. package/vendor/cli/src/settings.js +1 -155
  68. package/vendor/cli/src/shared.js +1 -52
  69. package/vendor/cli/src/sharedpaths.js +1 -53
  70. package/vendor/cli/src/signup.js +1 -156
  71. package/vendor/cli/src/summarize.js +1 -95
  72. package/vendor/cli/src/sysdiag.js +1 -585
  73. package/vendor/cli/src/system.js +1 -40
  74. package/vendor/cli/src/theme.js +1 -570
  75. package/vendor/cli/src/title.js +1 -220
  76. package/vendor/cli/src/todos.js +1 -115
  77. package/vendor/cli/src/tokens.js +1 -263
  78. package/vendor/cli/src/topup.js +1 -210
  79. package/vendor/cli/src/update.js +1 -191
  80. package/vendor/cli/vendor/client/aegis.js +1 -2441
  81. package/vendor/cli/vendor/client/attest.js +1 -518
  82. package/vendor/cli/vendor/client/authorship-key.js +1 -410
  83. package/vendor/cli/vendor/client/auto-provision.js +1 -134
  84. package/vendor/cli/vendor/client/brain-catalog.js +1 -268
  85. package/vendor/cli/vendor/client/byok-catalog.js +1 -199
  86. package/vendor/cli/vendor/client/catalog-client.js +1 -487
  87. package/vendor/cli/vendor/client/conversation-export.js +1 -177
  88. package/vendor/cli/vendor/client/credentials.js +1 -494
  89. package/vendor/cli/vendor/client/device-fingerprint.js +1 -141
  90. package/vendor/cli/vendor/client/drive-connect.js +1 -110
  91. package/vendor/cli/vendor/client/drive-upload.js +1 -234
  92. package/vendor/cli/vendor/client/env-file.js +1 -1273
  93. package/vendor/cli/vendor/client/fingerprint.js +1 -1064
  94. package/vendor/cli/vendor/client/foreign-memory.js +1 -669
  95. package/vendor/cli/vendor/client/google-signin.js +1 -133
  96. package/vendor/cli/vendor/client/hooks.js +1 -430
  97. package/vendor/cli/vendor/client/model-discovery.js +1 -373
  98. package/vendor/cli/vendor/client/naming.js +1 -283
  99. package/vendor/cli/vendor/client/platform.js +1 -937
  100. package/vendor/cli/vendor/client/prefs.js +1 -351
  101. package/vendor/cli/vendor/client/presence-constants.js +1 -107
  102. package/vendor/cli/vendor/client/presence.js +1 -438
  103. package/vendor/cli/vendor/client/record-vault.js +3 -1055
  104. package/vendor/cli/vendor/client/session-store.js +1 -575
  105. package/vendor/cli/vendor/client/topup.js +1 -297
  106. package/vendor/cli/vendor/client/touch.js +1 -458
  107. package/vendor/cli/vendor/client/update.js +1 -763
  108. package/vendor/cli/vendor/client/user-models.js +1 -381
  109. package/vendor/cli/vendor/desktop/lib/local/agents.js +1 -105
  110. package/vendor/cli/vendor/desktop/lib/local/attachments.js +1 -276
  111. package/vendor/cli/vendor/desktop/lib/local/autonomous.js +1 -1045
  112. package/vendor/cli/vendor/desktop/lib/local/claude-pro.js +1 -1028
  113. package/vendor/cli/vendor/desktop/lib/local/context.js +1 -125
  114. package/vendor/cli/vendor/desktop/lib/local/engine.js +1 -3666
  115. package/vendor/cli/vendor/desktop/lib/local/entitlement.js +1 -660
  116. package/vendor/cli/vendor/desktop/lib/local/git-scope.js +1 -228
  117. package/vendor/cli/vendor/desktop/lib/local/integrity.js +1 -1
  118. package/vendor/cli/vendor/desktop/lib/local/local.js +1 -2145
  119. package/vendor/cli/vendor/desktop/lib/local/prompt.js +1 -280
  120. package/vendor/cli/vendor/desktop/lib/local/queue.js +1 -560
  121. package/vendor/cli/vendor/desktop/lib/local/session-rounds.js +1 -238
  122. package/vendor/cli/vendor/desktop/lib/local/spill.js +1 -75
  123. package/vendor/cli/vendor/desktop/lib/local/turn-guard.js +1 -300
  124. package/vendor/cli/vendor/desktop/lib/local/worktree-lock.js +1 -235
  125. package/vendor/cli/vendor/desktop/lib/settings.js +1 -890
  126. package/vendor/cli/vendor/desktop/main.js +67 -1
  127. package/vendor/cli/vendor/desktop/renderer/usage.js +1 -1239
  128. package/vendor/cli/vendor/hosts/install.js +1 -638
  129. package/vendor/cli/vendor/hosts/openai-shim.js +1 -515
  130. package/vendor/cli/vendor/hosts/spec.js +1 -164
  131. package/vendor/cli/vendor/hosts/targets.js +1 -346
  132. package/vendor/cli/vendor/mcp/server.js +1 -221
  133. package/vendor/cli/vendor/mcp/tools.js +1 -408
  134. package/vendor/cli/vendor/one/src/child.js +1 -285
  135. package/vendor/cli/vendor/one/src/permissions.js +1 -383
  136. package/vendor/cli/vendor/one/src/selfhost.js +3 -0
  137. package/vendor/desktop/bin/aegis.js +1 -32
  138. package/vendor/desktop/lib/account-key.js +1 -56
  139. package/vendor/desktop/lib/auto.js +1 -461
  140. package/vendor/desktop/lib/avatar/companion.js +1 -698
  141. package/vendor/desktop/lib/avatar/cosmetics.js +1 -532
  142. package/vendor/desktop/lib/avatar/events.js +1 -344
  143. package/vendor/desktop/lib/avatar/holder-turn.js +1 -350
  144. package/vendor/desktop/lib/avatar/holders.js +1 -612
  145. package/vendor/desktop/lib/avatar/identity.js +1 -641
  146. package/vendor/desktop/lib/avatar/level.js +1 -368
  147. package/vendor/desktop/lib/avatar/mirror.js +1 -524
  148. package/vendor/desktop/lib/avatar/persona.js +1 -388
  149. package/vendor/desktop/lib/avatar/profile.js +1 -977
  150. package/vendor/desktop/lib/avatar/register.js +1 -307
  151. package/vendor/desktop/lib/avatar/store.js +1 -472
  152. package/vendor/desktop/lib/avatar/tiers.js +1 -38
  153. package/vendor/desktop/lib/avatar/transfer.js +1 -415
  154. package/vendor/desktop/lib/avatar/turn.js +1 -216
  155. package/vendor/desktop/lib/avatar/voice.js +1 -328
  156. package/vendor/desktop/lib/avatar/xp.js +1 -404
  157. package/vendor/desktop/lib/deep-link.js +1 -120
  158. package/vendor/desktop/lib/fingerprint.js +2 -347
  159. package/vendor/desktop/lib/google-connect.js +1 -323
  160. package/vendor/desktop/lib/local/agents.js +1 -105
  161. package/vendor/desktop/lib/local/attachments.js +1 -276
  162. package/vendor/desktop/lib/local/autonomous.js +1 -1045
  163. package/vendor/desktop/lib/local/claude-pro.js +1 -1028
  164. package/vendor/desktop/lib/local/context.js +1 -125
  165. package/vendor/desktop/lib/local/engine.js +1 -3666
  166. package/vendor/desktop/lib/local/entitlement.js +1 -660
  167. package/vendor/desktop/lib/local/git-scope.js +1 -228
  168. package/vendor/desktop/lib/local/integrity.js +1 -1
  169. package/vendor/desktop/lib/local/local.js +1 -2145
  170. package/vendor/desktop/lib/local/prompt.js +1 -280
  171. package/vendor/desktop/lib/local/queue.js +1 -560
  172. package/vendor/desktop/lib/local/session-rounds.js +1 -238
  173. package/vendor/desktop/lib/local/spill.js +1 -75
  174. package/vendor/desktop/lib/local/telemetry.js +1 -470
  175. package/vendor/desktop/lib/local/turn-guard.js +1 -300
  176. package/vendor/desktop/lib/local/worktree-lock.js +1 -235
  177. package/vendor/desktop/lib/provider-key-mirror.js +1 -252
  178. package/vendor/desktop/lib/quick-launcher.js +1 -84
  179. package/vendor/desktop/lib/settings.js +1 -890
  180. package/vendor/desktop/lib/sync/memory-queue.js +1 -60
  181. package/vendor/desktop/lib/sync/persist-gate.js +1 -148
  182. package/vendor/desktop/lib/sync/sessions.js +1 -106
  183. package/vendor/desktop/lib/window-state.js +1 -66
  184. package/vendor/desktop/main.js +67 -1
  185. package/vendor/desktop/package.json +3 -5
  186. package/vendor/desktop/preload.js +1 -679
  187. package/vendor/desktop/renderer/app.js +1 -7250
  188. package/vendor/desktop/renderer/avatar/assemble.js +1 -335
  189. package/vendor/desktop/renderer/avatar/avatar.js +1 -380
  190. package/vendor/desktop/renderer/avatar/cards.js +1 -141
  191. package/vendor/desktop/renderer/avatar/hud.js +1 -206
  192. package/vendor/desktop/renderer/avatar/machine.js +1 -213
  193. package/vendor/desktop/renderer/avatar/pane.js +1 -439
  194. package/vendor/desktop/renderer/avatar/parts.js +1 -437
  195. package/vendor/desktop/renderer/budget.js +1 -172
  196. package/vendor/desktop/renderer/companion.js +1 -223
  197. package/vendor/desktop/renderer/diff.js +1 -359
  198. package/vendor/desktop/renderer/diffview.js +1 -336
  199. package/vendor/desktop/renderer/filepreview.js +1 -211
  200. package/vendor/desktop/renderer/fingerprint.js +3 -789
  201. package/vendor/desktop/renderer/markdown.js +1 -168
  202. package/vendor/desktop/renderer/provider-mark.js +1 -311
  203. package/vendor/desktop/renderer/provider-toolbar.js +1 -134
  204. package/vendor/desktop/renderer/providers.js +1 -259
  205. package/vendor/desktop/renderer/quick.js +1 -285
  206. package/vendor/desktop/renderer/stream-policy.js +1 -387
  207. package/vendor/desktop/renderer/transcript-view.js +1 -323
  208. package/vendor/desktop/renderer/usage.js +1 -1239
  209. package/vendor/desktop/vendor/aegis.js +1 -2441
  210. package/vendor/desktop/vendor/attest.js +1 -518
  211. package/vendor/desktop/vendor/authorship-key.js +1 -410
  212. package/vendor/desktop/vendor/auto-provision.js +1 -134
  213. package/vendor/desktop/vendor/brain-catalog.js +1 -268
  214. package/vendor/desktop/vendor/byok-catalog.js +1 -199
  215. package/vendor/desktop/vendor/catalog-client.js +1 -487
  216. package/vendor/desktop/vendor/conversation-export.js +1 -177
  217. package/vendor/desktop/vendor/credentials.js +1 -494
  218. package/vendor/desktop/vendor/device-fingerprint.js +1 -141
  219. package/vendor/desktop/vendor/drive-connect.js +1 -110
  220. package/vendor/desktop/vendor/drive-upload.js +1 -234
  221. package/vendor/desktop/vendor/env-file.js +1 -1273
  222. package/vendor/desktop/vendor/faces/cli/LICENSE +661 -0
  223. package/vendor/desktop/vendor/faces/cli/README.md +784 -0
  224. package/vendor/desktop/vendor/faces/cli/bin/aegiscode.js +20 -0
  225. package/vendor/desktop/vendor/faces/cli/package.json +44 -0
  226. package/vendor/desktop/vendor/faces/cli/scripts/check.mjs +4 -0
  227. package/vendor/desktop/vendor/faces/cli/scripts/demo.mjs +4 -0
  228. package/vendor/desktop/vendor/faces/cli/scripts/predist.mjs +4 -0
  229. package/vendor/desktop/vendor/faces/cli/scripts/runtests.mjs +4 -0
  230. package/vendor/desktop/vendor/faces/cli/scripts/seal-gate.mjs +3 -0
  231. package/vendor/desktop/vendor/faces/cli/src/agents.js +3 -0
  232. package/vendor/desktop/vendor/faces/cli/src/app.js +3 -0
  233. package/vendor/desktop/vendor/faces/cli/src/art.js +3 -0
  234. package/vendor/desktop/vendor/faces/cli/src/autonomous.js +3 -0
  235. package/vendor/desktop/vendor/faces/cli/src/caps.js +3 -0
  236. package/vendor/desktop/vendor/faces/cli/src/chatflow.js +3 -0
  237. package/vendor/desktop/vendor/faces/cli/src/checkpoint.js +3 -0
  238. package/vendor/desktop/vendor/faces/cli/src/clipboard.js +3 -0
  239. package/vendor/desktop/vendor/faces/cli/src/cloudsync.js +3 -0
  240. package/vendor/desktop/vendor/faces/cli/src/commands.js +3 -0
  241. package/vendor/desktop/vendor/faces/cli/src/config.js +3 -0
  242. package/vendor/desktop/vendor/faces/cli/src/connect.js +3 -0
  243. package/vendor/desktop/vendor/faces/cli/src/credentials.js +3 -0
  244. package/vendor/desktop/vendor/faces/cli/src/deps.js +3 -0
  245. package/vendor/desktop/vendor/faces/cli/src/devrun.js +3 -0
  246. package/vendor/desktop/vendor/faces/cli/src/diff.js +3 -0
  247. package/vendor/desktop/vendor/faces/cli/src/diffview.js +3 -0
  248. package/vendor/desktop/vendor/faces/cli/src/engine.js +3 -0
  249. package/vendor/desktop/vendor/faces/cli/src/entitlement.js +3 -0
  250. package/vendor/desktop/vendor/faces/cli/src/events.js +3 -0
  251. package/vendor/desktop/vendor/faces/cli/src/export.js +3 -0
  252. package/vendor/desktop/vendor/faces/cli/src/filepreview.js +3 -0
  253. package/vendor/desktop/vendor/faces/cli/src/fingerprint.js +3 -0
  254. package/vendor/desktop/vendor/faces/cli/src/format.js +3 -0
  255. package/vendor/desktop/vendor/faces/cli/src/fuzzy.js +3 -0
  256. package/vendor/desktop/vendor/faces/cli/src/gate.js +3 -0
  257. package/vendor/desktop/vendor/faces/cli/src/history.js +3 -0
  258. package/vendor/desktop/vendor/faces/cli/src/init.js +3 -0
  259. package/vendor/desktop/vendor/faces/cli/src/input.js +3 -0
  260. package/vendor/desktop/vendor/faces/cli/src/keys.js +3 -0
  261. package/vendor/desktop/vendor/faces/cli/src/limits.js +3 -0
  262. package/vendor/desktop/vendor/faces/cli/src/markdown.js +3 -0
  263. package/vendor/desktop/vendor/faces/cli/src/mcp.js +3 -0
  264. package/vendor/desktop/vendor/faces/cli/src/models.js +3 -0
  265. package/vendor/desktop/vendor/faces/cli/src/naming.js +3 -0
  266. package/vendor/desktop/vendor/faces/cli/src/overlays.js +3 -0
  267. package/vendor/desktop/vendor/faces/cli/src/panels.js +3 -0
  268. package/vendor/desktop/vendor/faces/cli/src/permissions.js +3 -0
  269. package/vendor/desktop/vendor/faces/cli/src/ping.js +3 -0
  270. package/vendor/desktop/vendor/faces/cli/src/presence.js +3 -0
  271. package/vendor/desktop/vendor/faces/cli/src/provenance.js +58 -0
  272. package/vendor/desktop/vendor/faces/cli/src/provenance.lock.json +36 -0
  273. package/vendor/desktop/vendor/faces/cli/src/render.js +3 -0
  274. package/vendor/desktop/vendor/faces/cli/src/screen.js +3 -0
  275. package/vendor/desktop/vendor/faces/cli/src/screens.js +3 -0
  276. package/vendor/desktop/vendor/faces/cli/src/secret.js +3 -0
  277. package/vendor/desktop/vendor/faces/cli/src/securefs.js +3 -0
  278. package/vendor/desktop/vendor/faces/cli/src/settings.js +3 -0
  279. package/vendor/desktop/vendor/faces/cli/src/shared.js +3 -0
  280. package/vendor/desktop/vendor/faces/cli/src/sharedpaths.js +3 -0
  281. package/vendor/desktop/vendor/faces/cli/src/signup.js +3 -0
  282. package/vendor/desktop/vendor/faces/cli/src/summarize.js +3 -0
  283. package/vendor/desktop/vendor/faces/cli/src/sysdiag.js +3 -0
  284. package/vendor/desktop/vendor/faces/cli/src/system.js +3 -0
  285. package/vendor/desktop/vendor/faces/cli/src/theme.js +3 -0
  286. package/vendor/desktop/vendor/faces/cli/src/title.js +3 -0
  287. package/vendor/desktop/vendor/faces/cli/src/todos.js +3 -0
  288. package/vendor/desktop/vendor/faces/cli/src/tokens.js +3 -0
  289. package/vendor/desktop/vendor/faces/cli/src/topup.js +3 -0
  290. package/vendor/desktop/vendor/faces/cli/src/update.js +3 -0
  291. package/vendor/desktop/vendor/faces/cli/vendor/client/aegis.js +4 -0
  292. package/vendor/desktop/vendor/faces/cli/vendor/client/attest.js +3 -0
  293. package/vendor/desktop/vendor/faces/cli/vendor/client/authorship-key.js +3 -0
  294. package/vendor/desktop/vendor/faces/cli/vendor/client/auto-provision.js +3 -0
  295. package/vendor/desktop/vendor/faces/cli/vendor/client/brain-catalog.js +3 -0
  296. package/vendor/desktop/vendor/faces/cli/vendor/client/byok-catalog.js +3 -0
  297. package/vendor/desktop/vendor/faces/cli/vendor/client/catalog-client.js +3 -0
  298. package/vendor/desktop/vendor/faces/cli/vendor/client/conversation-export.js +3 -0
  299. package/vendor/desktop/vendor/faces/cli/vendor/client/credentials.js +3 -0
  300. package/vendor/desktop/vendor/faces/cli/vendor/client/device-fingerprint.js +3 -0
  301. package/vendor/desktop/vendor/faces/cli/vendor/client/drive-connect.js +3 -0
  302. package/vendor/desktop/vendor/faces/cli/vendor/client/drive-upload.js +3 -0
  303. package/vendor/desktop/vendor/faces/cli/vendor/client/env-file.js +3 -0
  304. package/vendor/desktop/vendor/faces/cli/vendor/client/fingerprint.js +3 -0
  305. package/vendor/desktop/vendor/faces/cli/vendor/client/foreign-memory.js +3 -0
  306. package/vendor/desktop/vendor/faces/cli/vendor/client/google-signin.js +3 -0
  307. package/vendor/desktop/vendor/faces/cli/vendor/client/hooks.js +3 -0
  308. package/vendor/desktop/vendor/faces/cli/vendor/client/model-discovery.js +3 -0
  309. package/vendor/desktop/vendor/faces/cli/vendor/client/naming.js +3 -0
  310. package/vendor/desktop/vendor/faces/cli/vendor/client/platform.js +3 -0
  311. package/vendor/desktop/vendor/faces/cli/vendor/client/prefs.js +3 -0
  312. package/vendor/desktop/vendor/faces/cli/vendor/client/presence-constants.js +3 -0
  313. package/vendor/desktop/vendor/faces/cli/vendor/client/presence.js +3 -0
  314. package/vendor/desktop/vendor/faces/cli/vendor/client/record-vault.js +105 -0
  315. package/vendor/desktop/vendor/faces/cli/vendor/client/session-store.js +3 -0
  316. package/vendor/desktop/vendor/faces/cli/vendor/client/topup.js +3 -0
  317. package/vendor/desktop/vendor/faces/cli/vendor/client/touch.js +3 -0
  318. package/vendor/desktop/vendor/faces/cli/vendor/client/update.js +3 -0
  319. package/vendor/desktop/vendor/faces/cli/vendor/client/user-models.js +3 -0
  320. package/vendor/desktop/vendor/faces/cli/vendor/covenant/README.md +21 -0
  321. package/vendor/desktop/vendor/faces/cli/vendor/covenant/aegis.seal +177 -0
  322. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/aegis-seal.mjs +241 -0
  323. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/agents.js +3 -0
  324. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/attachments.js +3 -0
  325. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/autonomous.js +3 -0
  326. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/claude-pro.js +3 -0
  327. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/context.js +3 -0
  328. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/covenant.js +567 -0
  329. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/engine.js +3 -0
  330. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/entitlement.js +3 -0
  331. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/exec-plan.js +3 -0
  332. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/git-scope.js +3 -0
  333. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/integrity.js +3 -0
  334. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/local.js +3 -0
  335. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/prompt.js +3 -0
  336. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/queue.js +3 -0
  337. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/session-rounds.js +3 -0
  338. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/shell.js +3 -0
  339. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/spill.js +3 -0
  340. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/tools.js +3 -0
  341. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/turn-guard.js +3 -0
  342. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/worktree-lock.js +3 -0
  343. package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/settings.js +3 -0
  344. package/vendor/desktop/vendor/faces/cli/vendor/desktop/main.js +4 -0
  345. package/vendor/desktop/vendor/faces/cli/vendor/desktop/renderer/usage.js +3 -0
  346. package/vendor/desktop/vendor/faces/cli/vendor/hosts/install.js +1 -0
  347. package/vendor/desktop/vendor/faces/cli/vendor/hosts/openai-shim.js +2 -0
  348. package/vendor/desktop/vendor/faces/cli/vendor/hosts/spec.js +1 -0
  349. package/vendor/desktop/vendor/faces/cli/vendor/hosts/targets.js +1 -0
  350. package/vendor/desktop/vendor/faces/cli/vendor/mcp/server.js +4 -0
  351. package/vendor/desktop/vendor/faces/cli/vendor/mcp/tools.js +3 -0
  352. package/vendor/desktop/vendor/faces/cli/vendor/one/src/child.js +3 -0
  353. package/vendor/desktop/vendor/faces/cli/vendor/one/src/permissions.js +3 -0
  354. package/vendor/desktop/vendor/faces/cli/vendor/one/src/selfhost.js +3 -0
  355. package/vendor/desktop/vendor/faces/cli/vendor/tools/agent-gate.mjs +1203 -0
  356. package/vendor/desktop/vendor/fingerprint.js +1 -1064
  357. package/vendor/desktop/vendor/foreign-memory.js +1 -669
  358. package/vendor/desktop/vendor/google-signin.js +1 -133
  359. package/vendor/desktop/vendor/hooks.js +1 -430
  360. package/vendor/desktop/vendor/model-discovery.js +1 -373
  361. package/vendor/desktop/vendor/naming.js +1 -283
  362. package/vendor/desktop/vendor/platform.js +1 -937
  363. package/vendor/desktop/vendor/prefs.js +1 -351
  364. package/vendor/desktop/vendor/presence-constants.js +1 -107
  365. package/vendor/desktop/vendor/presence.js +1 -438
  366. package/vendor/desktop/vendor/record-vault.js +3 -1055
  367. package/vendor/desktop/vendor/selfhost.js +3 -0
  368. package/vendor/desktop/vendor/session-store.js +1 -575
  369. package/vendor/desktop/vendor/topup.js +1 -297
  370. package/vendor/desktop/vendor/touch.js +1 -458
  371. package/vendor/desktop/vendor/update.js +1 -763
  372. package/vendor/desktop/vendor/user-models.js +1 -381
@@ -1,357 +1,3 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-or-later
2
2
  // Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
3
- // AEGIS Code (aegiscode) — source: https://github.com/aegisinfo/aegiscode-plugin
4
- // Conveying a modified copy, or running one as a network service, owes the
5
- // corresponding source under this licence (§5/§13) — see LICENSING.md.
6
- 'use strict';
7
-
8
- /**
9
- * entitlement.js — the terminal host's binding to the SHARED Pro gate.
10
- *
11
- * WHY THIS FILE EXISTS (and why it is six lines of real work). The gate that
12
- * decides who may spend the fan-out lives in
13
- * `desktop/lib/local/entitlement.js`, and the CLI has been the leak since the
14
- * day it landed: `autonomous.js` drives the SAME queue file through the SAME
15
- * worker, `createWorker` takes a `canFanOut` predicate, and the CLI simply
16
- * never passed one — so it defaulted to `() => true`. A task queued with
17
- * `--workers 8` or written into queue.jsonl by hand fans out on the free tier
18
- * from `ssh box 'aegiscode autonomous proceed'`, costing the multiplier the
19
- * gate exists to withhold, with no window and nobody to ask.
20
- *
21
- * The desktop's own comment named this as a known gap ("the CLI's own drain is
22
- * a different host with no session to ask"). It had a session — it has the same
23
- * account key in the same 0600 store, read through the same shared client. It
24
- * was a wiring omission, not an architectural one.
25
- *
26
- * TWO THINGS ARE HOST-SPECIFIC, and both are handled by the shared module's own
27
- * seams rather than reimplemented here:
28
- *
29
- * 1. THE CHANNEL. `host: 'cli'` makes every refusal link
30
- * `/go/upgrade?s=cli&…`, so a terminal click is filed as a CLI conversion
31
- * instead of a desktop one. The desktop's literals hardcode `s=desktop`;
32
- * printing one from the terminal would have quietly moved every CLI
33
- * conversion into the desktop's column.
34
- * 2. THE PROBE. The CLI has no Electron session, so it builds the same
35
- * reading the desktop builds — `verifyApiKey()` for the plan plus
36
- * `tokenBankBalance()` for the operator's balance — from the shared client
37
- * directly.
38
- *
39
- * Not reimplemented, deliberately: the plan vocabulary, the balance
40
- * interpretation, the fail-closed rules, the refusal copy, the campaign ids.
41
- * Two implementations of "is this account paid" is exactly how the terminal and
42
- * the GUI would come to disagree about who owes money — and the disagreement
43
- * would spend real money, in whichever host had the looser copy.
44
- *
45
- * Wired through `sharedpaths.js` (paths, no eager requires) rather than
46
- * `deps.js`, because `deps.js` eagerly loads `autonomous.js`, which loads THIS
47
- * file back: requiring deps.js here would be a require cycle handing one side a
48
- * half-built exports object. Same reason `sharedpaths.js` was split out.
49
- */
50
-
51
- const { resolveShared } = require('./sharedpaths.js');
52
- // The renderers' waiver rule, published to on every reading this gate takes —
53
- // see `createCliEntitlement` below. `format.js` requires nothing from here, so
54
- // this is a one-way edge and not a cycle.
55
- const { noteTier } = require('./format.js');
56
-
57
- /** The shared decision, resolved by existence (repo checkout or staged tree). */
58
- function loadModule() {
59
- // eslint-disable-next-line global-require
60
- return require(resolveShared('desktop/lib/local/entitlement.js'));
61
- }
62
-
63
- /** The shared thin transport, same two-layout resolution as deps.js. */
64
- function loadClient() {
65
- // eslint-disable-next-line global-require
66
- const { createClient } = require(resolveShared('client/aegis.js'));
67
- const credentials = require('./credentials.js');
68
- return createClient(credentials.clientOptions({ channel: 'cli' }));
69
- }
70
-
71
- /**
72
- * The account probe, shaped exactly as the desktop builds it.
73
- *
74
- * A failed balance call leaves the balance UNKNOWN rather than inventing a
75
- * zero: an unreadable bank must never manufacture a top-up prompt, and
76
- * `classifyProbe` fails closed on the unknown anyway. Both calls are read-only
77
- * and neither writes server-side — the gate observes the operator's number, it
78
- * never sets one.
79
- */
80
- function buildProbe(aegis) {
81
- if (!aegis || typeof aegis.verifyApiKey !== 'function') return undefined;
82
- return async () => {
83
- const verify = await aegis.verifyApiKey();
84
- const body = verify && typeof verify === 'object' ? { ...verify } : {};
85
- if (typeof aegis.tokenBankBalance === 'function') {
86
- try {
87
- const bank = await aegis.tokenBankBalance();
88
- if (bank && typeof bank === 'object') {
89
- if (bank.balance_micros != null) body.balance_micros = bank.balance_micros;
90
- else if (bank.balance_eur != null) body.balance_eur = bank.balance_eur;
91
- }
92
- } catch {
93
- // Unknown stays unknown — see the docstring above.
94
- }
95
- }
96
- return body;
97
- };
98
- }
99
-
100
- /**
101
- * The gate for one CLI process, reading the SAME account the desktop reads.
102
- *
103
- * `host: 'cli'` is the whole reason campaign links can be trusted from here.
104
- * Returns the shared gate object: `{ refresh, current, gateFanout }`.
105
- */
106
- function createCliEntitlement({ aegis, now, ttlMs } = {}) {
107
- const mod = loadModule();
108
- const client = aegis || loadClient();
109
- const gate = mod.createEntitlement({
110
- probe: buildProbe(client),
111
- host: 'cli',
112
- ...(now ? { now } : {}),
113
- ...(ttlMs ? { ttlMs } : {}),
114
- });
115
- // Publish every reading this gate takes to the renderers' waiver rule
116
- // (`format.js` → `feeWaived`). The gate is what decides whether a turn is
117
- // ALLOWED; the waiver decides whether a `€0.0031` is PRINTED under it, and the
118
- // two reading different tiers is how a trial account ended up shown a fee it
119
- // does not owe. Wrapping the instance rather than returning a copy keeps the
120
- // method identity the rest of the host already holds a reference to.
121
- if (gate && typeof gate.current === 'function') {
122
- const read = gate.current.bind(gate);
123
- try {
124
- gate.current = (...args) => {
125
- const snap = read(...args);
126
- noteTier(snap);
127
- return snap;
128
- };
129
- if (typeof gate.refresh === 'function') {
130
- const refresh = gate.refresh.bind(gate);
131
- gate.refresh = async (...args) => {
132
- const out = await refresh(...args);
133
- try { noteTier(read()); } catch { /* a failed read publishes nothing */ }
134
- return out;
135
- };
136
- }
137
- } catch { /* a frozen instance is readable, just not publishable */ }
138
- }
139
- return gate;
140
- }
141
-
142
- // ── the payment surface ─────────────────────────────────────────────────────
143
-
144
- /**
145
- * The copy every paid prompt in this host prints, read from the SHARED module
146
- * when it resolves and from a frozen literal when it does not.
147
- *
148
- * Why a fallback at all: `loadModule()` requires a file that exists in a source
149
- * checkout and in the `predist` staging tree, but the CLI also ships as an npm
150
- * tarball where the shared modules live under `vendor/` — and a `/billing`
151
- * panel that threw on a lookup would take the whole command down rather than
152
- * show a user the one screen that can take their money. The literals below are
153
- * therefore a COPY of the shared constants, and `test/cli-billing-payment.test.mjs`
154
- * asserts copy === shared module so the copy cannot drift silently; if the
155
- * shared module resolves, its strings win and the literal is never printed.
156
- */
157
- const FALLBACK_COPY = Object.freeze({
158
- paidReason: 'Pro puts the drain in the cloud, so the job keeps running after you close the laptop',
159
- honesty:
160
- 'Everything on your machine is free, permanently. The cloud drain is what you pay for.',
161
- ask: 'Do X autonomously',
162
- });
163
-
164
- /** The two walls, and the campaign id each one owns. Same ids the plan fixed
165
- * (`status_card` for "an account prompt on a status/billing surface",
166
- * `topup_bank` for the bank running dry) and the same ones aegis1 accepts. */
167
- const BILLING_WALL = Object.freeze({ campaign: 'status_card', page: 'upgrade' });
168
- const BALANCE_WALL = Object.freeze({ campaign: 'topup_bank', page: 'topup' });
169
-
170
- /**
171
- * The shared module, or undefined — resolved once and remembered, because
172
- * `/billing` is a hot path for a user staring at a wall and a filesystem probe
173
- * per panel render buys nothing. A `require` that throws is cached as
174
- * undefined; the literals above are the answer from then on.
175
- */
176
- let sharedCache;
177
- function shared() {
178
- if (sharedCache !== undefined) return sharedCache || undefined;
179
- try {
180
- sharedCache = loadModule();
181
- } catch {
182
- sharedCache = null;
183
- }
184
- return sharedCache || undefined;
185
- }
186
-
187
- /** The sentences a paid prompt prints, shared-first. */
188
- function paymentCopy() {
189
- const mod = shared();
190
- return {
191
- paidReason: str(mod && mod.PRO_VALUE, FALLBACK_COPY.paidReason),
192
- honesty: str(mod && mod.FREE_HONESTY, FALLBACK_COPY.honesty),
193
- ask: str(mod && mod.ASK_EXAMPLE, FALLBACK_COPY.ask),
194
- };
195
- }
196
-
197
- function str(v, fallback) {
198
- const s = v == null ? '' : String(v);
199
- return s.trim() ? s : fallback;
200
- }
201
-
202
- /**
203
- * The campaign-tagged link a wall sends someone to. Built here rather than in
204
- * `panels.js` so the channel is `s=cli` by construction: the shared module's
205
- * own URL literals hardcode `s=desktop` (they predate the host seam), and
206
- * printing one from a terminal would file every terminal click as a desktop
207
- * conversion — the silent zero `/go/` exists to prevent.
208
- *
209
- * `goUrl` is preferred when the shared module resolves (one implementation, and
210
- * it validates the channel against aegis1's accepted set); the fallback spells
211
- * the same URL for hosts that cannot resolve it.
212
- */
213
- function paymentUrl(wall) {
214
- const mod = shared();
215
- if (mod && typeof mod.goUrl === 'function') {
216
- try {
217
- return mod.goUrl(wall.page, wall.campaign, 'cli');
218
- } catch {
219
- // Fall through to the literal below — a link is better than a throw.
220
- }
221
- }
222
- return `https://aegiscloud.org/go/${wall.page}?s=cli&c=${wall.campaign}`;
223
- }
224
-
225
- /**
226
- * The payment view for a surface that is allowed to ask: plain data, formatted
227
- * by `panels.buildBilling` which stays pure (it renders what it is handed and
228
- * never probes).
229
- *
230
- * `snapshot` is the shared gate's `current()`. The verdict is read through the
231
- * MODULE's own rules — `entitled` is `pro || banked` — so this host cannot
232
- * arrive at a different answer than the drain does about who owes money. The
233
- * only branch taken here is which WALL the user is in front of, and that is the
234
- * module's own `wall` field:
235
- *
236
- * entitled → the offer is already owned; state it, ask nothing
237
- * wall === 'balance' → the bank ran dry: top up (campaign `topup_bank`)
238
- * anything else / free → Pro (campaign `status_card`)
239
- *
240
- * `degraded` (no real answer: timeout, no key, unreadable body) still renders
241
- * the offer — the panel is allowed to sell — but it is reported as `verified:
242
- * false` so the caller can say the verdict was not confirmed rather than
243
- * presenting a timeout as a fact about the account.
244
- */
245
- /**
246
- * The BYOK handling fee, as the TERMINAL renders it.
247
- *
248
- * Formatting only — the words and the numbers both come from one place: the
249
- * rate is aegis1's published payload (never a literal here, or the two hosts
250
- * drift from the ledger), and the sentence is the shared module's
251
- * `byokFeeLine`, so the GUI and the terminal cannot describe the relay's price
252
- * differently. `line === ''` means "no published fee" and every caller must
253
- * then say nothing at all rather than guess.
254
- */
255
- function feeView(fee) {
256
- const f = fee && typeof fee === 'object' ? fee : null;
257
- let line = '';
258
- try {
259
- const mod = loadModule();
260
- if (typeof mod.byokFeeLine === 'function') line = String(mod.byokFeeLine(f) || '');
261
- } catch {
262
- // No shared module (staged tree without the host payload): silence, which
263
- // is the honest reading of "this host cannot price the lane right now".
264
- line = '';
265
- }
266
- return {
267
- line,
268
- published: line !== '',
269
- // Enforcement, not price. A host that knows the relay demands an account
270
- // can say so before the user meets the 402 instead of after.
271
- accountRequired: !!(f && f.require_account === true),
272
- anonymousDailyCalls: f && Number.isFinite(Number(f.anonymous_daily_calls))
273
- ? Number(f.anonymous_daily_calls) : 0,
274
- gateMode: f && typeof f.gate_mode === 'string' ? f.gate_mode : '',
275
- };
276
- }
277
-
278
- /**
279
- * Fetch the server's published BYOK fee. Non-throwing, and offline it returns
280
- * null — the fee is disclosure, not a gate, so a failed read must not turn
281
- * `/billing` into an error the user has to interpret.
282
- */
283
- async function probeFee() {
284
- try {
285
- const client = loadClient();
286
- if (!client || typeof client.byokProviders !== 'function') return null;
287
- const data = await client.byokProviders();
288
- return (data && data.fee) || null;
289
- } catch {
290
- return null;
291
- }
292
- }
293
-
294
- function paymentView(snapshot, { host = 'cli', fee = null } = {}) {
295
- const copy = paymentCopy();
296
- const snap = snapshot && typeof snapshot === 'object' ? snapshot : {};
297
- const entitled = snap.entitled === true;
298
- const feeLine = feeView(fee).line;
299
- const wall = entitled ? 'owned' : snap.wall === 'balance' ? 'balance' : 'plan';
300
- // The paid tier's NAME, resolved from the server's plan string. `unlimited`
301
- // is the tier currently sold (€9/mo); `pro` is the grandfathered €2 line —
302
- // still paid, still named Pro, but no longer offered to anyone. The shared
303
- // module's own `tierName` (TIER_NAMES) wins when the snapshot carries one, so
304
- // this host cannot disagree with the gate about which tier was granted.
305
- const tierName =
306
- snap.tierName ||
307
- { unlimited: 'Unlimited', pro: 'Pro' }[String(snap.plan || '').toLowerCase()] ||
308
- 'Unlimited';
309
- const which = wall === 'balance' ? BALANCE_WALL : BILLING_WALL;
310
- return {
311
- host,
312
- wall,
313
- entitled,
314
- // "The module actually answered." `degraded` is the module's own flag for
315
- // "no real answer" (timeout, no plan field, no probe), and it must ALSO have
316
- // named where the verdict came from — an unresolved boot snapshot has
317
- // `degraded === false` only because nothing ever ran, and reporting that as
318
- // verified would present "we never asked" as a fact about the account.
319
- // Derived from the module's two fields rather than from the plan string, so
320
- // this host never re-decides what counts as knowledge.
321
- verified: snap.degraded === false && typeof snap.source === 'string' && snap.source !== '',
322
- plan: snap.plan ? String(snap.plan) : 'free',
323
- paid: entitled,
324
- reason: copy.paidReason,
325
- honesty: copy.honesty,
326
- ask: copy.ask,
327
- // No link once the offer is owned: a paying customer being sold the thing
328
- // they already bought is the one prompt that can only lose money.
329
- url: entitled ? '' : paymentUrl(which),
330
- campaign: entitled ? '' : which.campaign,
331
- // The BYOK lane's price, from the server's own published rate. Empty when
332
- // the server published none — never a client-side guess (see the shared
333
- // module's byokFeeLine). This is the sentence that closes the one place the
334
- // bill and the pitch disagreed: a user was told BYOK costs "your provider's
335
- // cost" while aegis1 charged a handling fee on top of it.
336
- byok: feeLine,
337
- label: entitled ? tierName : wall === 'balance' ? 'Top up' : 'Upgrade',
338
- unlock:
339
- wall === 'balance'
340
- ? 'Unlock: top up the Token Bank, or upgrade to Unlimited'
341
- : 'Unlock: Unlimited, or any Token Bank balance',
342
- };
343
- }
344
-
345
- module.exports = {
346
- createCliEntitlement,
347
- buildProbe,
348
- loadModule,
349
- paymentView,
350
- paymentCopy,
351
- feeView,
352
- probeFee,
353
- paymentUrl,
354
- FALLBACK_COPY,
355
- BILLING_WALL,
356
- BALANCE_WALL,
357
- };
3
+ "use strict";const{resolveShared:resolveShared}=require("./sharedpaths.js"),{noteTier:noteTier}=require("./format.js");function loadModule(){return require(resolveShared("desktop/lib/local/entitlement.js"))}function loadClient(){const{createClient:e}=require(resolveShared("client/aegis.js"));return e(require("./credentials.js").clientOptions({channel:"cli"}))}function buildProbe(e){if(e&&"function"==typeof e.verifyApiKey)return async()=>{const n=await e.verifyApiKey(),t=n&&"object"==typeof n?{...n}:{};if("function"==typeof e.tokenBankBalance)try{const n=await e.tokenBankBalance();n&&"object"==typeof n&&(null!=n.balance_micros?t.balance_micros=n.balance_micros:null!=n.balance_eur&&(t.balance_eur=n.balance_eur))}catch{}return t}}function createCliEntitlement({aegis:e,now:n,ttlMs:t}={}){const a=loadModule(),o=e||loadClient(),r=a.createEntitlement({probe:buildProbe(o),host:"cli",...n?{now:n}:{},...t?{ttlMs:t}:{}});if(r&&"function"==typeof r.current){const e=r.current.bind(r);try{if(r.current=(...n)=>{const t=e(...n);return noteTier(t),t},"function"==typeof r.refresh){const n=r.refresh.bind(r);r.refresh=async(...t)=>{const a=await n(...t);try{noteTier(e())}catch{}return a}}}catch{}}return r}const FALLBACK_COPY=Object.freeze({paidReason:"Pro puts the drain in the cloud, so the job keeps running after you close the laptop",honesty:"Everything on your machine is free, permanently. The cloud drain is what you pay for.",ask:"Do X autonomously"}),BILLING_WALL=Object.freeze({campaign:"status_card",page:"upgrade"}),BALANCE_WALL=Object.freeze({campaign:"topup_bank",page:"topup"});let sharedCache;function shared(){if(void 0!==sharedCache)return sharedCache||void 0;try{sharedCache=loadModule()}catch{sharedCache=null}return sharedCache||void 0}function paymentCopy(){const e=shared();return{paidReason:str(e&&e.PRO_VALUE,FALLBACK_COPY.paidReason),honesty:str(e&&e.FREE_HONESTY,FALLBACK_COPY.honesty),ask:str(e&&e.ASK_EXAMPLE,FALLBACK_COPY.ask)}}function str(e,n){const t=null==e?"":String(e);return t.trim()?t:n}function paymentUrl(e){const n=shared();if(n&&"function"==typeof n.goUrl)try{return n.goUrl(e.page,e.campaign,"cli")}catch{}return`https://aegiscloud.org/go/${e.page}?s=cli&c=${e.campaign}`}function feeView(e){const n=e&&"object"==typeof e?e:null;let t="";try{const e=loadModule();"function"==typeof e.byokFeeLine&&(t=String(e.byokFeeLine(n)||""))}catch{t=""}return{line:t,published:""!==t,accountRequired:!(!n||!0!==n.require_account),anonymousDailyCalls:n&&Number.isFinite(Number(n.anonymous_daily_calls))?Number(n.anonymous_daily_calls):0,gateMode:n&&"string"==typeof n.gate_mode?n.gate_mode:""}}async function probeFee(){try{const e=loadClient();if(!e||"function"!=typeof e.byokProviders)return null;const n=await e.byokProviders();return n&&n.fee||null}catch{return null}}function paymentView(e,{host:n="cli",fee:t=null}={}){const a=paymentCopy(),o=e&&"object"==typeof e?e:{},r=!0===o.entitled,i=feeView(t).line,l=r?"owned":"balance"===o.wall?"balance":"plan",c=o.tierName||{unlimited:"Unlimited",pro:"Pro"}[String(o.plan||"").toLowerCase()]||"Unlimited",s="balance"===l?BALANCE_WALL:BILLING_WALL;return{host:n,wall:l,entitled:r,verified:!1===o.degraded&&"string"==typeof o.source&&""!==o.source,plan:o.plan?String(o.plan):"free",paid:r,reason:a.paidReason,honesty:a.honesty,ask:a.ask,url:r?"":paymentUrl(s),campaign:r?"":s.campaign,byok:i,label:r?c:"balance"===l?"Top up":"Upgrade",unlock:"balance"===l?"Unlock: top up the Token Bank, or upgrade to Unlimited":"Unlock: Unlimited, or any Token Bank balance"}}module.exports={createCliEntitlement:createCliEntitlement,buildProbe:buildProbe,loadModule:loadModule,paymentView:paymentView,paymentCopy:paymentCopy,feeView:feeView,probeFee:probeFee,paymentUrl:paymentUrl,FALLBACK_COPY:FALLBACK_COPY,BILLING_WALL:BILLING_WALL,BALANCE_WALL:BALANCE_WALL};