workspai 0.74.0 → 0.75.1
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/contracts/agent-framework-capabilities.v1.json +454 -0
- package/contracts/cli-runtime-command-inventory.v1.snapshot.json +166 -0
- package/contracts/create-planner-capabilities.v1.json +24 -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 +71 -1
- package/contracts/workspace-intelligence/agent-framework-adapter-manifest.v1.json +2127 -0
- package/contracts/workspace-intelligence/agent-framework-admission-candidate.v1.json +193 -0
- package/contracts/workspace-intelligence/agent-framework-change-plan.v1.json +280 -0
- package/contracts/workspace-intelligence/agent-framework-conformance-report.v1.json +269 -0
- package/contracts/workspace-intelligence/agent-framework-ownership-receipt.v1.json +147 -0
- package/contracts/workspace-intelligence/workspace-model.v1.json +4 -0
- package/contracts/workspace-intelligence-architecture.v1.json +28 -2
- package/dist/analyze-Z3EZNJRI.js +1 -0
- package/dist/{artifact-remediation-plan-OVTQM7HN.js → artifact-remediation-plan-HD5K52UJ.js} +1 -1
- package/dist/autopilot-release-T6XFRWZT.js +1 -0
- package/dist/capabilities-command-VK3LQLP2.js +1 -0
- package/dist/{chunk-UHT2SW7O.js → chunk-25V5XMWB.js} +1 -1
- package/dist/chunk-2CT5SN2L.js +2 -0
- package/dist/chunk-2GWQ6NZV.js +1 -0
- package/dist/{chunk-KCIET26G.js → chunk-2OCJKLTW.js} +1 -1
- package/dist/{chunk-SAZXL36B.js → chunk-3WQ5TYCO.js} +1 -1
- package/dist/chunk-4VSQNSGH.js +9 -0
- package/dist/chunk-566NQQTJ.js +97 -0
- package/dist/chunk-5EEXLM45.js +1 -0
- package/dist/chunk-65AE7EC5.js +2 -0
- package/dist/{chunk-PKKSRXUS.js → chunk-6B7L4NZE.js} +1 -1
- package/dist/{chunk-BTJPTJLT.js → chunk-6KMR5PKQ.js} +3 -3
- package/dist/chunk-6NSJBKKK.js +4 -0
- package/dist/chunk-7NKM6EHE.js +7 -0
- package/dist/chunk-ABUSBLBH.js +1 -0
- package/dist/{chunk-TVSMNF5G.js → chunk-AICCXYY5.js} +4 -4
- package/dist/{chunk-FE5R6EUV.js → chunk-BLEIUQL6.js} +1 -1
- package/dist/{chunk-37SWTS2B.js → chunk-BR6QIYQS.js} +1 -1
- package/dist/chunk-CMLLERGG.js +418 -0
- package/dist/{chunk-MGL6DBOR.js → chunk-COOVCORC.js} +1 -1
- package/dist/chunk-DFREJHG7.js +1 -0
- package/dist/{chunk-C43NXRRE.js → chunk-DJH2CH42.js} +1 -1
- package/dist/chunk-FU6SQ2ND.js +1 -0
- package/dist/{chunk-IQFXLJIM.js → chunk-HDISUL3F.js} +1 -1
- package/dist/{chunk-JK6XEF7K.js → chunk-JKAAKE4Z.js} +1 -1
- package/dist/{chunk-G6ADWA2B.js → chunk-M6DVNC6X.js} +1 -1
- package/dist/chunk-NGZF4YJS.js +2 -0
- package/dist/{chunk-4JJDDL3X.js → chunk-NI5QWBZK.js} +1 -1
- package/dist/{chunk-3WHE7V4M.js → chunk-NLRZFIC6.js} +1 -1
- package/dist/{chunk-5Y4YRYZI.js → chunk-NRIMJMTF.js} +8 -8
- package/dist/{chunk-EBQS5T7Q.js → chunk-OA2YJN22.js} +1 -1
- package/dist/chunk-OH6LV5JP.js +6 -0
- package/dist/chunk-PTI743SC.js +7 -0
- package/dist/{chunk-TBOIXIQA.js → chunk-QBKOPXKC.js} +1 -1
- package/dist/chunk-RTD5D35M.js +13 -0
- package/dist/{chunk-XVTN5DDV.js → chunk-RU3UT7GJ.js} +1 -1
- package/dist/{chunk-DPC5DKH6.js → chunk-SCKEFXF5.js} +1 -1
- package/dist/chunk-UE7ART6X.js +1 -0
- package/dist/{chunk-FY4X2VOE.js → chunk-VHMDWRDG.js} +2 -2
- package/dist/chunk-VJQPIH2S.js +681 -0
- package/dist/{chunk-H333GKL4.js → chunk-W7I65IXY.js} +1 -1
- package/dist/{chunk-ZNKZ2KXR.js → chunk-WPPRUFJW.js} +1 -1
- package/dist/{chunk-HAZGSAKP.js → chunk-ZI54C2AO.js} +1 -1
- package/dist/{create-EKA2QG5R.js → create-P4XJVZCL.js} +1 -1
- package/dist/{demo-kit-RKTHTXHJ.js → demo-kit-ALW6OSQV.js} +1 -1
- package/dist/{doctor-BXSNADVR.js → doctor-PFN6KB6P.js} +1 -1
- package/dist/{dotnet-webapi-clean-VJX6SGGP.js → dotnet-webapi-clean-6Z4EXEJY.js} +1 -1
- package/dist/{goal-lifecycle-XXWNMIAD.js → goal-lifecycle-BDWTWS55.js} +1 -1
- package/dist/goal-pack-5JDNZFKV.js +1 -0
- package/dist/{gofiber-standard-I6ASLOEE.js → gofiber-standard-TDJQIVQZ.js} +1 -1
- package/dist/{gogin-standard-U2LSRLIP.js → gogin-standard-UEF3IHSJ.js} +1 -1
- package/dist/index.d.ts +18 -0
- package/dist/index.js +276 -251
- package/dist/{pipeline-JLOC2SUT.js → pipeline-OUYS4ZYV.js} +1 -1
- package/dist/{project-agent-entry-ZNUHGCVC.js → project-agent-entry-75WO3QWP.js} +1 -1
- package/dist/{project-intelligence-lens-W72OUEDW.js → project-intelligence-lens-JCHFOIA7.js} +1 -1
- package/dist/{project-test-coverage-5PXAHBYQ.js → project-test-coverage-3P5FH6E5.js} +1 -1
- package/dist/proof-carrying-change-LAYV4LTI.js +1 -0
- package/dist/{pythonRapidkitExec-44ORGQ4R.js → pythonRapidkitExec-UMFLDIYR.js} +1 -1
- package/dist/{rust-axum-JMV7UPO7.js → rust-axum-4TRVPFMB.js} +1 -1
- package/dist/{springboot-standard-OC2RS3KC.js → springboot-standard-COWL75GT.js} +1 -1
- package/dist/verified-goal-75KGBWTE.js +1 -0
- package/dist/{workspace-XTIGVLGH.js → workspace-CBQDOUSH.js} +1 -1
- package/dist/{workspace-agent-sync-TN6QDNBR.js → workspace-agent-sync-RTOTO3DY.js} +1 -1
- package/dist/{workspace-archive-OSMU3CK6.js → workspace-archive-3AURTMYA.js} +1 -1
- package/dist/{workspace-context-Y3TNY2XZ.js → workspace-context-STRZO2N3.js} +1 -1
- package/dist/{workspace-contract-GRZY7WRD.js → workspace-contract-PMHUUKFM.js} +1 -1
- package/dist/{workspace-explain-KUYHJFLY.js → workspace-explain-CATMJUMN.js} +1 -1
- package/dist/{workspace-feedback-D6HJLKBQ.js → workspace-feedback-FF34CSJE.js} +1 -1
- package/dist/{workspace-foundation-ZBUJTR56.js → workspace-foundation-OULCDCXG.js} +1 -1
- package/dist/{workspace-graph-stream-KC2XUAE4.js → workspace-graph-stream-Q55CI4K4.js} +1 -1
- package/dist/{workspace-history-WWPS4U7H.js → workspace-history-EQG5UBKW.js} +1 -1
- package/dist/{workspace-intelligence-26YT6KMN.js → workspace-intelligence-3RPZRWSF.js} +1 -1
- package/dist/{workspace-intelligence-benchmark-QFVTUBDO.js → workspace-intelligence-benchmark-R5MEGJQS.js} +1 -1
- package/dist/{workspace-intelligence-runner-HVYKHCTX.js → workspace-intelligence-runner-BNZUYUUN.js} +1 -1
- package/dist/{workspace-knowledge-graph-RL3I2FHY.js → workspace-knowledge-graph-VJLD35ES.js} +1 -1
- package/dist/workspace-knowledge-graph-snapshot-TQAKDDUA.js +1 -0
- package/dist/workspace-mcp-serve-67NTYD67.js +3 -0
- package/dist/workspace-model-6TKZMNEF.js +1 -0
- package/dist/{workspace-onboarding-BY6RUBBH.js → workspace-onboarding-7V7EH3RH.js} +1 -1
- package/dist/{workspace-readme-HA6XLDME.js → workspace-readme-4FCKAQME.js} +1 -1
- package/dist/{workspace-registry-summary-VKTJ7PHV.js → workspace-registry-summary-ILVO7DEU.js} +1 -1
- package/dist/{workspace-repair-engine-RBM7NCGI.js → workspace-repair-engine-2VGFB3DJ.js} +1 -1
- package/dist/workspace-run-X7KV6MIT.js +1 -0
- package/dist/{workspace-verify-NFJ7RKKT.js → workspace-verify-VQWYDAF2.js} +1 -1
- package/dist/workspace-watch-2Z636HWS.js +1 -0
- package/docs/README.md +4 -1
- package/docs/agent-framework-adapters.md +279 -0
- package/docs/ci-workflows.md +15 -8
- package/docs/commands-reference.md +22 -0
- package/docs/contracts/COMMAND_OWNERSHIP_MATRIX.md +5 -0
- package/docs/creating-workspaces-and-projects.md +18 -4
- package/docs/workspace-operations.md +12 -2
- package/package.json +7 -1
- package/scripts/enterprise-package-smoke.mjs +98 -0
- package/dist/analyze-IA33T6MY.js +0 -1
- package/dist/autopilot-release-T327V7QK.js +0 -1
- package/dist/capabilities-command-NFGX42CH.js +0 -1
- package/dist/chunk-46QH3ZVI.js +0 -105
- package/dist/chunk-5EVBOUYW.js +0 -3
- package/dist/chunk-773WUMFU.js +0 -681
- package/dist/chunk-D6BL7ARI.js +0 -2
- package/dist/chunk-DLLHUG2Q.js +0 -9
- package/dist/chunk-DTLLIA2C.js +0 -1
- package/dist/chunk-FYR4FD7K.js +0 -1
- package/dist/chunk-H5DRKXXC.js +0 -2
- package/dist/chunk-IUOMBLRR.js +0 -2
- package/dist/chunk-K3FXRBER.js +0 -4
- package/dist/chunk-LEEOZRWR.js +0 -7
- package/dist/chunk-NCZJUPG5.js +0 -97
- package/dist/chunk-ND5YAC4T.js +0 -1
- package/dist/chunk-SVGUAVMG.js +0 -1
- package/dist/chunk-TGDXD4CD.js +0 -1
- package/dist/chunk-VLKX5U4H.js +0 -13
- package/dist/chunk-YYELANJO.js +0 -7
- package/dist/goal-pack-NTHYLISY.js +0 -1
- package/dist/proof-carrying-change-WLUPMUO7.js +0 -1
- package/dist/verified-goal-6O2JZOOR.js +0 -1
- package/dist/workspace-knowledge-graph-snapshot-JEJMRQZL.js +0 -1
- package/dist/workspace-mcp-serve-2FGRXJG4.js +0 -3
- package/dist/workspace-model-2ODVOWDQ.js +0 -1
- package/dist/workspace-run-JCA5WPCR.js +0 -1
- package/dist/workspace-watch-3DBBB6IP.js +0 -1
- /package/dist/{chunk-K33JJVQZ.js → chunk-VN2MKTQO.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a}from'./chunk-GR6442P7.js';import {a as a$1}from'./chunk-AFIFZTOY.js';import {
|
|
1
|
+
import {a}from'./chunk-GR6442P7.js';import {a as a$1}from'./chunk-AFIFZTOY.js';import {k as k$1,t as t$1,q as q$1,w}from'./chunk-VQZ5PI5J.js';import {t}from'./chunk-ODK4LCEL.js';import z from'crypto';import Y from'os';import l from'path';import {once}from'events';import {createWriteStream,createReadStream}from'fs';import*as Q from'readline';import {Transform,Readable}from'stream';import {pipeline}from'stream/promises';import {lookup}from'dns/promises';import T from'net';import p from'fs-extra';import*as ee from'yauzl';import*as te from'yazl';var qe="workspai-workspace-archive-capabilities-v1",q="workspai-workspace-archive-manifest-v1",k="workspai-workspace-archive-operation-result-v1";var K="contracts/workspace-archive-manifest.v1.json",Z="contracts/workspace-archive-operation-result.v1.json",Ke={archiveCompression:{signature:"--archive-compression <mode>",description:"Archive compression: store (default) or deflate",appliesTo:["export"]},maxDownloadSize:{signature:"--max-download-size <size>",description:"Maximum remote archive download size (secure default: 5gb)",appliesTo:["inspect","verify","doctor","hydrate","import"]},maxExpandedSize:{signature:"--max-expanded-size <size>",description:"Maximum expanded archive payload size (secure default: 20gb)",appliesTo:["inspect","verify","doctor","hydrate","import"]},downloadTimeoutMs:{signature:"--download-timeout-ms <ms>",description:"Remote archive download timeout in milliseconds; 0 disables it",appliesTo:["inspect","verify","doctor","hydrate","import"]},allowPrivateNetwork:{signature:"--allow-private-network",description:"Allow archive downloads from loopback/private networks (unsafe for untrusted input)",appliesTo:["inspect","verify","doctor","hydrate","import"]}};var A=".workspai/archive-manifest.json",R=".rapidkit/archive-manifest.json",de="workspai.workspace.archive",ye=300*1e3,ve=5*1024*1024*1024,we=20*1024*1024*1024,J=2e5,ge=5*1024*1024*1024,ke=1e3,M=5,Ee=64*1024*1024;function Ae(r){let t=r.toLowerCase().split("%")[0];if(T.isIPv4(t)){let e=t.split(".").map(Number);return e[0]===0||e[0]===10||e[0]===127||e[0]===169&&e[1]===254||e[0]===172&&e[1]>=16&&e[1]<=31||e[0]===192&&e[1]===168||e[0]===100&&e[1]>=64&&e[1]<=127||e[0]>=224}return T.isIPv6(t)?t==="::"||t==="::1"||t.startsWith("fc")||t.startsWith("fd")||/^fe[89ab]/.test(t)||t.startsWith("ff")||t.startsWith("::ffff:127.")||t.startsWith("::ffff:10.")||t.startsWith("::ffff:192.168."):true}async function X(r,t){let e=new URL(r);if(e.protocol!=="https:"&&e.protocol!=="http:")throw new Error(`Workspace archive URL protocol is not supported: ${e.protocol}`);if(e.protocol!=="https:"&&!t)throw new Error("Remote workspace archives require HTTPS unless private-network access is explicitly enabled.");if(e.username||e.password)throw new Error("Workspace archive URL must not contain embedded credentials.");if(t)return e;let i=e.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(i==="localhost"||i.endsWith(".localhost"))throw new Error("Workspace archive URL resolves to a private or local network address.");let a=T.isIP(i)?[{address:i}]:await lookup(i,{all:true,verbatim:true});if(a.length===0||a.some(({address:s})=>Ae(s)))throw new Error("Workspace archive URL resolves to a private or local network address.");return e}async function Pe(r,t,e){let i=await X(r,e);for(let a=0;a<=M;a+=1){let s=await fetch(i,{signal:t,redirect:"manual",credentials:"omit"});if(![301,302,303,307,308].includes(s.status))return s;let n=s.headers.get("location");if(await s.body?.cancel(),!n)throw new Error("Workspace archive redirect is missing a Location header.");if(a===M)throw new Error(`Workspace archive download exceeded ${M} redirects.`);i=await X(new URL(n,i).href,e);}throw new Error("Workspace archive redirect policy failed.")}var We=new Set(["__pycache__",".venv","venv","node_modules",".git","dist","build","target",".pytest_cache",".mypy_cache",".ruff_cache","htmlcov",".next",".turbo",".cache"]),be=new Set([".DS_Store","Thumbs.db",".coverage","npm-debug.log","yarn-error.log","pnpm-debug.log","workspace-link.local.json","imported-projects.json","workspace-registry.v1.json"]),Se=[/^\.env$/i,/^\.env\.(?!example$|sample$|template$).+/i,/^.*\.pem$/i,/^.*\.key$/i,/^id_rsa$/i,/^id_ed25519$/i];function _(r){return r.replace(/\\/g,"/")}function re(r){return r.trim().replace(/\.workspai-archive\.zip$/i,"").replace(/\.rapidkit-archive\.zip$/i,"").replace(/\.zip$/i,"").trim().toLowerCase().replace(/[^a-z0-9._-]+/g,"-").replace(/-+/g,"-").replace(/^[-_.]+|[-_.]+$/g,"").slice(0,64)||"imported-workspace"}function ie(r){let t=_(r).trim();if(!t||t.startsWith("/")||t.startsWith("~")||/^[a-zA-Z]:\//.test(t)||t.includes("\0"))return false;let e=t.split("/").filter(Boolean);return e.length>0&&!e.some(i=>i===".."||i===".")}function ae(r){if(!ie(r))throw new Error(`Archive contains an unsafe path: ${r}`)}function Re(r,t){let e=l.relative(t,r);return e===""||!!e&&!e.startsWith("..")&&!l.isAbsolute(e)}function _e(r,t$1){let e=_(r),i=e.split("/").filter(Boolean);if(i.some((n,o)=>(n===".workspai"||n===".rapidkit")&&["cache","reports"].includes(i[o+1]||""))||i.some(n=>We.has(n)||a(n)))return true;let s=i[i.length-1]||"";return e===t.workspaceContract||e===".rapidkit/workspace.contract.json"||be.has(s)||/\.(?:workspai|rapidkit)-archive\.zip$/i.test(s)||!t$1?.includeEnv&&Se.some(n=>n.test(s))?true:s.endsWith(".pyc")||s.endsWith(".log")}async function Ce(r){for(let t of [l.join(r,".workspai","workspace.contract.json"),l.join(r,".rapidkit","workspace.contract.json")])if(await p.pathExists(t))try{return await p.readJson(t)}catch(e){throw new Error(`Workspace contract could not be inspected safely for archive portability: ${t}: ${e instanceof Error?e.message:String(e)}`)}return null}function xe(r){return (r?.projects??[]).filter(t=>typeof t.externalPath=="string"||typeof t.relativePath=="string"&&t.relativePath.startsWith("external/")).map(t=>({name:t.slug||t.relativePath||"external-project",relationship:["adopted","linked","imported","managed","restored"].includes(String(t.relationship))?t.relationship:"adopted",included:false,requiredAction:"relink"})).sort((t,e)=>t.name.localeCompare(e.name))}function Oe(r){if(r)return {...r,workspace:{...r.workspace},projects:r.projects.filter(t=>typeof t.externalPath!="string"&&!t.relativePath.startsWith("external/")).map(({externalPath:t,...e})=>({...e,modules:[...e.modules],ports:e.ports.map(i=>({...i})),contracts:{owns:[...e.contracts.owns],apis:e.contracts.apis.map(i=>({...i})),publishes:[...e.contracts.publishes],consumes:[...e.contracts.consumes],dependsOn:[...e.contracts.dependsOn],env:[...e.contracts.env]}}))}}async function*se(r,t,e){let i=(await p.readdir(t,{withFileTypes:true})).sort((a,s)=>a.name.localeCompare(s.name));for(let a of i){let s=l.join(t,a.name),n=_(l.relative(r,s));if(!(!n||_e(n,e))){if(a.isDirectory()){yield*se(r,s,e);continue}a.isFile()&&(yield {relativePath:n,fullPath:s});}}}async function ze(r){for(let t of t$1(r,"workspace.json"))try{let e=await p.readJson(t);if(typeof e.workspace_name=="string"&&e.workspace_name.trim())return e.workspace_name.trim();if(typeof e.name=="string"&&e.name.trim())return e.name.trim()}catch{}return l.basename(l.resolve(r))}async function Ne(r){let t=await p.stat(r.fullPath),e=z.createHash("sha256"),i=0;for await(let s of createReadStream(r.fullPath)){let n=Buffer.isBuffer(s)?s:Buffer.from(s);i+=n.length,e.update(n);}let a=await p.stat(r.fullPath);if(t.size!==a.size||t.mtimeMs!==a.mtimeMs||i!==a.size)throw new Error(`Workspace file changed while preparing archive: ${r.relativePath}`);return {...r,size:i,mtimeMs:a.mtimeMs,sha256:e.digest("hex")}}async function E(r,t){r.write(t)||await once(r,"drain");}async function ne(r){await new Promise((t,e)=>{r.once("error",e),r.end(t);});}async function*O(r){let t=Q.createInterface({input:createReadStream(r),crlfDelay:1/0});for await(let e of t){let i=e.trim();i&&(yield JSON.parse(i));}}async function Me(r){let t=createWriteStream(r.manifestPath,{flags:"wx"});try{await E(t,`{
|
|
2
2
|
`);for(let[i,a]of Object.entries(r.manifestBase))await E(t,` ${JSON.stringify(i)}: ${JSON.stringify(a,null,2)},
|
|
3
3
|
`);await E(t,` "files": [
|
|
4
4
|
`);let e=true;for await(let i of O(r.spoolPath)){let{mtimeMs:a,...s}=i;await E(t,`${e?"":`,
|