@kitelev/exocortex-cli 15.12.0 → 15.12.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 +12 -8
  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 v15.12.0
2
+ // @kitelev/exocortex-cli v15.12.1
3
3
  // CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more
4
4
  // License: MIT
5
5
 
@@ -76,13 +76,17 @@ ${t.stack}`:"";console.error(`[Exocortex ERROR]${s} ${e}${a}`,t??"")}else{let a=
76
76
  `),a=[],c=0;for(;c<s.length;){let l=s[c],f=l.trim();if(f===""){a.push(l),c++;continue}let h=f.match(/^([^:]+):\s*(.*)$/);if(h){let d=h[2];if(d===""&&c+1<s.length&&s[c+1].match(/^\s+- /)){let v=[],w=c+1;for(;w<s.length&&s[w].match(/^\s+- /);)v.push(s[w]),w++;if(v.every(I=>{let O=I.replace(/^\s+- /,"").trim();return this.isEmptyValue(O)})){c=w;continue}else{a.push(l);for(let I=c+1;I<w;I++)a.push(s[I]);c=w;continue}}if(this.isEmptyValue(d)){c++;continue}a.push(l),c++}else f.match(/^\s*- /)||a.push(l),c++}let u=a.join(`
77
77
  `);return e.replace(t,`---
78
78
  ${u}
79
- ---`)}isEmptyValue(e){let t=e.trim();return t===""||t==="null"||t==="undefined"||t==="[]"||t==="{}"||t==='""'||t==="''"}};Fn.PropertyCleanupService=Ag;Fn.PropertyCleanupService=Ag=JR([(0,Tg.injectable)(),xS(0,(0,Tg.inject)(CS.DI_TOKENS.IVaultAdapter)),xS(1,(0,Tg.inject)(CS.DI_TOKENS.ILogger)),ZR("design:paramtypes",[Object,Object])],Ag)});var Ig=_(Nn=>{"use strict";var eF=Nn&&Nn.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},tF=Nn&&Nn.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)},rF=Nn&&Nn.__param||function(n,e){return function(t,r){e(t,r,n)}};Object.defineProperty(Nn,"__esModule",{value:!0});Nn.RenameToUidService=void 0;var IS=ke(),nF=ut(),Cg=class{static{o(this,"RenameToUidService")}constructor(e){this.vault=e}async renameToUid(e,t){let r=t.exo__Asset_uid;if(!r)throw new Error("Asset has no exo__Asset_uid property");let i=e.basename,s=r;if(i===s)throw new Error("File is already named according to UID");let a=t.exo__Asset_label;if(!a||a.trim()===""){let f=this.isAssetArchived(t);await this.updateLabel(e,i,f)}let u=e.parent?.path||"",l=u?`${u}/${s}.md`:`${s}.md`;await this.vault.updateLinks(e.path,l,i),await this.vault.rename(e,l)}async updateLabel(e,t,r){await this.vault.process(e,i=>{let s=/^---\n([\s\S]*?)\n---/,a=i.match(s);if(!a)return i;let c=a[1];if(c=`${c}
80
- exo__Asset_label: ${t}`,!r){if(/^aliases\s*:/m.test(c)){let l=/^aliases\s*:\s*(?:\[\s*\]|null|~)?(?:\n(?![ \t]*-))?/gm;c=c.replace(l,""),c=c.replace(/\n{2,}/g,`
81
- `)}c=`${c}
82
- aliases:
83
- - ${t}`}return i.replace(s,`---
79
+ ---`)}isEmptyValue(e){let t=e.trim();return t===""||t==="null"||t==="undefined"||t==="[]"||t==="{}"||t==='""'||t==="''"}};Fn.PropertyCleanupService=Ag;Fn.PropertyCleanupService=Ag=JR([(0,Tg.injectable)(),xS(0,(0,Tg.inject)(CS.DI_TOKENS.IVaultAdapter)),xS(1,(0,Tg.inject)(CS.DI_TOKENS.ILogger)),ZR("design:paramtypes",[Object,Object])],Ag)});var Ig=_(Nn=>{"use strict";var eF=Nn&&Nn.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},tF=Nn&&Nn.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)},rF=Nn&&Nn.__param||function(n,e){return function(t,r){e(t,r,n)}};Object.defineProperty(Nn,"__esModule",{value:!0});Nn.RenameToUidService=void 0;var IS=ke(),nF=ut(),Cg=class{static{o(this,"RenameToUidService")}constructor(e){this.vault=e}async renameToUid(e,t){let r=t.exo__Asset_uid;if(!r)throw new Error("Asset has no exo__Asset_uid property");let i=e.basename,s=r;if(i===s)throw new Error("File is already named according to UID");let a=t.exo__Asset_label;if(!a||a.trim()===""){let f=this.isAssetArchived(t);await this.updateLabel(e,i,f)}let u=e.parent?.path||"",l=u?`${u}/${s}.md`:`${s}.md`;await this.vault.updateLinks(e.path,l,i),await this.vault.rename(e,l)}async updateLabel(e,t,r){await this.vault.process(e,i=>{let s=/^---\n([\s\S]*?)\n---/,a=i.match(s);if(!a)return i;let c=a[1];return c=`${c}
80
+ exo__Asset_label: ${t}`,r||(c=this.updateAliases(c,t)),i.replace(s,`---
84
81
  ${c}
85
- ---`)})}isAssetArchived(e){if(e?.exo__Asset_isArchived===!0)return!0;let t=e?.archived;if(t==null)return!1;if(typeof t=="boolean")return t;if(typeof t=="number")return t!==0;if(typeof t=="string"){let r=t.toLowerCase().trim();return r==="true"||r==="yes"||r==="1"}return!1}};Nn.RenameToUidService=Cg;Nn.RenameToUidService=Cg=eF([(0,IS.injectable)(),rF(0,(0,IS.inject)(nF.DI_TOKENS.IVaultAdapter)),tF("design:paramtypes",[Object])],Cg)});var Pg=_(Ln=>{"use strict";var iF=Ln&&Ln.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},sF=Ln&&Ln.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)},aF=Ln&&Ln.__param||function(n,e){return function(t,r){e(t,r,n)}};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.SupervisionCreationService=void 0;var OS=ke(),oF=br(),cF=Kt(),uF=ut(),Og=class{static{o(this,"SupervisionCreationService")}constructor(e){this.vault=e}async createSupervision(e){let t=(0,oF.v4)(),r=`${t}.md`,i=this.generateFrontmatter(t),s=this.generateBody(e),a=this.buildFileContent(i,s),c=`01 Inbox/${r}`;return await this.vault.create(c,a)}generateFrontmatter(e){let t=new Date,r=cF.DateFormatter.toLocalTimestamp(t);return{exo__Asset_isDefinedBy:'"[[!kitelev]]"',exo__Asset_uid:e,exo__Asset_createdAt:r,exo__Instance_class:['"[[ztlk__FleetingNote]]"'],ztlk__FleetingNote_type:'"[[CBT-Diary Record]]"'}}generateBody(e){return[{label:"\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044F/\u0442\u0440\u0438\u0433\u0433\u0435\u0440",value:e.situation},{label:"\u042D\u043C\u043E\u0446\u0438\u0438",value:e.emotions},{label:"\u041C\u044B\u0441\u043B\u0438",value:e.thoughts},{label:"\u041F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435",value:e.behavior},{label:"\u041A\u0440\u0430\u0442\u043A\u043E\u0441\u0440\u043E\u0447\u043D\u044B\u0435 \u043F\u043E\u0441\u043B\u0435\u0434\u0441\u0442\u0432\u0438\u044F \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u044F",value:e.shortTermConsequences},{label:"\u0414\u043E\u043B\u0433\u043E\u0441\u0440\u043E\u0447\u043D\u044B\u0435 \u043F\u043E\u0441\u043B\u0435\u0434\u0441\u0442\u0432\u0438\u044F \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u044F",value:e.longTermConsequences}].map(r=>`- ${r.label}: ${r.value}`).join(`
82
+ ---`)})}updateAliases(e,t){if(!/^aliases\s*:/m.test(e))return`${e}
83
+ aliases:
84
+ - ${t}`;let i=/^aliases\s*:\s*\n((?:[ \t]*-[ \t]+[^\n]+\n?)+)/m,s=e.match(i);if(s){let l=s[1];if(l.split(`
85
+ `).filter(d=>d.trim().startsWith("-")).map(d=>d.replace(/^[ \t]*-[ \t]+/,"").trim()).includes(t))return e;let h=`${l.trimEnd()}
86
+ - ${t}
87
+ `;return e.replace(s[1],h)}let a=/^aliases\s*:\s*\[([^\]]*)\]/m,c=e.match(a);if(c){let l=c[1].trim();return l===""?e.replace(a,`aliases:
88
+ - ${t}`):l.split(",").map(h=>h.trim().replace(/^["']|["']$/g,"")).includes(t)?e:e.replace(a,`aliases: [${l}, ${t}]`)}let u=/^aliases\s*:\s*(?:null|~)?\s*$/m;return e.replace(u,`aliases:
89
+ - ${t}`)}isAssetArchived(e){if(e?.exo__Asset_isArchived===!0)return!0;let t=e?.archived;if(t==null)return!1;if(typeof t=="boolean")return t;if(typeof t=="number")return t!==0;if(typeof t=="string"){let r=t.toLowerCase().trim();return r==="true"||r==="yes"||r==="1"}return!1}};Nn.RenameToUidService=Cg;Nn.RenameToUidService=Cg=eF([(0,IS.injectable)(),rF(0,(0,IS.inject)(nF.DI_TOKENS.IVaultAdapter)),tF("design:paramtypes",[Object])],Cg)});var Pg=_(Ln=>{"use strict";var iF=Ln&&Ln.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},sF=Ln&&Ln.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)},aF=Ln&&Ln.__param||function(n,e){return function(t,r){e(t,r,n)}};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.SupervisionCreationService=void 0;var OS=ke(),oF=br(),cF=Kt(),uF=ut(),Og=class{static{o(this,"SupervisionCreationService")}constructor(e){this.vault=e}async createSupervision(e){let t=(0,oF.v4)(),r=`${t}.md`,i=this.generateFrontmatter(t),s=this.generateBody(e),a=this.buildFileContent(i,s),c=`01 Inbox/${r}`;return await this.vault.create(c,a)}generateFrontmatter(e){let t=new Date,r=cF.DateFormatter.toLocalTimestamp(t);return{exo__Asset_isDefinedBy:'"[[!kitelev]]"',exo__Asset_uid:e,exo__Asset_createdAt:r,exo__Instance_class:['"[[ztlk__FleetingNote]]"'],ztlk__FleetingNote_type:'"[[CBT-Diary Record]]"'}}generateBody(e){return[{label:"\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044F/\u0442\u0440\u0438\u0433\u0433\u0435\u0440",value:e.situation},{label:"\u042D\u043C\u043E\u0446\u0438\u0438",value:e.emotions},{label:"\u041C\u044B\u0441\u043B\u0438",value:e.thoughts},{label:"\u041F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435",value:e.behavior},{label:"\u041A\u0440\u0430\u0442\u043A\u043E\u0441\u0440\u043E\u0447\u043D\u044B\u0435 \u043F\u043E\u0441\u043B\u0435\u0434\u0441\u0442\u0432\u0438\u044F \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u044F",value:e.shortTermConsequences},{label:"\u0414\u043E\u043B\u0433\u043E\u0441\u0440\u043E\u0447\u043D\u044B\u0435 \u043F\u043E\u0441\u043B\u0435\u0434\u0441\u0442\u0432\u0438\u044F \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u044F",value:e.longTermConsequences}].map(r=>`- ${r.label}: ${r.value}`).join(`
86
90
  `)}buildFileContent(e,t){return`---
87
91
  ${Object.entries(e).map(([i,s])=>{if(Array.isArray(s)){let a=s.map(c=>` - ${c}`).join(`
88
92
  `);return`${i}:
@@ -457,7 +461,7 @@ globstar while`,e,d,t,p,v),this.matchOne(e.slice(d),t.slice(p),r))return this.de
457
461
  ${t}
458
462
  Continue? (y/n): `,s=>{r.close(),i(s.toLowerCase()==="y"||s.toLowerCase()==="yes")})})}};var $d=class{static{o(this,"CLIContainer")}static setup(){nc.container.register(qu.DI_TOKENS.ILogger,{useFactory:o(()=>new Nd("exocortex-cli"),"useFactory")}),nc.container.register(qu.DI_TOKENS.IEventBus,{useClass:Ld}),nc.container.register(qu.DI_TOKENS.IConfiguration,{useClass:Md}),nc.container.register(qu.DI_TOKENS.INotificationService,{useClass:jd})}static reset(){nc.container.clearInstances()}};function Gu(n){$d.setup(),Ia.container.register(Os.DI_TOKENS.IVaultAdapter,{useFactory:o(()=>new Si(n),"useFactory")})}o(Gu,"setupContainer");function c$(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(`
459
463
  `)}o(c$,"formatPractices");function u$(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(`
460
- `)}o(u$,"formatSummary");function Mx(){let n=new xt("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";H.setFormat(t);try{let r=(0,ic.resolve)(e.vault);if(!(0,sc.existsSync)(r))throw new Mt(r);Gu(r);let s=await Ia.container.resolve(Os.DailyReviewService).getPractices();if(t==="json"){let a=Be.success({practices:s,count:s.length});console.log(JSON.stringify(a,null,2))}else console.log(c$(s))}catch(r){H.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";H.setFormat(t);try{let r=(0,ic.resolve)(e.vault);if(!(0,sc.existsSync)(r))throw new Mt(r);Gu(r);let i=Ia.container.resolve(Os.DailyReviewService),s;if(e.date&&(s=new Date(e.date),isNaN(s.getTime())))throw new it(`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=Be.success(a);console.log(JSON.stringify(c,null,2))}else console.log(u$(a))}catch(r){H.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";H.setFormat(r);try{let i=(0,ic.resolve)(t.vault);if(!(0,sc.existsSync)(i))throw new Mt(i);Gu(i);let s=Ia.container.resolve(Os.DailyReviewService),a=t.start!==!1,c=await s.quickCapture(e,a);if(r==="json"){let u=Be.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){H.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";H.setFormat(r);try{let i=(0,ic.resolve)(t.vault);if(!(0,sc.existsSync)(i))throw new Mt(i);Gu(i);let a=await Ia.container.resolve(Os.DailyReviewService).createFromPractice({prototypeUid:e,startImmediately:!0});if(r==="json"){let c=Be.success(a);console.log(JSON.stringify(c,null,2))}else console.log(`\u{1F504} Started: ${a.label}`),console.log(` Path: ${a.path}`)}catch(i){H.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";H.setFormat(r);try{let i=(0,ic.resolve)(t.vault);if(!(0,sc.existsSync)(i))throw new Mt(i);if(Gu(i),await Ia.container.resolve(Os.DailyReviewService).markPracticeDone(e),r==="json"){let a=Be.success({prototypeUid:e,status:"done"});console.log(JSON.stringify(a,null,2))}else console.log(`\u2705 Marked as done: ${e}`)}catch(i){H.handle(i)}}),n}o(Mx,"dailyReviewCommand");var Ai=new xt;Ai.name("exocortex").description("CLI tool for Exocortex knowledge management system").version("15.12.0");var kx=Ai.command("sparql").description("SPARQL query execution and cache management");kx.addCommand(lA());kx.addCommand(dA());Ai.addCommand(Sx());Ai.addCommand(Ex());Ai.addCommand(Tx());Ai.addCommand(xx());Ai.addCommand(Cx());Ai.addCommand(Rx());Ai.addCommand(Mx());Ai.parse();
464
+ `)}o(u$,"formatSummary");function Mx(){let n=new xt("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";H.setFormat(t);try{let r=(0,ic.resolve)(e.vault);if(!(0,sc.existsSync)(r))throw new Mt(r);Gu(r);let s=await Ia.container.resolve(Os.DailyReviewService).getPractices();if(t==="json"){let a=Be.success({practices:s,count:s.length});console.log(JSON.stringify(a,null,2))}else console.log(c$(s))}catch(r){H.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";H.setFormat(t);try{let r=(0,ic.resolve)(e.vault);if(!(0,sc.existsSync)(r))throw new Mt(r);Gu(r);let i=Ia.container.resolve(Os.DailyReviewService),s;if(e.date&&(s=new Date(e.date),isNaN(s.getTime())))throw new it(`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=Be.success(a);console.log(JSON.stringify(c,null,2))}else console.log(u$(a))}catch(r){H.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";H.setFormat(r);try{let i=(0,ic.resolve)(t.vault);if(!(0,sc.existsSync)(i))throw new Mt(i);Gu(i);let s=Ia.container.resolve(Os.DailyReviewService),a=t.start!==!1,c=await s.quickCapture(e,a);if(r==="json"){let u=Be.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){H.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";H.setFormat(r);try{let i=(0,ic.resolve)(t.vault);if(!(0,sc.existsSync)(i))throw new Mt(i);Gu(i);let a=await Ia.container.resolve(Os.DailyReviewService).createFromPractice({prototypeUid:e,startImmediately:!0});if(r==="json"){let c=Be.success(a);console.log(JSON.stringify(c,null,2))}else console.log(`\u{1F504} Started: ${a.label}`),console.log(` Path: ${a.path}`)}catch(i){H.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";H.setFormat(r);try{let i=(0,ic.resolve)(t.vault);if(!(0,sc.existsSync)(i))throw new Mt(i);if(Gu(i),await Ia.container.resolve(Os.DailyReviewService).markPracticeDone(e),r==="json"){let a=Be.success({prototypeUid:e,status:"done"});console.log(JSON.stringify(a,null,2))}else console.log(`\u2705 Marked as done: ${e}`)}catch(i){H.handle(i)}}),n}o(Mx,"dailyReviewCommand");var Ai=new xt;Ai.name("exocortex").description("CLI tool for Exocortex knowledge management system").version("15.12.1");var kx=Ai.command("sparql").description("SPARQL query execution and cache management");kx.addCommand(lA());kx.addCommand(dA());Ai.addCommand(Sx());Ai.addCommand(Ex());Ai.addCommand(Tx());Ai.addCommand(xx());Ai.addCommand(Cx());Ai.addCommand(Rx());Ai.addCommand(Mx());Ai.parse();
461
465
  /*! Bundled license information:
462
466
 
463
467
  reflect-metadata/Reflect.js:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitelev/exocortex-cli",
3
- "version": "15.12.0",
3
+ "version": "15.12.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": {