@kitelev/exocortex-cli 16.34.0 → 16.34.1

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // @kitelev/exocortex-cli v16.34.0
2
+ // @kitelev/exocortex-cli v16.34.1
3
3
  // CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more
4
4
  // License: MIT
5
5
 
@@ -766,7 +766,7 @@ ${r}`}o($J,"serializeFile");function CN(n,e,t={}){let r=yy.default.dirname(n),i=
766
766
  `).map(s=>s.trim()).filter(Boolean)){let s=UJ.exec(i);if(s){r.push({sessionName:i,uuid:s[1],type:"full"});continue}let a=VJ.exec(i);a&&r.push({sessionName:i,uuid:a[1],type:"short"})}return r}o(qJ,"listClaudeChildSessions");function GJ(n,e,t){let r=null,i=e.toLowerCase();function s(a){if(r)return;let c;try{c=(0,by.readdirSync)(a,{withFileTypes:!0})}catch{return}for(let l of c){if(r)return;if(l.name.startsWith(".")||l.name==="node_modules")continue;let u=(0,RN.join)(a,l.name);if(l.isDirectory())s(u);else if(l.name.endsWith(".md")){let f=l.name.slice(0,-3).toLowerCase();(t==="full"&&f===i||t==="short"&&f.startsWith(i))&&(r=u)}}}return o(s,"walk"),s(n),r}o(GJ,"findVaultFile");function WJ(n,e){try{let i=(e??(s=>(0,by.readFileSync)(s,"utf8")))(n).match(/ems__Effort_status\s*:.*\[\[([^\]]+)\]\]/);return i?i[1].includes(BJ):!1}catch{return!1}}o(WJ,"isTaskDoing");async function PN(n,e=_y.exec,t){let r=await qJ(e),i=[];for(let s of r){let a=GJ(n,s.uuid,s.type);if(!a){i.push({sessionName:s.sessionName,taskUuid:s.uuid,taskFilePath:null,reason:"vault task not found"});continue}WJ(a,t)||i.push({sessionName:s.sessionName,taskUuid:s.uuid,taskFilePath:a,reason:"vault task status != Doing"})}return i}o(PN,"detectOrphans");async function DN(n,e,t=_y.exec,r=CN){let i=ON(t);if(e)return{ok:!0};let s=new Date().toISOString();if(n.taskFilePath)try{r(n.taskFilePath,{ems__Effort_status:"[[ems__EffortStatusFailed]]",aiTask__Task_lastError:`orphan recovery: ${n.reason}`,exo__Asset_updatedAt:s})}catch(a){return{ok:!1,error:`vault update failed: ${a.message}`}}try{await i(`tmux kill-session -t ${JSON.stringify(n.sessionName)}`)}catch{}return{ok:!0}}o(DN,"recoverOrphan");function zJ(){return process.env.EXOCORTEX_VAULT??(0,Sy.join)((0,NN.homedir)(),"vault-2025")}o(zJ,"defaultVault");function LN(){return new ve("recover").description("Detect and recover orphaned claude-child tmux sessions. A session is orphaned when the corresponding vault task is not in Doing status. Default mode: dry-run (no changes). Use --apply to perform recovery.").option("--vault <path>","Path to Obsidian vault",zJ()).option("--dry-run","List orphans without applying changes (default)",!1).option("--apply","Apply orphan recovery: set Failed + kill tmux session",!1).action(async n=>{let e=(0,Sy.resolve)(n.vault);if(!(0,FN.existsSync)(e)){console.error(`[recover] vault not found: ${e}`),process.exitCode=1;return}let t=!n.apply;console.log(`[recover] vault=${e} mode=${t?"dry-run":"apply"}`);let r=await PN(e);if(r.length===0){console.log("[recover] No orphaned claude-child sessions found.");return}console.log(`[recover] Found ${r.length} orphan(s):`);for(let a of r){let c=a.taskFilePath??"(not found in vault)";console.log(` session=${a.sessionName} uuid=${a.taskUuid} reason=${a.reason}`),console.log(` file=${c}`)}if(t){console.log("[recover] Dry-run mode: no changes applied. Use --apply to recover.");return}let i=0,s=0;for(let a of r){let c=await DN(a,!1);c.ok?(i++,console.log(`[recover] RECOVERED: ${a.sessionName}`)):(s++,console.error(`[recover] ERROR recovering ${a.sessionName}: ${c.error}`))}console.log(`[recover] Done: recovered=${i} errors=${s}`),s>0&&(process.exitCode=1)})}o(LN,"recoverCommand");var t2=require("fs"),wy=require("path"),Xn=oe(sr());function HJ(n,e){return e.concat([n])}o(HJ,"collectAlso");var QJ="https://exocortex.my/ontology/find#Alias_sparql",YJ="https://exocortex.my/ontology/exo#Asset_label";function pu(n){if(n&&typeof n=="object"&&"value"in n){let e=n.value;return typeof e=="string"?e:String(e)}return String(n)}o(pu,"nodeValue");async function KJ(n,e){let t=await n.match(void 0,void 0,void 0),r=[];for(let s of t)pu(s.predicate)!==YJ||pu(s.object)!==e||r.push(pu(s.subject));if(r.length===0)return null;let i=[];for(let s of r)for(let a of t)pu(a.predicate)===QJ&&pu(a.subject)===s&&i.push(pu(a.object));if(i.length===0)return null;if(i.length>1)throw new Bt(`Ambiguous find__Alias "${e}" \u2014 ${i.length} instances define a sparql fragment`,`Ensure exactly one find__Alias asset has exo:Asset_label "${e}"`);return i[0]}o(KJ,"resolveAliasFragment");var XJ=/^([a-z][a-zA-Z0-9]*)__([A-Za-z0-9_]+)$/,JJ="https://exocortex.my/ontology/";function ZJ(n,e){let t=XJ.exec(e);if(t){let i=`<${JJ}${t[1]}#${t[2]}>`;return n.replace(/\?value\b/g,i)}let r=e.replace(/\\/g,"\\\\").replace(/"/g,'\\"');return n.replace(/\?value\b/g,`"${r}"`)}o(ZJ,"bindValueLiteral");function kN(){return new ve("find").description("Find vault assets via SPARQL \u2014 outputs file paths one per line (RFC 8e83442b T1.1)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--also <path>","Additional vault to include (repeatable)",HJ,[]).option("--sparql <query>","SPARQL SELECT query (must bind ?path)").option("--class <value>","Filter by class label via find__Alias 'class' (e.g. ems__Task)").action(async n=>{se.setFormat("text");try{if(n.sparql&&n.class)throw new Bt("--sparql and --class are mutually exclusive","Pass either a raw --sparql query or a find__Alias-backed flag like --class");if(!n.sparql&&!n.class)throw new Bt("one of --sparql <query> or --class <value> is required",'exocortex find --class ems__Task OR exocortex find --sparql "SELECT ?path WHERE { ... }"');let e=(0,wy.resolve)(n.vault);if(!(0,t2.existsSync)(e))throw new Pe(e);let t=new jt(e),i=await new Xn.NoteToRDFConverter(t).convertVault(),s=n.also||[];for(let w of s){let E=(0,wy.resolve)(w);if(!(0,t2.existsSync)(E))throw new Pe(E);let I=new jt(E),N=await new Xn.NoteToRDFConverter(I).convertVault();i=i.concat(N)}let a=new Xn.InMemoryTripleStore;await a.addAll(i);let c;if(n.class){let w=await KJ(a,"class");if(w===null)throw new Bt('No find__Alias with exo:Asset_label "class" was found in the vault',"Seed a find__Alias asset (label=class) or fall back to exocortex find --sparql");c=`SELECT ?path WHERE { ${ZJ(w,n.class)} }`}else c=n.sparql;let l=au(c);l=lo(l);let u=new Xn.ExoQLParser,f=uo(co(e));for(let w of s){let E=uo(co((0,wy.resolve)(w)));for(let[I,F]of E)f.has(I)||f.set(I,F)}f.size>0&&u.setVaultPrefixes(f);let d=u.parse(l),p=new Xn.ExoQLAlgebraTranslator().translate(d);p.type!=="construct"&&(p=new Xn.AlgebraOptimizer().optimize(p));let b=await new Xn.ExoQLQueryExecutor(a).executeAll(p),v="obsidian://vault/";for(let w of b){let I=w.toJSON().path;if(typeof I!="string"||!I.startsWith(v))continue;let F=I.slice(v.length),N;try{N=decodeURIComponent(F)}catch{N=F}process.stdout.write(N+`
767
767
  `)}}catch(e){se.handle(e),process.exit(5)}})}o(kN,"findCommand");var s2=require("fs"),a2=require("path"),Ce=oe(sr());var BN=oe(sr()),Ft=oe($N());var UN="obsidian://vault/";function hZ(n){let e=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;return{async resolveTargetPath(t){if(!t)throw new Error("Cannot resolve empty targetIRI to a vault path");let r=t;if(r.startsWith(UN))r=decodeURI(r.slice(UN.length));else if(e.test(r)){let i=await n.findFileByUID(r);if(!i)throw new Error(`No vault file found for UID: ${r}`);r=i}if(r.endsWith(".md")||(r=`${r}.md`),!await n.fileExists(r))throw new Error(`Cannot resolve target file for IRI "${t}" (tried "${r}")`);return r}}}o(hZ,"createCliPathResolver");var pZ=["openFile","sparqlSelect","getActiveFileIRI","getActiveFilePath","trashFile","duplicateFile"],i2=class extends Error{constructor(t){super(`Service "${t}" is not implemented in the CLI (no-op stub). dyncommand exec on this service_call grounding cannot change vault state. See CLI parity issues #2865-#2868 for port status.`);this.serviceId=t;this.name="CliServiceNotImplementedError"}static{o(this,"CliServiceNotImplementedError")}};function VN(n){return{async execute(){throw new i2(n)}}}o(VN,"notImplementedService");function mZ(n){return e=>{let t=n.getFirstLinkpathDest(e,"");if(!t||!("basename"in t))return null;let i=n.getFrontmatter(t)?.exo__Asset_label;return typeof i=="string"&&i.length>0?i:null}}o(mZ,"createCliClassResolver");function qN(n,e){for(let t of pZ)n.register(t,VN(t));for(let t of["updateProperty","removeProperty","setStatus","createAsset"])n.register(t,VN(t));if(e){if(e.fsAdapter){let t=new BN.FrontmatterService,r=hZ(e.fsAdapter);n.register("updateProperty",(0,Ft.createUpdatePropertyService)(e.fsAdapter,t,r)),n.register("removeProperty",(0,Ft.createRemovePropertyService)(e.fsAdapter,t,r)),n.register("setStatus",(0,Ft.createSetStatusService)(e.fsAdapter,t,r)),n.register("createAsset",(0,Ft.createCreateAssetService)(e.vaultAdapter,e.fsAdapter,mZ(e.vaultAdapter)))}n.register("createRelatedTask",(0,Ft.createCreateRelatedTaskService)(e.vaultAdapter,e.genericAssetCreationService)),n.register("createRelatedProject",(0,Ft.createCreateRelatedProjectService)(e.vaultAdapter,e.genericAssetCreationService)),n.register("archiveAsset",(0,Ft.createArchiveAssetService)(e.vaultAdapter,e.archiveAssetService)),n.register("planForEvening",(0,Ft.createPlanForEveningService)(e.vaultAdapter,e.taskStatusService)),n.register("cleanProperties",(0,Ft.createCleanPropertiesService)(e.vaultAdapter,e.propertyCleanupService)),n.register("renameToUid",(0,Ft.createRenameToUidService)(e.vaultAdapter,e.renameToUidService)),n.register("repairFolder",(0,Ft.createRepairFolderService)(e.vaultAdapter,e.folderRepairService)),n.register("fixMissingLabel",(0,Ft.createFixMissingLabelService)(e.vaultAdapter,e.fixMissingLabelService))}}o(qN,"populateCliServiceRegistry");var gZ=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;async function yZ(){if(process.stdin.isTTY)return[];let n=[];for await(let t of process.stdin)n.push(t);return Buffer.concat(n).toString("utf-8").split(`
768
768
  `).map(t=>t.trim()).filter(t=>t.length>0)}o(yZ,"readStdinLines");function Ey(n){if(n&&typeof n=="object"&&"value"in n){let e=n.value;return typeof e=="string"?e:String(e)}return String(n)}o(Ey,"nodeValue");async function _Z(n,e){let t=new Ce.IRI("https://exocortex.my/ontology/exocmd#Command_cliName"),r=await n.match(void 0,t,void 0),i=[];for(let s of r)if(Ey(s.object)===e){let l=Ey(s.subject).match(/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.md$/i);l&&i.push(l[1])}if(i.length===0)return null;if(i.length>1)throw new Bt(`Ambiguous cliName "${e}" \u2014 resolves to ${i.length} commands: ${i.join(", ")}`,"Use the UUID directly: exocortex apply <uuid> <path>");return i[0]}o(_Z,"resolveSlugToUuid");async function bZ(n,e){let t=new Ce.IRI("https://exocortex.my/ontology/exocmd#Command_destructive"),r=await n.match(void 0,t,void 0);for(let i of r)if(Ey(i.subject).includes(e)){let a=Ey(i.object);if(a==="true"||a==="True")return!0}return!1}o(bZ,"isDestructive");async function SZ(n,e,t,r,i,s,a,c){let l=(0,a2.resolve)(n,i);if(!(0,s2.existsSync)(l))return console.error(`\u274C Target file not found: ${i}`),!1;let u=new Ce.CommandResolver(e),f=await u.loadCommand(r);if(!f)return console.error(`\u274C Command with UID "${r}" not found.`),!1;if(await bZ(e,r)&&!s.dryRun&&!s.yes)return console.error(`\u274C Command "${f.name}" is marked destructive. Add --dry-run to preview, or --yes to apply.`),!1;let h=(0,Ce.vaultPathToIRI)(i);if(!await new Ce.PreconditionEvaluator(e,void 0,{clock:a}).evaluate(f.precondition,h))return console.error(`\u274C Precondition not satisfied for "${f.name}" on "${i}".`),!1;if(s.dryRun)return console.log(`\u{1F50D} Dry-run: would apply "${f.name}" to "${i}" (precondition passed).`),!0;let b=new Ce.ServiceRegistry,v=new jt(n),w=new Ce.GenericAssetCreationService(v).withDeterminism({clock:a,uidGenerator:c}),E=new Ce.ArchiveAssetService(v),I=new Ce.PropertyCleanupService(v),F=new Ce.FixMissingLabelService(v),N=new Ce.RenameToUidService(v),ee=new Ce.FolderRepairService(v),V=new Ce.TaskStatusService(v,new Ce.EffortStatusWorkflow,new Ce.StatusTimestampService(v)),W=new _r(n);qN(b,{vaultAdapter:v,fsAdapter:W,genericAssetCreationService:w,archiveAssetService:E,taskStatusService:V,propertyCleanupService:I,fixMissingLabelService:F,renameToUidService:N,folderRepairService:ee});let D=new Ce.GroundingExecutor(W,W,b,(0,Ce.createVaultFrontmatterClassLabelResolver)(W),{clock:a,uidGenerator:c,workflowResolver:t,groundingLoader:o(ae=>u.loadGroundingByUid(ae),"groundingLoader")}),L;if(s.input)try{let ae=JSON.parse(s.input);if(typeof ae!="object"||ae===null||Array.isArray(ae))throw new Error("must be a JSON object");L=ae}catch(ae){let Ze=ae instanceof Error?ae.message:String(ae);return console.error(`\u274C --input: invalid JSON object (${Ze})`),!1}let K=await D.execute(f.grounding,h,i,L);if(K.success){let ae=f.successMessage??`Applied "${f.name}" to "${i}".`;return console.log(`\u2705 ${ae}`),!0}else return console.error(`\u274C "${f.name}" failed on "${i}": ${K.error}`),!1}o(SZ,"executeOnTarget");function GN(){return new ve("apply").description("Apply an exocmd__Command to one or more vault assets (RFC 8e83442b T1.2). Pass a path arg or pipe paths via stdin.").argument("<cmd>","Command UUID or cliName slug").argument("[path]","Vault-relative path to target asset (omit to read paths from stdin)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--dry-run","Preview without writing").option("--yes","Skip destructive-command confirmation").option("--input <json>","JSON userInput for service_call groundings").option("--seed <uuid>","Deterministic UID seed for test/replay (uses seededUidGenerator)").option("--frozen-clock <iso>","Freeze clock to ISO timestamp for test/replay (uses frozenClock)").action(async(n,e,t)=>{se.setFormat("text");try{let r=(0,a2.resolve)(t.vault);if(!(0,s2.existsSync)(r))throw new Pe(r);oy(r);let i=t.frozenClock?(0,Ce.frozenClock)(t.frozenClock):(0,Ce.liveClock)(),s=t.seed?(0,Ce.seededUidGenerator)(t.seed):(0,Ce.liveUidGenerator)(),a=new jt(r),l=await new Ce.NoteToRDFConverter(a).convertVault(),u=new Ce.InMemoryTripleStore;await u.addAll(l);let f=new Ce.WorkflowResolver(u),d;if(gZ.test(n))d=n;else{let b=await _Z(u,n);b||(console.error(`\u274C No command found with UUID or cliName "${n}".`),process.exit(3)),d=b}let h;if(e)h=[e];else if(h=await yZ(),h.length===0)throw new Bt("No target path provided and stdin is empty.","exocortex apply <uuid> <path> OR exocortex find ... | exocortex apply <uuid>");let p=0,y=0;for(let b of h)await SZ(r,u,f,d,b,t,i,s)?p++:y++;h.length>1&&console.log(`
769
- \u{1F4CA} Applied to ${p}/${h.length} target(s) (${y} failed).`),y>0&&process.exit(5)}catch(r){se.handle(r),process.exit(5)}})}o(GN,"applyCommand");var ho=require("fs"),mu=require("path");var WN=/^---\s*$/,wZ=/^exocmd__Grounding_type:\s*(.+?)\s*$/,vZ=/^"?\[\[[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?:\|[^\]]*)?\]\]"?$/i,EZ=new Set(["node_modules"]);function TZ(n){return n.startsWith(".")||EZ.has(n)}o(TZ,"shouldSkipDir");function*zN(n){let e;try{e=(0,ho.readdirSync)(n,{withFileTypes:!0})}catch(t){let r=t;if(r.code==="EPERM"||r.code==="EACCES"||r.code==="ENOENT")return;throw t}for(let t of e){let r=(0,mu.join)(n,t.name);if(t.isDirectory()){if(TZ(t.name))continue;yield*zN(r)}else t.isFile()&&t.name.endsWith(".md")&&(yield r)}}o(zN,"walkMarkdownFiles");function AZ(n){let e=n.split(/\r?\n/);if(e.length<2||!WN.test(e[0]))return null;for(let t=1;t<e.length;t++)if(WN.test(e[t]))return{lines:e.slice(1,t),startLine:2};return null}o(AZ,"extractFrontmatter");function IZ(n){let e=n.trim();return e===""||e==="null"||e==="~"?!1:!vZ.test(e)}o(IZ,"isLiteralForm");function xZ(n){let e=[];for(let t of zN(n)){let r;try{r=(0,ho.readFileSync)(t,"utf-8")}catch{continue}let i=AZ(r);if(i)for(let s=0;s<i.lines.length;s++){let a=i.lines[s].match(wZ);if(!a)continue;let c=a[1];IZ(c)&&e.push({path:(0,mu.relative)(n,t),line:i.startLine+s,value:c})}}return e}o(xZ,"scanVaultForLiteralForm");function HN(){return new ve("grounding-type-literal-form").description("Detect post-Phase-4+1 regressions: any exocmd__Grounding_type literal-string form (not wikilink) in vault frontmatter").requiredOption("--vault <path>","Vault root directory").option("--output <type>","Response format: text|json","text").action(n=>{let e=n.output??"text";se.setFormat(e);try{let t=(0,mu.resolve)(n.vault);if(!(0,ho.existsSync)(t)||!(0,ho.statSync)(t).isDirectory())throw new Pe(t);let r=xZ(t);if(e==="json")console.log(JSON.stringify({vaultPath:t,violationCount:r.length,violations:r,clean:r.length===0},null,2));else if(r.length===0)console.log(`OK ${t}: 0 exocmd__Grounding_type literal-form violations`);else{console.error(`FAIL ${t}: ${r.length} exocmd__Grounding_type literal-form violation(s):`);for(let i of r)console.error(` ${i.path}:${i.line} \u2014 value: ${i.value}`);console.error("\nRFC 9d20c91f Phase 3 migrated all values to wikilink form `[[<uid>]]`. Re-run the Phase 3 migration script or hand-edit offending files.")}r.length>0&&(process.exitCode=1)}catch(t){se.handle(t)}})}o(HN,"auditGroundingTypeLiteralFormCommand");function QN(){let n=new ve("audit").description("Audit vault for regression patterns (RFC cutover detectors)");return n.addCommand(HN()),n}o(QN,"auditCommand");function YN(n){let e=new ve;return e.name("exocortex").description("CLI tool for Exocortex knowledge management system").version(n??"16.34.0"),e.addCommand(kN()),e.addCommand(GN()),e.addCommand(uF()),e.addCommand(pF()),e.addCommand(UF()),e.addCommand(yF()),e.addCommand(_F()),e.addCommand(EF()),e.addCommand(qF()),e.addCommand(eN()),e.addCommand(nN()),e.addCommand(iN()),e.addCommand(aN()),e.addCommand(yN()),e.addCommand(_N()),e.addCommand(AN()),e.addCommand(LN()),e.addCommand(QN()),e}o(YN,"createProgram");YN().parse();0&&(module.exports={createProgram});
769
+ \u{1F4CA} Applied to ${p}/${h.length} target(s) (${y} failed).`),y>0&&process.exit(5)}catch(r){se.handle(r),process.exit(5)}})}o(GN,"applyCommand");var ho=require("fs"),mu=require("path");var WN=/^---\s*$/,wZ=/^exocmd__Grounding_type:\s*(.+?)\s*$/,vZ=/^"?\[\[[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?:\|[^\]]*)?\]\]"?$/i,EZ=new Set(["node_modules"]);function TZ(n){return n.startsWith(".")||EZ.has(n)}o(TZ,"shouldSkipDir");function*zN(n){let e;try{e=(0,ho.readdirSync)(n,{withFileTypes:!0})}catch(t){let r=t;if(r.code==="EPERM"||r.code==="EACCES"||r.code==="ENOENT")return;throw t}for(let t of e){let r=(0,mu.join)(n,t.name);if(t.isDirectory()){if(TZ(t.name))continue;yield*zN(r)}else t.isFile()&&t.name.endsWith(".md")&&(yield r)}}o(zN,"walkMarkdownFiles");function AZ(n){let e=n.split(/\r?\n/);if(e.length<2||!WN.test(e[0]))return null;for(let t=1;t<e.length;t++)if(WN.test(e[t]))return{lines:e.slice(1,t),startLine:2};return null}o(AZ,"extractFrontmatter");function IZ(n){let e=n.trim();return e===""||e==="null"||e==="~"?!1:!vZ.test(e)}o(IZ,"isLiteralForm");function xZ(n){let e=[];for(let t of zN(n)){let r;try{r=(0,ho.readFileSync)(t,"utf-8")}catch{continue}let i=AZ(r);if(i)for(let s=0;s<i.lines.length;s++){let a=i.lines[s].match(wZ);if(!a)continue;let c=a[1];IZ(c)&&e.push({path:(0,mu.relative)(n,t),line:i.startLine+s,value:c})}}return e}o(xZ,"scanVaultForLiteralForm");function HN(){return new ve("grounding-type-literal-form").description("Detect post-Phase-4+1 regressions: any exocmd__Grounding_type literal-string form (not wikilink) in vault frontmatter").requiredOption("--vault <path>","Vault root directory").option("--output <type>","Response format: text|json","text").action(n=>{let e=n.output??"text";se.setFormat(e);try{let t=(0,mu.resolve)(n.vault);if(!(0,ho.existsSync)(t)||!(0,ho.statSync)(t).isDirectory())throw new Pe(t);let r=xZ(t);if(e==="json")console.log(JSON.stringify({vaultPath:t,violationCount:r.length,violations:r,clean:r.length===0},null,2));else if(r.length===0)console.log(`OK ${t}: 0 exocmd__Grounding_type literal-form violations`);else{console.error(`FAIL ${t}: ${r.length} exocmd__Grounding_type literal-form violation(s):`);for(let i of r)console.error(` ${i.path}:${i.line} \u2014 value: ${i.value}`);console.error("\nRFC 9d20c91f Phase 3 migrated all values to wikilink form `[[<uid>]]`. Re-run the Phase 3 migration script or hand-edit offending files.")}r.length>0&&(process.exitCode=1)}catch(t){se.handle(t)}})}o(HN,"auditGroundingTypeLiteralFormCommand");function QN(){let n=new ve("audit").description("Audit vault for regression patterns (RFC cutover detectors)");return n.addCommand(HN()),n}o(QN,"auditCommand");function YN(n){let e=new ve;return e.name("exocortex").description("CLI tool for Exocortex knowledge management system").version(n??"16.34.1"),e.addCommand(kN()),e.addCommand(GN()),e.addCommand(uF()),e.addCommand(pF()),e.addCommand(UF()),e.addCommand(yF()),e.addCommand(_F()),e.addCommand(EF()),e.addCommand(qF()),e.addCommand(eN()),e.addCommand(nN()),e.addCommand(iN()),e.addCommand(aN()),e.addCommand(yN()),e.addCommand(_N()),e.addCommand(AN()),e.addCommand(LN()),e.addCommand(QN()),e}o(YN,"createProgram");YN().parse();0&&(module.exports={createProgram});
770
770
  /*! Bundled license information:
771
771
 
772
772
  reflect-metadata/Reflect.js:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitelev/exocortex-cli",
3
- "version": "16.34.0",
3
+ "version": "16.34.1",
4
4
  "description": "CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more",
5
5
  "main": "dist/index.js",
6
6
  "bin": {