@kitelev/exocortex-cli 15.148.7 → 15.148.9

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/README.md CHANGED
@@ -434,7 +434,7 @@ set -euo pipefail
434
434
 
435
435
  VAULT="$HOME/vault"
436
436
  DAILY="daily/$(date +%Y-%m-%d).md"
437
- CREATE_INSTANCE_CMD="<create-instance-command-uid>"
437
+ CREATE_INSTANCE_CMD="1abe7877-a462-4bd5-9bd8-1f75fe7f50aa" # Start Lunch (RFC 94e520da § Phase 7)
438
438
 
439
439
  npx @kitelev/exocortex-cli dyncommand exec "$CREATE_INSTANCE_CMD" \
440
440
  --target "$DAILY" \
@@ -451,6 +451,68 @@ verifier, install instructions, and a 7-day soak protocol — lives in
451
451
  [`examples/production-cron/`](../../examples/production-cron/) (RFC
452
452
  `94e520da` § Phase 5).
453
453
 
454
+ #### Telegram bot integration (Phase 7 migration)
455
+
456
+ > **Migration target (RFC `94e520da` § Phase 7, T7.1):** Telegram bot Claude
457
+ > subprocess **must** invoke `dyncommand exec <uid>` rather than legacy
458
+ > `command start <path>`.
459
+
460
+ The legacy `exocortex command start <path-to-asset>` (`Doing` transition by
461
+ file path) is **deprecated** as part of the Phase 7 sunset of the hardcoded
462
+ plugin-command CLI surface. Equivalent vault-defined behaviour now lives
463
+ behind a stable command UID:
464
+
465
+ ```bash
466
+ # ✅ NEW canonical path — vault-defined command, stable UID, runtime-agnostic:
467
+ LUNCH_CMD="1abe7877-a462-4bd5-9bd8-1f75fe7f50aa" # "Start Lunch" command
468
+ TODAY_DAILY="03 Knowledge/daily/$(date +%Y-%m-%d).md"
469
+
470
+ exocortex dyncommand exec "$LUNCH_CMD" \
471
+ --target "$TODAY_DAILY" \
472
+ --vault ~/vault \
473
+ --output json
474
+
475
+ # ⚠️ LEGACY (still works until Phase 7.3 sunset, ≥ 2 minor releases out):
476
+ # exocortex command start "tasks/<lunch-task-uid>.md" --vault ~/vault
477
+ ```
478
+
479
+ **What the bot subprocess Claude does:**
480
+
481
+ 1. Receives user phrase (e.g. «начать обедать»).
482
+ 2. Resolves the phrase to a vault `exocmd:Command` asset by `exo__Asset_label`
483
+ or `aliases:` (the `Start Lunch` command above carries `aliases: [начать
484
+ обедать]` so direct lookup works).
485
+ 3. Invokes `dyncommand exec <uid> --target <today-daily-note> --vault $VAULT`.
486
+ 4. Surfaces the JSON `successMessage` back to the user.
487
+
488
+ **Why this is a real migration, not a rename:**
489
+
490
+ - Adding a new bot phrase (e.g. «закрой задачу», «отправь в backlog») requires
491
+ **zero bot or CLI code changes** — only a new vault `exocmd:Command` asset.
492
+ - The same UID drives plugin UI buttons, CLI invocations, cron jobs, and
493
+ Telegram routing. One definition, every runtime.
494
+ - Backward compat: the legacy `command start` path keeps working through
495
+ Phase 7.2 (deprecation warning) and Phase 7.3 (sunset), so existing bot
496
+ configurations roll over without user-visible regression (RFC § R4).
497
+
498
+ **Verification:**
499
+
500
+ ```bash
501
+ # 1. Confirm command exists and precondition compiles:
502
+ exocortex dyncommand show 1abe7877-a462-4bd5-9bd8-1f75fe7f50aa --vault ~/vault
503
+
504
+ # 2. Dry-run on today's daily note (no writes):
505
+ exocortex dyncommand exec 1abe7877-a462-4bd5-9bd8-1f75fe7f50aa \
506
+ --target "03 Knowledge/daily/$(date +%Y-%m-%d).md" \
507
+ --dry-run --vault ~/vault --output json
508
+ ```
509
+
510
+ The canonical `Start Lunch` command lives at
511
+ `03 Knowledge/exocmd/status/1abe7877-a462-4bd5-9bd8-1f75fe7f50aa.md` in the
512
+ vault; its grounding (`93e4a830-0911-4589-91f2-49ac0acdb4d2`) is a
513
+ `service_call createAsset` materialising a fresh `ems__Task` instance from
514
+ the Lunch `TaskPrototype` (`4b571141-5fc3-4ddd-8f07-ca681fc8410a`).
515
+
454
516
  #### Troubleshooting
