@zibby/skills 2.0.27 → 2.0.28
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/dist/codebaseMemory.js +6 -6
- package/dist/index.js +1 -1
- package/dist/package.json +5 -5
- package/package.json +5 -5
package/dist/codebaseMemory.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{spawnSync as m}from"node:child_process";import{existsSync as i,mkdirSync as d,readdirSync as l,writeFileSync as u}from"node:fs";import{createHash as y}from"node:crypto";import{join as n}from"node:path";import{SKILL_META as f}from"@zibby/skill-ids";import{cachedToolPath as g,ensureTool as b}from"@zibby/bin-registry";function h(){return process.env.CBM_BIN||g("codebase-memory")}function p(){if(process.env.CBM_CACHE_DIR)return process.env.CBM_CACHE_DIR;let e=process.env.WORKSPACE||process.env.ZIBBY_WORKSPACE;return e?n(e,".zibby","cbm-cache"):"/tmp/zibby-cbm-cache"}function
|
|
1
|
+
import{spawnSync as m}from"node:child_process";import{existsSync as i,mkdirSync as d,readdirSync as l,writeFileSync as u}from"node:fs";import{createHash as y}from"node:crypto";import{join as n}from"node:path";import{SKILL_META as f}from"@zibby/skill-ids";import{cachedToolPath as g,ensureTool as b}from"@zibby/bin-registry";function h(){return process.env.CBM_BIN||g("codebase-memory")}function p(){if(process.env.CBM_CACHE_DIR)return process.env.CBM_CACHE_DIR;let e=process.env.WORKSPACE||process.env.ZIBBY_WORKSPACE;return e?n(e,".zibby","cbm-cache"):"/tmp/zibby-cbm-cache"}function _(){let e=process.env.WORKSPACE||process.env.ZIBBY_WORKSPACE||"/workspace",r=n(e,".zibby","repos");try{if(i(r)){let t=l(r,{withFileTypes:!0}).filter(s=>s.isDirectory()).map(s=>n(r,s.name));if(t.length===1)return t[0];if(t.length>1)return r}}catch{}return null}function v(e){return y("sha256").update(e).digest("hex").slice(0,16)}var R={id:"codebase-memory",serverName:"codebase_memory",meta:f["codebase-memory"],allowedTools:["mcp__codebase_memory__*"],description:"Codebase memory \u2014 code-graph + semantic index over the checked-out repo (architecture, graph search, dependency trace, change detection)",promptFragment:`## Codebase Memory (code-graph + semantic index over THIS repo)
|
|
2
2
|
The checked-out repository can be indexed into a queryable code graph + semantic
|
|
3
3
|
index. Reach for these when available and you need structure,
|
|
4
4
|
relationships, or "where does X live / what depends on Y":
|
|
@@ -13,10 +13,10 @@ Indexing is attempted at the start of the run when a repo is already checked
|
|
|
13
13
|
out. If this run clones later, call index_repository on that clone. Always call
|
|
14
14
|
index_status before drawing conclusions; an empty query is never evidence of
|
|
15
15
|
no callers when the index is missing or partial. If the code-graph tools are
|
|
16
|
-
unavailable, continue with file reads and search and state that limitation.`,resolve(){let e=h();if(!e||!i(e))return
|
|
17
|
-
`),
|
|
18
|
-
`)}})}catch(
|
|
19
|
-
`),{}}let r=
|
|
20
|
-
`)}catch{}if(o.error||o.status!==0){let
|
|
16
|
+
unavailable, continue with file reads and search and state that limitation.`,resolve(){let e=h();if(!e||!i(e))return null;let r=p();try{d(r,{recursive:!0})}catch{}let t={CBM_CACHE_DIR:r};return process.env.WORKSPACE&&(t.WORKSPACE=process.env.WORKSPACE),{type:"stdio",command:e,args:[],env:t,description:this.description}},async invokeAgentOptions(){try{let e=h();if(!e)try{e=await b("codebase-memory",{onEvent:({phase:a,version:c})=>{a==="downloading"&&process.stderr.write(`[codebase-memory] downloading pinned v${c} artifact
|
|
17
|
+
`),a==="shared-cache-hit"&&process.stderr.write(`[codebase-memory] verified shared v${c} archive
|
|
18
|
+
`)}})}catch(a){return process.stderr.write(`[codebase-memory] binary unavailable (${a?.reason||"unknown"}): ${a?.message||a}. Code-graph tools are unavailable; review with file reads and search.
|
|
19
|
+
`),{}}let r=_();if(!r)return{};let t=p();try{d(t,{recursive:!0})}catch{}let s=n(t,`.cbm-indexed-${v(r)}`);if(i(s))return{};let o=m(e,["cli","index_repository",JSON.stringify({repo_path:r})],{env:{...process.env,CBM_CACHE_DIR:t},encoding:"utf-8",timeout:300*1e3,maxBuffer:32*1024*1024});if(!o.error&&o.status===0)try{u(s,`${new Date().toISOString()} status=0
|
|
20
|
+
`)}catch{}if(o.error||o.status!==0){let a=o.error?String(o.error.message||o.error):`exit ${o.status}${o.signal?` (${o.signal})`:""}`;try{process.stderr.write(`[codebase-memory] indexing ${r} did NOT succeed (${a}) \u2014 the code graph may be missing or partial; index_status/index_repository are the way back.
|
|
21
21
|
`)}catch{}}}catch(e){process.stderr.write(`[codebase-memory] preparation failed: ${e?.message||e}. Code-graph tools may be unavailable; use file reads and search.
|
|
22
22
|
`)}return{}}};export{R as codebaseMemorySkill};
|
package/dist/index.js
CHANGED
|
@@ -1075,7 +1075,7 @@ Indexing is attempted at the start of the run when a repo is already checked
|
|
|
1075
1075
|
out. If this run clones later, call index_repository on that clone. Always call
|
|
1076
1076
|
index_status before drawing conclusions; an empty query is never evidence of
|
|
1077
1077
|
no callers when the index is missing or partial. If the code-graph tools are
|
|
1078
|
-
unavailable, continue with file reads and search and state that limitation.`,resolve(){let r=Wc();if(!r||!As(r))return
|
|
1078
|
+
unavailable, continue with file reads and search and state that limitation.`,resolve(){let r=Wc();if(!r||!As(r))return null;let e=Yc();try{Hc(e,{recursive:!0})}catch{}let t={CBM_CACHE_DIR:e};return process.env.WORKSPACE&&(t.WORKSPACE=process.env.WORKSPACE),{type:"stdio",command:r,args:[],env:t,description:this.description}},async invokeAgentOptions(){try{let r=Wc();if(!r)try{r=await ik("codebase-memory",{onEvent:({phase:i,version:o})=>{i==="downloading"&&process.stderr.write(`[codebase-memory] downloading pinned v${o} artifact
|
|
1079
1079
|
`),i==="shared-cache-hit"&&process.stderr.write(`[codebase-memory] verified shared v${o} archive
|
|
1080
1080
|
`)}})}catch(i){return process.stderr.write(`[codebase-memory] binary unavailable (${i?.reason||"unknown"}): ${i?.message||i}. Code-graph tools are unavailable; review with file reads and search.
|
|
1081
1081
|
`),{}}let e=ok();if(!e)return{};let t=Yc();try{Hc(t,{recursive:!0})}catch{}let n=cn(t,`.cbm-indexed-${ak(e)}`);if(As(n))return{};let s=Q_(r,["cli","index_repository",JSON.stringify({repo_path:e})],{env:{...process.env,CBM_CACHE_DIR:t},encoding:"utf-8",timeout:300*1e3,maxBuffer:32*1024*1024});if(!s.error&&s.status===0)try{tk(n,`${new Date().toISOString()} status=0
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zibby/skills",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.28",
|
|
4
4
|
"description": "Built-in skill definitions for the Zibby agent-workflow framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -117,11 +117,11 @@
|
|
|
117
117
|
"dependencies": {
|
|
118
118
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
119
119
|
"@resvg/resvg-js": "^2.6.2",
|
|
120
|
-
"@zibby/agent-workflow": "2.0.
|
|
121
|
-
"@zibby/bin-registry": "1.0.
|
|
120
|
+
"@zibby/agent-workflow": "2.0.28",
|
|
121
|
+
"@zibby/bin-registry": "1.0.5",
|
|
122
122
|
"@zibby/bin-oxlint": "^1.73.0",
|
|
123
123
|
"@zibby/bin-semgrep": "^1.169.0",
|
|
124
|
-
"@zibby/skill-ids": "2.0.
|
|
124
|
+
"@zibby/skill-ids": "2.0.28",
|
|
125
125
|
"echarts": "^6.1.0",
|
|
126
126
|
"mem0ai": "npm:@zibby/mem0ai@^3.0.5",
|
|
127
127
|
"zod": "^3.23.0 || ^4.0.0"
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
138
|
"optionalDependencies": {
|
|
139
|
-
"@zibby/mcp-browser": "2.0.
|
|
139
|
+
"@zibby/mcp-browser": "2.0.28",
|
|
140
140
|
"@zibby/mcp-memory": "*"
|
|
141
141
|
},
|
|
142
142
|
"devDependencies": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zibby/skills",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.28",
|
|
4
4
|
"description": "Built-in skill definitions for the Zibby agent-workflow framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -117,11 +117,11 @@
|
|
|
117
117
|
"dependencies": {
|
|
118
118
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
119
119
|
"@resvg/resvg-js": "^2.6.2",
|
|
120
|
-
"@zibby/agent-workflow": "2.0.
|
|
121
|
-
"@zibby/bin-registry": "1.0.
|
|
120
|
+
"@zibby/agent-workflow": "2.0.28",
|
|
121
|
+
"@zibby/bin-registry": "1.0.5",
|
|
122
122
|
"@zibby/bin-oxlint": "^1.73.0",
|
|
123
123
|
"@zibby/bin-semgrep": "^1.169.0",
|
|
124
|
-
"@zibby/skill-ids": "2.0.
|
|
124
|
+
"@zibby/skill-ids": "2.0.28",
|
|
125
125
|
"echarts": "^6.1.0",
|
|
126
126
|
"mem0ai": "npm:@zibby/mem0ai@^3.0.5",
|
|
127
127
|
"zod": "^3.23.0 || ^4.0.0"
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
138
|
"optionalDependencies": {
|
|
139
|
-
"@zibby/mcp-browser": "2.0.
|
|
139
|
+
"@zibby/mcp-browser": "2.0.28",
|
|
140
140
|
"@zibby/mcp-memory": "*"
|
|
141
141
|
},
|
|
142
142
|
"devDependencies": {
|