@mndrk/agx 2.4.6 → 2.4.8
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_29a06140._.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_eec36ab6._.js +1 -1
- 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/chunks/ssr/apps_local_fed01721._.js +1 -1
- 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/3fce625820bc2bd4.js +16 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{8d8fe711583a59f0.js → 41ae15220fc19bf7.js} +2 -2
- 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/{74e3a3e93be78db8.js → 8b87c2521c519a1f.js} +9 -9
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/90dd4ab03ab145d1.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/{1fbcd40dccee738f.js → cf33cb29946990e3.js} +2 -2
- 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/ed606d6f94457578.css +1 -0
- 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/TrackerBoard.tsx +39 -1
- 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/components/tracking/TrackerSetup.tsx +22 -14
- 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/tracker/adapters/github/adapter.tsx +40 -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 → O3Yu8lY-DN5fauB8GipIL}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/apps/local/.next/static/{fipnHmd6JPn9sTuFdYS0y → O3Yu8lY-DN5fauB8GipIL}/_clientMiddlewareManifest.json +0 -0
- /package/cloud-runtime/standalone/apps/local/.next/static/{fipnHmd6JPn9sTuFdYS0y → O3Yu8lY-DN5fauB8GipIL}/_ssgManifest.js +0 -0
|
@@ -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
|
};
|
package/package.json
CHANGED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
module.exports=[11061,e=>{"use strict";var t=e.i(522734),r=e.i(446786),s=e.i(814747),i=e.i(769025);let{DatabaseSync:a}=process.getBuiltinModule("node:sqlite"),n=process.env.AGX_GROUP_CHAT_DIR?.trim()||s.default.join(r.default.homedir(),".agx","group-chat"),o=s.default.join(n,"history.sqlite");function c(e){return"scripted"===e?"scripted":"chat"}function u(e){let t,r=e.chat_created_at??e.created_at,s=e.chat_completed_at??null,i=function(e,t){switch(e){case"queued":return"queued";case"running":case"awaiting_user":case"blocked":return"running";case"completed":return"success";case"failed":return"failed";case"cancelled":return"cancelled";default:return t}}(e.chat_status,e.status);return{id:e.id,projectId:e.project_id,projectSlug:e.project_slug,issueId:e.issue_id,issueIdentifier:e.issue_identifier,issueTitle:e.issue_title,issueStatus:e.issue_status,issueAssignee:e.issue_assignee,threadId:e.thread_id,rootMessageId:e.root_message_id,chatRunId:e.chat_run_id,agentId:e.agent_id,agentName:e.agent_name,mode:c(e.mode),sessionTitle:"chat"===c(e.mode)&&(t=String(e.root_content??"").replace(/\[reaction\s+[^\]]*\]/gi,"").replace(/\[agx:[^\]]*\]/g,"").replace(/\[checkpoint\]/g,"").replace(/\[criteria:\s*[^\]]*\]/g,"").replace(/\[done\]/g,"").replace(/\[blocked[^\]]*\]/g,"").replace(/^\[SKIP\]$/gm,"").replace(/\s+/g," ").trim())?t.length>72?`${t.slice(0,69).trimEnd()}...`:t:null,status:i,durationMs:null!=s?Math.max(s-r,0):null,lastError:e.chat_last_error??e.error,recapFilePath:e.recap_file_path??null,startedAt:new Date(r).toISOString(),updatedAt:new Date((e.chat_updated_at??e.updated_at)||e.updated_at).toISOString(),completedAt:"number"==typeof s?new Date(s).toISOString():null}}async function l(e){await t.promises.mkdir(n,{recursive:!0});let r=new a(o);(0,i.pragmaSet)(r,"journal_mode = WAL");try{r.exec(`
|
|
2
|
-
CREATE TABLE IF NOT EXISTS chat_runs (
|
|
3
|
-
id TEXT PRIMARY KEY,
|
|
4
|
-
thread_id TEXT NOT NULL,
|
|
5
|
-
root_message_id TEXT,
|
|
6
|
-
user_id TEXT NOT NULL,
|
|
7
|
-
project_slug TEXT,
|
|
8
|
-
status TEXT NOT NULL,
|
|
9
|
-
current_step INTEGER NOT NULL DEFAULT 0,
|
|
10
|
-
max_steps INTEGER NOT NULL DEFAULT 10,
|
|
11
|
-
steps_used INTEGER NOT NULL DEFAULT 0,
|
|
12
|
-
last_error TEXT,
|
|
13
|
-
active_participant_ids TEXT NOT NULL DEFAULT '[]',
|
|
14
|
-
payload_json TEXT,
|
|
15
|
-
result_json TEXT,
|
|
16
|
-
created_at INTEGER NOT NULL,
|
|
17
|
-
updated_at INTEGER NOT NULL,
|
|
18
|
-
completed_at INTEGER
|
|
19
|
-
);
|
|
20
|
-
CREATE TABLE IF NOT EXISTS messages (
|
|
21
|
-
thread_id TEXT NOT NULL,
|
|
22
|
-
id TEXT NOT NULL,
|
|
23
|
-
role TEXT NOT NULL,
|
|
24
|
-
participant_id TEXT,
|
|
25
|
-
content TEXT NOT NULL,
|
|
26
|
-
timestamp INTEGER NOT NULL,
|
|
27
|
-
root_message_id TEXT,
|
|
28
|
-
parent_message_id TEXT,
|
|
29
|
-
depth INTEGER NOT NULL DEFAULT 0,
|
|
30
|
-
thread_status TEXT,
|
|
31
|
-
outcome_note TEXT,
|
|
32
|
-
PRIMARY KEY (thread_id, id)
|
|
33
|
-
);
|
|
34
|
-
CREATE TABLE IF NOT EXISTS linear_runs (
|
|
35
|
-
id TEXT PRIMARY KEY,
|
|
36
|
-
project_id TEXT,
|
|
37
|
-
project_slug TEXT,
|
|
38
|
-
issue_id TEXT NOT NULL,
|
|
39
|
-
issue_identifier TEXT NOT NULL,
|
|
40
|
-
issue_title TEXT NOT NULL,
|
|
41
|
-
issue_status TEXT NOT NULL,
|
|
42
|
-
issue_assignee TEXT,
|
|
43
|
-
thread_id TEXT NOT NULL,
|
|
44
|
-
root_message_id TEXT,
|
|
45
|
-
chat_run_id TEXT,
|
|
46
|
-
agent_id TEXT NOT NULL,
|
|
47
|
-
agent_name TEXT NOT NULL,
|
|
48
|
-
mode TEXT NOT NULL DEFAULT 'chat',
|
|
49
|
-
status TEXT NOT NULL DEFAULT 'queued',
|
|
50
|
-
error TEXT,
|
|
51
|
-
recap_file_path TEXT,
|
|
52
|
-
created_at INTEGER NOT NULL,
|
|
53
|
-
updated_at INTEGER NOT NULL
|
|
54
|
-
);
|
|
55
|
-
CREATE INDEX IF NOT EXISTS idx_linear_runs_issue_created
|
|
56
|
-
ON linear_runs (issue_id, created_at DESC);
|
|
57
|
-
CREATE INDEX IF NOT EXISTS idx_linear_runs_project_issue_created
|
|
58
|
-
ON linear_runs (project_id, issue_id, created_at DESC);
|
|
59
|
-
CREATE UNIQUE INDEX IF NOT EXISTS idx_linear_runs_chat_run_id
|
|
60
|
-
ON linear_runs (chat_run_id)
|
|
61
|
-
WHERE chat_run_id IS NOT NULL;
|
|
62
|
-
`);let t=r.prepare("PRAGMA table_info(linear_runs)").all();return t.some(e=>"mode"===e.name)||r.exec("ALTER TABLE linear_runs ADD COLUMN mode TEXT NOT NULL DEFAULT 'chat';"),t.some(e=>"recap_file_path"===e.name)||r.exec("ALTER TABLE linear_runs ADD COLUMN recap_file_path TEXT;"),e(r)}finally{r.close()}}async function d(e){var t;let r=e.issueId.trim(),s=(t=e.projectId??null,t?.trim()||null),i=Number.isFinite(e.limit)?Math.min(Math.max(Number(e.limit),1),100):50;return l(e=>{let t=[r],a=["lr.issue_id = ?"];return s&&(a.push("lr.project_id = ?"),t.push(s)),t.push(i),e.prepare(`SELECT
|
|
63
|
-
lr.*,
|
|
64
|
-
cr.status AS chat_status,
|
|
65
|
-
cr.last_error AS chat_last_error,
|
|
66
|
-
cr.created_at AS chat_created_at,
|
|
67
|
-
cr.updated_at AS chat_updated_at,
|
|
68
|
-
cr.completed_at AS chat_completed_at,
|
|
69
|
-
msg.content AS root_content
|
|
70
|
-
FROM linear_runs lr
|
|
71
|
-
LEFT JOIN chat_runs cr ON cr.id = (
|
|
72
|
-
SELECT id FROM chat_runs WHERE thread_id = lr.thread_id ORDER BY updated_at DESC LIMIT 1
|
|
73
|
-
)
|
|
74
|
-
LEFT JOIN messages msg ON msg.thread_id = lr.thread_id AND msg.id = lr.root_message_id
|
|
75
|
-
WHERE ${a.join(" AND ")}
|
|
76
|
-
ORDER BY lr.created_at DESC
|
|
77
|
-
LIMIT ?`).all(...t).map(u)})}async function p(e){return l(t=>{let r=e?.trim(),s=r?`SELECT DISTINCT lr.issue_id, lr.agent_id, lr.agent_name
|
|
78
|
-
FROM linear_runs lr
|
|
79
|
-
INNER JOIN chat_runs cr ON cr.id = (
|
|
80
|
-
SELECT id FROM chat_runs WHERE thread_id = lr.thread_id ORDER BY updated_at DESC LIMIT 1
|
|
81
|
-
)
|
|
82
|
-
WHERE cr.status IN ('queued', 'running')
|
|
83
|
-
AND lr.project_id = ?`:`SELECT DISTINCT lr.issue_id, lr.agent_id, lr.agent_name
|
|
84
|
-
FROM linear_runs lr
|
|
85
|
-
INNER JOIN chat_runs cr ON cr.id = (
|
|
86
|
-
SELECT id FROM chat_runs WHERE thread_id = lr.thread_id ORDER BY updated_at DESC LIMIT 1
|
|
87
|
-
)
|
|
88
|
-
WHERE cr.status IN ('queued', 'running')`;return(r?t.prepare(s).all(e.trim()):t.prepare(s).all()).map(e=>({issueId:e.issue_id,agentId:e.agent_id,agentName:e.agent_name}))})}e.s(["getIssueActiveAgents",()=>p,"listLinearRuns",()=>d])},720395,e=>{"use strict";var t=e.i(84516),r=e.i(29764),s=e.i(11061),i=e.i(124985);e.i(243174);var a=e.i(248821),n=e.i(901977);let o="project_objective_health_history",c={"on track":"on_track","at risk":"at_risk","off track":"off_track",done:"done"};function u(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function l(e){return"number"==typeof e&&Number.isFinite(e)?Math.max(0,Math.min(100,Math.round(e))):0}function d(e){return"string"==typeof e&&e.trim()?e.trim():void 0}function p(...e){let t=e.flatMap(e=>e??[]),r=[];for(let e of[...t].sort((e,t)=>Date.parse(e.recordedAt)-Date.parse(t.recordedAt))){let t=r[r.length-1]??null;t&&t.progress===e.progress&&t.status===e.status&&(!t.source||!e.source||t.source===e.source)&&5e3>=Math.abs(Date.parse(e.recordedAt)-Date.parse(t.recordedAt))||r.push(e)}return r}var T=e.i(460275),_=e.i(765443);let E={on_track:"On track",at_risk:"At risk",off_track:"Off track",done:"Done"};async function m(e){let t=Date.now(),r="";try{return await (0,T.runCliResponse)({provider:e.provider,model:e.model,prompt:e.prompt,identity:e.identity,self:e.self,skills:e.skills,systemContext:e.systemContext,passthroughArgs:e.cliArgs?e.cliArgs.split(/\s+/).filter(Boolean):void 0,onDelta:e=>{r+=e},onSpawn:e.onSpawn}),{output:r,error:"",durationMs:Date.now()-t,status:"success"}}catch(e){return{output:r,error:e instanceof Error?e.message:String(e),durationMs:Date.now()-t,status:"failed"}}}function g(e){try{let t=JSON.parse(e);return t&&"object"==typeof t&&!Array.isArray(t)?t:null}catch{return null}}function h(e){let t=e.trim();if(!t)return null;let r=g(t);if(r)return r;let s=t.indexOf("{"),i=t.lastIndexOf("}");return -1===s||i<=s?null:g(t.slice(s,i+1))}function N(e){return"number"==typeof e&&Number.isFinite(e)?(0,_.normalizeProjectHealthProgress)(e):null}function j(e){return"string"==typeof e&&e.trim()?(0,_.normalizeProjectHealthStatus)(e):null}function I(e,t,r){return`${e}: ${t}% ${E[r]}`}function f(e){return[`- id: ${e.id}`,` identifier: ${e.identifier}`,` title: ${e.title}`,` status: ${e.status}`,` assignee: ${e.assignee??"Unassigned"}`,e.url?` url: ${e.url}`:null].filter(e=>!!e).join("\n")}async function b(e){let{job:n,objectiveContext:o}=e,{project:c,workspace:u,objective:l}=o,d=c.slug??c.id,[{issues:p},T,_,E]=await Promise.all([(0,r.listObjectiveTrackerIssues)({projectId:c.id,objectiveKey:l.key,projectSlug:d,refresh:!0}),(0,s.getIssueActiveAgents)(c.id),Promise.resolve((0,i.getActivityRepository)(d,l.key).list({limit:20})),Promise.resolve((0,a.getNoteRepository)(d,l.key).readAll())]),m=new Set(p.map(e=>e.id)),g=T.filter(e=>m.has(e.issueId)),h=(0,r.filterObjectiveTrackerIssuesForAction)(p,g.map(e=>e.issueId)),N=(0,t.getPromptJobStore)().listJobs({objectiveId:l.id}).filter(e=>e.id!==n.id),j=u.objectives.filter(e=>e.id!==l.id),I=[];I.push("GOAL",l.title,l.summary?.trim()||"No summary provided."),I.push("","CURRENT STATE",`Progress: ${l.progress}% | Status: ${l.status}`),E.length>0&&I.push("","NOTES",...E.map(e=>`### ${e.title}
|
|
89
|
-
${e.body}`));let b=_.activities??[];return b.length>0&&I.push("","RECENT ACTIVITY",...b.map(e=>{let t=e.createdAt.replace("T"," ").replace(/\.\d+Z$/,"").slice(0,16);return`- [${t}] ${e.body.split("\n")[0]}`})),p.length>0?I.push("","LINEAR TICKETS",p.map(e=>f(e)).join("\n\n")):I.push("","LINEAR TICKETS","- None."),g.length>0&&I.push("","ACTIVE SESSIONS",...g.map(e=>`- ${e.issueId}: running with ${e.agentName}`)),N.length>0&&I.push("","SCHEDULED TASKS",...N.map(e=>`- ${e.name} | state: ${e.state} | last outcome: ${e.lastOutcome??"none"}`)),j.length>0&&I.push("","PROJECT CONTEXT",...j.map(e=>`- ${e.title} (${e.key}) | ${e.progress}% | ${e.status}`)),I.push("","GUIDANCE",n.prompt.trim()||"No additional guidance provided."),I.push("","ELIGIBLE TICKETS",h.length>0?h.map(e=>f(e)).join("\n\n"):"- None."),I.push("","---","What single action most advances this objective right now?"),{prompt:I.join("\n"),issues:p,eligibleIssues:h,activeIssueAgents:g}}async function L(t){let r=Date.now();try{if(!t.job.projectId||!t.job.objectiveId)throw Error("Objective worker jobs require projectId and objectiveId.");let s=await (0,n.loadProjectObjectiveContext)(t.job.projectId,t.job.objectiveId);if(!s)throw Error("Objective context could not be resolved for this scheduled task.");let i=await b({job:t.job,objectiveContext:s}),a=await m({...t.controllerContext,prompt:i.prompt,systemContext:'You are deciding what action an objective worker should take next.\nReturn ONLY raw JSON with no markdown fences or commentary.\nValid responses:\n{"action":"work_ticket","ticketId":"ticket-id","reason":"...","objectiveProgress":42,"objectiveStatus":"at_risk","projectProgress":35,"projectStatus":"at_risk"}\n{"action":"run_prompt","prompt":"detailed instructions","reason":"...","objectiveProgress":42,"objectiveStatus":"at_risk"}\n{"action":"stop","reason":"...","objectiveProgress":42,"objectiveStatus":"at_risk"}\nRules:\n- "work_ticket": ticketId must exactly match one of the ELIGIBLE TICKETS ids.\n- "run_prompt": for work not captured by existing tickets. When no tickets are actionable and the objective is not done, use this to plan: review notes, refine the last plan, or outline next steps. The prompt should instruct the agent to append to an existing note when one is relevant rather than creating a new note.\n- "stop": only when the objective is done or genuinely no action (including planning) adds value.\nPercentages must be integers 0-100.\nStatuses: on_track, at_risk, off_track, done.',cliArgs:t.cliArgs,onSpawn:t.onSpawn});if("success"!==a.status)return{...a,output:a.output||"Objective controller failed before selecting an action."};let T=h(a.output),E="string"==typeof T?.action?T.action.trim().toLowerCase():"string"==typeof T?.decision?T.decision.trim().toLowerCase():"",g="work"===E?"work_ticket":E;if(!g){let e=a.output??"";console.warn(`[objective-worker] empty action from controller (job=${t.job.id}, outputLen=${e.length}, parsed=${T?"object":"null"}):`,e.slice(0,500))}let f="string"==typeof T?.reason?T.reason.trim():"",L=N(T?.objectiveProgress),O=j(T?.objectiveStatus),v=N(T?.projectProgress),A=j(T?.projectStatus),S="string"==typeof T?.projectNote?T.projectNote.trim():"",y="string"==typeof T?.objectiveNote?T.objectiveNote.trim():"",R=new Date().toISOString(),k=null!==L&&O?I("Objective health",L,O):null,w=null!==v&&A?I("Project health",v,A):null,D=null!==L&&null!==O?{objectiveId:s.objective.id,objectiveKey:s.objective.key,progress:L,status:O,recordedAt:R,source:`scheduled-task:${t.job.id}`,note:y||void 0}:null,X=null!==L&&null!==O&&(L!==s.objective.progress||O!==s.objective.status),C=X?(0,_.upsertProjectObjective)(s.workspace,{...s.objective,progress:L,status:O,updatedAt:R}):s.workspace,U=null!==v&&null!==A?{progress:v,status:A,updatedAt:R,source:`scheduled-task:${t.job.id}`,objectiveId:s.objective.id,objectiveKey:s.objective.key,note:S||void 0}:null,M=e=>{let t=e;return U&&(t=(0,_.writeProjectHealthSnapshot)(t,U)),D&&(t=function(e,t){let r=t.objectiveId.trim();if(!r)return e;let s=function(e,t){if(!u(e)||!t.trim())return[];let r=e[o];if(!u(r))return[];let s=r[t.trim()];return Array.isArray(s)?p(s.map(e=>(function(e){if(!u(e))return null;let t=function(e){if("string"!=typeof e)return null;let t=e.trim().toLowerCase();return"on_track"===t||"at_risk"===t||"off_track"===t||"done"===t?t:c[t]??null}(e.status),r=function(e){if("string"!=typeof e)return null;let t=Date.parse(e);return Number.isNaN(t)?null:new Date(t).toISOString()}(e.recordedAt);return t&&r?{progress:l(e.progress),status:t,recordedAt:r,source:d(e.source),note:d(e.note),objectiveId:d(e.objectiveId)??null,objectiveKey:d(e.objectiveKey)??null}:null})(e)).filter(e=>!!e)):[]}(e,r),i=p(s,[t]).slice(-200),a=u(e[o])?e[o]:{};return{...e,[o]:{...a,[r]:i.map(e=>({progress:l(e.progress),status:e.status,recordedAt:e.recordedAt,...e.source?{source:e.source}:{},...e.note?{note:e.note}:{},...e.objectiveId?{objectiveId:e.objectiveId}:{},...e.objectiveKey?{objectiveKey:e.objectiveKey}:{}}))}}}(t,D)),t};X?await (0,n.persistProjectObjectiveWorkspace)({projectId:s.project.id,currentMetadata:s.project.metadata,workspace:C,transformMetadata:M}):(D||U)&&await (0,n.persistProjectObjectiveMetadata)({projectId:s.project.id,currentMetadata:s.project.metadata,transformMetadata:M});let{dispatchObjectiveAction:$}=await e.A(688671),x=await $({action:g,parsed:T,reason:f,job:t.job,controllerContext:t.controllerContext,sessionAgent:t.sessionAgent,objectiveContext:s,eligibleIssues:i.eligibleIssues,issues:i.issues,healthSummaries:{objectiveHealthSummary:k,projectHealthSummary:w,objectiveNote:y,projectNote:S},cliArgs:t.cliArgs,onSpawn:t.onSpawn,startMs:r}),{logActionReceipt:P}=await e.A(688671);return await P(x,{jobId:t.job.id,projectId:t.job.projectId,objectiveId:t.job.objectiveId}),{output:x.result,error:"failed"===x.status?x.result:"",durationMs:Date.now()-r,status:x.status}}catch(e){return{output:"",error:e instanceof Error?e.message:String(e),durationMs:Date.now()-r,status:"failed"}}}e.s(["buildObjectiveObservation",()=>b,"executeObjectiveWorker",()=>L,"extractFirstJsonObject",()=>h],720395)},688671,e=>{e.v(e=>Promise.resolve().then(()=>e(917435)))}];
|
|
90
|
-
|
|
91
|
-
//# sourceMappingURL=apps_local_09d85861._.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
module.exports=[712513,(e,t,r)=>{},124985,36336,717245,e=>{"use strict";var t=e.i(522734),r=e.i(814747),i=e.i(446786),a=e.i(260476);let o=/^---\s*\n([\s\S]*?)\n---\s*(?:\n([\s\S]*))?$/,n=new Set(["metric-check","status-update","milestone","note"]);function s(e,t=""){return"string"==typeof e?e:t}function c(e,t={}){var r;let i=e.match(o);if(!i)throw Error(`Activity file is missing YAML frontmatter${t.filePath?` (${t.filePath})`:""}.`);let[,l,u=""]=i,d=(0,a.load)(l,{...t.filePath?{filename:t.filePath}:{}}),p=d&&"object"==typeof d&&!Array.isArray(d)?d:{};return{id:s(p.id),source:s(p.source,"manual"),objectiveLabel:s(p.objectiveLabel),createdAt:function(e,t="1970-01-01T00:00:00.000Z"){if("string"!=typeof e)return t;let r=Date.parse(e);return Number.isNaN(r)?t:new Date(r).toISOString()}(p.createdAt),type:"string"==typeof(r=p.type)&&n.has(r)?r:"note",body:u.trim()}}function l(e){let t={id:e.id,source:e.source,objectiveLabel:e.objectiveLabel,createdAt:e.createdAt,type:e.type},r=(0,a.dump)(t,{lineWidth:120,noRefs:!0,sortKeys:!1}).trimEnd(),i=e.body.trim();return i?`---
|
|
2
|
-
${r}
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
${i}
|
|
6
|
-
`:`---
|
|
7
|
-
${r}
|
|
8
|
-
---
|
|
9
|
-
`}e.s(["parseActivityFile",()=>c],36336),e.s(["serializeActivityFile",()=>l],717245);class u{rootDir;constructor(e){this.rootDir=r.default.resolve(e)}ensureDir(){t.default.mkdirSync(this.rootDir,{recursive:!0})}readAll(){if(!t.default.existsSync(this.rootDir))return[];let e=t.default.readdirSync(this.rootDir).filter(e=>e.endsWith(".md")),i=[];for(let a of e){let e=r.default.join(this.rootDir,a);try{let r=t.default.readFileSync(e,"utf8");i.push(c(r,{filePath:e}))}catch(t){console.error(`[activities] failed to read ${e}:`,t)}}return i.sort((e,t)=>Date.parse(t.createdAt)-Date.parse(e.createdAt))}list(e={}){let t=this.readAll();if(e.type&&(t=t.filter(t=>t.type===e.type)),e.source&&(t=t.filter(t=>t.source===e.source)),e.from){let r=Date.parse(e.from);Number.isNaN(r)||(t=t.filter(e=>Date.parse(e.createdAt)>=r))}if(e.to){let r=Date.parse(e.to);Number.isNaN(r)||(t=t.filter(e=>Date.parse(e.createdAt)<=r))}let r=t.length,i=Math.max(1,e.page??1),a=Math.min(100,Math.max(1,e.limit??25)),o=(i-1)*a;return{activities:t.slice(o,o+a),total:r,page:i,limit:a,hasMore:o+a<r}}append(e){var i;let a,o;this.ensureDir();let n=(a=(i=e).createdAt.replace(/[:.]/g,"-").replace("T","-").replace("Z",""),o=i.type.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48),`${a}-${o}.md`),s=r.default.join(this.rootDir,n),c=l(e);return t.default.writeFileSync(s,c,"utf8"),s}}let d=new Map;function p(e,t){let a,o=r.default.join((a=process.env.AGX_DATA_DIR?.trim())?r.default.resolve(a):r.default.join((0,i.homedir)(),".agx"),"projects",e,"objectives",t,"activities"),n=d.get(o);return n||(n=new u(o),d.set(o,n)),n}e.s(["getActivityRepository",()=>p],124985)},765443,e=>{"use strict";let t="project_objectives_workspace",r="project_goals_workspace",i="project_health_snapshot",a=new Set(["on_track","at_risk","off_track","done"]);function o(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function n(e){return`${e}_${Math.random().toString(36).slice(2,10)}`}function s(e){return[...e].sort((e,t)=>Date.parse(t.updatedAt)-Date.parse(e.updatedAt))}function c(e){return[...e].sort((e,t)=>Date.parse(e.createdAt)-Date.parse(t.createdAt))}function l(e){return[...e].sort((e,t)=>Date.parse(t.createdAt)-Date.parse(e.createdAt))}function u(e,t=""){return"string"==typeof e?e:t}function d(e,t="1970-01-01T00:00:00.000Z"){if("string"!=typeof e)return t;let r=Date.parse(e);return Number.isNaN(r)?t:new Date(r).toISOString()}function p(e){return"number"==typeof e&&Number.isFinite(e)?Math.max(0,Math.min(100,Math.round(e))):0}function f(e){return"string"==typeof e&&a.has(e)?e:"on_track"}function v(e){return f(e)}function m(e){return p(e)}function y(e,t="objective"){let r=e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-").slice(0,32);return r||t.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"objective"}function h(e,t,r="objective"){let i=y(r),a=y(e,i),o=a,n=2;for(;t.has(o);){let e=`-${n}`,t=Math.max(1,32-e.length);o=`${a.slice(0,t)}${e}`,n+=1}return t.add(o),o}function j(e,t,r){return h(e,new Set(t.filter(e=>e.id!==r).map(e=>y(e.key||e.title||e.id))),r??e)}function b(e){var t;if(!o(e))return null;let r=d(e.updatedAt??e.createdAt),i=d(e.createdAt,r);return{id:u(e.id,n("objective")),title:u(e.title,"Untitled objective"),teamId:u(e.teamId??e.team_id??e.ownerTeamId),key:y(u(e.key??e.slug??e.label),u(e.title??e.id,"objective")),threadId:u(e.threadId)||null,chatSessionVersion:function(e,t=0){return"number"==typeof e&&Number.isFinite(e)?Math.max(0,Math.floor(e)):t}(e.chatSessionVersion,0),scheduledTaskIds:Array.isArray(t=e.scheduledTaskIds??e.promptJobIds)?Array.from(new Set(t.map(e=>"string"==typeof e?e.trim():"").filter(Boolean))):[],summary:u(e.summary),progress:p(e.progress),status:f(e.status),createdAt:i,updatedAt:r}}function g(e){if(!o(e))return null;let t=d(e.updatedAt??e.createdAt),r=d(e.createdAt,t),i=u(e.objectiveId??e.goalId);return i?{id:u(e.id,n("objective_activity")),objectiveId:i,sourceType:"note",sourceLabel:u(e.sourceLabel,"Update"),title:u(e.title,"Untitled activity"),body:u(e.body),createdAt:r,updatedAt:t,relatedTaskId:u(e.relatedTaskId)||null}:null}function A(e){if(!o(e))return null;let t=u(e.activityId);return t?{id:u(e.id,n("objective_thread_message")),activityId:t,author:u(e.author,"You"),body:u(e.body),createdAt:d(e.createdAt)}:null}function R(){return{objectives:[],activities:[],activityThreads:{}}}function w(e){let t;if(!o(e))return R();let r=Array.isArray(e.objectives)?e.objectives.map(e=>b(e)).filter(e=>null!==e):[],i=Array.isArray(e.activities)?e.activities.map(e=>g(e)).filter(e=>null!==e):[],a=o(e.activityThreads)?Object.fromEntries(Object.entries(e.activityThreads).map(([e,t])=>[e,c(Array.isArray(t)?t.map(e=>A(e)).filter(e=>null!==e):[])])):{};return{objectives:s((t=new Set,r.map(e=>{let r=h(e.key||e.title||e.id,t,e.id||e.title||"objective");return e.key===r?e:{...e,key:r}}))),activities:l(i),activityThreads:a}}function E(e){if(!o(e))return R();let i=e[t];if(void 0!==i){let e=w(i);if(e.objectives.length>0||e.activities.length>0||Object.keys(e.activityThreads).length>0)return e}let a=e[r];if(void 0!==a){if(!o(a))return R();let e=Array.isArray(a.goals)?a.goals.map(e=>(function(e){if(!o(e))return null;let t=u(e.target),r=[u(e.summary),t?`Measure: ${t}`:""].filter(Boolean).join("\n\n");return b({...e,summary:r})})(e)).filter(e=>null!==e):[],t=Array.isArray(a.manualActivities)?a.manualActivities.map(e=>g({...e,sourceLabel:"Update"})).filter(e=>null!==e):[],r=o(a.activityThreads)?Object.fromEntries(Object.entries(a.activityThreads).map(([e,t])=>[e,c(Array.isArray(t)?t.map(t=>A({...t,activityId:e})).filter(e=>null!==e):[])])):{};return{objectives:s(e),activities:l(t),activityThreads:r}}return R()}function P(e,i){let a={...e};return delete a[r],a[t]=w(i),a}function I(e,t){let r={...e};return t?r[i]={progress:p(t.progress),status:f(t.status),updatedAt:d(t.updatedAt),...t.source?{source:t.source.trim()}:{},...t.objectiveId?{objectiveId:t.objectiveId}:{},...t.objectiveKey?{objectiveKey:t.objectiveKey}:{},...t.note?{note:t.note.trim()}:{}}:delete r[i],r}function O(e,t){let r=e.objectives.findIndex(e=>e.id===t.id)>=0?e.objectives.map(e=>e.id===t.id?t:e):[t,...e.objectives];return{...e,objectives:s(r)}}e.s(["PROJECT_OBJECTIVES_METADATA_KEY",0,t,"generateProjectObjectiveKey",()=>j,"normalizeProjectHealthProgress",()=>m,"normalizeProjectHealthStatus",()=>v,"readProjectObjectivesWorkspace",()=>E,"upsertProjectObjective",()=>O,"writeProjectHealthSnapshot",()=>I,"writeProjectObjectivesWorkspace",()=>P])},901977,e=>{"use strict";e.i(712513);var t=e.i(764541),r=e.i(744071),i=e.i(765443),a=e.i(671182);async function o(e,i){let a=await t.db.getProjectWithRepos(e,r.LOCAL_USER.id);if(!a)return null;let o=n(a),s=o.objectives.find(e=>e.id===i)??null;return s?{project:a,workspace:o,objective:s}:null}function n(e){let t=e.slug??e.id,r=(0,a.getObjectiveRepository)(t);return r.hasFiles()?r.readWorkspace():(0,i.readProjectObjectivesWorkspace)(e.metadata)}async function s(e){let o=await t.db.getProjectWithRepos(e.projectId,r.LOCAL_USER.id),n=o?.slug??e.projectId;(0,a.getObjectiveRepository)(n).writeWorkspace(e.workspace);let s=(0,i.writeProjectObjectivesWorkspace)(e.currentMetadata??{},e.workspace),c=e.transformMetadata?e.transformMetadata(s):s;return t.db.updateProject(e.projectId,r.LOCAL_USER.id,{metadata:c})}async function c(e){return t.db.updateProject(e.projectId,r.LOCAL_USER.id,{metadata:(0,i.writeProjectHealthSnapshot)(e.currentMetadata??{},e.snapshot)})}async function l(e){return t.db.updateProject(e.projectId,r.LOCAL_USER.id,{metadata:e.transformMetadata(e.currentMetadata??{})})}e.s(["loadProjectObjectiveContext",()=>o,"loadProjectObjectiveWorkspace",()=>n,"persistProjectHealthSnapshot",()=>c,"persistProjectObjectiveMetadata",()=>l,"persistProjectObjectiveWorkspace",()=>s])},341858,e=>{"use strict";function t(e,t,r){return t?e.objectives.find(e=>e.teamId===t&&e.id!==r)??null:null}function r(e){if("string"==typeof e)return e.trim()||void 0}function i(e){return null===e?null:"string"==typeof e?e.trim():void 0}function a(e){if(Array.isArray(e))return Array.from(new Set(e.map(e=>"string"==typeof e?e.trim():"").filter(Boolean)))}e.i(712513),e.i(901977),e.s(["findObjectiveAssignedToTeam",()=>t,"readNullableString",()=>i,"readOptionalString",()=>r,"readStringArray",()=>a])},645363,e=>{"use strict";var t=e.i(692988),r=e.i(635595),i=e.i(75473),a=e.i(923435),o=e.i(418475),n=e.i(303482),s=e.i(976287),c=e.i(774462),l=e.i(111998),u=e.i(201516),d=e.i(68877),p=e.i(259460),f=e.i(257714),v=e.i(502073),m=e.i(187345),y=e.i(193695);e.i(293777);var h=e.i(274321),j=e.i(254799),b=e.i(732470);e.i(341858);var g=e.i(901977);e.i(36336),e.i(717245);var A=e.i(124985);e.i(650837);var R=e.i(640911);let w=new Set(["metric-check","status-update","milestone","note"]);async function E(e){let t=await e,r="string"==typeof t?.id?t.id.trim():"",i="string"==typeof t?.objectiveId?t.objectiveId.trim():"";return r&&i?{projectId:r,objectiveId:i}:null}async function P(e,t){try{let r=await E(t.params);if(!r)return b.NextResponse.json({error:"Objective not found"},{status:404});let i=await (0,g.loadProjectObjectiveContext)(r.projectId,r.objectiveId);if(!i)return b.NextResponse.json({error:"Objective not found"},{status:404});let{project:a,objective:o}=i,n=a.slug??a.id,s=(0,A.getActivityRepository)(n,o.key),c=e.nextUrl,l=c.searchParams.get("type"),u=l&&w.has(l)?l:void 0,d=s.list({type:u,source:c.searchParams.get("source")??void 0,from:c.searchParams.get("from")??void 0,to:c.searchParams.get("to")??void 0,page:parseInt(c.searchParams.get("page")??"",10)||void 0,limit:parseInt(c.searchParams.get("limit")??"",10)||void 0});return b.NextResponse.json(d)}catch(e){return R.logger.error("Failed to load activities",R.logger.formatError(e)),b.NextResponse.json({error:"Failed to load activities"},{status:500})}}async function I(e,t){try{let r=await E(t.params);if(!r)return b.NextResponse.json({error:"Objective not found"},{status:404});let i=await (0,g.loadProjectObjectiveContext)(r.projectId,r.objectiveId);if(!i)return b.NextResponse.json({error:"Objective not found"},{status:404});let a=await e.json(),o=a?.type,n="string"==typeof a?.body?a.body.trim():"";if(!o||!w.has(o))return b.NextResponse.json({error:"Invalid type. Must be one of: metric-check, status-update, milestone, note"},{status:400});if(!n)return b.NextResponse.json({error:"Body is required"},{status:400});let{project:s,objective:c}=i,l=s.slug??s.id,u=(0,A.getActivityRepository)(l,c.key),d={id:(0,j.randomUUID)(),source:"manual",objectiveLabel:c.key,createdAt:new Date().toISOString(),type:o,body:n};return u.append(d),b.NextResponse.json(d,{status:201})}catch(e){return R.logger.error("Failed to create activity",R.logger.formatError(e)),b.NextResponse.json({error:"Failed to create activity"},{status:500})}}e.s(["GET",()=>P,"POST",()=>I,"dynamic",0,"force-dynamic","runtime",0,"nodejs"],328966);var O=e.i(328966);let S=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/projects/[id]/objectives/[objectiveId]/activities/route",pathname:"/api/projects/[id]/objectives/[objectiveId]/activities",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/apps/local/app/api/projects/[id]/objectives/[objectiveId]/activities/route.ts",nextConfigOutput:"standalone",userland:O}),{workAsyncStorage:x,workUnitAsyncStorage:C,serverHooks:N}=S;function T(){return(0,i.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:C})}async function k(e,t,i){S.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let j="/api/projects/[id]/objectives/[objectiveId]/activities/route";j=j.replace(/\/index$/,"")||"/";let b=await S.prepare(e,t,{srcPage:j,multiZoneDraftMode:!1});if(!b)return t.statusCode=400,t.end("Bad Request"),null==i.waitUntil||i.waitUntil.call(i,Promise.resolve()),null;let{buildId:g,params:A,nextConfig:R,parsedUrl:w,isDraftMode:E,prerenderManifest:P,routerServerContext:I,isOnDemandRevalidate:O,revalidateOnlyGenerated:x,resolvedPathname:C,clientReferenceManifest:N,serverActionsManifest:T}=b,k=(0,s.normalizeAppPath)(j),_=!!(P.dynamicRoutes[k]||P.routes[C]),D=async()=>((null==I?void 0:I.render404)?await I.render404(e,t,w,!1):t.end("This page could not be found"),null);if(_&&!E){let e=!!P.routes[C],t=P.dynamicRoutes[k];if(t&&!1===t.fallback&&!e){if(R.experimental.adapterPath)return await D();throw new y.NoFallbackError}}let M=null;!_||S.isDev||E||(M="/index"===(M=C)?"/":M);let U=!0===S.isDev||!_,L=_&&!U;T&&N&&(0,n.setManifestsSingleton)({page:j,clientReferenceManifest:N,serverActionsManifest:T});let $=e.method||"GET",H=(0,o.getTracer)(),F=H.getActiveScopeSpan(),q={params:A,prerenderManifest:P,renderOpts:{experimental:{authInterrupts:!!R.experimental.authInterrupts},cacheComponents:!!R.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:R.cacheLife,waitUntil:i.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,i,a)=>S.onRequestError(e,t,i,a,I)},sharedContext:{buildId:g}},K=new c.NodeNextRequest(e),W=new c.NodeNextResponse(t),B=l.NextRequestAdapter.fromNodeNextRequest(K,(0,l.signalFromNodeResponse)(t));try{let n=async e=>S.handle(B,q).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let i=r.get("next.route");if(i){let t=`${$} ${i}`;e.setAttributes({"next.route":i,"http.route":i,"next.span_name":t}),e.updateName(t)}else e.updateName(`${$} ${j}`)}),s=!!(0,a.getRequestMeta)(e,"minimalMode"),c=async a=>{var o,c;let l=async({previousCacheEntry:r})=>{try{if(!s&&O&&x&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await n(a);e.fetchMetrics=q.renderOpts.fetchMetrics;let c=q.renderOpts.pendingWaitUntil;c&&i.waitUntil&&(i.waitUntil(c),c=void 0);let l=q.renderOpts.collectedTags;if(!_)return await (0,p.sendResponse)(K,W,o,q.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(o.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==q.renderOpts.collectedRevalidate&&!(q.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&q.renderOpts.collectedRevalidate,i=void 0===q.renderOpts.collectedExpire||q.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:q.renderOpts.collectedExpire;return{value:{kind:h.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:i}}}}catch(t){throw(null==r?void 0:r.isStale)&&await S.onRequestError(e,t,{routerKind:"App Router",routePath:j,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:L,isOnDemandRevalidate:O})},!1,I),t}},u=await S.handleResponse({req:e,nextConfig:R,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:x,responseGenerator:l,waitUntil:i.waitUntil,isMinimalMode:s});if(!_)return null;if((null==u||null==(o=u.value)?void 0:o.kind)!==h.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(c=u.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",O?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),E&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let y=(0,f.fromNodeOutgoingHttpHeaders)(u.value.headers);return s&&_||y.delete(m.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||y.get("Cache-Control")||y.set("Cache-Control",(0,v.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(K,W,new Response(u.value.body,{headers:y,status:u.value.status||200})),null};F?await c(F):await H.withPropagatedContext(e.headers,()=>H.trace(u.BaseServerSpan.handleRequest,{spanName:`${$} ${j}`,kind:o.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},c))}catch(t){if(t instanceof y.NoFallbackError||await S.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:L,isOnDemandRevalidate:O})},!1,I),_)throw t;return await (0,p.sendResponse)(K,W,new Response(null,{status:500})),null}}e.s(["handler",()=>k,"patchFetch",()=>T,"routeModule",()=>S,"serverHooks",()=>N,"workAsyncStorage",()=>x,"workUnitAsyncStorage",()=>C],645363)}];
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=apps_local_25136564._.js.map
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
module.exports=[11061,e=>{"use strict";var t=e.i(522734),r=e.i(446786),s=e.i(814747),i=e.i(769025);let{DatabaseSync:a}=process.getBuiltinModule("node:sqlite"),n=process.env.AGX_GROUP_CHAT_DIR?.trim()||s.default.join(r.default.homedir(),".agx","group-chat"),o=s.default.join(n,"history.sqlite");function c(e){return"scripted"===e?"scripted":"chat"}function u(e){let t,r=e.chat_created_at??e.created_at,s=e.chat_completed_at??null,i=function(e,t){switch(e){case"queued":return"queued";case"running":case"awaiting_user":case"blocked":return"running";case"completed":return"success";case"failed":return"failed";case"cancelled":return"cancelled";default:return t}}(e.chat_status,e.status);return{id:e.id,projectId:e.project_id,projectSlug:e.project_slug,issueId:e.issue_id,issueIdentifier:e.issue_identifier,issueTitle:e.issue_title,issueStatus:e.issue_status,issueAssignee:e.issue_assignee,threadId:e.thread_id,rootMessageId:e.root_message_id,chatRunId:e.chat_run_id,agentId:e.agent_id,agentName:e.agent_name,mode:c(e.mode),sessionTitle:"chat"===c(e.mode)&&(t=String(e.root_content??"").replace(/\[reaction\s+[^\]]*\]/gi,"").replace(/\[agx:[^\]]*\]/g,"").replace(/\[checkpoint\]/g,"").replace(/\[criteria:\s*[^\]]*\]/g,"").replace(/\[done\]/g,"").replace(/\[blocked[^\]]*\]/g,"").replace(/^\[SKIP\]$/gm,"").replace(/\s+/g," ").trim())?t.length>72?`${t.slice(0,69).trimEnd()}...`:t:null,status:i,durationMs:null!=s?Math.max(s-r,0):null,lastError:e.chat_last_error??e.error,recapFilePath:e.recap_file_path??null,startedAt:new Date(r).toISOString(),updatedAt:new Date((e.chat_updated_at??e.updated_at)||e.updated_at).toISOString(),completedAt:"number"==typeof s?new Date(s).toISOString():null}}async function l(e){await t.promises.mkdir(n,{recursive:!0});let r=new a(o);(0,i.pragmaSet)(r,"journal_mode = WAL");try{r.exec(`
|
|
2
|
-
CREATE TABLE IF NOT EXISTS chat_runs (
|
|
3
|
-
id TEXT PRIMARY KEY,
|
|
4
|
-
thread_id TEXT NOT NULL,
|
|
5
|
-
root_message_id TEXT,
|
|
6
|
-
user_id TEXT NOT NULL,
|
|
7
|
-
project_slug TEXT,
|
|
8
|
-
status TEXT NOT NULL,
|
|
9
|
-
current_step INTEGER NOT NULL DEFAULT 0,
|
|
10
|
-
max_steps INTEGER NOT NULL DEFAULT 10,
|
|
11
|
-
steps_used INTEGER NOT NULL DEFAULT 0,
|
|
12
|
-
last_error TEXT,
|
|
13
|
-
active_participant_ids TEXT NOT NULL DEFAULT '[]',
|
|
14
|
-
payload_json TEXT,
|
|
15
|
-
result_json TEXT,
|
|
16
|
-
created_at INTEGER NOT NULL,
|
|
17
|
-
updated_at INTEGER NOT NULL,
|
|
18
|
-
completed_at INTEGER
|
|
19
|
-
);
|
|
20
|
-
CREATE TABLE IF NOT EXISTS messages (
|
|
21
|
-
thread_id TEXT NOT NULL,
|
|
22
|
-
id TEXT NOT NULL,
|
|
23
|
-
role TEXT NOT NULL,
|
|
24
|
-
participant_id TEXT,
|
|
25
|
-
content TEXT NOT NULL,
|
|
26
|
-
timestamp INTEGER NOT NULL,
|
|
27
|
-
root_message_id TEXT,
|
|
28
|
-
parent_message_id TEXT,
|
|
29
|
-
depth INTEGER NOT NULL DEFAULT 0,
|
|
30
|
-
thread_status TEXT,
|
|
31
|
-
outcome_note TEXT,
|
|
32
|
-
PRIMARY KEY (thread_id, id)
|
|
33
|
-
);
|
|
34
|
-
CREATE TABLE IF NOT EXISTS linear_runs (
|
|
35
|
-
id TEXT PRIMARY KEY,
|
|
36
|
-
project_id TEXT,
|
|
37
|
-
project_slug TEXT,
|
|
38
|
-
issue_id TEXT NOT NULL,
|
|
39
|
-
issue_identifier TEXT NOT NULL,
|
|
40
|
-
issue_title TEXT NOT NULL,
|
|
41
|
-
issue_status TEXT NOT NULL,
|
|
42
|
-
issue_assignee TEXT,
|
|
43
|
-
thread_id TEXT NOT NULL,
|
|
44
|
-
root_message_id TEXT,
|
|
45
|
-
chat_run_id TEXT,
|
|
46
|
-
agent_id TEXT NOT NULL,
|
|
47
|
-
agent_name TEXT NOT NULL,
|
|
48
|
-
mode TEXT NOT NULL DEFAULT 'chat',
|
|
49
|
-
status TEXT NOT NULL DEFAULT 'queued',
|
|
50
|
-
error TEXT,
|
|
51
|
-
recap_file_path TEXT,
|
|
52
|
-
created_at INTEGER NOT NULL,
|
|
53
|
-
updated_at INTEGER NOT NULL
|
|
54
|
-
);
|
|
55
|
-
CREATE INDEX IF NOT EXISTS idx_linear_runs_issue_created
|
|
56
|
-
ON linear_runs (issue_id, created_at DESC);
|
|
57
|
-
CREATE INDEX IF NOT EXISTS idx_linear_runs_project_issue_created
|
|
58
|
-
ON linear_runs (project_id, issue_id, created_at DESC);
|
|
59
|
-
CREATE UNIQUE INDEX IF NOT EXISTS idx_linear_runs_chat_run_id
|
|
60
|
-
ON linear_runs (chat_run_id)
|
|
61
|
-
WHERE chat_run_id IS NOT NULL;
|
|
62
|
-
`);let t=r.prepare("PRAGMA table_info(linear_runs)").all();return t.some(e=>"mode"===e.name)||r.exec("ALTER TABLE linear_runs ADD COLUMN mode TEXT NOT NULL DEFAULT 'chat';"),t.some(e=>"recap_file_path"===e.name)||r.exec("ALTER TABLE linear_runs ADD COLUMN recap_file_path TEXT;"),e(r)}finally{r.close()}}async function d(e){var t;let r=e.issueId.trim(),s=(t=e.projectId??null,t?.trim()||null),i=Number.isFinite(e.limit)?Math.min(Math.max(Number(e.limit),1),100):50;return l(e=>{let t=[r],a=["lr.issue_id = ?"];return s&&(a.push("lr.project_id = ?"),t.push(s)),t.push(i),e.prepare(`SELECT
|
|
63
|
-
lr.*,
|
|
64
|
-
cr.status AS chat_status,
|
|
65
|
-
cr.last_error AS chat_last_error,
|
|
66
|
-
cr.created_at AS chat_created_at,
|
|
67
|
-
cr.updated_at AS chat_updated_at,
|
|
68
|
-
cr.completed_at AS chat_completed_at,
|
|
69
|
-
msg.content AS root_content
|
|
70
|
-
FROM linear_runs lr
|
|
71
|
-
LEFT JOIN chat_runs cr ON cr.id = (
|
|
72
|
-
SELECT id FROM chat_runs WHERE thread_id = lr.thread_id ORDER BY updated_at DESC LIMIT 1
|
|
73
|
-
)
|
|
74
|
-
LEFT JOIN messages msg ON msg.thread_id = lr.thread_id AND msg.id = lr.root_message_id
|
|
75
|
-
WHERE ${a.join(" AND ")}
|
|
76
|
-
ORDER BY lr.created_at DESC
|
|
77
|
-
LIMIT ?`).all(...t).map(u)})}async function p(e){return l(t=>{let r=e?.trim(),s=r?`SELECT DISTINCT lr.issue_id, lr.agent_id, lr.agent_name
|
|
78
|
-
FROM linear_runs lr
|
|
79
|
-
INNER JOIN chat_runs cr ON cr.id = (
|
|
80
|
-
SELECT id FROM chat_runs WHERE thread_id = lr.thread_id ORDER BY updated_at DESC LIMIT 1
|
|
81
|
-
)
|
|
82
|
-
WHERE cr.status IN ('queued', 'running')
|
|
83
|
-
AND lr.project_id = ?`:`SELECT DISTINCT lr.issue_id, lr.agent_id, lr.agent_name
|
|
84
|
-
FROM linear_runs lr
|
|
85
|
-
INNER JOIN chat_runs cr ON cr.id = (
|
|
86
|
-
SELECT id FROM chat_runs WHERE thread_id = lr.thread_id ORDER BY updated_at DESC LIMIT 1
|
|
87
|
-
)
|
|
88
|
-
WHERE cr.status IN ('queued', 'running')`;return(r?t.prepare(s).all(e.trim()):t.prepare(s).all()).map(e=>({issueId:e.issue_id,agentId:e.agent_id,agentName:e.agent_name}))})}e.s(["getIssueActiveAgents",()=>p,"listLinearRuns",()=>d])},720395,e=>{"use strict";var t=e.i(84516),r=e.i(29764),s=e.i(11061),i=e.i(124985);e.i(243174);var a=e.i(248821),n=e.i(901977);let o="project_objective_health_history",c={"on track":"on_track","at risk":"at_risk","off track":"off_track",done:"done"};function u(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function l(e){return"number"==typeof e&&Number.isFinite(e)?Math.max(0,Math.min(100,Math.round(e))):0}function d(e){return"string"==typeof e&&e.trim()?e.trim():void 0}function p(...e){let t=e.flatMap(e=>e??[]),r=[];for(let e of[...t].sort((e,t)=>Date.parse(e.recordedAt)-Date.parse(t.recordedAt))){let t=r[r.length-1]??null;t&&t.progress===e.progress&&t.status===e.status&&(!t.source||!e.source||t.source===e.source)&&5e3>=Math.abs(Date.parse(e.recordedAt)-Date.parse(t.recordedAt))||r.push(e)}return r}var T=e.i(460275),_=e.i(765443);let E={on_track:"On track",at_risk:"At risk",off_track:"Off track",done:"Done"};async function m(e){let t=Date.now(),r="";try{return await (0,T.runCliResponse)({provider:e.provider,model:e.model,prompt:e.prompt,identity:e.identity,self:e.self,skills:e.skills,systemContext:e.systemContext,passthroughArgs:e.cliArgs?e.cliArgs.split(/\s+/).filter(Boolean):void 0,onDelta:e=>{r+=e},onSpawn:e.onSpawn}),{output:r,error:"",durationMs:Date.now()-t,status:"success"}}catch(e){return{output:r,error:e instanceof Error?e.message:String(e),durationMs:Date.now()-t,status:"failed"}}}function g(e){try{let t=JSON.parse(e);return t&&"object"==typeof t&&!Array.isArray(t)?t:null}catch{return null}}function h(e){let t=e.trim();if(!t)return null;let r=g(t);if(r)return r;let s=t.indexOf("{"),i=t.lastIndexOf("}");return -1===s||i<=s?null:g(t.slice(s,i+1))}function N(e){return"number"==typeof e&&Number.isFinite(e)?(0,_.normalizeProjectHealthProgress)(e):null}function j(e){return"string"==typeof e&&e.trim()?(0,_.normalizeProjectHealthStatus)(e):null}function I(e,t,r){return`${e}: ${t}% ${E[r]}`}function f(e){return[`- id: ${e.id}`,` identifier: ${e.identifier}`,` title: ${e.title}`,` status: ${e.status}`,` assignee: ${e.assignee??"Unassigned"}`,e.url?` url: ${e.url}`:null].filter(e=>!!e).join("\n")}async function b(e){let{job:n,objectiveContext:o}=e,{project:c,workspace:u,objective:l}=o,d=c.slug??c.id,[{issues:p},T,_,E]=await Promise.all([(0,r.listObjectiveTrackerIssues)({projectId:c.id,objectiveKey:l.key,projectSlug:d,refresh:!0}),(0,s.getIssueActiveAgents)(c.id),Promise.resolve((0,i.getActivityRepository)(d,l.key).list({limit:20})),Promise.resolve((0,a.getNoteRepository)(d,l.key).readAll())]),m=new Set(p.map(e=>e.id)),g=T.filter(e=>m.has(e.issueId)),h=(0,r.filterObjectiveTrackerIssuesForAction)(p,g.map(e=>e.issueId)),N=(0,t.getPromptJobStore)().listJobs({objectiveId:l.id}).filter(e=>e.id!==n.id),j=u.objectives.filter(e=>e.id!==l.id),I=[];I.push("GOAL",l.title,l.summary?.trim()||"No summary provided."),I.push("","CURRENT STATE",`Progress: ${l.progress}% | Status: ${l.status}`),E.length>0&&I.push("","NOTES",...E.map(e=>`### ${e.title}
|
|
89
|
-
${e.body}`));let b=_.activities??[];return b.length>0&&I.push("","RECENT ACTIVITY",...b.map(e=>{let t=e.createdAt.replace("T"," ").replace(/\.\d+Z$/,"").slice(0,16);return`- [${t}] ${e.body.split("\n")[0]}`})),p.length>0?I.push("","LINEAR TICKETS",p.map(e=>f(e)).join("\n\n")):I.push("","LINEAR TICKETS","- None."),g.length>0&&I.push("","ACTIVE SESSIONS",...g.map(e=>`- ${e.issueId}: running with ${e.agentName}`)),N.length>0&&I.push("","SCHEDULED TASKS",...N.map(e=>`- ${e.name} | state: ${e.state} | last outcome: ${e.lastOutcome??"none"}`)),j.length>0&&I.push("","PROJECT CONTEXT",...j.map(e=>`- ${e.title} (${e.key}) | ${e.progress}% | ${e.status}`)),I.push("","GUIDANCE",n.prompt.trim()||"No additional guidance provided."),I.push("","ELIGIBLE TICKETS",h.length>0?h.map(e=>f(e)).join("\n\n"):"- None."),I.push("","---","What single action most advances this objective right now?"),{prompt:I.join("\n"),issues:p,eligibleIssues:h,activeIssueAgents:g}}async function L(t){let r=Date.now();try{if(!t.job.projectId||!t.job.objectiveId)throw Error("Objective worker jobs require projectId and objectiveId.");let s=await (0,n.loadProjectObjectiveContext)(t.job.projectId,t.job.objectiveId);if(!s)throw Error("Objective context could not be resolved for this scheduled task.");let i=await b({job:t.job,objectiveContext:s}),a=await m({...t.controllerContext,prompt:i.prompt,systemContext:'You are deciding what action an objective worker should take next.\nReturn ONLY raw JSON with no markdown fences or commentary.\nValid responses:\n{"action":"work_ticket","ticketId":"ticket-id","reason":"...","objectiveProgress":42,"objectiveStatus":"at_risk","projectProgress":35,"projectStatus":"at_risk"}\n{"action":"run_prompt","prompt":"detailed instructions","reason":"...","objectiveProgress":42,"objectiveStatus":"at_risk"}\n{"action":"stop","reason":"...","objectiveProgress":42,"objectiveStatus":"at_risk"}\nRules:\n- "work_ticket": ticketId must exactly match one of the ELIGIBLE TICKETS ids.\n- "run_prompt": for work not captured by existing tickets. When no tickets are actionable and the objective is not done, use this to plan: review notes, refine the last plan, or outline next steps. The prompt should instruct the agent to append to an existing note when one is relevant rather than creating a new note.\n- "stop": only when the objective is done or genuinely no action (including planning) adds value.\nPercentages must be integers 0-100.\nStatuses: on_track, at_risk, off_track, done.',cliArgs:t.cliArgs,onSpawn:t.onSpawn});if("success"!==a.status)return{...a,output:a.output||"Objective controller failed before selecting an action."};let T=h(a.output),E="string"==typeof T?.action?T.action.trim().toLowerCase():"string"==typeof T?.decision?T.decision.trim().toLowerCase():"",g="work"===E?"work_ticket":E;if(!g){let e=a.output??"";console.warn(`[objective-worker] empty action from controller (job=${t.job.id}, outputLen=${e.length}, parsed=${T?"object":"null"}):`,e.slice(0,500))}let f="string"==typeof T?.reason?T.reason.trim():"",L=N(T?.objectiveProgress),O=j(T?.objectiveStatus),v=N(T?.projectProgress),A=j(T?.projectStatus),S="string"==typeof T?.projectNote?T.projectNote.trim():"",y="string"==typeof T?.objectiveNote?T.objectiveNote.trim():"",R=new Date().toISOString(),k=null!==L&&O?I("Objective health",L,O):null,w=null!==v&&A?I("Project health",v,A):null,D=null!==L&&null!==O?{objectiveId:s.objective.id,objectiveKey:s.objective.key,progress:L,status:O,recordedAt:R,source:`scheduled-task:${t.job.id}`,note:y||void 0}:null,X=null!==L&&null!==O&&(L!==s.objective.progress||O!==s.objective.status),C=X?(0,_.upsertProjectObjective)(s.workspace,{...s.objective,progress:L,status:O,updatedAt:R}):s.workspace,U=null!==v&&null!==A?{progress:v,status:A,updatedAt:R,source:`scheduled-task:${t.job.id}`,objectiveId:s.objective.id,objectiveKey:s.objective.key,note:S||void 0}:null,M=e=>{let t=e;return U&&(t=(0,_.writeProjectHealthSnapshot)(t,U)),D&&(t=function(e,t){let r=t.objectiveId.trim();if(!r)return e;let s=function(e,t){if(!u(e)||!t.trim())return[];let r=e[o];if(!u(r))return[];let s=r[t.trim()];return Array.isArray(s)?p(s.map(e=>(function(e){if(!u(e))return null;let t=function(e){if("string"!=typeof e)return null;let t=e.trim().toLowerCase();return"on_track"===t||"at_risk"===t||"off_track"===t||"done"===t?t:c[t]??null}(e.status),r=function(e){if("string"!=typeof e)return null;let t=Date.parse(e);return Number.isNaN(t)?null:new Date(t).toISOString()}(e.recordedAt);return t&&r?{progress:l(e.progress),status:t,recordedAt:r,source:d(e.source),note:d(e.note),objectiveId:d(e.objectiveId)??null,objectiveKey:d(e.objectiveKey)??null}:null})(e)).filter(e=>!!e)):[]}(e,r),i=p(s,[t]).slice(-200),a=u(e[o])?e[o]:{};return{...e,[o]:{...a,[r]:i.map(e=>({progress:l(e.progress),status:e.status,recordedAt:e.recordedAt,...e.source?{source:e.source}:{},...e.note?{note:e.note}:{},...e.objectiveId?{objectiveId:e.objectiveId}:{},...e.objectiveKey?{objectiveKey:e.objectiveKey}:{}}))}}}(t,D)),t};X?await (0,n.persistProjectObjectiveWorkspace)({projectId:s.project.id,currentMetadata:s.project.metadata,workspace:C,transformMetadata:M}):(D||U)&&await (0,n.persistProjectObjectiveMetadata)({projectId:s.project.id,currentMetadata:s.project.metadata,transformMetadata:M});let{dispatchObjectiveAction:$}=await e.A(688671),x=await $({action:g,parsed:T,reason:f,job:t.job,controllerContext:t.controllerContext,sessionAgent:t.sessionAgent,objectiveContext:s,eligibleIssues:i.eligibleIssues,issues:i.issues,healthSummaries:{objectiveHealthSummary:k,projectHealthSummary:w,objectiveNote:y,projectNote:S},cliArgs:t.cliArgs,onSpawn:t.onSpawn,startMs:r}),{logActionReceipt:P}=await e.A(688671);return await P(x,{jobId:t.job.id,projectId:t.job.projectId,objectiveId:t.job.objectiveId}),{output:x.result,error:"failed"===x.status?x.result:"",durationMs:Date.now()-r,status:x.status}}catch(e){return{output:"",error:e instanceof Error?e.message:String(e),durationMs:Date.now()-r,status:"failed"}}}e.s(["buildObjectiveObservation",()=>b,"executeObjectiveWorker",()=>L,"extractFirstJsonObject",()=>h],720395)},688671,e=>{e.v(e=>Promise.resolve().then(()=>e(917435)))}];
|
|
90
|
-
|
|
91
|
-
//# sourceMappingURL=apps_local_2caf4398._.js.map
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
module.exports=[11061,e=>{"use strict";var t=e.i(522734),r=e.i(446786),s=e.i(814747),i=e.i(769025);let{DatabaseSync:a}=process.getBuiltinModule("node:sqlite"),n=process.env.AGX_GROUP_CHAT_DIR?.trim()||s.default.join(r.default.homedir(),".agx","group-chat"),o=s.default.join(n,"history.sqlite");function c(e){return"scripted"===e?"scripted":"chat"}function u(e){let t,r=e.chat_created_at??e.created_at,s=e.chat_completed_at??null,i=function(e,t){switch(e){case"queued":return"queued";case"running":case"awaiting_user":case"blocked":return"running";case"completed":return"success";case"failed":return"failed";case"cancelled":return"cancelled";default:return t}}(e.chat_status,e.status);return{id:e.id,projectId:e.project_id,projectSlug:e.project_slug,issueId:e.issue_id,issueIdentifier:e.issue_identifier,issueTitle:e.issue_title,issueStatus:e.issue_status,issueAssignee:e.issue_assignee,threadId:e.thread_id,rootMessageId:e.root_message_id,chatRunId:e.chat_run_id,agentId:e.agent_id,agentName:e.agent_name,mode:c(e.mode),sessionTitle:"chat"===c(e.mode)&&(t=String(e.root_content??"").replace(/\[reaction\s+[^\]]*\]/gi,"").replace(/\[agx:[^\]]*\]/g,"").replace(/\[checkpoint\]/g,"").replace(/\[criteria:\s*[^\]]*\]/g,"").replace(/\[done\]/g,"").replace(/\[blocked[^\]]*\]/g,"").replace(/^\[SKIP\]$/gm,"").replace(/\s+/g," ").trim())?t.length>72?`${t.slice(0,69).trimEnd()}...`:t:null,status:i,durationMs:null!=s?Math.max(s-r,0):null,lastError:e.chat_last_error??e.error,recapFilePath:e.recap_file_path??null,startedAt:new Date(r).toISOString(),updatedAt:new Date((e.chat_updated_at??e.updated_at)||e.updated_at).toISOString(),completedAt:"number"==typeof s?new Date(s).toISOString():null}}async function l(e){await t.promises.mkdir(n,{recursive:!0});let r=new a(o);(0,i.pragmaSet)(r,"journal_mode = WAL");try{r.exec(`
|
|
2
|
-
CREATE TABLE IF NOT EXISTS chat_runs (
|
|
3
|
-
id TEXT PRIMARY KEY,
|
|
4
|
-
thread_id TEXT NOT NULL,
|
|
5
|
-
root_message_id TEXT,
|
|
6
|
-
user_id TEXT NOT NULL,
|
|
7
|
-
project_slug TEXT,
|
|
8
|
-
status TEXT NOT NULL,
|
|
9
|
-
current_step INTEGER NOT NULL DEFAULT 0,
|
|
10
|
-
max_steps INTEGER NOT NULL DEFAULT 10,
|
|
11
|
-
steps_used INTEGER NOT NULL DEFAULT 0,
|
|
12
|
-
last_error TEXT,
|
|
13
|
-
active_participant_ids TEXT NOT NULL DEFAULT '[]',
|
|
14
|
-
payload_json TEXT,
|
|
15
|
-
result_json TEXT,
|
|
16
|
-
created_at INTEGER NOT NULL,
|
|
17
|
-
updated_at INTEGER NOT NULL,
|
|
18
|
-
completed_at INTEGER
|
|
19
|
-
);
|
|
20
|
-
CREATE TABLE IF NOT EXISTS messages (
|
|
21
|
-
thread_id TEXT NOT NULL,
|
|
22
|
-
id TEXT NOT NULL,
|
|
23
|
-
role TEXT NOT NULL,
|
|
24
|
-
participant_id TEXT,
|
|
25
|
-
content TEXT NOT NULL,
|
|
26
|
-
timestamp INTEGER NOT NULL,
|
|
27
|
-
root_message_id TEXT,
|
|
28
|
-
parent_message_id TEXT,
|
|
29
|
-
depth INTEGER NOT NULL DEFAULT 0,
|
|
30
|
-
thread_status TEXT,
|
|
31
|
-
outcome_note TEXT,
|
|
32
|
-
PRIMARY KEY (thread_id, id)
|
|
33
|
-
);
|
|
34
|
-
CREATE TABLE IF NOT EXISTS linear_runs (
|
|
35
|
-
id TEXT PRIMARY KEY,
|
|
36
|
-
project_id TEXT,
|
|
37
|
-
project_slug TEXT,
|
|
38
|
-
issue_id TEXT NOT NULL,
|
|
39
|
-
issue_identifier TEXT NOT NULL,
|
|
40
|
-
issue_title TEXT NOT NULL,
|
|
41
|
-
issue_status TEXT NOT NULL,
|
|
42
|
-
issue_assignee TEXT,
|
|
43
|
-
thread_id TEXT NOT NULL,
|
|
44
|
-
root_message_id TEXT,
|
|
45
|
-
chat_run_id TEXT,
|
|
46
|
-
agent_id TEXT NOT NULL,
|
|
47
|
-
agent_name TEXT NOT NULL,
|
|
48
|
-
mode TEXT NOT NULL DEFAULT 'chat',
|
|
49
|
-
status TEXT NOT NULL DEFAULT 'queued',
|
|
50
|
-
error TEXT,
|
|
51
|
-
recap_file_path TEXT,
|
|
52
|
-
created_at INTEGER NOT NULL,
|
|
53
|
-
updated_at INTEGER NOT NULL
|
|
54
|
-
);
|
|
55
|
-
CREATE INDEX IF NOT EXISTS idx_linear_runs_issue_created
|
|
56
|
-
ON linear_runs (issue_id, created_at DESC);
|
|
57
|
-
CREATE INDEX IF NOT EXISTS idx_linear_runs_project_issue_created
|
|
58
|
-
ON linear_runs (project_id, issue_id, created_at DESC);
|
|
59
|
-
CREATE UNIQUE INDEX IF NOT EXISTS idx_linear_runs_chat_run_id
|
|
60
|
-
ON linear_runs (chat_run_id)
|
|
61
|
-
WHERE chat_run_id IS NOT NULL;
|
|
62
|
-
`);let t=r.prepare("PRAGMA table_info(linear_runs)").all();return t.some(e=>"mode"===e.name)||r.exec("ALTER TABLE linear_runs ADD COLUMN mode TEXT NOT NULL DEFAULT 'chat';"),t.some(e=>"recap_file_path"===e.name)||r.exec("ALTER TABLE linear_runs ADD COLUMN recap_file_path TEXT;"),e(r)}finally{r.close()}}async function d(e){var t;let r=e.issueId.trim(),s=(t=e.projectId??null,t?.trim()||null),i=Number.isFinite(e.limit)?Math.min(Math.max(Number(e.limit),1),100):50;return l(e=>{let t=[r],a=["lr.issue_id = ?"];return s&&(a.push("lr.project_id = ?"),t.push(s)),t.push(i),e.prepare(`SELECT
|
|
63
|
-
lr.*,
|
|
64
|
-
cr.status AS chat_status,
|
|
65
|
-
cr.last_error AS chat_last_error,
|
|
66
|
-
cr.created_at AS chat_created_at,
|
|
67
|
-
cr.updated_at AS chat_updated_at,
|
|
68
|
-
cr.completed_at AS chat_completed_at,
|
|
69
|
-
msg.content AS root_content
|
|
70
|
-
FROM linear_runs lr
|
|
71
|
-
LEFT JOIN chat_runs cr ON cr.id = (
|
|
72
|
-
SELECT id FROM chat_runs WHERE thread_id = lr.thread_id ORDER BY updated_at DESC LIMIT 1
|
|
73
|
-
)
|
|
74
|
-
LEFT JOIN messages msg ON msg.thread_id = lr.thread_id AND msg.id = lr.root_message_id
|
|
75
|
-
WHERE ${a.join(" AND ")}
|
|
76
|
-
ORDER BY lr.created_at DESC
|
|
77
|
-
LIMIT ?`).all(...t).map(u)})}async function p(e){return l(t=>{let r=e?.trim(),s=r?`SELECT DISTINCT lr.issue_id, lr.agent_id, lr.agent_name
|
|
78
|
-
FROM linear_runs lr
|
|
79
|
-
INNER JOIN chat_runs cr ON cr.id = (
|
|
80
|
-
SELECT id FROM chat_runs WHERE thread_id = lr.thread_id ORDER BY updated_at DESC LIMIT 1
|
|
81
|
-
)
|
|
82
|
-
WHERE cr.status IN ('queued', 'running')
|
|
83
|
-
AND lr.project_id = ?`:`SELECT DISTINCT lr.issue_id, lr.agent_id, lr.agent_name
|
|
84
|
-
FROM linear_runs lr
|
|
85
|
-
INNER JOIN chat_runs cr ON cr.id = (
|
|
86
|
-
SELECT id FROM chat_runs WHERE thread_id = lr.thread_id ORDER BY updated_at DESC LIMIT 1
|
|
87
|
-
)
|
|
88
|
-
WHERE cr.status IN ('queued', 'running')`;return(r?t.prepare(s).all(e.trim()):t.prepare(s).all()).map(e=>({issueId:e.issue_id,agentId:e.agent_id,agentName:e.agent_name}))})}e.s(["getIssueActiveAgents",()=>p,"listLinearRuns",()=>d])},720395,e=>{"use strict";var t=e.i(84516),r=e.i(29764),s=e.i(11061),i=e.i(124985);e.i(243174);var a=e.i(248821),n=e.i(901977);let o="project_objective_health_history",c={"on track":"on_track","at risk":"at_risk","off track":"off_track",done:"done"};function u(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function l(e){return"number"==typeof e&&Number.isFinite(e)?Math.max(0,Math.min(100,Math.round(e))):0}function d(e){return"string"==typeof e&&e.trim()?e.trim():void 0}function p(...e){let t=e.flatMap(e=>e??[]),r=[];for(let e of[...t].sort((e,t)=>Date.parse(e.recordedAt)-Date.parse(t.recordedAt))){let t=r[r.length-1]??null;t&&t.progress===e.progress&&t.status===e.status&&(!t.source||!e.source||t.source===e.source)&&5e3>=Math.abs(Date.parse(e.recordedAt)-Date.parse(t.recordedAt))||r.push(e)}return r}var T=e.i(460275),_=e.i(765443);let E={on_track:"On track",at_risk:"At risk",off_track:"Off track",done:"Done"};async function m(e){let t=Date.now(),r="";try{return await (0,T.runCliResponse)({provider:e.provider,model:e.model,prompt:e.prompt,identity:e.identity,self:e.self,skills:e.skills,systemContext:e.systemContext,passthroughArgs:e.cliArgs?e.cliArgs.split(/\s+/).filter(Boolean):void 0,onDelta:e=>{r+=e},onSpawn:e.onSpawn}),{output:r,error:"",durationMs:Date.now()-t,status:"success"}}catch(e){return{output:r,error:e instanceof Error?e.message:String(e),durationMs:Date.now()-t,status:"failed"}}}function g(e){try{let t=JSON.parse(e);return t&&"object"==typeof t&&!Array.isArray(t)?t:null}catch{return null}}function h(e){let t=e.trim();if(!t)return null;let r=g(t);if(r)return r;let s=t.indexOf("{"),i=t.lastIndexOf("}");return -1===s||i<=s?null:g(t.slice(s,i+1))}function N(e){return"number"==typeof e&&Number.isFinite(e)?(0,_.normalizeProjectHealthProgress)(e):null}function j(e){return"string"==typeof e&&e.trim()?(0,_.normalizeProjectHealthStatus)(e):null}function I(e,t,r){return`${e}: ${t}% ${E[r]}`}function f(e){return[`- id: ${e.id}`,` identifier: ${e.identifier}`,` title: ${e.title}`,` status: ${e.status}`,` assignee: ${e.assignee??"Unassigned"}`,e.url?` url: ${e.url}`:null].filter(e=>!!e).join("\n")}async function b(e){let{job:n,objectiveContext:o}=e,{project:c,workspace:u,objective:l}=o,d=c.slug??c.id,[{issues:p},T,_,E]=await Promise.all([(0,r.listObjectiveTrackerIssues)({projectId:c.id,objectiveKey:l.key,projectSlug:d,refresh:!0}),(0,s.getIssueActiveAgents)(c.id),Promise.resolve((0,i.getActivityRepository)(d,l.key).list({limit:20})),Promise.resolve((0,a.getNoteRepository)(d,l.key).readAll())]),m=new Set(p.map(e=>e.id)),g=T.filter(e=>m.has(e.issueId)),h=(0,r.filterObjectiveTrackerIssuesForAction)(p,g.map(e=>e.issueId)),N=(0,t.getPromptJobStore)().listJobs({objectiveId:l.id}).filter(e=>e.id!==n.id),j=u.objectives.filter(e=>e.id!==l.id),I=[];I.push("GOAL",l.title,l.summary?.trim()||"No summary provided."),I.push("","CURRENT STATE",`Progress: ${l.progress}% | Status: ${l.status}`),E.length>0&&I.push("","NOTES",...E.map(e=>`### ${e.title}
|
|
89
|
-
${e.body}`));let b=_.activities??[];return b.length>0&&I.push("","RECENT ACTIVITY",...b.map(e=>{let t=e.createdAt.replace("T"," ").replace(/\.\d+Z$/,"").slice(0,16);return`- [${t}] ${e.body.split("\n")[0]}`})),p.length>0?I.push("","LINEAR TICKETS",p.map(e=>f(e)).join("\n\n")):I.push("","LINEAR TICKETS","- None."),g.length>0&&I.push("","ACTIVE SESSIONS",...g.map(e=>`- ${e.issueId}: running with ${e.agentName}`)),N.length>0&&I.push("","SCHEDULED TASKS",...N.map(e=>`- ${e.name} | state: ${e.state} | last outcome: ${e.lastOutcome??"none"}`)),j.length>0&&I.push("","PROJECT CONTEXT",...j.map(e=>`- ${e.title} (${e.key}) | ${e.progress}% | ${e.status}`)),I.push("","GUIDANCE",n.prompt.trim()||"No additional guidance provided."),I.push("","ELIGIBLE TICKETS",h.length>0?h.map(e=>f(e)).join("\n\n"):"- None."),I.push("","---","What single action most advances this objective right now?"),{prompt:I.join("\n"),issues:p,eligibleIssues:h,activeIssueAgents:g}}async function L(t){let r=Date.now();try{if(!t.job.projectId||!t.job.objectiveId)throw Error("Objective worker jobs require projectId and objectiveId.");let s=await (0,n.loadProjectObjectiveContext)(t.job.projectId,t.job.objectiveId);if(!s)throw Error("Objective context could not be resolved for this scheduled task.");let i=await b({job:t.job,objectiveContext:s}),a=await m({...t.controllerContext,prompt:i.prompt,systemContext:'You are deciding what action an objective worker should take next.\nReturn ONLY raw JSON with no markdown fences or commentary.\nValid responses:\n{"action":"work_ticket","ticketId":"ticket-id","reason":"...","objectiveProgress":42,"objectiveStatus":"at_risk","projectProgress":35,"projectStatus":"at_risk"}\n{"action":"run_prompt","prompt":"detailed instructions","reason":"...","objectiveProgress":42,"objectiveStatus":"at_risk"}\n{"action":"stop","reason":"...","objectiveProgress":42,"objectiveStatus":"at_risk"}\nRules:\n- "work_ticket": ticketId must exactly match one of the ELIGIBLE TICKETS ids.\n- "run_prompt": for work not captured by existing tickets. When no tickets are actionable and the objective is not done, use this to plan: review notes, refine the last plan, or outline next steps. The prompt should instruct the agent to append to an existing note when one is relevant rather than creating a new note.\n- "stop": only when the objective is done or genuinely no action (including planning) adds value.\nPercentages must be integers 0-100.\nStatuses: on_track, at_risk, off_track, done.',cliArgs:t.cliArgs,onSpawn:t.onSpawn});if("success"!==a.status)return{...a,output:a.output||"Objective controller failed before selecting an action."};let T=h(a.output),E="string"==typeof T?.action?T.action.trim().toLowerCase():"string"==typeof T?.decision?T.decision.trim().toLowerCase():"",g="work"===E?"work_ticket":E;if(!g){let e=a.output??"";console.warn(`[objective-worker] empty action from controller (job=${t.job.id}, outputLen=${e.length}, parsed=${T?"object":"null"}):`,e.slice(0,500))}let f="string"==typeof T?.reason?T.reason.trim():"",L=N(T?.objectiveProgress),O=j(T?.objectiveStatus),v=N(T?.projectProgress),A=j(T?.projectStatus),S="string"==typeof T?.projectNote?T.projectNote.trim():"",y="string"==typeof T?.objectiveNote?T.objectiveNote.trim():"",R=new Date().toISOString(),k=null!==L&&O?I("Objective health",L,O):null,w=null!==v&&A?I("Project health",v,A):null,D=null!==L&&null!==O?{objectiveId:s.objective.id,objectiveKey:s.objective.key,progress:L,status:O,recordedAt:R,source:`scheduled-task:${t.job.id}`,note:y||void 0}:null,X=null!==L&&null!==O&&(L!==s.objective.progress||O!==s.objective.status),C=X?(0,_.upsertProjectObjective)(s.workspace,{...s.objective,progress:L,status:O,updatedAt:R}):s.workspace,U=null!==v&&null!==A?{progress:v,status:A,updatedAt:R,source:`scheduled-task:${t.job.id}`,objectiveId:s.objective.id,objectiveKey:s.objective.key,note:S||void 0}:null,M=e=>{let t=e;return U&&(t=(0,_.writeProjectHealthSnapshot)(t,U)),D&&(t=function(e,t){let r=t.objectiveId.trim();if(!r)return e;let s=function(e,t){if(!u(e)||!t.trim())return[];let r=e[o];if(!u(r))return[];let s=r[t.trim()];return Array.isArray(s)?p(s.map(e=>(function(e){if(!u(e))return null;let t=function(e){if("string"!=typeof e)return null;let t=e.trim().toLowerCase();return"on_track"===t||"at_risk"===t||"off_track"===t||"done"===t?t:c[t]??null}(e.status),r=function(e){if("string"!=typeof e)return null;let t=Date.parse(e);return Number.isNaN(t)?null:new Date(t).toISOString()}(e.recordedAt);return t&&r?{progress:l(e.progress),status:t,recordedAt:r,source:d(e.source),note:d(e.note),objectiveId:d(e.objectiveId)??null,objectiveKey:d(e.objectiveKey)??null}:null})(e)).filter(e=>!!e)):[]}(e,r),i=p(s,[t]).slice(-200),a=u(e[o])?e[o]:{};return{...e,[o]:{...a,[r]:i.map(e=>({progress:l(e.progress),status:e.status,recordedAt:e.recordedAt,...e.source?{source:e.source}:{},...e.note?{note:e.note}:{},...e.objectiveId?{objectiveId:e.objectiveId}:{},...e.objectiveKey?{objectiveKey:e.objectiveKey}:{}}))}}}(t,D)),t};X?await (0,n.persistProjectObjectiveWorkspace)({projectId:s.project.id,currentMetadata:s.project.metadata,workspace:C,transformMetadata:M}):(D||U)&&await (0,n.persistProjectObjectiveMetadata)({projectId:s.project.id,currentMetadata:s.project.metadata,transformMetadata:M});let{dispatchObjectiveAction:$}=await e.A(688671),x=await $({action:g,parsed:T,reason:f,job:t.job,controllerContext:t.controllerContext,sessionAgent:t.sessionAgent,objectiveContext:s,eligibleIssues:i.eligibleIssues,issues:i.issues,healthSummaries:{objectiveHealthSummary:k,projectHealthSummary:w,objectiveNote:y,projectNote:S},cliArgs:t.cliArgs,onSpawn:t.onSpawn,startMs:r}),{logActionReceipt:P}=await e.A(688671);return await P(x,{jobId:t.job.id,projectId:t.job.projectId,objectiveId:t.job.objectiveId}),{output:x.result,error:"failed"===x.status?x.result:"",durationMs:Date.now()-r,status:x.status}}catch(e){return{output:"",error:e instanceof Error?e.message:String(e),durationMs:Date.now()-r,status:"failed"}}}e.s(["buildObjectiveObservation",()=>b,"executeObjectiveWorker",()=>L,"extractFirstJsonObject",()=>h],720395)},688671,e=>{e.v(e=>Promise.resolve().then(()=>e(917435)))}];
|
|
90
|
-
|
|
91
|
-
//# sourceMappingURL=apps_local_31ca7a35._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[667597,a=>{"use strict";let b=(0,a.i(831709).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);a.s(["Pencil",()=>b],667597)},697183,a=>{"use strict";let b=(0,a.i(831709).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);a.s(["Trash2",()=>b],697183)},354658,a=>{"use strict";let b=(0,a.i(831709).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);a.s(["Save",()=>b],354658)},379065,a=>{"use strict";let b=(0,a.i(831709).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);a.s(["ExternalLink",()=>b],379065)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=9fb8c_lucide-react_dist_esm_icons_8c8ee1bc._.js.map
|