@mndrk/agx 1.4.61 → 1.4.63
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 +40 -0
- 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 +98 -91
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/app-path-routes-manifest.json +15 -14
- 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_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 +1 -1
- 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_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_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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/costs/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/dependencies/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/dependencies/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_client-reference-manifest.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]/logs/stream/route.js +11 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/logs/stream/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/logs/stream/route_client-reference-manifest.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/restart-stage/route_client-reference-manifest.js +1 -1
- 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_client-reference-manifest.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_client-reference-manifest.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 +4 -4
- 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 +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/dashboard/page.js +2 -2
- 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 +2 -2
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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 +2 -2
- 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_client-reference-manifest.js +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 +1 -1
- 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 +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app-paths-manifest.json +15 -14
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/chunks/6317.js +3 -3
- 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/chunks/8521.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/chunks/{4269.js → 8666.js} +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/functions-config-manifest.json +1 -0
- 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/{3424-b2ffdccf784b0ce5.js → 8960-720130c8c9bf5b1c.js} +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/{auth/daemon-secret/route-04c3c3cacd67004b.js → audit/route-bee7977512f30f17.js} +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/{device/code/route-04c3c3cacd67004b.js → [...nextauth]/route-bee7977512f30f17.js} +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/{audit/route-04c3c3cacd67004b.js → auth/daemon-secret/route-bee7977512f30f17.js} +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/{[...nextauth]/route-04c3c3cacd67004b.js → device/code/route-bee7977512f30f17.js} +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/device/token/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/refresh/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/status/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/domains/[id]/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/domains/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/health/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/learnings/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/logs/stream/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/cancel/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/signal/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/start/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/status/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/projects/[id]/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/projects/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/providers/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/queue/complete/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/queue/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/stage-prompts/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/comments/[commentId]/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/comments/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/costs/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/dependencies/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/heartbeat/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/history/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/logs/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/logs/stream/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/restart-stage/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/stream/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/user-settings/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/workflows/[id]/nodes/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/workflows/[id]/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/workflows/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/auth/callback/route-bee7977512f30f17.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/auth/device/page-06eeddaf1bb867c3.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/dashboard/page-6140206ded1cc4ae.js +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/projects/[slug]/{page-f1c8a838c838b996.js → page-d097a2c0e0fc17cf.js} +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/projects/[slug]/tasks/{page-c76247052ae5aa25.js → page-444e63f0464b1d40.js} +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/worker/index.js +364 -9
- package/lib/cli/cloud/prompts.js +35 -133
- package/lib/cli/runCli.js +282 -33
- package/lib/cli/skillText.js +1 -56
- package/lib/cli/templateDefaults.js +22 -0
- package/lib/commands/templates.js +83 -0
- package/lib/executor.js +8 -40
- package/lib/notifications/webhooks.js +123 -0
- package/lib/prompts/cloudTask.js +35 -75
- package/lib/prompts/templates.js +356 -0
- package/lib/templates.js +123 -0
- package/package.json +3 -2
- package/templates/stack/postgres/init/001_agx_board_schema.sql +17 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/device/token/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/refresh/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/auth/status/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/domains/[id]/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/domains/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/health/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/learnings/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/logs/stream/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/cancel/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/signal/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/start/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/orchestrator/tasks/[taskId]/status/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/projects/[id]/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/projects/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/providers/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/queue/complete/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/queue/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/stage-prompts/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/comments/[commentId]/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/comments/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/costs/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/dependencies/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/heartbeat/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/history/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/logs/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/restart-stage/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/[id]/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/tasks/stream/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/user-settings/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/workflows/[id]/nodes/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/workflows/[id]/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/api/workflows/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/auth/callback/route-04c3c3cacd67004b.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/auth/device/page-1c6069a7a4dd058d.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/dashboard/page-445516e005034dd0.js +0 -1
- /package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/{x2zqTGbGGK8nA-dlhcQDx → o_Dsarly6P4c-yqsBEkNM}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/{x2zqTGbGGK8nA-dlhcQDx → o_Dsarly6P4c-yqsBEkNM}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { loadConfig } = require('../cli/configStore');
|
|
4
|
+
|
|
5
|
+
const SUPPORTED_EVENTS = Object.freeze([
|
|
6
|
+
'task.created',
|
|
7
|
+
'task.stage_complete',
|
|
8
|
+
'task.completed',
|
|
9
|
+
'task.failed',
|
|
10
|
+
'task.blocked',
|
|
11
|
+
]);
|
|
12
|
+
|
|
13
|
+
const WILDCARD_EVENT = '*';
|
|
14
|
+
|
|
15
|
+
function normalizeEventName(value) {
|
|
16
|
+
if (!value && value !== 0) return '';
|
|
17
|
+
const candidate = String(value || '').trim().toLowerCase();
|
|
18
|
+
if (!candidate) return '';
|
|
19
|
+
if (candidate === WILDCARD_EVENT) return WILDCARD_EVENT;
|
|
20
|
+
if (candidate.endsWith('.*')) {
|
|
21
|
+
return candidate;
|
|
22
|
+
}
|
|
23
|
+
return SUPPORTED_EVENTS.includes(candidate) ? candidate : '';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function normalizeEventsInput(value) {
|
|
27
|
+
if (value === undefined || value === null) {
|
|
28
|
+
return [WILDCARD_EVENT];
|
|
29
|
+
}
|
|
30
|
+
const parts = [];
|
|
31
|
+
if (Array.isArray(value)) {
|
|
32
|
+
for (const item of value) {
|
|
33
|
+
const normalized = normalizeEventName(item);
|
|
34
|
+
if (normalized) parts.push(normalized);
|
|
35
|
+
}
|
|
36
|
+
} else if (typeof value === 'string') {
|
|
37
|
+
for (const item of value.split(',')) {
|
|
38
|
+
const normalized = normalizeEventName(item);
|
|
39
|
+
if (normalized) parts.push(normalized);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (parts.length === 0) {
|
|
43
|
+
return [WILDCARD_EVENT];
|
|
44
|
+
}
|
|
45
|
+
return Array.from(new Set(parts));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function normalizeWebhookEntry(entry) {
|
|
49
|
+
if (!entry || typeof entry !== 'object') return null;
|
|
50
|
+
const url = typeof entry.url === 'string' ? entry.url.trim() : '';
|
|
51
|
+
if (!url) return null;
|
|
52
|
+
const events = normalizeEventsInput(entry.events);
|
|
53
|
+
if (!events.length) return null;
|
|
54
|
+
return { url, events };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function parseWebhookEntries(config) {
|
|
58
|
+
const source = config ?? loadConfig();
|
|
59
|
+
if (!source || !Array.isArray(source.webhooks)) return [];
|
|
60
|
+
return source.webhooks
|
|
61
|
+
.map(normalizeWebhookEntry)
|
|
62
|
+
.filter((entry) => entry !== null);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function eventMatches(entry, eventName) {
|
|
66
|
+
if (!entry || !eventName) return false;
|
|
67
|
+
const normalized = String(eventName).trim().toLowerCase();
|
|
68
|
+
if (!normalized) return false;
|
|
69
|
+
if (!Array.isArray(entry.events)) return false;
|
|
70
|
+
if (entry.events.includes(WILDCARD_EVENT)) return true;
|
|
71
|
+
if (entry.events.includes(normalized)) return true;
|
|
72
|
+
return entry.events.some((event) => event.endsWith('.*') && normalized.startsWith(event.slice(0, -1)));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async function sendWebhookEvent(eventName, payload = null, options = {}) {
|
|
76
|
+
const normalizedEvent = normalizeEventName(eventName);
|
|
77
|
+
if (!normalizedEvent) return [];
|
|
78
|
+
|
|
79
|
+
const entries = Array.isArray(options.webhooks)
|
|
80
|
+
? options.webhooks
|
|
81
|
+
: parseWebhookEntries(options.config);
|
|
82
|
+
|
|
83
|
+
if (!entries.length) return [];
|
|
84
|
+
|
|
85
|
+
const matches = entries.filter((entry) => eventMatches(entry, normalizedEvent));
|
|
86
|
+
if (!matches.length) return [];
|
|
87
|
+
|
|
88
|
+
const fetchFn = options.fetch ?? globalThis.fetch;
|
|
89
|
+
if (typeof fetchFn !== 'function') return matches;
|
|
90
|
+
|
|
91
|
+
const timestamp = options.timestamp || new Date().toISOString();
|
|
92
|
+
const body = JSON.stringify({ event: normalizedEvent, timestamp, payload });
|
|
93
|
+
const logger = options.logger || console;
|
|
94
|
+
|
|
95
|
+
const results = await Promise.allSettled(
|
|
96
|
+
matches.map((match) => fetchFn(match.url, {
|
|
97
|
+
method: 'POST',
|
|
98
|
+
headers: {
|
|
99
|
+
'Content-Type': 'application/json',
|
|
100
|
+
'X-AGX-Event': normalizedEvent,
|
|
101
|
+
},
|
|
102
|
+
body,
|
|
103
|
+
}))
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
results.forEach((result, index) => {
|
|
107
|
+
if (result.status === 'rejected') {
|
|
108
|
+
if (logger && typeof logger.error === 'function') {
|
|
109
|
+
logger.error(`Webhook failed (${matches[index].url}): ${String(result.reason)}`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
return matches;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
module.exports = {
|
|
118
|
+
SUPPORTED_EVENTS,
|
|
119
|
+
normalizeWebhookEntry,
|
|
120
|
+
parseWebhookEntries,
|
|
121
|
+
eventMatches,
|
|
122
|
+
sendWebhookEvent,
|
|
123
|
+
};
|
package/lib/prompts/cloudTask.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const { interpolate, CONTINUE_CLOUD_TASK, NEW_AUTONOMOUS_CLOUD_TASK, LEGACY_INSTRUCTION_FOOTER } = require('./templates');
|
|
2
|
+
|
|
1
3
|
function stripMarkdownSection(markdown, heading) {
|
|
2
4
|
if (!markdown) return '';
|
|
3
5
|
const h = String(heading || '').trim();
|
|
@@ -60,34 +62,21 @@ function buildContinueCloudTaskPrompt({
|
|
|
60
62
|
const artifactsDir = typeof runContext?.artifacts_dir === 'string' ? runContext.artifacts_dir.trim() : '';
|
|
61
63
|
|
|
62
64
|
const hasTaskPrompt = typeof task?.prompt === 'string' && task.prompt.trim();
|
|
63
|
-
let augmentedPrompt = hasTaskPrompt ? task.prompt.trim() :
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
Task Thread:
|
|
79
|
-
${(taskComments || []).map(c => `${c.author}: ${c.content}`).join('\n')}
|
|
80
|
-
"""
|
|
81
|
-
|
|
82
|
-
## Extracted State
|
|
83
|
-
|
|
84
|
-
Goal: ${task.title || 'Untitled'}
|
|
85
|
-
Plan: ${plan || '(none)'}
|
|
86
|
-
Todo: ${todo || '(none)'}
|
|
87
|
-
Checkpoints: ${checkpoints || '(none)'}
|
|
88
|
-
Learnings: ${learnings || '(none)'}
|
|
89
|
-
|
|
90
|
-
`;
|
|
65
|
+
let augmentedPrompt = hasTaskPrompt ? task.prompt.trim() : interpolate(CONTINUE_CLOUD_TASK, {
|
|
66
|
+
id: task.id,
|
|
67
|
+
title: task.title || 'Untitled',
|
|
68
|
+
stage: task.stage || 'ideation',
|
|
69
|
+
stagePrompt,
|
|
70
|
+
stageRequirement,
|
|
71
|
+
taskTitle: task?.title,
|
|
72
|
+
taskContent: sanitizeTaskContentForPrompt(task?.content),
|
|
73
|
+
taskComments: (taskComments || []).map(c => `${c.author}: ${c.content}`).join('\n'),
|
|
74
|
+
goal: task.title || 'Untitled',
|
|
75
|
+
plan: plan || '(none)',
|
|
76
|
+
todo: todo || '(none)',
|
|
77
|
+
checkpoints: checkpoints || '(none)',
|
|
78
|
+
learnings: learnings || '(none)',
|
|
79
|
+
});
|
|
91
80
|
|
|
92
81
|
if (!hasTaskPrompt && task?.engine) {
|
|
93
82
|
augmentedPrompt += `Engine: ${task.engine}\n`;
|
|
@@ -169,37 +158,17 @@ function buildNewAutonomousCloudTaskPrompt({
|
|
|
169
158
|
stagePrompt,
|
|
170
159
|
stageRequirement,
|
|
171
160
|
}) {
|
|
172
|
-
return
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
${sanitizeTaskContentForPrompt(task?.content)}
|
|
184
|
-
---
|
|
185
|
-
Task Thread:
|
|
186
|
-
${(taskComments || []).map(c => `${c.author}: ${c.content}`).join('\n')}
|
|
187
|
-
"""
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
## Instructions
|
|
192
|
-
|
|
193
|
-
You are starting a new autonomous task. Work until completion or blocked.
|
|
194
|
-
Respect the Stage Completion Requirement before using [complete] or [done].
|
|
195
|
-
|
|
196
|
-
To update the task:
|
|
197
|
-
- [done] - Mark task complete
|
|
198
|
-
- [complete: message] - Complete current stage
|
|
199
|
-
- [log: message] - Add a log entry
|
|
200
|
-
|
|
201
|
-
Goal: ${finalPrompt}
|
|
202
|
-
`;
|
|
161
|
+
return interpolate(NEW_AUTONOMOUS_CLOUD_TASK, {
|
|
162
|
+
id: task.id,
|
|
163
|
+
title: task.title || finalPrompt,
|
|
164
|
+
stage: task.stage,
|
|
165
|
+
stagePrompt,
|
|
166
|
+
stageRequirement,
|
|
167
|
+
taskTitle: task?.title,
|
|
168
|
+
taskContent: sanitizeTaskContentForPrompt(task?.content),
|
|
169
|
+
taskComments: (taskComments || []).map(c => `${c.author}: ${c.content}`).join('\n'),
|
|
170
|
+
finalPrompt,
|
|
171
|
+
});
|
|
203
172
|
}
|
|
204
173
|
|
|
205
174
|
module.exports = {
|
|
@@ -214,23 +183,14 @@ function buildLegacyInstructionFooter({ runContext, finalPrompt } = {}) {
|
|
|
214
183
|
const planDir = typeof runContext?.planDir === 'string' ? runContext.planDir.trim() : '';
|
|
215
184
|
const artifactsDir = typeof runContext?.artifactsDir === 'string' ? runContext.artifactsDir.trim() : '';
|
|
216
185
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
Respect the Stage Completion Requirement before using [complete] or [done].
|
|
221
|
-
|
|
222
|
-
${(runRoot || planDir || artifactsDir) ? `\nLocal run paths (scratch space):\n- Run root: ${runRoot || '(unset)'}\n- Plan dir: ${planDir || '(unset)'}\n- Artifacts dir: ${artifactsDir || '(unset)'}\n\nPrefer writing scratch planning docs under the run's Plan dir to avoid polluting the repo.\n` : ''}
|
|
223
|
-
|
|
224
|
-
To update the task:
|
|
225
|
-
- [done] - Mark task complete
|
|
226
|
-
- [complete: message] - Complete current stage
|
|
227
|
-
- [log: message] - Add a log entry
|
|
228
|
-
- [checkpoint: message] - Save progress checkpoint
|
|
229
|
-
- [learn: insight] - Record a learning
|
|
230
|
-
- [plan: text] - Update plan
|
|
231
|
-
- [todo: text] - Update todo list
|
|
186
|
+
const runPaths = (runRoot || planDir || artifactsDir)
|
|
187
|
+
? `\nLocal run paths (scratch space):\n- Run root: ${runRoot || '(unset)'}\n- Plan dir: ${planDir || '(unset)'}\n- Artifacts dir: ${artifactsDir || '(unset)'}\n\nPrefer writing scratch planning docs under the run's Plan dir to avoid polluting the repo.\n`
|
|
188
|
+
: '';
|
|
232
189
|
|
|
233
|
-
|
|
190
|
+
return interpolate(LEGACY_INSTRUCTION_FOOTER, {
|
|
191
|
+
runPaths,
|
|
192
|
+
finalPrompt: finalPrompt ? `Your specific task: ${finalPrompt}` : '',
|
|
193
|
+
}).trim();
|
|
234
194
|
}
|
|
235
195
|
|
|
236
196
|
function extractBodyFromContent(content) {
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Centralized prompt templates for agx.
|
|
5
|
+
*
|
|
6
|
+
* All prompt string content lives here. Builder functions that assemble
|
|
7
|
+
* conditional logic stay in their original files and import these templates.
|
|
8
|
+
*
|
|
9
|
+
* Use `interpolate(template, vars)` to fill `{{key}}` placeholders.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
function interpolate(template, vars) {
|
|
13
|
+
return template.replace(/\{\{(\w+)\}\}/g, (_, key) => vars[key] ?? '');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
// Static templates (no variables)
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
|
|
20
|
+
const DEFAULT_STAGE_PROMPT = 'Execute this stage using the latest stage prompt from the cloud task context.';
|
|
21
|
+
|
|
22
|
+
const PROJECT_CONTEXT = [
|
|
23
|
+
'AGX orchestrates autonomous AI agents with tasks defined via `agx new` and managed through `agx run`, `agx tasks`, `agx status`, and `agx context` so agents can wake, work, and sleep across sessions.',
|
|
24
|
+
'Task state lives in the cloud API (goal, criteria, progress, learnings) along with the orchestration worker (pg-boss); `agx info`/`agx context` expose structured project metadata.',
|
|
25
|
+
'Quick-start workflow: `agx new "<goal>"`, optionally `agx -a -p "<goal>"` for autonomous execution, then use `agx run`, `agx tasks`, `agx status`, and `agx context` to manage work.',
|
|
26
|
+
'Task management commands include `agx task ls`, `agx task logs`, `agx task stop`, `agx task rm`, `agx complete`, `agx pull`.',
|
|
27
|
+
'Daemon mode runs via `agx daemon start/stop/status/logs` so agents can poll for work continuously.',
|
|
28
|
+
'Providers: `agx claude` (alias `c`), `agx gemini` (alias `g`), and `agx ollama` (alias `o`).',
|
|
29
|
+
'Key flags: `-a/--autonomous`, `-p/--prompt`, `--prompt-file`, `-y/--yolo`, `--continue <task>`.',
|
|
30
|
+
'Key principles: persistent storage, criteria-driven completion, checkpoint often, ask when stuck, learn and adapt.',
|
|
31
|
+
'Agent workflow: orient on saved state, plan, execute, checkpoint, adapt to blockers, and report learnings.',
|
|
32
|
+
'State operations: define objectives via `agx new`, update learnings with `[learn: ...]`, mark completion via `agx complete`, and sync via `agx info`/`agx context`.',
|
|
33
|
+
'Project metadata: attach `--metadata key=value` and `--repo` info so `/api/projects` keeps structured context.',
|
|
34
|
+
].join('\n');
|
|
35
|
+
|
|
36
|
+
const AGX_SKILL = `---
|
|
37
|
+
name: agx
|
|
38
|
+
description: Task orchestrator for AI agents. Uses cloud API for persistence.
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
# agx - AI Agent Task Orchestrator
|
|
42
|
+
|
|
43
|
+
agx manages tasks and coordinates AI agents. Uses cloud API for persistence.
|
|
44
|
+
|
|
45
|
+
## Quick Start
|
|
46
|
+
|
|
47
|
+
\`\`\`bash
|
|
48
|
+
agx -a -p "Build a REST API" # Autonomous: works until done
|
|
49
|
+
agx -p "explain this code" # One-shot question
|
|
50
|
+
\`\`\`
|
|
51
|
+
|
|
52
|
+
## Task Lifecycle
|
|
53
|
+
|
|
54
|
+
\`\`\`bash
|
|
55
|
+
agx new "goal" # Create task
|
|
56
|
+
agx run [task] # Run a task
|
|
57
|
+
agx complete <taskId> # Mark task stage complete
|
|
58
|
+
agx status <taskId> # Show detailed info for a specific task
|
|
59
|
+
agx status # Show current status
|
|
60
|
+
\`\`\`
|
|
61
|
+
|
|
62
|
+
## Checking Tasks
|
|
63
|
+
|
|
64
|
+
\`\`\`bash
|
|
65
|
+
agx task ls # List tasks
|
|
66
|
+
agx task logs <id> [-f] # View/tail task logs
|
|
67
|
+
agx task tail <id> # Tail task logs
|
|
68
|
+
agx comments tail <id> # Tail task comments
|
|
69
|
+
agx logs tail <id> # Tail task logs
|
|
70
|
+
agx watch # Watch task updates in real-time (SSE)
|
|
71
|
+
\`\`\`
|
|
72
|
+
|
|
73
|
+
## Cloud
|
|
74
|
+
|
|
75
|
+
\`\`\`bash
|
|
76
|
+
AGX_CLOUD_URL=http://localhost:41741 agx status
|
|
77
|
+
AGX_CLOUD_URL=http://localhost:41741 agx task ls
|
|
78
|
+
agx daemon start # Start local daemon
|
|
79
|
+
\`\`\`
|
|
80
|
+
|
|
81
|
+
## Providers
|
|
82
|
+
|
|
83
|
+
claude (c), gemini (g), ollama (o), codex (x)
|
|
84
|
+
|
|
85
|
+
## Key Flags
|
|
86
|
+
|
|
87
|
+
-a Autonomous mode (daemon + work until done)
|
|
88
|
+
-p Prompt/goal
|
|
89
|
+
-y Skip confirmations (implied by -a)
|
|
90
|
+
-P, --provider <c|g|o|x> Provider for new task (claude/gemini/ollama/codex)
|
|
91
|
+
`;
|
|
92
|
+
|
|
93
|
+
// ---------------------------------------------------------------------------
|
|
94
|
+
// Parameterized templates (use with interpolate())
|
|
95
|
+
// ---------------------------------------------------------------------------
|
|
96
|
+
|
|
97
|
+
const CONTINUE_CLOUD_TASK = `## Cloud Task Context
|
|
98
|
+
|
|
99
|
+
You are continuing a cloud task. Here is the current state:
|
|
100
|
+
|
|
101
|
+
Task ID: {{id}}
|
|
102
|
+
Title: {{title}}
|
|
103
|
+
Stage: {{stage}}
|
|
104
|
+
Stage Objective: {{stagePrompt}}
|
|
105
|
+
Stage Completion Requirement: {{stageRequirement}}
|
|
106
|
+
|
|
107
|
+
\tUser Request:
|
|
108
|
+
\t"""
|
|
109
|
+
\t{{taskTitle}}
|
|
110
|
+
\t{{taskContent}}
|
|
111
|
+
\t---
|
|
112
|
+
\tTask Thread:
|
|
113
|
+
\t{{taskComments}}
|
|
114
|
+
\t"""
|
|
115
|
+
|
|
116
|
+
## Extracted State
|
|
117
|
+
|
|
118
|
+
Goal: {{goal}}
|
|
119
|
+
Plan: {{plan}}
|
|
120
|
+
Todo: {{todo}}
|
|
121
|
+
Checkpoints: {{checkpoints}}
|
|
122
|
+
Learnings: {{learnings}}
|
|
123
|
+
|
|
124
|
+
`;
|
|
125
|
+
|
|
126
|
+
const NEW_AUTONOMOUS_CLOUD_TASK = `## Cloud Task Context
|
|
127
|
+
|
|
128
|
+
\tTask ID: {{id}}
|
|
129
|
+
\tTitle: {{title}}
|
|
130
|
+
\tStage: {{stage}}
|
|
131
|
+
\tStage Objective: {{stagePrompt}}
|
|
132
|
+
\tStage Completion Requirement: {{stageRequirement}}
|
|
133
|
+
|
|
134
|
+
\tUser Request:
|
|
135
|
+
\t"""
|
|
136
|
+
\t{{taskTitle}}
|
|
137
|
+
\t{{taskContent}}
|
|
138
|
+
\t---
|
|
139
|
+
\tTask Thread:
|
|
140
|
+
\t{{taskComments}}
|
|
141
|
+
\t"""
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Instructions
|
|
146
|
+
|
|
147
|
+
You are starting a new autonomous task. Work until completion or blocked.
|
|
148
|
+
Respect the Stage Completion Requirement before using [complete] or [done].
|
|
149
|
+
|
|
150
|
+
To update the task:
|
|
151
|
+
- [done] - Mark task complete
|
|
152
|
+
- [complete: message] - Complete current stage
|
|
153
|
+
- [log: message] - Add a log entry
|
|
154
|
+
|
|
155
|
+
Goal: {{finalPrompt}}
|
|
156
|
+
`;
|
|
157
|
+
|
|
158
|
+
const LEGACY_INSTRUCTION_FOOTER = `## Instructions
|
|
159
|
+
|
|
160
|
+
Continue working on this task. Use the cloud API to sync progress.
|
|
161
|
+
Respect the Stage Completion Requirement before using [complete] or [done].
|
|
162
|
+
|
|
163
|
+
{{runPaths}}
|
|
164
|
+
|
|
165
|
+
To update the task:
|
|
166
|
+
- [done] - Mark task complete
|
|
167
|
+
- [complete: message] - Complete current stage
|
|
168
|
+
- [log: message] - Add a log entry
|
|
169
|
+
- [checkpoint: message] - Save progress checkpoint
|
|
170
|
+
- [learn: insight] - Record a learning
|
|
171
|
+
- [plan: text] - Update plan
|
|
172
|
+
- [todo: text] - Update todo list
|
|
173
|
+
|
|
174
|
+
{{finalPrompt}}`;
|
|
175
|
+
|
|
176
|
+
const AGGREGATOR_PROMPT = `You are the decision aggregator for a {{role}} run.
|
|
177
|
+
|
|
178
|
+
Task ID: {{taskId}}
|
|
179
|
+
Title: {{title}}
|
|
180
|
+
Stage: {{stage}}
|
|
181
|
+
|
|
182
|
+
User Request:
|
|
183
|
+
"""
|
|
184
|
+
{{taskTitle}}
|
|
185
|
+
{{taskContent}}
|
|
186
|
+
---
|
|
187
|
+
Task Thread:
|
|
188
|
+
{{taskComments}}
|
|
189
|
+
"""
|
|
190
|
+
|
|
191
|
+
Stage Objective: {{stagePrompt}}
|
|
192
|
+
Stage Completion Requirement: {{stageRequirement}}
|
|
193
|
+
|
|
194
|
+
Local run artifacts folder: {{runRoot}}
|
|
195
|
+
Key run files:
|
|
196
|
+
{{runFiles}}
|
|
197
|
+
|
|
198
|
+
Relevant files referenced during execution (detected from output/logs):
|
|
199
|
+
{{refsBlock}}
|
|
200
|
+
|
|
201
|
+
Decide if the task is done. If not, provide the next instruction for another iteration.
|
|
202
|
+
Only set "done": true when the Stage Completion Requirement is satisfied.
|
|
203
|
+
|
|
204
|
+
You may think through your analysis first, but you MUST end your response with valid JSON.
|
|
205
|
+
|
|
206
|
+
Output contract (strict):
|
|
207
|
+
- You may include thinking/reasoning at the start of your response
|
|
208
|
+
- Your response MUST end with exactly one raw JSON object
|
|
209
|
+
- Do not use markdown/code fences/backticks around the JSON
|
|
210
|
+
- Do not add commentary after the JSON
|
|
211
|
+
- Use double-quoted keys and strings
|
|
212
|
+
- Keep newlines escaped inside strings
|
|
213
|
+
- If "done" is false, "next_prompt" must be a non-empty actionable instruction
|
|
214
|
+
|
|
215
|
+
The final JSON in your response must have this exact shape:
|
|
216
|
+
{
|
|
217
|
+
"done": false,
|
|
218
|
+
"decision": "done|blocked|not_done|failed",
|
|
219
|
+
"explanation": "clear explanation of the decision",
|
|
220
|
+
"final_result": "final result if done, empty string otherwise",
|
|
221
|
+
"next_prompt": "specific actionable instruction for next iteration",
|
|
222
|
+
"summary": "brief summary of current state"
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
If uncertain, still return valid JSON with decision "failed" and explain why in "explanation".
|
|
226
|
+
`;
|
|
227
|
+
|
|
228
|
+
const EXECUTE_ITERATION = `EXECUTE PHASE
|
|
229
|
+
Iteration: {{iteration}}
|
|
230
|
+
|
|
231
|
+
Keep output concise and avoid dumping full file contents or long logs.
|
|
232
|
+
If you need to reference code, cite paths and describe changes instead of pasting whole files.
|
|
233
|
+
|
|
234
|
+
Output contract:
|
|
235
|
+
- Start with "PLAN:" then 2-5 bullets.
|
|
236
|
+
- Do the work.
|
|
237
|
+
- End with "IMPLEMENTATION SUMMARY:" bullets:
|
|
238
|
+
- Changed: (paths only, 10 max)
|
|
239
|
+
- Commands: (what you ran)
|
|
240
|
+
- Notes:
|
|
241
|
+
|
|
242
|
+
Task for this iteration: {{instruction}}
|
|
243
|
+
|
|
244
|
+
Do not output JSON in this phase.
|
|
245
|
+
`;
|
|
246
|
+
|
|
247
|
+
const VERIFY_PROMPT = `You are the verifier for an agx run.
|
|
248
|
+
|
|
249
|
+
Task ID: {{taskId}}
|
|
250
|
+
Title: {{title}}
|
|
251
|
+
Stage: {{stage}}
|
|
252
|
+
Iteration: {{iteration}}
|
|
253
|
+
|
|
254
|
+
Stage Objective: {{stagePrompt}}
|
|
255
|
+
Stage Completion Requirement: {{stageRequirement}}
|
|
256
|
+
|
|
257
|
+
Local run artifacts folder: {{runRoot}}
|
|
258
|
+
|
|
259
|
+
User Request:
|
|
260
|
+
"""
|
|
261
|
+
{{requestTitle}}
|
|
262
|
+
{{requestContent}}
|
|
263
|
+
"""
|
|
264
|
+
|
|
265
|
+
## Verification Strategy
|
|
266
|
+
|
|
267
|
+
Your job is to determine whether the user request is actually satisfied in the codebase. Do NOT rely solely on git status/diff or agent output summaries — these can be misleading, incomplete, or refer to the wrong workspace.
|
|
268
|
+
|
|
269
|
+
Follow this approach:
|
|
270
|
+
|
|
271
|
+
1. **Understand the request.** What concrete outcome does the user want? (e.g., a function wired to an endpoint, a new component, a bug fix)
|
|
272
|
+
|
|
273
|
+
2. **Read the actual source files.** Identify the key files that should contain the implementation and read them directly. Look for the specific functions, imports, routes, or components that the request describes. This is the primary evidence.
|
|
274
|
+
|
|
275
|
+
3. **Check verification command output.** If tests or build commands were run, use their results as supporting evidence — but only after you've confirmed the implementation exists in the source.
|
|
276
|
+
|
|
277
|
+
4. **Use git status/diff as secondary context.** Diff tells you what changed this iteration, but the feature may have been implemented in a prior iteration or already existed. Absence of a diff does NOT mean the work is incomplete.
|
|
278
|
+
|
|
279
|
+
5. **Trace the full path.** For wiring tasks, verify both ends: the data source (API helper, service function) AND the consumer (page, component, hook). For bug fixes, verify the fix AND that the triggering condition is handled.
|
|
280
|
+
|
|
281
|
+
Repo summary (git):
|
|
282
|
+
Status (porcelain):
|
|
283
|
+
{{statusShort}}
|
|
284
|
+
|
|
285
|
+
Diff (stat):
|
|
286
|
+
{{diffShort}}
|
|
287
|
+
|
|
288
|
+
Verification commands:
|
|
289
|
+
{{cmdLines}}
|
|
290
|
+
|
|
291
|
+
Agent output (last iteration):
|
|
292
|
+
{{agentOutputShort}}
|
|
293
|
+
|
|
294
|
+
Decide if the stage is complete based on what you find in the source files.
|
|
295
|
+
Ignore unrelated working tree changes; focus on whether the user request is satisfied.
|
|
296
|
+
If not complete, provide the next smallest instruction for another iteration.
|
|
297
|
+
Set "done": true when the user request is satisfied and the source code evidence supports it.
|
|
298
|
+
|
|
299
|
+
Output contract (strict): your response MUST be exactly one raw JSON object with this shape:
|
|
300
|
+
{
|
|
301
|
+
"done": false,
|
|
302
|
+
"decision": "done|blocked|not_done|failed",
|
|
303
|
+
"explanation": "clear explanation of the decision",
|
|
304
|
+
"final_result": "final result if done, empty string otherwise",
|
|
305
|
+
"next_prompt": "specific actionable instruction for next iteration",
|
|
306
|
+
"summary": "brief summary of current state",
|
|
307
|
+
"plan_md": "PLAN markdown for this iteration (newlines escaped)",
|
|
308
|
+
"implementation_summary_md": "IMPLEMENTATION SUMMARY markdown (newlines escaped)",
|
|
309
|
+
"verification_md": "VERIFICATION markdown (newlines escaped)"
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
Rules:
|
|
313
|
+
- Use double-quoted keys and strings.
|
|
314
|
+
- Keep newlines escaped inside strings (use \\n).
|
|
315
|
+
- Keep the markdown fields short and checklist-style.
|
|
316
|
+
- Always fill "explanation". For "blocked", include what is blocking and what input/action would unblock. For "failed", include what failed (command/tool/error) and a recovery step.
|
|
317
|
+
`;
|
|
318
|
+
|
|
319
|
+
const EXECUTOR_PROMPT = `# Task: {{title}}
|
|
320
|
+
|
|
321
|
+
## Stage: {{stage}}
|
|
322
|
+
|
|
323
|
+
{{stagePrompt}}
|
|
324
|
+
|
|
325
|
+
## Project Context
|
|
326
|
+
|
|
327
|
+
{{projectContext}}
|
|
328
|
+
|
|
329
|
+
## Task Details
|
|
330
|
+
|
|
331
|
+
{{content}}
|
|
332
|
+
|
|
333
|
+
## Instructions
|
|
334
|
+
|
|
335
|
+
1. Complete the work for this stage
|
|
336
|
+
2. Use [checkpoint: message] to save progress
|
|
337
|
+
3. Use [learn: insight] to record learnings
|
|
338
|
+
4. Use [done] when stage is complete
|
|
339
|
+
5. Use [blocked: reason] if you need human help
|
|
340
|
+
|
|
341
|
+
Focus on this stage only. The task will automatically advance to the next stage when complete.
|
|
342
|
+
`;
|
|
343
|
+
|
|
344
|
+
module.exports = {
|
|
345
|
+
interpolate,
|
|
346
|
+
DEFAULT_STAGE_PROMPT,
|
|
347
|
+
PROJECT_CONTEXT,
|
|
348
|
+
AGX_SKILL,
|
|
349
|
+
CONTINUE_CLOUD_TASK,
|
|
350
|
+
NEW_AUTONOMOUS_CLOUD_TASK,
|
|
351
|
+
LEGACY_INSTRUCTION_FOOTER,
|
|
352
|
+
AGGREGATOR_PROMPT,
|
|
353
|
+
EXECUTE_ITERATION,
|
|
354
|
+
VERIFY_PROMPT,
|
|
355
|
+
EXECUTOR_PROMPT,
|
|
356
|
+
};
|