workspai 0.56.0 → 0.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -8
- package/contracts/adopt-effects.v1.json +72 -0
- package/contracts/agent-customization-pack.v1.json +10 -0
- package/contracts/cli-runtime-command-inventory.v1.snapshot.json +81 -0
- package/contracts/doctor-project-evidence.v1.json +27 -0
- package/contracts/doctor-workspace-evidence.v1.json +29 -0
- package/contracts/extension-cli-compatibility.v1.json +6 -0
- package/contracts/published-contract-catalog.v1.json +30 -0
- package/contracts/runtime-command-surface.v1.json +45 -0
- package/contracts/workspace-intelligence/doctor-summary.v1.json +3 -1
- package/contracts/workspace-intelligence/goal-agent-handoff.v1.json +96 -0
- package/contracts/workspace-intelligence/goal-index.v1.json +45 -0
- package/contracts/workspace-intelligence/goal-lifecycle-result.v1.json +96 -0
- package/contracts/workspace-intelligence/goal-pack.v1.json +250 -0
- package/contracts/workspace-intelligence/goal-plan-result.v1.json +46 -0
- package/contracts/workspace-intelligence/workspace-repair-proposal.v1.json +1 -0
- package/contracts/workspace-intelligence-architecture.v1.json +20 -0
- package/dist/analyze-MAU36FTX.js +1 -0
- package/dist/{artifact-remediation-plan-BPLON5VX.js → artifact-remediation-plan-JRX4XZ7C.js} +1 -1
- package/dist/autopilot-release-TA2L7SCB.js +1 -0
- package/dist/capabilities-command-HE2FICLG.js +1 -0
- package/dist/chunk-42Q5E2YV.js +1 -0
- package/dist/{workspace-knowledge-graph-snapshot-WB62AVDK.js → chunk-4NN5QWOB.js} +1 -1
- package/dist/chunk-4YICCES6.js +8 -0
- package/dist/{chunk-HASVV34S.js → chunk-6TNSCVR4.js} +1 -1
- package/dist/{chunk-PKIRVQLG.js → chunk-7IRGSM25.js} +1 -1
- package/dist/{chunk-NHTLE3WN.js → chunk-7KXRA5ST.js} +1 -1
- package/dist/{chunk-5RL254O2.js → chunk-7WUT5ZSO.js} +1 -1
- package/dist/{chunk-ESWFBSYM.js → chunk-A3JCETSF.js} +1 -1
- package/dist/{chunk-KR7CIEQR.js → chunk-AA4PNQKR.js} +1 -1
- package/dist/{chunk-5ZA4JYOP.js → chunk-AUCHMXUZ.js} +1 -1
- package/dist/{chunk-2L4PSZQB.js → chunk-C4NYG57I.js} +1 -1
- package/dist/{chunk-QFCKHUEP.js → chunk-CFBAGPB4.js} +1 -1
- package/dist/{chunk-WLCBXCZV.js → chunk-CHMCKYJJ.js} +1 -1
- package/dist/chunk-CNWUIXF3.js +1 -0
- package/dist/chunk-EEMRRCGR.js +2 -0
- package/dist/{chunk-QTCZPS5I.js → chunk-FXIE2WVG.js} +1 -1
- package/dist/{chunk-YJTEMJFV.js → chunk-FY6OHOXR.js} +1 -1
- package/dist/{chunk-W5ZFXKSL.js → chunk-G4VMNWSU.js} +1 -1
- package/dist/{chunk-ADL3CK44.js → chunk-GRGUPSNP.js} +1 -1
- package/dist/{chunk-XH7PDHBF.js → chunk-GVS5OFUB.js} +1 -1
- package/dist/{chunk-E53BGUOW.js → chunk-H545P6LN.js} +1 -1
- package/dist/chunk-HH54C3XJ.js +1 -0
- package/dist/{chunk-XMTLKDPP.js → chunk-HI7ONEFI.js} +1 -1
- package/dist/chunk-HYY5PQCV.js +1 -0
- package/dist/chunk-I5PDN2P2.js +13 -0
- package/dist/{chunk-V5EYVQ63.js → chunk-II4ROT6X.js} +1 -1
- package/dist/{chunk-GBMCHFOV.js → chunk-LGJAAPNR.js} +1 -1
- package/dist/{chunk-UQEQ6CXU.js → chunk-M2BK3XTP.js} +1 -1
- package/dist/{chunk-7PNARN6S.js → chunk-MFJ6ZP7S.js} +1 -1
- package/dist/{chunk-64JUYYRC.js → chunk-N3DFX4BY.js} +1 -1
- package/dist/chunk-NQ5H4R2I.js +83 -0
- package/dist/chunk-PCXBPQO6.js +1 -0
- package/dist/chunk-QXW3SLEX.js +1 -0
- package/dist/{chunk-KS4FB5W7.js → chunk-RJDGC6AQ.js} +1 -1
- package/dist/{chunk-ZPA6ECBJ.js → chunk-RMDVRNU7.js} +1 -1
- package/dist/chunk-SM55RK3C.js +91 -0
- package/dist/{chunk-LYVDRRDO.js → chunk-T63WRURN.js} +1 -1
- package/dist/{chunk-WOTTSPSF.js → chunk-TMOKXYAQ.js} +1 -1
- package/dist/{chunk-6HCAGHCY.js → chunk-TTLVG5AR.js} +1 -1
- package/dist/{chunk-5BGPGNRQ.js → chunk-VAWV3UKV.js} +1 -1
- package/dist/chunk-VIFTO53Y.js +1 -0
- package/dist/chunk-WP3CXMVA.js +2 -0
- package/dist/{chunk-IZLEMTES.js → chunk-WSDVFLHT.js} +1 -1
- package/dist/{chunk-SV2SP22H.js → chunk-XC26FNRL.js} +3 -3
- package/dist/chunk-YMY6EFX4.js +1 -0
- package/dist/{chunk-YM77FQB3.js → chunk-YYCPRYP7.js} +1 -1
- package/dist/{chunk-QAF26ZQX.js → chunk-ZDYGO3T7.js} +17 -17
- package/dist/{create-DLUWG46F.js → create-QIN56Y4M.js} +1 -1
- package/dist/{doctor-IZ4YOCYE.js → doctor-RP4Q2CKJ.js} +1 -1
- package/dist/goal-command-contract-CHE7U6YY.js +1 -0
- package/dist/goal-lifecycle-YTBU3ICP.js +1 -0
- package/dist/goal-pack-MYYH7K43.js +1 -0
- package/dist/index.d.ts +21 -2
- package/dist/index.js +168 -166
- package/dist/{pipeline-IBQYDLFF.js → pipeline-77NUVYQD.js} +1 -1
- package/dist/{project-intelligence-lens-SIU7IXKG.js → project-intelligence-lens-AM2B2PXU.js} +1 -1
- package/dist/project-test-coverage-MUSS7Z7V.js +1 -0
- package/dist/{verified-goal-M4GPOXNL.js → verified-goal-ZSIZYNVO.js} +1 -1
- package/dist/{workspace-3AAOUELG.js → workspace-LFESVKE7.js} +1 -1
- package/dist/{workspace-agent-sync-QGYLY7HH.js → workspace-agent-sync-JMRX6J2Y.js} +1 -1
- package/dist/{workspace-archive-BA3ONVXX.js → workspace-archive-MFHCFCDO.js} +1 -1
- package/dist/{workspace-context-JCLPRYNC.js → workspace-context-TBKRMVMT.js} +1 -1
- package/dist/{workspace-contract-IUUPBQXU.js → workspace-contract-KKVC2DUQ.js} +1 -1
- package/dist/workspace-explain-RGGZL5IW.js +1 -0
- package/dist/workspace-explain-contract-4ZZ6CJ44.js +1 -0
- package/dist/{workspace-feedback-PCZKXG5R.js → workspace-feedback-O6J3RQML.js} +1 -1
- package/dist/{workspace-foundation-7IGMO4CW.js → workspace-foundation-JQWT7YGC.js} +1 -1
- package/dist/{workspace-graph-stream-5YMLJXAJ.js → workspace-graph-stream-V5WOXP4B.js} +1 -1
- package/dist/workspace-graph-token-efficiency-TF23UYEF.js +1 -0
- package/dist/{workspace-history-CHJOABME.js → workspace-history-TOCRMJUJ.js} +1 -1
- package/dist/{workspace-intelligence-XHSUFTAT.js → workspace-intelligence-SDBIRKMK.js} +1 -1
- package/dist/{workspace-intelligence-evaluation-YMY3C5AW.js → workspace-intelligence-evaluation-E4UMWDAZ.js} +1 -1
- package/dist/{workspace-intelligence-runner-EN5V4KSC.js → workspace-intelligence-runner-DIMNL6CJ.js} +1 -1
- package/dist/{workspace-intelligence-runtime-registry-NCVHKCMP.js → workspace-intelligence-runtime-registry-YGWB2RRS.js} +1 -1
- package/dist/{workspace-knowledge-graph-VWQTIEYK.js → workspace-knowledge-graph-MUW6UAGI.js} +1 -1
- package/dist/{workspace-knowledge-graph-query-TXA3KVUV.js → workspace-knowledge-graph-query-6DAOXGGT.js} +1 -1
- package/dist/workspace-knowledge-graph-snapshot-7IU2QAXI.js +1 -0
- package/dist/{workspace-mcp-serve-NCAGGWQS.js → workspace-mcp-serve-2SWLIH4I.js} +1 -1
- package/dist/{workspace-model-NXFIKX26.js → workspace-model-VPFCKTYQ.js} +1 -1
- package/dist/{workspace-onboarding-OP22NHQ4.js → workspace-onboarding-GHI6UTQJ.js} +1 -1
- package/dist/{workspace-readme-IVJXSIBS.js → workspace-readme-RASXBZRQ.js} +1 -1
- package/dist/{workspace-registry-summary-A5VDPRHU.js → workspace-registry-summary-7QT7YMIU.js} +1 -1
- package/dist/workspace-repair-engine-AZTJIFCY.js +3 -0
- package/dist/workspace-run-VMZY6LIF.js +1 -0
- package/dist/{workspace-verify-TUVLFPPN.js → workspace-verify-RYCQZYYB.js} +1 -1
- package/dist/{workspace-watch-2ZNOYSUQ.js → workspace-watch-U3YGN3GG.js} +1 -1
- package/docs/From Code to Shared Understanding-B.png +0 -0
- package/docs/From Code to Shared Understanding.png +0 -0
- package/docs/README.md +2 -0
- package/docs/README_CONTENT_CONTRACT.md +25 -12
- package/docs/ci-workflows.md +9 -1
- package/docs/commands-reference.md +13 -1
- package/docs/contracts/ARTIFACT_CATALOG.md +11 -0
- package/docs/contracts/COMMAND_OWNERSHIP_MATRIX.md +1 -0
- package/docs/contracts/README.md +16 -12
- package/docs/doctor-command.md +35 -11
- package/docs/from-code-to-shared-understanding.md +22 -17
- package/docs/goal-packs.md +174 -0
- package/docs/real-world-qualification.md +92 -0
- package/docs/workspace-knowledge-graph.md +24 -3
- package/docs/workspace-operations.md +14 -2
- package/docs/workspace-run.md +16 -4
- package/package.json +5 -1
- package/dist/analyze-HJ774J3E.js +0 -1
- package/dist/autopilot-release-CH57CGET.js +0 -1
- package/dist/capabilities-command-WEOGFCWF.js +0 -1
- package/dist/chunk-3U4VLIGW.js +0 -1
- package/dist/chunk-5EPPPMAS.js +0 -1
- package/dist/chunk-664GXRLD.js +0 -1
- package/dist/chunk-7Y3KVZJF.js +0 -8
- package/dist/chunk-BDN32Y2N.js +0 -81
- package/dist/chunk-D4RST2HE.js +0 -1
- package/dist/chunk-DIZSHNZ5.js +0 -2
- package/dist/chunk-DOIZANFA.js +0 -2
- package/dist/chunk-OX53L237.js +0 -13
- package/dist/chunk-QRWWYL52.js +0 -88
- package/dist/chunk-VGJVIHHR.js +0 -1
- package/dist/project-test-coverage-FRMVYTFB.js +0 -1
- package/dist/workspace-explain-CZGBVDE6.js +0 -1
- package/dist/workspace-explain-contract-KVQO57RC.js +0 -1
- package/dist/workspace-graph-token-efficiency-HK4KNWWP.js +0 -1
- package/dist/workspace-repair-engine-N4KXNSVL.js +0 -3
- package/dist/workspace-run-PXKC3ELS.js +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {b as b$3,a}from'./chunk-THIOE2PB.js';import {b as b$1,f as f$
|
|
1
|
+
import {b as b$3,a}from'./chunk-THIOE2PB.js';import {b as b$1,f as f$2,j,k,h as h$3,i as i$2,l,m as m$1,n,o,p as p$1,q,r,t,v as v$1,x,s,u as u$1,w,y,z,A,B,C as C$1,D,E,F,G,H as H$1,a as a$2,I}from'./chunk-N3DFX4BY.js';import {b,c,d as d$1}from'./chunk-TMOKXYAQ.js';import {b as b$2}from'./chunk-M2BK3XTP.js';import {d as d$2}from'./chunk-GVS5OFUB.js';import {h,g as g$1}from'./chunk-NQ5H4R2I.js';import {p,k as k$1,f as f$3}from'./chunk-AUCHMXUZ.js';import {m}from'./chunk-EEMRRCGR.js';import {d}from'./chunk-GRGUPSNP.js';import {a as a$1,b as b$4}from'./chunk-T63WRURN.js';import {f,e,i,h as h$4}from'./chunk-HH54C3XJ.js';import {f as f$1,g,h as h$1}from'./chunk-MOSXTVPU.js';import i$1 from'path';import h$2 from'fs-extra';var ee=["Scope","Evidence","Diagnosis","Fix Plan","Run","Verify","Assumptions"];var ht="workspace-operational-skill.v1";function At(e){if(typeof e!="string")return null;let t=e.trim();return !t||t.includes("/")||t.includes("..")?null:t}function et(e){let t=At(e.skillId);if(!t)throw new Error(`Invalid skill id: ${e.skillId}`);return {schemaVersion:ht,skillId:t,canonicalPath:H$1(t),title:e.title,triggers:[...e.triggers].sort((r,n)=>r.localeCompare(n)),requiredReports:[...e.requiredReports].sort((r,n)=>r.localeCompare(n)),scopedProjects:[...e.scopedProjects??[]].sort((r,n)=>r.localeCompare(n)),verificationCommands:[...e.verificationCommands],answerContractSections:[...ee],...e.promptStem?{promptStem:e.promptStem}:{},markdown:e.markdown}}var wt=f.skillsIndex;function tt(e){let t=[...e.skills].sort((n,c)=>n.skillId.localeCompare(c.skillId)),r=e.inputsHash??f$3({skillIds:t.map(n=>n.skillId),paths:t.map(n=>n.canonicalPath)});return {schemaVersion:wt,generatedAt:e.generatedAt,inputsHash:r,skills:t.map(n=>({skillId:n.skillId,path:n.canonicalPath,schemaVersion:n.schemaVersion,title:n.title}))}}var rt=[e.agentIndex,b,d$2],Pt=[{skillId:"workspai-diagnose-api-failure",title:"Diagnose API failure",triggers:["api failure","500 error","integration test failed","service unreachable"],objective:"Investigate a failing API or service using Workspai evidence before editing application code.",steps:[`Read \`${e.agentIndex}\` and identify fail/warn reports for the scoped project.`,`Read \`${e.doctor}\`, \`doctor-project-last-run.json\`, and project-scoped run evidence if present.`,"If a fix was requested, read `artifact-remediation-plan-last-run.json` for cross-artifact next steps, then `doctor-remediation-plan-last-run.json` for Doctor-specific file edits.","Map the failure to workspace vs project scope; cite exit codes and blocker messages.","Propose the smallest safe fix (config, env, dependency) with explicit verification commands."]},{skillId:"workspai-release-readiness",title:"Release readiness",triggers:["release","ship","production","readiness gate"],objective:"Assess whether this workspace is release-ready using governed Workspai gates.",steps:[`Read \`${e.readiness}\` and \`pipeline-last-run.json\`.`,`Read \`${e.verify}\` for verdict and blocking reasons.`,`Read \`${i.artifactRemediationPlan}\` when a Studio or agent repair path is needed.`,"List blocking gates first; never claim ready without cited report fields.","Provide one safe next command and a verification checklist."]},{skillId:"workspai-safe-schema-migration",title:"Safe schema migration",triggers:["migration","schema change","database migration","db migrate"],objective:"Plan and verify a schema migration with blast-radius awareness.",steps:["Identify affected projects from workspace model and dependency graph.","Run or review impact/verify evidence for transitive dependents.","Require project-scoped test/build commands before promoting the migration.","Document rollback and verification signals."]},{skillId:"workspai-dependency-upgrade",title:"Dependency upgrade",triggers:["upgrade dependency","bump package","security advisory","outdated deps"],objective:"Upgrade dependencies with graph-aware verification.",steps:["Scope the upgrade to the owning project from workspace model.","Check transitive dependents via workspace graph / impact reports.","Prefer workspace run test/build for affected projects.","Re-run `workspace verify` after evidence refresh."]},{skillId:"workspai-rename-contract",title:"Rename contract safely",triggers:["rename contract","rename event","breaking api","contract change"],objective:"Rename or change a shared contract with consumer awareness.",steps:[`Read \`${i.workspaceContract}\` for publishes/consumes/owns edges.`,"List all consumer projects before proposing renames.","Update contract file and regenerate workspace model.","Verify contract gate and integration tests for consumers."]}];function te(e){return `npx workspai ${e}`.trim()}function Rt(e){let t=[`# ${e.template.title}`,"",`> Workspace: **${e.workspaceName}** \xB7 Skill: \`${e.template.skillId}\``,"","## Objective","",e.template.objective,"","## Triggers","",...e.template.triggers.map(r=>`- ${r}`),"","## Required evidence (read first)","",...rt.map(r=>`- \`${r}\``),"","## Procedure","",...e.template.steps.map((r,n)=>`${n+1}. ${r}`),""];if(e.scopedProjects.length>0&&t.push("## Scoped projects","",...e.scopedProjects.map(r=>`- ${r}`),""),e.contractSummary&&t.push("## Contract context","",e.contractSummary,""),e.verificationCommands.length>0){t.push("## Verification commands (this workspace)","");for(let r of e.verificationCommands)t.push(`- \`${r}\``);t.push("");}return t.push("## Answer contract","","Return: Scope, Evidence, Diagnosis, Fix Plan, Run, Verify, Assumptions.","","## Refresh stale evidence","","```bash",te("workspace agent-sync --write --refresh-context"),"```",""),t.join(`
|
|
2
2
|
`)}function St(e){return e?.safeCommands?.length?e.safeCommands.slice(0,8).map(t=>t.display):[te("workspace verify --json"),te("doctor workspace --json")]}function Ct(e){return e?.projects?.length?e.projects.slice(0,12).map(r=>{let n=r.contracts?.owns?.join(", ")||"none",c=r.contracts?.publishes?.join(", ")||"none",l=r.contracts?.consumes?.join(", ")||"none";return `- **${r.slug}**: owns \`${n}\`; publishes \`${c}\`; consumes \`${l}\``}).join(`
|
|
3
|
-
`):void 0}function nt(e){let t=e.model.workspace.name,r=e.model.projects.map(l=>l.name).sort(),n=St(e.context??null),c=Ct(e.contract??null);return Pt.map(l=>{let p=Rt({template:l,workspaceName:t,scopedProjects:r,verificationCommands:n,contractSummary:c});return et({skillId:l.skillId,title:l.title,triggers:l.triggers,requiredReports:[...rt],scopedProjects:r,verificationCommands:n,promptStem:I[l.skillId],markdown:p})})}async function at(e){let t=i$1.resolve(e.workspacePath),r=[],n=f$
|
|
3
|
+
`):void 0}function nt(e){let t=e.model.workspace.name,r=e.model.projects.map(l=>l.name).sort(),n=St(e.context??null),c=Ct(e.contract??null);return Pt.map(l=>{let p=Rt({template:l,workspaceName:t,scopedProjects:r,verificationCommands:n,contractSummary:c});return et({skillId:l.skillId,title:l.title,triggers:l.triggers,requiredReports:[...rt],scopedProjects:r,verificationCommands:n,promptStem:I[l.skillId],markdown:p})})}async function at(e){let t=i$1.resolve(e.workspacePath),r=[],n=f$3({skills:e.skills.map(l=>({id:l.skillId,path:l.canonicalPath,hash:f$3({markdown:l.markdown})}))}),c=tt({generatedAt:e.generatedAt,skills:e.skills,inputsHash:n});if(e.write){for(let p of e.skills){let o=i$1.join(t,p.canonicalPath);await h$2.ensureDir(i$1.dirname(o)),await h$2.writeFile(o,p.markdown,"utf8"),r.push(p.canonicalPath);}let l=i$1.join(t,b$1);await h$2.ensureDir(i$1.dirname(l)),await h$2.writeJson(l,c,{spaces:2}),r.push(b$1);}return {skills:e.skills,index:c,writtenPaths:r}}function ot(e){return ["## Operational skills (canonical)","","Read workspace-native playbooks from `.workspai/skills/` before generic repo scans. Legacy `.rapidkit/skills/` playbooks are read only when already present from older workspaces:","",...e.skills.map(r=>`- \`${r.path}\` \u2014 ${r.title} (\`${r.skillId}\`)`),"","Regenerate:","","```bash",te("workspace agent-sync --write --refresh-context"),"```",""].join(`
|
|
4
4
|
`)}var yt={"workspai-diagnose-api-failure":p$1,"workspai-release-readiness":t},Ie="## Workspace verification (hydrated)";function Et(e){let t=[Ie,"","Verification commands for this workspace:","",...e.verificationCommands.length?e.verificationCommands.map(r=>`- \`${r}\``):["- `npx workspai workspace verify --json`"]];return e.scopedProjects.length>0&&t.push("","Scoped projects:","",...e.scopedProjects.map(r=>`- ${r}`)),t.push(""),t.join(`
|
|
5
|
-
`)}async function it(e){let t=i$1.resolve(e.workspacePath),r=[];for(let n of e.skills){let c=yt[n.skillId];if(!c)continue;let l=i$1.join(t,c);if(!await
|
|
5
|
+
`)}async function it(e){let t=i$1.resolve(e.workspacePath),r=[];for(let n of e.skills){let c=yt[n.skillId];if(!c)continue;let l=i$1.join(t,c);if(!await h$2.pathExists(l))continue;let p=await h$2.readFile(l,"utf8"),o=Et(n),P=p.includes(Ie)?p.replace(new RegExp(`${Ie}[\\s\\S]*$`),o.trimEnd()):`${p.trimEnd()}
|
|
6
6
|
|
|
7
|
-
${o}`;e.write&&await
|
|
8
|
-
`,"utf8"),r.push(c);}return r}var xt="workspai-agent-customization-pack-capabilities.v1";function st(){return {schemaVersion:xt,presets:{minimal:{meaning:"Generate the portable grounding index, AGENTS.md, and provider-specific lightweight instructions.",requiredOutputs:[e.agentIndex,e.agentCustomizationPack,e.agents]},enterprise:{meaning:"Generate the full VS Code-native pack: instructions, prompts, skills, custom agents, and validation metadata.",requiredOutputs:[e.agentIndex,e.agentCustomizationPack,e.agents,l,p$1,B,".github/agents/workspai-advisor.agent.md",D,b$1]}},targets:{all:{meaning:"Generate every supported customization surface.",outputFamilies:["portable","vscode","copilot","cursor","claude"]},vscode:{meaning:"Generate VS Code-native customizations for Copilot Chat and agent workflows.",outputFamilies:["instructions","prompts","skills","agents","hooks"]},agents:{meaning:"Generate portable AGENTS.md grounding for any agent.",outputFamilies:["portable"]},copilot:{meaning:"Generate GitHub Copilot instructions, prompts, and skills.",outputFamilies:["instructions","prompts","skills"]},cursor:{meaning:"Generate Cursor rules.",outputFamilies:["rules"]},claude:{meaning:"Generate Claude Code grounding files.",outputFamilies:["rules","portable"]},codex:{meaning:"Use AGENTS.md and the report index as the Codex grounding layer.",outputFamilies:["portable"]},orca:{meaning:"Use AGENTS.md and the report index as the Orca/Grok grounding layer.",outputFamilies:["portable"]}},standardAnswerContract:[...ee],requiredReports:K.map(e=>({path:e.relativePath,label:e.label,required:e.required})),strictRules:["Required reports must exist.","Generated report paths must stay inside the workspace root.","Generated customization text must be English-only.","Agent answers must not claim pass, ready, or healthy without cited evidence.","Commands must distinguish display guidance from execution requests.","Agent hook files must be advisory and disabled by default unless the user explicitly enables them.","MCP design artifacts must stay read-mostly until write tools have explicit approval boundaries."],outputKinds:["report","grounding","instruction","prompt","skill","skill-resource","operational-skill","skills-index","explain-report","agent","rule","hook","mcp-design"],pathLayers:{l1CanonicalRoots:[".workspai/reports/",`${a$2}/`],l2PrefixedMirrorRoots:[".github/",".cursor/",".claude/"],l3SharedIndustryFiles:["AGENTS.md",".github/copilot-instructions.md","CLAUDE.md"]}}}var It=f.agentIndex,Ot=f.agentCustomizationPack,H=e.agentIndex,M=e.agentCustomizationPack;var K=[{relativePath:b,label:"Agent context pack",required:true},{relativePath:b$1,label:"Operational skills index",required:true},{relativePath:e.model,label:"Workspace model",required:false},{relativePath:e.knowledgeGraph,label:"Workspace knowledge graph",required:false},{relativePath:e.evaluationLastRun,label:"Workspace Intelligence evaluation",required:false},{relativePath:e.doctor,label:"Workspace doctor",required:false},{relativePath:i.doctorProject,label:"Project doctor",required:false},{relativePath:i.doctorRemediationPlan,label:"Doctor remediation plan",required:false},{relativePath:i.artifactRemediationPlan,label:"Artifact remediation plan",required:false},{relativePath:i.doctorFixResult,label:"Doctor fix result",required:false},{relativePath:e.analyze,label:"Workspace analyze",required:false},{relativePath:i.pipelineLastRun,label:"Governance pipeline",required:false},{relativePath:e.readiness,label:"Release readiness",required:false},{relativePath:e.impact,label:"Workspace impact",required:false},{relativePath:e.verify,label:"Workspace verify",required:false},{relativePath:e.snapshot,label:"Workspace model snapshot",required:false},{relativePath:e.diff,label:"Workspace model diff",required:false},{relativePath:e.explain,label:"Workspace explain",required:false},{relativePath:e.contractVerify,label:"Workspace contract verify",required:false},{relativePath:e.history,label:"Workspace intelligence history",required:false}];function bt(){let e=K.map(n=>n.relativePath),r=b$2().consumers.agents.canonicalReadOrder.filter(n=>n!==H&&e.includes(n));return [...new Set([...r,...e])]}function P(e){return `npx workspai ${e}`.trim()}function Te(e){return e&&typeof e=="object"?e:null}function Oe(e,t=12){return Array.isArray(e)?e.filter(r=>typeof r=="string"&&r.trim().length>0).slice(0,t):[]}function _t(e){let t=Oe(e.blockers,12);if(t.length>0)return t;let r=Oe(e.blockingReasons,12);if(r.length>0)return r;let n=Te(e.summary);return n&&Array.isArray(n.blockingReasons)?Oe(n.blockingReasons,12):[]}function Tt(e){let t=[...new Set(e.map(r=>r.trim()).filter(Boolean))];return t.filter(r=>{let n=r.toLowerCase();return !t.some(c=>{if(c===r||!c.includes(":"))return false;let l=c.toLowerCase();return l.length>n.length&&l.endsWith(n)})})}function vt(e){for(let t of ["generatedAt","updatedAt","timestamp"]){let r=e[t];if(typeof r=="string"&&r.trim())return r.trim()}if(Array.isArray(e.entries)){let t=e.entries.map(r=>Te(r)?.generatedAt).filter(r=>typeof r=="string"&&r.trim().length>0).map(r=>r.trim()).filter(r=>Number.isFinite(Date.parse(r)));if(t.length>0)return t.reduce((r,n)=>Date.parse(n)>Date.parse(r)?n:r)}}function Wt(e,t,r){if(!e)return true;let n=Date.parse(e);return Number.isFinite(n)?r.getTime()-n>t*60*60*1e3:true}function jt(e$1,t,r){return e$1.path===e.snapshot?false:Wt(e$1.generatedAt,t,r)}function Lt(e){let t=e&&e.length>0?e:["all"];return t.includes("all")?new Set(["all","vscode","agents","copilot","cursor","claude","codex","orca"]):new Set(t)}function C(e,t){return e.has("all")||e.has(t)}function Nt(e){return C(e,"copilot")||C(e,"vscode")}function Gt(e){return e??"enterprise"}function Dt(e){return e===b$1?"skills-index":e.includes("workspace-explain-last-run.json")?"explain-report":(e.startsWith(`${a$2}/`)||e.startsWith(".rapidkit/skills/"))&&e.endsWith(".md")?"operational-skill":e.includes("hooks")||e===F||e===G?"hook":e.includes("mcp")||e===D||e===E?"mcp-design":e.endsWith(".json")?"report":e.includes("/instructions/")||e.endsWith("copilot-instructions.md")?"instruction":e.includes("/prompts/")?"prompt":e.includes("/skills/")&&e.endsWith("/SKILL.md")?"skill":e.includes("/skills/")?"skill-resource":e.includes("/agents/")?"agent":e.includes("/rules/")||e.endsWith(".mdc")?"rule":"grounding"}function $t(e){return e.startsWith(".github/")?["vscode","copilot"]:e.startsWith(".cursor/")?["cursor"]:e.startsWith(".claude/")||e==="CLAUDE.md"?["claude"]:e==="AGENTS.md"||e.startsWith(".rapidkit/")?["agents","codex","orca","vscode"]:e.startsWith(".vscode/")?["vscode"]:["agents"]}function Kt(e,t){return st().presets[t].requiredOutputs.includes(e)}async function Mt(e,t){if(t)return t;let r=await d(e,k$1)??i$1.join(e,k$1);if(await f$2.pathExists(r))try{let n=await f$2.readJson(r);return b$4(k$1,n,r),n}catch{}return p({workspacePath:e,includeEvidence:true})}function Ht(e){return e.length>0&&!i$1.isAbsolute(e)&&!e.split(/[\\/]+/).includes("..")}function qt(e){return Object.fromEntries(["all","vscode","agents","copilot","cursor","claude","codex","orca"].map(r=>[r,{enabled:e.targets.includes("all")||e.targets.includes(r),outputs:e.outputs.filter(n=>n.targets.includes(r)).map(n=>n.path).sort()}]))}async function Vt(e,t){try{if(!await f$2.pathExists(e))return {payload:null,exists:false,validity:"missing"};let r=await f$2.readJson(e),n=Te(r);return n?a$1(t)?(b$4(t,n,e),{payload:n,exists:true,validity:"valid"}):{payload:n,exists:true,validity:"uncontracted"}:{payload:null,exists:true,validity:"invalid",validationError:"Artifact root must be a JSON object"}}catch(r){return {payload:null,exists:true,validity:"invalid",validationError:r instanceof Error?r.message:String(r)}}}async function ct(e){let t=e.now??new Date,r=e.staleAfterHours??24,n=[],c=[];for(let o of K){let w=await d(e.workspacePath,o.relativePath)??i$1.join(e.workspacePath,o.relativePath),h=await Vt(w,o.relativePath),g=h.payload;h.validity==="invalid"?c.push(`Invalid evidence contract: ${o.relativePath}`):g&&c.push(..._t(g)),n.push({path:o.relativePath,label:o.label,required:o.required,exists:h.exists,validity:h.validity,validationError:h.validationError,generatedAt:g?vt(g):void 0,commandId:typeof g?.commandId=="string"?g.commandId:void 0,exitCode:typeof g?.exitCode=="number"?g.exitCode:void 0});}let l=Tt(c).slice(0,16),p=b$2();return {schemaVersion:It,generatedAt:t.toISOString(),workspaceRoot:e.workspacePath,intelligenceChain:{schemaVersion:p.schemaVersion,contractPath:p.contractPath,currentStep:"agent-sync"},readOrder:bt(),blockers:l,staleAfterHours:r,reports:n,refreshCommand:P("workspace agent-sync --write --refresh-context")}}function lt(e$1){let t=["# Workspai agent grounding","","Cross-tool instructions for Copilot, Cursor, Claude Code, Codex, Grok, and other agents.","","## Read order (mandatory before workspace diagnosis)","",`1. \`${e.agentIndex}\` \u2014 latest blockers, timestamps, and report paths`,`2. \`${e.agentContext}\` \u2014 read only task-relevant context`,"3. Read only the task-relevant evidence artifacts listed in the index.","4. Use `workspace graph search <query> --limit 12 --json` or MCP `searchWorkspaceGraph` before loading the full graph.","","Do **not** full-repo scan or inject the complete graph when a bounded query can answer the task.","","## Regenerate intelligence","","```bash",P("workspace agent-sync --write --refresh-context"),P("workspace context --for-agent --json --write"),P("pipeline --json --write"),"```",""];if(e$1.index.blockers.length>0){t.push("## Current blockers","");for(let r of e$1.index.blockers.slice(0,12))t.push(`- ${r}`);t.push("");}if(e$1.context?.safeCommands?.length){t.push("## Safe commands (prefer these)","");for(let r of e$1.context.safeCommands.slice(0,10))t.push(`- \`${r.display}\` \u2014 ${r.description}`);t.push("");}return t.push("## Rules","","- Treat `.workspai/reports/*` as the source of truth for health, gates, and release posture.","- Prefer deterministic Workspai CLI commands over heuristic framework guesses.","- If evidence is missing or stale, run the refresh commands above before proposing fixes.","- Keep project-scoped advice aligned with the active project named in the context pack.",""),t.join(`
|
|
7
|
+
${o}`;e.write&&await h$2.writeFile(l,`${P.trimEnd()}
|
|
8
|
+
`,"utf8"),r.push(c);}return r}var xt="workspai-agent-customization-pack-capabilities.v1";function st(){return {schemaVersion:xt,presets:{minimal:{meaning:"Generate the portable grounding index, AGENTS.md, and provider-specific lightweight instructions.",requiredOutputs:[e.agentIndex,e.agentCustomizationPack,e.agents]},enterprise:{meaning:"Generate the full VS Code-native pack: instructions, prompts, skills, custom agents, and validation metadata.",requiredOutputs:[e.agentIndex,e.agentCustomizationPack,e.agents,l,p$1,B,".github/agents/workspai-advisor.agent.md",D,b$1]}},targets:{all:{meaning:"Generate every supported customization surface.",outputFamilies:["portable","vscode","copilot","cursor","claude"]},vscode:{meaning:"Generate VS Code-native customizations for Copilot Chat and agent workflows.",outputFamilies:["instructions","prompts","skills","agents","hooks"]},agents:{meaning:"Generate portable AGENTS.md grounding for any agent.",outputFamilies:["portable"]},copilot:{meaning:"Generate GitHub Copilot instructions, prompts, and skills.",outputFamilies:["instructions","prompts","skills"]},cursor:{meaning:"Generate Cursor rules.",outputFamilies:["rules"]},claude:{meaning:"Generate Claude Code grounding files.",outputFamilies:["rules","portable"]},codex:{meaning:"Use AGENTS.md and the report index as the Codex grounding layer.",outputFamilies:["portable"]},orca:{meaning:"Use AGENTS.md and the report index as the Orca/Grok grounding layer.",outputFamilies:["portable"]}},standardAnswerContract:[...ee],requiredReports:K.map(e=>({path:e.relativePath,label:e.label,required:e.required})),strictRules:["Required reports must exist.","Generated report paths must stay inside the workspace root.","Generated customization text must be English-only.","Agent answers must not claim pass, ready, or healthy without cited evidence.","Commands must distinguish display guidance from execution requests.","Agent hook files must be advisory and disabled by default unless the user explicitly enables them.","MCP design artifacts must stay read-mostly until write tools have explicit approval boundaries."],outputKinds:["report","grounding","instruction","prompt","skill","skill-resource","operational-skill","skills-index","explain-report","agent","rule","hook","mcp-design"],pathLayers:{l1CanonicalRoots:[".workspai/reports/",`${a$2}/`],l2PrefixedMirrorRoots:[".github/",".cursor/",".claude/"],l3SharedIndustryFiles:["AGENTS.md",".github/copilot-instructions.md","CLAUDE.md"]}}}var It=f.agentIndex,Ot=f.agentCustomizationPack,H=e.agentIndex,M=e.agentCustomizationPack;var K=[{relativePath:i.goalIndex,label:"Active Goal Pack index",required:false},{relativePath:i.goalPackLastRun,label:"Latest governed Goal Pack",required:false},{relativePath:b,label:"Agent context pack",required:true},{relativePath:b$1,label:"Operational skills index",required:true},{relativePath:e.model,label:"Workspace model",required:false},{relativePath:e.knowledgeGraph,label:"Workspace knowledge graph",required:false},{relativePath:e.evaluationLastRun,label:"Workspace Intelligence evaluation",required:false},{relativePath:e.doctor,label:"Workspace doctor",required:false},{relativePath:i.doctorProject,label:"Project doctor",required:false},{relativePath:i.doctorRemediationPlan,label:"Doctor remediation plan",required:false},{relativePath:i.artifactRemediationPlan,label:"Artifact remediation plan",required:false},{relativePath:i.doctorFixResult,label:"Doctor fix result",required:false},{relativePath:e.analyze,label:"Workspace analyze",required:false},{relativePath:i.pipelineLastRun,label:"Governance pipeline",required:false},{relativePath:e.readiness,label:"Release readiness",required:false},{relativePath:e.impact,label:"Workspace impact",required:false},{relativePath:e.verify,label:"Workspace verify",required:false},{relativePath:e.snapshot,label:"Workspace model snapshot",required:false},{relativePath:e.diff,label:"Workspace model diff",required:false},{relativePath:e.explain,label:"Workspace explain",required:false},{relativePath:e.contractVerify,label:"Workspace contract verify",required:false},{relativePath:e.history,label:"Workspace intelligence history",required:false}];function bt(){let e=K.map(n=>n.relativePath),r=b$2().consumers.agents.canonicalReadOrder.filter(n=>n!==H&&e.includes(n));return [...new Set([i.goalIndex,i.goalPackLastRun,...r,...e])]}function R(e){return `npx workspai ${e}`.trim()}function Te(e){return e&&typeof e=="object"?e:null}function Oe(e,t=12){return Array.isArray(e)?e.filter(r=>typeof r=="string"&&r.trim().length>0).slice(0,t):[]}function _t(e){let t=Oe(e.blockers,12);if(t.length>0)return t;let r=Oe(e.blockingReasons,12);if(r.length>0)return r;let n=Te(e.summary);return n&&Array.isArray(n.blockingReasons)?Oe(n.blockingReasons,12):[]}function Tt(e){let t=[...new Set(e.map(r=>r.trim()).filter(Boolean))];return t.filter(r=>{let n=r.toLowerCase();return !t.some(c=>{if(c===r||!c.includes(":"))return false;let l=c.toLowerCase();return l.length>n.length&&l.endsWith(n)})})}function vt(e){for(let t of ["generatedAt","updatedAt","timestamp"]){let r=e[t];if(typeof r=="string"&&r.trim())return r.trim()}if(Array.isArray(e.entries)){let t=e.entries.map(r=>Te(r)?.generatedAt).filter(r=>typeof r=="string"&&r.trim().length>0).map(r=>r.trim()).filter(r=>Number.isFinite(Date.parse(r)));if(t.length>0)return t.reduce((r,n)=>Date.parse(n)>Date.parse(r)?n:r)}}function Wt(e,t,r){if(!e)return true;let n=Date.parse(e);return Number.isFinite(n)?r.getTime()-n>t*60*60*1e3:true}function jt(e$1,t,r){return e$1.path===e.snapshot?false:Wt(e$1.generatedAt,t,r)}function Lt(e){let t=e&&e.length>0?e:["all"];return t.includes("all")?new Set(["all","vscode","agents","copilot","cursor","claude","codex","orca"]):new Set(t)}function C(e,t){return e.has("all")||e.has(t)}function Nt(e){return C(e,"copilot")||C(e,"vscode")}function Gt(e){return e??"enterprise"}function Dt(e){return e===b$1?"skills-index":e.includes("workspace-explain-last-run.json")?"explain-report":(e.startsWith(`${a$2}/`)||e.startsWith(".rapidkit/skills/"))&&e.endsWith(".md")?"operational-skill":e.includes("hooks")||e===F||e===G?"hook":e.includes("mcp")||e===D||e===E?"mcp-design":e.endsWith(".json")?"report":e.includes("/instructions/")||e.endsWith("copilot-instructions.md")?"instruction":e.includes("/prompts/")?"prompt":e.includes("/skills/")&&e.endsWith("/SKILL.md")?"skill":e.includes("/skills/")?"skill-resource":e.includes("/agents/")?"agent":e.includes("/rules/")||e.endsWith(".mdc")?"rule":"grounding"}function $t(e){return e.startsWith(".github/")?["vscode","copilot"]:e.startsWith(".cursor/")?["cursor"]:e.startsWith(".claude/")||e==="CLAUDE.md"?["claude"]:e==="AGENTS.md"||e.startsWith(".rapidkit/")?["agents","codex","orca","vscode"]:e.startsWith(".vscode/")?["vscode"]:["agents"]}function Kt(e,t){return st().presets[t].requiredOutputs.includes(e)}async function Mt(e,t){if(t)return t;let r=await d(e,k$1)??i$1.join(e,k$1);if(await h$2.pathExists(r))try{let n=await h$2.readJson(r);return b$4(k$1,n,r),n}catch{}return p({workspacePath:e,includeEvidence:true})}function Ht(e){return e.length>0&&!i$1.isAbsolute(e)&&!e.split(/[\\/]+/).includes("..")}function qt(e){return Object.fromEntries(["all","vscode","agents","copilot","cursor","claude","codex","orca"].map(r=>[r,{enabled:e.targets.includes("all")||e.targets.includes(r),outputs:e.outputs.filter(n=>n.targets.includes(r)).map(n=>n.path).sort()}]))}async function Vt(e,t){try{if(!await h$2.pathExists(e))return {payload:null,exists:false,validity:"missing"};let r=await h$2.readJson(e),n=Te(r);return n?a$1(t)?(b$4(t,n,e),{payload:n,exists:true,validity:"valid"}):{payload:n,exists:true,validity:"uncontracted"}:{payload:null,exists:true,validity:"invalid",validationError:"Artifact root must be a JSON object"}}catch(r){return {payload:null,exists:true,validity:"invalid",validationError:r instanceof Error?r.message:String(r)}}}async function ct(e){let t=e.now??new Date,r=e.staleAfterHours??24,n=[],c=[];for(let o of K){let P=await d(e.workspacePath,o.relativePath)??i$1.join(e.workspacePath,o.relativePath),A=await Vt(P,o.relativePath),g=A.payload;A.validity==="invalid"?c.push(`Invalid evidence contract: ${o.relativePath}`):g&&c.push(..._t(g)),n.push({path:o.relativePath,label:o.label,required:o.required,exists:A.exists,validity:A.validity,validationError:A.validationError,generatedAt:g?vt(g):void 0,commandId:typeof g?.commandId=="string"?g.commandId:void 0,exitCode:typeof g?.exitCode=="number"?g.exitCode:void 0});}let l=Tt(c).slice(0,16),p=b$2();return {schemaVersion:It,generatedAt:t.toISOString(),workspaceRoot:e.workspacePath,intelligenceChain:{schemaVersion:p.schemaVersion,contractPath:p.contractPath,currentStep:"agent-sync"},readOrder:bt(),blockers:l,staleAfterHours:r,reports:n,refreshCommand:R("workspace agent-sync --write --refresh-context")}}function lt(e$1){let t=["# Workspai agent grounding","","Cross-tool instructions for Copilot, Cursor, Claude Code, Codex, Grok, and other agents.","","## Read order (mandatory before workspace diagnosis)","",`1. \`${e.agentIndex}\` \u2014 latest blockers, timestamps, and report paths`,`2. \`${i.goalIndex}\` \u2014 when present, read the active Goal Pack and its handoff before choosing work.`,`3. \`${e.agentContext}\` \u2014 read only task-relevant context`,"4. Read only the task-relevant evidence artifacts listed in the index.","5. Use the Goal Pack retrieval queries, `workspace graph search <query> --limit 12 --json`, or MCP `searchWorkspaceGraph` before loading the full graph.","","Do **not** full-repo scan or inject the complete graph when a bounded query can answer the task.","","## Regenerate intelligence","","```bash",R("workspace agent-sync --write --refresh-context"),R("workspace context --for-agent --json --write"),R("pipeline --json --write"),"```",""];if(e$1.index.blockers.length>0){t.push("## Current blockers","");for(let r of e$1.index.blockers.slice(0,12))t.push(`- ${r}`);t.push("");}if(e$1.context?.safeCommands?.length){t.push("## Safe commands (prefer these)","");for(let r of e$1.context.safeCommands.slice(0,10))t.push(`- \`${r.display}\` \u2014 ${r.description}`);t.push("");}return t.push("## Rules","","- Treat `.workspai/reports/*` as the source of truth for health, gates, and release posture.","- Prefer deterministic Workspai CLI commands over heuristic framework guesses.","- If evidence is missing or stale, run the refresh commands above before proposing fixes.","- Keep project-scoped advice aligned with the active project named in the context pack.","- Never claim that an active goal is satisfied until its CLI-owned verification lifecycle is `verified`.",""),t.join(`
|
|
9
9
|
`)}function Ut(e$1){return ["# Workspai agent grounding","",`Generated: ${e$1.generatedAt}`,"",`This file is tool-agnostic. Synced agents should read it together with \`${e.agentIndex}\`.`,"","## Mandatory read order","",...e$1.readOrder.map((t,r)=>`${r+1}. \`${t}\``),"",e$1.blockers.length>0?"## Blockers":"",...e$1.blockers.length>0?e$1.blockers.map(t=>`- ${t}`):[],"","## Refresh","","```bash",e$1.refreshCommand,"```",""].filter(t=>t!=="").join(`
|
|
10
|
-
`)}function Ft(){return ["# Workspai workspace grounding","","Before answering workspace, release, or architecture questions:","","1. Read `AGENTS.md` (managed Workspai section).",`2. Read \`${e.agentIndex}\` and only task-relevant context from \`${e.agentContext}\`.`,"3. Use bounded `workspace graph search` or MCP `searchWorkspaceGraph` before scanning the full repository.","","Regenerate stale intelligence:","","```bash",
|
|
10
|
+
`)}function Ft(){return ["# Workspai workspace grounding","","Before answering workspace, release, or architecture questions:","","1. Read `AGENTS.md` (managed Workspai section).",`2. Read \`${e.agentIndex}\` and only task-relevant context from \`${e.agentContext}\`.`,"3. Use bounded `workspace graph search` or MCP `searchWorkspaceGraph` before scanning the full repository.","","Regenerate stale intelligence:","","```bash",R("workspace agent-sync --write --refresh-context"),"```",""].join(`
|
|
11
11
|
`)}function zt(){return ["## Claude Code","",`- Load \`${e.agentIndex}\` before diagnosing blockers.`,"- Use `.claude/rules/workspai-evidence.md` for scoped Workspai evidence rules.","- Treat `.claude/rules/rapidkit-evidence.md` as a legacy compatibility mirror.","- Refresh grounding with `npx workspai workspace agent-sync --write`.",""].join(`
|
|
12
|
-
`)}function Bt(){return ["---","description: Workspai workspace evidence and intelligence grounding","globs: []","alwaysApply: true","---","","Before proposing fixes in this workspace:","",`1. Read \`${e.agents}\` and \`${e.agentIndex}\`.`,`2. Read only task-relevant context from \`${e.agentContext}\`.`,"3. Prefer bounded graph search and evidence reports over full-repo exploration.","","Refresh when stale:","","```bash",
|
|
12
|
+
`)}function Bt(){return ["---","description: Workspai workspace evidence and intelligence grounding","globs: []","alwaysApply: true","---","","Before proposing fixes in this workspace:","",`1. Read \`${e.agents}\` and \`${e.agentIndex}\`.`,`2. Read only task-relevant context from \`${e.agentContext}\`.`,"3. Prefer bounded graph search and evidence reports over full-repo exploration.","","Refresh when stale:","","```bash",R("workspace agent-sync --write --refresh-context"),"```",""].join(`
|
|
13
13
|
`)}function Jt(){return ["---",'applyTo: ".workspai/**,**/.workspai/**,.rapidkit/**,**/.rapidkit/**"',"description: Workspai evidence and intelligence artifacts","---","","When working under `.workspai/` or legacy `.rapidkit/`:","","- Treat `.workspai/reports/*` JSON reports as canonical gate and health evidence.",`- Start from \`${e.agentIndex}\` for read order and blockers.`,"- Do not invent pass/fail state \u2014 cite `exitCode`, `blockers`, and `generatedAt` fields.",""].join(`
|
|
14
14
|
`)}function Yt(){return ["---",'applyTo: "**"',"description: Workspai workspace scope, evidence, and command discipline","---","","# Workspai Workspace Intelligence","","Use Workspai reports as the workspace source of truth before giving architectural, repair, release, or project lifecycle advice.","","## Scope rules","",`- Start from \`${e.agentIndex}\`; read only task-relevant context and evidence.`,"- Prefer bounded `workspace graph search` or MCP `searchWorkspaceGraph` over loading the complete graph.","- Distinguish workspace-level blockers from project-level blockers.","- When a project is active, cite its name, path, framework, and evidence source.","- Do not translate unsupported stack requests into unrelated native kits.","","## Answer contract","","Return answers with: Scope, Evidence, Diagnosis, Fix Plan, Run, Verify, Assumptions.",""].join(`
|
|
15
15
|
`)}function Xt(){return ["# Workspai evidence","","Applies when reading or editing `.workspai/reports/*`.","","- Start from `INDEX.json`, then `workspace-context-agent.json`.","- Use report blockers as the primary fix target.","- Regenerate with `npx workspai workspace agent-sync --write`.",""].join(`
|
|
@@ -19,18 +19,18 @@ ${o}`;e.write&&await f$2.writeFile(l,`${w.trimEnd()}
|
|
|
19
19
|
`)}function pt(){return ["---","description: Diagnose Workspai workspace blockers from evidence reports","---","","Diagnose this workspace using Workspai evidence only.","","Read:","",`- \`${e.agentIndex}\``,`- \`${e.agentContext}\``,"- Any fail/warn reports referenced in the index","","Return:","","1. Root cause grounded in report blockers","2. Smallest safe fix path (commands + file edits)","3. One verification command to prove recovery",""].join(`
|
|
20
20
|
`)}function re(e$1){return ["---",`description: ${e$1.description}`,"---","",e$1.objective,"","Read first:","",`- \`${e.agentIndex}\``,`- \`${e.agentContext}\``,"- Any report referenced by the current blocker or task","","Return:","",...e$1.expectedOutput.map((t,r)=>`${r+1}. ${t}`),"","Use the standard Workspai answer contract: Scope, Evidence, Diagnosis, Fix Plan, Run, Verify, Assumptions.",""].join(`
|
|
21
21
|
`)}function v(e){return ["# "+e.title,"",...e.lines,""].join(`
|
|
22
|
-
`)}function er(){return v({title:"MCP Tool Design",lines:["Workspai MCP is a read-mostly bridge over contract-validated workspace artifacts.","","Candidate read tools:",`- \`getWorkspaceModel\` \u2014 read \`${e.model}\`.`,`- \`getWorkspaceKnowledgeGraph\` \u2014 read \`${e.knowledgeGraph}\`.`,`- \`getWorkspaceEvaluation\` \u2014 read \`${e.evaluationLastRun}\` (or the live evaluation when requested).`,"- `queryWorkspaceEntities` \u2014 filter proof-backed graph entities by kind.","- `searchWorkspaceGraph` \u2014 retrieve bounded proof-backed context by text query.","- `getWorkspaceGraphEvidence` \u2014 resolve evidence for an entity or relation.","- `findWorkspaceGraphPath` \u2014 find a shortest proof-carrying relationship path.",`- \`getEvidenceIndex\` \u2014 read \`${e.agentIndex}\`.`,"- `getBlockers` \u2014 derive current blockers from INDEX and gate reports.","- `getSafeCommands` \u2014 read safe commands from `workspace-context-agent.json`.","- `getProjectContext` \u2014 return one project-scoped slice of the workspace model.","- `getArtifact` \u2014 read one explicit artifact path inside the workspace root.",`- \`listOperationalSkills\` \u2014 read \`${e.skillsIndex}\`.`,"- `getWorkspaceExplain` \u2014 read/build workspace explain for release-blocked or project scope.","- `refreshWorkspaceIntelligence` \u2014 explicit user-approved refresh command only.","","Write or repair tools require explicit approval boundaries and are intentionally not part of the first read-mostly design."]})}function tr(e$1){return `${JSON.stringify({schemaVersion:h$
|
|
23
|
-
`}function rr(e$1){return `${JSON.stringify({schemaVersion:h$
|
|
22
|
+
`)}function er(){return v({title:"MCP Tool Design",lines:["Workspai MCP is a read-mostly bridge over contract-validated workspace artifacts.","","Candidate read tools:",`- \`getWorkspaceModel\` \u2014 read \`${e.model}\`.`,`- \`getWorkspaceKnowledgeGraph\` \u2014 read \`${e.knowledgeGraph}\`.`,`- \`getWorkspaceEvaluation\` \u2014 read \`${e.evaluationLastRun}\` (or the live evaluation when requested).`,"- `queryWorkspaceEntities` \u2014 filter proof-backed graph entities by kind.","- `searchWorkspaceGraph` \u2014 retrieve bounded proof-backed context by text query.","- `getWorkspaceGraphEvidence` \u2014 resolve evidence for an entity or relation.","- `findWorkspaceGraphPath` \u2014 find a shortest proof-carrying relationship path.",`- \`getEvidenceIndex\` \u2014 read \`${e.agentIndex}\`.`,"- `getBlockers` \u2014 derive current blockers from INDEX and gate reports.","- `getSafeCommands` \u2014 read safe commands from `workspace-context-agent.json`.","- `getProjectContext` \u2014 return one project-scoped slice of the workspace model.","- `getArtifact` \u2014 read one explicit artifact path inside the workspace root.",`- \`listOperationalSkills\` \u2014 read \`${e.skillsIndex}\`.`,"- `getWorkspaceExplain` \u2014 read/build workspace explain for release-blocked or project scope.","- `refreshWorkspaceIntelligence` \u2014 explicit user-approved refresh command only.","","Write or repair tools require explicit approval boundaries and are intentionally not part of the first read-mostly design."]})}function tr(e$1){return `${JSON.stringify({schemaVersion:h$4.workspaiMcpDesign.schemaVersion,generatedAt:e$1.generatedAt,workspaceRoot:e$1.workspacePath,status:"design-only",mode:"read-mostly",safety:{writeToolsEnabled:false,approvalRequiredForRefresh:true,artifactReadsMustStayInsideWorkspace:true},candidateTools:[{name:"getWorkspaceModel",reads:[e.model],mutates:false},{name:"getWorkspaceKnowledgeGraph",reads:[e.knowledgeGraph],mutates:false},{name:"getWorkspaceEvaluation",reads:[e.evaluationLive,e.evaluationLastRun],mutates:false},{name:"queryWorkspaceEntities",reads:[e.knowledgeGraph],mutates:false},{name:"searchWorkspaceGraph",reads:[e.knowledgeGraph],mutates:false},{name:"getWorkspaceGraphEvidence",reads:[e.knowledgeGraph],mutates:false},{name:"findWorkspaceGraphPath",reads:[e.knowledgeGraph],mutates:false},{name:"getEvidenceIndex",reads:[e.agentIndex],mutates:false},{name:"getBlockers",reads:[e.agentIndex,e.verify,i.pipelineLastRun],mutates:false},{name:"getSafeCommands",reads:[e.agentContext],mutates:false},{name:"getProjectContext",reads:[e.model,e.agentContext],mutates:false},{name:"getArtifact",reads:["requested workspace-relative artifact path"],mutates:false},{name:"listOperationalSkills",reads:[e.skillsIndex],mutates:false},{name:"getWorkspaceExplain",reads:[e.explain,e.verify,e.impact],mutates:false},{name:"refreshWorkspaceIntelligence",command:R("workspace agent-sync --write --refresh-context"),mutates:true,approvalRequired:true}]},null,2)}
|
|
23
|
+
`}function rr(e$1){return `${JSON.stringify({schemaVersion:h$4.agentHooks.schemaVersion,generatedAt:e$1.generatedAt,workspaceRoot:e$1.workspacePath,enabledByDefault:false,mode:"advisory",hooks:[{name:"workspai-pre-tool-use-workspace-boundary",event:"PreToolUse",purpose:"Block or warn on state-changing commands outside the active workspace root.",defaultAction:"warn",rules:["Allow read-only commands.","Warn before write/delete commands outside workspaceRoot.","Never run destructive commands without explicit user approval."]},{name:"workspai-post-tool-use-verify-suggestion",event:"PostToolUse",purpose:"Suggest non-destructive verification commands after edits.",defaultAction:"suggest",commands:[R("doctor workspace"),R("workspace verify --strict --json")]},{name:"workspai-user-prompt-submit-scope-hint",event:"UserPromptSubmit",purpose:"Inject lightweight workspace scope and evidence index hints.",defaultAction:"inject-context-hint",reads:[e.agentIndex,e.agentContext]}]},null,2)}
|
|
24
24
|
`}function ut(e$1){let t=["---","name: workspai-workspace-intelligence","description: Use Workspai workspace intelligence reports to answer, repair, verify, and release with evidence","---","","# Workspai Workspace Intelligence","","Use this skill for workspace architecture, project lifecycle, blocker repair, release readiness, agent grounding, and CI evidence questions.","","## Decision flow","","1. Load `resources/scope-model.md`.",`2. Load \`${e.agentIndex}\`.`,`3. Load \`${e.agentContext}\`.`,`4. Load \`${e.skillsIndex}\` when operational playbooks are needed.`,"5. Load the smallest evidence report required for the task.","6. Answer with Scope, Evidence, Diagnosis, Fix Plan, Run, Verify, Assumptions.","","## Rules","","- Prefer Workspai reports over full-repo scans.","- Never claim a gate passed without a cited report.","- Separate display commands from execution requests.","- Keep project-scoped fixes inside the active project unless workspace evidence says otherwise.",""];return e$1?.trim()&&t.push(e$1.trim(),""),t.join(`
|
|
25
25
|
`)}function ne(e$1){return ["---",`name: ${e$1.name}`,`description: ${e$1.description}`,`tools: [${e$1.tools.map(t=>`'${t}'`).join(", ")}]`,"---","",`You are the ${e$1.name} agent for Workspai Workspace Intelligence.`,"",`Mode: ${e$1.mode}.`,"",`Start every task by reading \`${e.agentIndex}\` and \`${e.agentContext}\`.`,"","Use this answer contract:","","- Scope","- Evidence","- Diagnosis","- Fix Plan","- Run","- Verify","- Assumptions","","Do not invent health, readiness, or policy status. Cite report paths and command outputs.",""].join(`
|
|
26
|
-
`)}function gt(){return ["---","name: workspai-grounding","description: Load Workspai workspace intelligence reports before diagnosing or changing code","---","","# Workspai grounding","","Use when the user asks about workspace health, release gates, doctor/pipeline failures, or project structure.","","## Workflow","",`1. Read \`${e.agentIndex}\``,`2. Read \`${e.agentContext}\``,"3. Read fail/warn evidence artifacts listed in the index","4. Propose the smallest safe fix with explicit verification commands","","## Refresh stale evidence","","```bash",
|
|
27
|
-
`)}async function u(e,t,r){return r?(await
|
|
26
|
+
`)}function gt(){return ["---","name: workspai-grounding","description: Load Workspai workspace intelligence reports before diagnosing or changing code","---","","# Workspai grounding","","Use when the user asks about workspace health, release gates, doctor/pipeline failures, or project structure.","","## Workflow","",`1. Read \`${e.agentIndex}\``,`2. Read \`${e.agentContext}\``,"3. Read fail/warn evidence artifacts listed in the index","4. Propose the smallest safe fix with explicit verification commands","","## Refresh stale evidence","","```bash",R("workspace agent-sync --write --refresh-context"),"```",""].join(`
|
|
27
|
+
`)}async function u(e,t,r){return r?(await h$2.ensureDir(i$1.dirname(e)),await h$2.writeFile(e,t,"utf8"),"written"):"skipped"}async function be(e){if(!e.write)return "skipped";let t=await h$2.pathExists(e.absolutePath)?await h$2.readFile(e.absolutePath,"utf8"):null,{upsertManagedAgentSection:r}=await import('./managed-agent-markers-COE5DJ3W.js'),n=r(t,e.generatedBody),c=e.preamble?`${e.preamble.trimEnd()}
|
|
28
28
|
|
|
29
|
-
${n}`:n;return await
|
|
30
|
-
`,o$1),H),d(await u(i$1.join(t$1,f$
|
|
31
|
-
`,o$1),f$
|
|
29
|
+
${n}`:n;return await h$2.ensureDir(i$1.dirname(e.absolutePath)),await h$2.writeFile(e.absolutePath,c,"utf8"),"written"}function Jr(e){if(!e?.trim())return;let t=new Set(["all","vscode","agents","copilot","cursor","claude","codex","orca"]),r=e.split(",").map(n=>n.trim().toLowerCase()).filter(n=>t.has(n));return r.length>0?r:void 0}function nr(e){let t=[...e.outputs].sort((n,c)=>n.path.localeCompare(c.path)),r=b$2();return {schemaVersion:Ot,generatedAt:e.generatedAt,workspaceRoot:e.workspacePath,preset:e.preset,targets:[...e.targets].sort(),sourceReports:e.index.reports.filter(n=>n.exists).map(n=>n.path).sort(),intelligenceChain:{schemaVersion:r.schemaVersion,contractPath:r.contractPath,currentStep:"agent-sync"},outputInventory:t,capabilityMatrix:qt({targets:e.targets,outputs:t}),drift:{missingRequired:e.missingRequired,staleReports:e.staleReports,strictViolations:e.strictViolations},answerContract:["Scope","Evidence","Diagnosis","Fix Plan","Run","Verify","Assumptions"],refreshCommand:R(`workspace agent-sync --write --refresh-context --preset ${e.preset}`),experimental:{hooksEnabled:e.experimentalHooks,mcpReady:t.some(n=>n.kind==="mcp-design")}}}async function _e(e){let t$1=i$1.resolve(e.workspacePath),r$1=e.now??new Date,n$1=e.staleAfterHours??24,c$1=Lt(e.targets),l$1=[...c$1].sort(),p$2=Gt(e.preset),o$1=e.write===true,P=e.strict===true,A$1,g=null,ae=e.model;e.refreshContext&&(ae??=await p({workspacePath:t$1,includeEvidence:true}),g=await c({workspacePath:t$1,model:ae,agent:e.agent??"generic",scope:e.scope,includeEvidence:true}),o$1&&(A$1=await d$1(g,t$1)));let _=[],oe=[],ie=[],se=[],d=(s,k)=>{s==="written"?oe.push(k):ie.push(k),se.push({path:k,kind:Dt(k),targets:$t(k),required:Kt(k,p$2),status:s==="written"?"written":e.dryRun?"planned":"skipped"});},ce="",mt=await Mt(t$1,ae),le=null;try{le=(await m({workspacePath:t$1})).contract;}catch{le=null;}let kt=nt({model:mt,context:g,contract:le}),de=await at({workspacePath:t$1,skills:kt,generatedAt:r$1.toISOString(),write:o$1});for(let s of de.skills)d(o$1?"written":"skipped",s.canonicalPath);d(o$1?"written":"skipped",b$1),ce=ot(de.index);let y$1=await ct({workspacePath:t$1,staleAfterHours:n$1,now:r$1});if(d(await u(i$1.join(t$1,H),`${JSON.stringify(y$1,null,2)}
|
|
30
|
+
`,o$1),H),d(await u(i$1.join(t$1,f$2),`${Ut(y$1)}
|
|
31
|
+
`,o$1),f$2),(C(c$1,"agents")||C(c$1,"vscode"))&&d(await be({absolutePath:i$1.join(t$1,"AGENTS.md"),generatedBody:lt({index:y$1,context:g}),write:o$1}),"AGENTS.md"),C(c$1,"claude")){let s=i$1.join(t$1,"CLAUDE.md");if(o$1){let{upsertManagedAgentSection:k}=await import('./managed-agent-markers-COE5DJ3W.js'),m=await h$2.pathExists(s)?await h$2.readFile(s,"utf8"):"",w=k(m,zt()),E=w.includes("@AGENTS.md")?w:`@AGENTS.md
|
|
32
32
|
|
|
33
|
-
${
|
|
33
|
+
${w}`;await h$2.ensureDir(i$1.dirname(s)),await h$2.writeFile(s,E,"utf8"),oe.push("CLAUDE.md");}else ie.push("CLAUDE.md");d(await u(i$1.join(t$1,j),`${Xt()}
|
|
34
34
|
`,o$1),j),d(await u(i$1.join(t$1,k),`${Zt()}
|
|
35
|
-
`,o$1),k);}if(C(c$1,"cursor")&&(d(await u(i$1.join(t$1,h$
|
|
36
|
-
`,o$1),M),{workspacePath:t$1,indexPath:i$1.join(t$1,H),packPath:i$1.join(t$1,M),pack:ve,contextPath:
|
|
35
|
+
`,o$1),k);}if(C(c$1,"cursor")&&(d(await u(i$1.join(t$1,h$3),Bt(),o$1),h$3),d(await u(i$1.join(t$1,i$2),Qt(),o$1),i$2)),Nt(c$1)){if(d(await be({absolutePath:i$1.join(t$1,".github/copilot-instructions.md"),generatedBody:Ft(),write:o$1}),".github/copilot-instructions.md"),d(await u(i$1.join(t$1,l),Yt(),o$1),l),d(await u(i$1.join(t$1,m$1),dt("workspace"),o$1),m$1),d(await u(i$1.join(t$1,n),Jt(),o$1),n),d(await u(i$1.join(t$1,o),dt("evidence"),o$1),o),d(await u(i$1.join(t$1,p$1),pt(),o$1),p$1),d(await u(i$1.join(t$1,q),pt(),o$1),q),p$2==="enterprise"){let s$1=[[r,re({description:"Repair Workspai blockers with evidence and verification",objective:"Plan the smallest safe repair for the current Workspai blocker.",expectedOutput:["Blocker and affected workspace/project scope","Evidence paths and exact failing signals","Minimal fix plan","Human-run commands","Verification command and expected success signal"]})],[t,re({description:"Assess Workspai release readiness from evidence",objective:"Assess whether this workspace is release-ready using Workspai gates.",expectedOutput:["Readiness verdict with cited reports","Blocking gates","Safe next command","Verification checklist"]})],[v$1,re({description:"Onboard a project into Workspai Workspace Intelligence",objective:"Guide project onboarding using workspace model and create planner capabilities.",expectedOutput:["Target project scope","Native create, official generator, or existing lane","Safe commands","Post-onboarding verification"]})],[x,re({description:"Adopt an existing project into Workspai governance",objective:"Adopt an existing project without changing its runtime behavior.",expectedOutput:["Detected stack and confidence","Adoption plan","Generated metadata expectations","Doctor and workspace model verification"]})]];for(let[m,w]of s$1)d(await u(i$1.join(t$1,m),w,o$1),m);let k=[[s,s$1[0][1]],[u$1,s$1[1][1]],[w,s$1[2][1]],[y,s$1[3][1]]];for(let[m,w]of k)d(await u(i$1.join(t$1,m),w,o$1),m);if(e.hydratePrompts===true)for(let m of await it({workspacePath:t$1,skills:de.skills,write:o$1}))d(o$1?"written":"skipped",m);}if(d(await u(i$1.join(t$1,z),gt(),o$1),z),d(await u(i$1.join(t$1,A),gt(),o$1),A),p$2==="enterprise"){d(await u(i$1.join(t$1,B),ut(ce),o$1),B),d(await u(i$1.join(t$1,C$1),ut(ce),o$1),C$1);let s=[["artifact-map.md",v({title:"Artifact Map",lines:K.map(m=>`- \`${m.relativePath}\` \u2014 ${m.label}`)})],["command-map.md",v({title:"Command Map",lines:["- `npx workspai workspace agent-sync --write --refresh-context` \u2014 refresh agent grounding.","- `npx workspai workspace model --json --write` \u2014 refresh workspace model.","- `npx workspai doctor workspace` \u2014 refresh health evidence.","- `npx workspai workspace verify --strict --json` \u2014 verify release gates."]})],["scope-model.md",v({title:"Scope Model",lines:["- Workspace scope is the default source of truth.","- Project scope is selected only when the active task targets a specific project.","- Always name the workspace and project when giving repair or lifecycle advice."]})],["runtime-support.md",v({title:"Runtime Support",lines:["- Native create is available only for Workspai-owned scaffold contracts.","- Unsupported stacks should use the official lane when a stable ecosystem generator exists.","- Existing projects should use the existing lane when native create is unavailable."]})],["create-planner-capabilities.md",v({title:"Create Planner Capabilities",lines:["- Use `contracts/create-planner-capabilities.v1.json` to decide native, official, or existing.","- Do not map PHP, WordPress, Laravel, Rails, or Symfony requests to unrelated native kits.","- Explain unsupported native create requests and guide users to adopt/import."]})],["mcp-tools.md",er()]];for(let[m,w]of s){let E=`${i$1.dirname(B)}/resources/${m}`;d(await u(i$1.join(t$1,E),w,o$1),E);let We=`${i$1.dirname(C$1)}/resources/${m}`;d(await u(i$1.join(t$1,We),w,o$1),We);}let k=[["workspai-advisor.agent.md",ne({name:"Workspai Advisor",description:"Read-only workspace and project guidance using Workspai evidence",mode:"read-only",tools:["search","read"]})],["workspai-repair.agent.md",ne({name:"Workspai Repair",description:"Turn Workspai blockers into minimal fixes and verification steps",mode:"repair",tools:["search","read","edit"]})],["workspai-release.agent.md",ne({name:"Workspai Release",description:"Assess readiness, governance gates, and release safety from evidence",mode:"release",tools:["search","read"]})],["workspai-project-onboarder.agent.md",ne({name:"Workspai Project Onboarder",description:"Guide create, import, and adopt flows with Workspai contracts",mode:"onboard",tools:["search","read","edit"]})]];for(let[m,w]of k){let E=`.github/agents/${m}`;d(await u(i$1.join(t$1,E),w,o$1),E);}}}if(p$2==="enterprise"){let s=tr({workspacePath:t$1,generatedAt:y$1.generatedAt});b$4(D,JSON.parse(s)),d(await u(i$1.join(t$1,D),s,o$1),D),d(await u(i$1.join(t$1,E),s,o$1),E);}if(p$2==="enterprise"&&e.experimentalHooks===true){let s=rr({workspacePath:t$1,generatedAt:y$1.generatedAt});b$4(F,JSON.parse(s)),d(await u(i$1.join(t$1,F),s,o$1),F),d(await u(i$1.join(t$1,G),s,o$1),G);}(C(c$1,"codex")||C(c$1,"orca"))&&(C(c$1,"agents")||d(await be({absolutePath:i$1.join(t$1,"AGENTS.md"),generatedBody:lt({index:y$1,context:g}),write:o$1}),"AGENTS.md"));let pe=o$1?await ct({workspacePath:t$1,staleAfterHours:n$1,now:r$1}):y$1,q$1=pe.reports.filter(s=>s.required&&!s.exists).map(s=>s.path),V=pe.reports.filter(s=>s.exists&&jt(s,n$1,r$1)).map(s=>s.path);if(P){q$1.length>0&&_.push(`Missing required reports: ${q$1.join(", ")}`),V.length>0&&_.push(`Stale reports (>${n$1}h): ${V.join(", ")}`);let s=se.map(k=>k.path).filter(k=>!Ht(k));s.length>0&&_.push(`Unsafe generated output paths: ${s.join(", ")}`);}let U=o$1?await g$1({workspacePath:t$1,mode:e.projectGrounding??"managed",now:r$1}):void 0;P&&U&&U.skipped.length>0&&_.push(`Project grounding incomplete: ${U.skipped.map(s=>`${s.name} (${s.reason})`).join(", ")}`);let ve=nr({workspacePath:t$1,generatedAt:r$1.toISOString(),preset:p$2,targets:l$1,index:pe,outputs:[...se,{path:M,kind:"report",targets:["agents","vscode","copilot","codex","orca"],required:true,status:o$1?"written":e.dryRun?"planned":"skipped"}],missingRequired:q$1,staleReports:V,strictViolations:_,experimentalHooks:e.experimentalHooks===true});if(o$1&&process.env.WORKSPAI_TEST_FAIL_AGENT_SYNC_BEFORE_PACK==="1")throw new Error("Injected agent-sync failure before generation commit.");return d(await u(i$1.join(t$1,M),`${JSON.stringify(ve,null,2)}
|
|
36
|
+
`,o$1),M),{workspacePath:t$1,indexPath:i$1.join(t$1,H),packPath:i$1.join(t$1,M),pack:ve,contextPath:A$1,writtenFiles:oe,skippedFiles:ie,blockers:y$1.blockers,missingRequired:q$1,staleReports:V,strictViolations:_,projectLenses:U}}async function Yr(e){if(e.write!==true)return _e(e);let t=i$1.resolve(e.workspacePath),r=i$1.join(t,".workspai","transactions","agent-sync");await b$3(r);let n=await _e({...e,write:false,dryRun:true});if(!n.pack)throw new Error("Agent-sync dry run did not produce an output inventory.");let c=[...n.pack.outputInventory.map(p=>p.path),H,M],l=await a({journalDirectory:r});try{for(let P of [...new Set(c)].sort()){let A=i$1.resolve(t,P),g=i$1.relative(t,A);if(g===".."||g.startsWith(`..${i$1.sep}`)||i$1.isAbsolute(g))throw new Error(`Agent-sync output escapes workspace root: ${P}`);await l.captureFile(A);}let p=await h(t);for(let P of p.resolved)for(let A of [f$1,g,h$1,"AGENTS.md",".gitignore"])await l.captureFile(i$1.join(P.projectPath,A));let o=await _e(e);return await l.commit(),o}catch(p){try{await l.rollback();}catch(o){throw new AggregateError([p,o],"Agent-sync generation failed and rollback was incomplete.")}throw p}}export{ht as a,wt as b,xt as c,It as d,Ot as e,H as f,M as g,K as h,bt as i,ct as j,Jr as k,Yr as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as PYTHON_FREE_WORKSPACE_PROFILES,a as buildWorkspaceManifest,f as createProject,g as registerWorkspaceAtPath,d as resolvePythonFreeFallbackProfile,b as syncWorkspaceFoundationFiles,e as writeWorkspaceLauncher}from'./chunk-
|
|
1
|
+
export{c as PYTHON_FREE_WORKSPACE_PROFILES,a as buildWorkspaceManifest,f as createProject,g as registerWorkspaceAtPath,d as resolvePythonFreeFallbackProfile,b as syncWorkspaceFoundationFiles,e as writeWorkspaceLauncher}from'./chunk-CFBAGPB4.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as DOCTOR_WORKSPACE_REPORT_PATH,n as applyEnvKeyAddFix,j as applyFileAppendFix,k as applyFileCopyFix,i as applyFileCreateFix,m as applyJsonEditFix,o as applyMakefileTargetFix,h as applyPackageScriptFix,f as assertOperationPathInsideProject,g as assertOperationPathInsideProjectResolved,e as buildRepairOperationIdentity,q as computeDoctorFixAwareExitCode,p as computeDoctorGateExitCode,l as decodeJsonPointerSegment,d as parseInternalRepairCommand,c as parsePackageScriptFix,b as resolveDoctorPolicyProfile,r as runDoctor}from'./chunk-
|
|
1
|
+
export{a as DOCTOR_WORKSPACE_REPORT_PATH,n as applyEnvKeyAddFix,j as applyFileAppendFix,k as applyFileCopyFix,i as applyFileCreateFix,m as applyJsonEditFix,o as applyMakefileTargetFix,h as applyPackageScriptFix,f as assertOperationPathInsideProject,g as assertOperationPathInsideProjectResolved,e as buildRepairOperationIdentity,q as computeDoctorFixAwareExitCode,p as computeDoctorGateExitCode,l as decodeJsonPointerSegment,d as parseInternalRepairCommand,c as parsePackageScriptFix,b as resolveDoctorPolicyProfile,r as runDoctor}from'./chunk-SM55RK3C.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a(e){let r=[...e.status!==void 0?["status"]:[],...e.list?["list"]:[],...e.activate?["activate"]:[],...e.cancel?["cancel"]:[],...e.prepare?["prepare"]:[],...e.verify?["verify"]:[]];if(r.length>1)throw new Error(`Choose exactly one Goal lifecycle operation; received ${r.join(", ")}.`);let o=r[0];if(!o){if(!e.intent?.trim())throw new Error("Provide a plain-language intent or use one lifecycle operation.");if(e.run===false)throw new Error("--no-run is valid only with --verify.");return {operation:"plan",intent:e.intent.trim()}}if(e.intent?.trim())throw new Error(`Do not combine an intent with --${o}.`);if(e.scope||e.refresh||e.dryRun)throw new Error(`--${o} does not accept planning-only --scope, --refresh, or --dry-run options.`);if(e.run===false&&o!=="verify")throw new Error("--no-run is valid only with --verify.");return {operation:o}}export{a as validateGoalCommandSelection};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as buildGoalLifecycleResult,b as inspectGoalLifecycle,f as linkGoalRepairTransaction,d as prepareGoalVerification,c as transitionGoalLifecycle,e as verifyGoalLifecycle}from'./chunk-QXW3SLEX.js';export{f as GOAL_INDEX_PATH,e as GOAL_INDEX_SCHEMA_VERSION}from'./chunk-PCXBPQO6.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {c as c$5}from'./chunk-HYY5PQCV.js';import {c}from'./chunk-YMY6EFX4.js';import {a}from'./chunk-VIFTO53Y.js';import {a as a$2}from'./chunk-4NN5QWOB.js';import {h,d as d$1,f as f$2,c as c$3,e as e$1}from'./chunk-PCXBPQO6.js';export{b as GOAL_AGENT_HANDOFF_SCHEMA_VERSION,f as GOAL_INDEX_PATH,e as GOAL_INDEX_SCHEMA_VERSION,g as GOAL_LIFECYCLE_RESULT_SCHEMA_VERSION,d as GOAL_PACK_LAST_RUN_PATH,a as GOAL_PACK_SCHEMA_VERSION,c as GOAL_PLAN_RESULT_SCHEMA_VERSION}from'./chunk-PCXBPQO6.js';import {b}from'./chunk-RMDVRNU7.js';import {c as c$4}from'./chunk-4YICCES6.js';import {d,c as c$1}from'./chunk-EWZZUQBR.js';import {c as c$2,f as f$1}from'./chunk-GRGUPSNP.js';import {a as a$1}from'./chunk-AFIFZTOY.js';import {f,e}from'./chunk-HH54C3XJ.js';import u from'path';import w from'fs-extra';var ne=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/,se=/(?:^|\s)(?:\/(?:home|Users|private|var|tmp|mnt|opt|srv|root|workspace|workspaces|data|Volumes|etc|usr|run|dev|proc|sys)\/[^\s]+|[A-Za-z]:[\\/][^\s]+|\\\\[^\\\s]+\\[^\s]+)/,ie=/(?:-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----|\b(?:github_pat_|gh[pousr]_|glpat-|npm_|xox[baprs]-|sk-(?:proj-)?)[A-Za-z0-9_-]{12,}|\b(?:AKIA|ASIA)[A-Z0-9]{16}\b|\bAIza[A-Za-z0-9_-]{20,}|\bBearer\s+[A-Za-z0-9._~+/-]{16,}|[a-z][a-z0-9+.-]*:\/\/[^\s:/]+:[^\s@/]+@|\b(?:password|passwd|secret|token|api[_-]?key)\s*[:=]\s*[^\s]{6,})/i,ce=[{category:"test-coverage",patterns:[/\b(?:test\s+)?coverage\b/i,/\bcoverage\s+(?:to|above|at least)\b/i]},{category:"dependency-security",patterns:[/\b(?:dependency|dependencies|package|packages)\b.*\b(?:security|vulnerab|audit)\b/i,/\b(?:security|vulnerab|audit)\b.*\b(?:dependency|dependencies|package|packages)\b/i]},{category:"release-readiness",patterns:[/\brelease[ -]readiness\b/i,/\bready (?:this |the )?(?:workspace|project) for release\b/i,/\bprepare (?:this |the )?(?:workspace|project) for release\b/i]},{category:"defect-repair",patterns:[/\b(?:fix|repair|resolve|debug)\b.*\b(?:bug|error|failure|issue|regression)\b/i]},{category:"performance",patterns:[/\b(?:performance|latency|throughput|memory|cpu|optimi[sz]e|faster|slower)\b/i]},{category:"refactor",patterns:[/\b(?:refactor|restructure|decouple|extract|simplify|cleanup|clean up)\b/i]},{category:"documentation",patterns:[/\b(?:document|documentation|readme|guide|tutorial|docs)\b/i]},{category:"feature-change",patterns:[/\b(?:add|build|create|implement|introduce|support)\b/i]},{category:"system-understanding",patterns:[/\b(?:understand|explain|map|find|where|how|architecture|analy[sz]e|search)\b/i]}];function le(t){if(typeof t!="string")throw new Error("Goal intent must be text.");let e=t.trim().replace(/\s+/g," ");if(!e)throw new Error("Goal intent cannot be empty.");if(e.length>2e3)throw new Error("Goal intent exceeds the 2000 character safety limit.");if(ne.test(e))throw new Error("Goal intent contains unsupported control characters.");if(se.test(e))throw new Error("Goal intent contains a machine-local absolute path. Use a workspace-relative path or project scope.");if(ie.test(e))throw new Error("Goal intent appears to contain secret material and was not persisted.");return e}function pe(t){let e=t.match(/\b(?:coverage\D{0,24})?(100|\d{1,2})(?:\.\d+)?\s*%/i);if(!e||!/coverage/i.test(t))return null;let a=Number(e[1]);return Number.isFinite(a)&&a>=0&&a<=100?a:null}function $(t){let e=le(t),a=ce.filter(p=>p.patterns.some(m=>m.test(e))).map(p=>p.category),r=a[0]??"feature-change",c=pe(e),i=[];return a.length===0&&i.push("The requested change type could not be classified with high confidence."),a.length>1&&a[0]!=="test-coverage"&&i.push(`The intent also contains signals for: ${a.slice(1).join(", ")}.`),r==="test-coverage"&&c===null&&i.push("A numeric test coverage target is required for machine verification."),{original:e,normalized:e.toLocaleLowerCase("en-US"),statement:e.replace(/[.!?]+$/,""),category:r,confidence:a.length===1?"high":a.length>1?"medium":"low",ambiguities:i,...c===null?{}:{requestedTarget:{metric:"test-coverage-percent",operator:"at-least",value:c}}}}function J(t){let e={"test-coverage":["test suite coverage configuration instrumentation","CI tests LCOV Cobertura JaCoCo LLVM coverage"],"dependency-security":["dependency manifest lockfile security audit vulnerability"],"release-readiness":["release pipeline readiness gates build test deploy"],"defect-repair":["failure error test implementation call path"],"feature-change":["API implementation module dependency tests"],refactor:["module dependency ownership implementation tests"],performance:["performance benchmark latency throughput runtime"],documentation:["documentation README guide architecture decision"],"system-understanding":["architecture service API dependency ownership"]};return [...new Set([...e[t.category],t.statement])].slice(0,3)}var X="contracts/workspace-intelligence/goal-pack.v1.json",B="contracts/workspace-intelligence/goal-agent-handoff.v1.json",de="contracts/workspace-intelligence/goal-plan-result.v1.json",Q="contracts/workspace-intelligence/goal-index.v1.json";function Z(t){return t.split(u.sep).join("/")}function N(t,e){return u.resolve(e.absolutePath??u.join(t,e.path))}function ue(t){let e=t.requested.trim().replace(/^project:/,"");if(!e)throw new Error("Project goal scope must name a project.");let a=u.isAbsolute(e)?u.resolve(e):null,r=t.model.projects.filter(c=>c.name===e||Z(c.path)===Z(e)||a!==null&&N(t.workspacePath,c)===a);if(r.length!==1)throw new Error(r.length===0?`Project goal scope was not found in the canonical model: ${e}`:`Project goal scope is ambiguous in the canonical model: ${e}`);return r[0]}async function me(t){let e=await a$2(t);if(e.status==="miss")throw new Error(`Canonical model and live graph evidence are required (${e.reason}). Run \`workspai workspace intelligence run --for-agent generic --strict --json\` or retry with --refresh.`);let{model:a,graph:r}=e;return a$1(a,"contracts/workspace-intelligence/workspace-model.v1.json","Goal source model"),a$1(r,"contracts/workspace-intelligence/workspace-knowledge-graph.v1.json","Goal source graph"),c$4(r,a),{model:a,graph:r}}function ge(t){if(t.explicitScope?.trim()==="workspace")return {kind:"workspace",projects:t.model.projects.map(e=>e.name).sort(),selectionSource:"explicit"};if(t.explicitScope?.trim())return {kind:"project",projects:[ue({workspacePath:t.workspacePath,model:t.model,requested:t.explicitScope}).name],selectionSource:"explicit"};if(t.invocationProjectPath){let e=u.resolve(t.invocationProjectPath),a=t.model.projects.filter(r=>N(t.workspacePath,r)===e);if(a.length!==1)throw new Error("The invocation project is not represented uniquely in the canonical workspace model. Refresh intelligence or pass --scope explicitly.");return {kind:"project",projects:[a[0].name],selectionSource:"invocation-project"}}return {kind:"workspace",projects:t.model.projects.map(e=>e.name).sort(),selectionSource:"workspace"}}function he(t,e){if(e.kind==="workspace")return {entities:t.quality.entityCount,relationships:t.quality.relationCount,proofs:t.quality.proofCount,unresolved:t.quality.unknownCount,proofCoveragePercent:Number((t.quality.relationProofCoverageRatio*100).toFixed(2))};let a=new Set(e.projects),r=t.entities.filter(l=>l.projectId!==void 0&&a.has(l.projectId)),c=new Set(r.map(l=>l.id)),i=t.relations.filter(l=>c.has(l.from)||c.has(l.to)),p=new Set([...r.flatMap(l=>l.proofIds),...i.flatMap(l=>l.proofIds)]),m=i.filter(l=>l.proofIds.length>0).length;return {entities:r.length,relationships:i.length,proofs:p.size,unresolved:i.length-m,proofCoveragePercent:i.length===0?100:Number((m/i.length*100).toFixed(2))}}async function fe(t){let e$1=new Set(["node","bun","deno","python","go","java","dotnet","rust","php","ruby","elixir","clojure","scala","kotlin","c","cpp","unknown"]),a=u.join(t.workspacePath,e.intelligenceRun),r=await w.readJson(a).catch(()=>null),i=(Array.isArray(r?.stages)?r.stages:[]).filter(o=>o.status==="blocked"||o.status==="failed").map(o=>String(o.id??"unknown")).sort(),p=r?.status,m={status:p==="passed"?"passed":p==="blocked"||p==="failed"?"blocked":"unknown",artifact:e.intelligenceRun,blockedStages:i},l={status:"not-applicable",runtime:null,runner:null,existingEvidence:[],prerequisites:[]};if(t.intent.category==="test-coverage"){let o=await Promise.all(t.projects.map(async s=>({project:s,capability:await c$5(N(t.workspacePath,s),e$1.has(s.runtime)?s.runtime:"unknown")}))),n=o.map(s=>s.capability.status);l={status:n.includes("unsupported")?"unsupported":n.includes("requires-setup")?"requires-setup":"available",runtime:o.length===1?o[0].capability.runtime:[...new Set(o.map(s=>s.capability.runtime))].join(","),runner:o.length===1?o[0].capability.runner:[...new Set(o.flatMap(s=>s.capability.runner?[s.capability.runner]:[]))].join(",")||null,existingEvidence:o.flatMap(s=>s.capability.existingEvidence.map(d=>({project:s.project.name,...d}))).filter((s,d,E)=>E.findIndex(A=>A.project===s.project&&A.path===s.path&&A.sha256===s.sha256)===d).sort((s,d)=>s.project.localeCompare(d.project)||s.path.localeCompare(d.path)),prerequisites:[...new Set(o.flatMap(s=>s.capability.prerequisites))].sort()};}let j=J(t.intent),I=new Set(t.projects.map(o=>o.name)),C=new Set(j.join(" ").toLocaleLowerCase("en-US").split(/[^a-z0-9+#.-]+/).filter(o=>o.length>2)),P=t.graph.entities.filter(o=>(!o.projectId||I.has(o.projectId))&&(o.kind==="test-suite"||o.kind==="pipeline"||o.kind==="file"||[...C].some(n=>o.label.toLocaleLowerCase("en-US").includes(n)))).sort((o,n)=>{let s=o.kind==="test-suite"?0:o.kind==="pipeline"?1:2,d=n.kind==="test-suite"?0:n.kind==="pipeline"?1:2;return s-d||o.label.localeCompare(n.label)}).slice(0,20).map(o=>({entityId:o.id,kind:o.kind,label:o.label,proofIds:o.proofIds.slice(0,12)}));return {workspaceIntelligence:m,measurement:l,retrieval:{status:P.length>=3?"grounded":P.length>0?"partial":"empty",strategy:"deterministic-category-v1",queries:j,anchors:P}}}async function ke(t){let e=u.join(t,f$2);if(!await w.pathExists(e))return {schemaVersion:e$1,generatedAt:new Date(0).toISOString(),activeGoalId:null,goals:[]};let a=await w.readJson(e);return a$1(a,Q,"Goal index"),h(a),a}function we(t,e,a){let r=t.goals.find(i=>i.id===e.id),c={id:e.id,fingerprint:e.fingerprint,objective:e.intent.statement,category:e.intent.category,state:e.state,lifecycle:r?.lifecycle==="cancelled"?"cancelled":"active",scope:e.scope,createdAt:r?.createdAt??e.generatedAt,updatedAt:a,goalPack:e.artifacts.goalPack,agentHandoff:e.artifacts.agentHandoff,...r?.verifiedGoalId?{verifiedGoalId:r.verifiedGoalId}:{},...r?.repairTransactionId?{repairTransactionId:r.repairTransactionId}:{}};return {schemaVersion:e$1,generatedAt:a,activeGoalId:c.lifecycle==="cancelled"?t.activeGoalId:e.id,goals:[...t.goals.filter(i=>i.id!==e.id).map(i=>c.lifecycle==="active"&&i.lifecycle==="active"?{...i,lifecycle:"planned",updatedAt:a}:i),c].sort((i,p)=>i.id.localeCompare(p.id))}}async function Le(t){let e$1=b({startPath:u.resolve(t.startPath),explicitWorkspacePath:t.workspacePath,strict:true,requireProjectMembership:true});if(!e$1)throw new Error("No canonical Workspai workspace could be resolved.");let a$2=u.resolve(e$1.workspacePath);t.refresh&&await c({workspacePath:a$2,strict:false,agent:"generic"});let{model:r,graph:c$4}=await me(a$2),i=ge({workspacePath:a$2,invocationProjectPath:e$1.projectPath,model:r,explicitScope:t.scope}),p=r.projects.filter(g=>i.projects.includes(g.name));if(p.length===0)throw new Error("A Goal Pack requires at least one registered project in its selected scope.");let m=t.maxAttempts??5;if(!Number.isInteger(m)||m<1||m>25)throw new Error("--max-attempts must be an integer from 1 to 25.");let l=new Date().toISOString(),j=d(r),I=$(t.intent),C=await fe({workspacePath:a$2,projects:p,graph:c$4,intent:I}),P={generatedAt:l,intent:I,workspaceName:r.workspace.name,scope:i,sourceBinding:{model:{artifact:e.model,schemaVersion:f.model,hashAlgorithm:"sha256",hashSemantics:"workspace-model-structural-v1",hash:j,generatedAt:r.generatedAt},graph:{artifact:e.knowledgeGraph,schemaVersion:f.knowledgeGraph,hashAlgorithm:"sha256",hashSemantics:"canonical-json-v1",hash:c$1(c$4),generatedAt:c$4.generatedAt,modelHash:c$4.source.hash}},preflight:C,baseline:{projectCount:p.length,runtimes:[...new Set(p.flatMap(g=>g.runtimeCandidates))].sort(),frameworks:[...new Set(p.map(g=>g.framework))].sort(),graph:he(c$4,i)},maxAttempts:m,consumer:t.consumer??"generic"},o={digestCanonical:c$1},{goalPack:n,handoff:s}=a(P,o);a$1(n,X,"Goal Pack"),a$1(s,B,"Goal agent handoff");let d$2=false,E=async()=>{let g=u.join(a$2,n.artifacts.goalPack),f=u.join(a$2,n.artifacts.agentHandoff),[O,Y]=await Promise.all([w.pathExists(g),w.pathExists(f)]);if(O!==Y)throw new Error(`Goal Pack instance is incomplete and cannot be resumed: ${n.id}`);if(!O)return;let[v,S]=await Promise.all([w.readJson(g),w.readJson(f)]);a$1(v,X,"Persisted Goal Pack"),a$1(S,B,"Persisted goal agent handoff");let H=a({...P,generatedAt:v.generatedAt},o);if(v.id!==n.id||S.goalId!==n.id||c$1(v)!==c$1(H.goalPack)||c$1(S)!==c$1(H.handoff))throw new Error(`Goal Pack instance failed immutable integrity validation: ${n.id}`);n=v,s=S,d$2=true;};if(t.dryRun)await E();else {let g=`.workspai/goals/${n.id}/publication`;await c$2(a$2,g,async()=>{await E();let f=we(await ke(a$2),n,new Date().toISOString());a$1(f,Q,"Goal index"),h(f),await f$1(a$2,d$1,d$2?[{relativePath:d$1,payload:n},{relativePath:f$2,payload:f}]:[{relativePath:n.artifacts.goalPack,payload:n},{relativePath:n.artifacts.agentHandoff,payload:s},{relativePath:d$1,payload:n},{relativePath:f$2,payload:f}]);});}let A=[n.artifacts.goalPack,n.artifacts.agentHandoff,d$1,f$2],L={schemaVersion:c$3,result:n.state==="needs-confirmation"?"needs-confirmation":n.state==="blocked"?"blocked":n.state==="needs-evidence"?"needs-evidence":"planned",resolution:{source:e$1.source,invocationScope:e$1.projectPath?"project":"workspace"},goalPack:n,agentHandoff:s,writtenArtifacts:t.dryRun?[]:d$2?[d$1,f$2]:A,dryRun:t.dryRun===true,resumed:d$2};return a$1(L,de,"Goal plan result"),L}export{Le as planGoalPack};
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ type ProjectGroundingMode = (typeof PROJECT_GROUNDING_MODE_VALUES)[number];
|
|
|
14
14
|
interface AdoptProjectFilePreimage {
|
|
15
15
|
path: string;
|
|
16
16
|
contents: Buffer | null;
|
|
17
|
+
preserve?: 'symbolic-link';
|
|
17
18
|
}
|
|
18
19
|
interface AdoptProjectRollbackSnapshot {
|
|
19
20
|
workspacePath: string;
|
|
@@ -48,6 +49,7 @@ declare function getPublishedContractVersions(): {
|
|
|
48
49
|
workspaceArchiveOperationResult: "workspai-workspace-archive-operation-result-v1";
|
|
49
50
|
ingestionPlan: "workspai.ingestion-plan.v1";
|
|
50
51
|
ingestionResult: "workspai.ingestion-result.v1";
|
|
52
|
+
adoptEffects: "workspai.adopt-effects.v1";
|
|
51
53
|
projectEntryCapability: string;
|
|
52
54
|
projectWorkspaceLink: "project-workspace-link.v1";
|
|
53
55
|
projectWorkspaceResolution: "project-workspace-resolution.v1";
|
|
@@ -63,6 +65,11 @@ declare function getPublishedContractVersions(): {
|
|
|
63
65
|
projectTestCoverage: "workspai.project-test-coverage.v1";
|
|
64
66
|
verifiedGoal: string;
|
|
65
67
|
verifiedGoalStatus: "workspai.verified-goal-status.v1";
|
|
68
|
+
goalPack: "workspai.goal-pack.v1";
|
|
69
|
+
goalAgentHandoff: "workspai.goal-agent-handoff.v1";
|
|
70
|
+
goalPlanResult: "workspai.goal-plan-result.v1";
|
|
71
|
+
goalIndex: "workspai.goal-index.v1";
|
|
72
|
+
goalLifecycleResult: "workspai.goal-lifecycle-result.v1";
|
|
66
73
|
workspaceIntelligenceArchitecture: string;
|
|
67
74
|
workspaceIntelligenceChain: "workspai-workspace-intelligence-chain-v1";
|
|
68
75
|
workspaceIntelligenceArtifacts: {
|
|
@@ -246,6 +253,7 @@ declare function getVersionContract(): {
|
|
|
246
253
|
workspaceArchiveOperationResult: "workspai-workspace-archive-operation-result-v1";
|
|
247
254
|
ingestionPlan: "workspai.ingestion-plan.v1";
|
|
248
255
|
ingestionResult: "workspai.ingestion-result.v1";
|
|
256
|
+
adoptEffects: "workspai.adopt-effects.v1";
|
|
249
257
|
projectEntryCapability: string;
|
|
250
258
|
projectWorkspaceLink: "project-workspace-link.v1";
|
|
251
259
|
projectWorkspaceResolution: "project-workspace-resolution.v1";
|
|
@@ -261,6 +269,11 @@ declare function getVersionContract(): {
|
|
|
261
269
|
projectTestCoverage: "workspai.project-test-coverage.v1";
|
|
262
270
|
verifiedGoal: string;
|
|
263
271
|
verifiedGoalStatus: "workspai.verified-goal-status.v1";
|
|
272
|
+
goalPack: "workspai.goal-pack.v1";
|
|
273
|
+
goalAgentHandoff: "workspai.goal-agent-handoff.v1";
|
|
274
|
+
goalPlanResult: "workspai.goal-plan-result.v1";
|
|
275
|
+
goalIndex: "workspai.goal-index.v1";
|
|
276
|
+
goalLifecycleResult: "workspai.goal-lifecycle-result.v1";
|
|
264
277
|
workspaceIntelligenceArchitecture: string;
|
|
265
278
|
workspaceIntelligenceChain: "workspai-workspace-intelligence-chain-v1";
|
|
266
279
|
workspaceIntelligenceArtifacts: {
|
|
@@ -438,6 +451,7 @@ declare function getGlobalCommandCapabilities(): {
|
|
|
438
451
|
workspaceArchiveOperationResult: "workspai-workspace-archive-operation-result-v1";
|
|
439
452
|
ingestionPlan: "workspai.ingestion-plan.v1";
|
|
440
453
|
ingestionResult: "workspai.ingestion-result.v1";
|
|
454
|
+
adoptEffects: "workspai.adopt-effects.v1";
|
|
441
455
|
projectEntryCapability: string;
|
|
442
456
|
projectWorkspaceLink: "project-workspace-link.v1";
|
|
443
457
|
projectWorkspaceResolution: "project-workspace-resolution.v1";
|
|
@@ -453,6 +467,11 @@ declare function getGlobalCommandCapabilities(): {
|
|
|
453
467
|
projectTestCoverage: "workspai.project-test-coverage.v1";
|
|
454
468
|
verifiedGoal: string;
|
|
455
469
|
verifiedGoalStatus: "workspai.verified-goal-status.v1";
|
|
470
|
+
goalPack: "workspai.goal-pack.v1";
|
|
471
|
+
goalAgentHandoff: "workspai.goal-agent-handoff.v1";
|
|
472
|
+
goalPlanResult: "workspai.goal-plan-result.v1";
|
|
473
|
+
goalIndex: "workspai.goal-index.v1";
|
|
474
|
+
goalLifecycleResult: "workspai.goal-lifecycle-result.v1";
|
|
456
475
|
workspaceIntelligenceArchitecture: string;
|
|
457
476
|
workspaceIntelligenceChain: "workspai-workspace-intelligence-chain-v1";
|
|
458
477
|
workspaceIntelligenceArtifacts: {
|
|
@@ -574,8 +593,8 @@ declare function getGlobalCommandCapabilities(): {
|
|
|
574
593
|
};
|
|
575
594
|
workspace: {
|
|
576
595
|
command: string;
|
|
577
|
-
subcommands: ("archive" | "snapshot" | "list" | "import" | "init" | "sync" | "agent-sync" | "contract" | "model" | "share" | "remediation-plan" | "run" | "diff" | "impact" | "verify" | "explain" | "why" | "trace" | "registry" | "foundation" | "intelligence" | "
|
|
578
|
-
intelligenceSubcommands: ("snapshot" | "agent-sync" | "contract" | "model" | "remediation-plan" | "diff" | "impact" | "verify" | "explain" | "why" | "trace" | "intelligence" | "
|
|
596
|
+
subcommands: ("archive" | "snapshot" | "list" | "import" | "goal" | "init" | "sync" | "agent-sync" | "contract" | "model" | "share" | "remediation-plan" | "run" | "diff" | "impact" | "verify" | "explain" | "why" | "trace" | "registry" | "foundation" | "intelligence" | "graph" | "watch" | "context" | "repair" | "feedback" | "eval" | "mcp" | "policy" | "export" | "hydrate" | "connect")[];
|
|
597
|
+
intelligenceSubcommands: ("snapshot" | "goal" | "agent-sync" | "contract" | "model" | "remediation-plan" | "diff" | "impact" | "verify" | "explain" | "why" | "trace" | "intelligence" | "graph" | "watch" | "context" | "repair" | "feedback" | "eval" | "mcp")[];
|
|
579
598
|
};
|
|
580
599
|
commandMap: any;
|
|
581
600
|
runtimeInventory: RuntimeCommandInventoryPayload;
|