@reddb-io/red-skills 2.0.1 → 2.1.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/dev.bundle.min.mjs +381 -381
- package/dist/memory.bundle.min.mjs +1 -1
- package/package.json +1 -1
|
@@ -6508,7 +6508,7 @@ Usage:
|
|
|
6508
6508
|
${r} archive --candidate <json> [--root <dir>] [--archive-dir <rel>]
|
|
6509
6509
|
${r} restore <name> [--root <dir>] [--archive-dir <rel>]`}function rL(r){return Imr(typeof r.root=="string"?r.root:process.cwd())}function pct(r){return typeof r["archive-dir"]=="string"?r["archive-dir"]:void 0}async function KW(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 \`${oDe}\``}:lh(s)?{ok:!0}:{ok:!1,message:`curate: skill telemetry is not enabled here \u2014 run \`${oDe}\``}:{ok:!1,message:`curate: memory is not initialized here \u2014 run \`${oDe}\``}}function Omr(){let r=Nmr(Rmr(import.meta.url));return r.includes("dist/curate-skill")||r.endsWith("dist/curate-skill")?dct(r,"..","cli.js"):dct(r,"..","cli.ts")}async function Mmr(r,s){let l=["curate","skills","--json"];s!==void 0&&l.push("--stale-days",String(s));let f=Omr(),v=f.endsWith(".ts")?uct(process.execPath,["--import","tsx",f,...l,"--root",r],{encoding:"utf8"}):uct(process.execPath,[f,...l,"--root",r],{encoding:"utf8"}),T=v.status??1;if(T!==0)throw new Error(`memory curate skills exited ${T}`);return act(v.stdout??"")}function Fmr(r){return typeof r.flags["stale-days"]=="string"?Number(r.flags["stale-days"]):void 0}async function _ct(r,s){return(s.loadCuratorReport??Mmr)(rL(r.flags),Fmr(r))}async function Lmr(r){let s=rL(r.flags),l=await KW(s);return l.ok?(console.log("curate: skill telemetry is enabled \u2014 ready to curate"),0):(console.error(l.message),2)}async function jmr(r,s){let l=rL(r.flags),f=await KW(l);if(!f.ok)return console.error(f.message),2;let _;try{_=await _ct(r,s)}catch(B){return console.error(`curate: ${B.message}`),1}let{candidates:v,byCategory:T,filtered:N}=nDe(_);return console.log(JSON.stringify({candidates:v,byCategory:T,filtered:N,totals:{totalSkills:_.totalSkills,curatableSkills:_.curatableSkills,readOnlySkills:_.readOnlySkills}},null,2)),0}async function $mr(r,s){let l=rL(r.flags),f=await KW(l);if(!f.ok)return console.error(f.message),2;let _;try{_=await _ct(r,s)}catch(B){return console.error(`curate: ${B.message}`),1}let{byCategory:v}=nDe(_);if(iDe(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 lct({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 Bmr(r){let s=rL(r.flags),l=await KW(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 oct(_,{rootDir:s,archiveDir:pct(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 Jmr(r){let s=rL(r.flags),l=await KW(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 sct(f,{rootDir:s,archiveDir:pct(r.flags)});return console.log(`curate: restored "${_.name}" \u2192 ${_.restoredRoot} (${_.files.length} file(s) hash-verified)`),0}async function mct(r,s={}){switch(r.command){case"check":return Lmr(r);case"list":return jmr(r,s);case"background":return $mr(r,s);case"archive":return Bmr(r);case"restore":return Jmr(r);case void 0:case"--help":case"-h":return console.log(fct(s.usageCommand)),0;default:return console.error(`unknown curate subcommand: ${r.command}
|
|
6510
6510
|
|
|
6511
|
-
${fct(s.usageCommand)}`),2}}function gct(r){let s={app:r,version:zmr(nL("__RED_BUILD_VERSION__",()=>"2.0
|
|
6511
|
+
${fct(s.usageCommand)}`),2}}function gct(r){let s={app:r,version:zmr(nL("__RED_BUILD_VERSION__",()=>"2.1.0")??"0.0.0-dev"),gitSha:nL("__RED_BUILD_GIT_SHA__",()=>"d0cbafd7c18082a23e7556348573d3f44c0429d5")??"unknown",buildTime:nL("__RED_BUILD_TIME__",()=>"2026-07-06T12:07:24-03:00")??"unknown",bundleAsset:nL("__RED_BUNDLE_ASSET__",()=>"memory.bundle.min.mjs")??"unknown"},l=nL("__REDDB_SDK_VERSION__",()=>"1.7.0"),f=nL("__REDDB_BINARY_TAG__",()=>"v1.7.0");return l&&(s.reddbSdkVersion=l),f&&(s.reddbBinaryTag=f),s}function zmr(r){return r.startsWith("v")?r.slice(1):r}function hct(r){return`${r.app} ${r.version} ${r.gitSha}`}function nL(r,s){try{let l=s();return typeof l=="string"&&l.length>0?l:void 0}catch{return process.env[r.replace(/^__|__$/g,"")]}}var yct=`memory \u2014 governed operational memory for code agents
|
|
6512
6512
|
|
|
6513
6513
|
Common workflows:
|
|
6514
6514
|
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.0
|
|
3
|
+
"version": "2.1.0",
|
|
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",
|