@kitelev/exocortex-cli 13.298.2 → 13.298.3

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 v13.298.2
2
+ // @kitelev/exocortex-cli v13.298.3
3
3
  // CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more
4
4
  // License: MIT
5
5
 
@@ -497,7 +497,7 @@ globstar while`,e,d,t,p,S),this.matchOne(e.slice(d),t.slice(p),r))return this.de
497
497
  ${t}
498
498
  Continue? (y/n): `,s=>{r.close(),i(s.toLowerCase()==="y"||s.toLowerCase()==="yes")})})}};var Td=class{static{o(this,"CLIContainer")}static setup(){Xo.container.register(Du.DI_TOKENS.ILogger,{useFactory:o(()=>new Sd("exocortex-cli"),"useFactory")}),Xo.container.register(Du.DI_TOKENS.IEventBus,{useClass:_d}),Xo.container.register(Du.DI_TOKENS.IConfiguration,{useClass:wd}),Xo.container.register(Du.DI_TOKENS.INotificationService,{useClass:Ed})}static reset(){Xo.container.clearInstances()}};function Ru(n){Td.setup(),Ea.container.register(As.DI_TOKENS.IVaultAdapter,{useFactory:o(()=>new gs(n),"useFactory")})}o(Ru,"setupContainer");function $j(n){if(n.length===0)return"No practices found.";let e=[];for(let t of n){let r="\u2B1C";t.doneToday?r="\u2705":t.inProgressToday&&(r="\u{1F504}");let i=t.estimatedDuration?` (${t.estimatedDuration}m)`:"";e.push(`${r} ${t.label}${i}`)}return e.join(`
499
499
  `)}o($j,"formatPractices");function Vj(n){let e=[`\u{1F4C5} Daily Review: ${n.date}`,"","\u{1F4CA} Tasks:",` Planned: ${n.plannedCount}`,` Completed: ${n.completedCount}`,` In Progress: ${n.inProgressCount}`,` Progress: ${n.completionPercentage}%`,"",`\u23F1\uFE0F Total time: ${Math.round(n.totalTimeMinutes)} minutes`];if(n.practicesDue.length>0){e.push(""),e.push(`\u{1F4CB} Practices due (${n.practicesDue.length}):`);for(let t of n.practicesDue){let r=t.estimatedDuration?` (${t.estimatedDuration}m)`:"";e.push(` \u2B1C ${t.label}${r}`)}}return e.join(`
500
- `)}o(Vj,"formatSummary");function $A(){let n=new At("daily").description("Daily review operations for mobile-friendly workflow");return n.command("practices").description("List today's practices (recurring tasks)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").action(async e=>{let t=e.format||"text";z.setFormat(t);try{let r=(0,Jo.resolve)(e.vault);if(!(0,Zo.existsSync)(r))throw new Jt(r);Ru(r);let s=await Ea.container.resolve(As.DailyReviewService).getPractices();if(t==="json"){let a=Ye.success({practices:s,count:s.length});console.log(JSON.stringify(a,null,2))}else console.log($j(s))}catch(r){z.handle(r)}}),n.command("summary").description("Show today's daily review summary").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").option("--date <value>","Date in YYYY-MM-DD format (default: today)").action(async e=>{let t=e.format||"text";z.setFormat(t);try{let r=(0,Jo.resolve)(e.vault);if(!(0,Zo.existsSync)(r))throw new Jt(r);Ru(r);let i=Ea.container.resolve(As.DailyReviewService),s;if(e.date&&(s=new Date(e.date),isNaN(s.getTime())))throw new rt(`Invalid date format: ${e.date}`,"exocortex daily summary --date YYYY-MM-DD",{date:e.date});let a=await i.getDailyReviewSummary(s);if(t==="json"){let c=Ye.success(a);console.log(JSON.stringify(c,null,2))}else console.log(Vj(a))}catch(r){z.handle(r)}}),n.command("log").description("Quick capture an activity").argument("<label>","Activity label/description").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").option("--start","Start the task immediately (default: true)").option("--no-start","Don't start the task immediately").action(async(e,t)=>{let r=t.format||"text";z.setFormat(r);try{let i=(0,Jo.resolve)(t.vault);if(!(0,Zo.existsSync)(i))throw new Jt(i);Ru(i);let s=Ea.container.resolve(As.DailyReviewService),a=t.start!==!1,c=await s.quickCapture(e,a);if(r==="json"){let u=Ye.success(c);console.log(JSON.stringify(u,null,2))}else{let u=c.started?"\u{1F504}":"\u2B1C";console.log(`${u} Created: ${c.label}`),console.log(` Path: ${c.path}`)}}catch(i){z.handle(i)}}),n.command("start").description("Start a practice (create task instance from prototype)").argument("<prototype-uid>","Practice/prototype UID to start").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").action(async(e,t)=>{let r=t.format||"text";z.setFormat(r);try{let i=(0,Jo.resolve)(t.vault);if(!(0,Zo.existsSync)(i))throw new Jt(i);Ru(i);let a=await Ea.container.resolve(As.DailyReviewService).createFromPractice({prototypeUid:e,startImmediately:!0});if(r==="json"){let c=Ye.success(a);console.log(JSON.stringify(c,null,2))}else console.log(`\u{1F504} Started: ${a.label}`),console.log(` Path: ${a.path}`)}catch(i){z.handle(i)}}),n.command("done").description("Mark a practice as done").argument("<prototype-uid>","Practice/prototype UID to mark as done").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").action(async(e,t)=>{let r=t.format||"text";z.setFormat(r);try{let i=(0,Jo.resolve)(t.vault);if(!(0,Zo.existsSync)(i))throw new Jt(i);if(Ru(i),await Ea.container.resolve(As.DailyReviewService).markPracticeDone(e),r==="json"){let a=Ye.success({prototypeUid:e,status:"done"});console.log(JSON.stringify(a,null,2))}else console.log(`\u2705 Marked as done: ${e}`)}catch(i){z.handle(i)}}),n}o($A,"dailyReviewCommand");var Fu=Ne(require("fs")),Ad=Ne(hn());function VA(){return new At("validate").description("Validate ontology against SHACL shapes").requiredOption("--ontology <path>","Path to ontology file (Turtle format)").requiredOption("--shapes <path>","Path to SHACL shapes file (Turtle format)").option("--format <type>","Output format: table|json","table").action(async n=>{let e=n.format||"table";z.setFormat(e);try{if(!Fu.default.existsSync(n.ontology))throw new ys(n.ontology,"Ontology file not found");if(!Fu.default.existsSync(n.shapes))throw new ys(n.shapes,"SHACL shapes file not found");let t=Fu.default.readFileSync(n.ontology,"utf-8"),r=Fu.default.readFileSync(n.shapes,"utf-8"),s=await new Ad.ShaclValidator().validate(t,r),a=new Ad.ValidationErrorFormatter;n.format==="json"?console.log(a.formatAsJson(s)):console.log(a.formatForConsole(s)),s.conforms||process.exit(9),process.exit(0)}catch(t){z.handle(t)}})}o(VA,"validateCommand");var Kn=new At;Kn.name("exocortex").description("CLI tool for Exocortex knowledge management system").version("13.298.2");Kn.command("sparql").description("SPARQL query execution").addCommand(gT());Kn.addCommand(EA());Kn.addCommand(CA());Kn.addCommand(xA());Kn.addCommand(OA());Kn.addCommand(PA());Kn.addCommand(LA());Kn.addCommand($A());Kn.addCommand(VA());Kn.parse();
500
+ `)}o(Vj,"formatSummary");function $A(){let n=new At("daily").description("Daily review operations for mobile-friendly workflow");return n.command("practices").description("List today's practices (recurring tasks)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").action(async e=>{let t=e.format||"text";z.setFormat(t);try{let r=(0,Jo.resolve)(e.vault);if(!(0,Zo.existsSync)(r))throw new Jt(r);Ru(r);let s=await Ea.container.resolve(As.DailyReviewService).getPractices();if(t==="json"){let a=Ye.success({practices:s,count:s.length});console.log(JSON.stringify(a,null,2))}else console.log($j(s))}catch(r){z.handle(r)}}),n.command("summary").description("Show today's daily review summary").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").option("--date <value>","Date in YYYY-MM-DD format (default: today)").action(async e=>{let t=e.format||"text";z.setFormat(t);try{let r=(0,Jo.resolve)(e.vault);if(!(0,Zo.existsSync)(r))throw new Jt(r);Ru(r);let i=Ea.container.resolve(As.DailyReviewService),s;if(e.date&&(s=new Date(e.date),isNaN(s.getTime())))throw new rt(`Invalid date format: ${e.date}`,"exocortex daily summary --date YYYY-MM-DD",{date:e.date});let a=await i.getDailyReviewSummary(s);if(t==="json"){let c=Ye.success(a);console.log(JSON.stringify(c,null,2))}else console.log(Vj(a))}catch(r){z.handle(r)}}),n.command("log").description("Quick capture an activity").argument("<label>","Activity label/description").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").option("--start","Start the task immediately (default: true)").option("--no-start","Don't start the task immediately").action(async(e,t)=>{let r=t.format||"text";z.setFormat(r);try{let i=(0,Jo.resolve)(t.vault);if(!(0,Zo.existsSync)(i))throw new Jt(i);Ru(i);let s=Ea.container.resolve(As.DailyReviewService),a=t.start!==!1,c=await s.quickCapture(e,a);if(r==="json"){let u=Ye.success(c);console.log(JSON.stringify(u,null,2))}else{let u=c.started?"\u{1F504}":"\u2B1C";console.log(`${u} Created: ${c.label}`),console.log(` Path: ${c.path}`)}}catch(i){z.handle(i)}}),n.command("start").description("Start a practice (create task instance from prototype)").argument("<prototype-uid>","Practice/prototype UID to start").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").action(async(e,t)=>{let r=t.format||"text";z.setFormat(r);try{let i=(0,Jo.resolve)(t.vault);if(!(0,Zo.existsSync)(i))throw new Jt(i);Ru(i);let a=await Ea.container.resolve(As.DailyReviewService).createFromPractice({prototypeUid:e,startImmediately:!0});if(r==="json"){let c=Ye.success(a);console.log(JSON.stringify(c,null,2))}else console.log(`\u{1F504} Started: ${a.label}`),console.log(` Path: ${a.path}`)}catch(i){z.handle(i)}}),n.command("done").description("Mark a practice as done").argument("<prototype-uid>","Practice/prototype UID to mark as done").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").action(async(e,t)=>{let r=t.format||"text";z.setFormat(r);try{let i=(0,Jo.resolve)(t.vault);if(!(0,Zo.existsSync)(i))throw new Jt(i);if(Ru(i),await Ea.container.resolve(As.DailyReviewService).markPracticeDone(e),r==="json"){let a=Ye.success({prototypeUid:e,status:"done"});console.log(JSON.stringify(a,null,2))}else console.log(`\u2705 Marked as done: ${e}`)}catch(i){z.handle(i)}}),n}o($A,"dailyReviewCommand");var Fu=Ne(require("fs")),Ad=Ne(hn());function VA(){return new At("validate").description("Validate ontology against SHACL shapes").requiredOption("--ontology <path>","Path to ontology file (Turtle format)").requiredOption("--shapes <path>","Path to SHACL shapes file (Turtle format)").option("--format <type>","Output format: table|json","table").action(async n=>{let e=n.format||"table";z.setFormat(e);try{if(!Fu.default.existsSync(n.ontology))throw new ys(n.ontology,"Ontology file not found");if(!Fu.default.existsSync(n.shapes))throw new ys(n.shapes,"SHACL shapes file not found");let t=Fu.default.readFileSync(n.ontology,"utf-8"),r=Fu.default.readFileSync(n.shapes,"utf-8"),s=await new Ad.ShaclValidator().validate(t,r),a=new Ad.ValidationErrorFormatter;n.format==="json"?console.log(a.formatAsJson(s)):console.log(a.formatForConsole(s)),s.conforms||process.exit(9),process.exit(0)}catch(t){z.handle(t)}})}o(VA,"validateCommand");var Kn=new At;Kn.name("exocortex").description("CLI tool for Exocortex knowledge management system").version("13.298.3");Kn.command("sparql").description("SPARQL query execution").addCommand(gT());Kn.addCommand(EA());Kn.addCommand(CA());Kn.addCommand(xA());Kn.addCommand(OA());Kn.addCommand(PA());Kn.addCommand(LA());Kn.addCommand($A());Kn.addCommand(VA());Kn.parse();
501
501
  /*! Bundled license information:
502
502
 
503
503
  reflect-metadata/Reflect.js:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitelev/exocortex-cli",
3
- "version": "13.298.2",
3
+ "version": "13.298.3",
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": {