workspai 0.56.0 → 0.57.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 +36 -8
- package/contracts/adopt-effects.v1.json +72 -0
- package/contracts/cli-runtime-command-inventory.v1.snapshot.json +4 -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 +1 -0
- package/contracts/published-contract-catalog.v1.json +5 -0
- package/contracts/workspace-intelligence/doctor-summary.v1.json +3 -1
- package/dist/autopilot-release-WIFFFQKW.js +1 -0
- package/dist/capabilities-command-44JVOE5S.js +1 -0
- package/dist/{chunk-XH7PDHBF.js → chunk-6OFGLNFS.js} +1 -1
- package/dist/{chunk-QTCZPS5I.js → chunk-75HOCFNH.js} +1 -1
- package/dist/{chunk-5RL254O2.js → chunk-7WUT5ZSO.js} +1 -1
- package/dist/{chunk-KR7CIEQR.js → chunk-AA4PNQKR.js} +1 -1
- package/dist/chunk-CNWUIXF3.js +1 -0
- package/dist/{chunk-6HCAGHCY.js → chunk-DF4NWPB7.js} +1 -1
- package/dist/chunk-DT4X7I5M.js +81 -0
- package/dist/chunk-GDKFN3CM.js +8 -0
- package/dist/{chunk-WLCBXCZV.js → chunk-GTJY55QK.js} +1 -1
- package/dist/{chunk-5ZA4JYOP.js → chunk-GXTCU4WF.js} +1 -1
- package/dist/{chunk-SV2SP22H.js → chunk-IUYZ3NHS.js} +3 -3
- package/dist/{chunk-KS4FB5W7.js → chunk-IXOLHPTN.js} +1 -1
- package/dist/{chunk-2L4PSZQB.js → chunk-L36ZASME.js} +1 -1
- package/dist/{chunk-7PNARN6S.js → chunk-N2BIIUDH.js} +1 -1
- package/dist/{chunk-QFCKHUEP.js → chunk-P475BOJW.js} +1 -1
- package/dist/{chunk-5BGPGNRQ.js → chunk-QHY6F4SS.js} +1 -1
- package/dist/chunk-QK5QOXOE.js +13 -0
- package/dist/{chunk-QAF26ZQX.js → chunk-RPHM7LQW.js} +1 -1
- package/dist/chunk-SNO3WG4V.js +2 -0
- package/dist/chunk-TTFQWH55.js +91 -0
- package/dist/{chunk-HASVV34S.js → chunk-VL3APTVB.js} +1 -1
- package/dist/{chunk-WOTTSPSF.js → chunk-VUR7H2FU.js} +1 -1
- package/dist/chunk-VZPWIILU.js +1 -0
- package/dist/chunk-WP3CXMVA.js +2 -0
- package/dist/{chunk-ESWFBSYM.js → chunk-Z57G62KE.js} +1 -1
- package/dist/{create-DLUWG46F.js → create-O2KLTN5H.js} +1 -1
- package/dist/{doctor-IZ4YOCYE.js → doctor-AL5YWO5X.js} +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +166 -164
- package/dist/{pipeline-IBQYDLFF.js → pipeline-4ST4BQWY.js} +1 -1
- package/dist/{project-intelligence-lens-SIU7IXKG.js → project-intelligence-lens-JHYECYOK.js} +1 -1
- package/dist/{verified-goal-M4GPOXNL.js → verified-goal-KFNRGOKT.js} +1 -1
- package/dist/{workspace-3AAOUELG.js → workspace-O4E5CCGK.js} +1 -1
- package/dist/{workspace-agent-sync-QGYLY7HH.js → workspace-agent-sync-N5DPGU2E.js} +1 -1
- package/dist/{workspace-context-JCLPRYNC.js → workspace-context-ETZNEHOJ.js} +1 -1
- package/dist/{workspace-contract-IUUPBQXU.js → workspace-contract-OSI7NBXS.js} +1 -1
- package/dist/{workspace-explain-CZGBVDE6.js → workspace-explain-EM7IUV6L.js} +1 -1
- package/dist/{workspace-foundation-7IGMO4CW.js → workspace-foundation-QQHX66KE.js} +1 -1
- package/dist/{workspace-graph-stream-5YMLJXAJ.js → workspace-graph-stream-UZJQ75XZ.js} +1 -1
- package/dist/workspace-graph-token-efficiency-TF23UYEF.js +1 -0
- package/dist/{workspace-intelligence-XHSUFTAT.js → workspace-intelligence-A7O7MN6T.js} +1 -1
- package/dist/{workspace-intelligence-runner-EN5V4KSC.js → workspace-intelligence-runner-4EF66L66.js} +1 -1
- package/dist/{workspace-knowledge-graph-VWQTIEYK.js → workspace-knowledge-graph-BVN4NTJ6.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-WB62AVDK.js → workspace-knowledge-graph-snapshot-XSQADCNR.js} +1 -1
- package/dist/{workspace-mcp-serve-NCAGGWQS.js → workspace-mcp-serve-TKX4J3SX.js} +1 -1
- package/dist/{workspace-model-NXFIKX26.js → workspace-model-7ESEP366.js} +1 -1
- package/dist/{workspace-onboarding-OP22NHQ4.js → workspace-onboarding-SY255V7L.js} +1 -1
- package/dist/{workspace-registry-summary-A5VDPRHU.js → workspace-registry-summary-7ISKYEPM.js} +1 -1
- package/dist/{workspace-repair-engine-N4KXNSVL.js → workspace-repair-engine-GMA2YTCF.js} +1 -1
- package/dist/workspace-run-ZZXVNFUS.js +1 -0
- package/dist/{workspace-verify-TUVLFPPN.js → workspace-verify-CNXZPWS5.js} +1 -1
- package/dist/{workspace-watch-2ZNOYSUQ.js → workspace-watch-HGFL2EU3.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_CONTENT_CONTRACT.md +25 -12
- package/docs/ci-workflows.md +9 -1
- package/docs/commands-reference.md +1 -1
- 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/real-world-qualification.md +73 -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/autopilot-release-CH57CGET.js +0 -1
- package/dist/capabilities-command-WEOGFCWF.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-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/workspace-graph-token-efficiency-HK4KNWWP.js +0 -1
- package/dist/workspace-run-PXKC3ELS.js +0 -1
package/dist/chunk-VGJVIHHR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Y="workspace-knowledge-search.v1";function m(e){return e.trim().toLowerCase()}var z=new WeakMap;function R(e){let t=z.get(e);if(t)return t;let o=new Map(e.relations.map(s=>[s.id,s])),a=new Map(e.entities.map(s=>[s.id,s])),l=new Map(e.proofs.map(s=>[s.id,s])),r=new Map,d=new Map,f=(s,p)=>{let g=d.get(s)??[];g.push(p),d.set(s,g);};for(let s of e.entities){let p=[s.id,s.label,s.identity.key,...s.kind==="project"&&s.projectId?[s.projectId]:[],...s.identity.aliases];for(let g of new Set(p.map(m))){let y=r.get(g)??[];y.push(s),r.set(g,y);}}for(let s of e.relations)f(s.from,{from:s.from,to:s.to,relationId:s.id,kind:s.kind,direction:"forward",proofIds:s.proofIds}),f(s.to,{from:s.to,to:s.from,relationId:s.id,kind:s.kind,direction:"reverse",proofIds:s.proofIds});for(let s of r.values())s.sort((p,g)=>p.id.localeCompare(g.id));for(let s of d.values())s.sort((p,g)=>p.to.localeCompare(g.to)||p.relationId.localeCompare(g.relationId));let c={entitiesById:a,relationsById:o,entitiesByAlias:r,proofsById:l,adjacency:d};return z.set(e,c),c}function _(e,t){let o=R(e),a=o.relationsById.get(t);if(a)return {found:true,targetType:"relation",relation:a};let l=m(t),r=o.entitiesByAlias.get(l)??[];return r.length===1?{found:true,targetType:"entity",entity:r[0]}:{found:false,query:t,candidates:r.map(d=>d.id).sort()}}function he(e,t){let o=_(e,t);if(!o.found)return {query:t,found:false,target:null,proofs:[],candidates:o.candidates};let a=o.targetType==="entity"?o.entity:o.relation,l=new Set(a.proofIds);return {query:t,found:true,target:a,candidates:[],proofs:[...l].map(r=>R(e).proofsById.get(r)).filter(r=>!!r).sort((r,d)=>r.id.localeCompare(d.id))}}function fe(e,t,o){let a=_(e,t),l=_(e,o);if(!a.found||a.targetType!=="entity"||!l.found||l.targetType!=="entity")return {from:t,to:o,found:false,resolvedFrom:a.found&&a.targetType==="entity"?a.entity.id:null,resolvedTo:l.found&&l.targetType==="entity"?l.entity.id:null,entityPath:[],hops:[],proofs:[]};let r=R(e),d=[a.entity.id],f=new Map,c=new Set(d),s=0;for(;s<d.length&&!c.has(l.entity.id);){let h=d[s++];for(let k of r.adjacency.get(h)??[])c.has(k.to)||(c.add(k.to),f.set(k.to,k),d.push(k.to));}if(!c.has(l.entity.id))return {from:t,to:o,found:false,resolvedFrom:a.entity.id,resolvedTo:l.entity.id,entityPath:[],hops:[],proofs:[]};let p=[],g=l.entity.id;for(;g!==a.entity.id;){let h=f.get(g);if(!h)break;p.push(h),g=h.from;}p.reverse();let y=new Set(p.flatMap(h=>h.proofIds));return {from:t,to:o,found:true,resolvedFrom:a.entity.id,resolvedTo:l.entity.id,entityPath:[a.entity.id,...p.map(h=>h.to)],hops:p,proofs:[...y].map(h=>r.proofsById.get(h)).filter(h=>!!h).sort((h,k)=>h.id.localeCompare(k.id))}}function ue(e,t){return e.entities.filter(o=>!t||o.kind===t).sort((o,a)=>o.kind.localeCompare(a.kind)||o.label.localeCompare(a.label))}var b={relations:24,relatedEntities:24,proofs:16,proofIdsPerItem:4,aliasesPerEntity:8,attributeArrayItems:8,attributeStringCharacters:256};function X(e){let t=[],o=new Set;for(let a=0;a<b.proofIdsPerItem&&t.length<b.proofs;a+=1)for(let l of e){let r=l.proofIds[a];if(!(!r||o.has(r))&&(o.add(r),t.push(r),t.length>=b.proofs))break}return t}function Z(e,t,o){let a=e.identity.aliases.slice(0,b.aliasesPerEntity);o.aliases+=e.identity.aliases.length-a.length;let l=Object.fromEntries(Object.entries(e.attributes).map(([d,f])=>{if(Array.isArray(f)){let c=f.slice(0,b.attributeArrayItems);return o.attributeValues+=f.length-c.length,[d,c]}return typeof f=="string"&&f.length>b.attributeStringCharacters?(o.attributeValues+=1,[d,f.slice(0,b.attributeStringCharacters)]):[d,f]})),r=e.proofIds.filter(d=>t.has(d)).slice(0,b.proofIdsPerItem);return o.proofReferences+=e.proofIds.length-r.length,{...e,identity:{...e.identity,aliases:a},attributes:l,proofIds:r}}function J(e){let t=Object.values(e.attributes).flatMap(o=>Array.isArray(o)?o:[o]);return [e.id,e.kind,e.label,e.projectId??"",e.identity.key,...e.identity.aliases,...t.map(o=>String(o??""))].join(" ").toLowerCase()}var ee=new Set(["a","an","and","are","as","at","be","been","being","by","can","check","could","did","do","does","find","for","from","give","had","has","have","how","i","in","into","is","it","its","may","might","of","on","or","our","show","should","that","the","their","them","then","there","these","they","this","those","tell","to","was","we","were","what","when","where","which","who","why","will","with","would","you","your"]);function j(e){let t=o=>m(o).split(/[^a-z0-9]+/u).filter(a=>a.length>1);return [...new Set([...t(e),...t(e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"))])]}function te(e){let t=m(e.label),o=m(e.identity.key),a=e.identity.aliases.map(m),l=J(e);return {entity:e,label:t,identity:o,aliases:a,haystack:l,labelTokens:new Set(j(e.label)),identityTokens:new Set(j(e.identity.key)),aliasTokens:new Set(e.identity.aliases.flatMap(j)),allTokens:new Set(j(l))}}function S(e,t){return e.has(t)||t.length>=3&&[...e].some(o=>o.startsWith(t))}function O(e,t){return S(e.labelTokens,t)||S(e.identityTokens,t)||S(e.aliasTokens,t)||S(e.allTokens,t)}function ne(e,t,o,a){let{label:l,identity:r,aliases:d,haystack:f}=e,c=0;(l===t||r===t||d.includes(t))&&(c+=1e4),(l.startsWith(t)||r.startsWith(t))&&(c+=250),f.includes(t)&&(c+=100);let s=0;for(let p of o){let g=a.get(p)??1,y=S(e.labelTokens,p),h=S(e.identityTokens,p),k=S(e.aliasTokens,p),u=O(e,p);u&&(s+=1),l===p?c+=80*g:y&&(c+=36*g),h&&(c+=24*g),k&&(c+=20*g),u&&(c+=10*g);}return o.length>0&&(c+=s/o.length*120),c}function oe(e,t){return t.filter(o=>O(e,o)).length}var se=new Map([["clojure","clojure"],["cplusplus","cpp"],["cpp","cpp"],["typescript","typescript"],["ts","typescript"],["javascript","javascript"],["js","javascript"],["nodejs","javascript"],["python","python"],["py","python"],["go","go"],["golang","go"],["csharp","csharp"],["dotnet","csharp"],["dart","dart"],["elixir","elixir"],["fsharp","fsharp"],["java","java"],["kotlin","kotlin"],["lua","lua"],["php","php"],["ruby","ruby"],["rust","rust"],["scala","scala"],["svelte","svelte"],["swift","swift"],["vue","vue"]]);function ae(e){return new Set(e.map(t=>se.get(t)).filter(t=>!!t))}function F(e){let t=e.attributes.language;return typeof t=="string"?m(t):null}function re(e){return {project:1e3,service:900,api:900,package:850,endpoint:800,container:700,deployment:700,environment:650,pipeline:600,"test-suite":550,owner:500,decision:450,document:400}[e.kind]??0}function ie(e,t){let o=t.has("language")||t.has("languages"),a=t.has("binding")||t.has("bindings")||t.has("bridge")||t.has("bridges"),l=t.has("dependency")||t.has("dependencies")||t.has("depends"),r=t.has("core")||t.has("runtime"),d=t.has("owner")||t.has("owners")||t.has("ownership")||t.has("maintainer"),f=t.has("ci")||t.has("pipeline")||t.has("pipelines")||t.has("workflow"),c=t.has("deploy")||t.has("deployment")||t.has("infrastructure")||t.has("container"),s=t.has("doc")||t.has("docs")||t.has("document")||t.has("documentation"),p=t.has("service")||t.has("services")||t.has("api")||t.has("rpc"),g=t.has("schema")||t.has("schemas")||t.has("message")||t.has("protobuf")||t.has("proto")||t.has("contract"),y=typeof e.attributes.mechanism=="string"?m(e.attributes.mechanism):"",h=typeof e.attributes.specification=="string"?m(e.attributes.specification):"",k=m(e.label),u=0;if(o&&e.kind==="language"){let A=typeof e.attributes.fileCount=="number"?e.attributes.fileCount:0;u+=900+Math.min(A,1e4)/10;}return a&&e.kind==="protocol"&&(u+=800),l&&e.kind==="package"&&(u+=650),r&&e.kind==="package"&&/(?:^|[_-])core(?:$|[_-])/u.test(k)&&(u+=700),r&&e.kind==="protocol"&&y.includes("core")&&(u+=300),d&&e.kind==="owner"&&(u+=850),f&&e.kind==="pipeline"&&(u+=800),c&&["deployment","container","environment"].includes(e.kind)&&(u+=775),s&&["document","decision"].includes(e.kind)&&(u+=725),p&&["api","endpoint","service"].includes(e.kind)&&(u+=700),g&&(e.kind==="schema"||(e.kind==="api"||e.kind==="protocol")&&(h.includes("protobuf")||y.includes("protobuf")))&&(u+=750),u}function ce(e){return [e.has("language")||e.has("languages"),e.has("binding")||e.has("bindings")||e.has("bridge")||e.has("bridges"),e.has("dependency")||e.has("dependencies")||e.has("depends"),e.has("core")||e.has("runtime"),e.has("owner")||e.has("ownership")||e.has("maintainer"),e.has("ci")||e.has("pipeline")||e.has("workflow"),e.has("deploy")||e.has("deployment")||e.has("infrastructure"),e.has("doc")||e.has("docs")||e.has("documentation"),e.has("service")||e.has("api")||e.has("rpc"),e.has("schema")||e.has("protobuf")||e.has("proto")||e.has("contract")].filter(Boolean).length>=3}function ke(e,t){let o=m(t.query),a=[...new Set(j(t.query))],l=new Set(j(t.projectId??"")),r=t.projectId?a.filter(n=>!l.has(n)):a,d=!!(t.projectId&&a.length>0&&r.length===0),f=r.filter(n=>!ee.has(n)),c=f.length>0?f:r,s=ae(c),p=new Set(c),g=c.length<=1?c.length:Math.min(3,Math.ceil(c.length/3)),y=Math.max(1,Math.min(Math.trunc(t.limit??12),100)),h=Math.max(0,Math.min(Math.trunc(t.relationsPerEntity??4),20)),k=new Set;if(t.projectId){let n=new Set(e.entities.filter(i=>i.kind==="project"&&(i.projectId===t.projectId||i.label===t.projectId)).map(i=>i.id));for(let i of e.relations)n.has(i.from)&&k.add(i.to),n.has(i.to)&&k.add(i.from);}let u=e.entities.filter(n=>(!t.kind||n.kind===t.kind)&&(!t.projectId||n.projectId===t.projectId||n.projectId===void 0&&k.has(n.id))).map(te),A=new Map(c.map(n=>{let i=u.filter(w=>O(w,n)).length;return [n,Math.log((u.length+1)/(i+1))+1]})),P=u.map(n=>{let i=oe(n,c),w=F(n.entity),I=w&&s.has(w)?400:0,K=ie(n.entity,p);return {entity:n.entity,matchedTerms:i,intentScore:K,score:d?re(n.entity):ne(n,o,c,A)+I+K}}).filter(n=>{let i=F(n.entity);return (s.size===0||i===null||s.has(i))&&(o.length===0||n.score>0&&(d||n.matchedTerms>=g||n.intentScore>0))}).sort((n,i)=>i.score-n.score||n.entity.kind.localeCompare(i.entity.kind)||n.entity.label.localeCompare(i.entity.label)),E=(ce(p)?(()=>{let n=[],i=[],w=new Map,I=new Set;for(let K of P){let q=w.get(K.entity.kind)??0,V=m(K.entity.label);q<2&&!I.has(V)?(n.push(K),w.set(K.entity.kind,q+1),I.add(V)):i.push(K);}return [...n,...i]})():P).slice(0,y).map(n=>n.entity),M=new Set(E.map(n=>n.id)),G=new Map,x=e.relations.filter(n=>{if(!(M.has(n.from)||M.has(n.to)))return false;let w=M.has(n.from)?n.from:n.to,I=G.get(w)??0;return I>=h?false:(G.set(w,I+1),true)}),W=t.projection==="agent",T=W?x.slice(0,b.relations):x,D=R(e),B=[...new Set(T.flatMap(n=>[n.from,n.to]).filter(n=>!M.has(n)))].map(n=>D.entitiesById.get(n)).filter(n=>!!n).map(({id:n,kind:i,label:w,projectId:I})=>({id:n,kind:i,label:w,...I?{projectId:I}:{}})).sort((n,i)=>n.kind.localeCompare(i.kind)||n.label.localeCompare(i.label)),H=W?B.slice(0,b.relatedEntities):B,L=new Set([...E.flatMap(n=>n.proofIds),...T.flatMap(n=>n.proofIds)]),U=W?X([...E,...T]):[...L],v=new Set(U),C={entities:P.length-E.length,relations:x.length-T.length,relatedEntities:B.length-H.length,proofs:L.size-v.size,proofReferences:0,aliases:0,attributeValues:0},N=W?E.map(n=>Z(n,v,C)):E,Q=W?T.map(n=>{let i=n.proofIds.filter(w=>v.has(w)).slice(0,b.proofIdsPerItem);return C.proofReferences+=n.proofIds.length-i.length,{...n,proofIds:i}}):T,$=[...v].map(n=>D.proofsById.get(n)).filter(n=>!!n).sort((n,i)=>n.id.localeCompare(i.id));return {schemaVersion:Y,query:t.query,kind:t.kind??null,...t.projectId?{projectId:t.projectId}:{},limit:y,totalMatches:P.length,truncated:P.length>N.length||W&&Object.values(C).some(n=>n>0),entities:N,relatedEntities:H,relations:Q,proofs:$,...W?{budget:{mode:"agent",limits:{...b},omitted:C}}:{}}}export{Y as a,_ as b,he as c,fe as d,ue as e,ke as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as WORKSPACE_GRAPH_TOKEN_EFFICIENCY_SCHEMA_VERSION,b as buildWorkspaceGraphTokenEfficiencyReport}from'./chunk-KR7CIEQR.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as runWorkspaceStage}from'./chunk-WLCBXCZV.js';export{a as WORKSPACE_RUN_LAST_REPORT_FILENAME}from'./chunk-IZLEMTES.js';
|