auramaxx 0.0.11 → 0.0.13

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 (342) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +240 -223
  3. package/.next/app-path-routes-manifest.json +8 -7
  4. package/.next/build-manifest.json +14 -14
  5. package/.next/prerender-manifest.json +53 -29
  6. package/.next/react-loadable-manifest.json +41 -41
  7. package/.next/routes-manifest.json +6 -0
  8. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/_not-found.html +1 -1
  10. package/.next/server/app/_not-found.rsc +12 -12
  11. package/.next/server/app/api/[...doc]/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/agent-requests/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/apps/install/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/apps/manifests/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/apps/static/[...path]/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/docs/plain/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/events/route.js +1 -19
  18. package/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/import-from-openclaw/[channel]/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/import-from-openclaw/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/import-from-openclaw/validate/[channel]/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/page_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/restart/route.js +1 -1
  24. package/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/update/route.js +63 -1
  26. package/.next/server/app/api/update/route.js.nft.json +1 -1
  27. package/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/version/route.js +1 -1
  29. package/.next/server/app/api/version/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/workspace/[id]/apps/[wid]/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/workspace/[id]/apps/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/workspace/[id]/export/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/workspace/[id]/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/workspace/config/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/workspace/import/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/workspace/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/app-legacy-do-not-use/page.js +1 -1
  38. package/.next/server/app/app-legacy-do-not-use/page.js.nft.json +1 -1
  39. package/.next/server/app/app-legacy-do-not-use/page_client-reference-manifest.js +1 -1
  40. package/.next/server/app/app-legacy-do-not-use.html +1 -1
  41. package/.next/server/app/app-legacy-do-not-use.rsc +14 -14
  42. package/.next/server/app/approve/[actionId]/page.js +1 -1
  43. package/.next/server/app/approve/[actionId]/page_client-reference-manifest.js +1 -1
  44. package/.next/server/app/docs/[...doc]/page_client-reference-manifest.js +1 -1
  45. package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  46. package/.next/server/app/health/page_client-reference-manifest.js +1 -1
  47. package/.next/server/app/health.html +1 -1
  48. package/.next/server/app/health.rsc +13 -13
  49. package/.next/server/app/hello/page_client-reference-manifest.js +1 -1
  50. package/.next/server/app/hello.html +1 -1
  51. package/.next/server/app/hello.rsc +14 -14
  52. package/.next/server/app/index.html +1 -1
  53. package/.next/server/app/index.rsc +18 -21
  54. package/.next/server/app/page.js +3 -3
  55. package/.next/server/app/page.js.nft.json +1 -1
  56. package/.next/server/app/page_client-reference-manifest.js +1 -1
  57. package/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
  58. package/.next/server/app/privacy.html +1 -1
  59. package/.next/server/app/privacy.rsc +13 -13
  60. package/.next/server/app/share/[token]/page_client-reference-manifest.js +1 -1
  61. package/.next/server/app/terms/page_client-reference-manifest.js +1 -1
  62. package/.next/server/app/terms.html +1 -1
  63. package/.next/server/app/terms.rsc +13 -13
  64. package/.next/server/app/yo/page.js +2 -0
  65. package/.next/server/app/yo/page.js.nft.json +1 -0
  66. package/.next/server/app/yo/page_client-reference-manifest.js +1 -0
  67. package/.next/server/app/yo.html +1 -0
  68. package/.next/server/app/yo.meta +7 -0
  69. package/.next/server/app/yo.rsc +23 -0
  70. package/.next/server/app-paths-manifest.json +8 -7
  71. package/.next/server/chunks/2145.js +1 -1
  72. package/.next/server/chunks/2460.js +1 -1
  73. package/.next/server/chunks/5246.js +1 -1
  74. package/.next/server/chunks/5678.js +1 -1
  75. package/.next/server/chunks/5784.js +1 -1
  76. package/.next/server/chunks/6086.js +2 -20
  77. package/.next/server/chunks/{5553.js → 6415.js} +2 -2
  78. package/.next/server/chunks/7935.js +2 -2
  79. package/.next/server/functions-config-manifest.json +1 -1
  80. package/.next/server/instrumentation.js +1 -1
  81. package/.next/server/middleware-build-manifest.js +1 -1
  82. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  83. package/.next/server/pages/404.html +1 -1
  84. package/.next/server/pages/500.html +1 -1
  85. package/.next/server/server-reference-manifest.json +1 -1
  86. package/.next/server/webpack-runtime.js +1 -1
  87. package/.next/static/WshFGr6RxGYP6AbWuT9OG/_buildManifest.js +1 -0
  88. package/.next/static/chunks/1168.aaac1edbb597fe5a.js +1 -0
  89. package/.next/static/chunks/1255-7999eac54f80a49f.js +1 -0
  90. package/.next/static/chunks/142-fa9752f53a551f63.js +1 -0
  91. package/.next/static/chunks/2505.d54ccadc42f4e3d1.js +1 -0
  92. package/.next/static/chunks/2619-04bc32f026a0d946.js +1 -0
  93. package/.next/static/chunks/2927.7e00cc878d9a3f52.js +1 -0
  94. package/.next/static/chunks/3573-1b41d7b8a000d015.js +1 -0
  95. package/.next/static/chunks/3609.ded5a5306e18af9c.js +1 -0
  96. package/.next/static/chunks/3667-1db7bd03948e60df.js +1 -0
  97. package/.next/static/chunks/3826.a73d4a88d8c09030.js +1 -0
  98. package/.next/static/chunks/{3a91511d-648a2ba3dad7df0c.js → 3a91511d-ba215c0b5dc21ba9.js} +1 -1
  99. package/.next/static/chunks/4256.48407d9abad5ea33.js +1 -0
  100. package/.next/static/chunks/4685-7f53bbfc4a9845eb.js +1 -0
  101. package/.next/static/chunks/4901-ba6a32818662e70a.js +1 -0
  102. package/.next/static/chunks/4919-7e7cdd5efc9f2110.js +1 -0
  103. package/.next/static/chunks/4bd1b696-100b9d70ed4e49c1.js +1 -0
  104. package/.next/static/chunks/5336-233ec7ab3807267c.js +1 -0
  105. package/.next/static/chunks/5442-b5bb869e832e8967.js +1 -0
  106. package/.next/static/chunks/6233-97a810aa272af547.js +1 -0
  107. package/.next/static/chunks/626.a5109d16f9eca1f6.js +1 -0
  108. package/.next/static/chunks/6872-faea0f088ab2d450.js +1 -0
  109. package/.next/static/chunks/7338-3ce17a93614f1d77.js +59 -0
  110. package/.next/static/chunks/7394-4bdb1feefad1a74a.js +1 -0
  111. package/.next/static/chunks/7616-1129bcb3eee8d315.js +1 -0
  112. package/.next/static/chunks/786-26deffb41572cbb3.js +1 -0
  113. package/.next/static/chunks/8273-8e92d34180669ca9.js +1 -0
  114. package/.next/static/chunks/8357.5dee1e0c4e5bb091.js +1 -0
  115. package/.next/static/chunks/9062-2bc2d089f9c9c6ba.js +1 -0
  116. package/.next/static/chunks/9380.f198afbf0c6b5369.js +1 -0
  117. package/.next/static/chunks/app/_not-found/page-5a8c6a29f762fa58.js +1 -0
  118. package/.next/static/chunks/app/api/[...doc]/page-f0852f35f0fd1d44.js +1 -0
  119. package/.next/static/chunks/app/api/agent-requests/route-cf84f975aad4c719.js +1 -0
  120. package/.next/static/chunks/app/api/apps/install/route-cf84f975aad4c719.js +1 -0
  121. package/.next/static/chunks/app/api/apps/manifests/route-cf84f975aad4c719.js +1 -0
  122. package/.next/static/chunks/app/api/apps/static/[...path]/route-cf84f975aad4c719.js +1 -0
  123. package/.next/static/chunks/app/api/docs/plain/route-cf84f975aad4c719.js +1 -0
  124. package/.next/static/chunks/app/api/events/route-cf84f975aad4c719.js +1 -0
  125. package/.next/static/chunks/app/api/import-from-openclaw/[channel]/route-cf84f975aad4c719.js +1 -0
  126. package/.next/static/chunks/app/api/import-from-openclaw/route-cf84f975aad4c719.js +1 -0
  127. package/.next/static/chunks/app/api/import-from-openclaw/validate/[channel]/route-cf84f975aad4c719.js +1 -0
  128. package/.next/static/chunks/app/api/page-cc59bebcc0d2c01d.js +1 -0
  129. package/.next/static/chunks/app/api/restart/route-cf84f975aad4c719.js +1 -0
  130. package/.next/static/chunks/app/api/update/route-cf84f975aad4c719.js +1 -0
  131. package/.next/static/chunks/app/api/version/route-cf84f975aad4c719.js +1 -0
  132. package/.next/static/chunks/app/api/workspace/[id]/apps/[wid]/route-cf84f975aad4c719.js +1 -0
  133. package/.next/static/chunks/app/api/workspace/[id]/apps/route-cf84f975aad4c719.js +1 -0
  134. package/.next/static/chunks/app/api/workspace/[id]/export/route-cf84f975aad4c719.js +1 -0
  135. package/.next/static/chunks/app/api/workspace/[id]/route-cf84f975aad4c719.js +1 -0
  136. package/.next/static/chunks/app/api/workspace/config/route-cf84f975aad4c719.js +1 -0
  137. package/.next/static/chunks/app/api/workspace/import/route-cf84f975aad4c719.js +1 -0
  138. package/.next/static/chunks/app/api/workspace/route-cf84f975aad4c719.js +1 -0
  139. package/.next/static/chunks/app/app-legacy-do-not-use/page-e5dc864e92d90ca7.js +1 -0
  140. package/.next/static/chunks/app/approve/[actionId]/page-2acca1f490424f21.js +1 -0
  141. package/.next/static/chunks/app/docs/[...doc]/page-8e2a2d036caab242.js +1 -0
  142. package/.next/static/chunks/app/docs/page-acf872a03ff79893.js +1 -0
  143. package/.next/static/chunks/app/error-66f983b7769dabfa.js +1 -0
  144. package/.next/static/chunks/app/health/page-c9185854ed9c86d0.js +1 -0
  145. package/.next/static/chunks/app/hello/page-74c9f4deaa4b03dd.js +1 -0
  146. package/.next/static/chunks/app/layout-af8d9969c7aeb758.js +1 -0
  147. package/.next/static/chunks/app/page-16dfcd1c7cc88bcc.js +1 -0
  148. package/.next/static/chunks/app/privacy/page-8e2d17079355c2cc.js +1 -0
  149. package/.next/static/chunks/app/share/[token]/page-5dd9b0418eee411f.js +1 -0
  150. package/.next/static/chunks/app/terms/page-8e2d17079355c2cc.js +1 -0
  151. package/.next/static/chunks/app/yo/layout-cf84f975aad4c719.js +1 -0
  152. package/.next/static/chunks/app/yo/page-719dc5f213fdfb30.js +1 -0
  153. package/.next/static/chunks/framework-a32a2a465584c0bc.js +1 -0
  154. package/.next/static/chunks/main-0f0f9142f74e7215.js +1 -0
  155. package/.next/static/chunks/main-app-24f0c92ba10af457.js +1 -0
  156. package/.next/static/chunks/pages/_app-4b3fb5e477a0267f.js +1 -0
  157. package/.next/static/chunks/pages/_error-c970d8b55ace1b48.js +1 -0
  158. package/.next/static/chunks/{webpack-768de8b7d6a7a27a.js → webpack-79ad58260e9b10b4.js} +1 -1
  159. package/.next/static/css/83cd401584ab787f.css +3 -0
  160. package/.next/trace +28 -28
  161. package/.next/types/app/yo/layout.ts +84 -0
  162. package/.next/types/app/yo/page.ts +84 -0
  163. package/.next/types/routes.d.ts +4 -2
  164. package/.next/types/validator.ts +18 -0
  165. package/bin/auramaxx.js +11 -26
  166. package/docs/ARCHITECTURE.md +1 -1
  167. package/docs/AUTH.md +6 -3
  168. package/docs/CLI.md +2 -0
  169. package/docs/MCP.md +2 -0
  170. package/docs/TROUBLESHOOTING.md +24 -0
  171. package/docs/credentials.md +2 -0
  172. package/package.json +2 -1
  173. package/prisma/migrations/20260227214000_update_agent_action_ttl_defaults/migration.sql +19 -0
  174. package/public/0a167e5e-4f52-4715-ae23-bf63d259a6b1.png +0 -0
  175. package/public/141ec92c-6780-4b23-838f-9a7bf1e91bb8.png +0 -0
  176. package/public/3afc4935-92cb-42af-9624-0b1341c12a5e.png +0 -0
  177. package/public/43947df5-dbcf-4e49-ab8b-41b9162c0410.png +0 -0
  178. package/public/5aeae9ce-0d38-49ea-8fd1-167892a04a85.png +0 -0
  179. package/public/660e4ea3-a3a6-4be4-a8ca-2cb74c51dfb5.png +0 -0
  180. package/public/733f02d7-6b58-4ba6-a5c8-d062cd205e1d.png +0 -0
  181. package/public/a32d65cb-95b0-4977-be6b-cf69f515afbe.png +0 -0
  182. package/public/agent1.png +0 -0
  183. package/public/agent10.png +0 -0
  184. package/public/agent2.png +0 -0
  185. package/public/agent3.png +0 -0
  186. package/public/agent4.png +0 -0
  187. package/public/agent5.png +0 -0
  188. package/public/agent6.png +0 -0
  189. package/public/agent7.png +0 -0
  190. package/public/agent8.png +0 -0
  191. package/public/agent9.png +0 -0
  192. package/public/c4938305-b811-4ccc-91db-94d309734827.png +0 -0
  193. package/public/f2ca6825-a4f3-4107-815c-51ee740dfc09.png +0 -0
  194. package/public/llm.txt +2 -0
  195. package/public/llms.txt +39 -0
  196. package/public/ss-dark1.png +0 -0
  197. package/public/ss-dark1.webp +0 -0
  198. package/public/ss-dark2.png +0 -0
  199. package/public/ss-dark2.webp +0 -0
  200. package/public/ss-dark3.png +0 -0
  201. package/public/ss-dark3.webp +0 -0
  202. package/public/ss-light1.png +0 -0
  203. package/public/ss-light1.webp +0 -0
  204. package/public/ss-light2.png +0 -0
  205. package/public/ss-light2.webp +0 -0
  206. package/public/ss-light3.png +0 -0
  207. package/public/ss-light3.webp +0 -0
  208. package/shared/agent-profile-schema.ts +81 -0
  209. package/shared/credential-field-schema.ts +12 -0
  210. package/skills/auramaxx/SKILL.md +71 -691
  211. package/src/app/UnlockPageClient.tsx +1939 -0
  212. package/src/app/api/page.tsx +8 -9
  213. package/src/app/api/restart/route.ts +2 -18
  214. package/src/app/api/update/route.ts +104 -51
  215. package/src/app/approve/[actionId]/page.tsx +4 -1
  216. package/src/app/docs/DocsPageContent.tsx +3 -3
  217. package/src/app/globals.css +94 -0
  218. package/src/app/layout.tsx +1 -0
  219. package/src/app/page.tsx +25 -1935
  220. package/src/app/yo/layout.tsx +29 -0
  221. package/src/app/yo/page.tsx +528 -0
  222. package/src/components/HumanActionBar.tsx +34 -8
  223. package/src/components/agent/AgentSidebar.tsx +3 -1
  224. package/src/components/agent/CredentialAgent.tsx +5 -1
  225. package/src/components/agent/CredentialDetail.tsx +32 -1
  226. package/src/components/agent/CredentialForm.tsx +94 -7
  227. package/src/components/agent/CredentialRow.tsx +8 -1
  228. package/src/components/agent/credentialFormName.ts +22 -1
  229. package/src/components/agent/types.ts +2 -2
  230. package/src/components/design-system/Modal.tsx +14 -1
  231. package/src/hooks/useUpdateChecker.ts +17 -1
  232. package/src/lib/pino.ts +77 -8
  233. package/src/server/cli/commands/actions.ts +1 -1
  234. package/src/server/cli/commands/agent.ts +110 -65
  235. package/src/server/cli/commands/approve.ts +1 -1
  236. package/src/server/cli/commands/auth.ts +81 -20
  237. package/src/server/cli/commands/start.ts +42 -3
  238. package/src/server/cli/commands/token.ts +2 -2
  239. package/src/server/cli/lib/escalation.ts +109 -24
  240. package/src/server/cli/lib/process.ts +54 -1
  241. package/src/server/cli/socket.ts +1 -1
  242. package/src/server/index.ts +2 -0
  243. package/src/server/lib/agent-profile-records.ts +72 -0
  244. package/src/server/lib/credential-transport.ts +27 -11
  245. package/src/server/lib/defaults.ts +3 -3
  246. package/src/server/lib/escalation-responder.ts +1 -1
  247. package/src/server/lib/resolve-action.ts +2 -2
  248. package/src/server/lib/update-check.ts +1 -1
  249. package/src/server/mcp/server.ts +6 -1
  250. package/src/server/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  251. package/src/server/routes/actions.ts +2 -2
  252. package/src/server/routes/agent-profiles.ts +82 -0
  253. package/src/server/routes/auth.ts +39 -4
  254. package/src/server/routes/credentials.ts +18 -0
  255. package/src/server/tests/cli/agent-auth.test.ts +20 -39
  256. package/src/server/tests/cli/agent.test.ts +18 -0
  257. package/src/server/tests/cli/auth-action-flag.test.ts +3 -2
  258. package/src/server/tests/cli/bin-entrypoint.test.ts +35 -11
  259. package/src/server/tests/cli/escalation.test.ts +7 -3
  260. package/src/server/tests/cli/process.test.ts +3 -3
  261. package/src/server/tests/cli/socket.test.ts +2 -2
  262. package/src/server/tests/cli/start-run.test.ts +24 -1
  263. package/src/server/tests/endpoints/actions.test.ts +2 -2
  264. package/src/server/tests/endpoints/agent-profiles.test.ts +117 -0
  265. package/src/server/tests/endpoints/auth.test.ts +34 -0
  266. package/src/server/tests/lib/credential-transport.test.ts +68 -2
  267. package/src/server/tests/lib/defaults.test.ts +2 -2
  268. package/src/server/tests/lib/escalation-responder.test.ts +2 -2
  269. package/src/server/tests/lib/update-check.test.ts +1 -1
  270. package/src/server/tests/setup.ts +7 -0
  271. package/src/server/tsconfig.tsbuildinfo +1 -1
  272. package/src/server/types.ts +1 -1
  273. package/.next/static/AcaCjQ4akovHBUnVGPpfN/_buildManifest.js +0 -1
  274. package/.next/static/chunks/1168.63dbb444a33b1867.js +0 -1
  275. package/.next/static/chunks/1255-e8718b02724690dd.js +0 -1
  276. package/.next/static/chunks/142-aeaf7ffa9c53516d.js +0 -1
  277. package/.next/static/chunks/2505.22aaa333fd65908f.js +0 -1
  278. package/.next/static/chunks/2619-3c9e02e22d10480a.js +0 -1
  279. package/.next/static/chunks/2927.e7e9e2a1b8d2dc61.js +0 -1
  280. package/.next/static/chunks/3573-27e17f4ff2dd86ed.js +0 -1
  281. package/.next/static/chunks/3609.6f8e0ecd6de9566c.js +0 -1
  282. package/.next/static/chunks/3667-d6770121629db38b.js +0 -1
  283. package/.next/static/chunks/3826.7dfe96467cd74e45.js +0 -1
  284. package/.next/static/chunks/4256.50cb375c979ffd5a.js +0 -1
  285. package/.next/static/chunks/4685-3f8d92f574366fec.js +0 -1
  286. package/.next/static/chunks/4901-54c1ac380b7b43bb.js +0 -1
  287. package/.next/static/chunks/4919-fe6f1553abfc9420.js +0 -1
  288. package/.next/static/chunks/4bd1b696-f785427dddbba9fb.js +0 -1
  289. package/.next/static/chunks/5336-bd251f91235f7c11.js +0 -1
  290. package/.next/static/chunks/5442-be197c885bf12079.js +0 -1
  291. package/.next/static/chunks/5553-c8b86fe3513fce04.js +0 -59
  292. package/.next/static/chunks/6233-44e6fe57a552a816.js +0 -1
  293. package/.next/static/chunks/626.2583673a0386a81b.js +0 -1
  294. package/.next/static/chunks/6872-6442f2f5cce36ce5.js +0 -1
  295. package/.next/static/chunks/7411-3ca797c21b722ccd.js +0 -1
  296. package/.next/static/chunks/7616-b8bd37ce1f735d6f.js +0 -1
  297. package/.next/static/chunks/786-9ed39f96091b2be4.js +0 -1
  298. package/.next/static/chunks/8273-922091226ba84a94.js +0 -1
  299. package/.next/static/chunks/8357.6159472717ff7d11.js +0 -1
  300. package/.next/static/chunks/9062-3eb1607c96486f88.js +0 -1
  301. package/.next/static/chunks/9380.93f361baab2eefdf.js +0 -1
  302. package/.next/static/chunks/app/_not-found/page-c3b87025baf0a9c2.js +0 -1
  303. package/.next/static/chunks/app/api/[...doc]/page-790c4b33ba1fde4a.js +0 -1
  304. package/.next/static/chunks/app/api/agent-requests/route-e83b12cbab2e8707.js +0 -1
  305. package/.next/static/chunks/app/api/apps/install/route-e83b12cbab2e8707.js +0 -1
  306. package/.next/static/chunks/app/api/apps/manifests/route-e83b12cbab2e8707.js +0 -1
  307. package/.next/static/chunks/app/api/apps/static/[...path]/route-e83b12cbab2e8707.js +0 -1
  308. package/.next/static/chunks/app/api/docs/plain/route-e83b12cbab2e8707.js +0 -1
  309. package/.next/static/chunks/app/api/events/route-e83b12cbab2e8707.js +0 -1
  310. package/.next/static/chunks/app/api/import-from-openclaw/[channel]/route-e83b12cbab2e8707.js +0 -1
  311. package/.next/static/chunks/app/api/import-from-openclaw/route-e83b12cbab2e8707.js +0 -1
  312. package/.next/static/chunks/app/api/import-from-openclaw/validate/[channel]/route-e83b12cbab2e8707.js +0 -1
  313. package/.next/static/chunks/app/api/page-b53f9aa17a4c5201.js +0 -1
  314. package/.next/static/chunks/app/api/restart/route-e83b12cbab2e8707.js +0 -1
  315. package/.next/static/chunks/app/api/update/route-e83b12cbab2e8707.js +0 -1
  316. package/.next/static/chunks/app/api/version/route-e83b12cbab2e8707.js +0 -1
  317. package/.next/static/chunks/app/api/workspace/[id]/apps/[wid]/route-e83b12cbab2e8707.js +0 -1
  318. package/.next/static/chunks/app/api/workspace/[id]/apps/route-e83b12cbab2e8707.js +0 -1
  319. package/.next/static/chunks/app/api/workspace/[id]/export/route-e83b12cbab2e8707.js +0 -1
  320. package/.next/static/chunks/app/api/workspace/[id]/route-e83b12cbab2e8707.js +0 -1
  321. package/.next/static/chunks/app/api/workspace/config/route-e83b12cbab2e8707.js +0 -1
  322. package/.next/static/chunks/app/api/workspace/import/route-e83b12cbab2e8707.js +0 -1
  323. package/.next/static/chunks/app/api/workspace/route-e83b12cbab2e8707.js +0 -1
  324. package/.next/static/chunks/app/app-legacy-do-not-use/page-0052191daef60036.js +0 -1
  325. package/.next/static/chunks/app/approve/[actionId]/page-45cd3b8fa062d5e5.js +0 -1
  326. package/.next/static/chunks/app/docs/[...doc]/page-632ac406200b66fe.js +0 -1
  327. package/.next/static/chunks/app/docs/page-b7556394709b43df.js +0 -1
  328. package/.next/static/chunks/app/error-3d6057da512253d8.js +0 -1
  329. package/.next/static/chunks/app/health/page-80c985cd72328b74.js +0 -1
  330. package/.next/static/chunks/app/hello/page-fd71babcd192729b.js +0 -1
  331. package/.next/static/chunks/app/layout-285c6ef3f16bae63.js +0 -1
  332. package/.next/static/chunks/app/page-85017185df14c37b.js +0 -1
  333. package/.next/static/chunks/app/privacy/page-faf36cd0dde6dfa3.js +0 -1
  334. package/.next/static/chunks/app/share/[token]/page-22d51d6c5a47bb75.js +0 -1
  335. package/.next/static/chunks/app/terms/page-faf36cd0dde6dfa3.js +0 -1
  336. package/.next/static/chunks/framework-e60c938074ff7136.js +0 -1
  337. package/.next/static/chunks/main-447abf206d7ebd2f.js +0 -1
  338. package/.next/static/chunks/main-app-f63b86bdbf5b7b88.js +0 -1
  339. package/.next/static/chunks/pages/_app-6c8c2371b16a04b8.js +0 -1
  340. package/.next/static/chunks/pages/_error-94812ad32cad7365.js +0 -1
  341. package/.next/static/css/eb25c6452113486f.css +0 -3
  342. /package/.next/static/{AcaCjQ4akovHBUnVGPpfN → WshFGr6RxGYP6AbWuT9OG}/_ssgManifest.js +0 -0
