constellai 0.3.2 → 0.3.3
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +2 -2
- package/.next/server/app/(app)/activity/page.js +2 -2
- package/.next/server/app/(app)/activity/page.js.nft.json +1 -1
- package/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/agents/[handle]/page.js +3 -3
- package/.next/server/app/(app)/agents/[handle]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/agents/[handle]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/code/page.js +2 -2
- package/.next/server/app/(app)/code/page.js.nft.json +1 -1
- package/.next/server/app/(app)/code/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/config/page.js +2 -2
- package/.next/server/app/(app)/config/page.js.nft.json +1 -1
- package/.next/server/app/(app)/config/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/costs/page.js +2 -2
- package/.next/server/app/(app)/costs/page.js.nft.json +1 -1
- package/.next/server/app/(app)/costs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/cron/page.js +2 -2
- package/.next/server/app/(app)/cron/page.js.nft.json +1 -1
- package/.next/server/app/(app)/cron/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/dashboard/page.js +2 -2
- package/.next/server/app/(app)/dashboard/page.js.nft.json +1 -1
- package/.next/server/app/(app)/dashboard/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/design/page.js +13 -13
- package/.next/server/app/(app)/design/page.js.nft.json +1 -1
- package/.next/server/app/(app)/design/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/docs/[id]/page.js +2 -2
- package/.next/server/app/(app)/docs/[id]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/docs/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/docs/page.js +2 -2
- package/.next/server/app/(app)/docs/page.js.nft.json +1 -1
- package/.next/server/app/(app)/docs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/github/page.js +2 -2
- package/.next/server/app/(app)/github/page.js.nft.json +1 -1
- package/.next/server/app/(app)/github/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/goals/page.js +2 -2
- package/.next/server/app/(app)/goals/page.js.nft.json +1 -1
- package/.next/server/app/(app)/goals/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/inbox/page.js +2 -2
- package/.next/server/app/(app)/inbox/page.js.nft.json +1 -1
- package/.next/server/app/(app)/inbox/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/knowledge/page.js +3 -3
- package/.next/server/app/(app)/knowledge/page.js.nft.json +1 -1
- package/.next/server/app/(app)/knowledge/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/models/page.js +2 -2
- package/.next/server/app/(app)/models/page.js.nft.json +1 -1
- package/.next/server/app/(app)/models/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/notifications/page.js +2 -2
- package/.next/server/app/(app)/notifications/page.js.nft.json +1 -1
- package/.next/server/app/(app)/notifications/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/org/page.js +4 -4
- package/.next/server/app/(app)/org/page.js.nft.json +1 -1
- package/.next/server/app/(app)/org/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/organizations/page.js +2 -2
- package/.next/server/app/(app)/organizations/page.js.nft.json +1 -1
- package/.next/server/app/(app)/organizations/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/page.js +3 -3
- package/.next/server/app/(app)/page.js.nft.json +1 -1
- package/.next/server/app/(app)/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/planner/page.js +2 -2
- package/.next/server/app/(app)/planner/page.js.nft.json +1 -1
- package/.next/server/app/(app)/planner/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/plugins/page.js +2 -2
- package/.next/server/app/(app)/plugins/page.js.nft.json +1 -1
- package/.next/server/app/(app)/plugins/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/pm/page.js +2 -2
- package/.next/server/app/(app)/pm/page.js.nft.json +1 -1
- package/.next/server/app/(app)/pm/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/prepare-deploy/page.js +2 -2
- package/.next/server/app/(app)/prepare-deploy/page.js.nft.json +1 -1
- package/.next/server/app/(app)/prepare-deploy/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/profile/page.js +2 -2
- package/.next/server/app/(app)/profile/page.js.nft.json +1 -1
- package/.next/server/app/(app)/profile/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/pulse/page.js +2 -2
- package/.next/server/app/(app)/pulse/page.js.nft.json +1 -1
- package/.next/server/app/(app)/pulse/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/reports/[id]/page.js +2 -2
- package/.next/server/app/(app)/reports/[id]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/reports/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/reports/page.js +3 -3
- package/.next/server/app/(app)/reports/page.js.nft.json +1 -1
- package/.next/server/app/(app)/reports/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/routines/page.js +1 -1
- package/.next/server/app/(app)/routines/page.js.nft.json +1 -1
- package/.next/server/app/(app)/routines/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/search/page.js +2 -2
- package/.next/server/app/(app)/search/page.js.nft.json +1 -1
- package/.next/server/app/(app)/search/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/security/page.js +2 -2
- package/.next/server/app/(app)/security/page.js.nft.json +1 -1
- package/.next/server/app/(app)/security/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/skills/page.js +3 -3
- package/.next/server/app/(app)/skills/page.js.nft.json +1 -1
- package/.next/server/app/(app)/skills/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/tasks/page.js +2 -2
- package/.next/server/app/(app)/tasks/page.js.nft.json +1 -1
- package/.next/server/app/(app)/tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/test-dev/page.js +2 -2
- package/.next/server/app/(app)/test-dev/page.js.nft.json +1 -1
- package/.next/server/app/(app)/test-dev/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/update/page.js +2 -2
- package/.next/server/app/(app)/update/page.js.nft.json +1 -1
- package/.next/server/app/(app)/update/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(auth)/login/page.js +2 -2
- package/.next/server/app/(auth)/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(auth)/onboarding/page.js +2 -2
- package/.next/server/app/(auth)/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/cron/tick/route.js +2 -2
- package/.next/server/app/api/sync/file/route.js +1 -1
- package/.next/server/app/api/telegram/poll/route.js +2 -2
- package/.next/server/app/api/v1/[[...path]]/route.js +1 -1
- package/.next/server/app-paths-manifest.json +1 -1
- package/.next/server/chunks/1249.js +6 -6
- package/.next/server/chunks/259.js +1 -1
- package/.next/server/chunks/2867.js +1 -1
- package/.next/server/chunks/2960.js +1 -1
- package/.next/server/chunks/3174.js +12 -0
- package/.next/server/chunks/3234.js +1 -1
- package/.next/server/chunks/3334.js +1 -0
- package/.next/server/chunks/3439.js +4 -0
- package/.next/server/chunks/478.js +1 -0
- package/.next/server/chunks/4979.js +2 -2
- package/.next/server/chunks/{3078.js → 5086.js} +15 -15
- package/.next/server/chunks/6431.js +1 -1
- package/.next/server/chunks/7589.js +1 -1
- package/.next/server/chunks/7989.js +1 -1
- package/.next/server/chunks/8195.js +21 -0
- package/.next/server/chunks/8244.js +1 -0
- package/.next/server/chunks/8561.js +1 -1
- package/.next/server/chunks/8823.js +1 -1
- package/.next/server/chunks/9783.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/386-0f2b8d23016cf4d0.js +1 -0
- package/.next/static/chunks/4909-9f16a714c78ed30d.js +4 -0
- package/.next/static/chunks/5332-84d9a65aa5d16106.js +1 -0
- package/.next/static/chunks/5664-3cb5735f1b5bbde1.js +1 -0
- package/.next/static/chunks/{7509.8d3cbebb5fbe6247.js → 7509.721cd47a931c5518.js} +1 -1
- package/.next/static/chunks/8370-7ec9e9bf414f8f2d.js +12 -0
- package/.next/static/chunks/app/(app)/activity/{page-02fbf7cf46282feb.js → page-0f51a22d4f2207b2.js} +1 -1
- package/.next/static/chunks/app/(app)/agents/[handle]/{page-e3eda42a3f20e3e5.js → page-14805dd54a1333e8.js} +1 -1
- package/.next/static/chunks/app/(app)/code/page-7ebd6923ac440103.js +1 -0
- package/.next/static/chunks/app/(app)/config/page-47b5b62b73050673.js +1 -0
- package/.next/static/chunks/app/(app)/costs/{page-aadb60fb329974f3.js → page-969eba498344314d.js} +1 -1
- package/.next/static/chunks/app/(app)/cron/{page-0219c7a0530ad628.js → page-ab35783e4341f6b7.js} +1 -1
- package/.next/static/chunks/app/(app)/dashboard/page-59521ad116c60a88.js +1 -0
- package/.next/static/chunks/app/(app)/design/{page-f889489d70e0e839.js → page-fcee2dfd5c7e3a4b.js} +3 -3
- package/.next/static/chunks/app/(app)/docs/[id]/{page-f2e1f3d72634fb4b.js → page-b3451b21d7d2127b.js} +1 -1
- package/.next/static/chunks/app/(app)/docs/page-3a34eec67591ce3e.js +1 -0
- package/.next/static/chunks/app/(app)/github/page-a0117637dc143821.js +1 -0
- package/.next/static/chunks/app/(app)/goals/page-d1cb2552625ccadb.js +1 -0
- package/.next/static/chunks/app/(app)/inbox/page-dbfc885cd61f9b9f.js +12 -0
- package/.next/static/chunks/app/(app)/knowledge/page-29df476a9c2f930c.js +1 -0
- package/.next/static/chunks/app/(app)/layout-2b6b23e82fbf0211.js +1 -0
- package/.next/static/chunks/app/(app)/models/page-ea54a5d167cd3cc2.js +1 -0
- package/.next/static/chunks/app/(app)/notifications/page-ef1ac55efadb2a1a.js +12 -0
- package/.next/static/chunks/app/(app)/org/page-a7c734b8d86f7641.js +12 -0
- package/.next/static/chunks/app/(app)/organizations/page-4bcec3010a9d9119.js +1 -0
- package/.next/static/chunks/app/(app)/page-54a99a54295a40be.js +1 -0
- package/.next/static/chunks/app/(app)/planner/page-adfd05afc6ddcbef.js +1 -0
- package/.next/static/chunks/app/(app)/plugins/page-e75d982132825b07.js +1 -0
- package/.next/static/chunks/app/(app)/pm/page-773626398c10fdb7.js +1 -0
- package/.next/static/chunks/app/(app)/prepare-deploy/page-01f767248e7fa2a7.js +1 -0
- package/.next/static/chunks/app/(app)/profile/page-cb2450679785db1a.js +1 -0
- package/.next/static/chunks/app/(app)/pulse/{page-a0895a89c74c1d4c.js → page-1a63c4ed76db48f5.js} +1 -1
- package/.next/static/chunks/app/(app)/reports/[id]/{page-0219c7a0530ad628.js → page-ab35783e4341f6b7.js} +1 -1
- package/.next/static/chunks/app/(app)/reports/page-b0bcc85ad4afecf5.js +1 -0
- package/.next/static/chunks/app/(app)/routines/page-c0ce223d128a9010.js +1 -0
- package/.next/static/chunks/app/(app)/search/{page-d975712d07eed70d.js → page-d30f1c44c95e14a3.js} +1 -1
- package/.next/static/chunks/app/(app)/security/page-4640d72a0b360f05.js +1 -0
- package/.next/static/chunks/app/(app)/skills/page-87a71bd0a6b0f262.js +1 -0
- package/.next/static/chunks/app/(app)/tasks/page-a34a5658aff509ec.js +1 -0
- package/.next/static/chunks/app/(app)/test-dev/page-842f8771d36e964b.js +1 -0
- package/.next/static/chunks/app/(app)/update/page-64467fa6d8ed737e.js +1 -0
- package/.next/static/chunks/app/(auth)/login/page-82964b720ff11bab.js +1 -0
- package/.next/static/chunks/app/(auth)/onboarding/{page-ee09eb3fd38f3365.js → page-0cd7cd9fa146a927.js} +1 -1
- package/.next/static/chunks/app/_not-found/page-489c316e4356f1b7.js +1 -0
- package/.next/static/chunks/{main-2e2f6e1d0f3b78b1.js → main-722e16032e7764d1.js} +1 -1
- package/.next/static/chunks/webpack-222e3894b78c67db.js +1 -0
- package/.next/trace-build +1 -1
- package/CHANGELOG.md +3 -0
- package/docs/UPDATE.md +20 -0
- package/package.json +1 -1
- package/.next/server/chunks/104.js +0 -1
- package/.next/server/chunks/1082.js +0 -1
- package/.next/server/chunks/2359.js +0 -1
- package/.next/server/chunks/7970.js +0 -21
- package/.next/server/chunks/8071.js +0 -4
- package/.next/server/chunks/8102.js +0 -12
- package/.next/static/chunks/1068-50497be19315ccfb.js +0 -1
- package/.next/static/chunks/4991-0306ad0e6cd8cb8a.js +0 -1
- package/.next/static/chunks/6061-f3ad54a48323cba0.js +0 -1
- package/.next/static/chunks/6121-37930472292e5a6c.js +0 -4
- package/.next/static/chunks/8370-4a29b1affcb7dc68.js +0 -12
- package/.next/static/chunks/app/(app)/code/page-8f8ae22136752631.js +0 -1
- package/.next/static/chunks/app/(app)/config/page-84216e49b0b08248.js +0 -1
- package/.next/static/chunks/app/(app)/dashboard/page-1e7ecb2bdefcdc19.js +0 -1
- package/.next/static/chunks/app/(app)/docs/page-ab10f655b932f175.js +0 -1
- package/.next/static/chunks/app/(app)/github/page-0e47c2c1c9c927e4.js +0 -1
- package/.next/static/chunks/app/(app)/goals/page-9a68e61bbc392281.js +0 -1
- package/.next/static/chunks/app/(app)/inbox/page-6ee42cdd99664d11.js +0 -12
- package/.next/static/chunks/app/(app)/knowledge/page-c02936180f61550f.js +0 -1
- package/.next/static/chunks/app/(app)/layout-7d2d377b224620c8.js +0 -1
- package/.next/static/chunks/app/(app)/models/page-8635495017d696c1.js +0 -1
- package/.next/static/chunks/app/(app)/notifications/page-72f15bd4b6289bf1.js +0 -12
- package/.next/static/chunks/app/(app)/org/page-30bb71b216cc152e.js +0 -12
- package/.next/static/chunks/app/(app)/organizations/page-50c64b60a6850870.js +0 -1
- package/.next/static/chunks/app/(app)/page-638517264806ba7e.js +0 -1
- package/.next/static/chunks/app/(app)/planner/page-5177b5fd72d529f4.js +0 -1
- package/.next/static/chunks/app/(app)/plugins/page-66921b5b398f2c05.js +0 -1
- package/.next/static/chunks/app/(app)/pm/page-a1f93d19d3c28627.js +0 -1
- package/.next/static/chunks/app/(app)/prepare-deploy/page-de7dc9413e3dbf82.js +0 -1
- package/.next/static/chunks/app/(app)/profile/page-e73d191fce633cd7.js +0 -1
- package/.next/static/chunks/app/(app)/reports/page-fd0b0d0fa742819e.js +0 -1
- package/.next/static/chunks/app/(app)/routines/page-eaba9756a33d98a6.js +0 -1
- package/.next/static/chunks/app/(app)/security/page-4b126307f9963c2a.js +0 -1
- package/.next/static/chunks/app/(app)/skills/page-f1fc99f1d15e26a4.js +0 -1
- package/.next/static/chunks/app/(app)/tasks/page-a4b78a8d76fd9432.js +0 -1
- package/.next/static/chunks/app/(app)/test-dev/page-55cef74633b3cf4c.js +0 -1
- package/.next/static/chunks/app/(app)/update/page-92764fc98b253709.js +0 -1
- package/.next/static/chunks/app/(auth)/login/page-3df648bab2319a0b.js +0 -1
- package/.next/static/chunks/app/_not-found/page-dc38b02aebeab535.js +0 -1
- package/.next/static/chunks/webpack-94c9726ec79ee4b4.js +0 -1
- /package/.next/static/{N4KMSOY3i-qyXrbfm97sO → Fx06n4huXV42eQUI-Lty0}/_buildManifest.js +0 -0
- /package/.next/static/{N4KMSOY3i-qyXrbfm97sO → Fx06n4huXV42eQUI-Lty0}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=4979,exports.ids=[4979],exports.modules={44239:(a,b,c)=>{c.d(b,{$K:()=>m,$h:()=>q,FU:()=>t,II:()=>s,Kb:()=>u,MO:()=>o,Qu:()=>n,Vz:()=>r,dZ:()=>p});var d=c(6866),e=c(77598),f=c(97603),g=c(31371),h=c(65705),i=c(1890),j=c(53993),k=c(83963),l=c(84903);async function m(a){let{workspace:b}=await (0,j.nP)(),c=a.title.trim();c&&(await h.db.insert(i.backlogItem).values({id:(0,e.randomUUID)(),workspaceId:b.id,title:c,moscow:a.moscow??"Should",points:a.points??0}),(0,g.revalidatePath)("/pm"))}async function n(a){let{workspace:b}=await (0,j.nP)();await h.db.delete(i.backlogItem).where((0,f.Uo)((0,f.eq)(i.backlogItem.id,a),(0,f.eq)(i.backlogItem.workspaceId,b.id))),(0,g.revalidatePath)("/pm")}async function o(a,b){let c=await h.db.select().from(i.issue).where((0,f.Uo)((0,f.eq)(i.issue.workspaceId,b),(0,f.eq)(i.issue.status,"active"))),d=c.filter(a=>"done"===a.col),e=c.filter(a=>"done"!==a.col);if(!d.length)return{ok:!1,shipped:0,carried:e.length};let g=new Date().toISOString().slice(0,10),j=[`# Sprint retro — ${g}`,"",`## Shipped (${d.length})`,...d.map(a=>`- ${a.key} — ${a.title}${a.points?` (${a.points} pts)`:""}`),"",`## Carried over (${e.length})`,...e.length?e.map(a=>`- ${a.key} [${a.col}] — ${a.title}`):["- (nothing — clean sprint)"],"",`_Closed ${new Date().toISOString()} by the Product Owner._`,""].join("\n"),m=`PO/sprint-retro-${g}.md`;try{await (0,k.g)(a,m,j)}catch(a){console.error("[closeSprint] retro write failed:",a)}return await h.db.update(i.issue).set({status:"archived"}).where((0,f.Uo)((0,f.eq)(i.issue.workspaceId,b),(0,f.RV)(i.issue.id,d.map(a=>a.id)))),await (0,l.j)(b,{text:`Sprint closed — ${d.length} shipped, ${e.length} carried over; retro at ${m}`,by:"donald",source:"po-grooming"}),{ok:!0,shipped:d.length,carried:e.length,path:m}}async function p(){let{org:a,workspace:b}=await (0,j.nP)(),c=await o(a.id,b.id);return(0,g.revalidatePath)("/pm"),(0,g.revalidatePath)("/","layout"),c}async function q(a){let{workspace:b}=await (0,j.nP)(),[c]=await h.db.select().from(i.backlogItem).where((0,f.Uo)((0,f.eq)(i.backlogItem.id,a),(0,f.eq)(i.backlogItem.workspaceId,b.id)));if(!c)return;let d=(await h.db.select().from(i.issue).where((0,f.eq)(i.issue.workspaceId,b.id))).length;await h.db.insert(i.issue).values({id:(0,e.randomUUID)(),workspaceId:b.id,key:"S-"+(d+1),title:c.title,col:"todo",prio:"med",moscow:c.moscow,points:c.points}),await h.db.delete(i.backlogItem).where((0,f.eq)(i.backlogItem.id,a)),(0,g.revalidatePath)("/pm")}async function r(a,b){let{workspace:c}=await (0,j.nP)();await h.db.update(i.issue).set({col:b}).where((0,f.Uo)((0,f.eq)(i.issue.id,a),(0,f.eq)(i.issue.workspaceId,c.id))),(0,g.revalidatePath)("/pm")}async function s(a,b){let{workspace:c}=await (0,j.nP)();await h.db.update(i.issue).set({moscow:b}).where((0,f.Uo)((0,f.eq)(i.issue.id,a),(0,f.eq)(i.issue.workspaceId,c.id))),(0,g.revalidatePath)("/pm")}async function t(a){let{workspace:b}=await (0,j.nP)();await h.db.update(i.issue).set({col:"blocked"}).where((0,f.Uo)((0,f.eq)(i.issue.id,a),(0,f.eq)(i.issue.workspaceId,b.id))),await h.db.update(i.task).set({col:"blocked"}).where((0,f.Uo)((0,f.eq)(i.task.issueId,a),(0,f.eq)(i.task.workspaceId,b.id))),(0,g.revalidatePath)("/pm"),(0,g.revalidatePath)("/tasks")}async function u(a){let{workspace:b}=await (0,j.nP)();await h.db.update(i.issue).set({col:"todo"}).where((0,f.Uo)((0,f.eq)(i.issue.id,a),(0,f.eq)(i.issue.workspaceId,b.id)));let[c]=await h.db.update(i.task).set({col:"todo"}).where((0,f.Uo)((0,f.eq)(i.task.issueId,a),(0,f.eq)(i.task.workspaceId,b.id))).returning();c?.assigneeId&&await h.db.update(i.agent).set({status:"idle"}).where((0,f.eq)(i.agent.id,c.assigneeId)),(0,g.revalidatePath)("/pm"),(0,g.revalidatePath)("/tasks")}(0,c(74252).D)([m,n,o,p,q,r,s,t,u]),(0,d.A)(m,"402f309ca81396a3a6311f360bf9412b8f0d7ddd29",null),(0,d.A)(n,"406d72c594f3390d996f2ff27df997baaef61c6310",null),(0,d.A)(o,"609895a3fa7a55dcfac01a098eb3273dcfb089e390",null),(0,d.A)(p,"00e50a7431e98599d5aed19f769603a9733c9a6711",null),(0,d.A)(q,"404c901d5190208920cd5fab66eb4a7dc4dcf80a63",null),(0,d.A)(r,"6004268b45889f9b2382ed417ec4367b15ffbd649e",null),(0,d.A)(s,"60631f6d3f2e6f9a3acd6af2ea98283dddab591972",null),(0,d.A)(t,"4087d63502ffd433482eac1e2501638d73e92f276c",null),(0,d.A)(u,"405269b46a81108a81930e8b0a56b704b311dd3771",null)},44842:(a,b,c)=>{c.d(b,{Lh:()=>t,NF:()=>v,PT:()=>w,jL:()=>u,ot:()=>q,yR:()=>r});var d=c(73024),e=c(76760),f=c(60547),g=c.n(f),h=c(97603),i=c(65705),j=c(1890),k=c(57086),l=c(70149),m=c(437),n=c(84903),o=c(77558),p=c(24701);async function q(a,b){let[c]=await i.db.select().from(j.goal).where((0,h.Uo)((0,h.eq)(j.goal.id,b),(0,h.eq)(j.goal.workspaceId,a)));return c}function r(a){return(a||"work").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,40)||"work"}async function s(a,b){for(let c of(await i.db.select().from(j.task).where((0,h.Uo)((0,h.eq)(j.task.workspaceId,a),(0,h.eq)(j.task.goalId,b)))))(0,l.KD)(c.id),("todo"===c.col||"doing"===c.col)&&(await i.db.update(j.task).set({col:"blocked"}).where((0,h.eq)(j.task.id,c.id)),c.issueId&&await i.db.update(j.issue).set({col:"blocked"}).where((0,h.eq)(j.issue.id,c.issueId))),c.assigneeId&&await i.db.update(j.agent).set({status:"idle"}).where((0,h.eq)(j.agent.id,c.assigneeId))}async function t(a,b){for(let c of(await i.db.select().from(j.task).where((0,h.Uo)((0,h.eq)(j.task.workspaceId,a),(0,h.eq)(j.task.goalId,b),(0,h.eq)(j.task.col,"blocked")))))await i.db.update(j.task).set({col:"todo"}).where((0,h.eq)(j.task.id,c.id)),c.issueId&&await i.db.update(j.issue).set({col:"todo"}).where((0,h.eq)(j.issue.id,c.issueId))}async function u(a,b,c){await i.db.update(j.spec).set({status:c}).where((0,h.Uo)((0,h.eq)(j.spec.workspaceId,a),(0,h.eq)(j.spec.goalId,b))),await i.db.update(j.issue).set({status:c}).where((0,h.Uo)((0,h.eq)(j.issue.workspaceId,a),(0,h.eq)(j.issue.goalId,b)))}async function v(a,b){let c=await q(a,b);return c?(await i.db.update(j.goal).set({status:"cancelled",cancelledAt:new Date}).where((0,h.eq)(j.goal.id,b)),await u(a,b,"cancelled"),await (0,o.TC)(a,b),await s(a,b),await (0,n.j)(a,{text:`Cancelled goal: ${c.title}`,by:"operator",source:"operator-instruction",goalId:b}),await (0,p.I)(a,{kind:"info",text:`Goal cancelled — ${c.title}`,detail:"Execution stopped; state preserved. Reopen to resume."}),{ok:!0,title:c.title}):{ok:!1}}async function w(a,b,c){let f=await q(b,c);if(!f)return{ok:!1};let l=(0,k.HZ)(a),[t,v,w,x,y]=await Promise.all([i.db.select().from(j.spec).where((0,h.Uo)((0,h.eq)(j.spec.workspaceId,b),(0,h.eq)(j.spec.goalId,c))),i.db.select().from(j.issue).where((0,h.Uo)((0,h.eq)(j.issue.workspaceId,b),(0,h.eq)(j.issue.goalId,c))),i.db.select().from(j.task).where((0,h.Uo)((0,h.eq)(j.task.workspaceId,b),(0,h.eq)(j.task.goalId,c))),i.db.select().from(j.decision).where((0,h.Uo)((0,h.eq)(j.decision.workspaceId,b),(0,h.eq)(j.decision.goalId,c))),i.db.select().from(j.report).where((0,h.Uo)((0,h.eq)(j.report.workspaceId,b),(0,h.eq)(j.report.goalId,c)))]),z=w.map(a=>a.id),A=z.length?await i.db.select().from(j.taskStep).where((0,h.RV)(j.taskStep.taskId,z)):[],B=await (0,m.Y)(b,c),C=new(g()),D=0;for(let a of B){let b=(0,e.join)(l,a);if((0,d.existsSync)(b))try{C.addFile("files/"+a,(0,d.readFileSync)(b)),D++}catch{}}let E={goal:f,specs:t,issues:v,tasks:w,taskSteps:A,decisions:x,reports:y,fileCount:D,archivedAt:new Date().toISOString()},F=[`# Archived work — ${f.title}`,"",`Status at archive: ${f.status} \xb7 progress ${f.progress}%`,"",`## Specs (${t.length})`,...t.map(a=>`- ${a.key} ${a.title}`),"",`## Issues (${v.length})`,...v.map(a=>`- ${a.key} [${a.col}] ${a.title}`),"",`## Decisions (${x.length})`,...x.map(a=>`- ${a.text} (${a.by})`),"",`## Source files (${D})`,...B.map(a=>`- ${a}`),""].join("\n");C.addFile("MANIFEST.json",Buffer.from(JSON.stringify(E,null,2))),C.addFile("MANIFEST.md",Buffer.from(F));let G=(0,e.join)(l,"archives");(0,d.mkdirSync)(G,{recursive:!0});let H=`archives/${r(f.title)}-${new Date().toISOString().slice(0,10)}-${c.slice(0,6)}.zip`;try{C.writeZip((0,e.join)(l,H))}catch(a){return console.error("[archiveGoalFor] zip failed:",a),{ok:!1}}return await i.db.update(j.goal).set({status:"archived",archivePath:H,archivedAt:new Date}).where((0,h.eq)(j.goal.id,c)),await u(b,c,"archived"),await (0,o.TC)(b,c),await s(b,c),await (0,n.j)(b,{text:`Archived goal: ${f.title} → ${H}`,by:"operator",source:"operator-instruction",goalId:c}),await (0,p.I)(b,{kind:"info",text:`Goal archived — ${f.title}`,detail:`${D} files + manifest zipped to ${H}.`}),{ok:!0,path:H,title:f.title}}},60686:(a,b,c)=>{c.d(b,{Fy:()=>m,KD:()=>q,Rr:()=>l,TH:()=>s,Xu:()=>r,j0:()=>n,nx:()=>o,zC:()=>p});var d=c(6866),e=c(31371),f=c(53993),g=c(63562),h=c(81204),i=c(70221),j=c(77558),k=c(24701);async function l(){let{org:a,workspace:b}=await (0,f.nP)(),c=await (0,g.ZF)(b.id,a.id);return(0,e.revalidatePath)("/test-dev"),c}async function m(){let{workspace:a}=await (0,f.nP)(),b=await (0,g.n9)(a.id);return(0,e.revalidatePath)("/test-dev"),b}async function n(){let{workspace:a}=await (0,f.nP)();return(0,g.CS)(a.id)}async function o(){let{org:a,workspace:b}=await (0,f.nP)(),c=(0,g.CS)(b.id);if("running"!==c.status&&"starting"!==c.status&&(c=await (0,g.ZF)(b.id,a.id)),!c.url||"running"!==c.status&&"starting"!==c.status)return{ok:!1,error:"The dev server isn't running — start the app first."};let d=await (0,h.nK)(b.id,c.url);return d?{ok:!0,url:d.url}:{ok:!1,error:"Could not start the inspect proxy."}}async function p(){let{workspace:a}=await (0,f.nP)();return(0,h.hA)(a.id),{ok:!0}}async function q(a){if(await (0,f.nP)(),!/^https?:\/\/(127\.0\.0\.1|localhost)(:\d+)?/i.test(a))return{frameable:!0};try{let b=await fetch(a,{redirect:"manual",signal:AbortSignal.timeout(3e3)}),c=(b.headers.get("x-frame-options")||"").toLowerCase(),d=(b.headers.get("content-security-policy")||"").toLowerCase(),e=/frame-ancestors\s+([^;]+)/.exec(d)?.[1]??"",f=c.includes("deny")||c.includes("sameorigin"),g=!!e&&!/(\*|localhost|127\.0\.0\.1)/.test(e);return{frameable:!(f||g)}}catch{return{frameable:!0}}}async function r(a){let{org:b,workspace:c}=await (0,f.nP)(),d=a?.issueId?await (0,i.B)(c.id,a.issueId):void 0,g=await (0,i.z)(c.id,b.id,{goalId:a?.goalId,issueId:a?.issueId,routes:d,by:"operator"});return(0,e.revalidatePath)("/test-dev"),g}async function s(a,b){let{workspace:c}=await (0,f.nP)();return await (0,j.vE)(c.id,{kind:"validation",refType:"validation",refId:a,title:`Validate ${a}`,detail:b.slice(0,500)}),await (0,k.I)(c.id,{kind:"review",text:`Validation requested — ${a}`,detail:b.slice(0,300)}),(0,e.revalidatePath)("/inbox"),{ok:!0}}(0,c(74252).D)([l,m,n,o,p,q,r,s]),(0,d.A)(l,"001e793b6b9e17dd4f29b7fd68cfaf7432f33ca45b",null),(0,d.A)(m,"001fccc7214a81eee4a828374a1cfd7cc92e5109fb",null),(0,d.A)(n,"003f7bfd00bce6e4642889640da92a0031cf3f1506",null),(0,d.A)(o,"00c38194c9d1cef9ff1d75790c8f782badbc37b52a",null),(0,d.A)(p,"006e8b51bd97c68f55b9872060b05677c64a7c9f97",null),(0,d.A)(q,"405a2f4d5897167f5bd29ff4e7282eb422acfea757",null),(0,d.A)(r,"40d7c1696464f382355736732058cace6827a29770",null),(0,d.A)(s,"60df05f65ffaefc9f562b1958a9e2824fad101221e",null)},84979:(a,b,c)=>{c.d(b,{runSlashCommand:()=>ax});var d=c(77598),e=c(97603),f=c(95357),g=c(65705),h=c(1890),i=c(56338),j=c(57300),k=c(45125),l=c(33644),m=c(13328),n=c(44842),o=c(60686),p=c(69783),q=c(6866),r=c(73024),s=c(76760),t=c(48161),u=c(31371),v=c(53993),w=c(38926),x=c(57086),y=c(70149),z=c(78161),A=c(79505),B=c(63562),C=c(3196),D=c(77558),E=c(24701);let F=!1;function G(){F||(F=!0,g.F.exec(`
|
|
1
|
+
"use strict";exports.id=4979,exports.ids=[4979],exports.modules={44239:(a,b,c)=>{c.d(b,{$K:()=>m,$h:()=>q,FU:()=>t,II:()=>s,Kb:()=>u,MO:()=>o,Qu:()=>n,Vz:()=>r,dZ:()=>p});var d=c(6866),e=c(77598),f=c(97603),g=c(31371),h=c(65705),i=c(1890),j=c(53993),k=c(83963),l=c(84903);async function m(a){let{workspace:b}=await (0,j.nP)(),c=a.title.trim();c&&(await h.db.insert(i.backlogItem).values({id:(0,e.randomUUID)(),workspaceId:b.id,title:c,moscow:a.moscow??"Should",points:a.points??0}),(0,g.revalidatePath)("/pm"))}async function n(a){let{workspace:b}=await (0,j.nP)();await h.db.delete(i.backlogItem).where((0,f.Uo)((0,f.eq)(i.backlogItem.id,a),(0,f.eq)(i.backlogItem.workspaceId,b.id))),(0,g.revalidatePath)("/pm")}async function o(a,b){let c=await h.db.select().from(i.issue).where((0,f.Uo)((0,f.eq)(i.issue.workspaceId,b),(0,f.eq)(i.issue.status,"active"))),d=c.filter(a=>"done"===a.col),e=c.filter(a=>"done"!==a.col);if(!d.length)return{ok:!1,shipped:0,carried:e.length};let g=new Date().toISOString().slice(0,10),j=[`# Sprint retro — ${g}`,"",`## Shipped (${d.length})`,...d.map(a=>`- ${a.key} — ${a.title}${a.points?` (${a.points} pts)`:""}`),"",`## Carried over (${e.length})`,...e.length?e.map(a=>`- ${a.key} [${a.col}] — ${a.title}`):["- (nothing — clean sprint)"],"",`_Closed ${new Date().toISOString()} by the Product Owner._`,""].join("\n"),m=`PO/sprint-retro-${g}.md`;try{await (0,k.g)(a,m,j)}catch(a){console.error("[closeSprint] retro write failed:",a)}return await h.db.update(i.issue).set({status:"archived"}).where((0,f.Uo)((0,f.eq)(i.issue.workspaceId,b),(0,f.RV)(i.issue.id,d.map(a=>a.id)))),await (0,l.j)(b,{text:`Sprint closed — ${d.length} shipped, ${e.length} carried over; retro at ${m}`,by:"donald",source:"po-grooming"}),{ok:!0,shipped:d.length,carried:e.length,path:m}}async function p(){let{org:a,workspace:b}=await (0,j.nP)(),c=await o(a.id,b.id);return(0,g.revalidatePath)("/pm"),(0,g.revalidatePath)("/","layout"),c}async function q(a){let{workspace:b}=await (0,j.nP)(),[c]=await h.db.select().from(i.backlogItem).where((0,f.Uo)((0,f.eq)(i.backlogItem.id,a),(0,f.eq)(i.backlogItem.workspaceId,b.id)));if(!c)return;let d=(await h.db.select().from(i.issue).where((0,f.eq)(i.issue.workspaceId,b.id))).length;await h.db.insert(i.issue).values({id:(0,e.randomUUID)(),workspaceId:b.id,key:"S-"+(d+1),title:c.title,col:"todo",prio:"med",moscow:c.moscow,points:c.points}),await h.db.delete(i.backlogItem).where((0,f.eq)(i.backlogItem.id,a)),(0,g.revalidatePath)("/pm")}async function r(a,b){let{workspace:c}=await (0,j.nP)();await h.db.update(i.issue).set({col:b}).where((0,f.Uo)((0,f.eq)(i.issue.id,a),(0,f.eq)(i.issue.workspaceId,c.id))),(0,g.revalidatePath)("/pm")}async function s(a,b){let{workspace:c}=await (0,j.nP)();await h.db.update(i.issue).set({moscow:b}).where((0,f.Uo)((0,f.eq)(i.issue.id,a),(0,f.eq)(i.issue.workspaceId,c.id))),(0,g.revalidatePath)("/pm")}async function t(a){let{workspace:b}=await (0,j.nP)();await h.db.update(i.issue).set({col:"blocked"}).where((0,f.Uo)((0,f.eq)(i.issue.id,a),(0,f.eq)(i.issue.workspaceId,b.id))),await h.db.update(i.task).set({col:"blocked"}).where((0,f.Uo)((0,f.eq)(i.task.issueId,a),(0,f.eq)(i.task.workspaceId,b.id))),(0,g.revalidatePath)("/pm"),(0,g.revalidatePath)("/tasks")}async function u(a){let{workspace:b}=await (0,j.nP)();await h.db.update(i.issue).set({col:"todo"}).where((0,f.Uo)((0,f.eq)(i.issue.id,a),(0,f.eq)(i.issue.workspaceId,b.id)));let[c]=await h.db.update(i.task).set({col:"todo"}).where((0,f.Uo)((0,f.eq)(i.task.issueId,a),(0,f.eq)(i.task.workspaceId,b.id))).returning();c?.assigneeId&&await h.db.update(i.agent).set({status:"idle"}).where((0,f.eq)(i.agent.id,c.assigneeId)),(0,g.revalidatePath)("/pm"),(0,g.revalidatePath)("/tasks")}(0,c(74252).D)([m,n,o,p,q,r,s,t,u]),(0,d.A)(m,"40a219e2f0b45013a4fc31a6c2f0dd8a96c4c47187",null),(0,d.A)(n,"4097a2cce3286ca652da56e3500df9be092d3b45a8",null),(0,d.A)(o,"6035e1b1e8dddd89c5b7bdf2f3baa64b3731637010",null),(0,d.A)(p,"0044a4176868ac18f0aeb8ee726359b8b0e60a18fe",null),(0,d.A)(q,"40229ffd8a45e2e0f8d2785dd10a832a93667c7d75",null),(0,d.A)(r,"60c4ced97984a733b9381699d2f6c5eec8455376cf",null),(0,d.A)(s,"60cbd8ee8dce60b2f3e9604855b3939d629c3702a7",null),(0,d.A)(t,"40eaa95a118f68ba6cc5534f2cc76b35616692aba7",null),(0,d.A)(u,"40e220cadf218deb046753a2887e2699852bf42574",null)},44842:(a,b,c)=>{c.d(b,{Lh:()=>t,NF:()=>v,PT:()=>w,jL:()=>u,ot:()=>q,yR:()=>r});var d=c(73024),e=c(76760),f=c(60547),g=c.n(f),h=c(97603),i=c(65705),j=c(1890),k=c(57086),l=c(70149),m=c(437),n=c(84903),o=c(77558),p=c(24701);async function q(a,b){let[c]=await i.db.select().from(j.goal).where((0,h.Uo)((0,h.eq)(j.goal.id,b),(0,h.eq)(j.goal.workspaceId,a)));return c}function r(a){return(a||"work").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,40)||"work"}async function s(a,b){for(let c of(await i.db.select().from(j.task).where((0,h.Uo)((0,h.eq)(j.task.workspaceId,a),(0,h.eq)(j.task.goalId,b)))))(0,l.KD)(c.id),("todo"===c.col||"doing"===c.col)&&(await i.db.update(j.task).set({col:"blocked"}).where((0,h.eq)(j.task.id,c.id)),c.issueId&&await i.db.update(j.issue).set({col:"blocked"}).where((0,h.eq)(j.issue.id,c.issueId))),c.assigneeId&&await i.db.update(j.agent).set({status:"idle"}).where((0,h.eq)(j.agent.id,c.assigneeId))}async function t(a,b){for(let c of(await i.db.select().from(j.task).where((0,h.Uo)((0,h.eq)(j.task.workspaceId,a),(0,h.eq)(j.task.goalId,b),(0,h.eq)(j.task.col,"blocked")))))await i.db.update(j.task).set({col:"todo"}).where((0,h.eq)(j.task.id,c.id)),c.issueId&&await i.db.update(j.issue).set({col:"todo"}).where((0,h.eq)(j.issue.id,c.issueId))}async function u(a,b,c){await i.db.update(j.spec).set({status:c}).where((0,h.Uo)((0,h.eq)(j.spec.workspaceId,a),(0,h.eq)(j.spec.goalId,b))),await i.db.update(j.issue).set({status:c}).where((0,h.Uo)((0,h.eq)(j.issue.workspaceId,a),(0,h.eq)(j.issue.goalId,b)))}async function v(a,b){let c=await q(a,b);return c?(await i.db.update(j.goal).set({status:"cancelled",cancelledAt:new Date}).where((0,h.eq)(j.goal.id,b)),await u(a,b,"cancelled"),await (0,o.TC)(a,b),await s(a,b),await (0,n.j)(a,{text:`Cancelled goal: ${c.title}`,by:"operator",source:"operator-instruction",goalId:b}),await (0,p.I)(a,{kind:"info",text:`Goal cancelled — ${c.title}`,detail:"Execution stopped; state preserved. Reopen to resume."}),{ok:!0,title:c.title}):{ok:!1}}async function w(a,b,c){let f=await q(b,c);if(!f)return{ok:!1};let l=(0,k.HZ)(a),[t,v,w,x,y]=await Promise.all([i.db.select().from(j.spec).where((0,h.Uo)((0,h.eq)(j.spec.workspaceId,b),(0,h.eq)(j.spec.goalId,c))),i.db.select().from(j.issue).where((0,h.Uo)((0,h.eq)(j.issue.workspaceId,b),(0,h.eq)(j.issue.goalId,c))),i.db.select().from(j.task).where((0,h.Uo)((0,h.eq)(j.task.workspaceId,b),(0,h.eq)(j.task.goalId,c))),i.db.select().from(j.decision).where((0,h.Uo)((0,h.eq)(j.decision.workspaceId,b),(0,h.eq)(j.decision.goalId,c))),i.db.select().from(j.report).where((0,h.Uo)((0,h.eq)(j.report.workspaceId,b),(0,h.eq)(j.report.goalId,c)))]),z=w.map(a=>a.id),A=z.length?await i.db.select().from(j.taskStep).where((0,h.RV)(j.taskStep.taskId,z)):[],B=await (0,m.Y)(b,c),C=new(g()),D=0;for(let a of B){let b=(0,e.join)(l,a);if((0,d.existsSync)(b))try{C.addFile("files/"+a,(0,d.readFileSync)(b)),D++}catch{}}let E={goal:f,specs:t,issues:v,tasks:w,taskSteps:A,decisions:x,reports:y,fileCount:D,archivedAt:new Date().toISOString()},F=[`# Archived work — ${f.title}`,"",`Status at archive: ${f.status} \xb7 progress ${f.progress}%`,"",`## Specs (${t.length})`,...t.map(a=>`- ${a.key} ${a.title}`),"",`## Issues (${v.length})`,...v.map(a=>`- ${a.key} [${a.col}] ${a.title}`),"",`## Decisions (${x.length})`,...x.map(a=>`- ${a.text} (${a.by})`),"",`## Source files (${D})`,...B.map(a=>`- ${a}`),""].join("\n");C.addFile("MANIFEST.json",Buffer.from(JSON.stringify(E,null,2))),C.addFile("MANIFEST.md",Buffer.from(F));let G=(0,e.join)(l,"archives");(0,d.mkdirSync)(G,{recursive:!0});let H=`archives/${r(f.title)}-${new Date().toISOString().slice(0,10)}-${c.slice(0,6)}.zip`;try{C.writeZip((0,e.join)(l,H))}catch(a){return console.error("[archiveGoalFor] zip failed:",a),{ok:!1}}return await i.db.update(j.goal).set({status:"archived",archivePath:H,archivedAt:new Date}).where((0,h.eq)(j.goal.id,c)),await u(b,c,"archived"),await (0,o.TC)(b,c),await s(b,c),await (0,n.j)(b,{text:`Archived goal: ${f.title} → ${H}`,by:"operator",source:"operator-instruction",goalId:c}),await (0,p.I)(b,{kind:"info",text:`Goal archived — ${f.title}`,detail:`${D} files + manifest zipped to ${H}.`}),{ok:!0,path:H,title:f.title}}},60686:(a,b,c)=>{c.d(b,{Fy:()=>m,KD:()=>q,Rr:()=>l,TH:()=>s,Xu:()=>r,j0:()=>n,nx:()=>o,zC:()=>p});var d=c(6866),e=c(31371),f=c(53993),g=c(63562),h=c(81204),i=c(70221),j=c(77558),k=c(24701);async function l(){let{org:a,workspace:b}=await (0,f.nP)(),c=await (0,g.ZF)(b.id,a.id);return(0,e.revalidatePath)("/test-dev"),c}async function m(){let{workspace:a}=await (0,f.nP)(),b=await (0,g.n9)(a.id);return(0,e.revalidatePath)("/test-dev"),b}async function n(){let{workspace:a}=await (0,f.nP)();return(0,g.CS)(a.id)}async function o(){let{org:a,workspace:b}=await (0,f.nP)(),c=(0,g.CS)(b.id);if("running"!==c.status&&"starting"!==c.status&&(c=await (0,g.ZF)(b.id,a.id)),!c.url||"running"!==c.status&&"starting"!==c.status)return{ok:!1,error:"The dev server isn't running — start the app first."};let d=await (0,h.nK)(b.id,c.url);return d?{ok:!0,url:d.url}:{ok:!1,error:"Could not start the inspect proxy."}}async function p(){let{workspace:a}=await (0,f.nP)();return(0,h.hA)(a.id),{ok:!0}}async function q(a){if(await (0,f.nP)(),!/^https?:\/\/(127\.0\.0\.1|localhost)(:\d+)?/i.test(a))return{frameable:!0};try{let b=await fetch(a,{redirect:"manual",signal:AbortSignal.timeout(3e3)}),c=(b.headers.get("x-frame-options")||"").toLowerCase(),d=(b.headers.get("content-security-policy")||"").toLowerCase(),e=/frame-ancestors\s+([^;]+)/.exec(d)?.[1]??"",f=c.includes("deny")||c.includes("sameorigin"),g=!!e&&!/(\*|localhost|127\.0\.0\.1)/.test(e);return{frameable:!(f||g)}}catch{return{frameable:!0}}}async function r(a){let{org:b,workspace:c}=await (0,f.nP)(),d=a?.issueId?await (0,i.B)(c.id,a.issueId):void 0,g=await (0,i.z)(c.id,b.id,{goalId:a?.goalId,issueId:a?.issueId,routes:d,by:"operator"});return(0,e.revalidatePath)("/test-dev"),g}async function s(a,b){let{workspace:c}=await (0,f.nP)();return await (0,j.vE)(c.id,{kind:"validation",refType:"validation",refId:a,title:`Validate ${a}`,detail:b.slice(0,500)}),await (0,k.I)(c.id,{kind:"review",text:`Validation requested — ${a}`,detail:b.slice(0,300)}),(0,e.revalidatePath)("/inbox"),{ok:!0}}(0,c(74252).D)([l,m,n,o,p,q,r,s]),(0,d.A)(l,"0026963d7b1d7539e886a62262874716cecd5c07de",null),(0,d.A)(m,"0024e2d12693d64f8649f0fe1dca48e11ed8e06141",null),(0,d.A)(n,"004af15ff1cf035f1c0e21a27b10662bd8571441d7",null),(0,d.A)(o,"003c3093236434c008d9f8a38311aa4df5671743d9",null),(0,d.A)(p,"00be8943dab1766b904c0c16a25b9e2e79bf9afe51",null),(0,d.A)(q,"40ee0cd18de3eed6d815d3af1060bc0ae2260d80c2",null),(0,d.A)(r,"40dc7a8c3c76cdf4ba10c35ecdcef439dc05401d48",null),(0,d.A)(s,"60086b185f881da7f0cb318af475bcdaf6ab57b663",null)},84979:(a,b,c)=>{c.d(b,{runSlashCommand:()=>ax});var d=c(77598),e=c(97603),f=c(95357),g=c(65705),h=c(1890),i=c(56338),j=c(57300),k=c(45125),l=c(33644),m=c(13328),n=c(44842),o=c(60686),p=c(69783),q=c(6866),r=c(73024),s=c(76760),t=c(48161),u=c(31371),v=c(53993),w=c(38926),x=c(57086),y=c(70149),z=c(78161),A=c(79505),B=c(63562),C=c(3196),D=c(77558),E=c(24701);let F=!1;function G(){F||(F=!0,g.F.exec(`
|
|
2
2
|
CREATE TABLE IF NOT EXISTS deploy_run (
|
|
3
3
|
id TEXT PRIMARY KEY,
|
|
4
4
|
workspace_id TEXT NOT NULL REFERENCES workspace(id) ON DELETE CASCADE,
|
|
@@ -31,7 +31,7 @@ coverage/
|
|
|
31
31
|
`+(a.stdout+a.stderr).slice(-1800),await K(c,{buildLog:k}),await h("build",0===a.code?"done":"error",0===a.code?"build succeeded":"build failed — the agent will try to fix it")}else await h("build","needs-action","node"===j.runtime?"no build script":"no build step for this stack");await h("validateBuild","running");let g=await (0,B.VX)(c,a.id);await h("validateBuild",g.ok?"done":"error",g.ok?S(a.id)?"boots \xb7 build output present":"boots":g.detail.slice(0,160)),await h("agent","running");let o=await ad(c),p="";if(o){let c,d=await ae(a.id,b,o,(m=k,c=["FINISH PREPARING THIS PROJECT FOR PRODUCTION. Dependencies, tests, the secret scan and the production build have ALREADY been run by the system — focus on the remaining gaps.","Do, in order: (1) create/refresh `.env.example` documenting EVERY required environment variable (NEVER inline real secrets/tokens — use placeholders)."+(j.unsetEnvKeys.length?` The code references these vars not yet in .env.example: ${j.unsetEnvKeys.slice(0,30).join(", ")}.`:""),"(2) if the production build failed, FIX the errors until it builds clean;","(3) write/refresh a root `README.md` (what it is, install, run, configure) and a root `DEPLOY.md` with concrete build/run/deploy steps for this project's host;","(4) finish with a SHORT operator summary + the exact next steps to deploy.","Keep the existing product and its UX; do NOT add internal/control files or a second app."],m&&c.push("Latest production build output (tail):\n"+m.slice(-1200)),c.join("\n")),f);p=(d.text||"").slice(0,800),await h("agent",d.ok?"done":"error",d.ok?"configured env, docs & fixes":d.error?.slice(0,160)||"agent run failed")}else await h("agent","needs-action","no agent available to run");await h("package","running");let q=await $(a.id);return await h("package",q.blocked?"blocked":"done",q.blocked?`${q.secrets.length} secret risk(s) in the export set`:`${q.includedCount} file(s) \xb7 ${(n=q.totalBytes)<1024?`${n} B`:n<1048576?`${(n/1024).toFixed(1)} KB`:`${(n/1024/1024).toFixed(1)} MB`}`),l(q.blocked?"blocked":"done",p||`Prepared ${q.includedCount} clean file(s) for production.`)}catch(a){return l("failed",String(a instanceof Error?a.message:a).slice(0,300))}}async function ah(a,b,c){let e=(0,d.randomUUID)();(0,A.I)(a,{runId:e,channel:"deploy",agentId:null,kind:"run",target:b});try{let d=await c();return(0,A.I)(a,{runId:e,channel:"deploy",agentId:null,kind:"done",target:b}),d}catch(c){throw(0,A.I)(a,{runId:e,channel:"deploy",agentId:null,kind:"error",target:b,detail:String(c)}),c}}async function ai(){let{org:a,workspace:b}=await (0,v.nP)(),c=(0,B.pp)(a.id),d=R(c,a.id);return c&&"node"===c.kind&&d?.scripts?.build?ah(b.id,"production build",async()=>{let a=await (0,y.d1)(c.runCmd,"npm"===c.runCmd?["run","build"]:["build"],{cwd:c.dir,timeoutMs:6e5,env:{...process.env,CI:"1"}}),d=`build ${0===a.code?"OK":a.timedOut?"TIMED OUT":"FAILED ("+a.code+")"}
|
|
32
32
|
`+(a.stdout+a.stderr).slice(-1800);return await K(b.id,{buildLog:d}),(0,u.revalidatePath)("/prepare-deploy"),{ok:0===a.code,log:d}}):{ok:!1,log:"No Node build script to run."}}async function aj(){let{org:a,workspace:b}=await (0,v.nP)(),c=(0,B.pp)(a.id),d=R(c,a.id);return c&&"node"===c.kind&&d?.scripts?.test?ah(b.id,"tests",async()=>{let a=await (0,y.d1)(c.runCmd,["test"],{cwd:c.dir,timeoutMs:3e5,env:{...process.env,CI:"1"}});return{ok:0===a.code,log:`tests ${0===a.code?"PASS":"FAIL"}
|
|
33
33
|
`+(a.stdout+a.stderr).slice(-1800)}}):{ok:!1,log:"No test script to run."}}async function ak(a){let{org:b,workspace:c}=await (0,v.nP)(),e=await ad(c.id);if(!e)return{ok:!1,summary:"No agent available."};let f=await X(b.id),g=f.framework?`
|
|
34
|
-
Project: ${f.framework}${f.unsetEnvKeys.length?`; undocumented env vars: ${f.unsetEnvKeys.slice(0,20).join(", ")}`:""}.`:"",h=(0,d.randomUUID)();(0,A.I)(c.id,{runId:h,channel:"deploy",agentId:e.id,kind:"run",target:"readme"===a?"generate README":"generate deploy docs"});let i=await ae(b.id,c,e,("readme"===a?"Write or refresh a clear root `README.md` for this project: what it is, prerequisites, install, run, configure (reference .env.example), and basic usage. Keep it accurate to the real code; do NOT invent features.":"Write or refresh a root `DEPLOY.md` with concrete production deploy steps for this project's stack/host: build, environment variables (reference .env.example, never real secrets), run command, and host-specific notes. Keep it accurate to the real project.")+g,h);return(0,A.I)(c.id,{runId:h,channel:"deploy",agentId:e.id,kind:"done",target:"done"}),(0,u.revalidatePath)("/prepare-deploy"),{ok:i.ok,summary:(i.text||"").slice(0,400)}}async function al(){return ak("readme")}async function am(){return ak("deploy")}async function an(a){let{org:b,workspace:c}=await (0,v.nP)(),e=(a.repo||"").trim().replace(/^https?:\/\/github\.com\//i,"").replace(/\.git$/,"");if(!/^[\w.-]+\/[\w.-]+$/.test(e))return{ok:!1,error:"Use the form owner/repo."};let f=a.token?.trim()||await (0,w.r6)(c.id,"github_pat");if(!f)return{ok:!1,error:"Provide a GitHub token (or connect one in Commit GitHub first)."};let g=a=>f?a.split(f).join("***"):a;try{let a=await fetch(`https://api.github.com/repos/${e}`,{headers:{Authorization:`Bearer ${f}`,"User-Agent":"constella",Accept:"application/vnd.github+json"},signal:AbortSignal.timeout(12e3)});if(404===a.status)return{ok:!1,error:"Repo not found, or this token can't access it."};if(!a.ok)return{ok:!1,error:`GitHub ${a.status}`}}catch{return{ok:!1,error:"Couldn't reach GitHub."}}let h=(0,s.join)((0,t.tmpdir)(),"constella-export-"+(0,d.randomUUID)()),i=a.branch?.trim()||"main";try{(0,r.mkdirSync)(h,{recursive:!0});let d=Z(h,b.id);if(0===d.copied)return{ok:!1,error:"Nothing to export yet — no clean product source files were found."};await (0,y.d1)("git",["init","-b",i],{cwd:h}),await (0,y.d1)("git",["add","-A"],{cwd:h});let j=await (0,C.I)(h);if(j.findings.length)return await (0,D.vE)(c.id,{kind:"block",refType:"task",refId:`export-${e}`,title:`Export blocked — ${j.findings.length} secret risk(s)`,detail:j.findings.slice(0,5).map(a=>`${a.file}: ${a.kind}`).join("; ")}),await (0,E.I)(c.id,{kind:"security",text:`Clean export blocked — ${j.findings.length} secret risk(s)`,detail:`Resolve before exporting to ${e}.`}),(0,u.revalidatePath)("/prepare-deploy"),(0,u.revalidatePath)("/inbox"),{ok:!1,blocked:!0,secrets:j.findings,error:`Blocked: ${j.findings.length} potential secret(s) in the export set.`};await (0,y.d1)("git",["-c","user.email=agents@constella.dev","-c","user.name=Constella Agents","commit","-m",a.message?.trim()||"chore: export clean source"],{cwd:h});let k=(await (0,y.d1)("git",["rev-parse","HEAD"],{cwd:h})).stdout.trim().slice(0,7),l=`https://x-access-token:${f}@github.com/${e}.git`,m=await (0,y.d1)("git",["push","-f",l,`HEAD:${i}`],{cwd:h,timeoutMs:12e4});if(0!==m.code)return{ok:!1,error:g((m.stderr||"git push failed").slice(-300))};return await K(c.id,{lastExport:{ok:!0,sha:k,copied:d.copied,repo:e,branch:i,at:Date.now()}}),(0,u.revalidatePath)("/prepare-deploy"),{ok:!0,pushed:!0,sha:k,copied:d.copied}}catch(a){return{ok:!1,error:g(String(a instanceof Error?a.message:a))}}finally{try{(0,r.rmSync)(h,{recursive:!0,force:!0})}catch{}}}(0,L.D)([Y,_,ab,ac,ag,ai,aj,al,am,an]),(0,q.A)(Y,"
|
|
34
|
+
Project: ${f.framework}${f.unsetEnvKeys.length?`; undocumented env vars: ${f.unsetEnvKeys.slice(0,20).join(", ")}`:""}.`:"",h=(0,d.randomUUID)();(0,A.I)(c.id,{runId:h,channel:"deploy",agentId:e.id,kind:"run",target:"readme"===a?"generate README":"generate deploy docs"});let i=await ae(b.id,c,e,("readme"===a?"Write or refresh a clear root `README.md` for this project: what it is, prerequisites, install, run, configure (reference .env.example), and basic usage. Keep it accurate to the real code; do NOT invent features.":"Write or refresh a root `DEPLOY.md` with concrete production deploy steps for this project's stack/host: build, environment variables (reference .env.example, never real secrets), run command, and host-specific notes. Keep it accurate to the real project.")+g,h);return(0,A.I)(c.id,{runId:h,channel:"deploy",agentId:e.id,kind:"done",target:"done"}),(0,u.revalidatePath)("/prepare-deploy"),{ok:i.ok,summary:(i.text||"").slice(0,400)}}async function al(){return ak("readme")}async function am(){return ak("deploy")}async function an(a){let{org:b,workspace:c}=await (0,v.nP)(),e=(a.repo||"").trim().replace(/^https?:\/\/github\.com\//i,"").replace(/\.git$/,"");if(!/^[\w.-]+\/[\w.-]+$/.test(e))return{ok:!1,error:"Use the form owner/repo."};let f=a.token?.trim()||await (0,w.r6)(c.id,"github_pat");if(!f)return{ok:!1,error:"Provide a GitHub token (or connect one in Commit GitHub first)."};let g=a=>f?a.split(f).join("***"):a;try{let a=await fetch(`https://api.github.com/repos/${e}`,{headers:{Authorization:`Bearer ${f}`,"User-Agent":"constella",Accept:"application/vnd.github+json"},signal:AbortSignal.timeout(12e3)});if(404===a.status)return{ok:!1,error:"Repo not found, or this token can't access it."};if(!a.ok)return{ok:!1,error:`GitHub ${a.status}`}}catch{return{ok:!1,error:"Couldn't reach GitHub."}}let h=(0,s.join)((0,t.tmpdir)(),"constella-export-"+(0,d.randomUUID)()),i=a.branch?.trim()||"main";try{(0,r.mkdirSync)(h,{recursive:!0});let d=Z(h,b.id);if(0===d.copied)return{ok:!1,error:"Nothing to export yet — no clean product source files were found."};await (0,y.d1)("git",["init","-b",i],{cwd:h}),await (0,y.d1)("git",["add","-A"],{cwd:h});let j=await (0,C.I)(h);if(j.findings.length)return await (0,D.vE)(c.id,{kind:"block",refType:"task",refId:`export-${e}`,title:`Export blocked — ${j.findings.length} secret risk(s)`,detail:j.findings.slice(0,5).map(a=>`${a.file}: ${a.kind}`).join("; ")}),await (0,E.I)(c.id,{kind:"security",text:`Clean export blocked — ${j.findings.length} secret risk(s)`,detail:`Resolve before exporting to ${e}.`}),(0,u.revalidatePath)("/prepare-deploy"),(0,u.revalidatePath)("/inbox"),{ok:!1,blocked:!0,secrets:j.findings,error:`Blocked: ${j.findings.length} potential secret(s) in the export set.`};await (0,y.d1)("git",["-c","user.email=agents@constella.dev","-c","user.name=Constella Agents","commit","-m",a.message?.trim()||"chore: export clean source"],{cwd:h});let k=(await (0,y.d1)("git",["rev-parse","HEAD"],{cwd:h})).stdout.trim().slice(0,7),l=`https://x-access-token:${f}@github.com/${e}.git`,m=await (0,y.d1)("git",["push","-f",l,`HEAD:${i}`],{cwd:h,timeoutMs:12e4});if(0!==m.code)return{ok:!1,error:g((m.stderr||"git push failed").slice(-300))};return await K(c.id,{lastExport:{ok:!0,sha:k,copied:d.copied,repo:e,branch:i,at:Date.now()}}),(0,u.revalidatePath)("/prepare-deploy"),{ok:!0,pushed:!0,sha:k,copied:d.copied}}catch(a){return{ok:!1,error:g(String(a instanceof Error?a.message:a))}}finally{try{(0,r.rmSync)(h,{recursive:!0,force:!0})}catch{}}}(0,L.D)([Y,_,ab,ac,ag,ai,aj,al,am,an]),(0,q.A)(Y,"0020974bcd4142541e5118670d9fe6e193b88f91be",null),(0,q.A)(_,"003941b10cffec2a8420073a19a2a0468369de8928",null),(0,q.A)(ab,"009c79d89e7e1cdfda8275fab916cc13b3f2a0f438",null),(0,q.A)(ac,"00acab170b280ff728a94ebe5eb24aea641759241d",null),(0,q.A)(ag,"00a3f9af0045e3bbf8707ea65bba00c622e410bc14",null),(0,q.A)(ai,"00d716280af4c2720ea0663f31e3164812094ee6bb",null),(0,q.A)(aj,"00912dd1faff4a13921af74ae045debbd5dc59b694",null),(0,q.A)(al,"009202a11c47939f2f0e5d021a9bdc8e8eab371145",null),(0,q.A)(am,"0033cda902342c89cf8397730f74f8bd87a1fb92d3",null),(0,q.A)(an,"4049f8b1425a3942c93b290578519115b43f6b794f",null);var ao=c(88007),ap=c(31578),aq=c(93571),ar=c(10335),as=c(23297),at=c(44239);let au=`Available commands:
|
|
35
35
|
- /help — this list
|
|
36
36
|
- /kb <question> (alias /ask-kb) — ask the Knowledge Base; answers with references
|
|
37
37
|
- /status — active goals, open issues, tasks in flight
|