workspai 0.48.0 → 0.49.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 +70 -54
- package/contracts/cli-runtime-command-inventory.v1.snapshot.json +4 -0
- package/contracts/extension-cli-compatibility.v1.json +2 -1
- package/contracts/published-contract-catalog.v1.json +5 -0
- package/contracts/runtime-command-surface.v1.json +18 -2
- package/contracts/workspace-intelligence/workspace-graph-stream.v1.json +262 -0
- package/dist/autopilot-release-R4XRTWEM.js +1 -0
- package/dist/{chunk-I46XEIPL.js → chunk-EKZLUMCS.js} +2 -2
- package/dist/{chunk-5S3DJQEP.js → chunk-K4X3DM7R.js} +1 -1
- package/dist/{chunk-Y5UJLPS4.js → chunk-TIE2XMGH.js} +2 -2
- package/dist/{create-DBQNAMKP.js → create-S64IWHAP.js} +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +108 -108
- package/dist/{pipeline-TQM43A3K.js → pipeline-LHTPE3DR.js} +1 -1
- package/dist/{workspace-NCWRINEF.js → workspace-PJPRBUMQ.js} +1 -1
- package/dist/{workspace-foundation-WXJ6I7ES.js → workspace-foundation-WPLD7OEO.js} +1 -1
- package/dist/workspace-graph-stream-KAGGQPJT.js +1 -0
- package/dist/{workspace-intelligence-runner-THYLHHMF.js → workspace-intelligence-runner-OTYTHV6B.js} +1 -1
- package/dist/workspace-run-QND2SIYA.js +1 -0
- package/dist/workspace-watch-7HWGA5TF.js +1 -0
- package/docs/OPEN_SOURCE_USER_SCENARIOS.md +11 -8
- package/docs/README.md +45 -13
- package/docs/README_CONTENT_CONTRACT.md +1 -1
- package/docs/ci-workflows.md +3 -3
- package/docs/commands-reference.md +2 -2
- package/docs/contracts/ARTIFACT_CATALOG.md +7 -1
- package/docs/creating-workspaces-and-projects.md +16 -12
- package/docs/doctor-command.md +30 -28
- package/docs/examples/ci-agent-grounding.yml +1 -1
- package/docs/from-code-to-shared-understanding.md +2 -2
- package/docs/workspace-intelligence-evaluation.md +8 -6
- package/docs/workspace-intelligence-runner.md +17 -6
- package/docs/workspace-operations.md +13 -5
- package/package.json +9 -4
- package/templates/kits/fastapi-ddd/README.md.j2 +1 -1
- package/dist/autopilot-release-XGVXPOZI.js +0 -1
- package/dist/workspace-run-RLIYSOTN.js +0 -1
- package/dist/workspace-watch-3BPGLFLB.js +0 -1
- /package/dist/{chunk-QNONOO4F.js → chunk-E2KJ5QWY.js} +0 -0
|
@@ -2,7 +2,7 @@ import {c as c$2}from'./chunk-YJZOMRAS.js';import {a as a$2}from'./chunk-GZTYAEW
|
|
|
2
2
|
`);}async function Z(e,r){let t=p.dirname(e);await promises.mkdir(t,{recursive:true});let o=`${e}.${process.pid}.${randomUUID()}.tmp`;try{await promises.writeFile(o,r);let a=await promises.open(o,"r");try{await K(a);}finally{await a.close();}try{await promises.rename(o,e);}catch(s){let i=s.code;if(i!=="EEXIST"&&i!=="EPERM")throw s;await ae.move(o,e,{overwrite:true});}}finally{await promises.rm(o,{force:true}).catch(()=>{});}}async function Y(e){try{return {exists:true,content:await promises.readFile(e)}}catch(r){if(r.code==="ENOENT")return {exists:false};throw r}}async function H(e,r){if(!r.exists){await promises.rm(e,{force:true});return}await Z(e,r.content);}async function le(e,r){let t=p.join(e,"workspaces.json.lock"),o=randomUUID();await promises.mkdir(e,{recursive:true});let a=Date.now(),s;for(;!s;)try{s=await promises.open(t,"wx"),await s.writeFile(`${JSON.stringify({pid:process.pid,lockId:o,createdAt:new Date().toISOString()})}
|
|
3
3
|
`),await K(s);}catch(i){if(i.code!=="EEXIST")throw i;let n=await promises.stat(t).catch(()=>null);if(n&&Date.now()-n.mtimeMs>3e4){let d=await promises.readFile(t,"utf8").then(m=>JSON.parse(m)).catch(()=>null),u=Number(d?.pid),f=false;if(Number.isInteger(u)&&u>0)try{process.kill(u,0),f=true;}catch(m){f=m.code==="EPERM";}if(!f){await promises.rm(t,{force:true}).catch(()=>{});continue}}if(Date.now()-a>1e4)throw new Error(`Timed out waiting for workspace registry lock: ${t}`);await new Promise(d=>setTimeout(d,25));}try{return await r()}finally{await s.close().catch(()=>{}),await promises.readFile(t,"utf8").then(n=>JSON.parse(n).lockId===o).catch(()=>false)&&await promises.rm(t,{force:true}).catch(()=>{});}}async function P(e){let r$1=p$2(),t=p.join(r$1,"workspaces.json"),o=p.join(q(),"workspaces.json"),a=[...new Set(r())];return le(r$1,async()=>{let[s,i]=await Promise.all([Y(t),Y(o)]),n=await ce(a);await e(n);let d=W(n);try{await V(t,d),await V(o,d);}catch(u){let m=(await Promise.allSettled([H(t,s),H(o,i)])).filter(g=>g.status==="rejected").map(g=>g.reason);throw m.length>0?new AggregateError([u,...m],"Workspace registry transaction failed and could not be fully restored"):u}return d})}async function ee(e,r){let t=a(e);await P(o=>{let a=o.workspaces.find(s=>s.path===t);if(a){a.name=r,a.mode=a.mode||"full",a.projects=Array.isArray(a.projects)?a.projects:[];return}o.workspaces.push({name:r,path:t,mode:"full",projects:[]});});}async function de(e,r){try{await ee(e,r);}catch{console.warn(c.gray("Note: Could not register workspace in shared registry"));}}async function Fe(e,r=false){let t=a(e),o={workspacePath:t,workspaceFound:false,added:[],skipped:0};try{let a$1=await B(),s=a$1.workspaces.find(g=>g.path===t);if(!s){if(await de(t,p.basename(p.resolve(e))),a$1=await B(),s=a$1.workspaces.find(g=>g.path===t),!s)return r||console.log("\u26A0\uFE0F Workspace could not be registered in registry"),o;r||console.log("\u2714 Registered workspace in shared registry");}Array.isArray(s.projects)||(s.projects=[]);let i=0,n=0,d=[],u=[],f=[e],m=new Set;for(;f.length>0;){let g=f.shift();if(!g||m.has(g))continue;m.add(g);let y=await promises.readdir(g,{withFileTypes:true});for(let h of y){if(!h.isDirectory()||h.name.startsWith(".")||["node_modules","dist","build","target","coverage","htmlcov"].includes(h.name))continue;let j=p.join(g,h.name),k=a(j);try{let w=false;for(let $ of [...p$1(k,"context.json"),...p$1(k,"project.json")])try{await promises.access($),w=true;break}catch{}if(w){let $=p.basename(k),E=s.projects.some(C=>C.path===k);u.push({name:$,path:k}),E?n++:(s.projects.push({name:$,path:k}),i++,d.push(k),r||console.log(`\u2714 Added: ${p.relative(e,k)}`));continue}}catch{}f.push(j);}}return await P(g=>{let y=g.workspaces.find(k=>k.path===t);if(!y)return;let h=`${t}${p.sep}`,j=(y.projects||[]).filter(k=>k.path!==t&&!k.path.startsWith(h));y.projects=Q({...y,projects:[...j,...u]}).projects;}),i>0?r||console.log(`
|
|
4
4
|
\u2705 Synced ${i} project(s) to registry`):r||console.log(`
|
|
5
|
-
\u2705 All projects already registered (${n} found)`),{workspacePath:t,workspaceFound:true,added:d,skipped:n}}catch(a){return r||console.error("\u274C Failed to sync projects:",a.message),o}}async function me(e,r,t){let o=a(e),a$1=a(t);await P(s=>{let i=s.workspaces.find(u=>u.path===o);if(!i)throw new Error(`Workspace is not registered: ${o}`);i.projects=Array.isArray(i.projects)?i.projects:[];let n=i.projects.findIndex(u=>u.path===a$1||u.name===r),d={name:r,path:a$1};n>=0?i.projects[n]=d:i.projects.push(d);});}async function Be(e,r,t){try{await me(e,r,t);}catch{}}async function Te(e,r){let t=S("Creating Workspai workspace...").start();try{await promises.mkdir(e,{recursive:true}),await promises.mkdir(p.join(e,".workspai"),{recursive:true});let o={workspace_name:r.name,author:r.author,rapidkit_version:c$1(),created_at:new Date().toISOString(),type:"workspace"};await promises.writeFile(p.join(e,".workspai","config.json"),JSON.stringify(o,null,2));let{syncWorkspaceFoundationFiles:a}=await import('./create-
|
|
5
|
+
\u2705 All projects already registered (${n} found)`),{workspacePath:t,workspaceFound:true,added:d,skipped:n}}catch(a){return r||console.error("\u274C Failed to sync projects:",a.message),o}}async function me(e,r,t){let o=a(e),a$1=a(t);await P(s=>{let i=s.workspaces.find(u=>u.path===o);if(!i)throw new Error(`Workspace is not registered: ${o}`);i.projects=Array.isArray(i.projects)?i.projects:[];let n=i.projects.findIndex(u=>u.path===a$1||u.name===r),d={name:r,path:a$1};n>=0?i.projects[n]=d:i.projects.push(d);});}async function Be(e,r,t){try{await me(e,r,t);}catch{}}async function Te(e,r){let t=S("Creating Workspai workspace...").start();try{await promises.mkdir(e,{recursive:true}),await promises.mkdir(p.join(e,".workspai"),{recursive:true});let o={workspace_name:r.name,author:r.author,rapidkit_version:c$1(),created_at:new Date().toISOString(),type:"workspace"};await promises.writeFile(p.join(e,".workspai","config.json"),JSON.stringify(o,null,2));let{syncWorkspaceFoundationFiles:a}=await import('./create-S64IWHAP.js');await a(e,{workspaceName:r.name,installMethod:"venv",writeMarker:true,writeGitignore:false,onlyIfMissing:true});let s=ge();await promises.writeFile(p.join(e,"rapidkit"),s),await promises.chmod(p.join(e,"rapidkit"),493);let i=ue();await promises.writeFile(p.join(e,"rapidkit.cmd"),i);let n=we(r.name);await promises.writeFile(p.join(e,"README.md"),n),await promises.writeFile(p.join(e,".gitignore"),`# Workspai workspace
|
|
6
6
|
.env
|
|
7
7
|
.env.*
|
|
8
8
|
!.env.example
|
|
@@ -516,7 +516,7 @@ instructions start at \`AGENTS.md\`.
|
|
|
516
516
|
## Learn More
|
|
517
517
|
|
|
518
518
|
- [Workspai Documentation](https://workspai.dev)
|
|
519
|
-
- [GitHub Repository](https://github.com/
|
|
519
|
+
- [GitHub Repository](https://github.com/chistiq/workspai)
|
|
520
520
|
`}async function fe(e){let{fileURLToPath:r}=await import('url'),t=r(import.meta.url),o=p.dirname(t),a=p.resolve(o,".."),s=p.join(a,"templates","kits"),i=p.join(e,".workspai","templates"),{default:n}=await import('fs-extra');await n.copy(s,i);let d=p.join(a,"templates","generator.js"),u=p.join(e,".workspai","generator.js");await n.copy(d,u);}async function Je(e,r){let t=r.template==="fastapi",o=t?"FastAPI":"NestJS",a=S(`Creating ${o} project...`).start();try{let{fileURLToPath:s}=await import('url'),i=s(import.meta.url),n=p.dirname(i),d=p.resolve(n,".."),u=t?"fastapi-standard":"nestjs-standard",f=p.join(d,"templates","kits",u);await promises.mkdir(e,{recursive:true});let m={project_name:t?r.name.replace(/-/g,"_").toLowerCase():r.name.replace(/_/g,"-").toLowerCase(),author:r.author,description:r.description||`${o} application generated with Workspai`,app_version:"0.1.0",license:"MIT",package_manager:r.package_manager||"npm",created_at:new Date().toISOString(),rapidkit_version:c$1()};await te(f,e,m);let g=t?`# Python
|
|
521
521
|
__pycache__/
|
|
522
522
|
*.py[cod]
|
|
@@ -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-EKZLUMCS.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -78,6 +78,7 @@ declare function getPublishedContractVersions(): {
|
|
|
78
78
|
workspaceContext: "workspace-context.v1";
|
|
79
79
|
workspaceDependencyGraph: "workspace-dependency-graph.v1";
|
|
80
80
|
workspaceKnowledgeGraph: "workspace-knowledge-graph.v1";
|
|
81
|
+
workspaceGraphStream: "workspace-graph-stream.v1";
|
|
81
82
|
workspaceKnowledgeGraphChangeOverlay: "workspace-knowledge-graph-change-overlay.v1";
|
|
82
83
|
workspaceKnowledgeSearch: "workspace-knowledge-search.v1";
|
|
83
84
|
workspaceGraphTokenEfficiency: "workspace-graph-token-efficiency.v1";
|
|
@@ -233,6 +234,7 @@ declare function getVersionContract(): {
|
|
|
233
234
|
workspaceContext: "workspace-context.v1";
|
|
234
235
|
workspaceDependencyGraph: "workspace-dependency-graph.v1";
|
|
235
236
|
workspaceKnowledgeGraph: "workspace-knowledge-graph.v1";
|
|
237
|
+
workspaceGraphStream: "workspace-graph-stream.v1";
|
|
236
238
|
workspaceKnowledgeGraphChangeOverlay: "workspace-knowledge-graph-change-overlay.v1";
|
|
237
239
|
workspaceKnowledgeSearch: "workspace-knowledge-search.v1";
|
|
238
240
|
workspaceGraphTokenEfficiency: "workspace-graph-token-efficiency.v1";
|
|
@@ -382,6 +384,7 @@ declare function getGlobalCommandCapabilities(): {
|
|
|
382
384
|
workspaceContext: "workspace-context.v1";
|
|
383
385
|
workspaceDependencyGraph: "workspace-dependency-graph.v1";
|
|
384
386
|
workspaceKnowledgeGraph: "workspace-knowledge-graph.v1";
|
|
387
|
+
workspaceGraphStream: "workspace-graph-stream.v1";
|
|
385
388
|
workspaceKnowledgeGraphChangeOverlay: "workspace-knowledge-graph-change-overlay.v1";
|
|
386
389
|
workspaceKnowledgeSearch: "workspace-knowledge-search.v1";
|
|
387
390
|
workspaceGraphTokenEfficiency: "workspace-graph-token-efficiency.v1";
|