@@ -39,13 +39,11 @@ import {
39
39
  putApprovalContext,
40
40
  getClaimedToken,
41
41
  consumeClaimedToken,
42
- getActiveSessionToken,
43
- clearActiveSessionToken,
44
42
  } from '../lib/approval-context';
45
43
 
46
44
  // ── Auth ──────────────────────────────────────────────────────────────
47
45
 
48
- type AuthSource = 'socket' | 'env' | 'stored_session' | 'auth';
46
+ type AuthSource = 'socket' | 'env' | 'auth';
49
47
 
50
48
  interface AuthSession {
51
49
  token: string;
@@ -62,33 +60,15 @@ async function getAuthToken(
62
60
  return { token: envToken, source: 'env' };
63
61
  }
64
62
 
65
- const storedSession = getActiveSessionToken();
66
- if (storedSession?.token) {
67
- try {
68
- const validateRes = await fetch(`${serverUrl()}/auth/validate`, {
69
- method: 'POST',
70
- headers: { 'Content-Type': 'application/json' },
71
- body: JSON.stringify({ token: storedSession.token }),
72
- signal: AbortSignal.timeout(5_000),
73
- });
74
- const validateData = await validateRes.json().catch(() => ({})) as { valid?: boolean };
75
- if (validateRes.ok && validateData.valid === true) {
76
- if (storedSession.privateKeyPem) {
77
- return { token: storedSession.token, source: 'stored_session', privateKeyPem: storedSession.privateKeyPem };
78
- }
79
- // Old session entries may not have private key material; drop and re-bootstrap.
80
- clearActiveSessionToken();
81
- }
82
- clearActiveSessionToken();
83
- } catch {
84
- // If server validation is unavailable, keep the normal auth fallback chain.
85
- }
86
- }
87
-
63
+ let socketError: unknown;
88
64
  try {
89
65
  const token = await bootstrapViaSocket('cli-agent', keypair);
66
+ if (!token || typeof token !== 'string') {
67
+ throw new Error('Socket auth returned empty token.');
68
+ }
90
69
  return { token, source: 'socket', privateKeyPem: keypair.privateKeyPem };
91
70
  } catch (socketErr) {
71
+ socketError = socketErr;
92
72
  const socketMessage = getErrorMessage(socketErr).toLowerCase();
93
73
  const indicatesLockedAgent =
94
74
  socketMessage.includes('wallet is locked') ||
@@ -98,29 +78,29 @@ async function getAuthToken(
98
78
  if (indicatesLockedAgent) {
99
79
  throw new Error('Agent is locked. Run `auramaxx unlock` and retry.');
100
80
  }
81
+ }
101
82
 
102
- if (authSelection?.profile) {
103
- const result = await bootstrapViaAuthRequest(serverUrl(), 'cli-agent', keypair, {
104
- ...authSelection,
105
- noWait: true,
106
- onStatus: (message) => console.error(message),
107
- });
108
- if (result.approveUrl) {
109
- console.error(`Approve at: ${result.approveUrl}`);
110
- }
111
- console.error(`After approval, re-run with: AURA_TOKEN=<token> npx auramaxx agent ...`);
112
- console.error(`Or use: npx auramaxx auth request --profile ${authSelection.profile} --raw-token`);
113
- process.exit(1);
114
- }
115
-
116
- const token = await bootstrapViaAuthRequest(serverUrl(), 'cli-agent', keypair, {
83
+ if (authSelection?.profile) {
84
+ const result = await bootstrapViaAuthRequest(serverUrl(), 'cli-agent', keypair, {
117
85
  ...authSelection,
86
+ noWait: true,
118
87
  onStatus: (message) => console.error(message),
119
- }).catch((authErr) => {
120
- throw new Error(`${getErrorMessage(socketErr)}\n${getErrorMessage(authErr)}`);
121
88
  });
122
- return { token, source: 'auth', privateKeyPem: keypair.privateKeyPem };
89
+ if (result.approveUrl) {
90
+ console.error(`Approve at: ${result.approveUrl}`);
91
+ }
92
+ console.error('After approval, re-run with: AURA_TOKEN=<token> npx auramaxx agent ...');
93
+ console.error(`Or use: npx auramaxx auth request --profile ${authSelection.profile} --raw-token`);
94
+ process.exit(1);
123
95
  }
96
+
97
+ const token = await bootstrapViaAuthRequest(serverUrl(), 'cli-agent', keypair, {
98
+ ...authSelection,
99
+ onStatus: (message) => console.error(message),
100
+ }).catch((authErr) => {
101
+ throw new Error(`${getErrorMessage(socketError)}\n${getErrorMessage(authErr)}`);
102
+ });
103
+ return { token, source: 'auth', privateKeyPem: keypair.privateKeyPem };
124
104
  }
125
105
 
126
106
  async function getReadToken(input: {
@@ -209,6 +189,40 @@ interface ShareCreateResponse {
209
189
 
210
190
  // ── API helpers ───────────────────────────────────────────────────────
211
191
 
192
+ function shellQuote(arg: string): string {
193
+ if (/^[A-Za-z0-9_./:=+-]+$/.test(arg)) return arg;
194
+ return `'${arg.replace(/'/g, `'\"'\"'`)}'`;
195
+ }
196
+
197
+ function buildOriginalCommand(args: string[]): string {
198
+ const rendered = args.map(shellQuote).join(' ').trim();
199
+ return rendered ? `npx auramaxx ${rendered}` : 'npx auramaxx';
200
+ }
201
+
202
+ function appendReqIdPlaceholder(command: string): string {
203
+ const normalized = command.trim();
204
+ if (!normalized) return '--reqId <reqId>';
205
+ if (/\s--(?:reqId|req-id|requestId|request-id)(?:\s|=|$)/.test(normalized)) {
206
+ return normalized;
207
+ }
208
+ return `${normalized} --reqId <reqId>`;
209
+ }
210
+
211
+ function materializeRetryCommand(command: string | undefined, reqId: string): string {
212
+ const base = String(command || '').trim();
213
+ if (!base) return `<retry_original_command> --reqId ${reqId}`;
214
+ let next = base.replace(/<reqId>/g, reqId);
215
+ next = next
216
+ .replace(/--req-id\s+\S+/g, `--reqId ${reqId}`)
217
+ .replace(/--request-id\s+\S+/g, `--reqId ${reqId}`)
218
+ .replace(/--requestId\s+\S+/g, `--reqId ${reqId}`)
219
+ .replace(/--reqId\s+\S+/g, `--reqId ${reqId}`);
220
+ if (!/\s--(?:reqId|req-id|requestId|request-id)(?:\s|=|$)/.test(next)) {
221
+ next = `${next} --reqId ${reqId}`;
222
+ }
223
+ return next;
224
+ }
225
+
212
226
  async function listCredentials(token: string, query?: string): Promise<CredentialMeta[]> {
213
227
  const qs = query ? `?q=${encodeURIComponent(query)}` : '';
214
228
  const res = await fetch(`${serverUrl()}/credentials${qs}`, {
@@ -230,11 +244,16 @@ async function readCredential(
230
244
  privateKeyPem: string,
231
245
  options?: {
232
246
  retryCommandTemplate?: string;
247
+ originalCommand?: string;
233
248
  },
234
249
  ): Promise<DecryptedCredential> {
250
+ const originalCommand = String(options?.originalCommand || '').trim();
235
251
  const res = await fetch(`${serverUrl()}/credentials/${credentialId}/read`, {
236
252
  method: 'POST',
237
- headers: { 'Authorization': `Bearer ${readToken}` },
253
+ headers: {
254
+ 'Authorization': `Bearer ${readToken}`,
255
+ ...(originalCommand ? { 'X-Aura-Original-Command': originalCommand } : {}),
256
+ },
238
257
  signal: AbortSignal.timeout(8_000),
239
258
  });
240
259
  if (!res.ok) {
@@ -268,7 +287,9 @@ async function readCredential(
268
287
  };
269
288
  }
270
289
  }
271
- if (await handlePermissionDenied(res.status, escalationBody)) process.exit(1);
290
+ if (await handlePermissionDenied(res.status, escalationBody, {
291
+ retryCommandTemplate: options?.retryCommandTemplate,
292
+ })) process.exit(1);
272
293
  throw new Error(`Read failed (${res.status}): ${text}`);
273
294
  }
274
295
 
@@ -298,10 +319,18 @@ async function searchCredentials(token: string, name: string): Promise<Credentia
298
319
  return [];
299
320
  }
300
321
 
301
- async function fetchTotpCode(credentialId: string, token: string): Promise<{ code: string; remaining: number }> {
322
+ async function fetchTotpCode(
323
+ credentialId: string,
324
+ token: string,
325
+ options?: { originalCommand?: string },
326
+ ): Promise<{ code: string; remaining: number }> {
327
+ const originalCommand = String(options?.originalCommand || '').trim();
302
328
  const res = await fetch(`${serverUrl()}/credentials/${credentialId}/totp`, {
303
329
  method: 'POST',
304
- headers: { 'Authorization': `Bearer ${token}` },
330
+ headers: {
331
+ 'Authorization': `Bearer ${token}`,
332
+ ...(originalCommand ? { 'X-Aura-Original-Command': originalCommand } : {}),
333
+ },
305
334
  signal: AbortSignal.timeout(8_000),
306
335
  });
307
336
  if (!res.ok) {
@@ -608,7 +637,7 @@ function showHelp(): void {
608
637
  ' --password <pwd> Share password (implies accessMode=password)',
609
638
  ' --one-time Share one-time-only access',
610
639
  ' --location <v> Delete location: active|archive|recently_deleted',
611
- ' --reqId <id> Retry using a previously claimed one-shot approval token',
640
+ ' --reqId <id> Retry using a previously claimed one-shot approval token (aliases: --req-id, --requestId, --request-id)',
612
641
  ' --profile <p> /auth fallback profile when socket is blocked',
613
642
  ' --profile-version <v> /auth fallback profile version',
614
643
  ' --profile-overrides <j> Tighten-only profile override JSON',
@@ -671,7 +700,9 @@ export function parseArgs(args: string[]): {
671
700
  const sharePassword = passwordIdx !== -1 ? parseableArgs[passwordIdx + 1] : undefined;
672
701
  const locationIdx = parseableArgs.indexOf('--location');
673
702
  const deleteLocation = locationIdx !== -1 ? parseableArgs[locationIdx + 1] : undefined;
674
- const reqIdIdx = parseableArgs.indexOf('--reqId');
703
+ const reqIdFlag = ['--reqId', '--req-id', '--requestId', '--request-id']
704
+ .find((flag) => parseableArgs.includes(flag));
705
+ const reqIdIdx = reqIdFlag ? parseableArgs.indexOf(reqIdFlag) : -1;
675
706
  const reqId = reqIdIdx !== -1 ? parseableArgs[reqIdIdx + 1] : undefined;
676
707
  const profileIdx = parseableArgs.indexOf('--profile');
677
708
  const authProfile = profileIdx !== -1 ? parseableArgs[profileIdx + 1] : undefined;
@@ -688,7 +719,7 @@ export function parseArgs(args: string[]): {
688
719
  : undefined;
689
720
 
690
721
  const knownValueFlags = new Set([
691
- '--field', '--name', '--env', '--agent', '--expires-after', '--password', '--location', '--reqId', '--profile', '--profile-version', '--profile-overrides', '--type', '--tags',
722
+ '--field', '--name', '--env', '--agent', '--expires-after', '--password', '--location', '--reqId', '--req-id', '--requestId', '--request-id', '--profile', '--profile-version', '--profile-overrides', '--type', '--tags',
692
723
  ]);
693
724
  const knownBooleanFlags = new Set(['--json', '--first', '--totp', '--one-time', '--danger-plaintext']);
694
725
 
@@ -862,8 +893,9 @@ interface ResolvedReadAuthContext {
862
893
  consumeAfterAttempt: boolean;
863
894
  }
864
895
 
865
- function missingOrExpiredClaimPayload(reqId: string): Record<string, unknown> {
896
+ function missingOrExpiredClaimPayload(reqId: string, retryCommandTemplate?: string): Record<string, unknown> {
866
897
  const claimCommand = `npx auramaxx auth claim ${reqId} --json`;
898
+ const retryCommand = materializeRetryCommand(retryCommandTemplate, reqId);
867
899
  return {
868
900
  success: false,
869
901
  requiresHumanApproval: false,
@@ -882,18 +914,18 @@ function missingOrExpiredClaimPayload(reqId: string): Record<string, unknown> {
882
914
  retryAction: {
883
915
  transport: 'cli',
884
916
  kind: 'command',
885
- command: `<retry_original_command> --reqId ${reqId}`,
917
+ command: retryCommand,
886
918
  },
887
919
  instructions: [
888
920
  `1) Ask a human to approve request ${reqId} in dashboard`,
889
921
  `2) Claim token: ${claimCommand}`,
890
- `3) Retry original command with --reqId ${reqId}`,
922
+ `3) Run this exact command: ${retryCommand}`,
891
923
  ],
892
924
  };
893
925
  }
894
926
 
895
- function printMissingOrExpiredClaim(reqId: string): void {
896
- console.error(JSON.stringify(missingOrExpiredClaimPayload(reqId), null, 2));
927
+ function printMissingOrExpiredClaim(reqId: string, retryCommandTemplate?: string): void {
928
+ console.error(JSON.stringify(missingOrExpiredClaimPayload(reqId, retryCommandTemplate), null, 2));
897
929
  }
898
930
 
899
931
  async function resolveReadAuthContext(input: {
@@ -902,12 +934,13 @@ async function resolveReadAuthContext(input: {
902
934
  decryptPrivateKeyPem: string;
903
935
  authSelection?: ProfileIssuanceSelection;
904
936
  reqId?: string;
937
+ retryCommandTemplate?: string;
905
938
  }): Promise<ResolvedReadAuthContext | null> {
906
939
  const reqId = String(input.reqId || '').trim();
907
940
  if (reqId) {
908
941
  const claimed = getClaimedToken(reqId);
909
942
  if (!claimed) {
910
- printMissingOrExpiredClaim(reqId);
943
+ printMissingOrExpiredClaim(reqId, input.retryCommandTemplate);
911
944
  return null;
912
945
  }
913
946
  return {
@@ -977,7 +1010,7 @@ async function runSecretExec(command: string[], envVarName: string, secretValue:
977
1010
 
978
1011
  function resolveSetType(typeName: string | undefined): { requestType: string; normalizedType: string; defaultFieldKey: string } {
979
1012
  const normalizedType = normalizeCredentialType(typeName);
980
- const requestType = ['login', 'card', 'note', 'plain_note', 'hot_wallet', 'api', 'apikey', 'custom', 'passkey', 'oauth2', 'ssh', 'gpg'].includes(normalizedType)
1013
+ const requestType = ['login', 'card', 'sso', 'note', 'plain_note', 'hot_wallet', 'api', 'apikey', 'custom', 'passkey', 'oauth2', 'ssh', 'gpg'].includes(normalizedType)
981
1014
  ? normalizedType
982
1015
  : 'custom';
983
1016
  const defaultFieldKey = getCredentialPrimaryFieldKey(normalizedType);
@@ -1101,6 +1134,8 @@ export async function runAgentCli(args: string[]): Promise<number> {
1101
1134
  ...(authProfileVersion ? { profileVersion: authProfileVersion } : {}),
1102
1135
  ...(profileOverrides ? { profileOverrides } : {}),
1103
1136
  };
1137
+ const originalCommand = buildOriginalCommand(args);
1138
+ const retryCommandTemplate = appendReqIdPlaceholder(originalCommand);
1104
1139
 
1105
1140
  try {
1106
1141
  const { token, source: authSource, privateKeyPem: authPrivateKeyPem } = await getAuthToken(keypair, authSelection);
@@ -1131,6 +1166,7 @@ export async function runAgentCli(args: string[]): Promise<number> {
1131
1166
  decryptPrivateKeyPem,
1132
1167
  authSelection,
1133
1168
  reqId,
1169
+ retryCommandTemplate,
1134
1170
  });
1135
1171
  if (!readAuthContext) return 1;
1136
1172
  let fieldMatches: boolean[] = [];
@@ -1138,7 +1174,8 @@ export async function runAgentCli(args: string[]): Promise<number> {
1138
1174
  fieldMatches = await Promise.all(credentials.map(async (credential) => {
1139
1175
  try {
1140
1176
  const decrypted = await readCredential(credential.id, readAuthContext.readToken, readAuthContext.privateKeyPem, {
1141
- retryCommandTemplate: 'npx auramaxx agent list --field <field> --reqId <reqId>',
1177
+ retryCommandTemplate,
1178
+ originalCommand,
1142
1179
  });
1143
1180
  return matchesListFieldFilter(credential, decrypted, listFieldQuery);
1144
1181
  } catch {
@@ -1208,12 +1245,14 @@ export async function runAgentCli(args: string[]): Promise<number> {
1208
1245
  decryptPrivateKeyPem,
1209
1246
  authSelection,
1210
1247
  reqId,
1248
+ retryCommandTemplate,
1211
1249
  });
1212
1250
  if (!readAuthContext) return 1;
1213
1251
 
1214
1252
  try {
1215
1253
  const decrypted = await readCredential(target.id, readAuthContext.readToken, readAuthContext.privateKeyPem, {
1216
- retryCommandTemplate: `npx auramaxx ${isInjectShortcut ? 'inject' : 'secret exec'} "${target.name}" --reqId <reqId>`,
1254
+ retryCommandTemplate,
1255
+ originalCommand,
1217
1256
  });
1218
1257
  const primarySecret = resolvePrimarySecretField(
1219
1258
  normalizeCredentialType(decrypted.type || target.type),
@@ -1245,7 +1284,7 @@ export async function runAgentCli(args: string[]): Promise<number> {
1245
1284
  });
1246
1285
 
1247
1286
  if (flagTotp) {
1248
- const totp = await fetchTotpCode(target.id, token);
1287
+ const totp = await fetchTotpCode(target.id, token, { originalCommand });
1249
1288
  process.stdout.write(totp.code);
1250
1289
  return 0;
1251
1290
  }
@@ -1256,13 +1295,15 @@ export async function runAgentCli(args: string[]): Promise<number> {
1256
1295
  decryptPrivateKeyPem,
1257
1296
  authSelection,
1258
1297
  reqId,
1298
+ retryCommandTemplate,
1259
1299
  });
1260
1300
  if (!readAuthContext) return 1;
1261
1301
 
1262
1302
  let decrypted: DecryptedCredential;
1263
1303
  try {
1264
1304
  decrypted = await readCredential(target.id, readAuthContext.readToken, readAuthContext.privateKeyPem, {
1265
- retryCommandTemplate: `npx auramaxx agent get "${target.name}" --reqId <reqId>`,
1305
+ retryCommandTemplate,
1306
+ originalCommand,
1266
1307
  });
1267
1308
  } finally {
1268
1309
  finalizeReadAuthContext(readAuthContext);
@@ -1271,7 +1312,7 @@ export async function runAgentCli(args: string[]): Promise<number> {
1271
1312
  const hasTotpField = decrypted.fields.some((f) => f.key === 'totp' || f.key === 'otp');
1272
1313
  if (hasTotpField) {
1273
1314
  try {
1274
- const totp = await fetchTotpCode(target.id, token);
1315
+ const totp = await fetchTotpCode(target.id, token, { originalCommand });
1275
1316
  decrypted.fields.push({ key: 'totp_code', value: totp.code, type: 'text', sensitive: false });
1276
1317
  } catch {
1277
1318
  // ignore TOTP enrichment failure
@@ -1377,11 +1418,13 @@ export async function runAgentCli(args: string[]): Promise<number> {
1377
1418
  decryptPrivateKeyPem,
1378
1419
  authSelection,
1379
1420
  reqId,
1421
+ retryCommandTemplate,
1380
1422
  });
1381
1423
  if (!readAuthContext) return 1;
1382
1424
  try {
1383
1425
  const decrypted = await readCredential(target.id, readAuthContext.readToken, readAuthContext.privateKeyPem, {
1384
- retryCommandTemplate: `npx auramaxx agent set "${target.name}" <value> --reqId <reqId>`,
1426
+ retryCommandTemplate,
1427
+ originalCommand,
1385
1428
  });
1386
1429
  const existing = [...decrypted.fields];
1387
1430
  for (const next of setFields) {
@@ -1476,11 +1519,13 @@ export async function runAgentCli(args: string[]): Promise<number> {
1476
1519
  decryptPrivateKeyPem,
1477
1520
  authSelection,
1478
1521
  reqId,
1522
+ retryCommandTemplate,
1479
1523
  });
1480
1524
  if (!readAuthContext) return 1;
1481
1525
  try {
1482
1526
  const decrypted = await readCredential(target.id, readAuthContext.readToken, readAuthContext.privateKeyPem, {
1483
- retryCommandTemplate: `npx auramaxx agent share "${target.name}" --reqId <reqId>`,
1527
+ retryCommandTemplate,
1528
+ originalCommand,
1484
1529
  });
1485
1530
  gistFields = mergeCredentialFields(
1486
1531
  normalizedType,
@@ -23,7 +23,7 @@ function showHelp(): void {
23
23
  ' --json JSON output',
24
24
  '',
25
25
  'Auth bootstrap options (when AURA_TOKEN is not set):',
26
- ' --profile <id> /auth fallback profile (default: strict)',
26
+ ' --profile <id> /auth fallback profile (default: trust.localProfile, then dev)',
27
27
  ' --profile-version <v> /auth fallback profile version (default: v1)',
28
28
  ' --profile-overrides <json> Tighten-only profile override JSON',
29
29
  '',
@@ -5,6 +5,7 @@
5
5
  import {
6
6
  decryptWithPrivateKey,
7
7
  generateEphemeralKeypair,
8
+ resolveAuthFallbackProfileConfig,
8
9
  type ProfileIssuanceSelection,
9
10
  } from '../../lib/credential-transport';
10
11
  import { buildApprovalClaimFlow, buildPollUrl } from '../../lib/approval-flow';
@@ -43,7 +44,7 @@ interface ParsedCommon {
43
44
 
44
45
  interface ParsedRequestFlags extends ParsedCommon {
45
46
  agentId: string;
46
- profile: string;
47
+ profile?: string;
47
48
  profileVersion?: string;
48
49
  profileOverrides?: JsonObject;
49
50
  action?: { endpoint: string; method: string; body?: JsonObject };
@@ -127,8 +128,8 @@ function showHelp(): void {
127
128
  ], [
128
129
  'Request options:',
129
130
  ' --agent-id <id> Agent id (default: cli-auth)',
130
- ' --profile <id> Profile id (default: dev)',
131
- ' --profile-version <v> Profile version (default: v1)',
131
+ ' --profile <id> Profile id (default: trust.localProfile; seed: admin)',
132
+ ' --profile-version <v> Profile version (default: trust.localProfileVersion; seed: v1)',
132
133
  ' --profile-overrides <json> Tighten-only profile override JSON',
133
134
  ' --action <json> Pre-computed action to auto-execute on approval',
134
135
  ' JSON: {"endpoint":"/send","method":"POST","body":{...}}',
@@ -240,8 +241,8 @@ function parseRequestFlags(args: string[]): ParsedRequestFlags {
240
241
  return {
241
242
  ...common,
242
243
  agentId: getFlagValue(args, '--agent-id') || 'cli-auth',
243
- profile: getFlagValue(args, '--profile') || 'dev',
244
- profileVersion: getFlagValue(args, '--profile-version') || 'v1',
244
+ profile: getFlagValue(args, '--profile'),
245
+ profileVersion: getFlagValue(args, '--profile-version'),
245
246
  profileOverrides: parseJsonObjectFlag(args, '--profile-overrides'),
246
247
  action: parseActionFlag(args),
247
248
  };
@@ -349,10 +350,50 @@ function maskToken(token: string): string {
349
350
  return `${token.slice(0, 20)}...${token.slice(-4)}`;
350
351
  }
351
352
 
353
+ function shellQuote(arg: string): string {
354
+ if (/^[A-Za-z0-9_./:=+-]+$/.test(arg)) return arg;
355
+ return `'${arg.replace(/'/g, `'\"'\"'`)}'`;
356
+ }
357
+
358
+ function buildAuthRequestRetryCommand(input: {
359
+ agentId: string;
360
+ profile: string;
361
+ profileVersion?: string;
362
+ profileOverrides?: JsonObject;
363
+ action?: { endpoint: string; method: string; body?: JsonObject };
364
+ }): string {
365
+ const args: string[] = ['npx', 'auramaxx', 'auth', 'request', '--profile', input.profile];
366
+ if (input.agentId && input.agentId !== 'cli-auth') {
367
+ args.push('--agent-id', input.agentId);
368
+ }
369
+ if (input.profileVersion && input.profileVersion !== 'v1') {
370
+ args.push('--profile-version', input.profileVersion);
371
+ }
372
+ if (input.profileOverrides) {
373
+ args.push('--profile-overrides', JSON.stringify(input.profileOverrides));
374
+ }
375
+ if (input.action) {
376
+ args.push('--action', JSON.stringify(input.action));
377
+ }
378
+ args.push('--json');
379
+ return args.map(shellQuote).join(' ');
380
+ }
381
+
382
+ function resolveRetryCommandTemplate(template: string | undefined, reqId: string): string {
383
+ const candidate = String(template || '').trim().replaceAll('<reqId>', reqId);
384
+ if (candidate && !candidate.includes('<retry_original_command>')) {
385
+ return candidate;
386
+ }
387
+ // For plain `auth request` flows there may be no original operation command;
388
+ // return a concrete fallback command instead of a placeholder token.
389
+ return `npx auramaxx auth claim ${reqId} --json`;
390
+ }
391
+
352
392
  async function handleApprovalFlow(
353
393
  createResult: AuthCreateResponse,
354
394
  privateKeyPem: string,
355
395
  options: ParsedCommon,
396
+ requestRetryCommand: string,
356
397
  ): Promise<number> {
357
398
  const requestId = createResult.requestId!;
358
399
  const secret = createResult.secret!;
@@ -362,7 +403,7 @@ async function handleApprovalFlow(
362
403
  const flow = buildAuthApprovalFlow({ requestId, secret, approveUrl });
363
404
  const pollUrl = flow.pollUrl || buildPollUrl(serverUrl(), requestId, secret);
364
405
  const claimAction = buildCliClaimAction(reqId);
365
- const retryAction = buildCliRetryAction('<retry_original_command>');
406
+ const retryAction = buildCliRetryAction(requestRetryCommand);
366
407
 
367
408
  putApprovalContext({
368
409
  reqId,
@@ -370,7 +411,7 @@ async function handleApprovalFlow(
370
411
  privateKeyPem,
371
412
  approvalScope: 'session_token',
372
413
  ttlSeconds: SESSION_TOKEN_DEFAULT_TTL_SECONDS,
373
- retryCommandTemplate: '<retry_original_command>',
414
+ retryCommandTemplate: requestRetryCommand,
374
415
  });
375
416
 
376
417
  if (options.noWait) {
@@ -393,7 +434,7 @@ async function handleApprovalFlow(
393
434
  instructions: [
394
435
  `1) Ask a human to approve: ${flow.approveUrl}`,
395
436
  `2) Claim now: ${claimAction.command}`,
396
- '3) Retry original command (session token is activated on claim).',
437
+ `3) If request is rejected/expired, re-request: ${requestRetryCommand}`,
397
438
  ],
398
439
  approvalFlow: flow.approvalFlow,
399
440
  message: 'Auth request created. Approve and claim token before retrying.',
@@ -409,7 +450,7 @@ async function handleApprovalFlow(
409
450
  }
410
451
  console.log(` pollUrl: ${pollUrl}`);
411
452
  console.log(` claim: ${claimAction.command}`);
412
- console.log('Retry your original command after claim reports approved.');
453
+ console.log(`If rejected/expired, re-request with: ${requestRetryCommand}`);
413
454
  }
414
455
  return 0;
415
456
  }
@@ -456,7 +497,7 @@ async function handleApprovalFlow(
456
497
  instructions: [
457
498
  `1) Ask a human to approve: ${flow.approveUrl}`,
458
499
  `2) Claim now: ${claimAction.command}`,
459
- '3) Retry original command when approved.',
500
+ `3) Re-request token: ${requestRetryCommand}`,
460
501
  ],
461
502
  approvalFlow: flow.approvalFlow,
462
503
  note: 'Auth request was rejected. Create a new request and repeat the approval flow.',
@@ -521,9 +562,17 @@ async function handleApprovalFlow(
521
562
  async function cmdRequest(args: string[]): Promise<number> {
522
563
  const flags = parseRequestFlags(args);
523
564
  const keypair = generateEphemeralKeypair();
524
- const profileSelection: ProfileIssuanceSelection = {
565
+ const resolvedDefaults = await resolveAuthFallbackProfileConfig({
525
566
  profile: flags.profile,
526
567
  profileVersion: flags.profileVersion,
568
+ });
569
+ const profileSelection: {
570
+ profile: string;
571
+ profileVersion: string;
572
+ profileOverrides?: JsonObject;
573
+ } = {
574
+ profile: resolvedDefaults.profile,
575
+ profileVersion: resolvedDefaults.profileVersion,
527
576
  ...(flags.profileOverrides ? { profileOverrides: flags.profileOverrides } : {}),
528
577
  };
529
578
 
@@ -536,7 +585,15 @@ async function cmdRequest(args: string[]): Promise<number> {
536
585
  pubkey: keypair.publicKeyPem,
537
586
  });
538
587
 
539
- return handleApprovalFlow(createResult, keypair.privateKeyPem, flags);
588
+ const requestRetryCommand = buildAuthRequestRetryCommand({
589
+ agentId: flags.agentId,
590
+ profile: profileSelection.profile,
591
+ ...(profileSelection.profileVersion ? { profileVersion: profileSelection.profileVersion } : {}),
592
+ ...(profileSelection.profileOverrides ? { profileOverrides: profileSelection.profileOverrides } : {}),
593
+ ...(flags.action ? { action: flags.action } : {}),
594
+ });
595
+
596
+ return handleApprovalFlow(createResult, keypair.privateKeyPem, flags, requestRetryCommand);
540
597
  }
541
598
 
542
599
  async function cmdClaim(args: string[]): Promise<number> {
@@ -558,6 +615,11 @@ async function cmdClaim(args: string[]): Promise<number> {
558
615
  if (!candidate) return undefined;
559
616
  return candidate.replaceAll('<reqId>', reqId);
560
617
  };
618
+ const retryCommandFromClaim = (payload: Record<string, unknown>): string | undefined => {
619
+ const candidate = typeof payload.retryCommand === 'string' ? payload.retryCommand.trim() : '';
620
+ if (!candidate) return undefined;
621
+ return candidate.replaceAll('<reqId>', reqId);
622
+ };
561
623
  if (!ctx) {
562
624
  const claimAction = buildCliClaimAction(reqId);
563
625
  const payload = {
@@ -575,10 +637,8 @@ async function cmdClaim(args: string[]): Promise<number> {
575
637
  }
576
638
 
577
639
  const pollUrl = buildPollUrl(serverUrl(), reqId, ctx.secret);
578
- const retryAction = buildCliRetryAction(
579
- ctx.retryCommandTemplate?.replaceAll('<reqId>', reqId) || '<retry_original_command>',
580
- );
581
640
  const claimAction = buildCliClaimAction(reqId);
641
+ const retryAction = buildCliRetryAction(resolveRetryCommandTemplate(ctx.retryCommandTemplate, reqId));
582
642
  let result = await fetchAuthDecisionOnce(serverUrl(), reqId, ctx.secret);
583
643
  let classification = classifyClaimFetchResult(result);
584
644
  let mappedStatus = classification.mappedStatus;
@@ -645,18 +705,19 @@ async function cmdClaim(args: string[]): Promise<number> {
645
705
  });
646
706
  }
647
707
  deleteApprovalContext(reqId);
708
+ const retryNow = retryCommandFromClaim(result.payload)
709
+ || retryCommand(ctx.retryCommandTemplate)
710
+ || retryAction.command;
648
711
  payload.success = true;
649
- payload.retryCommand = retryCommand(ctx.retryCommandTemplate);
712
+ payload.retryCommand = retryNow;
650
713
  payload.instructions = [
651
714
  `1) Claim complete for reqId=${reqId}`,
652
715
  ctx.approvalScope === 'session_token'
653
716
  ? '2) Session token is active for subsequent CLI calls until expiry/revoke.'
654
717
  : `2) Retry original command with --reqId ${reqId}`,
655
- `3) Retry now: ${payload.retryCommand || retryAction.command}`,
718
+ `3) Retry now: ${retryNow}`,
656
719
  ];
657
- payload.note = payload.retryCommand
658
- ? `Claimed token stored for reqId=${reqId}. Retry now: ${payload.retryCommand}`
659
- : `Claimed token stored for reqId=${reqId}. Retry the original command with --reqId ${reqId}.`;
720
+ payload.note = `Claimed token stored for reqId=${reqId}. Retry now: ${retryNow}`;
660
721
  if (json) {
661
722
  if (rawToken) {
662
723
  payload.token = token;