madarx 2.9.2 → 2.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (616) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +283 -283
  3. package/.next/standalone/.next/app-path-routes-manifest.json +79 -79
  4. package/.next/standalone/.next/build-manifest.json +2 -2
  5. package/.next/standalone/.next/prerender-manifest.json +3 -3
  6. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  7. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  8. package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
  9. package/.next/standalone/.next/server/app/activity/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/admin/page.js +2 -2
  11. package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/agents/[id]/page.js +3 -3
  13. package/.next/standalone/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
  14. package/.next/standalone/.next/server/app/agents/page.js +1 -1
  15. package/.next/standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/api/activity/route_client-reference-manifest.js +1 -1
  17. package/.next/standalone/.next/server/app/api/admin/audit-export/route_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/api/admin/share-links/route_client-reference-manifest.js +1 -1
  19. package/.next/standalone/.next/server/app/api/agent-memory/route_client-reference-manifest.js +1 -1
  20. package/.next/standalone/.next/server/app/api/agent-runs/[id]/cancel/route_client-reference-manifest.js +1 -1
  21. package/.next/standalone/.next/server/app/api/agent-runs/[id]/events/route_client-reference-manifest.js +1 -1
  22. package/.next/standalone/.next/server/app/api/agent-runs/[id]/log/route_client-reference-manifest.js +1 -1
  23. package/.next/standalone/.next/server/app/api/agent-runs/[id]/route_client-reference-manifest.js +1 -1
  24. package/.next/standalone/.next/server/app/api/agent-runs/route_client-reference-manifest.js +1 -1
  25. package/.next/standalone/.next/server/app/api/agents/[id]/chain/route_client-reference-manifest.js +1 -1
  26. package/.next/standalone/.next/server/app/api/agents/[id]/memory/route_client-reference-manifest.js +1 -1
  27. package/.next/standalone/.next/server/app/api/agents/[id]/reports/route_client-reference-manifest.js +1 -1
  28. package/.next/standalone/.next/server/app/api/agents/[id]/run/route_client-reference-manifest.js +1 -1
  29. package/.next/standalone/.next/server/app/api/agents/[id]/skills/route_client-reference-manifest.js +1 -1
  30. package/.next/standalone/.next/server/app/api/agents/create/route_client-reference-manifest.js +1 -1
  31. package/.next/standalone/.next/server/app/api/agents/ops/route_client-reference-manifest.js +1 -1
  32. package/.next/standalone/.next/server/app/api/approvals/[id]/route_client-reference-manifest.js +1 -1
  33. package/.next/standalone/.next/server/app/api/approvals/route_client-reference-manifest.js +1 -1
  34. package/.next/standalone/.next/server/app/api/artifacts/[id]/acl/route_client-reference-manifest.js +1 -1
  35. package/.next/standalone/.next/server/app/api/artifacts/[id]/protect/route_client-reference-manifest.js +1 -1
  36. package/.next/standalone/.next/server/app/api/artifacts/[id]/raw/route_client-reference-manifest.js +1 -1
  37. package/.next/standalone/.next/server/app/api/artifacts/[id]/route_client-reference-manifest.js +1 -1
  38. package/.next/standalone/.next/server/app/api/artifacts/[id]/share-link/[linkId]/route_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/api/artifacts/[id]/share-link/route_client-reference-manifest.js +1 -1
  40. package/.next/standalone/.next/server/app/api/artifacts/upload/route_client-reference-manifest.js +1 -1
  41. package/.next/standalone/.next/server/app/api/audit/list/route_client-reference-manifest.js +1 -1
  42. package/.next/standalone/.next/server/app/api/audit/search/route_client-reference-manifest.js +1 -1
  43. package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/api/auth/config/route_client-reference-manifest.js +1 -1
  45. package/.next/standalone/.next/server/app/api/auth/join-bootstrap/route_client-reference-manifest.js +1 -1
  46. package/.next/standalone/.next/server/app/api/auth/session/route_client-reference-manifest.js +1 -1
  47. package/.next/standalone/.next/server/app/api/brand/route_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/api/chat/sessions/[id]/route_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/api/chat/sessions/route_client-reference-manifest.js +1 -1
  50. package/.next/standalone/.next/server/app/api/config/env/route_client-reference-manifest.js +1 -1
  51. package/.next/standalone/.next/server/app/api/config/route_client-reference-manifest.js +1 -1
  52. package/.next/standalone/.next/server/app/api/connections/[service]/route_client-reference-manifest.js +1 -1
  53. package/.next/standalone/.next/server/app/api/connections/[service]/verify/route_client-reference-manifest.js +1 -1
  54. package/.next/standalone/.next/server/app/api/connections/route_client-reference-manifest.js +1 -1
  55. package/.next/standalone/.next/server/app/api/cron/tick/route_client-reference-manifest.js +1 -1
  56. package/.next/standalone/.next/server/app/api/dashboard/spaces/[id]/move/route_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/app/api/dashboard/spaces/[id]/route_client-reference-manifest.js +1 -1
  58. package/.next/standalone/.next/server/app/api/dashboard/spaces/[id]/share-link/[linkId]/route_client-reference-manifest.js +1 -1
  59. package/.next/standalone/.next/server/app/api/dashboard/spaces/[id]/share-link/route_client-reference-manifest.js +1 -1
  60. package/.next/standalone/.next/server/app/api/dashboard/spaces/import/route_client-reference-manifest.js +1 -1
  61. package/.next/standalone/.next/server/app/api/dashboard/spaces/route_client-reference-manifest.js +1 -1
  62. package/.next/standalone/.next/server/app/api/disk/files/[id]/blob/route_client-reference-manifest.js +1 -1
  63. package/.next/standalone/.next/server/app/api/disk/files/[id]/route_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app/api/disk/files/[id]/transcribe/route_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/api/disk/files/route_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/app/api/disk/folders/route_client-reference-manifest.js +1 -1
  67. package/.next/standalone/.next/server/app/api/events/since/[cursor]/route_client-reference-manifest.js +1 -1
  68. package/.next/standalone/.next/server/app/api/events/stream/route_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/api/fs/create-folder/route_client-reference-manifest.js +1 -1
  70. package/.next/standalone/.next/server/app/api/fs/pick-folder/route_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/api/hail/engagements/[id]/blueprint/route_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/api/hail/engagements/[id]/diagnostic/route_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/api/hail/engagements/[id]/governance/route_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/api/hail/engagements/[id]/interview/route_client-reference-manifest.js +1 -1
  75. package/.next/standalone/.next/server/app/api/hail/engagements/[id]/pilot/route_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/api/hail/engagements/[id]/quarterly/route_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/api/hail/engagements/[id]/route_client-reference-manifest.js +1 -1
  78. package/.next/standalone/.next/server/app/api/hail/engagements/[id]/setup-package/route_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/api/hail/engagements/route_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/api/hail/interviews/[id]/responses/route_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/app/api/hail/interviews/[id]/route_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/api/hail/setup-packages/[id]/apply/route_client-reference-manifest.js +1 -1
  83. package/.next/standalone/.next/server/app/api/hail/setup-packages/validate/route_client-reference-manifest.js +1 -1
  84. package/.next/standalone/.next/server/app/api/heartbeat/tick/route_client-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/app/api/heartbeat/worker/route_client-reference-manifest.js +1 -1
  86. package/.next/standalone/.next/server/app/api/help/route_client-reference-manifest.js +1 -1
  87. package/.next/standalone/.next/server/app/api/hermes/jobs/[id]/events/route_client-reference-manifest.js +1 -1
  88. package/.next/standalone/.next/server/app/api/hermes/jobs/[id]/route_client-reference-manifest.js +1 -1
  89. package/.next/standalone/.next/server/app/api/hermes/jobs/route_client-reference-manifest.js +1 -1
  90. package/.next/standalone/.next/server/app/api/integrations/google/callback/route_client-reference-manifest.js +1 -1
  91. package/.next/standalone/.next/server/app/api/integrations/google/oauth/route_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/api/marketplace/[id]/route_client-reference-manifest.js +1 -1
  93. package/.next/standalone/.next/server/app/api/marketplace/open-design/route_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/api/marketplace/route_client-reference-manifest.js +1 -1
  95. package/.next/standalone/.next/server/app/api/mines/import-roots/route_client-reference-manifest.js +1 -1
  96. package/.next/standalone/.next/server/app/api/mines/portfolio/route_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/api/mines/projects/[id]/chunks/route_client-reference-manifest.js +1 -1
  98. package/.next/standalone/.next/server/app/api/mines/projects/[id]/diligence/route_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/api/mines/projects/[id]/import/route_client-reference-manifest.js +1 -1
  100. package/.next/standalone/.next/server/app/api/mines/projects/[id]/publish/route_client-reference-manifest.js +1 -1
  101. package/.next/standalone/.next/server/app/api/mines/projects/route_client-reference-manifest.js +1 -1
  102. package/.next/standalone/.next/server/app/api/missions/route_client-reference-manifest.js +1 -1
  103. package/.next/standalone/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
  104. package/.next/standalone/.next/server/app/api/onboarding/blueprint/route_client-reference-manifest.js +1 -1
  105. package/.next/standalone/.next/server/app/api/onboarding/launch/route_client-reference-manifest.js +1 -1
  106. package/.next/standalone/.next/server/app/api/orchestrator/command/route_client-reference-manifest.js +1 -1
  107. package/.next/standalone/.next/server/app/api/orchestrator/stream/route_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/api/org/route_client-reference-manifest.js +1 -1
  109. package/.next/standalone/.next/server/app/api/orgs/[id]/invites/[inviteId]/route_client-reference-manifest.js +1 -1
  110. package/.next/standalone/.next/server/app/api/orgs/[id]/invites/route_client-reference-manifest.js +1 -1
  111. package/.next/standalone/.next/server/app/api/orgs/[id]/members/[userId]/role/route_client-reference-manifest.js +1 -1
  112. package/.next/standalone/.next/server/app/api/orgs/[id]/members/[userId]/route_client-reference-manifest.js +1 -1
  113. package/.next/standalone/.next/server/app/api/orgs/[id]/members/route_client-reference-manifest.js +1 -1
  114. package/.next/standalone/.next/server/app/api/orgs/[id]/route_client-reference-manifest.js +1 -1
  115. package/.next/standalone/.next/server/app/api/orgs/invites/pending/route_client-reference-manifest.js +1 -1
  116. package/.next/standalone/.next/server/app/api/orgs/join/route_client-reference-manifest.js +1 -1
  117. package/.next/standalone/.next/server/app/api/orgs/route_client-reference-manifest.js +1 -1
  118. package/.next/standalone/.next/server/app/api/printing-press/clis/route_client-reference-manifest.js +1 -1
  119. package/.next/standalone/.next/server/app/api/printing-press/install/route_client-reference-manifest.js +1 -1
  120. package/.next/standalone/.next/server/app/api/printing-press/security-mode/route_client-reference-manifest.js +1 -1
  121. package/.next/standalone/.next/server/app/api/privacy/config/route_client-reference-manifest.js +1 -1
  122. package/.next/standalone/.next/server/app/api/privacy/verify/route_client-reference-manifest.js +1 -1
  123. package/.next/standalone/.next/server/app/api/processes/[id]/route_client-reference-manifest.js +1 -1
  124. package/.next/standalone/.next/server/app/api/processes/[id]/share-link/route_client-reference-manifest.js +1 -1
  125. package/.next/standalone/.next/server/app/api/processes/[id]/stages/[stageId]/override/route_client-reference-manifest.js +1 -1
  126. package/.next/standalone/.next/server/app/api/processes/[id]/stages/[stageId]/retry/route_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app/api/processes/[id]/stages/[stageId]/submit/route_client-reference-manifest.js +1 -1
  128. package/.next/standalone/.next/server/app/api/processes/definitions/[slug]/route_client-reference-manifest.js +1 -1
  129. package/.next/standalone/.next/server/app/api/processes/definitions/[slug]/settings/route_client-reference-manifest.js +1 -1
  130. package/.next/standalone/.next/server/app/api/processes/definitions/route_client-reference-manifest.js +1 -1
  131. package/.next/standalone/.next/server/app/api/processes/definitions/validate/route_client-reference-manifest.js +1 -1
  132. package/.next/standalone/.next/server/app/api/processes/route_client-reference-manifest.js +1 -1
  133. package/.next/standalone/.next/server/app/api/processes/start-and-route/route_client-reference-manifest.js +1 -1
  134. package/.next/standalone/.next/server/app/api/projects/[slug]/library/route_client-reference-manifest.js +1 -1
  135. package/.next/standalone/.next/server/app/api/projects/[slug]/route_client-reference-manifest.js +1 -1
  136. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  137. package/.next/standalone/.next/server/app/api/runs/approve-claude-run/route_client-reference-manifest.js +1 -1
  138. package/.next/standalone/.next/server/app/api/runs/claude-code-dry-run/route_client-reference-manifest.js +1 -1
  139. package/.next/standalone/.next/server/app/api/runs/competitor-report/route_client-reference-manifest.js +1 -1
  140. package/.next/standalone/.next/server/app/api/runs/engine-ping/route_client-reference-manifest.js +1 -1
  141. package/.next/standalone/.next/server/app/api/runs/marketing-plan/route_client-reference-manifest.js +1 -1
  142. package/.next/standalone/.next/server/app/api/schedules/upsert/route_client-reference-manifest.js +1 -1
  143. package/.next/standalone/.next/server/app/api/secrets/[name]/route_client-reference-manifest.js +1 -1
  144. package/.next/standalone/.next/server/app/api/secrets/route_client-reference-manifest.js +1 -1
  145. package/.next/standalone/.next/server/app/api/settings/trust-mode/route_client-reference-manifest.js +1 -1
  146. package/.next/standalone/.next/server/app/api/share/[token]/otp/route_client-reference-manifest.js +1 -1
  147. package/.next/standalone/.next/server/app/api/share/[token]/route_client-reference-manifest.js +1 -1
  148. package/.next/standalone/.next/server/app/api/share/[token]/verify/route_client-reference-manifest.js +1 -1
  149. package/.next/standalone/.next/server/app/api/share/space/[token]/otp/route_client-reference-manifest.js +1 -1
  150. package/.next/standalone/.next/server/app/api/share/space/[token]/route_client-reference-manifest.js +1 -1
  151. package/.next/standalone/.next/server/app/api/share/space/[token]/verify/route_client-reference-manifest.js +1 -1
  152. package/.next/standalone/.next/server/app/api/shared/spaces/[id]/acl/route_client-reference-manifest.js +1 -1
  153. package/.next/standalone/.next/server/app/api/shared/spaces/publish/route_client-reference-manifest.js +1 -1
  154. package/.next/standalone/.next/server/app/api/shared/spaces/route_client-reference-manifest.js +1 -1
  155. package/.next/standalone/.next/server/app/api/shared/spaces/status/route_client-reference-manifest.js +1 -1
  156. package/.next/standalone/.next/server/app/api/shared/spaces/unpublish/route_client-reference-manifest.js +1 -1
  157. package/.next/standalone/.next/server/app/api/state/route_client-reference-manifest.js +1 -1
  158. package/.next/standalone/.next/server/app/api/system/update/route_client-reference-manifest.js +1 -1
  159. package/.next/standalone/.next/server/app/api/tasks/[id]/active-run/route_client-reference-manifest.js +1 -1
  160. package/.next/standalone/.next/server/app/api/tasks/[id]/attachments/route_client-reference-manifest.js +1 -1
  161. package/.next/standalone/.next/server/app/api/tasks/[id]/checklist/[itemId]/route_client-reference-manifest.js +1 -1
  162. package/.next/standalone/.next/server/app/api/tasks/[id]/checklist/route_client-reference-manifest.js +1 -1
  163. package/.next/standalone/.next/server/app/api/tasks/[id]/checkout/route_client-reference-manifest.js +1 -1
  164. package/.next/standalone/.next/server/app/api/tasks/[id]/children/route_client-reference-manifest.js +1 -1
  165. package/.next/standalone/.next/server/app/api/tasks/[id]/comments/route_client-reference-manifest.js +1 -1
  166. package/.next/standalone/.next/server/app/api/tasks/[id]/events/route_client-reference-manifest.js +1 -1
  167. package/.next/standalone/.next/server/app/api/tasks/[id]/live-runs/route_client-reference-manifest.js +1 -1
  168. package/.next/standalone/.next/server/app/api/tasks/[id]/release/route_client-reference-manifest.js +1 -1
  169. package/.next/standalone/.next/server/app/api/tasks/[id]/route_client-reference-manifest.js +1 -1
  170. package/.next/standalone/.next/server/app/api/tasks/route_client-reference-manifest.js +1 -1
  171. package/.next/standalone/.next/server/app/api/tool-allowlists/[id]/route_client-reference-manifest.js +1 -1
  172. package/.next/standalone/.next/server/app/api/tool-allowlists/route_client-reference-manifest.js +1 -1
  173. package/.next/standalone/.next/server/app/api/tool-egress/route_client-reference-manifest.js +1 -1
  174. package/.next/standalone/.next/server/app/api/tools/[name]/approve/route_client-reference-manifest.js +1 -1
  175. package/.next/standalone/.next/server/app/api/tools/[name]/route_client-reference-manifest.js +1 -1
  176. package/.next/standalone/.next/server/app/api/tools/route_client-reference-manifest.js +1 -1
  177. package/.next/standalone/.next/server/app/api/transcripts/route_client-reference-manifest.js +1 -1
  178. package/.next/standalone/.next/server/app/api/voice/providers/route_client-reference-manifest.js +1 -1
  179. package/.next/standalone/.next/server/app/api/voice/realtime/context/route_client-reference-manifest.js +1 -1
  180. package/.next/standalone/.next/server/app/api/voice/realtime/session/route_client-reference-manifest.js +1 -1
  181. package/.next/standalone/.next/server/app/api/voice/realtime/tool-result/route_client-reference-manifest.js +1 -1
  182. package/.next/standalone/.next/server/app/api/voice/realtime/tools/route_client-reference-manifest.js +1 -1
  183. package/.next/standalone/.next/server/app/api/voice/tts/route_client-reference-manifest.js +1 -1
  184. package/.next/standalone/.next/server/app/api/whatsapp/allowlist/route_client-reference-manifest.js +1 -1
  185. package/.next/standalone/.next/server/app/api/whatsapp/messages/route_client-reference-manifest.js +1 -1
  186. package/.next/standalone/.next/server/app/api/whatsapp/qr/route_client-reference-manifest.js +1 -1
  187. package/.next/standalone/.next/server/app/api/whatsapp/send/route_client-reference-manifest.js +1 -1
  188. package/.next/standalone/.next/server/app/api/whatsapp/status/route_client-reference-manifest.js +1 -1
  189. package/.next/standalone/.next/server/app/approvals/page.js +2 -2
  190. package/.next/standalone/.next/server/app/approvals/page_client-reference-manifest.js +1 -1
  191. package/.next/standalone/.next/server/app/architecture/page_client-reference-manifest.js +1 -1
  192. package/.next/standalone/.next/server/app/architecture.html +2 -2
  193. package/.next/standalone/.next/server/app/architecture.rsc +1 -1
  194. package/.next/standalone/.next/server/app/audit/live/page_client-reference-manifest.js +1 -1
  195. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  196. package/.next/standalone/.next/server/app/brand/page_client-reference-manifest.js +1 -1
  197. package/.next/standalone/.next/server/app/brand.html +1 -1
  198. package/.next/standalone/.next/server/app/brand.rsc +1 -1
  199. package/.next/standalone/.next/server/app/disk/page_client-reference-manifest.js +1 -1
  200. package/.next/standalone/.next/server/app/federated-ai/page_client-reference-manifest.js +1 -1
  201. package/.next/standalone/.next/server/app/federated-ai.html +2 -2
  202. package/.next/standalone/.next/server/app/federated-ai.rsc +1 -1
  203. package/.next/standalone/.next/server/app/hail/[id]/governance/page_client-reference-manifest.js +1 -1
  204. package/.next/standalone/.next/server/app/hail/[id]/interview/page.js +1 -1
  205. package/.next/standalone/.next/server/app/hail/[id]/interview/page_client-reference-manifest.js +1 -1
  206. package/.next/standalone/.next/server/app/hail/[id]/page.js +2 -2
  207. package/.next/standalone/.next/server/app/hail/[id]/page_client-reference-manifest.js +1 -1
  208. package/.next/standalone/.next/server/app/hail/[id]/setup/page.js +2 -2
  209. package/.next/standalone/.next/server/app/hail/[id]/setup/page_client-reference-manifest.js +1 -1
  210. package/.next/standalone/.next/server/app/hail/page.js +2 -2
  211. package/.next/standalone/.next/server/app/hail/page_client-reference-manifest.js +1 -1
  212. package/.next/standalone/.next/server/app/help/[slug]/page_client-reference-manifest.js +1 -1
  213. package/.next/standalone/.next/server/app/help/page_client-reference-manifest.js +1 -1
  214. package/.next/standalone/.next/server/app/index.html +2 -2
  215. package/.next/standalone/.next/server/app/index.rsc +1 -1
  216. package/.next/standalone/.next/server/app/join/page_client-reference-manifest.js +1 -1
  217. package/.next/standalone/.next/server/app/join.html +1 -1
  218. package/.next/standalone/.next/server/app/join.rsc +1 -1
  219. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  220. package/.next/standalone/.next/server/app/marketplace/page.js +2 -2
  221. package/.next/standalone/.next/server/app/marketplace/page_client-reference-manifest.js +1 -1
  222. package/.next/standalone/.next/server/app/mines/[projectId]/page_client-reference-manifest.js +1 -1
  223. package/.next/standalone/.next/server/app/mines/[projectId]/results/page_client-reference-manifest.js +1 -1
  224. package/.next/standalone/.next/server/app/mines/page_client-reference-manifest.js +1 -1
  225. package/.next/standalone/.next/server/app/missions/page.js +2 -2
  226. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  227. package/.next/standalone/.next/server/app/onboarding/org/page_client-reference-manifest.js +1 -1
  228. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  229. package/.next/standalone/.next/server/app/onboarding.html +2 -2
  230. package/.next/standalone/.next/server/app/onboarding.rsc +1 -1
  231. package/.next/standalone/.next/server/app/org/page.js +1 -1
  232. package/.next/standalone/.next/server/app/org/page.js.nft.json +1 -1
  233. package/.next/standalone/.next/server/app/org/page_client-reference-manifest.js +1 -1
  234. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  235. package/.next/standalone/.next/server/app/projects/[slug]/log/page_client-reference-manifest.js +1 -1
  236. package/.next/standalone/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
  237. package/.next/standalone/.next/server/app/projects/new/page.js +1 -1
  238. package/.next/standalone/.next/server/app/projects/new/page_client-reference-manifest.js +1 -1
  239. package/.next/standalone/.next/server/app/projects/new.html +1 -1
  240. package/.next/standalone/.next/server/app/projects/new.rsc +2 -2
  241. package/.next/standalone/.next/server/app/projects/page.js +11 -11
  242. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  243. package/.next/standalone/.next/server/app/reports/[file]/route_client-reference-manifest.js +1 -1
  244. package/.next/standalone/.next/server/app/reports/page_client-reference-manifest.js +1 -1
  245. package/.next/standalone/.next/server/app/runtime/page_client-reference-manifest.js +1 -1
  246. package/.next/standalone/.next/server/app/schedules/page.js +2 -2
  247. package/.next/standalone/.next/server/app/schedules/page_client-reference-manifest.js +1 -1
  248. package/.next/standalone/.next/server/app/settings/account/page_client-reference-manifest.js +1 -1
  249. package/.next/standalone/.next/server/app/settings/advanced/page_client-reference-manifest.js +1 -1
  250. package/.next/standalone/.next/server/app/settings/appearance/page_client-reference-manifest.js +1 -1
  251. package/.next/standalone/.next/server/app/settings/brand/page_client-reference-manifest.js +1 -1
  252. package/.next/standalone/.next/server/app/settings/brand.html +2 -2
  253. package/.next/standalone/.next/server/app/settings/brand.rsc +1 -1
  254. package/.next/standalone/.next/server/app/settings/connectors/page_client-reference-manifest.js +1 -1
  255. package/.next/standalone/.next/server/app/settings/engines/page_client-reference-manifest.js +1 -1
  256. package/.next/standalone/.next/server/app/settings/onboarding/page_client-reference-manifest.js +1 -1
  257. package/.next/standalone/.next/server/app/settings/onboarding.html +2 -2
  258. package/.next/standalone/.next/server/app/settings/onboarding.rsc +1 -1
  259. package/.next/standalone/.next/server/app/settings/organization/page.js +1 -1
  260. package/.next/standalone/.next/server/app/settings/organization/page.js.nft.json +1 -1
  261. package/.next/standalone/.next/server/app/settings/organization/page_client-reference-manifest.js +1 -1
  262. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  263. package/.next/standalone/.next/server/app/settings/runtime/page_client-reference-manifest.js +1 -1
  264. package/.next/standalone/.next/server/app/settings/tools/page_client-reference-manifest.js +1 -1
  265. package/.next/standalone/.next/server/app/settings.html +2 -2
  266. package/.next/standalone/.next/server/app/settings.rsc +1 -1
  267. package/.next/standalone/.next/server/app/share/[token]/page_client-reference-manifest.js +1 -1
  268. package/.next/standalone/.next/server/app/share/space/[token]/page_client-reference-manifest.js +1 -1
  269. package/.next/standalone/.next/server/app/tasks/[id]/page.js +1 -1
  270. package/.next/standalone/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
  271. package/.next/standalone/.next/server/app/tasks/page.js +1 -1
  272. package/.next/standalone/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
  273. package/.next/standalone/.next/server/app/team/[agentId]/page_client-reference-manifest.js +1 -1
  274. package/.next/standalone/.next/server/app/team/page_client-reference-manifest.js +1 -1
  275. package/.next/standalone/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  276. package/.next/standalone/.next/server/app/whatsapp/page_client-reference-manifest.js +1 -1
  277. package/.next/standalone/.next/server/app/whatsapp.html +1 -1
  278. package/.next/standalone/.next/server/app/whatsapp.rsc +1 -1
  279. package/.next/standalone/.next/server/app/workflows/[caseId]/page_client-reference-manifest.js +1 -1
  280. package/.next/standalone/.next/server/app/workflows/new/[caseId]/page_client-reference-manifest.js +1 -1
  281. package/.next/standalone/.next/server/app/workflows/new/definition/page_client-reference-manifest.js +1 -1
  282. package/.next/standalone/.next/server/app/workflows/new/page.js +2 -2
  283. package/.next/standalone/.next/server/app/workflows/new/page_client-reference-manifest.js +1 -1
  284. package/.next/standalone/.next/server/app/workflows/page_client-reference-manifest.js +1 -1
  285. package/.next/standalone/.next/server/app/workflows/share/[caseId]/page_client-reference-manifest.js +1 -1
  286. package/.next/standalone/.next/server/app-paths-manifest.json +79 -79
  287. package/.next/standalone/.next/server/chunks/1699.js +2 -2
  288. package/.next/standalone/.next/server/chunks/4676.js +1 -0
  289. package/.next/standalone/.next/server/functions-config-manifest.json +43 -43
  290. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  291. package/.next/standalone/.next/server/pages/404.html +1 -1
  292. package/.next/standalone/.next/server/pages/500.html +1 -1
  293. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  294. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  295. package/.next/standalone/.next/static/chunks/1231-4acb93ac3f653de1.js +1 -0
  296. package/.next/standalone/.next/static/chunks/1255-b28ea36bf0cdbd65.js +1 -0
  297. package/.next/standalone/.next/static/chunks/1517.be5e2c446b38c681.js +1 -0
  298. package/.next/standalone/.next/static/chunks/2309-722fe8d8b26c21c6.js +1 -0
  299. package/.next/standalone/.next/static/chunks/2619-3c9e02e22d10480a.js +1 -0
  300. package/.next/standalone/.next/static/chunks/2713.4f4ae8af4e5bf2ee.js +1 -0
  301. package/.next/standalone/.next/static/chunks/2769-5ea87fab731b4c4d.js +1 -0
  302. package/.next/standalone/.next/static/chunks/3168.3b5e35036a18bdd3.js +1 -0
  303. package/.next/standalone/.next/static/chunks/4119-5297b212ff79d264.js +1 -0
  304. package/.next/standalone/.next/static/chunks/44530001.ef2edd53e6cfdfa8.js +1 -0
  305. package/.next/standalone/.next/static/chunks/4797.5d0d513a724ca684.js +1 -0
  306. package/.next/standalone/.next/static/chunks/4bd1b696-f785427dddbba9fb.js +1 -0
  307. package/.next/standalone/.next/static/chunks/566-df7d5a84a12252cd.js +1 -0
  308. package/.next/standalone/.next/static/chunks/5938.238480f58c343b6b.js +1 -0
  309. package/.next/standalone/.next/static/chunks/7130.5de172d005b1e866.js +1 -0
  310. package/.next/standalone/.next/static/chunks/8-49f6c91cb13e65ac.js +1 -0
  311. package/.next/standalone/.next/static/chunks/8217.93f3920e3c35c748.js +1 -0
  312. package/.next/standalone/.next/static/chunks/840.c27c21f4787aea90.js +59 -0
  313. package/.next/standalone/.next/static/chunks/9077-7f938e8517cad35e.js +1 -0
  314. package/.next/standalone/.next/static/chunks/930-de78056b2dc197a2.js +1 -0
  315. package/.next/standalone/.next/static/chunks/9863.8c29a80e7d210e46.js +1 -0
  316. package/.next/standalone/.next/static/chunks/9867.fc6d7dc10dd6c262.js +1 -0
  317. package/.next/standalone/.next/static/chunks/app/_not-found/page-1a04e2ed7713f80a.js +1 -0
  318. package/.next/standalone/.next/static/chunks/app/activity/loading-abb4b18098f1d93e.js +1 -0
  319. package/.next/standalone/.next/static/chunks/app/activity/page-c12b94ea10818d65.js +1 -0
  320. package/.next/standalone/.next/static/chunks/app/admin/page-e59c7cc86dec4052.js +1 -0
  321. package/.next/standalone/.next/static/chunks/app/agents/[id]/loading-abb4b18098f1d93e.js +1 -0
  322. package/.next/standalone/.next/static/chunks/app/agents/[id]/page-ba45b5f563f12313.js +1 -0
  323. package/.next/standalone/.next/static/chunks/app/agents/loading-abb4b18098f1d93e.js +1 -0
  324. package/.next/standalone/.next/static/chunks/app/agents/page-c251f7df2db0348b.js +1 -0
  325. package/.next/standalone/.next/static/chunks/app/api/activity/route-abb4b18098f1d93e.js +1 -0
  326. package/.next/standalone/.next/static/chunks/app/api/admin/audit-export/route-abb4b18098f1d93e.js +1 -0
  327. package/.next/standalone/.next/static/chunks/app/api/admin/share-links/route-abb4b18098f1d93e.js +1 -0
  328. package/.next/standalone/.next/static/chunks/app/api/agent-memory/route-abb4b18098f1d93e.js +1 -0
  329. package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/cancel/route-abb4b18098f1d93e.js +1 -0
  330. package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/events/route-abb4b18098f1d93e.js +1 -0
  331. package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/log/route-abb4b18098f1d93e.js +1 -0
  332. package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/route-abb4b18098f1d93e.js +1 -0
  333. package/.next/standalone/.next/static/chunks/app/api/agent-runs/route-abb4b18098f1d93e.js +1 -0
  334. package/.next/standalone/.next/static/chunks/app/api/agents/[id]/chain/route-abb4b18098f1d93e.js +1 -0
  335. package/.next/standalone/.next/static/chunks/app/api/agents/[id]/memory/route-abb4b18098f1d93e.js +1 -0
  336. package/.next/standalone/.next/static/chunks/app/api/agents/[id]/reports/route-abb4b18098f1d93e.js +1 -0
  337. package/.next/standalone/.next/static/chunks/app/api/agents/[id]/run/route-abb4b18098f1d93e.js +1 -0
  338. package/.next/standalone/.next/static/chunks/app/api/agents/[id]/skills/route-abb4b18098f1d93e.js +1 -0
  339. package/.next/standalone/.next/static/chunks/app/api/agents/create/route-abb4b18098f1d93e.js +1 -0
  340. package/.next/standalone/.next/static/chunks/app/api/agents/ops/route-abb4b18098f1d93e.js +1 -0
  341. package/.next/standalone/.next/static/chunks/app/api/approvals/[id]/route-abb4b18098f1d93e.js +1 -0
  342. package/.next/standalone/.next/static/chunks/app/api/approvals/route-abb4b18098f1d93e.js +1 -0
  343. package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/acl/route-abb4b18098f1d93e.js +1 -0
  344. package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/protect/route-abb4b18098f1d93e.js +1 -0
  345. package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/raw/route-abb4b18098f1d93e.js +1 -0
  346. package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/route-abb4b18098f1d93e.js +1 -0
  347. package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/share-link/[linkId]/route-abb4b18098f1d93e.js +1 -0
  348. package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/share-link/route-abb4b18098f1d93e.js +1 -0
  349. package/.next/standalone/.next/static/chunks/app/api/artifacts/upload/route-abb4b18098f1d93e.js +1 -0
  350. package/.next/standalone/.next/static/chunks/app/api/audit/list/route-abb4b18098f1d93e.js +1 -0
  351. package/.next/standalone/.next/static/chunks/app/api/audit/search/route-abb4b18098f1d93e.js +1 -0
  352. package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-abb4b18098f1d93e.js +1 -0
  353. package/.next/standalone/.next/static/chunks/app/api/auth/config/route-abb4b18098f1d93e.js +1 -0
  354. package/.next/standalone/.next/static/chunks/app/api/auth/join-bootstrap/route-abb4b18098f1d93e.js +1 -0
  355. package/.next/standalone/.next/static/chunks/app/api/auth/session/route-abb4b18098f1d93e.js +1 -0
  356. package/.next/standalone/.next/static/chunks/app/api/brand/route-abb4b18098f1d93e.js +1 -0
  357. package/.next/standalone/.next/static/chunks/app/api/chat/sessions/[id]/route-abb4b18098f1d93e.js +1 -0
  358. package/.next/standalone/.next/static/chunks/app/api/chat/sessions/route-abb4b18098f1d93e.js +1 -0
  359. package/.next/standalone/.next/static/chunks/app/api/config/env/route-abb4b18098f1d93e.js +1 -0
  360. package/.next/standalone/.next/static/chunks/app/api/config/route-abb4b18098f1d93e.js +1 -0
  361. package/.next/standalone/.next/static/chunks/app/api/connections/[service]/route-abb4b18098f1d93e.js +1 -0
  362. package/.next/standalone/.next/static/chunks/app/api/connections/[service]/verify/route-abb4b18098f1d93e.js +1 -0
  363. package/.next/standalone/.next/static/chunks/app/api/connections/route-abb4b18098f1d93e.js +1 -0
  364. package/.next/standalone/.next/static/chunks/app/api/cron/tick/route-abb4b18098f1d93e.js +1 -0
  365. package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/move/route-abb4b18098f1d93e.js +1 -0
  366. package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/route-abb4b18098f1d93e.js +1 -0
  367. package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/share-link/[linkId]/route-abb4b18098f1d93e.js +1 -0
  368. package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/share-link/route-abb4b18098f1d93e.js +1 -0
  369. package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/import/route-abb4b18098f1d93e.js +1 -0
  370. package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/route-abb4b18098f1d93e.js +1 -0
  371. package/.next/standalone/.next/static/chunks/app/api/disk/files/[id]/blob/route-abb4b18098f1d93e.js +1 -0
  372. package/.next/standalone/.next/static/chunks/app/api/disk/files/[id]/route-abb4b18098f1d93e.js +1 -0
  373. package/.next/standalone/.next/static/chunks/app/api/disk/files/[id]/transcribe/route-abb4b18098f1d93e.js +1 -0
  374. package/.next/standalone/.next/static/chunks/app/api/disk/files/route-abb4b18098f1d93e.js +1 -0
  375. package/.next/standalone/.next/static/chunks/app/api/disk/folders/route-abb4b18098f1d93e.js +1 -0
  376. package/.next/standalone/.next/static/chunks/app/api/events/since/[cursor]/route-abb4b18098f1d93e.js +1 -0
  377. package/.next/standalone/.next/static/chunks/app/api/events/stream/route-abb4b18098f1d93e.js +1 -0
  378. package/.next/standalone/.next/static/chunks/app/api/fs/create-folder/route-abb4b18098f1d93e.js +1 -0
  379. package/.next/standalone/.next/static/chunks/app/api/fs/pick-folder/route-abb4b18098f1d93e.js +1 -0
  380. package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/blueprint/route-abb4b18098f1d93e.js +1 -0
  381. package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/diagnostic/route-abb4b18098f1d93e.js +1 -0
  382. package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/governance/route-abb4b18098f1d93e.js +1 -0
  383. package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/interview/route-abb4b18098f1d93e.js +1 -0
  384. package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/pilot/route-abb4b18098f1d93e.js +1 -0
  385. package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/quarterly/route-abb4b18098f1d93e.js +1 -0
  386. package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/route-abb4b18098f1d93e.js +1 -0
  387. package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/setup-package/route-abb4b18098f1d93e.js +1 -0
  388. package/.next/standalone/.next/static/chunks/app/api/hail/engagements/route-abb4b18098f1d93e.js +1 -0
  389. package/.next/standalone/.next/static/chunks/app/api/hail/interviews/[id]/responses/route-abb4b18098f1d93e.js +1 -0
  390. package/.next/standalone/.next/static/chunks/app/api/hail/interviews/[id]/route-abb4b18098f1d93e.js +1 -0
  391. package/.next/standalone/.next/static/chunks/app/api/hail/setup-packages/[id]/apply/route-abb4b18098f1d93e.js +1 -0
  392. package/.next/standalone/.next/static/chunks/app/api/hail/setup-packages/validate/route-abb4b18098f1d93e.js +1 -0
  393. package/.next/standalone/.next/static/chunks/app/api/heartbeat/tick/route-abb4b18098f1d93e.js +1 -0
  394. package/.next/standalone/.next/static/chunks/app/api/heartbeat/worker/route-abb4b18098f1d93e.js +1 -0
  395. package/.next/standalone/.next/static/chunks/app/api/help/route-abb4b18098f1d93e.js +1 -0
  396. package/.next/standalone/.next/static/chunks/app/api/hermes/jobs/[id]/events/route-abb4b18098f1d93e.js +1 -0
  397. package/.next/standalone/.next/static/chunks/app/api/hermes/jobs/[id]/route-abb4b18098f1d93e.js +1 -0
  398. package/.next/standalone/.next/static/chunks/app/api/hermes/jobs/route-abb4b18098f1d93e.js +1 -0
  399. package/.next/standalone/.next/static/chunks/app/api/integrations/google/callback/route-abb4b18098f1d93e.js +1 -0
  400. package/.next/standalone/.next/static/chunks/app/api/integrations/google/oauth/route-abb4b18098f1d93e.js +1 -0
  401. package/.next/standalone/.next/static/chunks/app/api/marketplace/[id]/route-abb4b18098f1d93e.js +1 -0
  402. package/.next/standalone/.next/static/chunks/app/api/marketplace/open-design/route-abb4b18098f1d93e.js +1 -0
  403. package/.next/standalone/.next/static/chunks/app/api/marketplace/route-abb4b18098f1d93e.js +1 -0
  404. package/.next/standalone/.next/static/chunks/app/api/mines/import-roots/route-abb4b18098f1d93e.js +1 -0
  405. package/.next/standalone/.next/static/chunks/app/api/mines/portfolio/route-abb4b18098f1d93e.js +1 -0
  406. package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/chunks/route-abb4b18098f1d93e.js +1 -0
  407. package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/diligence/route-abb4b18098f1d93e.js +1 -0
  408. package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/import/route-abb4b18098f1d93e.js +1 -0
  409. package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/publish/route-abb4b18098f1d93e.js +1 -0
  410. package/.next/standalone/.next/static/chunks/app/api/mines/projects/route-abb4b18098f1d93e.js +1 -0
  411. package/.next/standalone/.next/static/chunks/app/api/missions/route-abb4b18098f1d93e.js +1 -0
  412. package/.next/standalone/.next/static/chunks/app/api/models/route-abb4b18098f1d93e.js +1 -0
  413. package/.next/standalone/.next/static/chunks/app/api/onboarding/blueprint/route-abb4b18098f1d93e.js +1 -0
  414. package/.next/standalone/.next/static/chunks/app/api/onboarding/launch/route-abb4b18098f1d93e.js +1 -0
  415. package/.next/standalone/.next/static/chunks/app/api/orchestrator/command/route-abb4b18098f1d93e.js +1 -0
  416. package/.next/standalone/.next/static/chunks/app/api/orchestrator/stream/route-abb4b18098f1d93e.js +1 -0
  417. package/.next/standalone/.next/static/chunks/app/api/org/route-abb4b18098f1d93e.js +1 -0
  418. package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/invites/[inviteId]/route-abb4b18098f1d93e.js +1 -0
  419. package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/invites/route-abb4b18098f1d93e.js +1 -0
  420. package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/members/[userId]/role/route-abb4b18098f1d93e.js +1 -0
  421. package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/members/[userId]/route-abb4b18098f1d93e.js +1 -0
  422. package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/members/route-abb4b18098f1d93e.js +1 -0
  423. package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/route-abb4b18098f1d93e.js +1 -0
  424. package/.next/standalone/.next/static/chunks/app/api/orgs/invites/pending/route-abb4b18098f1d93e.js +1 -0
  425. package/.next/standalone/.next/static/chunks/app/api/orgs/join/route-abb4b18098f1d93e.js +1 -0
  426. package/.next/standalone/.next/static/chunks/app/api/orgs/route-abb4b18098f1d93e.js +1 -0
  427. package/.next/standalone/.next/static/chunks/app/api/printing-press/clis/route-abb4b18098f1d93e.js +1 -0
  428. package/.next/standalone/.next/static/chunks/app/api/printing-press/install/route-abb4b18098f1d93e.js +1 -0
  429. package/.next/standalone/.next/static/chunks/app/api/printing-press/security-mode/route-abb4b18098f1d93e.js +1 -0
  430. package/.next/standalone/.next/static/chunks/app/api/privacy/config/route-abb4b18098f1d93e.js +1 -0
  431. package/.next/standalone/.next/static/chunks/app/api/privacy/verify/route-abb4b18098f1d93e.js +1 -0
  432. package/.next/standalone/.next/static/chunks/app/api/processes/[id]/route-abb4b18098f1d93e.js +1 -0
  433. package/.next/standalone/.next/static/chunks/app/api/processes/[id]/share-link/route-abb4b18098f1d93e.js +1 -0
  434. package/.next/standalone/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/override/route-abb4b18098f1d93e.js +1 -0
  435. package/.next/standalone/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/retry/route-abb4b18098f1d93e.js +1 -0
  436. package/.next/standalone/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/submit/route-abb4b18098f1d93e.js +1 -0
  437. package/.next/standalone/.next/static/chunks/app/api/processes/definitions/[slug]/route-abb4b18098f1d93e.js +1 -0
  438. package/.next/standalone/.next/static/chunks/app/api/processes/definitions/[slug]/settings/route-abb4b18098f1d93e.js +1 -0
  439. package/.next/standalone/.next/static/chunks/app/api/processes/definitions/route-abb4b18098f1d93e.js +1 -0
  440. package/.next/standalone/.next/static/chunks/app/api/processes/definitions/validate/route-abb4b18098f1d93e.js +1 -0
  441. package/.next/standalone/.next/static/chunks/app/api/processes/route-abb4b18098f1d93e.js +1 -0
  442. package/.next/standalone/.next/static/chunks/app/api/processes/start-and-route/route-abb4b18098f1d93e.js +1 -0
  443. package/.next/standalone/.next/static/chunks/app/api/projects/[slug]/library/route-abb4b18098f1d93e.js +1 -0
  444. package/.next/standalone/.next/static/chunks/app/api/projects/[slug]/route-abb4b18098f1d93e.js +1 -0
  445. package/.next/standalone/.next/static/chunks/app/api/projects/route-abb4b18098f1d93e.js +1 -0
  446. package/.next/standalone/.next/static/chunks/app/api/runs/approve-claude-run/route-abb4b18098f1d93e.js +1 -0
  447. package/.next/standalone/.next/static/chunks/app/api/runs/claude-code-dry-run/route-abb4b18098f1d93e.js +1 -0
  448. package/.next/standalone/.next/static/chunks/app/api/runs/competitor-report/route-abb4b18098f1d93e.js +1 -0
  449. package/.next/standalone/.next/static/chunks/app/api/runs/engine-ping/route-abb4b18098f1d93e.js +1 -0
  450. package/.next/standalone/.next/static/chunks/app/api/runs/marketing-plan/route-abb4b18098f1d93e.js +1 -0
  451. package/.next/standalone/.next/static/chunks/app/api/schedules/upsert/route-abb4b18098f1d93e.js +1 -0
  452. package/.next/standalone/.next/static/chunks/app/api/secrets/[name]/route-abb4b18098f1d93e.js +1 -0
  453. package/.next/standalone/.next/static/chunks/app/api/secrets/route-abb4b18098f1d93e.js +1 -0
  454. package/.next/standalone/.next/static/chunks/app/api/settings/trust-mode/route-abb4b18098f1d93e.js +1 -0
  455. package/.next/standalone/.next/static/chunks/app/api/share/[token]/otp/route-abb4b18098f1d93e.js +1 -0
  456. package/.next/standalone/.next/static/chunks/app/api/share/[token]/route-abb4b18098f1d93e.js +1 -0
  457. package/.next/standalone/.next/static/chunks/app/api/share/[token]/verify/route-abb4b18098f1d93e.js +1 -0
  458. package/.next/standalone/.next/static/chunks/app/api/share/space/[token]/otp/route-abb4b18098f1d93e.js +1 -0
  459. package/.next/standalone/.next/static/chunks/app/api/share/space/[token]/route-abb4b18098f1d93e.js +1 -0
  460. package/.next/standalone/.next/static/chunks/app/api/share/space/[token]/verify/route-abb4b18098f1d93e.js +1 -0
  461. package/.next/standalone/.next/static/chunks/app/api/shared/spaces/[id]/acl/route-abb4b18098f1d93e.js +1 -0
  462. package/.next/standalone/.next/static/chunks/app/api/shared/spaces/publish/route-abb4b18098f1d93e.js +1 -0
  463. package/.next/standalone/.next/static/chunks/app/api/shared/spaces/route-abb4b18098f1d93e.js +1 -0
  464. package/.next/standalone/.next/static/chunks/app/api/shared/spaces/status/route-abb4b18098f1d93e.js +1 -0
  465. package/.next/standalone/.next/static/chunks/app/api/shared/spaces/unpublish/route-abb4b18098f1d93e.js +1 -0
  466. package/.next/standalone/.next/static/chunks/app/api/state/route-abb4b18098f1d93e.js +1 -0
  467. package/.next/standalone/.next/static/chunks/app/api/system/update/route-abb4b18098f1d93e.js +1 -0
  468. package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/active-run/route-abb4b18098f1d93e.js +1 -0
  469. package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/attachments/route-abb4b18098f1d93e.js +1 -0
  470. package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/checklist/[itemId]/route-abb4b18098f1d93e.js +1 -0
  471. package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/checklist/route-abb4b18098f1d93e.js +1 -0
  472. package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/checkout/route-abb4b18098f1d93e.js +1 -0
  473. package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/children/route-abb4b18098f1d93e.js +1 -0
  474. package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/comments/route-abb4b18098f1d93e.js +1 -0
  475. package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/events/route-abb4b18098f1d93e.js +1 -0
  476. package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/live-runs/route-abb4b18098f1d93e.js +1 -0
  477. package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/release/route-abb4b18098f1d93e.js +1 -0
  478. package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/route-abb4b18098f1d93e.js +1 -0
  479. package/.next/standalone/.next/static/chunks/app/api/tasks/route-abb4b18098f1d93e.js +1 -0
  480. package/.next/standalone/.next/static/chunks/app/api/tool-allowlists/[id]/route-abb4b18098f1d93e.js +1 -0
  481. package/.next/standalone/.next/static/chunks/app/api/tool-allowlists/route-abb4b18098f1d93e.js +1 -0
  482. package/.next/standalone/.next/static/chunks/app/api/tool-egress/route-abb4b18098f1d93e.js +1 -0
  483. package/.next/standalone/.next/static/chunks/app/api/tools/[name]/approve/route-abb4b18098f1d93e.js +1 -0
  484. package/.next/standalone/.next/static/chunks/app/api/tools/[name]/route-abb4b18098f1d93e.js +1 -0
  485. package/.next/standalone/.next/static/chunks/app/api/tools/route-abb4b18098f1d93e.js +1 -0
  486. package/.next/standalone/.next/static/chunks/app/api/transcripts/route-abb4b18098f1d93e.js +1 -0
  487. package/.next/standalone/.next/static/chunks/app/api/voice/providers/route-abb4b18098f1d93e.js +1 -0
  488. package/.next/standalone/.next/static/chunks/app/api/voice/realtime/context/route-abb4b18098f1d93e.js +1 -0
  489. package/.next/standalone/.next/static/chunks/app/api/voice/realtime/session/route-abb4b18098f1d93e.js +1 -0
  490. package/.next/standalone/.next/static/chunks/app/api/voice/realtime/tool-result/route-abb4b18098f1d93e.js +1 -0
  491. package/.next/standalone/.next/static/chunks/app/api/voice/realtime/tools/route-abb4b18098f1d93e.js +1 -0
  492. package/.next/standalone/.next/static/chunks/app/api/voice/tts/route-abb4b18098f1d93e.js +1 -0
  493. package/.next/standalone/.next/static/chunks/app/api/whatsapp/allowlist/route-abb4b18098f1d93e.js +1 -0
  494. package/.next/standalone/.next/static/chunks/app/api/whatsapp/messages/route-abb4b18098f1d93e.js +1 -0
  495. package/.next/standalone/.next/static/chunks/app/api/whatsapp/qr/route-abb4b18098f1d93e.js +1 -0
  496. package/.next/standalone/.next/static/chunks/app/api/whatsapp/send/route-abb4b18098f1d93e.js +1 -0
  497. package/.next/standalone/.next/static/chunks/app/api/whatsapp/status/route-abb4b18098f1d93e.js +1 -0
  498. package/.next/standalone/.next/static/chunks/app/approvals/loading-abb4b18098f1d93e.js +1 -0
  499. package/.next/standalone/.next/static/chunks/app/approvals/page-c12b94ea10818d65.js +1 -0
  500. package/.next/standalone/.next/static/chunks/app/architecture/loading-abb4b18098f1d93e.js +1 -0
  501. package/.next/standalone/.next/static/chunks/app/architecture/page-2dfc72f2a2d88f9d.js +1 -0
  502. package/.next/standalone/.next/static/chunks/app/audit/live/page-1e0efbfb119569b0.js +1 -0
  503. package/.next/standalone/.next/static/chunks/app/audit/loading-abb4b18098f1d93e.js +1 -0
  504. package/.next/standalone/.next/static/chunks/app/audit/page-c12b94ea10818d65.js +1 -0
  505. package/.next/standalone/.next/static/chunks/app/brand/loading-abb4b18098f1d93e.js +1 -0
  506. package/.next/standalone/.next/static/chunks/app/brand/page-8bb3754e7c32b642.js +1 -0
  507. package/.next/standalone/.next/static/chunks/app/disk/loading-abb4b18098f1d93e.js +1 -0
  508. package/.next/standalone/.next/static/chunks/app/disk/page-830a69b2f0aa3d19.js +1 -0
  509. package/.next/standalone/.next/static/chunks/app/federated-ai/loading-abb4b18098f1d93e.js +1 -0
  510. package/.next/standalone/.next/static/chunks/app/federated-ai/page-d2bee8a9d6cb2158.js +1 -0
  511. package/.next/standalone/.next/static/chunks/app/hail/[id]/governance/page-e2ba96c9d0d9b834.js +1 -0
  512. package/.next/standalone/.next/static/chunks/app/hail/[id]/interview/page-d1ca3290361630df.js +1 -0
  513. package/.next/standalone/.next/static/chunks/app/hail/[id]/page-51b4e30f9ffd4b73.js +1 -0
  514. package/.next/standalone/.next/static/chunks/app/hail/[id]/setup/page-51b4e30f9ffd4b73.js +1 -0
  515. package/.next/standalone/.next/static/chunks/app/hail/page-51b4e30f9ffd4b73.js +1 -0
  516. package/.next/standalone/.next/static/chunks/app/help/[slug]/page-c3195d2b23b0ac1b.js +1 -0
  517. package/.next/standalone/.next/static/chunks/app/help/loading-abb4b18098f1d93e.js +1 -0
  518. package/.next/standalone/.next/static/chunks/app/help/page-bc1c746d72f7e90c.js +1 -0
  519. package/.next/standalone/.next/static/chunks/app/join/page-ce560c39fdc1cb5a.js +1 -0
  520. package/.next/standalone/.next/static/chunks/app/layout-6728a045f5352a96.js +1 -0
  521. package/.next/standalone/.next/static/chunks/app/loading-abb4b18098f1d93e.js +1 -0
  522. package/.next/standalone/.next/static/chunks/app/login/page-df655887dbc38067.js +1 -0
  523. package/.next/standalone/.next/static/chunks/app/marketplace/loading-abb4b18098f1d93e.js +1 -0
  524. package/.next/standalone/.next/static/chunks/app/marketplace/page-edb895159388f32e.js +1 -0
  525. package/.next/standalone/.next/static/chunks/app/mines/[projectId]/page-260fec1b92312925.js +1 -0
  526. package/.next/standalone/.next/static/chunks/app/mines/[projectId]/results/page-9fe66fe1590c64f9.js +1 -0
  527. package/.next/standalone/.next/static/chunks/app/mines/page-fb7d1c7bafe73571.js +1 -0
  528. package/.next/standalone/.next/static/chunks/app/missions/loading-abb4b18098f1d93e.js +1 -0
  529. package/.next/standalone/.next/static/chunks/app/missions/page-c12b94ea10818d65.js +1 -0
  530. package/.next/standalone/.next/static/chunks/app/onboarding/loading-abb4b18098f1d93e.js +1 -0
  531. package/.next/standalone/.next/static/chunks/app/onboarding/org/page-c26d5063bbdcb192.js +1 -0
  532. package/.next/standalone/.next/static/chunks/app/onboarding/page-b4c57b0f70cae794.js +1 -0
  533. package/.next/standalone/.next/static/chunks/app/org/loading-abb4b18098f1d93e.js +1 -0
  534. package/.next/standalone/.next/static/chunks/app/org/page-c12b94ea10818d65.js +1 -0
  535. package/.next/standalone/.next/static/chunks/app/page-12446920b9aef7b5.js +1 -0
  536. package/.next/standalone/.next/static/chunks/app/projects/[slug]/loading-abb4b18098f1d93e.js +1 -0
  537. package/.next/standalone/.next/static/chunks/app/projects/[slug]/log/page-a29845d3def72e1d.js +1 -0
  538. package/.next/standalone/.next/static/chunks/app/projects/[slug]/page-bc5359a5168e8ce3.js +1 -0
  539. package/.next/standalone/.next/static/chunks/app/projects/loading-abb4b18098f1d93e.js +1 -0
  540. package/.next/standalone/.next/static/chunks/app/projects/new/page-c12b94ea10818d65.js +1 -0
  541. package/.next/standalone/.next/static/chunks/app/projects/page-8f09f3fcf7fd0e3a.js +1 -0
  542. package/.next/standalone/.next/static/chunks/app/reports/[file]/route-abb4b18098f1d93e.js +1 -0
  543. package/.next/standalone/.next/static/chunks/app/reports/loading-abb4b18098f1d93e.js +1 -0
  544. package/.next/standalone/.next/static/chunks/app/reports/page-c12b94ea10818d65.js +1 -0
  545. package/.next/standalone/.next/static/chunks/app/runtime/loading-abb4b18098f1d93e.js +1 -0
  546. package/.next/standalone/.next/static/chunks/app/runtime/page-c12b94ea10818d65.js +1 -0
  547. package/.next/standalone/.next/static/chunks/app/schedules/loading-abb4b18098f1d93e.js +1 -0
  548. package/.next/standalone/.next/static/chunks/app/schedules/page-2a68ab0e10595bcd.js +1 -0
  549. package/.next/standalone/.next/static/chunks/app/settings/account/page-3423feef4e4bfd8d.js +1 -0
  550. package/.next/standalone/.next/static/chunks/app/settings/advanced/page-8269e27543b8bdd5.js +1 -0
  551. package/.next/standalone/.next/static/chunks/app/settings/appearance/page-c12b94ea10818d65.js +1 -0
  552. package/.next/standalone/.next/static/chunks/app/settings/brand/page-f54af497deea88ab.js +1 -0
  553. package/.next/standalone/.next/static/chunks/app/settings/connectors/page-8269e27543b8bdd5.js +1 -0
  554. package/.next/standalone/.next/static/chunks/app/settings/engines/page-439cc5bb0193bfb7.js +1 -0
  555. package/.next/standalone/.next/static/chunks/app/settings/layout-78a57111f867ba6c.js +1 -0
  556. package/.next/standalone/.next/static/chunks/app/settings/loading-abb4b18098f1d93e.js +1 -0
  557. package/.next/standalone/.next/static/chunks/app/settings/onboarding/page-2c557f68cc8971d8.js +1 -0
  558. package/.next/standalone/.next/static/chunks/app/settings/organization/page-c12b94ea10818d65.js +1 -0
  559. package/.next/standalone/.next/static/chunks/app/settings/page-abb4b18098f1d93e.js +1 -0
  560. package/.next/standalone/.next/static/chunks/app/settings/runtime/page-c12b94ea10818d65.js +1 -0
  561. package/.next/standalone/.next/static/chunks/app/settings/tools/page-8269e27543b8bdd5.js +1 -0
  562. package/.next/standalone/.next/static/chunks/app/share/[token]/page-9afe594e2b42ee98.js +1 -0
  563. package/.next/standalone/.next/static/chunks/app/share/space/[token]/page-d941c8b538680771.js +1 -0
  564. package/.next/standalone/.next/static/chunks/app/tasks/[id]/loading-abb4b18098f1d93e.js +1 -0
  565. package/.next/standalone/.next/static/chunks/app/tasks/[id]/page-10b8f571ac331814.js +1 -0
  566. package/.next/standalone/.next/static/chunks/app/tasks/loading-abb4b18098f1d93e.js +1 -0
  567. package/.next/standalone/.next/static/chunks/app/tasks/page-e53905ca0f216834.js +1 -0
  568. package/.next/standalone/.next/static/chunks/app/team/[agentId]/page-c12b94ea10818d65.js +1 -0
  569. package/.next/standalone/.next/static/chunks/app/team/page-51b4e30f9ffd4b73.js +1 -0
  570. package/.next/standalone/.next/static/chunks/app/tools/loading-abb4b18098f1d93e.js +1 -0
  571. package/.next/standalone/.next/static/chunks/app/tools/page-abb4b18098f1d93e.js +1 -0
  572. package/.next/standalone/.next/static/chunks/app/whatsapp/loading-abb4b18098f1d93e.js +1 -0
  573. package/.next/standalone/.next/static/chunks/app/whatsapp/page-ab228cb0cbf3e16d.js +1 -0
  574. package/.next/standalone/.next/static/chunks/app/workflows/[caseId]/page-44cbcfc3ad541629.js +1 -0
  575. package/.next/standalone/.next/static/chunks/app/workflows/new/[caseId]/page-51b4e30f9ffd4b73.js +1 -0
  576. package/.next/standalone/.next/static/chunks/app/workflows/new/definition/page-57285f28a2156daa.js +1 -0
  577. package/.next/standalone/.next/static/chunks/app/workflows/new/page-e99f34660ca383e5.js +1 -0
  578. package/.next/standalone/.next/static/chunks/app/workflows/page-11778031fa890a8c.js +1 -0
  579. package/.next/standalone/.next/static/chunks/app/workflows/share/[caseId]/page-abb4b18098f1d93e.js +1 -0
  580. package/.next/standalone/.next/static/chunks/framework-4731550a751206fc.js +1 -0
  581. package/.next/standalone/.next/static/chunks/main-app-646d86f6b65133fa.js +1 -0
  582. package/.next/standalone/.next/static/chunks/main-f0e8527d594b1755.js +1 -0
  583. package/.next/standalone/.next/static/chunks/pages/_app-6c8c2371b16a04b8.js +1 -0
  584. package/.next/standalone/.next/static/chunks/pages/_error-94812ad32cad7365.js +1 -0
  585. package/.next/standalone/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  586. package/.next/standalone/.next/static/chunks/webpack-ce537f60727acb61.js +1 -0
  587. package/.next/standalone/.next/static/css/10f53a9c6accc597.css +1 -0
  588. package/.next/standalone/.next/static/css/67735f13057a6651.css +1 -0
  589. package/.next/standalone/.next/static/css/acf226d91614a52a.css +1 -0
  590. package/.next/standalone/.next/static/css/c3ec1669cae95a9a.css +1 -0
  591. package/.next/standalone/.next/static/media/98e207f02528a563-s.p.woff2 +0 -0
  592. package/.next/standalone/.next/static/media/99dcf268bda04fe5-s.woff2 +0 -0
  593. package/.next/standalone/.next/static/media/d29838c109ef09b4-s.woff2 +0 -0
  594. package/.next/standalone/.next/static/media/e40af3453d7c920a-s.woff2 +0 -0
  595. package/.next/standalone/.next/static/media/ef4d5661765d0e49-s.woff2 +0 -0
  596. package/.next/standalone/data/.artifacts-migrated-v1 +1 -1
  597. package/.next/standalone/data/.default-project-seeded +1 -1
  598. package/.next/standalone/data/madarx.sqlite +0 -0
  599. package/.next/standalone/data/madarx.sqlite-shm +0 -0
  600. package/.next/standalone/data/madarx.sqlite-wal +0 -0
  601. package/.next/standalone/package.json +2 -1
  602. package/.next/standalone/public/federated-ai-teams.html +10 -0
  603. package/.next/standalone/public/madarx-feasibility-use-cases.html +1 -0
  604. package/.next/standalone/public/madarx-mark.svg +9 -0
  605. package/.next/standalone/public/privacy.worker.js +117 -0
  606. package/.next/static/6oh6zIyYdQuxVczCDWeak/_buildManifest.js +1 -0
  607. package/.next/static/6oh6zIyYdQuxVczCDWeak/_ssgManifest.js +1 -0
  608. package/.next/static/chunks/app/projects/page-8f09f3fcf7fd0e3a.js +1 -0
  609. package/README.md +3 -1
  610. package/lib/seeds.js +32 -13
  611. package/package.json +2 -1
  612. package/scripts/postbuild-standalone.mjs +41 -0
  613. package/.next/standalone/.next/server/chunks/664.js +0 -1
  614. package/.next/static/chunks/app/projects/page-a1a581ac76f7a4bb.js +0 -1
  615. /package/.next/{static/0tzU0vkYYYJiZ7OPljvJo → standalone/.next/static/6oh6zIyYdQuxVczCDWeak}/_buildManifest.js +0 -0
  616. /package/.next/{static/0tzU0vkYYYJiZ7OPljvJo → standalone/.next/static/6oh6zIyYdQuxVczCDWeak}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2952],{1034:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>x});var r=a(5155),t=a(2115),i=a(5063);let l=[{id:"hermes",label:"Hermes Agent",hint:"Personal AI runtime"},{id:"paper",label:"Paperclip",hint:"AI-company control plane"},{id:"madarx",label:"madarX OS",hint:"Local-first, audited"},{id:"upgrade",label:"Upgrade Blueprint",hint:"Path to parity"}],o=[{id:"h1",tag:"01",title:"Receive event",blurb:"Platform adapter → MessageEvent",detail:{ref:"gateway/run.py \xb7 GatewayRunner",body:["A platform adapter (WhatsApp, Slack, CLI) emits a MessageEvent with platform/chat/thread/user identifiers.","The WhatsApp adapter (gateway/platforms/whatsapp.py) starts scripts/whatsapp-bridge/bridge.js — a Node Baileys bridge — and polls inbound messages over a local HTTP loop (port 3010 on this machine).","Events are normalised before any agent code runs, so the same loop powers every platform."]}},{id:"h2",tag:"02",title:"Resolve session",blurb:"Map to a cached AIAgent",detail:{ref:"GatewayRunner.session_cache",body:["GatewayRunner maps (platform, chat, thread, user) → a long-lived AIAgent instance held in process memory.","New chats spawn a fresh AIAgent; reconnects pick the existing transcript up where it left off.","Sessions are isolated — approvals, queues, and tool state never leak between users or chats."]}},{id:"h3",tag:"03",title:"Build prompt",blurb:"Memory + skills disclosure",detail:{ref:"agent/memory_provider.py \xb7 skills.py",body:["Memory provider (built-in / Honcho / Mem0 / etc.) returns a fenced memory block; cron runs skip memory by default.","Skills (~/.hermes/skills, each with a SKILL.md) load progressively — only the index is shown until skills_list / skill_view are called.","Toolsets gate which tools are exposed for this session; MCP servers can register more dynamically."]}},{id:"h4",tag:"04",title:"Provider call",blurb:"Anthropic / OpenAI / local",detail:{ref:"run_agent.py \xb7 AIAgent.run",body:["AIAgent builds the messages, calls the configured provider, then parses tool calls from the response.","Per-job model selection is allowed: cron jobs (cron/jobs.json) override model, skills, toolsets, delivery and no_agent independently."]}},{id:"h5",tag:"05",title:"Dispatch tools",blurb:"Registry + MCP fan-out",detail:{ref:"tools/registry.py \xb7 model_tools.py",body:["Tools self-register at import via decorators in tools/registry.py; toolsets.py enables/disables groups by name.","MCP servers contribute dynamically registered tools at startup — the same dispatch path treats them as first-class.","Delegation (tools/delegate_tool.py) spawns child AIAgent sessions with restricted toolsets and bounded depth/concurrency; only a summary returns to the parent."]}},{id:"h6",tag:"06",title:"Approval gate",blurb:"Hardline \xb7 smart \xb7 manual",detail:{ref:"tools/approval.py",body:["A hardline blocklist refuses catastrophic commands outright — no override.","A smart classifier flags risky shell/file/network actions and asks for /approve or /deny on the platform that initiated the call.","Modes: smart (default), manual (always ask), off (trusted environments). Decisions are session-scoped and never global."]}},{id:"h7",tag:"07",title:"Append + iterate",blurb:"Tool result → next turn",detail:{ref:"AIAgent main loop",body:["Tool results are appended to the message list and the loop runs again — multi-step plans emerge from chained tool calls.","Iteration stops when the model emits a final assistant message or hits the configured max_iterations."]}},{id:"h8",tag:"08",title:"Persist + deliver",blurb:"state.db + platform reply",detail:{ref:"~/.hermes/state.db \xb7 GatewayRunner.send",body:["Every turn writes to ~/.hermes/state.db (sessions, messages, FTS search index).","Cron jobs (cron/jobs.py + cron/scheduler.py) reuse the same loop but with a fresh AIAgent; their output is stored under cron/output and delivered through the configured channel.","GatewayRunner sends the final reply back through the same platform adapter that received the event."]}}],n=[{id:"m1",tag:"01",title:"Stream entry",blurb:"/api/orchestrator/stream",detail:{ref:"app/api/orchestrator/stream/route.js",body:["The dashboard composer POSTs to /api/orchestrator/stream; the route streams Server-Sent Events back to the client.","Inbound WhatsApp messages take a parallel path through lib/whatsapp-router.js → lib/whatsapp-agent.js with a WhatsApp-specific system prompt and a 6-turn / 1536-token cap."]}},{id:"m2",tag:"02",title:"Runtime route",blurb:"handleOrchestratorCommand",detail:{ref:"lib/runtime.js",body:["lib/runtime.js owns all domain logic: agent creation, schedule upserts, marketing/competitor reports, heartbeat ticks, artifact writes.","The orchestrator interprets the prompt and either runs a marketplace tool directly or spawns a sub-agent through lib/agent-runner.js."]}},{id:"m3",tag:"03",title:"Engine spawn",blurb:"claude-code \xb7 anthropic \xb7 codex \xb7 ollama \xb7 hermes",detail:{ref:"lib/agent-engines.js",body:["Five engines are wired: claude-code (default, spawns the local CC CLI with --permission-mode bypassPermissions; the load-bearing safety boundary is the .claude/settings.json deny list), anthropic (madarX tool marketplace via the Messages API — required for create_artifact / generate_ui / whatsapp_send / competitor_report / marketing_plan), ollama, codex, and hermes (lib/hermes-jobs.js + scripts/hermes-job-runner.mjs).","CC spawns timeout via CLAUDE_CODE_TICK_TIMEOUT_MS (default 600000ms) and cap turns via CLAUDE_CODE_MAX_TURNS (default 30)."]}},{id:"m4",tag:"04",title:"Classify risk",blurb:"registry + safety",detail:{ref:"lib/tools/registry.js \xb7 lib/tools/safety.js",body:["executeRegistryTool() classifies every call: low / medium / high / irreversible_external. classifyCommand inspects terminal_run / process_start commands and flags destructive patterns (git push --force, kubectl delete, DROP TABLE / TRUNCATE / DELETE without WHERE).","36 marketplace tools across github (11), local_machine (9), supabase (8), vercel (3), web (3) and email (2) — see MARKETPLACE_TOOLS in lib/tools/registry.js."]}},{id:"m5",tag:"05",title:"Approval gate",blurb:"lib/approvals.js",detail:{ref:"lib/approvals.js \xb7 app/api/approvals/[id]/route.js",body:["irreversible_external always creates an approval_requests row with action_type main_agent_tool_irreversible:<toolName> — auto-trust does NOT bypass this tier. This is the load-bearing guarantee that an LLM on auto-trust cannot perform irreversible external writes without a human in the loop.","high / medium are gated when trust mode is approval_required; low always runs. Approvals are one-time, consumed by approval_id, and bound by an input signature."]}},{id:"m6",tag:"06",title:"Allowlist + rate",blurb:"destination + sliding window",detail:{ref:"lib/tool-allowlists.js \xb7 lib/tool-rate-limits.js",body:["Each write tool defines a scope_key (e.g. recipient_domain for email, repo_full_name for GitHub, table for supabase_rest_*). Default-deny tools block until at least one entry exists; web_search / web_fetch are default-allow.","Sliding-window quotas live in MARKETPLACE_TOOLS — e.g. email_send 20/hour, gh_pr_merge 5/hour, supabase_rest_delete 10/hour. recordCall fires only after a successful adapter run, so denied calls never consume quota."]}},{id:"m7",tag:"07",title:"Adapter + egress",blurb:"wrapFetch → tool_egress",detail:{ref:"lib/tools/adapters/ \xb7 lib/egress.js",body:["Adapters (files.js, terminal.js, processes.js, github.js, supabase.js, resend.js, vercel.js, web.js) execute the work; safety.js resolves paths inside allowed roots, redacts secrets, caps output.","Every external HTTP call goes through wrapFetch(toolName, agentId, fetch). One row lands in tool_egress per call (host, method, status, bytes in/out, duration) — never bodies. DB write failures are silent on purpose: observation must not break the caller."]}},{id:"m8",tag:"08",title:"Audit + heartbeat",blurb:"audit_logs + live events",detail:{ref:"lib/live-events.js \xb7 lib/live-events-bridge.js \xb7 lib/heartbeat-worker.js",body:["publishLiveEvent fans out to in-process subscribers and persists to activity_log. The SSE endpoint /api/events/stream tails activity_log to bridge events from the WhatsApp / cron / heartbeat daemons back into the dashboard.","Scheduled work flows through scripts/cron-daemon.mjs → heartbeat_tasks (queued → leased → running → complete | failed | approval_required). The worker owns leases, retries with backoff, pauses approval-required tasks, and recovers stale leases."]}}],d=[{id:"file_read",cat:"local",risk:"low",scope:"path inside allowed root",why:"Read-only, capped + redacted."},{id:"directory_list",cat:"local",risk:"low",scope:"path inside allowed root",why:"Read-only listing."},{id:"web_search",cat:"web",risk:"low",scope:"default-allow",why:"No side effects on local state."},{id:"file_write",cat:"local",risk:"medium",scope:"path inside allowed root",why:"Write inside workspace, redacted secrets."},{id:"file_patch",cat:"local",risk:"medium",scope:"path inside allowed root",why:"Surgical edits, approval-gated."},{id:"terminal_run",cat:"local",risk:"medium",scope:"classified per-command",why:"classifyCommand may upgrade to irreversible."},{id:"gh_issue_comment",cat:"github",risk:"medium",scope:"repo_full_name allowlist",why:"External write; allowlist + quota."},{id:"gh_pr_create",cat:"github",risk:"high",scope:"repo_full_name allowlist",why:"High blast radius; gated in approval mode."},{id:"supabase_rest_update",cat:"supabase",risk:"high",scope:"table allowlist",why:"Filters required; PATCH gated."},{id:"email_send",cat:"email",risk:"irreversible_external",scope:"recipient_domain allowlist",why:"Always approval-gated. Cannot be auto-trusted."},{id:"gh_pr_merge",cat:"github",risk:"irreversible_external",scope:"repo_full_name allowlist",why:"Always approval-gated. Cannot be auto-trusted."},{id:"supabase_rest_delete",cat:"supabase",risk:"irreversible_external",scope:"table allowlist",why:"Filters required; always approval-gated."},{id:"supabase_sql",cat:"supabase",risk:"irreversible_external",scope:"default_allow",why:"RLS-bypassing service-role SQL. Always approval."}],c=[{name:"Runtime entry",path:"app/api/orchestrator/stream/route.js",note:"SSE entry point for the main agent."},{name:"Domain logic",path:"lib/runtime.js",note:"createAgent, handleOrchestratorCommand, getState, artifacts."},{name:"SQLite schema",path:"lib/schema.js \xb7 data/madarx.sqlite",note:"agents, schedules, runs, approvals, heartbeat_tasks, secrets, tool_allowlists, tool_egress."},{name:"Agent engines",path:"lib/agent-engines.js \xb7 lib/agent-runner.js",note:"claude-code, anthropic, codex, ollama, hermes."},{name:"Tool registry",path:"lib/tools/registry.js \xb7 lib/tools/safety.js",note:"36 marketplace tools, classifyCommand, risk tiers."},{name:"Approvals",path:"lib/approvals.js \xb7 app/api/approvals/[id]/route.js",note:"One-time, signature-bound approval rows."},{name:"Allowlists + quotas",path:"lib/tool-allowlists.js \xb7 lib/tool-rate-limits.js",note:"Per-destination allow + sliding windows."},{name:"Egress log",path:"lib/egress.js",note:"wrapFetch → tool_egress (host/method/status/bytes/ms)."},{name:"Secrets vault",path:"lib/secrets.js \xb7 lib/master-key.js",note:"AES-256-GCM in SQLite secrets table, MADARX_MASTER_KEY."},{name:"Cron daemon",path:"scripts/cron-daemon.mjs \xb7 lib/schedule.js",note:"Queues due schedules into heartbeat_tasks every 30s."},{name:"Heartbeat worker",path:"scripts/heartbeat-worker.mjs \xb7 lib/heartbeat-worker.js",note:"Lease, retry, approval pause, stale recovery."},{name:"WhatsApp gateway",path:"scripts/whatsapp-daemon.mjs \xb7 scripts/whatsapp-bridge/bridge.js \xb7 lib/whatsapp-router.js \xb7 lib/whatsapp-agent.js",note:"Baileys on 127.0.0.1:3210; allowlist; orchestrator with WA prompt."},{name:"Live events",path:"lib/live-events.js \xb7 lib/live-events-bridge.js \xb7 app/api/events/stream/route.js",note:"In-process bus + cross-process bridge via activity_log."},{name:"Hermes bridge",path:"lib/hermes.js \xb7 lib/hermes-jobs.js \xb7 scripts/hermes-job-runner.mjs \xb7 scripts/hermes-command.py",note:"Run Hermes commands and jobs from madarX."}],h=[{k:"Storage",hermes:"~/.hermes/state.db (SQLite + FTS), ~/.hermes/config.yaml, ~/.hermes/.env",paper:"Postgres-style company control plane (companies, employees, goals, budgets, tasks, routines, governance, secrets, attachments).",madarx:"data/madarx.sqlite (WAL, FK on) via node:sqlite + lib/schema.js."},{k:"Provider routing",hermes:"Per-session + per-cron-job model override; provider router in run_agent.py.",paper:"Platform-agnostic — adapters phone home; the control plane does not run the model itself.",madarx:"Engine string per agent (claude-code / anthropic / codex / ollama / hermes); no credential pool yet."},{k:"Memory",hermes:"Pluggable memory_provider (built-in / Honcho / Mem0 / …) injected as a fenced block; cron skips memory.",paper:"Documents + attachments + activity feed give long-form recall; no LLM memory module of its own.",madarx:"lib/agent-memory-context.js assembles a snapshot per run; no pluggable provider yet."},{k:"Skills",hermes:"SKILL.md directories under ~/.hermes/skills, progressive disclosure via skills_list / skill_view.",paper:"Routines + work products + governance act as the skill substrate.",madarx:"workspace/agents/<id>/skills.md + lib/agent-skills.js; not yet progressively loaded."},{k:"Sessions",hermes:"Per (platform, chat, thread, user) AIAgent cached in GatewayRunner; FTS search across history.",paper:"Tasks / issues / activity per employee per workspace; durable, queryable.",madarx:"chat_sessions + chat_messages; no full-text search."},{k:"Platforms",hermes:"Pluggable adapters: WhatsApp (Baileys bridge on port 3010), CLI, more; uniform MessageEvent abstraction.",paper:"Adapters (Claude / Codex / CLI / HTTP / webhook) hooked in via plugins; hermes_local mentioned as external adapter.",madarx:"Dashboard SSE + WhatsApp (Baileys on 127.0.0.1:3210); no shared adapter contract yet."},{k:"Cron / jobs",hermes:"cron/jobs.json with prompt + schedule + skills + model + delivery + no_agent + toolsets; fresh AIAgent per run.",paper:"Routines + heartbeat at the company-process level.",madarx:"lib/schedule.js parses human strings; cron-daemon queues heartbeat_tasks; worker honours retries, leases, approval pauses."},{k:"Approvals",hermes:"tools/approval.py — hardline block + smart classifier; CLI / gateway /approve /deny; smart / manual / off modes.",paper:"Governance + approval workflows are first-class in the org model.",madarx:"approval_requests rows; one-time consumption; irreversible_external tier always gated regardless of trust mode."},{k:"Subagents",hermes:"delegate_tool spawns child AIAgent with restricted toolsets, bounded depth/concurrency; only summary returns.",paper:"Employees and routines compose, with explicit budgets.",madarx:"lib/delegation.js + lib/delegation-contracts.js exist; concurrency / depth limits to harden."},{k:"Dynamic tools",hermes:"MCP servers register tools at startup; toolsets.py gates exposure.",paper:"Plugins extend the control plane.",madarx:"Static MARKETPLACE_TOOLS registry; no MCP dynamic registration yet."},{k:"Observability",hermes:"state.db transcripts; cron/output artifacts.",paper:"Activity / events feed across the org.",madarx:"audit_logs, agent_events, tool_egress, activity_log (SSE-bridged across processes)."}],p=[{k:"Phase 1",name:"Observability + source maps",bullets:["Live event topology view","Per-tool latency + error panels","Egress search UI on tool_egress"]},{k:"Phase 2",name:"Approval Center",bullets:["Single inbox for approvals across UI + WhatsApp","Smart classifier (low → auto-approve)","TTL + escalation rules"]},{k:"Phase 3",name:"Memory + Skills",bullets:["Pluggable memory provider","SKILL.md progressive disclosure","Per-agent skill scoping"]},{k:"Phase 4",name:"Gateway adapters",bullets:["MessageEvent abstraction","Slack / Discord / Email adapters","Durable per-session AIAgent cache"]},{k:"Phase 5",name:"Provider router",bullets:["Credential pools per provider","Per-job model override","Cost + rate awareness baked in"]},{k:"Phase 6",name:"Evaluation + verification",bullets:["Visual QA on artifacts","Diff-based code verification","Replay-from-audit_logs for regression"]}],m={low:"low",medium:"medium",high:"high",irreversible_external:"irrev. external"},u={low:"low",medium:"medium",high:"high",irreversible_external:"irrev"};function g(e,s){return"manual"===s?{decision:"approval",why:"Manual mode: every risky call asks."}:"low"===e.risk?{decision:"execute",why:"Low-risk read; runs without approval."}:"irreversible_external"===e.risk?{decision:"approval",why:"Irreversible external. Auto-trust does NOT bypass."}:"auto"===s?{decision:"execute",why:"Auto-trust bypasses the ".concat(e.risk," gate.")}:{decision:"approval",why:"approval_required mode gates ".concat(e.risk,".")}}function x(){let[e,s]=(0,t.useState)("hermes"),[a,x]=(0,t.useState)("h1"),[j,b]=(0,t.useState)("m1"),[v,_]=(0,t.useState)(()=>new Set(["file_read","directory_list","web_search","file_write","file_patch","terminal_run","gh_issue_comment","email_send"])),[y,w]=(0,t.useState)("approval_required"),[f,k]=(0,t.useState)(c[0].path),[N,A]=(0,t.useState)("Open a PR titled “Fix WhatsApp pairing crash” in kareemodev777/madarx-os, email ak@madarx.io a 1-line summary, and read scripts/whatsapp-daemon.mjs first."),[S,T]=(0,t.useState)(null),C=(0,t.useMemo)(()=>d.filter(e=>v.has(e.id)),[v]),P=(0,t.useMemo)(()=>{let e=0,s=0,a=C.map(a=>{let r=g(a,y);return"execute"===r.decision?e++:s++,{tool:a,decision:r}}),r=C.filter(e=>"irreversible_external"===e.risk).length,t=Math.round(100*(s+ +(r>0))/(C.length+1));return{rows:a,exec:e,gated:s,irrev:r,guardScore:t}},[C,y]);return(0,r.jsxs)("main",{className:i.shell,children:[(0,r.jsxs)("div",{className:i.topbar,children:[(0,r.jsxs)("div",{className:i.lead,children:[(0,r.jsx)("em",{children:"document \xb7 003 \xb7 architecture"}),(0,r.jsxs)("b",{children:["madar",(0,r.jsx)("i",{children:"X"})," OS \xa0\xb7\xa0 agent runtime atlas"]})]}),(0,r.jsx)("a",{className:i.home,href:"/",children:"← back to console"})]}),(0,r.jsxs)("header",{className:i.hero,children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("h1",{children:["madar",(0,r.jsx)("mark",{children:"X"})," OS is the main operating layer for the madarX agent stack."]}),(0,r.jsx)("p",{children:"The OS orchestrates missions, calls specialist vertical agents such as RegOps and Butler/Concierge, manages approvals, and generates artifacts inside one governed workspace. This atlas shows how the runtime earns Hermes-class power without losing its audit floor."})]}),(0,r.jsxs)("aside",{className:i.meta,children:[(0,r.jsx)("b",{children:"filing meta"}),(0,r.jsxs)("dl",{children:[(0,r.jsx)("dt",{children:"scope"})," ",(0,r.jsx)("dd",{children:"runtime architecture \xb7 approval contracts"}),(0,r.jsx)("dt",{children:"repos"})," ",(0,r.jsx)("dd",{children:"madarx-os \xb7 hermes-agent \xb7 paperclip"}),(0,r.jsx)("dt",{children:"classification"}),(0,r.jsx)("dd",{children:"internal \xb7 operator reference"}),(0,r.jsx)("dt",{children:"palette"})," ",(0,r.jsx)("dd",{children:"Onyx \xb7 Platinum \xb7 Bone \xb7 Graphite \xb7 Mars"})]})]})]}),(0,r.jsx)("nav",{className:i.tabs,role:"tablist","aria-label":"architecture sections",children:l.map(a=>(0,r.jsxs)("button",{role:"tab","aria-selected":e===a.id,className:e===a.id?i.on:"",onClick:()=>s(a.id),children:[a.label,(0,r.jsx)("small",{children:a.hint})]},a.id))}),"hermes"===e&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("section",{className:i.section,children:[(0,r.jsxs)("div",{className:i.panel,children:[(0,r.jsxs)("div",{className:i.panelTitle,children:[(0,r.jsx)("b",{children:"Core loop"}),(0,r.jsx)("small",{children:"run_agent.py \xb7 gateway/run.py"})]}),(0,r.jsxs)("div",{className:i.body,children:[(0,r.jsxs)("p",{children:["Hermes is a personal AI runtime built around one loop. A platform adapter emits a normalised ",(0,r.jsx)("code",{children:"MessageEvent"}),"; ",(0,r.jsx)("code",{children:"GatewayRunner"})," resolves a per-session ",(0,r.jsx)("code",{children:"AIAgent"}),"; the agent builds a prompt with optional memory + skills, calls the configured provider, dispatches tool calls through a self-registering registry, gates them through approval, and iterates until a final answer."]}),(0,r.jsx)("p",{className:"muted",children:"Click any step to see what is happening at that point in the loop."})]}),(0,r.jsx)("div",{className:i.loop,role:"tablist",children:o.map(e=>(0,r.jsxs)("button",{role:"tab","aria-selected":a===e.id,className:"".concat(i.loopStep," ").concat(a===e.id?i.on:""),onClick:()=>x(e.id),children:[(0,r.jsx)("b",{children:e.tag}),(0,r.jsx)("span",{children:e.title}),(0,r.jsx)("small",{children:e.blurb})]},e.id))}),(0,r.jsx)("div",{className:i.loopExplain,children:(()=>{let e=o.find(e=>e.id===a);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("h4",{children:[e.tag," \xb7 ",e.title," ",(0,r.jsxs)("em",{children:["\xb7 ",e.detail.ref]})]}),e.detail.body.map((e,s)=>(0,r.jsx)("p",{children:e},s))]})})()})]}),(0,r.jsxs)("div",{className:"".concat(i.panel," ").concat(i.dark),children:[(0,r.jsxs)("div",{className:i.panelTitle,children:[(0,r.jsx)("b",{children:"State + storage"}),(0,r.jsx)("small",{children:"~/.hermes"})]}),(0,r.jsxs)("div",{className:i.body,children:[(0,r.jsxs)("dl",{className:i.kv,children:[(0,r.jsx)("dt",{children:"config"}),(0,r.jsx)("dd",{children:(0,r.jsx)("code",{children:"~/.hermes/config.yaml"})}),(0,r.jsx)("dt",{children:"secrets"}),(0,r.jsx)("dd",{children:(0,r.jsx)("code",{children:"~/.hermes/.env"})}),(0,r.jsx)("dt",{children:"state"}),(0,r.jsxs)("dd",{children:[(0,r.jsx)("code",{children:"~/.hermes/state.db"})," \xb7 SQLite + FTS"]}),(0,r.jsx)("dt",{children:"skills"}),(0,r.jsx)("dd",{children:(0,r.jsx)("code",{children:"~/.hermes/skills/<name>/SKILL.md"})}),(0,r.jsx)("dt",{children:"cron"}),(0,r.jsxs)("dd",{children:[(0,r.jsx)("code",{children:"~/.hermes/cron/jobs.json"})," \xb7 ",(0,r.jsx)("code",{children:"cron/output/"})]}),(0,r.jsx)("dt",{children:"WA bridge"}),(0,r.jsxs)("dd",{children:[(0,r.jsx)("code",{children:"scripts/whatsapp-bridge/bridge.js"})," \xb7 port ",(0,r.jsx)("code",{children:"3010"})]})]}),(0,r.jsxs)("p",{className:"muted",children:["Memory is pluggable (",(0,r.jsx)("code",{children:"agent/memory_provider.py"}),") — built-in, Honcho, Mem0 etc. — and rendered into the prompt as a fenced block. Cron runs skip memory by default."]}),(0,r.jsxs)("p",{className:"muted",children:["Delegation (",(0,r.jsx)("code",{children:"tools/delegate_tool.py"}),") spawns child ",(0,r.jsx)("code",{children:"AIAgent"})," sessions with restricted toolsets and bounded concurrency/depth, returning only a summary to the parent."]})]})]})]}),(0,r.jsx)("section",{className:"".concat(i.section," ").concat(i.single),children:(0,r.jsxs)("div",{className:"".concat(i.panel," ").concat(i.flat),children:[(0,r.jsxs)("div",{className:i.panelTitle,children:[(0,r.jsx)("b",{children:"Approval model"}),(0,r.jsx)("small",{children:"tools/approval.py"})]}),(0,r.jsxs)("div",{className:i.body,children:[(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Hardline."})," A non-negotiable blocklist refuses catastrophic commands — destructive system writes, credential exfil, fork bombs — with no override. This list never asks the user."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Smart classifier."})," Risky shell, file, and network actions are flagged and surfaced for ",(0,r.jsx)("code",{children:"/approve"})," or ",(0,r.jsx)("code",{children:"/deny"})," on the platform that initiated the call (CLI prompt, WhatsApp inline reply, gateway-managed approval)."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Modes."})," ",(0,r.jsx)("code",{children:"smart"})," (default), ",(0,r.jsx)("code",{children:"manual"})," (every risky action asks), ",(0,r.jsx)("code",{children:"off"})," (trusted env). Modes are per-session, never global. Decisions never leak between users or chats."]})]})]})})]}),"paper"===e&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("section",{className:i.section,children:[(0,r.jsxs)("div",{className:i.panel,children:[(0,r.jsxs)("div",{className:i.panelTitle,children:[(0,r.jsx)("b",{children:"What Paperclip actually is"}),(0,r.jsx)("small",{children:"not an attachment tool"})]}),(0,r.jsxs)("div",{className:i.body,children:[(0,r.jsxs)("p",{children:["Paperclip (",(0,r.jsx)("code",{children:"~/Projects/paperclip"}),") is an open-source ",(0,r.jsx)("b",{children:"control plane for autonomous AI companies"}),". It models the organisation, not the agent: companies, employees / AI agents, org structure, goals, budgets, tasks and issues, routines and schedules, heartbeat execution, governance and approvals, secrets and storage, activity and events, plugins, workspaces and runtime, documents and attachments and work products."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Key distinction."})," Paperclip's control plane does ",(0,r.jsx)("i",{children:"not"})," have to run the agents itself. External agents and adapters run elsewhere and phone home — the plane keeps the durable record of what work was authorised, attempted, and produced."]}),(0,r.jsxs)("p",{children:["Adapters include Claude / Codex / generic CLI / HTTP / webhook. Local notes also reference a ",(0,r.jsx)("code",{children:"hermes_local"})," external-adapter plugin story — Hermes lives outside the plane and ships work products in."]})]})]}),(0,r.jsxs)("div",{className:"".concat(i.panel," ").concat(i.dark),children:[(0,r.jsxs)("div",{className:i.panelTitle,children:[(0,r.jsx)("b",{children:"Mental model"}),(0,r.jsx)("small",{children:"org first, agent second"})]}),(0,r.jsx)("div",{className:i.body,children:(0,r.jsxs)("ul",{className:"flat",children:[(0,r.jsx)("li",{children:"Company → Employees (AI agents) with explicit roles."}),(0,r.jsx)("li",{children:"Goals → Budgets → Tasks / Issues with owners."}),(0,r.jsx)("li",{children:"Routines + heartbeat drive recurring execution."}),(0,r.jsx)("li",{children:"Governance / approvals are first-class — not bolted on."}),(0,r.jsx)("li",{children:"Activity + events feed gives a full audit timeline."}),(0,r.jsx)("li",{children:"Documents \xb7 attachments \xb7 work products land alongside the task that produced them."}),(0,r.jsx)("li",{children:"Plugins extend the plane; adapters extend the runtime."})]})})]})]}),(0,r.jsx)("section",{className:"".concat(i.section," ").concat(i.single),children:(0,r.jsxs)("div",{className:i.callout,children:[(0,r.jsx)("b",{children:"Why this matters for madarX."})," madarX is already most of a control plane (agents, schedules, approvals, audit, secrets, allowlists) — adopting Paperclip's separation-of-concerns lets us host external agent ",(0,r.jsx)("i",{children:"runtimes"})," (Hermes, Claude Code, Codex, MCP servers) as adapters that phone home, while madarX remains the durable governance plane."]})})]}),"madarx"===e&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("section",{className:i.section,children:[(0,r.jsxs)("div",{className:i.panel,children:[(0,r.jsxs)("div",{className:i.panelTitle,children:[(0,r.jsx)("b",{children:"Execution loop"}),(0,r.jsx)("small",{children:"orchestrator → engine → adapter → audit"})]}),(0,r.jsxs)("div",{className:i.body,children:[(0,r.jsxs)("p",{children:["madarX OS is a local-first Next.js 15 App Router product with a SQLite-backed runtime (",(0,r.jsx)("code",{children:"data/madarx.sqlite"}),", WAL, foreign keys). The dashboard at ",(0,r.jsx)("code",{children:"/"})," talks to the same database the background daemons do; nothing is in-memory only."]}),(0,r.jsx)("p",{className:"muted",children:"Click any step for the file path and what it enforces."})]}),(0,r.jsx)("div",{className:i.loop,role:"tablist",children:n.map(e=>(0,r.jsxs)("button",{role:"tab","aria-selected":j===e.id,className:"".concat(i.loopStep," ").concat(j===e.id?i.on:""),onClick:()=>b(e.id),children:[(0,r.jsx)("b",{children:e.tag}),(0,r.jsx)("span",{children:e.title}),(0,r.jsx)("small",{children:e.blurb})]},e.id))}),(0,r.jsx)("div",{className:i.loopExplain,children:(()=>{let e=n.find(e=>e.id===j);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("h4",{children:[e.tag," \xb7 ",e.title," ",(0,r.jsxs)("em",{children:["\xb7 ",e.detail.ref]})]}),e.detail.body.map((e,s)=>(0,r.jsx)("p",{children:e},s))]})})()})]}),(0,r.jsxs)("div",{className:"".concat(i.panel," ").concat(i.dark),children:[(0,r.jsxs)("div",{className:i.panelTitle,children:[(0,r.jsx)("b",{children:"Risk tiers"}),(0,r.jsx)("small",{children:"lib/tools/registry.js"})]}),(0,r.jsxs)("div",{className:i.body,children:[(0,r.jsxs)("ul",{className:"flat",children:[(0,r.jsxs)("li",{children:[(0,r.jsx)("code",{children:"low"})," \xb7 runs without approval (reads, web_search)."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("code",{children:"medium"})," \xb7 gated only when trust mode is ",(0,r.jsx)("code",{children:"approval_required"}),"."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("code",{children:"high"})," \xb7 gated in approval mode; auto-trust may run it."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("code",{children:"irreversible_external"})," \xb7 ",(0,r.jsx)("b",{children:"always"})," creates an approval row. Auto-trust never bypasses."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("code",{children:"blocked"})," \xb7 refused regardless of mode (e.g. ",(0,r.jsx)("code",{children:"rm -rf /"}),", force-push to main, raw ",(0,r.jsx)("code",{children:"DROP DATABASE"})," via shell)."]})]}),(0,r.jsxs)("p",{className:"muted",children:["The ",(0,r.jsx)("code",{children:"irreversible_external"})," tier is the load-bearing guarantee: an LLM on auto-trust cannot perform irreversible external writes without a human in the loop. ",(0,r.jsx)("code",{children:"action_type"})," begins ",(0,r.jsx)("code",{children:"main_agent_tool_irreversible:"})," and is bound by an input signature so the same approval cannot be replayed."]})]})]})]}),(0,r.jsx)("section",{className:"".concat(i.section," ").concat(i.single),children:(0,r.jsxs)("div",{className:i.panel,children:[(0,r.jsxs)("div",{className:i.panelTitle,children:[(0,r.jsx)("b",{children:"Approval simulator"}),(0,r.jsx)("small",{children:"capabilities \xb7 trust mode \xb7 score"})]}),(0,r.jsxs)("div",{className:i.modeRow,role:"tablist","aria-label":"trust mode",children:[(0,r.jsx)("button",{className:"approval_required"===y?i.on:"",onClick:()=>w("approval_required"),children:"approval required \xb7 default"}),(0,r.jsx)("button",{className:"auto"===y?"".concat(i.on," ").concat(i.danger):"",onClick:()=>w("auto"),children:"auto-trust \xb7 loosened"}),(0,r.jsx)("button",{className:"manual"===y?i.on:"",onClick:()=>w("manual"),children:"manual \xb7 every risky asks"})]}),(0,r.jsxs)("div",{className:i.simGrid,children:[(0,r.jsx)("div",{className:i.toggles,children:d.map(e=>{let s=v.has(e.id),a=g(e,y);return(0,r.jsxs)("label",{className:i.toggleRow,children:[(0,r.jsx)("input",{type:"checkbox",checked:s,onChange:()=>{var s;return s=e.id,void _(e=>{let a=new Set(e);return a.has(s)?a.delete(s):a.add(s),a})},"aria-label":"toggle ".concat(e.id)}),(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:(0,r.jsx)("code",{children:e.id})}),(0,r.jsx)("small",{children:e.why}),(0,r.jsxs)("small",{className:i.scopeTag,children:["scope: ",e.scope," \xb7 category: ",e.cat]})]}),(0,r.jsx)("span",{className:"".concat(i.riskTag," ").concat(i[u[e.risk]]),children:m[e.risk]}),(0,r.jsx)("span",{className:"".concat(i.riskTag," ").concat("approval"===a.decision?i.irrev:i.low),title:a.why,children:s?"approval"===a.decision?"APPROVE":"EXECUTE":"OFF"})]},e.id)})}),(0,r.jsxs)("div",{className:i.score,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"guard score"}),(0,r.jsxs)("div",{className:i.scoreBig,children:[(0,r.jsx)("em",{children:P.guardScore}),(0,r.jsx)("span",{style:{color:"#9a9a9d",fontSize:14},children:" / 100"})]})]}),(0,r.jsx)("div",{className:i.scoreBar,children:(0,r.jsx)("i",{style:{width:"".concat(P.guardScore,"%")}})}),(0,r.jsxs)("ul",{className:i.scoreList,children:[(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"enabled"}),(0,r.jsxs)("span",{children:[C.length," tool(s)"]})]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"auto-execute"}),(0,r.jsx)("span",{children:P.exec})]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"approval-gated"}),(0,r.jsx)("span",{children:P.gated})]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"irreversible"}),(0,r.jsx)("span",{children:P.irrev})]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"trust mode"}),(0,r.jsx)("span",{children:y})]})]}),(0,r.jsx)("p",{style:{fontSize:11,color:"#9a9a9d",margin:0,lineHeight:1.5},children:"auto"===y?"auto-trust bypasses medium/high gates — irreversible_external still asks.":"manual"===y?"manual mode forces approval on every non-low call.":"approval_required gates everything above low; irreversible always gates."})]})]})]})})]}),"upgrade"===e&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("section",{className:i.section,children:[(0,r.jsxs)("div",{className:i.panel,children:[(0,r.jsxs)("div",{className:i.panelTitle,children:[(0,r.jsx)("b",{children:"Closing the gap to Hermes"}),(0,r.jsx)("small",{children:"without losing the audit floor"})]}),(0,r.jsxs)("div",{className:i.body,children:[(0,r.jsxs)("p",{children:["The blueprint: keep madarX's approval contract (",(0,r.jsx)("code",{children:"approval_requests"})," row, one-time consumption, signature-bound, hardline never-allowed list, ",(0,r.jsx)("code",{children:"irreversible_external"})," always gated) as immovable invariants — and layer Hermes-class capabilities on top."]}),(0,r.jsxs)("ul",{className:"flat",children:[(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"Provider router + credential pools."})," Pluggable provider strategy in ",(0,r.jsx)("code",{children:"lib/agent-engines.js"}),": per-job model override (mirroring Hermes cron jobs), per-provider key rotation, cost + rate awareness."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"Pluggable memory providers."})," New ",(0,r.jsx)("code",{children:"lib/memory/"})," module with built-in, Honcho-style, and Mem0-style providers. Fenced memory block injected in ",(0,r.jsx)("code",{children:"lib/agent-memory-context.js"}),"; opt-out for scheduled runs by default."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"Skill lifecycle + progressive loading."})," ",(0,r.jsx)("code",{children:"workspace/skills/<name>/SKILL.md"})," with ",(0,r.jsx)("code",{children:"skills_list"})," / ",(0,r.jsx)("code",{children:"skill_view"})," tools; only the index appears in the prompt until a skill is opened."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"Session transcript FTS."})," Add a ",(0,r.jsx)("code",{children:"chat_messages_fts"})," virtual table; expose ",(0,r.jsx)("code",{children:"session_search"})," as a low-risk tool."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"Platform adapter abstraction."})," New ",(0,r.jsx)("code",{children:"lib/gateway/"})," with a ",(0,r.jsx)("code",{children:"MessageEvent"})," shape; WhatsApp, Slack, Discord, Email become symmetrical adapters. The same loop reaches every surface."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"Durable gateway session cache."})," Per (platform, chat, thread, user) record in SQLite, with a process-cached ",(0,r.jsx)("code",{children:"AIAgent"}),"-equivalent in front. Survives Next.js hot-reload."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"Subagent isolation + concurrency."})," Promote ",(0,r.jsx)("code",{children:"lib/delegation.js"})," + ",(0,r.jsx)("code",{children:"delegation-contracts.js"})," to first-class: explicit max depth, max concurrent children per parent, restricted toolsets, summary-only return."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"MCP dynamic tool registry."})," Tools registered at runtime by MCP servers join ",(0,r.jsx)("code",{children:"MARKETPLACE_TOOLS"})," with a ",(0,r.jsx)("code",{children:"source:'mcp'"})," tag; risk tier required at registration time."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"Cron delivery semantics."})," Bring Hermes ",(0,r.jsx)("code",{children:"delivery"})," + ",(0,r.jsx)("code",{children:"no_agent"})," + per-job ",(0,r.jsx)("code",{children:"toolsets"}),"/",(0,r.jsx)("code",{children:"model"}),"/",(0,r.jsx)("code",{children:"script"})," into ",(0,r.jsx)("code",{children:"schedules"})," rows; fresh agent per run."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"Approval UX parity."})," Single approval inbox (UI + WhatsApp) with one-tap ",(0,r.jsx)("code",{children:"/approve"})," \xb7 ",(0,r.jsx)("code",{children:"/deny"}),". TTL, expiry, and a smart classifier that may auto-approve ",(0,r.jsx)("i",{children:"only"})," low-risk after sustained green history."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"Hardline blocklist + smart classifier."})," Mirror ",(0,r.jsx)("code",{children:"tools/approval.py"})," hardline patterns into ",(0,r.jsx)("code",{children:"lib/tools/safety.js"})," as a non-overridable set, separate from risk-tier gating."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"Context compression + parent-session lineage."})," Lossy compress old turns above a token threshold; child sessions remember their parent ",(0,r.jsx)("code",{children:"session_id"})," for audit lineage."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("b",{children:"Verification gates on artifacts."})," Visual QA (screenshot diff for generated UI), build/test gates for generated code, before any ",(0,r.jsx)("code",{children:"artifact"})," is marked ",(0,r.jsx)("i",{children:"shippable"}),"."]})]})]})]}),(0,r.jsxs)("div",{className:"".concat(i.panel," ").concat(i.dark),children:[(0,r.jsxs)("div",{className:i.panelTitle,children:[(0,r.jsx)("b",{children:"Approval contract"}),(0,r.jsx)("small",{children:"immovable invariants"})]}),(0,r.jsx)("div",{className:i.body,children:(0,r.jsxs)("ul",{className:"flat",children:[(0,r.jsxs)("li",{children:["Every risky local command, file write, external send, deploy, secret read → ",(0,r.jsx)("code",{children:"approval_requests"})," row."]}),(0,r.jsxs)("li",{children:["Row fields: ",(0,r.jsx)("code",{children:"action_type"}),", payload summary, ",(0,r.jsx)("code",{children:"risk"}),", ",(0,r.jsx)("code",{children:"requested_by"}),", ",(0,r.jsx)("code",{children:"ttl"}),", ",(0,r.jsx)("code",{children:"status"}),", input-signature binding."]}),(0,r.jsxs)("li",{children:["One-time consumed ",(0,r.jsx)("code",{children:"approval_id"})," — never replayable."]}),(0,r.jsx)("li",{children:"Hardline never-allowed list short-circuits before the approval gate."}),(0,r.jsxs)("li",{children:["Smart classifier may ",(0,r.jsx)("i",{children:"only"})," auto-approve ",(0,r.jsx)("code",{children:"low"}),"; ",(0,r.jsx)("code",{children:"irreversible_external"})," can never be auto-approved."]}),(0,r.jsxs)("li",{children:["Approvals via dashboard or WhatsApp; every decision lands in ",(0,r.jsx)("code",{children:"audit_logs"}),"."]}),(0,r.jsxs)("li",{children:["Heartbeat tasks paused in ",(0,r.jsx)("code",{children:"approval_required"})," status resume on consumption, with the original input signature."]})]})})]})]}),(0,r.jsx)("section",{className:"".concat(i.section," ").concat(i.single),children:(0,r.jsxs)("div",{className:i.panel,children:[(0,r.jsxs)("div",{className:i.panelTitle,children:[(0,r.jsx)("b",{children:"Recommended phases"}),(0,r.jsx)("small",{children:"delivery order"})]}),(0,r.jsx)("div",{className:i.roadmap,children:p.map(e=>(0,r.jsxs)("div",{className:i.phase,children:[(0,r.jsx)("b",{children:e.k}),(0,r.jsx)("span",{children:e.name}),(0,r.jsx)("ul",{children:e.bullets.map(e=>(0,r.jsx)("li",{children:e},e))})]},e.k))})]})})]}),(0,r.jsx)("section",{className:"".concat(i.section," ").concat(i.single),children:(0,r.jsxs)("div",{className:i.panel,children:[(0,r.jsxs)("div",{className:i.panelTitle,children:[(0,r.jsx)("b",{children:"Comparison matrix"}),(0,r.jsx)("small",{children:"Hermes \xb7 Paperclip \xb7 madarX"})]}),(0,r.jsx)("div",{style:{overflowX:"auto"},children:(0,r.jsxs)("table",{className:i.matrix,children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Capability"}),(0,r.jsx)("th",{children:"Hermes Agent"}),(0,r.jsx)("th",{children:"Paperclip"}),(0,r.jsxs)("th",{children:["madar",(0,r.jsx)("span",{className:i.mark,children:"X"})," OS"]})]})}),(0,r.jsx)("tbody",{children:h.map(e=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:e.k}),(0,r.jsx)("td",{children:e.hermes}),(0,r.jsx)("td",{children:e.paper}),(0,r.jsx)("td",{children:e.madarx})]},e.k))})]})})]})}),(0,r.jsx)("section",{className:"".concat(i.section," ").concat(i.single),children:(0,r.jsxs)("div",{className:i.panel,children:[(0,r.jsxs)("div",{className:i.panelTitle,children:[(0,r.jsx)("b",{children:"Source-file map"}),(0,r.jsx)("small",{children:"where the contracts live in this repo"})]}),(0,r.jsx)("div",{className:i.sourceList,children:c.map(e=>(0,r.jsxs)("button",{className:"".concat(i.sourceCard," ").concat(f===e.path?i.on:""),onClick:()=>k(e.path),children:[(0,r.jsx)("b",{children:e.name}),(0,r.jsx)("code",{children:e.path}),(0,r.jsx)("small",{children:e.note})]},e.path))})]})}),(0,r.jsx)("section",{className:"".concat(i.section," ").concat(i.single),children:(0,r.jsxs)("div",{className:i.panel,children:[(0,r.jsxs)("div",{className:i.panelTitle,children:[(0,r.jsx)("b",{children:"Mission simulator"}),(0,r.jsx)("small",{children:"type a goal — see tools, approvals, heartbeat, audit"})]}),(0,r.jsxs)("div",{className:i.simShell,children:[(0,r.jsxs)("div",{className:i.simInput,children:[(0,r.jsx)("p",{className:i.simHelp,children:"This runs locally in the browser. It pattern-matches your prompt against the marketplace tool surface, then walks the approval / allowlist / heartbeat path the runtime would take in the active trust mode."}),(0,r.jsx)("textarea",{value:N,onChange:e=>A(e.target.value),placeholder:"e.g. read scripts/whatsapp-daemon.mjs, open a PR with a fix, email me a summary"}),(0,r.jsxs)("div",{className:i.simRow,children:[(0,r.jsx)("button",{onClick:function(){let e=(function(e){let s=e.toLowerCase(),a=new Set;return/(read|inspect|look at|cat |list|find|grep)/.test(s)&&a.add("file_read"),/(directory|folder|tree|ls )/.test(s)&&a.add("directory_list"),/(search the web|google|look up|web ?search)/.test(s)&&a.add("web_search"),/(write|create file|save|edit|patch|append)/.test(s)&&a.add("file_write"),/patch|diff|modify line/.test(s)&&a.add("file_patch"),/(run|exec|shell|terminal|npm |node |git )/.test(s)&&a.add("terminal_run"),/comment on (the )?pr|github issue comment/.test(s)&&a.add("gh_issue_comment"),/(open|create) (a )?pr|pull request/.test(s)&&a.add("gh_pr_create"),/merge (the )?pr/.test(s)&&a.add("gh_pr_merge"),/(send|email|resend|notify .* via email)/.test(s)&&a.add("email_send"),/(insert|update) row|supabase update/.test(s)&&a.add("supabase_rest_update"),/(delete|drop) row|supabase delete/.test(s)&&a.add("supabase_rest_delete"),/run sql|select |raw sql/.test(s)&&a.add("supabase_sql"),0===a.size&&a.add("file_read"),d.filter(e=>a.has(e.id))})(N).map(e=>({tool:e,decision:g(e,y)})),s=e.filter(e=>"approval"===e.decision.decision).map(e=>e.tool),a=e.filter(e=>"execute"===e.decision.decision).map(e=>e.tool),r=0===s.length?[{status:"queued",desc:"one heartbeat_task per scheduled batch"},{status:"leased",desc:"worker claims with a lease"},{status:"running",desc:"adapter executing"},{status:"complete",desc:"final event recorded"}]:[{status:"queued",desc:"cron-daemon enqueues row"},{status:"leased",desc:"worker claims lease"},{status:"running",desc:"adapter starts"},{status:"approval_required",desc:"paused until approval consumed"},{status:"running",desc:"resumed by /api/approvals/[id]"},{status:"complete",desc:"after successful adapter call"}],t=e.flatMap(e=>{var s;return s=e.tool,"execute"===e.decision.decision?["main_agent.tool.".concat(s.id," → executed"),"tool_egress: 1 row (host derived by adapter)","tool_rate_limit_events: +1"]:["approval_requests: NEW row (action_type=main_agent_tool".concat("irreversible_external"===s.risk?"_irreversible":"",":").concat(s.id,")"),"audit_logs: main_agent.tool.approval_required","heartbeat_task: paused if scheduled (status=approval_required)"]});T({rows:e,approvals:s,executes:a,heartbeat:r,audit:t})},children:"Simulate mission"}),(0,r.jsx)("button",{className:i.secondary,onClick:()=>{A(""),T(null)},children:"Clear"}),(0,r.jsx)("button",{className:i.secondary,onClick:()=>A("Read lib/runtime.js, run npm test, then merge PR #42 in kareemodev777/madarx-os and email ak@madarx.io."),children:"Sample \xb7 risky mission"})]}),(0,r.jsxs)("p",{className:i.simHelp,children:["Active trust mode: ",(0,r.jsx)("code",{children:y})," \xb7 toggle modes in the madarX tab."]})]}),(0,r.jsx)("div",{className:i.simOut,children:S?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:i.simBlock,children:[(0,r.jsxs)("b",{children:["Tools selected (",S.rows.length,")"]}),(0,r.jsx)("ul",{children:S.rows.map(e=>(0,r.jsxs)("li",{children:[(0,r.jsx)("code",{children:e.tool.id})," \xb7 ",(0,r.jsx)("span",{className:i.scopeTag,children:e.tool.risk})," → ",(0,r.jsx)("b",{style:{color:"approval"===e.decision.decision?"#C2452A":"#0F0F11"},children:"approval"===e.decision.decision?"APPROVAL":"EXECUTE"}),(0,r.jsx)("div",{className:i.simHelp,children:e.decision.why})]},e.tool.id))})]}),(0,r.jsxs)("div",{className:i.simBlock,children:[(0,r.jsxs)("b",{children:["Approvals required (",S.approvals.length,")"]}),0===S.approvals.length?(0,r.jsxs)("p",{className:"empty",children:["None — all selected tools are auto-executing under ",(0,r.jsx)("code",{children:y}),"."]}):(0,r.jsx)("ul",{children:S.approvals.map(e=>(0,r.jsxs)("li",{children:[(0,r.jsxs)("code",{children:["main_agent_tool","irreversible_external"===e.risk?"_irreversible":"",":",e.id]})," \xb7 scope: ",(0,r.jsx)("span",{className:i.scopeTag,children:e.scope})]},e.id))})]}),(0,r.jsxs)("div",{className:i.simBlock,children:[(0,r.jsx)("b",{children:"Heartbeat queue trace"}),(0,r.jsx)("ul",{children:S.heartbeat.map((e,s)=>(0,r.jsxs)("li",{children:[(0,r.jsx)("code",{children:e.status})," — ",(0,r.jsx)("span",{className:i.scopeTag,children:e.desc})]},s))})]}),(0,r.jsxs)("div",{className:i.simBlock,children:[(0,r.jsx)("b",{children:"Audit events written"}),(0,r.jsx)("ul",{className:"audit",children:S.audit.map((e,s)=>(0,r.jsxs)("li",{children:[(0,r.jsx)("em",{children:"\xb7"})," ",e]},s))})]})]}):(0,r.jsxs)("div",{className:i.simBlock,children:[(0,r.jsx)("b",{children:"Output"}),(0,r.jsxs)("p",{className:"empty",children:["Press ",(0,r.jsx)("b",{children:"Simulate mission"})," to see the runtime decision trace."]})]})})]})]})}),(0,r.jsxs)("footer",{className:i.footer,children:[(0,r.jsxs)("span",{children:["madarX OS \xb7 architecture \xb7 ",new Date().toISOString().slice(0,10)]}),(0,r.jsxs)("span",{children:[(0,r.jsx)("a",{className:i.home,href:"/",style:{textDecoration:"none"},children:"← console"})," \xa0 ",(0,r.jsx)("a",{className:i.home,href:"/runtime",style:{textDecoration:"none"},children:"runtime diagnostics"})]})]})]})}},4294:(e,s,a)=>{Promise.resolve().then(a.bind(a,1034))},5063:e=>{e.exports={shell:"page_shell__1owo6",topbar:"page_topbar__RDAf_",lead:"page_lead__GO7nt",home:"page_home__CrsuB",hero:"page_hero__Uw3gV",meta:"page_meta__0oJc0",tabs:"page_tabs__zaoPA",on:"page_on__kz13k",section:"page_section__OHecK",single:"page_single__lo57t",panel:"page_panel___yDgb",dark:"page_dark__woyPh",panelTitle:"page_panelTitle__VU_9C",flat:"page_flat__p7a07",body:"page_body__INhrm",muted:"page_muted__jLyTo",kv:"page_kv__wdY2L",loop:"page_loop__G9Pis",loopStep:"page_loopStep__7MDLJ",loopExplain:"page_loopExplain__6Y2JV",simGrid:"page_simGrid__Xn1VU",toggles:"page_toggles__b4tMW",toggleRow:"page_toggleRow__UK7GD",riskTag:"page_riskTag__FEAUm",low:"page_low__F__wJ",medium:"page_medium__DVqkH",high:"page_high__vM9De",irrev:"page_irrev__wNgTy",scopeTag:"page_scopeTag__vLaK0",modeRow:"page_modeRow__9hs08",danger:"page_danger__uge2z",score:"page_score__o4nz_",scoreBig:"page_scoreBig___uIUw",scoreBar:"page_scoreBar__UE_JN",scoreList:"page_scoreList__DVN8l",matrix:"page_matrix__FYUGq",mark:"page_mark__bItqn",sourceList:"page_sourceList__shdcU",sourceCard:"page_sourceCard__3cBGo",simShell:"page_simShell__L4xDX",simInput:"page_simInput__rprg0",simHelp:"page_simHelp__mZr12",simRow:"page_simRow__gSDwz",secondary:"page_secondary__ukirh",simOut:"page_simOut__VIl8E",simBlock:"page_simBlock__wRnDM",empty:"page_empty__NK8OW",audit:"page_audit__wblhm",roadmap:"page_roadmap__cBPW7",phase:"page_phase__qBAaC",footer:"page_footer__Cf7et",callout:"page_callout__AlUn9"}}},e=>{e.O(0,[1776,8441,1255,7358],()=>e(e.s=4294)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6773],{677:(e,t,l)=>{"use strict";l.d(t,{default:()=>r});var s=l(5155),n=l(2115);function r(){let[e,t]=(0,n.useState)([]),[l,r]=(0,n.useState)("");return(0,n.useEffect)(()=>{r(localStorage.getItem("madarx.activeProjectId")||""),fetch("/api/projects").then(e=>e.json()).then(e=>t(e.projects||[])).catch(()=>{})},[]),(0,s.jsx)("div",{className:"project-switcher","data-project-switcher":!0,children:(0,s.jsxs)("select",{value:l,onChange:e=>{var t;r(t=e.target.value),t?localStorage.setItem("madarx.activeProjectId",t):localStorage.removeItem("madarx.activeProjectId"),window.dispatchEvent(new CustomEvent("madarx:project-change",{detail:{project_id:t||null}}))},"aria-label":"Active project",children:[(0,s.jsx)("option",{value:"",children:"All projects"}),e.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))]})})}},1471:(e,t,l)=>{Promise.resolve().then(l.bind(l,4999)),Promise.resolve().then(l.bind(l,677))},4999:(e,t,l)=>{"use strict";l.d(t,{default:()=>x});var s=l(5155),n=l(2115);let r=[{label:"1 hour",value:"1h"},{label:"1 day",value:"1d"},{label:"7 days",value:"7d"},{label:"30 days",value:"30d"}];function a(e){if(!e)return"";try{return new Date(e).toLocaleString()}catch(t){return String(e)}}function i(e){return null==e?"":e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(1)," KB"):"".concat((e/1048576).toFixed(1)," MB")}function d(){return(0,s.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})})}function c(e,t,l){let s=new Blob([t.map(e=>JSON.stringify(e.label)).join(",")+"\n"+e.map(e=>t.map(t=>{let l=t.get(e);return JSON.stringify(null==l?"":String(l))}).join(",")).join("\n")],{type:"text/csv"}),n=URL.createObjectURL(s),r=document.createElement("a");r.href=n,r.download=l,r.click(),URL.revokeObjectURL(n)}let o=[{label:"Time",get:e=>e.at},{label:"Type",get:e=>e.type},{label:"Summary",get:e=>e.summary},{label:"Status",get:e=>e.status},{label:"Meta",get:e=>e.meta}],h=[{label:"Time",get:e=>e.at},{label:"Tool",get:e=>e.tool_name},{label:"Agent",get:e=>e.agent_id},{label:"Host",get:e=>e.host},{label:"Method",get:e=>e.method},{label:"Status",get:e=>e.status_code},{label:"Bytes In",get:e=>e.bytes_in},{label:"Bytes Out",get:e=>e.bytes_out},{label:"ms",get:e=>e.duration_ms}];function x(){let[e,t]=(0,n.useState)(""),[l,x]=(0,n.useState)(""),[u,p]=(0,n.useState)("1d"),[j,m]=(0,n.useState)([]),[g,b]=(0,n.useState)([]),[f,y]=(0,n.useState)([]),[v,S]=(0,n.useState)(!0),[w,_]=(0,n.useState)(null),k=(0,n.useRef)(null);async function N(){try{var t,s,n;let r=await fetch(function(){let t=new URLSearchParams;t.set("limit","200"),e&&t.set("type",e),l&&t.set("agent_id",l);let s=function(e){if(!e)return null;let t=Date.now(),l={"1h":3600,"1d":86400,"7d":604800,"30d":2592e3}[e];return l?new Date(t-1e3*l).toISOString():null}(u);return s&&t.set("since",s),"/api/audit/list?".concat(t)}());if(!r.ok)throw Error("HTTP ".concat(r.status));let a=await r.json();b(null!=(s=a.audit)?s:[]),y(null!=(n=a.egress)?n:[]),(null==(t=a.types)?void 0:t.length)&&m(a.types),_(null)}catch(e){_(e.message)}finally{S(!1)}}return(0,n.useEffect)(()=>(S(!0),N(),k.current=setInterval(N,1e4),()=>clearInterval(k.current)),[e,l,u]),(0,s.jsxs)("div",{children:[(0,s.jsxs)("section",{className:"admin-panel",children:[(0,s.jsxs)("div",{className:"admin-panel-head",children:[(0,s.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,s.jsx)(d,{})," Live audit"]}),(0,s.jsx)("small",{children:"Auto-refreshes every 10 s. Showing up to 200 rows per table."})]}),(0,s.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:10,alignItems:"flex-end",marginBottom:14},children:[(0,s.jsxs)("label",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:11},children:[(0,s.jsx)("span",{style:{textTransform:"uppercase",letterSpacing:".08em",color:"#68707b"},children:"Type"}),(0,s.jsxs)("select",{value:e,onChange:e=>t(e.target.value),style:{fontSize:12.5,padding:"5px 8px",borderRadius:8,border:"1px solid rgba(17,19,24,.12)",background:"#fff"},children:[(0,s.jsx)("option",{value:"",children:"All"}),j.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]})]}),(0,s.jsxs)("label",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:11},children:[(0,s.jsx)("span",{style:{textTransform:"uppercase",letterSpacing:".08em",color:"#68707b"},children:"Agent ID"}),(0,s.jsx)("input",{type:"text",value:l,onChange:e=>x(e.target.value),placeholder:"any",style:{fontSize:12.5,padding:"5px 8px",borderRadius:8,border:"1px solid rgba(17,19,24,.12)",width:160}})]}),(0,s.jsxs)("label",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:11},children:[(0,s.jsx)("span",{style:{textTransform:"uppercase",letterSpacing:".08em",color:"#68707b"},children:"Since"}),(0,s.jsxs)("select",{value:u,onChange:e=>p(e.target.value),style:{fontSize:12.5,padding:"5px 8px",borderRadius:8,border:"1px solid rgba(17,19,24,.12)",background:"#fff"},children:[(0,s.jsx)("option",{value:"",children:"All time"}),r.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))]})]}),(0,s.jsx)("button",{onClick:()=>{S(!0),N()},style:{fontSize:12.5,padding:"6px 14px",borderRadius:8,border:"1px solid rgba(17,19,24,.12)",background:"#fff",cursor:"pointer",alignSelf:"flex-end"},children:"Refresh"})]}),w?(0,s.jsxs)("p",{style:{color:"#c0392b",fontSize:13},children:["Error: ",w]}):null,v?(0,s.jsx)("p",{style:{fontSize:13,color:"#68707b"},children:"Loading…"}):null]}),(0,s.jsxs)("section",{className:"admin-panel",children:[(0,s.jsxs)("div",{className:"admin-panel-head",children:[(0,s.jsx)("span",{children:"Audit log"}),(0,s.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,s.jsxs)("small",{children:[g.length," rows"]}),(0,s.jsx)("button",{onClick:()=>c(g,o,"audit-log.csv"),style:{fontSize:11,padding:"4px 10px",borderRadius:7,border:"1px solid rgba(17,19,24,.12)",background:"#fff",cursor:"pointer"},children:"Export CSV"})]})]}),(0,s.jsx)("div",{className:"admin-table-wrap",children:(0,s.jsxs)("table",{className:"admin-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Time"}),(0,s.jsx)("th",{children:"Type"}),(0,s.jsx)("th",{children:"Summary"}),(0,s.jsx)("th",{children:"Status"}),(0,s.jsx)("th",{children:"Details"})]})}),(0,s.jsx)("tbody",{children:0!==g.length||v?g.map(e=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:(0,s.jsx)("small",{children:a(e.at)})}),(0,s.jsx)("td",{children:(0,s.jsx)("code",{style:{fontSize:11},children:e.type})}),(0,s.jsx)("td",{children:e.summary}),(0,s.jsx)("td",{children:e.status}),(0,s.jsx)("td",{children:e.meta?(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{style:{cursor:"pointer",fontSize:11,color:"#68707b"},children:"view"}),(0,s.jsx)("pre",{style:{fontSize:10.5,marginTop:6,whiteSpace:"pre-wrap",wordBreak:"break-all",maxWidth:360},children:(()=>{try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch(t){return e.meta}})()})]}):null})]},e.id)):(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:5,style:{color:"#68707b",textAlign:"center",padding:20},children:"No audit records"})})})]})})]}),(0,s.jsxs)("section",{className:"admin-panel",children:[(0,s.jsxs)("div",{className:"admin-panel-head",children:[(0,s.jsx)("span",{children:"External egress"}),(0,s.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,s.jsxs)("small",{children:[f.length," rows"]}),(0,s.jsx)("button",{onClick:()=>c(f,h,"tool-egress.csv"),style:{fontSize:11,padding:"4px 10px",borderRadius:7,border:"1px solid rgba(17,19,24,.12)",background:"#fff",cursor:"pointer"},children:"Export CSV"})]})]}),(0,s.jsx)("div",{className:"admin-table-wrap",children:(0,s.jsxs)("table",{className:"admin-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Time"}),(0,s.jsx)("th",{children:"Tool"}),(0,s.jsx)("th",{children:"Agent"}),(0,s.jsx)("th",{children:"Host"}),(0,s.jsx)("th",{children:"Method"}),(0,s.jsx)("th",{children:"Status"}),(0,s.jsx)("th",{children:"Bytes in"}),(0,s.jsx)("th",{children:"Bytes out"}),(0,s.jsx)("th",{children:"ms"})]})}),(0,s.jsx)("tbody",{children:0!==f.length||v?f.map(e=>{var t,l;return(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:(0,s.jsx)("small",{children:a(e.at)})}),(0,s.jsx)("td",{children:(0,s.jsx)("code",{style:{fontSize:11},children:e.tool_name})}),(0,s.jsx)("td",{children:(0,s.jsx)("small",{children:null!=(t=e.agent_id)?t:"—"})}),(0,s.jsx)("td",{children:(0,s.jsx)("small",{children:e.host})}),(0,s.jsx)("td",{children:(0,s.jsx)("code",{style:{fontSize:11},children:e.method})}),(0,s.jsx)("td",{children:(0,s.jsx)("span",{style:{color:e.status_code>=400?"#c0392b":e.status_code>=200?"#27ae60":"#68707b"},children:null!=(l=e.status_code)?l:"—"})}),(0,s.jsx)("td",{children:(0,s.jsx)("small",{children:i(e.bytes_in)})}),(0,s.jsx)("td",{children:(0,s.jsx)("small",{children:i(e.bytes_out)})}),(0,s.jsx)("td",{children:(0,s.jsx)("small",{children:null!=e.duration_ms?"".concat(e.duration_ms):"—"})})]},e.id)}):(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:9,style:{color:"#68707b",textAlign:"center",padding:20},children:"No egress records"})})})]})})]})]})}}},e=>{e.O(0,[8441,1255,7358],()=>e(e.s=1471)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[64,72,167,178,232,332,489,497,552,658,723,767,769,796,870,888,939,972,1053,1115,1177,1426,1523,1557,1562,1581,1672,1851,1990,2008,2139,2153,2162,2164,2175,2254,2334,2343,2433,2635,2640,2711,2726,2748,2837,2873,2943,3033,3076,3159,3190,3203,3395,3437,3465,3492,3499,3554,3558,3577,3629,3630,3641,3659,3745,3756,3802,3839,3870,3886,3904,3905,3942,3975,3976,4094,4095,4104,4115,4190,4204,4209,4218,4229,4231,4269,4373,4410,4431,4475,4507,4519,4530,4537,4662,4721,4819,4890,4999,5049,5085,5092,5098,5118,5120,5130,5169,5180,5207,5223,5289,5324,5331,5441,5520,5551,5588,5610,5689,5707,5722,5743,5794,5810,5850,5887,5903,5906,6002,6079,6113,6147,6186,6234,6278,6279,6341,6365,6403,6456,6496,6591,6595,6621,6667,6701,6725,6779,6799,6816,6862,7020,7060,7070,7092,7113,7237,7276,7324,7361,7440,7750,7765,7795,7823,7903,7920,7986,8059,8093,8100,8159,8227,8252,8273,8298,8312,8397,8401,8405,8578,8591,8665,8679,8732,8765,8828,8887,8907,8994,9e3,9037,9040,9154,9160,9183,9413,9442,9504,9554,9628,9873],{4441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1553,2141,2494,2866,5022,6605,7423,7916,8580,8601,9840,9975],{677:(e,t,a)=>{"use strict";a.d(t,{default:()=>o});var c=a(5155),r=a(2115);function o(){let[e,t]=(0,r.useState)([]),[a,o]=(0,r.useState)("");return(0,r.useEffect)(()=>{o(localStorage.getItem("madarx.activeProjectId")||""),fetch("/api/projects").then(e=>e.json()).then(e=>t(e.projects||[])).catch(()=>{})},[]),(0,c.jsx)("div",{className:"project-switcher","data-project-switcher":!0,children:(0,c.jsxs)("select",{value:a,onChange:e=>{var t;o(t=e.target.value),t?localStorage.setItem("madarx.activeProjectId",t):localStorage.removeItem("madarx.activeProjectId"),window.dispatchEvent(new CustomEvent("madarx:project-change",{detail:{project_id:t||null}}))},"aria-label":"Active project",children:[(0,c.jsx)("option",{value:"",children:"All projects"}),e.map(e=>(0,c.jsx)("option",{value:e.id,children:e.name},e.id))]})})}},6146:(e,t,a)=>{Promise.resolve().then(a.bind(a,677))}},e=>{e.O(0,[8441,1255,7358],()=>e(e.s=6146)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[64,72,167,178,232,332,489,497,552,658,723,767,769,796,870,888,939,972,1053,1115,1177,1426,1523,1557,1562,1581,1672,1851,1990,2008,2139,2153,2162,2164,2175,2254,2334,2343,2433,2635,2640,2711,2726,2748,2837,2873,2943,3033,3076,3159,3190,3203,3395,3437,3465,3492,3499,3554,3558,3577,3629,3630,3641,3659,3745,3756,3802,3839,3870,3886,3904,3905,3942,3975,3976,4094,4095,4104,4115,4190,4204,4209,4218,4229,4231,4269,4373,4410,4431,4475,4507,4519,4530,4537,4662,4721,4819,4890,4999,5049,5085,5092,5098,5118,5120,5130,5169,5180,5207,5223,5289,5324,5331,5441,5520,5551,5588,5610,5689,5707,5722,5743,5794,5810,5850,5887,5903,5906,6002,6079,6113,6147,6186,6234,6278,6279,6341,6365,6403,6456,6496,6591,6595,6621,6667,6701,6725,6779,6799,6816,6862,7020,7060,7070,7092,7113,7237,7276,7324,7361,7440,7750,7765,7795,7823,7903,7920,7986,8059,8093,8100,8159,8227,8252,8273,8298,8312,8397,8401,8405,8578,8591,8665,8679,8732,8765,8828,8887,8907,8994,9e3,9037,9040,9154,9160,9183,9413,9442,9504,9554,9628,9873],{4441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9700],{3474:(e,s,_)=>{Promise.resolve().then(_.bind(_,566))}},e=>{e.O(0,[566,8441,1255,7358],()=>e(e.s=3474)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[64,72,167,178,232,332,489,497,552,658,723,767,769,796,870,888,939,972,1053,1115,1177,1426,1523,1557,1562,1581,1672,1851,1990,2008,2139,2153,2162,2164,2175,2254,2334,2343,2433,2635,2640,2711,2726,2748,2837,2873,2943,3033,3076,3159,3190,3203,3395,3437,3465,3492,3499,3554,3558,3577,3629,3630,3641,3659,3745,3756,3802,3839,3870,3886,3904,3905,3942,3975,3976,4094,4095,4104,4115,4190,4204,4209,4218,4229,4231,4269,4373,4410,4431,4475,4507,4519,4530,4537,4662,4721,4819,4890,4999,5049,5085,5092,5098,5118,5120,5130,5169,5180,5207,5223,5289,5324,5331,5441,5520,5551,5588,5610,5689,5707,5722,5743,5794,5810,5850,5887,5903,5906,6002,6079,6113,6147,6186,6234,6278,6279,6341,6365,6403,6456,6496,6591,6595,6621,6667,6701,6725,6779,6799,6816,6862,7020,7060,7070,7092,7113,7237,7276,7324,7361,7440,7750,7765,7795,7823,7903,7920,7986,8059,8093,8100,8159,8227,8252,8273,8298,8312,8397,8401,8405,8578,8591,8665,8679,8732,8765,8828,8887,8907,8994,9e3,9037,9040,9154,9160,9183,9413,9442,9504,9554,9628,9873],{4441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8650],{45:(e,t,a)=>{"use strict";a.d(t,{default:()=>o});var l=a(2115),s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},n=a(4250);let r=(0,l.createContext)({}),o=(0,l.forwardRef)((e,t)=>{var a,o,i;let{color:c,size:d,strokeWidth:u,absoluteStrokeWidth:m,className:h="",children:p,iconNode:f,...j}=e,{size:g=24,strokeWidth:x=2,absoluteStrokeWidth:v=!1,color:w="currentColor",className:b=""}=null!=(a=(0,l.useContext)(r))?a:{},k=(null!=m?m:v)?24*Number(null!=u?u:x)/Number(null!=d?d:g):null!=u?u:x;return(0,l.createElement)("svg",{ref:t,...s,width:null!=(o=null!=d?d:g)?o:s.width,height:null!=(i=null!=d?d:g)?i:s.height,stroke:null!=c?c:w,strokeWidth:k,className:(0,n.z)("lucide",b,h),...!p&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(j)&&{"aria-hidden":"true"},...j},[...f.map(e=>{let[t,a]=e;return(0,l.createElement)(t,a)}),...Array.isArray(p)?p:[p]])})},398:(e,t,a)=>{Promise.resolve().then(a.bind(a,677)),Promise.resolve().then(a.bind(a,2176))},677:(e,t,a)=>{"use strict";a.d(t,{default:()=>n});var l=a(5155),s=a(2115);function n(){let[e,t]=(0,s.useState)([]),[a,n]=(0,s.useState)("");return(0,s.useEffect)(()=>{n(localStorage.getItem("madarx.activeProjectId")||""),fetch("/api/projects").then(e=>e.json()).then(e=>t(e.projects||[])).catch(()=>{})},[]),(0,l.jsx)("div",{className:"project-switcher","data-project-switcher":!0,children:(0,l.jsxs)("select",{value:a,onChange:e=>{var t;n(t=e.target.value),t?localStorage.setItem("madarx.activeProjectId",t):localStorage.removeItem("madarx.activeProjectId"),window.dispatchEvent(new CustomEvent("madarx:project-change",{detail:{project_id:t||null}}))},"aria-label":"Active project",children:[(0,l.jsx)("option",{value:"",children:"All projects"}),e.map(e=>(0,l.jsx)("option",{value:e.id,children:e.name},e.id))]})})}},2176:(e,t,a)=>{"use strict";a.d(t,{default:()=>r});var l=a(5155),s=a(2115),n=a(5649);function r(e){let{projectId:t}=e,[a,r]=s.useState(!1);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("button",{type:"button",className:"admin-button agents-new-cta",onClick:()=>r(!0),children:[(0,l.jsx)("span",{"aria-hidden":!0,className:"agents-new-cta-glyph",children:"+"}),"Upload files"]}),(0,l.jsx)(n.A,{open:a,onClose:()=>r(!1),eyebrow:"Upload",title:"Add files to Disk",children:(0,l.jsxs)("form",{className:"agents-modal-form",action:"/api/disk/files",method:"post",encType:"multipart/form-data",children:[(0,l.jsx)("input",{type:"hidden",name:"project_id",value:t}),(0,l.jsxs)("section",{className:"agents-modal-section",children:[(0,l.jsxs)("label",{className:"agents-modal-field wide",children:[(0,l.jsx)("span",{children:"Files"}),(0,l.jsx)("input",{type:"file",name:"files",multiple:!0,required:!0,"aria-label":"Choose files"})]}),(0,l.jsxs)("label",{className:"agents-modal-field wide agents-modal-check",children:[(0,l.jsx)("input",{type:"checkbox",name:"local_only",value:"true"}),(0,l.jsx)("span",{children:"Keep local only \xb7 redacted from cloud engines"})]})]}),(0,l.jsx)("p",{className:"agents-modal-help",children:"Local-only files are redacted from cloud engines and stay on this machine."}),(0,l.jsxs)("footer",{className:"agents-modal-foot",children:[(0,l.jsx)("button",{type:"button",className:"admin-button secondary",onClick:()=>r(!1),children:"Cancel"}),(0,l.jsx)("button",{type:"submit",className:"admin-button",children:"Upload"})]})]})})]})}},3185:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var l=a(2115),s=a(4250);let n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,a)=>a?a.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var r=a(45);let o=(e,t)=>{let a=(0,l.forwardRef)((a,o)=>{let{className:i,...c}=a;return(0,l.createElement)(r.default,{ref:o,iconNode:t,className:(0,s.z)("lucide-".concat(n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),i),...c})});return a.displayName=n(e),a}},4250:(e,t,a)=>{"use strict";a.d(t,{z:()=>l});let l=function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.filter((e,t,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===t).join(" ").trim()}},4788:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=(0,a(3185).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},5649:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var l=a(5155),s=a(2115),n=a(4788);function r(e){let{open:t,onClose:a,eyebrow:r,title:o,tone:i="default",size:c="default",children:d}=e,u=s.useRef(null);return s.useEffect(()=>{let e=u.current;e&&(t&&!e.open&&("function"==typeof e.showModal?e.showModal():e.setAttribute("open","")),!t&&e.open&&e.close())},[t]),s.useEffect(()=>{let e=u.current;if(!e)return;let t=e=>{e.preventDefault(),a()};return e.addEventListener("cancel",t),()=>e.removeEventListener("cancel",t)},[a]),(0,l.jsx)("dialog",{ref:u,className:"agents-modal".concat("wide"===c?" agents-modal--wide":""),onClick:e=>{e.target===u.current&&a()},children:t?(0,l.jsxs)("div",{className:"agents-modal-card".concat("danger"===i?" agents-modal-card--danger":""),onClick:e=>e.stopPropagation(),children:[(0,l.jsxs)("header",{className:"agents-modal-head",children:[(0,l.jsxs)("div",{children:[r?(0,l.jsx)("span",{className:"admin-kicker",children:r}):null,(0,l.jsx)("h2",{children:o})]}),(0,l.jsx)("button",{type:"button",className:"agents-modal-close",onClick:a,"aria-label":"Close",children:(0,l.jsx)(n.A,{size:14})})]}),d]}):null})}}},e=>{e.O(0,[8441,1255,7358],()=>e(e.s=398)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[64,72,167,178,232,332,489,497,552,658,723,767,769,796,870,888,939,972,1053,1115,1177,1426,1523,1557,1562,1581,1672,1851,1990,2008,2139,2153,2162,2164,2175,2254,2334,2343,2433,2635,2640,2711,2726,2748,2837,2873,2943,3033,3076,3159,3190,3203,3395,3437,3465,3492,3499,3554,3558,3577,3629,3630,3641,3659,3745,3756,3802,3839,3870,3886,3904,3905,3942,3975,3976,4094,4095,4104,4115,4190,4204,4209,4218,4229,4231,4269,4373,4410,4431,4475,4507,4519,4530,4537,4662,4721,4819,4890,4999,5049,5085,5092,5098,5118,5120,5130,5169,5180,5207,5223,5289,5324,5331,5441,5520,5551,5588,5610,5689,5707,5722,5743,5794,5810,5850,5887,5903,5906,6002,6079,6113,6147,6186,6234,6278,6279,6341,6365,6403,6456,6496,6591,6595,6621,6667,6701,6725,6779,6799,6816,6862,7020,7060,7070,7092,7113,7237,7276,7324,7361,7440,7750,7765,7795,7823,7903,7920,7986,8059,8093,8100,8159,8227,8252,8273,8298,8312,8397,8401,8405,8578,8591,8665,8679,8732,8765,8828,8887,8907,8994,9e3,9037,9040,9154,9160,9183,9413,9442,9504,9554,9628,9873],{4441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7886],{3456:(e,a,s)=>{Promise.resolve().then(s.bind(s,6040))},4621:e=>{e.exports={shell:"page_shell__9fEmD",topbar:"page_topbar__ozWV6",lead:"page_lead__IhCQC",links:"page_links__JBJ_s",panelTitle:"page_panelTitle__7ja0A",meta:"page_meta__ZCWfY",orgGrid:"page_orgGrid__AFZmb",kv:"page_kv__uho5Q",step:"page_step__NoAPJ",result:"page_result__vmife",matrix:"page_matrix__zJm6P",warStatus:"page_warStatus__aNDMd",eyebrow:"page_eyebrow__xLT2n",decision:"page_decision__nGS8X",hero:"page_hero__xX4so",panel:"page_panel___kSry",warCard:"page_warCard__awg_D",modeStrip:"page_modeStrip__fg06v",agentList:"page_agentList__z0NGt",chips:"page_chips__zN0Oa",on:"page_on__f3_dB",section:"page_section__OCI88",single:"page_single__6t3Ph",dark:"page_dark__pWzW1",bigClaim:"page_bigClaim__voOHp",resultMeta:"page_resultMeta__dICvo",archLayers:"page_archLayers__94Rx3",steps:"page_steps__YuSEM",warGrid:"page_warGrid__tfCp1",deptCard:"page_deptCard__Xfeud",simGrid:"page_simGrid__6hrs_",flowGrid:"page_flowGrid__ZtdjH",controls:"page_controls__Xyv1J",range:"page_range__99hwr",perfGrid:"page_perfGrid__Ppzgl",metric:"page_metric__98nqH",matrixWrap:"page_matrixWrap__QbaGx",active:"page_active__1_1ZF",footer:"page_footer__g1R86"}},6040:(e,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>x});var r=s(5155),n=s(2115),t=s(4621);let i=[{id:"solo",label:"Solo assistant",claim:"One operator, one agent loop, direct tool access with approval prompts.",pieces:["personal session","private memory","local tools","cron jobs"]},{id:"department",label:"Department team",claim:"Every department owns a manager agent, specialist agents, tools, memory, queue, budget, and approval policy.",pieces:["department namespace","manager agent","specialists","shared queue"]},{id:"federated",label:"Federated organization",claim:"Departments collaborate through a broker, policy engine, approvals, events, and audit trails — not uncontrolled agent-to-agent calls.",pieces:["request broker","policy engine","event bus","approval ledger"]}],l=[{id:"marketing",name:"Marketing",manager:"Growth Manager Agent",agents:["Campaign Strategist","Competitor Scout","Content Calendar","Paid Ads Optimizer"],tools:["web_search","brand_assets","email_send"],memory:"campaigns \xb7 audience \xb7 channels",queue:14,approval:"Budget + external sends"},{id:"finance",name:"Finance",manager:"Finance Controller Agent",agents:["Budget Analyst","Revenue Reporter","Forecast Agent","Approval Controller"],tools:["supabase_read","sheet_export","finance_api"],memory:"budgets \xb7 revenue \xb7 forecasts",queue:8,approval:"Restricted financial data"},{id:"legal",name:"Legal",manager:"Legal Risk Agent",agents:["Contract Reviewer","Compliance Agent","Policy Drafter"],tools:["document_review","redline","email_send"],memory:"contracts \xb7 policies \xb7 obligations",queue:6,approval:"All legal opinions"},{id:"sales",name:"Sales",manager:"Pipeline Manager Agent",agents:["Lead Researcher","CRM Updater","Proposal Agent"],tools:["crm_read","gh_issue_comment","email_send"],memory:"accounts \xb7 deals \xb7 contacts",queue:19,approval:"Customer-facing writes"},{id:"ops",name:"Operations",manager:"Ops Coordinator Agent",agents:["Vendor Agent","Logistics Agent","Process Monitor"],tools:["terminal_run","web_fetch","calendar"],memory:"vendors \xb7 SOPs \xb7 incidents",queue:11,approval:"Vendor commitments"},{id:"engineering",name:"Engineering",manager:"Engineering Lead Agent",agents:["Bug Triage","Claude Code Runner","Codex Reviewer","Release Watcher"],tools:["terminal_run","github","vercel"],memory:"repos \xb7 incidents \xb7 deploys",queue:22,approval:"Deploys + destructive commands"}],d=[{id:"read",label:"Read summary",baseRisk:"low"},{id:"confidential",label:"Confidential data",baseRisk:"high"},{id:"write",label:"Write/update",baseRisk:"medium"},{id:"external",label:"External send",baseRisk:"irreversible_external"},{id:"exec",label:"Tool execution",baseRisk:"high"}],o=[{id:"employee",label:"Employee"},{id:"dept_head",label:"Department head"},{id:"ceo",label:"CEO"},{id:"contractor",label:"Contractor"}],c=[{id:"public",label:"Public / approved",weight:0},{id:"internal",label:"Internal",weight:1},{id:"confidential",label:"Confidential",weight:2},{id:"restricted",label:"Restricted",weight:3}],p=[["01","Request created","Source agent submits intent, business reason, target department, requested fields, sensitivity, and urgency."],["02","Broker normalizes","Request Broker attaches tenant_id, department_id, actor_id, task_id, correlation_id, and target queue."],["03","RBAC + policy","Policy engine checks role, department, data owner, scope, risk tier, rate limits, and active approvals."],["04","Approval decision","Low-risk can auto-approve by policy; sensitive finance/legal/customer/tool actions pause for manager approval."],["05","Target agent executes","Target department manager assigns a specialist agent with scoped memory and tool permissions."],["06","Result returned","Only approved fields or artifact links are returned. Raw restricted data can stay inside the owning department."],["07","Audit + replay","activity_log, audit_logs, approval_requests, tool_egress, and task events preserve the full chain."]],m=[{k:"Primary shape",hermes:"Personal runtime for one operator/session.",paper:"Company/work control plane and artifacts.",madarx:"Federated AI workforce: employees, departments, agents, approvals, tools, queues, audit."},{k:"Department ownership",hermes:"Not modeled as departments by default.",paper:"Can model org work, but runtime is external.",madarx:"Each department owns agents, memory namespace, tools, queue, policies and approval manager."},{k:"Cross-team work",hermes:"delegate_task spawns subagents, not company-governed departments.",paper:"Tasks/governance exist, but not necessarily local execution.",madarx:"Brokered cross-department requests with RBAC, policy, manager approval and audit lineage."},{k:"Approval strength",hermes:"Strong command approvals for personal execution.",paper:"Governance workflows in control plane.",madarx:"Approval-first at company boundary: cross-department data, tool scopes, external sends, deploys, finance/legal restrictions."},{k:"Execution engines",hermes:"Hermes itself runs tools and providers.",paper:"Adapters phone home; plane can stay separate.",madarx:"Claude Code, Codex, Hermes, Anthropic, Ollama and future MCP tools behind a single governance layer."},{k:"Scalability path",hermes:"Great single-user/gateway scale.",paper:"Org data model scale.",madarx:"Department queues, worker pools, event bus, policy cache, memory scopes, audit partitions, multi-tenant cloud path."},{k:"Business moat",hermes:"Operator productivity.",paper:"Structured autonomous company records.",madarx:"Accountable AI labor market inside the company: everyone gets agents, and agents can collaborate safely."}],h=[{dept:"Marketing",action:"Campaign Strategist drafts real estate launch brief and asks Finance for available spend.",status:"request.created"},{dept:"Broker",action:"Request Broker sees cross-department finance data and sends to Finance queue.",status:"policy.check"},{dept:"Finance",action:"Finance Controller allows summarized campaign budget but blocks raw revenue exports.",status:"approval.required"},{dept:"Legal",action:"Legal Risk Agent reviews campaign claims before external publication.",status:"parallel.review"},{dept:"Sales",action:"Sales Proposal Agent prepares lead segment after Marketing and Finance approval.",status:"queued"},{dept:"Ops",action:"Caretaker schedules WhatsApp/email outreach only after final human approval.",status:"ready"},{dept:"Executive",action:"CEO Briefing Agent receives audited summary with every handoff and approval linked.",status:"complete"}],u=[["People + departments","employees \xb7 department heads \xb7 executives \xb7 contractors"],["Department tenancy","tenant_id \xb7 department_id \xb7 workspace_id \xb7 memory namespace \xb7 budget profile"],["Governance plane","RBAC \xb7 policies \xb7 approval rules \xb7 rate limits \xb7 audit rules"],["Coordination plane","request broker \xb7 task router \xb7 event bus \xb7 queues \xb7 heartbeat worker"],["Intelligence plane","manager agents \xb7 specialist agents \xb7 Hermes \xb7 Claude Code \xb7 Codex \xb7 Ollama"],["Data + tools","SQLite/Postgres-ready store \xb7 vector memory \xb7 files \xb7 GitHub \xb7 Supabase \xb7 email \xb7 terminal"]];function g(e){var a;return null!=(a=({low:0,medium:1,high:2,irreversible_external:3})[e])?a:0}function x(){var e;let[a,s]=(0,n.useState)("federated"),[x,j]=(0,n.useState)("finance"),[v,_]=(0,n.useState)("employee"),[b,y]=(0,n.useState)("marketing"),[f,k]=(0,n.useState)("finance"),[w,N]=(0,n.useState)("employee"),[C,q]=(0,n.useState)("confidential"),[S,A]=(0,n.useState)("confidential"),[R,T]=(0,n.useState)("approval_required"),[O,P]=(0,n.useState)(2),[G,L]=(0,n.useState)(1e3),[M,D]=(0,n.useState)(16),E=l.find(e=>e.id===x),B=i.find(e=>e.id===a),F=(0,n.useMemo)(()=>(function(e){var a;let{source:s,target:r,role:n,requestType:t,sensitivity:i,trustMode:o}=e,p=s!==r,m=d.find(e=>e.id===t),h=c.find(e=>e.id===i),u=m.baseRisk;h.weight>=2&&2>g(u)&&(u="high"),"external"===t&&(u="irreversible_external");let x="allow",j=[];p&&j.push("cross-department boundary"),h.weight>=2&&j.push("".concat(h.label.toLowerCase()," sensitivity")),"contractor"===n&&j.push("contractor role cannot directly access internal department data"),"irreversible_external"===u&&j.push("irreversible external action");let v="approval-required"===(x="ceo"===n&&"irreversible_external"!==u&&"restricted"!==i?"auto-approved":"contractor"===n&&(p||h.weight>=1)?"denied":"irreversible_external"===u||"manual"===o&&"low"!==u?"approval-required":"auto"===o&&"high"!==u?"auto-approved":p||g(u)>=2?"approval-required":"auto-approved")?"".concat((null==(a=l.find(e=>e.id===r))?void 0:a.name)||r," manager"):"denied"===x?"none":"policy engine";return{decision:x,risk:u,reasons:j,approver:v,crossDept:p}})({source:b,target:f,role:w,requestType:C,sensitivity:S,trustMode:R}),[b,f,w,C,S,R]),I=(0,n.useMemo)(()=>{let e=90*M,a=Math.max(1,Math.round(G/e*12)),s=Math.min(99,Math.round(G/e*100));return{capacity:e,wait:a,util:s,audit:Math.round(5.4*G),queues:Math.ceil(G/Math.max(1,250*M))}},[G,M]);return(0,r.jsxs)("main",{className:t.shell,children:[(0,r.jsxs)("div",{className:t.topbar,children:[(0,r.jsxs)("div",{className:t.lead,children:[(0,r.jsx)("em",{children:"document \xb7 004 \xb7 federation"}),(0,r.jsxs)("b",{children:["madar",(0,r.jsx)("i",{children:"X"})," OS \xb7 company agent network"]})]}),(0,r.jsxs)("div",{className:t.links,children:[(0,r.jsx)("a",{href:"/architecture",children:"architecture atlas"}),(0,r.jsx)("a",{href:"/",children:"console"})]})]}),(0,r.jsxs)("header",{className:t.hero,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:t.eyebrow,children:"AI generates. Humans approve. Departments collaborate."}),(0,r.jsx)("h1",{children:"From one AI assistant to a governed company-wide AI workforce."}),(0,r.jsx)("p",{children:"madarX OS can become the operating layer where every employee and every department has its own team of agents — while cross-department work moves through policies, approvals, queues, memory boundaries, and audit trails."})]}),(0,r.jsxs)("aside",{className:t.meta,children:[(0,r.jsx)("b",{children:"strategic advantage"}),(0,r.jsxs)("dl",{children:[(0,r.jsx)("dt",{children:"vs Hermes"}),(0,r.jsx)("dd",{children:"not only personal execution — institutional coordination"}),(0,r.jsx)("dt",{children:"vs Paperclip"}),(0,r.jsx)("dd",{children:"not only control-plane records — real governed runtime"}),(0,r.jsx)("dt",{children:"core moat"}),(0,r.jsx)("dd",{children:"federated agent teams with approval-first collaboration"}),(0,r.jsx)("dt",{children:"scale path"}),(0,r.jsx)("dd",{children:"local-first → team deployment → enterprise network"})]})]})]}),(0,r.jsx)("section",{className:t.modeStrip,children:i.map(e=>(0,r.jsxs)("button",{className:a===e.id?t.on:"",onClick:()=>s(e.id),children:[(0,r.jsx)("b",{children:e.label}),(0,r.jsx)("span",{children:e.claim})]},e.id))}),(0,r.jsxs)("section",{className:t.section,children:[(0,r.jsxs)("div",{className:t.panel,children:[(0,r.jsxs)("div",{className:t.panelTitle,children:[(0,r.jsx)("b",{children:"Current operating model"}),(0,r.jsx)("small",{children:B.label})]}),(0,r.jsx)("p",{className:t.bigClaim,children:B.claim}),(0,r.jsx)("div",{className:t.chips,children:B.pieces.map(e=>(0,r.jsx)("span",{children:e},e))})]}),(0,r.jsxs)("div",{className:"".concat(t.panel," ").concat(t.dark),children:[(0,r.jsxs)("div",{className:t.panelTitle,children:[(0,r.jsx)("b",{children:"One-line product claim"}),(0,r.jsx)("small",{children:"positioning"})]}),(0,r.jsx)("p",{children:"madarX OS turns individual AI agents into an approval-first, audit-friendly operating system for entire companies."})]})]}),(0,r.jsxs)("section",{className:t.section,children:[(0,r.jsxs)("div",{className:t.panel,children:[(0,r.jsxs)("div",{className:t.panelTitle,children:[(0,r.jsx)("b",{children:"Department agent network"}),(0,r.jsx)("small",{children:"click a department"})]}),(0,r.jsx)("div",{className:t.orgGrid,children:l.map(e=>(0,r.jsxs)("button",{className:x===e.id?t.on:"",onClick:()=>j(e.id),children:[(0,r.jsx)("b",{children:e.name}),(0,r.jsx)("small",{children:e.manager}),(0,r.jsxs)("em",{children:[e.queue," queued tasks"]})]},e.id))})]}),(0,r.jsxs)("div",{className:"".concat(t.panel," ").concat(t.deptCard),children:[(0,r.jsxs)("div",{className:t.panelTitle,children:[(0,r.jsx)("b",{children:E.name}),(0,r.jsx)("small",{children:"department tenant"})]}),(0,r.jsxs)("dl",{className:t.kv,children:[(0,r.jsx)("dt",{children:"manager"}),(0,r.jsx)("dd",{children:E.manager}),(0,r.jsx)("dt",{children:"memory"}),(0,r.jsx)("dd",{children:E.memory}),(0,r.jsx)("dt",{children:"tools"}),(0,r.jsx)("dd",{children:E.tools.join(" \xb7 ")}),(0,r.jsx)("dt",{children:"approval"}),(0,r.jsx)("dd",{children:E.approval})]}),(0,r.jsx)("div",{className:t.agentList,children:E.agents.map(e=>(0,r.jsx)("span",{children:e},e))})]})]}),(0,r.jsx)("section",{className:"".concat(t.section," ").concat(t.single),children:(0,r.jsxs)("div",{className:t.panel,children:[(0,r.jsxs)("div",{className:t.panelTitle,children:[(0,r.jsx)("b",{children:"Cross-department communication simulator"}),(0,r.jsx)("small",{children:"marketing asks finance, legal asks engineering, support asks ops"})]}),(0,r.jsxs)("div",{className:t.simGrid,children:[(0,r.jsxs)("div",{className:t.controls,children:[(0,r.jsxs)("label",{children:["Source department",(0,r.jsx)("select",{value:b,onChange:e=>y(e.target.value),children:l.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))})]}),(0,r.jsxs)("label",{children:["Target department",(0,r.jsx)("select",{value:f,onChange:e=>k(e.target.value),children:l.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))})]}),(0,r.jsxs)("label",{children:["Actor role",(0,r.jsx)("select",{value:w,onChange:e=>N(e.target.value),children:o.map(e=>(0,r.jsx)("option",{value:e.id,children:e.label},e.id))})]}),(0,r.jsxs)("label",{children:["Request type",(0,r.jsx)("select",{value:C,onChange:e=>q(e.target.value),children:d.map(e=>(0,r.jsx)("option",{value:e.id,children:e.label},e.id))})]}),(0,r.jsxs)("label",{children:["Data sensitivity",(0,r.jsx)("select",{value:S,onChange:e=>A(e.target.value),children:c.map(e=>(0,r.jsx)("option",{value:e.id,children:e.label},e.id))})]}),(0,r.jsxs)("label",{children:["Trust mode",(0,r.jsxs)("select",{value:R,onChange:e=>T(e.target.value),children:[(0,r.jsx)("option",{value:"approval_required",children:"approval_required"}),(0,r.jsx)("option",{value:"auto",children:"auto-trust for safe scopes"}),(0,r.jsx)("option",{value:"manual",children:"manual every risky action"})]})]})]}),(0,r.jsxs)("div",{className:t.decisionPanel,children:[(0,r.jsx)("span",{className:"".concat(t.badge," ").concat(t[F.decision.replace("-","")]),children:F.decision}),(0,r.jsxs)("h3",{children:[l.find(e=>e.id===b).name," → ",l.find(e=>e.id===f).name]}),(0,r.jsxs)("p",{children:["Risk tier: ",(0,r.jsx)("b",{children:"irreversible_external"===(e=F.risk)?"irreversible external":e}),". Approver: ",(0,r.jsx)("b",{children:F.approver}),"."]}),(0,r.jsx)("ul",{children:(F.reasons.length?F.reasons:["same-department low-friction request"]).map(e=>(0,r.jsx)("li",{children:e},e))}),(0,r.jsxs)("div",{className:t.records,children:[(0,r.jsx)("b",{children:"Records created"}),(0,r.jsx)("span",{children:"cross_department_requests"}),(0,r.jsx)("span",{children:"activity_log"}),"approval-required"===F.decision&&(0,r.jsx)("span",{children:"approval_requests"}),(0,r.jsx)("span",{children:"audit_logs"}),(0,r.jsx)("span",{children:"department_queue_jobs"})]})]})]})]})}),(0,r.jsxs)("section",{className:t.section,children:[(0,r.jsxs)("div",{className:t.panel,children:[(0,r.jsxs)("div",{className:t.panelTitle,children:[(0,r.jsx)("b",{children:"Request flow"}),(0,r.jsx)("small",{children:"brokered, not free-for-all"})]}),(0,r.jsx)("div",{className:t.flow,children:p.map(e=>(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:e[0]}),(0,r.jsx)("span",{children:e[1]}),(0,r.jsx)("p",{children:e[2]})]},e[0]))})]}),(0,r.jsxs)("div",{className:"".concat(t.panel," ").concat(t.dark),children:[(0,r.jsxs)("div",{className:t.panelTitle,children:[(0,r.jsx)("b",{children:"Why this is safer"}),(0,r.jsx)("small",{children:"boundary design"})]}),(0,r.jsx)("p",{children:"Agents do not directly scrape another department’s memory or tools. They request work through a broker. The owning department decides what can be returned."}),(0,r.jsxs)("ul",{className:t.flat,children:[(0,r.jsx)("li",{children:"Raw finance data can remain inside Finance."}),(0,r.jsx)("li",{children:"Marketing receives approved summaries, not unrestricted tables."}),(0,r.jsx)("li",{children:"Legal opinions require Legal manager approval."}),(0,r.jsx)("li",{children:"External sends and destructive tool calls remain irreversible_external."})]})]})]}),(0,r.jsx)("section",{className:"".concat(t.section," ").concat(t.single),children:(0,r.jsxs)("div",{className:t.panel,children:[(0,r.jsxs)("div",{className:t.panelTitle,children:[(0,r.jsx)("b",{children:"Federation architecture"}),(0,r.jsx)("small",{children:"six-layer model"})]}),(0,r.jsx)("div",{className:t.layers,children:u.map((e,a)=>(0,r.jsxs)("div",{children:[(0,r.jsx)("em",{children:String(a+1).padStart(2,"0")}),(0,r.jsx)("b",{children:e[0]}),(0,r.jsx)("span",{children:e[1]})]},e[0]))})]})}),(0,r.jsxs)("section",{className:t.section,children:[(0,r.jsxs)("div",{className:t.panel,children:[(0,r.jsxs)("div",{className:t.panelTitle,children:[(0,r.jsx)("b",{children:"Performance simulator"}),(0,r.jsx)("small",{children:"queues \xb7 workers \xb7 audit volume"})]}),(0,r.jsxs)("div",{className:t.sliderRow,children:[(0,r.jsxs)("label",{children:["Task load: ",G.toLocaleString()," / hour",(0,r.jsx)("input",{type:"range",min:"10",max:"10000",step:"10",value:G,onChange:e=>L(Number(e.target.value))})]}),(0,r.jsxs)("label",{children:["Workers: ",M,(0,r.jsx)("input",{type:"range",min:"1",max:"80",value:M,onChange:e=>D(Number(e.target.value))})]})]}),(0,r.jsxs)("div",{className:t.metricGrid,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:I.capacity.toLocaleString()}),(0,r.jsx)("span",{children:"task/hour capacity"})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("b",{children:[I.util,"%"]}),(0,r.jsx)("span",{children:"worker utilization"})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("b",{children:[I.wait,"m"]}),(0,r.jsx)("span",{children:"est. queue wait"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:I.audit.toLocaleString()}),(0,r.jsx)("span",{children:"audit events/hour"})]})]})]}),(0,r.jsxs)("div",{className:t.panel,children:[(0,r.jsxs)("div",{className:t.panelTitle,children:[(0,r.jsx)("b",{children:"Scalability rules"}),(0,r.jsx)("small",{children:"keep it fast and inspectable"})]}),(0,r.jsxs)("ul",{className:t.flat,children:[(0,r.jsx)("li",{children:"Every request carries tenant_id, department_id, actor_id, task_id, correlation_id."}),(0,r.jsx)("li",{children:"Hot permissions, tool manifests and rate counters can be cached."}),(0,r.jsx)("li",{children:"Long work moves to department queues with leases, retries and dead-letter handling."}),(0,r.jsx)("li",{children:"Vector memory retrieval is scoped by tenant, department, role, task and policy."}),(0,r.jsx)("li",{children:"Audit logs are append-only and can be partitioned by company/department/time."})]})]})]}),(0,r.jsx)("section",{className:"".concat(t.section," ").concat(t.single),children:(0,r.jsxs)("div",{className:t.panel,children:[(0,r.jsxs)("div",{className:t.panelTitle,children:[(0,r.jsx)("b",{children:"Advantage matrix"}),(0,r.jsx)("small",{children:"Hermes \xb7 Paperclip \xb7 madarX OS"})]}),(0,r.jsx)("div",{className:t.tableWrap,children:(0,r.jsxs)("table",{className:t.matrix,children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Dimension"}),(0,r.jsx)("th",{children:"Hermes Agent"}),(0,r.jsx)("th",{children:"Paperclip"}),(0,r.jsx)("th",{children:"madarX OS advantage"})]})}),(0,r.jsx)("tbody",{children:m.map(e=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:e.k}),(0,r.jsx)("td",{children:e.hermes}),(0,r.jsx)("td",{children:e.paper}),(0,r.jsx)("td",{children:e.madarx})]},e.k))})]})})]})}),(0,r.jsx)("section",{className:"".concat(t.section," ").concat(t.single),children:(0,r.jsxs)("div",{className:t.panel,children:[(0,r.jsxs)("div",{className:t.panelTitle,children:[(0,r.jsx)("b",{children:"Department war-room demo"}),(0,r.jsx)("small",{children:"launch a campaign across six departments"})]}),(0,r.jsx)("div",{className:t.warGrid,children:h.map((e,a)=>(0,r.jsxs)("button",{className:O===a?t.on:"",onClick:()=>P(a),children:[(0,r.jsx)("b",{children:e.dept}),(0,r.jsx)("span",{children:e.status})]},e.status))}),(0,r.jsxs)("div",{className:t.warDetail,children:[(0,r.jsxs)("b",{children:[h[O].dept," \xb7 ",h[O].status]}),(0,r.jsx)("p",{children:h[O].action}),(0,r.jsx)("small",{children:"Every handoff creates durable task, activity, approval, and audit context. This is the difference between “agents chatting” and an accountable AI organization."})]})]})}),(0,r.jsxs)("footer",{className:t.footer,children:[(0,r.jsx)("span",{children:"madarX OS \xb7 federated AI teams \xb7 document 004"}),(0,r.jsx)("span",{children:"company-wide agents \xb7 governed collaboration \xb7 audit-first"})]})]})}}},e=>{e.O(0,[8422,8441,1255,7358],()=>e(e.s=3456)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8926],{63:(e,a,r)=>{"use strict";var t=r(7260);r.o(t,"usePathname")&&r.d(a,{usePathname:function(){return t.usePathname}}),r.o(t,"useRouter")&&r.d(a,{useRouter:function(){return t.useRouter}}),r.o(t,"useSearchParams")&&r.d(a,{useSearchParams:function(){return t.useSearchParams}})},677:(e,a,r)=>{"use strict";r.d(a,{default:()=>i});var t=r(5155),l=r(2115);function i(){let[e,a]=(0,l.useState)([]),[r,i]=(0,l.useState)("");return(0,l.useEffect)(()=>{i(localStorage.getItem("madarx.activeProjectId")||""),fetch("/api/projects").then(e=>e.json()).then(e=>a(e.projects||[])).catch(()=>{})},[]),(0,t.jsx)("div",{className:"project-switcher","data-project-switcher":!0,children:(0,t.jsxs)("select",{value:r,onChange:e=>{var a;i(a=e.target.value),a?localStorage.setItem("madarx.activeProjectId",a):localStorage.removeItem("madarx.activeProjectId"),window.dispatchEvent(new CustomEvent("madarx:project-change",{detail:{project_id:a||null}}))},"aria-label":"Active project",children:[(0,t.jsx)("option",{value:"",children:"All projects"}),e.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})})}},1685:(e,a,r)=>{"use strict";r.d(a,{default:()=>o});var t=r(5155),l=r(2115),i=r(63),n=r(4255);let s={action_type:"",risk:"low",authority:"draft",role_slug:"",data_class:"",reviewer_role:"",approval_required:!1,evidence_required:!1};function o(e){let{engagementId:a,initialRules:r}=e,o=(0,i.useRouter)(),[c,u]=(0,l.useState)(r.length?r:[{...s}]),[p,d]=(0,l.useState)(!1),[h,v]=(0,l.useState)([]),[_,g]=(0,l.useState)(!1);function m(e,a){u(r=>r.map((r,t)=>t===e?{...r,...a}:r)),g(!1)}async function f(){d(!0),v([]),g(!1);try{let e=c.filter(e=>e.action_type.trim()).map(e=>({...e,role_slug:e.role_slug||null,data_class:e.data_class||null,reviewer_role:e.reviewer_role||null})),r=await fetch("/api/hail/engagements/".concat(a,"/governance"),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({rules:e})}),t=await r.json();if(!r.ok)return void v((null==t?void 0:t.errors)||[(null==t?void 0:t.error)||"Save failed."]);u(t.rules.length?t.rules:[{...s}]),g(!0),o.refresh()}catch(e){v(["Network error."])}finally{d(!1)}}return(0,t.jsxs)("div",{className:"hail-panel",children:[(0,t.jsxs)("div",{className:"hail-gov-table",role:"table",children:[(0,t.jsxs)("div",{className:"hail-gov-row hail-gov-head",role:"row",children:[(0,t.jsx)("span",{children:"Action"}),(0,t.jsx)("span",{children:"Risk"}),(0,t.jsx)("span",{children:"Authority"}),(0,t.jsx)("span",{children:"Role"}),(0,t.jsx)("span",{children:"Data class"}),(0,t.jsx)("span",{children:"Reviewer"}),(0,t.jsx)("span",{children:"Approval"}),(0,t.jsx)("span",{children:"Evidence"}),(0,t.jsx)("span",{})]}),c.map((e,a)=>{let r="irreversible_external"===e.risk&&(!e.approval_required||!e.reviewer_role||"decide"===e.authority);return(0,t.jsxs)("div",{className:"hail-gov-row ".concat(r?"is-warn":""),role:"row",children:[(0,t.jsx)("input",{value:e.action_type,onChange:e=>m(a,{action_type:e.target.value}),placeholder:"email.send"}),(0,t.jsx)("select",{value:e.risk,onChange:e=>m(a,{risk:e.target.value}),children:n.lb.map(e=>(0,t.jsx)("option",{value:e,children:e},e))}),(0,t.jsx)("select",{value:e.authority,onChange:e=>m(a,{authority:e.target.value}),children:n.Ef.map(e=>(0,t.jsx)("option",{value:e,children:e},e))}),(0,t.jsx)("input",{value:e.role_slug||"",onChange:e=>m(a,{role_slug:e.target.value}),placeholder:"role"}),(0,t.jsxs)("select",{value:e.data_class||"",onChange:e=>m(a,{data_class:e.target.value}),children:[(0,t.jsx)("option",{value:"",children:"—"}),n.$_.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),(0,t.jsxs)("select",{value:e.reviewer_role||"",onChange:e=>m(a,{reviewer_role:e.target.value}),children:[(0,t.jsx)("option",{value:"",children:"—"}),n.mQ.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),(0,t.jsx)("input",{type:"checkbox",checked:!!e.approval_required,onChange:e=>m(a,{approval_required:e.target.checked}),"aria-label":"approval required"}),(0,t.jsx)("input",{type:"checkbox",checked:!!e.evidence_required,onChange:e=>m(a,{evidence_required:e.target.checked}),"aria-label":"evidence required"}),(0,t.jsx)("button",{type:"button",className:"hail-btn",onClick:()=>{u(e=>e.filter((e,r)=>r!==a))},"aria-label":"remove",children:"\xd7"})]},a)})]}),(0,t.jsxs)("p",{className:"hail-actions",children:[(0,t.jsx)("button",{type:"button",className:"hail-btn",onClick:function(){u(e=>[...e,{...s}])},children:"+ Add rule"}),(0,t.jsx)("button",{type:"button",className:"hail-btn hail-btn-primary",onClick:f,disabled:p,children:p?"Saving…":"Save matrix"}),_&&(0,t.jsx)("span",{className:"hail-badge tone-success",children:"Saved"})]}),(0,t.jsx)("p",{className:"hail-hint",children:"Irreversible-external actions must require approval and name a reviewer, and can never be set to “decide”. Rows that violate this are highlighted and rejected on save."}),h.length>0&&(0,t.jsx)("ul",{className:"hail-error",role:"alert",children:h.map((e,a)=>(0,t.jsx)("li",{children:e},a))})]})}},4255:(e,a,r)=>{"use strict";r.d(a,{$_:()=>t,Ef:()=>i,Fc:()=>s,lb:()=>l,mQ:()=>n});let t=Object.freeze(["public","internal","confidential","restricted","refused"]);Object.freeze(["diagnostic","blueprint","pilot","managed_layer"]);let l=Object.freeze(["low","medium","high","irreversible_external","blocked"]),i=Object.freeze(["decide","draft","recommend","execute","escalate"]);Object.freeze(["interview_transcript","diagnostic_report","operating_profile","role_map","friction_map","governance_matrix","agent_roster","setup_plan","pilot_test_report","quarterly_review"]),Object.freeze(["diagnostic_signoff","blueprint_signoff","setup_package_approval","pilot_launch","managed_layer_change"]);let n=Object.freeze(["practitioner","architect","security_reviewer","principal","counsel"]);Object.freeze(["agent","tool","allowlist_entry","secret","schedule","workflow","memory_scope","artifact_acl","approval_policy"]),Object.freeze(["observed","inferred","needs_confirmation"]);let s=Object.freeze([{slug:"principal_identity",label:"Principal identity & context"},{slug:"role_capacity_inventory",label:"Role / capacity inventory"},{slug:"decision_delegation_style",label:"Decision & delegation style"},{slug:"reputation_constraints",label:"Reputation constraints"},{slug:"confidentiality_boundaries",label:"Confidentiality boundaries"},{slug:"current_systems_tools",label:"Current systems, tools & communications"},{slug:"bottlenecks_friction",label:"Work bottlenecks & friction points"},{slug:"approval_preferences",label:"Approval preferences"},{slug:"counterparties_reviewers",label:"Human counterparties & reviewer roles"},{slug:"regulated_obligations",label:"Regulated / counsel / audit obligations"},{slug:"desired_outcomes",label:"Desired outcomes (time / judgment / reputation)"}]);s.map(e=>e.slug);let o=Object.freeze({"diagnostic-signoff":{gate_type:"diagnostic_signoff",reviewer_role:"practitioner"},"blueprint-signoff":{gate_type:"blueprint_signoff",reviewer_role:"architect"},"setup-package-approval":{gate_type:"setup_package_approval",reviewer_role:"principal"},"pilot-activation":{gate_type:"pilot_launch",reviewer_role:"principal"},"managed-layer-activation":{gate_type:"managed_layer_change",reviewer_role:"practitioner"}});Object.freeze({"hail-engagement-lifecycle":o,"hail-quarterly-review":Object.freeze({"review-signoff":{gate_type:"managed_layer_change",reviewer_role:"practitioner"},"reconfig-approval":{gate_type:"setup_package_approval",reviewer_role:"principal"}})})},7798:(e,a,r)=>{Promise.resolve().then(r.bind(r,677)),Promise.resolve().then(r.bind(r,1685)),Promise.resolve().then(r.t.bind(r,2619,23))}},e=>{e.O(0,[2619,8441,1255,7358],()=>e(e.s=7798)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9677],{63:(e,a,t)=>{"use strict";var i=t(7260);t.o(i,"usePathname")&&t.d(a,{usePathname:function(){return i.usePathname}}),t.o(i,"useRouter")&&t.d(a,{useRouter:function(){return i.useRouter}}),t.o(i,"useSearchParams")&&t.d(a,{useSearchParams:function(){return i.useSearchParams}})},677:(e,a,t)=>{"use strict";t.d(a,{default:()=>s});var i=t(5155),l=t(2115);function s(){let[e,a]=(0,l.useState)([]),[t,s]=(0,l.useState)("");return(0,l.useEffect)(()=>{s(localStorage.getItem("madarx.activeProjectId")||""),fetch("/api/projects").then(e=>e.json()).then(e=>a(e.projects||[])).catch(()=>{})},[]),(0,i.jsx)("div",{className:"project-switcher","data-project-switcher":!0,children:(0,i.jsxs)("select",{value:t,onChange:e=>{var a;s(a=e.target.value),a?localStorage.setItem("madarx.activeProjectId",a):localStorage.removeItem("madarx.activeProjectId"),window.dispatchEvent(new CustomEvent("madarx:project-change",{detail:{project_id:a||null}}))},"aria-label":"Active project",children:[(0,i.jsx)("option",{value:"",children:"All projects"}),e.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))]})})}},1223:(e,a,t)=>{Promise.resolve().then(t.bind(t,677)),Promise.resolve().then(t.bind(t,1785)),Promise.resolve().then(t.t.bind(t,2619,23))},1785:(e,a,t)=>{"use strict";t.d(a,{default:()=>u});var i=t(5155),l=t(2115),s=t(63),r=t(4255);let n=[{value:"public",label:"Public",tone:"neutral"},{value:"internal",label:"Internal",tone:"info"},{value:"confidential",label:"Confidential",tone:"info"},{value:"restricted",label:"Restricted (local-only)",tone:"danger"},{value:"refused",label:"Declined (do not store)",tone:"warning"}],c=Object.fromEntries(n.map(e=>[e.value,e.label])),o=Object.fromEntries(n.map(e=>[e.value,e.tone])),d=[{value:"",label:"—"},{value:"observed",label:"Observed"},{value:"inferred",label:"Inferred"},{value:"needs_confirmation",label:"Needs confirmation"}];function u(e){let{interviewId:a,engagementId:t,status:u,sectionCursor:p,responses:h}=e,m=(0,s.useRouter)(),[v,f]=(0,l.useState)(p||r.Fc[0].slug),[g,b]=(0,l.useState)(""),[_,j]=(0,l.useState)(""),[y,x]=(0,l.useState)("confidential"),[w,N]=(0,l.useState)(""),[k,S]=(0,l.useState)(!1),[O,C]=(0,l.useState)(!1),[P,z]=(0,l.useState)(null),R=h.filter(e=>e.section===v);async function E(e){f(e);try{await fetch("/api/hail/interviews/".concat(a),{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({action:"cursor",section_cursor:e})})}catch(e){}}async function I(e){if(e.preventDefault(),z(null),!g.trim())return void z("A question key is required.");C(!0);try{let e=await fetch("/api/hail/interviews/".concat(a,"/responses"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({section:v,question_key:g.trim(),answer:"refused"===y?null:_,sensitivity:y,confidence:w||null,is_practitioner_note:k})}),t=await e.json();if(!e.ok)return void z((null==t?void 0:t.message)||(null==t?void 0:t.error)||"Could not save.");b(""),j(""),N(""),S(!1),m.refresh()}catch(e){z("Network error.")}finally{C(!1)}}return(0,i.jsxs)("div",{className:"hail-interview",children:[(0,i.jsx)("nav",{className:"hail-sections","aria-label":"Interview sections",children:r.Fc.map(e=>(0,i.jsx)("button",{type:"button",className:"hail-section-tab ".concat(v===e.slug?"is-active":""),onClick:()=>E(e.slug),children:e.label},e.slug))}),(0,i.jsxs)("div",{className:"hail-grid",children:[(0,i.jsxs)("section",{className:"hail-panel",children:[(0,i.jsx)("h2",{className:"hail-panel-title",children:"Captured answers"}),0===R.length?(0,i.jsx)("p",{className:"hail-hint",children:"No answers in this section yet."}):(0,i.jsx)("ul",{className:"hail-answers",children:R.map(e=>(0,i.jsxs)("li",{className:"hail-answer ".concat(e.is_practitioner_note?"is-note":""),children:[(0,i.jsxs)("div",{className:"hail-answer-head",children:[(0,i.jsx)("span",{className:"hail-answer-key",children:e.question_key}),(0,i.jsx)("span",{className:"hail-badge tone-".concat(o[e.sensitivity]||"neutral"),children:c[e.sensitivity]||e.sensitivity}),e.is_practitioner_note&&(0,i.jsx)("span",{className:"hail-badge tone-info",children:"practitioner note"})]}),(0,i.jsx)("div",{className:"hail-answer-body",children:"restricted"===e.sensitivity?(0,i.jsx)("em",{className:"hail-redacted",children:"Restricted — held locally, withheld from view & artifacts."}):"refused"===e.sensitivity?(0,i.jsx)("em",{className:"hail-redacted",children:"Declined — not stored."}):e.display||(0,i.jsx)("em",{className:"hail-redacted",children:"(empty)"})})]},e.id))})]}),(0,i.jsxs)("section",{className:"hail-panel",children:[(0,i.jsx)("h2",{className:"hail-panel-title",children:"Add / update answer"}),(0,i.jsxs)("form",{onSubmit:I,className:"hail-form",children:[(0,i.jsxs)("label",{className:"hail-field",children:[(0,i.jsx)("span",{children:"Question key"}),(0,i.jsx)("input",{value:g,onChange:e=>b(e.target.value),placeholder:"e.g. decision_style, public_roles"})]}),(0,i.jsxs)("label",{className:"hail-field",children:[(0,i.jsx)("span",{children:"Answer"}),(0,i.jsx)("textarea",{value:_,onChange:e=>j(e.target.value),rows:4,disabled:"refused"===y,placeholder:"refused"===y?"Declined — no value will be stored.":"Capture the principal’s answer…"})]}),(0,i.jsxs)("div",{className:"hail-field-row",children:[(0,i.jsxs)("label",{className:"hail-field",children:[(0,i.jsxs)("span",{children:["Sensitivity ",(0,i.jsx)("em",{className:"hail-req",children:"at capture"})]}),(0,i.jsx)("select",{value:y,onChange:e=>x(e.target.value),children:n.map(e=>(0,i.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,i.jsxs)("label",{className:"hail-field",children:[(0,i.jsx)("span",{children:"Confidence"}),(0,i.jsx)("select",{value:w,onChange:e=>N(e.target.value),children:d.map(e=>(0,i.jsx)("option",{value:e.value,children:e.label},e.value))})]})]}),(0,i.jsxs)("label",{className:"hail-check",children:[(0,i.jsx)("input",{type:"checkbox",checked:k,onChange:e=>S(e.target.checked)}),(0,i.jsx)("span",{children:"This is a practitioner note (kept separate from the principal's answers)"})]}),P&&(0,i.jsx)("p",{className:"hail-error",role:"alert",children:P}),(0,i.jsx)("button",{type:"submit",className:"hail-btn hail-btn-primary",disabled:O||"complete"===u,children:O?"Saving…":"Save answer"}),"complete"===u&&(0,i.jsx)("small",{className:"hail-hint",children:"This interview is marked complete. Resume editing from the cockpit."})]})]})]})]})}},4255:(e,a,t)=>{"use strict";t.d(a,{$_:()=>i,Ef:()=>s,Fc:()=>n,lb:()=>l,mQ:()=>r});let i=Object.freeze(["public","internal","confidential","restricted","refused"]);Object.freeze(["diagnostic","blueprint","pilot","managed_layer"]);let l=Object.freeze(["low","medium","high","irreversible_external","blocked"]),s=Object.freeze(["decide","draft","recommend","execute","escalate"]);Object.freeze(["interview_transcript","diagnostic_report","operating_profile","role_map","friction_map","governance_matrix","agent_roster","setup_plan","pilot_test_report","quarterly_review"]),Object.freeze(["diagnostic_signoff","blueprint_signoff","setup_package_approval","pilot_launch","managed_layer_change"]);let r=Object.freeze(["practitioner","architect","security_reviewer","principal","counsel"]);Object.freeze(["agent","tool","allowlist_entry","secret","schedule","workflow","memory_scope","artifact_acl","approval_policy"]),Object.freeze(["observed","inferred","needs_confirmation"]);let n=Object.freeze([{slug:"principal_identity",label:"Principal identity & context"},{slug:"role_capacity_inventory",label:"Role / capacity inventory"},{slug:"decision_delegation_style",label:"Decision & delegation style"},{slug:"reputation_constraints",label:"Reputation constraints"},{slug:"confidentiality_boundaries",label:"Confidentiality boundaries"},{slug:"current_systems_tools",label:"Current systems, tools & communications"},{slug:"bottlenecks_friction",label:"Work bottlenecks & friction points"},{slug:"approval_preferences",label:"Approval preferences"},{slug:"counterparties_reviewers",label:"Human counterparties & reviewer roles"},{slug:"regulated_obligations",label:"Regulated / counsel / audit obligations"},{slug:"desired_outcomes",label:"Desired outcomes (time / judgment / reputation)"}]);n.map(e=>e.slug);let c=Object.freeze({"diagnostic-signoff":{gate_type:"diagnostic_signoff",reviewer_role:"practitioner"},"blueprint-signoff":{gate_type:"blueprint_signoff",reviewer_role:"architect"},"setup-package-approval":{gate_type:"setup_package_approval",reviewer_role:"principal"},"pilot-activation":{gate_type:"pilot_launch",reviewer_role:"principal"},"managed-layer-activation":{gate_type:"managed_layer_change",reviewer_role:"practitioner"}});Object.freeze({"hail-engagement-lifecycle":c,"hail-quarterly-review":Object.freeze({"review-signoff":{gate_type:"managed_layer_change",reviewer_role:"practitioner"},"reconfig-approval":{gate_type:"setup_package_approval",reviewer_role:"principal"}})})}},e=>{e.O(0,[2619,8441,1255,7358],()=>e(e.s=1223)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[732,5101,8898,9815,9857],{677:(e,t,a)=>{"use strict";a.d(t,{default:()=>o});var c=a(5155),r=a(2115);function o(){let[e,t]=(0,r.useState)([]),[a,o]=(0,r.useState)("");return(0,r.useEffect)(()=>{o(localStorage.getItem("madarx.activeProjectId")||""),fetch("/api/projects").then(e=>e.json()).then(e=>t(e.projects||[])).catch(()=>{})},[]),(0,c.jsx)("div",{className:"project-switcher","data-project-switcher":!0,children:(0,c.jsxs)("select",{value:a,onChange:e=>{var t;o(t=e.target.value),t?localStorage.setItem("madarx.activeProjectId",t):localStorage.removeItem("madarx.activeProjectId"),window.dispatchEvent(new CustomEvent("madarx:project-change",{detail:{project_id:t||null}}))},"aria-label":"Active project",children:[(0,c.jsx)("option",{value:"",children:"All projects"}),e.map(e=>(0,c.jsx)("option",{value:e.id,children:e.name},e.id))]})})}},6485:(e,t,a)=>{Promise.resolve().then(a.bind(a,677)),Promise.resolve().then(a.t.bind(a,2619,23))}},e=>{e.O(0,[2619,8441,1255,7358],()=>e(e.s=6485)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[732,5101,8898,9815,9857],{677:(e,t,a)=>{"use strict";a.d(t,{default:()=>o});var c=a(5155),r=a(2115);function o(){let[e,t]=(0,r.useState)([]),[a,o]=(0,r.useState)("");return(0,r.useEffect)(()=>{o(localStorage.getItem("madarx.activeProjectId")||""),fetch("/api/projects").then(e=>e.json()).then(e=>t(e.projects||[])).catch(()=>{})},[]),(0,c.jsx)("div",{className:"project-switcher","data-project-switcher":!0,children:(0,c.jsxs)("select",{value:a,onChange:e=>{var t;o(t=e.target.value),t?localStorage.setItem("madarx.activeProjectId",t):localStorage.removeItem("madarx.activeProjectId"),window.dispatchEvent(new CustomEvent("madarx:project-change",{detail:{project_id:t||null}}))},"aria-label":"Active project",children:[(0,c.jsx)("option",{value:"",children:"All projects"}),e.map(e=>(0,c.jsx)("option",{value:e.id,children:e.name},e.id))]})})}},6485:(e,t,a)=>{Promise.resolve().then(a.bind(a,677)),Promise.resolve().then(a.t.bind(a,2619,23))}},e=>{e.O(0,[2619,8441,1255,7358],()=>e(e.s=6485)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[732,5101,8898,9815,9857],{677:(e,t,a)=>{"use strict";a.d(t,{default:()=>o});var c=a(5155),r=a(2115);function o(){let[e,t]=(0,r.useState)([]),[a,o]=(0,r.useState)("");return(0,r.useEffect)(()=>{o(localStorage.getItem("madarx.activeProjectId")||""),fetch("/api/projects").then(e=>e.json()).then(e=>t(e.projects||[])).catch(()=>{})},[]),(0,c.jsx)("div",{className:"project-switcher","data-project-switcher":!0,children:(0,c.jsxs)("select",{value:a,onChange:e=>{var t;o(t=e.target.value),t?localStorage.setItem("madarx.activeProjectId",t):localStorage.removeItem("madarx.activeProjectId"),window.dispatchEvent(new CustomEvent("madarx:project-change",{detail:{project_id:t||null}}))},"aria-label":"Active project",children:[(0,c.jsx)("option",{value:"",children:"All projects"}),e.map(e=>(0,c.jsx)("option",{value:e.id,children:e.name},e.id))]})})}},6485:(e,t,a)=>{Promise.resolve().then(a.bind(a,677)),Promise.resolve().then(a.t.bind(a,2619,23))}},e=>{e.O(0,[2619,8441,1255,7358],()=>e(e.s=6485)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[12],{677:(e,t,a)=>{"use strict";a.d(t,{default:()=>c});var r=a(5155),n=a(2115);function c(){let[e,t]=(0,n.useState)([]),[a,c]=(0,n.useState)("");return(0,n.useEffect)(()=>{c(localStorage.getItem("madarx.activeProjectId")||""),fetch("/api/projects").then(e=>e.json()).then(e=>t(e.projects||[])).catch(()=>{})},[]),(0,r.jsx)("div",{className:"project-switcher","data-project-switcher":!0,children:(0,r.jsxs)("select",{value:a,onChange:e=>{var t;c(t=e.target.value),t?localStorage.setItem("madarx.activeProjectId",t):localStorage.removeItem("madarx.activeProjectId"),window.dispatchEvent(new CustomEvent("madarx:project-change",{detail:{project_id:t||null}}))},"aria-label":"Active project",children:[(0,r.jsx)("option",{value:"",children:"All projects"}),e.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))]})})}},2210:(e,t,a)=>{"use strict";a.d(t,{default:()=>n});var r=a(5155);function n(e){let{actionId:t,label:a}=e;return(0,r.jsx)("button",{type:"button",className:"help-article-set",onClick:()=>window.dispatchEvent(new CustomEvent("madarx:open-setting",{detail:{id:t}})),children:a||"Set this now"})}},3700:(e,t,a)=>{"use strict";a.d(t,{default:()=>s});var r=a(5155),n=a(6504),c=a(5459);function s(e){let{children:t}=e;return(0,r.jsx)(n.oz,{remarkPlugins:[c.A],children:t})}},7528:(e,t,a)=>{Promise.resolve().then(a.bind(a,677)),Promise.resolve().then(a.bind(a,3700)),Promise.resolve().then(a.bind(a,2210))}},e=>{e.O(0,[930,8441,1255,7358],()=>e(e.s=7528)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[64,72,167,178,232,332,489,497,552,658,723,767,769,796,870,888,939,972,1053,1115,1177,1426,1523,1557,1562,1581,1672,1851,1990,2008,2139,2153,2162,2164,2175,2254,2334,2343,2433,2635,2640,2711,2726,2748,2837,2873,2943,3033,3076,3159,3190,3203,3395,3437,3465,3492,3499,3554,3558,3577,3629,3630,3641,3659,3745,3756,3802,3839,3870,3886,3904,3905,3942,3975,3976,4094,4095,4104,4115,4190,4204,4209,4218,4229,4231,4269,4373,4410,4431,4475,4507,4519,4530,4537,4662,4721,4819,4890,4999,5049,5085,5092,5098,5118,5120,5130,5169,5180,5207,5223,5289,5324,5331,5441,5520,5551,5588,5610,5689,5707,5722,5743,5794,5810,5850,5887,5903,5906,6002,6079,6113,6147,6186,6234,6278,6279,6341,6365,6403,6456,6496,6591,6595,6621,6667,6701,6725,6779,6799,6816,6862,7020,7060,7070,7092,7113,7237,7276,7324,7361,7440,7750,7765,7795,7823,7903,7920,7986,8059,8093,8100,8159,8227,8252,8273,8298,8312,8397,8401,8405,8578,8591,8665,8679,8732,8765,8828,8887,8907,8994,9e3,9037,9040,9154,9160,9183,9413,9442,9504,9554,9628,9873],{4441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[728],{153:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var a=r(5155),s=r(2115);function l(e){let{articles:t,categories:r}=e,[l,c]=(0,s.useState)(""),n=(0,s.useMemo)(()=>{let e=l.toLowerCase().trim();return r.map(r=>({cat:r,items:t.filter(t=>t.category===r&&function(e,t){if(!t)return!0;let r=[e.title,e.summary,e.category,...e.keywords||[]].join(" ").toLowerCase();return t.split(/\s+/).filter(Boolean).every(e=>r.includes(e))}(t,e))})).filter(e=>e.items.length)},[t,r,l]);return(0,a.jsxs)("div",{className:"help-center",children:[(0,a.jsx)("div",{className:"help-center-search",children:(0,a.jsx)("input",{type:"text",value:l,onChange:e=>c(e.target.value),placeholder:"Search the docs… (or press ⌘K anywhere)","aria-label":"Search help articles"})}),n.length?n.map(e=>{let{cat:t,items:r}=e;return(0,a.jsxs)("section",{className:"help-center-group",children:[(0,a.jsx)("h2",{className:"help-center-group-title",children:t}),(0,a.jsx)("div",{className:"help-center-grid",children:r.map(e=>(0,a.jsxs)("a",{className:"help-center-card",href:"/help/".concat(e.slug),children:[(0,a.jsx)("b",{children:e.title}),(0,a.jsx)("p",{children:e.summary})]},e.slug))})]},t)}):(0,a.jsxs)("div",{className:"help-center-empty",children:["No articles match “",l,"”."]})]})}},677:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var a=r(5155),s=r(2115);function l(){let[e,t]=(0,s.useState)([]),[r,l]=(0,s.useState)("");return(0,s.useEffect)(()=>{l(localStorage.getItem("madarx.activeProjectId")||""),fetch("/api/projects").then(e=>e.json()).then(e=>t(e.projects||[])).catch(()=>{})},[]),(0,a.jsx)("div",{className:"project-switcher","data-project-switcher":!0,children:(0,a.jsxs)("select",{value:r,onChange:e=>{var t;l(t=e.target.value),t?localStorage.setItem("madarx.activeProjectId",t):localStorage.removeItem("madarx.activeProjectId"),window.dispatchEvent(new CustomEvent("madarx:project-change",{detail:{project_id:t||null}}))},"aria-label":"Active project",children:[(0,a.jsx)("option",{value:"",children:"All projects"}),e.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name},e.id))]})})}},4003:(e,t,r)=>{Promise.resolve().then(r.bind(r,677)),Promise.resolve().then(r.bind(r,153))}},e=>{e.O(0,[8441,1255,7358],()=>e(e.s=4003)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5335],{7323:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i});var a=t(5155),r=t(2115);function i(){let[e,n]=(0,r.useState)(null),[t,i]=(0,r.useState)(""),[o,s]=(0,r.useState)("reading"),[c,l]=(0,r.useState)("");(0,r.useEffect)(()=>{let e=window.location.hash.match(/[#&]invite=([^&]+)/),t=e?decodeURIComponent(e[1]):"";if(!t)return void s("bad");let a=function(e){try{let n=atob(e.replace(/-/g,"+").replace(/_/g,"/")),t=Uint8Array.from(n,e=>e.charCodeAt(0)),a=JSON.parse(new TextDecoder().decode(t));if(1!==a.v||"string"!=typeof a.url)return null;return{url:a.url,org:"string"==typeof a.org?a.org:null,token:a.token,anonKey:a.anonKey}}catch(e){return null}}(t);if(!a||!a.url||!a.token)return void s("bad");i(t),n(a),s("ready")},[]);let d="";try{d=e?new URL(e.url).host:""}catch(e){d=""}async function h(){l(""),s("joining");try{let n=await fetch("/api/auth/join-bootstrap",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invite:t})}),a=await n.json().catch(()=>({}));if(!n.ok){if("already_supabase"===a.error)throw Error("This app is already connected to an organization.");throw Error(a.message||"Couldn't reach that project. Check the link with whoever invited you.")}try{sessionStorage.setItem("madarx_pending_invite_token",e.token)}catch(e){}window.location.href="/login?supabase=1&next="+encodeURIComponent("/onboarding/org")}catch(e){l(e.message),s("error")}}return"reading"===o?(0,a.jsx)("main",{className:"join-shell",children:(0,a.jsx)("p",{className:"account-meta",children:"Reading invite…"})}):"bad"===o?(0,a.jsx)("main",{className:"join-shell",children:(0,a.jsx)("p",{children:"This invite link is invalid or has expired. Ask the sender for a new one."})}):(0,a.jsxs)("main",{className:"join-shell",style:{maxWidth:480,margin:"0 auto",padding:"48px 16px"},children:[(0,a.jsx)("div",{style:{textAlign:"center",marginBottom:8},children:"◆ madarX"}),(0,a.jsx)("div",{className:"account-meta",style:{textAlign:"center",color:"var(--accent-600)",letterSpacing:"0.08em"},children:"JOIN ORGANIZATION"}),(0,a.jsxs)("h1",{style:{textAlign:"center"},children:["Join ",e.org||"this organization"]}),(0,a.jsxs)("div",{className:"admin-panel",children:[(0,a.jsxs)("div",{className:"admin-record",children:[(0,a.jsx)("span",{children:"Organization"}),(0,a.jsx)("strong",{children:e.org||"—"})]}),(0,a.jsxs)("div",{className:"admin-record",children:[(0,a.jsx)("span",{children:"Connects to"}),(0,a.jsx)("code",{style:{fontFamily:"monospace",padding:"2px 8px",border:"1px solid var(--accent-500)",borderRadius:6},children:d||e.url})]})]}),(0,a.jsxs)("p",{className:"account-meta",children:["This connects your local app to ",e.org||"this"," cloud workspace. Your existing local data stays on your machine."]}),c?(0,a.jsx)("p",{role:"alert",style:{color:"var(--accent-600)"},children:c}):null,(0,a.jsx)("button",{className:"admin-btn-primary",style:{width:"100%"},disabled:"joining"===o,onClick:h,children:"joining"===o?"Joining…":"Join ".concat(e.org||"organization")}),(0,a.jsx)("div",{style:{textAlign:"center",marginTop:12},children:(0,a.jsx)("a",{href:"/",className:"account-meta",children:"Cancel"})})]})}},8765:(e,n,t)=>{Promise.resolve().then(t.bind(t,7323))}},e=>{e.O(0,[8441,1255,7358],()=>e(e.s=8765)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{1290:()=>{},2455:(e,t,a)=>{Promise.resolve().then(a.bind(a,3455)),Promise.resolve().then(a.bind(a,7438)),Promise.resolve().then(a.t.bind(a,2295,23)),Promise.resolve().then(a.t.bind(a,1290,23))},3455:(e,t,a)=>{"use strict";a.d(t,{default:()=>g});var s=a(5155),r=a(2115),n=a(63);let l=[{id:"set-anthropic-key",title:"Set Anthropic API key",category:"Credentials",keywords:["anthropic","api key","claude","apikey","llm","token","cloud engine"],kind:"secret",secretName:"ANTHROPIC_API_KEY",field:{label:"ANTHROPIC_API_KEY",type:"password",placeholder:"sk-ant-…",help:"Used by the Anthropic cloud engine. Stored encrypted in the secrets vault."},settingsHref:"/settings/tools",docSlug:"set-anthropic-key"},{id:"set-resend-key",title:"Set Resend API key (email)",category:"Credentials",keywords:["resend","email","api key","smtp","send mail"],kind:"secret",secretName:"RESEND_API_KEY",field:{label:"RESEND_API_KEY",type:"password",placeholder:"re_…",help:"Enables the email tool. Encrypted at rest."},settingsHref:"/settings/connectors",docSlug:"set-resend-key"},{id:"set-github-token",title:"Set GitHub token",category:"Credentials",keywords:["github","token","pat","api key","git","repo"],kind:"secret",secretName:"GITHUB_TOKEN",field:{label:"GITHUB_TOKEN",type:"password",placeholder:"ghp_… / github_pat_…",help:"Personal access token for the GitHub tool adapter."},settingsHref:"/settings/connectors",docSlug:"set-github-token"},{id:"set-supabase-url",title:"Set Supabase URL",category:"Credentials",keywords:["supabase","url","database","project url","connect"],kind:"secret",secretName:"SUPABASE_URL",field:{label:"SUPABASE_URL",type:"text",placeholder:"https://xxxx.supabase.co",help:"Project URL for Supabase writes + shared cloud layer."},settingsHref:"/settings/connectors",docSlug:"connect-supabase"},{id:"set-supabase-service-key",title:"Set Supabase service-role key",category:"Credentials",keywords:["supabase","service role","key","api key","secret","database"],kind:"secret",secretName:"SUPABASE_SERVICE_ROLE_KEY",field:{label:"SUPABASE_SERVICE_ROLE_KEY",type:"password",placeholder:"eyJ…",help:"Server-side service-role key. Never exposed to the browser."},settingsHref:"/settings/connectors",docSlug:"connect-supabase"},{id:"set-default-model",title:"Set default model",category:"Agent runtime",keywords:["model","default model","llm","opus","sonnet","haiku","picker"],kind:"config",configKey:"model",field:{label:"Default model",type:"select",help:"Model the main agent uses by default.",options:[{value:"claude-opus-4-7",label:"Opus 4.7"},{value:"claude-sonnet-4-6",label:"Sonnet 4.6"},{value:"claude-haiku-4-5-20251001",label:"Haiku 4.5"}]},settingsHref:"/settings/engines",docSlug:"choose-agent-engine"},{id:"set-design-style",title:"Set artifact design style",category:"Agent runtime",keywords:["design","style","aesthetic","minimal","bold","soft","balanced","artifact"],kind:"config",configKey:"designStyle",field:{label:"Design style",type:"select",help:"Visual style agents use when producing artifacts.",options:[{value:"balanced",label:"Balanced"},{value:"minimal",label:"Minimal"},{value:"bold",label:"Bold"},{value:"soft",label:"Soft"}]},settingsHref:"/settings/brand",docSlug:null},{id:"set-trust-mode",title:"Set main-agent trust mode",category:"Agent runtime",keywords:["trust","trust mode","auto","approval","safety","permission","gate"],kind:"trust-mode",field:{label:"Trust mode",type:"select",help:"Warning: auto lets the main agent run high-and-below risk tool calls WITHOUT asking you first (irreversible_external is always gated). Saving auto confirms this. approval_required is the safe default.",options:[{value:"approval_required",label:"Approval required (safe default)"},{value:"auto",label:"Auto (skip gate for ≤ high risk)"}]},settingsHref:"/settings/advanced",docSlug:"set-trust-mode"}],i=[{id:"start-whatsapp-bridge",slug:"start-whatsapp-bridge",title:"Start the WhatsApp bridge",summary:"Pair a dedicated WhatsApp number and run the gateway daemon so agents can send and receive messages.",category:"Channels",keywords:["whatsapp","bridge","gateway","baileys","pair","daemon","messages"],related:["secrets-vault-overview"]},{id:"set-api-key",slug:"set-api-key",title:"Set an API key",summary:"How API keys and secrets are stored, and the fastest way to add one from anywhere with Cmd+K.",category:"Credentials",keywords:["api key","secret","credential","token","vault","set key"],related:["set-anthropic-key","connect-supabase","secrets-vault-overview"]},{id:"set-anthropic-key",slug:"set-anthropic-key",title:"Set the Anthropic API key",summary:"Add the Anthropic key that powers the cloud engine.",category:"Credentials",keywords:["anthropic","api key","claude","cloud engine","llm"],related:["choose-agent-engine","set-api-key"]},{id:"set-resend-key",slug:"set-resend-key",title:"Set the Resend API key (email)",summary:"Enable the email tool by adding a Resend key.",category:"Credentials",keywords:["resend","email","api key","send mail"],related:["set-api-key"]},{id:"set-github-token",slug:"set-github-token",title:"Set a GitHub token",summary:"Add a personal access token to unlock the GitHub tool adapter.",category:"Credentials",keywords:["github","token","pat","repo","api key"],related:["set-api-key"]},{id:"connect-supabase",slug:"connect-supabase",title:"Connect Supabase",summary:"Wire up Supabase URL and keys for database writes and the shared cloud layer.",category:"Credentials",keywords:["supabase","database","connect","url","service role","shared cloud"],related:["set-api-key","secrets-vault-overview"]},{id:"choose-agent-engine",slug:"choose-agent-engine",title:"Choose an agent engine",summary:"Pick between claude-code, anthropic, ollama, codex, and hermes — and what each needs.",category:"Agent runtime",keywords:["engine","model","claude-code","ollama","codex","hermes","anthropic","local"],related:["set-anthropic-key"]},{id:"set-trust-mode",slug:"set-trust-mode",title:"Set trust mode",summary:"Control whether the main agent gates risky tool calls or runs them automatically.",category:"Agent runtime",keywords:["trust","trust mode","auto","approval","safety","risk","gate"],related:["create-agent"]},{id:"create-agent",slug:"create-agent",title:"Create an agent",summary:"Spin up a worker, set its schedule, scope its tools, and run it.",category:"Getting started",keywords:["agent","create","worker","new agent","caretaker","roster"],related:["schedules-and-cron","set-trust-mode"]},{id:"schedules-and-cron",slug:"schedules-and-cron",title:"Schedules and cron",summary:"How schedules queue durable heartbeat work, backfill missed windows, and run automatically.",category:"Getting started",keywords:["schedule","cron","daily","heartbeat","backfill","recurring"],related:["create-agent"]},{id:"secrets-vault-overview",slug:"secrets-vault-overview",title:"Secrets vault overview",summary:"Where credentials live, how they are encrypted, and why values are never shown back.",category:"Credentials",keywords:["secrets","vault","encryption","aes","master key","security"],related:["set-api-key"]},{id:"keyboard-shortcuts",slug:"keyboard-shortcuts",title:"Keyboard shortcuts",summary:"Every shortcut, including Cmd+K smart search and the composer keys.",category:"Getting started",keywords:["keyboard","shortcut","cmd k","command","hotkey","search"],related:[]}];function o(e){var t,a;let{action:l,current:i,onClose:o,onSaved:c}=e;(0,n.useRouter)();let d=(0,r.useRef)(null),u=l.field,[h,p]=(0,r.useState)("select"===u.type&&((null==i?void 0:i.value)||(null==(a=u.options)||null==(t=a[0])?void 0:t.value))||""),[m,g]=(0,r.useState)(!1),[f,y]=(0,r.useState)(""),[v,k]=(0,r.useState)(!1);async function b(e){if(e.preventDefault(),m)return;let t=String(h).trim();if(!t)return void y("Enter a value.");g(!0),y("");try{let{endpoint:e,method:s,body:r}=function(e,t){switch(e.kind){case"secret":return{endpoint:"/api/secrets",method:"POST",body:{name:e.secretName,value:t,scope:"global",source:"help-modal"}};case"config":return{endpoint:"/api/config",method:"PUT",body:{[e.configKey]:t}};case"trust-mode":return{endpoint:"/api/settings/trust-mode",method:"PATCH",body:"auto"===t?{mode:t,confirm:!0}:{mode:t}};default:throw Error("unknown action kind: ".concat(e.kind))}}(l,t),n=await fetch(e,{method:s,headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(!n.ok){if(403===n.status)y("You need admin or owner access to change this.");else if(401===n.status)y("Sign in to change this setting.");else{let e=await n.text().catch(()=>""),t=e;try{var a;t=(null==(a=JSON.parse(e))?void 0:a.error)||e}catch(e){}y(t||"Failed (".concat(n.status,")."))}g(!1);return}k(!0),g(!1),null==c||c(l),window.setTimeout(()=>o(),700)}catch(e){y((null==e?void 0:e.message)||"Network error."),g(!1)}}(0,r.useEffect)(()=>{let e=window.setTimeout(()=>{var e;return null==(e=d.current)?void 0:e.focus()},0);return()=>window.clearTimeout(e)},[]),(0,r.useEffect)(()=>{function e(e){"Escape"===e.key&&(e.preventDefault(),o())}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[o]);let w=function(e,t){if(!t)return null;if("secret"===e.kind)return"set"===t.status?"Currently set":"Not set";if(null!=t.value){var a;let s=null==(a=e.field.options)?void 0:a.find(e=>e.value===t.value);return"Currently: ".concat(s?s.label:t.value)}return null}(l,i);return(0,s.jsx)("div",{className:"help-value-overlay",role:"presentation",onMouseDown:e=>{e.target===e.currentTarget&&o()},children:(0,s.jsxs)("form",{className:"help-value-modal",role:"dialog","aria-modal":"true","aria-label":l.title,onSubmit:b,children:[(0,s.jsxs)("header",{className:"help-value-head",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("small",{children:l.category}),(0,s.jsx)("h2",{children:l.title})]}),(0,s.jsx)("button",{type:"button",className:"help-value-close",onClick:o,"aria-label":"Close",children:"esc"})]}),(0,s.jsxs)("div",{className:"help-value-body",children:[(0,s.jsxs)("label",{className:"help-value-field",children:[(0,s.jsxs)("span",{className:"help-value-label",children:[u.label,w?(0,s.jsx)("em",{className:"help-value-status",children:w}):null]}),"select"===u.type?(0,s.jsx)("select",{ref:d,value:h,onChange:e=>p(e.target.value),disabled:m||v,children:u.options.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))}):(0,s.jsx)("input",{ref:d,type:"password"===u.type?"password":"text",value:h,placeholder:u.placeholder||"",onChange:e=>p(e.target.value),disabled:m||v,autoComplete:"off",spellCheck:!1})]}),u.help?(0,s.jsx)("p",{className:"help-value-help",children:u.help}):null,f?(0,s.jsx)("p",{className:"help-value-error",role:"alert",children:f}):null,v?(0,s.jsx)("p",{className:"help-value-ok",role:"status",children:"Saved."}):null]}),(0,s.jsxs)("footer",{className:"help-value-foot",children:[(0,s.jsxs)("div",{className:"help-value-links",children:[(0,s.jsx)("a",{href:l.settingsHref,onClick:o,children:"Open full settings"}),l.docSlug?(0,s.jsx)("a",{href:"/help/".concat(l.docSlug),onClick:o,children:"Read the guide"}):null]}),(0,s.jsxs)("div",{className:"help-value-actions",children:[(0,s.jsx)("button",{type:"button",className:"help-value-btn ghost",onClick:o,disabled:m,children:"Cancel"}),(0,s.jsx)("button",{type:"submit",className:"help-value-btn primary",disabled:m||v,children:m?"Saving…":"Save"})]})]})]})})}let c=[{title:"Overview",href:"/",section:"Navigate",keys:["dashboard","home","canvas","main"]},{title:"Agents",href:"/agents",section:"Navigate",keys:["agent","worker","roster","team"]},{title:"Tasks",href:"/tasks",section:"Navigate",keys:["task","work","todo","kanban"]},{title:"Approvals",href:"/approvals",section:"Navigate",keys:["approve","permission","review"]},{title:"Tools",href:"/tools",section:"Navigate",keys:["tool","connector","capability"]},{title:"Schedules",href:"/schedules",section:"Navigate",keys:["cron","schedule","calendar"]},{title:"Reports",href:"/reports",section:"Navigate",keys:["report","artifact","brief"]},{title:"Activity",href:"/activity",section:"Navigate",keys:["activity","runs","history"]},{title:"Runtime",href:"/runtime",section:"Navigate",keys:["runtime","diagnostics","heartbeat","process"]},{title:"Brand",href:"/brand",section:"Navigate",keys:["brand","identity","design"]},{title:"Settings",href:"/settings",section:"Navigate",keys:["settings","config","preferences"]},{title:"Help",href:"/help",section:"Navigate",keys:["help","guide","docs","documentation","shortcuts"]}],d=[{id:"focus-main-agent",title:"Focus main agent composer",detail:"Jump to the prompt box without leaving the keyboard.",section:"Action",shortcut:"⌘J",keys:["chat","composer","prompt","ask","agent"],run:e=>{let{router:t,pathname:a}=e;"/"!==a?(t.push("/"),window.setTimeout(()=>window.dispatchEvent(new Event("madarx:focus-composer")),180)):window.dispatchEvent(new Event("madarx:focus-composer"))}},{id:"new-chat",title:"New main-agent chat",detail:"Fresh conversation without using ⌘N, which belongs to the browser.",section:"Action",shortcut:"⌘⇧J",keys:["new","session","chat","fresh"],run:e=>{let{router:t,pathname:a}=e;"/"!==a&&t.push("/"),window.setTimeout(()=>window.dispatchEvent(new Event("madarx:new-chat")),180*("/"!==a))}},{id:"settings-modal",title:"Open agent configuration",detail:"Close to the right thumb, but avoids browser-level ⌘, preferences.",section:"Action",shortcut:"⌘;",keys:["settings","preferences","config","model"],run:e=>{let{router:t,pathname:a}=e;"/"!==a?(t.push("/"),window.setTimeout(()=>window.dispatchEvent(new Event("madarx:open-config")),180)):window.dispatchEvent(new Event("madarx:open-config"))}},{id:"shortcut-help",title:"Show keyboard shortcuts",detail:"Open this palette and filter to shortcut help.",section:"Action",shortcut:"⌘/",keys:["keyboard","shortcut","help","command"],run:e=>{let{openWithQuery:t}=e;return t("shortcuts")}}],u=[{title:"Open smart search",detail:"⌘Space or ⌘K. Thumb + home-row fallback; Ctrl Space also works when macOS owns Spotlight.",section:"Shortcuts",keys:["shortcut","search","spotlight","command space"]},{title:"Focus main agent",detail:"⌘J. Right thumb + index on home row; avoids browser shortcuts.",section:"Shortcuts",keys:["shortcut","composer","prompt"]},{title:"New chat",detail:"⌘⇧J. Same hand position as focus, with Shift; avoids ⌘N.",section:"Shortcuts",keys:["shortcut","new chat","session"]},{title:"Agents / Tasks / Runtime",detail:"⌘⇧A, ⌘⇧T, ⌘⇧D. Left-hand clusters for common operating surfaces.",section:"Shortcuts",keys:["shortcut","navigation","agents","tasks","runtime"]},{title:"Agent settings",detail:"⌘; sits under the right hand and avoids browser Preferences on ⌘,.",section:"Shortcuts",keys:["shortcut","settings","preferences"]}];function h(e){return String(e||"").toLowerCase().trim()}function p(){let e=(0,n.useRouter)(),t=(0,n.usePathname)(),a=(0,r.useRef)(null),[p,m]=(0,r.useState)(!1),[g,f]=(0,r.useState)(""),[y,v]=(0,r.useState)(0),[k,b]=(0,r.useState)({}),[w,x]=(0,r.useState)(!1),[j,N]=(0,r.useState)(null),S=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/help",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),a={};for(let e of t.actions||[])a[e.id]=e.current;b(a),x(!0)}catch(e){}},[]),A=(0,r.useMemo)(()=>{let e=c.map(e=>({...e,id:"nav:".concat(e.href),kind:"nav",detail:"/"===e.href?"Return to the main command center.":"Open ".concat(e.href),run:t=>{let{router:a}=t;return a.push(e.href)}}));return[...d,...l.map(e=>{var t;return{id:"set:".concat(e.id),kind:"setting",action:e,title:e.title,detail:(null==(t=e.field)?void 0:t.help)||"Set this value.",section:"Set",keys:e.keywords}}),...i.map(e=>({id:"doc:".concat(e.slug),kind:"doc",title:e.title,detail:e.summary,section:"Doc",href:"/help/".concat(e.slug),keys:e.keywords})),...e,...u]},[]),E=(0,r.useMemo)(()=>{let e=h(g);if(!e)return A.slice(0,10);let t=e.split(/\s+/).filter(Boolean);return A.map(a=>{let s=[a.title,a.detail,a.section,a.href,...a.keys||[]].filter(Boolean).join(" ").toLowerCase(),r=t.reduce((e,t)=>e+ +!!s.includes(t),0),n=3*!!h(a.title).startsWith(e);return{item:a,score:r+n}}).filter(e=>{let{score:t}=e;return t>0}).sort((e,t)=>t.score-e.score||e.item.title.localeCompare(t.item.title)).map(e=>{let{item:t}=e;return t}).slice(0,12)},[A,g]),C=e=>{f(e||""),m(!0),v(0)},_=()=>{m(!1),f(""),v(0)},P=(0,r.useCallback)(e=>{let t=l.find(t=>t.id===e);t&&N(t)},[]),T=(0,r.useCallback)(()=>N(null),[]),K=a=>{if(a){if("setting"===a.kind){N(a.action),_();return}if("doc"===a.kind){e.push(a.href),_();return}a.run&&(a.run({router:e,pathname:t,openWithQuery:C}),"Shortcuts"!==a.section&&_())}};(0,r.useEffect)(()=>{(p||j)&&!w&&S()},[p,j,w,S]),(0,r.useEffect)(()=>{if(!p)return;let e=window.setTimeout(()=>{var e;return null==(e=a.current)?void 0:e.focus()},0);return()=>window.clearTimeout(e)},[p]),(0,r.useEffect)(()=>{v(0)},[g,p]),(0,r.useEffect)(()=>{function e(e){var t;let a=null==e||null==(t=e.detail)?void 0:t.id;a&&P(a)}return window.addEventListener("madarx:open-setting",e),()=>window.removeEventListener("madarx:open-setting",e)},[P]),(0,r.useEffect)(()=>{function a(a){let s=a.key.toLowerCase(),r=a.metaKey||a.ctrlKey,n=function(e){var t;let a=null==e||null==(t=e.tagName)?void 0:t.toLowerCase();return(null==e?void 0:e.isContentEditable)||"input"===a||"textarea"===a||"select"===a}(a.target);if(p){if("Escape"===a.key){a.preventDefault(),_();return}if("ArrowDown"===a.key){a.preventDefault(),v(e=>Math.min(e+1,Math.max(0,E.length-1)));return}if("ArrowUp"===a.key){a.preventDefault(),v(e=>Math.max(0,e-1));return}if("Enter"===a.key){a.preventDefault(),K(E[y]);return}}if(a.metaKey&&"Space"===a.code||a.metaKey&&"k"===s||a.ctrlKey&&"Space"===a.code){a.preventDefault(),m(e=>(e||N(null),!e));return}if(r&&!n){if(a.metaKey&&"j"===s&&!a.shiftKey){a.preventDefault(),d[0].run({router:e,pathname:t});return}if(a.metaKey&&"j"===s&&a.shiftKey){a.preventDefault(),d[1].run({router:e,pathname:t});return}if(a.metaKey&&";"===s){a.preventDefault(),d[2].run({router:e,pathname:t});return}if(a.metaKey&&"/"===s){a.preventDefault(),C("shortcuts");return}a.metaKey&&a.shiftKey&&["a","t","d"].includes(s)&&(a.preventDefault(),e.push("a"===s?"/agents":"t"===s?"/tasks":"/runtime"))}}return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[y,p,t,E,e]);let R=j?(0,s.jsx)(o,{action:j,current:k[j.id],onClose:T,onSaved:S}):null;return p?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"smart-search-overlay",role:"presentation",onMouseDown:e=>{e.target===e.currentTarget&&_()},children:(0,s.jsxs)("section",{className:"smart-search-panel",role:"dialog","aria-modal":"true","aria-label":"Smart search",children:[(0,s.jsxs)("div",{className:"smart-search-head",children:[(0,s.jsx)("span",{className:"smart-search-orb","aria-hidden":"true"}),(0,s.jsx)("input",{ref:a,value:g,onChange:e=>f(e.target.value),placeholder:"Search docs, settings, pages…","aria-label":"Search madarX OS"}),(0,s.jsx)("kbd",{children:"esc"})]}),(0,s.jsx)("div",{className:"smart-search-results",role:"listbox","aria-label":"Smart search results",children:E.length?E.map((e,t)=>{let a="setting"===e.kind?k[e.action.id]:null,r=a&&"secret"===e.action.kind&&"set"===a.status?"Set":null;return(0,s.jsxs)("button",{type:"button",className:"smart-search-row"+(t===y?" is-active":""),onMouseEnter:()=>v(t),onClick:()=>K(e),role:"option","aria-selected":t===y,children:[(0,s.jsxs)("span",{className:"smart-search-row-main",children:[(0,s.jsxs)("small",{children:[(0,s.jsx)("span",{className:"smart-search-kind kind-".concat(e.kind||"nav"),children:e.section}),r?(0,s.jsx)("span",{className:"smart-search-pill",children:r}):null]}),(0,s.jsx)("b",{children:e.title}),(0,s.jsx)("em",{children:e.detail})]}),e.shortcut?(0,s.jsx)("kbd",{children:e.shortcut}):e.href?(0,s.jsx)("kbd",{children:e.href}):null]},e.id||e.title)}):(0,s.jsx)("div",{className:"smart-search-empty",children:"No matches. Try “api key”, “whatsapp”, “agent”, or “shortcut”."})}),(0,s.jsxs)("footer",{className:"smart-search-foot",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("kbd",{children:"↑"}),(0,s.jsx)("kbd",{children:"↓"})," select"]}),(0,s.jsxs)("span",{children:[(0,s.jsx)("kbd",{children:"return"})," open"]}),(0,s.jsxs)("span",{children:[(0,s.jsx)("kbd",{children:"⌘J"})," composer"]})]})]})}),R]}):R}let m=["/login","/share"];function g(e){let{children:t,sidebar:a}=e,l=(0,n.usePathname)();return(0,r.useMemo)(()=>m.some(e=>l===e||(null==l?void 0:l.startsWith("".concat(e,"/")))),[l])?(0,s.jsx)("div",{className:"chromeless-page",children:t}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"app-shell",children:[(0,s.jsx)("div",{className:"app-rail",children:null!=a?a:null}),(0,s.jsx)("div",{className:"app-content",children:t})]}),(0,s.jsx)(p,{})]})}},7438:(e,t,a)=>{"use strict";a.d(t,{default:()=>R});var s=a(5155),r=a(2619),n=a.n(r),l=a(63),i=a(9565),o=a(7629),c=a(8987),d=a(5709),u=a(1516),h=a(4733),p=a(1745),m=a(4597),g=a(1092),f=a(5893),y=a(6351),v=a(7657),k=a(3437),b=a(6898),w=a(4227),x=a(1042),j=a(3916),N=a(8080),S=a(4333),A=a(2115);let E=[{group:"work",name:"Overview",href:"/",icon:c.A},{group:"work",name:"Projects",href:"/projects",icon:d.A},{group:"work",name:"Agents",href:"/agents",icon:u.A},{group:"work",name:"Tasks",href:"/tasks",icon:h.A},{group:"work",name:"Workflows",href:"/workflows",icon:p.A},{group:"work",name:"Approvals",href:"/approvals",icon:m.A},{group:"library",name:"Marketplace",href:"/marketplace",icon:g.A}],C={Pickaxe:f.A,Boxes:y.A,Gem:v.A,FlaskConical:k.A,Factory:b.A,Building2:w.A,Package:g.A,FolderOpen:d.A,Workflow:p.A},_=[{name:"Settings",icon:x.A,href:"/settings"}];function P(e,t){return!!e&&("/"===t?"/"===e:e===t||e.startsWith("".concat(t,"/")))}function T(e){var t,a;null==(a=e.currentTarget)||null==(t=a.blur)||t.call(a)}function K(e){let{item:t,active:a}=e,r=t.icon;return(0,s.jsxs)(n(),{href:t.href,prefetch:!0,"aria-label":t.name,"aria-current":a?"page":void 0,"data-active":a?"true":void 0,onClick:T,className:"".concat("relative flex items-center justify-center p-2 rounded-lg transition-colors duration-150 group"," ").concat(a?"text-[#C2452A]":"text-[#69707a] hover:text-[#111318] hover:bg-[rgba(17,19,24,0.08)] active:bg-[rgba(17,19,24,0.12)]"),children:[(0,s.jsx)(r,{className:"w-5 h-5",strokeWidth:1.75,"aria-hidden":"true"}),(0,s.jsx)("span",{className:"absolute left-12 px-2 py-1 rounded-md whitespace-nowrap text-xs text-white bg-[#111318] hidden group-hover:inline-block group-focus-visible:inline-block z-50 shadow-lg pointer-events-none",children:t.name})]})}function R(e){let{moduleNav:t=[]}=e,a=(0,l.usePathname)(),{session:r,signOut:c}=function(){let[e,t]=(0,A.useState)(null),a=(0,l.useRouter)();return(0,A.useEffect)(()=>{let e=!0;return fetch("/api/auth/session",{cache:"no-store"}).then(e=>e.json()).then(a=>{e&&t((null==a?void 0:a.user)||null)}).catch(()=>{e&&t(null)}),()=>{e=!1}},[]),{session:e,signOut:async function(){await fetch("/api/auth/session",{method:"DELETE"}).catch(()=>null),a.replace("/login"),a.refresh()}}}(),d=(Array.isArray(t)?t:[]).map(e=>({group:"module",name:e.label,href:e.href,icon:C[e.icon]||y.A})),u=[...E.filter(e=>"work"===e.group),...d,...E.filter(e=>"library"===e.group)],h=(null==r?void 0:r.email)||"Local owner",p="local"===((null==r?void 0:r.auth_mode)||"local"),m=((null==r?void 0:r.email)||(null==r?void 0:r.display_name)||"AK").slice(0,2).toUpperCase();return(0,s.jsxs)("aside",{className:"relative z-30 h-full w-full rounded-[18px] border border-white/75 bg-[var(--glass)] backdrop-blur-[22px] backdrop-saturate-150 shadow-[0_18px_54px_rgba(37,36,34,0.16)] flex flex-col","aria-label":"Primary navigation",children:[(0,s.jsx)("div",{className:"h-20 flex items-center justify-center px-3 shrink-0",children:(0,s.jsx)(n(),{href:"/",prefetch:!0,className:"flex-none","aria-label":"madarX home",onClick:T,children:(0,s.jsx)("img",{src:"/madarx-mark.svg",alt:"madarX",width:32,height:32,className:"block text-[#111318]"})})}),(0,s.jsxs)("div",{className:"flex-1 flex flex-col min-h-0",children:[(0,s.jsx)("ul",{className:"list-none m-0 p-0 px-3 text-sm font-medium flex-1 space-y-1",children:u.map((e,t)=>{let r=u[t-1],n=r&&r.group!==e.group,l=P(a,e.href);return(0,s.jsxs)("li",{children:[n?(0,s.jsx)("div",{"aria-hidden":"true",className:"mx-2 my-2 h-px bg-[rgba(20,22,26,0.09)]"}):null,(0,s.jsx)(K,{item:e,active:l})]},e.name)})}),(0,s.jsx)("ul",{className:"list-none m-0 p-0 px-3 pb-3 pt-2 text-sm font-medium space-y-1",children:_.map(e=>{let t=P(a,e.href);return(0,s.jsx)("li",{children:(0,s.jsx)(K,{item:e,active:t})},e.name)})}),(0,s.jsx)("div",{className:"relative py-4 px-3 border-t border-[rgba(20,22,26,0.09)] flex justify-center",children:(0,s.jsxs)(i.bL,{children:[(0,s.jsx)(i.l9,{className:"outline-none rounded-full border-0 bg-transparent p-0 appearance-none cursor-pointer focus-visible:ring-2 focus-visible:ring-[#111318] focus-visible:ring-offset-2 focus-visible:ring-offset-white/50","aria-label":"Account menu",children:(0,s.jsxs)(o.bL,{className:"w-10 h-10 rounded-full overflow-hidden cursor-pointer block",children:[(0,s.jsx)(o._V,{className:"w-full h-full object-cover",src:"/madarx-mark.svg",alt:"AK"}),(0,s.jsx)(o.H4,{className:"flex w-full h-full items-center justify-center text-white text-xs font-bold tracking-wider bg-gradient-to-br from-[#111318] to-[#565d6b]",delayMs:150,children:m})]})}),(0,s.jsx)(i.ZL,{children:(0,s.jsxs)(i.UC,{side:"right",align:"end",sideOffset:12,className:"w-64 rounded-xl bg-white shadow-[0_22px_60px_rgba(17,19,24,0.20)] border border-[rgba(20,22,26,0.09)] text-sm text-[#59606b] p-2 z-[100]",children:[(0,s.jsx)("div",{className:"px-2 py-1.5 text-[11px] uppercase tracking-[0.14em] text-[var(--accent-600)] font-bold",children:p?"Local operator":"Signed in"}),(0,s.jsx)("span",{className:"block text-[#68707b] px-2 pb-2 truncate",children:h}),(0,s.jsx)(i.q7,{asChild:!0,className:"outline-none",children:(0,s.jsx)(n(),{href:"/",className:"block w-full p-2 text-left rounded-md hover:bg-[rgba(17,19,24,0.05)] active:bg-[rgba(17,19,24,0.1)] duration-150 cursor-pointer no-underline text-[#313740]",children:"Dashboard"})}),(0,s.jsx)(i.q7,{asChild:!0,className:"outline-none",children:(0,s.jsx)(n(),{href:"/settings",className:"block w-full p-2 text-left rounded-md hover:bg-[rgba(17,19,24,0.05)] active:bg-[rgba(17,19,24,0.1)] duration-150 cursor-pointer no-underline text-[#313740]",children:"Settings"})}),(0,s.jsx)(i.q7,{className:"outline-none",onSelect:e=>e.preventDefault(),children:(0,s.jsxs)("div",{className:"relative rounded-md hover:bg-[rgba(17,19,24,0.05)] duration-150",children:[(0,s.jsx)(j.A,{"aria-hidden":"true",className:"w-4 h-4 absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none text-[#68707b]"}),(0,s.jsxs)("select",{className:"w-full cursor-pointer appearance-none bg-transparent p-2 pr-7 outline-none text-[#313740]",defaultValue:"",children:[(0,s.jsx)("option",{value:"",disabled:!0,hidden:!0,children:"Theme"}),(0,s.jsx)("option",{value:"light",children:"Light"}),(0,s.jsx)("option",{value:"dark",children:"Dark"})]})]})}),(0,s.jsx)(i.wv,{className:"my-1 h-px bg-[rgba(20,22,26,0.09)]"}),p?(0,s.jsx)(i.q7,{asChild:!0,className:"outline-none",children:(0,s.jsxs)(n(),{href:"/settings/account",className:"flex items-center gap-x-2 w-full p-2 text-left rounded-md hover:bg-[rgba(17,19,24,0.05)] active:bg-[rgba(17,19,24,0.1)] duration-150 cursor-pointer no-underline text-[#313740]",children:[(0,s.jsx)(N.A,{className:"w-4 h-4",strokeWidth:1.75}),"Sign in with an account"]})}):(0,s.jsx)(i.q7,{asChild:!0,className:"outline-none",children:(0,s.jsxs)("button",{type:"button",onClick:c,className:"flex items-center gap-x-2 w-full p-2 text-left rounded-md hover:bg-[rgba(17,19,24,0.05)] active:bg-[rgba(17,19,24,0.1)] duration-150 cursor-pointer text-[#313740]",children:[(0,s.jsx)(S.A,{className:"w-4 h-4",strokeWidth:1.75}),"Sign out"]})})]})})]})})]})]})}}},e=>{e.O(0,[3045,1741,2619,2309,8441,1255,7358],()=>e(e.s=2455)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[64,72,167,178,232,332,489,497,552,658,723,767,769,796,870,888,939,972,1053,1115,1177,1426,1523,1557,1562,1581,1672,1851,1990,2008,2139,2153,2162,2164,2175,2254,2334,2343,2433,2635,2640,2711,2726,2748,2837,2873,2943,3033,3076,3159,3190,3203,3395,3437,3465,3492,3499,3554,3558,3577,3629,3630,3641,3659,3745,3756,3802,3839,3870,3886,3904,3905,3942,3975,3976,4094,4095,4104,4115,4190,4204,4209,4218,4229,4231,4269,4373,4410,4431,4475,4507,4519,4530,4537,4662,4721,4819,4890,4999,5049,5085,5092,5098,5118,5120,5130,5169,5180,5207,5223,5289,5324,5331,5441,5520,5551,5588,5610,5689,5707,5722,5743,5794,5810,5850,5887,5903,5906,6002,6079,6113,6147,6186,6234,6278,6279,6341,6365,6403,6456,6496,6591,6595,6621,6667,6701,6725,6779,6799,6816,6862,7020,7060,7070,7092,7113,7237,7276,7324,7361,7440,7750,7765,7795,7823,7903,7920,7986,8059,8093,8100,8159,8227,8252,8273,8298,8312,8397,8401,8405,8578,8591,8665,8679,8732,8765,8828,8887,8907,8994,9e3,9037,9040,9154,9160,9183,9413,9442,9504,9554,9628,9873],{4441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{407:(e,n,t)=>{Promise.resolve().then(t.bind(t,7622))},7622:(e,n,t)=>{"use strict";t.d(n,{default:()=>u});var i=t(5155),s=t(2115),a=t(5704);function o(){return(0,i.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M5 12h14M12 5l7 7-7 7"})})}function l(){return(0,i.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,i.jsx)("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),(0,i.jsx)("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),(0,i.jsx)("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),(0,i.jsx)("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]})}function r(){return(0,i.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,i.jsx)("rect",{x:"1",y:"1",width:"10",height:"10",fill:"#f25022"}),(0,i.jsx)("rect",{x:"13",y:"1",width:"10",height:"10",fill:"#7fba00"}),(0,i.jsx)("rect",{x:"1",y:"13",width:"10",height:"10",fill:"#00a4ef"}),(0,i.jsx)("rect",{x:"13",y:"13",width:"10",height:"10",fill:"#ffb900"})]})}let c={width:"100%",padding:"13px 14px",borderRadius:14,border:"1px solid rgba(232,232,229,.18)",background:"rgba(255,255,255,.06)",color:"#E8E8E5",outline:"none",fontSize:14},d={width:"100%",minHeight:46,border:0,borderRadius:14,background:"#E8E8E5",color:"#0F0F11",fontWeight:800,display:"inline-flex",alignItems:"center",justifyContent:"center",gap:8,cursor:"pointer",letterSpacing:"-0.01em"},h={...d,background:"rgba(232,232,229,.06)",color:"#E8E8E5",border:"1px solid rgba(232,232,229,.16)"};function u(e){let{authMode:n,nextPath:u="/",errorCode:g="",forceSupabase:p=!1}=e,[x,m]=(0,s.useState)("password"),[j,b]=(0,s.useState)(""),[f,v]=(0,s.useState)(""),[y,S]=(0,s.useState)(!1),[k,w]=(0,s.useState)(g?"Supabase could not complete sign-in. Try again.":""),N="string"==typeof u&&u.startsWith("/")?u:"/",[C,E]=(0,s.useState)(null),[O,A]=(0,s.useState)(!1),[_,L]=(0,s.useState)(!1),[I,B]=(0,s.useState)("");(0,s.useEffect)(()=>{let e=!0;return fetch("/api/auth/config",{cache:"no-store"}).then(e=>e.json()).then(n=>{e&&E(n)}).catch(()=>{e&&E({authMode:n,supabaseConfigured:!1})}),()=>{e=!1}},[n]);let P="local"===n,M=!!((null==C?void 0:C.supabaseUrl)&&(null==C?void 0:C.supabaseAnonKey));async function T(){if(!I.trim())return void w("Enter the recovery token to reset.");A(!0),w("");try{let e=await fetch("/api/auth/config",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"save",mode:"local",recoveryToken:I.trim()})}),n=await e.json().catch(()=>({}));if(e.ok&&n.ok)return void window.location.assign("/");A(!1),w(403===e.status?"Invalid recovery token.":"Could not reset to local mode.")}catch(e){A(!1),w("Could not reset to local mode.")}}if(!(!P||p))return(0,i.jsx)("main",{className:"login-page-shell login-page-shell--local",children:(0,i.jsxs)("section",{className:"login-local-card",children:[(0,i.jsxs)("div",{className:"login-wordmark",children:["madar",(0,i.jsx)("span",{children:"X"})," OS"]}),(0,i.jsx)("h1",{children:"Local operator mode is active."}),(0,i.jsx)("p",{children:"No Supabase sign-in is required in local mode. You are authenticated as the local owner and artifact sharing uses the local signed-link registry."}),(0,i.jsxs)("a",{className:"login-link-button",href:N,children:["Enter dashboard ",(0,i.jsx)(o,{})]}),(0,i.jsxs)("a",{className:"login-link-button login-link-button--ghost",href:"/settings/account",children:["Set up account sign-in ",(0,i.jsx)(o,{})]})]})});if(p&&P&&C&&!M)return(0,i.jsx)("main",{className:"login-page-shell login-page-shell--local",children:(0,i.jsxs)("section",{className:"login-local-card",children:[(0,i.jsxs)("div",{className:"login-wordmark",children:["madar",(0,i.jsx)("span",{children:"X"})," OS"]}),(0,i.jsx)("h1",{children:"Account sign-in is not set up yet."}),(0,i.jsxs)("p",{children:["Add your Supabase project URL, anon key, and service-role key in ",(0,i.jsx)("b",{children:"Settings → Account → Authentication"}),", then switch the mode to Supabase. No file editing required."]}),(0,i.jsxs)("a",{className:"login-link-button",href:"/settings/account",children:["Open authentication settings ",(0,i.jsx)(o,{})]}),(0,i.jsxs)("a",{className:"login-link-button login-link-button--ghost",href:N,children:["Back to dashboard ",(0,i.jsx)(o,{})]})]})});async function R(){let{createBrowserClient:e}=await Promise.all([t.e(5730),t.e(840)]).then(t.bind(t,9230)),n=null==C?void 0:C.supabaseUrl,i=null==C?void 0:C.supabaseAnonKey;if(!n||!i)throw Error("Supabase is not configured. Set it in Settings → Account.");return e(n,i)}async function U(e){e.preventDefault(),S(!0),w("");try{let e=await R(),n="".concat(window.location.origin,"/api/auth/callback?next=").concat(encodeURIComponent(N)),t="magic"===x?await e.auth.signInWithOtp({email:j,options:{emailRedirectTo:n}}):await e.auth.signInWithPassword({email:j,password:f});if(t.error)throw t.error;"magic"===x?w("Secure sign-in link sent to ".concat(j,".")):window.location.assign(N)}catch(e){w((null==e?void 0:e.message)||"Sign-in failed.")}finally{S(!1)}}async function X(e){S(!0),w("");try{let n=await R(),{error:t}=await n.auth.signInWithOAuth({provider:e,options:{redirectTo:"".concat(window.location.origin,"/api/auth/callback?next=").concat(encodeURIComponent(N))}});if(t)throw t}catch(e){w((null==e?void 0:e.message)||"SSO failed."),S(!1)}}return(0,i.jsxs)("main",{className:"login-page-shell",children:[(0,i.jsxs)("section",{className:"login-hero-panel","aria-label":"madarX OS landing",children:[(0,i.jsxs)("div",{className:"login-wordmark",children:["madar",(0,i.jsx)("span",{children:"X"})," OS"]}),(0,i.jsx)("p",{className:"login-kicker",children:"Institutional agent control plane"}),(0,i.jsx)("h1",{children:"AI generates. Humans approve. Regulators can inspect."}),(0,i.jsx)("p",{className:"login-lede",children:"Authenticate with Supabase, operate in an organization boundary, and share generated HTML artifacts through signed, expiring access links."}),(0,i.jsxs)("div",{className:"login-proof-grid",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("b",{children:"Supabase Auth"}),(0,i.jsx)("span",{children:"Email, magic link, Google, or Microsoft SSO sessions."})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("b",{children:"Artifact ACLs"}),(0,i.jsx)("span",{children:"Private, organization, team-ready, and link-scoped controls."})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("b",{children:"Audit ledger"}),(0,i.jsx)("span",{children:"Share creation, access, and revocation are recorded."})]})]})]}),(0,i.jsxs)("section",{className:"login-card","aria-label":"Sign in",children:[(0,i.jsxs)("div",{className:"login-card-head",children:[(0,i.jsx)("p",{children:"Secure access"}),(0,i.jsx)("h2",{children:"Sign in to continue"})]}),P?(0,i.jsxs)("div",{className:"login-message login-message--warn",children:["Server is in ",(0,i.jsx)("b",{children:"local mode"}),". You can test sign-in here, but sessions only persist after you switch the mode to Supabase in ",(0,i.jsx)("a",{href:"/settings/account",children:"Settings → Account"}),"."]}):null,(0,i.jsxs)("div",{className:"login-mode-toggle",role:"tablist","aria-label":"Sign-in method",children:[(0,i.jsx)("button",{type:"button",className:"password"===x?"active":"",onClick:()=>m("password"),children:"Password"}),(0,i.jsx)("button",{type:"button",className:"magic"===x?"active":"",onClick:()=>m("magic"),children:"Magic link"})]}),k?(0,i.jsx)("div",{className:"login-message",children:k}):null,(0,i.jsxs)("form",{onSubmit:U,className:"login-form",children:[(0,i.jsxs)("label",{children:["Email",(0,i.jsx)("input",{style:c,type:"email",value:j,onChange:e=>b(e.target.value),placeholder:"you@company.com",autoComplete:"email",required:!0})]}),"password"===x?(0,i.jsxs)("label",{children:["Password",(0,i.jsx)("input",{style:c,type:"password",value:f,onChange:e=>v(e.target.value),placeholder:"Password",autoComplete:"current-password",required:!0})]}):null,(0,i.jsxs)("button",{type:"submit",disabled:y,style:{...d,opacity:y?.65:1},children:[y?"Working...":"password"===x?"Sign in":"Send magic link"," ",y?null:(0,i.jsx)(o,{})]})]}),"true"===a.env.NEXT_PUBLIC_GOOGLE_SSO_ENABLED||"true"===a.env.NEXT_PUBLIC_MICROSOFT_SSO_ENABLED?(0,i.jsxs)("div",{className:"login-sso",children:[(0,i.jsx)("span",{children:"or continue with"}),"true"===a.env.NEXT_PUBLIC_GOOGLE_SSO_ENABLED?(0,i.jsxs)("button",{type:"button",onClick:()=>X("google"),style:h,children:[(0,i.jsx)(l,{})," Google"]}):null,"true"===a.env.NEXT_PUBLIC_MICROSOFT_SSO_ENABLED?(0,i.jsxs)("button",{type:"button",onClick:()=>X("azure"),style:h,children:[(0,i.jsx)(r,{})," Microsoft"]}):null]}):null,(0,i.jsx)("p",{className:"login-footnote",children:"Supabase stores identity. madarX OS stores local runtime state, artifact ACLs, and share-link audit events."}),P?null:_?(0,i.jsxs)("div",{className:"login-footnote",style:{display:"grid",gap:8},children:[(0,i.jsxs)("span",{children:["Paste the recovery token from ",(0,i.jsx)("code",{children:"data/.auth-recovery-token"})," on the server machine:"]}),(0,i.jsx)("input",{style:c,type:"text",value:I,onChange:e=>B(e.target.value),placeholder:"recovery token",autoComplete:"off"}),(0,i.jsx)("div",{children:(0,i.jsx)("button",{type:"button",onClick:T,disabled:O,className:"login-text-button",children:O?"Resetting…":"Confirm reset to local mode"})})]}):(0,i.jsxs)("p",{className:"login-footnote",children:["Locked out or misconfigured?"," ",(0,i.jsx)("button",{type:"button",onClick:()=>L(!0),className:"login-text-button",children:"Reset to local mode"})," ","(requires the on-disk recovery token)."]})]})]})}}},e=>{e.O(0,[8441,1255,7358],()=>e(e.s=407)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[64,72,167,178,232,332,489,497,552,658,723,767,769,796,870,888,939,972,1053,1115,1177,1426,1523,1557,1562,1581,1672,1851,1990,2008,2139,2153,2162,2164,2175,2254,2334,2343,2433,2635,2640,2711,2726,2748,2837,2873,2943,3033,3076,3159,3190,3203,3395,3437,3465,3492,3499,3554,3558,3577,3629,3630,3641,3659,3745,3756,3802,3839,3870,3886,3904,3905,3942,3975,3976,4094,4095,4104,4115,4190,4204,4209,4218,4229,4231,4269,4373,4410,4431,4475,4507,4519,4530,4537,4662,4721,4819,4890,4999,5049,5085,5092,5098,5118,5120,5130,5169,5180,5207,5223,5289,5324,5331,5441,5520,5551,5588,5610,5689,5707,5722,5743,5794,5810,5850,5887,5903,5906,6002,6079,6113,6147,6186,6234,6278,6279,6341,6365,6403,6456,6496,6591,6595,6621,6667,6701,6725,6779,6799,6816,6862,7020,7060,7070,7092,7113,7237,7276,7324,7361,7440,7750,7765,7795,7823,7903,7920,7986,8059,8093,8100,8159,8227,8252,8273,8298,8312,8397,8401,8405,8578,8591,8665,8679,8732,8765,8828,8887,8907,8994,9e3,9037,9040,9154,9160,9183,9413,9442,9504,9554,9628,9873],{4441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=4441)),_N_E=_.O()}]);