@mndrk/agx 1.4.54 → 1.4.58
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/README.md +3 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/BUILD_ID +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/app-build-manifest.json +73 -66
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/app-path-routes-manifest.json +6 -5
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/build-manifest.json +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/prerender-manifest.json +15 -15
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/routes-manifest.json +8 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_not-found/page.js +9 -3
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_not-found.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_not-found.rsc +17 -16
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/audit/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/auth/[...nextauth]/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/auth/daemon-secret/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/auth/daemon-secret/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/auth/device/code/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/auth/device/token/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/auth/refresh/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/domains/[id]/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/domains/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/learnings/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/learnings/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/logs/stream/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/orchestrator/tasks/[taskId]/start/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/orchestrator/tasks/[taskId]/status/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/projects/[id]/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/projects/[id]/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/projects/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/queue/complete/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/queue/complete/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/queue/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/queue/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/stage-prompts/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/stage-prompts/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/comments/[commentId]/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/comments/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/comments/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/heartbeat/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/history/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/history/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/logs/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/logs/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/restart-stage/route.js +4 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/restart-stage/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/restart-stage/route_client-reference-manifest.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/route.js +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/stream/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/user-settings/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/user-settings/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/workflows/[id]/nodes/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/workflows/[id]/nodes/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/workflows/[id]/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/workflows/[id]/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/workflows/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/workflows/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/auth/callback/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/auth/device/page.js +12 -6
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/auth/device/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/auth/device.html +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/auth/device.rsc +21 -20
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/dashboard/page.js +3 -3
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/dashboard/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/dashboard/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/dashboard.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/dashboard.rsc +21 -20
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/index.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/index.rsc +25 -24
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/login/page.js +9 -3
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/login.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/login.rsc +21 -20
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/page.js +9 -3
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/[slug]/page.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/[slug]/tasks/page.js +3 -3
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/[slug]/tasks/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/[slug]/tasks/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/[slug]/workflow/page.js +9 -3
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/[slug]/workflow/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/page.js +3 -3
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects.rsc +21 -20
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/settings/page.js +9 -3
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/settings.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/settings.rsc +21 -20
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app-paths-manifest.json +6 -5
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/chunks/3009.js +8 -8
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/chunks/6158.js +19 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/chunks/6317.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/chunks/7143.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/instrumentation.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/middleware-manifest.json +5 -5
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/pages/404.html +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/pages/500.html +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/pages-manifest.json +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/server-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/server-reference-manifest.json +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/5608-674cd57e975c9b36.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/9337-f4cb4820efca03a1.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/audit/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/[...nextauth]/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/daemon-secret/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/device/code/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/device/token/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/refresh/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/status/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/domains/[id]/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/domains/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/health/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/learnings/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/logs/stream/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/cancel/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/signal/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/start/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/status/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/projects/[id]/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/projects/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/providers/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/queue/complete/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/queue/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/stage-prompts/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/comments/[commentId]/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/comments/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/heartbeat/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/history/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/logs/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/restart-stage/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/stream/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/user-settings/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/workflows/[id]/nodes/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/workflows/[id]/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/workflows/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/auth/callback/route-13be4cfc17a5f679.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/auth/device/{page-288ccb59b548ddcc.js → page-eb5b4fc6b9f60343.js} +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/dashboard/{page-f12cc2e8800728f7.js → page-ea6ccecbfa743b53.js} +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/layout-6b46da9e6091abb3.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/projects/[slug]/{page-8465be2213d5814e.js → page-7357b68f3783a0b4.js} +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/projects/[slug]/tasks/page-ec17b64371f48524.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/projects/page-6c545e9e5f5f66bc.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/css/ea93fda1b0bdd3b9.css +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/worker/index.js +68 -0
- package/lib/cli/cloud/prompts.js +6 -2
- package/lib/cli/daemon.js +2 -2
- package/lib/cli/runCli.js +154 -36
- package/lib/cli/skillText.js +1 -1
- package/lib/cli/taskStatusService.js +183 -0
- package/package.json +1 -1
- package/templates/stack/postgres/init/001_agx_board_schema.sql +15 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/chunks/5519.js +0 -6
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/9337-1475b21ebc625376.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/9719-26e3b61c21dd9194.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/audit/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/[...nextauth]/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/daemon-secret/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/device/code/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/device/token/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/refresh/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/status/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/domains/[id]/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/domains/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/health/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/learnings/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/logs/stream/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/cancel/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/signal/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/start/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/status/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/projects/[id]/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/projects/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/providers/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/queue/complete/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/queue/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/stage-prompts/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/comments/[commentId]/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/comments/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/heartbeat/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/history/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/logs/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/stream/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/user-settings/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/workflows/[id]/nodes/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/workflows/[id]/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/workflows/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/auth/callback/route-99c56d5659a15bdb.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/layout-449a81ecf8041b29.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/projects/[slug]/tasks/page-5813cf2efcd8d555.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/projects/page-42969463f06ac3e8.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/css/6873fedf803c523e.css +0 -1
- /package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/{LM3I1rgG9I2QwtrZCfWRB → 2YqDwh6NlGhbNnhMVpOgd}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/{LM3I1rgG9I2QwtrZCfWRB → 2YqDwh6NlGhbNnhMVpOgd}/_ssgManifest.js +0 -0
package/lib/cli/runCli.js
CHANGED
|
@@ -40,6 +40,7 @@ const { spawnCloudTaskProcess } = require('../proc/spawnCloudTaskProcess');
|
|
|
40
40
|
const { scheduleTermination } = require('../proc/killProcessTree');
|
|
41
41
|
const { getProcessManager } = require('../proc/ProcessManager');
|
|
42
42
|
const { createCloudClient } = require('../cloud/client');
|
|
43
|
+
const { showCloudTaskStatus } = require('./taskStatusService');
|
|
43
44
|
const {
|
|
44
45
|
buildContinueCloudTaskPrompt,
|
|
45
46
|
buildNewAutonomousCloudTaskPrompt,
|
|
@@ -536,6 +537,11 @@ async function checkOnboarding() {
|
|
|
536
537
|
}
|
|
537
538
|
}
|
|
538
539
|
|
|
540
|
+
async function restartTaskFromStage(taskId, stage) {
|
|
541
|
+
await cloudRequest('POST', `/api/tasks/${taskId}/restart-stage`, { stage });
|
|
542
|
+
console.log(`${c.green}↺${c.reset} Task ${taskId.slice(0, 8)} reset to stage ${stage}`);
|
|
543
|
+
}
|
|
544
|
+
|
|
539
545
|
async function resolveProjectByIdentifier(identifier) {
|
|
540
546
|
if (!identifier || !identifier.trim()) {
|
|
541
547
|
throw new Error('Project identifier is required');
|
|
@@ -635,6 +641,7 @@ async function checkOnboarding() {
|
|
|
635
641
|
return resolvedTaskId;
|
|
636
642
|
}
|
|
637
643
|
|
|
644
|
+
|
|
638
645
|
function getOrchestrator() {
|
|
639
646
|
const config = loadCloudConfig();
|
|
640
647
|
if (!config?.apiUrl) {
|
|
@@ -686,9 +693,13 @@ async function checkOnboarding() {
|
|
|
686
693
|
}
|
|
687
694
|
|
|
688
695
|
async function runTaskInline(rawTaskId, options = {}) {
|
|
689
|
-
const { resetFirst = false, forceSwarm = false } = options;
|
|
696
|
+
const { resetFirst = false, forceSwarm = false, fromStage = null } = options;
|
|
690
697
|
const taskId = await resolveTaskId(rawTaskId);
|
|
691
698
|
|
|
699
|
+
if (fromStage) {
|
|
700
|
+
await restartTaskFromStage(taskId, fromStage);
|
|
701
|
+
}
|
|
702
|
+
|
|
692
703
|
if (resetFirst) {
|
|
693
704
|
await cloudRequest('PATCH', `/api/tasks/${taskId}`, {
|
|
694
705
|
status: 'queued',
|
|
@@ -1066,37 +1077,56 @@ async function checkOnboarding() {
|
|
|
1066
1077
|
|
|
1067
1078
|
console.log(`${c.green}✓${c.reset} Daemon loop started (workers=${maxWorkers}, poll=${pollMs}ms)`);
|
|
1068
1079
|
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1080
|
+
async function runWorker(workerIndex) {
|
|
1081
|
+
const workerLabel = `worker-${workerIndex}`;
|
|
1082
|
+
while (!stopping) {
|
|
1083
|
+
let task = null;
|
|
1084
|
+
try {
|
|
1072
1085
|
const queue = await cloudRequest('GET', '/api/queue');
|
|
1073
|
-
|
|
1074
|
-
|
|
1086
|
+
task = queue?.task || null;
|
|
1087
|
+
} catch (err) {
|
|
1088
|
+
console.error(`${c.red}[daemon][${workerLabel}] queue poll failed:${c.reset} ${err?.message || err}`);
|
|
1089
|
+
if (!stopping) await sleep(pollMs);
|
|
1090
|
+
continue;
|
|
1091
|
+
}
|
|
1075
1092
|
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1093
|
+
if (!task) {
|
|
1094
|
+
await sleep(pollMs);
|
|
1095
|
+
continue;
|
|
1096
|
+
}
|
|
1080
1097
|
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
});
|
|
1098
|
+
const taskId = String(task.id || '').trim();
|
|
1099
|
+
if (!taskId) {
|
|
1100
|
+
console.error(`${c.red}[daemon][${workerLabel}] queue returned task without id${c.reset}`);
|
|
1101
|
+
await sleep(pollMs);
|
|
1102
|
+
continue;
|
|
1103
|
+
}
|
|
1088
1104
|
|
|
1089
|
-
|
|
1105
|
+
if (inFlight.has(taskId)) {
|
|
1106
|
+
await sleep(pollMs);
|
|
1107
|
+
continue;
|
|
1090
1108
|
}
|
|
1091
|
-
} catch (err) {
|
|
1092
|
-
console.error(`${c.red}[daemon] queue poll failed:${c.reset} ${err?.message || err}`);
|
|
1093
|
-
}
|
|
1094
1109
|
|
|
1095
|
-
|
|
1096
|
-
|
|
1110
|
+
const execution = runCloudDaemonTask(task);
|
|
1111
|
+
inFlight.set(taskId, execution);
|
|
1112
|
+
try {
|
|
1113
|
+
await execution;
|
|
1114
|
+
} catch {
|
|
1115
|
+
// Errors already logged inside runCloudDaemonTask
|
|
1116
|
+
} finally {
|
|
1117
|
+
inFlight.delete(taskId);
|
|
1118
|
+
}
|
|
1097
1119
|
}
|
|
1098
1120
|
}
|
|
1099
1121
|
|
|
1122
|
+
const workerPromises = [];
|
|
1123
|
+
for (let index = 1; index <= maxWorkers; index += 1) {
|
|
1124
|
+
workerPromises.push(runWorker(index));
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
await Promise.all(workerPromises);
|
|
1128
|
+
clearInterval(orphanSweep);
|
|
1129
|
+
|
|
1100
1130
|
if (inFlight.size > 0) {
|
|
1101
1131
|
await Promise.allSettled(Array.from(inFlight.values()));
|
|
1102
1132
|
}
|
|
@@ -1373,6 +1403,21 @@ async function checkOnboarding() {
|
|
|
1373
1403
|
|
|
1374
1404
|
// agx status
|
|
1375
1405
|
if (cmd === 'status') {
|
|
1406
|
+
const taskArg = args[1];
|
|
1407
|
+
if (taskArg && !taskArg.startsWith('-')) {
|
|
1408
|
+
try {
|
|
1409
|
+
await showCloudTaskStatus({
|
|
1410
|
+
taskIdentifier: taskArg,
|
|
1411
|
+
resolveTaskId,
|
|
1412
|
+
cloudRequest,
|
|
1413
|
+
});
|
|
1414
|
+
} catch (err) {
|
|
1415
|
+
console.log(`${c.red}✗${c.reset} ${err.message}`);
|
|
1416
|
+
process.exit(1);
|
|
1417
|
+
}
|
|
1418
|
+
process.exit(0);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1376
1421
|
const config = loadCloudConfig();
|
|
1377
1422
|
if (!config) {
|
|
1378
1423
|
console.log(`${c.yellow}Not connected to cloud${c.reset}`);
|
|
@@ -1611,6 +1656,7 @@ async function checkOnboarding() {
|
|
|
1611
1656
|
let taskId = null;
|
|
1612
1657
|
let forceSwarm = false;
|
|
1613
1658
|
let asyncMode = false;
|
|
1659
|
+
let fromStageArg = null;
|
|
1614
1660
|
for (let i = 1; i < runArgs.length; i++) {
|
|
1615
1661
|
if (runArgs[i] === '--task' || runArgs[i] === '-t') {
|
|
1616
1662
|
taskId = runArgs[++i];
|
|
@@ -1618,15 +1664,24 @@ async function checkOnboarding() {
|
|
|
1618
1664
|
forceSwarm = true;
|
|
1619
1665
|
} else if (runArgs[i] === '--async' || runArgs[i] === '-a') {
|
|
1620
1666
|
asyncMode = true;
|
|
1667
|
+
} else if (runArgs[i] === '--from') {
|
|
1668
|
+
const candidate = runArgs[++i];
|
|
1669
|
+
if (!candidate || candidate.startsWith('-')) {
|
|
1670
|
+
console.log(`${c.red}✗${c.reset} --from requires a stage name (ideation/planning/execution/verification)`);
|
|
1671
|
+
process.exit(1);
|
|
1672
|
+
}
|
|
1673
|
+
fromStageArg = candidate;
|
|
1621
1674
|
}
|
|
1622
1675
|
}
|
|
1676
|
+
const normalizedFromStage = fromStageArg ? fromStageArg.trim().toLowerCase() : null;
|
|
1623
1677
|
if (!taskId) {
|
|
1624
1678
|
taskId = runArgs.slice(1).find(a => !a.startsWith('-'));
|
|
1625
1679
|
}
|
|
1626
1680
|
if (!taskId) {
|
|
1627
1681
|
logExecutionFlow('retry command', 'output', 'missing task id');
|
|
1628
|
-
console.log(`${c.yellow}Usage:${c.reset} agx retry <taskId> [--task <id>] [--swarm] [--async]`);
|
|
1629
|
-
console.log(`${c.dim} or:${c.reset} agx task retry <taskId> [--task <id>] [--swarm] [--async]`);
|
|
1682
|
+
console.log(`${c.yellow}Usage:${c.reset} agx retry <taskId> [--from <stage>] [--task <id>] [--swarm] [--async]`);
|
|
1683
|
+
console.log(`${c.dim} or:${c.reset} agx task retry <taskId> [--from <stage>] [--task <id>] [--swarm] [--async]`);
|
|
1684
|
+
console.log(`${c.dim}--from: Restart from ideation/planning/execution/verification${c.reset}`);
|
|
1630
1685
|
console.log(`${c.dim}--async: Reset status and let daemon handle (non-blocking)${c.reset}`);
|
|
1631
1686
|
process.exit(1);
|
|
1632
1687
|
}
|
|
@@ -1636,6 +1691,9 @@ async function checkOnboarding() {
|
|
|
1636
1691
|
logExecutionFlow('retry command', 'processing', `asyncMode=${asyncMode}, taskId=${taskId}`);
|
|
1637
1692
|
if (asyncMode) {
|
|
1638
1693
|
const resolvedId = await resolveTaskId(taskId);
|
|
1694
|
+
if (normalizedFromStage) {
|
|
1695
|
+
await restartTaskFromStage(resolvedId, normalizedFromStage);
|
|
1696
|
+
}
|
|
1639
1697
|
await cloudRequest('PATCH', `/api/tasks/${resolvedId}`, {
|
|
1640
1698
|
status: 'queued',
|
|
1641
1699
|
started_at: null,
|
|
@@ -1646,7 +1704,11 @@ async function checkOnboarding() {
|
|
|
1646
1704
|
process.exit(0);
|
|
1647
1705
|
}
|
|
1648
1706
|
|
|
1649
|
-
const exitCode = await runTaskInline(taskId, {
|
|
1707
|
+
const exitCode = await runTaskInline(taskId, {
|
|
1708
|
+
resetFirst: true,
|
|
1709
|
+
forceSwarm,
|
|
1710
|
+
fromStage: normalizedFromStage,
|
|
1711
|
+
});
|
|
1650
1712
|
process.exit(exitCode);
|
|
1651
1713
|
} catch (err) {
|
|
1652
1714
|
logExecutionFlow('retry command', 'output', `failed ${err.message}`);
|
|
@@ -2146,19 +2208,73 @@ async function checkOnboarding() {
|
|
|
2146
2208
|
// Fetch logs
|
|
2147
2209
|
try {
|
|
2148
2210
|
const { logs } = await cloudRequest('GET', `/api/tasks/${taskId}/logs`);
|
|
2211
|
+
let currentStage = null;
|
|
2212
|
+
let currentStageKey = '';
|
|
2149
2213
|
|
|
2150
|
-
|
|
2214
|
+
const stageKeyFrom = (value) => {
|
|
2215
|
+
if (!value) return '';
|
|
2216
|
+
return String(value).trim().toLowerCase();
|
|
2217
|
+
};
|
|
2218
|
+
|
|
2219
|
+
const formatStageName = (value) => {
|
|
2220
|
+
const normalized = String(value || '').trim();
|
|
2221
|
+
if (!normalized) return null;
|
|
2222
|
+
const segments = normalized.split(/[\s_-]+/).filter(Boolean);
|
|
2223
|
+
if (!segments.length) return null;
|
|
2224
|
+
return segments
|
|
2225
|
+
.map((segment) => `${segment.charAt(0).toUpperCase()}${segment.slice(1).toLowerCase()}`)
|
|
2226
|
+
.join(' ');
|
|
2227
|
+
};
|
|
2228
|
+
|
|
2229
|
+
const renderLogEntry = (log) => {
|
|
2230
|
+
const time = log?.created_at ? new Date(log.created_at).toLocaleTimeString() : new Date().toLocaleTimeString();
|
|
2231
|
+
const prettyStage = formatStageName(currentStage);
|
|
2232
|
+
const stageSegment = prettyStage ? ` ${c.cyan}[${prettyStage}]${c.reset}` : '';
|
|
2233
|
+
const content = log?.content || '';
|
|
2234
|
+
console.log(`${c.dim}[${time}]${c.reset}${stageSegment} ${content}`);
|
|
2235
|
+
};
|
|
2236
|
+
|
|
2237
|
+
if (follow) {
|
|
2238
|
+
try {
|
|
2239
|
+
const { task: fetchedTask } = await cloudRequest('GET', `/api/tasks/${encodeURIComponent(taskId)}`);
|
|
2240
|
+
if (fetchedTask?.stage) {
|
|
2241
|
+
currentStage = fetchedTask.stage;
|
|
2242
|
+
currentStageKey = stageKeyFrom(fetchedTask.stage);
|
|
2243
|
+
}
|
|
2244
|
+
} catch {
|
|
2245
|
+
// Ignore stage fetch failures
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
|
|
2249
|
+
const logEntries = Array.isArray(logs) ? logs : [];
|
|
2250
|
+
if (logEntries.length === 0) {
|
|
2151
2251
|
console.log(`${c.dim}No logs yet${c.reset}`);
|
|
2152
2252
|
} else {
|
|
2153
|
-
console.log(`${c.bold}Task Logs${c.reset} (${
|
|
2154
|
-
for (const log of
|
|
2155
|
-
|
|
2156
|
-
console.log(`${c.dim}[${time}]${c.reset} ${log.content}`);
|
|
2253
|
+
console.log(`${c.bold}Task Logs${c.reset} (${logEntries.length})\n`);
|
|
2254
|
+
for (const log of logEntries) {
|
|
2255
|
+
renderLogEntry(log);
|
|
2157
2256
|
}
|
|
2158
2257
|
}
|
|
2159
2258
|
|
|
2160
|
-
|
|
2259
|
+
const announceStageChange = (stageValue) => {
|
|
2260
|
+
const normalized = stageKeyFrom(stageValue);
|
|
2261
|
+
if (!normalized || normalized === currentStageKey) return;
|
|
2262
|
+
currentStage = stageValue;
|
|
2263
|
+
currentStageKey = normalized;
|
|
2264
|
+
const pretty = formatStageName(currentStage);
|
|
2265
|
+
if (pretty) {
|
|
2266
|
+
console.log(`${c.dim}Stage:${c.reset} ${c.cyan}${pretty}${c.reset}`);
|
|
2267
|
+
}
|
|
2268
|
+
};
|
|
2269
|
+
|
|
2161
2270
|
if (follow) {
|
|
2271
|
+
if (currentStageKey) {
|
|
2272
|
+
const prettyStage = formatStageName(currentStage);
|
|
2273
|
+
if (prettyStage) {
|
|
2274
|
+
console.log(`${c.dim}Stage:${c.reset} ${c.cyan}${prettyStage}${c.reset}`);
|
|
2275
|
+
}
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2162
2278
|
console.log(`\n${c.cyan}→${c.reset} Tailing logs... (Ctrl+C to stop)\n`);
|
|
2163
2279
|
|
|
2164
2280
|
const eventsourcePkg = require('eventsource');
|
|
@@ -2167,14 +2283,16 @@ async function checkOnboarding() {
|
|
|
2167
2283
|
if (config?.token) {
|
|
2168
2284
|
esOptions.headers = { Authorization: `Bearer ${config.token}` };
|
|
2169
2285
|
}
|
|
2170
|
-
const
|
|
2286
|
+
const streamUrl = `${config.apiUrl}/api/logs/stream?taskId=${encodeURIComponent(taskId)}`;
|
|
2287
|
+
const es = new EventSource(streamUrl, esOptions);
|
|
2171
2288
|
|
|
2172
2289
|
es.onmessage = (event) => {
|
|
2173
2290
|
try {
|
|
2174
2291
|
const data = JSON.parse(event.data);
|
|
2175
2292
|
if (data.type === 'log' && data.log?.task_id === taskId) {
|
|
2176
|
-
|
|
2177
|
-
|
|
2293
|
+
renderLogEntry(data.log);
|
|
2294
|
+
} else if (data.type === 'task_update' && data.task?.id === taskId) {
|
|
2295
|
+
announceStageChange(data.task.stage);
|
|
2178
2296
|
}
|
|
2179
2297
|
} catch { }
|
|
2180
2298
|
};
|
|
@@ -2646,7 +2764,7 @@ PROVIDERS:
|
|
|
2646
2764
|
CLOUD:
|
|
2647
2765
|
agx new "<task>" Create task in cloud
|
|
2648
2766
|
agx run <id|slug|#> Claim and run a task
|
|
2649
|
-
agx retry <id|slug|#> Reset + retry a task (--async for non-blocking)
|
|
2767
|
+
agx retry <id|slug|#> Reset + retry a task (--async for non-blocking, --from <stage> to restart at a stage)
|
|
2650
2768
|
agx status Show cloud status
|
|
2651
2769
|
agx complete <taskId> Mark task stage complete
|
|
2652
2770
|
agx project assign <project> --task <task> Assign task to project
|
package/lib/cli/skillText.js
CHANGED
|
@@ -22,6 +22,7 @@ agx -p "explain this code" # One-shot question
|
|
|
22
22
|
agx new "goal" # Create task
|
|
23
23
|
agx run [task] # Run a task
|
|
24
24
|
agx complete <taskId> # Mark task stage complete
|
|
25
|
+
agx status <taskId> # Show detailed info for a specific task
|
|
25
26
|
agx status # Show current status
|
|
26
27
|
\`\`\`
|
|
27
28
|
|
|
@@ -57,4 +58,3 @@ claude (c), gemini (g), ollama (o), codex (x)
|
|
|
57
58
|
`;
|
|
58
59
|
|
|
59
60
|
module.exports = { AGX_SKILL };
|
|
60
|
-
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { c: defaultColors } = require('../ui/colors');
|
|
4
|
+
|
|
5
|
+
function sanitizeTaskIdentifier(raw) {
|
|
6
|
+
if (!raw) return '';
|
|
7
|
+
return String(raw).trim().replace(/^#+/, '').trim();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function formatTimestamp(iso) {
|
|
11
|
+
if (!iso) return 'unknown';
|
|
12
|
+
const ms = Date.parse(iso);
|
|
13
|
+
if (Number.isNaN(ms)) return iso;
|
|
14
|
+
return new Date(ms).toLocaleString();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async function fetchRecentTaskLogs({
|
|
18
|
+
cloudRequest,
|
|
19
|
+
taskId,
|
|
20
|
+
tail = 10,
|
|
21
|
+
logger = console,
|
|
22
|
+
colors = defaultColors,
|
|
23
|
+
}) {
|
|
24
|
+
try {
|
|
25
|
+
const payload = await cloudRequest('GET', `/api/tasks/${encodeURIComponent(taskId)}/logs?tail=${tail}`);
|
|
26
|
+
if (Array.isArray(payload?.logs)) return payload.logs;
|
|
27
|
+
} catch (err) {
|
|
28
|
+
logger.log(`${colors.yellow}Warning:${colors.reset} Could not fetch logs: ${err?.message || err}`);
|
|
29
|
+
}
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function buildTaskStatusLines(task, logs, options = {}) {
|
|
34
|
+
const colors = options.colors || defaultColors;
|
|
35
|
+
const formatFn = options.formatTimestamp || formatTimestamp;
|
|
36
|
+
const lines = [];
|
|
37
|
+
|
|
38
|
+
const title = (task.title || '').trim() || task.slug || task.id;
|
|
39
|
+
lines.push(`${colors.bold}${title}${colors.reset} ${colors.dim}[${task.status || 'unknown'} | ${task.stage || 'unknown'}]${colors.reset}`);
|
|
40
|
+
lines.push(`${colors.cyan}Task ID:${colors.reset} ${task.id}`);
|
|
41
|
+
lines.push('');
|
|
42
|
+
|
|
43
|
+
const desc = (task.description || '').trim();
|
|
44
|
+
if (desc) {
|
|
45
|
+
lines.push(`${colors.cyan}Description:${colors.reset}`);
|
|
46
|
+
const descLines = desc
|
|
47
|
+
.split(/\r?\n/)
|
|
48
|
+
.map((line) => line.trim())
|
|
49
|
+
.filter(Boolean)
|
|
50
|
+
.slice(0, 5);
|
|
51
|
+
if (descLines.length === 0) {
|
|
52
|
+
lines.push(` ${colors.dim}(description is empty)${colors.reset}`);
|
|
53
|
+
} else {
|
|
54
|
+
descLines.forEach((line) => lines.push(` ${line}`));
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
lines.push(`${colors.cyan}Description:${colors.reset} ${colors.dim}(none)${colors.reset}`);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
lines.push('');
|
|
61
|
+
lines.push(`${colors.cyan}Stage:${colors.reset} ${task.stage || 'unknown'}`);
|
|
62
|
+
lines.push(`${colors.cyan}Status:${colors.reset} ${task.status || 'unknown'}`);
|
|
63
|
+
lines.push(`${colors.cyan}Updated:${colors.reset} ${formatFn(task.updated_at)}`);
|
|
64
|
+
const provider = task.resolved_provider || task.provider || task.engine || 'unknown';
|
|
65
|
+
const model = task.resolved_model || task.model || 'default';
|
|
66
|
+
lines.push(`${colors.cyan}Provider / Model:${colors.reset} ${provider} / ${model}`);
|
|
67
|
+
const projectCtx = task.project_context?.project;
|
|
68
|
+
if (projectCtx) {
|
|
69
|
+
lines.push(`${colors.cyan}Project:${colors.reset} ${projectCtx.name} [${projectCtx.slug}]`);
|
|
70
|
+
} else if (task.project || task.project_id) {
|
|
71
|
+
lines.push(`${colors.cyan}Project:${colors.reset} ${task.project || task.project_id}`);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
lines.push('');
|
|
75
|
+
lines.push(`${colors.cyan}Stage History:${colors.reset}`);
|
|
76
|
+
const runIndex = Array.isArray(task.run_index) ? task.run_index : [];
|
|
77
|
+
const sortedHistory = runIndex
|
|
78
|
+
.slice()
|
|
79
|
+
.filter(Boolean)
|
|
80
|
+
.sort((a, b) => {
|
|
81
|
+
const aTs = Date.parse(a?.created_at || '') || 0;
|
|
82
|
+
const bTs = Date.parse(b?.created_at || '') || 0;
|
|
83
|
+
return aTs - bTs;
|
|
84
|
+
});
|
|
85
|
+
const historySlice = sortedHistory.slice(-10);
|
|
86
|
+
if (!historySlice.length) {
|
|
87
|
+
lines.push(` ${colors.dim}(none yet)${colors.reset}`);
|
|
88
|
+
} else {
|
|
89
|
+
historySlice.forEach((entry) => {
|
|
90
|
+
const timestamp = formatFn(entry.created_at);
|
|
91
|
+
const stageLabel = entry.stage || 'unknown';
|
|
92
|
+
const statusLabel = entry.status || 'unknown';
|
|
93
|
+
const runId = entry.run_id ? `Run ${entry.run_id}` : 'Run unknown';
|
|
94
|
+
lines.push(` ${timestamp} ${stageLabel} (${statusLabel}) ${colors.dim}${runId}${colors.reset}`);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
lines.push('');
|
|
99
|
+
lines.push(`${colors.cyan}Recent Logs:${colors.reset}`);
|
|
100
|
+
if (!logs || !logs.length) {
|
|
101
|
+
lines.push(` ${colors.dim}(no logs)${colors.reset}`);
|
|
102
|
+
} else {
|
|
103
|
+
logs.slice(-10).forEach((log) => {
|
|
104
|
+
const timestamp = formatFn(log.created_at);
|
|
105
|
+
const logType = log.log_type || 'log';
|
|
106
|
+
lines.push(` ${timestamp} ${colors.dim}[${logType}]${colors.reset}`);
|
|
107
|
+
const contentLines = String(log.content || '')
|
|
108
|
+
.split(/\r?\n/)
|
|
109
|
+
.map((line) => line.trim())
|
|
110
|
+
.filter(Boolean);
|
|
111
|
+
if (contentLines.length === 0) {
|
|
112
|
+
lines.push(` ${colors.dim}(empty log entry)${colors.reset}`);
|
|
113
|
+
} else {
|
|
114
|
+
const maxLines = 3;
|
|
115
|
+
for (let idx = 0; idx < Math.min(contentLines.length, maxLines); idx += 1) {
|
|
116
|
+
let line = contentLines[idx];
|
|
117
|
+
if (line.length > 200) {
|
|
118
|
+
line = `${line.slice(0, 200)}…`;
|
|
119
|
+
}
|
|
120
|
+
lines.push(` ${line}`);
|
|
121
|
+
}
|
|
122
|
+
if (contentLines.length > maxLines) {
|
|
123
|
+
lines.push(` ${colors.dim}...${colors.reset}`);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return lines;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
async function showCloudTaskStatus({
|
|
133
|
+
taskIdentifier,
|
|
134
|
+
resolveTaskId,
|
|
135
|
+
cloudRequest,
|
|
136
|
+
fetchLogs = fetchRecentTaskLogs,
|
|
137
|
+
logger = console,
|
|
138
|
+
colors = defaultColors,
|
|
139
|
+
formatTimestamp: formatFn = formatTimestamp,
|
|
140
|
+
}) {
|
|
141
|
+
const normalized = sanitizeTaskIdentifier(taskIdentifier);
|
|
142
|
+
if (!normalized) {
|
|
143
|
+
throw new Error('Task identifier is required for `agx status <task>`');
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
let resolvedTaskId;
|
|
147
|
+
try {
|
|
148
|
+
resolvedTaskId = await resolveTaskId(normalized);
|
|
149
|
+
} catch (err) {
|
|
150
|
+
throw new Error(`Failed to resolve task "${normalized}": ${err?.message || err}`);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
let taskResponse;
|
|
154
|
+
try {
|
|
155
|
+
taskResponse = await cloudRequest('GET', `/api/tasks/${encodeURIComponent(resolvedTaskId)}`);
|
|
156
|
+
} catch (err) {
|
|
157
|
+
throw new Error(`Could not fetch task ${normalized}: ${err?.message || err}`);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const task = taskResponse?.task;
|
|
161
|
+
if (!task) {
|
|
162
|
+
throw new Error(`Task not found: ${normalized}`);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const logs = await fetchLogs({
|
|
166
|
+
cloudRequest,
|
|
167
|
+
taskId: resolvedTaskId,
|
|
168
|
+
tail: 10,
|
|
169
|
+
logger,
|
|
170
|
+
colors,
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
const lines = buildTaskStatusLines(task, logs, { colors, formatTimestamp: formatFn });
|
|
174
|
+
lines.forEach((line) => logger.log(line));
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
module.exports = {
|
|
178
|
+
sanitizeTaskIdentifier,
|
|
179
|
+
formatTimestamp,
|
|
180
|
+
fetchRecentTaskLogs,
|
|
181
|
+
buildTaskStatusLines,
|
|
182
|
+
showCloudTaskStatus,
|
|
183
|
+
};
|
package/package.json
CHANGED
|
@@ -193,6 +193,19 @@ CREATE TABLE IF NOT EXISTS agx.task_logs (
|
|
|
193
193
|
CONSTRAINT task_logs_log_type_check CHECK ((log_type = ANY (ARRAY['output'::text, 'error'::text, 'system'::text, 'checkpoint'::text, 'comment'::text])))
|
|
194
194
|
);
|
|
195
195
|
|
|
196
|
+
CREATE TABLE IF NOT EXISTS agx.task_costs (
|
|
197
|
+
id uuid DEFAULT gen_random_uuid() NOT NULL PRIMARY KEY,
|
|
198
|
+
task_id uuid NOT NULL,
|
|
199
|
+
stage text NOT NULL,
|
|
200
|
+
provider text,
|
|
201
|
+
model text,
|
|
202
|
+
input_tokens integer DEFAULT 0 NOT NULL,
|
|
203
|
+
output_tokens integer DEFAULT 0 NOT NULL,
|
|
204
|
+
estimated_cost numeric(12,6) DEFAULT 0 NOT NULL,
|
|
205
|
+
created_at timestamp with time zone DEFAULT now() NOT NULL,
|
|
206
|
+
CONSTRAINT task_costs_task_fk FOREIGN KEY (task_id) REFERENCES agx.tasks(id) ON DELETE CASCADE
|
|
207
|
+
);
|
|
208
|
+
|
|
196
209
|
CREATE TABLE IF NOT EXISTS agx.task_run_history (
|
|
197
210
|
id uuid DEFAULT gen_random_uuid() NOT NULL PRIMARY KEY,
|
|
198
211
|
task_id uuid,
|
|
@@ -221,11 +234,13 @@ CREATE TABLE IF NOT EXISTS agx.tasks (
|
|
|
221
234
|
content text NOT NULL,
|
|
222
235
|
title text,
|
|
223
236
|
status text DEFAULT 'queued'::text,
|
|
237
|
+
blocked_reason text,
|
|
224
238
|
stage text DEFAULT 'ideation'::text,
|
|
225
239
|
project text,
|
|
226
240
|
priority integer DEFAULT 0,
|
|
227
241
|
engine text DEFAULT 'claude'::text,
|
|
228
242
|
signature text,
|
|
243
|
+
depends_on uuid[] DEFAULT '{}'::uuid[],
|
|
229
244
|
created_at timestamp with time zone DEFAULT now(),
|
|
230
245
|
updated_at timestamp with time zone DEFAULT now(),
|
|
231
246
|
claimed_by uuid,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
exports.id=5519,exports.ids=[5519],exports.modules={13902:(a,b,c)=>{Promise.resolve().then(c.bind(c,43185)),Promise.resolve().then(c.bind(c,18353))},16953:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>h,metadata:()=>g});var d=c(75338),e=c(43185),f=c(18353);c(82704);let g={title:"AGX Board - Agent Task Orchestration",description:"Orchestrate and manage AI agent tasks on AGX Board"};function h({children:a}){return(0,d.jsxs)("html",{lang:"en",className:"dark",children:[(0,d.jsx)("head",{children:(0,d.jsx)(f.GoogleAnalytics,{})}),(0,d.jsxs)("body",{className:"antialiased min-h-screen bg-[var(--background)] text-[var(--foreground)] selection:bg-[var(--primary)] selection:text-[var(--primary-foreground)]",children:[(0,d.jsx)("div",{className:"fixed inset-0 -z-10 h-full w-full bg-[radial-gradient(#27272a_1px,transparent_1px)] [background-size:16px_16px] opacity-20"}),(0,d.jsx)(e.AuthProvider,{children:a})]})]})}},18353:(a,b,c)=>{"use strict";c.d(b,{GoogleAnalytics:()=>d});let d=(0,c(97954).registerClientReference)(function(){throw Error("Attempted to call GoogleAnalytics() from the server but GoogleAnalytics is 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.")},"/Users/mendrika/Projects/Agents/agx-cloud/components/GoogleAnalytics.tsx","GoogleAnalytics")},20302:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,81170,23)),Promise.resolve().then(c.t.bind(c,23597,23)),Promise.resolve().then(c.t.bind(c,36893,23)),Promise.resolve().then(c.t.bind(c,89748,23)),Promise.resolve().then(c.t.bind(c,6060,23)),Promise.resolve().then(c.t.bind(c,7184,23)),Promise.resolve().then(c.t.bind(c,69576,23)),Promise.resolve().then(c.t.bind(c,73041,23)),Promise.resolve().then(c.t.bind(c,51384,23))},33409:(a,b,c)=>{"use strict";c.d(b,{O:()=>e});var d=c(39537);function e(){return{auth:{getSession:async()=>({data:{session:{access_token:"local-token",refresh_token:"local-refresh",expires_in:3600,user:{id:d.g.id,email:d.g.email,user_metadata:{name:d.g.name,full_name:d.g.name}}}},error:null}),signInWithOAuth:async()=>({error:Error("Auth disabled in AGX Board local mode")}),signOut:async()=>({error:null}),onAuthStateChange:()=>({data:{subscription:{unsubscribe(){}}}})},channel:()=>({on(){return this},subscribe(){return this}}),removeChannel(){}}}},36937:(a,b,c)=>{"use strict";c.d(b,{LU:()=>f,dF:()=>h,si:()=>e,zH:()=>g});var d=c(38301);function e(a={}){process.env.NEXT_PUBLIC_AGX_BOARD_DISABLE_AUTH;let b=a.project,c=a.status;a.realtime;let[f,g]=(0,d.useState)([]),[h,i]=(0,d.useState)(!0),[j,k]=(0,d.useState)(null),[l,m]=(0,d.useState)(null),[n,o]=(0,d.useState)(null),p=(0,d.useCallback)(async()=>{try{let a=new URLSearchParams;b&&a.set("project",b),c&&a.set("status",c);let d=await fetch(`/api/tasks?${a.toString()}`);if(!d.ok)throw Error("Failed to fetch tasks");let e=await d.json();g(e.tasks||[]),k(null)}catch(a){k(a instanceof Error?a:Error("Unknown error"))}finally{i(!1)}},[b,c]),q=(0,d.useCallback)(async(a,b)=>{let c=await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:a,swarm_models:b})});if(!c.ok)throw Error((await c.json()).error||"Failed to create task");let{task:d}=await c.json();return g(a=>a.some(a=>a.id===d.id)?a:[d,...a]),d},[a.realtime]),r=(0,d.useCallback)(async(a,b)=>{let c=await fetch(`/api/tasks/${a}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(!c.ok){let a=null;throw"function"==typeof c.json&&(a=await c.json().catch(()=>null)),Error(a?.error||a?.details||`Failed to update task (${c.status} ${c.statusText||"Error"})`)}let{task:d}=await c.json();return g(b=>b.map(b=>b.id===a?{...b,...d}:b)),d},[a.realtime]),s=(0,d.useCallback)(async a=>{if(!(await fetch(`/api/tasks/${a}`,{method:"DELETE"})).ok)throw Error("Failed to delete task");g(b=>b.filter(b=>b.id!==a))},[a.realtime]),t=(0,d.useCallback)(async a=>{let b=await fetch("/api/queue/complete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!b.ok)throw Error((await b.json().catch(()=>({}))).error||"Failed to complete task stage");let{task:c}=await b.json();return g(b=>b.map(b=>b.id===a.taskId?{...b,...c}:b)),c},[a.realtime]);return{tasks:f,isLoading:h,error:j,cancellingTaskId:l,isCancelling:!!l,cancelError:n,refetch:p,createTask:q,updateTask:r,deleteTask:s,completeTaskStage:t,cancelWorkflow:(0,d.useCallback)(async a=>{m(a.taskId),o(null);try{let b=await fetch(`/api/orchestrator/tasks/${a.taskId}/cancel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a.reason?{reason:a.reason}:{})});if(!b.ok){let a=await b.json().catch(()=>({})),c=a?.error||"Failed to cancel workflow";throw Error(c)}return b.json()}catch(b){let a=b instanceof Error?b:Error("Failed to cancel workflow");throw o(a),a}finally{m(null)}},[]),fetchTask:(0,d.useCallback)(async a=>{let b=await fetch(`/api/tasks/${a}`),c=await b.json().catch(()=>null);if(!b.ok)throw Error(c?.error||"Failed to fetch task details");return c?.task},[])}}function f(a){process.env.NEXT_PUBLIC_AGX_BOARD_DISABLE_AUTH;let[b,c]=(0,d.useState)([]),[e,f]=(0,d.useState)(!1),g=(0,d.useCallback)(async()=>{if(a){f(!0);try{let b=await fetch(`/api/tasks/${a}/comments`);if(b.ok){let a=await b.json();c(a.comments||[])}}finally{f(!1)}}},[a]);return{comments:b,isLoading:e,refetch:g,addComment:(0,d.useCallback)(async b=>{if(!a)return;let c=await fetch(`/api/tasks/${a}/comments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:b})});if(c.ok){let{comment:a}=await c.json();return a}},[a]),deleteComment:(0,d.useCallback)(async b=>{a&&(await fetch(`/api/tasks/${a}/comments/${b}`,{method:"DELETE"})).ok&&c(a=>a.filter(a=>a.id!==b))},[a])}}function g(a,b={}){let c=b.enabled??!0,e=Number.isFinite(b.tail)&&b.tail>0?b.tail:500,f=Number.isFinite(b.maxChars)&&b.maxChars>0?b.maxChars:2e5,[h,i]=(0,d.useState)(""),[j,k]=(0,d.useState)(!1),[l,m]=(0,d.useState)(!1),n=(0,d.useRef)(null);(0,d.useRef)(0);let o=(0,d.useRef)(null),p=(0,d.useCallback)(a=>{let b=(a.log_type||"output").toLowerCase();return"output"===b?a.content||"":`[${b}] ${a.content||""}`},[]);return(0,d.useCallback)(async(b=!1)=>{if(a&&c){b||k(!0);try{let c=new URLSearchParams;if(b){let a=o.current;a?.created_at&&c.set("after",a.created_at),c.set("limit","500")}else c.set("tail",String(e));let d=await fetch(`/api/tasks/${a}/logs?${c.toString()}`);if(d.ok){let a=((await d.json()).logs||[]).slice().sort((a,b)=>a.created_at===b.created_at?a.id.localeCompare(b.id):a.created_at.localeCompare(b.created_at));if(b){let b=o.current,c=b?a.filter(a=>a.created_at>b.created_at||!(a.created_at<b.created_at)&&a.id>b.id):a;if(c.length){let a=c.map(a=>p(a)).join("");a&&i(b=>{let c=b+a;return c.length>f?c.slice(-f):c}),m(!0),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{m(!1)},5e3)}}else{let b=a.map(a=>p(a)).join("");i(b.length>f?b.slice(-f):b)}if(a.length){let b=a[a.length-1];o.current={created_at:b.created_at,id:b.id}}}}finally{b||k(!1)}}},[c,p,f,e,a]),{output:h,isLoading:j,isStreaming:l}}function h(a,b){let[c,e]=(0,d.useState)([]),[f,g]=(0,d.useState)(!1),h=(0,d.useCallback)(async()=>{g(!0);try{let c=new URLSearchParams;a&&c.set("scope",a),b&&c.set("scopeId",b);let d=await fetch(`/api/learnings?${c.toString()}`);if(d.ok){let a=await d.json();e(a.learnings||[])}}finally{g(!1)}},[a,b]);return{learnings:c,isLoading:f,refetch:h,addLearning:(0,d.useCallback)(async(a,b,c)=>{let d=await fetch("/api/learnings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({scope:b,scopeId:c,content:a})});if(d.ok){let{learning:a}=await d.json();return e(b=>[a,...b]),a}},[]),deleteLearning:(0,d.useCallback)(async a=>{(await fetch(`/api/learnings?id=${a}`,{method:"DELETE"})).ok&&e(b=>b.filter(b=>b.id!==a))},[])}}c(33409)},39537:(a,b,c)=>{"use strict";c.d(b,{g:()=>d}),"1"===process.env.AGX_BOARD_DISABLE_AUTH||"1"===process.env.NEXT_PUBLIC_AGX_BOARD_DISABLE_AUTH||"1"!==process.env.AGX_BOARD_ENABLE_AUTH&&process.env.NEXT_PUBLIC_AGX_BOARD_ENABLE_AUTH;let d={id:"2c3cc1ca-956d-4b62-b295-4d2d3374103f",email:process.env.AGX_BOARD_USER_EMAIL||"local@agx.board",name:process.env.AGX_BOARD_USER_NAME||"Local Board User"}},43185:(a,b,c)=>{"use strict";c.d(b,{AuthProvider:()=>e});var d=c(97954);let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call AuthProvider() from the server but AuthProvider is 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.")},"/Users/mendrika/Projects/Agents/agx-cloud/components/AuthProvider.tsx","AuthProvider");(0,d.registerClientReference)(function(){throw Error("Attempted to call useAuth() from the server but useAuth is 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.")},"/Users/mendrika/Projects/Agents/agx-cloud/components/AuthProvider.tsx","useAuth")},60054:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,54160,23)),Promise.resolve().then(c.t.bind(c,31603,23)),Promise.resolve().then(c.t.bind(c,68495,23)),Promise.resolve().then(c.t.bind(c,75170,23)),Promise.resolve().then(c.t.bind(c,77526,23)),Promise.resolve().then(c.t.bind(c,78922,23)),Promise.resolve().then(c.t.bind(c,29234,23)),Promise.resolve().then(c.t.bind(c,12263,23)),Promise.resolve().then(c.bind(c,82146))},64769:(a,b,c)=>{"use strict";c.d(b,{GoogleAnalytics:()=>h});var d=c(21124),e=c(19127);let f="G-DVQQG95LNL",g=`https://www.googletagmanager.com/gtag/js?id=${f}`;function h(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(e.default,{async:!0,src:g,strategy:"afterInteractive"}),(0,d.jsx)(e.default,{id:"google-analytics",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:`
|
|
2
|
-
window.dataLayer = window.dataLayer || [];
|
|
3
|
-
function gtag(){dataLayer.push(arguments);}
|
|
4
|
-
gtag('js', new Date());
|
|
5
|
-
gtag('config', '${f}');
|
|
6
|
-
`}})]})}},75747:(a,b,c)=>{"use strict";c.d(b,{A:()=>i,AuthProvider:()=>h});var d=c(21124),e=c(38301),f=c(33409);let g=(0,e.createContext)({user:null,loading:!0,signOut:async()=>{}});function h({children:a}){let b="1"===process.env.NEXT_PUBLIC_AGX_BOARD_DISABLE_AUTH,[c,h]=(0,e.useState)(null),[i,j]=(0,e.useState)(!0),k=async()=>{if(b)return;let a=(0,f.O)();await a.auth.signOut(),h(null)};return(0,d.jsx)(g.Provider,{value:{user:c,loading:i,signOut:k},children:a})}function i(){return(0,e.useContext)(g)}},76950:(a,b,c)=>{Promise.resolve().then(c.bind(c,75747)),Promise.resolve().then(c.bind(c,64769))},82704:()=>{},82997:(a,b,c)=>{"use strict";c.d(b,{Y:()=>e});var d=c(38301);function e(){let[a,b]=(0,d.useState)([]),[c,e]=(0,d.useState)(!1),[f,g]=(0,d.useState)(null),h=(0,d.useCallback)(async()=>{e(!0);try{let a=await fetch("/api/projects");if(!a.ok)throw Error("Failed to fetch projects");let c=await a.json();b(c.projects??[]),g(null)}catch(a){g(a instanceof Error?a:Error("Unknown error"))}finally{e(!1)}},[]),i=(0,d.useCallback)(async a=>{let c=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!c.ok)throw Error((await c.json().catch(()=>({}))).error||"Failed to create project");let d=(await c.json()).project;return b(a=>[d,...a]),d},[]);return{projects:a,isLoading:c,error:f,refetch:h,createProject:i,updateProject:(0,d.useCallback)(async(a,c)=>{let d=await fetch(`/api/projects/${a}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!d.ok)throw Error((await d.json().catch(()=>({}))).error||"Failed to update project");let e=(await d.json()).project;return b(b=>b.map(b=>b.id===a?e:b)),e},[]),deleteProject:(0,d.useCallback)(async a=>{let c=await fetch(`/api/projects/${a}`,{method:"DELETE"});if(!c.ok)throw Error((await c.json().catch(()=>({}))).error||"Failed to delete project");b(b=>b.filter(b=>b.id!==a))},[])}}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9337],{2835:(e,r,t)=>{t.d(r,{A:()=>o});var a=t(5155),s=t(2115);function o(e){let{tasks:r,onTaskClick:t,onStop:o,onRetry:l,cancellingTaskId:n}=e,i=(0,s.useMemo)(()=>r.filter(e=>"in_progress"===e.status),[r]),[d,c]=(0,s.useState)({});return((0,s.useEffect)(()=>{let e=()=>{let e={};i.forEach(r=>{let t=new Date(r.updated_at).getTime(),a=Math.floor((Date.now()-t)/6e4);a<1?e[r.id]="< 1m":a<60?e[r.id]="".concat(a,"m"):e[r.id]="".concat(Math.floor(a/60),"h")}),c(e)};e();let r=setInterval(e,6e4);return()=>clearInterval(r)},[i]),0===i.length)?null:(0,a.jsx)("div",{className:"w-full bg-[var(--card-bg)] border-b border-[var(--border)] mb-6 animate-fade-in-down",children:(0,a.jsx)("div",{className:"max-w-full overflow-x-auto no-scrollbar",children:(0,a.jsxs)("div",{className:"flex items-center gap-4 p-4 min-w-max",children:[(0,a.jsxs)("div",{className:"flex flex-col justify-center pr-4 border-r border-[var(--border)]",children:[(0,a.jsxs)("h3",{className:"text-sm font-bold text-[var(--foreground)] whitespace-nowrap flex items-center gap-2",children:[(0,a.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,a.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),(0,a.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-green-500"})]}),"Now Running"]}),(0,a.jsxs)("span",{className:"text-[10px] text-[var(--muted-foreground)] uppercase tracking-wider font-semibold",children:[i.length," Active"]})]}),(0,a.jsx)("div",{className:"flex items-center gap-3",children:i.map(e=>{let r=e.id===n;return(0,a.jsxs)("div",{onClick:()=>null==t?void 0:t(e),className:"group flex items-center gap-3 pl-3 pr-2 py-2 bg-[var(--background)] border border-[var(--border)] rounded-lg hover:border-[var(--primary)] transition-all cursor-pointer shadow-sm hover:shadow-md min-w-[280px]",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-[var(--muted)] flex items-center justify-center text-xs font-bold border border-[var(--border)] shrink-0",children:e.provider?e.provider.substring(0,2).toUpperCase():"AG"}),(0,a.jsxs)("div",{className:"flex flex-col flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between text-xs mb-0.5",children:[(0,a.jsxs)("span",{className:"font-semibold text-[var(--foreground)] truncate max-w-[120px]",children:[e.provider||"Agent"," ",e.model?"• ".concat(e.model):""]}),(0,a.jsx)("span",{className:"font-mono text-[var(--muted-foreground)]",children:d[e.id]||"0m"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)] truncate max-w-[140px]",children:e.title||e.content.substring(0,30)}),(0,a.jsx)("div",{className:"w-12 h-1 bg-[var(--muted)] rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-[var(--primary)] animate-pulse rounded-full",style:{width:"".concat(40*Math.random()+30,"%")}})})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity pl-2 border-l border-[var(--border)]",children:[(0,a.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),r||null==o||o(e.id)},disabled:r,className:"p-1 rounded transition-all ".concat(r?"cursor-wait text-[var(--destructive)]/80 opacity-80":"hover:bg-[var(--destructive)]/10 text-[var(--muted-foreground)] hover:text-[var(--destructive)]"),title:r?"Stopping...":"Stop Task",children:r?(0,a.jsx)("span",{className:"inline-flex h-3 w-3 rounded-full border border-[var(--destructive)] border-t-transparent animate-spin"}):(0,a.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}),(0,a.jsx)("button",{type:"button",onClick:r=>{r.stopPropagation(),null==l||l(e.id)},className:"p-1 hover:bg-[var(--primary)]/10 text-[var(--muted-foreground)] hover:text-[var(--primary)] rounded",title:"Retry / Restart",children:(0,a.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),(0,a.jsx)("path",{d:"M3 3v5h5"}),(0,a.jsx)("path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16"}),(0,a.jsx)("path",{d:"M16 21h5v-5"})]})})]})]},e.id)})})]})})})}},6779:(e,r,t)=>{t.d(r,{A:()=>m});var a=t(5155),s=t(2115),o=t(7787),l=t(9027),n=t(7587);let i={queued:{borderColor:"var(--status-queued)",bgColor:"var(--status-queued-bg)",textColor:"var(--status-queued)"},in_progress:{borderColor:"var(--status-in-progress)",bgColor:"var(--status-in-progress-bg)",textColor:"var(--status-in-progress)"},blocked:{borderColor:"var(--status-blocked)",bgColor:"var(--status-blocked-bg)",textColor:"var(--status-blocked)"},completed:{borderColor:"var(--status-completed)",bgColor:"var(--status-completed-bg)",textColor:"var(--status-completed)"},failed:{borderColor:"var(--status-failed)",bgColor:"var(--status-failed-bg)",textColor:"var(--status-failed)"},done:{borderColor:"var(--status-completed)",bgColor:"var(--status-completed-bg)",textColor:"var(--status-completed)"}};function d(e){let{task:r,onClick:t}=e,{attributes:s,listeners:o,setNodeRef:d,transform:c,transition:u,isDragging:x}=(0,l.gl)({id:r.id}),m={transform:n.Ks.Transform.toString(c),transition:u},p=i[r.status||"queued"];return(0,a.jsxs)("div",{ref:d,...s,...o,onClick:t,className:"\n group relative flex items-center gap-2 p-1.5 rounded-md\n hover:bg-[var(--item-hover-bg)] transition-all duration-150 cursor-default\n focus-visible:outline-2 focus-visible:outline-[var(--ring)] focus-visible:outline-offset-2\n ".concat(x?"opacity-50 bg-[var(--item-hover-bg)]":"","\n "),style:{transform:m.transform,transition:m.transition,touchAction:"none"},children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full flex-shrink-0 cursor-grab active:cursor-grabbing hover:scale-125 transition-transform",style:{backgroundColor:p.textColor}}),(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex items-center justify-between gap-3",children:[(0,a.jsx)("h4",{className:"text-sm text-[var(--foreground)] truncate leading-tight\n ".concat("completed"===r.status?"text-[var(--muted-foreground)] line-through":"","\n "),children:r.title||"Untitled Task"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[void 0!==r.priority&&(0,a.jsxs)("span",{className:"text-[10px] font-mono ".concat(0===r.priority?"text-red-500 font-bold":"text-[var(--muted-foreground)]"),children:["P",r.priority]}),(0,a.jsx)("button",{className:"p-0.5 text-[var(--muted-foreground)] hover:text-[var(--foreground)] rounded",children:(0,a.jsx)("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M8.49999 4.10001V8.49999H12.9V9.49999H8.49999V13.9H7.49999V9.49999H3.1V8.49999H7.49999V4.10001H8.49999Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})})]})]})]})}let c={queued:{borderColor:"var(--status-queued)",bgColor:"var(--status-queued-bg)",textColor:"var(--status-queued)"},in_progress:{borderColor:"var(--status-in-progress)",bgColor:"var(--status-in-progress-bg)",textColor:"var(--status-in-progress)"},blocked:{borderColor:"var(--status-blocked)",bgColor:"var(--status-blocked-bg)",textColor:"var(--status-blocked)"},completed:{borderColor:"var(--status-completed)",bgColor:"var(--status-completed-bg)",textColor:"var(--status-completed)"},failed:{borderColor:"var(--status-failed)",bgColor:"var(--status-failed-bg)",textColor:"var(--status-failed)"},done:{borderColor:"var(--status-completed)",bgColor:"var(--status-completed-bg)",textColor:"var(--status-completed)"}};function u(e){let{task:r}=e,t=c[r.status||"queued"];return(0,a.jsxs)("div",{className:"w-72 p-3 bg-[var(--background)] rounded-lg border-l-[3px] shadow-2xl cursor-grabbing ring-2 ring-[var(--primary)] ring-offset-2 ring-offset-[var(--background)] rotate-2 scale-105",style:{borderLeftColor:t.borderColor},children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:void 0!==r.priority&&(0,a.jsxs)("span",{className:"text-[10px] font-mono font-semibold text-[var(--muted-foreground)] bg-[var(--muted)] px-1.5 py-0.5 rounded",children:["P",r.priority]})}),r.project&&(0,a.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 bg-[var(--accent-muted)] text-[var(--accent)] rounded-full font-medium truncate max-w-[100px]",children:r.project})]}),(0,a.jsx)("h4",{className:"text-sm font-medium line-clamp-2 text-[var(--primary)] leading-snug",children:r.title||"Untitled"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-2 text-[10px] text-[var(--muted-foreground)]",children:[r.engine&&(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{children:"\uD83E\uDD16"}),(0,a.jsx)("span",{className:"capitalize",children:r.engine})]}),r.status&&(0,a.jsx)("span",{className:"px-1.5 py-0.5 rounded font-medium",style:{background:t.bgColor,color:t.textColor},children:r.status.replace("_"," ")})]})]})}var x=t(2325);function m(e){let{tasks:r,onTasksChange:t,onSelectTask:n,onTaskUpdate:i,onAddTask:d,stages:c,stageConfig:m,isValidTransition:v,isCreatingTask:f,creatingStage:g}=e,b=c||x.Tw,h=m||x.ls,j=v||((e,r)=>{if(e===r)return!0;let t=b.indexOf(e),a=b.indexOf(r);return a<t||a===t+1}),[y,w]=(0,s.useState)(null),[N,C]=(0,s.useState)(r);(0,s.useEffect)(()=>{y||C(r)},[r]);let k=(0,s.useMemo)(()=>{let e={};for(let r of b)e[r]=N.filter(e=>e.stage===r).sort((e,r)=>(e.priority||0)-(r.priority||0));return e},[N,b]),M=(0,o.FR)((0,o.MS)(o.AN,{activationConstraint:{distance:8}}));async function q(e){let{active:a,over:s}=e;if(w(null),!s)return void C(r);let o=a.id,n=s.id,d=N.find(e=>e.id===o);if(!d)return;let c=d.stage,u=d.priority||0;if(b.includes(n)){let e=k[c=n];u=e.length>0?Math.max(...e.map(e=>e.priority||0))+1:0}else{let e=N.find(e=>e.id===n);if(e){c=e.stage;let r=N.filter(e=>e.stage===c),a=r.findIndex(e=>e.id===o),s=r.findIndex(e=>e.id===n);if(-1!==a&&-1!==s&&a!==s){let e=(0,l.be)(r,a,s),o=N.map(r=>{let t=e.findIndex(e=>e.id===r.id);return -1!==t?{...r,priority:t}:r});C(o),null==t||t(o)}u=e.priority||0}}let x=r.find(e=>e.id===o);if(x&&!j(x.stage||"",c))return void C(r);if(i&&(d.stage!==c||d.priority!==u))try{await i(o,{stage:c,priority:u,status:"done"===c?"completed":"ideation"===c?"queued":"in_progress"}),null==t||t(N)}catch(e){console.error("Failed to update task:",e),C(r)}}return(0,a.jsxs)(o.Mp,{sensors:M,collisionDetection:o.y$,onDragStart:function(e){let r=N.find(r=>r.id===e.active.id);r&&w(r)},onDragOver:function(e){let r,{active:t,over:a}=e;if(!a)return;let s=t.id,o=a.id,l=N.find(e=>e.id===s);if(l){if(b.includes(o))r=o;else{let e=N.find(e=>e.id===o);if(!e)return;r=e.stage}if(l.stage!==r){if(!j(l.stage||"",r))return;C(e=>e.map(e=>e.id===s?{...e,stage:r}:e))}}},onDragEnd:q,children:[(0,a.jsx)("div",{className:"flex gap-4 overflow-x-auto pb-4 px-4 scrollbar-thin h-full items-stretch",children:b.map((e,r)=>(0,a.jsx)(p,{stage:e,tasks:k[e]||[],onSelectTask:n,index:r,onAddTask:d,config:h[e]||{icon:"\uD83D\uDCCC",label:e,color:"var(--primary)"},isCreating:!!(f&&g===e)},e))}),(0,a.jsx)(o.Hd,{dropAnimation:{duration:200,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:y?(0,a.jsx)(u,{task:y}):null})]})}function p(e){let{stage:r,tasks:t,onSelectTask:s,index:n,onAddTask:i,config:c,isCreating:u=!1}=e,{setNodeRef:x,isOver:m}=(0,o.zM)({id:r}),p=!i||u;return(0,a.jsxs)("div",{ref:x,id:r,className:"\n kanban-column flex-shrink-0 w-80 \n flex flex-col h-full max-h-full\n bg-[var(--column-bg)] rounded-xl border border-[var(--border)]\n transition-colors duration-200\n ".concat(m?"ring-2 ring-[var(--primary)] ring-opacity-50 bg-[var(--primary-muted)]":"","\n "),style:{animationDelay:"".concat(50*n,"ms")},children:[(0,a.jsxs)("div",{className:"p-3 flex items-center justify-between border-b border-[var(--border)] bg-[var(--column-header-bg)] rounded-t-xl sticky top-0 z-10",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-semibold text-sm text-[var(--foreground)]",children:c.label}),(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full bg-white border border-[var(--border)] text-xs font-medium text-[var(--muted-foreground)] tabular-nums shadow-sm",children:t.length})]}),(0,a.jsx)("button",{onClick:()=>null==i?void 0:i(r),disabled:p,className:"\n w-8 h-8 rounded-lg flex items-center justify-center text-lg leading-none transition-all\n ".concat(p?"opacity-40 cursor-not-allowed text-[var(--muted-foreground)]":"hover:bg-[var(--primary)] hover:text-white hover:shadow-md text-[var(--muted-foreground)] active:scale-95","\n "),title:"Add task to ".concat(c.label),children:u?(0,a.jsx)("span",{className:"spinner w-3 h-3 border-2 border-[var(--muted-foreground)] border-t-[var(--primary)] rounded-full"}):"+"})]}),(0,a.jsx)(l.gB,{items:t.map(e=>e.id),strategy:l._G,children:(0,a.jsx)("div",{className:"flex-1 p-2 overflow-y-auto scrollbar-thin space-y-2.5",children:0===t.length?(0,a.jsxs)("div",{className:"h-full min-h-[120px] flex flex-col items-center justify-center border-2 border-dashed border-[var(--border)] rounded-lg m-1 opacity-60 hover:opacity-100 transition-opacity bg-[var(--background)]",children:[(0,a.jsx)("span",{className:"text-2xl mb-2 opacity-50 grayscale",children:c.icon}),(0,a.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] font-medium",children:"No tasks"})]}):t.map((e,r)=>(0,a.jsx)("div",{className:"animate-fade-in-up",style:{animationDelay:"".concat(30*r,"ms")},children:(0,a.jsx)(d,{task:e,onClick:()=>null==s?void 0:s(e)})},e.id))})})]})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9719],{91:(e,t,a)=>{a.d(t,{Y:()=>n});var r=a(2115);function n(){let[e,t]=(0,r.useState)([]),[a,n]=(0,r.useState)(!1),[o,l]=(0,r.useState)(null),s=(0,r.useCallback)(async()=>{n(!0);try{var e;let a=await fetch("/api/projects");if(!a.ok)throw Error("Failed to fetch projects");let r=await a.json();t(null!=(e=r.projects)?e:[]),l(null)}catch(e){l(e instanceof Error?e:Error("Unknown error"))}finally{n(!1)}},[]);(0,r.useEffect)(()=>{s()},[s]);let c=(0,r.useCallback)(async e=>{let a=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!a.ok)throw Error((await a.json().catch(()=>({}))).error||"Failed to create project");let r=(await a.json()).project;return t(e=>[r,...e]),r},[]);return{projects:e,isLoading:a,error:o,refetch:s,createProject:c,updateProject:(0,r.useCallback)(async(e,a)=>{let r=await fetch("/api/projects/".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!r.ok)throw Error((await r.json().catch(()=>({}))).error||"Failed to update project");let n=(await r.json()).project;return t(t=>t.map(t=>t.id===e?n:t)),n},[]),deleteProject:(0,r.useCallback)(async e=>{let a=await fetch("/api/projects/".concat(e),{method:"DELETE"});if(!a.ok)throw Error((await a.json().catch(()=>({}))).error||"Failed to delete project");t(t=>t.filter(t=>t.id!==e))},[])}}},577:(e,t,a)=>{a.d(t,{LU:()=>s,dF:()=>i,si:()=>l,zH:()=>c});var r=a(2115),n=a(1483),o=a(5704);function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="1"===o.env.NEXT_PUBLIC_AGX_BOARD_DISABLE_AUTH,a=e.project,l=e.status,s=e.realtime,[c,i]=(0,r.useState)([]),[u,d]=(0,r.useState)(!0),[f,h]=(0,r.useState)(null),[p,m]=(0,r.useState)(null),[k,E]=(0,r.useState)(null),w=(0,r.useCallback)(async()=>{try{let e=new URLSearchParams;a&&e.set("project",a),l&&e.set("status",l);let t=await fetch("/api/tasks?".concat(e.toString()));if(!t.ok)throw Error("Failed to fetch tasks");let r=await t.json();i(r.tasks||[]),h(null)}catch(e){h(e instanceof Error?e:Error("Unknown error"))}finally{d(!1)}},[a,l]);(0,r.useEffect)(()=>{w()},[w]),(0,r.useEffect)(()=>{if(t||!s)return;let e=(0,n.O)(),a=e.channel("tasks-changes").on("postgres_changes",{event:"*",schema:"public",table:"tasks"},e=>{"INSERT"===e.eventType?i(t=>{let a=e.new;return t.some(e=>e.id===a.id)?t:[a,...t]}):"UPDATE"===e.eventType?i(t=>t.map(t=>t.id===e.new.id?e.new:t)):"DELETE"===e.eventType&&i(t=>t.filter(t=>t.id!==e.old.id))}).subscribe();return()=>{e.removeChannel(a)}},[s,t]),(0,r.useEffect)(()=>{if(t||!s||"undefined"==typeof EventSource)return;let e=null;try{e=new EventSource("/api/tasks/stream")}catch(e){console.error("Failed to open tasks stream:",e);return}let a=e=>{try{let t=JSON.parse(e.data);if(!(null==t?void 0:t.type)||"UPDATE"!==t.type||!t.task)return;let a=t.task;i(e=>e.some(e=>e.id===a.id)?e.map(e=>e.id===a.id?a:e):[a,...e])}catch(e){}},r=()=>{w()};return e.addEventListener("message",a),e.addEventListener("error",r),()=>{null==e||e.removeEventListener("message",a),null==e||e.removeEventListener("error",r),null==e||e.close()}},[s,t,w]);let y=(0,r.useCallback)(async(e,t)=>{let a=await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e,swarm_models:t})});if(!a.ok)throw Error((await a.json()).error||"Failed to create task");let{task:r}=await a.json();return i(e=>e.some(e=>e.id===r.id)?e:[r,...e]),r},[e.realtime]),_=(0,r.useCallback)(async(e,t)=>{let a=await fetch("/api/tasks/".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=null;throw"function"==typeof a.json&&(e=await a.json().catch(()=>null)),Error((null==e?void 0:e.error)||(null==e?void 0:e.details)||"Failed to update task (".concat(a.status," ").concat(a.statusText||"Error",")"))}let{task:r}=await a.json();return i(t=>t.map(t=>t.id===e?{...t,...r}:t)),r},[e.realtime]),g=(0,r.useCallback)(async e=>{if(!(await fetch("/api/tasks/".concat(e),{method:"DELETE"})).ok)throw Error("Failed to delete task");i(t=>t.filter(t=>t.id!==e))},[e.realtime]),S=(0,r.useCallback)(async e=>{let t=await fetch("/api/queue/complete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error((await t.json().catch(()=>({}))).error||"Failed to complete task stage");let{task:a}=await t.json();return i(t=>t.map(t=>t.id===e.taskId?{...t,...a}:t)),a},[e.realtime]);return{tasks:c,isLoading:u,error:f,cancellingTaskId:p,isCancelling:!!p,cancelError:k,refetch:w,createTask:y,updateTask:_,deleteTask:g,completeTaskStage:S,cancelWorkflow:(0,r.useCallback)(async e=>{m(e.taskId),E(null);try{let t=await fetch("/api/orchestrator/tasks/".concat(e.taskId,"/cancel"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e.reason?{reason:e.reason}:{})});if(!t.ok){let e=await t.json().catch(()=>({})),a=(null==e?void 0:e.error)||"Failed to cancel workflow";throw Error(a)}return t.json()}catch(t){let e=t instanceof Error?t:Error("Failed to cancel workflow");throw E(e),e}finally{m(null)}},[]),fetchTask:(0,r.useCallback)(async e=>{let t=await fetch("/api/tasks/".concat(e)),a=await t.json().catch(()=>null);if(!t.ok)throw Error((null==a?void 0:a.error)||"Failed to fetch task details");return null==a?void 0:a.task},[])}}function s(e){let t="1"===o.env.NEXT_PUBLIC_AGX_BOARD_DISABLE_AUTH,[a,l]=(0,r.useState)([]),[s,c]=(0,r.useState)(!1),i=(0,r.useCallback)(async()=>{if(e){c(!0);try{let t=await fetch("/api/tasks/".concat(e,"/comments"));if(t.ok){let e=await t.json();l(e.comments||[])}}finally{c(!1)}}},[e]);return(0,r.useEffect)(()=>{i()},[i]),(0,r.useEffect)(()=>{if(t||!e)return;let a=(0,n.O)(),r=a.channel("task-comments-".concat(e)).on("postgres_changes",{event:"*",schema:"public",table:"task_comments",filter:"task_id=eq.".concat(e)},e=>{if("INSERT"===e.eventType){let t=e.new;(null==t?void 0:t.deleted_at)||l(e=>[...e,t])}else if("UPDATE"===e.eventType){let t=e.new;(null==t?void 0:t.deleted_at)?l(e=>e.filter(e=>e.id!==t.id)):l(e=>e.map(e=>e.id===t.id?t:e))}else"DELETE"===e.eventType&&l(t=>t.filter(t=>t.id!==e.old.id))}).subscribe();return()=>{a.removeChannel(r)}},[e,t]),{comments:a,isLoading:s,refetch:i,addComment:(0,r.useCallback)(async t=>{if(!e)return;let a=await fetch("/api/tasks/".concat(e,"/comments"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})});if(a.ok){let{comment:e}=await a.json();return e}},[e]),deleteComment:(0,r.useCallback)(async t=>{e&&(await fetch("/api/tasks/".concat(e,"/comments/").concat(t),{method:"DELETE"})).ok&&l(e=>e.filter(e=>e.id!==t))},[e])}}function c(e){var t;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null==(t=a.enabled)||t,o=Number.isFinite(a.tail)&&a.tail>0?a.tail:500,l=Number.isFinite(a.maxChars)&&a.maxChars>0?a.maxChars:2e5,[s,c]=(0,r.useState)(""),[i,u]=(0,r.useState)(!1),[d,f]=(0,r.useState)(!1),h=(0,r.useRef)(null),p=(0,r.useRef)(0),m=(0,r.useRef)(null),k=(0,r.useCallback)(e=>{let t=(e.log_type||"output").toLowerCase();return"output"===t?e.content||"":"[".concat(t,"] ").concat(e.content||"")},[]),E=(0,r.useCallback)(async function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e&&n){t||u(!0);try{let a=new URLSearchParams;if(t){let e=m.current;(null==e?void 0:e.created_at)&&a.set("after",e.created_at),a.set("limit","500")}else a.set("tail",String(o));let r=await fetch("/api/tasks/".concat(e,"/logs?").concat(a.toString()));if(r.ok){let e=((await r.json()).logs||[]).slice().sort((e,t)=>e.created_at===t.created_at?e.id.localeCompare(t.id):e.created_at.localeCompare(t.created_at));if(t){let t=m.current,a=t?e.filter(e=>e.created_at>t.created_at||!(e.created_at<t.created_at)&&e.id>t.id):e;if(a.length){let e=a.map(e=>k(e)).join("");e&&c(t=>{let a=t+e;return a.length>l?a.slice(-l):a}),f(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{f(!1)},5e3)}}else{let t=e.map(e=>k(e)).join("");c(t.length>l?t.slice(-l):t)}if(e.length){let t=e[e.length-1];m.current={created_at:t.created_at,id:t.id}}}}finally{t||u(!1)}}},[n,k,l,o,e]);return(0,r.useEffect)(()=>{c(""),f(!1),u(!1),m.current=null,h.current&&(clearTimeout(h.current),h.current=null),n&&E()},[n,E,e]),(0,r.useEffect)(()=>{if(!e||!n)return;let t=new EventSource("/api/logs/stream?taskId=".concat(e)),a=()=>{let e=Date.now();e-p.current<5e3||(p.current=e,E(!0))};return t.onopen=()=>{a()},t.onmessage=e=>{try{let t=JSON.parse(e.data);if((null==t?void 0:t.type)!=="log"||!t.log)return;let a=t.log,r=k(a);if(!r)return;c(e=>e+r),f(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{f(!1)},5e3)}catch(e){}},t.onerror=()=>{a()},()=>{t.close(),h.current&&(clearTimeout(h.current),h.current=null)}},[n,E,k,e]),{output:s,isLoading:i,isStreaming:d}}function i(e,t){let[a,n]=(0,r.useState)([]),[o,l]=(0,r.useState)(!1),s=(0,r.useCallback)(async()=>{l(!0);try{let a=new URLSearchParams;e&&a.set("scope",e),t&&a.set("scopeId",t);let r=await fetch("/api/learnings?".concat(a.toString()));if(r.ok){let e=await r.json();n(e.learnings||[])}}finally{l(!1)}},[e,t]);return(0,r.useEffect)(()=>{s()},[s]),{learnings:a,isLoading:o,refetch:s,addLearning:(0,r.useCallback)(async(e,t,a)=>{let r=await fetch("/api/learnings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({scope:t,scopeId:a,content:e})});if(r.ok){let{learning:e}=await r.json();return n(t=>[e,...t]),e}},[]),deleteLearning:(0,r.useCallback)(async e=>{(await fetch("/api/learnings?id=".concat(e),{method:"DELETE"})).ok&&n(t=>t.filter(t=>t.id!==e))},[])}}},1483:(e,t,a)=>{a.d(t,{O:()=>n});var r=a(7559);function n(){return{auth:{getSession:async()=>({data:{session:{access_token:"local-token",refresh_token:"local-refresh",expires_in:3600,user:{id:r.g.id,email:r.g.email,user_metadata:{name:r.g.name,full_name:r.g.name}}}},error:null}),signInWithOAuth:async()=>({error:Error("Auth disabled in AGX Board local mode")}),signOut:async()=>({error:null}),onAuthStateChange:()=>({data:{subscription:{unsubscribe(){}}}})},channel:()=>({on(){return this},subscribe(){return this}}),removeChannel(){}}}},7559:(e,t,a)=>{a.d(t,{g:()=>n});var r=a(5704);"1"===r.env.AGX_BOARD_DISABLE_AUTH||"1"===r.env.NEXT_PUBLIC_AGX_BOARD_DISABLE_AUTH||"1"!==r.env.AGX_BOARD_ENABLE_AUTH&&r.env.NEXT_PUBLIC_AGX_BOARD_ENABLE_AUTH;let n={id:"2c3cc1ca-956d-4b62-b295-4d2d3374103f",email:r.env.AGX_BOARD_USER_EMAIL||"local@agx.board",name:r.env.AGX_BOARD_USER_NAME||"Local Board User"}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[56,64,368,658,753,821,955,1014,1244,1327,1753,1810,1905,2772,2994,3443,4011,4020,4597,5015,5187,5223,6456,6523,6600,7127,7473,7543,8027,8616,8648,8658,8851,9419,9514],{4441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[56,64,368,658,753,821,955,1014,1244,1327,1753,1810,1905,2772,2994,3443,4011,4020,4597,5015,5187,5223,6456,6523,6600,7127,7473,7543,8027,8616,8648,8658,8851,9419,9514],{4441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|