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.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +240 -223
- package/.next/app-path-routes-manifest.json +8 -7
- package/.next/build-manifest.json +14 -14
- package/.next/prerender-manifest.json +53 -29
- package/.next/react-loadable-manifest.json +41 -41
- package/.next/routes-manifest.json +6 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +12 -12
- package/.next/server/app/api/[...doc]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agent-requests/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/apps/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/apps/manifests/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/apps/static/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/docs/plain/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/events/route.js +1 -19
- package/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/import-from-openclaw/[channel]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/import-from-openclaw/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/import-from-openclaw/validate/[channel]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/restart/route.js +1 -1
- package/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/update/route.js +63 -1
- package/.next/server/app/api/update/route.js.nft.json +1 -1
- package/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/version/route.js +1 -1
- package/.next/server/app/api/version/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/workspace/[id]/apps/[wid]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/workspace/[id]/apps/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/workspace/[id]/export/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/workspace/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/workspace/config/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/workspace/import/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/workspace/route_client-reference-manifest.js +1 -1
- package/.next/server/app/app-legacy-do-not-use/page.js +1 -1
- package/.next/server/app/app-legacy-do-not-use/page.js.nft.json +1 -1
- package/.next/server/app/app-legacy-do-not-use/page_client-reference-manifest.js +1 -1
- package/.next/server/app/app-legacy-do-not-use.html +1 -1
- package/.next/server/app/app-legacy-do-not-use.rsc +14 -14
- package/.next/server/app/approve/[actionId]/page.js +1 -1
- package/.next/server/app/approve/[actionId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/docs/[...doc]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/health/page_client-reference-manifest.js +1 -1
- package/.next/server/app/health.html +1 -1
- package/.next/server/app/health.rsc +13 -13
- package/.next/server/app/hello/page_client-reference-manifest.js +1 -1
- package/.next/server/app/hello.html +1 -1
- package/.next/server/app/hello.rsc +14 -14
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +18 -21
- package/.next/server/app/page.js +3 -3
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/.next/server/app/privacy.html +1 -1
- package/.next/server/app/privacy.rsc +13 -13
- package/.next/server/app/share/[token]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/terms/page_client-reference-manifest.js +1 -1
- package/.next/server/app/terms.html +1 -1
- package/.next/server/app/terms.rsc +13 -13
- package/.next/server/app/yo/page.js +2 -0
- package/.next/server/app/yo/page.js.nft.json +1 -0
- package/.next/server/app/yo/page_client-reference-manifest.js +1 -0
- package/.next/server/app/yo.html +1 -0
- package/.next/server/app/yo.meta +7 -0
- package/.next/server/app/yo.rsc +23 -0
- package/.next/server/app-paths-manifest.json +8 -7
- package/.next/server/chunks/2145.js +1 -1
- package/.next/server/chunks/2460.js +1 -1
- package/.next/server/chunks/5246.js +1 -1
- package/.next/server/chunks/5678.js +1 -1
- package/.next/server/chunks/5784.js +1 -1
- package/.next/server/chunks/6086.js +2 -20
- package/.next/server/chunks/{5553.js → 6415.js} +2 -2
- package/.next/server/chunks/7935.js +2 -2
- package/.next/server/functions-config-manifest.json +1 -1
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/server/webpack-runtime.js +1 -1
- package/.next/static/WshFGr6RxGYP6AbWuT9OG/_buildManifest.js +1 -0
- package/.next/static/chunks/1168.aaac1edbb597fe5a.js +1 -0
- package/.next/static/chunks/1255-7999eac54f80a49f.js +1 -0
- package/.next/static/chunks/142-fa9752f53a551f63.js +1 -0
- package/.next/static/chunks/2505.d54ccadc42f4e3d1.js +1 -0
- package/.next/static/chunks/2619-04bc32f026a0d946.js +1 -0
- package/.next/static/chunks/2927.7e00cc878d9a3f52.js +1 -0
- package/.next/static/chunks/3573-1b41d7b8a000d015.js +1 -0
- package/.next/static/chunks/3609.ded5a5306e18af9c.js +1 -0
- package/.next/static/chunks/3667-1db7bd03948e60df.js +1 -0
- package/.next/static/chunks/3826.a73d4a88d8c09030.js +1 -0
- package/.next/static/chunks/{3a91511d-648a2ba3dad7df0c.js → 3a91511d-ba215c0b5dc21ba9.js} +1 -1
- package/.next/static/chunks/4256.48407d9abad5ea33.js +1 -0
- package/.next/static/chunks/4685-7f53bbfc4a9845eb.js +1 -0
- package/.next/static/chunks/4901-ba6a32818662e70a.js +1 -0
- package/.next/static/chunks/4919-7e7cdd5efc9f2110.js +1 -0
- package/.next/static/chunks/4bd1b696-100b9d70ed4e49c1.js +1 -0
- package/.next/static/chunks/5336-233ec7ab3807267c.js +1 -0
- package/.next/static/chunks/5442-b5bb869e832e8967.js +1 -0
- package/.next/static/chunks/6233-97a810aa272af547.js +1 -0
- package/.next/static/chunks/626.a5109d16f9eca1f6.js +1 -0
- package/.next/static/chunks/6872-faea0f088ab2d450.js +1 -0
- package/.next/static/chunks/7338-3ce17a93614f1d77.js +59 -0
- package/.next/static/chunks/7394-4bdb1feefad1a74a.js +1 -0
- package/.next/static/chunks/7616-1129bcb3eee8d315.js +1 -0
- package/.next/static/chunks/786-26deffb41572cbb3.js +1 -0
- package/.next/static/chunks/8273-8e92d34180669ca9.js +1 -0
- package/.next/static/chunks/8357.5dee1e0c4e5bb091.js +1 -0
- package/.next/static/chunks/9062-2bc2d089f9c9c6ba.js +1 -0
- package/.next/static/chunks/9380.f198afbf0c6b5369.js +1 -0
- package/.next/static/chunks/app/_not-found/page-5a8c6a29f762fa58.js +1 -0
- package/.next/static/chunks/app/api/[...doc]/page-f0852f35f0fd1d44.js +1 -0
- package/.next/static/chunks/app/api/agent-requests/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/apps/install/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/apps/manifests/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/apps/static/[...path]/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/docs/plain/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/events/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/import-from-openclaw/[channel]/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/import-from-openclaw/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/import-from-openclaw/validate/[channel]/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/page-cc59bebcc0d2c01d.js +1 -0
- package/.next/static/chunks/app/api/restart/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/update/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/version/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/workspace/[id]/apps/[wid]/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/workspace/[id]/apps/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/workspace/[id]/export/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/workspace/[id]/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/workspace/config/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/workspace/import/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/api/workspace/route-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/app-legacy-do-not-use/page-e5dc864e92d90ca7.js +1 -0
- package/.next/static/chunks/app/approve/[actionId]/page-2acca1f490424f21.js +1 -0
- package/.next/static/chunks/app/docs/[...doc]/page-8e2a2d036caab242.js +1 -0
- package/.next/static/chunks/app/docs/page-acf872a03ff79893.js +1 -0
- package/.next/static/chunks/app/error-66f983b7769dabfa.js +1 -0
- package/.next/static/chunks/app/health/page-c9185854ed9c86d0.js +1 -0
- package/.next/static/chunks/app/hello/page-74c9f4deaa4b03dd.js +1 -0
- package/.next/static/chunks/app/layout-af8d9969c7aeb758.js +1 -0
- package/.next/static/chunks/app/page-16dfcd1c7cc88bcc.js +1 -0
- package/.next/static/chunks/app/privacy/page-8e2d17079355c2cc.js +1 -0
- package/.next/static/chunks/app/share/[token]/page-5dd9b0418eee411f.js +1 -0
- package/.next/static/chunks/app/terms/page-8e2d17079355c2cc.js +1 -0
- package/.next/static/chunks/app/yo/layout-cf84f975aad4c719.js +1 -0
- package/.next/static/chunks/app/yo/page-719dc5f213fdfb30.js +1 -0
- package/.next/static/chunks/framework-a32a2a465584c0bc.js +1 -0
- package/.next/static/chunks/main-0f0f9142f74e7215.js +1 -0
- package/.next/static/chunks/main-app-24f0c92ba10af457.js +1 -0
- package/.next/static/chunks/pages/_app-4b3fb5e477a0267f.js +1 -0
- package/.next/static/chunks/pages/_error-c970d8b55ace1b48.js +1 -0
- package/.next/static/chunks/{webpack-768de8b7d6a7a27a.js → webpack-79ad58260e9b10b4.js} +1 -1
- package/.next/static/css/83cd401584ab787f.css +3 -0
- package/.next/trace +28 -28
- package/.next/types/app/yo/layout.ts +84 -0
- package/.next/types/app/yo/page.ts +84 -0
- package/.next/types/routes.d.ts +4 -2
- package/.next/types/validator.ts +18 -0
- package/bin/auramaxx.js +11 -26
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/AUTH.md +6 -3
- package/docs/CLI.md +2 -0
- package/docs/MCP.md +2 -0
- package/docs/TROUBLESHOOTING.md +24 -0
- package/docs/credentials.md +2 -0
- package/package.json +2 -1
- package/prisma/migrations/20260227214000_update_agent_action_ttl_defaults/migration.sql +19 -0
- package/public/0a167e5e-4f52-4715-ae23-bf63d259a6b1.png +0 -0
- package/public/141ec92c-6780-4b23-838f-9a7bf1e91bb8.png +0 -0
- package/public/3afc4935-92cb-42af-9624-0b1341c12a5e.png +0 -0
- package/public/43947df5-dbcf-4e49-ab8b-41b9162c0410.png +0 -0
- package/public/5aeae9ce-0d38-49ea-8fd1-167892a04a85.png +0 -0
- package/public/660e4ea3-a3a6-4be4-a8ca-2cb74c51dfb5.png +0 -0
- package/public/733f02d7-6b58-4ba6-a5c8-d062cd205e1d.png +0 -0
- package/public/a32d65cb-95b0-4977-be6b-cf69f515afbe.png +0 -0
- package/public/agent1.png +0 -0
- package/public/agent10.png +0 -0
- package/public/agent2.png +0 -0
- package/public/agent3.png +0 -0
- package/public/agent4.png +0 -0
- package/public/agent5.png +0 -0
- package/public/agent6.png +0 -0
- package/public/agent7.png +0 -0
- package/public/agent8.png +0 -0
- package/public/agent9.png +0 -0
- package/public/c4938305-b811-4ccc-91db-94d309734827.png +0 -0
- package/public/f2ca6825-a4f3-4107-815c-51ee740dfc09.png +0 -0
- package/public/llm.txt +2 -0
- package/public/llms.txt +39 -0
- package/public/ss-dark1.png +0 -0
- package/public/ss-dark1.webp +0 -0
- package/public/ss-dark2.png +0 -0
- package/public/ss-dark2.webp +0 -0
- package/public/ss-dark3.png +0 -0
- package/public/ss-dark3.webp +0 -0
- package/public/ss-light1.png +0 -0
- package/public/ss-light1.webp +0 -0
- package/public/ss-light2.png +0 -0
- package/public/ss-light2.webp +0 -0
- package/public/ss-light3.png +0 -0
- package/public/ss-light3.webp +0 -0
- package/shared/agent-profile-schema.ts +81 -0
- package/shared/credential-field-schema.ts +12 -0
- package/skills/auramaxx/SKILL.md +71 -691
- package/src/app/UnlockPageClient.tsx +1939 -0
- package/src/app/api/page.tsx +8 -9
- package/src/app/api/restart/route.ts +2 -18
- package/src/app/api/update/route.ts +104 -51
- package/src/app/approve/[actionId]/page.tsx +4 -1
- package/src/app/docs/DocsPageContent.tsx +3 -3
- package/src/app/globals.css +94 -0
- package/src/app/layout.tsx +1 -0
- package/src/app/page.tsx +25 -1935
- package/src/app/yo/layout.tsx +29 -0
- package/src/app/yo/page.tsx +528 -0
- package/src/components/HumanActionBar.tsx +34 -8
- package/src/components/agent/AgentSidebar.tsx +3 -1
- package/src/components/agent/CredentialAgent.tsx +5 -1
- package/src/components/agent/CredentialDetail.tsx +32 -1
- package/src/components/agent/CredentialForm.tsx +94 -7
- package/src/components/agent/CredentialRow.tsx +8 -1
- package/src/components/agent/credentialFormName.ts +22 -1
- package/src/components/agent/types.ts +2 -2
- package/src/components/design-system/Modal.tsx +14 -1
- package/src/hooks/useUpdateChecker.ts +17 -1
- package/src/lib/pino.ts +77 -8
- package/src/server/cli/commands/actions.ts +1 -1
- package/src/server/cli/commands/agent.ts +110 -65
- package/src/server/cli/commands/approve.ts +1 -1
- package/src/server/cli/commands/auth.ts +81 -20
- package/src/server/cli/commands/start.ts +42 -3
- package/src/server/cli/commands/token.ts +2 -2
- package/src/server/cli/lib/escalation.ts +109 -24
- package/src/server/cli/lib/process.ts +54 -1
- package/src/server/cli/socket.ts +1 -1
- package/src/server/index.ts +2 -0
- package/src/server/lib/agent-profile-records.ts +72 -0
- package/src/server/lib/credential-transport.ts +27 -11
- package/src/server/lib/defaults.ts +3 -3
- package/src/server/lib/escalation-responder.ts +1 -1
- package/src/server/lib/resolve-action.ts +2 -2
- package/src/server/lib/update-check.ts +1 -1
- package/src/server/mcp/server.ts +6 -1
- package/src/server/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/src/server/routes/actions.ts +2 -2
- package/src/server/routes/agent-profiles.ts +82 -0
- package/src/server/routes/auth.ts +39 -4
- package/src/server/routes/credentials.ts +18 -0
- package/src/server/tests/cli/agent-auth.test.ts +20 -39
- package/src/server/tests/cli/agent.test.ts +18 -0
- package/src/server/tests/cli/auth-action-flag.test.ts +3 -2
- package/src/server/tests/cli/bin-entrypoint.test.ts +35 -11
- package/src/server/tests/cli/escalation.test.ts +7 -3
- package/src/server/tests/cli/process.test.ts +3 -3
- package/src/server/tests/cli/socket.test.ts +2 -2
- package/src/server/tests/cli/start-run.test.ts +24 -1
- package/src/server/tests/endpoints/actions.test.ts +2 -2
- package/src/server/tests/endpoints/agent-profiles.test.ts +117 -0
- package/src/server/tests/endpoints/auth.test.ts +34 -0
- package/src/server/tests/lib/credential-transport.test.ts +68 -2
- package/src/server/tests/lib/defaults.test.ts +2 -2
- package/src/server/tests/lib/escalation-responder.test.ts +2 -2
- package/src/server/tests/lib/update-check.test.ts +1 -1
- package/src/server/tests/setup.ts +7 -0
- package/src/server/tsconfig.tsbuildinfo +1 -1
- package/src/server/types.ts +1 -1
- package/.next/static/AcaCjQ4akovHBUnVGPpfN/_buildManifest.js +0 -1
- package/.next/static/chunks/1168.63dbb444a33b1867.js +0 -1
- package/.next/static/chunks/1255-e8718b02724690dd.js +0 -1
- package/.next/static/chunks/142-aeaf7ffa9c53516d.js +0 -1
- package/.next/static/chunks/2505.22aaa333fd65908f.js +0 -1
- package/.next/static/chunks/2619-3c9e02e22d10480a.js +0 -1
- package/.next/static/chunks/2927.e7e9e2a1b8d2dc61.js +0 -1
- package/.next/static/chunks/3573-27e17f4ff2dd86ed.js +0 -1
- package/.next/static/chunks/3609.6f8e0ecd6de9566c.js +0 -1
- package/.next/static/chunks/3667-d6770121629db38b.js +0 -1
- package/.next/static/chunks/3826.7dfe96467cd74e45.js +0 -1
- package/.next/static/chunks/4256.50cb375c979ffd5a.js +0 -1
- package/.next/static/chunks/4685-3f8d92f574366fec.js +0 -1
- package/.next/static/chunks/4901-54c1ac380b7b43bb.js +0 -1
- package/.next/static/chunks/4919-fe6f1553abfc9420.js +0 -1
- package/.next/static/chunks/4bd1b696-f785427dddbba9fb.js +0 -1
- package/.next/static/chunks/5336-bd251f91235f7c11.js +0 -1
- package/.next/static/chunks/5442-be197c885bf12079.js +0 -1
- package/.next/static/chunks/5553-c8b86fe3513fce04.js +0 -59
- package/.next/static/chunks/6233-44e6fe57a552a816.js +0 -1
- package/.next/static/chunks/626.2583673a0386a81b.js +0 -1
- package/.next/static/chunks/6872-6442f2f5cce36ce5.js +0 -1
- package/.next/static/chunks/7411-3ca797c21b722ccd.js +0 -1
- package/.next/static/chunks/7616-b8bd37ce1f735d6f.js +0 -1
- package/.next/static/chunks/786-9ed39f96091b2be4.js +0 -1
- package/.next/static/chunks/8273-922091226ba84a94.js +0 -1
- package/.next/static/chunks/8357.6159472717ff7d11.js +0 -1
- package/.next/static/chunks/9062-3eb1607c96486f88.js +0 -1
- package/.next/static/chunks/9380.93f361baab2eefdf.js +0 -1
- package/.next/static/chunks/app/_not-found/page-c3b87025baf0a9c2.js +0 -1
- package/.next/static/chunks/app/api/[...doc]/page-790c4b33ba1fde4a.js +0 -1
- package/.next/static/chunks/app/api/agent-requests/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/apps/install/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/apps/manifests/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/apps/static/[...path]/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/docs/plain/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/events/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/import-from-openclaw/[channel]/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/import-from-openclaw/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/import-from-openclaw/validate/[channel]/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/page-b53f9aa17a4c5201.js +0 -1
- package/.next/static/chunks/app/api/restart/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/update/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/version/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/workspace/[id]/apps/[wid]/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/workspace/[id]/apps/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/workspace/[id]/export/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/workspace/[id]/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/workspace/config/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/workspace/import/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/api/workspace/route-e83b12cbab2e8707.js +0 -1
- package/.next/static/chunks/app/app-legacy-do-not-use/page-0052191daef60036.js +0 -1
- package/.next/static/chunks/app/approve/[actionId]/page-45cd3b8fa062d5e5.js +0 -1
- package/.next/static/chunks/app/docs/[...doc]/page-632ac406200b66fe.js +0 -1
- package/.next/static/chunks/app/docs/page-b7556394709b43df.js +0 -1
- package/.next/static/chunks/app/error-3d6057da512253d8.js +0 -1
- package/.next/static/chunks/app/health/page-80c985cd72328b74.js +0 -1
- package/.next/static/chunks/app/hello/page-fd71babcd192729b.js +0 -1
- package/.next/static/chunks/app/layout-285c6ef3f16bae63.js +0 -1
- package/.next/static/chunks/app/page-85017185df14c37b.js +0 -1
- package/.next/static/chunks/app/privacy/page-faf36cd0dde6dfa3.js +0 -1
- package/.next/static/chunks/app/share/[token]/page-22d51d6c5a47bb75.js +0 -1
- package/.next/static/chunks/app/terms/page-faf36cd0dde6dfa3.js +0 -1
- package/.next/static/chunks/framework-e60c938074ff7136.js +0 -1
- package/.next/static/chunks/main-447abf206d7ebd2f.js +0 -1
- package/.next/static/chunks/main-app-f63b86bdbf5b7b88.js +0 -1
- package/.next/static/chunks/pages/_app-6c8c2371b16a04b8.js +0 -1
- package/.next/static/chunks/pages/_error-94812ad32cad7365.js +0 -1
- package/.next/static/css/eb25c6452113486f.css +0 -3
- /package/.next/static/{AcaCjQ4akovHBUnVGPpfN → WshFGr6RxGYP6AbWuT9OG}/_ssgManifest.js +0 -0
|
@@ -23,7 +23,6 @@ describe('bin entrypoint', () => {
|
|
|
23
23
|
AURA_UPDATE_CHECK_MOCK_LATEST: 'v9.9.9',
|
|
24
24
|
AURA_UPDATE_CHECK_FORCE: '1',
|
|
25
25
|
AURA_AUTO_ALIAS_INSTALL: '0',
|
|
26
|
-
AURA_AUTO_MCP_INSTALL: '0',
|
|
27
26
|
AURA_FORCE_NODE_TSX: '1',
|
|
28
27
|
AURA_TOKEN: 'test-token',
|
|
29
28
|
WALLET_SERVER_URL: 'http://127.0.0.1:9',
|
|
@@ -43,7 +42,6 @@ describe('bin entrypoint', () => {
|
|
|
43
42
|
env: {
|
|
44
43
|
...process.env,
|
|
45
44
|
AURA_AUTO_ALIAS_INSTALL: '0',
|
|
46
|
-
AURA_AUTO_MCP_INSTALL: '0',
|
|
47
45
|
AURA_FORCE_NODE_TSX: '1',
|
|
48
46
|
AURA_TOKEN: 'test-token',
|
|
49
47
|
WALLET_SERVER_URL: 'http://127.0.0.1:9',
|
|
@@ -63,7 +61,6 @@ describe('bin entrypoint', () => {
|
|
|
63
61
|
env: {
|
|
64
62
|
...process.env,
|
|
65
63
|
AURA_AUTO_ALIAS_INSTALL: '0',
|
|
66
|
-
AURA_AUTO_MCP_INSTALL: '0',
|
|
67
64
|
AURA_FORCE_NODE_TSX: '1',
|
|
68
65
|
AURA_TOKEN: 'test-token',
|
|
69
66
|
WALLET_SERVER_URL: 'http://127.0.0.1:9',
|
|
@@ -83,7 +80,6 @@ describe('bin entrypoint', () => {
|
|
|
83
80
|
env: {
|
|
84
81
|
...process.env,
|
|
85
82
|
AURA_AUTO_ALIAS_INSTALL: '0',
|
|
86
|
-
AURA_AUTO_MCP_INSTALL: '0',
|
|
87
83
|
AURA_FORCE_NODE_TSX: '1',
|
|
88
84
|
AURA_TOKEN: 'test-token',
|
|
89
85
|
WALLET_SERVER_URL: 'http://127.0.0.1:9',
|
|
@@ -103,7 +99,6 @@ describe('bin entrypoint', () => {
|
|
|
103
99
|
env: {
|
|
104
100
|
...process.env,
|
|
105
101
|
AURA_AUTO_ALIAS_INSTALL: '0',
|
|
106
|
-
AURA_AUTO_MCP_INSTALL: '0',
|
|
107
102
|
AURA_FORCE_NODE_TSX: '1',
|
|
108
103
|
AURA_TOKEN: 'test-token',
|
|
109
104
|
WALLET_SERVER_URL: 'http://127.0.0.1:9',
|
|
@@ -123,7 +118,6 @@ describe('bin entrypoint', () => {
|
|
|
123
118
|
env: {
|
|
124
119
|
...process.env,
|
|
125
120
|
AURA_AUTO_ALIAS_INSTALL: '0',
|
|
126
|
-
AURA_AUTO_MCP_INSTALL: '0',
|
|
127
121
|
AURA_FORCE_NODE_TSX: '1',
|
|
128
122
|
AURA_NO_UPDATE_CHECK: '1',
|
|
129
123
|
},
|
|
@@ -150,7 +144,6 @@ describe('bin entrypoint', () => {
|
|
|
150
144
|
SHELL: '/bin/zsh',
|
|
151
145
|
PATH: tempBin,
|
|
152
146
|
AURA_AUTO_ALIAS_INSTALL_FORCE: '1',
|
|
153
|
-
AURA_AUTO_MCP_INSTALL: '0',
|
|
154
147
|
AURA_FORCE_NODE_TSX: '1',
|
|
155
148
|
AURA_NO_UPDATE_CHECK: '1',
|
|
156
149
|
WALLET_SERVER_URL: 'http://127.0.0.1:9',
|
|
@@ -194,7 +187,6 @@ describe('bin entrypoint', () => {
|
|
|
194
187
|
SHELL: '/bin/zsh',
|
|
195
188
|
PATH: tempBin,
|
|
196
189
|
AURA_AUTO_ALIAS_INSTALL_FORCE: '1',
|
|
197
|
-
AURA_AUTO_MCP_INSTALL: '0',
|
|
198
190
|
AURA_FORCE_NODE_TSX: '1',
|
|
199
191
|
AURA_NO_UPDATE_CHECK: '1',
|
|
200
192
|
WALLET_SERVER_URL: 'http://127.0.0.1:9',
|
|
@@ -220,7 +212,6 @@ describe('bin entrypoint', () => {
|
|
|
220
212
|
env: {
|
|
221
213
|
...process.env,
|
|
222
214
|
AURA_AUTO_ALIAS_INSTALL: '0',
|
|
223
|
-
AURA_AUTO_MCP_INSTALL: '0',
|
|
224
215
|
AURA_NO_UPDATE_CHECK: '1',
|
|
225
216
|
NO_COLOR: '1',
|
|
226
217
|
},
|
|
@@ -263,7 +254,6 @@ describe('bin entrypoint', () => {
|
|
|
263
254
|
env: {
|
|
264
255
|
...process.env,
|
|
265
256
|
AURA_AUTO_ALIAS_INSTALL: '0',
|
|
266
|
-
AURA_AUTO_MCP_INSTALL: '0',
|
|
267
257
|
AURA_NO_UPDATE_CHECK: '1',
|
|
268
258
|
NO_COLOR: '1',
|
|
269
259
|
},
|
|
@@ -296,6 +286,38 @@ describe('bin entrypoint', () => {
|
|
|
296
286
|
...process.env,
|
|
297
287
|
WALLET_DATA_DIR: tempData,
|
|
298
288
|
AURA_AUTO_ALIAS_INSTALL: '0',
|
|
289
|
+
AURA_FORCE_NODE_TSX: '1',
|
|
290
|
+
AURA_NO_UPDATE_CHECK: '1',
|
|
291
|
+
},
|
|
292
|
+
encoding: 'utf8',
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
const combinedOutput = `${result.stdout}\n${result.stderr}`;
|
|
296
|
+
expect(result.status).toBe(0);
|
|
297
|
+
expect(combinedOutput).toContain('npx auramaxx start [options]');
|
|
298
|
+
expect(combinedOutput).not.toContain('Unknown command: --debug');
|
|
299
|
+
} finally {
|
|
300
|
+
fs.rmSync(tempData, { recursive: true, force: true });
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
it('ignores env toggles and auto-runs skill/mcp setup on explicit start', () => {
|
|
305
|
+
const tempHome = fs.mkdtempSync(path.join(os.tmpdir(), 'auramaxx-start-autoinstall-'));
|
|
306
|
+
const tempData = fs.mkdtempSync(path.join(os.tmpdir(), 'auramaxx-start-autoinstall-data-'));
|
|
307
|
+
try {
|
|
308
|
+
fs.writeFileSync(path.join(tempData, 'auramaxx.db'), '');
|
|
309
|
+
fs.writeFileSync(path.join(tempData, 'agent-primary.json'), '{}');
|
|
310
|
+
|
|
311
|
+
const result = spawnSync(process.execPath, [binPath, 'start', '--help'], {
|
|
312
|
+
cwd: projectRoot,
|
|
313
|
+
env: {
|
|
314
|
+
...process.env,
|
|
315
|
+
HOME: tempHome,
|
|
316
|
+
CODEX_HOME: path.join(tempHome, '.codex'),
|
|
317
|
+
CLAUDE_HOME: path.join(tempHome, '.claude'),
|
|
318
|
+
OPENCLAW_HOME: path.join(tempHome, '.openclaw'),
|
|
319
|
+
WALLET_DATA_DIR: tempData,
|
|
320
|
+
AURA_AUTO_ALIAS_INSTALL: '0',
|
|
299
321
|
AURA_AUTO_SKILL_INSTALL: '0',
|
|
300
322
|
AURA_AUTO_MCP_INSTALL: '0',
|
|
301
323
|
AURA_FORCE_NODE_TSX: '1',
|
|
@@ -306,9 +328,11 @@ describe('bin entrypoint', () => {
|
|
|
306
328
|
|
|
307
329
|
const combinedOutput = `${result.stdout}\n${result.stderr}`;
|
|
308
330
|
expect(result.status).toBe(0);
|
|
331
|
+
expect(combinedOutput).toContain('Skills… ✓');
|
|
332
|
+
expect(combinedOutput).toContain('MCP… ✓');
|
|
309
333
|
expect(combinedOutput).toContain('npx auramaxx start [options]');
|
|
310
|
-
expect(combinedOutput).not.toContain('Unknown command: --debug');
|
|
311
334
|
} finally {
|
|
335
|
+
fs.rmSync(tempHome, { recursive: true, force: true });
|
|
312
336
|
fs.rmSync(tempData, { recursive: true, force: true });
|
|
313
337
|
}
|
|
314
338
|
});
|
|
@@ -56,6 +56,8 @@ describe('cli escalation guidance', () => {
|
|
|
56
56
|
approveUrl: 'http://localhost:4747/approve/req-123',
|
|
57
57
|
approvalScope: 'one_shot_read',
|
|
58
58
|
error: 'Excluded field requires approval',
|
|
59
|
+
}, {
|
|
60
|
+
retryCommandTemplate: 'npx auramaxx get OURSECRET',
|
|
59
61
|
});
|
|
60
62
|
|
|
61
63
|
expect(handled).toBe(true);
|
|
@@ -69,12 +71,12 @@ describe('cli escalation guidance', () => {
|
|
|
69
71
|
};
|
|
70
72
|
expect(payload.reqId).toBe('req-123');
|
|
71
73
|
expect(payload.claimAction?.command).toBe('npx auramaxx auth claim req-123 --json');
|
|
72
|
-
expect(payload.retryAction?.command).toBe('
|
|
74
|
+
expect(payload.retryAction?.command).toBe('npx auramaxx get OURSECRET --reqId req-123');
|
|
73
75
|
expect(payload.claimStatus).toBe('pending');
|
|
74
76
|
expect(payload.retryReady).toBe(false);
|
|
75
77
|
expect(payload.instructions?.[0]).toContain('approve');
|
|
76
78
|
expect(payload.instructions?.[1]).toContain('Claim');
|
|
77
|
-
expect(payload.instructions?.[2]).toContain('
|
|
79
|
+
expect(payload.instructions?.[2]).toContain('exact command');
|
|
78
80
|
|
|
79
81
|
errorSpy.mockRestore();
|
|
80
82
|
});
|
|
@@ -119,6 +121,8 @@ describe('cli escalation guidance', () => {
|
|
|
119
121
|
reqId: 'req-456',
|
|
120
122
|
claimStatus: 'expired',
|
|
121
123
|
retryReady: false,
|
|
124
|
+
}, {
|
|
125
|
+
retryCommandTemplate: 'npx auramaxx get OURSECRET --json',
|
|
122
126
|
});
|
|
123
127
|
|
|
124
128
|
expect(handled).toBe(true);
|
|
@@ -128,7 +132,7 @@ describe('cli escalation guidance', () => {
|
|
|
128
132
|
instructions?: string[];
|
|
129
133
|
};
|
|
130
134
|
expect(payload.claimAction?.command).toBe('npx auramaxx auth claim req-456 --json');
|
|
131
|
-
expect(payload.retryAction?.command).toBe('
|
|
135
|
+
expect(payload.retryAction?.command).toBe('npx auramaxx get OURSECRET --json --reqId req-456');
|
|
132
136
|
expect(payload.instructions?.length).toBeGreaterThan(0);
|
|
133
137
|
|
|
134
138
|
errorSpy.mockRestore();
|
|
@@ -223,7 +223,7 @@ describe('process management (mocked)', () => {
|
|
|
223
223
|
startServer({ headless: false });
|
|
224
224
|
|
|
225
225
|
expect(mockedExecSync).toHaveBeenCalledWith(
|
|
226
|
-
'
|
|
226
|
+
'npm run build',
|
|
227
227
|
expect.objectContaining({
|
|
228
228
|
cwd: expect.any(String),
|
|
229
229
|
stdio: 'ignore',
|
|
@@ -244,7 +244,7 @@ describe('process management (mocked)', () => {
|
|
|
244
244
|
let buildRecovered = false;
|
|
245
245
|
const buildIdSuffix = `${path.sep}.next${path.sep}BUILD_ID`;
|
|
246
246
|
mockedExecSync.mockImplementation((command: unknown) => {
|
|
247
|
-
if (String(command) === '
|
|
247
|
+
if (String(command) === 'npm run build') {
|
|
248
248
|
buildRecovered = true;
|
|
249
249
|
}
|
|
250
250
|
return Buffer.from('');
|
|
@@ -258,7 +258,7 @@ describe('process management (mocked)', () => {
|
|
|
258
258
|
startServer({ headless: false });
|
|
259
259
|
|
|
260
260
|
expect(mockedExecSync).toHaveBeenCalledWith(
|
|
261
|
-
'
|
|
261
|
+
'npm run build',
|
|
262
262
|
expect.objectContaining({
|
|
263
263
|
cwd: expect.any(String),
|
|
264
264
|
stdio: 'ignore',
|
|
@@ -214,7 +214,7 @@ describe('SocketServer auto-approve (in-process mode)', () => {
|
|
|
214
214
|
);
|
|
215
215
|
});
|
|
216
216
|
|
|
217
|
-
it('
|
|
217
|
+
it('enables auto-approve with default fallback and then fails on lock', async () => {
|
|
218
218
|
vi.spyOn(defaults, 'getDefaultSync').mockImplementation(<T>(_key: string, fallback: T): T => fallback);
|
|
219
219
|
|
|
220
220
|
const fetchSpy = vi.spyOn(globalThis, 'fetch');
|
|
@@ -238,7 +238,7 @@ describe('SocketServer auto-approve (in-process mode)', () => {
|
|
|
238
238
|
const payload = JSON.parse((socket.write as unknown as ReturnType<typeof vi.fn>).mock.calls[0][0]);
|
|
239
239
|
expect(payload).toMatchObject({
|
|
240
240
|
type: 'error',
|
|
241
|
-
message: '
|
|
241
|
+
message: 'Wallet is locked. Unlock first.',
|
|
242
242
|
});
|
|
243
243
|
});
|
|
244
244
|
|
|
@@ -9,6 +9,8 @@ vi.mock('../../cli/lib/process', () => ({
|
|
|
9
9
|
startServer: vi.fn(),
|
|
10
10
|
stopServer: vi.fn(),
|
|
11
11
|
acquireStartLock: vi.fn(),
|
|
12
|
+
ensurePrismaClientGenerated: vi.fn(),
|
|
13
|
+
findProjectRoot: vi.fn(() => '/test/root'),
|
|
12
14
|
getRuntimeLogPaths: vi.fn(() => ({
|
|
13
15
|
dir: '/tmp/.logs',
|
|
14
16
|
server: '/tmp/.logs/server.log',
|
|
@@ -38,7 +40,12 @@ vi.mock('../../cli/commands/service', () => ({
|
|
|
38
40
|
|
|
39
41
|
import { runStartCli } from '../../cli/commands/start';
|
|
40
42
|
import { isServerRunning, waitForServer } from '../../cli/lib/http';
|
|
41
|
-
import {
|
|
43
|
+
import {
|
|
44
|
+
acquireStartLock,
|
|
45
|
+
ensurePrismaClientGenerated,
|
|
46
|
+
startServer,
|
|
47
|
+
stopServer,
|
|
48
|
+
} from '../../cli/lib/process';
|
|
42
49
|
import {
|
|
43
50
|
installService,
|
|
44
51
|
isServiceInstalled,
|
|
@@ -53,6 +60,7 @@ describe('start CLI run behavior', () => {
|
|
|
53
60
|
vi.mocked(isServerRunning).mockResolvedValue(false);
|
|
54
61
|
vi.mocked(waitForServer).mockResolvedValue(undefined);
|
|
55
62
|
vi.mocked(acquireStartLock).mockResolvedValue(() => {});
|
|
63
|
+
vi.mocked(ensurePrismaClientGenerated).mockReturnValue({ ok: true, generated: false, clientPath: '/test/root/node_modules/.prisma/client/default.js' });
|
|
56
64
|
vi.mocked(installService).mockReturnValue({ installed: true });
|
|
57
65
|
vi.mocked(isServiceInstalled).mockReturnValue(true);
|
|
58
66
|
vi.mocked(isServiceRunning).mockReturnValue(false);
|
|
@@ -158,5 +166,20 @@ describe('start CLI run behavior', () => {
|
|
|
158
166
|
expect(startServer).not.toHaveBeenCalled();
|
|
159
167
|
expect(loadServiceIfNeeded).not.toHaveBeenCalled();
|
|
160
168
|
expect(stopServiceProcesses).not.toHaveBeenCalled();
|
|
169
|
+
expect(ensurePrismaClientGenerated).not.toHaveBeenCalled();
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
it('fails early with actionable guidance when prisma bootstrap cannot be repaired', async () => {
|
|
173
|
+
vi.mocked(ensurePrismaClientGenerated).mockReturnValue({
|
|
174
|
+
ok: false,
|
|
175
|
+
generated: false,
|
|
176
|
+
clientPath: '/test/root/node_modules/.prisma/client/default.js',
|
|
177
|
+
error: 'spawn failed',
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
await expect(runStartCli([])).resolves.toBe(1);
|
|
181
|
+
|
|
182
|
+
expect(loadServiceIfNeeded).not.toHaveBeenCalled();
|
|
183
|
+
expect(startServer).not.toHaveBeenCalled();
|
|
161
184
|
});
|
|
162
185
|
});
|
|
@@ -853,7 +853,7 @@ describe('Actions Endpoints', () => {
|
|
|
853
853
|
expect(pollRes.body.status).toBe('rejected');
|
|
854
854
|
});
|
|
855
855
|
|
|
856
|
-
it('should default TTL to
|
|
856
|
+
it('should default TTL to 3600 when not specified', async () => {
|
|
857
857
|
const createRes = await request(app)
|
|
858
858
|
.post('/actions')
|
|
859
859
|
.set('Authorization', `Bearer ${agentToken}`)
|
|
@@ -871,7 +871,7 @@ describe('Actions Endpoints', () => {
|
|
|
871
871
|
.set('Authorization', `Bearer ${adminToken}`)
|
|
872
872
|
.send({ approved: true });
|
|
873
873
|
|
|
874
|
-
expect(approveRes.body.expiresIn).toBe(
|
|
874
|
+
expect(approveRes.body.expiresIn).toBe(3600);
|
|
875
875
|
});
|
|
876
876
|
|
|
877
877
|
it('should store pre-computed action in metadata', async () => {
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { afterAll, beforeEach, describe, expect, it } from 'vitest';
|
|
2
|
+
import request from 'supertest';
|
|
3
|
+
import { cleanDatabase, createTestApp, setupAndUnlockWallet, testPrisma } from '../setup';
|
|
4
|
+
|
|
5
|
+
const app = createTestApp();
|
|
6
|
+
|
|
7
|
+
describe('Agent Profile Endpoints', () => {
|
|
8
|
+
let adminToken: string;
|
|
9
|
+
|
|
10
|
+
beforeEach(async () => {
|
|
11
|
+
await cleanDatabase();
|
|
12
|
+
const setup = await setupAndUnlockWallet();
|
|
13
|
+
adminToken = setup.adminToken;
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
afterAll(async () => {
|
|
17
|
+
await testPrisma.$disconnect();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('creates and retrieves an agent profile keyed by path agentId', async () => {
|
|
21
|
+
const putRes = await request(app)
|
|
22
|
+
.put('/agent-profiles/primary')
|
|
23
|
+
.set('Authorization', `Bearer ${adminToken}`)
|
|
24
|
+
.send({
|
|
25
|
+
email: 'ops@example.com',
|
|
26
|
+
phone: '+1 555 0100',
|
|
27
|
+
address: 'New York, US',
|
|
28
|
+
profileImage: 'https://cdn.example.com/avatar.png',
|
|
29
|
+
attributes: {
|
|
30
|
+
team: 'ops',
|
|
31
|
+
region: 'us-east',
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
expect(putRes.status).toBe(200);
|
|
36
|
+
expect(putRes.body.success).toBe(true);
|
|
37
|
+
expect(putRes.body.profile.agentId).toBe('primary');
|
|
38
|
+
expect(putRes.body.profile.email).toBe('ops@example.com');
|
|
39
|
+
expect(putRes.body.profile.attributes).toEqual({
|
|
40
|
+
team: 'ops',
|
|
41
|
+
region: 'us-east',
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const getRes = await request(app)
|
|
45
|
+
.get('/agent-profiles/primary')
|
|
46
|
+
.set('Authorization', `Bearer ${adminToken}`);
|
|
47
|
+
expect(getRes.status).toBe(200);
|
|
48
|
+
expect(getRes.body.profile.agentId).toBe('primary');
|
|
49
|
+
expect(getRes.body.profile.profileImage).toBe('https://cdn.example.com/avatar.png');
|
|
50
|
+
|
|
51
|
+
const listRes = await request(app)
|
|
52
|
+
.get('/agent-profiles')
|
|
53
|
+
.set('Authorization', `Bearer ${adminToken}`);
|
|
54
|
+
expect(listRes.status).toBe(200);
|
|
55
|
+
expect(Array.isArray(listRes.body.profiles)).toBe(true);
|
|
56
|
+
expect(listRes.body.profiles).toEqual(
|
|
57
|
+
expect.arrayContaining([
|
|
58
|
+
expect.objectContaining({
|
|
59
|
+
agentId: 'primary',
|
|
60
|
+
email: 'ops@example.com',
|
|
61
|
+
}),
|
|
62
|
+
]),
|
|
63
|
+
);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it('rejects mismatched body agentId', async () => {
|
|
67
|
+
const res = await request(app)
|
|
68
|
+
.put('/agent-profiles/primary')
|
|
69
|
+
.set('Authorization', `Bearer ${adminToken}`)
|
|
70
|
+
.send({
|
|
71
|
+
agentId: 'different-agent',
|
|
72
|
+
email: 'ops@example.com',
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
expect(res.status).toBe(400);
|
|
76
|
+
expect(String(res.body.error || '')).toContain('must match');
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it('rejects invalid wildcard attribute keys', async () => {
|
|
80
|
+
const res = await request(app)
|
|
81
|
+
.put('/agent-profiles/primary')
|
|
82
|
+
.set('Authorization', `Bearer ${adminToken}`)
|
|
83
|
+
.send({
|
|
84
|
+
attributes: {
|
|
85
|
+
' ': 'ops',
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
expect(res.status).toBe(400);
|
|
90
|
+
expect(String(res.body.error || '')).toContain('attribute keys');
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it('supports underscore aliases and deletion', async () => {
|
|
94
|
+
const createRes = await request(app)
|
|
95
|
+
.put('/agent-profiles/primary')
|
|
96
|
+
.set('Authorization', `Bearer ${adminToken}`)
|
|
97
|
+
.send({
|
|
98
|
+
profile_image: 'https://cdn.example.com/avatar.png',
|
|
99
|
+
custom_attributes: { team: 'core' },
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
expect(createRes.status).toBe(200);
|
|
103
|
+
expect(createRes.body.profile.profileImage).toBe('https://cdn.example.com/avatar.png');
|
|
104
|
+
expect(createRes.body.profile.attributes).toEqual({ team: 'core' });
|
|
105
|
+
|
|
106
|
+
const deleteRes = await request(app)
|
|
107
|
+
.delete('/agent-profiles/primary')
|
|
108
|
+
.set('Authorization', `Bearer ${adminToken}`);
|
|
109
|
+
expect(deleteRes.status).toBe(200);
|
|
110
|
+
expect(deleteRes.body.deleted).toBe(true);
|
|
111
|
+
|
|
112
|
+
const missingRes = await request(app)
|
|
113
|
+
.get('/agent-profiles/primary')
|
|
114
|
+
.set('Authorization', `Bearer ${adminToken}`);
|
|
115
|
+
expect(missingRes.status).toBe(404);
|
|
116
|
+
});
|
|
117
|
+
});
|
|
@@ -337,6 +337,40 @@ describe('Auth Endpoints', () => {
|
|
|
337
337
|
expect(res.body.compilerVersion).toBe('profile.v1');
|
|
338
338
|
});
|
|
339
339
|
|
|
340
|
+
it('should include exact retryCommand derived from stored original command', async () => {
|
|
341
|
+
const authRes = await request(app)
|
|
342
|
+
.post('/auth')
|
|
343
|
+
.send({ agentId: TEST_AGENT_ID, profile: 'strict', pubkey: AUTH_TEST_PUBKEY });
|
|
344
|
+
|
|
345
|
+
const created = await testPrisma.humanAction.findUnique({
|
|
346
|
+
where: { id: authRes.body.requestId },
|
|
347
|
+
});
|
|
348
|
+
expect(created).toBeTruthy();
|
|
349
|
+
|
|
350
|
+
const metadata = JSON.parse(created!.metadata || '{}');
|
|
351
|
+
metadata.originalCommand = 'npx auramaxx get github';
|
|
352
|
+
await testPrisma.humanAction.update({
|
|
353
|
+
where: { id: authRes.body.requestId },
|
|
354
|
+
data: { metadata: JSON.stringify(metadata) },
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
await request(app)
|
|
358
|
+
.post(`/actions/${authRes.body.requestId}/resolve`)
|
|
359
|
+
.set('Authorization', `Bearer ${adminToken}`)
|
|
360
|
+
.send({ approved: true });
|
|
361
|
+
|
|
362
|
+
const claim = await request(app)
|
|
363
|
+
.get(`/auth/${authRes.body.requestId}?secret=${authRes.body.secret}`);
|
|
364
|
+
|
|
365
|
+
expect(claim.status).toBe(200);
|
|
366
|
+
expect(claim.body.status).toBe('approved');
|
|
367
|
+
expect(claim.body.retryCommand).toBe(`npx auramaxx get github --reqId ${authRes.body.requestId}`);
|
|
368
|
+
expect(Array.isArray(claim.body.instructions)).toBe(true);
|
|
369
|
+
expect(claim.body.instructions[0]).toBe(
|
|
370
|
+
`Run this exact command now: npx auramaxx get github --reqId ${authRes.body.requestId}`,
|
|
371
|
+
);
|
|
372
|
+
});
|
|
373
|
+
|
|
340
374
|
it('should allow only one successful claim when claimed concurrently', async () => {
|
|
341
375
|
const authRes = await request(app)
|
|
342
376
|
.post('/auth')
|
|
@@ -4,8 +4,9 @@ import {
|
|
|
4
4
|
generateKeyPairSync,
|
|
5
5
|
privateDecrypt,
|
|
6
6
|
} from 'crypto';
|
|
7
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
7
|
+
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
8
8
|
import {
|
|
9
|
+
bootstrapViaAuthRequest,
|
|
9
10
|
createReadToken,
|
|
10
11
|
encryptToAgentPubkey,
|
|
11
12
|
buildScopedReadTokenIssueRequest,
|
|
@@ -13,6 +14,7 @@ import {
|
|
|
13
14
|
isValidAgentPubkey,
|
|
14
15
|
normalizeAgentPubkey,
|
|
15
16
|
} from '../../lib/credential-transport';
|
|
17
|
+
import * as defaults from '../../lib/defaults';
|
|
16
18
|
|
|
17
19
|
interface HybridEnvelope {
|
|
18
20
|
v: number;
|
|
@@ -63,6 +65,12 @@ function decryptWithPrivateKey(encryptedBase64: string, privateKeyPem: string):
|
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
describe('credential-transport', () => {
|
|
68
|
+
afterEach(() => {
|
|
69
|
+
vi.restoreAllMocks();
|
|
70
|
+
delete process.env.AURA_AUTH_PROFILE;
|
|
71
|
+
delete process.env.AURA_AGENT_PROFILE;
|
|
72
|
+
});
|
|
73
|
+
|
|
66
74
|
const { publicKey, privateKey } = generateKeyPairSync('rsa', {
|
|
67
75
|
modulusLength: 2048,
|
|
68
76
|
publicKeyEncoding: { type: 'spki', format: 'pem' },
|
|
@@ -188,7 +196,65 @@ describe('credential-transport', () => {
|
|
|
188
196
|
|
|
189
197
|
fetchSpy.mockRestore();
|
|
190
198
|
});
|
|
191
|
-
|
|
199
|
+
|
|
200
|
+
it('bootstrapViaAuthRequest defaults to trust.localProfile when unset', async () => {
|
|
201
|
+
const keypair = generateEphemeralKeypair();
|
|
202
|
+
vi.spyOn(defaults, 'getDefault').mockImplementation(async (key: string) => {
|
|
203
|
+
if (key === 'trust.localProfile') return 'admin';
|
|
204
|
+
if (key === 'trust.localProfileVersion') return 'v1';
|
|
205
|
+
return null;
|
|
206
|
+
});
|
|
207
|
+
const fetchSpy = vi.spyOn(globalThis, 'fetch').mockResolvedValue(
|
|
208
|
+
new Response(JSON.stringify({
|
|
209
|
+
success: true,
|
|
210
|
+
requestId: 'req_123',
|
|
211
|
+
secret: 'secret_123',
|
|
212
|
+
}), {
|
|
213
|
+
status: 200,
|
|
214
|
+
headers: { 'Content-Type': 'application/json' },
|
|
215
|
+
}),
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
const result = await bootstrapViaAuthRequest('https://wallet.local', 'cli-test-auth', keypair, {
|
|
219
|
+
noWait: true,
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
expect(result).toEqual({
|
|
223
|
+
requestId: 'req_123',
|
|
224
|
+
secret: 'secret_123',
|
|
225
|
+
approveUrl: undefined,
|
|
226
|
+
});
|
|
227
|
+
const call = fetchSpy.mock.calls[0]?.[1] as RequestInit;
|
|
228
|
+
const body = JSON.parse(String(call.body));
|
|
229
|
+
expect(body.profile).toBe('admin');
|
|
230
|
+
expect(body.profileVersion).toBe('v1');
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
it('bootstrapViaAuthRequest falls back to defaults.ts seeds when local trust defaults are empty', async () => {
|
|
234
|
+
const keypair = generateEphemeralKeypair();
|
|
235
|
+
vi.spyOn(defaults, 'getDefault').mockResolvedValue('');
|
|
236
|
+
const fetchSpy = vi.spyOn(globalThis, 'fetch').mockResolvedValue(
|
|
237
|
+
new Response(JSON.stringify({
|
|
238
|
+
success: true,
|
|
239
|
+
requestId: 'req_123',
|
|
240
|
+
secret: 'secret_123',
|
|
241
|
+
}), {
|
|
242
|
+
status: 200,
|
|
243
|
+
headers: { 'Content-Type': 'application/json' },
|
|
244
|
+
}),
|
|
245
|
+
);
|
|
246
|
+
|
|
247
|
+
await bootstrapViaAuthRequest('https://wallet.local', 'cli-test-auth', keypair, {
|
|
248
|
+
noWait: true,
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
const call = fetchSpy.mock.calls[0]?.[1] as RequestInit;
|
|
252
|
+
const body = JSON.parse(String(call.body));
|
|
253
|
+
expect(body.profile).toBe('admin');
|
|
254
|
+
expect(body.profileVersion).toBe('v1');
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
it('createReadToken should fail when encryptedToken is missing', async () => {
|
|
192
258
|
const keypair = generateEphemeralKeypair();
|
|
193
259
|
const fetchSpy = vi.spyOn(globalThis, 'fetch').mockResolvedValue(
|
|
194
260
|
new Response(JSON.stringify({ token: 'plaintext-token' }), {
|
|
@@ -26,9 +26,9 @@ describe('defaults helper', () => {
|
|
|
26
26
|
expect(value).toBe(0);
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
it('defaults local socket auto-approve to
|
|
29
|
+
it('defaults local socket auto-approve to on', async () => {
|
|
30
30
|
const value = await getDefault('trust.localAutoApprove', true);
|
|
31
|
-
expect(value).toBe(
|
|
31
|
+
expect(value).toBe(true);
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
it('setDefault persists value and cache serves sync reads', async () => {
|
|
@@ -214,8 +214,8 @@ describe('escalation hard-deny schema', () => {
|
|
|
214
214
|
});
|
|
215
215
|
|
|
216
216
|
describe('escalation profile resolver', () => {
|
|
217
|
-
it('uses
|
|
218
|
-
expect(_testOnly.resolveEscalationProfile(['secret:read'])).toBe('
|
|
217
|
+
it('uses dev when required permissions fit dev profile', () => {
|
|
218
|
+
expect(_testOnly.resolveEscalationProfile(['secret:read'])).toBe('dev');
|
|
219
219
|
});
|
|
220
220
|
|
|
221
221
|
it('uses dev when strict cannot satisfy but dev can', () => {
|
|
@@ -11,7 +11,7 @@ describe('update-check helpers', () => {
|
|
|
11
11
|
it('builds version info and update command', () => {
|
|
12
12
|
const info = buildVersionInfo('1.0.0', '1.1.0');
|
|
13
13
|
expect(info.updateAvailable).toBe(true);
|
|
14
|
-
expect(buildUpdateCommand()).toBe('npm install -g auramaxx');
|
|
14
|
+
expect(buildUpdateCommand()).toBe('npm install -g auramaxx --foreground-scripts');
|
|
15
15
|
expect(buildNpxLatestCommand()).toBe('npx --yes auramaxx@latest');
|
|
16
16
|
expect(buildNpxLatestCommand('auramaxx', ['restart'])).toBe('npx --yes auramaxx@latest restart');
|
|
17
17
|
expect(buildUpdateFallbackCommand()).toBe('npx --yes auramaxx@latest start');
|
|
@@ -32,6 +32,7 @@ import strategyRoutes from '../routes/strategy';
|
|
|
32
32
|
import actionsRoutes from '../routes/actions';
|
|
33
33
|
import credentialAgentRoutes from '../routes/credential-agents';
|
|
34
34
|
import credentialsRoutes from '../routes/credentials';
|
|
35
|
+
import agentProfilesRoutes from '../routes/agent-profiles';
|
|
35
36
|
import credentialSharesRoutes from '../routes/credential-shares';
|
|
36
37
|
import importRoutes from '../routes/import';
|
|
37
38
|
import adaptersRoutes from '../routes/adapters';
|
|
@@ -73,6 +74,7 @@ export function createTestApp() {
|
|
|
73
74
|
app.use('/actions', actionsRoutes);
|
|
74
75
|
app.use('/agents/credential', credentialAgentRoutes);
|
|
75
76
|
app.use('/credentials', credentialsRoutes);
|
|
77
|
+
app.use('/agent-profiles', agentProfilesRoutes);
|
|
76
78
|
app.use('/credential-shares', credentialSharesRoutes);
|
|
77
79
|
app.use('/credentials/import', importRoutes);
|
|
78
80
|
app.use('/adapters', adaptersRoutes);
|
|
@@ -165,6 +167,11 @@ export async function cleanDatabase() {
|
|
|
165
167
|
}
|
|
166
168
|
}
|
|
167
169
|
}
|
|
170
|
+
|
|
171
|
+
const agentProfilesPath = path.join(DATA_PATHS.wallets, 'agent-profiles.json');
|
|
172
|
+
if (fs.existsSync(agentProfilesPath)) {
|
|
173
|
+
fs.unlinkSync(agentProfilesPath);
|
|
174
|
+
}
|
|
168
175
|
}
|
|
169
176
|
|
|
170
177
|
// Test constants
|