@reddb-io/red-skills 2.61.0 → 2.61.2
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/code-nav.bundle.min.mjs +1 -1
- package/dist/dev.bundle.min.mjs +202 -201
- package/dist/memory.bundle.min.mjs +1 -1
- package/dist/rsp.bundle.min.mjs +1 -1
- package/package.json +1 -1
|
@@ -6581,7 +6581,7 @@ Usage:
|
|
|
6581
6581
|
${n} archive --candidate <json> [--root <dir>] [--archive-dir <rel>]
|
|
6582
6582
|
${n} restore <name> [--root <dir>] [--archive-dir <rel>]`}function Hx(n){return dYn(typeof n.root=="string"?n.root:process.cwd())}function Pot(n){return typeof n["archive-dir"]=="string"?n["archive-dir"]:void 0}async function fj(n){let a=await Jo(n);return a?a.mode!=="graph"?{ok:!1,message:`curate: skill telemetry needs graph mode (this project is "${a.mode}") \u2014 run \`${Lwe}\``}:oZ(a)?{ok:!0}:{ok:!1,message:`curate: skill telemetry is not enabled here \u2014 run \`${Lwe}\``}:{ok:!1,message:`curate: memory is not initialized here \u2014 run \`${Lwe}\``}}function mYn(){let n=oYn(GYn(import.meta.url));return n.includes("dist/curate-skill")||n.endsWith("dist/curate-skill")?Dot(n,"..","cli.js"):Dot(n,"..","cli.ts")}async function uYn(n,a){let i=["curate","skills","--json"];a!==void 0&&i.push("--stale-days",String(a));let d=mYn(),h=d.endsWith(".ts")?jot(process.execPath,["--import","tsx",d,...i,"--root",n],{encoding:"utf8"}):jot(process.execPath,[d,...i,"--root",n],{encoding:"utf8"}),g=h.status??1;if(g!==0)throw new Error(`memory curate skills exited ${g}`);return Bot(h.stdout??"")}function bYn(n){return typeof n.flags["stale-days"]=="string"?Number(n.flags["stale-days"]):void 0}async function qot(n,a){return(a.loadCuratorReport??uYn)(Hx(n.flags),bYn(n))}async function pYn(n){let a=Hx(n.flags),i=await fj(a);return i.ok?(console.log("curate: skill telemetry is enabled \u2014 ready to curate"),0):(console.error(i.message),2)}async function ZYn(n,a){let i=Hx(n.flags),d=await fj(i);if(!d.ok)return console.error(d.message),2;let u;try{u=await qot(n,a)}catch(J){return console.error(`curate: ${J.message}`),1}let{candidates:h,byCategory:g,filtered:f}=kwe(u);return console.log(JSON.stringify({candidates:h,byCategory:g,filtered:f,totals:{totalSkills:u.totalSkills,curatableSkills:u.curatableSkills,readOnlySkills:u.readOnlySkills}},null,2)),0}async function hYn(n,a){let i=Hx(n.flags),d=await fj(i);if(!d.ok)return console.error(d.message),2;let u;try{u=await qot(n,a)}catch(J){return console.error(`curate: ${J.message}`),1}let{byCategory:h}=kwe(u);if(Awe(h)===0)return console.error("curate: no candidates \u2014 no issue filed"),0;let g=typeof n.flags.label=="string"?n.flags.label:void 0,f=await Tot({byCategory:h,totals:{totalSkills:u.totalSkills,curatableSkills:u.curatableSkills,readOnlySkills:u.readOnlySkills},generatedAt:u.generatedAt},{cwd:i,label:g});return console.log(`curate: filed background issue \u2014 ${f.output||f.title}`),0}async function WYn(n){let a=Hx(n.flags),i=await fj(a);if(!i.ok)return console.error(i.message),2;let d=n.flags.candidate;if(typeof d!="string")return console.error("curate archive: --candidate <json> is required"),2;let u;try{u=JSON.parse(d)}catch(g){return console.error(`curate archive: invalid --candidate JSON: ${g.message}`),2}let h=await Uot(u,{rootDir:a,archiveDir:Pot(n.flags)});return h.ok?(console.log(`curate: archived "${h.receipt.name}" \u2192 ${h.receipt.archiveRoot} (${h.receipt.files.length} file(s), manifest at ${h.receipt.manifestPath})`),0):(console.error(`curate archive: refused \u2014 ${h.rejection.reason}: ${h.rejection.detail}`),3)}async function NYn(n){let a=Hx(n.flags),i=await fj(a);if(!i.ok)return console.error(i.message),2;let d=n.positional[0];if(!d)return console.error("curate restore: skill name is required"),2;let u=await Mot(d,{rootDir:a,archiveDir:Pot(n.flags)});return console.log(`curate: restored "${u.name}" \u2192 ${u.restoredRoot} (${u.files.length} file(s) hash-verified)`),0}async function $ot(n,a={}){switch(n.command){case"check":return pYn(n);case"list":return ZYn(n,a);case"background":return hYn(n,a);case"archive":return WYn(n);case"restore":return NYn(n);case void 0:case"--help":case"-h":return console.log(Kot(a.usageCommand)),0;default:return console.error(`unknown curate subcommand: ${n.command}
|
|
6583
6583
|
|
|
6584
|
-
${Kot(a.usageCommand)}`),2}}function edt(n){let a={app:n,version:YYn(Qx("__RED_BUILD_VERSION__",()=>"2.61.
|
|
6584
|
+
${Kot(a.usageCommand)}`),2}}function edt(n){let a={app:n,version:YYn(Qx("__RED_BUILD_VERSION__",()=>"2.61.2")??"0.0.0-dev"),gitSha:Qx("__RED_BUILD_GIT_SHA__",()=>"00c4935b4f6a052bbf01bb0b28828e10b2dd4dc0")??"unknown",buildTime:Qx("__RED_BUILD_TIME__",()=>"2026-07-17T08:43:54-03:00")??"unknown",bundleAsset:Qx("__RED_BUNDLE_ASSET__",()=>"memory.bundle.min.mjs")??"unknown"},i=Qx("__REDDB_SDK_VERSION__",()=>"1.23.1"),d=Qx("__REDDB_BINARY_TAG__",()=>"v1.23.1");return i&&(a.reddbSdkVersion=i),d&&(a.reddbBinaryTag=d),a}function YYn(n){return n.startsWith("v")?n.slice(1):n}function tdt(n){return`${n.app} ${n.version} ${n.gitSha}`}function Qx(n,a){try{let i=a();return typeof i=="string"&&i.length>0?i:void 0}catch{return process.env[n.replace(/^__|__$/g,"")]}}var ndt=`memory \u2014 governed operational memory for code agents
|
|
6585
6585
|
|
|
6586
6586
|
Common workflows:
|
|
6587
6587
|
remember one fact memory store "Decision: ..."
|
package/dist/rsp.bundle.min.mjs
CHANGED
|
@@ -155,7 +155,7 @@ ${n[n.length-1]}`,s=Buffer.from(r);return s.length<=t?r:s.subarray(0,t).toString
|
|
|
155
155
|
`:""}`,truncated:o.length<s.length}}function Py(e){let t=[];for(let n=0;n<e.length;n++){let s=e[n].trim(),i=/^(?:export\s+)?(?:default\s+)?(?:abstract\s+)?(class|interface|type)\s+([A-Za-z_$][\w$]*)/.exec(s);if(i){t.push({kind:i[1],name:i[2],line:n+1,signature:s});continue}let o=/^(?:export\s+)?(?:default\s+)?(?:async\s+)?function\s+([A-Za-z_$][\w$]*)\s*\([^)]*\)\s*(?::[^{]+)?/.exec(s);if(o){t.push({kind:"function",name:o[1],line:n+1,signature:s});continue}let a=/^(?:public\s+|private\s+|protected\s+|static\s+|async\s+)*([A-Za-z_$][\w$]*)\s*\([^)]*\)\s*(?::[^{]+)?\s*\{/.exec(s);a&&!Oy(a[1])&&t.push({kind:"method",name:a[1],line:n+1,signature:s})}return t}function kr(e){let t=e.split(`
|
|
156
156
|
`);return t.at(-1)===""?t.slice(0,-1):t}function Qu(e){return e.includes(0)||!yy(e)}function Vu(e){return Sy.has(by(e).toLowerCase())}function Oy(e){return["for","if","switch","while"].includes(e)}function Ku(e,t){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:t}function zu(e,t){let n=Number(e);return Number.isInteger(n)&&n>0?n:t}var Wu,yi,_y,Ry,Sy,_i=S(()=>{"use strict";oe();nt();Wu=8*1024,yi=10,_y=8,Ry=2,Sy=new Set([".c",".cc",".cpp",".cs",".go",".java",".js",".jsx",".mjs",".py",".rs",".ts",".tsx"])});var Er={};B(Er,{parseExecCommandLine:()=>el,renderExecContract:()=>Zu,runExecWrapper:()=>Ay});import{isUtf8 as Dy}from"node:buffer";import{spawn as Iy}from"node:child_process";async function Ay(e,t){let n=el(e),r=await By(n);return await Zu(n,r,t)}async function Zu(e,t,n){let r=Buffer.from(t.stdout,"binary"),s=Buffer.from(t.stderr,"binary");if(r.length===0)return{stdout:r,stderr:s,status:t.status,signal:t.signal,rawOutput:r};let i=Ly(r);if(i.kind==="text"){let d=await mn(i.text,{level:n.level,command:e,store:n.store?{mint:async(...f)=>await n.store.mint(...f)}:void 0});if(d.detected)return{stdout:Buffer.from(d.output),stderr:s,status:t.status,signal:t.signal,mintedHandle:d.handle,bytesElided:d.lossy?r.length:void 0,rawOutput:r}}let o=i.kind==="text"?Buffer.from(i.text):r,a=Uy(n.heavyByteThreshold,$y);if(o.length<=a&&n.level!=="terse")return{stdout:o,stderr:s,status:t.status,signal:t.signal,rawOutput:r};let c=r.length,u=n.level==="lossless"?"terse":n.level,l=await n.store?.mint(r,{command:e,loss:{level:u,bytes_elided:c}});if(!l)throw new Error("rsp exec output elision requires an elision store");return{stdout:Buffer.from(My(o,r.length,l,n.level)),stderr:s,status:t.status,signal:t.signal,mintedHandle:l,bytesElided:c,rawOutput:r}}function el(e){if(e[0]!=="exec")throw new Error("expected rsp exec -- <command line>");let t=e.indexOf("--"),n=t>=0?e.slice(t+1):e.slice(1),r=n.length===1?n[0]:n.join(" ");if(!r.trim())throw new Error("usage: rsp exec -- <command line>");return r}async function By(e){let t=Iy(e,{shell:!0,stdio:["inherit","pipe","pipe"]}),n=[],r=[];return t.stdout.on("data",s=>n.push(s)),t.stderr.on("data",s=>r.push(s)),await new Promise((s,i)=>{t.on("error",i),t.on("close",(o,a)=>{s({stdout:Buffer.concat(n).toString("binary"),stderr:Buffer.concat(r).toString("binary"),status:o,signal:a})})})}function Ly(e){return Dy(e)?{kind:"text",text:Tt(e.toString("utf8"))}:{kind:"bytes"}}function My(e,t,n,r){let i=Math.max(1,Math.floor((r==="terse"?Ny:Cy)/2)),o=Xu(e.subarray(0,i)),a=Xu(e.subarray(Math.max(0,e.length-i))),c=jy(e),u=["stdout summary",`bytes: ${t}`,`lines: ${c}`,"head:",o];return a&&a!==o&&u.push("tail:",a),u.push(`\u2026 elided stdout (+${t}) \u2014 ${te(n)}`),`${u.join(`
|
|
157
157
|
`)}
|
|
158
|
-
`}function Xu(e){return e.toString("utf8").replace(/�$/g,"")}function jy(e){if(e.length===0)return 0;let t=0;for(let n of e)n===10&&t++;return e[e.length-1]===10?t:t+1}function Uy(e,t){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:t}var $y,Cy,Ny,xr=S(()=>{"use strict";nt();pn();$y=8*1024,Cy=2*1024,Ny=1024});Hr();De();Dn();import{spawn as Fy}from"node:child_process";import{createHash as Gy}from"node:crypto";import{existsSync as _n,readFileSync as qy,readdirSync as Jy,statSync as Hy}from"node:fs";import{tmpdir as Wy}from"node:os";import{dirname as Vy,join as Ge}from"node:path";import{fileURLToPath as rl}from"node:url";function vo(e){let t={app:e,version:Jd(ht("__RED_BUILD_VERSION__",()=>"2.61.
|
|
158
|
+
`}function Xu(e){return e.toString("utf8").replace(/�$/g,"")}function jy(e){if(e.length===0)return 0;let t=0;for(let n of e)n===10&&t++;return e[e.length-1]===10?t:t+1}function Uy(e,t){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:t}var $y,Cy,Ny,xr=S(()=>{"use strict";nt();pn();$y=8*1024,Cy=2*1024,Ny=1024});Hr();De();Dn();import{spawn as Fy}from"node:child_process";import{createHash as Gy}from"node:crypto";import{existsSync as _n,readFileSync as qy,readdirSync as Jy,statSync as Hy}from"node:fs";import{tmpdir as Wy}from"node:os";import{dirname as Vy,join as Ge}from"node:path";import{fileURLToPath as rl}from"node:url";function vo(e){let t={app:e,version:Jd(ht("__RED_BUILD_VERSION__",()=>"2.61.2")??"0.0.0-dev"),gitSha:ht("__RED_BUILD_GIT_SHA__",()=>"00c4935b4f6a052bbf01bb0b28828e10b2dd4dc0")??"unknown",buildTime:ht("__RED_BUILD_TIME__",()=>"2026-07-17T08:43:54-03:00")??"unknown",bundleAsset:ht("__RED_BUNDLE_ASSET__",()=>"rsp.bundle.min.mjs")??"unknown"},n=ht("__REDDB_SDK_VERSION__",()=>"1.23.1"),r=ht("__REDDB_BINARY_TAG__",()=>"v1.23.1");return n&&(t.reddbSdkVersion=n),r&&(t.reddbBinaryTag=r),t}function Jd(e){return e.startsWith("v")?e.slice(1):e}function ht(e,t){try{let n=t();return typeof n=="string"&&n.length>0?n:void 0}catch{return process.env[e.replace(/^__|__$/g,"")]}}cs();Te();async function Ky(e=process.argv.slice(2)){let t=vo("rsp"),n=uw(e);if(n.command==="hook"&&n.positional[1]==="claude-pre-exec"){let{runClaudePreExecHook:m}=await Promise.resolve().then(()=>(lr(),Ns));return await m()}if(n.command==="hook"&&n.positional[1]==="codex-pre-exec"){let{runCodexPreExecHook:m}=await Promise.resolve().then(()=>(lr(),Ns));return await m()}if(n.command==="hook"&&n.positional[1]==="claude-post-exec"){let{runClaudePostExecHook:m}=await Promise.resolve().then(()=>(pn(),Bs));return await m()}if(n.command==="hook"&&n.positional[1]==="codex-post-exec"){let{runCodexPostExecHook:m}=await Promise.resolve().then(()=>(pn(),Bs));return await m()}if(n.command==="setup"){let{provisionRspRepoStore:m}=await Promise.resolve().then(()=>(Ec(),kc)),p=await m(process.cwd());return process.stdout.write(bw(p)),0}if(n.command==="mcp"){let{runRspMcpServer:m}=await Promise.resolve().then(()=>(Ic(),Dc));return await m(),0}if(n.command==="wait"){let{runWait:m}=await Promise.resolve().then(()=>(Uc(),jc));return await m(n.positional)}if(n.command==="shell-init"){let m=n.positional[1];if(m!=="fish"&&m!=="bash"&&m!=="zsh")return process.stdout.write(`error: usage rsp shell-init fish|bash|zsh
|
|
159
159
|
`),2;let{renderShellInit:p}=await Promise.resolve().then(()=>(qc(),Gc));return process.stdout.write(p(m)),0}let{resolveRspConfig:r}=await Promise.resolve().then(()=>(ue(),Zo)),s=r(process.cwd(),process.env,n.storeUri),i=aw(n.command);if(!s.enabled)return i?await ow(n.positional):(process.stdout.write(`${Pi()}
|
|
160
160
|
`),0);if(n.command==="git"&&Ei(n.positional)){let m=process.hrtime.bigint();return await J(n,await xi(),m,void 0,await zy(process.cwd()))}let{resolveResidentPaths:o,ResidentRspElisionStore:a,ensureResidentServer:c}=await Promise.resolve().then(()=>(Xe(),un));if(n.command==="server"){let{runResidentServer:m}=await Promise.resolve().then(()=>(Ru(),_u)),p=o(process.cwd()),w=pe(n.positional,"--socket")??p.socketPath,y=r(process.cwd(),process.env,n.storeUri??pe(n.positional,"--store-uri"));return y.enabled?(await m({socketPath:w,pidPath:pe(n.positional,"--pid-file")??o(process.cwd()).pidPath,rootDir:p.rootDir,storeUri:y.storeUri,ttlDays:L(n.positional,"--ttl-days")??y.ttlDays,ephemeralTtlHours:L(n.positional,"--ephemeral-ttl-hours")??y.ephemeralTtlHours,byteBudget:L(n.positional,"--byte-budget")??y.byteBudget,telemetryTtlDays:L(n.positional,"--telemetry-ttl-days")??y.telemetryTtlDays,telemetryByteBudget:L(n.positional,"--telemetry-byte-budget")??y.telemetryByteBudget,telemetryDrainIntervalMs:L(n.positional,"--telemetry-drain-interval-ms")??y.telemetryDrainIntervalMs,telemetryDrainTimeoutMs:L(n.positional,"--telemetry-drain-timeout-ms")??y.telemetryDrainTimeoutMs,idleMs:L(n.positional,"--idle-ms")??y.idleMs,residentVersion:pe(n.positional,"--resident-version")??t.version,registryPath:pe(n.positional,"--registry")??p.registryPath}),0):(process.stdout.write(`${Pi()}
|
|
161
161
|
`),0)}if(n.command==="warm-resident"){let m=o(process.cwd()),p=pe(n.positional,"--socket")??m.socketPath,w=pe(n.positional,"--wake-lock")??m.wakeLockPath,y=r(process.cwd(),process.env,n.storeUri??pe(n.positional,"--store-uri"));if(!y.enabled)return 0;let{warmResidentServer:x}=await Promise.resolve().then(()=>(Xe(),un));return await x({...m,socketPath:p,wakeLockPath:w},{storeUri:y.storeUri,ttlDays:L(n.positional,"--ttl-days")??y.ttlDays,ephemeralTtlHours:L(n.positional,"--ephemeral-ttl-hours")??y.ephemeralTtlHours,byteBudget:L(n.positional,"--byte-budget")??y.byteBudget,telemetryTtlDays:L(n.positional,"--telemetry-ttl-days")??y.telemetryTtlDays,telemetryByteBudget:L(n.positional,"--telemetry-byte-budget")??y.telemetryByteBudget,telemetryDrainIntervalMs:L(n.positional,"--telemetry-drain-interval-ms")??y.telemetryDrainIntervalMs,telemetryDrainTimeoutMs:L(n.positional,"--telemetry-drain-timeout-ms")??y.telemetryDrainTimeoutMs,idleMs:L(n.positional,"--idle-ms")??y.idleMs,clientVersion:t.version}),0}let u=o(process.cwd());if(n.command==="proxy"){let{runProxy:m}=await Promise.resolve().then(()=>(oi(),ii));return await m(n.positional,{telemetryRoot:u.rootDir,level:n.level})}if(n.command==="status"||n.command==="sweep"){let{residentRegistryStatus:m,sweepResidentRegistry:p}=await Promise.resolve().then(()=>(Xe(),un)),w=n.command==="sweep"?await p(u):await m(u);return process.stdout.write(`${ye(w)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reddb-io/red-skills",
|
|
3
|
-
"version": "2.61.
|
|
3
|
+
"version": "2.61.2",
|
|
4
4
|
"description": "RedSkills plugin runtime bundles (dev, code-nav, memory, brain) distributed over npm — the v2 client transport (ADR 0091). Carries the platform-independent JS bundles inside the tarball plus thin bin shims; no postinstall download.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|