455
517
 
456
518
  - **`Precondition not satisfied`** — run `dyncommand show <uid>` to read the
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // @kitelev/exocortex-cli v15.148.7
2
+ // @kitelev/exocortex-cli v15.148.9
3
3
  // CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more
4
4
  // License: MIT
5
5
 
@@ -794,7 +794,7 @@ exo__BacklinksTableBlock_columns:${f==="[]"?" []":f}
794
794
  --- END PREVIEW ---
795
795
  `)}o(xK,"printDryRunReport");function CK(n,e){let r=[`--- MIGRATION ${e.apply?"APPLY":"DRY RUN"} ---`,`Migrated pairs: ${n.pairs.length}`,`Skipped configs: ${n.skipped.length}`];e.apply&&(r.push(`Files written to: ${e.outDir}/ (relative to vault root)`),r.push(`Total files written: ${n.pairs.length*2} (${n.pairs.length} Layout + ${n.pairs.length} Block)`));for(let i of n.skipped)r.push(` SKIPPED: ${i.sourcePath} \u2014 ${i.reason}`);return r.push(`--- END SUMMARY ---
796
796
  `),r.join(`
797
- `)}o(CK,"formatSummary");function IK(n,e){return{mode:e.apply?"apply":"dry-run",outDir:e.outDir,pairsCount:n.pairs.length,skippedCount:n.skipped.length,pairs:n.pairs.map(t=>({sourceUid:t.sourceUid,sourcePath:t.sourcePath,layoutUid:t.layout.uid,blockUid:t.block.uid,warnings:t.warnings})),skipped:n.skipped}}o(IK,"summariseResult");function $D(n){n.addCommand(pO()),n.addCommand(_O()),n.addCommand(SO())}o($D,"addQuerySubcommands");function BD(n){let e=new xe;e.name("exocortex").description("CLI tool for Exocortex knowledge management system").version(n??"15.148.7");let t=e.command("exoql").description("ExoQL query execution and cache management");$D(t);let r=e.command("sparql").description("(deprecated) Use 'exoql' instead");return $D(r),r.hook("preAction",()=>{console.error('\u26A0\uFE0F "sparql" is deprecated. Use "exoql" instead.')}),e.addCommand(CF()),e.addCommand(PF()),e.addCommand(OF()),e.addCommand(DF()),e.addCommand(NF()),e.addCommand($F()),e.addCommand(qF()),e.addCommand(rD()),e.addCommand(sD()),e.addCommand(uD()),e.addCommand(hD()),e.addCommand(pD()),e.addCommand(gD()),e.addCommand(CD()),e.addCommand(OD()),e.addCommand(jD()),e}o(BD,"createProgram");BD().parse();0&&(module.exports={createProgram});
797
+ `)}o(CK,"formatSummary");function IK(n,e){return{mode:e.apply?"apply":"dry-run",outDir:e.outDir,pairsCount:n.pairs.length,skippedCount:n.skipped.length,pairs:n.pairs.map(t=>({sourceUid:t.sourceUid,sourcePath:t.sourcePath,layoutUid:t.layout.uid,blockUid:t.block.uid,warnings:t.warnings})),skipped:n.skipped}}o(IK,"summariseResult");function $D(n){n.addCommand(pO()),n.addCommand(_O()),n.addCommand(SO())}o($D,"addQuerySubcommands");function BD(n){let e=new xe;e.name("exocortex").description("CLI tool for Exocortex knowledge management system").version(n??"15.148.9");let t=e.command("exoql").description("ExoQL query execution and cache management");$D(t);let r=e.command("sparql").description("(deprecated) Use 'exoql' instead");return $D(r),r.hook("preAction",()=>{console.error('\u26A0\uFE0F "sparql" is deprecated. Use "exoql" instead.')}),e.addCommand(CF()),e.addCommand(PF()),e.addCommand(OF()),e.addCommand(DF()),e.addCommand(NF()),e.addCommand($F()),e.addCommand(qF()),e.addCommand(rD()),e.addCommand(sD()),e.addCommand(uD()),e.addCommand(hD()),e.addCommand(pD()),e.addCommand(gD()),e.addCommand(CD()),e.addCommand(OD()),e.addCommand(jD()),e}o(BD,"createProgram");BD().parse();0&&(module.exports={createProgram});
798
798
  /*! Bundled license information:
799
799
 
800
800
  reflect-metadata/Reflect.js:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitelev/exocortex-cli",
3
- "version": "15.148.7",
3
+ "version": "15.148.9",
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": {