@reddb-io/red-skills 2.56.9 → 2.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.
@@ -144,7 +144,7 @@ ${n[n.length-1]}`,s=Buffer.from(r);return s.length<=t?r:s.subarray(0,t).toString
144
144
  `:""}`,truncated:o.length<s.length}}function Qg(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&&!Xg(a[1])&&t.push({kind:"method",name:a[1],line:n+1,signature:s})}return t}function rr(e){let t=e.split(`
145
145
  `);return t.at(-1)===""?t.slice(0,-1):t}function Vc(e){return e.includes(0)||!Ug(e)}function qc(e){return Hg.has(Gg(e).toLowerCase())}function Xg(e){return["for","if","switch","while"].includes(e)}function Jc(e,t){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:t}function Hc(e,t){let n=Number(e);return Number.isInteger(n)&&n>0?n:t}var Gc,Hs,qg,Jg,Hg,Ks=R(()=>{"use strict";Re();Ve();Gc=8*1024,Hs=10,qg=8,Jg=2,Hg=new Set([".c",".cc",".cpp",".cs",".go",".java",".js",".jsx",".mjs",".py",".rs",".ts",".tsx"])});var sr={};N(sr,{parseExecCommandLine:()=>Yc,renderExecContract:()=>zc,runExecWrapper:()=>sh});import{isUtf8 as Zg}from"node:buffer";import{spawn as eh}from"node:child_process";async function sh(e,t){let n=Yc(e),r=await ih(n);return await zc(n,r,t)}async function zc(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=oh(r);if(i.kind==="text"){let d=await Yt(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=uh(n.heavyByteThreshold,th);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(ah(o,r.length,l,n.level)),stderr:s,status:t.status,signal:t.signal,mintedHandle:l,bytesElided:c,rawOutput:r}}function Yc(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 ih(e){let t=eh(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 oh(e){return Zg(e)?{kind:"text",text:pt(e.toString("utf8"))}:{kind:"bytes"}}function ah(e,t,n,r){let i=Math.max(1,Math.floor((r==="terse"?rh:nh)/2)),o=Kc(e.subarray(0,i)),a=Kc(e.subarray(Math.max(0,e.length-i))),c=ch(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 ${Q(n)}`),`${u.join(`
