@reddb-io/red-skills 2.25.1 → 2.26.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/dist/code-nav.bundle.min.mjs +1 -1
- package/dist/dev.bundle.min.mjs +362 -362
- package/dist/memory.bundle.min.mjs +1 -1
- package/dist/rsp.bundle.min.mjs +1 -1
- package/package.json +1 -1
|
@@ -6561,7 +6561,7 @@ Usage:
|
|
|
6561
6561
|
${n} archive --candidate <json> [--root <dir>] [--archive-dir <rel>]
|
|
6562
6562
|
${n} restore <name> [--root <dir>] [--archive-dir <rel>]`}function Fx(n){return _Wn(typeof n.root=="string"?n.root:process.cwd())}function not(n){return typeof n["archive-dir"]=="string"?n["archive-dir"]:void 0}async function Yj(n){let a=await Co(n);return a?a.mode!=="graph"?{ok:!1,message:`curate: skill telemetry needs graph mode (this project is "${a.mode}") \u2014 run \`${awe}\``}:sZ(a)?{ok:!0}:{ok:!1,message:`curate: skill telemetry is not enabled here \u2014 run \`${awe}\``}:{ok:!1,message:`curate: memory is not initialized here \u2014 run \`${awe}\``}}function JWn(){let n=EWn(CWn(import.meta.url));return n.includes("dist/curate-skill")||n.endsWith("dist/curate-skill")?eot(n,"..","cli.js"):eot(n,"..","cli.ts")}async function kWn(n,a){let i=["curate","skills","--json"];a!==void 0&&i.push("--stale-days",String(a));let d=JWn(),h=d.endsWith(".ts")?$st(process.execPath,["--import","tsx",d,...i,"--root",n],{encoding:"utf8"}):$st(process.execPath,[d,...i,"--root",n],{encoding:"utf8"}),y=h.status??1;if(y!==0)throw new Error(`memory curate skills exited ${y}`);return Kst(h.stdout??"")}function AWn(n){return typeof n.flags["stale-days"]=="string"?Number(n.flags["stale-days"]):void 0}async function Iot(n,a){return(a.loadCuratorReport??kWn)(Fx(n.flags),AWn(n))}async function LWn(n){let a=Fx(n.flags),i=await Yj(a);return i.ok?(console.log("curate: skill telemetry is enabled \u2014 ready to curate"),0):(console.error(i.message),2)}async function xWn(n,a){let i=Fx(n.flags),d=await Yj(i);if(!d.ok)return console.error(d.message),2;let b;try{b=await Iot(n,a)}catch(J){return console.error(`curate: ${J.message}`),1}let{candidates:h,byCategory:y,filtered:w}=Iwe(b);return console.log(JSON.stringify({candidates:h,byCategory:y,filtered:w,totals:{totalSkills:b.totalSkills,curatableSkills:b.curatableSkills,readOnlySkills:b.readOnlySkills}},null,2)),0}async function zWn(n,a){let i=Fx(n.flags),d=await Yj(i);if(!d.ok)return console.error(d.message),2;let b;try{b=await Iot(n,a)}catch(J){return console.error(`curate: ${J.message}`),1}let{byCategory:h}=Iwe(b);if(lwe(h)===0)return console.error("curate: no candidates \u2014 no issue filed"),0;let y=typeof n.flags.label=="string"?n.flags.label:void 0,w=await qst({byCategory:h,totals:{totalSkills:b.totalSkills,curatableSkills:b.curatableSkills,readOnlySkills:b.readOnlySkills},generatedAt:b.generatedAt},{cwd:i,label:y});return console.log(`curate: filed background issue \u2014 ${w.output||w.title}`),0}async function OWn(n){let a=Fx(n.flags),i=await Yj(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 b;try{b=JSON.parse(d)}catch(y){return console.error(`curate archive: invalid --candidate JSON: ${y.message}`),2}let h=await jst(b,{rootDir:a,archiveDir:not(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 UWn(n){let a=Fx(n.flags),i=await Yj(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 b=await Dst(d,{rootDir:a,archiveDir:not(n.flags)});return console.log(`curate: restored "${b.name}" \u2192 ${b.restoredRoot} (${b.files.length} file(s) hash-verified)`),0}async function lot(n,a={}){switch(n.command){case"check":return LWn(n);case"list":return xWn(n,a);case"background":return zWn(n,a);case"archive":return OWn(n);case"restore":return UWn(n);case void 0:case"--help":case"-h":return console.log(tot(a.usageCommand)),0;default:return console.error(`unknown curate subcommand: ${n.command}
|
|
6563
6563
|
|
|
6564
|
-
${tot(a.usageCommand)}`),2}}function aot(n){let a={app:n,version:MWn(Xx("__RED_BUILD_VERSION__",()=>"2.
|
|
6564
|
+
${tot(a.usageCommand)}`),2}}function aot(n){let a={app:n,version:MWn(Xx("__RED_BUILD_VERSION__",()=>"2.26.0")??"0.0.0-dev"),gitSha:Xx("__RED_BUILD_GIT_SHA__",()=>"c428450d9d6e8b6c27787808285ef7a488ab5921")??"unknown",buildTime:Xx("__RED_BUILD_TIME__",()=>"2026-07-11T13:53:55-03:00")??"unknown",bundleAsset:Xx("__RED_BUNDLE_ASSET__",()=>"memory.bundle.min.mjs")??"unknown"},i=Xx("__REDDB_SDK_VERSION__",()=>"1.7.0"),d=Xx("__REDDB_BINARY_TAG__",()=>"v1.7.0");return i&&(a.reddbSdkVersion=i),d&&(a.reddbBinaryTag=d),a}function MWn(n){return n.startsWith("v")?n.slice(1):n}function cot(n){return`${n.app} ${n.version} ${n.gitSha}`}function Xx(n,a){try{let i=a();return typeof i=="string"&&i.length>0?i:void 0}catch{return process.env[n.replace(/^__|__$/g,"")]}}var rot=`memory \u2014 governed operational memory for code agents
|
|
6565
6565
|
|
|
6566
6566
|
Common workflows:
|
|
6567
6567
|
remember one fact memory store "Decision: ..."
|
package/dist/rsp.bundle.min.mjs
CHANGED
|
@@ -33,7 +33,7 @@ ${t[t.length-1]}`,r=Buffer.from(n);return r.length<=vt?n:r.subarray(0,vt).toStri
|
|
|
33
33
|
`).filter(Boolean).map(c=>qt(c)).filter(_);if(t.length===0)return null;let n=[],r=0,i=0,s=0,o=0,a=[];for(let c of t){if(c.type==="suite"){c.event==="started"&&(s+=1,r+=N(c.test_count)),(c.event==="failed"||c.event==="ok")&&(i+=N(c.failed),o+=N(c.exec_time));continue}if(c.type==="test"&&c.event==="failed"){n.push({suite:x(c.name).split("::").slice(0,-1).join("::"),name:x(c.name),excerpt:x(c.stdout)});continue}if(c.reason==="compiler-message"&&_(c.message)){let l=x(c.message.rendered);l&&a.push(l)}}return n.length===0&&a.length>0&&(n.push({suite:"cargo check",name:"compile-error",excerpt:a.join(`
|
|
34
34
|
`)}),s||=1,r||=1,i||=1),i||=n.length,s||=1,r||=Math.max(i,n.length),{failed:i,total:r,suites:s,durationSeconds:o,failures:n}}async function si(e,t,n){let r=Buffer.from(e);if(r.length<=Ut)return{text:e,bytesElided:0};if(!n)throw new Error("over-limit test failure excerpt requires an elision store");let i=await n.mint(r,{command:t,loss:{level:"brief",bytes_elided:r.length}}),s=r.subarray(0,Ut).toString("utf8").replace(/\uFFFD$/,""),o=r.length-Buffer.byteLength(s);return{text:`${s}
|
|
35
35
|
\u2026 elided ${o} bytes (+${r.length}) \u2014 rsp show ${i}`,handle:i,bytesElided:r.length}}function qt(e){try{return JSON.parse(e)}catch{return null}}function oi(e){return Array.isArray(e)?e.map(t=>String(t)).filter(Boolean).join(`
|
|
36
|
-
`):""}function ai(e){return`${Number(e.toFixed(1))}s`}function ci(e,t){return e>0&&t>e?(t-e)/1e3:0}function N(e){return typeof e=="number"&&Number.isFinite(e)?e:0}function x(e){return typeof e=="string"?e:""}function _(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}async function di(e=process.argv.slice(2)){let t=fi(e),n=ft(process.cwd(),process.env,t.storeUri);if(!t.storeUri&&n.storeUri.startsWith("file://")&&!li(ui(n.storeUri)))return process.stdout.write(`error: rsp repo store is not provisioned - run /
|
|
36
|
+
`):""}function ai(e){return`${Number(e.toFixed(1))}s`}function ci(e,t){return e>0&&t>e?(t-e)/1e3:0}function N(e){return typeof e=="number"&&Number.isFinite(e)?e:0}function x(e){return typeof e=="string"?e:""}function _(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}async function di(e=process.argv.slice(2)){let t=fi(e),n=ft(process.cwd(),process.env,t.storeUri);if(!t.storeUri&&n.storeUri.startsWith("file://")&&!li(ui(n.storeUri)))return process.stdout.write(`error: rsp repo store is not provisioned - run /red-setup
|
|
37
37
|
`),1;let r=await fe.open({uri:n.storeUri,ttlDays:n.ttlDays,byteBudget:n.byteBudget});try{if(!t.command){let i=await r.stats();return process.stdout.write(yi(i)),0}if(t.command==="git"){let i=await xt(t.positional,{level:t.level,store:r});return process.stdout.write(i.stdout),process.stderr.write(i.stderr),i.signal?(process.kill(process.pid,i.signal),128):i.status??0}if(t.command==="gh"){let i=await Tt(t.positional,{level:t.level,store:r});return process.stdout.write(i.stdout),process.stderr.write(i.stderr),i.signal?(process.kill(process.pid,i.signal),128):i.status??0}if(t.command==="vitest"||t.command==="cargo"){let i=await Ct(t.positional,{level:t.level,store:r});return process.stdout.write(i.stdout),process.stderr.write(i.stderr),i.signal?(process.kill(process.pid,i.signal),128):i.status??0}if(t.command==="show"&&t.handle){let i=await r.get(t.handle);return i&&"original"in i&&i.original?(process.stdout.write(i.original),0):i?.status==="expired"?(process.stdout.write(`expired ${i.expired_at} \u2014 re-run: ${i.command}
|
|
38
38
|
`),1):(process.stdout.write(`expired unknown \u2014 re-run: ${t.handle}
|
|
39
39
|
`),1)}return process.stdout.write(`error: usage rsp show el:<id>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reddb-io/red-skills",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.26.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",
|