@reddb-io/red-skills 2.4.0 → 2.4.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/brain.bundle.min.mjs +57 -57
- package/dist/dev.bundle.min.mjs +416 -416
- package/dist/memory.bundle.min.mjs +1 -1
- package/package.json +1 -1
|
@@ -6515,7 +6515,7 @@ Usage:
|
|
|
6515
6515
|
${r} archive --candidate <json> [--root <dir>] [--archive-dir <rel>]
|
|
6516
6516
|
${r} restore <name> [--root <dir>] [--archive-dir <rel>]`}function nL(r){return ygr(typeof r.root=="string"?r.root:process.cwd())}function Dct(r){return typeof r["archive-dir"]=="string"?r["archive-dir"]:void 0}async function YW(r){let s=await Mu(r);return s?s.mode!=="graph"?{ok:!1,message:`curate: skill telemetry needs graph mode (this project is "${s.mode}") \u2014 run \`${_De}\``}:uh(s)?{ok:!0}:{ok:!1,message:`curate: skill telemetry is not enabled here \u2014 run \`${_De}\``}:{ok:!1,message:`curate: memory is not initialized here \u2014 run \`${_De}\``}}function bgr(){let r=hgr(vgr(import.meta.url));return r.includes("dist/curate-skill")||r.endsWith("dist/curate-skill")?Ect(r,"..","cli.js"):Ect(r,"..","cli.ts")}async function Sgr(r,s){let l=["curate","skills","--json"];s!==void 0&&l.push("--stale-days",String(s));let f=bgr(),v=f.endsWith(".ts")?Cct(process.execPath,["--import","tsx",f,...l,"--root",r],{encoding:"utf8"}):Cct(process.execPath,[f,...l,"--root",r],{encoding:"utf8"}),T=v.status??1;if(T!==0)throw new Error(`memory curate skills exited ${T}`);return kct(v.stdout??"")}function xgr(r){return typeof r.flags["stale-days"]=="string"?Number(r.flags["stale-days"]):void 0}async function Act(r,s){return(s.loadCuratorReport??Sgr)(nL(r.flags),xgr(r))}async function kgr(r){let s=nL(r.flags),l=await YW(s);return l.ok?(console.log("curate: skill telemetry is enabled \u2014 ready to curate"),0):(console.error(l.message),2)}async function wgr(r,s){let l=nL(r.flags),f=await YW(l);if(!f.ok)return console.error(f.message),2;let _;try{_=await Act(r,s)}catch(B){return console.error(`curate: ${B.message}`),1}let{candidates:v,byCategory:T,filtered:N}=fDe(_);return console.log(JSON.stringify({candidates:v,byCategory:T,filtered:N,totals:{totalSkills:_.totalSkills,curatableSkills:_.curatableSkills,readOnlySkills:_.readOnlySkills}},null,2)),0}async function Tgr(r,s){let l=nL(r.flags),f=await YW(l);if(!f.ok)return console.error(f.message),2;let _;try{_=await Act(r,s)}catch(B){return console.error(`curate: ${B.message}`),1}let{byCategory:v}=fDe(_);if(pDe(v)===0)return console.error("curate: no candidates \u2014 no issue filed"),0;let T=typeof r.flags.label=="string"?r.flags.label:void 0,N=await Tct({byCategory:v,totals:{totalSkills:_.totalSkills,curatableSkills:_.curatableSkills,readOnlySkills:_.readOnlySkills},generatedAt:_.generatedAt},{cwd:l,label:T});return console.log(`curate: filed background issue \u2014 ${N.output||N.title}`),0}async function Cgr(r){let s=nL(r.flags),l=await YW(s);if(!l.ok)return console.error(l.message),2;let f=r.flags.candidate;if(typeof f!="string")return console.error("curate archive: --candidate <json> is required"),2;let _;try{_=JSON.parse(f)}catch(T){return console.error(`curate archive: invalid --candidate JSON: ${T.message}`),2}let v=await Sct(_,{rootDir:s,archiveDir:Dct(r.flags)});return v.ok?(console.log(`curate: archived "${v.receipt.name}" \u2192 ${v.receipt.archiveRoot} (${v.receipt.files.length} file(s), manifest at ${v.receipt.manifestPath})`),0):(console.error(`curate archive: refused \u2014 ${v.rejection.reason}: ${v.rejection.detail}`),3)}async function Egr(r){let s=nL(r.flags),l=await YW(s);if(!l.ok)return console.error(l.message),2;let f=r.positional[0];if(!f)return console.error("curate restore: skill name is required"),2;let _=await xct(f,{rootDir:s,archiveDir:Dct(r.flags)});return console.log(`curate: restored "${_.name}" \u2192 ${_.restoredRoot} (${_.files.length} file(s) hash-verified)`),0}async function Nct(r,s={}){switch(r.command){case"check":return kgr(r);case"list":return wgr(r,s);case"background":return Tgr(r,s);case"archive":return Cgr(r);case"restore":return Egr(r);case void 0:case"--help":case"-h":return console.log(Pct(s.usageCommand)),0;default:return console.error(`unknown curate subcommand: ${r.command}
|
|
6517
6517
|
|
|
6518
|
-
${Pct(s.usageCommand)}`),2}}function Ict(r){let s={app:r,version:Pgr(iL("__RED_BUILD_VERSION__",()=>"2.4.
|
|
6518
|
+
${Pct(s.usageCommand)}`),2}}function Ict(r){let s={app:r,version:Pgr(iL("__RED_BUILD_VERSION__",()=>"2.4.2")??"0.0.0-dev"),gitSha:iL("__RED_BUILD_GIT_SHA__",()=>"9e5142051cfdca3d56adb889da63738b714719b6")??"unknown",buildTime:iL("__RED_BUILD_TIME__",()=>"2026-07-07T02:25:19-03:00")??"unknown",bundleAsset:iL("__RED_BUNDLE_ASSET__",()=>"memory.bundle.min.mjs")??"unknown"},l=iL("__REDDB_SDK_VERSION__",()=>"1.7.0"),f=iL("__REDDB_BINARY_TAG__",()=>"v1.7.0");return l&&(s.reddbSdkVersion=l),f&&(s.reddbBinaryTag=f),s}function Pgr(r){return r.startsWith("v")?r.slice(1):r}function Rct(r){return`${r.app} ${r.version} ${r.gitSha}`}function iL(r,s){try{let l=s();return typeof l=="string"&&l.length>0?l:void 0}catch{return process.env[r.replace(/^__|__$/g,"")]}}var Oct=`memory \u2014 governed operational memory for code agents
|
|
6519
6519
|
|
|
6520
6520
|
Common workflows:
|
|
6521
6521
|
remember one fact memory store "Decision: ..."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reddb-io/red-skills",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
4
4
|
"description": "RedSkills plugin runtime bundles (dev, 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",
|