146
146
  `)}
147
- `}function Kc(e){return e.toString("utf8").replace(/�$/g,"")}function ch(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 uh(e,t){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:t}var th,nh,rh,ir=R(()=>{"use strict";Ve();Qt();th=8*1024,nh=2*1024,rh=1024});xr();Re();import{spawn as lh}from"node:child_process";import{createHash as dh}from"node:crypto";import{appendFileSync as Qc,existsSync as nn,mkdirSync as fh,readFileSync as mh,readdirSync as ph,statSync as gh}from"node:fs";import{tmpdir as hh}from"node:os";import{dirname as eu,join as ce}from"node:path";import{fileURLToPath as tu}from"node:url";function Bi(e){let t={app:e,version:Rl(st("__RED_BUILD_VERSION__",()=>"2.56.9")??"0.0.0-dev"),gitSha:st("__RED_BUILD_GIT_SHA__",()=>"81574b2ba4a9c4d2797824aa8a04950111c59a9d")??"unknown",buildTime:st("__RED_BUILD_TIME__",()=>"2026-07-14T23:32:03-03:00")??"unknown",bundleAsset:st("__RED_BUNDLE_ASSET__",()=>"rsp.bundle.min.mjs")??"unknown"},n=st("__REDDB_SDK_VERSION__",()=>"1.23.1"),r=st("__REDDB_BINARY_TAG__",()=>"v1.23.1");return n&&(t.reddbSdkVersion=n),r&&(t.reddbBinaryTag=r),t}function Rl(e){return e.startsWith("v")?e.slice(1):e}function st(e,t){try{let n=t();return typeof n=="string"&&n.length>0?n:void 0}catch{return process.env[e.replace(/^__|__$/g,"")]}}jr();async function yh(e=process.argv.slice(2)){let t=Bi("rsp"),n=$h(e);if(n.command==="hook"&&n.positional[1]==="claude-pre-exec"){let{runClaudePreExecHook:m}=await Promise.resolve().then(()=>(qn(),us));return await m()}if(n.command==="hook"&&n.positional[1]==="codex-pre-exec"){let{runCodexPreExecHook:m}=await Promise.resolve().then(()=>(qn(),us));return await m()}if(n.command==="hook"&&n.positional[1]==="claude-post-exec"){let{runClaudePostExecHook:m}=await Promise.resolve().then(()=>(Qt(),ds));return await m()}if(n.command==="hook"&&n.positional[1]==="codex-post-exec"){let{runCodexPostExecHook:m}=await Promise.resolve().then(()=>(Qt(),ds));return await m()}if(n.command==="setup"){let{provisionRspRepoStore:m}=await Promise.resolve().then(()=>(Sa(),Ra)),p=await m(process.cwd());return process.stdout.write(Gh(p)),0}if(n.command==="mcp"){let{runRspMcpServer:m}=await Promise.resolve().then(()=>(Oa(),Pa));return await m(),0}if(n.command==="wait"){let{runWait:m}=await Promise.resolve().then(()=>(Aa(),Ca));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
147
+ `}function Kc(e){return e.toString("utf8").replace(/�$/g,"")}function ch(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 uh(e,t){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:t}var th,nh,rh,ir=R(()=>{"use strict";Ve();Qt();th=8*1024,nh=2*1024,rh=1024});xr();Re();import{spawn as lh}from"node:child_process";import{createHash as dh}from"node:crypto";import{appendFileSync as Qc,existsSync as nn,mkdirSync as fh,readFileSync as mh,readdirSync as ph,statSync as gh}from"node:fs";import{tmpdir as hh}from"node:os";import{dirname as eu,join as ce}from"node:path";import{fileURLToPath as tu}from"node:url";function Bi(e){let t={app:e,version:Rl(st("__RED_BUILD_VERSION__",()=>"2.57.0")??"0.0.0-dev"),gitSha:st("__RED_BUILD_GIT_SHA__",()=>"682e090a2f7a6c3d00913e5f5f6b4e25d04f8a4b")??"unknown",buildTime:st("__RED_BUILD_TIME__",()=>"2026-07-15T01:37:44-03:00")??"unknown",bundleAsset:st("__RED_BUNDLE_ASSET__",()=>"rsp.bundle.min.mjs")??"unknown"},n=st("__REDDB_SDK_VERSION__",()=>"1.23.1"),r=st("__REDDB_BINARY_TAG__",()=>"v1.23.1");return n&&(t.reddbSdkVersion=n),r&&(t.reddbBinaryTag=r),t}function Rl(e){return e.startsWith("v")?e.slice(1):e}function st(e,t){try{let n=t();return typeof n=="string"&&n.length>0?n:void 0}catch{return process.env[e.replace(/^__|__$/g,"")]}}jr();async function yh(e=process.argv.slice(2)){let t=Bi("rsp"),n=$h(e);if(n.command==="hook"&&n.positional[1]==="claude-pre-exec"){let{runClaudePreExecHook:m}=await Promise.resolve().then(()=>(qn(),us));return await m()}if(n.command==="hook"&&n.positional[1]==="codex-pre-exec"){let{runCodexPreExecHook:m}=await Promise.resolve().then(()=>(qn(),us));return await m()}if(n.command==="hook"&&n.positional[1]==="claude-post-exec"){let{runClaudePostExecHook:m}=await Promise.resolve().then(()=>(Qt(),ds));return await m()}if(n.command==="hook"&&n.positional[1]==="codex-post-exec"){let{runCodexPostExecHook:m}=await Promise.resolve().then(()=>(Qt(),ds));return await m()}if(n.command==="setup"){let{provisionRspRepoStore:m}=await Promise.resolve().then(()=>(Sa(),Ra)),p=await m(process.cwd());return process.stdout.write(Gh(p)),0}if(n.command==="mcp"){let{runRspMcpServer:m}=await Promise.resolve().then(()=>(Oa(),Pa));return await m(),0}if(n.command==="wait"){let{runWait:m}=await Promise.resolve().then(()=>(Aa(),Ca));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
148
148
  `),2;let{renderShellInit:p}=await Promise.resolve().then(()=>(ja(),Ma));return process.stdout.write(p(m)),0}let{resolveRspConfig:r}=await Promise.resolve().then(()=>(ne(),ao)),s=r(process.cwd(),process.env,n.storeUri),i=Dh(n.command);if(!s.enabled)return i?await Oh(n.positional):(process.stdout.write(`${ni()}
149
149
  `),0);if(n.command==="git"&&Xs(n.positional)){let m=process.hrtime.bigint();return await F(n,await Zs(),m,void 0,await wh(process.cwd()))}let{resolveResidentPaths:o,ResidentRspElisionStore:a,ensureResidentServer:c}=await Promise.resolve().then(()=>(je(),Lt));if(n.command==="server"){let{runResidentServer:m}=await Promise.resolve().then(()=>(yc(),hc)),p=o(process.cwd()),k=ae(n.positional,"--socket")??p.socketPath,w=r(process.cwd(),process.env,n.storeUri??ae(n.positional,"--store-uri"));return w.enabled?(await m({socketPath:k,pidPath:ae(n.positional,"--pid-file")??o(process.cwd()).pidPath,rootDir:p.rootDir,storeUri:w.storeUri,ttlDays:C(n.positional,"--ttl-days")??w.ttlDays,ephemeralTtlHours:C(n.positional,"--ephemeral-ttl-hours")??w.ephemeralTtlHours,byteBudget:C(n.positional,"--byte-budget")??w.byteBudget,telemetryTtlDays:C(n.positional,"--telemetry-ttl-days")??w.telemetryTtlDays,telemetryByteBudget:C(n.positional,"--telemetry-byte-budget")??w.telemetryByteBudget,telemetryDrainIntervalMs:C(n.positional,"--telemetry-drain-interval-ms")??w.telemetryDrainIntervalMs,telemetryDrainTimeoutMs:C(n.positional,"--telemetry-drain-timeout-ms")??w.telemetryDrainTimeoutMs,idleMs:C(n.positional,"--idle-ms")??w.idleMs,residentVersion:ae(n.positional,"--resident-version")??t.version,registryPath:ae(n.positional,"--registry")??p.registryPath}),0):(process.stdout.write(`${ni()}
150
150
  `),0)}if(n.command==="warm-resident"){let m=o(process.cwd()),p=ae(n.positional,"--socket")??m.socketPath,k=ae(n.positional,"--wake-lock")??m.wakeLockPath,w=r(process.cwd(),process.env,n.storeUri??ae(n.positional,"--store-uri"));if(!w.enabled)return 0;let{warmResidentServer:T}=await Promise.resolve().then(()=>(je(),Lt));return await T({...m,socketPath:p,wakeLockPath:k},{storeUri:w.storeUri,ttlDays:C(n.positional,"--ttl-days")??w.ttlDays,ephemeralTtlHours:C(n.positional,"--ephemeral-ttl-hours")??w.ephemeralTtlHours,byteBudget:C(n.positional,"--byte-budget")??w.byteBudget,telemetryTtlDays:C(n.positional,"--telemetry-ttl-days")??w.telemetryTtlDays,telemetryByteBudget:C(n.positional,"--telemetry-byte-budget")??w.telemetryByteBudget,telemetryDrainIntervalMs:C(n.positional,"--telemetry-drain-interval-ms")??w.telemetryDrainIntervalMs,telemetryDrainTimeoutMs:C(n.positional,"--telemetry-drain-timeout-ms")??w.telemetryDrainTimeoutMs,idleMs:C(n.positional,"--idle-ms")??w.idleMs,clientVersion:t.version}),0}let u=o(process.cwd());if(n.command==="proxy"){let{runProxy:m}=await Promise.resolve().then(()=>(Bs(),Ns));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(()=>(je(),Lt)),k=n.command==="sweep"?await p(u):await m(u);return process.stdout.write(`${v(k)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reddb-io/red-skills",
3
- "version": "2.56.9",
3
+ "version": "2.57.0",
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",