madarx 2.21.0 → 2.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +403 -396
- package/.next/standalone/.next/app-path-routes-manifest.json +79 -78
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +3 -3
- package/.next/standalone/.next/server/app/activity/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin/page.js +3 -3
- package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/agents/[id]/page.js +3 -3
- package/.next/standalone/.next/server/app/agents/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/agents/page.js +1 -1
- package/.next/standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/activity/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/audit-export/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/share-links/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-memory/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-runs/[id]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-runs/[id]/events/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-runs/[id]/log/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-runs/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-runs/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[id]/active-run/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[id]/chain/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[id]/memory/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[id]/reports/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[id]/run/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[id]/skills/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agents/[id]/skills/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/active-runs/route.js +1 -0
- package/.next/standalone/.next/server/app/api/agents/active-runs/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/agents/active-runs/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/agents/create/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/ops/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/resume-approval/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/approvals/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/approvals/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/artifacts/[id]/acl/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/artifacts/[id]/protect/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/artifacts/[id]/raw/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/artifacts/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/artifacts/[id]/share-link/[linkId]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/artifacts/[id]/share-link/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/artifacts/upload/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/audit/list/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/audit/search/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/config/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/join-bootstrap/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/session/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/brand/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/brand/share/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/chat/sessions/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/chat/sessions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/cloud/schema/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/config/env/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/config/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/connections/[service]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/connections/[service]/verify/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/connections/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/cron/tick/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/dashboard/spaces/[id]/move/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/dashboard/spaces/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/dashboard/spaces/[id]/share-link/[linkId]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/dashboard/spaces/[id]/share-link/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/dashboard/spaces/import/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/dashboard/spaces/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/disk/files/[id]/blob/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/disk/files/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/disk/files/[id]/transcribe/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/disk/files/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/disk/folders/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/events/since/[cursor]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/events/stream/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/fs/create-folder/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/fs/pick-folder/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/blueprint/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/diagnostic/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/governance/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/interview/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/pilot/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/quarterly/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/setup-package/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/interviews/[id]/responses/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/interviews/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/setup-packages/[id]/apply/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/setup-packages/validate/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/heartbeat/tick/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/heartbeat/worker/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/help/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hermes/jobs/[id]/events/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hermes/jobs/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hermes/jobs/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/integrations/google/callback/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/integrations/google/oauth/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/marketplace/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/marketplace/open-design/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/marketplace/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mines/import-roots/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mines/portfolio/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mines/projects/[id]/chunks/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mines/projects/[id]/diligence/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mines/projects/[id]/import/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mines/projects/[id]/publish/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mines/projects/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/missions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/onboarding/blueprint/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/onboarding/blueprint/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/onboarding/launch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/onboarding/launch/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orchestrator/command/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orchestrator/stream/attach/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orchestrator/stream/route.js +31 -14
- package/.next/standalone/.next/server/app/api/orchestrator/stream/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orchestrator/upload/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/org/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/[id]/invites/[inviteId]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/[id]/invites/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/[id]/members/[userId]/role/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/[id]/members/[userId]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/[id]/members/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/invites/pending/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/join/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/join-complete/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/printing-press/clis/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/printing-press/install/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/printing-press/security-mode/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/privacy/config/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/privacy/verify/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/[id]/share-link/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/[id]/stages/[stageId]/override/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/[id]/stages/[stageId]/retry/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/[id]/stages/[stageId]/submit/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/definitions/[slug]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/definitions/[slug]/settings/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/definitions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/definitions/validate/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/start-and-route/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[slug]/library/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[slug]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/runs/approve-claude-run/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/runs/claude-code-dry-run/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/runs/competitor-report/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/runs/engine-ping/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/runs/marketing-plan/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/schedules/upsert/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/secrets/[name]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/secrets/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/settings/trust-mode/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/otp/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/verify/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/share/space/[token]/otp/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/share/space/[token]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/share/space/[token]/verify/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/shared/spaces/[id]/acl/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/shared/spaces/publish/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/shared/spaces/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/shared/spaces/status/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/shared/spaces/unpublish/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/state/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/system/update/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/active-run/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/attachments/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/checklist/[itemId]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/checklist/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/checkout/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/children/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/comments/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/events/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/live-runs/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/release/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tool-allowlists/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tool-allowlists/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tool-egress/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tools/[name]/approve/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tools/[name]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tools/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/transcripts/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/voice/providers/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/voice/realtime/context/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/voice/realtime/session/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/voice/realtime/tool-result/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/voice/realtime/tools/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/voice/tts/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/whatsapp/allowlist/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/whatsapp/disconnect/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/whatsapp/messages/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/whatsapp/qr/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/whatsapp/send/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/whatsapp/status/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/approvals/page.js +2 -2
- package/.next/standalone/.next/server/app/approvals/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/architecture/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/architecture.html +2 -2
- package/.next/standalone/.next/server/app/architecture.rsc +3 -3
- package/.next/standalone/.next/server/app/audit/live/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/brand/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/brand.html +2 -2
- package/.next/standalone/.next/server/app/brand.rsc +3 -3
- package/.next/standalone/.next/server/app/disk/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/federated-ai/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/federated-ai.html +2 -2
- package/.next/standalone/.next/server/app/federated-ai.rsc +3 -3
- package/.next/standalone/.next/server/app/hail/[id]/governance/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/hail/[id]/interview/page.js +2 -2
- package/.next/standalone/.next/server/app/hail/[id]/interview/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/hail/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/hail/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/hail/[id]/setup/page.js +2 -2
- package/.next/standalone/.next/server/app/hail/[id]/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/hail/page.js +2 -2
- package/.next/standalone/.next/server/app/hail/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/help/[slug]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/help/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +2 -2
- package/.next/standalone/.next/server/app/index.rsc +4 -4
- package/.next/standalone/.next/server/app/join/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/join.html +1 -1
- package/.next/standalone/.next/server/app/join.rsc +3 -3
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/marketplace/page.js +2 -2
- package/.next/standalone/.next/server/app/marketplace/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/mines/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/mines/[projectId]/results/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/mines/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/missions/page.js +2 -2
- package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding/org/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding/team/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding.html +2 -2
- package/.next/standalone/.next/server/app/onboarding.rsc +3 -3
- package/.next/standalone/.next/server/app/org/page.js +1 -1
- package/.next/standalone/.next/server/app/org/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/org/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/[slug]/log/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/[slug]/page.js +2 -2
- package/.next/standalone/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/new/page.js +2 -2
- package/.next/standalone/.next/server/app/projects/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/new.html +2 -2
- package/.next/standalone/.next/server/app/projects/new.rsc +4 -4
- package/.next/standalone/.next/server/app/projects/page.js +16 -12
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/reports/[file]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/reports/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/runtime/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/schedules/page.js +2 -2
- package/.next/standalone/.next/server/app/schedules/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/account/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/advanced/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/appearance/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/brand/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/brand.html +2 -2
- package/.next/standalone/.next/server/app/settings/brand.rsc +3 -3
- package/.next/standalone/.next/server/app/settings/connectors/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/engines/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/onboarding.html +2 -2
- package/.next/standalone/.next/server/app/settings/onboarding.rsc +3 -3
- package/.next/standalone/.next/server/app/settings/organization/page.js +1 -1
- package/.next/standalone/.next/server/app/settings/organization/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/organization/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/runtime/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/team/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/tools/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings.html +2 -2
- package/.next/standalone/.next/server/app/settings.rsc +3 -3
- package/.next/standalone/.next/server/app/share/[token]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/share/space/[token]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/tasks/[id]/page.js +2 -2
- package/.next/standalone/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/tasks/page.js +2 -2
- package/.next/standalone/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/team/[agentId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/team/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/whatsapp/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/whatsapp.html +2 -2
- package/.next/standalone/.next/server/app/whatsapp.rsc +3 -3
- package/.next/standalone/.next/server/app/workflows/[caseId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workflows/new/[caseId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workflows/new/definition/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workflows/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workflows/share/[caseId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +79 -78
- package/.next/standalone/.next/server/chunks/1699.js +34 -20
- package/.next/standalone/.next/server/chunks/4740.js +1 -1
- package/.next/standalone/.next/server/chunks/511.js +7 -7
- package/.next/standalone/.next/server/chunks/6059.js +1 -1
- package/.next/standalone/.next/server/chunks/7098.js +1 -0
- package/.next/standalone/.next/server/functions-config-manifest.json +53 -52
- package/.next/standalone/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/.next/server/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/IDXwXTmFu4HQak2wJH1Qy/_buildManifest.js +1 -0
- package/.next/standalone/.next/static/chunks/app/activity/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/agents/[id]/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/agents/[id]/page-b10b2ac79b5980a8.js +1 -0
- package/.next/standalone/.next/static/chunks/app/agents/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/agents/page-c3aa602e9ee205d1.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/activity/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/admin/audit-export/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/admin/share-links/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agent-memory/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/cancel/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/events/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/log/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agent-runs/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/active-run/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/chain/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/memory/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/reports/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/run/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/skills/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/active-runs/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/create/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/ops/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/resume-approval/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/approvals/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/approvals/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/acl/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/protect/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/raw/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/share-link/[linkId]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/share-link/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/artifacts/upload/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/audit/list/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/audit/search/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/config/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/join-bootstrap/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/session/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/brand/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/brand/share/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/chat/sessions/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/chat/sessions/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/cloud/schema/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/config/env/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/config/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/connections/[service]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/connections/[service]/verify/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/connections/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/cron/tick/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/move/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/share-link/[linkId]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/share-link/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/import/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/disk/files/[id]/blob/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/disk/files/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/disk/files/[id]/transcribe/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/disk/files/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/disk/folders/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/events/since/[cursor]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/events/stream/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/fs/create-folder/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/fs/pick-folder/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/blueprint/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/diagnostic/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/governance/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/interview/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/pilot/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/quarterly/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/setup-package/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/interviews/[id]/responses/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/interviews/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/setup-packages/[id]/apply/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/setup-packages/validate/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/heartbeat/tick/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/heartbeat/worker/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/help/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hermes/jobs/[id]/events/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hermes/jobs/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hermes/jobs/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/integrations/google/callback/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/integrations/google/oauth/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/marketplace/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/marketplace/open-design/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/marketplace/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mines/import-roots/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mines/portfolio/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/chunks/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/diligence/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/import/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/publish/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mines/projects/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/missions/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/models/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/onboarding/blueprint/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/onboarding/launch/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orchestrator/command/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orchestrator/stream/attach/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orchestrator/stream/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orchestrator/upload/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/org/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/invites/[inviteId]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/invites/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/members/[userId]/role/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/members/[userId]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/members/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/invites/pending/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/join/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/join-complete/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/printing-press/clis/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/printing-press/install/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/printing-press/security-mode/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/privacy/config/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/privacy/verify/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/[id]/share-link/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/override/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/retry/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/submit/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/definitions/[slug]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/definitions/[slug]/settings/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/definitions/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/definitions/validate/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/start-and-route/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[slug]/library/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[slug]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/runs/approve-claude-run/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/runs/claude-code-dry-run/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/runs/competitor-report/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/runs/engine-ping/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/runs/marketing-plan/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/schedules/upsert/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/secrets/[name]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/secrets/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/settings/trust-mode/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/share/[token]/otp/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/share/[token]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/share/[token]/verify/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/share/space/[token]/otp/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/share/space/[token]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/share/space/[token]/verify/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/shared/spaces/[id]/acl/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/shared/spaces/publish/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/shared/spaces/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/shared/spaces/status/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/shared/spaces/unpublish/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/state/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/system/update/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/active-run/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/attachments/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/checklist/[itemId]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/checklist/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/checkout/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/children/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/comments/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/events/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/live-runs/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/release/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tool-allowlists/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tool-allowlists/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tool-egress/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tools/[name]/approve/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tools/[name]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tools/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/transcripts/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/voice/providers/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/voice/realtime/context/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/voice/realtime/session/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/voice/realtime/tool-result/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/voice/realtime/tools/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/voice/tts/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/allowlist/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/disconnect/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/messages/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/qr/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/send/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/status/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/approvals/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/architecture/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/audit/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/brand/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/disk/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/federated-ai/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/help/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/layout-7c734abe785c0d86.js +1 -0
- package/.next/standalone/.next/static/chunks/app/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/marketplace/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/missions/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/onboarding/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/org/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/page-9d742c9099ab9cd7.js +1 -0
- package/.next/standalone/.next/static/chunks/app/projects/[slug]/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/projects/[slug]/page-abbc7f06e58ff9ee.js +1 -0
- package/.next/standalone/.next/static/chunks/app/projects/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/projects/page-87457ee2932c33a3.js +1 -0
- package/.next/standalone/.next/static/chunks/app/reports/[file]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/reports/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/runtime/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/schedules/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/page-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/tasks/[id]/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/tasks/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/tools/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/tools/page-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/whatsapp/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/.next/static/chunks/app/workflows/share/[caseId]/page-1ba78d5ff6330abc.js +1 -0
- package/.next/standalone/CHANGELOG.md +12 -0
- package/.next/standalone/package.json +1 -1
- package/.next/static/IDXwXTmFu4HQak2wJH1Qy/_buildManifest.js +1 -0
- package/.next/static/chunks/app/activity/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/agents/[id]/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/agents/[id]/page-b10b2ac79b5980a8.js +1 -0
- package/.next/static/chunks/app/agents/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/agents/page-c3aa602e9ee205d1.js +1 -0
- package/.next/static/chunks/app/api/activity/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/admin/audit-export/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/admin/share-links/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agent-memory/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agent-runs/[id]/cancel/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agent-runs/[id]/events/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agent-runs/[id]/log/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agent-runs/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agent-runs/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agents/[id]/active-run/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agents/[id]/chain/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agents/[id]/memory/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agents/[id]/reports/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agents/[id]/run/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agents/[id]/skills/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agents/active-runs/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agents/create/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agents/ops/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/agents/resume-approval/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/approvals/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/approvals/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/artifacts/[id]/acl/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/artifacts/[id]/protect/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/artifacts/[id]/raw/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/artifacts/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/artifacts/[id]/share-link/[linkId]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/artifacts/[id]/share-link/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/artifacts/upload/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/audit/list/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/audit/search/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/auth/callback/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/auth/config/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/auth/join-bootstrap/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/auth/session/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/brand/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/brand/share/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/chat/sessions/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/chat/sessions/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/cloud/schema/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/config/env/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/config/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/connections/[service]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/connections/[service]/verify/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/connections/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/cron/tick/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/dashboard/spaces/[id]/move/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/dashboard/spaces/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/dashboard/spaces/[id]/share-link/[linkId]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/dashboard/spaces/[id]/share-link/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/dashboard/spaces/import/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/dashboard/spaces/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/disk/files/[id]/blob/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/disk/files/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/disk/files/[id]/transcribe/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/disk/files/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/disk/folders/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/events/since/[cursor]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/events/stream/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/fs/create-folder/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/fs/pick-folder/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hail/engagements/[id]/blueprint/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hail/engagements/[id]/diagnostic/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hail/engagements/[id]/governance/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hail/engagements/[id]/interview/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hail/engagements/[id]/pilot/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hail/engagements/[id]/quarterly/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hail/engagements/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hail/engagements/[id]/setup-package/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hail/engagements/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hail/interviews/[id]/responses/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hail/interviews/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hail/setup-packages/[id]/apply/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hail/setup-packages/validate/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/heartbeat/tick/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/heartbeat/worker/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/help/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hermes/jobs/[id]/events/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hermes/jobs/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/hermes/jobs/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/integrations/google/callback/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/integrations/google/oauth/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/marketplace/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/marketplace/open-design/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/marketplace/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/mines/import-roots/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/mines/portfolio/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/mines/projects/[id]/chunks/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/mines/projects/[id]/diligence/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/mines/projects/[id]/import/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/mines/projects/[id]/publish/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/mines/projects/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/missions/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/models/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/onboarding/blueprint/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/onboarding/launch/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/orchestrator/command/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/orchestrator/stream/attach/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/orchestrator/stream/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/orchestrator/upload/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/org/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/orgs/[id]/invites/[inviteId]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/orgs/[id]/invites/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/orgs/[id]/members/[userId]/role/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/orgs/[id]/members/[userId]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/orgs/[id]/members/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/orgs/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/orgs/invites/pending/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/orgs/join/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/orgs/join-complete/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/orgs/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/printing-press/clis/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/printing-press/install/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/printing-press/security-mode/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/privacy/config/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/privacy/verify/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/processes/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/processes/[id]/share-link/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/override/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/retry/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/submit/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/processes/definitions/[slug]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/processes/definitions/[slug]/settings/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/processes/definitions/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/processes/definitions/validate/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/processes/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/processes/start-and-route/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/projects/[slug]/library/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/projects/[slug]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/projects/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/runs/approve-claude-run/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/runs/claude-code-dry-run/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/runs/competitor-report/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/runs/engine-ping/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/runs/marketing-plan/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/schedules/upsert/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/secrets/[name]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/secrets/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/settings/trust-mode/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/share/[token]/otp/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/share/[token]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/share/[token]/verify/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/share/space/[token]/otp/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/share/space/[token]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/share/space/[token]/verify/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/shared/spaces/[id]/acl/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/shared/spaces/publish/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/shared/spaces/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/shared/spaces/status/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/shared/spaces/unpublish/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/state/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/system/update/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/active-run/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/attachments/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/checklist/[itemId]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/checklist/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/checkout/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/children/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/comments/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/events/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/live-runs/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/release/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tasks/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tool-allowlists/[id]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tool-allowlists/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tool-egress/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tools/[name]/approve/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tools/[name]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/tools/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/transcripts/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/voice/providers/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/voice/realtime/context/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/voice/realtime/session/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/voice/realtime/tool-result/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/voice/realtime/tools/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/voice/tts/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/whatsapp/allowlist/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/whatsapp/disconnect/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/whatsapp/messages/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/whatsapp/qr/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/whatsapp/send/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/api/whatsapp/status/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/approvals/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/architecture/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/audit/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/brand/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/disk/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/federated-ai/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/help/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/layout-7c734abe785c0d86.js +1 -0
- package/.next/static/chunks/app/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/marketplace/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/missions/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/onboarding/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/org/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/page-9d742c9099ab9cd7.js +1 -0
- package/.next/static/chunks/app/projects/[slug]/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/projects/[slug]/page-abbc7f06e58ff9ee.js +1 -0
- package/.next/static/chunks/app/projects/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/projects/page-87457ee2932c33a3.js +1 -0
- package/.next/static/chunks/app/reports/[file]/route-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/reports/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/runtime/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/schedules/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/settings/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/settings/page-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/tasks/[id]/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/tasks/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/tools/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/tools/page-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/whatsapp/loading-1ba78d5ff6330abc.js +1 -0
- package/.next/static/chunks/app/workflows/share/[caseId]/page-1ba78d5ff6330abc.js +1 -0
- package/CHANGELOG.md +12 -0
- package/app/agents/agent-events-bus.js +4 -0
- package/app/api/agents/active-runs/route.js +59 -0
- package/app/api/orchestrator/stream/route.js +67 -6
- package/app/components/app-topbar.jsx +34 -88
- package/app/components/dashboard/bg-agent-reducer.js +125 -0
- package/app/components/dashboard/use-bg-agents.js +34 -0
- package/app/projects/[slug]/page.js +2 -0
- package/app/projects/[slug]/project-scope-sync.jsx +26 -0
- package/lib/active-runs.js +5 -0
- package/lib/agent-config.js +3 -1
- package/lib/agent-engines.js +1 -1
- package/lib/agent-routing.js +54 -1
- package/lib/cli-action-flow.js +88 -0
- package/lib/delegation.js +94 -1
- package/lib/heartbeat-worker.js +13 -0
- package/lib/orchestrator-tools.js +149 -2
- package/lib/role-capability-map.js +22 -0
- package/lib/seeds.js +33 -0
- package/lib/tools/adapters/disk.js +107 -0
- package/package.json +1 -1
- package/.next/standalone/.next/server/chunks/8352.js +0 -1
- package/.next/standalone/.next/static/chunks/app/activity/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/agents/[id]/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/agents/[id]/page-721c43e75cb2dd59.js +0 -1
- package/.next/standalone/.next/static/chunks/app/agents/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/agents/page-b1bcb39a46a254aa.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/activity/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/admin/audit-export/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/admin/share-links/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agent-memory/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/cancel/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/events/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/log/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agent-runs/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/active-run/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/chain/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/memory/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/reports/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/run/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/skills/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agents/create/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agents/ops/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/agents/resume-approval/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/approvals/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/approvals/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/acl/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/protect/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/raw/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/share-link/[linkId]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/share-link/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/artifacts/upload/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/audit/list/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/audit/search/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/config/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/join-bootstrap/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/auth/session/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/brand/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/brand/share/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/chat/sessions/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/chat/sessions/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/cloud/schema/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/config/env/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/config/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/connections/[service]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/connections/[service]/verify/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/connections/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/cron/tick/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/move/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/share-link/[linkId]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/share-link/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/import/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/disk/files/[id]/blob/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/disk/files/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/disk/files/[id]/transcribe/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/disk/files/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/disk/folders/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/events/since/[cursor]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/events/stream/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/fs/create-folder/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/fs/pick-folder/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/blueprint/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/diagnostic/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/governance/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/interview/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/pilot/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/quarterly/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/setup-package/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hail/interviews/[id]/responses/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hail/interviews/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hail/setup-packages/[id]/apply/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hail/setup-packages/validate/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/heartbeat/tick/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/heartbeat/worker/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/help/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hermes/jobs/[id]/events/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hermes/jobs/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/hermes/jobs/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/integrations/google/callback/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/integrations/google/oauth/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/marketplace/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/marketplace/open-design/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/marketplace/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/mines/import-roots/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/mines/portfolio/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/chunks/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/diligence/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/import/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/publish/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/mines/projects/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/missions/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/models/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/onboarding/blueprint/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/onboarding/launch/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/orchestrator/command/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/orchestrator/stream/attach/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/orchestrator/stream/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/orchestrator/upload/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/org/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/invites/[inviteId]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/invites/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/members/[userId]/role/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/members/[userId]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/members/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/orgs/invites/pending/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/orgs/join/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/orgs/join-complete/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/orgs/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/printing-press/clis/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/printing-press/install/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/printing-press/security-mode/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/privacy/config/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/privacy/verify/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/processes/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/processes/[id]/share-link/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/override/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/retry/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/submit/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/processes/definitions/[slug]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/processes/definitions/[slug]/settings/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/processes/definitions/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/processes/definitions/validate/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/processes/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/processes/start-and-route/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[slug]/library/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/[slug]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/projects/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/runs/approve-claude-run/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/runs/claude-code-dry-run/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/runs/competitor-report/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/runs/engine-ping/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/runs/marketing-plan/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/schedules/upsert/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/secrets/[name]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/secrets/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/settings/trust-mode/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/share/[token]/otp/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/share/[token]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/share/[token]/verify/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/share/space/[token]/otp/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/share/space/[token]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/share/space/[token]/verify/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/shared/spaces/[id]/acl/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/shared/spaces/publish/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/shared/spaces/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/shared/spaces/status/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/shared/spaces/unpublish/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/state/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/system/update/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/active-run/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/attachments/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/checklist/[itemId]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/checklist/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/checkout/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/children/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/comments/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/events/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/live-runs/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/release/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tasks/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tool-allowlists/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tool-allowlists/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tool-egress/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tools/[name]/approve/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tools/[name]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/tools/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/transcripts/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/voice/providers/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/voice/realtime/context/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/voice/realtime/session/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/voice/realtime/tool-result/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/voice/realtime/tools/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/voice/tts/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/allowlist/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/disconnect/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/messages/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/qr/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/send/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/status/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/approvals/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/architecture/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/audit/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/brand/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/disk/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/federated-ai/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/help/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/layout-457acc50d33a5e0e.js +0 -1
- package/.next/standalone/.next/static/chunks/app/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/marketplace/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/missions/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/onboarding/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/org/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/page-aa1d178b557f45b7.js +0 -1
- package/.next/standalone/.next/static/chunks/app/projects/[slug]/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/projects/[slug]/page-0bc910eac788bf29.js +0 -1
- package/.next/standalone/.next/static/chunks/app/projects/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/projects/page-61f935c0aaf292ef.js +0 -1
- package/.next/standalone/.next/static/chunks/app/reports/[file]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/reports/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/runtime/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/schedules/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/settings/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/settings/page-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/tasks/[id]/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/tasks/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/tools/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/tools/page-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/whatsapp/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/chunks/app/workflows/share/[caseId]/page-fc50c67f9bcca1d8.js +0 -1
- package/.next/standalone/.next/static/mu47BRCkKEvvz6S5ipLGz/_buildManifest.js +0 -1
- package/.next/static/chunks/app/activity/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/agents/[id]/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/agents/[id]/page-721c43e75cb2dd59.js +0 -1
- package/.next/static/chunks/app/agents/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/agents/page-b1bcb39a46a254aa.js +0 -1
- package/.next/static/chunks/app/api/activity/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/admin/audit-export/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/admin/share-links/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/agent-memory/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/agent-runs/[id]/cancel/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/agent-runs/[id]/events/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/agent-runs/[id]/log/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/agent-runs/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/agent-runs/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/agents/[id]/active-run/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/agents/[id]/chain/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/agents/[id]/memory/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/agents/[id]/reports/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/agents/[id]/run/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/agents/[id]/skills/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/agents/create/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/agents/ops/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/agents/resume-approval/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/approvals/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/approvals/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/artifacts/[id]/acl/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/artifacts/[id]/protect/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/artifacts/[id]/raw/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/artifacts/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/artifacts/[id]/share-link/[linkId]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/artifacts/[id]/share-link/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/artifacts/upload/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/audit/list/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/audit/search/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/auth/callback/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/auth/config/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/auth/join-bootstrap/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/auth/session/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/brand/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/brand/share/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/chat/sessions/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/chat/sessions/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/cloud/schema/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/config/env/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/config/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/connections/[service]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/connections/[service]/verify/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/connections/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/cron/tick/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/dashboard/spaces/[id]/move/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/dashboard/spaces/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/dashboard/spaces/[id]/share-link/[linkId]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/dashboard/spaces/[id]/share-link/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/dashboard/spaces/import/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/dashboard/spaces/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/disk/files/[id]/blob/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/disk/files/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/disk/files/[id]/transcribe/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/disk/files/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/disk/folders/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/events/since/[cursor]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/events/stream/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/fs/create-folder/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/fs/pick-folder/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hail/engagements/[id]/blueprint/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hail/engagements/[id]/diagnostic/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hail/engagements/[id]/governance/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hail/engagements/[id]/interview/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hail/engagements/[id]/pilot/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hail/engagements/[id]/quarterly/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hail/engagements/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hail/engagements/[id]/setup-package/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hail/engagements/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hail/interviews/[id]/responses/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hail/interviews/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hail/setup-packages/[id]/apply/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hail/setup-packages/validate/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/heartbeat/tick/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/heartbeat/worker/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/help/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hermes/jobs/[id]/events/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hermes/jobs/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/hermes/jobs/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/integrations/google/callback/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/integrations/google/oauth/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/marketplace/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/marketplace/open-design/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/marketplace/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/mines/import-roots/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/mines/portfolio/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/mines/projects/[id]/chunks/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/mines/projects/[id]/diligence/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/mines/projects/[id]/import/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/mines/projects/[id]/publish/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/mines/projects/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/missions/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/models/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/onboarding/blueprint/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/onboarding/launch/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/orchestrator/command/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/orchestrator/stream/attach/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/orchestrator/stream/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/orchestrator/upload/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/org/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/orgs/[id]/invites/[inviteId]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/orgs/[id]/invites/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/orgs/[id]/members/[userId]/role/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/orgs/[id]/members/[userId]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/orgs/[id]/members/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/orgs/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/orgs/invites/pending/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/orgs/join/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/orgs/join-complete/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/orgs/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/printing-press/clis/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/printing-press/install/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/printing-press/security-mode/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/privacy/config/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/privacy/verify/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/processes/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/processes/[id]/share-link/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/override/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/retry/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/submit/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/processes/definitions/[slug]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/processes/definitions/[slug]/settings/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/processes/definitions/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/processes/definitions/validate/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/processes/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/processes/start-and-route/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/projects/[slug]/library/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/projects/[slug]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/projects/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/runs/approve-claude-run/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/runs/claude-code-dry-run/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/runs/competitor-report/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/runs/engine-ping/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/runs/marketing-plan/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/schedules/upsert/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/secrets/[name]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/secrets/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/settings/trust-mode/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/share/[token]/otp/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/share/[token]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/share/[token]/verify/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/share/space/[token]/otp/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/share/space/[token]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/share/space/[token]/verify/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/shared/spaces/[id]/acl/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/shared/spaces/publish/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/shared/spaces/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/shared/spaces/status/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/shared/spaces/unpublish/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/state/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/system/update/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/active-run/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/attachments/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/checklist/[itemId]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/checklist/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/checkout/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/children/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/comments/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/events/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/live-runs/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/release/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tasks/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tool-allowlists/[id]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tool-allowlists/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tool-egress/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tools/[name]/approve/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tools/[name]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/tools/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/transcripts/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/voice/providers/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/voice/realtime/context/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/voice/realtime/session/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/voice/realtime/tool-result/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/voice/realtime/tools/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/voice/tts/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/whatsapp/allowlist/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/whatsapp/disconnect/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/whatsapp/messages/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/whatsapp/qr/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/whatsapp/send/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/api/whatsapp/status/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/approvals/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/architecture/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/audit/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/brand/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/disk/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/federated-ai/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/help/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/layout-457acc50d33a5e0e.js +0 -1
- package/.next/static/chunks/app/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/marketplace/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/missions/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/onboarding/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/org/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/page-aa1d178b557f45b7.js +0 -1
- package/.next/static/chunks/app/projects/[slug]/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/projects/[slug]/page-0bc910eac788bf29.js +0 -1
- package/.next/static/chunks/app/projects/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/projects/page-61f935c0aaf292ef.js +0 -1
- package/.next/static/chunks/app/reports/[file]/route-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/reports/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/runtime/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/schedules/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/settings/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/settings/page-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/tasks/[id]/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/tasks/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/tools/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/tools/page-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/whatsapp/loading-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/chunks/app/workflows/share/[caseId]/page-fc50c67f9bcca1d8.js +0 -1
- package/.next/static/mu47BRCkKEvvz6S5ipLGz/_buildManifest.js +0 -1
- /package/.next/standalone/.next/static/{mu47BRCkKEvvz6S5ipLGz → IDXwXTmFu4HQak2wJH1Qy}/_ssgManifest.js +0 -0
- /package/.next/static/{mu47BRCkKEvvz6S5ipLGz → IDXwXTmFu4HQak2wJH1Qy}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(()=>{var a={};a.id=893,a.ids=[893],a.modules={157:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"pathHasPrefix",{enumerable:!0,get:function(){return e}});let d=c(2213);function e(a,b){if("string"!=typeof a)return!1;let{pathname:c}=(0,d.parsePath)(a);return c===b||c.startsWith(b+"/")}},261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},684:(a,b,c)=>{"use strict";c.d(b,{IB:()=>s,Oe:()=>m,hC:()=>r,nc:()=>t,wn:()=>q});var d=c(73024),e=c(76760),f=c(48161),g=c(83498);let h=new Set([".ssh"]),i=/(;|&&|\|\||\||>|<|\$\(|`)/;function j(){return String(process.env.MADARX_ALLOWED_ROOTS||"").split(",").map(a=>a.trim()).filter(Boolean)}function k(){return String(process.env.MADARX_READONLY_ROOTS||"").split(",").map(a=>a.trim().replace(/^~/,f.homedir())).filter(Boolean)}function l(){return[...new Set([g.Dl,g.un,...j(),...k()].map(a=>p(e.resolve(a))))]}function m(a){let b=p(e.resolve(a)),c=[...new Set(k().map(a=>p(e.resolve(a))))];return!(0===c.length||[g.Dl,g.un,...j()].map(a=>p(e.resolve(a))).some(a=>n(b,a)))&&c.some(a=>n(b,a))}function n(a,b){let c=e.relative(b,a);return""===c||!!c&&!c.startsWith("..")&&!e.isAbsolute(c)}function o(a){if(a.split(e.sep).filter(Boolean).some(a=>h.has(a)))return!0;let b=e.basename(a);return!!(".env.local"===b||/^\.env($|\.)/.test(b))}function p(a){if(d.existsSync(a))return d.realpathSync(a);let b=[],c=a;for(;!d.existsSync(c);){b.unshift(e.basename(c));let d=e.dirname(c);if(d===c)return a;c=d}return e.join(d.realpathSync(c),...b)}function q(a,b={}){let c=(b.allowedRoots||l()).map(a=>e.resolve(a)),d=p(e.resolve(String(a||".")));return c.some(a=>n(d,a))}function r(a,b={}){let c=(b.allowedRoots||l()).map(a=>e.resolve(a)),d=b.base?e.resolve(b.base):g.Dl,f=e.resolve(d,String(a||".")),h=p(f),i=c.find(a=>n(h,a));if(!i)throw Error(`Path is outside allowed roots: ${a}`);if(o(f)||o(h))throw Error(`Path is blocked by safety policy: ${a}`);for(let b of["/System","/Library","/private","/etc","/var"])if(h===b||h.startsWith(`${b}/`))throw Error(`Path is blocked by safety policy: ${a}`);return{path:f,root:i}}function s(a,b=[],c={}){let d=String(a||"").trim(),e=Array.isArray(b)?b.map(String):[],f=[d,...e].join(" ");return d?c.rawString&&i.test(d)?{risk:"high",approval_required:!0,blocked:!1,reason:"Shell metacharacters require approval"}:"sudo"===d||f.includes("rm -rf")||"git"===d&&"reset"===e[0]&&e.includes("--hard")?{risk:"blocked",approval_required:!0,blocked:!0,reason:"Destructive command is blocked"}:"git"===d&&"push"===e[0]&&(e.includes("--force")||e.includes("-f"))?{risk:"irreversible_external",approval_required:!0,blocked:!1,reason:"Force-push rewrites remote history and cannot be undone"}:"kubectl"===d&&"delete"===e[0]?{risk:"irreversible_external",approval_required:!0,blocked:!1,reason:"kubectl delete removes live cluster resources and cannot be undone"}:["psql","mysql","sqlite3","pgcli","mycli"].includes(d)&&/\b(DROP\s+TABLE|DROP\s+DATABASE|TRUNCATE|DELETE\s+FROM\s+\w+\s*(?:;|$))/i.test(f)?{risk:"irreversible_external",approval_required:!0,blocked:!1,reason:"Destructive SQL (DROP/TRUNCATE/DELETE without WHERE) cannot be undone"}:"git"===d&&["commit","push"].includes(e[0])||["chmod","chown","kill","pkill"].includes(d)||f.includes("deploy")?{risk:"high",approval_required:!0,blocked:!1,reason:"Command can modify history, permissions, processes, or deployments"}:["npm","pnpm","yarn","bun"].includes(d)&&["install","add","remove"].includes(e[0])?{risk:"medium",approval_required:!0,blocked:!1,reason:"Package manager mutation requires approval"}:["curl","wget","python","python3","node"].includes(d)&&("node"!==d||"--version"!==e[0])?{risk:"medium",approval_required:!0,blocked:!1,reason:"General command execution requires approval"}:[["pwd"],["date"],["node","--version"],["npm","test"],["npm","run","check"],["git","status"],["git","diff"],["git","log"]].some(a=>a.every((a,b)=>[d,...e][b]===a))?{risk:"low",approval_required:!1,blocked:!1,reason:"Read-only or verification command"}:{risk:"medium",approval_required:!0,blocked:!1,reason:"Command is not on the low-risk allowlist"}:{risk:"blocked",approval_required:!0,blocked:!0,reason:"No command provided"}}function t(a){return String(a||"").replace(/\b(sk|pk|xox[baprs]|ghp|github_pat|AIza)[A-Za-z0-9_\-]{12,}\b/g,"[REDACTED_TOKEN]").replace(/\b[A-Za-z0-9._%+-]+_API_KEY\s*=\s*[^\s]+/gi,"[REDACTED_API_KEY]").replace(/\b(api[_-]?key|token|secret|password)\s*[:=]\s*['"]?[^'"\s]+/gi,"$1=[REDACTED]")}},1616:(a,b,c)=>{"use strict";c.a(a,async(a,b)=>{try{var d=c(84104),e=a([d]);d=(e.then?(await e)():e)[0],b()}catch(a){b(a)}})},2213:(a,b)=>{"use strict";function c(a){let b=a.indexOf("#"),c=a.indexOf("?"),d=c>-1&&(b<0||c<b);return d||b>-1?{pathname:a.substring(0,d?c:b),query:d?a.substring(c,b>-1?b:void 0):"",hash:b>-1?a.slice(b):""}:{pathname:a,query:"",hash:""}}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"parsePath",{enumerable:!0,get:function(){return c}})},2796:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{AU:()=>q,Bb:()=>z,J:()=>w,Sj:()=>p,Ud:()=>v,gn:()=>u,iP:()=>t,jj:()=>r,vj:()=>s,wt:()=>x,zI:()=>y});var e=c(81909),f=c(16343),g=a([e,f]);[e,f]=g.then?(await g)():g;let A="https://api.github.com";function h(a,b={}){let c=function(a,b={}){try{let c=(0,e.r6)(a,{agent_id:b.agent_id,project_id:b.project_id});if(c)return c}catch{}return process.env[a]||null}(a,b);if(!c)throw Error(`${a} not configured`);return c}function i(a){return{Authorization:`Bearer ${a}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28","User-Agent":"madarx-os"}}let B=/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/;function j(a){if(!a||"string"!=typeof a)throw Error("repo_full_name is required (format: owner/repo)");if(!B.test(a))throw Error(`repo_full_name must be in owner/repo format, got: ${a}`)}function k(a){let[b,c]=a.split("/");return{owner:b,repo:c}}async function l(a){let b=`GitHub API error: ${a.status}`;try{let c=await a.json();c?.message&&(b=c.message)}catch{}let c=a.headers?.get?.("x-github-sso");if(403===a.status&&c){let a=/url=([^;,\s]+)/i.exec(c),d=a?` Authorize it here: ${a[1]}`:"";return`${b} — this org requires SAML SSO authorization for your token.${d}`}return 403===a.status?`${b} — the token is valid but lacks permission for this resource (check the fine-grained PAT's repository access / scopes, and authorize SSO if the org uses it).`:404===a.status?`${b} — not found, OR your token cannot see it. A fine-grained PAT only sees repos it was explicitly granted; a classic PAT needs the 'repo' scope. Grant access to this repo/org and retry.`:b}function m(a){return{id:a.id,name:a.name,full_name:a.full_name,private:a.private,default_branch:a.default_branch,description:a.description||null,stars:a.stargazers_count,forks:a.forks_count,updated_at:a.updated_at}}function n(a){return{number:a.number,title:a.title,state:a.state,user:{login:a.user?.login},labels:(a.labels||[]).map(a=>"string"==typeof a?a:a.name),created_at:a.created_at,updated_at:a.updated_at,html_url:a.html_url,body_excerpt:"string"==typeof a.body?a.body.slice(0,500):null}}function o(a){return{number:a.number,title:a.title,state:a.state,user:{login:a.user?.login},labels:(a.labels||[]).map(a=>"string"==typeof a?a:a.name),created_at:a.created_at,updated_at:a.updated_at,html_url:a.html_url,body_excerpt:"string"==typeof a.body?a.body.slice(0,500):null,head:{ref:a.head?.ref,sha:a.head?.sha},base:{ref:a.base?.ref},merged:a.merged||!1,mergeable:a.mergeable??null}}async function p(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name),e=h("GITHUB_TOKEN",b),g=b.agent_id??null,n=await (0,f.N)("gh_repo_read",g)(`${A}/repos/${c}/${d}`,{headers:i(e)});if(!n.ok){let a=await l(n);throw Error(a)}let o=await n.json();return m(o)}async function q(a={},b={}){let c,d=h("GITHUB_TOKEN",b),e=b.agent_id??null,g=a.org?String(a.org).trim():"";if(g){if(!/^[A-Za-z0-9_.-]+$/.test(g))throw Error(`org must be a valid GitHub org/owner name, got: ${g}`);c=new URL(`${A}/orgs/${g}/repos`),a.type&&c.searchParams.set("type",String(a.type))}else(c=new URL(`${A}/user/repos`)).searchParams.set("affiliation",String(a.affiliation||"owner,collaborator,organization_member")),a.visibility&&c.searchParams.set("visibility",String(a.visibility)),a.type&&!a.affiliation&&(c.searchParams.delete("affiliation"),c.searchParams.set("type",String(a.type)));a.sort&&c.searchParams.set("sort",String(a.sort));let j=Math.min(Math.max(Number(a.per_page||30),1),100);c.searchParams.set("per_page",String(j));let k=Math.max(Number(a.page||1),1);k>1&&c.searchParams.set("page",String(k));let n=await (0,f.N)("gh_repo_list",e)(c,{headers:i(d)});if(!n.ok){let a=await l(n);throw Error(a)}let o=await n.json();return{repos:(Array.isArray(o)?o:[]).map(m)}}async function r(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name),e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m=new URL(`${A}/repos/${c}/${d}/issues`);a.state&&m.searchParams.set("state",String(a.state)),a.labels&&m.searchParams.set("labels",String(a.labels));let o=Math.min(Math.max(Number(a.per_page||30),1),100);m.searchParams.set("per_page",String(o));let p=await (0,f.N)("gh_issue_list",g)(m,{headers:i(e)});if(!p.ok){let a=await l(p);throw Error(a)}let q=await p.json();return{issues:(Array.isArray(q)?q:[]).map(n)}}async function s(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name);if(!a.title)throw Error("title is required");let e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m={title:String(a.title)};a.body&&(m.body=String(a.body)),Array.isArray(a.labels)&&(m.labels=a.labels.map(String)),Array.isArray(a.assignees)&&(m.assignees=a.assignees.map(String));let o=await (0,f.N)("gh_issue_create",g)(`${A}/repos/${c}/${d}/issues`,{method:"POST",headers:{...i(e),"Content-Type":"application/json"},body:JSON.stringify(m)});if(!o.ok){let a=await l(o);throw Error(a)}let p=await o.json();return n(p)}async function t(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name);if(!a.issue_number)throw Error("issue_number is required");if(!a.body)throw Error("body is required");let e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m=await (0,f.N)("gh_issue_comment",g)(`${A}/repos/${c}/${d}/issues/${a.issue_number}/comments`,{method:"POST",headers:{...i(e),"Content-Type":"application/json"},body:JSON.stringify({body:String(a.body)})});if(!m.ok){let a=await l(m);throw Error(a)}let n=await m.json();return{id:n.id,html_url:n.html_url,created_at:n.created_at}}async function u(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name),e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m=new URL(`${A}/repos/${c}/${d}/pulls`);a.state&&m.searchParams.set("state",String(a.state)),a.head&&m.searchParams.set("head",String(a.head)),a.base&&m.searchParams.set("base",String(a.base));let n=Math.min(Math.max(Number(a.per_page||30),1),100);m.searchParams.set("per_page",String(n));let p=await (0,f.N)("gh_pr_list",g)(m,{headers:i(e)});if(!p.ok){let a=await l(p);throw Error(a)}let q=await p.json();return{pull_requests:(Array.isArray(q)?q:[]).map(o)}}async function v(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name);if(!a.title)throw Error("title is required");if(!a.head)throw Error("head is required");if(!a.base)throw Error("base is required");let e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m={title:String(a.title),head:String(a.head),base:String(a.base)};a.body&&(m.body=String(a.body)),void 0!==a.draft&&(m.draft=!!a.draft);let n=await (0,f.N)("gh_pr_create",g)(`${A}/repos/${c}/${d}/pulls`,{method:"POST",headers:{...i(e),"Content-Type":"application/json"},body:JSON.stringify(m)});if(!n.ok){let a=await l(n);throw Error(a)}let p=await n.json();return o(p)}async function w(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name);if(!a.pr_number)throw Error("pr_number is required");if(!a.body)throw Error("body is required");let e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m=await (0,f.N)("gh_pr_comment",g)(`${A}/repos/${c}/${d}/issues/${a.pr_number}/comments`,{method:"POST",headers:{...i(e),"Content-Type":"application/json"},body:JSON.stringify({body:String(a.body)})});if(!m.ok){let a=await l(m);throw Error(a)}let n=await m.json();return{id:n.id,html_url:n.html_url,created_at:n.created_at}}async function x(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name);if(!a.pr_number)throw Error("pr_number is required");let e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m={merge_method:a.merge_method||"squash"};a.commit_title&&(m.commit_title=String(a.commit_title)),a.commit_message&&(m.commit_message=String(a.commit_message));let n=await (0,f.N)("gh_pr_merge",g)(`${A}/repos/${c}/${d}/pulls/${a.pr_number}/merge`,{method:"PUT",headers:{...i(e),"Content-Type":"application/json"},body:JSON.stringify(m)});if(!n.ok){let a=await l(n);throw Error(a)}let o=await n.json();return{merged:!0,sha:o.sha,message:o.message}}async function y(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name);if(!a.workflow_id)throw Error("workflow_id is required");if(!a.ref)throw Error("ref is required");let e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m={ref:String(a.ref)};a.inputs&&"object"==typeof a.inputs&&(m.inputs=a.inputs);let n=await (0,f.N)("gh_actions_dispatch",g)(`${A}/repos/${c}/${d}/actions/workflows/${encodeURIComponent(String(a.workflow_id))}/dispatches`,{method:"POST",headers:{...i(e),"Content-Type":"application/json"},body:JSON.stringify(m)});if(!n.ok){let a=await l(n);throw Error(a)}return{ok:!0,workflow_id:a.workflow_id,ref:a.ref}}async function z(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name);if(!a.tag_name)throw Error("tag_name is required");let e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m={tag_name:String(a.tag_name)};a.target_commitish&&(m.target_commitish=String(a.target_commitish)),a.name&&(m.name=String(a.name)),a.body&&(m.body=String(a.body)),void 0!==a.draft&&(m.draft=!!a.draft),void 0!==a.prerelease&&(m.prerelease=!!a.prerelease);let n=await (0,f.N)("gh_release_create",g)(`${A}/repos/${c}/${d}/releases`,{method:"POST",headers:{...i(e),"Content-Type":"application/json"},body:JSON.stringify(m)});if(!n.ok){let a=await l(n);throw Error(a)}let o=await n.json();return{id:o.id,tag_name:o.tag_name,html_url:o.html_url,draft:o.draft,prerelease:o.prerelease}}d()}catch(a){d(a)}})},3017:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"Batcher",{enumerable:!0,get:function(){return e}});let d=c(42474);class e{constructor(a,b=a=>a()){this.cacheKeyFn=a,this.schedulerFn=b,this.pending=new Map}static create(a){return new e(null==a?void 0:a.cacheKeyFn,null==a?void 0:a.schedulerFn)}async batch(a,b){let c=this.cacheKeyFn?await this.cacheKeyFn(a):a;if(null===c)return b(c,Promise.resolve);let e=this.pending.get(c);if(e)return e;let{promise:f,resolve:g,reject:h}=new d.DetachedPromise;return this.pending.set(c,f),this.schedulerFn(async()=>{try{let a=await b(c,g);g(a)}catch(a){h(a)}finally{this.pending.delete(c)}}),f}}},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4992:(a,b,c)=>{"use strict";c.d(b,{default:()=>k});var d=c(21124),e=c(38301),f=c(23312),g=c(43815),h=c(85708);let i=(0,h.createServerReference)("406fc8991aaaae45fa988d0ba4df71e43b82dca7f5",h.callServer,void 0,h.findSourceMapURL,"deleteProjectAction");function j({disabled:a}){let{pending:b}=(0,f.useFormStatus)();return(0,d.jsx)("button",{type:"submit",className:"admin-button danger",disabled:b||a,"aria-busy":b?"true":void 0,children:b?"Deleting…":"Delete project"})}function k({projectId:a,projectName:b,projectSlug:c,isProtected:f}){let[h,k]=e.useState(!1),[l,m]=e.useState("");if(f)return(0,d.jsxs)("span",{className:"admin-button secondary project-delete is-locked","aria-disabled":"true",title:"The Personal project is the default scope and cannot be deleted.",children:[(0,d.jsxs)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:{marginRight:6,verticalAlign:"-1px"},children:[(0,d.jsx)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),(0,d.jsx)("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),"Protected"]});e.useEffect(()=>{h||m("")},[h]);let n=l.trim()===c;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{type:"button",className:"admin-button secondary project-delete",onClick:()=>k(!0),"aria-label":`Delete ${b}`,children:"Delete"}),(0,d.jsx)(g.A,{open:h,onClose:()=>k(!1),eyebrow:"Delete project",title:`Delete ${b}?`,tone:"danger",children:(0,d.jsxs)("form",{className:"agents-modal-form",action:i,children:[(0,d.jsx)("input",{type:"hidden",name:"project_id",value:a}),(0,d.jsx)("p",{className:"agents-modal-help",children:"This removes the project, its agents, Disk files, memory, secrets, and audit history. The folder on your local drive is left untouched."}),(0,d.jsx)("section",{className:"agents-modal-section",children:(0,d.jsxs)("label",{className:"agents-modal-field wide",children:[(0,d.jsxs)("span",{children:["Type ",(0,d.jsx)("code",{className:"agents-modal-inline-code",children:c})," to confirm"]}),(0,d.jsx)("input",{type:"text",autoComplete:"off",spellCheck:!1,value:l,onChange:a=>m(a.target.value),placeholder:c,autoFocus:!0})]})}),(0,d.jsxs)("footer",{className:"agents-modal-foot",children:[(0,d.jsx)("button",{type:"button",className:"admin-button secondary",onClick:()=>k(!1),children:"Cancel"}),(0,d.jsx)(j,{disabled:!n})]})]})})]})}},5377:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{X:()=>g});var e=c(84104),f=a([e]);e=(f.then?(await f)():f)[0];let h={queued:"queued",extracting:"running",chunking:"running",embedding:"running",complete:"complete",embedding_failed:"complete",done:"complete",failed:"failed",error:"failed",ocr_skipped:"skipped",catalog_only:"skipped",unsupported:"skipped",skipped:"skipped"};function g(a){let b=(0,e.Lf)(),c=b.prepare(`
|
|
1
|
+
(()=>{var a={};a.id=893,a.ids=[893],a.modules={157:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"pathHasPrefix",{enumerable:!0,get:function(){return e}});let d=c(2213);function e(a,b){if("string"!=typeof a)return!1;let{pathname:c}=(0,d.parsePath)(a);return c===b||c.startsWith(b+"/")}},261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},684:(a,b,c)=>{"use strict";c.d(b,{IB:()=>s,Oe:()=>m,hC:()=>r,nc:()=>t,wn:()=>q});var d=c(73024),e=c(76760),f=c(48161),g=c(83498);let h=new Set([".ssh"]),i=/(;|&&|\|\||\||>|<|\$\(|`)/;function j(){return String(process.env.MADARX_ALLOWED_ROOTS||"").split(",").map(a=>a.trim()).filter(Boolean)}function k(){return String(process.env.MADARX_READONLY_ROOTS||"").split(",").map(a=>a.trim().replace(/^~/,f.homedir())).filter(Boolean)}function l(){return[...new Set([g.Dl,g.un,...j(),...k()].map(a=>p(e.resolve(a))))]}function m(a){let b=p(e.resolve(a)),c=[...new Set(k().map(a=>p(e.resolve(a))))];return!(0===c.length||[g.Dl,g.un,...j()].map(a=>p(e.resolve(a))).some(a=>n(b,a)))&&c.some(a=>n(b,a))}function n(a,b){let c=e.relative(b,a);return""===c||!!c&&!c.startsWith("..")&&!e.isAbsolute(c)}function o(a){if(a.split(e.sep).filter(Boolean).some(a=>h.has(a)))return!0;let b=e.basename(a);return!!(".env.local"===b||/^\.env($|\.)/.test(b))}function p(a){if(d.existsSync(a))return d.realpathSync(a);let b=[],c=a;for(;!d.existsSync(c);){b.unshift(e.basename(c));let d=e.dirname(c);if(d===c)return a;c=d}return e.join(d.realpathSync(c),...b)}function q(a,b={}){let c=(b.allowedRoots||l()).map(a=>e.resolve(a)),d=p(e.resolve(String(a||".")));return c.some(a=>n(d,a))}function r(a,b={}){let c=(b.allowedRoots||l()).map(a=>e.resolve(a)),d=b.base?e.resolve(b.base):g.Dl,f=e.resolve(d,String(a||".")),h=p(f),i=c.find(a=>n(h,a));if(!i)throw Error(`Path is outside allowed roots: ${a}`);if(o(f)||o(h))throw Error(`Path is blocked by safety policy: ${a}`);for(let b of["/System","/Library","/private","/etc","/var"])if(h===b||h.startsWith(`${b}/`))throw Error(`Path is blocked by safety policy: ${a}`);return{path:f,root:i}}function s(a,b=[],c={}){let d=String(a||"").trim(),e=Array.isArray(b)?b.map(String):[],f=[d,...e].join(" ");return d?c.rawString&&i.test(d)?{risk:"high",approval_required:!0,blocked:!1,reason:"Shell metacharacters require approval"}:"sudo"===d||f.includes("rm -rf")||"git"===d&&"reset"===e[0]&&e.includes("--hard")?{risk:"blocked",approval_required:!0,blocked:!0,reason:"Destructive command is blocked"}:"git"===d&&"push"===e[0]&&(e.includes("--force")||e.includes("-f"))?{risk:"irreversible_external",approval_required:!0,blocked:!1,reason:"Force-push rewrites remote history and cannot be undone"}:"kubectl"===d&&"delete"===e[0]?{risk:"irreversible_external",approval_required:!0,blocked:!1,reason:"kubectl delete removes live cluster resources and cannot be undone"}:["psql","mysql","sqlite3","pgcli","mycli"].includes(d)&&/\b(DROP\s+TABLE|DROP\s+DATABASE|TRUNCATE|DELETE\s+FROM\s+\w+\s*(?:;|$))/i.test(f)?{risk:"irreversible_external",approval_required:!0,blocked:!1,reason:"Destructive SQL (DROP/TRUNCATE/DELETE without WHERE) cannot be undone"}:"git"===d&&["commit","push"].includes(e[0])||["chmod","chown","kill","pkill"].includes(d)||f.includes("deploy")?{risk:"high",approval_required:!0,blocked:!1,reason:"Command can modify history, permissions, processes, or deployments"}:["npm","pnpm","yarn","bun"].includes(d)&&["install","add","remove"].includes(e[0])?{risk:"medium",approval_required:!0,blocked:!1,reason:"Package manager mutation requires approval"}:["curl","wget","python","python3","node"].includes(d)&&("node"!==d||"--version"!==e[0])?{risk:"medium",approval_required:!0,blocked:!1,reason:"General command execution requires approval"}:[["pwd"],["date"],["node","--version"],["npm","test"],["npm","run","check"],["git","status"],["git","diff"],["git","log"]].some(a=>a.every((a,b)=>[d,...e][b]===a))?{risk:"low",approval_required:!1,blocked:!1,reason:"Read-only or verification command"}:{risk:"medium",approval_required:!0,blocked:!1,reason:"Command is not on the low-risk allowlist"}:{risk:"blocked",approval_required:!0,blocked:!0,reason:"No command provided"}}function t(a){return String(a||"").replace(/\b(sk|pk|xox[baprs]|ghp|github_pat|AIza)[A-Za-z0-9_\-]{12,}\b/g,"[REDACTED_TOKEN]").replace(/\b[A-Za-z0-9._%+-]+_API_KEY\s*=\s*[^\s]+/gi,"[REDACTED_API_KEY]").replace(/\b(api[_-]?key|token|secret|password)\s*[:=]\s*['"]?[^'"\s]+/gi,"$1=[REDACTED]")}},1616:(a,b,c)=>{"use strict";c.a(a,async(a,b)=>{try{var d=c(84104),e=a([d]);d=(e.then?(await e)():e)[0],b()}catch(a){b(a)}})},2213:(a,b)=>{"use strict";function c(a){let b=a.indexOf("#"),c=a.indexOf("?"),d=c>-1&&(b<0||c<b);return d||b>-1?{pathname:a.substring(0,d?c:b),query:d?a.substring(c,b>-1?b:void 0):"",hash:b>-1?a.slice(b):""}:{pathname:a,query:"",hash:""}}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"parsePath",{enumerable:!0,get:function(){return c}})},2796:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{AU:()=>q,Bb:()=>z,J:()=>w,Sj:()=>p,Ud:()=>v,gn:()=>u,iP:()=>t,jj:()=>r,vj:()=>s,wt:()=>x,zI:()=>y});var e=c(81909),f=c(16343),g=a([e,f]);[e,f]=g.then?(await g)():g;let A="https://api.github.com";function h(a,b={}){let c=function(a,b={}){try{let c=(0,e.r6)(a,{agent_id:b.agent_id,project_id:b.project_id});if(c)return c}catch{}return process.env[a]||null}(a,b);if(!c)throw Error(`${a} not configured`);return c}function i(a){return{Authorization:`Bearer ${a}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28","User-Agent":"madarx-os"}}let B=/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/;function j(a){if(!a||"string"!=typeof a)throw Error("repo_full_name is required (format: owner/repo)");if(!B.test(a))throw Error(`repo_full_name must be in owner/repo format, got: ${a}`)}function k(a){let[b,c]=a.split("/");return{owner:b,repo:c}}async function l(a){let b=`GitHub API error: ${a.status}`;try{let c=await a.json();c?.message&&(b=c.message)}catch{}let c=a.headers?.get?.("x-github-sso");if(403===a.status&&c){let a=/url=([^;,\s]+)/i.exec(c),d=a?` Authorize it here: ${a[1]}`:"";return`${b} — this org requires SAML SSO authorization for your token.${d}`}return 403===a.status?`${b} — the token is valid but lacks permission for this resource (check the fine-grained PAT's repository access / scopes, and authorize SSO if the org uses it).`:404===a.status?`${b} — not found, OR your token cannot see it. A fine-grained PAT only sees repos it was explicitly granted; a classic PAT needs the 'repo' scope. Grant access to this repo/org and retry.`:b}function m(a){return{id:a.id,name:a.name,full_name:a.full_name,private:a.private,default_branch:a.default_branch,description:a.description||null,stars:a.stargazers_count,forks:a.forks_count,updated_at:a.updated_at}}function n(a){return{number:a.number,title:a.title,state:a.state,user:{login:a.user?.login},labels:(a.labels||[]).map(a=>"string"==typeof a?a:a.name),created_at:a.created_at,updated_at:a.updated_at,html_url:a.html_url,body_excerpt:"string"==typeof a.body?a.body.slice(0,500):null}}function o(a){return{number:a.number,title:a.title,state:a.state,user:{login:a.user?.login},labels:(a.labels||[]).map(a=>"string"==typeof a?a:a.name),created_at:a.created_at,updated_at:a.updated_at,html_url:a.html_url,body_excerpt:"string"==typeof a.body?a.body.slice(0,500):null,head:{ref:a.head?.ref,sha:a.head?.sha},base:{ref:a.base?.ref},merged:a.merged||!1,mergeable:a.mergeable??null}}async function p(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name),e=h("GITHUB_TOKEN",b),g=b.agent_id??null,n=await (0,f.N)("gh_repo_read",g)(`${A}/repos/${c}/${d}`,{headers:i(e)});if(!n.ok){let a=await l(n);throw Error(a)}let o=await n.json();return m(o)}async function q(a={},b={}){let c,d=h("GITHUB_TOKEN",b),e=b.agent_id??null,g=a.org?String(a.org).trim():"";if(g){if(!/^[A-Za-z0-9_.-]+$/.test(g))throw Error(`org must be a valid GitHub org/owner name, got: ${g}`);c=new URL(`${A}/orgs/${g}/repos`),a.type&&c.searchParams.set("type",String(a.type))}else(c=new URL(`${A}/user/repos`)).searchParams.set("affiliation",String(a.affiliation||"owner,collaborator,organization_member")),a.visibility&&c.searchParams.set("visibility",String(a.visibility)),a.type&&!a.affiliation&&(c.searchParams.delete("affiliation"),c.searchParams.set("type",String(a.type)));a.sort&&c.searchParams.set("sort",String(a.sort));let j=Math.min(Math.max(Number(a.per_page||30),1),100);c.searchParams.set("per_page",String(j));let k=Math.max(Number(a.page||1),1);k>1&&c.searchParams.set("page",String(k));let n=await (0,f.N)("gh_repo_list",e)(c,{headers:i(d)});if(!n.ok){let a=await l(n);throw Error(a)}let o=await n.json();return{repos:(Array.isArray(o)?o:[]).map(m)}}async function r(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name),e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m=new URL(`${A}/repos/${c}/${d}/issues`);a.state&&m.searchParams.set("state",String(a.state)),a.labels&&m.searchParams.set("labels",String(a.labels));let o=Math.min(Math.max(Number(a.per_page||30),1),100);m.searchParams.set("per_page",String(o));let p=await (0,f.N)("gh_issue_list",g)(m,{headers:i(e)});if(!p.ok){let a=await l(p);throw Error(a)}let q=await p.json();return{issues:(Array.isArray(q)?q:[]).map(n)}}async function s(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name);if(!a.title)throw Error("title is required");let e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m={title:String(a.title)};a.body&&(m.body=String(a.body)),Array.isArray(a.labels)&&(m.labels=a.labels.map(String)),Array.isArray(a.assignees)&&(m.assignees=a.assignees.map(String));let o=await (0,f.N)("gh_issue_create",g)(`${A}/repos/${c}/${d}/issues`,{method:"POST",headers:{...i(e),"Content-Type":"application/json"},body:JSON.stringify(m)});if(!o.ok){let a=await l(o);throw Error(a)}let p=await o.json();return n(p)}async function t(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name);if(!a.issue_number)throw Error("issue_number is required");if(!a.body)throw Error("body is required");let e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m=await (0,f.N)("gh_issue_comment",g)(`${A}/repos/${c}/${d}/issues/${a.issue_number}/comments`,{method:"POST",headers:{...i(e),"Content-Type":"application/json"},body:JSON.stringify({body:String(a.body)})});if(!m.ok){let a=await l(m);throw Error(a)}let n=await m.json();return{id:n.id,html_url:n.html_url,created_at:n.created_at}}async function u(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name),e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m=new URL(`${A}/repos/${c}/${d}/pulls`);a.state&&m.searchParams.set("state",String(a.state)),a.head&&m.searchParams.set("head",String(a.head)),a.base&&m.searchParams.set("base",String(a.base));let n=Math.min(Math.max(Number(a.per_page||30),1),100);m.searchParams.set("per_page",String(n));let p=await (0,f.N)("gh_pr_list",g)(m,{headers:i(e)});if(!p.ok){let a=await l(p);throw Error(a)}let q=await p.json();return{pull_requests:(Array.isArray(q)?q:[]).map(o)}}async function v(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name);if(!a.title)throw Error("title is required");if(!a.head)throw Error("head is required");if(!a.base)throw Error("base is required");let e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m={title:String(a.title),head:String(a.head),base:String(a.base)};a.body&&(m.body=String(a.body)),void 0!==a.draft&&(m.draft=!!a.draft);let n=await (0,f.N)("gh_pr_create",g)(`${A}/repos/${c}/${d}/pulls`,{method:"POST",headers:{...i(e),"Content-Type":"application/json"},body:JSON.stringify(m)});if(!n.ok){let a=await l(n);throw Error(a)}let p=await n.json();return o(p)}async function w(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name);if(!a.pr_number)throw Error("pr_number is required");if(!a.body)throw Error("body is required");let e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m=await (0,f.N)("gh_pr_comment",g)(`${A}/repos/${c}/${d}/issues/${a.pr_number}/comments`,{method:"POST",headers:{...i(e),"Content-Type":"application/json"},body:JSON.stringify({body:String(a.body)})});if(!m.ok){let a=await l(m);throw Error(a)}let n=await m.json();return{id:n.id,html_url:n.html_url,created_at:n.created_at}}async function x(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name);if(!a.pr_number)throw Error("pr_number is required");let e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m={merge_method:a.merge_method||"squash"};a.commit_title&&(m.commit_title=String(a.commit_title)),a.commit_message&&(m.commit_message=String(a.commit_message));let n=await (0,f.N)("gh_pr_merge",g)(`${A}/repos/${c}/${d}/pulls/${a.pr_number}/merge`,{method:"PUT",headers:{...i(e),"Content-Type":"application/json"},body:JSON.stringify(m)});if(!n.ok){let a=await l(n);throw Error(a)}let o=await n.json();return{merged:!0,sha:o.sha,message:o.message}}async function y(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name);if(!a.workflow_id)throw Error("workflow_id is required");if(!a.ref)throw Error("ref is required");let e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m={ref:String(a.ref)};a.inputs&&"object"==typeof a.inputs&&(m.inputs=a.inputs);let n=await (0,f.N)("gh_actions_dispatch",g)(`${A}/repos/${c}/${d}/actions/workflows/${encodeURIComponent(String(a.workflow_id))}/dispatches`,{method:"POST",headers:{...i(e),"Content-Type":"application/json"},body:JSON.stringify(m)});if(!n.ok){let a=await l(n);throw Error(a)}return{ok:!0,workflow_id:a.workflow_id,ref:a.ref}}async function z(a={},b={}){j(a.repo_full_name);let{owner:c,repo:d}=k(a.repo_full_name);if(!a.tag_name)throw Error("tag_name is required");let e=h("GITHUB_TOKEN",b),g=b.agent_id??null,m={tag_name:String(a.tag_name)};a.target_commitish&&(m.target_commitish=String(a.target_commitish)),a.name&&(m.name=String(a.name)),a.body&&(m.body=String(a.body)),void 0!==a.draft&&(m.draft=!!a.draft),void 0!==a.prerelease&&(m.prerelease=!!a.prerelease);let n=await (0,f.N)("gh_release_create",g)(`${A}/repos/${c}/${d}/releases`,{method:"POST",headers:{...i(e),"Content-Type":"application/json"},body:JSON.stringify(m)});if(!n.ok){let a=await l(n);throw Error(a)}let o=await n.json();return{id:o.id,tag_name:o.tag_name,html_url:o.html_url,draft:o.draft,prerelease:o.prerelease}}d()}catch(a){d(a)}})},3017:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"Batcher",{enumerable:!0,get:function(){return e}});let d=c(42474);class e{constructor(a,b=a=>a()){this.cacheKeyFn=a,this.schedulerFn=b,this.pending=new Map}static create(a){return new e(null==a?void 0:a.cacheKeyFn,null==a?void 0:a.schedulerFn)}async batch(a,b){let c=this.cacheKeyFn?await this.cacheKeyFn(a):a;if(null===c)return b(c,Promise.resolve);let e=this.pending.get(c);if(e)return e;let{promise:f,resolve:g,reject:h}=new d.DetachedPromise;return this.pending.set(c,f),this.schedulerFn(async()=>{try{let a=await b(c,g);g(a)}catch(a){h(a)}finally{this.pending.delete(c)}}),f}}},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},5377:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{X:()=>g});var e=c(84104),f=a([e]);e=(f.then?(await f)():f)[0];let h={queued:"queued",extracting:"running",chunking:"running",embedding:"running",complete:"complete",embedding_failed:"complete",done:"complete",failed:"failed",error:"failed",ocr_skipped:"skipped",catalog_only:"skipped",unsupported:"skipped",skipped:"skipped"};function g(a){let b=(0,e.Lf)(),c=b.prepare(`
|
|
2
2
|
SELECT document_category, extraction_status, COUNT(*) AS n
|
|
3
3
|
FROM mines_source_documents
|
|
4
4
|
WHERE project_id = ?
|
|
@@ -172,7 +172,7 @@ EXTERNAL DELIVERY: the readiness report is a local artifact (private ACL by
|
|
|
172
172
|
default). Any external delivery requires explicit user confirmation; email_send
|
|
173
173
|
is irreversible_external and always shows its approval banner.
|
|
174
174
|
|
|
175
|
-
LANGUAGE: English. Spanish source terms preserved in parentheses on first use.`}];function h(){try{let a=(0,e.Lf)();for(let b of i)a.prepare("SELECT id FROM agents WHERE id = ?").get(b.id)||(0,f.Sn)({id:b.id,name:b.name,engine:b.engine,schedule:b.schedule||"on demand",role:b.role,title:b.title,tools:b.tools,system_prompt:b.system_prompt,type:"mines",suppress_live_event:!0})}catch(a){console.warn("[mines/seeds] seedMinesAgents failed:",a?.message||a)}}d()}catch(a){d(a)}})},5972:(a,b,c)=>{"use strict";function d(a,b=null){if(!a)return b;try{return JSON.parse(a)}catch{return b}}function e(a){try{let b=a.prepare("SELECT slug FROM marketplace_items WHERE kind = 'agent'").all();return new Set(b.map(a=>a.slug))}catch{return new Set}}c.d(b,{oi:()=>d,qY:()=>e})},6390:(a,b,c)=>{"use strict";c.d(b,{NS:()=>l,YO:()=>j,rd:()=>g});var d=c(73024),e=c(76760),f=c(73136);let g="madarx",h=`https://registry.npmjs.org/${g}/latest`,i=e.dirname((0,f.fileURLToPath)("file:///home/runner/work/madarx-os/madarx-os/lib/update-check.js"));function j(){if(process.env.MADARX_VERSION)return process.env.MADARX_VERSION;for(let a of[e.join(i,"..","package.json"),e.join(process.cwd(),"package.json"),e.join(process.cwd(),".next","standalone","package.json")]){let b=function(a){try{let b=JSON.parse(d.readFileSync(a,"utf8"));if(b&&b.name===g&&b.version)return b.version}catch{}return null}(a);if(b)return b}return"0.0.0"}async function k({fetchImpl:a=fetch,timeoutMs:b=4e3}={}){try{let c=await a(h,{signal:AbortSignal.timeout(b)});if(!c.ok)return null;let d=await c.json();return d?.version||null}catch{return null}}async function l({file:a,current:b=j(),fetchImpl:c=fetch,nowIso:f}={}){let g=await k({fetchImpl:c}),h=f||new Date().toISOString();if(!g){let c=a?function(a){try{return JSON.parse(d.readFileSync(a,"utf8"))}catch{return null}}(a):null;return{ts:h,current:b,latest:c?.latest||null,behind:!1,reachable:!1}}let i=function(a,b){let c=a=>String(a).split("-")[0].split(".").slice(0,3).map(a=>parseInt(a,10)||0),d=c(a),e=c(b);for(let a=0;a<Math.max(d.length,e.length);a++){let b=(d[a]||0)-(e[a]||0);if(0!==b)return b>0?1:-1}return 0}(g,b)>0,m={ts:h,current:b,latest:g,behind:i,reachable:!0};return a&&(d.mkdirSync(e.dirname(a),{recursive:!0}),d.writeFileSync(a,JSON.stringify(m,null,2))),m}},6946:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{revalidatePath:function(){return n},revalidateTag:function(){return k},unstable_expirePath:function(){return l},unstable_expireTag:function(){return m}});let d=c(90151),e=c(30598),f=c(73443),g=c(29294),h=c(63033),i=c(52577),j=c(58871);function k(a){return o([a],`revalidateTag ${a}`)}function l(a,b){if(a.length>f.NEXT_CACHE_SOFT_TAG_MAX_LENGTH)return void console.warn(`Warning: expirePath received "${a}" which exceeded max length of ${f.NEXT_CACHE_SOFT_TAG_MAX_LENGTH}. See more info here https://nextjs.org/docs/app/api-reference/functions/unstable_expirePath`);let c=`${f.NEXT_CACHE_IMPLICIT_TAG_ID}${a}`;return b?c+=`${c.endsWith("/")?"":"/"}${b}`:(0,e.isDynamicRoute)(a)&&console.warn(`Warning: a dynamic page path "${a}" was passed to "expirePath", but the "type" parameter is missing. This has no effect by default, see more info here https://nextjs.org/docs/app/api-reference/functions/unstable_expirePath`),o([c],`unstable_expirePath ${a}`)}function m(...a){return o(a,`unstable_expireTag ${a.join(", ")}`)}function n(a,b){if(a.length>f.NEXT_CACHE_SOFT_TAG_MAX_LENGTH)return void console.warn(`Warning: revalidatePath received "${a}" which exceeded max length of ${f.NEXT_CACHE_SOFT_TAG_MAX_LENGTH}. See more info here https://nextjs.org/docs/app/api-reference/functions/revalidatePath`);let c=`${f.NEXT_CACHE_IMPLICIT_TAG_ID}${a}`;return b?c+=`${c.endsWith("/")?"":"/"}${b}`:(0,e.isDynamicRoute)(a)&&console.warn(`Warning: a dynamic page path "${a}" was passed to "revalidatePath", but the "type" parameter is missing. This has no effect by default, see more info here https://nextjs.org/docs/app/api-reference/functions/revalidatePath`),o([c],`revalidatePath ${a}`)}function o(a,b){let c=g.workAsyncStorage.getStore();if(!c||!c.incrementalCache)throw Object.defineProperty(Error(`Invariant: static generation store missing in ${b}`),"__NEXT_ERROR_CODE",{value:"E263",enumerable:!1,configurable:!0});let e=h.workUnitAsyncStorage.getStore();if(e){if("render"===e.phase)throw Object.defineProperty(Error(`Route ${c.route} used "${b}" during render which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E7",enumerable:!1,configurable:!0});switch(e.type){case"cache":case"private-cache":throw Object.defineProperty(Error(`Route ${c.route} used "${b}" inside a "use cache" which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E181",enumerable:!1,configurable:!0});case"unstable-cache":throw Object.defineProperty(Error(`Route ${c.route} used "${b}" inside a function cached with "unstable_cache(...)" which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E306",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":let a=Object.defineProperty(Error(`Route ${c.route} used ${b} without first calling \`await connection()\`.`),"__NEXT_ERROR_CODE",{value:"E406",enumerable:!1,configurable:!0});return(0,d.abortAndThrowOnSynchronousRequestDataAccess)(c.route,b,a,e);case"prerender-client":throw Object.defineProperty(new j.InvariantError(`${b} must not be used within a client component. Next.js should be preventing ${b} from being included in client components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E693",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,d.postponeWithTracking)(c.route,b,e.dynamicTracking);case"prerender-legacy":e.revalidate=0;let f=Object.defineProperty(new i.DynamicServerError(`Route ${c.route} couldn't be rendered statically because it used \`${b}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw c.dynamicUsageDescription=b,c.dynamicUsageStack=f.stack,f}}for(let b of(c.pendingRevalidatedTags||(c.pendingRevalidatedTags=[]),a))c.pendingRevalidatedTags.includes(b)||c.pendingRevalidatedTags.push(b);c.pathWasRevalidated=!0}},7265:a=>{"use strict";var b=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,e=Object.prototype.hasOwnProperty,f={};function g(a){var b;let c=["path"in a&&a.path&&`Path=${a.path}`,"expires"in a&&(a.expires||0===a.expires)&&`Expires=${("number"==typeof a.expires?new Date(a.expires):a.expires).toUTCString()}`,"maxAge"in a&&"number"==typeof a.maxAge&&`Max-Age=${a.maxAge}`,"domain"in a&&a.domain&&`Domain=${a.domain}`,"secure"in a&&a.secure&&"Secure","httpOnly"in a&&a.httpOnly&&"HttpOnly","sameSite"in a&&a.sameSite&&`SameSite=${a.sameSite}`,"partitioned"in a&&a.partitioned&&"Partitioned","priority"in a&&a.priority&&`Priority=${a.priority}`].filter(Boolean),d=`${a.name}=${encodeURIComponent(null!=(b=a.value)?b:"")}`;return 0===c.length?d:`${d}; ${c.join("; ")}`}function h(a){let b=new Map;for(let c of a.split(/; */)){if(!c)continue;let a=c.indexOf("=");if(-1===a){b.set(c,"true");continue}let[d,e]=[c.slice(0,a),c.slice(a+1)];try{b.set(d,decodeURIComponent(null!=e?e:"true"))}catch{}}return b}function i(a){if(!a)return;let[[b,c],...d]=h(a),{domain:e,expires:f,httponly:g,maxage:i,path:l,samesite:m,secure:n,partitioned:o,priority:p}=Object.fromEntries(d.map(([a,b])=>[a.toLowerCase().replace(/-/g,""),b]));{var q,r,s={name:b,value:decodeURIComponent(c),domain:e,...f&&{expires:new Date(f)},...g&&{httpOnly:!0},..."string"==typeof i&&{maxAge:Number(i)},path:l,...m&&{sameSite:j.includes(q=(q=m).toLowerCase())?q:void 0},...n&&{secure:!0},...p&&{priority:k.includes(r=(r=p).toLowerCase())?r:void 0},...o&&{partitioned:!0}};let a={};for(let b in s)s[b]&&(a[b]=s[b]);return a}}((a,c)=>{for(var d in c)b(a,d,{get:c[d],enumerable:!0})})(f,{RequestCookies:()=>l,ResponseCookies:()=>m,parseCookie:()=>h,parseSetCookie:()=>i,stringifyCookie:()=>g}),a.exports=((a,f,g,h)=>{if(f&&"object"==typeof f||"function"==typeof f)for(let i of d(f))e.call(a,i)||i===g||b(a,i,{get:()=>f[i],enumerable:!(h=c(f,i))||h.enumerable});return a})(b({},"__esModule",{value:!0}),f);var j=["strict","lax","none"],k=["low","medium","high"],l=class{constructor(a){this._parsed=new Map,this._headers=a;let b=a.get("cookie");if(b)for(let[a,c]of h(b))this._parsed.set(a,{name:a,value:c})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed);if(!a.length)return c.map(([a,b])=>b);let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(([a])=>a===d).map(([a,b])=>b)}has(a){return this._parsed.has(a)}set(...a){let[b,c]=1===a.length?[a[0].name,a[0].value]:a,d=this._parsed;return d.set(b,{name:b,value:c}),this._headers.set("cookie",Array.from(d).map(([a,b])=>g(b)).join("; ")),this}delete(a){let b=this._parsed,c=Array.isArray(a)?a.map(a=>b.delete(a)):b.delete(a);return this._headers.set("cookie",Array.from(b).map(([a,b])=>g(b)).join("; ")),c}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(a=>`${a.name}=${encodeURIComponent(a.value)}`).join("; ")}},m=class{constructor(a){var b,c,d;this._parsed=new Map,this._headers=a;let e=null!=(d=null!=(c=null==(b=a.getSetCookie)?void 0:b.call(a))?c:a.get("set-cookie"))?d:[];for(let a of Array.isArray(e)?e:function(a){if(!a)return[];var b,c,d,e,f,g=[],h=0;function i(){for(;h<a.length&&/\s/.test(a.charAt(h));)h+=1;return h<a.length}for(;h<a.length;){for(b=h,f=!1;i();)if(","===(c=a.charAt(h))){for(d=h,h+=1,i(),e=h;h<a.length&&"="!==(c=a.charAt(h))&&";"!==c&&","!==c;)h+=1;h<a.length&&"="===a.charAt(h)?(f=!0,h=e,g.push(a.substring(b,d)),b=h):h=d+1}else h+=1;(!f||h>=a.length)&&g.push(a.substring(b,a.length))}return g}(e)){let b=i(a);b&&this._parsed.set(b.name,b)}}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed.values());if(!a.length)return c;let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(a=>a.name===d)}has(a){return this._parsed.has(a)}set(...a){let[b,c,d]=1===a.length?[a[0].name,a[0].value,a[0]]:a,e=this._parsed;return e.set(b,function(a={name:"",value:""}){return"number"==typeof a.expires&&(a.expires=new Date(a.expires)),a.maxAge&&(a.expires=new Date(Date.now()+1e3*a.maxAge)),(null===a.path||void 0===a.path)&&(a.path="/"),a}({name:b,value:c,...d})),function(a,b){for(let[,c]of(b.delete("set-cookie"),a)){let a=g(c);b.append("set-cookie",a)}}(e,this._headers),this}delete(...a){let[b,c]="string"==typeof a[0]?[a[0]]:[a[0].name,a[0]];return this.set({...c,name:b,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(g).join("; ")}}},7346:(a,b,c)=>{"use strict";c.d(b,{K2:()=>j});var d=c(77598),e=c(73024),f=c(76760);let g=null;function h(){return process.env.MADARX_ENV_FILE||f.join(process.cwd(),".env.local")}function i(a){return a?a.split("\n").map(a=>a.trim()).filter(a=>a.startsWith("MADARX_MASTER_KEY=")).map(a=>a.slice(18).replace(/^["']|["']$/g,"").trim()):[]}function j({db:a=null,allowGenerate:b=!0}={}){if(g)return g;try{let a=function(a=h()){let b="";try{b=e.readFileSync(a,"utf8")}catch(a){if("ENOENT"!==a.code)throw a;return null}let c=i(b);return c.length<=1||1===new Set(c).size?null:{file:a,keys:c}}();a&&console.warn(`[secrets] WARNING: ${a.file} contains ${a.keys.length} different MADARX_MASTER_KEY lines. Only one will be loaded (first-wins) and vault rows encrypted with any other key will silently fail to decrypt. Fix the file so only one MADARX_MASTER_KEY= line remains.`)}catch{}try{for(let{file:a,mode:b}of function({extraDirs:a=[]}={}){let b=[],c=[process.cwd(),f.join(process.env.HOME||"",".madarx"),...a].filter(Boolean),d=/^\.env(\.[^/]+)?\.(bak|backup)(-.*)?$/;for(let a of c){let c;try{c=e.readdirSync(a)}catch{continue}for(let g of c){let c;if(!d.test(g))continue;let h=f.join(a,g);try{c=e.statSync(h)}catch{continue}if(!c.isFile())continue;let i=511&c.mode;i>384&&b.push({file:h,mode:i})}}return b}())console.warn(`[secrets] WARNING: ${a} has mode ${b.toString(8)} (expected 600). This backup likely contains credentials and is readable by other local users. Fix: chmod 600 "${a}" — or delete the file if no longer needed.`)}catch{}let c=process.env.MADARX_MASTER_KEY;if(c){let a=Buffer.from(c,"base64");if(32!==a.length)throw Error(`MADARX_MASTER_KEY must be a base64-encoded 32-byte key (got ${a.length} bytes). Generate a new key with: node -e "console.log(require('node:crypto').randomBytes(32).toString('base64'))"`);return g=a}if(a&&function(a){try{return!!a.prepare("SELECT id FROM secrets WHERE status = ? LIMIT 1").get("active")}catch{return!1}}(a))throw Error("MADARX_MASTER_KEY is not set but the secrets vault has stored credentials.\nSet the env var to your master key before starting:\n export MADARX_MASTER_KEY=<your-base64-key>\n\nIf you have lost the key, the vault contents are unrecoverable. You will need to\ndelete all rows from the secrets table and re-add credentials from scratch.");if(!b)throw Error("MADARX_MASTER_KEY is not set. Set it before using the secrets vault.");return g=function(){let a=(0,d.randomBytes)(32),b=a.toString("base64"),c=h(),g="";try{g=e.readFileSync(c,"utf8")}catch(a){if("ENOENT"!==a.code)throw a}let j=i(g);if(j.length>0)throw Error(`MADARX_MASTER_KEY is already present in ${c} (${j.length} entr${1===j.length?"y":"ies"} found). Refusing to append a second key — that would corrupt the vault. Either export MADARX_MASTER_KEY in your shell before starting, or fix .env.local by hand so only one MADARX_MASTER_KEY= line remains.`);let k=`
|
|
175
|
+
LANGUAGE: English. Spanish source terms preserved in parentheses on first use.`}];function h(){try{let a=(0,e.Lf)();for(let b of i)a.prepare("SELECT id FROM agents WHERE id = ?").get(b.id)||(0,f.Sn)({id:b.id,name:b.name,engine:b.engine,schedule:b.schedule||"on demand",role:b.role,title:b.title,tools:b.tools,system_prompt:b.system_prompt,type:"mines",suppress_live_event:!0})}catch(a){console.warn("[mines/seeds] seedMinesAgents failed:",a?.message||a)}}d()}catch(a){d(a)}})},5972:(a,b,c)=>{"use strict";function d(a,b=null){if(!a)return b;try{return JSON.parse(a)}catch{return b}}function e(a){try{let b=a.prepare("SELECT slug FROM marketplace_items WHERE kind = 'agent'").all();return new Set(b.map(a=>a.slug))}catch{return new Set}}c.d(b,{oi:()=>d,qY:()=>e})},6390:(a,b,c)=>{"use strict";c.d(b,{NS:()=>l,YO:()=>j,rd:()=>g});var d=c(73024),e=c(76760),f=c(73136);let g="madarx",h=`https://registry.npmjs.org/${g}/latest`,i=e.dirname((0,f.fileURLToPath)("file:///home/runner/work/madarx-os/madarx-os/lib/update-check.js"));function j(){if(process.env.MADARX_VERSION)return process.env.MADARX_VERSION;for(let a of[e.join(i,"..","package.json"),e.join(process.cwd(),"package.json"),e.join(process.cwd(),".next","standalone","package.json")]){let b=function(a){try{let b=JSON.parse(d.readFileSync(a,"utf8"));if(b&&b.name===g&&b.version)return b.version}catch{}return null}(a);if(b)return b}return"0.0.0"}async function k({fetchImpl:a=fetch,timeoutMs:b=4e3}={}){try{let c=await a(h,{signal:AbortSignal.timeout(b)});if(!c.ok)return null;let d=await c.json();return d?.version||null}catch{return null}}async function l({file:a,current:b=j(),fetchImpl:c=fetch,nowIso:f}={}){let g=await k({fetchImpl:c}),h=f||new Date().toISOString();if(!g){let c=a?function(a){try{return JSON.parse(d.readFileSync(a,"utf8"))}catch{return null}}(a):null;return{ts:h,current:b,latest:c?.latest||null,behind:!1,reachable:!1}}let i=function(a,b){let c=a=>String(a).split("-")[0].split(".").slice(0,3).map(a=>parseInt(a,10)||0),d=c(a),e=c(b);for(let a=0;a<Math.max(d.length,e.length);a++){let b=(d[a]||0)-(e[a]||0);if(0!==b)return b>0?1:-1}return 0}(g,b)>0,m={ts:h,current:b,latest:g,behind:i,reachable:!0};return a&&(d.mkdirSync(e.dirname(a),{recursive:!0}),d.writeFileSync(a,JSON.stringify(m,null,2))),m}},6780:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{"402e67d555e52c734878ebd967b97cd3a257ec78d9":()=>e.Dv,"407477242cda9ea03532cccc80b5ec4d6168467af5":()=>e.gL,"409168a77899fcccb89f61c15e248f778e542662cd":()=>e.Tg});var e=c(11812),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},6946:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{revalidatePath:function(){return n},revalidateTag:function(){return k},unstable_expirePath:function(){return l},unstable_expireTag:function(){return m}});let d=c(90151),e=c(30598),f=c(73443),g=c(29294),h=c(63033),i=c(52577),j=c(58871);function k(a){return o([a],`revalidateTag ${a}`)}function l(a,b){if(a.length>f.NEXT_CACHE_SOFT_TAG_MAX_LENGTH)return void console.warn(`Warning: expirePath received "${a}" which exceeded max length of ${f.NEXT_CACHE_SOFT_TAG_MAX_LENGTH}. See more info here https://nextjs.org/docs/app/api-reference/functions/unstable_expirePath`);let c=`${f.NEXT_CACHE_IMPLICIT_TAG_ID}${a}`;return b?c+=`${c.endsWith("/")?"":"/"}${b}`:(0,e.isDynamicRoute)(a)&&console.warn(`Warning: a dynamic page path "${a}" was passed to "expirePath", but the "type" parameter is missing. This has no effect by default, see more info here https://nextjs.org/docs/app/api-reference/functions/unstable_expirePath`),o([c],`unstable_expirePath ${a}`)}function m(...a){return o(a,`unstable_expireTag ${a.join(", ")}`)}function n(a,b){if(a.length>f.NEXT_CACHE_SOFT_TAG_MAX_LENGTH)return void console.warn(`Warning: revalidatePath received "${a}" which exceeded max length of ${f.NEXT_CACHE_SOFT_TAG_MAX_LENGTH}. See more info here https://nextjs.org/docs/app/api-reference/functions/revalidatePath`);let c=`${f.NEXT_CACHE_IMPLICIT_TAG_ID}${a}`;return b?c+=`${c.endsWith("/")?"":"/"}${b}`:(0,e.isDynamicRoute)(a)&&console.warn(`Warning: a dynamic page path "${a}" was passed to "revalidatePath", but the "type" parameter is missing. This has no effect by default, see more info here https://nextjs.org/docs/app/api-reference/functions/revalidatePath`),o([c],`revalidatePath ${a}`)}function o(a,b){let c=g.workAsyncStorage.getStore();if(!c||!c.incrementalCache)throw Object.defineProperty(Error(`Invariant: static generation store missing in ${b}`),"__NEXT_ERROR_CODE",{value:"E263",enumerable:!1,configurable:!0});let e=h.workUnitAsyncStorage.getStore();if(e){if("render"===e.phase)throw Object.defineProperty(Error(`Route ${c.route} used "${b}" during render which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E7",enumerable:!1,configurable:!0});switch(e.type){case"cache":case"private-cache":throw Object.defineProperty(Error(`Route ${c.route} used "${b}" inside a "use cache" which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E181",enumerable:!1,configurable:!0});case"unstable-cache":throw Object.defineProperty(Error(`Route ${c.route} used "${b}" inside a function cached with "unstable_cache(...)" which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E306",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":let a=Object.defineProperty(Error(`Route ${c.route} used ${b} without first calling \`await connection()\`.`),"__NEXT_ERROR_CODE",{value:"E406",enumerable:!1,configurable:!0});return(0,d.abortAndThrowOnSynchronousRequestDataAccess)(c.route,b,a,e);case"prerender-client":throw Object.defineProperty(new j.InvariantError(`${b} must not be used within a client component. Next.js should be preventing ${b} from being included in client components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E693",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,d.postponeWithTracking)(c.route,b,e.dynamicTracking);case"prerender-legacy":e.revalidate=0;let f=Object.defineProperty(new i.DynamicServerError(`Route ${c.route} couldn't be rendered statically because it used \`${b}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw c.dynamicUsageDescription=b,c.dynamicUsageStack=f.stack,f}}for(let b of(c.pendingRevalidatedTags||(c.pendingRevalidatedTags=[]),a))c.pendingRevalidatedTags.includes(b)||c.pendingRevalidatedTags.push(b);c.pathWasRevalidated=!0}},7265:a=>{"use strict";var b=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,e=Object.prototype.hasOwnProperty,f={};function g(a){var b;let c=["path"in a&&a.path&&`Path=${a.path}`,"expires"in a&&(a.expires||0===a.expires)&&`Expires=${("number"==typeof a.expires?new Date(a.expires):a.expires).toUTCString()}`,"maxAge"in a&&"number"==typeof a.maxAge&&`Max-Age=${a.maxAge}`,"domain"in a&&a.domain&&`Domain=${a.domain}`,"secure"in a&&a.secure&&"Secure","httpOnly"in a&&a.httpOnly&&"HttpOnly","sameSite"in a&&a.sameSite&&`SameSite=${a.sameSite}`,"partitioned"in a&&a.partitioned&&"Partitioned","priority"in a&&a.priority&&`Priority=${a.priority}`].filter(Boolean),d=`${a.name}=${encodeURIComponent(null!=(b=a.value)?b:"")}`;return 0===c.length?d:`${d}; ${c.join("; ")}`}function h(a){let b=new Map;for(let c of a.split(/; */)){if(!c)continue;let a=c.indexOf("=");if(-1===a){b.set(c,"true");continue}let[d,e]=[c.slice(0,a),c.slice(a+1)];try{b.set(d,decodeURIComponent(null!=e?e:"true"))}catch{}}return b}function i(a){if(!a)return;let[[b,c],...d]=h(a),{domain:e,expires:f,httponly:g,maxage:i,path:l,samesite:m,secure:n,partitioned:o,priority:p}=Object.fromEntries(d.map(([a,b])=>[a.toLowerCase().replace(/-/g,""),b]));{var q,r,s={name:b,value:decodeURIComponent(c),domain:e,...f&&{expires:new Date(f)},...g&&{httpOnly:!0},..."string"==typeof i&&{maxAge:Number(i)},path:l,...m&&{sameSite:j.includes(q=(q=m).toLowerCase())?q:void 0},...n&&{secure:!0},...p&&{priority:k.includes(r=(r=p).toLowerCase())?r:void 0},...o&&{partitioned:!0}};let a={};for(let b in s)s[b]&&(a[b]=s[b]);return a}}((a,c)=>{for(var d in c)b(a,d,{get:c[d],enumerable:!0})})(f,{RequestCookies:()=>l,ResponseCookies:()=>m,parseCookie:()=>h,parseSetCookie:()=>i,stringifyCookie:()=>g}),a.exports=((a,f,g,h)=>{if(f&&"object"==typeof f||"function"==typeof f)for(let i of d(f))e.call(a,i)||i===g||b(a,i,{get:()=>f[i],enumerable:!(h=c(f,i))||h.enumerable});return a})(b({},"__esModule",{value:!0}),f);var j=["strict","lax","none"],k=["low","medium","high"],l=class{constructor(a){this._parsed=new Map,this._headers=a;let b=a.get("cookie");if(b)for(let[a,c]of h(b))this._parsed.set(a,{name:a,value:c})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed);if(!a.length)return c.map(([a,b])=>b);let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(([a])=>a===d).map(([a,b])=>b)}has(a){return this._parsed.has(a)}set(...a){let[b,c]=1===a.length?[a[0].name,a[0].value]:a,d=this._parsed;return d.set(b,{name:b,value:c}),this._headers.set("cookie",Array.from(d).map(([a,b])=>g(b)).join("; ")),this}delete(a){let b=this._parsed,c=Array.isArray(a)?a.map(a=>b.delete(a)):b.delete(a);return this._headers.set("cookie",Array.from(b).map(([a,b])=>g(b)).join("; ")),c}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(a=>`${a.name}=${encodeURIComponent(a.value)}`).join("; ")}},m=class{constructor(a){var b,c,d;this._parsed=new Map,this._headers=a;let e=null!=(d=null!=(c=null==(b=a.getSetCookie)?void 0:b.call(a))?c:a.get("set-cookie"))?d:[];for(let a of Array.isArray(e)?e:function(a){if(!a)return[];var b,c,d,e,f,g=[],h=0;function i(){for(;h<a.length&&/\s/.test(a.charAt(h));)h+=1;return h<a.length}for(;h<a.length;){for(b=h,f=!1;i();)if(","===(c=a.charAt(h))){for(d=h,h+=1,i(),e=h;h<a.length&&"="!==(c=a.charAt(h))&&";"!==c&&","!==c;)h+=1;h<a.length&&"="===a.charAt(h)?(f=!0,h=e,g.push(a.substring(b,d)),b=h):h=d+1}else h+=1;(!f||h>=a.length)&&g.push(a.substring(b,a.length))}return g}(e)){let b=i(a);b&&this._parsed.set(b.name,b)}}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed.values());if(!a.length)return c;let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(a=>a.name===d)}has(a){return this._parsed.has(a)}set(...a){let[b,c,d]=1===a.length?[a[0].name,a[0].value,a[0]]:a,e=this._parsed;return e.set(b,function(a={name:"",value:""}){return"number"==typeof a.expires&&(a.expires=new Date(a.expires)),a.maxAge&&(a.expires=new Date(Date.now()+1e3*a.maxAge)),(null===a.path||void 0===a.path)&&(a.path="/"),a}({name:b,value:c,...d})),function(a,b){for(let[,c]of(b.delete("set-cookie"),a)){let a=g(c);b.append("set-cookie",a)}}(e,this._headers),this}delete(...a){let[b,c]="string"==typeof a[0]?[a[0]]:[a[0].name,a[0]];return this.set({...c,name:b,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(g).join("; ")}}},7346:(a,b,c)=>{"use strict";c.d(b,{K2:()=>j});var d=c(77598),e=c(73024),f=c(76760);let g=null;function h(){return process.env.MADARX_ENV_FILE||f.join(process.cwd(),".env.local")}function i(a){return a?a.split("\n").map(a=>a.trim()).filter(a=>a.startsWith("MADARX_MASTER_KEY=")).map(a=>a.slice(18).replace(/^["']|["']$/g,"").trim()):[]}function j({db:a=null,allowGenerate:b=!0}={}){if(g)return g;try{let a=function(a=h()){let b="";try{b=e.readFileSync(a,"utf8")}catch(a){if("ENOENT"!==a.code)throw a;return null}let c=i(b);return c.length<=1||1===new Set(c).size?null:{file:a,keys:c}}();a&&console.warn(`[secrets] WARNING: ${a.file} contains ${a.keys.length} different MADARX_MASTER_KEY lines. Only one will be loaded (first-wins) and vault rows encrypted with any other key will silently fail to decrypt. Fix the file so only one MADARX_MASTER_KEY= line remains.`)}catch{}try{for(let{file:a,mode:b}of function({extraDirs:a=[]}={}){let b=[],c=[process.cwd(),f.join(process.env.HOME||"",".madarx"),...a].filter(Boolean),d=/^\.env(\.[^/]+)?\.(bak|backup)(-.*)?$/;for(let a of c){let c;try{c=e.readdirSync(a)}catch{continue}for(let g of c){let c;if(!d.test(g))continue;let h=f.join(a,g);try{c=e.statSync(h)}catch{continue}if(!c.isFile())continue;let i=511&c.mode;i>384&&b.push({file:h,mode:i})}}return b}())console.warn(`[secrets] WARNING: ${a} has mode ${b.toString(8)} (expected 600). This backup likely contains credentials and is readable by other local users. Fix: chmod 600 "${a}" — or delete the file if no longer needed.`)}catch{}let c=process.env.MADARX_MASTER_KEY;if(c){let a=Buffer.from(c,"base64");if(32!==a.length)throw Error(`MADARX_MASTER_KEY must be a base64-encoded 32-byte key (got ${a.length} bytes). Generate a new key with: node -e "console.log(require('node:crypto').randomBytes(32).toString('base64'))"`);return g=a}if(a&&function(a){try{return!!a.prepare("SELECT id FROM secrets WHERE status = ? LIMIT 1").get("active")}catch{return!1}}(a))throw Error("MADARX_MASTER_KEY is not set but the secrets vault has stored credentials.\nSet the env var to your master key before starting:\n export MADARX_MASTER_KEY=<your-base64-key>\n\nIf you have lost the key, the vault contents are unrecoverable. You will need to\ndelete all rows from the secrets table and re-add credentials from scratch.");if(!b)throw Error("MADARX_MASTER_KEY is not set. Set it before using the secrets vault.");return g=function(){let a=(0,d.randomBytes)(32),b=a.toString("base64"),c=h(),g="";try{g=e.readFileSync(c,"utf8")}catch(a){if("ENOENT"!==a.code)throw a}let j=i(g);if(j.length>0)throw Error(`MADARX_MASTER_KEY is already present in ${c} (${j.length} entr${1===j.length?"y":"ies"} found). Refusing to append a second key — that would corrupt the vault. Either export MADARX_MASTER_KEY in your shell before starting, or fix .env.local by hand so only one MADARX_MASTER_KEY= line remains.`);let k=`
|
|
176
176
|
# ============================================================
|
|
177
177
|
# WARNING: MADARX_MASTER_KEY is the encryption key for all
|
|
178
178
|
# integration credentials in the secrets vault. Keep this safe.
|
|
@@ -309,7 +309,7 @@ MADARX_MASTER_KEY=${b}
|
|
|
309
309
|
ORDER BY created_at DESC
|
|
310
310
|
`).all("mines_data_import","directory_root",b,b).map(a=>({id:a.id,root_path:a.root_path,label:a.label||f.basename(a.root_path)||a.root_path,created_at:a.created_at,org_id:a.org_id||b,created_by_user_id:a.created_by_user_id||null}))})(b).some(a=>{let b=f.resolve(a.root_path),d=f.relative(b,c);return""===d||!!d&&!d.startsWith("..")&&!f.isAbsolute(d)})}d()}catch(a){d(a)}})},10407:(a,b,c)=>{"use strict";a.exports=c(49754).vendored["react-rsc"].ReactDOM},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11575:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{y:()=>m});var e=c(73024),f=c(76760),g=c(83498),h=c(84104),i=c(79336),j=c(65527),k=a([h,i,j]);[h,i,j]=k.then?(await k)():k;let n=f.join(g.nJ,".artifacts-migrated-v1");function l(a){return f.relative(g.Dl,a)}function m({force:a=!1,log:b=()=>{}}={}){if(!a&&function(){try{return e.existsSync(n)}catch{return!1}}())return{ok:!0,skipped:!0,reason:"already_migrated"};let c=(0,h.Lf)(),d=[];try{d=c.prepare("SELECT id, path, project_id FROM artifacts WHERE path IS NOT NULL AND path != ''").all()}catch{return{ok:!1,error:"artifacts table unavailable",summary:null}}let k={moved:0,rewritten:0,missing_on_disk:0,already_scoped:0,errors:0,details:[]},o=f.resolve(g.yQ),p=o+f.sep;c.exec("BEGIN IMMEDIATE");try{for(let a of d){let d=f.resolve(g.Dl,a.path),h=function(a){let b=a.project_id||i.Sk;return(0,i.U1)(b)||(0,i.U1)(i.Sk)}(a);if(!h){k.errors++;continue}let m=(0,j.v2)(h),n=f.resolve(m);if(d===n||d.startsWith(n+f.sep)||!(d===o||d.startsWith(p))){k.already_scoped++;continue}try{e.mkdirSync(m,{recursive:!0})}catch{}let q=f.basename(d),r=f.join(m,q),s=l(r);try{if(e.existsSync(d)){let b=r,g=s,i=!1;if(e.existsSync(r)&&d!==r){let a=f.extname(q),c=f.basename(q,a),d=Date.now().toString(36);b=f.join(m,`${c}-${d}${a}`),g=l(b),i=!0}e.renameSync(d,b),c.prepare("UPDATE artifacts SET path = ?, project_id = ? WHERE id = ?").run(g,h.id,a.id),k.moved++,k.rewritten++,k.details.push({id:a.id,from:a.path,to:g,collision:i})}else k.missing_on_disk++,c.prepare("UPDATE artifacts SET path = ?, project_id = ? WHERE id = ?").run(s,h.id,a.id),k.rewritten++,k.details.push({id:a.id,from:a.path,to:s,file_missing:!0})}catch(c){k.errors++,b(`migrate-artifacts: failed for ${a.id} (${a.path}): ${c.message}`)}}c.exec("COMMIT")}catch(a){try{c.exec("ROLLBACK")}catch{}return b(`migrate-artifacts: rolled back: ${a.message}`),{ok:!1,error:a.message,summary:k}}try{e.writeFileSync(n,`${new Date().toISOString()}
|
|
311
311
|
${JSON.stringify(k,null,2)}
|
|
312
|
-
`,"utf8")}catch{}return{ok:!0,skipped:!1,summary:k}}d()}catch(a){d(a)}})},11812:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Dv:()=>l,Tg:()=>m,gL:()=>k});var e=c(91488);c(27806);var f=c(69206),g=c(91837),h=c(79336),i=c(40410),j=a([h]);async function k(a){let b=String(a.get("folder_mode")||"workspace"),c=String(a.get("folder_path")||"").trim(),d=(0,h.gA)({name:a.get("name"),color:a.get("color"),description:a.get("description"),folder_path:"custom"===b&&c?c:void 0});(0,f.redirect)(`/projects/${d.slug}`)}async function l(a){let b=String(a.get("project_id")||"").trim();if(b&&b!==h.Sk){try{(0,h.xx)(b)}catch(a){if(a?.code==="PROJECT_PROTECTED")return;throw a}(0,g.revalidatePath)("/projects")}}async function m(a){let b=String(a.get("project_id")||"").trim();if(!b)return;let c=String(a.get("folder_mode")||"keep"),d=String(a.get("folder_path")||"").trim(),e={name:String(a.get("name")||"").trim()||void 0,color:String(a.get("color")||"").trim()||void 0,description:String(a.get("description")||"").trim()||void 0};"custom"===c&&d&&(e.folder_path=d),(0,h.vr)(b,e),(0,g.revalidatePath)("/projects"),(0,g.revalidatePath)(`/projects/${b}`)}h=(j.then?(await j)():j)[0],(0,i.D)([k,l,m]),(0,e.A)(k,"
|
|
312
|
+
`,"utf8")}catch{}return{ok:!0,skipped:!1,summary:k}}d()}catch(a){d(a)}})},11812:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Dv:()=>l,Tg:()=>m,gL:()=>k});var e=c(91488);c(27806);var f=c(69206),g=c(91837),h=c(79336),i=c(40410),j=a([h]);async function k(a){let b=String(a.get("folder_mode")||"workspace"),c=String(a.get("folder_path")||"").trim(),d=(0,h.gA)({name:a.get("name"),color:a.get("color"),description:a.get("description"),folder_path:"custom"===b&&c?c:void 0});(0,f.redirect)(`/projects/${d.slug}`)}async function l(a){let b=String(a.get("project_id")||"").trim();if(b&&b!==h.Sk){try{(0,h.xx)(b)}catch(a){if(a?.code==="PROJECT_PROTECTED")return;throw a}(0,g.revalidatePath)("/projects")}}async function m(a){let b=String(a.get("project_id")||"").trim();if(!b)return;let c=String(a.get("folder_mode")||"keep"),d=String(a.get("folder_path")||"").trim(),e={name:String(a.get("name")||"").trim()||void 0,color:String(a.get("color")||"").trim()||void 0,description:String(a.get("description")||"").trim()||void 0};"custom"===c&&d&&(e.folder_path=d),(0,h.vr)(b,e),(0,g.revalidatePath)("/projects"),(0,g.revalidatePath)(`/projects/${b}`)}h=(j.then?(await j)():j)[0],(0,i.D)([k,l,m]),(0,e.A)(k,"407477242cda9ea03532cccc80b5ec4d6168467af5",null),(0,e.A)(l,"402e67d555e52c734878ebd967b97cd3a257ec78d9",null),(0,e.A)(m,"409168a77899fcccb89f61c15e248f778e542662cd",null),d()}catch(a){d(a)}})},12690:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{getClientComponentLoaderMetrics:function(){return g},wrapClientComponentLoader:function(){return f}});let c=0,d=0,e=0;function f(a){return"performance"in globalThis?{require:(...b)=>{let f=performance.now();0===c&&(c=f);try{return e+=1,a.__next_app__.require(...b)}finally{d+=performance.now()-f}},loadChunk:(...b)=>{let c=performance.now(),e=a.__next_app__.loadChunk(...b);return e.finally(()=>{d+=performance.now()-c}),e}}:a.__next_app__}function g(a={}){let b=0===c?void 0:{clientComponentLoadStart:c,clientComponentLoadTimes:d,clientComponentLoadCount:e};return a.reset&&(c=0,d=0,e=0),b}},13633:(a,b,c)=>{"use strict";c.d(b,{Q:()=>f});var d=c(8512),e=c(60951);function f(a,b){let c=(0,e.l)(function(a){let b=[],c=-1,e=0,f=0;for(;++c<a.length;){let g=a.charCodeAt(c),h="";if(37===g&&(0,d.lV)(a.charCodeAt(c+1))&&(0,d.lV)(a.charCodeAt(c+2)))f=2;else if(g<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(g))||(h=String.fromCharCode(g));else if(g>55295&&g<57344){let b=a.charCodeAt(c+1);g<56320&&b>56319&&b<57344?(h=String.fromCharCode(g,b),f=1):h="�"}else h=String.fromCharCode(g);h&&(b.push(a.slice(e,c),encodeURIComponent(h)),e=c+f+1,h=""),f&&(c+=f,f=0)}return b.join("")+a.slice(e)}(a||""));if(!b)return c;let f=c.indexOf(":"),g=c.indexOf("?"),h=c.indexOf("#"),i=c.indexOf("/");return f<0||i>-1&&f>i||g>-1&&f>g||h>-1&&f>h||b.test(c.slice(0,f))?c:""}},14117:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{$A:()=>k,Ac:()=>i,FT:()=>j,N3:()=>m,uS:()=>l});var e=c(76760);c(73024);var f=c(84104),g=c(83498),h=a([f]);f=(h.then?(await h)():h)[0];let l=e.join(g.un,"generated-clis"),m=e.join(g.un,"skills","printing-press");e.join(g.nJ,"printing-press-clis.json");let n=/^[a-z0-9][a-z0-9-]{0,63}$/;function i(a){return"string"==typeof a&&n.test(a)}function j(a){let b=e.resolve(a),c=e.resolve(l);if(!b.startsWith(c+e.sep)&&b!==c)throw Error(`Path is not under workspace/generated-clis/: ${a}`);return b}function k(a){if(!i(a))return null;var b=(0,f.Lf)().prepare("SELECT * FROM printing_press_clis WHERE slug = ?").get(a);if(!b)return null;let c=null,d=[],e=[];try{c=b.manifest_json?JSON.parse(b.manifest_json):null}catch{c=null}try{d=b.declared_scopes?JSON.parse(b.declared_scopes):[]}catch{d=[]}try{e=b.required_secrets?JSON.parse(b.required_secrets):[]}catch{e=[]}return{slug:b.slug,source_kind:b.source_kind,source_url:b.source_url||null,installed_at:b.installed_at,updated_at:b.updated_at,path:b.path,declared_scopes:d,required_secrets:e,quota_bytes:b.quota_bytes||0x6400000,manifest:c,status:b.status}}d()}catch(a){d(a)}})},14821:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{B:()=>k});var e=c(73024),f=c(76760),g=c(84104),h=c(83498),i=c(684),j=a([g]);g=(j.then?(await j)():j)[0];let l=/^[a-z][a-z0-9_]{2,63}$/;async function k(a={},b={}){let d="string"==typeof a?.slug?a.slug.trim():"";if(!d||!l.test(d))return{ok:!1,status:"error",error:"slug_required",message:"slug required (snake_case, 3-64 chars)"};let j="string"==typeof a?.summary?a.summary.slice(0,2e3):"",m=["low","medium","high","irreversible_external"].includes(a?.risk)?a.risk:"medium",n=f.join("tool-proposals",d),o=f.join(h.un,n),p={[`${d}.adapter.js`]:function(a,b){let c=a.replace(/_([a-z])/g,(a,b)=>b.toUpperCase());return`// lib/tools/adapters/${a}.js — PROPOSED, not yet wired.
|
|
313
313
|
//
|
|
314
314
|
// ${b||"Proposed tool adapter."}
|
|
315
315
|
//
|
|
@@ -375,7 +375,11 @@ see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__
|
|
|
375
375
|
INSERT INTO heartbeat_tasks
|
|
376
376
|
(id, agent_id, schedule_id, type, status, priority, payload, attempts, max_attempts, run_after, created_at, updated_at)
|
|
377
377
|
VALUES (?, NULL, NULL, ?, 'queued', 0, ?, 0, 99, ?, ?, ?)
|
|
378
|
-
`).run(b,"update_check",c,e,d,d)}(a)}catch{}try{!function(a){
|
|
378
|
+
`).run(b,"update_check",c,e,d,d)}(a)}catch{}try{!function(a){if(a.prepare("SELECT id FROM heartbeat_tasks WHERE type = 'task_sweep' AND status IN ('queued','leased','running') LIMIT 1").get())return;let b=`hbtask-sweep-${Date.now().toString(36)}`,c=JSON.stringify({type:"task_sweep"}),d=new Date().toISOString(),e=new Date(Date.now()+12e4).toISOString();a.prepare(`
|
|
379
|
+
INSERT INTO heartbeat_tasks
|
|
380
|
+
(id, agent_id, schedule_id, type, status, priority, payload, attempts, max_attempts, run_after, created_at, updated_at)
|
|
381
|
+
VALUES (?, NULL, NULL, ?, 'queued', 0, ?, 0, 99, ?, ?, ?)
|
|
382
|
+
`).run(b,"task_sweep",c,e,d,d)}(a)}catch{}try{!function(a){try{if(a.prepare("SELECT id FROM tool_allowlists WHERE tool_name = 'email_send' LIMIT 1").get())return;let b=null;try{let a=(0,e.execFileSync)("git",["config","user.email"],{stdio:["ignore","pipe","ignore"],timeout:3e3}).toString().trim();a.includes("@")&&(b=a.split("@").pop().toLowerCase().trim())}catch{}if(!b)return void console.warn("[seeds] Could not determine email domain from git config user.email. Add a recipient_domain allowlist entry for email_send manually via the dashboard.");let c=`tal-seed-email-${Date.now().toString(36)}`,d=new Date().toISOString();a.prepare(`
|
|
379
383
|
INSERT INTO tool_allowlists (id, tool_name, scope_key, scope_value, label, created_at)
|
|
380
384
|
VALUES (?, 'email_send', 'recipient_domain', ?, ?, ?)
|
|
381
385
|
`).run(c,b,"Seeded from git config on first install",d),console.info(`[seeds] Email allowlist seeded: email_send / recipient_domain = ${b}`)}catch(a){console.warn("[seeds] seedDefaultEmailAllowlist failed:",a?.message||a)}}(a)}catch{}try{(0,j.jz)(a)}catch{}try{(0,o.y)({})}catch{}try{(0,i.fP)(a)}catch{}try{(0,k.yi)(a)}catch{}try{(0,s.r)(a),E&&(0,r.fx)()}catch{}try{(0,t._)(a),E&&((0,u.H6)(),(0,v.r1)()),(0,w.$F)()}catch{}try{(0,x.zc)(a)}catch{}if("1"===process.env.MADARX_SEED_DEFAULT_AGENTS)try{(0,y.g)()}catch{}if(E)try{(0,z.W)()}catch{}try{(0,A.mx)(a)}catch{}!function(a){try{let b=a.prepare("SELECT id, name FROM agents WHERE id = 'ops-agent' LIMIT 1").get();if(b){"Ops Agent"===b.name&&(a.prepare("UPDATE agents SET name = 'Caretaker' WHERE id = 'ops-agent'").run(),a.prepare("UPDATE schedules SET name = 'Caretaker' WHERE agent_id = 'ops-agent' AND name = 'Ops Agent'").run());return}(0,m.W1)({silent:!0})}catch(a){console.warn("[seeds] seedOpsAgentIfMissing failed:",a?.message||a)}}(a),function(a){try{if(a.prepare("SELECT id FROM agents WHERE id = 'tool-smith-agent' LIMIT 1").get())return;(0,k.pz)("tool-smith","personal",{seed:!0,agent_id:"tool-smith-agent"})}catch(a){console.warn("[seeds] seedToolSmithAgentIfMissing failed:",a?.message||a)}}(a);for(let b of l.xU)try{if(a.prepare("SELECT agent_id FROM agent_template_installations WHERE template_slug = ? LIMIT 1").get(b))continue;(0,k.pz)(b,"personal",{seed:!0})}catch(a){console.warn(`[seeds] seedSpecialistAgentsIfMissing(${b}) failed:`,a?.message||a)}try{(0,m.OH)()}catch(a){console.warn("[seeds] migrateDefaultAgentSkills failed:",a?.message||a)}try{(0,q.k2)()}catch{}try{!function(a){try{if(a.prepare("SELECT value FROM config WHERE key = 'cto_brief_seeded'").get())return;let b=g.join(h.Dl,"seed-assets","cto-brief.html");if(!f.existsSync(b))return;let c=f.readFileSync(b,"utf8");(0,m.Dg)({title:"madarX OS — Vision, Plan & Open Questions (CTO Brief)",kind:"html",content:c,space_id:"default",agent_id:"main-orchestrator",dedupe_key:""}),a.prepare("INSERT OR REPLACE INTO config (key, value) VALUES ('cto_brief_seeded', '1')").run()}catch(a){console.warn("[seeds] seedCtoBriefArtifact failed:",a?.message||a)}}(a)}catch{}try{!function(a){try{let b=(0,B.YO)();if(!b||"0.0.0"===b)return;let c=a.prepare("SELECT value FROM config WHERE key = 'last_release_noted'").get(),d=c?.value||null;if(d===b)return;let e=()=>a.prepare("INSERT OR REPLACE INTO config (key, value) VALUES ('last_release_noted', ?)").run(b);if(!d)return void e();let i=function(a,b){if(!a||!b)return null;let c=a.split("\n"),d=b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),e=RegExp(`^##\\s*\\[${d}\\]`),f=-1;for(let a=0;a<c.length;a++)if(e.test(c[a])){f=a;break}if(-1===f)return null;let g=c.length;for(let a=f+1;a<c.length;a++)if(/^##\s*\[/.test(c[a])){g=a;break}return c.slice(f,g).join("\n").trim()||null}(function(){for(let a of[g.join(h.Dl,"CHANGELOG.md"),g.join(process.cwd(),"CHANGELOG.md"),g.join(process.cwd(),".next","standalone","CHANGELOG.md")])try{if(f.existsSync(a))return f.readFileSync(a,"utf8")}catch{}return null}(),b);if(!i)return void e();let j=i,k="markdown";try{let a=(0,n.K8)({version:b,markdown:i});a&&a.includes("<!DOCTYPE")&&(j=a,k="html")}catch(a){console.warn("[seeds] renderChangelogHtml failed, using markdown:",a?.message||a)}(0,m.Dg)({title:`madarX ${b} — What's new`,kind:k,content:j,space_id:"default",agent_id:"main-orchestrator",dedupe_key:""}),e()}catch(a){console.warn("[seeds] seedReleaseNotesArtifact failed:",a?.message||a)}}(a)}catch{}try{(0,p.d)(a)}catch{}if(!process.env.MADARX_DATA_DIR&&!process.env.VILLA515_DATA_DIR)try{!function(a){if(!globalThis.__madarxDiskEncryptionCheckRan){if(globalThis.__madarxDiskEncryptionCheckRan=!0,a)try{if(a.prepare("SELECT id FROM audit_logs WHERE type = 'disk_encryption.health' AND at > datetime('now', '-1 hour') LIMIT 1").get())return}catch{}try{let a=new c.U(c(52644)).pathname;(0,e.spawnSync)(process.execPath,["--no-warnings",a],{stdio:"ignore",detached:!1,timeout:1e4,env:{...process.env}})}catch{}}}(a)}catch{}}finally{globalThis.__madarxSuppressStateEmits=!1}}d()}catch(a){d(a)}})},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},26848:a=>{"use strict";a.exports=require("node:readline/promises")},26940:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Q:()=>t});var e=c(84104),f=c(42382),g=c(5377),h=c(61349),i=c(37937),j=c(68691),k=c(85774),l=a([e,f,g,h,i,k]);[e,f,g,h,i,k]=l.then?(await l)():l;let u=new Set(["data_quality_report","interpretation_memo","due_diligence_memo","investor_presentation","project_package","pfs_readiness_report"]),v=process.env.MADARX_APP_ORIGIN||"http://127.0.0.1:8787";function m(a,b=3){if(null==a||Number.isNaN(Number(a)))return null;let c=10**b;return Math.round(Number(a)*c)/c}function n(a){if(null==a||!Number.isFinite(Number(a)))return"n/a";let b=Number(a);return Math.abs(b)>=1e9?`$${(b/1e9).toFixed(2)}B`:Math.abs(b)>=1e6?`$${(b/1e6).toFixed(1)}M`:Math.abs(b)>=1e3?`$${(b/1e3).toFixed(0)}k`:`$${b.toFixed(0)}`}function o(a,b=0){return null!=a&&Number.isFinite(Number(a))?new Intl.NumberFormat("en-US",{maximumFractionDigits:b}).format(Number(a)):"n/a"}let w=RegExp("\\$\\s?\\d[\\d,]*(?:\\.\\d+)?(?:\\s?(?:B|M|bn|k))?|\\d[\\d,]*(?:\\.\\d+)?\\s?(?:%|‰)|\\b\\d[\\d,]*(?:\\.\\d+)?\\s?(?:ppm|ppb|g\\/t|gpt|oz|lbs?|kg|kt|mt|moz|mlb|tonnes?|tons?|km|cm|mm|m|ha|usd|t)(?![a-z])|\\b\\d{1,3}(?:,\\d{3})+\\b|\\b\\d+\\.\\d+\\b","gi");function p(a){return null==a?"":String(a).replace(w,"[see figures]")}function q(a,b){let c=a&&"object"==typeof a?a[b]:null;return Array.isArray(c)?c.map(a=>p(a).trim()).filter(Boolean).join("\n\n"):c?p(c).trim():""}async function r(a,b,c={}){let d=b.id,e=a.prepare(`
|
|
@@ -1000,14 +1004,14 @@ ${A||' <p class="cl-sub">No notable changes recorded for this release.</p>'}
|
|
|
1000
1004
|
WHERE user_id = ? AND org_id = ?
|
|
1001
1005
|
LIMIT 1`).get(d,g);if(!a)throw l(d,g),{status:403,error:"membership_revoked",sign_out_required:!0};j(d,g,a.role)}catch(a){if(a.status)throw a;throw console.error("[auth] requireFreshMembership SQLite fallback failed:",a.message),m(d,g,a.message),{status:503,error:"supabase_unavailable",message:"Membership check unavailable"}}}function l(a,b){try{(0,e.Lf)().prepare(`INSERT INTO audit_logs (id, at, type, summary, status, meta, user_id, org_id)
|
|
1002
1006
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`).run((0,e.Si)("audit"),(0,e.kF)(),"auth.membership.revoked_detected",`Membership revoked detected for user ${a} in org ${b}`,"denied",JSON.stringify({user_id:a,org_id:b}),a,b)}catch(a){console.error("[auth] Failed to write membership_revoked audit row:",a.message)}}function m(a,b,c){try{(0,e.Lf)().prepare(`INSERT INTO audit_logs (id, at, type, summary, status, meta, user_id, org_id)
|
|
1003
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`).run((0,e.Si)("audit"),(0,e.kF)(),"auth.live_check_unavailable",`Membership live check unavailable for user ${a} in org ${b}`,"error",JSON.stringify({user_id:a,org_id:b,reason:c}),a,b)}catch(a){console.error("[auth] Failed to write live_check_unavailable audit row:",a.message)}}d()}catch(a){d(a)}})},50832:a=>{"use strict";a.exports=import("@anthropic-ai/sdk")},50931:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{chainStreams:function(){return n},continueDynamicHTMLResume:function(){return E},continueDynamicPrerender:function(){return C},continueFizzStream:function(){return B},continueStaticPrerender:function(){return D},createBufferedTransformStream:function(){return s},createDocumentClosingStream:function(){return F},createRootLayoutValidatorStream:function(){return A},renderToInitialFizzStream:function(){return u},streamFromBuffer:function(){return p},streamFromString:function(){return o},streamToBuffer:function(){return q},streamToString:function(){return r}});let d=c(36821),e=c(45441),f=c(42474),g=c(86331),h=c(93047),i=c(53476),j=c(57941),k=c(54353);function l(){}let m=new TextEncoder;function n(...a){if(0===a.length)return new ReadableStream({start(a){a.close()}});if(1===a.length)return a[0];let{readable:b,writable:c}=new TransformStream,d=a[0].pipeTo(c,{preventClose:!0}),e=1;for(;e<a.length-1;e++){let b=a[e];d=d.then(()=>b.pipeTo(c,{preventClose:!0}))}let f=a[e];return(d=d.then(()=>f.pipeTo(c))).catch(l),b}function o(a){return new ReadableStream({start(b){b.enqueue(m.encode(a)),b.close()}})}function p(a){return new ReadableStream({start(b){b.enqueue(a),b.close()}})}async function q(a){let b=a.getReader(),c=[];for(;;){let{done:a,value:d}=await b.read();if(a)break;c.push(d)}return Buffer.concat(c)}async function r(a,b){let c=new TextDecoder("utf-8",{fatal:!0}),d="";for await(let e of a){if(null==b?void 0:b.aborted)return d;d+=c.decode(e,{stream:!0})}return d+c.decode()}function s(){let a,b=[],c=0;return new TransformStream({transform(d,e){b.push(d),c+=d.byteLength,(d=>{if(a)return;let e=new f.DetachedPromise;a=e,(0,g.scheduleImmediate)(()=>{try{let a=new Uint8Array(c),e=0;for(let c=0;c<b.length;c++){let d=b[c];a.set(d,e),e+=d.byteLength}b.length=0,c=0,d.enqueue(a)}catch{}finally{a=void 0,e.resolve()}})})(e)},flush(){if(a)return a.promise}})}function t(a,b){let c=!1;return new TransformStream({transform(d,e){if(a&&!c){c=!0;let a=new TextDecoder("utf-8",{fatal:!0}).decode(d,{stream:!0}),f=(0,k.insertBuildIdComment)(a,b);e.enqueue(m.encode(f));return}e.enqueue(d)}})}function u({ReactDOMServer:a,element:b,streamOptions:c}){return(0,d.getTracer)().trace(e.AppRenderSpan.renderToReadableStream,async()=>a.renderToReadableStream(b,c))}function v(a){let b=-1,c=!1;return new TransformStream({async transform(d,e){let f=-1,g=-1;if(b++,c)return void e.enqueue(d);let j=0;if(-1===f){if(-1===(f=(0,i.indexOfUint8Array)(d,h.ENCODED_TAGS.META.ICON_MARK)))return void e.enqueue(d);47===d[f+(j=h.ENCODED_TAGS.META.ICON_MARK.length)]?j+=2:j++}if(0===b){if(g=(0,i.indexOfUint8Array)(d,h.ENCODED_TAGS.CLOSED.HEAD),-1!==f){if(f<g){let a=new Uint8Array(d.length-j);a.set(d.subarray(0,f)),a.set(d.subarray(f+j),f),d=a}else{let b=await a(),c=m.encode(b),e=c.length,g=new Uint8Array(d.length-j+e);g.set(d.subarray(0,f)),g.set(c,f),g.set(d.subarray(f+j),f+e),d=g}c=!0}}else{let b=await a(),e=m.encode(b),g=e.length,h=new Uint8Array(d.length-j+g);h.set(d.subarray(0,f)),h.set(e,f),h.set(d.subarray(f+j),f+g),d=h,c=!0}e.enqueue(d)}})}function w(a){let b=!1,c=!1;return new TransformStream({async transform(d,e){c=!0;let f=await a();if(b){if(f){let a=m.encode(f);e.enqueue(a)}e.enqueue(d)}else{let a=(0,i.indexOfUint8Array)(d,h.ENCODED_TAGS.CLOSED.HEAD);if(-1!==a){if(f){let b=m.encode(f),c=new Uint8Array(d.length+b.length);c.set(d.slice(0,a)),c.set(b,a),c.set(d.slice(a),a+b.length),e.enqueue(c)}else e.enqueue(d);b=!0}else f&&e.enqueue(m.encode(f)),e.enqueue(d),b=!0}},async flush(b){if(c){let c=await a();c&&b.enqueue(m.encode(c))}}})}function x(a,b){let c=!1,d=null,e=!1;function f(a){return d||(d=h(a)),d}async function h(d){let f=a.getReader();b&&await (0,g.atLeastOneTask)();try{for(;;){let{done:a,value:h}=await f.read();if(a){e=!0;return}b||c||await (0,g.atLeastOneTask)(),d.enqueue(h)}}catch(a){d.error(a)}}return new TransformStream({start(a){b||f(a)},transform(a,c){c.enqueue(a),b&&f(c)},flush(a){if(c=!0,!e)return f(a)}})}let y="</body></html>";function z(){let a=!1;return new TransformStream({transform(b,c){if(a)return c.enqueue(b);let d=(0,i.indexOfUint8Array)(b,h.ENCODED_TAGS.CLOSED.BODY_AND_HTML);if(d>-1){if(a=!0,b.length===h.ENCODED_TAGS.CLOSED.BODY_AND_HTML.length)return;let e=b.slice(0,d);if(c.enqueue(e),b.length>h.ENCODED_TAGS.CLOSED.BODY_AND_HTML.length+d){let a=b.slice(d+h.ENCODED_TAGS.CLOSED.BODY_AND_HTML.length);c.enqueue(a)}}else c.enqueue(b)},flush(a){a.enqueue(h.ENCODED_TAGS.CLOSED.BODY_AND_HTML)}})}function A(){let a=!1,b=!1;return new TransformStream({async transform(c,d){!a&&(0,i.indexOfUint8Array)(c,h.ENCODED_TAGS.OPENING.HTML)>-1&&(a=!0),!b&&(0,i.indexOfUint8Array)(c,h.ENCODED_TAGS.OPENING.BODY)>-1&&(b=!0),d.enqueue(c)},flush(c){let d=[];a||d.push("html"),b||d.push("body"),d.length&&c.enqueue(m.encode(`<html id="__next_error__">
|
|
1007
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`).run((0,e.Si)("audit"),(0,e.kF)(),"auth.live_check_unavailable",`Membership live check unavailable for user ${a} in org ${b}`,"error",JSON.stringify({user_id:a,org_id:b,reason:c}),a,b)}catch(a){console.error("[auth] Failed to write live_check_unavailable audit row:",a.message)}}d()}catch(a){d(a)}})},50665:(a,b,c)=>{"use strict";c.d(b,{default:()=>k});var d=c(21124),e=c(38301),f=c(23312),g=c(43815),h=c(85708);let i=(0,h.createServerReference)("402e67d555e52c734878ebd967b97cd3a257ec78d9",h.callServer,void 0,h.findSourceMapURL,"deleteProjectAction");function j({disabled:a}){let{pending:b}=(0,f.useFormStatus)();return(0,d.jsx)("button",{type:"submit",className:"admin-button danger",disabled:b||a,"aria-busy":b?"true":void 0,children:b?"Deleting…":"Delete project"})}function k({projectId:a,projectName:b,projectSlug:c,isProtected:f}){let[h,k]=e.useState(!1),[l,m]=e.useState("");if(f)return(0,d.jsxs)("span",{className:"admin-button secondary project-delete is-locked","aria-disabled":"true",title:"The Personal project is the default scope and cannot be deleted.",children:[(0,d.jsxs)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:{marginRight:6,verticalAlign:"-1px"},children:[(0,d.jsx)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),(0,d.jsx)("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),"Protected"]});e.useEffect(()=>{h||m("")},[h]);let n=l.trim()===c;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{type:"button",className:"admin-button secondary project-delete",onClick:()=>k(!0),"aria-label":`Delete ${b}`,children:"Delete"}),(0,d.jsx)(g.A,{open:h,onClose:()=>k(!1),eyebrow:"Delete project",title:`Delete ${b}?`,tone:"danger",children:(0,d.jsxs)("form",{className:"agents-modal-form",action:i,children:[(0,d.jsx)("input",{type:"hidden",name:"project_id",value:a}),(0,d.jsx)("p",{className:"agents-modal-help",children:"This removes the project, its agents, Disk files, memory, secrets, and audit history. The folder on your local drive is left untouched."}),(0,d.jsx)("section",{className:"agents-modal-section",children:(0,d.jsxs)("label",{className:"agents-modal-field wide",children:[(0,d.jsxs)("span",{children:["Type ",(0,d.jsx)("code",{className:"agents-modal-inline-code",children:c})," to confirm"]}),(0,d.jsx)("input",{type:"text",autoComplete:"off",spellCheck:!1,value:l,onChange:a=>m(a.target.value),placeholder:c,autoFocus:!0})]})}),(0,d.jsxs)("footer",{className:"agents-modal-foot",children:[(0,d.jsx)("button",{type:"button",className:"admin-button secondary",onClick:()=>k(!1),children:"Cancel"}),(0,d.jsx)(j,{disabled:!n})]})]})})]})}},50832:a=>{"use strict";a.exports=import("@anthropic-ai/sdk")},50931:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{chainStreams:function(){return n},continueDynamicHTMLResume:function(){return E},continueDynamicPrerender:function(){return C},continueFizzStream:function(){return B},continueStaticPrerender:function(){return D},createBufferedTransformStream:function(){return s},createDocumentClosingStream:function(){return F},createRootLayoutValidatorStream:function(){return A},renderToInitialFizzStream:function(){return u},streamFromBuffer:function(){return p},streamFromString:function(){return o},streamToBuffer:function(){return q},streamToString:function(){return r}});let d=c(36821),e=c(45441),f=c(42474),g=c(86331),h=c(93047),i=c(53476),j=c(57941),k=c(54353);function l(){}let m=new TextEncoder;function n(...a){if(0===a.length)return new ReadableStream({start(a){a.close()}});if(1===a.length)return a[0];let{readable:b,writable:c}=new TransformStream,d=a[0].pipeTo(c,{preventClose:!0}),e=1;for(;e<a.length-1;e++){let b=a[e];d=d.then(()=>b.pipeTo(c,{preventClose:!0}))}let f=a[e];return(d=d.then(()=>f.pipeTo(c))).catch(l),b}function o(a){return new ReadableStream({start(b){b.enqueue(m.encode(a)),b.close()}})}function p(a){return new ReadableStream({start(b){b.enqueue(a),b.close()}})}async function q(a){let b=a.getReader(),c=[];for(;;){let{done:a,value:d}=await b.read();if(a)break;c.push(d)}return Buffer.concat(c)}async function r(a,b){let c=new TextDecoder("utf-8",{fatal:!0}),d="";for await(let e of a){if(null==b?void 0:b.aborted)return d;d+=c.decode(e,{stream:!0})}return d+c.decode()}function s(){let a,b=[],c=0;return new TransformStream({transform(d,e){b.push(d),c+=d.byteLength,(d=>{if(a)return;let e=new f.DetachedPromise;a=e,(0,g.scheduleImmediate)(()=>{try{let a=new Uint8Array(c),e=0;for(let c=0;c<b.length;c++){let d=b[c];a.set(d,e),e+=d.byteLength}b.length=0,c=0,d.enqueue(a)}catch{}finally{a=void 0,e.resolve()}})})(e)},flush(){if(a)return a.promise}})}function t(a,b){let c=!1;return new TransformStream({transform(d,e){if(a&&!c){c=!0;let a=new TextDecoder("utf-8",{fatal:!0}).decode(d,{stream:!0}),f=(0,k.insertBuildIdComment)(a,b);e.enqueue(m.encode(f));return}e.enqueue(d)}})}function u({ReactDOMServer:a,element:b,streamOptions:c}){return(0,d.getTracer)().trace(e.AppRenderSpan.renderToReadableStream,async()=>a.renderToReadableStream(b,c))}function v(a){let b=-1,c=!1;return new TransformStream({async transform(d,e){let f=-1,g=-1;if(b++,c)return void e.enqueue(d);let j=0;if(-1===f){if(-1===(f=(0,i.indexOfUint8Array)(d,h.ENCODED_TAGS.META.ICON_MARK)))return void e.enqueue(d);47===d[f+(j=h.ENCODED_TAGS.META.ICON_MARK.length)]?j+=2:j++}if(0===b){if(g=(0,i.indexOfUint8Array)(d,h.ENCODED_TAGS.CLOSED.HEAD),-1!==f){if(f<g){let a=new Uint8Array(d.length-j);a.set(d.subarray(0,f)),a.set(d.subarray(f+j),f),d=a}else{let b=await a(),c=m.encode(b),e=c.length,g=new Uint8Array(d.length-j+e);g.set(d.subarray(0,f)),g.set(c,f),g.set(d.subarray(f+j),f+e),d=g}c=!0}}else{let b=await a(),e=m.encode(b),g=e.length,h=new Uint8Array(d.length-j+g);h.set(d.subarray(0,f)),h.set(e,f),h.set(d.subarray(f+j),f+g),d=h,c=!0}e.enqueue(d)}})}function w(a){let b=!1,c=!1;return new TransformStream({async transform(d,e){c=!0;let f=await a();if(b){if(f){let a=m.encode(f);e.enqueue(a)}e.enqueue(d)}else{let a=(0,i.indexOfUint8Array)(d,h.ENCODED_TAGS.CLOSED.HEAD);if(-1!==a){if(f){let b=m.encode(f),c=new Uint8Array(d.length+b.length);c.set(d.slice(0,a)),c.set(b,a),c.set(d.slice(a),a+b.length),e.enqueue(c)}else e.enqueue(d);b=!0}else f&&e.enqueue(m.encode(f)),e.enqueue(d),b=!0}},async flush(b){if(c){let c=await a();c&&b.enqueue(m.encode(c))}}})}function x(a,b){let c=!1,d=null,e=!1;function f(a){return d||(d=h(a)),d}async function h(d){let f=a.getReader();b&&await (0,g.atLeastOneTask)();try{for(;;){let{done:a,value:h}=await f.read();if(a){e=!0;return}b||c||await (0,g.atLeastOneTask)(),d.enqueue(h)}}catch(a){d.error(a)}}return new TransformStream({start(a){b||f(a)},transform(a,c){c.enqueue(a),b&&f(c)},flush(a){if(c=!0,!e)return f(a)}})}let y="</body></html>";function z(){let a=!1;return new TransformStream({transform(b,c){if(a)return c.enqueue(b);let d=(0,i.indexOfUint8Array)(b,h.ENCODED_TAGS.CLOSED.BODY_AND_HTML);if(d>-1){if(a=!0,b.length===h.ENCODED_TAGS.CLOSED.BODY_AND_HTML.length)return;let e=b.slice(0,d);if(c.enqueue(e),b.length>h.ENCODED_TAGS.CLOSED.BODY_AND_HTML.length+d){let a=b.slice(d+h.ENCODED_TAGS.CLOSED.BODY_AND_HTML.length);c.enqueue(a)}}else c.enqueue(b)},flush(a){a.enqueue(h.ENCODED_TAGS.CLOSED.BODY_AND_HTML)}})}function A(){let a=!1,b=!1;return new TransformStream({async transform(c,d){!a&&(0,i.indexOfUint8Array)(c,h.ENCODED_TAGS.OPENING.HTML)>-1&&(a=!0),!b&&(0,i.indexOfUint8Array)(c,h.ENCODED_TAGS.OPENING.BODY)>-1&&(b=!0),d.enqueue(c)},flush(c){let d=[];a||d.push("html"),b||d.push("body"),d.length&&c.enqueue(m.encode(`<html id="__next_error__">
|
|
1004
1008
|
<template
|
|
1005
1009
|
data-next-error-message="Missing ${d.map(a=>`<${a}>`).join(d.length>1?" and ":"")} tags in the root layout.
|
|
1006
1010
|
Read more at https://nextjs.org/docs/messages/missing-root-layout-tags"
|
|
1007
1011
|
data-next-error-digest="${j.MISSING_ROOT_TAGS_ERROR}"
|
|
1008
1012
|
data-next-error-stack=""
|
|
1009
1013
|
></template>
|
|
1010
|
-
`))}})}async function B(a,{suffix:b,inlinedDataStream:c,isStaticGeneration:d,isBuildTimePrerendering:e,buildId:h,getServerInsertedHTML:i,getServerInsertedMetadata:j,validateRootLayout:k}){let l,n,o=b?b.split(y,1)[0]:null;d&&await a.allReady;var p=[s(),t(e,h),v(j),null!=o&&o.length>0?(n=!1,new TransformStream({transform(a,b){if(b.enqueue(a),!n){n=!0;let a=new f.DetachedPromise;l=a,(0,g.scheduleImmediate)(()=>{try{b.enqueue(m.encode(o))}catch{}finally{l=void 0,a.resolve()}})}},flush(a){if(l)return l.promise;n||a.enqueue(m.encode(o))}})):null,c?x(c,!0):null,k?A():null,z(),w(i)];let q=a;for(let a of p)a&&(q=q.pipeThrough(a));return q}async function C(a,{getServerInsertedHTML:b,getServerInsertedMetadata:c}){return a.pipeThrough(s()).pipeThrough(new TransformStream({transform(a,b){(0,i.isEquivalentUint8Arrays)(a,h.ENCODED_TAGS.CLOSED.BODY_AND_HTML)||(0,i.isEquivalentUint8Arrays)(a,h.ENCODED_TAGS.CLOSED.BODY)||(0,i.isEquivalentUint8Arrays)(a,h.ENCODED_TAGS.CLOSED.HTML)||(a=(0,i.removeFromUint8Array)(a,h.ENCODED_TAGS.CLOSED.BODY),a=(0,i.removeFromUint8Array)(a,h.ENCODED_TAGS.CLOSED.HTML),b.enqueue(a))}})).pipeThrough(w(b)).pipeThrough(v(c))}async function D(a,{inlinedDataStream:b,getServerInsertedHTML:c,getServerInsertedMetadata:d,isBuildTimePrerendering:e,buildId:f}){return a.pipeThrough(s()).pipeThrough(t(e,f)).pipeThrough(w(c)).pipeThrough(v(d)).pipeThrough(x(b,!0)).pipeThrough(z())}async function E(a,{delayDataUntilFirstHtmlChunk:b,inlinedDataStream:c,getServerInsertedHTML:d,getServerInsertedMetadata:e}){return a.pipeThrough(s()).pipeThrough(w(d)).pipeThrough(v(e)).pipeThrough(x(c,b)).pipeThrough(z())}function F(){return o(y)}},51318:(a,b,c)=>{"use strict";a.exports=c(9907)},52237:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"addPathSuffix",{enumerable:!0,get:function(){return e}});let d=c(2213);function e(a,b){if(!a.startsWith("/")||!b)return a;let{pathname:c,query:e,hash:f}=(0,d.parsePath)(a);return""+c+b+e+f}},52318:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{BailoutToCSRError:function(){return d},isBailoutToCSRError:function(){return e}});let c="BAILOUT_TO_CLIENT_SIDE_RENDERING";class d extends Error{constructor(a){super("Bail out to client-side rendering: "+a),this.reason=a,this.digest=c}}function e(a){return"object"==typeof a&&null!==a&&"digest"in a&&a.digest===c}},52577:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{DynamicServerError:function(){return d},isDynamicServerError:function(){return e}});let c="DYNAMIC_SERVER_USAGE";class d extends Error{constructor(a){super("Dynamic server usage: "+a),this.description=a,this.digest=c}}function e(a){return"object"==typeof a&&null!==a&&"digest"in a&&"string"==typeof a.digest&&a.digest===c}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},52644:(a,b,c)=>{"use strict";a.exports=c.p+"static/media/check-disk-encryption.6b124b4e.mjs"},52741:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"notFound",{enumerable:!0,get:function(){return e}});let d=""+c(15570).HTTP_ERROR_FALLBACK_ERROR_CODE+";404";function e(){let a=Object.defineProperty(Error(d),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});throw a.digest=d,a}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},53476:(a,b)=>{"use strict";function c(a,b){if(0===b.length)return 0;if(0===a.length||b.length>a.length)return -1;for(let c=0;c<=a.length-b.length;c++){let d=!0;for(let e=0;e<b.length;e++)if(a[c+e]!==b[e]){d=!1;break}if(d)return c}return -1}function d(a,b){if(a.length!==b.length)return!1;for(let c=0;c<a.length;c++)if(a[c]!==b[c])return!1;return!0}function e(a,b){let d=c(a,b);if(0===d)return a.subarray(b.length);if(!(d>-1))return a;{let c=new Uint8Array(a.length-b.length);return c.set(a.slice(0,d)),c.set(a.slice(d+b.length),d),c}}Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{indexOfUint8Array:function(){return c},isEquivalentUint8Arrays:function(){return d},removeFromUint8Array:function(){return e}})},54151:(a,b,c)=>{"use strict";c.d(b,{A:()=>f});var d=c(21124),e=c(38301);function f({name:a="folder_path",value:b,onChange:c,inputRef:f,placeholder:g="/Users/you/Documents/my-project"}){let[h,i]=e.useState(null),[j,k]=e.useState(!1),[l,m]=e.useState(""),[n,o]=e.useState(""),[p,q]=e.useState(null);async function r(){let a;if(i(null),!navigator.clipboard?.readText)return void i({kind:"error",message:"Clipboard not available."});try{a=await navigator.clipboard.readText()}catch{i({kind:"error",message:"Allow clipboard access."});return}let b=(a||"").trim();if((b.startsWith('"')&&b.endsWith('"')||b.startsWith("'")&&b.endsWith("'"))&&(b=b.slice(1,-1)),b.startsWith("file://"))try{b=decodeURI(b.slice(7))}catch{}return b?b.startsWith("/")||b.startsWith("~")?void(c(b),i({kind:"success",message:"Pasted."})):void i({kind:"error",message:"Path must be absolute."}):void i({kind:"error",message:"Clipboard is empty."})}async function s(){i(null),q("pick");try{let a=await fetch("/api/fs/pick-folder",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({title:"Choose project folder",start_path:b&&b.startsWith("/")?b:void 0})});if(499===a.status)return void i({kind:"error",message:"Cancelled."});let d=await a.json();if(!a.ok)return void i({kind:"error",message:d.error||"Picker failed."});c(d.folder_path),i({kind:"success",message:`Selected ${d.folder_path}`})}catch(a){i({kind:"error",message:String(a?.message||a)})}finally{q(null)}}async function t(){if(i(null),!l.trim()||!n.trim())return void i({kind:"error",message:"Parent and name required."});q("create");try{let a=await fetch("/api/fs/create-folder",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({parent:l.trim(),name:n.trim()})}),b=await a.json();if(!a.ok)return void i({kind:"error",message:b.error||"Create failed."});c(b.folder_path),k(!1),o(""),i({kind:"success",message:`Created ${b.folder_path}`})}catch(a){i({kind:"error",message:String(a?.message||a)})}finally{q(null)}}return e.useEffect(()=>{j&&!l&&m(b||"~/Documents")},[j,b,l]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"agents-modal-paste-row",children:[(0,d.jsx)("input",{ref:f,name:a,type:"text",placeholder:g,autoComplete:"off",spellCheck:!1,value:b||"",onChange:a=>{c(a.target.value),h&&i(null)},required:!0}),(0,d.jsx)("button",{type:"button",className:"admin-button secondary",onClick:s,disabled:"pick"===p,children:"pick"===p?"Opening…":"Choose folder…"})]}),(0,d.jsxs)("div",{className:"agents-modal-folder-tools",children:[(0,d.jsx)("button",{type:"button",className:"admin-button secondary",onClick:r,children:"Paste from clipboard"}),(0,d.jsx)("button",{type:"button",className:"admin-button secondary",onClick:()=>c("~/Documents"),children:"~/Documents"}),(0,d.jsx)("button",{type:"button",className:"admin-button secondary",onClick:()=>c("~/Desktop"),children:"~/Desktop"}),(0,d.jsx)("button",{type:"button",className:"admin-button secondary",onClick:()=>k(a=>!a),children:j?"Cancel new folder":"+ New folder"})]}),j?(0,d.jsxs)("div",{className:"agents-modal-create-folder",children:[(0,d.jsx)("small",{children:"Create a folder anywhere outside system directories. Parent must exist."}),(0,d.jsx)("div",{className:"agents-modal-create-row",children:(0,d.jsx)("input",{type:"text",placeholder:"Parent (e.g. ~/Documents)",value:l,onChange:a=>m(a.target.value),spellCheck:!1,autoComplete:"off"})}),(0,d.jsxs)("div",{className:"agents-modal-create-row",children:[(0,d.jsx)("input",{type:"text",placeholder:"New folder name",value:n,onChange:a=>o(a.target.value),spellCheck:!1,autoComplete:"off"}),(0,d.jsx)("button",{type:"button",className:"admin-button",onClick:t,disabled:"create"===p,children:"create"===p?"Creating…":"Create"})]})]}):null,h?(0,d.jsx)("p",{className:`agents-modal-feedback ${h.kind}`,role:"status","aria-live":"polite",children:h.message}):null]})}},54210:(a,b,c)=>{"use strict";let d;Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{arrayBufferToString:function(){return h},decrypt:function(){return k},encrypt:function(){return j},getActionEncryptionKey:function(){return p},getClientReferenceManifestForRsc:function(){return o},getServerModuleMap:function(){return n},setReferenceManifestsSingleton:function(){return m},stringToUint8Array:function(){return i}});let e=c(58871),f=c(17916),g=c(29294);function h(a){let b=new Uint8Array(a),c=b.byteLength;if(c<65535)return String.fromCharCode.apply(null,b);let d="";for(let a=0;a<c;a++)d+=String.fromCharCode(b[a]);return d}function i(a){let b=a.length,c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=a.charCodeAt(d);return c}function j(a,b,c){return crypto.subtle.encrypt({name:"AES-GCM",iv:b},a,c)}function k(a,b,c){return crypto.subtle.decrypt({name:"AES-GCM",iv:b},a,c)}let l=Symbol.for("next.server.action-manifests");function m({page:a,clientReferenceManifest:b,serverActionsManifest:c,serverModuleMap:d}){var e;let g=null==(e=globalThis[l])?void 0:e.clientReferenceManifestsPerPage;globalThis[l]={clientReferenceManifestsPerPage:{...g,[(0,f.normalizeAppPath)(a)]:b},serverActionsManifest:c,serverModuleMap:d}}function n(){let a=globalThis[l];if(!a)throw Object.defineProperty(new e.InvariantError("Missing manifest for Server Actions."),"__NEXT_ERROR_CODE",{value:"E606",enumerable:!1,configurable:!0});return a.serverModuleMap}function o(){let a=globalThis[l];if(!a)throw Object.defineProperty(new e.InvariantError("Missing manifest for Server Actions."),"__NEXT_ERROR_CODE",{value:"E606",enumerable:!1,configurable:!0});let{clientReferenceManifestsPerPage:b}=a,c=g.workAsyncStorage.getStore();if(!c){var d=b;let a=Object.values(d),c={clientModules:{},edgeRscModuleMapping:{},rscModuleMapping:{}};for(let b of a)c.clientModules={...c.clientModules,...b.clientModules},c.edgeRscModuleMapping={...c.edgeRscModuleMapping,...b.edgeRscModuleMapping},c.rscModuleMapping={...c.rscModuleMapping,...b.rscModuleMapping};return c}let f=b[c.route];if(!f)throw Object.defineProperty(new e.InvariantError(`Missing Client Reference Manifest for ${c.route}.`),"__NEXT_ERROR_CODE",{value:"E570",enumerable:!1,configurable:!0});return f}async function p(){if(d)return d;let a=globalThis[l];if(!a)throw Object.defineProperty(new e.InvariantError("Missing manifest for Server Actions."),"__NEXT_ERROR_CODE",{value:"E606",enumerable:!1,configurable:!0});let b=process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY||a.serverActionsManifest.encryptionKey;if(void 0===b)throw Object.defineProperty(new e.InvariantError("Missing encryption key for Server Actions"),"__NEXT_ERROR_CODE",{value:"E571",enumerable:!1,configurable:!0});return d=await crypto.subtle.importKey("raw",i(atob(b)),"AES-GCM",!0,["encrypt","decrypt"])}},54353:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{DOC_PREFETCH_RANGE_HEADER_VALUE:function(){return d},doesExportedHtmlMatchBuildId:function(){return g},insertBuildIdComment:function(){return f}});let c="<!DOCTYPE html>",d="bytes=0-63";function e(a){return a.slice(0,24).replace(/-/g,"_")}function f(a,b){return b.includes("--\x3e")||!a.startsWith(c)?a:a.replace(c,c+"\x3c!--"+e(b)+"--\x3e")}function g(a,b){return a.startsWith(c+"\x3c!--"+e(b)+"--\x3e")}},54591:(a,b,c)=>{"use strict";function d(a={}){let b=Number(a.price_au_usd_oz??0),c=Number(a.payable_production_oz_per_year??0),e=Math.max(0,Math.floor(Number(a.life_years??0))),f=Number(a.opex_annual??0),g=Number(a.sustaining_capex??0),h=Number(a.royalties??0),i=Number(a.taxes??0),j=Number(a.closure_provision??0),k=Number(a.discount_rate??.08);if(!b||!c||!e)return{valuation_tier:"t2_dcf",status:"insufficient_inputs",npv_usd:null,annual_cash_flows:[]};let l=[],m=0;for(let a=1;a<=e;a++){let d=c*b,n=d-f-g-h-i-(a===e?j:0),o=1/(1+k)**a*n;m+=o,l.push({year:a,revenue_usd:d,free_cash_flow_usd:n,discounted_fcf_usd:o})}return{valuation_tier:"t2_dcf",status:"ok",npv_usd:Math.round(100*m)/100,discount_rate:k,annual_cash_flows:l.map(a=>({year:a.year,revenue_usd:Math.round(100*a.revenue_usd)/100,free_cash_flow_usd:Math.round(100*a.free_cash_flow_usd)/100,discounted_fcf_usd:Math.round(100*a.discounted_fcf_usd)/100}))}}c.d(b,{d:()=>d})},55864:(a,b,c)=>{Promise.resolve().then(c.bind(c,94657)),Promise.resolve().then(c.bind(c,4992)),Promise.resolve().then(c.bind(c,77871)),Promise.resolve().then(c.bind(c,91642)),Promise.resolve().then(c.t.bind(c,3991,23))},56534:(a,b,c)=>{"use strict";function d(a){return a.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}c.d(b,{B:()=>d})},56557:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return n}});let d=c(3017),e=c(31730),f=c(9027),g=c(86331),h=c(90914);function i(a,b){if(!a)return b;let c=parseInt(a,10);return Number.isFinite(c)&&c>0?c:b}!function(a,b){Object.keys(a).forEach(function(c){"default"===c||Object.prototype.hasOwnProperty.call(b,c)||Object.defineProperty(b,c,{enumerable:!0,get:function(){return a[c]}})})}(c(94062),b);let j=i(process.env.NEXT_PRIVATE_RESPONSE_CACHE_TTL,1e4),k=i(process.env.NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE,150),l="__ttl_sentinel__";function m(a,b){return`${a}\0${b??l}`}class n{constructor(a,b=k,c=j){this.batcher=d.Batcher.create({cacheKeyFn:({key:a,isOnDemandRevalidate:b})=>`${a}-${b?"1":"0"}`,schedulerFn:g.scheduleOnNextTick}),this.revalidateBatcher=d.Batcher.create({schedulerFn:g.scheduleOnNextTick}),this.evictedInvocationIDs=new Set,this.minimal_mode=a,this.maxSize=b,this.ttl=c,this.cache=new e.LRUCache(b,void 0,a=>{let b=function(a){let b=a.lastIndexOf("\0");if(-1===b)return;let c=a.slice(b+1);return c===l?void 0:c}(a);if(b){if(this.evictedInvocationIDs.size>=100){let a=this.evictedInvocationIDs.values().next().value;a&&this.evictedInvocationIDs.delete(a)}this.evictedInvocationIDs.add(b)}})}async get(a,b,c){if(!a)return b({hasResolved:!1,previousCacheEntry:null});if(this.minimal_mode){let b=m(a,c.invocationID),d=this.cache.get(b);if(d){if(void 0!==c.invocationID)return(0,h.toResponseCacheEntry)(d.entry);let a=Date.now();if(d.expiresAt>a)return(0,h.toResponseCacheEntry)(d.entry);this.cache.remove(b)}c.invocationID&&this.evictedInvocationIDs.has(c.invocationID)&&(0,f.warnOnce)(`Response cache entry was evicted for invocation ${c.invocationID}. Consider increasing NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE (current: ${this.maxSize}).`)}let{incrementalCache:d,isOnDemandRevalidate:e=!1,isFallback:g=!1,isRoutePPREnabled:i=!1,isPrefetch:j=!1,waitUntil:k,routeKind:l,invocationID:n}=c,o=await this.batcher.batch({key:a,isOnDemandRevalidate:e},(c,f)=>{let h=this.handleGet(a,b,{incrementalCache:d,isOnDemandRevalidate:e,isFallback:g,isRoutePPREnabled:i,isPrefetch:j,routeKind:l,invocationID:n},f);return k&&k(h),h});return(0,h.toResponseCacheEntry)(o)}async handleGet(a,b,c,d){let e=null,f=!1;try{if((e=this.minimal_mode?null:await c.incrementalCache.get(a,{kind:(0,h.routeKindToIncrementalCacheKind)(c.routeKind),isRoutePPREnabled:c.isRoutePPREnabled,isFallback:c.isFallback}))&&!c.isOnDemandRevalidate&&(d(e),f=!0,!e.isStale||c.isPrefetch))return e;let g=await this.revalidate(a,c.incrementalCache,c.isRoutePPREnabled,c.isFallback,b,e,null!==e&&!c.isOnDemandRevalidate,void 0,c.invocationID);if(!g){if(this.minimal_mode){let b=m(a,c.invocationID);this.cache.remove(b)}return null}return c.isOnDemandRevalidate,g}catch(a){if(f)return console.error(a),null;throw a}}async revalidate(a,b,c,d,e,f,g,h,i){return this.revalidateBatcher.batch(a,()=>{let j=this.handleRevalidate(a,b,c,d,e,f,g,i);return h&&h(j),j})}async handleRevalidate(a,b,c,d,e,f,g,i){try{let j=await e({hasResolved:g,previousCacheEntry:f,isRevalidating:!0});if(!j)return null;let k=await (0,h.fromResponseCacheEntry)({...j,isMiss:!f});if(k.cacheControl)if(this.minimal_mode){let b=m(a,i);this.cache.set(b,{entry:k,expiresAt:Date.now()+this.ttl})}else await b.set(a,k.value,{cacheControl:k.cacheControl,isRoutePPREnabled:c,isFallback:d});return k}catch(e){if(null==f?void 0:f.cacheControl){let e=Math.min(Math.max(f.cacheControl.revalidate||3,3),30),g=void 0===f.cacheControl.expire?void 0:Math.max(e+3,f.cacheControl.expire);await b.set(a,f.value,{cacheControl:{revalidate:e,expire:g},isRoutePPREnabled:c,isFallback:d})}throw e}}}},57100:(a,b)=>{"use strict";function c(a,b){let c;if((null==b?void 0:b.host)&&!Array.isArray(b.host))c=b.host.toString().split(":",1)[0];else{if(!a.hostname)return;c=a.hostname}return c.toLowerCase()}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"getHostname",{enumerable:!0,get:function(){return c}})},57403:(a,b,c)=>{"use strict";let d,e;c.d(b,{K3:()=>f,rU:()=>l,tj:()=>j});let f=Number(process.env.MINES_OCR_THRESHOLD_CHARS_PER_PAGE)||80,g=process.env.MINES_OCR_LANGS||"spa+eng";async function h(){return void 0===d&&(d=(async()=>{try{return await import("tesseract.js")}catch{return null}})().catch(()=>null)),d}async function i(){return void 0===e&&(e=(async()=>{try{let a=await import("pdf-to-png-converter");if("function"==typeof a?.pdfToPng)return async b=>(await a.pdfToPng(b,{viewportScale:2})).map((a,b)=>({page:a.pageNumber||b+1,buffer:a.content}))}catch{}return null})().catch(()=>null)),e}function j(a,b){let c=b;return(null==c||Number.isNaN(Number(c)))&&(c=String(a??"").trim().length),Number(c)<f}async function k(a,b=g){let c=await h(),d=c?.recognize||c?.default?.recognize;if("function"!=typeof d)return null;try{let{data:c}=await d(a,b);return{text:String(c?.text||""),confidence:Number(c?.confidence??0)}}catch{return null}}async function l(a,b){let c,d=await i(),e=await h();if(!d||!e)return{available:!1,pages:[]};try{c=await d(a)}catch{return{available:!1,pages:[]}}let[f,g]=Array.isArray(b)?b:[null,null],j=[];for(let a of c){if(null!=f&&a.page<f||null!=g&&a.page>g)continue;let b=await k(a.buffer);j.push({page:a.page,text:b?.text||"",confidence:b?.confidence??0})}return{available:!0,pages:j}}},57647:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{pz:()=>j,yi:()=>i}),c(73024),c(76760);var e=c(84104);c(83498);var f=c(42382),g=c(40266),h=a([e,f,g]);[e,f,g]=h.then?(await h)():h;let k=[["project-watcher","Project Watcher","project_watcher","claude-code",["gh_repo_read","gh_issue_list","gh_pr_list","web_fetch","file_read"],["investigate","retro"],"Watches repos, issues, PRs, deploys, and produces weekly project pulses."],["personal-assistant","Personal Assistant","personal_assistant","anthropic",["gmail_messages_list","gmail_message_read","calendar_events_list","whatsapp_send"],[],"Reads inbox and calendar context, drafts replies, and keeps the operator organized."],["travel-concierge","Travel Concierge","travel_concierge","anthropic",["flight_search","flight_status","hotel_search","hotel_rates","web_search","web_fetch","create_artifact"],[],"Plans trips end to end — flights, hotels, and itineraries — and returns a booking-ready comparison with real prices, times, and sources. Bookings and purchases stay approval-gated."],["engineering-lead","Engineering Lead","engineering_lead","claude-code",["gh_repo_read","gh_issue_list","gh_pr_list","terminal_run","file_read","file_write"],["investigate","review","ship","qa"],"Leads implementation, review, QA, and preview deploys with explicit approval gates."],["marketing-lead","Marketing Lead","marketing_lead","anthropic",["web_search","web_fetch","file_write","create_artifact"],["design-shotgun","impeccable"],"Creates market research, launch copy, positioning, and design briefs."],["meeting-notes","Meeting Notes Taker","meeting_notes","anthropic",["transcribe_audio","file_write","create_artifact"],[],"Turns recordings into transcripts, decisions, action items, and follow-ups."],["bug-triage","Bug Triage Specialist","bug_triage","claude-code",["gh_issue_list","gh_pr_list","file_read"],["investigate"],"Classifies incoming bugs and proposes severity and next actions."],["phase-runner","Phase Runner","phase_runner","claude-code",["file_read","file_write","terminal_run"],["ship"],"Executes approved implementation phases and reports blockers."],["code-reviewer","Code Reviewer","code_reviewer","claude-code",["file_read","gh_pr_list"],["review"],"Provides independent diff review before merge."],["competitor-scout","Competitor Scout","competitor_scout","anthropic",["web_search","web_fetch","create_artifact"],[],"Tracks competitor movement and summarizes weekly signals."],["finance-ops","Finance and Ops","finance_ops","anthropic",["file_read","create_artifact"],[],"Reads finance docs and drafts advisory runway and ops summaries."],["legal-compliance","Legal and Compliance","legal_compliance","anthropic",["file_read","web_fetch","create_artifact"],[],"Reviews policy and compliance documents as advisory output only."],["customer-support","Customer Support","customer_support","anthropic",["gmail_message_read","file_write"],[],"Drafts customer replies and escalates approval-required sends."],["chief-of-staff","Chief of Staff","chief_of_staff","anthropic",["web_search","file_read","file_write","create_artifact","create_workflow_definition"],["report-builder","market-research"],"Translates founder intent into delegated work across the company, runs the weekly cadence, and surfaces decisions. No direct external writes."],["ads-media-buyer","Ads / Media Buyer","ads_media_buyer","anthropic",["web_search","file_write","create_artifact"],["design-shotgun"],"Plans, builds, and reports on paid campaigns across Meta/Google/TikTok within budget caps. Every campaign publish and budget set is approval-gated."],["content-social","Content / Social Manager","content_social","anthropic",["web_search","file_write","create_artifact","voice_speak"],["design-shotgun"],"Produces and schedules organic posts, reels, and videos and maintains brand voice. Every publish is approval-gated."],["sales-bd","Sales / BD","sales_bd","anthropic",["web_search","web_fetch","gmail_messages_list","email_send","create_artifact"],["inbox-triage"],"Builds target lists, enriches leads, runs outreach, and logs CRM activity. Bulk sends and CRM writes are approval-gated."],["ops-manager","Operations","ops_manager","anthropic",["calendar_events_list","calendar_event_read","file_read","file_write","create_artifact"],["meeting-scheduler","report-builder"],"Keeps the business running — scheduling, internal docs, recurring checklists, vendor coordination. Calendar invites and webhooks are approval-gated."],["product-pm","Product / Project Manager","product_pm","claude-code",["gh_repo_read","gh_issue_list","gh_issue_create","gh_pr_list","file_read","file_write","create_workflow_definition"],["review"],"Maintains the roadmap, writes specs, tracks delivery, and runs standups. Issue/PR creates respect the GitHub allowlist."],["web-ecommerce","Web / Ecommerce","web_ecommerce","claude-code",["web_fetch","supabase_rest_select","browser_open","file_read","file_write","create_artifact"],["web-automation"],"Manages site/store content, products, SEO, and deploys. Deploys, store writes, and DB writes are approval-gated."]].map(([a,b,c,d,e,f,g])=>({slug:a,title:b,role:c,engine_default:d,tools_required:e,tools_optional:[],skills:f,memory_scopes:["agent","project"],approval_profile:"personal_assistant"===c?"strict":"standard",description_long:g}));k.push({slug:"tool-smith",title:"Tool Smith",role:"tool_smith",engine_default:"claude-code",tools_required:["create_skill","update_skill","create_composite_tool","update_composite_tool","create_connector","update_connector","propose_tool","web_search","web_fetch","file_read"],tools_optional:[],skills:["plan","review"],memory_scopes:["agent","project"],approval_profile:"standard",description_long:"Authors reusable capabilities for the marketplace — declarative skills, composite tools chaining existing primitives, and REST API connectors. For non-REST integrations it proposes reviewable code; it never executes self-authored code.",system_prompt:'You are Tool Smith, the capability-authoring agent. Your only job is to author\nreusable capabilities other agents can use, and publish them to the marketplace.\n\nPick the RIGHT authoring path for each request:\n • A recipe chaining tools that ALREADY exist -> author a COMPOSITE TOOL\n (create_composite_tool). Reference only existing primitive tools; the\n composite inherits the MAX risk of its steps and every gate re-fires per\n step. Use this for "do X then Y then summarize" style capabilities.\n • A new REST API (Notion, Linear, Stripe, Airtable, ...) -> author a CONNECTOR\n (create_connector) with a declarative manifest: https base_url, allowed_hosts,\n secret-by-reference auth (NEVER paste a raw key — reference it by name, e.g.\n NOTION_TOKEN), and per-endpoint method/path/risk. Each endpoint becomes a\n callable <slug>.<endpoint> tool the instant the owner supplies the key once.\n • A reusable instruction/prompt recipe an LLM follows with tools it already\n has -> author a SKILL (create_skill).\n • A genuinely new integration that is NOT REST (binary, SDK-only, websockets,\n complex OAuth) -> propose_tool. This stages reviewable code; it is INERT and\n a human must merge + restart. You never execute self-authored code.\n\nHard rules: never put a raw secret in a connector manifest. Never declare a\ndestructive endpoint as low risk — the validator clamps writes to medium and\nhigh/irreversible endpoints always require human approval at run time. When asked\nfor a capability that already exists, say so instead of duplicating it.'});let l=["project-watcher","personal-assistant","engineering-lead","marketing-lead","meeting-notes"];function i(a=(0,e.Lf)()){if(globalThis.__madarxAgentTemplatesSeeded)return;let b=(0,e.kF)();for(let c of k)a.prepare(`INSERT INTO marketplace_items (id, kind, slug, title, description, category, author, source_kind, version, manifest_json, risk_summary, tags, created_at)
|
|
1014
|
+
`))}})}async function B(a,{suffix:b,inlinedDataStream:c,isStaticGeneration:d,isBuildTimePrerendering:e,buildId:h,getServerInsertedHTML:i,getServerInsertedMetadata:j,validateRootLayout:k}){let l,n,o=b?b.split(y,1)[0]:null;d&&await a.allReady;var p=[s(),t(e,h),v(j),null!=o&&o.length>0?(n=!1,new TransformStream({transform(a,b){if(b.enqueue(a),!n){n=!0;let a=new f.DetachedPromise;l=a,(0,g.scheduleImmediate)(()=>{try{b.enqueue(m.encode(o))}catch{}finally{l=void 0,a.resolve()}})}},flush(a){if(l)return l.promise;n||a.enqueue(m.encode(o))}})):null,c?x(c,!0):null,k?A():null,z(),w(i)];let q=a;for(let a of p)a&&(q=q.pipeThrough(a));return q}async function C(a,{getServerInsertedHTML:b,getServerInsertedMetadata:c}){return a.pipeThrough(s()).pipeThrough(new TransformStream({transform(a,b){(0,i.isEquivalentUint8Arrays)(a,h.ENCODED_TAGS.CLOSED.BODY_AND_HTML)||(0,i.isEquivalentUint8Arrays)(a,h.ENCODED_TAGS.CLOSED.BODY)||(0,i.isEquivalentUint8Arrays)(a,h.ENCODED_TAGS.CLOSED.HTML)||(a=(0,i.removeFromUint8Array)(a,h.ENCODED_TAGS.CLOSED.BODY),a=(0,i.removeFromUint8Array)(a,h.ENCODED_TAGS.CLOSED.HTML),b.enqueue(a))}})).pipeThrough(w(b)).pipeThrough(v(c))}async function D(a,{inlinedDataStream:b,getServerInsertedHTML:c,getServerInsertedMetadata:d,isBuildTimePrerendering:e,buildId:f}){return a.pipeThrough(s()).pipeThrough(t(e,f)).pipeThrough(w(c)).pipeThrough(v(d)).pipeThrough(x(b,!0)).pipeThrough(z())}async function E(a,{delayDataUntilFirstHtmlChunk:b,inlinedDataStream:c,getServerInsertedHTML:d,getServerInsertedMetadata:e}){return a.pipeThrough(s()).pipeThrough(w(d)).pipeThrough(v(e)).pipeThrough(x(c,b)).pipeThrough(z())}function F(){return o(y)}},51318:(a,b,c)=>{"use strict";a.exports=c(9907)},52237:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"addPathSuffix",{enumerable:!0,get:function(){return e}});let d=c(2213);function e(a,b){if(!a.startsWith("/")||!b)return a;let{pathname:c,query:e,hash:f}=(0,d.parsePath)(a);return""+c+b+e+f}},52318:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{BailoutToCSRError:function(){return d},isBailoutToCSRError:function(){return e}});let c="BAILOUT_TO_CLIENT_SIDE_RENDERING";class d extends Error{constructor(a){super("Bail out to client-side rendering: "+a),this.reason=a,this.digest=c}}function e(a){return"object"==typeof a&&null!==a&&"digest"in a&&a.digest===c}},52577:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{DynamicServerError:function(){return d},isDynamicServerError:function(){return e}});let c="DYNAMIC_SERVER_USAGE";class d extends Error{constructor(a){super("Dynamic server usage: "+a),this.description=a,this.digest=c}}function e(a){return"object"==typeof a&&null!==a&&"digest"in a&&"string"==typeof a.digest&&a.digest===c}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},52644:(a,b,c)=>{"use strict";a.exports=c.p+"static/media/check-disk-encryption.6b124b4e.mjs"},52741:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"notFound",{enumerable:!0,get:function(){return e}});let d=""+c(15570).HTTP_ERROR_FALLBACK_ERROR_CODE+";404";function e(){let a=Object.defineProperty(Error(d),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});throw a.digest=d,a}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},53476:(a,b)=>{"use strict";function c(a,b){if(0===b.length)return 0;if(0===a.length||b.length>a.length)return -1;for(let c=0;c<=a.length-b.length;c++){let d=!0;for(let e=0;e<b.length;e++)if(a[c+e]!==b[e]){d=!1;break}if(d)return c}return -1}function d(a,b){if(a.length!==b.length)return!1;for(let c=0;c<a.length;c++)if(a[c]!==b[c])return!1;return!0}function e(a,b){let d=c(a,b);if(0===d)return a.subarray(b.length);if(!(d>-1))return a;{let c=new Uint8Array(a.length-b.length);return c.set(a.slice(0,d)),c.set(a.slice(d+b.length),d),c}}Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{indexOfUint8Array:function(){return c},isEquivalentUint8Arrays:function(){return d},removeFromUint8Array:function(){return e}})},54151:(a,b,c)=>{"use strict";c.d(b,{A:()=>f});var d=c(21124),e=c(38301);function f({name:a="folder_path",value:b,onChange:c,inputRef:f,placeholder:g="/Users/you/Documents/my-project"}){let[h,i]=e.useState(null),[j,k]=e.useState(!1),[l,m]=e.useState(""),[n,o]=e.useState(""),[p,q]=e.useState(null);async function r(){let a;if(i(null),!navigator.clipboard?.readText)return void i({kind:"error",message:"Clipboard not available."});try{a=await navigator.clipboard.readText()}catch{i({kind:"error",message:"Allow clipboard access."});return}let b=(a||"").trim();if((b.startsWith('"')&&b.endsWith('"')||b.startsWith("'")&&b.endsWith("'"))&&(b=b.slice(1,-1)),b.startsWith("file://"))try{b=decodeURI(b.slice(7))}catch{}return b?b.startsWith("/")||b.startsWith("~")?void(c(b),i({kind:"success",message:"Pasted."})):void i({kind:"error",message:"Path must be absolute."}):void i({kind:"error",message:"Clipboard is empty."})}async function s(){i(null),q("pick");try{let a=await fetch("/api/fs/pick-folder",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({title:"Choose project folder",start_path:b&&b.startsWith("/")?b:void 0})});if(499===a.status)return void i({kind:"error",message:"Cancelled."});let d=await a.json();if(!a.ok)return void i({kind:"error",message:d.error||"Picker failed."});c(d.folder_path),i({kind:"success",message:`Selected ${d.folder_path}`})}catch(a){i({kind:"error",message:String(a?.message||a)})}finally{q(null)}}async function t(){if(i(null),!l.trim()||!n.trim())return void i({kind:"error",message:"Parent and name required."});q("create");try{let a=await fetch("/api/fs/create-folder",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({parent:l.trim(),name:n.trim()})}),b=await a.json();if(!a.ok)return void i({kind:"error",message:b.error||"Create failed."});c(b.folder_path),k(!1),o(""),i({kind:"success",message:`Created ${b.folder_path}`})}catch(a){i({kind:"error",message:String(a?.message||a)})}finally{q(null)}}return e.useEffect(()=>{j&&!l&&m(b||"~/Documents")},[j,b,l]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"agents-modal-paste-row",children:[(0,d.jsx)("input",{ref:f,name:a,type:"text",placeholder:g,autoComplete:"off",spellCheck:!1,value:b||"",onChange:a=>{c(a.target.value),h&&i(null)},required:!0}),(0,d.jsx)("button",{type:"button",className:"admin-button secondary",onClick:s,disabled:"pick"===p,children:"pick"===p?"Opening…":"Choose folder…"})]}),(0,d.jsxs)("div",{className:"agents-modal-folder-tools",children:[(0,d.jsx)("button",{type:"button",className:"admin-button secondary",onClick:r,children:"Paste from clipboard"}),(0,d.jsx)("button",{type:"button",className:"admin-button secondary",onClick:()=>c("~/Documents"),children:"~/Documents"}),(0,d.jsx)("button",{type:"button",className:"admin-button secondary",onClick:()=>c("~/Desktop"),children:"~/Desktop"}),(0,d.jsx)("button",{type:"button",className:"admin-button secondary",onClick:()=>k(a=>!a),children:j?"Cancel new folder":"+ New folder"})]}),j?(0,d.jsxs)("div",{className:"agents-modal-create-folder",children:[(0,d.jsx)("small",{children:"Create a folder anywhere outside system directories. Parent must exist."}),(0,d.jsx)("div",{className:"agents-modal-create-row",children:(0,d.jsx)("input",{type:"text",placeholder:"Parent (e.g. ~/Documents)",value:l,onChange:a=>m(a.target.value),spellCheck:!1,autoComplete:"off"})}),(0,d.jsxs)("div",{className:"agents-modal-create-row",children:[(0,d.jsx)("input",{type:"text",placeholder:"New folder name",value:n,onChange:a=>o(a.target.value),spellCheck:!1,autoComplete:"off"}),(0,d.jsx)("button",{type:"button",className:"admin-button",onClick:t,disabled:"create"===p,children:"create"===p?"Creating…":"Create"})]})]}):null,h?(0,d.jsx)("p",{className:`agents-modal-feedback ${h.kind}`,role:"status","aria-live":"polite",children:h.message}):null]})}},54210:(a,b,c)=>{"use strict";let d;Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{arrayBufferToString:function(){return h},decrypt:function(){return k},encrypt:function(){return j},getActionEncryptionKey:function(){return p},getClientReferenceManifestForRsc:function(){return o},getServerModuleMap:function(){return n},setReferenceManifestsSingleton:function(){return m},stringToUint8Array:function(){return i}});let e=c(58871),f=c(17916),g=c(29294);function h(a){let b=new Uint8Array(a),c=b.byteLength;if(c<65535)return String.fromCharCode.apply(null,b);let d="";for(let a=0;a<c;a++)d+=String.fromCharCode(b[a]);return d}function i(a){let b=a.length,c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=a.charCodeAt(d);return c}function j(a,b,c){return crypto.subtle.encrypt({name:"AES-GCM",iv:b},a,c)}function k(a,b,c){return crypto.subtle.decrypt({name:"AES-GCM",iv:b},a,c)}let l=Symbol.for("next.server.action-manifests");function m({page:a,clientReferenceManifest:b,serverActionsManifest:c,serverModuleMap:d}){var e;let g=null==(e=globalThis[l])?void 0:e.clientReferenceManifestsPerPage;globalThis[l]={clientReferenceManifestsPerPage:{...g,[(0,f.normalizeAppPath)(a)]:b},serverActionsManifest:c,serverModuleMap:d}}function n(){let a=globalThis[l];if(!a)throw Object.defineProperty(new e.InvariantError("Missing manifest for Server Actions."),"__NEXT_ERROR_CODE",{value:"E606",enumerable:!1,configurable:!0});return a.serverModuleMap}function o(){let a=globalThis[l];if(!a)throw Object.defineProperty(new e.InvariantError("Missing manifest for Server Actions."),"__NEXT_ERROR_CODE",{value:"E606",enumerable:!1,configurable:!0});let{clientReferenceManifestsPerPage:b}=a,c=g.workAsyncStorage.getStore();if(!c){var d=b;let a=Object.values(d),c={clientModules:{},edgeRscModuleMapping:{},rscModuleMapping:{}};for(let b of a)c.clientModules={...c.clientModules,...b.clientModules},c.edgeRscModuleMapping={...c.edgeRscModuleMapping,...b.edgeRscModuleMapping},c.rscModuleMapping={...c.rscModuleMapping,...b.rscModuleMapping};return c}let f=b[c.route];if(!f)throw Object.defineProperty(new e.InvariantError(`Missing Client Reference Manifest for ${c.route}.`),"__NEXT_ERROR_CODE",{value:"E570",enumerable:!1,configurable:!0});return f}async function p(){if(d)return d;let a=globalThis[l];if(!a)throw Object.defineProperty(new e.InvariantError("Missing manifest for Server Actions."),"__NEXT_ERROR_CODE",{value:"E606",enumerable:!1,configurable:!0});let b=process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY||a.serverActionsManifest.encryptionKey;if(void 0===b)throw Object.defineProperty(new e.InvariantError("Missing encryption key for Server Actions"),"__NEXT_ERROR_CODE",{value:"E571",enumerable:!1,configurable:!0});return d=await crypto.subtle.importKey("raw",i(atob(b)),"AES-GCM",!0,["encrypt","decrypt"])}},54353:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{DOC_PREFETCH_RANGE_HEADER_VALUE:function(){return d},doesExportedHtmlMatchBuildId:function(){return g},insertBuildIdComment:function(){return f}});let c="<!DOCTYPE html>",d="bytes=0-63";function e(a){return a.slice(0,24).replace(/-/g,"_")}function f(a,b){return b.includes("--\x3e")||!a.startsWith(c)?a:a.replace(c,c+"\x3c!--"+e(b)+"--\x3e")}function g(a,b){return a.startsWith(c+"\x3c!--"+e(b)+"--\x3e")}},54591:(a,b,c)=>{"use strict";function d(a={}){let b=Number(a.price_au_usd_oz??0),c=Number(a.payable_production_oz_per_year??0),e=Math.max(0,Math.floor(Number(a.life_years??0))),f=Number(a.opex_annual??0),g=Number(a.sustaining_capex??0),h=Number(a.royalties??0),i=Number(a.taxes??0),j=Number(a.closure_provision??0),k=Number(a.discount_rate??.08);if(!b||!c||!e)return{valuation_tier:"t2_dcf",status:"insufficient_inputs",npv_usd:null,annual_cash_flows:[]};let l=[],m=0;for(let a=1;a<=e;a++){let d=c*b,n=d-f-g-h-i-(a===e?j:0),o=1/(1+k)**a*n;m+=o,l.push({year:a,revenue_usd:d,free_cash_flow_usd:n,discounted_fcf_usd:o})}return{valuation_tier:"t2_dcf",status:"ok",npv_usd:Math.round(100*m)/100,discount_rate:k,annual_cash_flows:l.map(a=>({year:a.year,revenue_usd:Math.round(100*a.revenue_usd)/100,free_cash_flow_usd:Math.round(100*a.free_cash_flow_usd)/100,discounted_fcf_usd:Math.round(100*a.discounted_fcf_usd)/100}))}}c.d(b,{d:()=>d})},55864:(a,b,c)=>{Promise.resolve().then(c.bind(c,94657)),Promise.resolve().then(c.bind(c,50665)),Promise.resolve().then(c.bind(c,98916)),Promise.resolve().then(c.bind(c,81607)),Promise.resolve().then(c.t.bind(c,3991,23))},56534:(a,b,c)=>{"use strict";function d(a){return a.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}c.d(b,{B:()=>d})},56557:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return n}});let d=c(3017),e=c(31730),f=c(9027),g=c(86331),h=c(90914);function i(a,b){if(!a)return b;let c=parseInt(a,10);return Number.isFinite(c)&&c>0?c:b}!function(a,b){Object.keys(a).forEach(function(c){"default"===c||Object.prototype.hasOwnProperty.call(b,c)||Object.defineProperty(b,c,{enumerable:!0,get:function(){return a[c]}})})}(c(94062),b);let j=i(process.env.NEXT_PRIVATE_RESPONSE_CACHE_TTL,1e4),k=i(process.env.NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE,150),l="__ttl_sentinel__";function m(a,b){return`${a}\0${b??l}`}class n{constructor(a,b=k,c=j){this.batcher=d.Batcher.create({cacheKeyFn:({key:a,isOnDemandRevalidate:b})=>`${a}-${b?"1":"0"}`,schedulerFn:g.scheduleOnNextTick}),this.revalidateBatcher=d.Batcher.create({schedulerFn:g.scheduleOnNextTick}),this.evictedInvocationIDs=new Set,this.minimal_mode=a,this.maxSize=b,this.ttl=c,this.cache=new e.LRUCache(b,void 0,a=>{let b=function(a){let b=a.lastIndexOf("\0");if(-1===b)return;let c=a.slice(b+1);return c===l?void 0:c}(a);if(b){if(this.evictedInvocationIDs.size>=100){let a=this.evictedInvocationIDs.values().next().value;a&&this.evictedInvocationIDs.delete(a)}this.evictedInvocationIDs.add(b)}})}async get(a,b,c){if(!a)return b({hasResolved:!1,previousCacheEntry:null});if(this.minimal_mode){let b=m(a,c.invocationID),d=this.cache.get(b);if(d){if(void 0!==c.invocationID)return(0,h.toResponseCacheEntry)(d.entry);let a=Date.now();if(d.expiresAt>a)return(0,h.toResponseCacheEntry)(d.entry);this.cache.remove(b)}c.invocationID&&this.evictedInvocationIDs.has(c.invocationID)&&(0,f.warnOnce)(`Response cache entry was evicted for invocation ${c.invocationID}. Consider increasing NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE (current: ${this.maxSize}).`)}let{incrementalCache:d,isOnDemandRevalidate:e=!1,isFallback:g=!1,isRoutePPREnabled:i=!1,isPrefetch:j=!1,waitUntil:k,routeKind:l,invocationID:n}=c,o=await this.batcher.batch({key:a,isOnDemandRevalidate:e},(c,f)=>{let h=this.handleGet(a,b,{incrementalCache:d,isOnDemandRevalidate:e,isFallback:g,isRoutePPREnabled:i,isPrefetch:j,routeKind:l,invocationID:n},f);return k&&k(h),h});return(0,h.toResponseCacheEntry)(o)}async handleGet(a,b,c,d){let e=null,f=!1;try{if((e=this.minimal_mode?null:await c.incrementalCache.get(a,{kind:(0,h.routeKindToIncrementalCacheKind)(c.routeKind),isRoutePPREnabled:c.isRoutePPREnabled,isFallback:c.isFallback}))&&!c.isOnDemandRevalidate&&(d(e),f=!0,!e.isStale||c.isPrefetch))return e;let g=await this.revalidate(a,c.incrementalCache,c.isRoutePPREnabled,c.isFallback,b,e,null!==e&&!c.isOnDemandRevalidate,void 0,c.invocationID);if(!g){if(this.minimal_mode){let b=m(a,c.invocationID);this.cache.remove(b)}return null}return c.isOnDemandRevalidate,g}catch(a){if(f)return console.error(a),null;throw a}}async revalidate(a,b,c,d,e,f,g,h,i){return this.revalidateBatcher.batch(a,()=>{let j=this.handleRevalidate(a,b,c,d,e,f,g,i);return h&&h(j),j})}async handleRevalidate(a,b,c,d,e,f,g,i){try{let j=await e({hasResolved:g,previousCacheEntry:f,isRevalidating:!0});if(!j)return null;let k=await (0,h.fromResponseCacheEntry)({...j,isMiss:!f});if(k.cacheControl)if(this.minimal_mode){let b=m(a,i);this.cache.set(b,{entry:k,expiresAt:Date.now()+this.ttl})}else await b.set(a,k.value,{cacheControl:k.cacheControl,isRoutePPREnabled:c,isFallback:d});return k}catch(e){if(null==f?void 0:f.cacheControl){let e=Math.min(Math.max(f.cacheControl.revalidate||3,3),30),g=void 0===f.cacheControl.expire?void 0:Math.max(e+3,f.cacheControl.expire);await b.set(a,f.value,{cacheControl:{revalidate:e,expire:g},isRoutePPREnabled:c,isFallback:d})}throw e}}}},57100:(a,b)=>{"use strict";function c(a,b){let c;if((null==b?void 0:b.host)&&!Array.isArray(b.host))c=b.host.toString().split(":",1)[0];else{if(!a.hostname)return;c=a.hostname}return c.toLowerCase()}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"getHostname",{enumerable:!0,get:function(){return c}})},57403:(a,b,c)=>{"use strict";let d,e;c.d(b,{K3:()=>f,rU:()=>l,tj:()=>j});let f=Number(process.env.MINES_OCR_THRESHOLD_CHARS_PER_PAGE)||80,g=process.env.MINES_OCR_LANGS||"spa+eng";async function h(){return void 0===d&&(d=(async()=>{try{return await import("tesseract.js")}catch{return null}})().catch(()=>null)),d}async function i(){return void 0===e&&(e=(async()=>{try{let a=await import("pdf-to-png-converter");if("function"==typeof a?.pdfToPng)return async b=>(await a.pdfToPng(b,{viewportScale:2})).map((a,b)=>({page:a.pageNumber||b+1,buffer:a.content}))}catch{}return null})().catch(()=>null)),e}function j(a,b){let c=b;return(null==c||Number.isNaN(Number(c)))&&(c=String(a??"").trim().length),Number(c)<f}async function k(a,b=g){let c=await h(),d=c?.recognize||c?.default?.recognize;if("function"!=typeof d)return null;try{let{data:c}=await d(a,b);return{text:String(c?.text||""),confidence:Number(c?.confidence??0)}}catch{return null}}async function l(a,b){let c,d=await i(),e=await h();if(!d||!e)return{available:!1,pages:[]};try{c=await d(a)}catch{return{available:!1,pages:[]}}let[f,g]=Array.isArray(b)?b:[null,null],j=[];for(let a of c){if(null!=f&&a.page<f||null!=g&&a.page>g)continue;let b=await k(a.buffer);j.push({page:a.page,text:b?.text||"",confidence:b?.confidence??0})}return{available:!0,pages:j}}},57647:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{pz:()=>j,yi:()=>i}),c(73024),c(76760);var e=c(84104);c(83498);var f=c(42382),g=c(40266),h=a([e,f,g]);[e,f,g]=h.then?(await h)():h;let k=[["project-watcher","Project Watcher","project_watcher","claude-code",["gh_repo_read","gh_issue_list","gh_pr_list","web_fetch","file_read"],["investigate","retro"],"Watches repos, issues, PRs, deploys, and produces weekly project pulses."],["personal-assistant","Personal Assistant","personal_assistant","anthropic",["gmail_messages_list","gmail_message_read","calendar_events_list","whatsapp_send"],[],"Reads inbox and calendar context, drafts replies, and keeps the operator organized."],["travel-concierge","Travel Concierge","travel_concierge","anthropic",["flight_search","flight_status","hotel_search","hotel_rates","web_search","web_fetch","create_artifact"],[],"Plans trips end to end — flights, hotels, and itineraries — and returns a booking-ready comparison with real prices, times, and sources. Bookings and purchases stay approval-gated."],["engineering-lead","Engineering Lead","engineering_lead","claude-code",["gh_repo_read","gh_issue_list","gh_pr_list","terminal_run","file_read","file_write"],["investigate","review","ship","qa"],"Leads implementation, review, QA, and preview deploys with explicit approval gates."],["marketing-lead","Marketing Lead","marketing_lead","anthropic",["web_search","web_fetch","file_write","create_artifact"],["design-shotgun","impeccable"],"Creates market research, launch copy, positioning, and design briefs."],["meeting-notes","Meeting Notes Taker","meeting_notes","anthropic",["transcribe_audio","file_write","create_artifact"],[],"Turns recordings into transcripts, decisions, action items, and follow-ups."],["bug-triage","Bug Triage Specialist","bug_triage","claude-code",["gh_issue_list","gh_pr_list","file_read"],["investigate"],"Classifies incoming bugs and proposes severity and next actions."],["phase-runner","Phase Runner","phase_runner","claude-code",["file_read","file_write","terminal_run"],["ship"],"Executes approved implementation phases and reports blockers."],["code-reviewer","Code Reviewer","code_reviewer","claude-code",["file_read","gh_pr_list"],["review"],"Provides independent diff review before merge."],["competitor-scout","Competitor Scout","competitor_scout","anthropic",["web_search","web_fetch","create_artifact"],[],"Tracks competitor movement and summarizes weekly signals."],["finance-ops","Finance and Ops","finance_ops","anthropic",["file_read","create_artifact"],[],"Reads finance docs and drafts advisory runway and ops summaries."],["legal-compliance","Legal and Compliance","legal_compliance","anthropic",["file_read","web_fetch","create_artifact"],[],"Reviews policy and compliance documents as advisory output only."],["customer-support","Customer Support","customer_support","anthropic",["gmail_message_read","file_write"],[],"Drafts customer replies and escalates approval-required sends."],["chief-of-staff","Chief of Staff","chief_of_staff","anthropic",["web_search","file_read","file_write","create_artifact","create_workflow_definition"],["report-builder","market-research"],"Translates founder intent into delegated work across the company, runs the weekly cadence, and surfaces decisions. No direct external writes."],["ads-media-buyer","Ads / Media Buyer","ads_media_buyer","anthropic",["web_search","file_write","create_artifact"],["design-shotgun"],"Plans, builds, and reports on paid campaigns across Meta/Google/TikTok within budget caps. Every campaign publish and budget set is approval-gated."],["content-social","Content / Social Manager","content_social","anthropic",["web_search","file_write","create_artifact","voice_speak"],["design-shotgun"],"Produces and schedules organic posts, reels, and videos and maintains brand voice. Every publish is approval-gated."],["sales-bd","Sales / BD","sales_bd","anthropic",["web_search","web_fetch","gmail_messages_list","email_send","create_artifact"],["inbox-triage"],"Builds target lists, enriches leads, runs outreach, and logs CRM activity. Bulk sends and CRM writes are approval-gated."],["ops-manager","Operations","ops_manager","anthropic",["calendar_events_list","calendar_event_read","file_read","file_write","create_artifact"],["meeting-scheduler","report-builder"],"Keeps the business running — scheduling, internal docs, recurring checklists, vendor coordination. Calendar invites and webhooks are approval-gated."],["product-pm","Product / Project Manager","product_pm","claude-code",["gh_repo_read","gh_issue_list","gh_issue_create","gh_pr_list","file_read","file_write","create_workflow_definition"],["review"],"Maintains the roadmap, writes specs, tracks delivery, and runs standups. Issue/PR creates respect the GitHub allowlist."],["web-ecommerce","Web / Ecommerce","web_ecommerce","claude-code",["web_fetch","supabase_rest_select","browser_open","file_read","file_write","create_artifact"],["web-automation"],"Manages site/store content, products, SEO, and deploys. Deploys, store writes, and DB writes are approval-gated."]].map(([a,b,c,d,e,f,g])=>({slug:a,title:b,role:c,engine_default:d,tools_required:e,tools_optional:[],skills:f,memory_scopes:["agent","project"],approval_profile:"personal_assistant"===c?"strict":"standard",description_long:g}));k.push({slug:"tool-smith",title:"Tool Smith",role:"tool_smith",engine_default:"claude-code",tools_required:["create_skill","update_skill","create_composite_tool","update_composite_tool","create_connector","update_connector","propose_tool","web_search","web_fetch","file_read"],tools_optional:[],skills:["plan","review"],memory_scopes:["agent","project"],approval_profile:"standard",description_long:"Authors reusable capabilities for the marketplace — declarative skills, composite tools chaining existing primitives, and REST API connectors. For non-REST integrations it proposes reviewable code; it never executes self-authored code.",system_prompt:'You are Tool Smith, the capability-authoring agent. Your only job is to author\nreusable capabilities other agents can use, and publish them to the marketplace.\n\nPick the RIGHT authoring path for each request:\n • A recipe chaining tools that ALREADY exist -> author a COMPOSITE TOOL\n (create_composite_tool). Reference only existing primitive tools; the\n composite inherits the MAX risk of its steps and every gate re-fires per\n step. Use this for "do X then Y then summarize" style capabilities.\n • A new REST API (Notion, Linear, Stripe, Airtable, ...) -> author a CONNECTOR\n (create_connector) with a declarative manifest: https base_url, allowed_hosts,\n secret-by-reference auth (NEVER paste a raw key — reference it by name, e.g.\n NOTION_TOKEN), and per-endpoint method/path/risk. Each endpoint becomes a\n callable <slug>.<endpoint> tool the instant the owner supplies the key once.\n • A reusable instruction/prompt recipe an LLM follows with tools it already\n has -> author a SKILL (create_skill).\n • A genuinely new integration that is NOT REST (binary, SDK-only, websockets,\n complex OAuth) -> propose_tool. This stages reviewable code; it is INERT and\n a human must merge + restart. You never execute self-authored code.\n\nHard rules: never put a raw secret in a connector manifest. Never declare a\ndestructive endpoint as low risk — the validator clamps writes to medium and\nhigh/irreversible endpoints always require human approval at run time. When asked\nfor a capability that already exists, say so instead of duplicating it.'});let l=["project-watcher","personal-assistant","engineering-lead","marketing-lead","meeting-notes"];function i(a=(0,e.Lf)()){if(globalThis.__madarxAgentTemplatesSeeded)return;let b=(0,e.kF)();for(let c of k)a.prepare(`INSERT INTO marketplace_items (id, kind, slug, title, description, category, author, source_kind, version, manifest_json, risk_summary, tags, created_at)
|
|
1011
1015
|
VALUES (?, 'agent', ?, ?, ?, ?, 'madarx', 'builtin', '1.0', ?, ?, ?, ?)
|
|
1012
1016
|
ON CONFLICT(kind, slug) DO UPDATE SET title=excluded.title, description=excluded.description, manifest_json=excluded.manifest_json, tags=excluded.tags`).run(`agent:${c.slug}`,c.slug,c.title,c.description_long,c.role,JSON.stringify({agent:c}),c.approval_profile,JSON.stringify([c.role,c.engine_default]),b);if("1"!==process.env.MADARX_SEED_DEFAULT_AGENTS){globalThis.__madarxAgentTemplatesSeeded=!0;return}let c=l.map(()=>"?").join(","),d=a.prepare(`SELECT COUNT(*) AS c FROM agent_template_installations
|
|
1013
1017
|
WHERE project_id = 'personal' AND template_slug IN (${c})`).get(...l);if(d?.c>=l.length){globalThis.__madarxAgentTemplatesSeeded=!0;return}for(let a of l)try{j(a,"personal",{seed:!0})}catch{}globalThis.__madarxAgentTemplatesSeeded=!0}function j(a,b="personal",c={}){let d=function(a){var b;let c=k.find(b=>b.slug===a);return c?c:(b=g.S.find(b=>b.slug===a))?{slug:b.slug,title:b.title,role:b.role,engine_default:b.engine_default,tools_required:Array.isArray(b.tools_required)?b.tools_required:[],tools_optional:Array.isArray(b.tools_optional)?b.tools_optional:[],skills:Array.isArray(b.skills)?b.skills:[],memory_scopes:["agent","project"],approval_profile:b.approval_profile||"standard",description_long:b.description_long,system_prompt:"string"==typeof b.system_prompt?b.system_prompt:null}:null}(a);if(!d)throw Error("agent template not found");let h=(0,e.Lf)(),i=h.prepare("SELECT * FROM agent_template_installations WHERE template_slug = ? AND project_id = ?").get(a,b);if(i&&!c.overwrite)return i;let l=c.agent_id||`${b}-${a}`.replace(/[^a-zA-Z0-9_-]/g,"-"),m=(0,f.Sn)({id:l,name:d.title,type:d.role,role:d.role,title:d.title,engine:d.engine_default,tools:d.tools_required,mission:d.description_long,system_prompt:d.system_prompt||void 0,approval:d.approval_profile,project_id:b,template_slug:a,suppress_live_event:!!c.seed});for(let a of d.tools_required)(0,f.Xr)(l,a,a.includes("write")||a.includes("send")||a.includes("terminal")?"approval_required":"auto");let n=(0,e.kF)();return h.prepare(`INSERT INTO agent_template_installations (id, template_slug, agent_id, project_id, installed_at, status)
|
|
@@ -1396,7 +1400,7 @@ HARD SAFETY RULES (non-negotiable — the package is rejected by the validator o
|
|
|
1396
1400
|
INSERT INTO process_stages
|
|
1397
1401
|
(id, definition_id, position, slug, name, kind, config_json, on_pass_stage_slug, on_fail_stage_slug, required)
|
|
1398
1402
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
1399
|
-
`).run(`procstage:${a.slug}:${b.slug}`,h,d,b.slug,b.name,b.kind,JSON.stringify(b.config||{}),b.on_pass_stage_slug||null,b.on_fail_stage_slug||null,+(!1!==b.required))}),c.exec("COMMIT")}catch(a){try{c.exec("ROLLBACK")}catch{}throw a}return i(a.slug)}e=(h.then?(await h)():h)[0],d()}catch(a){d(a)}})},76760:a=>{"use strict";a.exports=require("node:path")},76825:(a,b,c)=>{"use strict";c.d(b,{M2:()=>h});var d=c(73024),e=c(76760);let f={".shp":"shp",".shx":"shp",".dbf":"shp",".prj":"prj",".gdb":"gdb",".mxd":"mxd",".dxf":"dxf",".dwg":"dwg",".adf":"adf",".tif":"raster",".tiff":"raster",".img":"raster",".ecw":"raster"};function g(a){try{return d.readFileSync(a,"utf8").trim()||null}catch{return null}}function h(a){let b=e.extname(a).toLowerCase(),c=f[String(b||"").toLowerCase()]||"other_spatial",h=null;try{h=d.statSync(a).size}catch{}let i=null,j=null;if(".prj"===b)i=g(a);else if(".shp"===b){j=function(a){try{let b=d.openSync(a,"r");try{let a=Buffer.alloc(100);if(68>d.readSync(b,a,0,100,0))return null;let c=a.readDoubleLE(36),e=a.readDoubleLE(44),f=a.readDoubleLE(52),g=a.readDoubleLE(60);if(![c,e,f,g].every(Number.isFinite))return null;return{min_x:c,min_y:e,max_x:f,max_y:g}}finally{d.closeSync(b)}}catch{return null}}(a);let b=a.replace(/\.shp$/i,".prj");b!==a&&d.existsSync(b)&&(i=g(b))}return{kind:c,crs:i,bbox:j,file_size_bytes:h}}},76862:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{n:()=>l});var e=c(68571),f=c(84939),g=c(42382),h=a([e,f,g]);[e,f,g]=h.then?(await h)():h;let m=new Set(["__composite_slug","approval_id"]);function i(a,b){let c=a;for(let a of b.split(".")){if(null==c)return;c=c[a]}return c}function j(a,b){if("string"==typeof a){let c=a.match(/^\{\{\s*([a-zA-Z0-9_.-]+)\s*\}\}$/);if(c){let a=i(b,c[1]);return void 0===a?"":a}return a.replace(/\{\{\s*([a-zA-Z0-9_.-]+)\s*\}\}/g,(a,c)=>{let d=i(b,c);return void 0===d?"":"string"==typeof d?d:JSON.stringify(d)})}if(Array.isArray(a))return a.map(a=>j(a,b));if(a&&"object"==typeof a){let c={};for(let[d,e]of Object.entries(a))c[d]=j(e,b);return c}return a}async function k(a,b,d){let e=j(a.prompt,b);if("function"==typeof d.__synthesize)try{let a=await d.__synthesize(e);return{ok:!0,text:String(a??"")}}catch(a){return{ok:!0,text:"",skipped:!0,reason:String(a?.message||a)}}try{let{chatWithClaude:a}=await Promise.resolve().then(c.bind(c,99752)),b=await a({messages:[{role:"user",content:e}]}),d="string"==typeof b?b:b?.text||b?.content||"";return{ok:!0,text:String(d||"")}}catch(a){return{ok:!0,text:"",skipped:!0,reason:String(a?.message||a)}}}async function l(a={},b={}){let c=a.__composite_slug,d=c?(0,f.t2)(c):null;if(!d)return{ok:!1,status:"error",error:"not_found",message:`Unknown composite tool: ${c||"(none)"}`};let h={};for(let[b,c]of Object.entries(a))m.has(b)||(h[b]=c);let i={input:h},n=[],o={agent_id:b.agent_id,project_id:b.project_id,org_id:b.org_id,actor_role:b.actor_role,owner_trusted:b.owner_trusted,acting_on_behalf_of_user_id:b.acting_on_behalf_of_user_id||b.user_id||null};for(let a of d.steps)if("tool_call"===a.kind){let b,d=j(a.input_template||{},i);try{b=await (0,e.hM)(a.tool,d,o)}catch(b){return{ok:!1,status:"error",error:"step_failed",failed_step:a.id,failed_tool:a.tool,message:`Composite ${c} aborted at step '${a.id}' (${a.tool}): ${String(b?.message||b)}`,completed_steps:n.map(a=>a.id)}}if(!(b&&!1!==b.ok&&"approval_required"!==b.status&&"allowlist_violation"!==b.status&&"rate_limited"!==b.status&&"error"!==b.status))return{ok:!1,status:"error",error:"step_failed",failed_step:a.id,failed_tool:a.tool,step_result:b,message:`Composite ${c} aborted at step '${a.id}' (${a.tool}): ${b?.status||b?.error||"failed"}`,completed_steps:n.map(a=>a.id)};i[a.id]=b,n.push({id:a.id,kind:"tool_call",tool:a.tool,ok:!0,status:b.status})}else if("llm_synthesis"===a.kind){let c=await k(a,i,b);i[a.id]=c,n.push({id:a.id,kind:"llm_synthesis",ok:!0,skipped:!!c.skipped})}else if("artifact_write"===a.kind)try{let d=j(a.title_template||`${c} output`,i),e=a.content_ref?j(a.content_ref,i):"",f=(0,g.Dg)({title:String(d),kind:"markdown",content:"string"==typeof e?e:JSON.stringify(e,null,2),agent_id:b.agent_id||null,project_id:b.project_id||null});i[a.id]=f,n.push({id:a.id,kind:"artifact_write",ok:!0,artifact_id:f?.id||null})}catch(b){return{ok:!1,status:"error",error:"step_failed",failed_step:a.id,message:`Composite ${c} aborted at artifact_write '${a.id}': ${String(b?.message||b)}`,completed_steps:n.map(a=>a.id)}}return{ok:!0,status:"complete",composite:c,steps:n,result:n.length?i[n[n.length-1].id]:null}}d()}catch(a){d(a)}})},77030:a=>{"use strict";a.exports=require("node:net")},77598:a=>{"use strict";a.exports=require("node:crypto")},77871:(a,b,c)=>{"use strict";c.d(b,{default:()=>m});var d=c(21124),e=c(38301),f=c(23312),g=c(43815),h=c(85708);let i=(0,h.createServerReference)("40a8f153ddbbd5ce1e7ba0b4760e8e9e66e8b4188d",h.callServer,void 0,h.findSourceMapURL,"updateProjectAction");var j=c(54151);let k=[{value:"#c2452a",name:"Mars Red"},{value:"#a83a22",name:"Deep Red"},{value:"#7c2b19",name:"Dark Red"},{value:"#111318",name:"Charcoal"},{value:"#3f3a30",name:"Warm Black"},{value:"#68707b",name:"Slate"},{value:"#cdb78a",name:"Warm Sand"},{value:"#1f6c9f",name:"Skill Blue"}];function l(){let{pending:a}=(0,f.useFormStatus)();return(0,d.jsx)("button",{type:"submit",className:"admin-button",disabled:a,"aria-busy":a?"true":void 0,children:a?"Saving…":"Save changes"})}function m({projectId:a,projectName:b,projectColor:c,projectDescription:f,projectFolderPath:h}){let[m,n]=e.useState(!1),[o,p]=e.useState("keep"),[q,r]=e.useState(h||""),s=e.useRef(null);return e.useEffect(()=>{m&&(p("keep"),r(h||""))},[m,h]),e.useEffect(()=>{"custom"===o&&s.current?.focus()},[o]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{type:"button",className:"admin-button secondary project-edit",onClick:()=>n(!0),"aria-label":`Edit ${b}`,children:"Edit"}),(0,d.jsx)(g.A,{open:m,onClose:()=>n(!1),eyebrow:"Edit project",title:`Edit ${b}`,children:(0,d.jsxs)("form",{className:"agents-modal-form",action:i,children:[(0,d.jsx)("input",{type:"hidden",name:"project_id",value:a}),(0,d.jsx)("section",{className:"agents-modal-section",children:(0,d.jsxs)("label",{className:"agents-modal-field wide",children:[(0,d.jsx)("span",{children:"Name"}),(0,d.jsx)("input",{name:"name",type:"text",defaultValue:b,autoComplete:"off",required:!0})]})}),(0,d.jsxs)("section",{className:"agents-modal-section",children:[(0,d.jsxs)("div",{className:"agents-modal-section-head",children:[(0,d.jsx)("span",{children:"Folder location"}),(0,d.jsx)("small",{children:"Where project files live on disk. Move only if you've already moved the folder yourself."})]}),(0,d.jsxs)("div",{className:"agents-modal-radio-group",children:[(0,d.jsxs)("label",{className:`agents-modal-radio ${"keep"===o?"on":""}`,children:[(0,d.jsx)("input",{type:"radio",name:"folder_mode",value:"keep",checked:"keep"===o,onChange:()=>p("keep")}),(0,d.jsxs)("span",{className:"agents-modal-radio-body",children:[(0,d.jsx)("b",{children:"Keep current"}),(0,d.jsx)("code",{title:h||"",children:function(a,b=48){if(!a||a.length<=b)return a;let c=a.slice(0,Math.floor(b/2)-1),d=a.slice(a.length-Math.floor(b/2)+2);return`${c}…${d}`}(h)||"(not set)"})]})]}),(0,d.jsxs)("label",{className:`agents-modal-radio ${"custom"===o?"on":""}`,children:[(0,d.jsx)("input",{type:"radio",name:"folder_mode",value:"custom",checked:"custom"===o,onChange:()=>p("custom")}),(0,d.jsxs)("span",{className:"agents-modal-radio-body",children:[(0,d.jsx)("b",{children:"Change to…"}),(0,d.jsx)("small",{children:"Absolute path. Must already exist or be writable."})]})]})]}),"custom"===o?(0,d.jsx)(j.A,{inputRef:s,value:q,onChange:r}):(0,d.jsx)("input",{type:"hidden",name:"folder_path",value:""})]}),(0,d.jsxs)("section",{className:"agents-modal-section",children:[(0,d.jsxs)("div",{className:"agents-modal-section-head",children:[(0,d.jsx)("span",{children:"Color"}),(0,d.jsx)("small",{children:"Tile color across the app."})]}),(0,d.jsxs)("fieldset",{className:"agents-modal-swatches",children:[(0,d.jsx)("legend",{className:"visually-hidden",children:"Project color"}),k.map(a=>(0,d.jsxs)("label",{className:"agents-modal-swatch",style:{"--swatch":a.value},children:[(0,d.jsx)("input",{type:"radio",name:"color",value:a.value,defaultChecked:a.value===(c||"#c2452a")}),(0,d.jsx)("span",{className:"agents-modal-swatch-ring","aria-hidden":"true"}),(0,d.jsx)("span",{className:"visually-hidden",children:a.name})]},a.value))]})]}),(0,d.jsxs)("section",{className:"agents-modal-section",children:[(0,d.jsxs)("div",{className:"agents-modal-section-head",children:[(0,d.jsx)("span",{children:"Description"}),(0,d.jsx)("small",{children:"Used as context for agents working in this project."})]}),(0,d.jsx)("label",{className:"agents-modal-field wide",children:(0,d.jsx)("textarea",{name:"description",rows:3,defaultValue:f||"",placeholder:"What is this project for? Goals, audience, voice, constraints."})})]}),(0,d.jsxs)("footer",{className:"agents-modal-foot",children:[(0,d.jsx)("button",{type:"button",className:"admin-button secondary",onClick:()=>n(!1),children:"Cancel"}),(0,d.jsx)(l,{})]})]})})]})}},77886:a=>{"use strict";a.exports=JSON.parse('{"schema_version":1,"slug":"support-escalation","name":"Support Escalation","version":1,"description":"Frontline triages an escalated support ticket. Captures severity + impact, runs an automated triage pass, gates on supervisor approval, and packages the resolution.","category":"support","source":"marketplace","status":"published","stages":[{"slug":"intake","name":"Escalation intake","kind":"intake_form","config":{"form_schema":{"title":"Support Escalation — Intake","description":"Capture the customer, severity, and impact so the triage agent has enough context to route this.","fields":[{"name":"customer_name","label":"Customer / account","type":"text","required":true},{"name":"reporter_email","label":"Reporter email","type":"email","required":true},{"name":"severity","label":"Severity","type":"select","required":true,"options":["Sev 1 — production down","Sev 2 — major degradation","Sev 3 — minor degradation","Sev 4 — question"]},{"name":"description","label":"Description","type":"textarea","required":true,"min_length":30,"placeholder":"What is happening? Include error messages and timeline."},{"name":"impact","label":"Business impact","type":"textarea","required":true,"min_length":20},{"name":"requested_outcome","label":"Requested outcome","type":"text","required":false,"placeholder":"Optional — what does the customer want?"}]}}},{"slug":"triage","name":"Automated triage","kind":"agent_run","config":{"agent_template_slug":"support-triage-agent","prompt":"You are a support triage agent. Read the escalation intake and produce a triage report. Return strict JSON only: { \\"outcome\\": \\"pass\\", \\"priority\\": \\"P0\\" | \\"P1\\" | \\"P2\\" | \\"P3\\", \\"suggested_owner_role\\": \\"engineering\\" | \\"infra\\" | \\"product\\" | \\"success\\" | \\"billing\\", \\"response_target_minutes\\": integer, \\"customer_summary\\": \\"one paragraph in plain language\\", \\"internal_summary\\": \\"one paragraph for the on-call channel\\" }. Always emit outcome=\\"pass\\" — triage is informational; the supervisor approval stage is the real decision point. Mapping: Sev 1 → P0/30min, Sev 2 → P1/2h, Sev 3 → P2/24h, Sev 4 → P3/72h. Override severity only if the description suggests data loss / security (then P0).","output_schema":"support_triage_v1","timeout_ms":60000,"on_outcome":{"pass":"supervisor-approval"}},"on_pass_stage_slug":"supervisor-approval","on_fail_stage_slug":null},{"slug":"supervisor-approval","name":"Supervisor sign-off","kind":"human_approval","config":{"action_type":"process.stage.approve","risk":"medium","summary_template":"Approve triage for {{intake.customer_name}} — {{triage.priority}}, owner {{triage.suggested_owner_role}}"},"on_pass_stage_slug":"final-package","on_fail_stage_slug":null},{"slug":"final-package","name":"Resolution pack","kind":"package","config":{"title_template":"Support escalation — {{intake.customer_name}}","include_stages":["intake","triage","supervisor-approval"]}}]}')},78040:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{xI:()=>j});var e=c(73024),f=c(76760),g=c(684),h=c(10022),i=a([h]);h=(i.then?(await i)():i)[0];let k=new Set(["node_modules",".git",".ssh"]),l=new Set([".ssh"]);function j({org_id:a}={}){function b(b){let c=f.resolve(String(b||""));if(!b)throw Error("allowlist_violation: empty path");if(function(a){if(a.split(f.sep).filter(Boolean).some(a=>l.has(a)))return!0;let b=f.basename(a);return".env.local"===b||/^\.env($|\.)/.test(b)}(c))throw Error("allowlist_violation: path is a secret/system path: "+c);if(!(0,g.wn)(c)&&!(0,h.RB)(c,{org_id:a}))throw Error("allowlist_violation: path is outside the OS-allowed or approved Mines import roots: "+c);return c}return{listFolder(a){let c=b(a),d=[],g=[c];for(;g.length;){let a,b=g.pop();try{a=e.readdirSync(b,{withFileTypes:!0})}catch{continue}for(let c of a){let a=c.name;if(a.startsWith("."))continue;let e=f.join(b,a);if(!c.isSymbolicLink())if(c.isDirectory()){if(k.has(a))continue;g.push(e)}else c.isFile()&&d.push(e)}}return d},readDocument(a){let c=b(a);return e.readFileSync(c)},statFile(a){let c,d=b(a);try{c=e.statSync(d)}catch{return null}return{size:c.size,mtimeMs:c.mtimeMs,isDirectory:c.isDirectory(),isFile:c.isFile()}}}}j(),d()}catch(a){d(a)}})},78516:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(97954).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/madarx-os/madarx-os/app/projects/new-project-modal.jsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/madarx-os/madarx-os/app/projects/new-project-modal.jsx","default")},78547:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{b:()=>n});var e=c(76760),f=c(73024),g=c(78608),h=c(84104),i=c(38985),j=c(37937),k=c(83498),l=a([h,i,j]);[h,i,j]=l.then?(await l)():l;let o=Object.create(null);for(let[a,b]of Object.entries({name:["name","project","proyecto","nombre","prospect","target","project name","project/prospect"],commodity:["commodity","commodities","mineral","metal","commodity/commodities"],deposit_type:["deposit","deposit_type","deposit/target type","tipo","target type","deposit type","tipo de deposito","tipo de yacimiento"],owner:["owner","propietario","titular","company","empresa","operator"],available_information:["available information","informacion disponible","informaci\xf3n disponible","info","data available","available info","available data"],has_drilling:["has drilling","drilling","barrenacion","sondeo","drilled","has_drilling","has drilling?","drilling?"],deal_terms:["deal terms","deal","terms","terminos","t\xe9rminos","negociacion","negociaci\xf3n","deal/terms"],data_completeness:["data completeness","completeness","completitud","data_completeness","% completeness","completeness %"],notes:["notes","notas","comments","comentarios","observaciones","note","remarks","comentario"]}))for(let c of b)o[c.toLowerCase().trim()]=a;function m(a){if(null==a)return null;let b=a?.value??a;if(null==b)return null;if("object"==typeof b&&null!==b){if(void 0!==b.result)return String(b.result).trim()||null;if(void 0!==b.text)return String(b.text).trim()||null;if(Array.isArray(b.richText))return b.richText.map(a=>a.text||"").join("").trim()||null;if(b instanceof Date)return b.toISOString()}return String(b).trim()||null}async function n(a,b={}){let c,d,{file_id:l,portfolio_name:p,sheet_name:q}=a||{},r=[],s=(0,i.mM)(l);if(!s)return{status:"error",error:"file_not_found",errors:["Disk file not found: "+l]};{let a,b,c=e.join(k.nJ,"disk");try{a=f.realpathSync(s.storage_path)}catch{return{status:"error",error:"file_inaccessible",errors:["Disk file path is not accessible: "+s.storage_path]}}try{b=f.realpathSync(c)}catch{b=e.resolve(c)}let d=e.relative(b,a);if(!(""!==d&&!d.startsWith("..")&&!e.isAbsolute(d)))throw Error("Unsafe file path blocked by safety policy: storage_path is outside allowed disk root: "+s.storage_path)}let t=new g.Workbook;if(await t.xlsx.readFile(s.storage_path),q){if(!(c=t.getWorksheet(q)))return{status:"error",error:"sheet_not_found",errors:['Sheet "'+q+'" not found in workbook']}}else c=t.worksheets[0];if(!c)return{status:"error",error:"no_sheets",errors:["Workbook contains no worksheets"]};let u=c.getRow(1),v=Object.create(null),w=!1;if(u.eachCell({includeEmpty:!1},(a,b)=>{let c=m(a);if(!c)return;let d=o[c.toLowerCase().trim()];d&&(v[b]=d,"name"===d&&(w=!0))}),!w)return{status:"error",error:"missing_required_column",errors:['Required column "name" (or alias: project/proyecto/nombre/prospect/target) not found in sheet headers']};let x=(0,h.Lf)(),y=(0,h.kF)(),z=x.prepare("SELECT id FROM mines_portfolios WHERE name = ? LIMIT 1"),A=x.prepare("INSERT INTO mines_portfolios (id, name, source_catalog_artifact_id, created_at, updated_at) VALUES (?, ?, ?, ?, ?)"),B=x.prepare("SELECT id FROM mines_portfolio_entries WHERE portfolio_id = ? AND name = ? LIMIT 1"),C=x.prepare(`
|
|
1403
|
+
`).run(`procstage:${a.slug}:${b.slug}`,h,d,b.slug,b.name,b.kind,JSON.stringify(b.config||{}),b.on_pass_stage_slug||null,b.on_fail_stage_slug||null,+(!1!==b.required))}),c.exec("COMMIT")}catch(a){try{c.exec("ROLLBACK")}catch{}throw a}return i(a.slug)}e=(h.then?(await h)():h)[0],d()}catch(a){d(a)}})},76760:a=>{"use strict";a.exports=require("node:path")},76825:(a,b,c)=>{"use strict";c.d(b,{M2:()=>h});var d=c(73024),e=c(76760);let f={".shp":"shp",".shx":"shp",".dbf":"shp",".prj":"prj",".gdb":"gdb",".mxd":"mxd",".dxf":"dxf",".dwg":"dwg",".adf":"adf",".tif":"raster",".tiff":"raster",".img":"raster",".ecw":"raster"};function g(a){try{return d.readFileSync(a,"utf8").trim()||null}catch{return null}}function h(a){let b=e.extname(a).toLowerCase(),c=f[String(b||"").toLowerCase()]||"other_spatial",h=null;try{h=d.statSync(a).size}catch{}let i=null,j=null;if(".prj"===b)i=g(a);else if(".shp"===b){j=function(a){try{let b=d.openSync(a,"r");try{let a=Buffer.alloc(100);if(68>d.readSync(b,a,0,100,0))return null;let c=a.readDoubleLE(36),e=a.readDoubleLE(44),f=a.readDoubleLE(52),g=a.readDoubleLE(60);if(![c,e,f,g].every(Number.isFinite))return null;return{min_x:c,min_y:e,max_x:f,max_y:g}}finally{d.closeSync(b)}}catch{return null}}(a);let b=a.replace(/\.shp$/i,".prj");b!==a&&d.existsSync(b)&&(i=g(b))}return{kind:c,crs:i,bbox:j,file_size_bytes:h}}},76862:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{n:()=>l});var e=c(68571),f=c(84939),g=c(42382),h=a([e,f,g]);[e,f,g]=h.then?(await h)():h;let m=new Set(["__composite_slug","approval_id"]);function i(a,b){let c=a;for(let a of b.split(".")){if(null==c)return;c=c[a]}return c}function j(a,b){if("string"==typeof a){let c=a.match(/^\{\{\s*([a-zA-Z0-9_.-]+)\s*\}\}$/);if(c){let a=i(b,c[1]);return void 0===a?"":a}return a.replace(/\{\{\s*([a-zA-Z0-9_.-]+)\s*\}\}/g,(a,c)=>{let d=i(b,c);return void 0===d?"":"string"==typeof d?d:JSON.stringify(d)})}if(Array.isArray(a))return a.map(a=>j(a,b));if(a&&"object"==typeof a){let c={};for(let[d,e]of Object.entries(a))c[d]=j(e,b);return c}return a}async function k(a,b,d){let e=j(a.prompt,b);if("function"==typeof d.__synthesize)try{let a=await d.__synthesize(e);return{ok:!0,text:String(a??"")}}catch(a){return{ok:!0,text:"",skipped:!0,reason:String(a?.message||a)}}try{let{chatWithClaude:a}=await Promise.resolve().then(c.bind(c,99752)),b=await a({messages:[{role:"user",content:e}]}),d="string"==typeof b?b:b?.text||b?.content||"";return{ok:!0,text:String(d||"")}}catch(a){return{ok:!0,text:"",skipped:!0,reason:String(a?.message||a)}}}async function l(a={},b={}){let c=a.__composite_slug,d=c?(0,f.t2)(c):null;if(!d)return{ok:!1,status:"error",error:"not_found",message:`Unknown composite tool: ${c||"(none)"}`};let h={};for(let[b,c]of Object.entries(a))m.has(b)||(h[b]=c);let i={input:h},n=[],o={agent_id:b.agent_id,project_id:b.project_id,org_id:b.org_id,actor_role:b.actor_role,owner_trusted:b.owner_trusted,acting_on_behalf_of_user_id:b.acting_on_behalf_of_user_id||b.user_id||null};for(let a of d.steps)if("tool_call"===a.kind){let b,d=j(a.input_template||{},i);try{b=await (0,e.hM)(a.tool,d,o)}catch(b){return{ok:!1,status:"error",error:"step_failed",failed_step:a.id,failed_tool:a.tool,message:`Composite ${c} aborted at step '${a.id}' (${a.tool}): ${String(b?.message||b)}`,completed_steps:n.map(a=>a.id)}}if(!(b&&!1!==b.ok&&"approval_required"!==b.status&&"allowlist_violation"!==b.status&&"rate_limited"!==b.status&&"error"!==b.status))return{ok:!1,status:"error",error:"step_failed",failed_step:a.id,failed_tool:a.tool,step_result:b,message:`Composite ${c} aborted at step '${a.id}' (${a.tool}): ${b?.status||b?.error||"failed"}`,completed_steps:n.map(a=>a.id)};i[a.id]=b,n.push({id:a.id,kind:"tool_call",tool:a.tool,ok:!0,status:b.status})}else if("llm_synthesis"===a.kind){let c=await k(a,i,b);i[a.id]=c,n.push({id:a.id,kind:"llm_synthesis",ok:!0,skipped:!!c.skipped})}else if("artifact_write"===a.kind)try{let d=j(a.title_template||`${c} output`,i),e=a.content_ref?j(a.content_ref,i):"",f=(0,g.Dg)({title:String(d),kind:"markdown",content:"string"==typeof e?e:JSON.stringify(e,null,2),agent_id:b.agent_id||null,project_id:b.project_id||null});i[a.id]=f,n.push({id:a.id,kind:"artifact_write",ok:!0,artifact_id:f?.id||null})}catch(b){return{ok:!1,status:"error",error:"step_failed",failed_step:a.id,message:`Composite ${c} aborted at artifact_write '${a.id}': ${String(b?.message||b)}`,completed_steps:n.map(a=>a.id)}}return{ok:!0,status:"complete",composite:c,steps:n,result:n.length?i[n[n.length-1].id]:null}}d()}catch(a){d(a)}})},77030:a=>{"use strict";a.exports=require("node:net")},77598:a=>{"use strict";a.exports=require("node:crypto")},77886:a=>{"use strict";a.exports=JSON.parse('{"schema_version":1,"slug":"support-escalation","name":"Support Escalation","version":1,"description":"Frontline triages an escalated support ticket. Captures severity + impact, runs an automated triage pass, gates on supervisor approval, and packages the resolution.","category":"support","source":"marketplace","status":"published","stages":[{"slug":"intake","name":"Escalation intake","kind":"intake_form","config":{"form_schema":{"title":"Support Escalation — Intake","description":"Capture the customer, severity, and impact so the triage agent has enough context to route this.","fields":[{"name":"customer_name","label":"Customer / account","type":"text","required":true},{"name":"reporter_email","label":"Reporter email","type":"email","required":true},{"name":"severity","label":"Severity","type":"select","required":true,"options":["Sev 1 — production down","Sev 2 — major degradation","Sev 3 — minor degradation","Sev 4 — question"]},{"name":"description","label":"Description","type":"textarea","required":true,"min_length":30,"placeholder":"What is happening? Include error messages and timeline."},{"name":"impact","label":"Business impact","type":"textarea","required":true,"min_length":20},{"name":"requested_outcome","label":"Requested outcome","type":"text","required":false,"placeholder":"Optional — what does the customer want?"}]}}},{"slug":"triage","name":"Automated triage","kind":"agent_run","config":{"agent_template_slug":"support-triage-agent","prompt":"You are a support triage agent. Read the escalation intake and produce a triage report. Return strict JSON only: { \\"outcome\\": \\"pass\\", \\"priority\\": \\"P0\\" | \\"P1\\" | \\"P2\\" | \\"P3\\", \\"suggested_owner_role\\": \\"engineering\\" | \\"infra\\" | \\"product\\" | \\"success\\" | \\"billing\\", \\"response_target_minutes\\": integer, \\"customer_summary\\": \\"one paragraph in plain language\\", \\"internal_summary\\": \\"one paragraph for the on-call channel\\" }. Always emit outcome=\\"pass\\" — triage is informational; the supervisor approval stage is the real decision point. Mapping: Sev 1 → P0/30min, Sev 2 → P1/2h, Sev 3 → P2/24h, Sev 4 → P3/72h. Override severity only if the description suggests data loss / security (then P0).","output_schema":"support_triage_v1","timeout_ms":60000,"on_outcome":{"pass":"supervisor-approval"}},"on_pass_stage_slug":"supervisor-approval","on_fail_stage_slug":null},{"slug":"supervisor-approval","name":"Supervisor sign-off","kind":"human_approval","config":{"action_type":"process.stage.approve","risk":"medium","summary_template":"Approve triage for {{intake.customer_name}} — {{triage.priority}}, owner {{triage.suggested_owner_role}}"},"on_pass_stage_slug":"final-package","on_fail_stage_slug":null},{"slug":"final-package","name":"Resolution pack","kind":"package","config":{"title_template":"Support escalation — {{intake.customer_name}}","include_stages":["intake","triage","supervisor-approval"]}}]}')},78040:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{xI:()=>j});var e=c(73024),f=c(76760),g=c(684),h=c(10022),i=a([h]);h=(i.then?(await i)():i)[0];let k=new Set(["node_modules",".git",".ssh"]),l=new Set([".ssh"]);function j({org_id:a}={}){function b(b){let c=f.resolve(String(b||""));if(!b)throw Error("allowlist_violation: empty path");if(function(a){if(a.split(f.sep).filter(Boolean).some(a=>l.has(a)))return!0;let b=f.basename(a);return".env.local"===b||/^\.env($|\.)/.test(b)}(c))throw Error("allowlist_violation: path is a secret/system path: "+c);if(!(0,g.wn)(c)&&!(0,h.RB)(c,{org_id:a}))throw Error("allowlist_violation: path is outside the OS-allowed or approved Mines import roots: "+c);return c}return{listFolder(a){let c=b(a),d=[],g=[c];for(;g.length;){let a,b=g.pop();try{a=e.readdirSync(b,{withFileTypes:!0})}catch{continue}for(let c of a){let a=c.name;if(a.startsWith("."))continue;let e=f.join(b,a);if(!c.isSymbolicLink())if(c.isDirectory()){if(k.has(a))continue;g.push(e)}else c.isFile()&&d.push(e)}}return d},readDocument(a){let c=b(a);return e.readFileSync(c)},statFile(a){let c,d=b(a);try{c=e.statSync(d)}catch{return null}return{size:c.size,mtimeMs:c.mtimeMs,isDirectory:c.isDirectory(),isFile:c.isFile()}}}}j(),d()}catch(a){d(a)}})},78516:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(97954).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/madarx-os/madarx-os/app/projects/new-project-modal.jsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/madarx-os/madarx-os/app/projects/new-project-modal.jsx","default")},78547:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{b:()=>n});var e=c(76760),f=c(73024),g=c(78608),h=c(84104),i=c(38985),j=c(37937),k=c(83498),l=a([h,i,j]);[h,i,j]=l.then?(await l)():l;let o=Object.create(null);for(let[a,b]of Object.entries({name:["name","project","proyecto","nombre","prospect","target","project name","project/prospect"],commodity:["commodity","commodities","mineral","metal","commodity/commodities"],deposit_type:["deposit","deposit_type","deposit/target type","tipo","target type","deposit type","tipo de deposito","tipo de yacimiento"],owner:["owner","propietario","titular","company","empresa","operator"],available_information:["available information","informacion disponible","informaci\xf3n disponible","info","data available","available info","available data"],has_drilling:["has drilling","drilling","barrenacion","sondeo","drilled","has_drilling","has drilling?","drilling?"],deal_terms:["deal terms","deal","terms","terminos","t\xe9rminos","negociacion","negociaci\xf3n","deal/terms"],data_completeness:["data completeness","completeness","completitud","data_completeness","% completeness","completeness %"],notes:["notes","notas","comments","comentarios","observaciones","note","remarks","comentario"]}))for(let c of b)o[c.toLowerCase().trim()]=a;function m(a){if(null==a)return null;let b=a?.value??a;if(null==b)return null;if("object"==typeof b&&null!==b){if(void 0!==b.result)return String(b.result).trim()||null;if(void 0!==b.text)return String(b.text).trim()||null;if(Array.isArray(b.richText))return b.richText.map(a=>a.text||"").join("").trim()||null;if(b instanceof Date)return b.toISOString()}return String(b).trim()||null}async function n(a,b={}){let c,d,{file_id:l,portfolio_name:p,sheet_name:q}=a||{},r=[],s=(0,i.mM)(l);if(!s)return{status:"error",error:"file_not_found",errors:["Disk file not found: "+l]};{let a,b,c=e.join(k.nJ,"disk");try{a=f.realpathSync(s.storage_path)}catch{return{status:"error",error:"file_inaccessible",errors:["Disk file path is not accessible: "+s.storage_path]}}try{b=f.realpathSync(c)}catch{b=e.resolve(c)}let d=e.relative(b,a);if(!(""!==d&&!d.startsWith("..")&&!e.isAbsolute(d)))throw Error("Unsafe file path blocked by safety policy: storage_path is outside allowed disk root: "+s.storage_path)}let t=new g.Workbook;if(await t.xlsx.readFile(s.storage_path),q){if(!(c=t.getWorksheet(q)))return{status:"error",error:"sheet_not_found",errors:['Sheet "'+q+'" not found in workbook']}}else c=t.worksheets[0];if(!c)return{status:"error",error:"no_sheets",errors:["Workbook contains no worksheets"]};let u=c.getRow(1),v=Object.create(null),w=!1;if(u.eachCell({includeEmpty:!1},(a,b)=>{let c=m(a);if(!c)return;let d=o[c.toLowerCase().trim()];d&&(v[b]=d,"name"===d&&(w=!0))}),!w)return{status:"error",error:"missing_required_column",errors:['Required column "name" (or alias: project/proyecto/nombre/prospect/target) not found in sheet headers']};let x=(0,h.Lf)(),y=(0,h.kF)(),z=x.prepare("SELECT id FROM mines_portfolios WHERE name = ? LIMIT 1"),A=x.prepare("INSERT INTO mines_portfolios (id, name, source_catalog_artifact_id, created_at, updated_at) VALUES (?, ?, ?, ?, ?)"),B=x.prepare("SELECT id FROM mines_portfolio_entries WHERE portfolio_id = ? AND name = ? LIMIT 1"),C=x.prepare(`
|
|
1400
1404
|
UPDATE mines_portfolio_entries
|
|
1401
1405
|
SET commodity = ?, deposit_type = ?, owner = ?, available_information = ?,
|
|
1402
1406
|
has_drilling = ?, deal_terms = ?, data_completeness = ?, notes = ?, updated_at = ?
|
|
@@ -1434,7 +1438,7 @@ HARD SAFETY RULES (non-negotiable — the package is rejected by the validator o
|
|
|
1434
1438
|
`).run(r,d,k,m,n,x,y,"Declarative skill — instructions only, no code executes.",z,w),v.prepare(`
|
|
1435
1439
|
INSERT OR IGNORE INTO marketplace_installations (item_id, installed)
|
|
1436
1440
|
VALUES (?, 0)
|
|
1437
|
-
`).run(r)),{id:r,slug:d,invocation:o,file_path:s}}function m(a){return a&&(0,e.Lf)().prepare("SELECT * FROM marketplace_items WHERE kind='skill' AND slug=? LIMIT 1").get(a)||null}e=(k.then?(await k)():k)[0],d()}catch(a){d(a)}})},80781:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{x:()=>k,y:()=>l});var e=c(31421),f=c(42382),g=c(67354),h=c(684),i=a([f,g]);function j(a){return(0,h.nc)(String(a||"").slice(0,Number(process.env.MADARX_TOOL_OUTPUT_MAX_BYTES||5e4)))}function k(a={}){let b=String(a.command||""),c=Array.isArray(a.args)?a.args.map(String):[],{path:d}=(0,h.hC)(a.cwd||"."),e=(0,h.IB)(b,c);if(e.blocked)throw Error(e.reason);return{command:b,args:c,cwd:d,classified:e}}async function l(a={},b={}){let{command:c,args:d,cwd:h,classified:i}=k(a);if(i.approval_required&&!b.owner_trusted&&!(0,g.v)(a.approval_id,{action_type:"terminal_run",matches:a=>{var b;return a.command===c&&(b=a.args,JSON.stringify(b||[])===JSON.stringify(d||[]))&&a.cwd===h}})){let a=(0,g.D6)({action_type:"terminal_run",risk:i.risk,summary:`Run ${c} ${d.join(" ")}`.trim(),payload:{command:c,args:d,cwd:h,reason:i.reason}});return{ok:!1,status:"approval_required",approval_request_id:a.id,reason:i.reason}}let m=Math.max(1,Math.min(6e5,Number(a.timeout_ms||process.env.MADARX_TERMINAL_TIMEOUT_MS||18e4))),n=Date.now();return await new Promise(a=>{let b="",g="",i=(0,e.spawn)(c,d,{cwd:h,shell:!1,stdio:["ignore","pipe","pipe"]}),k=setTimeout(()=>i.kill("SIGTERM"),m);i.stdout.on("data",a=>{b+=a}),i.stderr.on("data",a=>{g+=a}),i.on("error",e=>{clearTimeout(k),(0,f.appendAudit)({type:"local.terminal_run",summary:`terminal_run failed: ${c}`,status:"failed",meta:{command:c,args:d,cwd:h,error:e.message}}),a({ok:!1,tool:"terminal_run",status:"failed",command:c,args:d,cwd:h,error:e.message,stdout:j(b),stderr:j(g)})}),i.on("close",(e,i)=>{clearTimeout(k);let l=i?"timeout":0===e?"complete":"failed";(0,f.appendAudit)({type:"local.terminal_run",summary:`terminal_run ${l}: ${c}`,status:l,meta:{command:c,args:d,cwd:h,exit_code:e,signal:i,duration_ms:Date.now()-n,stdout_preview:j(b),stderr_preview:j(g)}}),a({ok:0===e&&!i,tool:"terminal_run",status:l,command:c,args:d,cwd:h,exit_code:e,signal:i,stdout:j(b),stderr:j(g),duration_ms:Date.now()-n})})})}[f,g]=i.then?(await i)():i,d()}catch(a){d(a)}})},81626:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"isDynamicRoute",{enumerable:!0,get:function(){return g}});let d=c(78697),e=/\/[^/]*\[[^/]+\][^/]*(?=\/|$)/,f=/\/\[[^/]+\](?=\/|$)/;function g(a,b){return(void 0===b&&(b=!0),(0,d.isInterceptionRouteAppPath)(a)&&(a=(0,d.extractInterceptionRouteInformation)(a).interceptedRoute),b)?f.test(a):e.test(a)}},81909:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Pq:()=>o,r6:()=>n});var e=c(77598),f=c(84104),g=c(7346),h=a([f]);f=(h.then?(await h)():h)[0];let p="aes-256-gcm",q=new Map;function i(){return(0,g.K2)({db:(0,f.Lf)(),allowGenerate:!0})}function j(a={}){return a.scope?String(a.scope):a.agent_id?`agent:${a.agent_id}`:a.project_id?`project:${a.project_id}`:"global"}function k(a,b={}){return b.project_id?String(b.project_id):String(a).startsWith("project:")?String(a).slice(8):null}function l(a,b,c){return`${a}::${b}::${c||""}`}function m(a,b,c){return(0,f.Lf)().prepare("SELECT * FROM secrets WHERE name = ? AND scope = ? AND COALESCE(project_id, '') = COALESCE(?, '') AND status = 'active' LIMIT 1").get(a,b,c||null)}function n(a,b={}){let c=[];b.agent_id&&c.push([`agent:${b.agent_id}`,null]),b.project_id&&c.push([`project:${b.project_id}`,String(b.project_id)]);let d=j(b);c.push([d,k(d,b)]),c.push(["global",null]);let g=new Set;for(let[b,d]of c){let c=l(a,b,d);if(g.has(c))continue;if(g.add(c),q.has(c))return q.get(c);let h=m(a,b,d);if(h)return function(a,b){let c;try{c=function(a,b,c,d){let f=(0,e.createDecipheriv)(p,d,b);return f.setAuthTag(c),Buffer.concat([f.update(a),f.final()]).toString("utf8")}(Buffer.from(a.value_encrypted),Buffer.from(a.iv),Buffer.from(a.auth_tag),i())}catch(b){throw console.warn(`[secrets] decrypt failed for ${a.name} (scope=${a.scope}, id=${a.id}): ${b?.message||b}. The active MADARX_MASTER_KEY does not match the key that encrypted this row. Either restore the original key or re-store this secret with the current key.`),b}return(0,f.Lf)().prepare("UPDATE secrets SET last_used_at = ? WHERE id = ?").run((0,f.kF)(),a.id),q.set(b,c),c}(h,c)}return Object.prototype.hasOwnProperty.call(process.env,a)?process.env[a]:null}function o(a,b,c={}){if(!a||"string"!=typeof a)throw Error("name is required");if(null==b)throw Error("value is required");let d=j(c),g=k(d,c),h=(0,f.Lf)(),n=(0,f.kF)(),r=m(a,d,g);r&&h.prepare("UPDATE secrets SET status = ?, rotated_at = ? WHERE id = ?").run("rotated",n,r.id),q.delete(l(a,d,g));let{iv:s,encrypted:t,authTag:u}=function(a,b){let c=(0,e.randomBytes)(12),d=(0,e.createCipheriv)(p,b,c),f=Buffer.concat([d.update(String(a),"utf8"),d.final()]);return{iv:c,encrypted:f,authTag:d.getAuthTag()}}(b,i());h.prepare(`INSERT INTO secrets (id, name, scope, value_encrypted, iv, auth_tag, status, source, metadata_json, project_id, created_at)
|
|
1441
|
+
`).run(r)),{id:r,slug:d,invocation:o,file_path:s}}function m(a){return a&&(0,e.Lf)().prepare("SELECT * FROM marketplace_items WHERE kind='skill' AND slug=? LIMIT 1").get(a)||null}e=(k.then?(await k)():k)[0],d()}catch(a){d(a)}})},80781:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{x:()=>k,y:()=>l});var e=c(31421),f=c(42382),g=c(67354),h=c(684),i=a([f,g]);function j(a){return(0,h.nc)(String(a||"").slice(0,Number(process.env.MADARX_TOOL_OUTPUT_MAX_BYTES||5e4)))}function k(a={}){let b=String(a.command||""),c=Array.isArray(a.args)?a.args.map(String):[],{path:d}=(0,h.hC)(a.cwd||"."),e=(0,h.IB)(b,c);if(e.blocked)throw Error(e.reason);return{command:b,args:c,cwd:d,classified:e}}async function l(a={},b={}){let{command:c,args:d,cwd:h,classified:i}=k(a);if(i.approval_required&&!b.owner_trusted&&!(0,g.v)(a.approval_id,{action_type:"terminal_run",matches:a=>{var b;return a.command===c&&(b=a.args,JSON.stringify(b||[])===JSON.stringify(d||[]))&&a.cwd===h}})){let a=(0,g.D6)({action_type:"terminal_run",risk:i.risk,summary:`Run ${c} ${d.join(" ")}`.trim(),payload:{command:c,args:d,cwd:h,reason:i.reason}});return{ok:!1,status:"approval_required",approval_request_id:a.id,reason:i.reason}}let m=Math.max(1,Math.min(6e5,Number(a.timeout_ms||process.env.MADARX_TERMINAL_TIMEOUT_MS||18e4))),n=Date.now();return await new Promise(a=>{let b="",g="",i=(0,e.spawn)(c,d,{cwd:h,shell:!1,stdio:["ignore","pipe","pipe"]}),k=setTimeout(()=>i.kill("SIGTERM"),m);i.stdout.on("data",a=>{b+=a}),i.stderr.on("data",a=>{g+=a}),i.on("error",e=>{clearTimeout(k),(0,f.appendAudit)({type:"local.terminal_run",summary:`terminal_run failed: ${c}`,status:"failed",meta:{command:c,args:d,cwd:h,error:e.message}}),a({ok:!1,tool:"terminal_run",status:"failed",command:c,args:d,cwd:h,error:e.message,stdout:j(b),stderr:j(g)})}),i.on("close",(e,i)=>{clearTimeout(k);let l=i?"timeout":0===e?"complete":"failed";(0,f.appendAudit)({type:"local.terminal_run",summary:`terminal_run ${l}: ${c}`,status:l,meta:{command:c,args:d,cwd:h,exit_code:e,signal:i,duration_ms:Date.now()-n,stdout_preview:j(b),stderr_preview:j(g)}}),a({ok:0===e&&!i,tool:"terminal_run",status:l,command:c,args:d,cwd:h,exit_code:e,signal:i,stdout:j(b),stderr:j(g),duration_ms:Date.now()-n})})})}[f,g]=i.then?(await i)():i,d()}catch(a){d(a)}})},81607:(a,b,c)=>{"use strict";c.d(b,{default:()=>m});var d=c(21124),e=c(38301),f=c(23312),g=c(43815),h=c(85708);let i=(0,h.createServerReference)("407477242cda9ea03532cccc80b5ec4d6168467af5",h.callServer,void 0,h.findSourceMapURL,"createProjectAction");var j=c(54151);let k=[{value:"#c2452a",name:"Mars Red"},{value:"#a83a22",name:"Deep Red"},{value:"#7c2b19",name:"Dark Red"},{value:"#111318",name:"Charcoal"},{value:"#3f3a30",name:"Warm Black"},{value:"#68707b",name:"Slate"},{value:"#cdb78a",name:"Warm Sand"},{value:"#1f6c9f",name:"Skill Blue"}];function l(){let{pending:a}=(0,f.useFormStatus)();return(0,d.jsx)("button",{type:"submit",className:"admin-button",disabled:a,"aria-busy":a?"true":void 0,children:a?"Creating…":"Create project"})}function m({workspaceRoot:a="~/workspace/projects"}){let[b,c]=e.useState(!1),[f,h]=e.useState(""),[m,n]=e.useState("workspace"),[o,p]=e.useState(""),q=e.useRef(null),r=e.useMemo(()=>`${a.replace(/\/$/,"")}/${String(f||"").toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,64)||"project"}`,[a,f]);return e.useEffect(()=>{"custom"===m&&q.current?.focus()},[m]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("button",{type:"button",className:"admin-button agents-new-cta",onClick:()=>c(!0),children:[(0,d.jsx)("span",{"aria-hidden":!0,className:"agents-new-cta-glyph",children:"+"}),"New project"]}),(0,d.jsx)(g.A,{open:b,onClose:()=>c(!1),eyebrow:"New project",title:"Create a project",children:(0,d.jsxs)("form",{className:"agents-modal-form",action:i,children:[(0,d.jsx)("p",{className:"agents-modal-help",children:"Scope agents, documents, memory, and integrations together."}),(0,d.jsx)("section",{className:"agents-modal-section",children:(0,d.jsxs)("label",{className:"agents-modal-field wide",children:[(0,d.jsx)("span",{children:"Name"}),(0,d.jsx)("input",{name:"name",type:"text",required:!0,placeholder:"Acme Co.",autoComplete:"off",value:f,onChange:a=>h(a.target.value),autoFocus:!0})]})}),(0,d.jsxs)("section",{className:"agents-modal-section",children:[(0,d.jsxs)("div",{className:"agents-modal-section-head",children:[(0,d.jsx)("span",{children:"Folder location"}),(0,d.jsx)("small",{children:"Where this project lives on disk."})]}),(0,d.jsxs)("div",{className:"agents-modal-radio-group",children:[(0,d.jsxs)("label",{className:`agents-modal-radio ${"workspace"===m?"on":""}`,children:[(0,d.jsx)("input",{type:"radio",name:"folder_mode",value:"workspace",checked:"workspace"===m,onChange:()=>n("workspace")}),(0,d.jsxs)("span",{className:"agents-modal-radio-body",children:[(0,d.jsx)("b",{children:"madarX workspace"}),(0,d.jsx)("code",{title:r,children:function(a,b=48){if(!a||a.length<=b)return a;let c=a.slice(0,Math.floor(b/2)-1),d=a.slice(a.length-Math.floor(b/2)+2);return`${c}…${d}`}(r)})]})]}),(0,d.jsxs)("label",{className:`agents-modal-radio ${"custom"===m?"on":""}`,children:[(0,d.jsx)("input",{type:"radio",name:"folder_mode",value:"custom",checked:"custom"===m,onChange:()=>n("custom")}),(0,d.jsxs)("span",{className:"agents-modal-radio-body",children:[(0,d.jsx)("b",{children:"Custom path"}),(0,d.jsx)("small",{children:"Any absolute folder. Created if missing."})]})]})]}),"custom"===m?(0,d.jsx)(j.A,{inputRef:q,value:o,onChange:p}):(0,d.jsx)("input",{type:"hidden",name:"folder_path",value:""})]}),(0,d.jsxs)("section",{className:"agents-modal-section",children:[(0,d.jsxs)("div",{className:"agents-modal-section-head",children:[(0,d.jsx)("span",{children:"Color"}),(0,d.jsx)("small",{children:"Used for the project tile across the app."})]}),(0,d.jsxs)("fieldset",{className:"agents-modal-swatches",children:[(0,d.jsx)("legend",{className:"visually-hidden",children:"Project color"}),k.map(a=>(0,d.jsxs)("label",{className:"agents-modal-swatch",style:{"--swatch":a.value},children:[(0,d.jsx)("input",{type:"radio",name:"color",value:a.value,defaultChecked:"#c2452a"===a.value}),(0,d.jsx)("span",{className:"agents-modal-swatch-ring","aria-hidden":"true"}),(0,d.jsx)("span",{className:"visually-hidden",children:a.name})]},a.value))]})]}),(0,d.jsxs)("section",{className:"agents-modal-section",children:[(0,d.jsxs)("div",{className:"agents-modal-section-head",children:[(0,d.jsx)("span",{children:"Description"}),(0,d.jsx)("small",{children:"Used as context for agents working in this project."})]}),(0,d.jsx)("label",{className:"agents-modal-field wide",children:(0,d.jsx)("textarea",{name:"description",rows:3,placeholder:"What is this project for? Goals, audience, voice, constraints."})})]}),(0,d.jsxs)("footer",{className:"agents-modal-foot",children:[(0,d.jsx)("button",{type:"button",className:"admin-button secondary",onClick:()=>c(!1),children:"Cancel"}),(0,d.jsx)(l,{})]})]})})]})}},81626:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"isDynamicRoute",{enumerable:!0,get:function(){return g}});let d=c(78697),e=/\/[^/]*\[[^/]+\][^/]*(?=\/|$)/,f=/\/\[[^/]+\](?=\/|$)/;function g(a,b){return(void 0===b&&(b=!0),(0,d.isInterceptionRouteAppPath)(a)&&(a=(0,d.extractInterceptionRouteInformation)(a).interceptedRoute),b)?f.test(a):e.test(a)}},81909:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Pq:()=>o,r6:()=>n});var e=c(77598),f=c(84104),g=c(7346),h=a([f]);f=(h.then?(await h)():h)[0];let p="aes-256-gcm",q=new Map;function i(){return(0,g.K2)({db:(0,f.Lf)(),allowGenerate:!0})}function j(a={}){return a.scope?String(a.scope):a.agent_id?`agent:${a.agent_id}`:a.project_id?`project:${a.project_id}`:"global"}function k(a,b={}){return b.project_id?String(b.project_id):String(a).startsWith("project:")?String(a).slice(8):null}function l(a,b,c){return`${a}::${b}::${c||""}`}function m(a,b,c){return(0,f.Lf)().prepare("SELECT * FROM secrets WHERE name = ? AND scope = ? AND COALESCE(project_id, '') = COALESCE(?, '') AND status = 'active' LIMIT 1").get(a,b,c||null)}function n(a,b={}){let c=[];b.agent_id&&c.push([`agent:${b.agent_id}`,null]),b.project_id&&c.push([`project:${b.project_id}`,String(b.project_id)]);let d=j(b);c.push([d,k(d,b)]),c.push(["global",null]);let g=new Set;for(let[b,d]of c){let c=l(a,b,d);if(g.has(c))continue;if(g.add(c),q.has(c))return q.get(c);let h=m(a,b,d);if(h)return function(a,b){let c;try{c=function(a,b,c,d){let f=(0,e.createDecipheriv)(p,d,b);return f.setAuthTag(c),Buffer.concat([f.update(a),f.final()]).toString("utf8")}(Buffer.from(a.value_encrypted),Buffer.from(a.iv),Buffer.from(a.auth_tag),i())}catch(b){throw console.warn(`[secrets] decrypt failed for ${a.name} (scope=${a.scope}, id=${a.id}): ${b?.message||b}. The active MADARX_MASTER_KEY does not match the key that encrypted this row. Either restore the original key or re-store this secret with the current key.`),b}return(0,f.Lf)().prepare("UPDATE secrets SET last_used_at = ? WHERE id = ?").run((0,f.kF)(),a.id),q.set(b,c),c}(h,c)}return Object.prototype.hasOwnProperty.call(process.env,a)?process.env[a]:null}function o(a,b,c={}){if(!a||"string"!=typeof a)throw Error("name is required");if(null==b)throw Error("value is required");let d=j(c),g=k(d,c),h=(0,f.Lf)(),n=(0,f.kF)(),r=m(a,d,g);r&&h.prepare("UPDATE secrets SET status = ?, rotated_at = ? WHERE id = ?").run("rotated",n,r.id),q.delete(l(a,d,g));let{iv:s,encrypted:t,authTag:u}=function(a,b){let c=(0,e.randomBytes)(12),d=(0,e.createCipheriv)(p,b,c),f=Buffer.concat([d.update(String(a),"utf8"),d.final()]);return{iv:c,encrypted:f,authTag:d.getAuthTag()}}(b,i());h.prepare(`INSERT INTO secrets (id, name, scope, value_encrypted, iv, auth_tag, status, source, metadata_json, project_id, created_at)
|
|
1438
1442
|
VALUES (?, ?, ?, ?, ?, ?, 'active', ?, ?, ?, ?)`).run((0,f.Si)("sec"),a,d,t,s,u,c.source||"manual",c.metadata?JSON.stringify(c.metadata):null,g,n),q.set(l(a,d,g),String(b))}d()}catch(a){d(a)}})},81929:(a,b,c)=>{"use strict";c.d(b,{S:()=>e});var d=c(8512);function e(a){return null===a||(0,d.Ee)(a)||(0,d.Ny)(a)?1:(0,d.es)(a)?2:void 0}},82056:(a,b,c)=>{"use strict";c.d(b,{xU:()=>d});let d=["travel-concierge"]},83183:(a,b,c)=>{"use strict";a.exports=c(49754).vendored["react-rsc"].ReactServerDOMWebpackServer},83237:a=>{"use strict";a.exports=import("playwright")},83498:(a,b,c)=>{"use strict";c.d(b,{Dl:()=>i,Jh:()=>v,QG:()=>j,bo:()=>p,c_:()=>t,nJ:()=>n,ny:()=>x,un:()=>o,wn:()=>k,yQ:()=>r,z9:()=>w});var d=c(76760),e=c(73024),f=c(48161),g=c(73136);let h=d.dirname((0,g.fileURLToPath)("file:///home/runner/work/madarx-os/madarx-os/lib/paths.js")),i=d.resolve(h,".."),j=process.env.MADARX_PKG_ROOT?d.resolve(process.env.MADARX_PKG_ROOT):i;function k(...a){for(let b of a)try{if(b&&e.statSync(b).isDirectory())return b}catch{}return process.cwd()}let l=!1;function m(a,b,c){if(process.env[a])return d.resolve(process.env[a]);if(process.env[b]){let a=d.resolve(process.env[b]);return!function(a,b){if(l||b.startsWith(f.tmpdir()))return;l=!0;let c=a.replace("VILLA515_","MADARX_");console.warn(`[paths] ${a} is deprecated — rename it to ${c}. The old name still works for now but will be removed in a future release.`)}(b,a),a}let e=process.env.MADARX_HOME?d.resolve(process.env.MADARX_HOME):null;return e?d.join(e,c):d.join(i,c)}let n=m("MADARX_DATA_DIR","VILLA515_DATA_DIR","data"),o=m("MADARX_WORKSPACE","VILLA515_WORKSPACE","workspace"),p=d.join(o,"agents"),q=d.join(o,"reports"),r=d.join(o,"artifacts"),s=d.join(o,"brand"),t=d.join(n,"madarx.sqlite"),u=d.join(n,"whatsapp");function v(){for(let a of[n,o,p,q,r,s])e.mkdirSync(a,{recursive:!0})}function w(a){return d.relative(i,a)}function x(a){if(!a)return null;if(d.isAbsolute(a))return a;let b=d.resolve(i,a);if(e.existsSync(b))return b;let c=a.replace(/\\/g,"/");for(let a of[o,n]){let b=`${d.basename(a)}/`,f=c.lastIndexOf(b);if(-1!==f){let g=d.join(a,c.slice(f+b.length));if(e.existsSync(g))return g}}return b}d.join(u,"session"),d.join(i,"scripts","whatsapp-bridge")},83796:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{D6:()=>r,Hz:()=>s,Jz:()=>u,aU:()=>t});var e=c(76760),f=c(73024),g=c(83498),h=c(684),i=c(89145),j=a([i]);i=(j.then?(await j)():j)[0];let v=e.join(g.nJ,"browser-profile"),w=e.join(g.nJ,"browser-screenshots"),x=null,y=null,z=null;function k(a){let b=Number(a);return!Number.isFinite(b)||b<=0?3e4:Math.min(12e4,Math.max(1e3,Math.floor(b)))}function l(a){return(0,h.nc)(String(a??"").slice(0,2e4))}async function m(a){let b=function(){let a=String(process.env.MADARX_BROWSER_HEADED||"").trim().toLowerCase();return"1"===a||"true"===a||"yes"===a||"on"===a}(),c={headless:!b,args:["--no-sandbox","--disable-dev-shm-usage"]};if(b)try{return await a.launchPersistentContext(v,{...c,channel:"chrome"})}catch{}return await a.launchPersistentContext(v,c)}function n(){z&&clearTimeout(z),z=setTimeout(()=>{o().catch(()=>{})},9e4),"function"==typeof z.unref&&z.unref()}async function o(){z&&(clearTimeout(z),z=null);let a=x;if(x=null,y=null,a)try{await a.close()}catch{}}async function p(){let a;if(x&&y&&!y.isClosed())return n(),y;try{({chromium:a}=await Promise.resolve().then(c.bind(c,83237)))}catch{throw Error("Playwright is not installed. Run: npm install playwright && npx playwright install chromium")}f.mkdirSync(v,{recursive:!0});try{x=await m(a)}catch(a){throw x=null,Error(`Failed to launch Chromium (${a?.message||a}). Provision it with: npx playwright install chromium`)}return x.setDefaultTimeout(3e4),y=x.pages()[0]||await x.newPage(),n(),y}async function q(a){let b="";try{b=await a.title()}catch{}return{url:a.url(),title:b}}async function r(a={}){let b=(0,i.vC)(a.url).href,c=k(a.timeout_ms);try{let d=await p();if(await d.goto(b,{waitUntil:"domcontentloaded",timeout:c}),a.wait_for)try{await d.waitForSelector(String(a.wait_for),{timeout:c})}catch{}let{url:e,title:f}=await q(d),g=await d.evaluate(()=>document.body?.innerText||"");return{ok:!0,tool:"browser_open",status:"complete",url:e,title:f,text:l(g)}}catch(a){return{ok:!1,tool:"browser_open",status:"failed",url:b,error:String(a?.message||a)}}}let A=new Set(["click","fill","type","select","press","scroll","wait"]);async function s(a={}){let b,c=String(a.action||"").toLowerCase();if(!A.has(c))return{ok:!1,tool:"browser_act",status:"error",error:`unknown action: ${c||"(none)"}`};let d=k(a.timeout_ms);try{b=await p()}catch(a){return{ok:!1,tool:"browser_act",status:"failed",error:String(a?.message||a)}}try{if("scroll"===c)await b.evaluate(()=>window.scrollBy(0,window.innerHeight));else if("wait"===c)a.selector?await b.waitForSelector(String(a.selector),{timeout:d}):await b.waitForTimeout(Math.min(d,1e4));else{let e=String(a.selector||"");if(!e)return{ok:!1,tool:"browser_act",status:"error",error:"selector is required"};let f=b.locator(e).first();"click"===c?await f.click({timeout:d}):"fill"===c?await f.fill(String(a.text??""),{timeout:d}):"type"===c?await f.pressSequentially(String(a.text??""),{timeout:d}):"select"===c?await f.selectOption(String(a.value??a.text??""),{timeout:d}):"press"===c&&await f.press(String(a.key||"Enter"),{timeout:d})}let{url:e,title:f}=await q(b);return{ok:!0,tool:"browser_act",status:"complete",action:c,url:e,title:f}}catch(a){return{ok:!1,tool:"browser_act",status:"failed",action:c,error:String(a?.message||a)}}}async function t(a={}){let b,c=String(a.mode||"text").toLowerCase(),d=a.selector?String(a.selector):null;try{b=await p()}catch(a){return{ok:!1,tool:"browser_extract",status:"failed",error:String(a?.message||a)}}try{let a="";a="html"===c?d?await b.locator(d).first().innerHTML().catch(()=>"")||"":await b.content():"json-ld"===c?(await b.evaluate(()=>Array.from(document.querySelectorAll('script[type="application/ld+json"]')).map(a=>a.textContent||""))).join("\n"):d?await b.locator(d).first().innerText().catch(()=>"")||"":await b.evaluate(()=>document.body?.innerText||"");let{url:e,title:f}=await q(b);return{ok:!0,tool:"browser_extract",status:"complete",mode:c,url:e,title:f,content:l(a)}}catch(a){return{ok:!1,tool:"browser_extract",status:"failed",error:String(a?.message||a)}}}async function u(a={}){let b;try{b=await p()}catch(a){return{ok:!1,tool:"browser_screenshot",status:"failed",error:String(a?.message||a)}}try{f.mkdirSync(w,{recursive:!0});let c=`shot-${Date.now()}.png`.replace(/[^a-zA-Z0-9_.-]/g,"-"),d=e.join(w,c),g={path:d,fullPage:!!a.full_page};a.selector?await b.locator(String(a.selector)).first().screenshot({path:d}):await b.screenshot(g);let{url:h,title:i}=await q(b);return{ok:!0,tool:"browser_screenshot",status:"complete",url:h,title:i,path:d}}catch(a){return{ok:!1,tool:"browser_screenshot",status:"failed",error:String(a?.message||a)}}}d()}catch(a){d(a)}})},84104:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Lf:()=>n,Si:()=>p,kF:()=>o});var e=c(80099),f=c(73024),g=c(76760),h=c(48161),i=c(77598),j=c(83498),k=c(95411),l=c(26200),m=a([l]);l=(m.then?(await m)():m)[0];let q=null,r=null;function n(){if(q&&r===j.c_)return q;if(q){try{q.close()}catch{}q=null}(0,j.Jh)();let a=new e.DatabaseSync(j.c_);for(let b of(a.exec("PRAGMA journal_mode=WAL;"),a.exec("PRAGMA busy_timeout=5000;"),a.exec("PRAGMA foreign_keys=ON;"),a.exec(k.x),["ALTER TABLE artifacts ADD COLUMN title TEXT","ALTER TABLE artifacts ADD COLUMN content TEXT","ALTER TABLE artifacts ADD COLUMN source_md TEXT","ALTER TABLE agents ADD COLUMN system_prompt TEXT","ALTER TABLE agents ADD COLUMN memory TEXT","ALTER TABLE agents ADD COLUMN model TEXT","ALTER TABLE runs ADD COLUMN output TEXT","ALTER TABLE hermes_jobs ADD COLUMN cwd TEXT","ALTER TABLE hermes_jobs ADD COLUMN timeout_ms INTEGER","ALTER TABLE connectors ADD COLUMN type TEXT","ALTER TABLE connectors ADD COLUMN capabilities TEXT","ALTER TABLE connectors ADD COLUMN metadata TEXT","ALTER TABLE schedules ADD COLUMN last_queued_at TEXT","ALTER TABLE schedules ADD COLUMN last_queued_window TEXT","ALTER TABLE heartbeat_tasks ADD COLUMN approval_request_id TEXT","ALTER TABLE agents ADD COLUMN reports_to TEXT","ALTER TABLE agents ADD COLUMN role TEXT","ALTER TABLE agents ADD COLUMN title TEXT","ALTER TABLE agents ADD COLUMN status_reason TEXT","ALTER TABLE agents ADD COLUMN autonomy_mode TEXT","ALTER TABLE agents ADD COLUMN budget_monthly_cents INTEGER DEFAULT 0","ALTER TABLE agents ADD COLUMN spent_monthly_cents INTEGER DEFAULT 0","ALTER TABLE agents ADD COLUMN permissions_json TEXT","ALTER TABLE agents ADD COLUMN metadata_json TEXT","ALTER TABLE agents ADD COLUMN project_id TEXT","ALTER TABLE agents ADD COLUMN template_slug TEXT","ALTER TABLE secrets ADD COLUMN project_id TEXT","ALTER TABLE audit_logs ADD COLUMN project_id TEXT","ALTER TABLE audit_logs ADD COLUMN correlation_id TEXT","ALTER TABLE tool_egress ADD COLUMN project_id TEXT","ALTER TABLE activity_log ADD COLUMN project_id TEXT","ALTER TABLE artifacts ADD COLUMN project_id TEXT","ALTER TABLE heartbeat_tasks ADD COLUMN project_id TEXT","ALTER TABLE transcripts ADD COLUMN engine TEXT","ALTER TABLE transcripts ADD COLUMN language TEXT","ALTER TABLE transcripts ADD COLUMN duration_seconds REAL","ALTER TABLE approval_requests ADD COLUMN project_id TEXT","ALTER TABLE projects ADD COLUMN folder_path TEXT","ALTER TABLE tasks ADD COLUMN due_at TEXT","ALTER TABLE tasks ADD COLUMN tags_json TEXT","ALTER TABLE tasks ADD COLUMN estimate_minutes INTEGER","ALTER TABLE tasks ADD COLUMN watchers_json TEXT","ALTER TABLE tasks ADD COLUMN recurrence TEXT","ALTER TABLE tasks ADD COLUMN acceptance_criteria TEXT","ALTER TABLE tasks ADD COLUMN recurred_from_task_id TEXT","ALTER TABLE artifacts ADD COLUMN task_id TEXT","ALTER TABLE artifacts ADD COLUMN is_protected INTEGER NOT NULL DEFAULT 0","ALTER TABLE projects ADD COLUMN org_id TEXT","ALTER TABLE artifacts ADD COLUMN owner_user_id TEXT","ALTER TABLE artifacts ADD COLUMN sharing_scope TEXT NOT NULL DEFAULT 'private'","ALTER TABLE artifacts ADD COLUMN encrypted INTEGER NOT NULL DEFAULT 0","ALTER TABLE artifacts ADD COLUMN encryption_key_id TEXT","ALTER TABLE audit_logs ADD COLUMN user_id TEXT","ALTER TABLE audit_logs ADD COLUMN org_id TEXT","ALTER TABLE audit_logs ADD COLUMN ip TEXT","ALTER TABLE audit_logs ADD COLUMN user_agent TEXT","ALTER TABLE audit_logs ADD COLUMN action_target_id TEXT","ALTER TABLE audit_logs ADD COLUMN action_target_type TEXT","ALTER TABLE activity_log ADD COLUMN user_id TEXT","ALTER TABLE activity_log ADD COLUMN org_id TEXT","ALTER TABLE activity_log ADD COLUMN ip TEXT","ALTER TABLE heartbeat_tasks ADD COLUMN acting_on_behalf_of_user_id TEXT","ALTER TABLE schedules ADD COLUMN created_by_user_id TEXT","ALTER TABLE schedules ADD COLUMN catchup_policy TEXT DEFAULT 'fire_all'","ALTER TABLE artifacts ADD COLUMN folder_id TEXT","ALTER TABLE artifacts ADD COLUMN space_id TEXT","ALTER TABLE agents ADD COLUMN default_space_id TEXT","ALTER TABLE artifacts ADD COLUMN heartbeat_task_id TEXT","ALTER TABLE artifacts ADD COLUMN dedupe_key TEXT","ALTER TABLE artifact_share_links ADD COLUMN token TEXT","ALTER TABLE artifacts ADD COLUMN pinned_to_space_at TEXT","ALTER TABLE process_definitions ADD COLUMN source_spec_json TEXT","ALTER TABLE process_definitions ADD COLUMN schema_version INTEGER NOT NULL DEFAULT 1","ALTER TABLE process_definitions ADD COLUMN created_by_user_id TEXT","ALTER TABLE process_definitions ADD COLUMN created_by_agent_id TEXT","ALTER TABLE tool_allowlists ADD COLUMN org_id TEXT","ALTER TABLE tool_allowlists ADD COLUMN created_by_user_id TEXT","ALTER TABLE agents ADD COLUMN expected_output TEXT","ALTER TABLE mines_projects ADD COLUMN default_space_id TEXT","ALTER TABLE chat_sessions ADD COLUMN active_turn_id TEXT","ALTER TABLE chat_sessions ADD COLUMN active_turn_started_at TEXT"]))try{a.exec(b)}catch(a){if(!/duplicate column name/i.test(String(a?.message||a)))throw a}return a.exec("CREATE INDEX IF NOT EXISTS idx_agents_reports_to ON agents(reports_to);"),a.exec("CREATE INDEX IF NOT EXISTS idx_tasks_due_at ON tasks(due_at);"),a.exec("DROP INDEX IF EXISTS idx_secrets_one_active;"),a.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_secrets_one_active ON secrets(name, scope, COALESCE(project_id, '')) WHERE status = 'active';"),a.exec("CREATE INDEX IF NOT EXISTS idx_audit_project_at ON audit_logs(project_id, at DESC);"),a.exec("CREATE INDEX IF NOT EXISTS idx_egress_project_at ON tool_egress(project_id, at DESC);"),a.exec("CREATE INDEX IF NOT EXISTS idx_activity_project ON activity_log(project_id, created_at DESC);"),a.exec("CREATE INDEX IF NOT EXISTS idx_artifacts_project ON artifacts(project_id, created_at DESC);"),a.exec("CREATE INDEX IF NOT EXISTS idx_artifacts_task ON artifacts(task_id, created_at DESC);"),a.exec("CREATE INDEX IF NOT EXISTS idx_artifacts_folder ON artifacts(project_id, folder_id);"),a.exec("CREATE INDEX IF NOT EXISTS idx_artifacts_space ON artifacts(space_id);"),a.exec("CREATE INDEX IF NOT EXISTS idx_artifacts_heartbeat_task ON artifacts(heartbeat_task_id);\nCREATE INDEX IF NOT EXISTS idx_artifacts_dedupe_key ON artifacts(dedupe_key);"),a.exec("CREATE INDEX IF NOT EXISTS idx_artifacts_is_protected ON artifacts(is_protected, project_id);"),a.exec("CREATE INDEX IF NOT EXISTS idx_projects_org ON projects(org_id);"),a.exec("CREATE INDEX IF NOT EXISTS idx_audit_user ON audit_logs(user_id, at DESC);"),a.exec("CREATE INDEX IF NOT EXISTS idx_audit_org ON audit_logs(org_id, at DESC);"),a.exec("CREATE INDEX IF NOT EXISTS idx_audit_target ON audit_logs(action_target_type, action_target_id, at DESC);"),a.exec("CREATE TRIGGER IF NOT EXISTS audit_logs_no_update\nBEFORE UPDATE ON audit_logs\nBEGIN\n SELECT RAISE(ABORT, 'audit_logs rows are immutable');\nEND;"),a.exec("CREATE TRIGGER IF NOT EXISTS audit_logs_no_delete\nBEFORE DELETE ON audit_logs\nBEGIN\n SELECT RAISE(ABORT, 'audit_logs rows cannot be deleted');\nEND;"),!function(){try{if(!a.prepare("PRAGMA index_list('secrets')").all().some(b=>"u"===b.origin&&b.name.startsWith("sqlite_autoindex_secrets_")&&3===a.prepare(`PRAGMA index_info('${b.name}')`).all().length))return;a.exec("BEGIN"),a.exec("CREATE TABLE secrets_new (\n id TEXT PRIMARY KEY,\n name TEXT NOT NULL,\n scope TEXT NOT NULL DEFAULT 'global',\n value_encrypted BLOB NOT NULL,\n iv BLOB NOT NULL,\n auth_tag BLOB NOT NULL,\n status TEXT NOT NULL DEFAULT 'active',\n source TEXT,\n metadata_json TEXT,\n last_used_at TEXT,\n created_at TEXT NOT NULL,\n rotated_at TEXT\n)"),a.exec("INSERT INTO secrets_new\n SELECT id, name, scope, value_encrypted, iv, auth_tag, status,\n source, metadata_json, last_used_at, created_at, rotated_at\n FROM secrets\n WHERE status = 'active'"),a.exec("DROP TABLE secrets"),a.exec("ALTER TABLE secrets_new RENAME TO secrets"),a.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_secrets_one_active\n ON secrets(name, scope) WHERE status = 'active'"),a.exec("CREATE INDEX IF NOT EXISTS idx_secrets_name_status\n ON secrets(name, status)"),a.exec("COMMIT")}catch(b){try{a.exec("ROLLBACK")}catch{}throw b}}(),a.exec(k.t),q=a,r=j.c_,(0,l.ef)(a),function(){if("1"===process.env.MADARX_DISABLE_INPROC_DAEMON||process.env.MADARX_DATA_DIR||process.env.VILLA515_DATA_DIR)return;let a=Number(process.env.CRON_DAEMON_INTERVAL_MS||3e4),b=Number(process.env.HEARTBEAT_WORKER_INTERVAL_MS||5e3),d=process.env.MADARX_INPROC_HOST||"127.0.0.1",e=process.env.PORT||process.env.MADARX_PORT||"8787",k=`http://${d}:${e}`,l=Number(process.env.MADARX_INPROC_POKE_TIMEOUT_MS||5e3);async function m(a){let{getInprocToken:b,INPROC_TOKEN_HEADER:d}=await c.e(671).then(c.bind(c,671)),e=new AbortController,f=setTimeout(()=>e.abort(),l);try{let c=await fetch(`${k}${a}`,{method:"POST",headers:{"content-type":"application/json",[d]:b()},body:"{}",signal:e.signal});if(!c.ok)throw Error(`route ${a} returned ${c.status}`);return await c.json()}finally{clearTimeout(f)}}function n({name:a,flag:b,intervalMs:c,route:d,tag:e}){if(globalThis[b])return;let k=()=>{if(globalThis[b])return!0;let k=function(a,b){let c=function(a){let b=i.createHash("sha1").update(j.nJ).digest("hex").slice(0,12);return g.join(h.tmpdir(),`madarx-daemon-${b}-${a}.lock`)}(a),d=Math.max(3*b,15e3),e=()=>{let a=f.openSync(c,"wx");try{f.writeSync(a,JSON.stringify({pid:process.pid,at:Date.now()}))}finally{f.closeSync(a)}};try{return e(),c}catch(a){if("EEXIST"!==a.code)return null}let k=!1;try{k=Date.now()-f.statSync(c).mtimeMs<d}catch{}if(k)return null;try{return f.rmSync(c,{force:!0}),e(),c}catch{return null}}(a,c);if(!k)return!1;globalThis[b]=!0,process.once("exit",()=>{try{f.rmSync(k,{force:!0})}catch{}});let l=0,n=Math.max(6,Math.ceil(3e4/c)),o=setInterval(async()=>{try{let a=new Date;f.utimesSync(k,a,a)}catch{}try{await m(d),l=0}catch(a){if(l++,console.warn(`[${e}:inproc] tick error:`,a?.message||a),l>=n){console.warn(`[${e}:inproc] ${l} consecutive failures — server gone, stopping loop`),clearInterval(o),globalThis[b]=!1;try{f.rmSync(k,{force:!0})}catch{}}}},c);return"function"==typeof o.unref&&o.unref(),!0};if(k())return;let l=Math.max(3*c,15e3),n=setTimeout(k,l+Math.floor(1e3*Math.random()));"function"==typeof n.unref&&n.unref()}n({name:"cron",flag:"__madarxCronStarted",intervalMs:a,route:"/api/cron/tick",tag:"cron"}),n({name:"heartbeat",flag:"__madarxHeartbeatStarted",intervalMs:b,route:"/api/heartbeat/worker",tag:"heartbeat"})}(),a}function o(){return new Date().toISOString()}function p(a="id"){return`${a}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}d()}catch(a){d(a)}})},84125:(a,b)=>{"use strict";let c;Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"cloneResponse",{enumerable:!0,get:function(){return e}});let d=()=>{};function e(a){if(!a.body)return[a,a];let[b,d]=a.body.tee(),e=new Response(b,{status:a.status,statusText:a.statusText,headers:a.headers});Object.defineProperty(e,"url",{value:a.url,configurable:!0,enumerable:!0,writable:!1}),c&&e.body&&c.register(e,new WeakRef(e.body));let f=new Response(d,{status:a.status,statusText:a.statusText,headers:a.headers});return Object.defineProperty(f,"url",{value:a.url,configurable:!0,enumerable:!0,writable:!1}),[e,f]}globalThis.FinalizationRegistry&&(c=new FinalizationRegistry(a=>{let b=a.deref();b&&!b.locked&&b.cancel("Response object has been garbage collected").then(d)}))},84939:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Hy:()=>h,n_:()=>k,t2:()=>j,uu:()=>i});var e=c(84104),f=c(17830),g=a([e]);function h(a,b={},c={}){let d=(0,f.ho)(a,{knownToolNames:c.knownToolNames,toolRiskByName:c.toolRiskByName});if(!d.ok){let a=Error("composite spec invalid");throw a.code="spec_invalid",a.errors=d.errors,a}let g=d.normalized,i=(0,e.Lf)(),j=(0,e.kF)(),k=i.prepare("SELECT slug FROM composite_tools WHERE slug = ?").get(g.slug),l=JSON.stringify(g),m=JSON.stringify(g.input_schema||{type:"object",properties:{}});return k?i.prepare(`UPDATE composite_tools
|
|
1439
1443
|
SET title=?, description=?, spec_json=?, risk_level=?, input_schema_json=?, status='active', updated_at=?
|
|
1440
1444
|
WHERE slug=?`).run(g.title,g.description,l,g.risk_level,m,j,g.slug):i.prepare(`INSERT INTO composite_tools
|
|
@@ -1492,7 +1496,7 @@ ${b}`))}function L(){let a=new AbortController;return a.abort(Object.definePrope
|
|
|
1492
1496
|
Read more: https://nextjs.org/docs/messages/middleware-request-page
|
|
1493
1497
|
`)}}class e extends Error{constructor(){super(`The request.ua has been removed in favour of \`userAgent\` function.
|
|
1494
1498
|
Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
|
|
1495
|
-
`)}}},91488:(a,b,c)=>{"use strict";Object.defineProperty(b,"A",{enumerable:!0,get:function(){return d.registerServerReference}});let d=c(83183)},
|
|
1499
|
+
`)}}},91488:(a,b,c)=>{"use strict";Object.defineProperty(b,"A",{enumerable:!0,get:function(){return d.registerServerReference}});let d=c(83183)},91837:(a,b,c)=>{let d={unstable_cache:c(96822).e,revalidateTag:c(6946).revalidateTag,revalidatePath:c(6946).revalidatePath,unstable_expireTag:c(6946).unstable_expireTag,unstable_expirePath:c(6946).unstable_expirePath,unstable_noStore:c(37425).M,unstable_cacheLife:c(88002).F,unstable_cacheTag:c(14884).z};a.exports=d,b.unstable_cache=d.unstable_cache,b.revalidatePath=d.revalidatePath,b.revalidateTag=d.revalidateTag,b.unstable_expireTag=d.unstable_expireTag,b.unstable_expirePath=d.unstable_expirePath,b.unstable_noStore=d.unstable_noStore,b.unstable_cacheLife=d.unstable_cacheLife,b.unstable_cacheTag=d.unstable_cacheTag},93047:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"ENCODED_TAGS",{enumerable:!0,get:function(){return c}});let c={OPENING:{HTML:new Uint8Array([60,104,116,109,108]),BODY:new Uint8Array([60,98,111,100,121])},CLOSED:{HEAD:new Uint8Array([60,47,104,101,97,100,62]),BODY:new Uint8Array([60,47,98,111,100,121,62]),HTML:new Uint8Array([60,47,104,116,109,108,62]),BODY_AND_HTML:new Uint8Array([60,47,98,111,100,121,62,60,47,104,116,109,108,62])},META:{ICON_MARK:new Uint8Array([60,109,101,116,97,32,110,97,109,101,61,34,194,171,110,120,116,45,105,99,111,110,194,187,34])}}},94062:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{CachedRouteKind:function(){return c},IncrementalCacheKind:function(){return d}});var c=function(a){return a.APP_PAGE="APP_PAGE",a.APP_ROUTE="APP_ROUTE",a.PAGES="PAGES",a.FETCH="FETCH",a.REDIRECT="REDIRECT",a.IMAGE="IMAGE",a}({}),d=function(a){return a.APP_PAGE="APP_PAGE",a.APP_ROUTE="APP_ROUTE",a.PAGES="PAGES",a.FETCH="FETCH",a.IMAGE="IMAGE",a}({})},94387:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{r:()=>j,u:()=>i});var e=c(64319),f=a([e]);function g(a={}){return{id:a.id,summary:a.summary||"",start:a.start||null,end:a.end||null,attendees:a.attendees||[],status:a.status||null,html_link:a.htmlLink||null}}async function h(a,b,c,d){let f=(0,e.s)(d,c),g=await f(a,{headers:{Authorization:`Bearer ${b}`}});if(!g.ok)throw Error(`google calendar failed: ${g.status}`);return g.json()}async function i(a={},b={}){let c="calendar_events_list",d=await (0,e.r)(b,c),f=encodeURIComponent(a.calendar_id||"primary"),j=new URL(`https://www.googleapis.com/calendar/v3/calendars/${f}/events`);return a.time_min&&j.searchParams.set("timeMin",a.time_min),a.time_max&&j.searchParams.set("timeMax",a.time_max),a.max_results&&j.searchParams.set("maxResults",String(a.max_results)),((await h(j,d,b,c)).items||[]).map(g)}async function j(a={},b={}){if(!a.event_id)throw Error("event_id is required");let c="calendar_event_read",d=await (0,e.r)(b,c),f=encodeURIComponent(a.calendar_id||"primary"),i=encodeURIComponent(a.event_id),k=await h(`https://www.googleapis.com/calendar/v3/calendars/${f}/events/${i}`,d,b,c);return function(a={}){return{...g(a),description:a.description||"",location:a.location||"",creator:a.creator||null,organizer:a.organizer||null,recurrence:a.recurrence||[],conference_data:a.conferenceData||null}}(k)}e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},94657:(a,b,c)=>{"use strict";c.d(b,{default:()=>f});var d=c(21124),e=c(38301);function f(){let[a,b]=(0,e.useState)([]),[c,f]=(0,e.useState)("");return(0,d.jsx)("div",{className:"project-switcher","data-project-switcher":!0,children:(0,d.jsxs)("select",{value:c,onChange:a=>{var b;f(b=a.target.value),b?localStorage.setItem("madarx.activeProjectId",b):localStorage.removeItem("madarx.activeProjectId"),window.dispatchEvent(new CustomEvent("madarx:project-change",{detail:{project_id:b||null}}))},"aria-label":"Active project",children:[(0,d.jsx)("option",{value:"",children:"All projects"}),a.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name},a.id))]})})}},95411:(a,b,c)=>{"use strict";c.d(b,{t:()=>e,x:()=>d});let d=`
|
|
1496
1500
|
CREATE TABLE IF NOT EXISTS agents (
|
|
1497
1501
|
id TEXT PRIMARY KEY,
|
|
1498
1502
|
name TEXT NOT NULL,
|
|
@@ -3179,7 +3183,7 @@ FROM approval_requests;
|
|
|
3179
3183
|
|
|
3180
3184
|
${c}`,y=Number(d||process.env.CLAUDE_CODE_MAX_TURNS||30),z=w||(0,l._e)(),A=(0,l.Zf)(z),B=A&&await q(),C=["-p",x,"--max-turns",String(y),"--output-format","stream-json","--verbose","--permission-mode","bypassPermissions","--setting-sources","project,local,user"];for(let a of(B&&C.push("--include-partial-messages"),s))a&&C.push("--add-dir",a);e.length&&C.push("--allowedTools",e.join(",")),a&&"claude-code"!==a&&C.splice(2,0,"--model",a);let D=function(){let a={...process.env};return"1"===process.env.MADARX_CLI_USE_API_KEY||(delete a.ANTHROPIC_API_KEY,delete a.ANTHROPIC_AUTH_TOKEN),a}();if(A){let a=(0,l.s_)(z);a>0&&(D.MAX_THINKING_TOKENS=String(Math.max(1024,a)))}let E=[],F=[],G="",H="",I="",J="",K=function({agentId:a,agentName:b,partial:c=!1,onText:d,onTextDelta:e,onThinkingDelta:f,onToolStart:g,onToolResult:h,onResult:i,onStatus:j}){let l="",m=new Map,n=new Map;return function(o){let p;for(l+=o;(p=l.indexOf("\n"))>=0;){let o,q=l.slice(0,p).trim();if(l=l.slice(p+1),!q||"{"!==q[0])continue;try{o=JSON.parse(q)}catch{continue}if(!o||"object"!=typeof o)continue;if("stream_event"===o.type&&o.event&&"object"==typeof o.event){let a=o.event;if("content_block_delta"===a.type&&a.delta){let b=a.delta;"text_delta"===b.type&&"string"==typeof b.text?e?.(b.text):"thinking_delta"===b.type&&"string"==typeof b.thinking&&f?.(b.thinking)}else"content_block_start"===a.type&&a.content_block?.type==="thinking"?j?.("thinking"):"message_start"===a.type&&j?.("generating");continue}if("result"===o.type){"string"==typeof o.result&&o.result.trim()&&i?.(o.result.trim());continue}let r=o.message?.content;if(Array.isArray(r)){if("assistant"===o.type){let e=r.some(a=>a?.type==="tool_use");if(!c)for(let a of r)a?.type==="thinking"&&"string"==typeof a.thinking&&a.thinking&&f?.(a.thinking);let h=r.filter(a=>a?.type==="text"&&"string"==typeof a.text).map(a=>a.text).join("");for(let c of(h&&d?.(h,{isFinal:!e}),r))c?.type==="tool_use"&&(c.id&&(m.set(c.id,c.name||"tool"),n.set(c.id,Date.now())),g?.({id:c.id,name:c.name||"tool",input:c.input}),a&&(0,k.AC)({type:"agent_tool_start",agent_id:a,agent_name:b||a,tool:c.name||"tool",input_summary:function(a,b){if(!b||"object"!=typeof b)return"";if("Bash"===a)return String(b.command||"").slice(0,120);if("WebSearch"===a)return String(b.query||"").slice(0,120);if("WebFetch"===a)return String(b.url||"").slice(0,120);if("Read"===a||"Glob"===a||"Grep"===a||"LS"===a)return String(b.file_path||b.pattern||b.path||"").slice(0,120);if("Write"===a||"Edit"===a||"MultiEdit"===a)return String(b.file_path||"").slice(0,120);if("TodoWrite"===a)return Array.isArray(b.todos)?`${b.todos.length} todos`:"";try{return JSON.stringify(b).slice(0,120)}catch{return""}}(c.name,c.input)}))}else if("user"===o.type){for(let c of r)if(c?.type==="tool_result"){let d=m.get(c.tool_use_id)||"tool",e=n.get(c.tool_use_id),f=e?Date.now()-e:null,{preview:g,chars:i,lines:j}=function(a){let b=a?.content,c="";return"string"==typeof b?c=b:Array.isArray(b)&&(c=b.map(a=>"string"==typeof a?a:a?.type==="text"&&"string"==typeof a.text?a.text:"").join("")),{preview:(c=String(c||"")).slice(0,200),chars:c.length,lines:c?c.split("\n").length:0}}(c);h?.({tool_use_id:c.tool_use_id,name:d,isError:!!c.is_error,durationMs:f,preview:g,chars:i,lines:j}),a&&(0,k.AC)({type:"agent_tool_result",agent_id:a,agent_name:b||a,tool:d,status:c.is_error?"error":"done",isError:!!c.is_error,duration_ms:f}),m.delete(c.tool_use_id),n.delete(c.tool_use_id)}}}}}}({agentId:u,agentName:v,partial:B,onText:(a,b={})=>{E.push(a),b.isFinal?F.push(a):G=a,B||h?.(E.join("").trim())},onTextDelta:a=>{I+=a,h?.(I.trim())},onThinkingDelta:a=>{J+=a,i?.(J.trim(),a)},onStatus:a=>{j?.(a)},onResult:a=>{H=a},onToolStart:m,onToolResult:n});await r(p("claude"),C,{cwd:o,timeoutMs:f??Number(process.env.CLAUDE_CODE_TICK_TIMEOUT_MS||6e5),closeStdin:!0,env:D,onChunk:a=>{K(a),g?.(a)}});let L=F.join("").trim()||G.trim()||E.join("").trim()||H.trim();if(!L)throw Error("Claude Code returned no assistant text");return L}async function u({systemPrompt:a,userMessage:b,onChunk:c}){if(process.env.MADARX_MOCK_CODEX_RESPONSE)return process.env.MADARX_MOCK_CODEX_RESPONSE;let d=a?`${a}
|
|
3181
3185
|
|
|
3182
|
-
${b}`:b;return r(p("codex"),["exec",d],{timeoutMs:Number(process.env.CODEX_TICK_TIMEOUT_MS||18e4),closeStdin:!0,onChunk:c})}d()}catch(a){d(a)}})},96615:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{zc:()=>j});var e=c(84104),f=c(60079),g=c(47344),h=c(77886),i=a([e]);e=(i.then?(await i)():i)[0];let k={"vendor-onboarding":f,"contract-review":g,"support-escalation":h},l=[{slug:"vendor-onboarding",title:"Vendor Onboarding",category:"procurement",tags:["workflow","procurement","starter"],risk_summary:"Intake → automated risk review → buyer sign-off → onboarding pack. All write actions are gated by human_approval."},{slug:"contract-review",title:"Contract Review",category:"legal",tags:["workflow","legal","starter"],risk_summary:"Intake → automated clause review → counsel approval (high-risk gate) → review report. Drafts only; no signature step."},{slug:"support-escalation",title:"Support Escalation",category:"support",tags:["workflow","support","starter"],risk_summary:"Intake → automated triage → supervisor sign-off → resolution pack. Customer-visible copy never sent without human approval."}].map(a=>{let b=k[a.slug];return{...a,description:b.description,author:"madarx",source_kind:"builtin",source_url:null,version:"1.0",spec:b}});function j(a){try{for(let b of l)!function(a,b){let c=`workflow:${b.slug}`,d=JSON.stringify({summary:b.description,source_spec_json:b.spec}),f=JSON.stringify(b.tags||[]),g=a.prepare("SELECT id FROM marketplace_items WHERE kind='workflow' AND slug=?").get(b.slug),h=[b.title,b.description,b.category,b.author,b.source_kind,b.source_url,b.version,d,b.risk_summary,f];if(g)return a.prepare("UPDATE marketplace_items SET title=?, description=?, category=?, author=?, source_kind=?, source_url=?, version=?, manifest_json=?, risk_summary=?, tags=? WHERE id=?").run(...h,c);a.prepare("INSERT INTO marketplace_items (id, kind, slug, title, description, category, author, source_kind, source_url, version, manifest_json, risk_summary, tags, created_at) VALUES (?, 'workflow', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)").run(c,b.slug,...h,(0,e.kF)()),a.prepare("INSERT OR IGNORE INTO marketplace_installations (item_id, installed) VALUES (?, 0)").run(c)}(a,b)}catch(a){console.warn("[marketplace-workflows] seed failed:",a?.message||a)}}l.map(a=>a.slug),d()}catch(a){d(a)}})},96648:(a,b,c)=>{"use strict";c.d(b,{X:()=>e});let d=Object.create(null);for(let a of["00_historic","01_arcgis_data","02_assay_labs","03_cad_files","04_official_database","05_drill_campaign","06_exploration_geos","07_geophysics","08_backup_bd","09_petrography","10_presentations","11_general_pictures","12_safety","13_reports","14_inegi_data","15_sgm_data","16_claims_properties","17_minesight","18_exported_maps","19_survey","20_geotechnical","21_general_files","22_qa_qc","uncategorized"]){let b=a.match(/^(\d{2})_/);b&&(d[b[1]]=a)}function e(a){let b=String(a||"").split(/[/\\]/).filter(Boolean),c=null;for(let a of b){let b=a.match(/^(\d{2})[-_ ]/i);if(!b)continue;let e=b[1];Object.prototype.hasOwnProperty.call(d,e)&&(c=d[e])}return c??"uncategorized"}},96822:(a,b,c)=>{"use strict";Object.defineProperty(b,"e",{enumerable:!0,get:function(){return k}});let d=c(73443),e=c(43709),f=c(29294),g=c(63033),h=c(56557),i=0;async function j(a,b,c,e,f,g,i){await b.set(c,{kind:h.CachedRouteKind.FETCH,data:{headers:{},body:JSON.stringify(a),status:200,url:""},revalidate:"number"!=typeof f?d.CACHE_ONE_YEAR:f},{fetchCache:!0,tags:e,fetchIdx:g,fetchUrl:i})}function k(a,b,c={}){if(0===c.revalidate)throw Object.defineProperty(Error(`Invariant revalidate: 0 can not be passed to unstable_cache(), must be "false" or "> 0" ${a.toString()}`),"__NEXT_ERROR_CODE",{value:"E57",enumerable:!1,configurable:!0});let d=c.tags?(0,e.validateTags)(c.tags,`unstable_cache ${a.toString()}`):[];(0,e.validateRevalidate)(c.revalidate,`unstable_cache ${a.name||a.toString()}`);let l=`${a.toString()}-${Array.isArray(b)&&b.join(",")}`;return async(...b)=>{let e=f.workAsyncStorage.getStore(),k=g.workUnitAsyncStorage.getStore(),m=(null==e?void 0:e.incrementalCache)||globalThis.__incrementalCache;if(!m)throw Object.defineProperty(Error(`Invariant: incrementalCache missing in unstable_cache ${a.toString()}`),"__NEXT_ERROR_CODE",{value:"E469",enumerable:!1,configurable:!0});let n=k?(0,g.getCacheSignal)(k):null;n&&n.beginRead();try{let f=e&&k?function(a,b){switch(b.type){case"request":let c=b.url.pathname,d=new URLSearchParams(b.url.search),e=[...d.keys()].sort((a,b)=>a.localeCompare(b)).map(a=>`${a}=${d.get(a)}`).join("&");return`${c}${e.length?"?":""}${e}`;case"prerender":case"prerender-client":case"prerender-runtime":case"prerender-ppr":case"prerender-legacy":case"cache":case"private-cache":case"unstable-cache":return a.route;default:return b}}(e,k):"",n=`${l}-${JSON.stringify(b)}`,o=await m.generateCacheKey(n),p=`unstable_cache ${f} ${a.name?` ${a.name}`:o}`,q=(e?e.nextFetchId:i)??1,r=null==k?void 0:k.implicitTags,s={type:"unstable-cache",phase:"render",implicitTags:r,draftMode:k&&e&&(0,g.getDraftModeProviderForCacheScope)(e,k)};if(e){e.nextFetchId=q+1;let f=!1;if(k)switch(k.type){case"cache":case"private-cache":case"prerender":case"prerender-runtime":case"prerender-ppr":case"prerender-legacy":"number"==typeof c.revalidate&&(k.revalidate<c.revalidate||(k.revalidate=c.revalidate));let i=k.tags;if(null===i)k.tags=d.slice();else for(let a of d)i.includes(a)||i.push(a);break;case"unstable-cache":f=!0}if(!f&&"force-no-store"!==e.fetchCache&&!e.isOnDemandRevalidate&&!m.isOnDemandRevalidate&&!e.isDraftMode){let f=await m.get(o,{kind:h.IncrementalCacheKind.FETCH,revalidate:c.revalidate,tags:d,softTags:null==r?void 0:r.tags,fetchIdx:q,fetchUrl:p});if(f&&f.value)if(f.value.kind!==h.CachedRouteKind.FETCH)console.error(`Invariant invalid cacheEntry returned for ${n}`);else{let h=void 0!==f.value.data.body?JSON.parse(f.value.data.body):void 0;if(f.isStale){if(e.pendingRevalidates||(e.pendingRevalidates={}),!e.pendingRevalidates[n]){let f=g.workUnitAsyncStorage.run(s,a,...b).then(async a=>(await j(a,m,o,d,c.revalidate,q,p),a)).catch(a=>(console.error(`revalidating cache with key: ${n}`,a),h));e.isRevalidate&&f.catch(()=>{}),e.pendingRevalidates[n]=f}if(e.isRevalidate)return e.pendingRevalidates[n]}return h}}let l=await g.workUnitAsyncStorage.run(s,a,...b);return e.isDraftMode||(e.pendingRevalidates||(e.pendingRevalidates={}),e.pendingRevalidates[n]=j(l,m,o,d,c.revalidate,q,p)),l}{if(i+=1,!m.isOnDemandRevalidate){let a=await m.get(o,{kind:h.IncrementalCacheKind.FETCH,revalidate:c.revalidate,tags:d,fetchIdx:q,fetchUrl:p,softTags:null==r?void 0:r.tags});if(a&&a.value){if(a.value.kind!==h.CachedRouteKind.FETCH)console.error(`Invariant invalid cacheEntry returned for ${n}`);else if(!a.isStale)return void 0!==a.value.data.body?JSON.parse(a.value.data.body):void 0}}let e=await g.workUnitAsyncStorage.run(s,a,...b);return await j(e,m,o,d,c.revalidate,q,p),e}}finally{n&&n.endRead()}}}},96865:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{NextRequestAdapter:function(){return l},ResponseAborted:function(){return i},ResponseAbortedName:function(){return h},createAbortController:function(){return j},signalFromNodeResponse:function(){return k}});let d=c(90475),e=c(66568),f=c(47390),g=c(97610),h="ResponseAborted";class i extends Error{constructor(...a){super(...a),this.name=h}}function j(a){let b=new AbortController;return a.once("close",()=>{a.writableFinished||b.abort(new i)}),b}function k(a){let{errored:b,destroyed:c}=a;if(b||c)return AbortSignal.abort(b??new i);let{signal:d}=j(a);return d}class l{static fromBaseNextRequest(a,b){if((0,g.isNodeNextRequest)(a))return l.fromNodeNextRequest(a,b);throw Object.defineProperty(Error("Invariant: Unsupported NextRequest type"),"__NEXT_ERROR_CODE",{value:"E345",enumerable:!1,configurable:!0})}static fromNodeNextRequest(a,b){let c,g=null;if("GET"!==a.method&&"HEAD"!==a.method&&a.body&&(g=a.body),a.url.startsWith("http"))c=new URL(a.url);else{let b=(0,d.getRequestMeta)(a,"initURL");c=b&&b.startsWith("http")?new URL(a.url,b):new URL(a.url,"http://n")}return new f.NextRequest(c,{method:a.method,headers:(0,e.fromNodeOutgoingHttpHeaders)(a.headers),duplex:"half",signal:b,...b.aborted?{}:{body:g}})}static fromWebNextRequest(a){let b=null;return"GET"!==a.method&&"HEAD"!==a.method&&(b=a.body),new f.NextRequest(a.url,{method:a.method,headers:(0,e.fromNodeOutgoingHttpHeaders)(a.headers),duplex:"half",signal:a.request.signal,...a.request.signal.aborted?{}:{body:b}})}}},97357:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"isPostpone",{enumerable:!0,get:function(){return d}});let c=Symbol.for("react.postpone");function d(a){return"object"==typeof a&&null!==a&&a.$$typeof===c}},97369:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{"406fc8991aaaae45fa988d0ba4df71e43b82dca7f5":()=>e.Dv,"40a8f153ddbbd5ce1e7ba0b4760e8e9e66e8b4188d":()=>e.Tg,"40c3d6c7696e5f3c66e23286352d5d193d384e2726":()=>e.gL});var e=c(11812),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},97610:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{isNodeNextRequest:function(){return e},isNodeNextResponse:function(){return f},isWebNextRequest:function(){return c},isWebNextResponse:function(){return d}});let c=a=>!1,d=a=>!1,e=a=>!0,f=a=>!0},97857:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{isAbortError:function(){return i},pipeToNodeResponse:function(){return j}});let d=c(96865),e=c(42474),f=c(36821),g=c(45441),h=c(12690);function i(a){return(null==a?void 0:a.name)==="AbortError"||(null==a?void 0:a.name)===d.ResponseAbortedName}async function j(a,b,c){try{let{errored:i,destroyed:j}=b;if(i||j)return;let k=(0,d.createAbortController)(b),l=function(a,b){let c=!1,d=new e.DetachedPromise;function i(){d.resolve()}a.on("drain",i),a.once("close",()=>{a.off("drain",i),d.resolve()});let j=new e.DetachedPromise;return a.once("finish",()=>{j.resolve()}),new WritableStream({write:async b=>{if(!c){if(c=!0,"performance"in globalThis&&process.env.NEXT_OTEL_PERFORMANCE_PREFIX){let a=(0,h.getClientComponentLoaderMetrics)();a&&performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`,{start:a.clientComponentLoadStart,end:a.clientComponentLoadStart+a.clientComponentLoadTimes})}a.flushHeaders(),(0,f.getTracer)().trace(g.NextNodeServerSpan.startResponse,{spanName:"start response"},()=>void 0)}try{let c=a.write(b);"flush"in a&&"function"==typeof a.flush&&a.flush(),c||(await d.promise,d=new e.DetachedPromise)}catch(b){throw a.end(),Object.defineProperty(Error("failed to write chunk to response",{cause:b}),"__NEXT_ERROR_CODE",{value:"E321",enumerable:!1,configurable:!0})}},abort:b=>{a.writableFinished||a.destroy(b)},close:async()=>{if(b&&await b,!a.writableFinished)return a.end(),j.promise}})}(b,c);await a.pipeTo(l,{signal:k.signal})}catch(a){if(i(a))return;throw Object.defineProperty(Error("failed to pipe response",{cause:a}),"__NEXT_ERROR_CODE",{value:"E180",enumerable:!1,configurable:!0})}}},98450:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{I:()=>n,m:()=>m});var e=c(73024),f=c(76760),g=c(84104),h=c(79336),i=c(38985),j=c(37937),k=c(83498),l=a([g,h,i,j]);async function m(a,b={}){let c,{name:d,slug:l,asset_stage:n="exploration",commodity:o=null,deposit_type:p=null,portfolio_entry_id:q=null,description:r=null}=a||{};if(!d||!String(d).trim())return{status:"error",error:"name_required"};let s=(0,g.Lf)(),t=(0,g.kF)(),u=(0,h.DJ)(l||d);if(s.prepare("SELECT id FROM mines_projects WHERE slug = ? LIMIT 1").get(u))return{status:"error",error:"slug_in_use",slug:u};if(q){let a=s.prepare("SELECT id, project_id FROM mines_portfolio_entries WHERE id = ? LIMIT 1").get(q);if(!a)return{status:"error",error:"entry_not_found",portfolio_entry_id:q};if(a.project_id)return{status:"error",error:"entry_already_linked",portfolio_entry_id:q}}try{c=(0,h.gA)({name:String(d).trim(),slug:u,description:r||"Mine project: "+String(d).trim(),color:"#2A5C45"})}catch(a){if(a?.code==="PROJECT_SLUG_EXISTS")return{status:"error",error:"slug_in_use",slug:u};throw a}let v=c.id,w=c.slug,x=(0,g.Si)("mp"),y=q||null;s.prepare("BEGIN").run();try{if(s.prepare(`
|
|
3186
|
+
${b}`:b;return r(p("codex"),["exec",d],{timeoutMs:Number(process.env.CODEX_TICK_TIMEOUT_MS||18e4),closeStdin:!0,onChunk:c})}d()}catch(a){d(a)}})},96615:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{zc:()=>j});var e=c(84104),f=c(60079),g=c(47344),h=c(77886),i=a([e]);e=(i.then?(await i)():i)[0];let k={"vendor-onboarding":f,"contract-review":g,"support-escalation":h},l=[{slug:"vendor-onboarding",title:"Vendor Onboarding",category:"procurement",tags:["workflow","procurement","starter"],risk_summary:"Intake → automated risk review → buyer sign-off → onboarding pack. All write actions are gated by human_approval."},{slug:"contract-review",title:"Contract Review",category:"legal",tags:["workflow","legal","starter"],risk_summary:"Intake → automated clause review → counsel approval (high-risk gate) → review report. Drafts only; no signature step."},{slug:"support-escalation",title:"Support Escalation",category:"support",tags:["workflow","support","starter"],risk_summary:"Intake → automated triage → supervisor sign-off → resolution pack. Customer-visible copy never sent without human approval."}].map(a=>{let b=k[a.slug];return{...a,description:b.description,author:"madarx",source_kind:"builtin",source_url:null,version:"1.0",spec:b}});function j(a){try{for(let b of l)!function(a,b){let c=`workflow:${b.slug}`,d=JSON.stringify({summary:b.description,source_spec_json:b.spec}),f=JSON.stringify(b.tags||[]),g=a.prepare("SELECT id FROM marketplace_items WHERE kind='workflow' AND slug=?").get(b.slug),h=[b.title,b.description,b.category,b.author,b.source_kind,b.source_url,b.version,d,b.risk_summary,f];if(g)return a.prepare("UPDATE marketplace_items SET title=?, description=?, category=?, author=?, source_kind=?, source_url=?, version=?, manifest_json=?, risk_summary=?, tags=? WHERE id=?").run(...h,c);a.prepare("INSERT INTO marketplace_items (id, kind, slug, title, description, category, author, source_kind, source_url, version, manifest_json, risk_summary, tags, created_at) VALUES (?, 'workflow', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)").run(c,b.slug,...h,(0,e.kF)()),a.prepare("INSERT OR IGNORE INTO marketplace_installations (item_id, installed) VALUES (?, 0)").run(c)}(a,b)}catch(a){console.warn("[marketplace-workflows] seed failed:",a?.message||a)}}l.map(a=>a.slug),d()}catch(a){d(a)}})},96648:(a,b,c)=>{"use strict";c.d(b,{X:()=>e});let d=Object.create(null);for(let a of["00_historic","01_arcgis_data","02_assay_labs","03_cad_files","04_official_database","05_drill_campaign","06_exploration_geos","07_geophysics","08_backup_bd","09_petrography","10_presentations","11_general_pictures","12_safety","13_reports","14_inegi_data","15_sgm_data","16_claims_properties","17_minesight","18_exported_maps","19_survey","20_geotechnical","21_general_files","22_qa_qc","uncategorized"]){let b=a.match(/^(\d{2})_/);b&&(d[b[1]]=a)}function e(a){let b=String(a||"").split(/[/\\]/).filter(Boolean),c=null;for(let a of b){let b=a.match(/^(\d{2})[-_ ]/i);if(!b)continue;let e=b[1];Object.prototype.hasOwnProperty.call(d,e)&&(c=d[e])}return c??"uncategorized"}},96822:(a,b,c)=>{"use strict";Object.defineProperty(b,"e",{enumerable:!0,get:function(){return k}});let d=c(73443),e=c(43709),f=c(29294),g=c(63033),h=c(56557),i=0;async function j(a,b,c,e,f,g,i){await b.set(c,{kind:h.CachedRouteKind.FETCH,data:{headers:{},body:JSON.stringify(a),status:200,url:""},revalidate:"number"!=typeof f?d.CACHE_ONE_YEAR:f},{fetchCache:!0,tags:e,fetchIdx:g,fetchUrl:i})}function k(a,b,c={}){if(0===c.revalidate)throw Object.defineProperty(Error(`Invariant revalidate: 0 can not be passed to unstable_cache(), must be "false" or "> 0" ${a.toString()}`),"__NEXT_ERROR_CODE",{value:"E57",enumerable:!1,configurable:!0});let d=c.tags?(0,e.validateTags)(c.tags,`unstable_cache ${a.toString()}`):[];(0,e.validateRevalidate)(c.revalidate,`unstable_cache ${a.name||a.toString()}`);let l=`${a.toString()}-${Array.isArray(b)&&b.join(",")}`;return async(...b)=>{let e=f.workAsyncStorage.getStore(),k=g.workUnitAsyncStorage.getStore(),m=(null==e?void 0:e.incrementalCache)||globalThis.__incrementalCache;if(!m)throw Object.defineProperty(Error(`Invariant: incrementalCache missing in unstable_cache ${a.toString()}`),"__NEXT_ERROR_CODE",{value:"E469",enumerable:!1,configurable:!0});let n=k?(0,g.getCacheSignal)(k):null;n&&n.beginRead();try{let f=e&&k?function(a,b){switch(b.type){case"request":let c=b.url.pathname,d=new URLSearchParams(b.url.search),e=[...d.keys()].sort((a,b)=>a.localeCompare(b)).map(a=>`${a}=${d.get(a)}`).join("&");return`${c}${e.length?"?":""}${e}`;case"prerender":case"prerender-client":case"prerender-runtime":case"prerender-ppr":case"prerender-legacy":case"cache":case"private-cache":case"unstable-cache":return a.route;default:return b}}(e,k):"",n=`${l}-${JSON.stringify(b)}`,o=await m.generateCacheKey(n),p=`unstable_cache ${f} ${a.name?` ${a.name}`:o}`,q=(e?e.nextFetchId:i)??1,r=null==k?void 0:k.implicitTags,s={type:"unstable-cache",phase:"render",implicitTags:r,draftMode:k&&e&&(0,g.getDraftModeProviderForCacheScope)(e,k)};if(e){e.nextFetchId=q+1;let f=!1;if(k)switch(k.type){case"cache":case"private-cache":case"prerender":case"prerender-runtime":case"prerender-ppr":case"prerender-legacy":"number"==typeof c.revalidate&&(k.revalidate<c.revalidate||(k.revalidate=c.revalidate));let i=k.tags;if(null===i)k.tags=d.slice();else for(let a of d)i.includes(a)||i.push(a);break;case"unstable-cache":f=!0}if(!f&&"force-no-store"!==e.fetchCache&&!e.isOnDemandRevalidate&&!m.isOnDemandRevalidate&&!e.isDraftMode){let f=await m.get(o,{kind:h.IncrementalCacheKind.FETCH,revalidate:c.revalidate,tags:d,softTags:null==r?void 0:r.tags,fetchIdx:q,fetchUrl:p});if(f&&f.value)if(f.value.kind!==h.CachedRouteKind.FETCH)console.error(`Invariant invalid cacheEntry returned for ${n}`);else{let h=void 0!==f.value.data.body?JSON.parse(f.value.data.body):void 0;if(f.isStale){if(e.pendingRevalidates||(e.pendingRevalidates={}),!e.pendingRevalidates[n]){let f=g.workUnitAsyncStorage.run(s,a,...b).then(async a=>(await j(a,m,o,d,c.revalidate,q,p),a)).catch(a=>(console.error(`revalidating cache with key: ${n}`,a),h));e.isRevalidate&&f.catch(()=>{}),e.pendingRevalidates[n]=f}if(e.isRevalidate)return e.pendingRevalidates[n]}return h}}let l=await g.workUnitAsyncStorage.run(s,a,...b);return e.isDraftMode||(e.pendingRevalidates||(e.pendingRevalidates={}),e.pendingRevalidates[n]=j(l,m,o,d,c.revalidate,q,p)),l}{if(i+=1,!m.isOnDemandRevalidate){let a=await m.get(o,{kind:h.IncrementalCacheKind.FETCH,revalidate:c.revalidate,tags:d,fetchIdx:q,fetchUrl:p,softTags:null==r?void 0:r.tags});if(a&&a.value){if(a.value.kind!==h.CachedRouteKind.FETCH)console.error(`Invariant invalid cacheEntry returned for ${n}`);else if(!a.isStale)return void 0!==a.value.data.body?JSON.parse(a.value.data.body):void 0}}let e=await g.workUnitAsyncStorage.run(s,a,...b);return await j(e,m,o,d,c.revalidate,q,p),e}}finally{n&&n.endRead()}}}},96865:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{NextRequestAdapter:function(){return l},ResponseAborted:function(){return i},ResponseAbortedName:function(){return h},createAbortController:function(){return j},signalFromNodeResponse:function(){return k}});let d=c(90475),e=c(66568),f=c(47390),g=c(97610),h="ResponseAborted";class i extends Error{constructor(...a){super(...a),this.name=h}}function j(a){let b=new AbortController;return a.once("close",()=>{a.writableFinished||b.abort(new i)}),b}function k(a){let{errored:b,destroyed:c}=a;if(b||c)return AbortSignal.abort(b??new i);let{signal:d}=j(a);return d}class l{static fromBaseNextRequest(a,b){if((0,g.isNodeNextRequest)(a))return l.fromNodeNextRequest(a,b);throw Object.defineProperty(Error("Invariant: Unsupported NextRequest type"),"__NEXT_ERROR_CODE",{value:"E345",enumerable:!1,configurable:!0})}static fromNodeNextRequest(a,b){let c,g=null;if("GET"!==a.method&&"HEAD"!==a.method&&a.body&&(g=a.body),a.url.startsWith("http"))c=new URL(a.url);else{let b=(0,d.getRequestMeta)(a,"initURL");c=b&&b.startsWith("http")?new URL(a.url,b):new URL(a.url,"http://n")}return new f.NextRequest(c,{method:a.method,headers:(0,e.fromNodeOutgoingHttpHeaders)(a.headers),duplex:"half",signal:b,...b.aborted?{}:{body:g}})}static fromWebNextRequest(a){let b=null;return"GET"!==a.method&&"HEAD"!==a.method&&(b=a.body),new f.NextRequest(a.url,{method:a.method,headers:(0,e.fromNodeOutgoingHttpHeaders)(a.headers),duplex:"half",signal:a.request.signal,...a.request.signal.aborted?{}:{body:b}})}}},97357:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"isPostpone",{enumerable:!0,get:function(){return d}});let c=Symbol.for("react.postpone");function d(a){return"object"==typeof a&&null!==a&&a.$$typeof===c}},97610:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{isNodeNextRequest:function(){return e},isNodeNextResponse:function(){return f},isWebNextRequest:function(){return c},isWebNextResponse:function(){return d}});let c=a=>!1,d=a=>!1,e=a=>!0,f=a=>!0},97857:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{isAbortError:function(){return i},pipeToNodeResponse:function(){return j}});let d=c(96865),e=c(42474),f=c(36821),g=c(45441),h=c(12690);function i(a){return(null==a?void 0:a.name)==="AbortError"||(null==a?void 0:a.name)===d.ResponseAbortedName}async function j(a,b,c){try{let{errored:i,destroyed:j}=b;if(i||j)return;let k=(0,d.createAbortController)(b),l=function(a,b){let c=!1,d=new e.DetachedPromise;function i(){d.resolve()}a.on("drain",i),a.once("close",()=>{a.off("drain",i),d.resolve()});let j=new e.DetachedPromise;return a.once("finish",()=>{j.resolve()}),new WritableStream({write:async b=>{if(!c){if(c=!0,"performance"in globalThis&&process.env.NEXT_OTEL_PERFORMANCE_PREFIX){let a=(0,h.getClientComponentLoaderMetrics)();a&&performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`,{start:a.clientComponentLoadStart,end:a.clientComponentLoadStart+a.clientComponentLoadTimes})}a.flushHeaders(),(0,f.getTracer)().trace(g.NextNodeServerSpan.startResponse,{spanName:"start response"},()=>void 0)}try{let c=a.write(b);"flush"in a&&"function"==typeof a.flush&&a.flush(),c||(await d.promise,d=new e.DetachedPromise)}catch(b){throw a.end(),Object.defineProperty(Error("failed to write chunk to response",{cause:b}),"__NEXT_ERROR_CODE",{value:"E321",enumerable:!1,configurable:!0})}},abort:b=>{a.writableFinished||a.destroy(b)},close:async()=>{if(b&&await b,!a.writableFinished)return a.end(),j.promise}})}(b,c);await a.pipeTo(l,{signal:k.signal})}catch(a){if(i(a))return;throw Object.defineProperty(Error("failed to pipe response",{cause:a}),"__NEXT_ERROR_CODE",{value:"E180",enumerable:!1,configurable:!0})}}},98450:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{I:()=>n,m:()=>m});var e=c(73024),f=c(76760),g=c(84104),h=c(79336),i=c(38985),j=c(37937),k=c(83498),l=a([g,h,i,j]);async function m(a,b={}){let c,{name:d,slug:l,asset_stage:n="exploration",commodity:o=null,deposit_type:p=null,portfolio_entry_id:q=null,description:r=null}=a||{};if(!d||!String(d).trim())return{status:"error",error:"name_required"};let s=(0,g.Lf)(),t=(0,g.kF)(),u=(0,h.DJ)(l||d);if(s.prepare("SELECT id FROM mines_projects WHERE slug = ? LIMIT 1").get(u))return{status:"error",error:"slug_in_use",slug:u};if(q){let a=s.prepare("SELECT id, project_id FROM mines_portfolio_entries WHERE id = ? LIMIT 1").get(q);if(!a)return{status:"error",error:"entry_not_found",portfolio_entry_id:q};if(a.project_id)return{status:"error",error:"entry_already_linked",portfolio_entry_id:q}}try{c=(0,h.gA)({name:String(d).trim(),slug:u,description:r||"Mine project: "+String(d).trim(),color:"#2A5C45"})}catch(a){if(a?.code==="PROJECT_SLUG_EXISTS")return{status:"error",error:"slug_in_use",slug:u};throw a}let v=c.id,w=c.slug,x=(0,g.Si)("mp"),y=q||null;s.prepare("BEGIN").run();try{if(s.prepare(`
|
|
3183
3187
|
INSERT INTO mines_projects
|
|
3184
3188
|
(id, os_project_id, name, slug, asset_stage, commodity, deposit_type,
|
|
3185
3189
|
country, state_province, has_technical_report, data_completeness, created_at, updated_at)
|
|
@@ -3200,7 +3204,7 @@ ${b}`:b;return r(p("codex"),["exec",d],{timeoutMs:Number(process.env.CODEX_TICK_
|
|
|
3200
3204
|
FROM mines_portfolio_entries
|
|
3201
3205
|
WHERE project_id = ?
|
|
3202
3206
|
LIMIT 1
|
|
3203
|
-
`).get(c),i=h?{id:h.id,portfolio_id:h.portfolio_id,name:h.name,commodity:h.commodity??null,deposit_type:h.deposit_type??null,owner:h.owner??null,available_information:h.available_information??null,has_drilling:+(1===h.has_drilling),deal_terms:h.deal_terms??null,data_completeness:h.data_completeness??null,notes:h.notes??null}:null,j=d.prepare("SELECT COUNT(*) AS n, MAX(created_at) AS last_at FROM mines_source_documents WHERE project_id = ?").get(c),k=d.prepare("SELECT COUNT(*) AS n FROM mines_assay_samples WHERE project_id = ?").get(c),l=d.prepare("SELECT COUNT(*) AS n FROM mines_drill_holes WHERE project_id = ?").get(c),m={documents:j?.n??0,assays:k?.n??0,drill_holes:l?.n??0},o=j?.last_at??null;return{status:"ok",project:f,portfolio_entry:i,counts:m,last_import_at:o}}[g,h,i,j]=l.then?(await l)():l,d()}catch(a){d(a)}})},99332:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{createTask:()=>p,fI:()=>l});var e=c(84104),f=c(67644),g=c(79336),h=c(86702),i=a([e,f,g]);function j(a,b=null){if(!a)return b;try{return JSON.parse(a)}catch{return b}}function k(a){return null==a?null:JSON.stringify(a)}function l(a){if(!a?.type||!1===a.persist)return null;let b=function(a){let b={agent_run_start:"agent.run.status",agent_run_complete:"agent.run.status",agent_tool_start:"agent.run.event",agent_tool_result:"agent.run.event",log:"agent.run.log"},c=(0,h._d)(b[a.type]||a.type,null);return c&&h.eh.includes(c)?{actor_type:a.actor_type||(a.agent_id?"agent":"system"),actor_id:a.actor_id||a.agent_id||null,agent_id:a.agent_id||null,run_id:a.run_id||null,entity_type:a.entity_type||(a.task_id?"task":a.run_id?"agent_run":a.agent_id?"agent":"event"),entity_id:a.entity_id||a.task_id||a.run_id||a.id||null,action:c,details:{...a,legacy_type:b[a.type]?a.type:void 0},created_at:a.created_at||(0,e.kF)()}:null}(a);return b?m(b):null}function m({actor_type:a="system",actor_id:b=null,agent_id:c=null,run_id:d=null,entity_type:f=null,entity_id:g=null,action:h,details:i=null,created_at:l=(0,e.kF)()}={}){var n;if(!h)throw Error("activity action is required");let o=(0,e.Lf)(),p=(0,e.Si)("activity");return o.prepare(`
|
|
3207
|
+
`).get(c),i=h?{id:h.id,portfolio_id:h.portfolio_id,name:h.name,commodity:h.commodity??null,deposit_type:h.deposit_type??null,owner:h.owner??null,available_information:h.available_information??null,has_drilling:+(1===h.has_drilling),deal_terms:h.deal_terms??null,data_completeness:h.data_completeness??null,notes:h.notes??null}:null,j=d.prepare("SELECT COUNT(*) AS n, MAX(created_at) AS last_at FROM mines_source_documents WHERE project_id = ?").get(c),k=d.prepare("SELECT COUNT(*) AS n FROM mines_assay_samples WHERE project_id = ?").get(c),l=d.prepare("SELECT COUNT(*) AS n FROM mines_drill_holes WHERE project_id = ?").get(c),m={documents:j?.n??0,assays:k?.n??0,drill_holes:l?.n??0},o=j?.last_at??null;return{status:"ok",project:f,portfolio_entry:i,counts:m,last_import_at:o}}[g,h,i,j]=l.then?(await l)():l,d()}catch(a){d(a)}})},98916:(a,b,c)=>{"use strict";c.d(b,{default:()=>m});var d=c(21124),e=c(38301),f=c(23312),g=c(43815),h=c(85708);let i=(0,h.createServerReference)("409168a77899fcccb89f61c15e248f778e542662cd",h.callServer,void 0,h.findSourceMapURL,"updateProjectAction");var j=c(54151);let k=[{value:"#c2452a",name:"Mars Red"},{value:"#a83a22",name:"Deep Red"},{value:"#7c2b19",name:"Dark Red"},{value:"#111318",name:"Charcoal"},{value:"#3f3a30",name:"Warm Black"},{value:"#68707b",name:"Slate"},{value:"#cdb78a",name:"Warm Sand"},{value:"#1f6c9f",name:"Skill Blue"}];function l(){let{pending:a}=(0,f.useFormStatus)();return(0,d.jsx)("button",{type:"submit",className:"admin-button",disabled:a,"aria-busy":a?"true":void 0,children:a?"Saving…":"Save changes"})}function m({projectId:a,projectName:b,projectColor:c,projectDescription:f,projectFolderPath:h}){let[m,n]=e.useState(!1),[o,p]=e.useState("keep"),[q,r]=e.useState(h||""),s=e.useRef(null);return e.useEffect(()=>{m&&(p("keep"),r(h||""))},[m,h]),e.useEffect(()=>{"custom"===o&&s.current?.focus()},[o]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{type:"button",className:"admin-button secondary project-edit",onClick:()=>n(!0),"aria-label":`Edit ${b}`,children:"Edit"}),(0,d.jsx)(g.A,{open:m,onClose:()=>n(!1),eyebrow:"Edit project",title:`Edit ${b}`,children:(0,d.jsxs)("form",{className:"agents-modal-form",action:i,children:[(0,d.jsx)("input",{type:"hidden",name:"project_id",value:a}),(0,d.jsx)("section",{className:"agents-modal-section",children:(0,d.jsxs)("label",{className:"agents-modal-field wide",children:[(0,d.jsx)("span",{children:"Name"}),(0,d.jsx)("input",{name:"name",type:"text",defaultValue:b,autoComplete:"off",required:!0})]})}),(0,d.jsxs)("section",{className:"agents-modal-section",children:[(0,d.jsxs)("div",{className:"agents-modal-section-head",children:[(0,d.jsx)("span",{children:"Folder location"}),(0,d.jsx)("small",{children:"Where project files live on disk. Move only if you've already moved the folder yourself."})]}),(0,d.jsxs)("div",{className:"agents-modal-radio-group",children:[(0,d.jsxs)("label",{className:`agents-modal-radio ${"keep"===o?"on":""}`,children:[(0,d.jsx)("input",{type:"radio",name:"folder_mode",value:"keep",checked:"keep"===o,onChange:()=>p("keep")}),(0,d.jsxs)("span",{className:"agents-modal-radio-body",children:[(0,d.jsx)("b",{children:"Keep current"}),(0,d.jsx)("code",{title:h||"",children:function(a,b=48){if(!a||a.length<=b)return a;let c=a.slice(0,Math.floor(b/2)-1),d=a.slice(a.length-Math.floor(b/2)+2);return`${c}…${d}`}(h)||"(not set)"})]})]}),(0,d.jsxs)("label",{className:`agents-modal-radio ${"custom"===o?"on":""}`,children:[(0,d.jsx)("input",{type:"radio",name:"folder_mode",value:"custom",checked:"custom"===o,onChange:()=>p("custom")}),(0,d.jsxs)("span",{className:"agents-modal-radio-body",children:[(0,d.jsx)("b",{children:"Change to…"}),(0,d.jsx)("small",{children:"Absolute path. Must already exist or be writable."})]})]})]}),"custom"===o?(0,d.jsx)(j.A,{inputRef:s,value:q,onChange:r}):(0,d.jsx)("input",{type:"hidden",name:"folder_path",value:""})]}),(0,d.jsxs)("section",{className:"agents-modal-section",children:[(0,d.jsxs)("div",{className:"agents-modal-section-head",children:[(0,d.jsx)("span",{children:"Color"}),(0,d.jsx)("small",{children:"Tile color across the app."})]}),(0,d.jsxs)("fieldset",{className:"agents-modal-swatches",children:[(0,d.jsx)("legend",{className:"visually-hidden",children:"Project color"}),k.map(a=>(0,d.jsxs)("label",{className:"agents-modal-swatch",style:{"--swatch":a.value},children:[(0,d.jsx)("input",{type:"radio",name:"color",value:a.value,defaultChecked:a.value===(c||"#c2452a")}),(0,d.jsx)("span",{className:"agents-modal-swatch-ring","aria-hidden":"true"}),(0,d.jsx)("span",{className:"visually-hidden",children:a.name})]},a.value))]})]}),(0,d.jsxs)("section",{className:"agents-modal-section",children:[(0,d.jsxs)("div",{className:"agents-modal-section-head",children:[(0,d.jsx)("span",{children:"Description"}),(0,d.jsx)("small",{children:"Used as context for agents working in this project."})]}),(0,d.jsx)("label",{className:"agents-modal-field wide",children:(0,d.jsx)("textarea",{name:"description",rows:3,defaultValue:f||"",placeholder:"What is this project for? Goals, audience, voice, constraints."})})]}),(0,d.jsxs)("footer",{className:"agents-modal-foot",children:[(0,d.jsx)("button",{type:"button",className:"admin-button secondary",onClick:()=>n(!1),children:"Cancel"}),(0,d.jsx)(l,{})]})]})})]})}},99332:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{createTask:()=>p,fI:()=>l});var e=c(84104),f=c(67644),g=c(79336),h=c(86702),i=a([e,f,g]);function j(a,b=null){if(!a)return b;try{return JSON.parse(a)}catch{return b}}function k(a){return null==a?null:JSON.stringify(a)}function l(a){if(!a?.type||!1===a.persist)return null;let b=function(a){let b={agent_run_start:"agent.run.status",agent_run_complete:"agent.run.status",agent_tool_start:"agent.run.event",agent_tool_result:"agent.run.event",log:"agent.run.log"},c=(0,h._d)(b[a.type]||a.type,null);return c&&h.eh.includes(c)?{actor_type:a.actor_type||(a.agent_id?"agent":"system"),actor_id:a.actor_id||a.agent_id||null,agent_id:a.agent_id||null,run_id:a.run_id||null,entity_type:a.entity_type||(a.task_id?"task":a.run_id?"agent_run":a.agent_id?"agent":"event"),entity_id:a.entity_id||a.task_id||a.run_id||a.id||null,action:c,details:{...a,legacy_type:b[a.type]?a.type:void 0},created_at:a.created_at||(0,e.kF)()}:null}(a);return b?m(b):null}function m({actor_type:a="system",actor_id:b=null,agent_id:c=null,run_id:d=null,entity_type:f=null,entity_id:g=null,action:h,details:i=null,created_at:l=(0,e.kF)()}={}){var n;if(!h)throw Error("activity action is required");let o=(0,e.Lf)(),p=(0,e.Si)("activity");return o.prepare(`
|
|
3204
3208
|
INSERT INTO activity_log
|
|
3205
3209
|
(id, actor_type, actor_id, agent_id, run_id, entity_type, entity_id, action, details_json, created_at)
|
|
3206
3210
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
@@ -3218,4 +3222,4 @@ ${b}`:b;return r(p("codex"),["exec",d],{timeoutMs:Number(process.env.CODEX_TICK_
|
|
|
3218
3222
|
`).run(f,a.workspace_id||"local",String(a.title||"Untitled task"),a.description||null,i,l,g?.id||null,a.created_by_agent_id||null,a.created_by_user_id||null,a.parent_task_id||null,a.project_id||null,a.goal_id||null,a.blocked_reason||null,r,k(m),s,k(q),t,a.acceptance_criteria||null,a.recurred_from_task_id||null,d,d,"in_progress"===i?d:null,"done"===i?d:null,"cancelled"===i?d:null),Array.isArray(a.checklist)&&a.checklist.length){let b=c.prepare(`
|
|
3219
3223
|
INSERT INTO task_checklist_items (id, task_id, label, done, position, created_at, done_at)
|
|
3220
3224
|
VALUES (?, ?, ?, 0, ?, ?, NULL)
|
|
3221
|
-
`);a.checklist.map(a=>String(a).trim()).filter(Boolean).slice(0,30).forEach((a,c)=>{b.run((0,e.Si)("ckl"),f,a,c,d)})}let u=(b=(0,e.Lf)().prepare("SELECT * FROM tasks WHERE id = ?").get(f))?{...b,parent_task_id:b.parent_task_id||null,tags:j(b.tags_json,[]),watchers:j(b.watchers_json,[]),due_at:b.due_at||null,estimate_minutes:null==b.estimate_minutes?null:Number(b.estimate_minutes),recurrence:b.recurrence||null,acceptance_criteria:b.acceptance_criteria||null}:null;return o(u,{action:"task.updated",liveType:"task.updated",actor_type:a.created_by_agent_id?"agent":a.created_by_user_id?"user":"system",actor_id:a.created_by_agent_id||a.created_by_user_id||null,agent_id:g?.id||null,details:{event:"created"},event_type:"task.created",wake_reason:g?"task_assigned":null}),g&&o(u,{action:"task.assigned",liveType:"task.assigned",actor_type:a.created_by_agent_id?"agent":a.created_by_user_id?"user":"system",actor_id:a.created_by_agent_id||a.created_by_user_id||null,agent_id:g.id,details:{assignee_agent_id:g.id},event_type:"task.assigned"}),a.parent_task_id&&n(a.parent_task_id,{event_type:"task.child_created",actor_type:a.created_by_agent_id?"agent":a.created_by_user_id?"user":"system",actor_id:a.created_by_agent_id||a.created_by_user_id||null,agent_id:g?.id||null,payload:{child_task_id:u.id}}),u}[e,f,g]=i.then?(await i)():i,d()}catch(a){d(a)}})},99752:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{chatWithClaude:()=>i});var e=c(50832),f=c(66740),g=a([e,f]);[e,f]=g.then?(await g)():g;let j=Number(process.env.MADARX_ANTHROPIC_MAX_RETRIES??4),k=Number(process.env.MADARX_ANTHROPIC_OUTER_RETRIES??3),l=a=>new Promise(b=>setTimeout(b,a));async function h(a,b){let c;for(let d=0;d<k;d+=1)try{return await a()}catch(e){if(c=e,!function(a){let b=a?.status;return!!(429===b||408===b||409===b||"number"==typeof b&&b>=500||null==b&&(a?.name==="APIConnectionError"||a?.name==="APIConnectionTimeoutError"||/timeout|ECONNRESET|ENOTFOUND|EAI_AGAIN|socket hang up/i.test(String(a?.message||""))))}(e)||d===k-1)throw e;let a=function(a,b){let c=a?.headers?.get?.("retry-after"),d=null!=c?Number(c):NaN;return Number.isFinite(d)&&d>=0?Math.min(1e3*d,3e4):Math.min(500*2**b,8e3)+Math.floor(250*Math.random())}(e,d);console.warn(`[claude] ${b} transient ${e?.status||e?.name||"error"} — retry ${d+1}/${k-1} in ${a}ms`),await l(a)}throw c}async function i(a,b,c=[],d={}){let g=function(){let a=(0,f.resolveAnthropicApiKey)();if(!a)throw Error("ANTHROPIC_API_KEY not configured");return new e.default({apiKey:a,maxRetries:j})}(),k={model:d.model||"claude-sonnet-4-6",max_tokens:d.max_tokens||8192,system:b,messages:a};return c.length&&(k.tools=c),d.tool_choice&&(k.tool_choice=d.tool_choice),"number"==typeof d.temperature&&(k.temperature=d.temperature),h(()=>g.messages.create(k),`chat(${k.model})`)}d()}catch(a){d(a)}})},99755:(a,b,c)=>{"use strict";c.d(b,{nA:()=>g});let d=/^[a-z][a-z0-9-]{2,63}$/,e=/^\/[a-z][a-z0-9-]{1,63}$/;function f(a,b,c){a.push(`${b}: ${c}`)}function g(a,b={}){var c;let h,i=[],j=[];try{h=JSON.stringify(a)}catch{return{ok:!1,errors:["spec: not JSON-serialisable"],warnings:[],normalized:null}}if(!h||"undefined"===h)return{ok:!1,errors:["spec: required"],warnings:[],normalized:null};if(Buffer.byteLength(h,"utf8")>65536)return{ok:!1,errors:["spec: exceeds 64KB"],warnings:[],normalized:null};return null===a||"object"!=typeof a||Array.isArray(a)?{ok:!1,errors:["spec: must be an object"],warnings:[],normalized:null}:(a.slug&&"string"==typeof a.slug?d.test(a.slug)||f(i,"slug",`does not match ${d} (lowercase, starts with letter, 3-64 chars, [a-z0-9-])`):f(i,"slug","required (string)"),a.title&&"string"==typeof a.title||f(i,"title","required (non-empty string)"),null!=a.description&&"string"!=typeof a.description&&f(i,"description","must be a string"),a.markdown&&"string"==typeof a.markdown?a.markdown.length>1e5&&f(i,"markdown",`exceeds 100000 chars (got ${a.markdown.length})`):f(i,"markdown","required (non-empty string)"),null!=a.invocation&&("string"!=typeof a.invocation?f(i,"invocation","must be a string"):e.test(a.invocation)||f(i,"invocation",`must match ${e} (e.g. "/my-skill")`)),null!=a.trigger_examples&&(Array.isArray(a.trigger_examples)?a.trigger_examples.forEach((a,b)=>{"string"==typeof a&&a.trim()||f(i,`trigger_examples[${b}]`,"must be a non-empty string")}):f(i,"trigger_examples","must be an array of strings")),null!=a.category&&"string"!=typeof a.category&&f(i,"category","must be a string"),i.length>0)?{ok:!1,errors:i,warnings:j,normalized:null}:{ok:!0,errors:[],warnings:j,normalized:{slug:(c=a).slug,title:c.title,description:c.description||null,category:"string"==typeof c.category&&c.category?c.category:"authored",invocation:"string"==typeof c.invocation&&c.invocation?c.invocation:`/${c.slug}`,markdown:c.markdown,trigger_examples:Array.isArray(c.trigger_examples)?c.trigger_examples.filter(a=>"string"==typeof a&&a.trim()):[]}}}},99850:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{J1:()=>h}),c(77598);var e=c(84104),f=a([e]);async function g(a,b,c){let d=new URLSearchParams(b).toString(),e=await c(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:d}),f=null;try{f=await e.json()}catch{f=null}return{res:e,data:f}}async function h(a,b={},c=fetch){if(!a?.token_url)throw Error("provider.token_url required");if(!b.refresh_token)throw Error("refresh_token required");let d={grant_type:"refresh_token",refresh_token:b.refresh_token,client_id:b.client_id||""};b.client_secret&&(d.client_secret=b.client_secret);let{res:e,data:f}=await g(a.token_url,d,c);if(!e.ok)return{ok:!1,error:"refresh_failed",http_status:e.status,detail:f?.error||null};let i=function(a){if(!a||"object"!=typeof a)return null;let b=a.access_token||null;return b?{access_token:b,refresh_token:a.refresh_token||null,token_type:a.token_type||"Bearer",expires_in:Number.isFinite(a.expires_in)?a.expires_in:null,scope:a.scope||null}:null}(f);return i?{ok:!0,...i,refresh_token:i.refresh_token||b.refresh_token}:{ok:!1,error:"no_access_token"}}e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})}};var b=require("../../webpack-runtime.js");b.C(a);var c=b.X(0,[5873,3940,9483,1699,3230,6059],()=>b(b.s=17483));module.exports=c})();
|
|
3225
|
+
`);a.checklist.map(a=>String(a).trim()).filter(Boolean).slice(0,30).forEach((a,c)=>{b.run((0,e.Si)("ckl"),f,a,c,d)})}let u=(b=(0,e.Lf)().prepare("SELECT * FROM tasks WHERE id = ?").get(f))?{...b,parent_task_id:b.parent_task_id||null,tags:j(b.tags_json,[]),watchers:j(b.watchers_json,[]),due_at:b.due_at||null,estimate_minutes:null==b.estimate_minutes?null:Number(b.estimate_minutes),recurrence:b.recurrence||null,acceptance_criteria:b.acceptance_criteria||null}:null;return o(u,{action:"task.updated",liveType:"task.updated",actor_type:a.created_by_agent_id?"agent":a.created_by_user_id?"user":"system",actor_id:a.created_by_agent_id||a.created_by_user_id||null,agent_id:g?.id||null,details:{event:"created"},event_type:"task.created",wake_reason:g&&!a.suppress_wake?"task_assigned":null}),g&&o(u,{action:"task.assigned",liveType:"task.assigned",actor_type:a.created_by_agent_id?"agent":a.created_by_user_id?"user":"system",actor_id:a.created_by_agent_id||a.created_by_user_id||null,agent_id:g.id,details:{assignee_agent_id:g.id},event_type:"task.assigned"}),a.parent_task_id&&n(a.parent_task_id,{event_type:"task.child_created",actor_type:a.created_by_agent_id?"agent":a.created_by_user_id?"user":"system",actor_id:a.created_by_agent_id||a.created_by_user_id||null,agent_id:g?.id||null,payload:{child_task_id:u.id}}),u}[e,f,g]=i.then?(await i)():i,d()}catch(a){d(a)}})},99752:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{chatWithClaude:()=>i});var e=c(50832),f=c(66740),g=a([e,f]);[e,f]=g.then?(await g)():g;let j=Number(process.env.MADARX_ANTHROPIC_MAX_RETRIES??4),k=Number(process.env.MADARX_ANTHROPIC_OUTER_RETRIES??3),l=a=>new Promise(b=>setTimeout(b,a));async function h(a,b){let c;for(let d=0;d<k;d+=1)try{return await a()}catch(e){if(c=e,!function(a){let b=a?.status;return!!(429===b||408===b||409===b||"number"==typeof b&&b>=500||null==b&&(a?.name==="APIConnectionError"||a?.name==="APIConnectionTimeoutError"||/timeout|ECONNRESET|ENOTFOUND|EAI_AGAIN|socket hang up/i.test(String(a?.message||""))))}(e)||d===k-1)throw e;let a=function(a,b){let c=a?.headers?.get?.("retry-after"),d=null!=c?Number(c):NaN;return Number.isFinite(d)&&d>=0?Math.min(1e3*d,3e4):Math.min(500*2**b,8e3)+Math.floor(250*Math.random())}(e,d);console.warn(`[claude] ${b} transient ${e?.status||e?.name||"error"} — retry ${d+1}/${k-1} in ${a}ms`),await l(a)}throw c}async function i(a,b,c=[],d={}){let g=function(){let a=(0,f.resolveAnthropicApiKey)();if(!a)throw Error("ANTHROPIC_API_KEY not configured");return new e.default({apiKey:a,maxRetries:j})}(),k={model:d.model||"claude-sonnet-4-6",max_tokens:d.max_tokens||8192,system:b,messages:a};return c.length&&(k.tools=c),d.tool_choice&&(k.tool_choice=d.tool_choice),"number"==typeof d.temperature&&(k.temperature=d.temperature),h(()=>g.messages.create(k),`chat(${k.model})`)}d()}catch(a){d(a)}})},99755:(a,b,c)=>{"use strict";c.d(b,{nA:()=>g});let d=/^[a-z][a-z0-9-]{2,63}$/,e=/^\/[a-z][a-z0-9-]{1,63}$/;function f(a,b,c){a.push(`${b}: ${c}`)}function g(a,b={}){var c;let h,i=[],j=[];try{h=JSON.stringify(a)}catch{return{ok:!1,errors:["spec: not JSON-serialisable"],warnings:[],normalized:null}}if(!h||"undefined"===h)return{ok:!1,errors:["spec: required"],warnings:[],normalized:null};if(Buffer.byteLength(h,"utf8")>65536)return{ok:!1,errors:["spec: exceeds 64KB"],warnings:[],normalized:null};return null===a||"object"!=typeof a||Array.isArray(a)?{ok:!1,errors:["spec: must be an object"],warnings:[],normalized:null}:(a.slug&&"string"==typeof a.slug?d.test(a.slug)||f(i,"slug",`does not match ${d} (lowercase, starts with letter, 3-64 chars, [a-z0-9-])`):f(i,"slug","required (string)"),a.title&&"string"==typeof a.title||f(i,"title","required (non-empty string)"),null!=a.description&&"string"!=typeof a.description&&f(i,"description","must be a string"),a.markdown&&"string"==typeof a.markdown?a.markdown.length>1e5&&f(i,"markdown",`exceeds 100000 chars (got ${a.markdown.length})`):f(i,"markdown","required (non-empty string)"),null!=a.invocation&&("string"!=typeof a.invocation?f(i,"invocation","must be a string"):e.test(a.invocation)||f(i,"invocation",`must match ${e} (e.g. "/my-skill")`)),null!=a.trigger_examples&&(Array.isArray(a.trigger_examples)?a.trigger_examples.forEach((a,b)=>{"string"==typeof a&&a.trim()||f(i,`trigger_examples[${b}]`,"must be a non-empty string")}):f(i,"trigger_examples","must be an array of strings")),null!=a.category&&"string"!=typeof a.category&&f(i,"category","must be a string"),i.length>0)?{ok:!1,errors:i,warnings:j,normalized:null}:{ok:!0,errors:[],warnings:j,normalized:{slug:(c=a).slug,title:c.title,description:c.description||null,category:"string"==typeof c.category&&c.category?c.category:"authored",invocation:"string"==typeof c.invocation&&c.invocation?c.invocation:`/${c.slug}`,markdown:c.markdown,trigger_examples:Array.isArray(c.trigger_examples)?c.trigger_examples.filter(a=>"string"==typeof a&&a.trim()):[]}}}},99850:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{J1:()=>h}),c(77598);var e=c(84104),f=a([e]);async function g(a,b,c){let d=new URLSearchParams(b).toString(),e=await c(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:d}),f=null;try{f=await e.json()}catch{f=null}return{res:e,data:f}}async function h(a,b={},c=fetch){if(!a?.token_url)throw Error("provider.token_url required");if(!b.refresh_token)throw Error("refresh_token required");let d={grant_type:"refresh_token",refresh_token:b.refresh_token,client_id:b.client_id||""};b.client_secret&&(d.client_secret=b.client_secret);let{res:e,data:f}=await g(a.token_url,d,c);if(!e.ok)return{ok:!1,error:"refresh_failed",http_status:e.status,detail:f?.error||null};let i=function(a){if(!a||"object"!=typeof a)return null;let b=a.access_token||null;return b?{access_token:b,refresh_token:a.refresh_token||null,token_type:a.token_type||"Bearer",expires_in:Number.isFinite(a.expires_in)?a.expires_in:null,scope:a.scope||null}:null}(f);return i?{ok:!0,...i,refresh_token:i.refresh_token||b.refresh_token}:{ok:!1,error:"no_access_token"}}e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})}};var b=require("../../webpack-runtime.js");b.C(a);var c=b.X(0,[5873,3940,9483,1699,3230,6059],()=>b(b.s=17483));module.exports=c})();
|