@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
package/lib/cli/runCli.js
CHANGED
|
@@ -72,6 +72,7 @@ const { handleSkillCommand } = require('./skills');
|
|
|
72
72
|
const { runOnboarding, showConfigStatus, runConfigMenu } = require('./onboarding');
|
|
73
73
|
const { runInteractiveMenu } = require('./interactiveMenu');
|
|
74
74
|
const cloudArtifacts = require('./cloudArtifacts');
|
|
75
|
+
const { sendWebhookEvent } = require('../notifications/webhooks');
|
|
75
76
|
const fallbackExtractSection = (markdown, heading) => {
|
|
76
77
|
if (!markdown) return '';
|
|
77
78
|
const pattern = new RegExp(`^##\\s+${heading}\\s*$`, 'im');
|
|
@@ -100,6 +101,9 @@ const {
|
|
|
100
101
|
} = require('./util');
|
|
101
102
|
const { createCloudRunner } = require('./cloud');
|
|
102
103
|
const daemon = require('./daemon');
|
|
104
|
+
const { loadTemplate, renderTemplateContent } = require('../templates');
|
|
105
|
+
const { applyTemplateDefaults } = require('./templateDefaults');
|
|
106
|
+
const { slugify } = require('../storage/paths');
|
|
103
107
|
const {
|
|
104
108
|
DAEMON_PID_FILE,
|
|
105
109
|
DAEMON_LOG_FILE,
|
|
@@ -1045,6 +1049,44 @@ async function checkOnboarding() {
|
|
|
1045
1049
|
localArtifacts && lastRun ? `(Local run id: ${lastRun.run_id}, stage: ${lastRun.stage})` : '',
|
|
1046
1050
|
].filter(Boolean).join('\n'));
|
|
1047
1051
|
|
|
1052
|
+
const stageName = completionResult?.newStage
|
|
1053
|
+
|| completionResult?.task?.stage
|
|
1054
|
+
|| task?.stage
|
|
1055
|
+
|| null;
|
|
1056
|
+
const statusRaw = completionResult?.task?.status ?? task?.status ?? null;
|
|
1057
|
+
const eventPayload = {
|
|
1058
|
+
taskId,
|
|
1059
|
+
taskSlug: task?.slug || null,
|
|
1060
|
+
projectSlug: task?.project_slug || task?.project?.slug || null,
|
|
1061
|
+
stage: stageName,
|
|
1062
|
+
stageLocal,
|
|
1063
|
+
status: statusRaw,
|
|
1064
|
+
decision: decisionPayload.decision,
|
|
1065
|
+
summary: decisionPayload.summary || null,
|
|
1066
|
+
final_result: decisionPayload.final_result || null,
|
|
1067
|
+
run_id: lastRun?.run_id || null,
|
|
1068
|
+
duration_ms: Date.now() - taskStart,
|
|
1069
|
+
};
|
|
1070
|
+
const emitWebhook = async (eventName) => {
|
|
1071
|
+
try {
|
|
1072
|
+
await sendWebhookEvent(eventName, eventPayload);
|
|
1073
|
+
} catch (err) {
|
|
1074
|
+
const message = err?.message || String(err);
|
|
1075
|
+
logger.log('error', `[daemon] webhook ${eventName} failed: ${message}\n`);
|
|
1076
|
+
}
|
|
1077
|
+
};
|
|
1078
|
+
|
|
1079
|
+
await emitWebhook('task.stage_complete');
|
|
1080
|
+
if (decisionPayload.decision === 'failed') {
|
|
1081
|
+
await emitWebhook('task.failed');
|
|
1082
|
+
} else if (decisionPayload.decision === 'blocked') {
|
|
1083
|
+
await emitWebhook('task.blocked');
|
|
1084
|
+
}
|
|
1085
|
+
const normalizedStatus = typeof statusRaw === 'string' ? statusRaw.trim().toLowerCase() : '';
|
|
1086
|
+
if (normalizedStatus === 'completed' || (decisionPayload.decision === 'done' && String(stageName || '').toLowerCase() === 'done')) {
|
|
1087
|
+
await emitWebhook('task.completed');
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1048
1090
|
{
|
|
1049
1091
|
const detailRaw = String(decisionPayload.summary || decisionPayload.explanation || '').trim();
|
|
1050
1092
|
const detail = detailRaw ? detailRaw.replace(/\s+/g, ' ').slice(0, 320) : '';
|
|
@@ -1185,29 +1227,29 @@ async function checkOnboarding() {
|
|
|
1185
1227
|
// ============================================================
|
|
1186
1228
|
|
|
1187
1229
|
// Provider aliases for convenience
|
|
1188
|
-
const PROVIDER_ALIASES = {
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
};
|
|
1194
|
-
|
|
1195
|
-
function collectFlagValues(args, flag) {
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1230
|
+
const PROVIDER_ALIASES = {
|
|
1231
|
+
'c': 'claude', 'cl': 'claude', 'claude': 'claude',
|
|
1232
|
+
'x': 'codex', 'codex': 'codex',
|
|
1233
|
+
'g': 'gemini', 'gem': 'gemini', 'gemini': 'gemini',
|
|
1234
|
+
'o': 'ollama', 'ol': 'ollama', 'ollama': 'ollama'
|
|
1235
|
+
};
|
|
1236
|
+
|
|
1237
|
+
function collectFlagValues(args, flag) {
|
|
1238
|
+
const values = [];
|
|
1239
|
+
const consumedIndices = new Set();
|
|
1240
|
+
for (let i = 0; i < args.length; i += 1) {
|
|
1241
|
+
if (args[i] === flag) {
|
|
1242
|
+
consumedIndices.add(i);
|
|
1243
|
+
const next = args[i + 1];
|
|
1244
|
+
if (typeof next === 'string' && next.length) {
|
|
1245
|
+
values.push(next);
|
|
1246
|
+
consumedIndices.add(i + 1);
|
|
1247
|
+
}
|
|
1248
|
+
i += 1;
|
|
1205
1249
|
}
|
|
1206
|
-
i += 1;
|
|
1207
1250
|
}
|
|
1251
|
+
return { values, consumedIndices };
|
|
1208
1252
|
}
|
|
1209
|
-
return { values, consumedIndices };
|
|
1210
|
-
}
|
|
1211
1253
|
|
|
1212
1254
|
// ============================================================
|
|
1213
1255
|
// LOCAL-FIRST CLI COMMANDS
|
|
@@ -1223,6 +1265,12 @@ function collectFlagValues(args, flag) {
|
|
|
1223
1265
|
if (handled) return true;
|
|
1224
1266
|
}
|
|
1225
1267
|
|
|
1268
|
+
{
|
|
1269
|
+
const { maybeHandleTemplateCommand } = require('../commands/templates');
|
|
1270
|
+
const handled = await maybeHandleTemplateCommand({ cmd, args, ctx: { c } });
|
|
1271
|
+
if (handled) return true;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1226
1274
|
// Local-first command handlers live in lib/commands/local.js.
|
|
1227
1275
|
|
|
1228
1276
|
// ============================================================
|
|
@@ -1250,6 +1298,7 @@ function collectFlagValues(args, flag) {
|
|
|
1250
1298
|
process.exit(1);
|
|
1251
1299
|
}
|
|
1252
1300
|
}
|
|
1301
|
+
const providerArgProvided = provider !== null;
|
|
1253
1302
|
|
|
1254
1303
|
// Parse --model / -m
|
|
1255
1304
|
let model = null;
|
|
@@ -1257,6 +1306,7 @@ function collectFlagValues(args, flag) {
|
|
|
1257
1306
|
if (modelIdx !== -1 && args[modelIdx + 1]) {
|
|
1258
1307
|
model = args[modelIdx + 1];
|
|
1259
1308
|
}
|
|
1309
|
+
const modelArgProvided = model !== null;
|
|
1260
1310
|
let projectSlug = null;
|
|
1261
1311
|
const projectIdx = args.findIndex(a => a === '--project');
|
|
1262
1312
|
if (projectIdx !== -1 && args[projectIdx + 1]) {
|
|
@@ -1288,15 +1338,26 @@ function collectFlagValues(args, flag) {
|
|
|
1288
1338
|
const resolvedType = normalizeTicketType(args[ticketTypeIdx + 1]);
|
|
1289
1339
|
ticketType = resolvedType === 'spike' ? 'spike' : 'task';
|
|
1290
1340
|
}
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
if (
|
|
1294
|
-
|
|
1295
|
-
provider = config?.defaultProvider || 'claude';
|
|
1341
|
+
let templateName = null;
|
|
1342
|
+
const templateIdx = args.findIndex(a => a === '--template');
|
|
1343
|
+
if (templateIdx !== -1 && args[templateIdx + 1]) {
|
|
1344
|
+
templateName = args[templateIdx + 1];
|
|
1296
1345
|
}
|
|
1297
1346
|
|
|
1298
1347
|
// Extract goal text (filter out flags)
|
|
1299
|
-
const flagsToRemove = [
|
|
1348
|
+
const flagsToRemove = [
|
|
1349
|
+
'--json',
|
|
1350
|
+
'--run',
|
|
1351
|
+
'-r',
|
|
1352
|
+
'--provider',
|
|
1353
|
+
'-P',
|
|
1354
|
+
'--model',
|
|
1355
|
+
'-m',
|
|
1356
|
+
'--project',
|
|
1357
|
+
'--type',
|
|
1358
|
+
'--ticket-type',
|
|
1359
|
+
'--template',
|
|
1360
|
+
];
|
|
1300
1361
|
const goalParts = [];
|
|
1301
1362
|
for (let i = 1; i < args.length; i++) {
|
|
1302
1363
|
if (dependsOnSkipIndices.has(i)) {
|
|
@@ -1307,11 +1368,12 @@ function collectFlagValues(args, flag) {
|
|
|
1307
1368
|
if (args[i] === '--model' || args[i] === '-m') i++;
|
|
1308
1369
|
if (args[i] === '--project') i++;
|
|
1309
1370
|
if (args[i] === '--type' || args[i] === '--ticket-type') i++;
|
|
1371
|
+
if (args[i] === '--template') i++;
|
|
1310
1372
|
continue;
|
|
1311
1373
|
}
|
|
1312
1374
|
goalParts.push(args[i]);
|
|
1313
1375
|
}
|
|
1314
|
-
const goalText = goalParts.join(' ');
|
|
1376
|
+
const goalText = goalParts.join(' ').trim();
|
|
1315
1377
|
|
|
1316
1378
|
if (!goalText) {
|
|
1317
1379
|
if (jsonMode) {
|
|
@@ -1322,6 +1384,33 @@ function collectFlagValues(args, flag) {
|
|
|
1322
1384
|
process.exit(1);
|
|
1323
1385
|
}
|
|
1324
1386
|
|
|
1387
|
+
let template = null;
|
|
1388
|
+
if (templateName) {
|
|
1389
|
+
try {
|
|
1390
|
+
template = await loadTemplate(templateName);
|
|
1391
|
+
} catch (err) {
|
|
1392
|
+
const message = err?.message || `Template "${templateName}" not found`;
|
|
1393
|
+
if (jsonMode) {
|
|
1394
|
+
console.log(JSON.stringify({ error: message }));
|
|
1395
|
+
} else {
|
|
1396
|
+
console.log(`${c.red}✗${c.reset} ${message}`);
|
|
1397
|
+
}
|
|
1398
|
+
process.exit(1);
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
const config = loadConfig();
|
|
1403
|
+
const defaults = applyTemplateDefaults({
|
|
1404
|
+
provider,
|
|
1405
|
+
model,
|
|
1406
|
+
template,
|
|
1407
|
+
providerArgProvided,
|
|
1408
|
+
modelArgProvided,
|
|
1409
|
+
defaultProvider: config?.defaultProvider || 'claude',
|
|
1410
|
+
});
|
|
1411
|
+
provider = defaults.provider;
|
|
1412
|
+
model = defaults.model;
|
|
1413
|
+
|
|
1325
1414
|
try {
|
|
1326
1415
|
let projectId = null;
|
|
1327
1416
|
if (projectSlug) {
|
|
@@ -1348,8 +1437,25 @@ function collectFlagValues(args, flag) {
|
|
|
1348
1437
|
if (projectId) frontmatter.push(`project_id: ${projectId}`);
|
|
1349
1438
|
if (model) frontmatter.push(`model: ${model}`);
|
|
1350
1439
|
if (ticketType) frontmatter.push(`type: ${ticketType}`);
|
|
1351
|
-
|
|
1352
|
-
|
|
1440
|
+
if (template) frontmatter.push(`template: ${template.slug}`);
|
|
1441
|
+
|
|
1442
|
+
let bodyContent = `# ${goalText}\n`;
|
|
1443
|
+
if (template) {
|
|
1444
|
+
const rendered = renderTemplateContent(template.content, {
|
|
1445
|
+
title: goalText,
|
|
1446
|
+
goal: goalText,
|
|
1447
|
+
slug: slugify(goalText, { maxLength: 64 }),
|
|
1448
|
+
project: projectSlug || '',
|
|
1449
|
+
template: template.slug,
|
|
1450
|
+
});
|
|
1451
|
+
if (rendered && rendered.trim()) {
|
|
1452
|
+
bodyContent = rendered;
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
if (!bodyContent.endsWith('\n')) {
|
|
1456
|
+
bodyContent += '\n';
|
|
1457
|
+
}
|
|
1458
|
+
const content = `---\n${frontmatter.join('\n')}\n---\n\n${bodyContent}`;
|
|
1353
1459
|
|
|
1354
1460
|
const payload = { content };
|
|
1355
1461
|
if (dependsOnValues.length) {
|
|
@@ -1764,7 +1870,7 @@ function collectFlagValues(args, flag) {
|
|
|
1764
1870
|
}
|
|
1765
1871
|
}
|
|
1766
1872
|
|
|
1767
|
-
// agx task ls [-a]
|
|
1873
|
+
// agx task ls [-a] [search] (Docker-style namespace)
|
|
1768
1874
|
if ((cmd === 'task' && args[1] === 'ls') || cmd === 'list' || cmd === 'ls' || cmd === 'tasks') {
|
|
1769
1875
|
const showAll = args.includes('-a') || args.includes('--all');
|
|
1770
1876
|
const config = loadCloudConfig();
|
|
@@ -1773,10 +1879,42 @@ function collectFlagValues(args, flag) {
|
|
|
1773
1879
|
process.exit(1);
|
|
1774
1880
|
}
|
|
1775
1881
|
|
|
1882
|
+
// Extract search term
|
|
1883
|
+
const flagsToSkip = ['-a', '--all'];
|
|
1884
|
+
const cmdTokens = (cmd === 'task' && args[1] === 'ls') ? ['task', 'ls'] : [cmd];
|
|
1885
|
+
const searchParts = args.filter((arg, i) => {
|
|
1886
|
+
// Skip flags
|
|
1887
|
+
if (arg.startsWith('-')) return false;
|
|
1888
|
+
// Skip command words (simple heuristic: first occurrence of cmd words)
|
|
1889
|
+
// Actually simpler: iterate args, skip known command words at start.
|
|
1890
|
+
return true;
|
|
1891
|
+
});
|
|
1892
|
+
|
|
1893
|
+
// Better extraction:
|
|
1894
|
+
let startIndex = (cmd === 'task' && args[1] === 'ls') ? 2 : 1;
|
|
1895
|
+
let search = '';
|
|
1896
|
+
const searchTerms = [];
|
|
1897
|
+
for (let i = startIndex; i < args.length; i++) {
|
|
1898
|
+
if (!args[i].startsWith('-')) {
|
|
1899
|
+
searchTerms.push(args[i]);
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
if (searchTerms.length > 0) {
|
|
1903
|
+
search = searchTerms.join(' ');
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1776
1906
|
try {
|
|
1777
|
-
|
|
1907
|
+
let url = '/api/tasks';
|
|
1908
|
+
if (search) {
|
|
1909
|
+
url += `?search=${encodeURIComponent(search)}`;
|
|
1910
|
+
}
|
|
1911
|
+
const { tasks } = await cloudRequest('GET', url);
|
|
1778
1912
|
if (tasks.length === 0) {
|
|
1779
|
-
|
|
1913
|
+
if (search) {
|
|
1914
|
+
console.log(`${c.dim}No tasks found matching "${search}"${c.reset}`);
|
|
1915
|
+
} else {
|
|
1916
|
+
console.log(`${c.dim}No tasks in queue${c.reset}`);
|
|
1917
|
+
}
|
|
1780
1918
|
process.exit(0);
|
|
1781
1919
|
}
|
|
1782
1920
|
|
|
@@ -2330,7 +2468,7 @@ function collectFlagValues(args, flag) {
|
|
|
2330
2468
|
if (config?.token) {
|
|
2331
2469
|
esOptions.headers = { Authorization: `Bearer ${config.token}` };
|
|
2332
2470
|
}
|
|
2333
|
-
const streamUrl = `${config.apiUrl}/api/
|
|
2471
|
+
const streamUrl = `${config.apiUrl}/api/tasks/${encodeURIComponent(taskId)}/logs/stream`;
|
|
2334
2472
|
const es = new EventSource(streamUrl, esOptions);
|
|
2335
2473
|
|
|
2336
2474
|
es.onmessage = (event) => {
|
|
@@ -2732,6 +2870,117 @@ function collectFlagValues(args, flag) {
|
|
|
2732
2870
|
process.exit(0);
|
|
2733
2871
|
}
|
|
2734
2872
|
|
|
2873
|
+
// ============================================================
|
|
2874
|
+
// agx feedback - Quick bug reports with context
|
|
2875
|
+
// ============================================================
|
|
2876
|
+
if (cmd === 'feedback') {
|
|
2877
|
+
const readline = require('readline');
|
|
2878
|
+
const { exec, execSync } = require('child_process');
|
|
2879
|
+
|
|
2880
|
+
// Get description from args or prompt
|
|
2881
|
+
let description = args.slice(1).join(' ');
|
|
2882
|
+
if (!description) {
|
|
2883
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
2884
|
+
description = await new Promise(resolve => {
|
|
2885
|
+
rl.question(`${c.cyan}What went wrong?${c.reset} `, answer => {
|
|
2886
|
+
rl.close();
|
|
2887
|
+
resolve(answer.trim());
|
|
2888
|
+
});
|
|
2889
|
+
});
|
|
2890
|
+
}
|
|
2891
|
+
|
|
2892
|
+
if (!description) {
|
|
2893
|
+
console.log(`${c.yellow}No description provided. Aborting.${c.reset}`);
|
|
2894
|
+
process.exit(1);
|
|
2895
|
+
}
|
|
2896
|
+
|
|
2897
|
+
console.log(`\n${c.dim}Collecting context...${c.reset}`);
|
|
2898
|
+
|
|
2899
|
+
// Collect system info
|
|
2900
|
+
const version = (() => { try { return require('../../package.json').version; } catch { return 'unknown'; } })();
|
|
2901
|
+
const nodeVersion = process.version;
|
|
2902
|
+
const platform = `${os.platform()} ${os.arch()}`;
|
|
2903
|
+
|
|
2904
|
+
// Collect recent daemon logs (sanitized)
|
|
2905
|
+
let recentLogs = '';
|
|
2906
|
+
const logDir = path.join(os.homedir(), '.agx', 'logs');
|
|
2907
|
+
try {
|
|
2908
|
+
const logFiles = fs.readdirSync(logDir).filter(f => f.endsWith('.log')).sort().reverse();
|
|
2909
|
+
if (logFiles.length > 0) {
|
|
2910
|
+
const latestLog = fs.readFileSync(path.join(logDir, logFiles[0]), 'utf8');
|
|
2911
|
+
const lines = latestLog.split('\n').slice(-30).join('\n');
|
|
2912
|
+
// Sanitize: remove potential secrets, paths with usernames
|
|
2913
|
+
recentLogs = lines
|
|
2914
|
+
.replace(/\/Users\/[^\/\s]+/g, '/Users/***')
|
|
2915
|
+
.replace(/\/home\/[^\/\s]+/g, '/home/***')
|
|
2916
|
+
.replace(/sk-[a-zA-Z0-9]+/g, 'sk-***')
|
|
2917
|
+
.replace(/key["\s:=]+[a-zA-Z0-9]+/gi, 'key=***');
|
|
2918
|
+
}
|
|
2919
|
+
} catch { }
|
|
2920
|
+
|
|
2921
|
+
// Build issue body
|
|
2922
|
+
const issueTitle = description.length > 60 ? description.substring(0, 60) + '...' : description;
|
|
2923
|
+
const issueBody = `## Description
|
|
2924
|
+
${description}
|
|
2925
|
+
|
|
2926
|
+
## Environment
|
|
2927
|
+
- **agx version:** ${version}
|
|
2928
|
+
- **Node.js:** ${nodeVersion}
|
|
2929
|
+
- **Platform:** ${platform}
|
|
2930
|
+
|
|
2931
|
+
## Recent Logs
|
|
2932
|
+
\`\`\`
|
|
2933
|
+
${recentLogs || 'No logs available'}
|
|
2934
|
+
\`\`\`
|
|
2935
|
+
|
|
2936
|
+
---
|
|
2937
|
+
*Submitted via \`agx feedback\`*`;
|
|
2938
|
+
|
|
2939
|
+
// Try gh CLI first
|
|
2940
|
+
let ghAvailable = false;
|
|
2941
|
+
try {
|
|
2942
|
+
execSync('gh --version', { stdio: 'ignore' });
|
|
2943
|
+
ghAvailable = true;
|
|
2944
|
+
} catch { }
|
|
2945
|
+
|
|
2946
|
+
const repoUrl = 'https://github.com/ramarlina/agx';
|
|
2947
|
+
|
|
2948
|
+
if (ghAvailable) {
|
|
2949
|
+
console.log(`${c.dim}Using GitHub CLI...${c.reset}`);
|
|
2950
|
+
try {
|
|
2951
|
+
const result = execSync(
|
|
2952
|
+
`gh issue create --repo ramarlina/agx --title "${issueTitle.replace(/"/g, '\\"')}" --body "${issueBody.replace(/"/g, '\\"').replace(/\n/g, '\\n')}"`,
|
|
2953
|
+
{ encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] }
|
|
2954
|
+
);
|
|
2955
|
+
console.log(`\n${c.green}✓${c.reset} Issue created: ${result.trim()}`);
|
|
2956
|
+
} catch (err) {
|
|
2957
|
+
console.log(`${c.yellow}GitHub CLI failed, opening browser instead...${c.reset}`);
|
|
2958
|
+
ghAvailable = false;
|
|
2959
|
+
}
|
|
2960
|
+
}
|
|
2961
|
+
|
|
2962
|
+
if (!ghAvailable) {
|
|
2963
|
+
// Fall back to opening browser with pre-filled URL
|
|
2964
|
+
const params = new URLSearchParams({
|
|
2965
|
+
title: issueTitle,
|
|
2966
|
+
body: issueBody,
|
|
2967
|
+
labels: 'bug,user-feedback'
|
|
2968
|
+
});
|
|
2969
|
+
const issueUrl = `${repoUrl}/issues/new?${params.toString()}`;
|
|
2970
|
+
|
|
2971
|
+
const openCmd = os.platform() === 'darwin' ? 'open' : os.platform() === 'win32' ? 'start' : 'xdg-open';
|
|
2972
|
+
try {
|
|
2973
|
+
execSync(`${openCmd} "${issueUrl}"`, { stdio: 'ignore' });
|
|
2974
|
+
console.log(`\n${c.green}✓${c.reset} Opened GitHub issue form in browser`);
|
|
2975
|
+
} catch {
|
|
2976
|
+
console.log(`\n${c.cyan}Open this URL to submit:${c.reset}\n${issueUrl}`);
|
|
2977
|
+
}
|
|
2978
|
+
}
|
|
2979
|
+
|
|
2980
|
+
console.log(`\n${c.dim}Thanks for the feedback! 🙏${c.reset}`);
|
|
2981
|
+
process.exit(0);
|
|
2982
|
+
}
|
|
2983
|
+
|
|
2735
2984
|
// ============================================================
|
|
2736
2985
|
// agx telemetry - Manage anonymous usage telemetry
|
|
2737
2986
|
// ============================================================
|
package/lib/cli/skillText.js
CHANGED
|
@@ -1,60 +1,5 @@
|
|
|
1
1
|
// agx skill - instructions for LLMs on how to use agx
|
|
2
2
|
|
|
3
|
-
const AGX_SKILL =
|
|
4
|
-
name: agx
|
|
5
|
-
description: Task orchestrator for AI agents. Uses cloud API for persistence.
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# agx - AI Agent Task Orchestrator
|
|
9
|
-
|
|
10
|
-
agx manages tasks and coordinates AI agents. Uses cloud API for persistence.
|
|
11
|
-
|
|
12
|
-
## Quick Start
|
|
13
|
-
|
|
14
|
-
\`\`\`bash
|
|
15
|
-
agx -a -p "Build a REST API" # Autonomous: works until done
|
|
16
|
-
agx -p "explain this code" # One-shot question
|
|
17
|
-
\`\`\`
|
|
18
|
-
|
|
19
|
-
## Task Lifecycle
|
|
20
|
-
|
|
21
|
-
\`\`\`bash
|
|
22
|
-
agx new "goal" # Create task
|
|
23
|
-
agx run [task] # Run a task
|
|
24
|
-
agx complete <taskId> # Mark task stage complete
|
|
25
|
-
agx status <taskId> # Show detailed info for a specific task
|
|
26
|
-
agx status # Show current status
|
|
27
|
-
\`\`\`
|
|
28
|
-
|
|
29
|
-
## Checking Tasks
|
|
30
|
-
|
|
31
|
-
\`\`\`bash
|
|
32
|
-
agx task ls # List tasks
|
|
33
|
-
agx task logs <id> [-f] # View/tail task logs
|
|
34
|
-
agx task tail <id> # Tail task logs
|
|
35
|
-
agx comments tail <id> # Tail task comments
|
|
36
|
-
agx logs tail <id> # Tail task logs
|
|
37
|
-
agx watch # Watch task updates in real-time (SSE)
|
|
38
|
-
\`\`\`
|
|
39
|
-
|
|
40
|
-
## Cloud
|
|
41
|
-
|
|
42
|
-
\`\`\`bash
|
|
43
|
-
AGX_CLOUD_URL=http://localhost:41741 agx status
|
|
44
|
-
AGX_CLOUD_URL=http://localhost:41741 agx task ls
|
|
45
|
-
agx daemon start # Start local daemon
|
|
46
|
-
\`\`\`
|
|
47
|
-
|
|
48
|
-
## Providers
|
|
49
|
-
|
|
50
|
-
claude (c), gemini (g), ollama (o), codex (x)
|
|
51
|
-
|
|
52
|
-
## Key Flags
|
|
53
|
-
|
|
54
|
-
-a Autonomous mode (daemon + work until done)
|
|
55
|
-
-p Prompt/goal
|
|
56
|
-
-y Skip confirmations (implied by -a)
|
|
57
|
-
-P, --provider <c|g|o|x> Provider for new task (claude/gemini/ollama/codex)
|
|
58
|
-
`;
|
|
3
|
+
const { AGX_SKILL } = require('../prompts/templates');
|
|
59
4
|
|
|
60
5
|
module.exports = { AGX_SKILL };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function applyTemplateDefaults({
|
|
4
|
+
provider,
|
|
5
|
+
model,
|
|
6
|
+
template,
|
|
7
|
+
providerArgProvided,
|
|
8
|
+
modelArgProvided,
|
|
9
|
+
defaultProvider,
|
|
10
|
+
}) {
|
|
11
|
+
let resolvedProvider = provider;
|
|
12
|
+
if (!providerArgProvided) {
|
|
13
|
+
resolvedProvider = template?.provider || defaultProvider || 'claude';
|
|
14
|
+
}
|
|
15
|
+
let resolvedModel = model;
|
|
16
|
+
if (!modelArgProvided) {
|
|
17
|
+
resolvedModel = template?.model || model;
|
|
18
|
+
}
|
|
19
|
+
return { provider: resolvedProvider, model: resolvedModel };
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
module.exports = { applyTemplateDefaults };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const { listTemplates, createTemplate, getTemplatesDir } = require('../templates');
|
|
6
|
+
|
|
7
|
+
function getFlagValue(args, flag) {
|
|
8
|
+
const idx = args.findIndex(a => a === flag);
|
|
9
|
+
if (idx === -1) return null;
|
|
10
|
+
return args[idx + 1] || null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async function maybeHandleTemplateCommand({ cmd, args, ctx }) {
|
|
14
|
+
if (cmd !== 'templates') {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
const { c } = ctx || {};
|
|
18
|
+
const subcommand = args[1];
|
|
19
|
+
|
|
20
|
+
switch (subcommand) {
|
|
21
|
+
case 'list':
|
|
22
|
+
case 'ls': {
|
|
23
|
+
const templates = await listTemplates();
|
|
24
|
+
if (args.includes('--json')) {
|
|
25
|
+
console.log(JSON.stringify({ templates }));
|
|
26
|
+
process.exit(0);
|
|
27
|
+
}
|
|
28
|
+
console.log(`${c?.bold || ''}Templates (${templates.length})${c?.reset || ''}`);
|
|
29
|
+
console.log(`Directory: ${getTemplatesDir()}`);
|
|
30
|
+
if (!templates.length) {
|
|
31
|
+
console.log(' No templates found. Use `agx templates create <name>` to add one.');
|
|
32
|
+
process.exit(0);
|
|
33
|
+
}
|
|
34
|
+
console.log('');
|
|
35
|
+
for (const template of templates) {
|
|
36
|
+
const info = [];
|
|
37
|
+
if (template.description) info.push(template.description);
|
|
38
|
+
if (template.provider) info.push(`provider=${template.provider}`);
|
|
39
|
+
if (template.model) info.push(`model=${template.model}`);
|
|
40
|
+
const displayName = template.name === template.slug
|
|
41
|
+
? template.slug
|
|
42
|
+
: `${template.name} (${template.slug})`;
|
|
43
|
+
console.log(` ${displayName}${info.length ? ` (${info.join(', ')})` : ''}`);
|
|
44
|
+
}
|
|
45
|
+
process.exit(0);
|
|
46
|
+
}
|
|
47
|
+
case 'create': {
|
|
48
|
+
const name = args[2];
|
|
49
|
+
if (!name) {
|
|
50
|
+
console.log('Usage: agx templates create <name> [--description "desc"] [--provider claude] [--model claude-sonnet-4-5] [--content-file ./template.md]');
|
|
51
|
+
process.exit(1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const description = getFlagValue(args, '--description');
|
|
55
|
+
const provider = getFlagValue(args, '--provider');
|
|
56
|
+
const model = getFlagValue(args, '--model');
|
|
57
|
+
const contentInline = getFlagValue(args, '--content');
|
|
58
|
+
const contentFile = getFlagValue(args, '--content-file');
|
|
59
|
+
let content = contentInline;
|
|
60
|
+
if (!content && contentFile) {
|
|
61
|
+
try {
|
|
62
|
+
content = await fs.promises.readFile(path.resolve(contentFile), 'utf8');
|
|
63
|
+
} catch (err) {
|
|
64
|
+
console.log(`${c?.red || ''}Error:${c?.reset || ''} Could not read content file: ${err.message}`);
|
|
65
|
+
process.exit(1);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const created = await createTemplate({ name, description, provider, model, content });
|
|
70
|
+
console.log(`${c?.green || ''}✓${c?.reset || ''} Template created: ${created.slug}`);
|
|
71
|
+
console.log(` Path: ${created.file}`);
|
|
72
|
+
process.exit(0);
|
|
73
|
+
}
|
|
74
|
+
default:
|
|
75
|
+
console.log(`Template Commands:
|
|
76
|
+
agx templates list List available templates
|
|
77
|
+
agx templates create <name> Scaffold a new template file (options: --description, --provider, --model, --content-file)
|
|
78
|
+
`);
|
|
79
|
+
process.exit(0);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
module.exports = { maybeHandleTemplateCommand };
|
package/lib/executor.js
CHANGED
|
@@ -10,22 +10,7 @@ const fs = require('fs');
|
|
|
10
10
|
const path = require('path');
|
|
11
11
|
const os = require('os');
|
|
12
12
|
const { commandExists } = require('./proc/commandExists');
|
|
13
|
-
|
|
14
|
-
const DEFAULT_STAGE_PROMPT = 'Execute this stage using the latest stage prompt from the cloud task context.';
|
|
15
|
-
|
|
16
|
-
const PROJECT_CONTEXT = [
|
|
17
|
-
'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.',
|
|
18
|
-
'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.',
|
|
19
|
-
'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.',
|
|
20
|
-
'Task management commands include `agx task ls`, `agx task logs`, `agx task stop`, `agx task rm`, `agx complete`, `agx pull`.',
|
|
21
|
-
'Daemon mode runs via `agx daemon start/stop/status/logs` so agents can poll for work continuously.',
|
|
22
|
-
'Providers: `agx claude` (alias `c`), `agx gemini` (alias `g`), and `agx ollama` (alias `o`).',
|
|
23
|
-
'Key flags: `-a/--autonomous`, `-p/--prompt`, `--prompt-file`, `-y/--yolo`, `--continue <task>`.',
|
|
24
|
-
'Key principles: persistent storage, criteria-driven completion, checkpoint often, ask when stuck, learn and adapt.',
|
|
25
|
-
'Agent workflow: orient on saved state, plan, execute, checkpoint, adapt to blockers, and report learnings.',
|
|
26
|
-
'State operations: define objectives via `agx new`, update learnings with `[learn: ...]`, mark completion via `agx complete`, and sync via `agx info`/`agx context`.',
|
|
27
|
-
'Project metadata: attach `--metadata key=value` and `--repo` info so `/api/projects` keeps structured context.',
|
|
28
|
-
].join('\n');
|
|
13
|
+
const { interpolate, DEFAULT_STAGE_PROMPT, PROJECT_CONTEXT, EXECUTOR_PROMPT } = require('./prompts/templates');
|
|
29
14
|
|
|
30
15
|
// Engine configurations
|
|
31
16
|
const ENGINES = {
|
|
@@ -238,30 +223,13 @@ async function executeTask(options) {
|
|
|
238
223
|
* Build the full prompt for a stage
|
|
239
224
|
*/
|
|
240
225
|
function buildPrompt(title, content, stage, stageConfig) {
|
|
241
|
-
return
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
${PROJECT_CONTEXT}
|
|
250
|
-
|
|
251
|
-
## Task Details
|
|
252
|
-
|
|
253
|
-
${content}
|
|
254
|
-
|
|
255
|
-
## Instructions
|
|
256
|
-
|
|
257
|
-
1. Complete the work for this stage
|
|
258
|
-
2. Use [checkpoint: message] to save progress
|
|
259
|
-
3. Use [learn: insight] to record learnings
|
|
260
|
-
4. Use [done] when stage is complete
|
|
261
|
-
5. Use [blocked: reason] if you need human help
|
|
262
|
-
|
|
263
|
-
Focus on this stage only. The task will automatically advance to the next stage when complete.
|
|
264
|
-
`;
|
|
226
|
+
return interpolate(EXECUTOR_PROMPT, {
|
|
227
|
+
title,
|
|
228
|
+
stage,
|
|
229
|
+
stagePrompt: stageConfig.prompt,
|
|
230
|
+
projectContext: PROJECT_CONTEXT,
|
|
231
|
+
content,
|
|
232
|
+
});
|
|
265
233
|
}
|
|
266
234
|
|
|
267
235
|
/**
|