@sapienx/agentos 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/.next/BUILD_ID +1 -1
- package/bundle/.next/app-path-routes-manifest.json +16 -16
- package/bundle/.next/build-manifest.json +2 -2
- package/bundle/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/_global-error.html +2 -2
- package/bundle/.next/server/app/_global-error.rsc +1 -1
- package/bundle/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/bundle/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/bundle/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/bundle/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/bundle/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/bundle/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/bundle/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/_not-found.html +1 -1
- package/bundle/.next/server/app/_not-found.rsc +2 -2
- package/bundle/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/bundle/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/bundle/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/bundle/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/bundle/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/bundle/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/bundle/.next/server/app/api/agents/route.js +1 -1
- package/bundle/.next/server/app/api/agents/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/diagnostics/route.js +1 -1
- package/bundle/.next/server/app/api/diagnostics/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/diagnostics/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/files/reveal/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/gateway/control/route.js +1 -1
- package/bundle/.next/server/app/api/gateway/control/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/gateway/control/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/mission/route.js +1 -1
- package/bundle/.next/server/app/api/mission/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/mission/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/onboarding/models/route.js +2 -2
- package/bundle/.next/server/app/api/onboarding/models/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/onboarding/models/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/onboarding/route.js +2 -2
- package/bundle/.next/server/app/api/onboarding/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/planner/[planId]/deploy/route.js +1 -1
- package/bundle/.next/server/app/api/planner/[planId]/deploy/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/planner/[planId]/deploy/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/planner/[planId]/route.js +1 -1
- package/bundle/.next/server/app/api/planner/[planId]/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/planner/[planId]/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/planner/[planId]/simulate/route.js +1 -1
- package/bundle/.next/server/app/api/planner/[planId]/simulate/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/planner/[planId]/simulate/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/planner/[planId]/turn/route.js +1 -1
- package/bundle/.next/server/app/api/planner/[planId]/turn/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/planner/[planId]/turn/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/planner/route.js +1 -1
- package/bundle/.next/server/app/api/planner/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/planner/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/reset/route.js +2 -2
- package/bundle/.next/server/app/api/reset/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/reset/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/runtimes/[runtimeId]/route.js +1 -1
- package/bundle/.next/server/app/api/runtimes/[runtimeId]/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/runtimes/[runtimeId]/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/settings/gateway/route.js +1 -1
- package/bundle/.next/server/app/api/settings/gateway/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/settings/gateway/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/settings/workspace-root/route.js +1 -1
- package/bundle/.next/server/app/api/settings/workspace-root/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/settings/workspace-root/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/snapshot/route.js +1 -1
- package/bundle/.next/server/app/api/snapshot/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/snapshot/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/stream/route.js +2 -2
- package/bundle/.next/server/app/api/stream/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/stream/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/system/open-terminal/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/update/route.js +2 -2
- package/bundle/.next/server/app/api/update/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/api/workspaces/route.js +2 -2
- package/bundle/.next/server/app/api/workspaces/route.js.nft.json +1 -1
- package/bundle/.next/server/app/api/workspaces/route_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app/page.js +11 -11
- package/bundle/.next/server/app/page.js.nft.json +1 -1
- package/bundle/.next/server/app/page_client-reference-manifest.js +1 -1
- package/bundle/.next/server/app-paths-manifest.json +16 -16
- package/bundle/.next/server/chunks/419.js +249 -0
- package/bundle/.next/server/chunks/603.js +6 -6
- package/bundle/.next/server/pages/404.html +1 -1
- package/bundle/.next/server/pages/500.html +2 -2
- package/bundle/.next/static/chunks/{632-680acc061529597b.js → 768-10d6bd3c2342134e.js} +3 -3
- package/bundle/.next/static/chunks/app/page-863784e11f2deb8d.js +14 -0
- package/bundle/.next/static/css/a321f34e664c439e.css +3 -0
- package/package.json +1 -1
- package/bundle/.next/server/chunks/907.js +0 -249
- package/bundle/.next/static/chunks/app/page-a410ba4980548bfd.js +0 -14
- package/bundle/.next/static/css/b437564fd435ab82.css +0 -3
- /package/bundle/.next/static/{4ThNPJp9bEISWCDFyw3Jd → sgPf3JHUUWvk8YndSq2L9}/_buildManifest.js +0 -0
- /package/bundle/.next/static/{4ThNPJp9bEISWCDFyw3Jd → sgPf3JHUUWvk8YndSq2L9}/_ssgManifest.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";exports.id=603,exports.ids=[603],exports.modules={603:(a,b,c)=>{c.d(b,{R2:()=>af,Mt:()=>ak,Nr:()=>ag,r2:()=>aj,gO:()=>ai,Q4:()=>ah});var d=c(1455),e=c(6760),f=c.n(e),g=c(8912),h=c(4126),i=c(5615),j=c(3214);let k={founder:"Founder",product:"Product Lead",architect:"System Architect",ops:"Operations",growth:"Growth",reviewer:"Reviewer"},l={small:{label:"Small",agentCount:1,workflowCount:1,automationCount:0,externalChannelCount:0,confirmationLimit:1,suggestedReplyLimit:2},medium:{label:"Medium",agentCount:3,workflowCount:3,automationCount:1,externalChannelCount:0,confirmationLimit:2,suggestedReplyLimit:3},large:{label:"Large",agentCount:5,workflowCount:4,automationCount:2,externalChannelCount:1,confirmationLimit:3,suggestedReplyLimit:4}};function m(a){return l[a]??l.medium}let n={internal:{label:"Internal",requiresCredentials:!1,credentials:[]},slack:{label:"Slack",requiresCredentials:!0,credentials:[{key:"botToken",label:"Bot token",placeholder:"xoxb-...",secret:!0}]},telegram:{label:"Telegram",requiresCredentials:!0,credentials:[{key:"token",label:"Bot token",placeholder:"123456:ABC...",secret:!0}]},discord:{label:"Discord",requiresCredentials:!0,credentials:[{key:"token",label:"Bot token",placeholder:"Discord bot token",secret:!0}]},googlechat:{label:"Google Chat",requiresCredentials:!0,credentials:[{key:"webhookUrl",label:"Webhook URL",placeholder:"https://chat.googleapis.com/...",secret:!0}]}};function o(){return globalThis.crypto?.randomUUID?.()??`plan-${Date.now()}`}function p(a,b,c){return{id:o(),role:a,author:b,text:c,createdAt:new Date().toISOString()}}function q(a){return{id:a.id?.trim()||o(),kind:a.kind,label:a.label.trim(),summary:a.summary.trim(),details:V(a.details),status:a.status??"ready",createdAt:a.createdAt??new Date().toISOString(),url:U(a.url),error:U(a.error)}}function r(a){return{id:a.id?.trim()||o(),section:a.section,label:a.label.trim(),value:a.value.trim(),confidence:Math.max(0,Math.min(100,Math.round(a.confidence??72))),status:a.status??"inferred",rationale:T(a.rationale??""),sourceLabels:V(a.sourceLabels)}}function s(a){let b=Y(a?.id||a?.name||"operator")||"operator",c=a?.role?.trim()||"Operator",d=a?.name?.trim()||Z(b);return{id:b,role:c,name:d,purpose:a?.purpose?.trim()||`${d} owns ${c.toLowerCase()} execution and handoffs.`,enabled:a?.enabled!==!1,isPrimary:!!a?.isPrimary,emoji:a?.emoji?.trim(),theme:a?.theme?.trim(),skillId:a?.skillId?.trim(),modelId:a?.modelId?.trim(),policy:a?.policy??(0,h.g0)("worker"),heartbeat:a?.heartbeat??{enabled:!1},responsibilities:V(a?.responsibilities),outputs:V(a?.outputs)}}function t(a){return{id:Y(a?.id||a?.name||`workflow-${Date.now()}`)||`workflow-${Date.now()}`,name:a?.name?.trim()||"New workflow",goal:a?.goal?.trim()||"",trigger:a?.trigger??"manual",ownerAgentId:a?.ownerAgentId?.trim(),collaboratorAgentIds:V(a?.collaboratorAgentIds),successDefinition:a?.successDefinition?.trim()||"",outputs:V(a?.outputs),channelIds:V(a?.channelIds),enabled:a?.enabled!==!1}}function u(a="internal",b){let c=n[a];return{id:Y(b?.id||b?.name||`${a}-${Date.now()}`)||`${a}-${Date.now()}`,type:a,name:b?.name?.trim()||c.label,purpose:b?.purpose?.trim()||"",target:b?.target?.trim(),enabled:b?.enabled!==!1,announce:!!b?.announce,requiresCredentials:c.requiresCredentials,credentials:b?.credentials?.map(a=>({...a,value:a.value??""}))??c.credentials.map(a=>({...a,value:""}))}}function v(a){return{id:Y(a?.id||a?.name||`automation-${Date.now()}`)||`automation-${Date.now()}`,name:a?.name?.trim()||"New automation",description:a?.description?.trim()||"",enabled:a?.enabled!==!1,scheduleKind:a?.scheduleKind??"every",scheduleValue:a?.scheduleValue?.trim()||"24h",agentId:a?.agentId?.trim(),mission:a?.mission?.trim()||"",thinking:a?.thinking??"medium",announce:!!a?.announce,channelId:a?.channelId?.trim()}}function w(a){return{id:Y(a?.id||a?.name||`hook-${Date.now()}`)||`hook-${Date.now()}`,name:a?.name?.trim()||"New hook",source:a?.source?.trim()||"",enabled:a?.enabled!==!1,notes:a?.notes?.trim()||""}}function x(a){return{workspaceOnly:a?.workspaceOnly??!0,mode:a?.mode??"default",notes:V(a?.notes)}}function y(a){return{started:!!a?.started,initialPrompt:T(a?.initialPrompt??""),latestPrompt:T(a?.latestPrompt??""),sources:(a?.sources??[]).map(a=>q(a)),confirmations:V(a?.confirmations).map(a=>a.trim()).filter(Boolean).slice(0,3),mode:a?.mode==="advanced"?"advanced":"guided",size:a?.size==="small"||a?.size==="large"?a.size:"medium",reviewRequested:!!a?.reviewRequested,turnCount:Math.max(0,Math.floor(a?.turnCount??0)),inferences:(a?.inferences??[]).map(a=>r(a)),suggestedReplies:V(a?.suggestedReplies).slice(0,4)}}function z(a,b){let c=b?.architectSessionId?.trim()||`planner-${a}-architect`,d=Object.fromEntries(Object.entries(b?.advisorAgentIds??{}).filter(([,a])=>"string"==typeof a&&a.trim())),e=Object.fromEntries(Object.entries(k).map(([c])=>[c,b?.advisorSessionIds?.[c]?.trim()||`planner-${a}-${c}`]));return{mode:b?.mode==="fallback"?"fallback":"agent",status:b?.status==="error"?"error":b?.status==="ready"?"ready":"pending",workspaceId:U(b?.workspaceId),workspacePath:U(b?.workspacePath),architectAgentId:U(b?.architectAgentId),architectSessionId:c,advisorAgentIds:d,advisorSessionIds:e,lastArchitectRunId:U(b?.lastArchitectRunId),lastAdvisorRunIds:V(b?.lastAdvisorRunIds),lastError:U(b?.lastError)}}function A(a){return(0,j.P0)(a,"core").map(b=>{var c,d,e,f,g,i,j;return s({id:b.id,role:b.role,name:b.name,purpose:(c=b.id,d=b.role,e=a,/review/i.test(c)||/review/i.test(d)?`Pressure-test ${e} work for correctness, regression risk, and missing validation.`:/test/i.test(c)||/test/i.test(d)?`Validate behavior, environment assumptions, and release confidence for this ${e} workspace.`:/learn/i.test(c)||/learn/i.test(d)?"Keep the workspace memory, conventions, and durable decisions coherent over time.":/browser/i.test(c)||/browser/i.test(d)?"Exercise real UI flows and collect evidence for browser-facing work.":`Own hands-on delivery and keep the ${e} workspace moving.`),enabled:b.enabled,isPrimary:b.isPrimary,emoji:b.emoji,theme:b.theme,skillId:b.skillId,modelId:b.modelId,policy:b.policy??(0,h.g0)("worker"),heartbeat:b.heartbeat??{enabled:!1},responsibilities:(f=b.id,g=a,/review/i.test(f)?["Review active work","Call out regressions","Protect launch quality"]:/test/i.test(f)?["Run verification loops","Capture evidence","Surface failing assumptions"]:/learn/i.test(f)?["Update durable memory","Track decisions","Reduce restart friction"]:/browser/i.test(f)?["Exercise flows","Capture screenshots","Validate responsive states"]:"content"===g?["Drive content production","Coordinate handoffs","Prepare launch artifacts"]:["Implement the next increment","Coordinate specialists","Keep execution momentum"]),outputs:(i=b.id,j=a,/review/i.test(i)?["review notes","risk checklist"]:/test/i.test(i)?["verification report","repro steps"]:/learn/i.test(i)?["memory updates","decision log entries"]:/browser/i.test(i)?["screenshots","browser validation notes"]:"research"===j?["research summary","evidence log"]:["implementation artifacts","handoff summary"])})})}function B(a,b){let c=b.find(a=>a.enabled&&a.isPrimary)?.id,d=R(b,"review"),e=R(b,"test"),f=R(b,"learn"),g=R(b,"browser");if("research"===a)return[t({id:"research-loop",name:"Research loop",goal:"Turn the main question into evidence-backed findings and explicit unknowns.",trigger:"manual",ownerAgentId:c,collaboratorAgentIds:[f,d].filter(Boolean),successDefinition:"Question, evidence, synthesis, and next-step recommendations are documented.",outputs:["docs/research-plan.md","deliverables/<run>/research-summary.md"]}),t({id:"finding-review",name:"Finding review",goal:"Pressure-test claims before publishing or acting on them.",trigger:"manual",ownerAgentId:d??c,collaboratorAgentIds:[c].filter(Boolean),successDefinition:"Assumptions, risks, and evidence gaps are explicit.",outputs:["deliverables/<run>/review-notes.md"]})];if("content"===a)return[t({id:"strategy",name:"Strategy and briefing",goal:"Clarify audience, offer, channels, and campaign bets before production.",trigger:"manual",ownerAgentId:c,collaboratorAgentIds:[d,f].filter(Boolean),successDefinition:"The team agrees on brief, priorities, and success signals.",outputs:["docs/content-brief.md","deliverables/<run>/campaign-brief.md"]}),t({id:"production",name:"Production and QA",goal:"Create assets, review them, and prepare a launch package.",trigger:"manual",ownerAgentId:c,collaboratorAgentIds:[d].filter(Boolean),successDefinition:"Assets are approved and delivery-ready.",outputs:["deliverables/<run>/drafts/","deliverables/<run>/launch-package.md"]}),t({id:"performance-loop",name:"Performance loop",goal:"Review outcomes, learn from results, and feed the next iteration.",trigger:"cron",ownerAgentId:f??d??c,collaboratorAgentIds:[c].filter(Boolean),successDefinition:"Measured results and next changes are documented.",outputs:["deliverables/<run>/performance-review.md"]})];let h=g&&"frontend"===a?g:c;return[t({id:"scope-v1",name:"V1 shaping",goal:"Turn the product goal into a constrained first delivery batch.",trigger:"manual",ownerAgentId:c,collaboratorAgentIds:[f,d].filter(Boolean),successDefinition:"Scope, non-goals, and critical path are documented.",outputs:["docs/brief.md","memory/blueprint.md"]}),t({id:"delivery",name:"Delivery loop",goal:"Implement, validate, and hand off the next meaningful increment.",trigger:"manual",ownerAgentId:h,collaboratorAgentIds:[e,d].filter(Boolean),successDefinition:"A tested increment ships with review notes and clear handoff.",outputs:["deliverables/<run>/release-notes.md","deliverables/<run>/verification.md"]}),t({id:"launch-readiness",name:"Launch readiness",goal:"Check blockers, rollback posture, and communication before launch.",trigger:"launch",ownerAgentId:d??c,collaboratorAgentIds:[e,f].filter(Boolean),successDefinition:"Launch risks, open blockers, and go/no-go signal are explicit.",outputs:["deliverables/<run>/launch-checklist.md"]})]}function C(){return[u("internal",{id:"internal-ops",name:"Internal ops",purpose:"Default internal coordination surface for planner outputs and deploy notes.",announce:!1})]}function D(a,b,c){let d=R(b,"review")??b.find(a=>a.enabled)?.id,e=R(b,"learn")??d,f=c[0]?.id;return[v({id:"daily-triage",name:"Daily triage",description:"Review drift, blockers, and next handoffs every day.",scheduleKind:"every",scheduleValue:"24h",agentId:d,mission:"content"===a?"Review active campaigns, blockers, and next content handoffs. Leave a concise operator brief.":"Inspect the workspace, surface blockers, and leave a concise next-step handoff for the team.",thinking:"medium",channelId:f}),v({id:"weekly-review",name:"Weekly review",description:"Capture progress, decisions, and next bets once per week.",scheduleKind:"every",scheduleValue:"168h",agentId:e,mission:"research"===a?"Summarize evidence gathered this week, open questions, and the next investigation batch.":"Summarize progress, major decisions, and the next delivery batch for this workspace.",thinking:"high",channelId:f})].filter(a=>a.agentId)}function E(a=o()){let b=new Date().toISOString(),c="software",d=A(c),e=C();return G({id:a,status:"draft",stage:"intake",createdAt:b,updatedAt:b,autopilot:!0,readinessScore:0,architectSummary:"",runtime:z(a),intake:y(),company:{name:"",type:"saas",mission:"",targetCustomer:"",constraints:[],successSignals:[]},product:{offer:"",scopeV1:[],nonGoals:[],revenueModel:"",launchPriority:[]},workspace:{name:"",sourceMode:"empty",template:c,modelProfile:"balanced",stackDecisions:[],docs:(0,j.GH)(c,j.eY),rules:{...j.eY}},team:{persistentAgents:d,allowEphemeralSubagents:!0,maxParallelRuns:4,escalationRules:["Escalate ambiguous product decisions to the architect before implementation.","Escalate missing tooling or blocked environments before the delivery workflow starts.","Escalate launch blockers when review or verification fails."]},operations:{workflows:B(c,d),channels:e,automations:D(c,d,e),hooks:[w({id:"handoff-audit",name:"Handoff audit",source:"workspace manifest",enabled:!0,notes:"Keep delivery artifacts and handoffs durable enough for other agents to continue."})],sandbox:x({workspaceOnly:!0,mode:"default",notes:["Keep file work grounded in the target workspace by default."]})},deploy:{blockers:[],warnings:[],firstMissions:[],createdAgentIds:[],provisionedChannels:[],provisionedAutomations:[],kickoffRunIds:[]},conversation:[p("assistant","Workspace Architect","Tell me what you want to make autonomous first. You can paste a website, repo, or folder path, and I will draft the workspace and only ask for the decisions that really need you.")],advisorNotes:[]})}function F(a,b){let c=X(a),d=A(b),e=c.operations.channels.length?c.operations.channels:C();return c.workspace.template=b,c.workspace.docs=(0,j.GH)(b,c.workspace.rules),c.team.persistentAgents=d,c.operations.workflows=B(b,d),c.operations.automations=D(b,d,e),G(c)}function G(a){var b,c,d,e,f,g,h,i,k,l,n,o,p,q,E,F,G,H,I,Y,$,_,aa,ab,ac;let ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at=X(a);if(at.runtime=z(at.id,at.runtime),at.intake=y({...at.intake,started:!!at.intake?.started||at.conversation.some(a=>"user"===a.role)}),at.company.name=T(at.company.name),at.company.mission=T(at.company.mission),at.company.targetCustomer=T(at.company.targetCustomer),at.company.constraints=V(at.company.constraints),at.company.successSignals=V(at.company.successSignals),at.product.offer=T(at.product.offer),at.product.scopeV1=V(at.product.scopeV1),at.product.nonGoals=V(at.product.nonGoals),at.product.revenueModel=T(at.product.revenueModel),at.product.launchPriority=V(at.product.launchPriority),at.workspace.name=T(at.workspace.name),at.workspace.directory=U(at.workspace.directory),at.workspace.repoUrl=U(at.workspace.repoUrl),at.workspace.existingPath=U(at.workspace.existingPath),at.workspace.stackDecisions=V(at.workspace.stackDecisions),at.workspace.docs=W(V(at.workspace.docs).concat((0,j.GH)(at.workspace.template,at.workspace.rules))),at.team.persistentAgents=at.team.persistentAgents.map(a=>s({...a,id:a.id,role:a.role,name:a.name,purpose:a.purpose,enabled:a.enabled,isPrimary:a.isPrimary,emoji:a.emoji,theme:a.theme,skillId:a.skillId,modelId:a.modelId,policy:a.policy,heartbeat:a.heartbeat,responsibilities:a.responsibilities,outputs:a.outputs})).filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b),0===at.team.persistentAgents.length&&(at.team.persistentAgents=A(at.workspace.template)),!at.team.persistentAgents.some(a=>a.enabled&&a.isPrimary)){let a=at.team.persistentAgents.find(a=>a.enabled);a&&(a.isPrimary=!0)}if(at.operations.channels=at.operations.channels.map(a=>u(a.type,a)).filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b),0===at.operations.channels.length&&(at.operations.channels=C()),at.operations.workflows=at.operations.workflows.map(a=>t(a)).filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b),0===at.operations.workflows.length&&(at.operations.workflows=B(at.workspace.template,at.team.persistentAgents)),at.operations.automations=at.operations.automations.map(a=>v(a)).filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b),ar=m((aq=X(at)).intake.size),aq.team.persistentAgents=function(a,b,c){var d;let e,f;if(c<=0)return[];return S((f=(d=[...b,...A(a),...(e=s({id:"ops-lead",role:"Operations Lead",name:"Operations Lead",purpose:"Own automations, reporting cadence, and cross-agent handoffs for the workspace.",responsibilities:["Maintain the operating cadence","Wire recurring automations","Keep handoffs durable"],outputs:["ops brief","automation notes"]}),"research"===a?[s({id:"analyst",role:"Analyst",name:"Analyst",purpose:"Turn gathered evidence into patterns, themes, and decision-ready summaries.",responsibilities:["Cluster findings","Spot repeated signals","Prepare concise summaries"],outputs:["insight summary","theme map"]}),e]:[e])]).find(a=>a.isPrimary)??d[0])?[f,...d.filter(a=>a.id!==f.id)]:d).slice(0,c).map((a,b)=>s({...a,enabled:!0,isPrimary:a.isPrimary||0===b}))}(aq.workspace.template,aq.team.persistentAgents,ar.agentCount),aq.operations.channels=function(a,b,c){let d=b.find(a=>"internal"===a.type)??C()[0],e=[...b.filter(a=>"internal"!==a.type),...("content"===a?["telegram","discord","slack"]:["slack","discord","telegram"]).map(b=>u(b,{id:`${b}-ops`,purpose:"content"===a?"Optional distribution or community surface for a larger operating setup.":"Optional external operating surface for a larger workspace.",enabled:!1,announce:!0}))].filter((a,b,c)=>c.findIndex(b=>b.type===a.type)===b);return[u("internal",{...d,enabled:!0}),...e.slice(0,c)]}(aq.workspace.template,aq.operations.channels,ar.externalChannelCount),aq.operations.workflows=function(a,b,c,d){let e,f,g,h;return d<=0?[]:S([...b,...B(a,c),...(e=c.find(a=>a.enabled&&a.isPrimary)?.id,f=R(c,"review"),g=R(c,"learn"),h=R(c,"ops"),[t({id:"context-sync",name:"research"===a?"Evidence sync":"Context sync",goal:"Pull new context from linked sources and keep the blueprint aligned with reality.",trigger:"manual",ownerAgentId:g??e,collaboratorAgentIds:[e,f].filter(Boolean),successDefinition:"New context is reflected in durable docs, scope, and decision notes.",outputs:["memory/blueprint.md","deliverables/<run>/context-sync.md"]}),t({id:"ops-rhythm",name:"Operating rhythm",goal:"Review handoffs, automations, and next-step ownership on a repeatable cadence.",trigger:"cron",ownerAgentId:h??f??g??e,collaboratorAgentIds:[e].filter(Boolean),successDefinition:"The workspace has a fresh operator brief and an explicit next batch of work.",outputs:["deliverables/<run>/ops-rhythm.md"]})])]).slice(0,d).map(a=>{var b,d;let e,f,g,h,i;return b=a,e=new Set((d=c).filter(a=>a.enabled).map(a=>a.id)),f=d.find(a=>a.enabled&&a.isPrimary)?.id,g=R(d,"review"),h=R(d,"learn"),i=b.ownerAgentId&&e.has(b.ownerAgentId)?b.ownerAgentId:g??h??f,t({...b,ownerAgentId:i,collaboratorAgentIds:b.collaboratorAgentIds.filter(a=>e.has(a)&&a!==i),enabled:!0})})}(aq.workspace.template,aq.operations.workflows,aq.team.persistentAgents,ar.workflowCount),aq.operations.automations=(c=aq.workspace.template,d=aq.operations.automations,e=aq.team.persistentAgents,f=aq.operations.channels,(g=ar.automationCount)<=0?[]:S([...d,...D(c,e,f)]).slice(0,g).map(a=>{var b,c,d;let g,h,i,j,k;return b=a,c=e,d=f,g=new Set(c.filter(a=>a.enabled).map(a=>a.id)),h=new Set(d.map(a=>a.id)),i=c.find(a=>a.enabled&&a.isPrimary)?.id,j=R(c,"review"),k=R(c,"learn"),v({...b,agentId:b.agentId&&g.has(b.agentId)?b.agentId:j??k??i,channelId:b.channelId&&h.has(b.channelId)?b.channelId:d[0]?.id,enabled:!0})})),(at=aq).operations.hooks=at.operations.hooks.map(a=>w(a)).filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b),at.operations.sandbox=x(at.operations.sandbox),at.deploy.firstMissions=(as=(b=at).team.persistentAgents.find(a=>a.enabled&&a.isPrimary),W([as?"Inspect the new workspace, refine docs to match the blueprint, and break the first delivery batch into concrete tasks.":"",b.team.persistentAgents.find(a=>/review/i.test(a.role)&&a.enabled)?"Review the blueprint against the created workspace, call out execution risks, and leave a launch-readiness checklist.":"",b.team.persistentAgents.find(a=>/learn/i.test(a.role)&&a.enabled)?"Capture durable facts, decisions, and conventions in memory files so the team can continue without drift.":""].filter(Boolean))),!at.company.name&&at.workspace.name&&(at.company.name=at.workspace.name),!at.workspace.name&&at.company.name&&(at.workspace.name=at.company.name),!at.intake.started)return at.deploy.blockers=[],at.deploy.warnings=[],at.intake.confirmations=[],at.intake.inferences=[],at.intake.suggestedReplies=[],at.readinessScore=0,at.architectSummary="Start with one prompt. Paste the project goal, website URL, repo, or existing folder and the architect will draft the workspace for you.",at.stage="intake",at.status="draft",at.updatedAt=new Date().toISOString(),at;let au=function(a){var b;let c,d,e=K(a),f=[],g=m(a.intake.size),h=a.intake.sources.some(a=>"website"===a.kind&&"ready"===a.status),i=L(a),j=!!(a.company.mission&&a.company.targetCustomer&&(a.product.offer||a.product.scopeV1.length>0));for(let g of(a.company.name||f.push("tr"===e?"Şirkete ya da workspace'e ne ad verelim?":"What should I call the company or workspace?"),a.company.mission||f.push("tr"===e?"Bu workspace \xf6nce tam olarak hangi \xe7ıktıyı optimize etmeli?":"What exact outcome should this workspace optimize for first?"),a.company.targetCustomer||f.push((c=K(b=a),(d=M(b))?"tr"===c?`İlk hedef kitleyi ${d} olarak okuyorum. Bunu koruyalım mı, yoksa daha doğru segmenti sen mi g\xf6stereceksin?`:`I can read the first audience as ${d}. Keep that, or point me to the better segment?`:"content"===b.workspace.template?b.operations.channels.some(a=>"telegram"===a.type&&a.enabled)?"tr"===c?"İlk kullanıcı topluluk y\xf6neticileri, moderat\xf6rler ya da Telegram \xfcyeleri mi olmalı?":"Should the first user be community managers, moderators, or Telegram members?":"tr"===c?"Bu i\xe7erik ya da topluluk workspace'i \xf6nce kime hizmet etmeli?":"Who should this content or community workspace serve first?":"research"===b.workspace.template?"tr"===c?"Bu araştırma workspace'i i\xe7in ilk karar verici ya da hedef kitle kim?":"Who is the first decision-maker or audience for this research workspace?":"tr"===c?"İlk kullanıcı ya da m\xfcşteri segmenti kim?":"Who is the first user or customer segment?")),a.workspace.repoUrl||a.workspace.existingPath||!(a.intake.turnCount<=1)||N(a.intake.latestPrompt||a.intake.initialPrompt)||f.push("tr"===e?"Buna sıfırdan mı başlayalım, bir repo mu klonlayalım, yoksa mevcut bir klas\xf6r\xfc m\xfc bağlayalım?":"Should this start from scratch, clone a repo, or attach an existing folder?"),a.company.mission&&a.company.targetCustomer&&0===a.product.scopeV1.length?f.push("tr"===e?"İlk \xe7ıkaracağımız en k\xfc\xe7\xfck V1 sonucu ne olmalı?":"What is the smallest V1 outcome we should launch first?"):0===a.product.nonGoals.length&&j&&a.product.scopeV1.length>0&&("advanced"===a.intake.mode||a.intake.reviewRequested||a.intake.turnCount>=4)&&f.push("tr"===e?"V1 i\xe7in neleri \xf6zellikle kapsam dışında bırakalım?":"What should stay explicitly out of scope for V1?"),a.company.mission&&(a.product.scopeV1.length>0||h||i.length>0)&&0===a.company.successSignals.length&&("advanced"===a.intake.mode||a.intake.reviewRequested||a.intake.turnCount>=3)&&f.push("tr"===e?"Bu workspace'in işe yaradığını bize hangi sinyal g\xf6stermeli?":"What signal should tell us this workspace is working?"),a.intake.sources.filter(a=>"error"===a.status)))f.push("tr"===e?`${g.label} kaynağını inceleyemedim. Bu kaynak \xf6nemliyse şirket bağlamını manuel olarak doğrula.`:`I could not inspect ${g.label}. Confirm the company context manually if this source matters.`);return W(f).slice(0,Math.min(h?2:3,g.confirmationLimit))}(at),av=function(a){let b=[];for(let c of(a.company.name||b.push("Company or workspace name is missing."),a.company.mission||b.push("Mission is missing."),a.company.targetCustomer||b.push("Target customer is missing."),a.workspace.name||b.push("Workspace name is missing."),"clone"!==a.workspace.sourceMode||a.workspace.repoUrl||b.push("Clone mode needs a repository URL."),"existing"!==a.workspace.sourceMode||a.workspace.existingPath||b.push("Existing-folder mode needs a folder path."),a.team.persistentAgents.some(a=>a.enabled)||b.push("At least one persistent agent must be enabled."),a.team.persistentAgents.some(a=>a.enabled&&a.isPrimary)||b.push("One enabled agent must be marked as primary."),a.operations.workflows.some(a=>a.enabled)||b.push("At least one enabled workflow is required."),a.operations.workflows.filter(a=>a.enabled)))c.name&&c.goal&&c.successDefinition||b.push(`Workflow "${c.name||c.id}" is incomplete.`),c.ownerAgentId&&!a.team.persistentAgents.some(a=>a.id===c.ownerAgentId&&a.enabled)&&b.push(`Workflow "${c.name}" points to a missing or disabled owner agent.`);for(let c of a.operations.automations.filter(a=>a.enabled))c.mission&&c.scheduleValue||b.push(`Automation "${c.name}" is incomplete.`),c.agentId&&!a.team.persistentAgents.some(a=>a.id===c.agentId&&a.enabled)&&b.push(`Automation "${c.name}" points to a missing or disabled agent.`);for(let c of a.operations.channels.filter(a=>a.enabled&&a.requiresCredentials))c.credentials.filter(a=>!a.value.trim()).length>0&&b.push(`Channel "${c.name}" is missing required credentials.`);return W(b)}(at),aw=(ad=[],ae=m((h=at).intake.size),0===h.product.nonGoals.length&&ad.push("No non-goals are defined for V1."),0===h.product.launchPriority.length&&ad.push("Launch priorities are not ordered yet."),0===h.company.successSignals.length&&ad.push("Success signals are still empty."),0===h.workspace.stackDecisions.length&&"content"!==h.workspace.template&&ad.push("Critical stack decisions are not captured yet."),ae.automationCount>0&&!h.operations.automations.some(a=>a.enabled)&&ad.push("No automation loops are enabled."),ae.externalChannelCount>0&&!h.operations.channels.some(a=>"internal"!==a.type)&&ad.push("Only internal channels are configured."),ae.agentCount>=3&&h.team.maxParallelRuns<2&&ad.push("Parallel run limit is conservative for a multi-agent workspace."),W(ad)),ax=J(at);return at.intake.confirmations=au,at.intake.inferences=(af=[],ag=(i=at).intake.sources.filter(a=>"ready"===a.status).map(a=>a.label),ah=i.intake.confirmations.join(" ").toLowerCase(),i.company.name&&af.push(r({section:"company",label:"Company",value:i.company.name,confidence:O(i,"company-name"),status:P(ah,"company"),rationale:ag.length>0?"Derived from linked context and the current brief.":"Derived from the current brief.",sourceLabels:ag})),i.company.mission&&af.push(r({section:"company",label:"Mission",value:i.company.mission,confidence:O(i,"mission"),status:P(ah,"outcome"),rationale:"Architect condensed the first business outcome from the request.",sourceLabels:ag})),i.company.targetCustomer&&af.push(r({section:"company",label:"First audience",value:i.company.targetCustomer,confidence:O(i,"target-customer"),status:P(ah,"audience"),rationale:"This is the current best guess for the first user or buyer segment.",sourceLabels:ag})),af.push(r({section:"workspace",label:"Workspace type",value:Z(i.workspace.template),confidence:O(i,"template"),status:"inferred",rationale:"Template is inferred from the requested operating model and linked context.",sourceLabels:ag})),af.push(r({section:"workspace",label:"Starting point",value:"clone"===i.workspace.sourceMode?i.workspace.repoUrl||"Clone an existing repository":"existing"===i.workspace.sourceMode?i.workspace.existingPath||"Attach an existing folder":"Start from scratch",confidence:O(i,"source-mode"),status:P(ah,"start"),rationale:"This is how the workspace will be materialized when you deploy.",sourceLabels:ag})),i.product.offer&&af.push(r({section:"product",label:"Offer",value:i.product.offer,confidence:O(i,"offer"),status:"inferred",rationale:"Architect turned the brief into a concrete operator-facing offer.",sourceLabels:ag})),(ai=i.operations.channels.filter(a=>a.enabled&&"internal"!==a.type)).length>0&&af.push(r({section:"operations",label:"External channels",value:ai.map(a=>a.name).join(", "),confidence:O(i,"channels"),status:"inferred",rationale:"The request implies these operating channels should exist after deploy.",sourceLabels:ag})),(aj=i.team.persistentAgents.find(a=>a.enabled&&a.isPrimary))&&af.push(r({section:"team",label:"Primary operator",value:`${aj.name} (${aj.role})`,confidence:O(i,"team"),status:"inferred",rationale:"Architect drafted a primary agent to own the first delivery loop.",sourceLabels:ag})),(ak=i.operations.workflows.find(a=>a.enabled))&&af.push(r({section:"operations",label:"First workflow",value:ak.name,confidence:O(i,"workflow"),status:"inferred",rationale:"This is the first operational loop the company would run after deploy.",sourceLabels:ag})),af.slice(0,8)),at.intake.suggestedReplies=(k=at,l=au,al=K(k),am=[],an=m(k.intake.size),ao=M(k),k.company.targetCustomer||(ao&&am.push("tr"===al?`İlk hedef kitle ${Q(ao)} gibi g\xf6r\xfcn\xfcyor.`:`The first audience looks like ${Q(ao)}.`),"content"===k.workspace.template?(am.push("tr"===al?"İlk kullanıcılar topluluk y\xf6neticileri ve moderat\xf6rler.":"The first users are community managers and moderators."),am.push("tr"===al?"İlk kullanıcılar daha hızlı moderasyon ve onboarding isteyen Telegram \xfcyeleri.":"The first users are Telegram members who need faster moderation and onboarding.")):am.push("tr"===al?"İlk kullanıcılar bu iş akışını her g\xfcn y\xfcr\xfcten operat\xf6rler.":"The first users are the operators running this workflow every day.")),k.company.mission||am.push("tr"===al?"İlk hedef, hacmi en y\xfcksek manuel iş akışını otomatikleştirmek.":"The first outcome is automating the highest-volume manual workflow."),!k.product.scopeV1.length&&k.company.mission&&k.company.targetCustomer&&am.push("tr"===al?"V1, genişlemeden \xf6nce en dar ama faydalı d\xf6ng\xfcy\xfc u\xe7tan uca \xe7\xf6zmeli.":"V1 should handle the narrowest useful loop end to end before we expand."),k.workspace.repoUrl||k.workspace.existingPath||N(k.intake.latestPrompt||k.intake.initialPrompt)||(am.push("tr"===al?"Şimdilik sıfırdan başlayalım.":"Start from scratch for now."),am.push("tr"===al?"İyi bir temel bulursak mevcut bir repository klonlayabiliriz.":"Clone an existing repository if you find a good base.")),0===k.company.successSignals.length&&k.intake.turnCount>=2&&am.push("tr"===al?"Başarı; daha az manuel iş, daha hızlı yanıt s\xfcreleri ve daha net bir operasyon ritmi demek.":"Success means less manual work, faster response times, and a clearer operating cadence."),0===l.length&&(am.push("tr"===al?"Gelişmiş edit\xf6r\xfc a\xe7.":"Open the advanced editor."),am.push("tr"===al?"Deploy review aşamasına ge\xe7.":"Move into deploy review.")),W(am).slice(0,an.suggestedReplyLimit)),at.deploy.blockers=ax?av:[],at.deploy.warnings=ax?aw:[],at.readinessScore=(n=at,o=av,p=aw,q=ax,ap=14,n.company.name&&(ap+=10),n.company.mission&&(ap+=15),n.company.targetCustomer&&(ap+=15),n.product.offer&&(ap+=10),n.product.scopeV1.length>0&&(ap+=10),n.workspace.name&&(ap+=10),n.intake.sources.length>0&&(ap+=6),n.team.persistentAgents.some(a=>a.enabled&&a.isPrimary)&&(ap+=10),n.operations.workflows.some(a=>a.enabled)&&(ap+=10),n.operations.automations.some(a=>a.enabled)&&(ap+=5),q?(ap-=12*o.length,ap-=3*p.length):ap-=4*Math.max(0,n.intake.confirmations.length-1),Math.max(0,Math.min(100,ap))),at.architectSummary=function(a,b,c,d){let e=K(a),f=m(a.intake.size);if(!a.intake.started)return"tr"===e?`Tek bir mesajla başla. ${f.label} modunda sohbet yalın kalır; Architect ise arka planda proje bağlamını toplar, ekibi taslaklar ve workspace blueprint'ini hazırlar.`:`Start with one prompt. ${f.label} mode keeps the chat lean while the architect still harvests full project context, drafts the team, and prepares the workspace blueprint.`;let g=a.team.persistentAgents.filter(a=>a.enabled).length,h=a.operations.workflows.filter(a=>a.enabled).length,i=a.operations.automations.filter(a=>a.enabled).length,j=a.intake.confirmations.length;return d?"tr"===e?[a.company.mission?`${a.company.name||a.workspace.name||"Bu şirket"} ${a.company.mission} hedefi etrafında konumlandı.`:"Şirket misyonu i\xe7in h\xe2l\xe2 kısa ve net bir c\xfcmle gerekiyor.",a.company.targetCustomer?`Birincil hedef kitle: ${a.company.targetCustomer}.`:"Hedef m\xfcşteri h\xe2l\xe2 eksik.",`${g} agent, ${h} g\xf6rev ve ${i} automation yapılandırıldı.`,j>0?`Senden ${j} doğrulama daha gerekiyor.`:b.length>0?`Deploy \xf6ncesi ${b.length} blocker kaldı.`:c.length>0?`G\xf6zden ge\xe7irilmesi gereken ${c.length} warning var.`:"Kritik blocker kalmadı."].join(" "):[a.company.mission?`${a.company.name||a.workspace.name||"This company"} is pointed at ${a.company.mission}.`:"The company mission still needs a concise sentence.",a.company.targetCustomer?`Primary audience: ${a.company.targetCustomer}.`:"Target customer is still missing.",`${g} agents, ${h} tasks, and ${i} automations are configured.`,j>0?`${j} confirmation item${1===j?"":"s"} still need your input.`:b.length>0?`${b.length} blocker${1===b.length?"":"s"} remain before deploy.`:c.length>0?`${c.length} warning${1===c.length?"":"s"} remain to review.`:"No hard blockers remain."].join(" "):"tr"===e?[a.company.mission?`${a.company.name||a.workspace.name||"Bu workspace"} i\xe7in odak alanı ${a.company.mission}.`:a.company.name||a.workspace.name?`${a.company.name||a.workspace.name} i\xe7in ilk operasyonel \xe7ıktıyı şekillendiriyorum.`:"Bu workspace i\xe7in ilk somut \xe7ıktıyı h\xe2l\xe2 netleştiriyorum.",a.company.targetCustomer?`İlk hedef kitle: ${a.company.targetCustomer}.`:"İlk kullanıcı ya da hedef segmenti h\xe2l\xe2 netleştirmem gerekiyor.",a.intake.sources.length>0?`${a.intake.sources.length} bağlam kaynağını zaten topladım.`:"Bir website, repo ya da kısa bir brief ver; ilk taslağı \xe7ıkarayım.",`${f.label.toLowerCase()} mod i\xe7in ${g} agent, ${h} g\xf6rev ve ${i} automation taslağı hazır.`,j>0?`Senden sadece ${j} kritik karar daha gerekiyor.`:"Taslak tutarlı g\xf6r\xfcn\xfcyor. İstersen full blueprint'i a\xe7abilir ya da deploy review'a ge\xe7ebilirim."].join(" "):[a.company.mission?`${a.company.name||a.workspace.name||"This workspace"} looks like a ${Z(a.workspace.template).toLowerCase()} company focused on ${a.company.mission}.`:a.company.name||a.workspace.name?`I am shaping the first operating outcome for ${a.company.name||a.workspace.name}.`:"I am still shaping the first concrete outcome for this workspace.",a.company.targetCustomer?`First audience: ${a.company.targetCustomer}.`:"I still need the first audience or user segment.",a.intake.sources.length>0?`I already harvested ${a.intake.sources.length} context source${1===a.intake.sources.length?"":"s"}.`:"Give me a website, repo, or short brief and I will infer the first draft.",`${g} agents, ${h} tasks, and ${i} automations are drafted for ${f.label.toLowerCase()} mode.`,j>0?`Only ${j} high-value decision${1===j?"":"s"} still need your input.`:"The draft is coherent. I can open the full blueprint or move into deploy review."].join(" ")}(at,av,aw,ax),at.stage=(E=at,F=av,G=aw,H=au,I=ax,E.intake.started?"deploying"===E.status?"deploying":"deployed"===E.status?"deployed":(Y=E).company.mission||Y.product.offer||Y.workspace.name||Y.intake.sources.length>0?(($=E).company.name||$.workspace.name)&&$.company.mission&&$.team.persistentAgents.some(a=>a.enabled)&&$.operations.workflows.some(a=>a.enabled)?I?F.length>0?"pressure-test":G.length>0||E.readinessScore<90?"decision-lock":"ready":H.length>0?"team-synthesis":"decision-lock":"team-synthesis":E.intake.turnCount>1?"context-harvest":"intake":"intake"),at.status=(_=at,aa=av,ab=au,ac=ax,_.intake.started?"deploying"===_.status||"deployed"===_.status?_.status:ac?"blocked"===_.status&&aa.length>0||aa.length>0?"blocked":_.readinessScore>=90?"ready":"review":ab.length>0?"draft":"review":"draft"),at.updatedAt=new Date().toISOString(),at}async function H(a){let b=new Date().toISOString(),c=a.deploy.blockers,d=a.deploy.warnings,e=a.operations.workflows.find(a=>a.enabled),f=a.team.persistentAgents.find(a=>a.enabled&&a.isPrimary);return[{advisorId:"founder",summary:a.company.mission&&a.company.targetCustomer?"Outcome and audience are present.":"The commercial story is still thin.",recommendations:[a.company.mission?`Mission: ${a.company.mission}`:"State the company mission in one sentence.",a.company.targetCustomer?`Target customer: ${a.company.targetCustomer}`:"Specify the first buyer or user segment.",a.product.revenueModel?`Revenue model: ${a.product.revenueModel}`:"Lock a revenue or value exchange model before launch."].filter(Boolean),concerns:a.company.successSignals.length>0?[]:["Success signals are still vague. Add measurable outcomes before deploy."]},{advisorId:"product",summary:a.product.scopeV1.length>0?`V1 scope includes ${a.product.scopeV1.length} focused items.`:"V1 scope is not explicit yet.",recommendations:[a.product.offer?`Offer: ${a.product.offer}`:"Describe the core offer or user promise.",a.product.scopeV1.length>0?`Current V1 scope: ${a.product.scopeV1.join(", ")}`:"Define a constrained V1 scope.",a.product.nonGoals.length>0?`Non-goals: ${a.product.nonGoals.join(", ")}`:"List non-goals to prevent scope creep."].filter(Boolean),concerns:a.operations.workflows.length>0?[]:["No delivery workflow is defined yet."]},{advisorId:"architect",summary:f&&e?`${f.name} can own ${e.name}.`:"Agent ownership and workflow design still need alignment.",recommendations:[`Workspace template: ${Z(a.workspace.template)}`,`Source mode: ${a.workspace.sourceMode}`,a.workspace.stackDecisions.length>0?`Stack decisions: ${a.workspace.stackDecisions.join(", ")}`:"Add the critical stack or platform decisions."].filter(Boolean),concerns:a.team.persistentAgents.some(a=>a.enabled)?[]:["No enabled agents remain in the deploy team."]},{advisorId:"ops",summary:a.operations.automations.length>0?`${a.operations.automations.length} automations are queued.`:"Operations loops are not configured yet.",recommendations:[a.operations.channels.some(a=>a.enabled)?`${a.operations.channels.filter(a=>a.enabled).length} channels are enabled.`:"Choose at least one channel or keep the team internal-only.",a.operations.automations.length>0?`Automations: ${a.operations.automations.map(a=>a.name).join(", ")}`:"Define daily or weekly maintenance loops.",`Sandbox mode: ${a.operations.sandbox.mode}`].filter(Boolean),concerns:c.length>0?c.slice(0,2):d.slice(0,2)},{advisorId:"growth",summary:a.operations.channels.some(a=>"internal"!==a.type&&a.enabled)?"External communication channels are in the plan.":"Go-to-market channels are still internal-only.",recommendations:[a.operations.channels.some(a=>"internal"!==a.type&&a.enabled)?`External channels: ${a.operations.channels.filter(a=>"internal"!==a.type&&a.enabled).map(a=>a.name).join(", ")}`:"Add Slack, Telegram, Discord, or Google Chat if the company needs external operating channels.",a.company.successSignals.length>0?`Success signals: ${a.company.successSignals.join(", ")}`:"Tie the launch to measurable success signals."].filter(Boolean),concerns:a.product.launchPriority.length>0?[]:["Launch priorities are not ordered yet."]},{advisorId:"reviewer",summary:0===c.length?"No hard deploy blockers remain.":`${c.length} deploy blocker${1===c.length?"":"s"} still need resolution.`,recommendations:[0===c.length?"You can move into final review.":`Resolve blockers: ${c.join(" | ")}`,0===d.length?"No major warnings were detected.":`Warnings: ${d.join(" | ")}`],concerns:c.length>0?c:d.slice(0,3)}].map(a=>{var c,d,e,f,g;return c=a.advisorId,d=a.summary,e=a.recommendations,f=a.concerns,g=b,{id:o(),advisorId:c,advisorName:k[c],summary:d,recommendations:V(e),concerns:V(f),createdAt:g}})}function I(a,b,c,d){let e=K(a,c);if(!a.intake.started)return p("assistant","Workspace Architect","tr"===e?"Projeyi tek mesajda anlat. Bir website URL'si, repo URL'si ya da mevcut klas\xf6r yolu yapıştır; ben de buradan workspace taslağını \xe7ıkarayım.":"Describe the project in one prompt. You can paste a website URL, repo URL, or an existing folder path and I will draft the workspace from there.");let f=J(a),g=f?a.deploy.blockers:[],h=a.intake.confirmations.slice(0,2).map(a=>{var b;return b=a,"tr"!==e?b:b.replace("What should I call the company or workspace?","Şirkete ya da workspace'e ne ad verelim?").replace("What exact outcome should this workspace optimize for first?","Bu workspace \xf6nce tam olarak hangi \xe7ıktıyı optimize etmeli?").replace("Should this start from scratch, clone a repo, or attach an existing folder?","Buna sıfırdan mı başlayalım, bir repo mu klonlayalım, yoksa mevcut bir klas\xf6r\xfc m\xfc bağlayalım?").replace("What is the smallest V1 outcome we should launch first?","İlk \xe7ıkaracağımız en k\xfc\xe7\xfck V1 sonucu ne olmalı?").replace("What should stay explicitly out of scope for V1?","V1 i\xe7in neleri \xf6zellikle kapsam dışında bırakalım?").replace("What signal should tell us this workspace is working?","Bu workspace'in işe yaradığını bize hangi sinyal g\xf6stermeli?").replace("Who is the first user or customer segment?","İlk kullanıcı ya da m\xfcşteri segmenti kim?")}),i=a.intake.inferences.slice(0,4).map(a=>`${a.label}: ${a.value}`),j=a.intake.sources.slice(Math.max(0,a.intake.sources.length-2)).map(a=>`${a.label} (${"ready"===a.status?a.kind:`${a.kind}, needs confirmation`})`),k=b.flatMap(a=>a.recommendations.slice(0,1)).slice(0,f?2:1),l=function(a,b){var c;if(!a)return[];let d=[];if(a.company.name!==b.company.name&&b.company.name&&d.push(`Company name is now ${b.company.name}.`),a.workspace.name!==b.workspace.name&&b.workspace.name&&d.push(`Workspace name is now ${b.workspace.name}.`),a.company.mission!==b.company.mission&&b.company.mission&&d.push(`First outcome is ${b.company.mission}.`),a.company.targetCustomer!==b.company.targetCustomer&&b.company.targetCustomer&&d.push(`First audience is ${b.company.targetCustomer}.`),a.product.offer!==b.product.offer&&b.product.offer&&d.push(`Core offer is ${b.product.offer}.`),a.workspace.sourceMode!==b.workspace.sourceMode&&d.push(`Starting point is ${"clone"===(c=b.workspace.sourceMode)?"clone an existing repository":"existing"===c?"attach an existing folder":"start from scratch"}.`),a.intake.sources.length!==b.intake.sources.length){let c=b.intake.sources.length-a.intake.sources.length;c>0&&d.push(`Added ${c} new context source${1===c?"":"s"}.`)}return d}(d,a),m=(c||"").toLowerCase(),n=/\b(eksik|eksikleri|missing|what'?s missing|neler eksik)\b/.test(m),o=/\b(siteden|site(?:den)?|website|from the site|from the website|çıkar|extract|infer)\b/.test(m);return p("assistant","Workspace Architect",[l.length>0?"tr"===e?"Son y\xf6nlendirmene g\xf6re taslağı g\xfcncelledim.":`Applied: ${l.join(" ")}`:a.intake.turnCount<=1?"tr"===e?"İlk taslağı verdiğin brief \xfczerinden \xe7ıkardım.":"I drafted the first pass from your brief.":"tr"===e?"Taslağı son y\xf6nlendirmene g\xf6re g\xfcncelledim.":"I updated the draft with your latest direction.",j.length>0?"tr"===e?`Kullandığım bağlam: ${j.join(" \xb7 ")}.`:`Context in play: ${j.join(" \xb7 ")}.`:"",i.length>0?"tr"===e?`Şu anki taslak: ${i.join(" | ")}.`:`Current draft: ${i.join(" | ")}.`:"",k.length>0&&!f?"tr"===e?`Arka plan taslağı: ${k.join(" ")}`:`Background draft: ${k.join(" ")}`:"",o&&h.length>0?"tr"===e?`Bağlı kaynaktan \xe7ıkarabildiğim her alanı doldurdum. Sayfa şu noktaları h\xe2l\xe2 belirsiz bırakıyor: ${h.join("; ")}.`:`I filled what I could from the linked context. The page still leaves these items ambiguous: ${h.join("; ")}.`:n&&h.length>0?"tr"===e?`H\xe2l\xe2 eksik ya da d\xfcş\xfck g\xfcvenli noktalar: ${h.join("; ")}.`:`Still missing or low-confidence: ${h.join("; ")}.`:!f&&h.length>0?1===h.length?"tr"===e?`Senden sıradaki tek karar şu: ${h[0]}`:`Next I need one decision: ${h[0]}`:"tr"===e?`Senden sıradaki iki karar şu: ${h[0]} Sonra ${Q(h[1])}`:`Next I need two decisions: ${h[0]} Then ${Q(h[1])}`:f&&h.length>0?"tr"===e?`Deploy \xf6ncesi şunları netleştirelim: ${h.join("; ")}.`:`Before deploy, confirm: ${h.join("; ")}.`:g.length>0?"tr"===e?`DEPLOY \xf6ncesi h\xe2l\xe2 şunlara ihtiyacım var: ${g.join("; ")}.`:`Before DEPLOY I still need: ${g.join("; ")}.`:f?"tr"===e?"Blueprint yapısal olarak DEPLOY i\xe7in hazır. Uyarıları bir kez g\xf6zden ge\xe7irip ardından launch edebiliriz.":"Blueprint is structurally ready for DEPLOY. Review warnings once, then launch.":"tr"===e?"Taslak tutarlı g\xf6r\xfcn\xfcyor. İstersen şimdi gelişmiş edit\xf6r\xfc a\xe7ayım ya da deploy review aşamasına ge\xe7eyim.":"The draft is coherent. If you want, I can open the advanced editor or move into deploy review next.",c&&0===l.length?"tr"===e?`Son y\xf6nlendirmeyi kaydettim: "${c.trim()}".`:`Latest direction captured: "${c.trim()}".`:""].filter(Boolean).join("\n\n"))}function J(a){return a.intake.reviewRequested||"deploying"===a.status||"deployed"===a.status}function K(a,b){for(let c of[b,...a.conversation.slice().reverse().filter(a=>"user"===a.role).map(a=>a.text),a.intake.latestPrompt,a.intake.initialPrompt])if(function(a){let b=a?.trim();if(!b)return!1;if(/[çğıöşüÇĞİÖŞÜ]/.test(b))return!0;let c=b.toLowerCase().match(/\b(ve|bir|bu|şu|için|ile|olarak|olan|mı|mi|mu|mü|ne|nasıl|hangi|neden|hedef|ilk|müşteri|kullanıcı|oluştur|gerekli|alanları|yardımcı)\b/g);return!!(c&&c.length>=2)}(c))return"tr";return"en"}function L(a){return a.intake.sources.filter(a=>"ready"===a.status).flatMap(a=>[a.label,a.summary,...a.details]).join(" ").toLowerCase()}function M(a){let b=L(a);if(!b)return;let c=/\bweb3|onchain|crypto|blockchain|token\b/.test(b),d=/\bstartup|startups|founder|founders|business(?:es)?\b/.test(b),e=/\bcommunity|communities|member|members|holder|holders|nft|dao|governance\b/.test(b),f=/\bdeveloper|developers|builder|builders|engineer|engineers\b/.test(b),g=/\boperator|operators|moderator|moderators|admin|admins|ops\b/.test(b);return d&&e?c?"Web3 startups and token-led communities":"startups and their communities":d?c?"Web3 startups and founders":"startups and founders":e?c?"DAO, NFT, and Web3 communities":"community leads and members":f&&g?"developers and internal operators":f?"developers and technical teams":g?"internal operators and moderators":void 0}function N(a){return/\b(from scratch|greenfield|empty workspace|clone|repo|existing folder|existing workspace|s[ıi]f[ıi]rdan|mevcut klas[oö]r|mevcut repo|bo[sş])\b/i.test(a)}function O(a,b){let c=`${a.intake.initialPrompt} ${a.intake.latestPrompt}`.toLowerCase(),d=a.intake.sources.filter(a=>"ready"===a.status),e=66;return d.length>0&&(e+=8),a.intake.turnCount>1&&(e+=6),("template"===b&&/\b(telegram|discord|community|topluluk|grup|content|marketing|research|frontend|backend)\b/.test(c)||"source-mode"===b&&N(c)||"channels"===b&&/\b(slack|telegram|discord|google chat)\b/.test(c))&&(e+=10),"company-name"===b&&d.some(a=>"website"===a.kind)&&(e+=6),"target-customer"!==b||a.company.targetCustomer||(e-=18),("workflow"===b||"team"===b)&&(e-=4),Math.max(52,Math.min(96,e))}function P(a,b){return a.includes(b)?"needs-confirmation":"inferred"}function Q(a){return a?a.charAt(0).toLowerCase()+a.slice(1):a}function R(a,b){return a.find(a=>RegExp(b,"i").test(`${a.id} ${a.role} ${a.name}`))?.id}function S(a){return a.filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b)}function T(a){return a.trim()}function U(a){return a?.trim()||void 0}function V(a){return W((a??[]).flatMap(a=>a.split(/\r?\n|,/g).map(a=>a.trim()).filter(Boolean)).map(a=>a.trim()).filter(Boolean))}function W(a){return Array.from(new Set(a.filter(Boolean)))}function X(a){return structuredClone(a)}function Y(a){return a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Z(a){return a.split(/[-_]/g).filter(Boolean).map(a=>a[0].toUpperCase()+a.slice(1)).join(" ")}var $=c(8015);let _=f().join(process.cwd(),".mission-control","planner"),aa=f().join(_,"plans"),ab=f().join(_,"runtime-workspace"),ac="Mission Control Planner Runtime",ad=[{id:"architect",role:"Workspace Architect",name:"Workspace Architect",enabled:!0,isPrimary:!0,emoji:"\uD83E\uDD16",theme:"cyan",skillId:"planner-architect",policy:(0,h.g0)("worker",{fileAccess:"workspace-only",networkAccess:"enabled"}),heartbeat:{enabled:!1}},{id:"founder",role:"Founder",name:"Founder",enabled:!0,emoji:"\uD83C\uDFD7️",theme:"amber",skillId:"planner-founder",policy:(0,h.g0)("worker",{fileAccess:"workspace-only",networkAccess:"enabled"}),heartbeat:{enabled:!1}},{id:"product",role:"Product Lead",name:"Product Lead",enabled:!0,emoji:"\uD83D\uDCD0",theme:"emerald",skillId:"planner-product",policy:(0,h.g0)("worker",{fileAccess:"workspace-only",networkAccess:"enabled"}),heartbeat:{enabled:!1}},{id:"ops",role:"Operations",name:"Operations",enabled:!0,emoji:"⚙️",theme:"blue",skillId:"planner-ops",policy:(0,h.g0)("worker",{fileAccess:"workspace-only",networkAccess:"enabled"}),heartbeat:{enabled:!1}},{id:"growth",role:"Growth",name:"Growth",enabled:!0,emoji:"\uD83D\uDCE3",theme:"violet",skillId:"planner-growth",policy:(0,h.g0)("worker",{fileAccess:"workspace-only",networkAccess:"enabled"}),heartbeat:{enabled:!1}},{id:"reviewer",role:"Reviewer",name:"Reviewer",enabled:!0,emoji:"\uD83D\uDD0D",theme:"rose",skillId:"planner-reviewer",policy:(0,h.g0)("worker",{fileAccess:"workspace-only",networkAccess:"enabled"}),heartbeat:{enabled:!1}}],ae=["founder","product","ops","growth","reviewer"];async function af(){let a=E();return await an(a),{plan:a}}async function ag(a){return{plan:await am(a)}}async function ah(a,b){return{plan:await al(a,b)}}async function ai(a,b,c){let d=b.trim();if(!d)throw Error("Planner message is required.");let e=c?await al(a,c):await am(a),f=G(e),g=await aD(d);f.conversation.push(p("user","Operator",d)),f.intake.started=!0,f.intake.initialPrompt||(f.intake.initialPrompt=d),f.intake.latestPrompt=d,f.intake.sources=function(a,b){let c=[...a];for(let a of b){let b=c.findIndex(b=>b.url&&a.url?b.url===a.url:b.id===a.id);if(b>=0){c[b]=a;continue}c.push(a)}return c}(f.intake.sources,g.sources),f=G(f);let h=await ar(f),i=h.autopilot&&(h.intake.reviewRequested||h.intake.turnCount>2)?await at(h,d):[];h.advisorNotes=i;let j=await au(h,d,g,i,e);return(f=j.plan).conversation.push(p("assistant","Workspace Architect",j.reply)),f=G(f),await an(f),{plan:f}}async function aj(a,b){let c=b?await al(a,b):await am(a),d=await ar(G(c)),e=await at(d,"Simulate the specialist planning board.");d.advisorNotes=e;let f=await au(d,"Simulate the specialist planning board and tell me what you would refine next.",{sources:d.intake.sources,confirmations:d.intake.confirmations,inferenceText:d.intake.inferences.map(a=>`${a.label}: ${a.value}`).join("\n"),companyName:d.company.name||void 0,mission:d.company.mission||void 0,offer:d.product.offer||void 0,template:d.workspace.template},e,c);(d=f.plan).conversation.push(p("assistant","Workspace Architect",f.reply));let g=G(d);return await an(g),{plan:g}}async function ak(a,b,c={}){let d=b?await al(a,b):await am(a),e=G({...d,intake:{...d.intake,reviewRequested:!0}}),f=e.team.persistentAgents.filter(a=>a.enabled).length,g=e.operations.channels.some(a=>a.enabled&&"internal"!==a.type),h=e.operations.automations.some(a=>a.enabled),j=e.deploy.firstMissions.some(a=>a.trim().length>0),k=(0,i.X6)({template:(0,i.Bb)({sourceMode:e.workspace.sourceMode,agentCount:f,kickoffMission:e.workspace.rules.kickoffMission,hasChannels:g,hasAutomations:h,hasPlannerKickoffs:j}),onProgress:c.onProgress});if(await k.startStep("plan","Checking deploy blockers and locking the planner state."),e.deploy.blockers.length>0){let a=`Resolve deploy blockers first: ${e.deploy.blockers.join(" ")}`;throw await k.addActivity("plan",a,"error"),await k.failStep("plan",a),Error(`Resolve deploy blockers first: ${e.deploy.blockers.join(" ")}`)}await k.addActivity("plan","Deploy blockers cleared.","done"),e.status="deploying",e.stage="deploying",await an(e),await k.completeStep("plan","Planner state locked. Workspace bootstrap is starting.");try{var l,m,n;let a,b,c=(a=(l=e).team.persistentAgents.filter(a=>a.enabled),{name:l.workspace.name,brief:[(m=l).company.mission?`Mission: ${m.company.mission}`:"",m.company.targetCustomer?`Target customer: ${m.company.targetCustomer}`:"",m.product.offer?`Offer: ${m.product.offer}`:"",m.product.scopeV1.length>0?`V1 scope: ${m.product.scopeV1.join(", ")}`:"",m.product.nonGoals.length>0?`Non-goals: ${m.product.nonGoals.join(", ")}`:"",m.company.successSignals.length>0?`Success signals: ${m.company.successSignals.join(", ")}`:"",m.workspace.stackDecisions.length>0?`Stack decisions: ${m.workspace.stackDecisions.join(", ")}`:""].filter(Boolean).join("\n"),directory:l.workspace.directory,modelId:l.workspace.modelId,sourceMode:l.workspace.sourceMode,repoUrl:l.workspace.repoUrl,existingPath:l.workspace.existingPath,template:l.workspace.template,teamPreset:"custom",modelProfile:l.workspace.modelProfile,rules:{...l.workspace.rules,workspaceOnly:l.operations.sandbox.workspaceOnly},agents:a.map(ay)}),d=await (0,$.zw)(c,{onProgress:async a=>{for(let b of a.steps)await k.syncStep(b)}});await k.startStep("blueprint","Writing planner blueprint and deploy notes into the new workspace."),await k.addActivity("blueprint","Persisting planner blueprint, deploy report, and docs."),await az(e,d.workspacePath,d),await k.completeStep("blueprint","Planner blueprint and docs are now in the workspace.");let f=(n=e,b=aN(n.workspace.name),Object.fromEntries(n.team.persistentAgents.filter(a=>a.enabled).map(a=>[a.id,`${b}-${aN(a.id)||"agent"}`])));await k.startStep("channels",g?"Provisioning enabled external channels.":"No external channels were requested."),g||await k.addActivity("channels","No enabled external channels. Skipping channel provisioning.","done");let i=await aA(e.operations.channels,{onProgress:async({message:a,percent:b,status:c})=>{await k.updateStep("channels",{percent:b,detail:a,status:"error"===c?"active":void 0}),await k.addActivity("channels",a,c)}});await k.completeStep("channels",g?`${i.provisioned.length} channel${1===i.provisioned.length?"":"s"} provisioned.`:"Channel stage complete."),await k.startStep("automations",h?"Provisioning enabled automation loops.":"No recurring automations were requested."),h||await k.addActivity("automations","No enabled automations. Skipping automation provisioning.","done");let o=await aB(e,d.workspaceId,f,{onProgress:async({message:a,percent:b,status:c})=>{await k.updateStep("automations",{percent:b,detail:a,status:"error"===c?"active":void 0}),await k.addActivity("automations",a,c)}});await k.completeStep("automations",h?`${o.provisioned.length} automation${1===o.provisioned.length?"":"s"} provisioned.`:"Automation stage complete."),await k.startStep("planner-kickoff",j?"Dispatching planner kickoff missions.":"No planner kickoff missions were requested."),j||await k.addActivity("planner-kickoff","No planner kickoff missions. Finalizing deploy.","done");let q=await aC(e,d.workspaceId,f,{onProgress:async({message:a,percent:b,status:c})=>{await k.updateStep("planner-kickoff",{percent:b,detail:a,status:"error"===c?"active":void 0}),await k.addActivity("planner-kickoff",a,c)}});await k.completeStep("planner-kickoff",j?`${q.length} kickoff mission${1===q.length?"":"s"} launched.`:"Deploy finalized without extra kickoff missions.");let r=aO([...e.deploy.warnings,...i.warnings,...o.warnings]);e.deploy={...e.deploy,blockers:[],warnings:r,lastDeployedAt:new Date().toISOString(),workspaceId:d.workspaceId,workspacePath:d.workspacePath,primaryAgentId:d.primaryAgentId,createdAgentIds:d.agentIds,provisionedChannels:i.provisioned,provisionedAutomations:o.provisioned,kickoffRunIds:aO([...d.kickoffRunId?[d.kickoffRunId]:[],...q])},e.status="deployed",e.stage="deployed",e.conversation.push(p("assistant","Workspace Architect",`DEPLOY completed. Workspace ${d.workspacePath} is live with ${d.agentIds.length} agent${1===d.agentIds.length?"":"s"}.`));let s=G(e);return s.status="deployed",s.stage="deployed",await an(s),{plan:s,workspaceId:d.workspaceId,workspacePath:d.workspacePath,primaryAgentId:d.primaryAgentId,agentIds:d.agentIds,kickoffRunIds:s.deploy.kickoffRunIds,warnings:r}}catch(a){throw e.status="blocked",e.stage="pressure-test",e.deploy.warnings=aO([...e.deploy.warnings,a instanceof Error?a.message:"Planner deploy failed."]),await an(G(e)),a}}async function al(a,b){let c=await am(a).catch(()=>E(a)),d=G({...c,...b,id:a,createdAt:c.createdAt,runtime:{...c.runtime,...b.runtime},deploy:{...c.deploy,...b.deploy}});return await an(d),d}async function am(a){let b=ao(a);return G(JSON.parse(await (0,d.readFile)(b,"utf8")))}async function an(a){let b=ao(a.id);await (0,d.mkdir)(f().dirname(b),{recursive:!0}),await (0,d.writeFile)(b,`${JSON.stringify(a,null,2)}
|
|
2
|
-
`,"utf8")}function
|
|
1
|
+
"use strict";exports.id=603,exports.ids=[603],exports.modules={603:(a,b,c)=>{c.d(b,{R2:()=>an,Mt:()=>as,Nr:()=>ao,r2:()=>ar,gO:()=>aq,Q4:()=>ap});var d=c(1455),e=c(6760),f=c.n(e),g=c(8912),h=c(4126),i=c(5615),j=c(3214);let k={founder:"Founder",product:"Product Lead",architect:"System Architect",ops:"Operations",growth:"Growth",reviewer:"Reviewer"},l={small:{label:"Small",agentCount:1,workflowCount:1,automationCount:0,externalChannelCount:0,confirmationLimit:1,suggestedReplyLimit:2},medium:{label:"Medium",agentCount:3,workflowCount:3,automationCount:1,externalChannelCount:0,confirmationLimit:2,suggestedReplyLimit:3},large:{label:"Large",agentCount:5,workflowCount:4,automationCount:2,externalChannelCount:1,confirmationLimit:3,suggestedReplyLimit:4}};function m(a){return l[a]??l.medium}let n={internal:{label:"Internal",requiresCredentials:!1,credentials:[]},slack:{label:"Slack",requiresCredentials:!0,credentials:[{key:"botToken",label:"Bot token",placeholder:"xoxb-...",secret:!0}]},telegram:{label:"Telegram",requiresCredentials:!0,credentials:[{key:"token",label:"Bot token",placeholder:"123456:ABC...",secret:!0}]},discord:{label:"Discord",requiresCredentials:!0,credentials:[{key:"token",label:"Bot token",placeholder:"Discord bot token",secret:!0}]},googlechat:{label:"Google Chat",requiresCredentials:!0,credentials:[{key:"webhookUrl",label:"Webhook URL",placeholder:"https://chat.googleapis.com/...",secret:!0}]}};function o(){return globalThis.crypto?.randomUUID?.()??`plan-${Date.now()}`}function p(a,b,c){return{id:o(),role:a,author:b,text:c,createdAt:new Date().toISOString()}}function q(a){return{id:a.id?.trim()||o(),kind:a.kind,label:a.label.trim(),summary:a.summary.trim(),details:aa(a.details),status:a.status??"ready",createdAt:a.createdAt??new Date().toISOString(),url:_(a.url),error:_(a.error)}}function r(a){return{id:a.id?.trim()||o(),section:a.section,label:a.label.trim(),value:a.value.trim(),confidence:Math.max(0,Math.min(100,Math.round(a.confidence??72))),status:a.status??"inferred",rationale:$(a.rationale??""),sourceLabels:aa(a.sourceLabels)}}function s(a){let b=ae(a?.id||a?.name||"operator")||"operator",c=a?.role?.trim()||"Operator",d=a?.name?.trim()||af(b);return{id:b,role:c,name:d,purpose:a?.purpose?.trim()||`${d} owns ${c.toLowerCase()} execution and handoffs.`,enabled:a?.enabled!==!1,isPrimary:!!a?.isPrimary,emoji:a?.emoji?.trim(),theme:a?.theme?.trim(),skillId:a?.skillId?.trim(),modelId:a?.modelId?.trim(),policy:a?.policy??(0,h.g0)("worker"),heartbeat:a?.heartbeat??{enabled:!1},responsibilities:aa(a?.responsibilities),outputs:aa(a?.outputs)}}function t(a){return{id:ae(a?.id||a?.name||`workflow-${Date.now()}`)||`workflow-${Date.now()}`,name:a?.name?.trim()||"New workflow",goal:a?.goal?.trim()||"",trigger:a?.trigger??"manual",ownerAgentId:a?.ownerAgentId?.trim(),collaboratorAgentIds:aa(a?.collaboratorAgentIds),successDefinition:a?.successDefinition?.trim()||"",outputs:aa(a?.outputs),channelIds:aa(a?.channelIds),enabled:a?.enabled!==!1}}function u(a="internal",b){let c=n[a];return{id:ae(b?.id||b?.name||`${a}-${Date.now()}`)||`${a}-${Date.now()}`,type:a,name:b?.name?.trim()||c.label,purpose:b?.purpose?.trim()||"",target:b?.target?.trim(),enabled:b?.enabled!==!1,announce:!!b?.announce,requiresCredentials:c.requiresCredentials,credentials:b?.credentials?.map(a=>({...a,value:a.value??""}))??c.credentials.map(a=>({...a,value:""}))}}function v(a){return{id:ae(a?.id||a?.name||`automation-${Date.now()}`)||`automation-${Date.now()}`,name:a?.name?.trim()||"New automation",description:a?.description?.trim()||"",enabled:a?.enabled!==!1,scheduleKind:a?.scheduleKind??"every",scheduleValue:a?.scheduleValue?.trim()||"24h",agentId:a?.agentId?.trim(),mission:a?.mission?.trim()||"",thinking:a?.thinking??"medium",announce:!!a?.announce,channelId:a?.channelId?.trim()}}function w(a){return{id:ae(a?.id||a?.name||`hook-${Date.now()}`)||`hook-${Date.now()}`,name:a?.name?.trim()||"New hook",source:a?.source?.trim()||"",enabled:a?.enabled!==!1,notes:a?.notes?.trim()||""}}function x(a){return{workspaceOnly:a?.workspaceOnly??!0,mode:a?.mode??"default",notes:aa(a?.notes)}}function y(a){return{started:!!a?.started,initialPrompt:$(a?.initialPrompt??""),latestPrompt:$(a?.latestPrompt??""),sources:(a?.sources??[]).map(a=>q(a)),confirmations:aa(a?.confirmations).map(a=>a.trim()).filter(Boolean).slice(0,3),mode:a?.mode==="advanced"?"advanced":"guided",size:a?.size==="small"||a?.size==="large"?a.size:"medium",reviewRequested:!!a?.reviewRequested,turnCount:Math.max(0,Math.floor(a?.turnCount??0)),inferences:(a?.inferences??[]).map(a=>r(a)),suggestedReplies:aa(a?.suggestedReplies).slice(0,4)}}function z(a,b){let c=b?.architectSessionId?.trim()||`planner-${a}-architect`,d=Object.fromEntries(Object.entries(b?.advisorAgentIds??{}).filter(([,a])=>"string"==typeof a&&a.trim())),e=Object.fromEntries(Object.entries(k).map(([c])=>[c,b?.advisorSessionIds?.[c]?.trim()||`planner-${a}-${c}`]));return{mode:b?.mode==="fallback"?"fallback":"agent",status:b?.status==="error"?"error":b?.status==="ready"?"ready":"pending",workspaceId:_(b?.workspaceId),workspacePath:_(b?.workspacePath),architectAgentId:_(b?.architectAgentId),architectSessionId:c,advisorAgentIds:d,advisorSessionIds:e,lastArchitectRunId:_(b?.lastArchitectRunId),lastAdvisorRunIds:aa(b?.lastAdvisorRunIds),lastError:_(b?.lastError)}}function A(a){return(0,j.P0)(a,"core").map(b=>{var c,d,e,f,g,i,j;return s({id:b.id,role:b.role,name:b.name,purpose:(c=b.id,d=b.role,e=a,/review/i.test(c)||/review/i.test(d)?`Pressure-test ${e} work for correctness, regression risk, and missing validation.`:/test/i.test(c)||/test/i.test(d)?`Validate behavior, environment assumptions, and release confidence for this ${e} workspace.`:/learn/i.test(c)||/learn/i.test(d)?"Keep the workspace memory, conventions, and durable decisions coherent over time.":/browser/i.test(c)||/browser/i.test(d)?"Exercise real UI flows and collect evidence for browser-facing work.":`Own hands-on delivery and keep the ${e} workspace moving.`),enabled:b.enabled,isPrimary:b.isPrimary,emoji:b.emoji,theme:b.theme,skillId:b.skillId,modelId:b.modelId,policy:b.policy??(0,h.g0)("worker"),heartbeat:b.heartbeat??{enabled:!1},responsibilities:(f=b.id,g=a,/review/i.test(f)?["Review active work","Call out regressions","Protect launch quality"]:/test/i.test(f)?["Run verification loops","Capture evidence","Surface failing assumptions"]:/learn/i.test(f)?["Update durable memory","Track decisions","Reduce restart friction"]:/browser/i.test(f)?["Exercise flows","Capture screenshots","Validate responsive states"]:"content"===g?["Drive content production","Coordinate handoffs","Prepare launch artifacts"]:["Implement the next increment","Coordinate specialists","Keep execution momentum"]),outputs:(i=b.id,j=a,/review/i.test(i)?["review notes","risk checklist"]:/test/i.test(i)?["verification report","repro steps"]:/learn/i.test(i)?["memory updates","decision log entries"]:/browser/i.test(i)?["screenshots","browser validation notes"]:"research"===j?["research summary","evidence log"]:["implementation artifacts","handoff summary"])})})}function B(a,b){let c=b.find(a=>a.enabled&&a.isPrimary)?.id,d=Y(b,"review"),e=Y(b,"test"),f=Y(b,"learn"),g=Y(b,"browser");if("research"===a)return[t({id:"research-loop",name:"Research loop",goal:"Turn the main question into evidence-backed findings and explicit unknowns.",trigger:"manual",ownerAgentId:c,collaboratorAgentIds:[f,d].filter(Boolean),successDefinition:"Question, evidence, synthesis, and next-step recommendations are documented.",outputs:["docs/research-plan.md","deliverables/<run>/research-summary.md"]}),t({id:"finding-review",name:"Finding review",goal:"Pressure-test claims before publishing or acting on them.",trigger:"manual",ownerAgentId:d??c,collaboratorAgentIds:[c].filter(Boolean),successDefinition:"Assumptions, risks, and evidence gaps are explicit.",outputs:["deliverables/<run>/review-notes.md"]})];if("content"===a)return[t({id:"strategy",name:"Strategy and briefing",goal:"Clarify audience, offer, channels, and campaign bets before production.",trigger:"manual",ownerAgentId:c,collaboratorAgentIds:[d,f].filter(Boolean),successDefinition:"The team agrees on brief, priorities, and success signals.",outputs:["docs/content-brief.md","deliverables/<run>/campaign-brief.md"]}),t({id:"production",name:"Production and QA",goal:"Create assets, review them, and prepare a launch package.",trigger:"manual",ownerAgentId:c,collaboratorAgentIds:[d].filter(Boolean),successDefinition:"Assets are approved and delivery-ready.",outputs:["deliverables/<run>/drafts/","deliverables/<run>/launch-package.md"]}),t({id:"performance-loop",name:"Performance loop",goal:"Review outcomes, learn from results, and feed the next iteration.",trigger:"cron",ownerAgentId:f??d??c,collaboratorAgentIds:[c].filter(Boolean),successDefinition:"Measured results and next changes are documented.",outputs:["deliverables/<run>/performance-review.md"]})];let h=g&&"frontend"===a?g:c;return[t({id:"scope-v1",name:"V1 shaping",goal:"Turn the product goal into a constrained first delivery batch.",trigger:"manual",ownerAgentId:c,collaboratorAgentIds:[f,d].filter(Boolean),successDefinition:"Scope, non-goals, and critical path are documented.",outputs:["docs/brief.md","memory/blueprint.md"]}),t({id:"delivery",name:"Delivery loop",goal:"Implement, validate, and hand off the next meaningful increment.",trigger:"manual",ownerAgentId:h,collaboratorAgentIds:[e,d].filter(Boolean),successDefinition:"A tested increment ships with review notes and clear handoff.",outputs:["deliverables/<run>/release-notes.md","deliverables/<run>/verification.md"]}),t({id:"launch-readiness",name:"Launch readiness",goal:"Check blockers, rollback posture, and communication before launch.",trigger:"launch",ownerAgentId:d??c,collaboratorAgentIds:[e,f].filter(Boolean),successDefinition:"Launch risks, open blockers, and go/no-go signal are explicit.",outputs:["deliverables/<run>/launch-checklist.md"]})]}function C(){return[u("internal",{id:"internal-ops",name:"Internal ops",purpose:"Default internal coordination surface for planner outputs and deploy notes.",announce:!1})]}function D(a,b,c){let d=Y(b,"review")??b.find(a=>a.enabled)?.id,e=Y(b,"learn")??d,f=c[0]?.id;return[v({id:"daily-triage",name:"Daily triage",description:"Review drift, blockers, and next handoffs every day.",scheduleKind:"every",scheduleValue:"24h",agentId:d,mission:"content"===a?"Review active campaigns, blockers, and next content handoffs. Leave a concise operator brief.":"Inspect the workspace, surface blockers, and leave a concise next-step handoff for the team.",thinking:"medium",channelId:f}),v({id:"weekly-review",name:"Weekly review",description:"Capture progress, decisions, and next bets once per week.",scheduleKind:"every",scheduleValue:"168h",agentId:e,mission:"research"===a?"Summarize evidence gathered this week, open questions, and the next investigation batch.":"Summarize progress, major decisions, and the next delivery batch for this workspace.",thinking:"high",channelId:f})].filter(a=>a.agentId)}function E(a=o()){let b=new Date().toISOString(),c="software",d=A(c),e=C();return G({id:a,status:"draft",stage:"intake",createdAt:b,updatedAt:b,autopilot:!0,readinessScore:0,architectSummary:"",runtime:z(a),intake:y(),company:{name:"",type:"saas",mission:"",targetCustomer:"",constraints:[],successSignals:[]},product:{offer:"",scopeV1:[],nonGoals:[],revenueModel:"",launchPriority:[]},workspace:{name:"",sourceMode:"empty",template:c,modelProfile:"balanced",stackDecisions:[],docs:(0,j.GH)(c,j.eY),rules:{...j.eY}},team:{persistentAgents:d,allowEphemeralSubagents:!0,maxParallelRuns:4,escalationRules:["Escalate ambiguous product decisions to the architect before implementation.","Escalate missing tooling or blocked environments before the delivery workflow starts.","Escalate launch blockers when review or verification fails."]},operations:{workflows:B(c,d),channels:e,automations:D(c,d,e),hooks:[w({id:"handoff-audit",name:"Handoff audit",source:"workspace manifest",enabled:!0,notes:"Keep delivery artifacts and handoffs durable enough for other agents to continue."})],sandbox:x({workspaceOnly:!0,mode:"default",notes:["Keep file work grounded in the target workspace by default."]})},deploy:{blockers:[],warnings:[],firstMissions:[],createdAgentIds:[],provisionedChannels:[],provisionedAutomations:[],kickoffRunIds:[]},conversation:[p("assistant","Workspace Architect","Tell me what you want to make autonomous first. You can paste a website, repo, or folder path, and I will draft the workspace and only ask for the decisions that really need you.")],advisorNotes:[]})}function F(a,b){let c=ad(a),d=A(b),e=c.operations.channels.length?c.operations.channels:C();return c.workspace.template=b,c.workspace.docs=(0,j.GH)(b,c.workspace.rules),c.team.persistentAgents=d,c.operations.workflows=B(b,d),c.operations.automations=D(b,d,e),G(c)}function G(a){var b,c,d,e,f,g,h,i,k,l,n,o,p,q,E,F,G,H,I,L,R,S,T,U,V;let W,ab,ae,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at=ad(a);if(at.runtime=z(at.id,at.runtime),at.intake=y({...at.intake,started:!!at.intake?.started||at.conversation.some(a=>"user"===a.role)}),at.company.name=$(at.company.name),at.company.mission=$(at.company.mission),at.company.targetCustomer=$(at.company.targetCustomer),at.company.constraints=aa(at.company.constraints),at.company.successSignals=aa(at.company.successSignals),at.product.offer=$(at.product.offer),at.product.scopeV1=aa(at.product.scopeV1),at.product.nonGoals=aa(at.product.nonGoals),at.product.revenueModel=$(at.product.revenueModel),at.product.launchPriority=aa(at.product.launchPriority),at.workspace.name=$(at.workspace.name),at.workspace.directory=_(at.workspace.directory),at.workspace.repoUrl=_(at.workspace.repoUrl),at.workspace.existingPath=_(at.workspace.existingPath),at.workspace.stackDecisions=aa(at.workspace.stackDecisions),at.workspace.docs=ac(aa(at.workspace.docs).concat((0,j.GH)(at.workspace.template,at.workspace.rules))),at.team.persistentAgents=at.team.persistentAgents.map(a=>s({...a,id:a.id,role:a.role,name:a.name,purpose:a.purpose,enabled:a.enabled,isPrimary:a.isPrimary,emoji:a.emoji,theme:a.theme,skillId:a.skillId,modelId:a.modelId,policy:a.policy,heartbeat:a.heartbeat,responsibilities:a.responsibilities,outputs:a.outputs})).filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b),0===at.team.persistentAgents.length&&(at.team.persistentAgents=A(at.workspace.template)),!at.team.persistentAgents.some(a=>a.enabled&&a.isPrimary)){let a=at.team.persistentAgents.find(a=>a.enabled);a&&(a.isPrimary=!0)}if(at.operations.channels=at.operations.channels.map(a=>u(a.type,a)).filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b),0===at.operations.channels.length&&(at.operations.channels=C()),at.operations.workflows=at.operations.workflows.map(a=>t(a)).filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b),0===at.operations.workflows.length&&(at.operations.workflows=B(at.workspace.template,at.team.persistentAgents)),at.operations.automations=at.operations.automations.map(a=>v(a)).filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b),ar=m((aq=ad(at)).intake.size),aq.team.persistentAgents=function(a,b,c){var d;let e,f;if(c<=0)return[];return Z((f=(d=[...b,...A(a),...(e=s({id:"ops-lead",role:"Operations Lead",name:"Operations Lead",purpose:"Own automations, reporting cadence, and cross-agent handoffs for the workspace.",responsibilities:["Maintain the operating cadence","Wire recurring automations","Keep handoffs durable"],outputs:["ops brief","automation notes"]}),"research"===a?[s({id:"analyst",role:"Analyst",name:"Analyst",purpose:"Turn gathered evidence into patterns, themes, and decision-ready summaries.",responsibilities:["Cluster findings","Spot repeated signals","Prepare concise summaries"],outputs:["insight summary","theme map"]}),e]:[e])]).find(a=>a.isPrimary)??d[0])?[f,...d.filter(a=>a.id!==f.id)]:d).slice(0,c).map((a,b)=>s({...a,enabled:!0,isPrimary:a.isPrimary||0===b}))}(aq.workspace.template,aq.team.persistentAgents,ar.agentCount),aq.operations.channels=function(a,b,c){let d=b.find(a=>"internal"===a.type)??C()[0],e=[...b.filter(a=>"internal"!==a.type),...("content"===a?["telegram","discord","slack"]:["slack","discord","telegram"]).map(b=>u(b,{id:`${b}-ops`,purpose:"content"===a?"Optional distribution or community surface for a larger operating setup.":"Optional external operating surface for a larger workspace.",enabled:!1,announce:!0}))].filter((a,b,c)=>c.findIndex(b=>b.type===a.type)===b);return[u("internal",{...d,enabled:!0}),...e.slice(0,c)]}(aq.workspace.template,aq.operations.channels,ar.externalChannelCount),aq.operations.workflows=function(a,b,c,d){let e,f,g,h;return d<=0?[]:Z([...b,...B(a,c),...(e=c.find(a=>a.enabled&&a.isPrimary)?.id,f=Y(c,"review"),g=Y(c,"learn"),h=Y(c,"ops"),[t({id:"context-sync",name:"research"===a?"Evidence sync":"Context sync",goal:"Pull new context from linked sources and keep the blueprint aligned with reality.",trigger:"manual",ownerAgentId:g??e,collaboratorAgentIds:[e,f].filter(Boolean),successDefinition:"New context is reflected in durable docs, scope, and decision notes.",outputs:["memory/blueprint.md","deliverables/<run>/context-sync.md"]}),t({id:"ops-rhythm",name:"Operating rhythm",goal:"Review handoffs, automations, and next-step ownership on a repeatable cadence.",trigger:"cron",ownerAgentId:h??f??g??e,collaboratorAgentIds:[e].filter(Boolean),successDefinition:"The workspace has a fresh operator brief and an explicit next batch of work.",outputs:["deliverables/<run>/ops-rhythm.md"]})])]).slice(0,d).map(a=>{var b,d;let e,f,g,h,i;return b=a,e=new Set((d=c).filter(a=>a.enabled).map(a=>a.id)),f=d.find(a=>a.enabled&&a.isPrimary)?.id,g=Y(d,"review"),h=Y(d,"learn"),i=b.ownerAgentId&&e.has(b.ownerAgentId)?b.ownerAgentId:g??h??f,t({...b,ownerAgentId:i,collaboratorAgentIds:b.collaboratorAgentIds.filter(a=>e.has(a)&&a!==i),enabled:!0})})}(aq.workspace.template,aq.operations.workflows,aq.team.persistentAgents,ar.workflowCount),aq.operations.automations=(c=aq.workspace.template,d=aq.operations.automations,e=aq.team.persistentAgents,f=aq.operations.channels,(g=ar.automationCount)<=0?[]:Z([...d,...D(c,e,f)]).slice(0,g).map(a=>{var b,c,d;let g,h,i,j,k;return b=a,c=e,d=f,g=new Set(c.filter(a=>a.enabled).map(a=>a.id)),h=new Set(d.map(a=>a.id)),i=c.find(a=>a.enabled&&a.isPrimary)?.id,j=Y(c,"review"),k=Y(c,"learn"),v({...b,agentId:b.agentId&&g.has(b.agentId)?b.agentId:j??k??i,channelId:b.channelId&&h.has(b.channelId)?b.channelId:d[0]?.id,enabled:!0})})),(at=aq).operations.hooks=at.operations.hooks.map(a=>w(a)).filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b),at.operations.sandbox=x(at.operations.sandbox),at.deploy.firstMissions=(as=(b=at).team.persistentAgents.find(a=>a.enabled&&a.isPrimary),ac([as?"Inspect the new workspace, refine docs to match the blueprint, and break the first delivery batch into concrete tasks.":"",b.team.persistentAgents.find(a=>/review/i.test(a.role)&&a.enabled)?"Review the blueprint against the created workspace, call out execution risks, and leave a launch-readiness checklist.":"",b.team.persistentAgents.find(a=>/learn/i.test(a.role)&&a.enabled)?"Capture durable facts, decisions, and conventions in memory files so the team can continue without drift.":""].filter(Boolean))),!at.company.name&&at.workspace.name&&(at.company.name=at.workspace.name),!at.workspace.name&&at.company.name&&(at.workspace.name=at.company.name),!at.intake.started)return at.deploy.blockers=[],at.deploy.warnings=[],at.intake.confirmations=[],at.intake.inferences=[],at.intake.suggestedReplies=[],at.readinessScore=0,at.architectSummary="Start with one prompt. Paste the project goal, website URL, repo, or existing folder and the architect will draft the workspace for you.",at.stage="intake",at.status="draft",at.updatedAt=new Date().toISOString(),at;let au=function(a){var b;let c,d,e=K(a),f=[],g=m(a.intake.size),h=a.intake.sources.some(a=>"website"===a.kind&&"ready"===a.status),i=M(a),j=!!(a.company.mission&&a.company.targetCustomer&&(a.product.offer||a.product.scopeV1.length>0));for(let g of(a.company.name||f.push("tr"===e?"Şirkete ya da workspace'e ne ad verelim?":"What should I call the company or workspace?"),a.company.mission||f.push("tr"===e?"Bu workspace \xf6nce tam olarak hangi \xe7ıktıyı optimize etmeli?":"What exact outcome should this workspace optimize for first?"),a.company.targetCustomer||f.push((c=K(b=a),(d=N(b))?"tr"===c?`İlk hedef kitleyi ${d} olarak okuyorum. Bunu koruyalım mı, yoksa daha doğru segmenti sen mi g\xf6stereceksin?`:`I can read the first audience as ${d}. Keep that, or point me to the better segment?`:"content"===b.workspace.template?b.operations.channels.some(a=>"telegram"===a.type&&a.enabled)?"tr"===c?"İlk kullanıcı topluluk y\xf6neticileri, moderat\xf6rler ya da Telegram \xfcyeleri mi olmalı?":"Should the first user be community managers, moderators, or Telegram members?":"tr"===c?"Bu i\xe7erik ya da topluluk workspace'i \xf6nce kime hizmet etmeli?":"Who should this content or community workspace serve first?":"research"===b.workspace.template?"tr"===c?"Bu araştırma workspace'i i\xe7in ilk karar verici ya da hedef kitle kim?":"Who is the first decision-maker or audience for this research workspace?":"tr"===c?"İlk kullanıcı ya da m\xfcşteri segmenti kim?":"Who is the first user or customer segment?")),a.workspace.repoUrl||a.workspace.existingPath||!(a.intake.turnCount<=1)||O(a.intake.latestPrompt||a.intake.initialPrompt)||f.push("tr"===e?"Buna sıfırdan mı başlayalım, bir repo mu klonlayalım, yoksa mevcut bir klas\xf6r\xfc m\xfc bağlayalım?":"Should this start from scratch, clone a repo, or attach an existing folder?"),a.company.mission&&a.company.targetCustomer&&0===a.product.scopeV1.length?f.push("tr"===e?"İlk \xe7ıkaracağımız en k\xfc\xe7\xfck V1 sonucu ne olmalı?":"What is the smallest V1 outcome we should launch first?"):0===a.product.nonGoals.length&&j&&a.product.scopeV1.length>0&&("advanced"===a.intake.mode||a.intake.reviewRequested||a.intake.turnCount>=4)&&f.push("tr"===e?"V1 i\xe7in neleri \xf6zellikle kapsam dışında bırakalım?":"What should stay explicitly out of scope for V1?"),a.company.mission&&(a.product.scopeV1.length>0||h||i.length>0)&&0===a.company.successSignals.length&&("advanced"===a.intake.mode||a.intake.reviewRequested||a.intake.turnCount>=3)&&f.push("tr"===e?"Bu workspace'in işe yaradığını bize hangi sinyal g\xf6stermeli?":"What signal should tell us this workspace is working?"),a.intake.sources.filter(a=>"error"===a.status)))f.push("tr"===e?`${g.label} kaynağını inceleyemedim. Bu kaynak \xf6nemliyse şirket bağlamını manuel olarak doğrula.`:`I could not inspect ${g.label}. Confirm the company context manually if this source matters.`);return ac(f).slice(0,Math.min(h?2:3,g.confirmationLimit))}(at),av=function(a){let b=[];for(let c of(a.company.name||b.push("Company or workspace name is missing."),a.company.mission||b.push("Mission is missing."),a.company.targetCustomer||b.push("Target customer is missing."),a.workspace.name||b.push("Workspace name is missing."),"clone"!==a.workspace.sourceMode||a.workspace.repoUrl||b.push("Clone mode needs a repository URL."),"existing"!==a.workspace.sourceMode||a.workspace.existingPath||b.push("Existing-folder mode needs a folder path."),a.team.persistentAgents.some(a=>a.enabled)||b.push("At least one persistent agent must be enabled."),a.team.persistentAgents.some(a=>a.enabled&&a.isPrimary)||b.push("One enabled agent must be marked as primary."),a.operations.workflows.some(a=>a.enabled)||b.push("At least one enabled workflow is required."),a.operations.workflows.filter(a=>a.enabled)))c.name&&c.goal&&c.successDefinition||b.push(`Workflow "${c.name||c.id}" is incomplete.`),c.ownerAgentId&&!a.team.persistentAgents.some(a=>a.id===c.ownerAgentId&&a.enabled)&&b.push(`Workflow "${c.name}" points to a missing or disabled owner agent.`);for(let c of a.operations.automations.filter(a=>a.enabled))c.mission&&c.scheduleValue||b.push(`Automation "${c.name}" is incomplete.`),c.agentId&&!a.team.persistentAgents.some(a=>a.id===c.agentId&&a.enabled)&&b.push(`Automation "${c.name}" points to a missing or disabled agent.`);for(let c of a.operations.channels.filter(a=>a.enabled&&a.requiresCredentials))c.credentials.filter(a=>!a.value.trim()).length>0&&b.push(`Channel "${c.name}" is missing required credentials.`);return ac(b)}(at),aw=(W=[],ab=m((h=at).intake.size),0===h.product.nonGoals.length&&W.push("No non-goals are defined for V1."),0===h.product.launchPriority.length&&W.push("Launch priorities are not ordered yet."),0===h.company.successSignals.length&&W.push("Success signals are still empty."),0===h.workspace.stackDecisions.length&&"content"!==h.workspace.template&&W.push("Critical stack decisions are not captured yet."),ab.automationCount>0&&!h.operations.automations.some(a=>a.enabled)&&W.push("No automation loops are enabled."),ab.externalChannelCount>0&&!h.operations.channels.some(a=>"internal"!==a.type)&&W.push("Only internal channels are configured."),ab.agentCount>=3&&h.team.maxParallelRuns<2&&W.push("Parallel run limit is conservative for a multi-agent workspace."),ac(W)),ax=J(at);return at.intake.confirmations=au,at.intake.inferences=(ae=[],ag=(i=at).intake.sources.filter(a=>"ready"===a.status).map(a=>a.label),ah=i.intake.confirmations.join(" ").toLowerCase(),i.company.name&&ae.push(r({section:"company",label:"Company",value:i.company.name,confidence:P(i,"company-name"),status:Q(ah,"company"),rationale:ag.length>0?"Derived from linked context and the current brief.":"Derived from the current brief.",sourceLabels:ag})),i.company.mission&&ae.push(r({section:"company",label:"Mission",value:i.company.mission,confidence:P(i,"mission"),status:Q(ah,"outcome"),rationale:"Architect condensed the first business outcome from the request.",sourceLabels:ag})),i.company.targetCustomer&&ae.push(r({section:"company",label:"First audience",value:i.company.targetCustomer,confidence:P(i,"target-customer"),status:Q(ah,"audience"),rationale:"This is the current best guess for the first user or buyer segment.",sourceLabels:ag})),ae.push(r({section:"workspace",label:"Workspace type",value:af(i.workspace.template),confidence:P(i,"template"),status:"inferred",rationale:"Template is inferred from the requested operating model and linked context.",sourceLabels:ag})),ae.push(r({section:"workspace",label:"Starting point",value:"clone"===i.workspace.sourceMode?i.workspace.repoUrl||"Clone an existing repository":"existing"===i.workspace.sourceMode?i.workspace.existingPath||"Attach an existing folder":"Start from scratch",confidence:P(i,"source-mode"),status:Q(ah,"start"),rationale:"This is how the workspace will be materialized when you deploy.",sourceLabels:ag})),i.product.offer&&ae.push(r({section:"product",label:"Offer",value:i.product.offer,confidence:P(i,"offer"),status:"inferred",rationale:"Architect turned the brief into a concrete operator-facing offer.",sourceLabels:ag})),(ai=i.operations.channels.filter(a=>a.enabled&&"internal"!==a.type)).length>0&&ae.push(r({section:"operations",label:"External channels",value:ai.map(a=>a.name).join(", "),confidence:P(i,"channels"),status:"inferred",rationale:"The request implies these operating channels should exist after deploy.",sourceLabels:ag})),(aj=i.team.persistentAgents.find(a=>a.enabled&&a.isPrimary))&&ae.push(r({section:"team",label:"Primary operator",value:`${aj.name} (${aj.role})`,confidence:P(i,"team"),status:"inferred",rationale:"Architect drafted a primary agent to own the first delivery loop.",sourceLabels:ag})),(ak=i.operations.workflows.find(a=>a.enabled))&&ae.push(r({section:"operations",label:"First workflow",value:ak.name,confidence:P(i,"workflow"),status:"inferred",rationale:"This is the first operational loop the company would run after deploy.",sourceLabels:ag})),ae.slice(0,8)),at.intake.suggestedReplies=(k=at,l=au,al=K(k),am=[],an=m(k.intake.size),ao=N(k),k.company.targetCustomer||(ao&&am.push("tr"===al?`İlk hedef kitle ${X(ao)} gibi g\xf6r\xfcn\xfcyor.`:`The first audience looks like ${X(ao)}.`),"content"===k.workspace.template?(am.push("tr"===al?"İlk kullanıcılar topluluk y\xf6neticileri ve moderat\xf6rler.":"The first users are community managers and moderators."),am.push("tr"===al?"İlk kullanıcılar daha hızlı moderasyon ve onboarding isteyen Telegram \xfcyeleri.":"The first users are Telegram members who need faster moderation and onboarding.")):am.push("tr"===al?"İlk kullanıcılar bu iş akışını her g\xfcn y\xfcr\xfcten operat\xf6rler.":"The first users are the operators running this workflow every day.")),k.company.mission||am.push("tr"===al?"İlk hedef, hacmi en y\xfcksek manuel iş akışını otomatikleştirmek.":"The first outcome is automating the highest-volume manual workflow."),!k.product.scopeV1.length&&k.company.mission&&k.company.targetCustomer&&am.push("tr"===al?"V1, genişlemeden \xf6nce en dar ama faydalı d\xf6ng\xfcy\xfc u\xe7tan uca \xe7\xf6zmeli.":"V1 should handle the narrowest useful loop end to end before we expand."),k.workspace.repoUrl||k.workspace.existingPath||O(k.intake.latestPrompt||k.intake.initialPrompt)||(am.push("tr"===al?"Şimdilik sıfırdan başlayalım.":"Start from scratch for now."),am.push("tr"===al?"İyi bir temel bulursak mevcut bir repository klonlayabiliriz.":"Clone an existing repository if you find a good base.")),0===k.company.successSignals.length&&k.intake.turnCount>=2&&am.push("tr"===al?"Başarı; daha az manuel iş, daha hızlı yanıt s\xfcreleri ve daha net bir operasyon ritmi demek.":"Success means less manual work, faster response times, and a clearer operating cadence."),0===l.length&&(am.push("tr"===al?"Gelişmiş edit\xf6r\xfc a\xe7.":"Open the advanced editor."),am.push("tr"===al?"Deploy review aşamasına ge\xe7.":"Move into deploy review.")),ac(am).slice(0,an.suggestedReplyLimit)),at.deploy.blockers=ax?av:[],at.deploy.warnings=ax?aw:[],at.readinessScore=(n=at,o=av,p=aw,q=ax,ap=14,n.company.name&&(ap+=10),n.company.mission&&(ap+=15),n.company.targetCustomer&&(ap+=15),n.product.offer&&(ap+=10),n.product.scopeV1.length>0&&(ap+=10),n.workspace.name&&(ap+=10),n.intake.sources.length>0&&(ap+=6),n.team.persistentAgents.some(a=>a.enabled&&a.isPrimary)&&(ap+=10),n.operations.workflows.some(a=>a.enabled)&&(ap+=10),n.operations.automations.some(a=>a.enabled)&&(ap+=5),q?(ap-=12*o.length,ap-=3*p.length):ap-=4*Math.max(0,n.intake.confirmations.length-1),Math.max(0,Math.min(100,ap))),at.architectSummary=function(a,b,c,d){let e=K(a),f=m(a.intake.size);if(!a.intake.started)return"tr"===e?`Tek bir mesajla başla. ${f.label} modunda sohbet yalın kalır; Architect ise arka planda proje bağlamını toplar, ekibi taslaklar ve workspace blueprint'ini hazırlar.`:`Start with one prompt. ${f.label} mode keeps the chat lean while the architect still harvests full project context, drafts the team, and prepares the workspace blueprint.`;let g=a.team.persistentAgents.filter(a=>a.enabled).length,h=a.operations.workflows.filter(a=>a.enabled).length,i=a.operations.automations.filter(a=>a.enabled).length,j=a.intake.confirmations.length;return d?"tr"===e?[a.company.mission?`${a.company.name||a.workspace.name||"Bu şirket"} ${a.company.mission} hedefi etrafında konumlandı.`:"Şirket misyonu i\xe7in h\xe2l\xe2 kısa ve net bir c\xfcmle gerekiyor.",a.company.targetCustomer?`Birincil hedef kitle: ${a.company.targetCustomer}.`:"Hedef m\xfcşteri h\xe2l\xe2 eksik.",`${g} agent, ${h} g\xf6rev ve ${i} automation yapılandırıldı.`,j>0?`Senden ${j} doğrulama daha gerekiyor.`:b.length>0?`Deploy \xf6ncesi ${b.length} blocker kaldı.`:c.length>0?`G\xf6zden ge\xe7irilmesi gereken ${c.length} warning var.`:"Kritik blocker kalmadı."].join(" "):[a.company.mission?`${a.company.name||a.workspace.name||"This company"} is pointed at ${a.company.mission}.`:"The company mission still needs a concise sentence.",a.company.targetCustomer?`Primary audience: ${a.company.targetCustomer}.`:"Target customer is still missing.",`${g} agents, ${h} tasks, and ${i} automations are configured.`,j>0?`${j} confirmation item${1===j?"":"s"} still need your input.`:b.length>0?`${b.length} blocker${1===b.length?"":"s"} remain before deploy.`:c.length>0?`${c.length} warning${1===c.length?"":"s"} remain to review.`:"No hard blockers remain."].join(" "):"tr"===e?[a.company.mission?`${a.company.name||a.workspace.name||"Bu workspace"} i\xe7in odak alanı ${a.company.mission}.`:a.company.name||a.workspace.name?`${a.company.name||a.workspace.name} i\xe7in ilk operasyonel \xe7ıktıyı şekillendiriyorum.`:"Bu workspace i\xe7in ilk somut \xe7ıktıyı h\xe2l\xe2 netleştiriyorum.",a.company.targetCustomer?`İlk hedef kitle: ${a.company.targetCustomer}.`:"İlk kullanıcı ya da hedef segmenti h\xe2l\xe2 netleştirmem gerekiyor.",a.intake.sources.length>0?`${a.intake.sources.length} bağlam kaynağını zaten topladım.`:"Bir website, repo ya da kısa bir brief ver; ilk taslağı \xe7ıkarayım.",`${f.label.toLowerCase()} mod i\xe7in ${g} agent, ${h} g\xf6rev ve ${i} automation taslağı hazır.`,j>0?`Senden sadece ${j} kritik karar daha gerekiyor.`:"Taslak tutarlı g\xf6r\xfcn\xfcyor. İstersen full blueprint'i a\xe7abilir ya da deploy review'a ge\xe7ebilirim."].join(" "):[a.company.mission?`${a.company.name||a.workspace.name||"This workspace"} looks like a ${af(a.workspace.template).toLowerCase()} company focused on ${a.company.mission}.`:a.company.name||a.workspace.name?`I am shaping the first operating outcome for ${a.company.name||a.workspace.name}.`:"I am still shaping the first concrete outcome for this workspace.",a.company.targetCustomer?`First audience: ${a.company.targetCustomer}.`:"I still need the first audience or user segment.",a.intake.sources.length>0?`I already harvested ${a.intake.sources.length} context source${1===a.intake.sources.length?"":"s"}.`:"Give me a website, repo, or short brief and I will infer the first draft.",`${g} agents, ${h} tasks, and ${i} automations are drafted for ${f.label.toLowerCase()} mode.`,j>0?`Only ${j} high-value decision${1===j?"":"s"} still need your input.`:"The draft is coherent. I can open the full blueprint or move into deploy review."].join(" ")}(at,av,aw,ax),at.stage=(E=at,F=av,G=aw,H=au,I=ax,E.intake.started?"deploying"===E.status?"deploying":"deployed"===E.status?"deployed":(L=E).company.mission||L.product.offer||L.workspace.name||L.intake.sources.length>0?((R=E).company.name||R.workspace.name)&&R.company.mission&&R.team.persistentAgents.some(a=>a.enabled)&&R.operations.workflows.some(a=>a.enabled)?I?F.length>0?"pressure-test":G.length>0||E.readinessScore<90?"decision-lock":"ready":H.length>0?"team-synthesis":"decision-lock":"team-synthesis":E.intake.turnCount>1?"context-harvest":"intake":"intake"),at.status=(S=at,T=av,U=au,V=ax,S.intake.started?"deploying"===S.status||"deployed"===S.status?S.status:V?"blocked"===S.status&&T.length>0||T.length>0?"blocked":S.readinessScore>=90?"ready":"review":U.length>0?"draft":"review":"draft"),at.updatedAt=new Date().toISOString(),at}async function H(a){let b=new Date().toISOString(),c=a.deploy.blockers,d=a.deploy.warnings,e=a.operations.workflows.find(a=>a.enabled),f=a.team.persistentAgents.find(a=>a.enabled&&a.isPrimary);return[{advisorId:"founder",summary:a.company.mission&&a.company.targetCustomer?"Outcome and audience are present.":"The commercial story is still thin.",recommendations:[a.company.mission?`Mission: ${a.company.mission}`:"State the company mission in one sentence.",a.company.targetCustomer?`Target customer: ${a.company.targetCustomer}`:"Specify the first buyer or user segment.",a.product.revenueModel?`Revenue model: ${a.product.revenueModel}`:"Lock a revenue or value exchange model before launch."].filter(Boolean),concerns:a.company.successSignals.length>0?[]:["Success signals are still vague. Add measurable outcomes before deploy."]},{advisorId:"product",summary:a.product.scopeV1.length>0?`V1 scope includes ${a.product.scopeV1.length} focused items.`:"V1 scope is not explicit yet.",recommendations:[a.product.offer?`Offer: ${a.product.offer}`:"Describe the core offer or user promise.",a.product.scopeV1.length>0?`Current V1 scope: ${a.product.scopeV1.join(", ")}`:"Define a constrained V1 scope.",a.product.nonGoals.length>0?`Non-goals: ${a.product.nonGoals.join(", ")}`:"List non-goals to prevent scope creep."].filter(Boolean),concerns:a.operations.workflows.length>0?[]:["No delivery workflow is defined yet."]},{advisorId:"architect",summary:f&&e?`${f.name} can own ${e.name}.`:"Agent ownership and workflow design still need alignment.",recommendations:[`Workspace template: ${af(a.workspace.template)}`,`Source mode: ${a.workspace.sourceMode}`,a.workspace.stackDecisions.length>0?`Stack decisions: ${a.workspace.stackDecisions.join(", ")}`:"Add the critical stack or platform decisions."].filter(Boolean),concerns:a.team.persistentAgents.some(a=>a.enabled)?[]:["No enabled agents remain in the deploy team."]},{advisorId:"ops",summary:a.operations.automations.length>0?`${a.operations.automations.length} automations are queued.`:"Operations loops are not configured yet.",recommendations:[a.operations.channels.some(a=>a.enabled)?`${a.operations.channels.filter(a=>a.enabled).length} channels are enabled.`:"Choose at least one channel or keep the team internal-only.",a.operations.automations.length>0?`Automations: ${a.operations.automations.map(a=>a.name).join(", ")}`:"Define daily or weekly maintenance loops.",`Sandbox mode: ${a.operations.sandbox.mode}`].filter(Boolean),concerns:c.length>0?c.slice(0,2):d.slice(0,2)},{advisorId:"growth",summary:a.operations.channels.some(a=>"internal"!==a.type&&a.enabled)?"External communication channels are in the plan.":"Go-to-market channels are still internal-only.",recommendations:[a.operations.channels.some(a=>"internal"!==a.type&&a.enabled)?`External channels: ${a.operations.channels.filter(a=>"internal"!==a.type&&a.enabled).map(a=>a.name).join(", ")}`:"Add Slack, Telegram, Discord, or Google Chat if the company needs external operating channels.",a.company.successSignals.length>0?`Success signals: ${a.company.successSignals.join(", ")}`:"Tie the launch to measurable success signals."].filter(Boolean),concerns:a.product.launchPriority.length>0?[]:["Launch priorities are not ordered yet."]},{advisorId:"reviewer",summary:0===c.length?"No hard deploy blockers remain.":`${c.length} deploy blocker${1===c.length?"":"s"} still need resolution.`,recommendations:[0===c.length?"You can move into final review.":`Resolve blockers: ${c.join(" | ")}`,0===d.length?"No major warnings were detected.":`Warnings: ${d.join(" | ")}`],concerns:c.length>0?c:d.slice(0,3)}].map(a=>{var c,d,e,f,g;return c=a.advisorId,d=a.summary,e=a.recommendations,f=a.concerns,g=b,{id:o(),advisorId:c,advisorName:k[c],summary:d,recommendations:aa(e),concerns:aa(f),createdAt:g}})}function I(a,b,c,d){let e=K(a,c);if(!a.intake.started)return p("assistant","Workspace Architect","tr"===e?"Projeyi tek mesajda anlat. Bir website URL'si, repo URL'si ya da mevcut klas\xf6r yolu yapıştır; ben de buradan workspace taslağını \xe7ıkarayım.":"Describe the project in one prompt. You can paste a website URL, repo URL, or an existing folder path and I will draft the workspace from there.");let f=J(a),g=f?a.deploy.blockers:[],h=a.intake.confirmations.slice(0,2).map(a=>{var b;return b=a,"tr"!==e?b:b.replace("What should I call the company or workspace?","Şirkete ya da workspace'e ne ad verelim?").replace("What exact outcome should this workspace optimize for first?","Bu workspace \xf6nce tam olarak hangi \xe7ıktıyı optimize etmeli?").replace("Should this start from scratch, clone a repo, or attach an existing folder?","Buna sıfırdan mı başlayalım, bir repo mu klonlayalım, yoksa mevcut bir klas\xf6r\xfc m\xfc bağlayalım?").replace("What is the smallest V1 outcome we should launch first?","İlk \xe7ıkaracağımız en k\xfc\xe7\xfck V1 sonucu ne olmalı?").replace("What should stay explicitly out of scope for V1?","V1 i\xe7in neleri \xf6zellikle kapsam dışında bırakalım?").replace("What signal should tell us this workspace is working?","Bu workspace'in işe yaradığını bize hangi sinyal g\xf6stermeli?").replace("Who is the first user or customer segment?","İlk kullanıcı ya da m\xfcşteri segmenti kim?")}),i=a.intake.inferences.slice(0,4).map(a=>`${a.label}: ${a.value}`),j=a.intake.sources.slice(Math.max(0,a.intake.sources.length-2)).map(a=>`${a.label} (${"ready"===a.status?a.kind:`${a.kind}, needs confirmation`})`),k=b.flatMap(a=>a.recommendations.slice(0,1)).slice(0,f?2:1),l=function(a,b){var c;if(!a)return[];let d=[];if(a.company.name!==b.company.name&&b.company.name&&d.push(`Company name is now ${b.company.name}.`),a.workspace.name!==b.workspace.name&&b.workspace.name&&d.push(`Workspace name is now ${b.workspace.name}.`),a.company.mission!==b.company.mission&&b.company.mission&&d.push(`First outcome is ${b.company.mission}.`),a.company.targetCustomer!==b.company.targetCustomer&&b.company.targetCustomer&&d.push(`First audience is ${b.company.targetCustomer}.`),a.product.offer!==b.product.offer&&b.product.offer&&d.push(`Core offer is ${b.product.offer}.`),a.workspace.sourceMode!==b.workspace.sourceMode&&d.push(`Starting point is ${"clone"===(c=b.workspace.sourceMode)?"clone an existing repository":"existing"===c?"attach an existing folder":"start from scratch"}.`),a.intake.sources.length!==b.intake.sources.length){let c=b.intake.sources.length-a.intake.sources.length;c>0&&d.push(`Added ${c} new context source${1===c?"":"s"}.`)}return d}(d,a),m=(c||"").toLowerCase(),n=/\b(eksik|eksikleri|missing|what'?s missing|neler eksik)\b/.test(m),o=/\b(siteden|site(?:den)?|website|from the site|from the website|çıkar|extract|infer)\b/.test(m);return p("assistant","Workspace Architect",[l.length>0?"tr"===e?"Son y\xf6nlendirmene g\xf6re taslağı g\xfcncelledim.":`Applied: ${l.join(" ")}`:a.intake.turnCount<=1?"tr"===e?"İlk taslağı verdiğin brief \xfczerinden \xe7ıkardım.":"I drafted the first pass from your brief.":"tr"===e?"Taslağı son y\xf6nlendirmene g\xf6re g\xfcncelledim.":"I updated the draft with your latest direction.",j.length>0?"tr"===e?`Kullandığım bağlam: ${j.join(" \xb7 ")}.`:`Context in play: ${j.join(" \xb7 ")}.`:"",i.length>0?"tr"===e?`Şu anki taslak: ${i.join(" | ")}.`:`Current draft: ${i.join(" | ")}.`:"",k.length>0&&!f?"tr"===e?`Arka plan taslağı: ${k.join(" ")}`:`Background draft: ${k.join(" ")}`:"",o&&h.length>0?"tr"===e?`Bağlı kaynaktan \xe7ıkarabildiğim her alanı doldurdum. Sayfa şu noktaları h\xe2l\xe2 belirsiz bırakıyor: ${h.join("; ")}.`:`I filled what I could from the linked context. The page still leaves these items ambiguous: ${h.join("; ")}.`:n&&h.length>0?"tr"===e?`H\xe2l\xe2 eksik ya da d\xfcş\xfck g\xfcvenli noktalar: ${h.join("; ")}.`:`Still missing or low-confidence: ${h.join("; ")}.`:!f&&h.length>0?1===h.length?"tr"===e?`Senden sıradaki tek karar şu: ${h[0]}`:`Next I need one decision: ${h[0]}`:"tr"===e?`Senden sıradaki iki karar şu: ${h[0]} Sonra ${X(h[1])}`:`Next I need two decisions: ${h[0]} Then ${X(h[1])}`:f&&h.length>0?"tr"===e?`Deploy \xf6ncesi şunları netleştirelim: ${h.join("; ")}.`:`Before deploy, confirm: ${h.join("; ")}.`:g.length>0?"tr"===e?`DEPLOY \xf6ncesi h\xe2l\xe2 şunlara ihtiyacım var: ${g.join("; ")}.`:`Before DEPLOY I still need: ${g.join("; ")}.`:f?"tr"===e?"Blueprint yapısal olarak DEPLOY i\xe7in hazır. Uyarıları bir kez g\xf6zden ge\xe7irip ardından launch edebiliriz.":"Blueprint is structurally ready for DEPLOY. Review warnings once, then launch.":"tr"===e?"Taslak tutarlı g\xf6r\xfcn\xfcyor. İstersen şimdi gelişmiş edit\xf6r\xfc a\xe7ayım ya da deploy review aşamasına ge\xe7eyim.":"The draft is coherent. If you want, I can open the advanced editor or move into deploy review next.",c&&0===l.length?"tr"===e?`Son y\xf6nlendirmeyi kaydettim: "${c.trim()}".`:`Latest direction captured: "${c.trim()}".`:""].filter(Boolean).join("\n\n"))}function J(a){return a.intake.reviewRequested||"deploying"===a.status||"deployed"===a.status}function K(a,b){for(let c of[b,...a.conversation.slice().reverse().filter(a=>"user"===a.role).map(a=>a.text),a.intake.latestPrompt,a.intake.initialPrompt]){let a=L(c);if(a)return a}return"en"}function L(a){return!function(a){let b=a?.trim();if(!b)return!1;if(/[çğıöşüÇĞİÖŞÜ]/.test(b))return!0;let c=b.toLowerCase().match(/\b(ve|bir|bu|şu|için|ile|olarak|olan|mı|mi|mu|mü|ne|nasıl|hangi|neden|hedef|ilk|müşteri|kullanıcı|oluştur|gerekli|alanları|yardımcı)\b/g);return!!(c&&c.length>=2)}(a)?!function(a){let b=a?.trim();if(!b||/[çğıöşüÇĞİÖŞÜ]/.test(b))return!1;let c=b.toLowerCase().match(/\b(let'?s|the|and|for|with|from|this|that|what|how|why|when|where|who|should|could|would|need|want|start|build|create|launch|project|workspace|customer|user|team|goal|mission|review|deploy|product|website|repo|folder)\b/g);return!!(c&&c.length>=2)}(a)?null:"en":"tr"}function M(a){return a.intake.sources.filter(a=>"ready"===a.status).flatMap(a=>[a.label,a.summary,...a.details]).join(" ").toLowerCase()}function N(a){let b=M(a);if(!b)return;let c=/\bweb3|onchain|crypto|blockchain|token\b/.test(b),d=/\bstartup|startups|founder|founders|business(?:es)?\b/.test(b),e=/\bcommunity|communities|member|members|holder|holders|nft|dao|governance\b/.test(b),f=/\bdeveloper|developers|builder|builders|engineer|engineers\b/.test(b),g=/\boperator|operators|moderator|moderators|admin|admins|ops\b/.test(b);return d&&e?c?"Web3 startups and token-led communities":"startups and their communities":d?c?"Web3 startups and founders":"startups and founders":e?c?"DAO, NFT, and Web3 communities":"community leads and members":f&&g?"developers and internal operators":f?"developers and technical teams":g?"internal operators and moderators":void 0}function O(a){return/\b(from scratch|greenfield|empty workspace|clone|repo|existing folder|existing workspace|s[ıi]f[ıi]rdan|mevcut klas[oö]r|mevcut repo|bo[sş])\b/i.test(a)}function P(a,b){let c=`${a.intake.initialPrompt} ${a.intake.latestPrompt}`.toLowerCase(),d=a.intake.sources.filter(a=>"ready"===a.status),e=66;return d.length>0&&(e+=8),a.intake.turnCount>1&&(e+=6),("template"===b&&/\b(telegram|discord|community|topluluk|grup|content|marketing|research|frontend|backend)\b/.test(c)||"source-mode"===b&&O(c)||"channels"===b&&/\b(slack|telegram|discord|google chat)\b/.test(c))&&(e+=10),"company-name"===b&&d.some(a=>"website"===a.kind)&&(e+=6),"target-customer"!==b||a.company.targetCustomer||(e-=18),("workflow"===b||"team"===b)&&(e-=4),Math.max(52,Math.min(96,e))}function Q(a,b){return a.includes(b)?"needs-confirmation":"inferred"}function R(a,b){let c="workspace"===b?["workspace","workspace name","project","project name","proje","proje adı","proje ismi"]:["company","company name","firma","firma adı","şirket","şirket adı","company name"];for(let b of[RegExp(`\\b(?:${c.join("|")})\\b\\s*(?:name|adı|ismi)?\\s*(?:is|should be|=|:|olsun|diyelim|verelim|koyalım)?\\s*([\\p{L}\\p{N}][\\p{L}\\p{N}._ -]{1,40}(?:\\s+[\\p{L}\\p{N}][\\p{L}\\p{N}._ -]{1,40}){0,2})(?=\\s+(?:olsun|diyelim|verelim|koyalım|olarak|i\xe7in)\\b|[.!?,]|$)`,"iu"),RegExp(`\\b(?:adı|ismi|name)\\b\\s*(?:${c.join("|")})?\\s*(?:is|should be|=|:|olsun|diyelim|verelim|koyalım)?\\s*([\\p{L}\\p{N}][\\p{L}\\p{N}._ -]{1,40}(?:\\s+[\\p{L}\\p{N}][\\p{L}\\p{N}._ -]{1,40}){0,2})(?=\\s+(?:olsun|diyelim|verelim|koyalım|olarak|i\xe7in)\\b|[.!?,]|$)`,"iu")]){let c=W(a.match(b)?.[1]?.trim()??"");if(c)return c}}function S(a,b){for(let c of"company"===b?[/\b(?:company|company name|firma|firmaya|şirket|şirkete|project|proje)\b\s+([A-Za-z0-9][A-Za-z0-9 ._-]{1,40}?)\s+(?:diyelim|olsun|olacak|koyalım|verelim)/i,/\b(?:company|firma|şirket)\b(?:\s+adı|\s+ismi|\s+name)?\s*(?:is|olsun|=|:)?\s*([A-Za-z0-9][A-Za-z0-9 ._-]{1,40})/i,/\b([\p{L}\p{N}][\p{L}\p{N}._-]{1,40}(?:\s+[\p{L}\p{N}][\p{L}\p{N}._-]{1,40}){0,2})\s+diye\b/iu]:[/\b(?:workspace|workspace name|project|project name|proje|projeye)\b\s+([A-Za-z0-9][A-Za-z0-9 ._-]{1,40}?)\s+(?:diyelim|olsun|olacak|koyalım|verelim)/i,/\b(?:workspace|project|proje)\b(?:\s+adı|\s+ismi|\s+name)?\s*(?:is|olsun|=|:)?\s*([A-Za-z0-9][A-Za-z0-9 ._-]{1,40})/i,/\b([\p{L}\p{N}][\p{L}\p{N}._-]{1,40}(?:\s+[\p{L}\p{N}][\p{L}\p{N}._-]{1,40}){0,2})\s+diye\b/iu]){let b=a.match(c),d=W(b?.[1]?.trim()??"");if(d)return d}}function T(a){try{let b=new URL(a),c=b.hostname.toLowerCase(),d=b.pathname.toLowerCase();return"github.com"===c||"gitlab.com"===c||"bitbucket.org"===c||d.endsWith(".git")}catch{return!1}}function U(a){return a.length-1}function V(a){return a.replace(/https?:\/\/[^\s)]+/g," ").replace(/\s+/g," ").replace(/^[\s:,-]+|[\s:,-]+$/g,"").trim()}function W(a){return V(a).replace(/\b(projesi|projesini|workspace|project|company|firma|şirket)\b/gi," ").replace(/\b(yapal[ıi]m|ekleyelim|kural[ıi]m|başlatal[ıi]m|olsun|diyelim|verelim|koyal[ıi]m)\b/gi," ").replace(/\b(yeni|bir)\b/gi," ").replace(/\b(diye|olarak|benim|bide|bir de|için)\b.*$/i,"").replace(/\s+/g," ").trim()}function X(a){return a?a.charAt(0).toLowerCase()+a.slice(1):a}function Y(a,b){return a.find(a=>RegExp(b,"i").test(`${a.id} ${a.role} ${a.name}`))?.id}function Z(a){return a.filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b)}function $(a){return a.trim()}function _(a){return a?.trim()||void 0}function aa(a){return ac((a??[]).flatMap(a=>ab(a)).map(a=>a.trim()).filter(Boolean))}function ab(a){return a.split(/\r?\n|,/g).map(a=>a.trim()).filter(Boolean)}function ac(a){return Array.from(new Set(a.filter(Boolean)))}function ad(a){return structuredClone(a)}function ae(a){return a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function af(a){return a.split(/[-_]/g).filter(Boolean).map(a=>a[0].toUpperCase()+a.slice(1)).join(" ")}var ag=c(9879);let ah=f().join(process.cwd(),".mission-control","planner"),ai=f().join(ah,"plans"),aj=f().join(ah,"runtime-workspace"),ak="Mission Control Planner Runtime",al=[{id:"architect",role:"Workspace Architect",name:"Workspace Architect",enabled:!0,isPrimary:!0,emoji:"\uD83E\uDD16",theme:"cyan",skillId:"planner-architect",policy:(0,h.g0)("worker",{fileAccess:"workspace-only",networkAccess:"enabled"}),heartbeat:{enabled:!1}},{id:"founder",role:"Founder",name:"Founder",enabled:!0,emoji:"\uD83C\uDFD7️",theme:"amber",skillId:"planner-founder",policy:(0,h.g0)("worker",{fileAccess:"workspace-only",networkAccess:"enabled"}),heartbeat:{enabled:!1}},{id:"product",role:"Product Lead",name:"Product Lead",enabled:!0,emoji:"\uD83D\uDCD0",theme:"emerald",skillId:"planner-product",policy:(0,h.g0)("worker",{fileAccess:"workspace-only",networkAccess:"enabled"}),heartbeat:{enabled:!1}},{id:"ops",role:"Operations",name:"Operations",enabled:!0,emoji:"⚙️",theme:"blue",skillId:"planner-ops",policy:(0,h.g0)("worker",{fileAccess:"workspace-only",networkAccess:"enabled"}),heartbeat:{enabled:!1}},{id:"growth",role:"Growth",name:"Growth",enabled:!0,emoji:"\uD83D\uDCE3",theme:"violet",skillId:"planner-growth",policy:(0,h.g0)("worker",{fileAccess:"workspace-only",networkAccess:"enabled"}),heartbeat:{enabled:!1}},{id:"reviewer",role:"Reviewer",name:"Reviewer",enabled:!0,emoji:"\uD83D\uDD0D",theme:"rose",skillId:"planner-reviewer",policy:(0,h.g0)("worker",{fileAccess:"workspace-only",networkAccess:"enabled"}),heartbeat:{enabled:!1}}],am=["founder","product","ops","growth","reviewer"];async function an(){let a=E();return await av(a),{plan:a}}async function ao(a){return{plan:await au(a)}}async function ap(a,b){return{plan:await at(a,b)}}async function aq(a,b,c){var d;let e=b.trim();if(!e)throw Error("Planner message is required.");let f=c?await at(a,c):await au(a),g=aL(e),h=function(a,b){var c,d,e,f,g,h,i,j,k;let l,m,o,p,q=ad(a),r=b.trim(),t=r.toLowerCase(),w=Array.from(new Set([...(c=r).match(/https?:\/\/[^\s)]+/g)??[],...c.match(/\b(?:www\.)?[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)+(?:\/[^\s)]*)?/gi)??[]].map(a=>(function(a){if(a.includes("@"))return null;let b=a.replace(/[),.;!?]+$/g,""),c=/^https?:\/\//i.test(b)?b:`https://${b}`;try{let a=new URL(c);return a.hostname.includes(".")?a.toString():null}catch{return null}})(a)).filter(a=>!!a))),x=w.find(a=>T(a)),y=w.find(a=>!T(a));q.intake.started=!0,q.intake.initialPrompt||(q.intake.initialPrompt=r),q.intake.latestPrompt=r,q.intake.turnCount+=1,/\b(advanced|detailed|full editor|geli[sş]mi[sş]|detayl[ıi]|ileri seviye)\b/.test(t)&&(q.intake.mode="advanced"),/\b(simple|keep it simple|guided|basit|sade|y[öo]nlendir)\b/.test(t)&&(q.intake.mode="guided"),/\b(review|deploy review|launch review|final review|go to deploy|deploye ge[cç]|reviewe ge[cç]|son kontrol)\b/.test(t)&&(q.intake.reviewRequested=!0),x&&(q.workspace.sourceMode="clone",q.workspace.repoUrl=x),/\b(existing folder|existing workspace|existing repo|mevcut klas[oö]r|mevcut workspace|mevcut repo)\b/.test(t)&&(q.workspace.sourceMode="existing"),/\b(empty workspace|from scratch|greenfield|s[ıi]f[ıi]rdan|bo[sş] workspace|bo[sş] proje)\b/.test(t)&&(q.workspace.sourceMode="empty");let z=(d=t,/\b(telegram|discord|community|topluluk|grup|channel automation|community ops)\b/.test(d)?"content":/\bfrontend\b|\bui\b|\bwebsite\b|\blanding page\b|\bdesign system\b/.test(d)?"frontend":/\bbackend\b|\bapi\b|\bservice\b|\bmicroservice\b/.test(d)?"backend":/\bresearch\b|\binvestigation\b|\banalysis\b|\bthesis\b/.test(d)?"research":/\bcontent\b|\bmarketing\b|\bgrowth\b|\bseo\b|\bnewsletter\b/.test(d)?"content":/\bsoftware\b|\bapp\b|\bplatform\b|\bproduct\b/.test(d)?"software":null);if(z&&z!==q.workspace.template){let a=F(q,z);q.workspace=a.workspace,q.team=a.team,q.operations=a.operations,q.deploy.firstMissions=a.deploy.firstMissions}let A=(e=t,/\b(community|topluluk|telegram|discord)\b/.test(e)?"content-brand":/\bagency\b/.test(e)?"agency":/\bresearch\b|\blab\b/.test(e)?"research-lab":/\bcontent\b|\bmedia\b|\bnewsletter\b/.test(e)?"content-brand":/\binternal ops\b|\bops team\b/.test(e)?"internal-ops":/\bsaas\b|\bapp\b|\bproduct\b|\bplatform\b/.test(e)?"saas":null);A&&(q.company.type=A);let B=(l=r.match(/["“]([^"”]+)["”]/),l?.[1]?.trim());B&&!q.workspace.name&&(q.workspace.name=B,q.company.name||(q.company.name=B));let C=R(r,"workspace")??S(r,"workspace");C&&(q.workspace.name=C);let D=R(r,"company")??S(r,"company");if(D&&(q.company.name=D,q.workspace.name||(q.workspace.name=D)),(!q.company.name||!q.workspace.name)&&y){let a=function(a){try{let[b]=new URL(a).hostname.replace(/^www\./,"").split(".");if(!b)return;return b.split(/[-_]+/g).filter(Boolean).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}catch{return}}(y);a&&(q.company.name||(q.company.name=a),q.workspace.name||(q.workspace.name=a))}let E=r.match(/(?:for|serving|targeting|i[çc]in|hedef(?:imiz| kitlemiz)?|ilk kullan[ıi]c[ıi](?:lar)?|ilk m[üu][şs]teri(?:ler)?)\s+([^.!?\n]+)/i);E&&!q.company.targetCustomer&&(q.company.targetCustomer=V(E[U(E)]));let H=r.match(/(?:goal|mission|we want to|build|create|amac[ıi]m[ıi]z|hedef(?:imiz)?|istiyoruz|yapmak istedi[ğg]imiz|kurmak istedi[ğg]imiz|olu[sş]turmak istedi[ğg]imiz)\s+([^.!?\n]+)/i);return H&&!q.company.mission&&(q.company.mission=V(H[U(H)])),f=q,g=t,["slack","telegram","discord","googlechat"].forEach(a=>{!g.includes("googlechat"===a?"google chat":a)||f.operations.channels.some(b=>b.type===a)||f.operations.channels.push(u(a,{name:n[a].label,purpose:"Team communication and announcements.",announce:!0}))}),function(a,b){let c=["must ","should ","cannot ","can't ","without ","need to ","olmalı","zorunda","gerek","yapmamalı","olmamalı"];for(let d of b.split(/[.!?\n]/).map(a=>a.trim()).filter(Boolean))c.some(a=>d.toLowerCase().includes(a))&&(a.company.constraints=ac([...a.company.constraints,d]))}(q,r),function(a,b,c){if(a.product.offer)return;let d=b.match(/(?:offer|product|service|platform|we are building|sunulan [şs]ey|[üu]r[üu]n|servis|platform)\s*(?:is|:)?\s*([^\n]+)/i);if(d){a.product.offer=V(d[U(d)]);return}/\btelegram\b/.test(c)&&/\b(group|community|grup|topluluk)\b/.test(c)&&(a.product.offer="Operate and automate the Telegram community experience.")}(q,r,t),h=q,(m=(i=r).match(/(?:scope|v1|mvp|kapsam|ilk s[üu]r[üu]m)\s*(?:is|:)?\s*([^\n]+)/i))&&(h.product.scopeV1=ac([...h.product.scopeV1,...ab(m[U(m)])])),(o=i.match(/(?:non-goals?|not doing|yapmayaca[ğg][ıi]m[ıi]z [şs]eyler|kapsam d[ıi][şs][ıi])\s*(?:are|:)?\s*([^\n]+)/i))&&(h.product.nonGoals=ac([...h.product.nonGoals,...ab(o[U(o)])])),(p=i.match(/(?:success|metric|north star|ba[sş]ar[ıi]|metrik)\s*(?:is|:)?\s*([^\n]+)/i))&&(h.company.successSignals=ac([...h.company.successSignals,...ab(p[U(p)])])),j=q,k=t,/\b(şahsi asistan|kişisel asistan|personal assistant|executive assistant)\b/i.test(k)&&!j.team.persistentAgents.some(a=>/assistant/i.test(`${a.id} ${a.role} ${a.name}`))&&(j.team.persistentAgents=[s({id:"personal-assistant",role:"Personal Assistant",name:"Personal Assistant",purpose:"Own personal coordination, reminders, executive support, and operator handoffs.",responsibilities:["Track the operator's priorities and reminders","Prepare concise handoffs and action lists","Handle lightweight coordination and follow-through"],outputs:["daily brief","priority queue","assistant handoff"],enabled:!0}),...j.team.persistentAgents],"small"===j.intake.size?j.intake.size="medium":"medium"===j.intake.size&&(j.intake.size="large")),/\bdaily\b/.test(t)&&!q.operations.automations.some(a=>"daily-triage"===a.id)&&q.operations.automations.push(v({id:"daily-triage",name:"Daily triage",description:"Daily workspace review loop.",scheduleKind:"every",scheduleValue:"24h",agentId:q.team.persistentAgents.find(a=>a.enabled)?.id,mission:"Inspect the workspace, surface blockers, and leave the next handoff.",channelId:q.operations.channels[0]?.id})),/\bweekly\b/.test(t)&&!q.operations.automations.some(a=>"weekly-review"===a.id)&&q.operations.automations.push(v({id:"weekly-review",name:"Weekly review",description:"Weekly synthesis loop.",scheduleKind:"every",scheduleValue:"168h",agentId:q.team.persistentAgents.find(a=>/learn|review/i.test(a.role))?.id,mission:"Summarize progress, decisions, and next bets for the workspace.",thinking:"high",channelId:q.operations.channels[0]?.id})),G(q)}(G(f),e);h.conversation.push(p("user","Operator",e));let i=await g;h.intake.sources=function(a,b){let c=[...a];for(let a of b){let b=c.findIndex(b=>b.url&&a.url?b.url===a.url:b.id===a.id);if(b>=0){c[b]=a;continue}c.push(a)}return c}(h.intake.sources,i.sources);let j=!(d=h=G(h)).intake.reviewRequested&&d.intake.turnCount<=1&&"ready"!==d.runtime.status?h:await az(h),k=j.autopilot&&(j.intake.reviewRequested||j.intake.turnCount>2)?await aB(j,e):[];j.advisorNotes=k;let l=await aC(j,e,i,k,f);return(h=l.plan).conversation.push(p("assistant","Workspace Architect",l.reply)),h=G(h),await av(h),{plan:h}}async function ar(a,b){let c=b?await at(a,b):await au(a),d=await az(G(c)),e=await aB(d,"Simulate the specialist planning board.");d.advisorNotes=e;let f=await aC(d,"Simulate the specialist planning board and tell me what you would refine next.",{sources:d.intake.sources,confirmations:d.intake.confirmations,inferenceText:d.intake.inferences.map(a=>`${a.label}: ${a.value}`).join("\n"),companyName:d.company.name||void 0,mission:d.company.mission||void 0,offer:d.product.offer||void 0,template:d.workspace.template},e,c);(d=f.plan).conversation.push(p("assistant","Workspace Architect",f.reply));let g=G(d);return await av(g),{plan:g}}async function as(a,b,c={}){let d=b?await at(a,b):await au(a),e=G({...d,intake:{...d.intake,reviewRequested:!0}}),f=e.team.persistentAgents.filter(a=>a.enabled).length,g=e.operations.channels.some(a=>a.enabled&&"internal"!==a.type),h=e.operations.automations.some(a=>a.enabled),j=e.deploy.firstMissions.some(a=>a.trim().length>0),k=(0,i.X6)({template:(0,i.Bb)({sourceMode:e.workspace.sourceMode,agentCount:f,kickoffMission:e.workspace.rules.kickoffMission,hasChannels:g,hasAutomations:h,hasPlannerKickoffs:j}),onProgress:c.onProgress});if(await k.startStep("plan","Checking deploy blockers and locking the planner state."),e.deploy.blockers.length>0){let a=`Resolve deploy blockers first: ${e.deploy.blockers.join(" ")}`;throw await k.addActivity("plan",a,"error"),await k.failStep("plan",a),Error(`Resolve deploy blockers first: ${e.deploy.blockers.join(" ")}`)}await k.addActivity("plan","Deploy blockers cleared.","done"),e.status="deploying",e.stage="deploying",await av(e),await k.completeStep("plan","Planner state locked. Workspace bootstrap is starting.");try{var l,m,n;let a,b,c=(a=(l=e).team.persistentAgents.filter(a=>a.enabled),{name:l.workspace.name,brief:[(m=l).company.mission?`Mission: ${m.company.mission}`:"",m.company.targetCustomer?`Target customer: ${m.company.targetCustomer}`:"",m.product.offer?`Offer: ${m.product.offer}`:"",m.product.scopeV1.length>0?`V1 scope: ${m.product.scopeV1.join(", ")}`:"",m.product.nonGoals.length>0?`Non-goals: ${m.product.nonGoals.join(", ")}`:"",m.company.successSignals.length>0?`Success signals: ${m.company.successSignals.join(", ")}`:"",m.workspace.stackDecisions.length>0?`Stack decisions: ${m.workspace.stackDecisions.join(", ")}`:""].filter(Boolean).join("\n"),directory:l.workspace.directory,modelId:l.workspace.modelId,sourceMode:l.workspace.sourceMode,repoUrl:l.workspace.repoUrl,existingPath:l.workspace.existingPath,template:l.workspace.template,teamPreset:"custom",modelProfile:l.workspace.modelProfile,rules:{...l.workspace.rules,workspaceOnly:l.operations.sandbox.workspaceOnly},agents:a.map(aG)}),d=await (0,ag.zw)(c,{onProgress:async a=>{for(let b of a.steps)await k.syncStep(b)}});await k.startStep("blueprint","Writing planner blueprint and deploy notes into the new workspace."),await k.addActivity("blueprint","Persisting planner blueprint, deploy report, and docs."),await aH(e,d.workspacePath,d),await k.completeStep("blueprint","Planner blueprint and docs are now in the workspace.");let f=(n=e,b=aV(n.workspace.name),Object.fromEntries(n.team.persistentAgents.filter(a=>a.enabled).map(a=>[a.id,`${b}-${aV(a.id)||"agent"}`])));await k.startStep("channels",g?"Provisioning enabled external channels.":"No external channels were requested."),g||await k.addActivity("channels","No enabled external channels. Skipping channel provisioning.","done");let i=await aI(e.operations.channels,{onProgress:async({message:a,percent:b,status:c})=>{await k.updateStep("channels",{percent:b,detail:a,status:"error"===c?"active":void 0}),await k.addActivity("channels",a,c)}});await k.completeStep("channels",g?`${i.provisioned.length} channel${1===i.provisioned.length?"":"s"} provisioned.`:"Channel stage complete."),await k.startStep("automations",h?"Provisioning enabled automation loops.":"No recurring automations were requested."),h||await k.addActivity("automations","No enabled automations. Skipping automation provisioning.","done");let o=await aJ(e,d.workspaceId,f,{onProgress:async({message:a,percent:b,status:c})=>{await k.updateStep("automations",{percent:b,detail:a,status:"error"===c?"active":void 0}),await k.addActivity("automations",a,c)}});await k.completeStep("automations",h?`${o.provisioned.length} automation${1===o.provisioned.length?"":"s"} provisioned.`:"Automation stage complete."),await k.startStep("planner-kickoff",j?"Dispatching planner kickoff missions.":"No planner kickoff missions were requested."),j||await k.addActivity("planner-kickoff","No planner kickoff missions. Finalizing deploy.","done");let q=await aK(e,d.workspaceId,f,{onProgress:async({message:a,percent:b,status:c})=>{await k.updateStep("planner-kickoff",{percent:b,detail:a,status:"error"===c?"active":void 0}),await k.addActivity("planner-kickoff",a,c)}});await k.completeStep("planner-kickoff",j?`${q.length} kickoff mission${1===q.length?"":"s"} launched.`:"Deploy finalized without extra kickoff missions.");let r=aW([...e.deploy.warnings,...i.warnings,...o.warnings]);e.deploy={...e.deploy,blockers:[],warnings:r,lastDeployedAt:new Date().toISOString(),workspaceId:d.workspaceId,workspacePath:d.workspacePath,primaryAgentId:d.primaryAgentId,createdAgentIds:d.agentIds,provisionedChannels:i.provisioned,provisionedAutomations:o.provisioned,kickoffRunIds:aW([...d.kickoffRunId?[d.kickoffRunId]:[],...q])},e.status="deployed",e.stage="deployed",e.conversation.push(p("assistant","Workspace Architect",`DEPLOY completed. Workspace ${d.workspacePath} is live with ${d.agentIds.length} agent${1===d.agentIds.length?"":"s"}.`));let s=G(e);return s.status="deployed",s.stage="deployed",await av(s),{plan:s,workspaceId:d.workspaceId,workspacePath:d.workspacePath,primaryAgentId:d.primaryAgentId,agentIds:d.agentIds,kickoffRunIds:s.deploy.kickoffRunIds,warnings:r}}catch(a){throw e.status="blocked",e.stage="pressure-test",e.deploy.warnings=aW([...e.deploy.warnings,a instanceof Error?a.message:"Planner deploy failed."]),await av(G(e)),a}}async function at(a,b){let c=await au(a).catch(()=>E(a)),d=G({...c,...b,id:a,createdAt:c.createdAt,runtime:{...c.runtime,...b.runtime},deploy:{...c.deploy,...b.deploy}});return await av(d),d}async function au(a){let b=aw(a);return G(JSON.parse(await (0,d.readFile)(b,"utf8")))}async function av(a){let b=aw(a.id);await (0,d.mkdir)(f().dirname(b),{recursive:!0}),await (0,d.writeFile)(b,`${JSON.stringify(a,null,2)}
|
|
2
|
+
`,"utf8")}function aw(a){return f().join(ai,`${a}.json`)}let ax={founder:"Founder",product:"Product Lead",ops:"Operations",growth:"Growth",reviewer:"Reviewer",architect:"Workspace Architect"},ay={"planner-architect":`# Workspace Architect
|
|
3
3
|
|
|
4
4
|
You are the primary planning agent for Mission Control.
|
|
5
5
|
|
|
@@ -80,12 +80,12 @@ Return valid JSON only:
|
|
|
80
80
|
"concerns": ["..."]
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
Pressure-test assumptions, missing info, hidden blockers, and design regressions. Be concise.`};async function
|
|
84
|
-
`,"utf8")}let b=f().join(a,".openclaw","project.json"),c={};try{c=JSON.parse(await (0,d.readFile)(b,"utf8"))}catch{c={}}c.name="string"==typeof c.name?c.name:
|
|
85
|
-
`,"utf8")}async function at(a,b){if("agent"!==a.runtime.mode||"ready"!==a.runtime.status)return H(a);try{let c=await Promise.all(ae.map(async c=>{var d,e,f;let g=a.runtime.advisorAgentIds[c],h=a.runtime.advisorSessionIds[c];if(!g||!h)return null;let i=(d=a,e=c,f=b,[`You are the ${ap[e]} advisor for planner orchestration.`,'Return valid JSON only. Do not wrap the JSON in markdown fences.\nSchema: {"summary":"string","recommendations":["..."],"concerns":["..."]}\nKeep the output concise and role-specific.\n\nContext JSON:',JSON.stringify({advisor:e,latestOperatorMessage:f,currentPlan:aw(d),recentConversation:d.conversation.slice(-6).map(a=>({role:a.role,author:a.author,text:a.text}))},null,2)].join("\n")),j=await av({agentId:g,sessionId:h,message:i,thinking:"medium"});return{advisorId:c,...j}})),d=c.filter(a=>!!a).map(a=>({id:`${a.advisorId}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,advisorId:a.advisorId,advisorName:ap[a.advisorId],summary:a.response.summary?.trim()||"No specialist summary returned.",recommendations:aO(a.response.recommendations??[]).slice(0,3),concerns:aO(a.response.concerns??[]).slice(0,3),createdAt:new Date().toISOString()}));return a.runtime=z(a.id,{...a.runtime,lastAdvisorRunIds:c.filter(a=>!!a).map(a=>a.runId),lastError:void 0}),d.length>0?d:H(a)}catch(b){return a.runtime=z(a.id,{...a.runtime,status:"error",mode:"fallback",lastError:b instanceof Error?b.message:"Advisor runtime failed."}),H(a)}}async function au(a,b,c,d,e){if("agent"!==a.runtime.mode||"ready"!==a.runtime.status||!a.runtime.architectAgentId){let f=G(aG(a,c));return{plan:f,reply:I(f,d,b,e).text}}try{var f,g,h,i,j,k,l,n,o;let p,q,r,y=await av({agentId:a.runtime.architectAgentId,sessionId:a.runtime.architectSessionId,message:(f=a,g=b,h=c,i=d,p=m(f.intake.size),['You are Workspace Architect, the primary planning agent inside Mission Control.\nReturn valid JSON only. Do not wrap the JSON in markdown fences.\nSchema: {"reply":"string","mode":"guided|advanced|null","reviewRequested":true,"assumptions":["..."],"suggestions":["..."],"questions":["..."],"patch":{}}\nRules:\n- Prefer drafting likely decisions instead of asking for every missing field.\n- Treat yourself as the primary intelligence layer. The planner should persist and validate state, not interpret the operator for you.\n- If the operator asks you to infer, extract, or fill missing details from linked context, fill every plausible field before asking follow-up questions.\n- Ask at most one high-value question when harvested context already includes a website or repo.\n- Do not ask about non-goals, polish, or V1 exclusions until mission, audience, and offer are already grounded.\n- Keep reply concise, concrete, and operator-facing.\n- Reply in the same language as the operator\'s latest message.\n- Treat colloquial Turkish and informal phrasing as first-class input. Infer names, roles, and intent from natural speech instead of waiting for rigid formatting.\n- When the operator gives a company or workspace name, apply it immediately.\n- Take initiative. If the intent is clear but some details are ambiguous, choose the likeliest workable default, apply it, and tell the operator what you assumed.\n- If the operator asks for a role or agent in plain language, add or adapt a persistent agent for that role instead of asking them to restate it formally.\n- Example: "şahsi asistan ekleyelim" should produce a persistent agent patch such as { id: "personal-assistant", role: "Personal Assistant", name: "Personal Assistant" } with a sensible purpose and outputs.\n- Give recommendations proactively when you see a stronger default, clearer role split, or cleaner V1 path.\n- When a domain implies a likely brand name, use it unless contradicted.\n- When you still need confirmation after reading a source, state what you inferred first and ask only for the remaining ambiguity.\n- Respect the selected workspace size. Keep the operator-facing chat as lean as the selected size, but still complete the underlying project context and blueprint.\n- Use patch aggressively. Update company, product, workspace, agents, workflows, automations, and channels whenever the operator intent is clear enough.\n- When adding a new agent, generate a stable slug id and include role, name, purpose, responsibilities, and outputs.\n- Patch only fields that should change.\n\nContext JSON:',JSON.stringify({operatorMessage:g,selectedWorkspaceSize:{id:f.intake.size,label:p.label,targets:{agents:p.agentCount,tasks:p.workflowCount,automations:p.automationCount,externalChannels:p.externalChannelCount}},architectSummary:f.architectSummary,currentPlan:aw(f),harvestedContext:h,advisorNotes:i.map(a=>({advisor:a.advisorName,summary:a.summary,recommendations:a.recommendations,concerns:a.concerns})),recentConversation:f.conversation.slice(-8).map(a=>({role:a.role,author:a.author,text:a.text}))},null,2)].join("\n")),thinking:"high"}),A=structuredClone(a);return("guided"===y.response.mode||"advanced"===y.response.mode)&&(A.intake.mode=y.response.mode),"boolean"==typeof y.response.reviewRequested&&(A.intake.reviewRequested=y.response.reviewRequested),y.response.patch&&(j=A,k=y.response.patch,q=structuredClone(j),k.workspace?.template&&(l=k.workspace.template,"software"===l||"frontend"===l||"backend"===l||"research"===l||"content"===l)&&k.workspace.template!==q.workspace.template&&(q=F(q,k.workspace.template)),k.company&&(q.company={...q.company,...k.company}),k.product&&(q.product={...q.product,...k.product}),k.workspace&&(q.workspace={...q.workspace,...k.workspace,rules:{...q.workspace.rules,...k.workspace.rules??{}}}),k.team&&(q.team={...q.team,allowEphemeralSubagents:k.team.allowEphemeralSubagents??q.team.allowEphemeralSubagents,maxParallelRuns:k.team.maxParallelRuns??q.team.maxParallelRuns,escalationRules:k.team.escalationRules??q.team.escalationRules,persistentAgents:k.team.persistentAgents?function(a,b){let c=new Map(a.map(a=>[a.id,a]));for(let a of b){let b=aN(a.id);if(!b)continue;let d=c.get(b);c.set(b,s({...d,...a,id:b,responsibilities:a.responsibilities??d?.responsibilities,outputs:a.outputs??d?.outputs,heartbeat:a.heartbeat??d?.heartbeat,policy:a.policy??d?.policy}))}return Array.from(c.values())}(q.team.persistentAgents,k.team.persistentAgents):q.team.persistentAgents}),k.operations&&(q.operations={...q.operations,workflows:k.operations.workflows?function(a,b){let c=new Map(a.map(a=>[a.id,a]));for(let a of b){let b=aN(a.id);if(!b)continue;let d=c.get(b);c.set(b,t({...d,...a,id:b,collaboratorAgentIds:a.collaboratorAgentIds??d?.collaboratorAgentIds,outputs:a.outputs??d?.outputs,channelIds:a.channelIds??d?.channelIds}))}return Array.from(c.values())}(q.operations.workflows,k.operations.workflows):q.operations.workflows,channels:k.operations.channels?function(a,b){let c=new Map(a.map(a=>[a.id,a]));for(let a of b){var d;let b=aN(a.id),e=c.get(b),f=(d=a.type,"internal"===d||"slack"===d||"telegram"===d||"discord"===d||"googlechat"===d)?a.type:e?.type;b&&f&&c.set(b,u(f,{...e,...a,id:b,credentials:a.credentials??e?.credentials}))}return Array.from(c.values())}(q.operations.channels,k.operations.channels):q.operations.channels,automations:k.operations.automations?function(a,b){let c=new Map(a.map(a=>[a.id,a]));for(let a of b){let b=aN(a.id);if(!b)continue;let d=c.get(b);c.set(b,v({...d,...a,id:b}))}return Array.from(c.values())}(q.operations.automations,k.operations.automations):q.operations.automations,hooks:k.operations.hooks?function(a,b){let c=new Map(a.map(a=>[a.id,a]));for(let a of b){let b=aN(a.id);if(!b)continue;let d=c.get(b);c.set(b,w({...d,...a,id:b}))}return Array.from(c.values())}(q.operations.hooks,k.operations.hooks):q.operations.hooks,sandbox:k.operations.sandbox?x({...q.operations.sandbox,...k.operations.sandbox}):q.operations.sandbox}),A=G(q)),A.runtime=z(A.id,{...A.runtime,mode:"agent",status:"ready",lastArchitectRunId:y.runId,lastError:void 0}),{plan:G(A),reply:(n=y.response,o=I(A,d,b,e).text,r=/[çğıöşüÇĞİÖŞÜ]/.test(n.reply??"")||/\b(ve|bir|için|ile|olarak|hedef|ilk|şu|bu)\b/i.test(n.reply??""),[n.reply?.trim(),n.assumptions?.length?`${r?"Varsayımlar":"Assumptions"}: ${aO(n.assumptions).slice(0,2).join(" | ")}`:"",n.suggestions?.length?`${r?"\xd6neriler":"Suggestions"}: ${aO(n.suggestions).slice(0,2).join(" | ")}`:"",n.questions?.length?`${r?"Sıradaki karar":"Next decision"}: ${aO(n.questions).slice(0,1).join(" | ")}`:""].filter(Boolean).join("\n\n")||o)}}catch(g){let f=G({...aG(a,c),runtime:z(a.id,{...a.runtime,mode:"fallback",status:"error",lastError:g instanceof Error?g.message:"Architect runtime failed."})});return{plan:f,reply:I(f,d,b,e).text}}}async function av({agentId:a,sessionId:b,message:c,thinking:d}){var e;let f=await (0,g.VP)(["agent","--agent",a,"--session-id",b,"--message",c,"--thinking",d,"--timeout","120","--json"],{timeoutMs:125e3}),h=(e=f,e.result?.payloads?.map(a=>a.text?.trim()).filter(a=>!!a).join("\n\n")||e.summary||"{}");return{runId:f.runId,text:h,response:function(a){let b=a.trim().replace(/^```json\s*/i,"").replace(/^```\s*/i,"").replace(/\s*```$/i,"");try{return JSON.parse(b)}catch{}let c=b.split(/\r?\n/);for(let a=0;a<c.length;a+=1){let b=c[a].trim();if(b.startsWith("{")||b.startsWith("["))for(let b=c.length;b>a;b-=1){let d=c.slice(a,b).join("\n").trim();try{return JSON.parse(d)}catch{}}}throw Error(`Planner agent returned invalid JSON: ${b.slice(0,800)}`)}(h)}}function aw(a){let b=m(a.intake.size),c=a.team.persistentAgents.filter(a=>a.enabled),d=a.operations.workflows.filter(a=>a.enabled),e=a.operations.automations.filter(a=>a.enabled);return{company:a.company,product:a.product,workspace:a.workspace,currentOperatingShape:{enabledAgents:c.map(a=>({id:a.id,name:a.name,role:a.role,isPrimary:a.isPrimary})),enabledWorkflowCount:d.length,enabledAutomationCount:e.length,enabledExternalChannels:a.operations.channels.filter(a=>a.enabled&&"internal"!==a.type).map(a=>a.name)},team:{persistentAgents:a.team.persistentAgents,allowEphemeralSubagents:a.team.allowEphemeralSubagents,maxParallelRuns:a.team.maxParallelRuns,escalationRules:a.team.escalationRules},operations:a.operations,intake:{mode:a.intake.mode,size:a.intake.size,sizeTargets:{agents:b.agentCount,tasks:b.workflowCount,automations:b.automationCount,externalChannels:b.externalChannelCount},reviewRequested:a.intake.reviewRequested,confirmations:a.intake.confirmations,sources:a.intake.sources,inferences:a.intake.inferences}}}function ax(a){return`${aN(ac)}-${aN(a)||"agent"}`}function ay(a){return{id:a.id,role:a.role,name:a.name,enabled:a.enabled,emoji:a.emoji,theme:a.theme,skillId:a.skillId,modelId:a.modelId,isPrimary:a.isPrimary,policy:a.policy,heartbeat:a.heartbeat}}async function az(a,b,c){let e=f().join(b,".openclaw","planner"),g=f().join(b,"docs");await (0,d.mkdir)(e,{recursive:!0}),await (0,d.mkdir)(g,{recursive:!0});let h=a.operations.workflows.map(a=>[`## ${a.name}`,`- Goal: ${a.goal||"Unset"}`,`- Trigger: ${a.trigger}`,`- Owner: ${a.ownerAgentId||"Unassigned"}`,a.collaboratorAgentIds.length>0?`- Collaborators: ${a.collaboratorAgentIds.join(", ")}`:"",`- Success: ${a.successDefinition||"Unset"}`,a.outputs.length>0?`- Outputs: ${a.outputs.join(", ")}`:""].filter(Boolean).join("\n")).join("\n\n"),i=[`# ${a.company.name||a.workspace.name||"Workspace"} Company Plan`,"\n## Mission",a.company.mission||"Unset","\n## Target customer",a.company.targetCustomer||"Unset","\n## Offer",a.product.offer||"Unset","\n## V1 scope",a.product.scopeV1.length>0?a.product.scopeV1.map(a=>`- ${a}`).join("\n"):"- Unset","\n## Non-goals",a.product.nonGoals.length>0?a.product.nonGoals.map(a=>`- ${a}`).join("\n"):"- Unset","\n## Success signals",a.company.successSignals.length>0?a.company.successSignals.map(a=>`- ${a}`).join("\n"):"- Unset"].join("\n");await (0,d.writeFile)(f().join(e,"blueprint.json"),`${JSON.stringify(a,null,2)}
|
|
83
|
+
Pressure-test assumptions, missing info, hidden blockers, and design regressions. Be concise.`};async function az(a){let b=z(a.id,a.runtime),c=aF("architect");if("ready"===b.status&&b.architectAgentId===c&&b.workspacePath===aj)return G({...a,runtime:b});let d=structuredClone(a);try{let c=await (0,ag.GM)({force:!0,includeHidden:!0}),e=c.workspaces.find(a=>a.path===aj)??null;if(e?await aA(e.path):(await (0,ag.zw)({name:ak,directory:aj,sourceMode:"empty",template:"research",teamPreset:"custom",modelProfile:"balanced",rules:{workspaceOnly:!0,generateStarterDocs:!1,generateMemory:!1,kickoffMission:!1},agents:al}),await aA(aj),e=(c=await (0,ag.GM)({force:!0,includeHidden:!0})).workspaces.find(a=>a.path===aj)??null),!e)throw Error("Planner runtime workspace could not be found after provisioning.");let f=Object.fromEntries(al.map(a=>[a.id,aF(a.id)])),g=new Set(c.agents.filter(a=>a.workspaceId===e.id).map(a=>a.id));for(let a of al){let b=f[a.id];g.has(b)||await (0,ag.Sn)({id:b,workspaceId:e.id,name:a.name,emoji:a.emoji,theme:a.theme,policy:a.policy,heartbeat:a.heartbeat})}await aA(e.path),d.runtime=z(a.id,{...b,mode:"agent",status:"ready",workspaceId:e.id,workspacePath:e.path,architectAgentId:f.architect,advisorAgentIds:{founder:f.founder,product:f.product,ops:f.ops,growth:f.growth,reviewer:f.reviewer},lastError:void 0})}catch(c){d.runtime=z(a.id,{...b,mode:"fallback",status:"error",lastError:c instanceof Error?c.message:"Planner runtime provisioning failed."})}return G(d)}async function aA(a){for(let[b,c]of(await (0,d.mkdir)(f().join(a,"skills"),{recursive:!0}),Object.entries(ay))){let e=f().join(a,"skills",b,"SKILL.md");await (0,d.mkdir)(f().dirname(e),{recursive:!0}),await (0,d.writeFile)(e,`${c.trim()}
|
|
84
|
+
`,"utf8")}let b=f().join(a,".openclaw","project.json"),c={};try{c=JSON.parse(await (0,d.readFile)(b,"utf8"))}catch{c={}}c.name="string"==typeof c.name?c.name:ak,c.hidden=!0,c.systemTag="mission-control-planner",c.updatedAt=new Date().toISOString(),await (0,d.mkdir)(f().dirname(b),{recursive:!0}),await (0,d.writeFile)(b,`${JSON.stringify(c,null,2)}
|
|
85
|
+
`,"utf8")}async function aB(a,b){if("agent"!==a.runtime.mode||"ready"!==a.runtime.status)return H(a);try{let c=await Promise.all(am.map(async c=>{var d,e,f;let g=a.runtime.advisorAgentIds[c],h=a.runtime.advisorSessionIds[c];if(!g||!h)return null;let i=(d=a,e=c,f=b,[`You are the ${ax[e]} advisor for planner orchestration.`,'Return valid JSON only. Do not wrap the JSON in markdown fences.\nSchema: {"summary":"string","recommendations":["..."],"concerns":["..."]}\nKeep the output concise and role-specific.\n\nContext JSON:',JSON.stringify({advisor:e,latestOperatorMessage:f,currentPlan:aE(d),recentConversation:d.conversation.slice(-6).map(a=>({role:a.role,author:a.author,text:a.text}))},null,2)].join("\n")),j=await aD({agentId:g,sessionId:h,message:i,thinking:"medium"});return{advisorId:c,...j}})),d=c.filter(a=>!!a).map(a=>({id:`${a.advisorId}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,advisorId:a.advisorId,advisorName:ax[a.advisorId],summary:a.response.summary?.trim()||"No specialist summary returned.",recommendations:aW(a.response.recommendations??[]).slice(0,3),concerns:aW(a.response.concerns??[]).slice(0,3),createdAt:new Date().toISOString()}));return a.runtime=z(a.id,{...a.runtime,lastAdvisorRunIds:c.filter(a=>!!a).map(a=>a.runId),lastError:void 0}),d.length>0?d:H(a)}catch(b){return a.runtime=z(a.id,{...a.runtime,status:"error",mode:"fallback",lastError:b instanceof Error?b.message:"Advisor runtime failed."}),H(a)}}async function aC(a,b,c,d,e){if("agent"!==a.runtime.mode||"ready"!==a.runtime.status||!a.runtime.architectAgentId){let f=G(aO(a,c));return{plan:f,reply:I(f,d,b,e).text}}try{var f,g,h,i,j,k,l,n;let o,p,q=await aD({agentId:a.runtime.architectAgentId,sessionId:a.runtime.architectSessionId,message:(f=a,g=b,h=c,i=d,o=m(f.intake.size),['You are Workspace Architect, the primary planning agent inside Mission Control.\nReturn valid JSON only. Do not wrap the JSON in markdown fences.\nSchema: {"reply":"string","mode":"guided|advanced|null","reviewRequested":true,"assumptions":["..."],"suggestions":["..."],"questions":["..."],"patch":{}}\nRules:\n- Prefer drafting likely decisions instead of asking for every missing field.\n- Treat yourself as the primary intelligence layer. The planner should persist and validate state, not interpret the operator for you.\n- If the operator asks you to infer, extract, or fill missing details from linked context, fill every plausible field before asking follow-up questions.\n- Ask at most one high-value question when harvested context already includes a website or repo.\n- Do not ask about non-goals, polish, or V1 exclusions until mission, audience, and offer are already grounded.\n- Keep reply concise, concrete, and operator-facing.\n- Reply in the same language as the operator\'s latest message.\n- If the operator switches languages, follow the latest message only. Do not stick to an older language from earlier turns.\n- Treat colloquial Turkish and informal phrasing as first-class input. Infer names, roles, and intent from natural speech instead of waiting for rigid formatting.\n- When the operator gives a company or workspace name, apply it immediately.\n- Take initiative. If the intent is clear but some details are ambiguous, choose the likeliest workable default, apply it, and tell the operator what you assumed.\n- If the operator asks for a role or agent in plain language, add or adapt a persistent agent for that role instead of asking them to restate it formally.\n- Example: "şahsi asistan ekleyelim" should produce a persistent agent patch such as { id: "personal-assistant", role: "Personal Assistant", name: "Personal Assistant" } with a sensible purpose and outputs.\n- Give recommendations proactively when you see a stronger default, clearer role split, or cleaner V1 path.\n- When a domain implies a likely brand name, use it unless contradicted.\n- When you still need confirmation after reading a source, state what you inferred first and ask only for the remaining ambiguity.\n- Respect the selected workspace size. Keep the operator-facing chat as lean as the selected size, but still complete the underlying project context and blueprint.\n- Use patch aggressively. Update company, product, workspace, agents, workflows, automations, and channels whenever the operator intent is clear enough.\n- When adding a new agent, generate a stable slug id and include role, name, purpose, responsibilities, and outputs.\n- Patch only fields that should change.\n\nContext JSON:',JSON.stringify({operatorMessage:g,selectedWorkspaceSize:{id:f.intake.size,label:o.label,targets:{agents:o.agentCount,tasks:o.workflowCount,automations:o.automationCount,externalChannels:o.externalChannelCount}},architectSummary:f.architectSummary,currentPlan:aE(f),harvestedContext:h,advisorNotes:i.map(a=>({advisor:a.advisorName,summary:a.summary,recommendations:a.recommendations,concerns:a.concerns})),recentConversation:f.conversation.slice(-8).map(a=>({role:a.role,author:a.author,text:a.text}))},null,2)].join("\n")),thinking:(j=a).intake.reviewRequested?"high":j.intake.turnCount<=2?"low":"medium"}),r=structuredClone(a);("guided"===q.response.mode||"advanced"===q.response.mode)&&(r.intake.mode=q.response.mode),"boolean"==typeof q.response.reviewRequested&&(r.intake.reviewRequested=q.response.reviewRequested),q.response.patch&&(k=r,l=q.response.patch,p=structuredClone(k),l.workspace?.template&&(n=l.workspace.template,"software"===n||"frontend"===n||"backend"===n||"research"===n||"content"===n)&&l.workspace.template!==p.workspace.template&&(p=F(p,l.workspace.template)),l.company&&(p.company={...p.company,...l.company}),l.product&&(p.product={...p.product,...l.product}),l.workspace&&(p.workspace={...p.workspace,...l.workspace,rules:{...p.workspace.rules,...l.workspace.rules??{}}}),l.team&&(p.team={...p.team,allowEphemeralSubagents:l.team.allowEphemeralSubagents??p.team.allowEphemeralSubagents,maxParallelRuns:l.team.maxParallelRuns??p.team.maxParallelRuns,escalationRules:l.team.escalationRules??p.team.escalationRules,persistentAgents:l.team.persistentAgents?function(a,b){let c=new Map(a.map(a=>[a.id,a]));for(let a of b){let b=aV(a.id);if(!b)continue;let d=c.get(b);c.set(b,s({...d,...a,id:b,responsibilities:a.responsibilities??d?.responsibilities,outputs:a.outputs??d?.outputs,heartbeat:a.heartbeat??d?.heartbeat,policy:a.policy??d?.policy}))}return Array.from(c.values())}(p.team.persistentAgents,l.team.persistentAgents):p.team.persistentAgents}),l.operations&&(p.operations={...p.operations,workflows:l.operations.workflows?function(a,b){let c=new Map(a.map(a=>[a.id,a]));for(let a of b){let b=aV(a.id);if(!b)continue;let d=c.get(b);c.set(b,t({...d,...a,id:b,collaboratorAgentIds:a.collaboratorAgentIds??d?.collaboratorAgentIds,outputs:a.outputs??d?.outputs,channelIds:a.channelIds??d?.channelIds}))}return Array.from(c.values())}(p.operations.workflows,l.operations.workflows):p.operations.workflows,channels:l.operations.channels?function(a,b){let c=new Map(a.map(a=>[a.id,a]));for(let a of b){var d;let b=aV(a.id),e=c.get(b),f=(d=a.type,"internal"===d||"slack"===d||"telegram"===d||"discord"===d||"googlechat"===d)?a.type:e?.type;b&&f&&c.set(b,u(f,{...e,...a,id:b,credentials:a.credentials??e?.credentials}))}return Array.from(c.values())}(p.operations.channels,l.operations.channels):p.operations.channels,automations:l.operations.automations?function(a,b){let c=new Map(a.map(a=>[a.id,a]));for(let a of b){let b=aV(a.id);if(!b)continue;let d=c.get(b);c.set(b,v({...d,...a,id:b}))}return Array.from(c.values())}(p.operations.automations,l.operations.automations):p.operations.automations,hooks:l.operations.hooks?function(a,b){let c=new Map(a.map(a=>[a.id,a]));for(let a of b){let b=aV(a.id);if(!b)continue;let d=c.get(b);c.set(b,w({...d,...a,id:b}))}return Array.from(c.values())}(p.operations.hooks,l.operations.hooks):p.operations.hooks,sandbox:l.operations.sandbox?x({...p.operations.sandbox,...l.operations.sandbox}):p.operations.sandbox}),r=G(p)),r.runtime=z(r.id,{...r.runtime,mode:"agent",status:"ready",lastArchitectRunId:q.runId,lastError:void 0});let y=G(r),A=I(y,d,b,e).text;return{plan:y,reply:function(a,b,c){let d=L(a.reply);if(d&&d!==c)return b;let e="tr"===c;return[a.reply?.trim(),a.assumptions?.length?`${e?"Varsayımlar":"Assumptions"}: ${aW(a.assumptions).slice(0,2).join(" | ")}`:"",a.suggestions?.length?`${e?"\xd6neriler":"Suggestions"}: ${aW(a.suggestions).slice(0,2).join(" | ")}`:"",a.questions?.length?`${e?"Sıradaki karar":"Next decision"}: ${aW(a.questions).slice(0,1).join(" | ")}`:""].filter(Boolean).join("\n\n")||b}(q.response,A,K(y,b))}}catch(g){let f=G({...aO(a,c),runtime:z(a.id,{...a.runtime,mode:"fallback",status:"error",lastError:g instanceof Error?g.message:"Architect runtime failed."})});return{plan:f,reply:I(f,d,b,e).text}}}async function aD({agentId:a,sessionId:b,message:c,thinking:d}){var e;let f=await (0,g.VP)(["agent","--agent",a,"--session-id",b,"--message",c,"--thinking",d,"--timeout","120","--json"],{timeoutMs:125e3}),h=(e=f,e.result?.payloads?.map(a=>a.text?.trim()).filter(a=>!!a).join("\n\n")||e.summary||"{}");return{runId:f.runId,text:h,response:function(a){let b=a.trim().replace(/^```json\s*/i,"").replace(/^```\s*/i,"").replace(/\s*```$/i,"");try{return JSON.parse(b)}catch{}let c=b.split(/\r?\n/);for(let a=0;a<c.length;a+=1){let b=c[a].trim();if(b.startsWith("{")||b.startsWith("["))for(let b=c.length;b>a;b-=1){let d=c.slice(a,b).join("\n").trim();try{return JSON.parse(d)}catch{}}}throw Error(`Planner agent returned invalid JSON: ${b.slice(0,800)}`)}(h)}}function aE(a){let b=m(a.intake.size),c=a.team.persistentAgents.filter(a=>a.enabled),d=a.operations.workflows.filter(a=>a.enabled),e=a.operations.automations.filter(a=>a.enabled);return{company:a.company,product:a.product,workspace:a.workspace,currentOperatingShape:{enabledAgents:c.map(a=>({id:a.id,name:a.name,role:a.role,isPrimary:a.isPrimary})),enabledWorkflowCount:d.length,enabledAutomationCount:e.length,enabledExternalChannels:a.operations.channels.filter(a=>a.enabled&&"internal"!==a.type).map(a=>a.name)},team:{persistentAgents:a.team.persistentAgents,allowEphemeralSubagents:a.team.allowEphemeralSubagents,maxParallelRuns:a.team.maxParallelRuns,escalationRules:a.team.escalationRules},operations:a.operations,intake:{mode:a.intake.mode,size:a.intake.size,sizeTargets:{agents:b.agentCount,tasks:b.workflowCount,automations:b.automationCount,externalChannels:b.externalChannelCount},reviewRequested:a.intake.reviewRequested,confirmations:a.intake.confirmations,sources:a.intake.sources,inferences:a.intake.inferences}}}function aF(a){return`${aV(ak)}-${aV(a)||"agent"}`}function aG(a){return{id:a.id,role:a.role,name:a.name,enabled:a.enabled,emoji:a.emoji,theme:a.theme,skillId:a.skillId,modelId:a.modelId,isPrimary:a.isPrimary,policy:a.policy,heartbeat:a.heartbeat}}async function aH(a,b,c){let e=f().join(b,".openclaw","planner"),g=f().join(b,"docs");await (0,d.mkdir)(e,{recursive:!0}),await (0,d.mkdir)(g,{recursive:!0});let h=a.operations.workflows.map(a=>[`## ${a.name}`,`- Goal: ${a.goal||"Unset"}`,`- Trigger: ${a.trigger}`,`- Owner: ${a.ownerAgentId||"Unassigned"}`,a.collaboratorAgentIds.length>0?`- Collaborators: ${a.collaboratorAgentIds.join(", ")}`:"",`- Success: ${a.successDefinition||"Unset"}`,a.outputs.length>0?`- Outputs: ${a.outputs.join(", ")}`:""].filter(Boolean).join("\n")).join("\n\n"),i=[`# ${a.company.name||a.workspace.name||"Workspace"} Company Plan`,"\n## Mission",a.company.mission||"Unset","\n## Target customer",a.company.targetCustomer||"Unset","\n## Offer",a.product.offer||"Unset","\n## V1 scope",a.product.scopeV1.length>0?a.product.scopeV1.map(a=>`- ${a}`).join("\n"):"- Unset","\n## Non-goals",a.product.nonGoals.length>0?a.product.nonGoals.map(a=>`- ${a}`).join("\n"):"- Unset","\n## Success signals",a.company.successSignals.length>0?a.company.successSignals.map(a=>`- ${a}`).join("\n"):"- Unset"].join("\n");await (0,d.writeFile)(f().join(e,"blueprint.json"),`${JSON.stringify(a,null,2)}
|
|
86
86
|
`,"utf8"),await (0,d.writeFile)(f().join(e,"deploy-report.json"),`${JSON.stringify({deployedAt:new Date().toISOString(),workspaceId:c.workspaceId,workspacePath:c.workspacePath,primaryAgentId:c.primaryAgentId,agentIds:c.agentIds,kickoffRunId:c.kickoffRunId??null},null,2)}
|
|
87
87
|
`,"utf8"),await (0,d.writeFile)(f().join(g,"company.md"),`${i}
|
|
88
88
|
`,"utf8"),await (0,d.writeFile)(f().join(g,"workflows.md"),`# Workflows
|
|
89
89
|
|
|
90
90
|
${h}
|
|
91
|
-
`,"utf8")}async function aA(a,b={}){let c=[],d=[],e=a.filter(a=>a.enabled&&"internal"!==a.type);for(let[a,f]of(0===e.length&&await b.onProgress?.({message:"No enabled external channels. Skipping channel provisioning.",percent:100,status:"done"}),e.entries())){let h=Object.fromEntries(f.credentials.map(a=>[a.key,a.value.trim()])),i=function(a,b){switch(a.type){case"telegram":return b.token?["channels","add","--channel","telegram","--token",b.token,"--name",a.name]:null;case"discord":return b.token?["channels","add","--channel","discord","--token",b.token,"--name",a.name]:null;case"slack":return b.botToken?["channels","add","--channel","slack","--bot-token",b.botToken,"--name",a.name]:null;case"googlechat":return b.webhookUrl?["channels","add","--channel","googlechat","--webhook-url",b.webhookUrl,"--name",a.name]:null;default:return null}}(f,h),j=Math.round(a/e.length*100);if(await b.onProgress?.({message:`Provisioning channel ${a+1} of ${e.length}: ${f.name}.`,percent:j,status:"active"}),!i){d.push(`Channel "${f.name}" uses an unsupported provisioning shape.`),await b.onProgress?.({message:`Skipped ${f.name}. Mission Control does not know how to provision this channel shape yet.`,percent:Math.round((a+1)/e.length*100),status:"error"});continue}try{await (0,g.zB)(i,{timeoutMs:6e4}),c.push(f.name),await b.onProgress?.({message:`Provisioned ${f.name}.`,percent:Math.round((a+1)/e.length*100),status:"done"})}catch(c){d.push(`Channel "${f.name}" could not be provisioned: ${c instanceof Error?c.message:"unknown error"}`),await b.onProgress?.({message:`Channel ${f.name} could not be provisioned: ${c instanceof Error?c.message:"unknown error"}`,percent:Math.round((a+1)/e.length*100),status:"error"})}}return{provisioned:c,warnings:d}}async function aB(a,b,c,d={}){let e=[],f=[],h=a.operations.automations.filter(a=>a.enabled);for(let[b,i]of(0===h.length&&await d.onProgress?.({message:"No enabled automations. Skipping automation provisioning.",percent:100,status:"done"}),h.entries())){let j=function(a,b,c){let d=b.agentId?c[b.agentId]:void 0;if(!d)return null;let e=["cron","add","--name",b.name,"--description",b.description||b.name,"--agent",d,"--message",b.mission,"--thinking",b.thinking,"--timeout-seconds","120","--json"];if("every"===b.scheduleKind?e.push("--every",b.scheduleValue):e.push("--cron",b.scheduleValue),b.announce&&b.channelId){let c=a.operations.channels.find(a=>a.id===b.channelId);c&&"internal"!==c.type&&(e.push("--announce","--channel",c.type),c.target&&e.push("--to",c.target))}return e}(a,i,c),k=Math.round(b/h.length*100);if(await d.onProgress?.({message:`Provisioning automation ${b+1} of ${h.length}: ${i.name}.`,percent:k,status:"active"}),!j){f.push(`Automation "${i.name}" could not be mapped to a live agent.`),await d.onProgress?.({message:`Skipped ${i.name}. It could not be mapped to a live agent.`,percent:Math.round((b+1)/h.length*100),status:"error"});continue}try{await (0,g.zB)(j,{timeoutMs:6e4}),e.push(i.name),await d.onProgress?.({message:`Provisioned automation ${i.name}.`,percent:Math.round((b+1)/h.length*100),status:"done"})}catch(a){f.push(`Automation "${i.name}" failed to provision: ${a instanceof Error?a.message:"unknown error"}`),await d.onProgress?.({message:`Automation ${i.name} failed: ${a instanceof Error?a.message:"unknown error"}`,percent:Math.round((b+1)/h.length*100),status:"error"})}}return(await (0,$.GM)({force:!0})).workspaces.some(a=>a.id===b)||(f.push("Workspace snapshot did not refresh immediately after deploy."),await d.onProgress?.({message:"Workspace snapshot did not refresh immediately after deploy.",percent:100,status:"error"})),{provisioned:e,warnings:f}}async function aC(a,b,c,d={}){let e=[{agentId:c[a.team.persistentAgents.find(a=>a.enabled&&a.isPrimary)?.id??""],mission:a.deploy.firstMissions[0]},{agentId:c[a.team.persistentAgents.find(a=>a.enabled&&/review/i.test(a.role))?.id??""],mission:a.deploy.firstMissions[1]},{agentId:c[a.team.persistentAgents.find(a=>a.enabled&&/learn/i.test(a.role))?.id??""],mission:a.deploy.firstMissions[2]}].filter(a=>a.agentId&&a.mission),f=[];for(let[a,c]of(0===e.length&&await d.onProgress?.({message:"No planner kickoff missions. Finalizing deploy.",percent:100,status:"done"}),e.entries())){let g=Math.round(a/e.length*100);await d.onProgress?.({message:`Dispatching kickoff ${a+1} of ${e.length} to ${c.agentId}.`,percent:g,status:"active"});try{let g=await (0,$.xE)({agentId:c.agentId,workspaceId:b,mission:c.mission,thinking:"medium"});f.push(g.runId||g.dispatchId||c.agentId),await d.onProgress?.({message:`Kickoff mission queued for ${c.agentId}. ${g.runId?`Run ${g.runId}.`:`Dispatch ${g.dispatchId??"pending"}.`}`,percent:Math.round((a+1)/e.length*100),status:"done"})}catch{await d.onProgress?.({message:`Kickoff mission could not be started for ${c.agentId}.`,percent:Math.round((a+1)/e.length*100),status:"error"});continue}}return f}async function aD(a){var b;let c,d,e,f,g,h,i=Array.from(new Set([...(b=a).match(/https?:\/\/[^\s)]+/g)??[],...b.match(/\b(?:www\.)?[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)+(?:\/[^\s)]*)?/gi)??[]].map(a=>(function(a){if(a.includes("@"))return null;let b=a.replace(/[),.;!?]+$/g,""),c=/^https?:\/\//i.test(b)?b:`https://${b}`;try{let a=new URL(c);return a.hostname.includes(".")?a.toString():null}catch{return null}})(a)).filter(a=>!!a))),j=[],k=[],l=[],m=[],n=[];for(let a of i){if(function(a){try{let b=new URL(a),c=b.hostname.toLowerCase(),d=b.pathname.toLowerCase();return"github.com"===c||"gitlab.com"===c||"bitbucket.org"===c||d.endsWith(".git")}catch{return!1}}(a)){k.push(q({kind:"repo",label:aH(a),url:a,summary:"Repository candidate detected from the prompt.",details:["The architect will treat this link as a repository source."]}));continue}n.push(a)}for(let a of(await Promise.all(n.map(a=>aE(a)))))k.push(a.source),a.inferenceText&&l.push(a.inferenceText),!c&&a.companyName&&(c=a.companyName),!d&&a.mission&&(d=a.mission),!e&&a.offer&&(e=a.offer),!f&&a.targetCustomer&&(f=a.targetCustomer),!g&&a.revenueModel&&(g=a.revenueModel),m.push(...a.successSignals??[]),!h&&a.template&&(h=a.template),j.push(...a.confirmations);return{sources:k,confirmations:aO(j),inferenceText:[a.trim(),...l].filter(Boolean).join("\n"),companyName:c,mission:d,offer:e,targetCustomer:f,successSignals:aO(m).slice(0,3),revenueModel:g,template:h}}async function aE(a){let b=aH(a);try{var c,d,e,f,g;let h,i,j,k,l=await aF(a);if(!l.ok)throw Error(`HTTP ${l.status}`);let m=await l.text(),n=aI(m,["og:title","twitter:title"])??aJ(m,"title"),o=aI(m,["og:description","twitter:description","description"])??(c=m,aK(c)[0]),p=aJ(m,"h1"),r=aO([p??"",(d=m,aK(d)[0]),(e=m,aK(e)[1])]).filter(Boolean),s=[n??"",o??"",...r].filter(Boolean).join(" "),t=function(a){if(!a)return;let b=a.split(/[|:-]/)[0]?.trim();return b&&b.length>=2?b:void 0}(n),u=o||p,v=o||p,w=(h=`${n??""} ${o??""} ${p??""}`.toLowerCase(),/\b(telegram|discord|community|topluluk|content|newsletter|growth|seo)\b/.test(h)?"content":/\b(api|backend|service|infrastructure)\b/.test(h)?"backend":/\b(app|platform|software|product|dashboard)\b/.test(h)?"software":void 0),x=function(a){let b=a.replace(/\s+/g," ").trim(),c=b.toLowerCase();for(let a of[/\b(?:for|serving|built for|designed for|helps?|empowers?|supports?)\s+([^.?!:\n]+)/i,/\b(?:users?|customers?|audience|members?)\s*[:\-]\s*([^.?!\n]+)/i]){let c=b.match(a),d=(c?.[1]??"").replace(/\s+/g," ").replace(/^[\s:,-]+|[\s:,-]+$/g,"").trim();if(function(a){let b=a.toLowerCase();return!(!b||b.split(/\s+/).length>12||/\b(create|operate|grow|power|launch|build|manage|automate|using|with|through)\b/.test(b))&&/\b(user|users|customer|customers|audience|founder|founders|startup|startups|developer|developers|operator|operators|teams?|community|communities|members?|holders?|dao|nft|brand|brands|creator|creators|business|businesses)\b/.test(b)}(d))return d}let d=/\bweb3|onchain|crypto|blockchain|token\b/.test(c),e=/\bstartup|startups|founder|founders|business(?:es)?\b/.test(c),f=/\bcommunity|communities|member|members|holder|holders|nft|dao|governance\b/.test(c),g=/\bdeveloper|developers|builder|builders|engineer|engineers\b/.test(c),h=/\boperator|operators|moderator|moderators|admin|admins|ops\b/.test(c),i=/\bbrand|brands|creator|creators|marketing|marketers|growth teams?\b/.test(c);return e&&f?d?"Web3 startups and token-led communities":"Startups and their communities":e?d?"Web3 startups and founders":"Startups and founders":f?d?"DAO, NFT, and Web3 communities":"Community leads and members":g&&h?"Developers and internal operators":g?"Developers and technical teams":i?"Brands and growth teams":h?"Internal operators and moderators":void 0}(s),y=(f=s,g=w,i=f.toLowerCase(),j=[],("content"===g||/\bcommunity|telegram|discord|dao|governance|holder|member|members\b/.test(i))&&j.push("Higher weekly active participation from the target community"),/\bautonom|automate|automation|operate|agents?\b/.test(i)&&j.push("More work completed autonomously with less manual operator time"),/\bgrow|growth|startup|startups|business(?:es)?\b/.test(i)&&j.push("More active teams or ventures operating through the workspace"),aO(j).slice(0,3)),z=(k=s.toLowerCase(),/\bsubscription|pricing|plan\b/.test(k)?"Subscription software":/\bprofit share|share in company profits|revenue share\b/.test(k)?"Revenue share or profit participation":/\bnft holders?\b|\btoken holders?\b|\btoken-gated\b/.test(k)?"Token or membership-gated participation":void 0),A=[];return o||A.push(`I read ${b} but still need a concise mission sentence.`),p||x||A.push(`I inspected ${b}, but the target customer is still not obvious from the page alone.`),{source:q({kind:"website",label:t||b,url:a,summary:o||p||"Website context captured from the linked page.",details:r}),confirmations:A,inferenceText:[t?`Company name: ${t}`:"",u?`Mission: ${u}`:"",v?`Offer: ${v}`:"",x?`Target customer: ${x}`:"",z?`Revenue model: ${z}`:"",y.length>0?`Success signals: ${y.join(" | ")}`:"",r.length>0?`Website notes: ${r.join(" | ")}`:""].filter(Boolean).join("\n"),companyName:t,mission:u,offer:v,targetCustomer:x,successSignals:y,revenueModel:z,template:w}}catch(c){return{source:q({kind:"website",label:b,url:a,summary:"Website could not be inspected automatically.",details:[],status:"error",error:c instanceof Error?c.message:"Unknown website inspection error."}),confirmations:[`I could not inspect ${b}. Confirm the company context manually if this link matters.`],inferenceText:""}}}async function aF(a){let b,c=new AbortController;try{let d=new Promise((a,d)=>{b=setTimeout(()=>{c.abort(),d(Error(`Website inspection timed out after ${Math.ceil(3.5)} seconds.`))},3500)});return await Promise.race([fetch(a,{redirect:"follow",signal:c.signal,headers:{"User-Agent":"OpenClaw Mission Control Planner/0.1"},cache:"no-store"}),d])}finally{b&&clearTimeout(b)}}function aG(a,b){let c,d=structuredClone(a);return b.template&&"software"===d.workspace.template&&b.template!==d.workspace.template&&(d=F(d,b.template)),!d.company.name&&b.companyName&&(d.company.name=b.companyName),(!d.workspace.name||(c=d.workspace.name.toLowerCase(),/\b(yapal[ıi]m|ekleyelim|başlatal[ıi]m|kural[ıi]m|olsun|diyelim|verelim|koyal[ıi]m)\b/.test(c)))&&b.companyName&&(d.workspace.name=b.companyName),!d.company.mission&&b.mission&&(d.company.mission=b.mission),!d.product.offer&&b.offer&&(d.product.offer=b.offer),!d.company.targetCustomer&&b.targetCustomer&&(d.company.targetCustomer=b.targetCustomer),!d.product.revenueModel&&b.revenueModel&&(d.product.revenueModel=b.revenueModel),b.successSignals?.length&&(d.company.successSignals=aO([...d.company.successSignals,...b.successSignals]).slice(0,3)),d}function aH(a){try{return new URL(a).hostname.replace(/^www\./,"")}catch{return a}}function aI(a,b){for(let c of b){let b=function(a,b){for(let c of[RegExp(`<meta[^>]+property=["']${aM(b)}["'][^>]+content=["']([^"']+)["'][^>]*>`,"i"),RegExp(`<meta[^>]+content=["']([^"']+)["'][^>]+property=["']${aM(b)}["'][^>]*>`,"i"),RegExp(`<meta[^>]+name=["']${aM(b)}["'][^>]+content=["']([^"']+)["'][^>]*>`,"i"),RegExp(`<meta[^>]+content=["']([^"']+)["'][^>]+name=["']${aM(b)}["'][^>]*>`,"i")]){let b=a.match(c);if(b?.[1])return aL(b[1])}}(a,c);if(b)return b}}function aJ(a,b){let c=a.match(RegExp(`<${b}[^>]*>([\\s\\S]*?)<\\/${b}>`,"i"));return c?.[1]?aL(c[1]):void 0}function aK(a){return Array.from(a.matchAll(/<p[^>]*>([\s\S]*?)<\/p>/gi)).map(a=>aL(a[1])).filter(a=>a.length>=40).slice(0,3)}function aL(a){return a.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/ /g," ")}function aM(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function aN(a){return a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function aO(a){return Array.from(new Set(a.filter(Boolean)))}}};
|
|
91
|
+
`,"utf8")}async function aI(a,b={}){let c=[],d=[],e=a.filter(a=>a.enabled&&"internal"!==a.type);for(let[a,f]of(0===e.length&&await b.onProgress?.({message:"No enabled external channels. Skipping channel provisioning.",percent:100,status:"done"}),e.entries())){let h=Object.fromEntries(f.credentials.map(a=>[a.key,a.value.trim()])),i=function(a,b){switch(a.type){case"telegram":return b.token?["channels","add","--channel","telegram","--token",b.token,"--name",a.name]:null;case"discord":return b.token?["channels","add","--channel","discord","--token",b.token,"--name",a.name]:null;case"slack":return b.botToken?["channels","add","--channel","slack","--bot-token",b.botToken,"--name",a.name]:null;case"googlechat":return b.webhookUrl?["channels","add","--channel","googlechat","--webhook-url",b.webhookUrl,"--name",a.name]:null;default:return null}}(f,h),j=Math.round(a/e.length*100);if(await b.onProgress?.({message:`Provisioning channel ${a+1} of ${e.length}: ${f.name}.`,percent:j,status:"active"}),!i){d.push(`Channel "${f.name}" uses an unsupported provisioning shape.`),await b.onProgress?.({message:`Skipped ${f.name}. Mission Control does not know how to provision this channel shape yet.`,percent:Math.round((a+1)/e.length*100),status:"error"});continue}try{await (0,g.zB)(i,{timeoutMs:6e4}),c.push(f.name),await b.onProgress?.({message:`Provisioned ${f.name}.`,percent:Math.round((a+1)/e.length*100),status:"done"})}catch(c){d.push(`Channel "${f.name}" could not be provisioned: ${c instanceof Error?c.message:"unknown error"}`),await b.onProgress?.({message:`Channel ${f.name} could not be provisioned: ${c instanceof Error?c.message:"unknown error"}`,percent:Math.round((a+1)/e.length*100),status:"error"})}}return{provisioned:c,warnings:d}}async function aJ(a,b,c,d={}){let e=[],f=[],h=a.operations.automations.filter(a=>a.enabled);for(let[b,i]of(0===h.length&&await d.onProgress?.({message:"No enabled automations. Skipping automation provisioning.",percent:100,status:"done"}),h.entries())){let j=function(a,b,c){let d=b.agentId?c[b.agentId]:void 0;if(!d)return null;let e=["cron","add","--name",b.name,"--description",b.description||b.name,"--agent",d,"--message",b.mission,"--thinking",b.thinking,"--timeout-seconds","120","--json"];if("every"===b.scheduleKind?e.push("--every",b.scheduleValue):e.push("--cron",b.scheduleValue),b.announce&&b.channelId){let c=a.operations.channels.find(a=>a.id===b.channelId);c&&"internal"!==c.type&&(e.push("--announce","--channel",c.type),c.target&&e.push("--to",c.target))}return e}(a,i,c),k=Math.round(b/h.length*100);if(await d.onProgress?.({message:`Provisioning automation ${b+1} of ${h.length}: ${i.name}.`,percent:k,status:"active"}),!j){f.push(`Automation "${i.name}" could not be mapped to a live agent.`),await d.onProgress?.({message:`Skipped ${i.name}. It could not be mapped to a live agent.`,percent:Math.round((b+1)/h.length*100),status:"error"});continue}try{await (0,g.zB)(j,{timeoutMs:6e4}),e.push(i.name),await d.onProgress?.({message:`Provisioned automation ${i.name}.`,percent:Math.round((b+1)/h.length*100),status:"done"})}catch(a){f.push(`Automation "${i.name}" failed to provision: ${a instanceof Error?a.message:"unknown error"}`),await d.onProgress?.({message:`Automation ${i.name} failed: ${a instanceof Error?a.message:"unknown error"}`,percent:Math.round((b+1)/h.length*100),status:"error"})}}return(await (0,ag.GM)({force:!0})).workspaces.some(a=>a.id===b)||(f.push("Workspace snapshot did not refresh immediately after deploy."),await d.onProgress?.({message:"Workspace snapshot did not refresh immediately after deploy.",percent:100,status:"error"})),{provisioned:e,warnings:f}}async function aK(a,b,c,d={}){let e=[{agentId:c[a.team.persistentAgents.find(a=>a.enabled&&a.isPrimary)?.id??""],mission:a.deploy.firstMissions[0]},{agentId:c[a.team.persistentAgents.find(a=>a.enabled&&/review/i.test(a.role))?.id??""],mission:a.deploy.firstMissions[1]},{agentId:c[a.team.persistentAgents.find(a=>a.enabled&&/learn/i.test(a.role))?.id??""],mission:a.deploy.firstMissions[2]}].filter(a=>a.agentId&&a.mission),f=[];for(let[a,c]of(0===e.length&&await d.onProgress?.({message:"No planner kickoff missions. Finalizing deploy.",percent:100,status:"done"}),e.entries())){let g=Math.round(a/e.length*100);await d.onProgress?.({message:`Dispatching kickoff ${a+1} of ${e.length} to ${c.agentId}.`,percent:g,status:"active"});try{let g=await (0,ag.xE)({agentId:c.agentId,workspaceId:b,mission:c.mission,thinking:"medium"});f.push(g.runId||g.dispatchId||c.agentId),await d.onProgress?.({message:`Kickoff mission queued for ${c.agentId}. ${g.runId?`Run ${g.runId}.`:`Dispatch ${g.dispatchId??"pending"}.`}`,percent:Math.round((a+1)/e.length*100),status:"done"})}catch{await d.onProgress?.({message:`Kickoff mission could not be started for ${c.agentId}.`,percent:Math.round((a+1)/e.length*100),status:"error"});continue}}return f}async function aL(a){var b;let c,d,e,f,g,h,i=Array.from(new Set([...(b=a).match(/https?:\/\/[^\s)]+/g)??[],...b.match(/\b(?:www\.)?[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)+(?:\/[^\s)]*)?/gi)??[]].map(a=>(function(a){if(a.includes("@"))return null;let b=a.replace(/[),.;!?]+$/g,""),c=/^https?:\/\//i.test(b)?b:`https://${b}`;try{let a=new URL(c);return a.hostname.includes(".")?a.toString():null}catch{return null}})(a)).filter(a=>!!a))),j=[],k=[],l=[],m=[],n=[];for(let a of i){if(function(a){try{let b=new URL(a),c=b.hostname.toLowerCase(),d=b.pathname.toLowerCase();return"github.com"===c||"gitlab.com"===c||"bitbucket.org"===c||d.endsWith(".git")}catch{return!1}}(a)){k.push(q({kind:"repo",label:aP(a),url:a,summary:"Repository candidate detected from the prompt.",details:["The architect will treat this link as a repository source."]}));continue}n.push(a)}for(let a of(await Promise.all(n.map(a=>aM(a)))))k.push(a.source),a.inferenceText&&l.push(a.inferenceText),!c&&a.companyName&&(c=a.companyName),!d&&a.mission&&(d=a.mission),!e&&a.offer&&(e=a.offer),!f&&a.targetCustomer&&(f=a.targetCustomer),!g&&a.revenueModel&&(g=a.revenueModel),m.push(...a.successSignals??[]),!h&&a.template&&(h=a.template),j.push(...a.confirmations);return{sources:k,confirmations:aW(j),inferenceText:[a.trim(),...l].filter(Boolean).join("\n"),companyName:c,mission:d,offer:e,targetCustomer:f,successSignals:aW(m).slice(0,3),revenueModel:g,template:h}}async function aM(a){let b=aP(a);try{var c,d,e,f,g;let h,i,j,k,l=await aN(a);if(!l.ok)throw Error(`HTTP ${l.status}`);let m=await l.text(),n=aQ(m,["og:title","twitter:title"])??aR(m,"title"),o=aQ(m,["og:description","twitter:description","description"])??(c=m,aS(c)[0]),p=aR(m,"h1"),r=aW([p??"",(d=m,aS(d)[0]),(e=m,aS(e)[1])]).filter(Boolean),s=[n??"",o??"",...r].filter(Boolean).join(" "),t=function(a){if(!a)return;let b=a.split(/[|:-]/)[0]?.trim();return b&&b.length>=2?b:void 0}(n),u=o||p,v=o||p,w=(h=`${n??""} ${o??""} ${p??""}`.toLowerCase(),/\b(telegram|discord|community|topluluk|content|newsletter|growth|seo)\b/.test(h)?"content":/\b(api|backend|service|infrastructure)\b/.test(h)?"backend":/\b(app|platform|software|product|dashboard)\b/.test(h)?"software":void 0),x=function(a){let b=a.replace(/\s+/g," ").trim(),c=b.toLowerCase();for(let a of[/\b(?:for|serving|built for|designed for|helps?|empowers?|supports?)\s+([^.?!:\n]+)/i,/\b(?:users?|customers?|audience|members?)\s*[:\-]\s*([^.?!\n]+)/i]){let c=b.match(a),d=(c?.[1]??"").replace(/\s+/g," ").replace(/^[\s:,-]+|[\s:,-]+$/g,"").trim();if(function(a){let b=a.toLowerCase();return!(!b||b.split(/\s+/).length>12||/\b(create|operate|grow|power|launch|build|manage|automate|using|with|through)\b/.test(b))&&/\b(user|users|customer|customers|audience|founder|founders|startup|startups|developer|developers|operator|operators|teams?|community|communities|members?|holders?|dao|nft|brand|brands|creator|creators|business|businesses)\b/.test(b)}(d))return d}let d=/\bweb3|onchain|crypto|blockchain|token\b/.test(c),e=/\bstartup|startups|founder|founders|business(?:es)?\b/.test(c),f=/\bcommunity|communities|member|members|holder|holders|nft|dao|governance\b/.test(c),g=/\bdeveloper|developers|builder|builders|engineer|engineers\b/.test(c),h=/\boperator|operators|moderator|moderators|admin|admins|ops\b/.test(c),i=/\bbrand|brands|creator|creators|marketing|marketers|growth teams?\b/.test(c);return e&&f?d?"Web3 startups and token-led communities":"Startups and their communities":e?d?"Web3 startups and founders":"Startups and founders":f?d?"DAO, NFT, and Web3 communities":"Community leads and members":g&&h?"Developers and internal operators":g?"Developers and technical teams":i?"Brands and growth teams":h?"Internal operators and moderators":void 0}(s),y=(f=s,g=w,i=f.toLowerCase(),j=[],("content"===g||/\bcommunity|telegram|discord|dao|governance|holder|member|members\b/.test(i))&&j.push("Higher weekly active participation from the target community"),/\bautonom|automate|automation|operate|agents?\b/.test(i)&&j.push("More work completed autonomously with less manual operator time"),/\bgrow|growth|startup|startups|business(?:es)?\b/.test(i)&&j.push("More active teams or ventures operating through the workspace"),aW(j).slice(0,3)),z=(k=s.toLowerCase(),/\bsubscription|pricing|plan\b/.test(k)?"Subscription software":/\bprofit share|share in company profits|revenue share\b/.test(k)?"Revenue share or profit participation":/\bnft holders?\b|\btoken holders?\b|\btoken-gated\b/.test(k)?"Token or membership-gated participation":void 0),A=[];return o||A.push(`I read ${b} but still need a concise mission sentence.`),p||x||A.push(`I inspected ${b}, but the target customer is still not obvious from the page alone.`),{source:q({kind:"website",label:t||b,url:a,summary:o||p||"Website context captured from the linked page.",details:r}),confirmations:A,inferenceText:[t?`Company name: ${t}`:"",u?`Mission: ${u}`:"",v?`Offer: ${v}`:"",x?`Target customer: ${x}`:"",z?`Revenue model: ${z}`:"",y.length>0?`Success signals: ${y.join(" | ")}`:"",r.length>0?`Website notes: ${r.join(" | ")}`:""].filter(Boolean).join("\n"),companyName:t,mission:u,offer:v,targetCustomer:x,successSignals:y,revenueModel:z,template:w}}catch(c){return{source:q({kind:"website",label:b,url:a,summary:"Website could not be inspected automatically.",details:[],status:"error",error:c instanceof Error?c.message:"Unknown website inspection error."}),confirmations:[`I could not inspect ${b}. Confirm the company context manually if this link matters.`],inferenceText:""}}}async function aN(a){let b,c=new AbortController;try{let d=new Promise((a,d)=>{b=setTimeout(()=>{c.abort(),d(Error(`Website inspection timed out after ${Math.ceil(3.5)} seconds.`))},3500)});return await Promise.race([fetch(a,{redirect:"follow",signal:c.signal,headers:{"User-Agent":"OpenClaw Mission Control Planner/0.1"},cache:"no-store"}),d])}finally{b&&clearTimeout(b)}}function aO(a,b){let c,d=structuredClone(a);return b.template&&"software"===d.workspace.template&&b.template!==d.workspace.template&&(d=F(d,b.template)),!d.company.name&&b.companyName&&(d.company.name=b.companyName),(!d.workspace.name||(c=d.workspace.name.toLowerCase(),/\b(yapal[ıi]m|ekleyelim|başlatal[ıi]m|kural[ıi]m|olsun|diyelim|verelim|koyal[ıi]m)\b/.test(c)))&&b.companyName&&(d.workspace.name=b.companyName),!d.company.mission&&b.mission&&(d.company.mission=b.mission),!d.product.offer&&b.offer&&(d.product.offer=b.offer),!d.company.targetCustomer&&b.targetCustomer&&(d.company.targetCustomer=b.targetCustomer),!d.product.revenueModel&&b.revenueModel&&(d.product.revenueModel=b.revenueModel),b.successSignals?.length&&(d.company.successSignals=aW([...d.company.successSignals,...b.successSignals]).slice(0,3)),d}function aP(a){try{return new URL(a).hostname.replace(/^www\./,"")}catch{return a}}function aQ(a,b){for(let c of b){let b=function(a,b){for(let c of[RegExp(`<meta[^>]+property=["']${aU(b)}["'][^>]+content=["']([^"']+)["'][^>]*>`,"i"),RegExp(`<meta[^>]+content=["']([^"']+)["'][^>]+property=["']${aU(b)}["'][^>]*>`,"i"),RegExp(`<meta[^>]+name=["']${aU(b)}["'][^>]+content=["']([^"']+)["'][^>]*>`,"i"),RegExp(`<meta[^>]+content=["']([^"']+)["'][^>]+name=["']${aU(b)}["'][^>]*>`,"i")]){let b=a.match(c);if(b?.[1])return aT(b[1])}}(a,c);if(b)return b}}function aR(a,b){let c=a.match(RegExp(`<${b}[^>]*>([\\s\\S]*?)<\\/${b}>`,"i"));return c?.[1]?aT(c[1]):void 0}function aS(a){return Array.from(a.matchAll(/<p[^>]*>([\s\S]*?)<\/p>/gi)).map(a=>aT(a[1])).filter(a=>a.length>=40).slice(0,3)}function aT(a){return a.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/ /g," ")}function aU(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function aV(a){return a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function aW(a){return Array.from(new Set(a.filter(Boolean)))}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--sgPf3JHUUWvk8YndSq2L9--><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/a321f34e664c439e.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-032b5b42e067a790.js"/><script src="/_next/static/chunks/474f1956-ebf51c0dd00ff236.js" async=""></script><script src="/_next/static/chunks/26-8f7c2b7e8773b4cb.js" async=""></script><script src="/_next/static/chunks/main-app-245e6e74e3ad1df9.js" async=""></script><script src="/_next/static/chunks/273-31916bcd40e3f381.js" async=""></script><script src="/_next/static/chunks/app/layout-6c2c9cd9b518452f.js" async=""></script><meta name="robots" content="noindex"/><meta name="theme-color" content="#09101c"/><title>AgentOS | OpenClaw Mission Control</title><meta name="description" content="Human Control Layer for AI Agents and Companies | Built on OpenClaw."/><meta name="application-name" content="AgentOS | Mission Control"/><link rel="manifest" href="/site.webmanifest"/><meta property="og:title" content="AgentOS | OpenClaw Mission Control"/><meta property="og:description" content="Human Control Layer for AI Agents and Companies | Built on OpenClaw."/><meta property="og:site_name" content="AgentOS | Mission Control"/><meta property="og:image" content="http://localhost:3000/readme/agentos1.webp"/><meta property="og:image:width" content="1536"/><meta property="og:image:height" content="1024"/><meta property="og:image:alt" content="AgentOS mission-control interface"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="AgentOS | OpenClaw Mission Control"/><meta name="twitter:description" content="Human Control Layer for AI Agents and Companies | Built on OpenClaw."/><meta name="twitter:image" content="http://localhost:3000/readme/agentos1.webp"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="icon" href="/favicon.ico" sizes="any"/><link rel="icon" href="/favicon-16x16.png" sizes="16x16" type="image/png"/><link rel="icon" href="/favicon-32x32.png" sizes="32x32" type="image/png"/><link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180" type="image/png"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><main class="flex min-h-screen items-center justify-center bg-[#050816] px-6 text-white"><div class="rounded-[24px] border border-white/10 bg-white/[0.03] px-8 py-10 text-center shadow-[0_24px_80px_rgba(0,0,0,0.35)] backdrop-blur-xl"><p class="text-[11px] uppercase tracking-[0.32em] text-slate-500">OpenClaw</p><h1 class="mt-3 font-display text-3xl">Page not found</h1><p class="mt-3 max-w-md text-sm leading-6 text-slate-400">The requested mission-control route does not exist in this workspace.</p></div></main><!--$--><!--/$--><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/webpack-032b5b42e067a790.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[4001,[],\"\"]\n3:I[1493,[],\"\"]\n4:I[2629,[\"273\",\"static/chunks/273-31916bcd40e3f381.js\",\"177\",\"static/chunks/app/layout-6c2c9cd9b518452f.js\"],\"Toaster\"]\n5:I[2212,[],\"OutletBoundary\"]\n6:\"$Sreact.suspense\"\n8:I[2212,[],\"ViewportBoundary\"]\na:I[2212,[],\"MetadataBoundary\"]\nc:I[6163,[],\"\"]\n:HL[\"/_next/static/css/a321f34e664c439e.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"sgPf3JHUUWvk8YndSq2L9\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/a321f34e664c439e.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"children\":[[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"main\",null,{\"className\":\"flex min-h-screen items-center justify-center bg-[#050816] px-6 text-white\",\"children\":[\"$\",\"div\",null,{\"className\":\"rounded-[24px] border border-white/10 bg-white/[0.03] px-8 py-10 text-center shadow-[0_24px_80px_rgba(0,0,0,0.35)] backdrop-blur-xl\",\"children\":[[\"$\",\"p\",null,{\"className\":\"text-[11px] uppercase tracking-[0.32em] text-slate-500\",\"children\":\"OpenClaw\"}],[\"$\",\"h1\",null,{\"className\":\"mt-3 font-display text-3xl\",\"children\":\"Page not found\"}],[\"$\",\"p\",null,{\"className\":\"mt-3 max-w-md text-sm leading-6 text-slate-400\",\"children\":\"The requested mission-control route does not exist in this workspace.\"}]]}]}],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L4\",null,{\"theme\":\"dark\",\"richColors\":true,\"closeButton\":true}]]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"main\",null,{\"className\":\"flex min-h-screen items-center justify-center bg-[#050816] px-6 text-white\",\"children\":[\"$\",\"div\",null,{\"className\":\"rounded-[24px] border border-white/10 bg-white/[0.03] px-8 py-10 text-center shadow-[0_24px_80px_rgba(0,0,0,0.35)] backdrop-blur-xl\",\"children\":[[\"$\",\"p\",null,{\"className\":\"text-[11px] uppercase tracking-[0.32em] text-slate-500\",\"children\":\"OpenClaw\"}],[\"$\",\"h1\",null,{\"className\":\"mt-3 font-display text-3xl\",\"children\":\"Page not found\"}],[\"$\",\"p\",null,{\"className\":\"mt-3 max-w-md text-sm leading-6 text-slate-400\",\"children\":\"The requested mission-control route does not exist in this workspace.\"}]]}]}],null,[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@7\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#09101c\"}]]\n"])</script><script>self.__next_f.push([1,"d:I[3941,[],\"IconMark\"]\n7:null\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"title\",\"0\",{\"children\":\"AgentOS | OpenClaw Mission Control\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Human Control Layer for AI Agents and Companies | Built on OpenClaw.\"}],[\"$\",\"meta\",\"2\",{\"name\":\"application-name\",\"content\":\"AgentOS | Mission Control\"}],[\"$\",\"link\",\"3\",{\"rel\":\"manifest\",\"href\":\"/site.webmanifest\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"meta\",\"4\",{\"property\":\"og:title\",\"content\":\"AgentOS | OpenClaw Mission Control\"}],[\"$\",\"meta\",\"5\",{\"property\":\"og:description\",\"content\":\"Human Control Layer for AI Agents and Companies | Built on OpenClaw.\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:site_name\",\"content\":\"AgentOS | Mission Control\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:image\",\"content\":\"http://localhost:3000/readme/agentos1.webp\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:image:width\",\"content\":\"1536\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:image:height\",\"content\":\"1024\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:image:alt\",\"content\":\"AgentOS mission-control interface\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"12\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"13\",{\"name\":\"twitter:title\",\"content\":\"AgentOS | OpenClaw Mission Control\"}],[\"$\",\"meta\",\"14\",{\"name\":\"twitter:description\",\"content\":\"Human Control Layer for AI Agents and Companies | Built on OpenClaw.\"}],[\"$\",\"meta\",\"15\",{\"name\":\"twitter:image\",\"content\":\"http://localhost:3000/readme/agentos1.webp\"}],[\"$\",\"link\",\"16\",{\"rel\":\"shortcut icon\",\"href\":\"/favicon.ico\"}],[\"$\",\"link\",\"17\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"sizes\":\"any\"}],[\"$\",\"link\",\"18\",{\"rel\":\"icon\",\"href\":\"/favicon-16x16.png\",\"sizes\":\"16x16\",\"type\":\"image/png\"}],[\"$\",\"link\",\"19\",{\"rel\":\"icon\",\"href\":\"/favicon-32x32.png\",\"sizes\":\"32x32\",\"type\":\"image/png\"}],[\"$\",\"link\",\"20\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-touch-icon.png\",\"sizes\":\"180x180\",\"type\":\"image/png\"}],[\"$\",\"$Ld\",\"21\",{}]]\n"])</script></body></html>
|