@mndrk/agx 2.4.6 → 2.4.7
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/cloud-runtime/standalone/apps/local/.next/BUILD_ID +1 -1
- package/cloud-runtime/standalone/apps/local/.next/app-path-routes-manifest.json +4 -0
- package/cloud-runtime/standalone/apps/local/.next/build-manifest.json +2 -2
- package/cloud-runtime/standalone/apps/local/.next/prerender-manifest.json +3 -3
- package/cloud-runtime/standalone/apps/local/.next/routes-manifest.json +33 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents/[id]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/agents/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/agents.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/agent-specs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/agents/[id]/profile/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/agents/export/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/file-search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/participants/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/activities/route.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/activities/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/notes/[noteId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/notes/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/program/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/program/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/program/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/program/route.js +13 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/program/route.js.map +5 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/program/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/program/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/scheduled-tasks/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/validate/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/worker/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/teams/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/export/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/export/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/export/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/export/route.js +11 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/export/route.js.map +5 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/export/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/export/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/import/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/import/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/import/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/import/route.js +11 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/import/route.js.map +5 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/import/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/import/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/prompt-jobs/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/providers/check/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/queue/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/schedules/debug/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/schedules/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/assign/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/available/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/detail/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/learn/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/unlearn/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/summarize/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/comments/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/threads/knowledge/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/items/[id]/recap/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/runs/scripted/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/update-check/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/integrations/github/select-repos/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/integrations/github/select-repos.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/integrations/github.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/integrations.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/automations/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/automations/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/env-vars/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/env-vars/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/folders/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/folders/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/graph/[taskId]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/graph/[taskId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/notifications/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/notifications/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/[objectiveId]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/[objectiveId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/prs/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/prs/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/agents/[agentId]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/agents/[agentId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/adopt/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/adopt/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/new/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/new/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/replace/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/replace/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/terminal/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/terminal/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/[threadId]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/[threadId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/page/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/page/build-manifest.json +18 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/page/next-font-manifest.json +11 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/page/react-loadable-manifest.json +1 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/page/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/page.js +16 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/page.js.map +5 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/page.js.nft.json +1 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/page_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/[tracker]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/[tracker]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/connect/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/connect/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/setup.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/status/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/status.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app-paths-manifest.json +4 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/30bdd_server_app_api_projects_[id]_workspace_export_route_actions_e161f108.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/30bdd_server_app_api_projects_[id]_workspace_import_route_actions_10d2bce2.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/7255d_app_api_projects_[id]_objectives_[objectiveId]_program_route_actions_e6cdbc76.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__1563ebff._.js +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__3fdd57cb._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__45af4365._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__683b7ad7._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__736d5859._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__96b5ea56._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__ba72d342._.js +5 -5
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__c3188470._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__eb69343e._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_1d99e7a5._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_4d88e4dc._.js +91 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_4dec65a2._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_50e3a6e3._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_56a2544c._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_5843a1a1._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_a15e73a6._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_bd72806a._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_c101ba9e._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_c530bd77._.js +11 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_d69937f2._.js +91 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_e2867b32._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_e32b0cab._.js +91 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_5ab8f104._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_db_ts_77c23d6c._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/0da96_local__next-internal_server_app_projects_[slug]_thread_page_actions_3ceeb59b.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__1e0fd816._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__42499ecf._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__5f31e40b._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__636799fb._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/{[root-of-the-server]__4bf7d5b9._.js → [root-of-the-server]__74436f61._.js} +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__9434d6d7._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__bd339da0._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__d08d7899._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__e02a457c._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__e3a1fef0._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__f802e7d1._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__ff96bb77._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_6a2ba8f0._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_7cb6b08a._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_a0f42923._.js +7 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_a93c1059._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/{apps_local_components_PromptJobBoard_tsx_281b2873._.js → apps_local_04cb9fd5._.js} +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_15502af8._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_16eaf7ae._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_3c11c068._.js +8 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_89b49aad._.js +7 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_988d29c0._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_ae1a134f._.js +7 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_agents_page_tsx_2a02508d._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_[slug]_folders_page_tsx_72fb68e5._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_[slug]_layout_tsx_3bb31889._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_[slug]_page_tsx_76330306._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_b8e580cc._.js +4 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_components_TrackerBoard_tsx_98970bab._.js +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/{apps_local_app_projects_[slug]_thread_[threadId]_page_tsx_2a1d1d5e._.js → apps_local_components_chat-ui_ChatContainer_tsx_47371955._.js} +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_components_projects_ProjectObjectivesWorkspace_tsx_751ab3d3._.js +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_eb223411._.js +18 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/{apps_local_7d1abfbf._.js → apps_local_f1c9872a._.js} +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/functions-config-manifest.json +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/middleware-manifest.json +5 -5
- package/cloud-runtime/standalone/apps/local/.next/server/next-font-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/next-font-manifest.json +4 -0
- package/cloud-runtime/standalone/apps/local/.next/server/pages/404.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/pages/500.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/server-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/server-reference-manifest.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/08e75b35d6c52269.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0d22a723b9b96e65.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{cb19d71dd7ffb935.js → 1585dd5f9ec4866a.js} +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/1bc8cc9cbb99c1ed.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/2586c0baa16e9a0d.js +16 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/2aa24a251622fd06.js +5 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/39513207112d6828.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{74e3a3e93be78db8.js → 40857295bb9226c4.js} +7 -7
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{8d8fe711583a59f0.js → 41ae15220fc19bf7.js} +2 -2
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/5092f14c2bf43204.js +16 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/5159169343ce6d2f.css +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/67b36c70b72e0e10.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/7bfbfcd072f8d61e.js +20 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/7cf26dd04166f32f.js +6 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/90dcb743d23feeca.js +16 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/93749b45e2700808.js +16 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{48feca51cf97c8a7.js → 9bb8f1406365af81.js} +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/b4aa71020acae46f.js +16 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/c352706a0ad7e35d.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/c5436b2b7e8f0ca9.js +16 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{1600dd6ff8607d8f.js → c9a2c4b55bb76f4f.js} +6 -6
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/d6a9cc66254693b8.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{9e703dd5d95e9557.js → e3bdd1e0f385114e.js} +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{6ffcd12eabd7c65e.js → f71d73895d228547.js} +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/f750d2f1882d31a8.js +5 -0
- package/cloud-runtime/standalone/apps/local/app/api/automations/route.ts +2 -10
- package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/objectives/[objectiveId]/program/route.ts +77 -0
- package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/workspace/export/route.ts +35 -0
- package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/workspace/import/route.ts +91 -0
- package/cloud-runtime/standalone/apps/local/app/api/prompt-jobs/route.ts +1 -8
- package/cloud-runtime/standalone/apps/local/app/projects/[slug]/layout.tsx +1 -1
- package/cloud-runtime/standalone/apps/local/app/projects/[slug]/thread/page.tsx +14 -0
- package/cloud-runtime/standalone/apps/local/components/AutomationsBoard.tsx +15 -15
- package/cloud-runtime/standalone/apps/local/components/PromptJobBoard.tsx +7 -12
- package/cloud-runtime/standalone/apps/local/components/projects/FoldersSummaryCard.tsx +51 -196
- package/cloud-runtime/standalone/apps/local/components/projects/FoldersView.tsx +662 -784
- package/cloud-runtime/standalone/apps/local/components/projects/ObjectiveScheduledTasksPanel.tsx +7 -10
- package/cloud-runtime/standalone/apps/local/components/projects/ProjectHome.tsx +4 -4
- package/cloud-runtime/standalone/apps/local/components/projects/ProjectObjectivesWorkspace.tsx +118 -0
- package/cloud-runtime/standalone/apps/local/components/projects/ProjectSettings.tsx +81 -7
- package/cloud-runtime/standalone/apps/local/components/thread/WorkspaceSidebar.tsx +13 -3
- package/cloud-runtime/standalone/apps/local/hooks/useProjectWorkspace.ts +117 -0
- package/cloud-runtime/standalone/apps/local/lib/db/projects.ts +14 -10
- package/cloud-runtime/standalone/apps/local/lib/project-workspace.ts +80 -0
- package/cloud-runtime/standalone/apps/local/lib/task-context.ts +39 -4
- package/cloud-runtime/standalone/apps/local/lib/workspace-yaml.ts +164 -0
- package/cloud-runtime/standalone/apps/local/src/objectives/program/index.ts +7 -0
- package/cloud-runtime/standalone/apps/local/src/objectives/program/repository.ts +60 -0
- package/cloud-runtime/standalone/apps/local/src/prompt-scheduler/objective-worker.ts +12 -0
- package/cloud-runtime/standalone/apps/local/src/scheduling/status.ts +42 -0
- package/cloud-runtime/standalone/apps/local/worker/index.js +14 -9
- package/lib/commands/workspace.js +145 -7
- package/package.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_09d85861._.js +0 -91
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_25136564._.js +0 -11
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_2caf4398._.js +0 -91
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_31ca7a35._.js +0 -91
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/9fb8c_lucide-react_dist_esm_icons_8c8ee1bc._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__23838f87._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__3b4708d5._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__49cbf624._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__49cdd178._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__55ed4ff9._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__7a31a76d._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__a61463b8._.js +0 -7
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__bb42490f._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__ee9351f9._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_0ecd68e8._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_347d036d._.js +0 -7
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_5c140c38._.js +0 -7
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_f99c22fd._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_30d021de._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_3b90cb76._.js +0 -18
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_9f36c765._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_components_8cc1a335._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/1d8b2726979134e5.js +0 -16
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/692103d55fcd0328.js +0 -5
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/6952b44e247d594a.js +0 -16
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/6bfdc40a24e65ca2.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/7ff071e8a33d2fd8.js +0 -16
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/87e4fb11329a358d.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/92467c495ad08a85.js +0 -5
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/941f7f3626ec442c.js +0 -16
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/94a66d2d19268d25.js +0 -5
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/add53c2fe147af75.css +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/b35865f64b56d6f4.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/d662272e49df1950.js +0 -20
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/e0d68c6af17c8c87.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/f154e2ed7753f8ee.js +0 -16
- /package/cloud-runtime/standalone/apps/local/.next/static/{fipnHmd6JPn9sTuFdYS0y → xVMVGrzDjtD1H0bGL76NJ}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/apps/local/.next/static/{fipnHmd6JPn9sTuFdYS0y → xVMVGrzDjtD1H0bGL76NJ}/_clientMiddlewareManifest.json +0 -0
- /package/cloud-runtime/standalone/apps/local/.next/static/{fipnHmd6JPn9sTuFdYS0y → xVMVGrzDjtD1H0bGL76NJ}/_ssgManifest.js +0 -0
|
@@ -20,8 +20,8 @@ import {
|
|
|
20
20
|
getProjectBySlug,
|
|
21
21
|
getProjectMemory,
|
|
22
22
|
getProjectRepos,
|
|
23
|
+
getWorkspaceMapForContext,
|
|
23
24
|
getProjectWithRepos,
|
|
24
|
-
|
|
25
25
|
TaskRunHistory,
|
|
26
26
|
defaultStagePrompts,
|
|
27
27
|
DEFAULT_WORKFLOW_ID,
|
|
@@ -64,6 +64,11 @@ export interface StageConfig {
|
|
|
64
64
|
export interface ProjectContext {
|
|
65
65
|
project: Project | null;
|
|
66
66
|
repos: ProjectRepo[];
|
|
67
|
+
workspace_map: Array<{
|
|
68
|
+
location: string;
|
|
69
|
+
path: string | null;
|
|
70
|
+
purpose: string | null;
|
|
71
|
+
}>;
|
|
67
72
|
learnings: string[];
|
|
68
73
|
}
|
|
69
74
|
|
|
@@ -285,6 +290,31 @@ function formatRepoLines(repos: ProjectRepo[]): string {
|
|
|
285
290
|
.join("\n");
|
|
286
291
|
}
|
|
287
292
|
|
|
293
|
+
function escapeMarkdownTableCell(value: string | null | undefined): string {
|
|
294
|
+
return String(value ?? "")
|
|
295
|
+
.replace(/\r\n?/g, "\n")
|
|
296
|
+
.replace(/\|/g, "\\|")
|
|
297
|
+
.replace(/\n/g, "<br />");
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
function formatWorkspaceMapSection(
|
|
301
|
+
workspaceMap: Array<{ location: string; path: string | null; purpose: string | null }>
|
|
302
|
+
): string | null {
|
|
303
|
+
const mappedRows = workspaceMap.filter((entry) => entry.path);
|
|
304
|
+
if (!mappedRows.length) return null;
|
|
305
|
+
|
|
306
|
+
const rows = mappedRows.map((entry) =>
|
|
307
|
+
`| ${escapeMarkdownTableCell(entry.location)} | ${escapeMarkdownTableCell(entry.path)} | ${escapeMarkdownTableCell(entry.purpose)} |`
|
|
308
|
+
);
|
|
309
|
+
|
|
310
|
+
return [
|
|
311
|
+
"WORKSPACE MAP",
|
|
312
|
+
"| Location | Path | Purpose |",
|
|
313
|
+
"|----------|------|---------|",
|
|
314
|
+
...rows,
|
|
315
|
+
].join("\n");
|
|
316
|
+
}
|
|
317
|
+
|
|
288
318
|
async function resolveProjectContext(task: Task, _projectLearnings: Learning[]): Promise<ProjectContext | null> {
|
|
289
319
|
const projectId = task.project_id;
|
|
290
320
|
const projectSlug = task.project || undefined;
|
|
@@ -306,7 +336,10 @@ async function resolveProjectContext(task: Task, _projectLearnings: Learning[]):
|
|
|
306
336
|
return null;
|
|
307
337
|
}
|
|
308
338
|
|
|
309
|
-
const projectKnowledge = await
|
|
339
|
+
const [projectKnowledge, workspace_map] = await Promise.all([
|
|
340
|
+
getProjectMemory(projectWithRepos.id, "human"),
|
|
341
|
+
getWorkspaceMapForContext(projectWithRepos.id),
|
|
342
|
+
]);
|
|
310
343
|
const projectSystemNote = getKnowledgeNote("project", projectWithRepos.id);
|
|
311
344
|
|
|
312
345
|
if (projectWithRepos.repos.length > 0) {
|
|
@@ -337,6 +370,7 @@ async function resolveProjectContext(task: Task, _projectLearnings: Learning[]):
|
|
|
337
370
|
return {
|
|
338
371
|
project: projectWithRepos,
|
|
339
372
|
repos: projectWithRepos.repos ?? [],
|
|
373
|
+
workspace_map,
|
|
340
374
|
learnings: [
|
|
341
375
|
...projectKnowledge.map((entry) => entry.content),
|
|
342
376
|
...(projectSystemNote?.content ? [`[System-generated] ${projectSystemNote.content}`] : []),
|
|
@@ -404,18 +438,19 @@ export function buildTaskPrompt(args: {
|
|
|
404
438
|
const projectContextSections = project_context?.project
|
|
405
439
|
? [
|
|
406
440
|
`PROJECT CONTEXT\n${formatProjectMetadata(project_context.project)}`,
|
|
441
|
+
formatWorkspaceMapSection(project_context.workspace_map),
|
|
407
442
|
`REPOSITORY MAP\n${formatRepoLines(project_context.repos)}`,
|
|
408
443
|
`PROJECT KNOWLEDGE\n${formatList(project_context.learnings, "(none)")}`,
|
|
409
|
-
]
|
|
444
|
+
].filter(Boolean)
|
|
410
445
|
: [];
|
|
411
446
|
|
|
412
447
|
const sections = [
|
|
413
448
|
stage_config.prompt ? `STAGE PROMPT\n${stage_config.prompt}` : null,
|
|
414
449
|
"EXECUTION RULES\n- Do not use AGX MCP tools or AGX MCP servers for this task.\n- Complete work using local edits, shell commands, and allowed HTTP APIs only.",
|
|
415
450
|
`TASK META\n${metaLines.join("\n")}`,
|
|
451
|
+
...projectContextSections,
|
|
416
452
|
`TASK\n${description || "(empty)"}`,
|
|
417
453
|
`COMMENTS\n${formatList(commentLines, "(none)")}`,
|
|
418
|
-
...projectContextSections,
|
|
419
454
|
`TASK KNOWLEDGE\n${formatList(learnings.task.map((l) => l.content), "(none)")}`,
|
|
420
455
|
`GLOBAL KNOWLEDGE\n${formatList(learnings.global.map((l) => l.content), "(none)")}`,
|
|
421
456
|
agent_memories?.length ? `PAST LEARNINGS (from previous tasks)\n${formatList(agent_memories, "(none)")}` : null,
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { dump, load } from "js-yaml";
|
|
2
|
+
import type { WorkspaceEntry } from "./db";
|
|
3
|
+
import { listWorkspaceCategories } from "./workspace-categories";
|
|
4
|
+
|
|
5
|
+
export interface WorkspaceYamlCategory {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface WorkspaceYamlEntry {
|
|
11
|
+
category: string;
|
|
12
|
+
name: string;
|
|
13
|
+
purpose: string | null;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface WorkspaceYamlDocument {
|
|
17
|
+
version: 1;
|
|
18
|
+
categories: WorkspaceYamlCategory[];
|
|
19
|
+
entries: WorkspaceYamlEntry[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const knownCategoryLabels = new Map<string, string>(
|
|
23
|
+
listWorkspaceCategories().map((category) => [category.id, category.label]),
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
function normalizeRequiredString(value: unknown, field: string): string {
|
|
27
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
28
|
+
throw new Error(`Invalid or missing '${field}'`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return value.trim();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function normalizeOptionalPurpose(value: unknown, field: string): string | null {
|
|
35
|
+
if (value === undefined || value === null) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (typeof value !== "string") {
|
|
40
|
+
throw new Error(`Invalid '${field}'`);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const trimmed = value.trim();
|
|
44
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function fallbackCategoryLabel(categoryId: string): string {
|
|
48
|
+
return categoryId
|
|
49
|
+
.split(/[_-]+/)
|
|
50
|
+
.filter(Boolean)
|
|
51
|
+
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
52
|
+
.join(" ") || categoryId;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function categoryKey(category: string, name: string): string {
|
|
56
|
+
return `${category}\u0000${name}`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function serializeWorkspace(entries: WorkspaceEntry[]): string {
|
|
60
|
+
const sortedEntries = [...entries].sort((a, b) => {
|
|
61
|
+
if (a.category !== b.category) return a.category.localeCompare(b.category);
|
|
62
|
+
if (a.sort_order !== b.sort_order) return a.sort_order - b.sort_order;
|
|
63
|
+
return a.name.localeCompare(b.name);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const categories = new Map<string, WorkspaceYamlCategory>();
|
|
67
|
+
for (const entry of sortedEntries) {
|
|
68
|
+
if (!categories.has(entry.category)) {
|
|
69
|
+
categories.set(entry.category, {
|
|
70
|
+
id: entry.category,
|
|
71
|
+
label: knownCategoryLabels.get(entry.category) ?? fallbackCategoryLabel(entry.category),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const doc: WorkspaceYamlDocument = {
|
|
77
|
+
version: 1,
|
|
78
|
+
categories: Array.from(categories.values()),
|
|
79
|
+
entries: sortedEntries.map((entry) => ({
|
|
80
|
+
category: entry.category,
|
|
81
|
+
name: entry.name,
|
|
82
|
+
purpose: entry.purpose ?? null,
|
|
83
|
+
})),
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
return dump(doc, {
|
|
87
|
+
lineWidth: 120,
|
|
88
|
+
noRefs: true,
|
|
89
|
+
sortKeys: false,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function deserializeWorkspace(yaml: string): WorkspaceYamlDocument {
|
|
94
|
+
const parsed = load(yaml);
|
|
95
|
+
|
|
96
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
97
|
+
throw new Error("Invalid YAML: expected an object at the root level");
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const doc = parsed as Record<string, unknown>;
|
|
101
|
+
if (doc.version !== 1) {
|
|
102
|
+
throw new Error(`Unsupported version: ${doc.version ?? "missing"}. Only version 1 is supported.`);
|
|
103
|
+
}
|
|
104
|
+
if (!Array.isArray(doc.categories)) {
|
|
105
|
+
throw new Error("Invalid YAML: missing or invalid 'categories' array");
|
|
106
|
+
}
|
|
107
|
+
if (!Array.isArray(doc.entries)) {
|
|
108
|
+
throw new Error("Invalid YAML: missing or invalid 'entries' array");
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const seenCategories = new Set<string>();
|
|
112
|
+
const categories = doc.categories.map((entry, index) => {
|
|
113
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
|
|
114
|
+
throw new Error(`Invalid category entry at index ${index}`);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const category = entry as Record<string, unknown>;
|
|
118
|
+
const id = normalizeRequiredString(category.id, `categories[${index}].id`);
|
|
119
|
+
const label = normalizeRequiredString(category.label, `categories[${index}].label`);
|
|
120
|
+
|
|
121
|
+
if (seenCategories.has(id)) {
|
|
122
|
+
throw new Error(`Duplicate category id '${id}'`);
|
|
123
|
+
}
|
|
124
|
+
seenCategories.add(id);
|
|
125
|
+
|
|
126
|
+
return { id, label };
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
const categoryIds = new Set(categories.map((category) => category.id));
|
|
130
|
+
const seenEntries = new Set<string>();
|
|
131
|
+
|
|
132
|
+
const entries = doc.entries.map((entry, index) => {
|
|
133
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
|
|
134
|
+
throw new Error(`Invalid workspace entry at index ${index}`);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const workspaceEntry = entry as Record<string, unknown>;
|
|
138
|
+
if ("path" in workspaceEntry) {
|
|
139
|
+
throw new Error(`Invalid workspace entry at index ${index}: 'path' is not allowed`);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const category = normalizeRequiredString(workspaceEntry.category, `entries[${index}].category`);
|
|
143
|
+
const name = normalizeRequiredString(workspaceEntry.name, `entries[${index}].name`);
|
|
144
|
+
const purpose = normalizeOptionalPurpose(workspaceEntry.purpose, `entries[${index}].purpose`);
|
|
145
|
+
|
|
146
|
+
if (!categoryIds.has(category)) {
|
|
147
|
+
throw new Error(`Entry '${name}' references unknown category '${category}'`);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const key = categoryKey(category, name);
|
|
151
|
+
if (seenEntries.has(key)) {
|
|
152
|
+
throw new Error(`Duplicate workspace entry '${category}/${name}'`);
|
|
153
|
+
}
|
|
154
|
+
seenEntries.add(key);
|
|
155
|
+
|
|
156
|
+
return { category, name, purpose };
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
return {
|
|
160
|
+
version: 1,
|
|
161
|
+
categories,
|
|
162
|
+
entries,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { homedir } from "os";
|
|
4
|
+
|
|
5
|
+
export const PROGRAM_FILENAME = "program.md";
|
|
6
|
+
|
|
7
|
+
function resolveAgxDataDir(): string {
|
|
8
|
+
const configured = process.env.AGX_DATA_DIR?.trim();
|
|
9
|
+
if (configured) return path.resolve(configured);
|
|
10
|
+
return path.join(homedir(), ".agx");
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function getProgramPath(projectSlug: string, objectiveKey: string): string {
|
|
14
|
+
return path.join(
|
|
15
|
+
resolveAgxDataDir(),
|
|
16
|
+
"projects",
|
|
17
|
+
projectSlug,
|
|
18
|
+
"objectives",
|
|
19
|
+
objectiveKey,
|
|
20
|
+
PROGRAM_FILENAME,
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ObjectiveProgram {
|
|
25
|
+
path: string;
|
|
26
|
+
content: string | null;
|
|
27
|
+
updatedAt: string | null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function readProgram(projectSlug: string, objectiveKey: string): ObjectiveProgram {
|
|
31
|
+
const filePath = getProgramPath(projectSlug, objectiveKey);
|
|
32
|
+
if (!fs.existsSync(filePath)) {
|
|
33
|
+
return { path: filePath, content: null, updatedAt: null };
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
const content = fs.readFileSync(filePath, "utf8");
|
|
37
|
+
const stat = fs.statSync(filePath);
|
|
38
|
+
return { path: filePath, content, updatedAt: stat.mtime.toISOString() };
|
|
39
|
+
} catch {
|
|
40
|
+
return { path: filePath, content: null, updatedAt: null };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function writeProgram(
|
|
45
|
+
projectSlug: string,
|
|
46
|
+
objectiveKey: string,
|
|
47
|
+
content: string,
|
|
48
|
+
): ObjectiveProgram {
|
|
49
|
+
const filePath = getProgramPath(projectSlug, objectiveKey);
|
|
50
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
51
|
+
const trimmed = content.replace(/\s+$/g, "");
|
|
52
|
+
if (trimmed.length === 0) {
|
|
53
|
+
if (fs.existsSync(filePath)) fs.unlinkSync(filePath);
|
|
54
|
+
return { path: filePath, content: null, updatedAt: null };
|
|
55
|
+
}
|
|
56
|
+
const body = trimmed + "\n";
|
|
57
|
+
fs.writeFileSync(filePath, body, "utf8");
|
|
58
|
+
const stat = fs.statSync(filePath);
|
|
59
|
+
return { path: filePath, content: body, updatedAt: stat.mtime.toISOString() };
|
|
60
|
+
}
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
import { getIssueActiveAgents, type IssueActiveAgent } from '@/lib/linear-run-store';
|
|
8
8
|
import { getActivityRepository } from '@/src/objectives/activities/repository';
|
|
9
9
|
import { getNoteRepository } from '@/src/objectives/notes';
|
|
10
|
+
import { readProgram } from '@/src/objectives/program';
|
|
10
11
|
import {
|
|
11
12
|
loadProjectObjectiveContext,
|
|
12
13
|
persistProjectObjectiveMetadata,
|
|
@@ -220,6 +221,17 @@ export async function buildObjectiveObservation(opts: {
|
|
|
220
221
|
`Progress: ${objective.progress}% | Status: ${objective.status}`,
|
|
221
222
|
);
|
|
222
223
|
|
|
224
|
+
// PROGRAM (objective-level prompt: goal / definition of better / blast radius / learnings)
|
|
225
|
+
const program = readProgram(projectSlug, objective.key);
|
|
226
|
+
sections.push('', 'PROGRAM', `path: ${program.path}`);
|
|
227
|
+
if (program.content && program.content.trim().length > 0) {
|
|
228
|
+
sections.push(program.content.trim());
|
|
229
|
+
} else {
|
|
230
|
+
sections.push(
|
|
231
|
+
'(empty) No program has been authored for this objective yet. Before committing to a direction, surface this to the user in chat: ask what "better" means for this objective (the success metric), what paths/systems are in-scope, and any constraints. Capture the answer by writing to the path above.',
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
223
235
|
// NOTES
|
|
224
236
|
if (notes.length > 0) {
|
|
225
237
|
sections.push(
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
type ScheduleState = "active" | "paused" | "stopped" | string;
|
|
2
|
+
|
|
3
|
+
interface ScheduledRunStatusInput {
|
|
4
|
+
state: ScheduleState;
|
|
5
|
+
nextScheduledAt: number | null | undefined;
|
|
6
|
+
lastCompletedAt: number | null | undefined;
|
|
7
|
+
inProgress?: boolean;
|
|
8
|
+
now?: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface IntervalScheduleStatusInput {
|
|
12
|
+
state: ScheduleState;
|
|
13
|
+
lastCompletedAt: number | null | undefined;
|
|
14
|
+
intervalMs: number;
|
|
15
|
+
inProgress?: boolean;
|
|
16
|
+
now?: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function isScheduledRunOverdue({
|
|
20
|
+
state,
|
|
21
|
+
nextScheduledAt,
|
|
22
|
+
lastCompletedAt,
|
|
23
|
+
inProgress = false,
|
|
24
|
+
now = Date.now(),
|
|
25
|
+
}: ScheduledRunStatusInput): boolean {
|
|
26
|
+
if (state !== "active" || inProgress) return false;
|
|
27
|
+
if (nextScheduledAt == null || nextScheduledAt >= now) return false;
|
|
28
|
+
if (lastCompletedAt != null && lastCompletedAt >= nextScheduledAt) return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function isIntervalScheduleOverdue({
|
|
33
|
+
state,
|
|
34
|
+
lastCompletedAt,
|
|
35
|
+
intervalMs,
|
|
36
|
+
inProgress = false,
|
|
37
|
+
now = Date.now(),
|
|
38
|
+
}: IntervalScheduleStatusInput): boolean {
|
|
39
|
+
if (state !== "active" || inProgress) return false;
|
|
40
|
+
if (lastCompletedAt == null) return false;
|
|
41
|
+
return lastCompletedAt + intervalMs < now;
|
|
42
|
+
}
|
|
@@ -7904,19 +7904,22 @@ async function getProjectForThread(threadId) {
|
|
|
7904
7904
|
return data?.project_id ?? null;
|
|
7905
7905
|
}
|
|
7906
7906
|
async function getProjectWorkspace(projectId) {
|
|
7907
|
-
const
|
|
7908
|
-
const { data, error } = await db2.from("workspace_entries").select("*").eq("project_id", projectId).order("category", { ascending: true }).order("sort_order", { ascending: true }).order("name", { ascending: true });
|
|
7909
|
-
if (error) {
|
|
7910
|
-
if (isMissingRelationError(error, "workspace_entries")) return {};
|
|
7911
|
-
throw error;
|
|
7912
|
-
}
|
|
7913
|
-
const entries = data || [];
|
|
7907
|
+
const entries = await getProjectWorkspaceEntries(projectId);
|
|
7914
7908
|
return entries.reduce((acc, entry) => {
|
|
7915
7909
|
if (!acc[entry.category]) acc[entry.category] = [];
|
|
7916
7910
|
acc[entry.category].push(entry);
|
|
7917
7911
|
return acc;
|
|
7918
7912
|
}, {});
|
|
7919
7913
|
}
|
|
7914
|
+
async function getProjectWorkspaceEntries(projectId) {
|
|
7915
|
+
const db2 = createAdminDbClient();
|
|
7916
|
+
const { data, error } = await db2.from("workspace_entries").select("*").eq("project_id", projectId).order("category", { ascending: true }).order("sort_order", { ascending: true }).order("name", { ascending: true });
|
|
7917
|
+
if (error) {
|
|
7918
|
+
if (isMissingRelationError(error, "workspace_entries")) return [];
|
|
7919
|
+
throw error;
|
|
7920
|
+
}
|
|
7921
|
+
return data || [];
|
|
7922
|
+
}
|
|
7920
7923
|
async function createWorkspaceEntry(projectId, entry) {
|
|
7921
7924
|
const db2 = createAdminDbClient();
|
|
7922
7925
|
const id = (0, import_crypto.randomUUID)();
|
|
@@ -7928,7 +7931,7 @@ async function createWorkspaceEntry(projectId, entry) {
|
|
|
7928
7931
|
name: entry.name,
|
|
7929
7932
|
path: entry.path || null,
|
|
7930
7933
|
purpose: entry.purpose || null,
|
|
7931
|
-
sort_order: 0,
|
|
7934
|
+
sort_order: entry.sort_order ?? 0,
|
|
7932
7935
|
created_at: now,
|
|
7933
7936
|
updated_at: now
|
|
7934
7937
|
}).select().single();
|
|
@@ -7942,6 +7945,7 @@ async function updateWorkspaceEntry(projectId, entryId, updates) {
|
|
|
7942
7945
|
if (updates.path !== void 0) payload.path = updates.path;
|
|
7943
7946
|
if (updates.purpose !== void 0) payload.purpose = updates.purpose;
|
|
7944
7947
|
if (updates.sort_order !== void 0) payload.sort_order = updates.sort_order;
|
|
7948
|
+
payload.updated_at = (/* @__PURE__ */ new Date()).toISOString();
|
|
7945
7949
|
const { data, error } = await db2.from("workspace_entries").update(payload).eq("id", entryId).eq("project_id", projectId).select().single();
|
|
7946
7950
|
if (error) {
|
|
7947
7951
|
if (error.code === "PGRST116") return null;
|
|
@@ -9138,6 +9142,7 @@ __export(db_exports, {
|
|
|
9138
9142
|
getProjectVariables: () => getProjectVariables,
|
|
9139
9143
|
getProjectWithRepos: () => getProjectWithRepos,
|
|
9140
9144
|
getProjectWorkspace: () => getProjectWorkspace,
|
|
9145
|
+
getProjectWorkspaceEntries: () => getProjectWorkspaceEntries,
|
|
9141
9146
|
getProjects: () => getProjects,
|
|
9142
9147
|
getStagePrompt: () => getStagePrompt,
|
|
9143
9148
|
getStagePrompts: () => getStagePrompts,
|
|
@@ -13712,7 +13717,6 @@ function resolveBoundSkillFiles(bindings, prompt, provider) {
|
|
|
13712
13717
|
var import_node_fs4;
|
|
13713
13718
|
var init_agent_skill_bindings = __esm({
|
|
13714
13719
|
"apps/local/lib/agent-skill-bindings.ts"() {
|
|
13715
|
-
"use strict";
|
|
13716
13720
|
import_node_fs4 = __toESM(require("node:fs"));
|
|
13717
13721
|
init_sqlite_query_adapter();
|
|
13718
13722
|
init_skills_library();
|
|
@@ -24563,6 +24567,7 @@ function parseNaturalSchedule(input) {
|
|
|
24563
24567
|
var PATTERNS;
|
|
24564
24568
|
var init_nl_schedule = __esm({
|
|
24565
24569
|
"apps/local/src/graph/nl-schedule.ts"() {
|
|
24570
|
+
"use strict";
|
|
24566
24571
|
PATTERNS = [
|
|
24567
24572
|
// "every N seconds" → intervalMs only (sub-minute)
|
|
24568
24573
|
{
|
|
@@ -154,6 +154,89 @@ function buildCreateBody(category, name, locationPath, purpose) {
|
|
|
154
154
|
return body;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
function normalizeApiUrl(apiUrl) {
|
|
158
|
+
return String(apiUrl || '').replace(/\/$/, '');
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function buildDirectRequestHeaders(cloudConfig, contentType = null) {
|
|
162
|
+
const internalServiceToken =
|
|
163
|
+
(process.env.AGX_INTERNAL_SERVICE_TOKEN || process.env.INTERNAL_SERVICE_TOKEN || '').trim();
|
|
164
|
+
const internalCallerId =
|
|
165
|
+
(process.env.AGX_EXECUTOR_CALLER_ID || 'executor-engine').trim();
|
|
166
|
+
const headers = {
|
|
167
|
+
'x-user-id': cloudConfig?.userId || '',
|
|
168
|
+
'x-agx-caller': internalCallerId,
|
|
169
|
+
'x-executor-caller-id': internalCallerId,
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
if (contentType) headers['Content-Type'] = contentType;
|
|
173
|
+
if (internalServiceToken) headers['x-internal-service-token'] = internalServiceToken;
|
|
174
|
+
if (cloudConfig?.token) headers.Authorization = `Bearer ${cloudConfig.token}`;
|
|
175
|
+
|
|
176
|
+
return headers;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
async function parseApiError(response) {
|
|
180
|
+
try {
|
|
181
|
+
const data = await response.json();
|
|
182
|
+
if (typeof data?.error === 'string' && data.error.trim()) return data.error.trim();
|
|
183
|
+
} catch {
|
|
184
|
+
// Fall through to status-based fallback.
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return `HTTP ${response.status}`;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function readWorkspaceImportSource(importPath) {
|
|
191
|
+
if (!importPath || importPath === '-') {
|
|
192
|
+
if (process.stdin.isTTY) {
|
|
193
|
+
throw new Error('Provide a file path or pipe YAML via stdin.');
|
|
194
|
+
}
|
|
195
|
+
return {
|
|
196
|
+
yaml: fs.readFileSync(0, 'utf8'),
|
|
197
|
+
sourceLabel: 'stdin',
|
|
198
|
+
usesStdin: true,
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const resolved = path.resolve(importPath);
|
|
203
|
+
if (!fs.existsSync(resolved)) {
|
|
204
|
+
throw new Error(`File not found: ${resolved}`);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return {
|
|
208
|
+
yaml: fs.readFileSync(resolved, 'utf8'),
|
|
209
|
+
sourceLabel: resolved,
|
|
210
|
+
usesStdin: false,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
async function exportWorkspaceYaml({ cloudConfig, project }) {
|
|
215
|
+
const exportUrl = `${normalizeApiUrl(cloudConfig.apiUrl)}/api/projects/${project.id}/workspace/export`;
|
|
216
|
+
const response = await fetch(exportUrl, {
|
|
217
|
+
headers: buildDirectRequestHeaders(cloudConfig),
|
|
218
|
+
});
|
|
219
|
+
if (!response.ok) {
|
|
220
|
+
const message = await parseApiError(response);
|
|
221
|
+
throw new Error(`Export failed: ${message}`);
|
|
222
|
+
}
|
|
223
|
+
return response.text();
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
async function importWorkspaceYaml({ cloudConfig, project, yaml }) {
|
|
227
|
+
const importUrl = `${normalizeApiUrl(cloudConfig.apiUrl)}/api/projects/${project.id}/workspace/import`;
|
|
228
|
+
const response = await fetch(importUrl, {
|
|
229
|
+
method: 'POST',
|
|
230
|
+
headers: buildDirectRequestHeaders(cloudConfig, 'text/yaml'),
|
|
231
|
+
body: yaml,
|
|
232
|
+
});
|
|
233
|
+
if (!response.ok) {
|
|
234
|
+
const message = await parseApiError(response);
|
|
235
|
+
throw new Error(`Import failed: ${message}`);
|
|
236
|
+
}
|
|
237
|
+
return response.json().catch(() => ({}));
|
|
238
|
+
}
|
|
239
|
+
|
|
157
240
|
async function maybeHandleWorkspaceCommand({ cmd, args, ctx }) {
|
|
158
241
|
if (cmd !== 'workspace') return false;
|
|
159
242
|
|
|
@@ -176,12 +259,13 @@ async function maybeHandleWorkspaceCommand({ cmd, args, ctx }) {
|
|
|
176
259
|
const subArgs = workspaceArgs.slice(1);
|
|
177
260
|
const skipConfirm = hasFlag('yes', subArgs) || subArgs.includes('-y');
|
|
178
261
|
|
|
179
|
-
function
|
|
262
|
+
function requireCloudConfig() {
|
|
180
263
|
const cloudConfig = loadCloudConfigFile();
|
|
181
264
|
if (!cloudConfig?.apiUrl) {
|
|
182
265
|
console.log(`${c.red}Board API URL not configured.${c.reset} Set AGX_BOARD_URL (legacy AGX_CLOUD_URL; default is http://localhost:41741)`);
|
|
183
266
|
process.exit(1);
|
|
184
267
|
}
|
|
268
|
+
return cloudConfig;
|
|
185
269
|
}
|
|
186
270
|
|
|
187
271
|
async function resolveProject() {
|
|
@@ -193,7 +277,7 @@ async function maybeHandleWorkspaceCommand({ cmd, args, ctx }) {
|
|
|
193
277
|
try {
|
|
194
278
|
switch (subcmd) {
|
|
195
279
|
case 'list': {
|
|
196
|
-
|
|
280
|
+
requireCloudConfig();
|
|
197
281
|
const project = await resolveProject();
|
|
198
282
|
const data = await cloudRequest('GET', `/api/projects/${project.id}/workspace`);
|
|
199
283
|
const workspace = data?.workspace && typeof data.workspace === 'object' ? data.workspace : {};
|
|
@@ -203,7 +287,7 @@ async function maybeHandleWorkspaceCommand({ cmd, args, ctx }) {
|
|
|
203
287
|
}
|
|
204
288
|
|
|
205
289
|
case 'add': {
|
|
206
|
-
|
|
290
|
+
requireCloudConfig();
|
|
207
291
|
const [rawCategory, rawName, rawPath] = positionalArgs(subArgs);
|
|
208
292
|
const category = canonicalizeWorkspaceCategory(rawCategory);
|
|
209
293
|
const name = String(rawName || '').trim();
|
|
@@ -231,7 +315,7 @@ async function maybeHandleWorkspaceCommand({ cmd, args, ctx }) {
|
|
|
231
315
|
|
|
232
316
|
case 'remove':
|
|
233
317
|
case 'rm': {
|
|
234
|
-
|
|
318
|
+
requireCloudConfig();
|
|
235
319
|
const [rawCategory, rawName] = positionalArgs(subArgs);
|
|
236
320
|
const category = canonicalizeWorkspaceCategory(rawCategory);
|
|
237
321
|
const name = String(rawName || '').trim();
|
|
@@ -267,10 +351,62 @@ async function maybeHandleWorkspaceCommand({ cmd, args, ctx }) {
|
|
|
267
351
|
process.exit(0);
|
|
268
352
|
}
|
|
269
353
|
|
|
270
|
-
case 'export':
|
|
354
|
+
case 'export': {
|
|
355
|
+
const cloudConfig = requireCloudConfig();
|
|
356
|
+
const project = await resolveProject();
|
|
357
|
+
const outputPath = String(flag('output', subArgs) || '').trim();
|
|
358
|
+
const yaml = await exportWorkspaceYaml({ cloudConfig, project });
|
|
359
|
+
|
|
360
|
+
if (!outputPath) {
|
|
361
|
+
process.stdout.write(yaml);
|
|
362
|
+
process.exit(0);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
const resolved = path.resolve(outputPath);
|
|
366
|
+
const dir = path.dirname(resolved);
|
|
367
|
+
if (!fs.existsSync(dir)) {
|
|
368
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
369
|
+
}
|
|
370
|
+
fs.writeFileSync(resolved, yaml, 'utf8');
|
|
371
|
+
console.log(`${c.green}✓${c.reset} Exported workspace to ${resolved}`);
|
|
372
|
+
process.exit(0);
|
|
373
|
+
}
|
|
374
|
+
|
|
271
375
|
case 'import': {
|
|
272
|
-
|
|
273
|
-
|
|
376
|
+
const cloudConfig = requireCloudConfig();
|
|
377
|
+
const project = await resolveProject();
|
|
378
|
+
const importPath = positionalArgs(subArgs)[0] || null;
|
|
379
|
+
const usingPipedStdin = (!importPath || importPath === '-') && !process.stdin.isTTY;
|
|
380
|
+
|
|
381
|
+
if (usingPipedStdin && !skipConfirm) {
|
|
382
|
+
console.log(`${c.red}✗${c.reset} Importing from stdin requires --yes in non-interactive mode.`);
|
|
383
|
+
process.exit(1);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
const { yaml, sourceLabel } = readWorkspaceImportSource(importPath);
|
|
387
|
+
if (!yaml.trim()) {
|
|
388
|
+
throw new Error(`Empty workspace YAML from ${sourceLabel}`);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
if (!skipConfirm) {
|
|
392
|
+
console.log(`${c.bold}Import workspace from:${c.reset} ${sourceLabel}`);
|
|
393
|
+
const answer = await prompt('Continue? [y/N]: ');
|
|
394
|
+
if (answer.toLowerCase() !== 'y') {
|
|
395
|
+
console.log('Cancelled.');
|
|
396
|
+
process.exit(0);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
const result = await importWorkspaceYaml({ cloudConfig, project, yaml });
|
|
401
|
+
const summary = result?.summary && typeof result.summary === 'object' ? result.summary : {};
|
|
402
|
+
const created = Number(summary.created || 0);
|
|
403
|
+
const updated = Number(summary.updated || 0);
|
|
404
|
+
const total = Number(summary.total || created + updated);
|
|
405
|
+
console.log(`${c.green}✓${c.reset} Imported workspace from ${sourceLabel}`);
|
|
406
|
+
console.log(` Created: ${created}`);
|
|
407
|
+
console.log(` Updated: ${updated}`);
|
|
408
|
+
console.log(` Total: ${total}`);
|
|
409
|
+
process.exit(0);
|
|
274
410
|
}
|
|
275
411
|
|
|
276
412
|
default:
|
|
@@ -297,4 +433,6 @@ module.exports = {
|
|
|
297
433
|
inferProjectIdentifierFromCwd,
|
|
298
434
|
formatWorkspaceLines,
|
|
299
435
|
buildCreateBody,
|
|
436
|
+
readWorkspaceImportSource,
|
|
437
|
+
buildDirectRequestHeaders,
|
|
300
438
|
};
|