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
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { isServerRunning, waitForServer } from '../lib/http';
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
acquireStartLock,
|
|
8
|
+
ensurePrismaClientGenerated,
|
|
9
|
+
findProjectRoot,
|
|
10
|
+
getRuntimeLogPaths,
|
|
11
|
+
startServer,
|
|
12
|
+
stopServer,
|
|
13
|
+
} from '../lib/process';
|
|
7
14
|
import { getErrorMessage } from '../../lib/error';
|
|
8
15
|
import { printBanner, printStatus, printHelp } from '../lib/theme';
|
|
9
16
|
import {
|
|
@@ -14,6 +21,7 @@ import {
|
|
|
14
21
|
stopServiceProcesses,
|
|
15
22
|
SERVICE_BOOTSTRAP_ENV,
|
|
16
23
|
} from './service';
|
|
24
|
+
import * as fs from 'fs';
|
|
17
25
|
|
|
18
26
|
export interface StartCliArgs {
|
|
19
27
|
headless: boolean;
|
|
@@ -55,6 +63,15 @@ function printRunningStatus(headless: boolean, serviceInstalled: boolean): void
|
|
|
55
63
|
console.log('');
|
|
56
64
|
}
|
|
57
65
|
|
|
66
|
+
function hasPrismaClientMissingCrash(logPath: string): boolean {
|
|
67
|
+
try {
|
|
68
|
+
const content = fs.readFileSync(logPath, 'utf8');
|
|
69
|
+
return content.includes("Cannot find module '.prisma/client/default'");
|
|
70
|
+
} catch {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
58
75
|
export async function runStartCli(argv: string[] = process.argv.slice(2)): Promise<number> {
|
|
59
76
|
const parsed = parseStartArgs(argv);
|
|
60
77
|
if (parsed.help) {
|
|
@@ -77,6 +94,22 @@ export async function runStartCli(argv: string[] = process.argv.slice(2)): Promi
|
|
|
77
94
|
return 0;
|
|
78
95
|
}
|
|
79
96
|
|
|
97
|
+
const root = findProjectRoot();
|
|
98
|
+
const prismaBootstrap = ensurePrismaClientGenerated(root);
|
|
99
|
+
if (!prismaBootstrap.ok) {
|
|
100
|
+
console.error('Prisma runtime client is missing and automatic recovery failed.');
|
|
101
|
+
if (prismaBootstrap.error) {
|
|
102
|
+
console.error(`Details: ${prismaBootstrap.error}`);
|
|
103
|
+
}
|
|
104
|
+
console.error('Run the following, then retry:');
|
|
105
|
+
console.error(` cd "${root}"`);
|
|
106
|
+
console.error(' npx prisma generate --schema prisma/schema.prisma');
|
|
107
|
+
return 1;
|
|
108
|
+
}
|
|
109
|
+
if (prismaBootstrap.generated) {
|
|
110
|
+
printStatus('Prisma Client', 'regenerated');
|
|
111
|
+
}
|
|
112
|
+
|
|
80
113
|
// Canonical start path: install + launch the background service and rely on it.
|
|
81
114
|
// Avoid recursive service bootstrapping when already inside service-launched `start --background`.
|
|
82
115
|
if (prefersServiceStart) {
|
|
@@ -169,8 +202,14 @@ export async function runStartCli(argv: string[] = process.argv.slice(2)): Promi
|
|
|
169
202
|
try {
|
|
170
203
|
await waitForServer(15000);
|
|
171
204
|
} catch {
|
|
172
|
-
|
|
173
|
-
|
|
205
|
+
const runtimeLogs = getRuntimeLogPaths(root);
|
|
206
|
+
if (hasPrismaClientMissingCrash(runtimeLogs.server)) {
|
|
207
|
+
console.error('Server failed to boot: generated Prisma client is missing.');
|
|
208
|
+
console.error('Run: npx prisma generate --schema prisma/schema.prisma');
|
|
209
|
+
} else {
|
|
210
|
+
console.error('Server failed to start within 15 seconds.');
|
|
211
|
+
console.error('Check for port conflicts on :4242');
|
|
212
|
+
}
|
|
174
213
|
if (parsed.dev) {
|
|
175
214
|
stopServer();
|
|
176
215
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Usage:
|
|
5
5
|
* npx auramaxx token preview --profile dev
|
|
6
|
-
* npx auramaxx token preview --profile
|
|
6
|
+
* npx auramaxx token preview --profile dev --profile-version v1 --json
|
|
7
7
|
* npx auramaxx token preview --profile dev --overrides '{"ttlSeconds":900}'
|
|
8
8
|
*
|
|
9
9
|
* Auth:
|
|
@@ -118,7 +118,7 @@ function showHelp(): void {
|
|
|
118
118
|
|
|
119
119
|
Examples:
|
|
120
120
|
npx auramaxx token preview --profile dev
|
|
121
|
-
npx auramaxx token preview --profile
|
|
121
|
+
npx auramaxx token preview --profile dev --profile-version v1 --json
|
|
122
122
|
npx auramaxx token preview --profile dev --overrides '{"ttlSeconds":900}'
|
|
123
123
|
`);
|
|
124
124
|
}
|
|
@@ -37,6 +37,10 @@ interface DeterministicErrorBody {
|
|
|
37
37
|
instructions?: string[];
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
interface PermissionDeniedContext {
|
|
41
|
+
retryCommandTemplate?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
40
44
|
function isEscalationPayload(body: unknown): body is Record<string, unknown> {
|
|
41
45
|
if (!body || typeof body !== 'object' || Array.isArray(body)) return false;
|
|
42
46
|
const obj = body as Record<string, unknown>;
|
|
@@ -59,6 +63,83 @@ function isDeterministicErrorBody(body: Record<string, unknown>): boolean {
|
|
|
59
63
|
return errorCode.length > 0 && DETERMINISTIC_ESCALATION_ERROR_CODES.has(errorCode);
|
|
60
64
|
}
|
|
61
65
|
|
|
66
|
+
function shellQuote(arg: string): string {
|
|
67
|
+
if (/^[A-Za-z0-9_./:=+-]+$/.test(arg)) return arg;
|
|
68
|
+
return `'${arg.replace(/'/g, `'\"'\"'`)}'`;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function deriveRetryCommandTemplateFromArgv(): string | undefined {
|
|
72
|
+
const scriptPath = process.argv[1] || '';
|
|
73
|
+
const match = scriptPath.match(/\/([^/]+)\.ts$/);
|
|
74
|
+
if (!match) return undefined;
|
|
75
|
+
const commandName = match[1];
|
|
76
|
+
const args = process.argv.slice(2).map(shellQuote).join(' ').trim();
|
|
77
|
+
return args.length > 0
|
|
78
|
+
? `npx auramaxx ${commandName} ${args}`
|
|
79
|
+
: `npx auramaxx ${commandName}`;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function materializeRetryCommand(baseCommand: string | undefined, reqId: string): string | undefined {
|
|
83
|
+
const base = String(baseCommand || '').trim();
|
|
84
|
+
if (!base) return undefined;
|
|
85
|
+
let command = base.replace(/<reqId>/g, reqId);
|
|
86
|
+
command = command
|
|
87
|
+
.replace(/--req-id\s+\S+/g, `--reqId ${reqId}`)
|
|
88
|
+
.replace(/--request-id\s+\S+/g, `--reqId ${reqId}`)
|
|
89
|
+
.replace(/--requestId\s+\S+/g, `--reqId ${reqId}`)
|
|
90
|
+
.replace(/--reqId\s+\S+/g, `--reqId ${reqId}`);
|
|
91
|
+
if (!/\s--(?:reqId|req-id|requestId|request-id)(?:\s|=|$)/.test(command)) {
|
|
92
|
+
command = `${command} --reqId ${reqId}`;
|
|
93
|
+
}
|
|
94
|
+
return command;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function isPlaceholderRetryCommand(command: string | undefined): boolean {
|
|
98
|
+
const value = String(command || '').trim();
|
|
99
|
+
if (!value) return true;
|
|
100
|
+
return value.includes('<retry_original_command>') || value.includes('<retry_original_tool>');
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function resolveRetryCommand(params: {
|
|
104
|
+
reqId: string;
|
|
105
|
+
body: Record<string, unknown>;
|
|
106
|
+
context?: PermissionDeniedContext;
|
|
107
|
+
}): string {
|
|
108
|
+
const retryAction = (
|
|
109
|
+
params.body.retryAction
|
|
110
|
+
&& typeof params.body.retryAction === 'object'
|
|
111
|
+
&& !Array.isArray(params.body.retryAction)
|
|
112
|
+
) ? params.body.retryAction as Record<string, unknown> : null;
|
|
113
|
+
|
|
114
|
+
const actionCommand = retryAction && typeof retryAction.command === 'string'
|
|
115
|
+
? retryAction.command
|
|
116
|
+
: undefined;
|
|
117
|
+
const retryCommand = typeof params.body.retryCommand === 'string'
|
|
118
|
+
? params.body.retryCommand
|
|
119
|
+
: undefined;
|
|
120
|
+
const template = String(params.context?.retryCommandTemplate || '').trim();
|
|
121
|
+
const derivedTemplate = deriveRetryCommandTemplateFromArgv();
|
|
122
|
+
|
|
123
|
+
const candidate = [
|
|
124
|
+
template,
|
|
125
|
+
retryCommand,
|
|
126
|
+
isPlaceholderRetryCommand(actionCommand) ? '' : (actionCommand || ''),
|
|
127
|
+
derivedTemplate || '',
|
|
128
|
+
]
|
|
129
|
+
.map((entry) => String(entry || '').trim())
|
|
130
|
+
.find((entry) => entry.length > 0);
|
|
131
|
+
|
|
132
|
+
return materializeRetryCommand(candidate || '<retry_original_command>', params.reqId)
|
|
133
|
+
|| `<retry_original_command> --reqId ${params.reqId}`;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function hasPlaceholderInstructions(instructions: unknown): boolean {
|
|
137
|
+
if (!Array.isArray(instructions)) return false;
|
|
138
|
+
return instructions.some((entry) =>
|
|
139
|
+
typeof entry === 'string'
|
|
140
|
+
&& (entry.includes('<retry_original_command>') || entry.includes('<retry_original_tool>')));
|
|
141
|
+
}
|
|
142
|
+
|
|
62
143
|
function emitUnsupportedContractVersion(status: number, rawVersion: string): void {
|
|
63
144
|
const payload = {
|
|
64
145
|
contractVersion: ESCALATION_CONTRACT_VERSION,
|
|
@@ -78,7 +159,11 @@ function emitUnsupportedContractVersion(status: number, rawVersion: string): voi
|
|
|
78
159
|
* Returns `true` if the error was handled (caller should exit),
|
|
79
160
|
* `false` if this isn't an escalation-shaped permission response.
|
|
80
161
|
*/
|
|
81
|
-
export async function handlePermissionDenied(
|
|
162
|
+
export async function handlePermissionDenied(
|
|
163
|
+
status: number,
|
|
164
|
+
body: unknown,
|
|
165
|
+
context?: PermissionDeniedContext,
|
|
166
|
+
): Promise<boolean> {
|
|
82
167
|
if (status !== 400 && status !== 403) return false;
|
|
83
168
|
if (!isEscalationPayload(body)) return false;
|
|
84
169
|
|
|
@@ -93,24 +178,26 @@ export async function handlePermissionDenied(status: number, body: unknown): Pro
|
|
|
93
178
|
const reqId = typeof body.reqId === 'string' ? body.reqId.trim() : '';
|
|
94
179
|
const claimCommand = reqId ? `npx auramaxx auth claim ${reqId} --json` : undefined;
|
|
95
180
|
const retryCommand = reqId
|
|
96
|
-
?
|
|
181
|
+
? resolveRetryCommand({ reqId, body: deterministic, context })
|
|
97
182
|
: '<retry_original_command>';
|
|
183
|
+
const existingInstructions = Array.isArray(deterministic.instructions) ? deterministic.instructions : [];
|
|
184
|
+
const instructions = reqId && (existingInstructions.length === 0 || hasPlaceholderInstructions(existingInstructions))
|
|
185
|
+
? [
|
|
186
|
+
...(claimCommand ? [`1) Re-claim token: ${claimCommand}`] : []),
|
|
187
|
+
`2) Run this exact command now: ${retryCommand}`,
|
|
188
|
+
]
|
|
189
|
+
: deterministic.instructions;
|
|
98
190
|
const guidance = {
|
|
99
191
|
status,
|
|
100
192
|
...deterministic,
|
|
101
193
|
...(reqId ? { reqId } : {}),
|
|
102
|
-
...(reqId
|
|
194
|
+
...(reqId ? {
|
|
103
195
|
claimAction: buildCliClaimAction(reqId),
|
|
104
196
|
} : {}),
|
|
105
|
-
...(reqId
|
|
197
|
+
...(reqId ? {
|
|
106
198
|
retryAction: buildCliRetryAction(retryCommand),
|
|
107
199
|
} : {}),
|
|
108
|
-
...(
|
|
109
|
-
instructions: [
|
|
110
|
-
...(claimCommand ? [`1) Re-claim token: ${claimCommand}`] : []),
|
|
111
|
-
`2) Retry original command: ${retryCommand}`,
|
|
112
|
-
],
|
|
113
|
-
} : {}),
|
|
200
|
+
...(instructions ? { instructions } : {}),
|
|
114
201
|
};
|
|
115
202
|
console.error(JSON.stringify(guidance, null, 2));
|
|
116
203
|
return true;
|
|
@@ -123,26 +210,24 @@ export async function handlePermissionDenied(status: number, body: unknown): Pro
|
|
|
123
210
|
? approval.approveUrl
|
|
124
211
|
: '<approve_url>';
|
|
125
212
|
const claimCommand = `npx auramaxx auth claim ${reqId} --json`;
|
|
126
|
-
const retryCommand =
|
|
213
|
+
const retryCommand = resolveRetryCommand({ reqId, body: approval, context });
|
|
214
|
+
const existingInstructions = Array.isArray(approval.instructions) ? approval.instructions : [];
|
|
215
|
+
const instructions = existingInstructions.length === 0 || hasPlaceholderInstructions(existingInstructions)
|
|
216
|
+
? [
|
|
217
|
+
`1) Ask a human to approve: ${approveUrl}`,
|
|
218
|
+
`2) Claim now: ${claimCommand}`,
|
|
219
|
+
`3) Run this exact command now: ${retryCommand}`,
|
|
220
|
+
]
|
|
221
|
+
: approval.instructions;
|
|
127
222
|
const guidance = {
|
|
128
223
|
status,
|
|
129
224
|
...approval,
|
|
130
225
|
reqId,
|
|
131
226
|
claimStatus: typeof approval.claimStatus === 'string' ? approval.claimStatus : 'pending',
|
|
132
227
|
retryReady: typeof approval.retryReady === 'boolean' ? approval.retryReady : false,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}),
|
|
136
|
-
...(approval.retryAction ? {} : {
|
|
137
|
-
retryAction: buildCliRetryAction(retryCommand),
|
|
138
|
-
}),
|
|
139
|
-
...(!Array.isArray(approval.instructions) || approval.instructions.length === 0 ? {
|
|
140
|
-
instructions: [
|
|
141
|
-
`1) Ask a human to approve: ${approveUrl}`,
|
|
142
|
-
`2) Claim now: ${claimCommand}`,
|
|
143
|
-
`3) Retry now: ${retryCommand}`,
|
|
144
|
-
],
|
|
145
|
-
} : {}),
|
|
228
|
+
claimAction: buildCliClaimAction(reqId),
|
|
229
|
+
retryAction: buildCliRetryAction(retryCommand),
|
|
230
|
+
...(instructions ? { instructions } : {}),
|
|
146
231
|
};
|
|
147
232
|
console.error(JSON.stringify(guidance, null, 2));
|
|
148
233
|
return true;
|
|
@@ -8,6 +8,7 @@ import * as path from 'path';
|
|
|
8
8
|
import * as fs from 'fs';
|
|
9
9
|
import * as os from 'os';
|
|
10
10
|
import { resolveAuraSocketPath } from '../../lib/socket-path';
|
|
11
|
+
import { getErrorMessage } from '../../lib/error';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Find the project root by walking up from __dirname to find the package.json.
|
|
@@ -48,6 +49,57 @@ export function getRuntimeLogPaths(root: string = findProjectRoot()): RuntimeLog
|
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
51
|
|
|
52
|
+
export interface PrismaBootstrapResult {
|
|
53
|
+
ok: boolean;
|
|
54
|
+
generated: boolean;
|
|
55
|
+
clientPath: string;
|
|
56
|
+
error?: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function getGeneratedPrismaClientPath(root: string = findProjectRoot()): string {
|
|
60
|
+
return path.join(root, 'node_modules', '.prisma', 'client', 'default.js');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Ensure generated Prisma runtime client exists for @prisma/client imports.
|
|
65
|
+
* This can be missing in some global-install/update paths.
|
|
66
|
+
*/
|
|
67
|
+
export function ensurePrismaClientGenerated(
|
|
68
|
+
root: string = findProjectRoot(),
|
|
69
|
+
env: NodeJS.ProcessEnv = process.env,
|
|
70
|
+
): PrismaBootstrapResult {
|
|
71
|
+
const clientPath = getGeneratedPrismaClientPath(root);
|
|
72
|
+
if (fs.existsSync(clientPath)) {
|
|
73
|
+
return { ok: true, generated: false, clientPath };
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
try {
|
|
77
|
+
execSync('npx prisma generate --schema prisma/schema.prisma', {
|
|
78
|
+
cwd: root,
|
|
79
|
+
env,
|
|
80
|
+
stdio: 'pipe',
|
|
81
|
+
});
|
|
82
|
+
} catch (error) {
|
|
83
|
+
return {
|
|
84
|
+
ok: false,
|
|
85
|
+
generated: false,
|
|
86
|
+
clientPath,
|
|
87
|
+
error: getErrorMessage(error),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (!fs.existsSync(clientPath)) {
|
|
92
|
+
return {
|
|
93
|
+
ok: false,
|
|
94
|
+
generated: false,
|
|
95
|
+
clientPath,
|
|
96
|
+
error: `Prisma client is still missing after generate at: ${clientPath}`,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return { ok: true, generated: true, clientPath };
|
|
101
|
+
}
|
|
102
|
+
|
|
51
103
|
function getBackgroundLogStdio(logFilePath: string): { stdio: 'ignore' | ['ignore', number, number]; close: () => void } {
|
|
52
104
|
try {
|
|
53
105
|
fs.mkdirSync(path.dirname(logFilePath), { recursive: true });
|
|
@@ -324,10 +376,11 @@ export function startDashboardProcess(opts: StartDashboardProcessOptions = {}):
|
|
|
324
376
|
let hasProductionBuild = fs.existsSync(buildIdPath);
|
|
325
377
|
|
|
326
378
|
// If build artifacts are missing, recover once by rebuilding in place.
|
|
379
|
+
// Use the package build script so prebuild cleanup runs and avoids stale chunk graphs.
|
|
327
380
|
if (!opts.dev && !hasProductionBuild) {
|
|
328
381
|
console.warn(`[AuraMaxx] Missing production dashboard build (${buildIdPath}); attempting one-time dashboard build.`);
|
|
329
382
|
try {
|
|
330
|
-
execSync('
|
|
383
|
+
execSync('npm run build', { cwd: root, env, stdio: buildStdioMode });
|
|
331
384
|
} catch {
|
|
332
385
|
// Fall back to next dev below so local workflows remain usable if build fails.
|
|
333
386
|
}
|
package/src/server/cli/socket.ts
CHANGED
|
@@ -237,7 +237,7 @@ export class SocketServer {
|
|
|
237
237
|
|
|
238
238
|
// ── Auto-approve path ──
|
|
239
239
|
if (request.autoApprove) {
|
|
240
|
-
const autoApproveEnabled = getDefaultSync<boolean>('trust.localAutoApprove',
|
|
240
|
+
const autoApproveEnabled = getDefaultSync<boolean>('trust.localAutoApprove', true);
|
|
241
241
|
if (!autoApproveEnabled) {
|
|
242
242
|
this.send(socket, { type: 'error', message: 'Auto-approve is disabled. Use standard approval flow.' });
|
|
243
243
|
return;
|
package/src/server/index.ts
CHANGED
|
@@ -29,6 +29,7 @@ import appRoutes from './routes/apps';
|
|
|
29
29
|
import actionsRoutes from './routes/actions';
|
|
30
30
|
import credentialAgentRoutes from './routes/credential-agents';
|
|
31
31
|
import credentialsRoutes from './routes/credentials';
|
|
32
|
+
import agentProfilesRoutes from './routes/agent-profiles';
|
|
32
33
|
import credentialSharesRoutes from './routes/credential-shares';
|
|
33
34
|
import passkeyCredentialRoutes from './routes/passkey-credentials';
|
|
34
35
|
import importRoutes from './routes/import';
|
|
@@ -198,6 +199,7 @@ app.use('/agents/credential', credentialAgentRoutes);
|
|
|
198
199
|
app.use('/credentials/import', importRoutes);
|
|
199
200
|
app.use('/credentials/passkey', passkeyCredentialRoutes);
|
|
200
201
|
app.use('/credentials', credentialsRoutes);
|
|
202
|
+
app.use('/agent-profiles', agentProfilesRoutes);
|
|
201
203
|
app.use('/credential-shares', credentialSharesRoutes);
|
|
202
204
|
app.use('/adapters', adaptersRoutes);
|
|
203
205
|
app.use('/defaults', defaultsRoutes);
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { DATA_PATHS } from './config';
|
|
4
|
+
import type { AgentProfileInput, AgentProfileRecord } from '../../../shared/agent-profile-schema';
|
|
5
|
+
|
|
6
|
+
interface AgentProfilesFile {
|
|
7
|
+
version: 1;
|
|
8
|
+
profiles: Record<string, AgentProfileRecord>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const AGENT_PROFILES_FILE = 'agent-profiles.json';
|
|
12
|
+
|
|
13
|
+
function getAgentProfilesPath(): string {
|
|
14
|
+
return path.join(DATA_PATHS.wallets, AGENT_PROFILES_FILE);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function defaultStore(): AgentProfilesFile {
|
|
18
|
+
return { version: 1, profiles: {} };
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function readStore(): AgentProfilesFile {
|
|
22
|
+
const filePath = getAgentProfilesPath();
|
|
23
|
+
if (!fs.existsSync(filePath)) return defaultStore();
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
const raw = fs.readFileSync(filePath, 'utf8');
|
|
27
|
+
const parsed = JSON.parse(raw) as Partial<AgentProfilesFile> | null;
|
|
28
|
+
if (!parsed || typeof parsed !== 'object') return defaultStore();
|
|
29
|
+
if (parsed.version !== 1 || !parsed.profiles || typeof parsed.profiles !== 'object') return defaultStore();
|
|
30
|
+
return {
|
|
31
|
+
version: 1,
|
|
32
|
+
profiles: parsed.profiles as Record<string, AgentProfileRecord>,
|
|
33
|
+
};
|
|
34
|
+
} catch {
|
|
35
|
+
return defaultStore();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function writeStore(store: AgentProfilesFile): void {
|
|
40
|
+
const filePath = getAgentProfilesPath();
|
|
41
|
+
fs.writeFileSync(filePath, JSON.stringify(store, null, 2), { mode: 0o600 });
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function listAgentProfiles(): AgentProfileRecord[] {
|
|
45
|
+
return Object.values(readStore().profiles).sort((a, b) => a.agentId.localeCompare(b.agentId));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function getAgentProfile(agentId: string): AgentProfileRecord | null {
|
|
49
|
+
return readStore().profiles[agentId] || null;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function upsertAgentProfile(input: AgentProfileInput): AgentProfileRecord {
|
|
53
|
+
const store = readStore();
|
|
54
|
+
const existing = store.profiles[input.agentId];
|
|
55
|
+
const now = new Date().toISOString();
|
|
56
|
+
const next: AgentProfileRecord = {
|
|
57
|
+
...input,
|
|
58
|
+
createdAt: existing?.createdAt || now,
|
|
59
|
+
updatedAt: now,
|
|
60
|
+
};
|
|
61
|
+
store.profiles[input.agentId] = next;
|
|
62
|
+
writeStore(store);
|
|
63
|
+
return next;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function deleteAgentProfile(agentId: string): boolean {
|
|
67
|
+
const store = readStore();
|
|
68
|
+
if (!store.profiles[agentId]) return false;
|
|
69
|
+
delete store.profiles[agentId];
|
|
70
|
+
writeStore(store);
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from 'crypto';
|
|
12
12
|
import * as net from 'net';
|
|
13
13
|
import { buildPollUrl } from './approval-flow';
|
|
14
|
+
import { getDefault, SEED_DEFAULTS } from './defaults';
|
|
14
15
|
import { resolveAuraSocketCandidates } from './socket-path';
|
|
15
16
|
|
|
16
17
|
interface HybridEnvelope {
|
|
@@ -275,6 +276,29 @@ function parseProfileOverridesFromEnv(): ProfileIssuanceOverrides | undefined {
|
|
|
275
276
|
}
|
|
276
277
|
}
|
|
277
278
|
|
|
279
|
+
function seedStringDefault(key: string, fallback: string): string {
|
|
280
|
+
const seed = SEED_DEFAULTS.find((entry) => entry.key === key);
|
|
281
|
+
if (!seed || typeof seed.value !== 'string') return fallback;
|
|
282
|
+
const normalized = seed.value.trim();
|
|
283
|
+
return normalized || fallback;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export async function resolveAuthFallbackProfileConfig(options?: AuthRequestBootstrapOptions): Promise<{
|
|
287
|
+
profile: string;
|
|
288
|
+
profileVersion: string;
|
|
289
|
+
}> {
|
|
290
|
+
const explicitProfile = options?.profile?.trim();
|
|
291
|
+
const explicitProfileVersion = options?.profileVersion?.trim();
|
|
292
|
+
|
|
293
|
+
const defaultProfile = String(await getDefault<string | null>('trust.localProfile', '') || '').trim();
|
|
294
|
+
const defaultProfileVersion = String(await getDefault<string | null>('trust.localProfileVersion', '') || '').trim();
|
|
295
|
+
|
|
296
|
+
return {
|
|
297
|
+
profile: explicitProfile || defaultProfile || seedStringDefault('trust.localProfile', 'admin'),
|
|
298
|
+
profileVersion: explicitProfileVersion || defaultProfileVersion || seedStringDefault('trust.localProfileVersion', 'v1'),
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
|
|
278
302
|
// ── Socket bootstrap (CLI auth via Unix socket) ──
|
|
279
303
|
|
|
280
304
|
/**
|
|
@@ -394,21 +418,13 @@ export async function bootstrapViaAuthRequest(
|
|
|
394
418
|
keypair: EphemeralKeypair,
|
|
395
419
|
options: AuthRequestBootstrapOptions = {},
|
|
396
420
|
): Promise<string | AuthRequestCreated> {
|
|
397
|
-
const
|
|
398
|
-
|
|
399
|
-
process.env.AURA_AUTH_PROFILE ||
|
|
400
|
-
process.env.AURA_AGENT_PROFILE ||
|
|
401
|
-
'strict'
|
|
402
|
-
).trim();
|
|
421
|
+
const resolvedProfile = await resolveAuthFallbackProfileConfig(options);
|
|
422
|
+
const profile = resolvedProfile.profile;
|
|
403
423
|
if (!profile) {
|
|
404
424
|
throw new Error('No profile configured for /auth fallback');
|
|
405
425
|
}
|
|
406
426
|
|
|
407
|
-
const profileVersion =
|
|
408
|
-
options.profileVersion ||
|
|
409
|
-
process.env.AURA_AUTH_PROFILE_VERSION ||
|
|
410
|
-
'v1'
|
|
411
|
-
).trim();
|
|
427
|
+
const profileVersion = resolvedProfile.profileVersion;
|
|
412
428
|
const profileOverrides = options.profileOverrides || parseProfileOverridesFromEnv();
|
|
413
429
|
const timeoutMs = options.timeoutMs ?? 120_000;
|
|
414
430
|
const pollIntervalMs = options.pollIntervalMs ?? 3_000;
|
|
@@ -36,10 +36,10 @@ export const SEED_DEFAULTS: SeedDefault[] = [
|
|
|
36
36
|
{ key: 'gas.sol_buffer', value: 0.000005, type: 'financial', label: 'Solana Gas Buffer (SOL)', description: 'Reserved SOL buffer for max-send in UI' },
|
|
37
37
|
|
|
38
38
|
// TTLs
|
|
39
|
-
{ key: 'ttl.agent', value:
|
|
39
|
+
{ key: 'ttl.agent', value: 604800, type: 'ttl', label: 'Agent Token TTL (seconds)', description: 'Default time-to-live for agent tokens (7 days)' },
|
|
40
40
|
{ key: 'ttl.admin', value: 2592000, type: 'ttl', label: 'Admin Token TTL (seconds)', description: 'Time-to-live for admin tokens (30 days)' },
|
|
41
41
|
{ key: 'ttl.app', value: 86400, type: 'ttl', label: 'App Token TTL (seconds)', description: 'Time-to-live for app tokens (24h)' },
|
|
42
|
-
{ key: 'ttl.action', value:
|
|
42
|
+
{ key: 'ttl.action', value: 3600, type: 'ttl', label: 'Action Token TTL (seconds)', description: 'Default time-to-live for action tokens (1 hour)' },
|
|
43
43
|
|
|
44
44
|
// Strategy runtime (cron-owned)
|
|
45
45
|
{ key: 'strategy.cron_enabled', value: true, type: 'strategy', label: 'Enable Cron-Owned Strategy Runtime', description: 'When true, strategy ticks and message hooks are owned by the cron process only' },
|
|
@@ -89,7 +89,7 @@ export const SEED_DEFAULTS: SeedDefault[] = [
|
|
|
89
89
|
{ key: 'discovery.max_initial_lookback', value: 302400, type: 'discovery', label: 'Max Initial Lookback (blocks)', description: 'How far back to scan on first run (~7 days on Base)' },
|
|
90
90
|
|
|
91
91
|
// Trust / auto-approve defaults
|
|
92
|
-
{ key: 'trust.localAutoApprove', value:
|
|
92
|
+
{ key: 'trust.localAutoApprove', value: true, type: 'trust', label: 'Auto-Approve Local Socket Connections', description: 'Auto-approve auth requests from same-UID processes via Unix socket (0600 permission = same user = trusted)' },
|
|
93
93
|
{ key: 'trust.localProfile', value: 'admin', type: 'trust', label: 'Local Socket Agent Profile', description: 'Built-in profile used for local socket-issued agent tokens (strict/dev/admin). Default is admin.' },
|
|
94
94
|
{ key: 'trust.localProfileVersion', value: 'v1', type: 'trust', label: 'Local Socket Agent Profile Version', description: 'Version for local socket profile resolution' },
|
|
95
95
|
{ key: 'trust.localProfileOverrides', value: null, type: 'trust', label: 'Local Socket Agent Profile Overrides', description: 'Optional tighten-only overrides for the local socket profile' },
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
|
|
26
26
|
const SESSION_TOKEN_TTL_SECONDS = 7 * 24 * 60 * 60;
|
|
27
27
|
const STRICT_SESSION_TOKEN_TTL_SECONDS = 60 * 60;
|
|
28
|
-
const ESCALATION_PROFILE_ORDER = ['
|
|
28
|
+
const ESCALATION_PROFILE_ORDER = ['dev', 'strict', 'admin'] as const;
|
|
29
29
|
|
|
30
30
|
export interface OneShotEscalationContext {
|
|
31
31
|
routeContractId: string;
|
|
@@ -122,7 +122,7 @@ export async function resolveAction(
|
|
|
122
122
|
const defaultSendLimit = await getDefault<number>('limits.send', 0.1);
|
|
123
123
|
const defaultSwapLimit = await getDefault<number>('limits.swap', 0.1);
|
|
124
124
|
const defaultPermissions = await getDefault<string[]>('permissions.default', ['wallet:create:hot', 'send:hot', 'swap', 'fund', 'action:create']);
|
|
125
|
-
const defaultTtl = await getDefault<number>('ttl.agent',
|
|
125
|
+
const defaultTtl = await getDefault<number>('ttl.agent', 604800);
|
|
126
126
|
const effectivePolicy = parseRequestedPolicy(metadata.effectivePolicy);
|
|
127
127
|
const compiledBinding = parsePolicyOperationBinding(metadata.binding);
|
|
128
128
|
const oneShotBinding = metadata.approvalScope === 'one_shot_read'
|
|
@@ -315,7 +315,7 @@ export async function resolveAction(
|
|
|
315
315
|
return { success: false, statusCode: 400, data: { success: false, error: 'requestedPubkey is required for token issuance' } };
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
const ttl = await getDefault<number>('ttl.agent',
|
|
318
|
+
const ttl = await getDefault<number>('ttl.agent', 604800);
|
|
319
319
|
const token = await createToken(agentId, newLimits?.fund ?? 0, newPermissions, ttl, {
|
|
320
320
|
limits: newLimits,
|
|
321
321
|
walletAccess: newWalletAccess,
|
|
@@ -31,7 +31,7 @@ export function buildVersionInfo(current: string, latest: string): VersionInfo {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export function buildUpdateCommand(packageName = 'auramaxx'): string {
|
|
34
|
-
return `npm install -g ${packageName}`;
|
|
34
|
+
return `npm install -g ${packageName} --foreground-scripts`;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export function buildNpxLatestCommand(packageName = 'auramaxx', args: string[] = []): string {
|
package/src/server/mcp/server.ts
CHANGED
|
@@ -1501,6 +1501,7 @@ server.tool(
|
|
|
1501
1501
|
'Authorization': `Bearer ${authToken}`,
|
|
1502
1502
|
'X-Secret-Surface': 'get_secret',
|
|
1503
1503
|
'X-Credential-Name': credentialName || name,
|
|
1504
|
+
'X-Aura-Original-Command': `mcp get_secret ${JSON.stringify(name)}`,
|
|
1504
1505
|
},
|
|
1505
1506
|
signal: AbortSignal.timeout(5000),
|
|
1506
1507
|
});
|
|
@@ -1532,7 +1533,10 @@ server.tool(
|
|
|
1532
1533
|
try {
|
|
1533
1534
|
const totpRes = await fetch(`${base}/credentials/${credentialId}/totp`, {
|
|
1534
1535
|
method: 'POST',
|
|
1535
|
-
headers: {
|
|
1536
|
+
headers: {
|
|
1537
|
+
'Authorization': `Bearer ${authToken}`,
|
|
1538
|
+
'X-Aura-Original-Command': `mcp get_secret ${JSON.stringify(name)}`,
|
|
1539
|
+
},
|
|
1536
1540
|
signal: AbortSignal.timeout(5000),
|
|
1537
1541
|
});
|
|
1538
1542
|
if (totpRes.ok) {
|
|
@@ -1993,6 +1997,7 @@ server.tool(
|
|
|
1993
1997
|
'X-Secret-Surface': 'inject_secret',
|
|
1994
1998
|
'X-Secret-EnvVar': resolvedEnvVar,
|
|
1995
1999
|
'X-Credential-Name': resolved.credentialName || name,
|
|
2000
|
+
'X-Aura-Original-Command': `mcp inject_secret ${JSON.stringify(name)}`,
|
|
1996
2001
|
},
|
|
1997
2002
|
signal: AbortSignal.timeout(5000),
|
|
1998
2003
|
});
|