@reddb-io/red-skills 2.48.0 → 2.49.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.
@@ -6563,7 +6563,7 @@ Usage:
6563
6563
  ${n} archive --candidate <json> [--root <dir>] [--archive-dir <rel>]
6564
6564
  ${n} restore <name> [--root <dir>] [--archive-dir <rel>]`}function fx(n){return fNn(typeof n.root=="string"?n.root:process.cwd())}function got(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 \`${Ywe}\``}:sZ(a)?{ok:!0}:{ok:!1,message:`curate: skill telemetry is not enabled here \u2014 run \`${Ywe}\``}:{ok:!1,message:`curate: memory is not initialized here \u2014 run \`${Ywe}\``}}function HNn(){let n=XNn(wNn(import.meta.url));return n.includes("dist/curate-skill")||n.endsWith("dist/curate-skill")?Yot(n,"..","cli.js"):Yot(n,"..","cli.ts")}async function QNn(n,a){let i=["curate","skills","--json"];a!==void 0&&i.push("--stale-days",String(a));let d=HNn(),h=d.endsWith(".ts")?Not(process.execPath,["--import","tsx",d,...i,"--root",n],{encoding:"utf8"}):Not(process.execPath,[d,...i,"--root",n],{encoding:"utf8"}),y=h.status??1;if(y!==0)throw new Error(`memory curate skills exited ${y}`);return Zot(h.stdout??"")}function ENn(n){return typeof n.flags["stale-days"]=="string"?Number(n.flags["stale-days"]):void 0}async function yot(n,a){return(a.loadCuratorReport??QNn)(fx(n.flags),ENn(n))}async function _Nn(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 CNn(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 yot(n,a)}catch(J){return console.error(`curate: ${J.message}`),1}let{candidates:h,byCategory:y,filtered:w}=Wwe(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 JNn(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 yot(n,a)}catch(J){return console.error(`curate: ${J.message}`),1}let{byCategory:h}=Wwe(b);if(Nwe(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 Wot({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 kNn(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 uot(b,{rootDir:a,archiveDir:got(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 ANn(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 pot(d,{rootDir:a,archiveDir:got(n.flags)});return console.log(`curate: restored "${b.name}" \u2192 ${b.restoredRoot} (${b.files.length} file(s) hash-verified)`),0}async function Rot(n,a={}){switch(n.command){case"check":return _Nn(n);case"list":return CNn(n,a);case"background":return JNn(n,a);case"archive":return kNn(n);case"restore":return ANn(n);case void 0:case"--help":case"-h":return console.log(Vot(a.usageCommand)),0;default:return console.error(`unknown curate subcommand: ${n.command}
6565
6565
 
6566
- ${Vot(a.usageCommand)}`),2}}function vot(n){let a={app:n,version:LNn(wx("__RED_BUILD_VERSION__",()=>"2.48.0")??"0.0.0-dev"),gitSha:wx("__RED_BUILD_GIT_SHA__",()=>"bc7d5ff58fbd4b0a9373d5e9ebc1daf73efdc968")??"unknown",buildTime:wx("__RED_BUILD_TIME__",()=>"2026-07-13T05:08:16-03:00")??"unknown",bundleAsset:wx("__RED_BUNDLE_ASSET__",()=>"memory.bundle.min.mjs")??"unknown"},i=wx("__REDDB_SDK_VERSION__",()=>"1.23.1"),d=wx("__REDDB_BINARY_TAG__",()=>"v1.23.1");return i&&(a.reddbSdkVersion=i),d&&(a.reddbBinaryTag=d),a}function LNn(n){return n.startsWith("v")?n.slice(1):n}function Fot(n){return`${n.app} ${n.version} ${n.gitSha}`}function wx(n,a){try{let i=a();return typeof i=="string"&&i.length>0?i:void 0}catch{return process.env[n.replace(/^__|__$/g,"")]}}var Xot=`memory \u2014 governed operational memory for code agents
6566
+ ${Vot(a.usageCommand)}`),2}}function vot(n){let a={app:n,version:LNn(wx("__RED_BUILD_VERSION__",()=>"2.49.0")??"0.0.0-dev"),gitSha:wx("__RED_BUILD_GIT_SHA__",()=>"4ef4bdc2bb7b21bb4a6b9f6c83d702d298446661")??"unknown",buildTime:wx("__RED_BUILD_TIME__",()=>"2026-07-13T05:36:39-03:00")??"unknown",bundleAsset:wx("__RED_BUNDLE_ASSET__",()=>"memory.bundle.min.mjs")??"unknown"},i=wx("__REDDB_SDK_VERSION__",()=>"1.23.1"),d=wx("__REDDB_BINARY_TAG__",()=>"v1.23.1");return i&&(a.reddbSdkVersion=i),d&&(a.reddbBinaryTag=d),a}function LNn(n){return n.startsWith("v")?n.slice(1):n}function Fot(n){return`${n.app} ${n.version} ${n.gitSha}`}function wx(n,a){try{let i=a();return typeof i=="string"&&i.length>0?i:void 0}catch{return process.env[n.replace(/^__|__$/g,"")]}}var Xot=`memory \u2014 governed operational memory for code agents
6567
6567
 
6568
6568
  Common workflows:
6569
6569
  remember one fact memory store "Decision: ..."