@mx-space/cli 0.13.1 → 0.13.2

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 (58) hide show
  1. package/README.md +59 -0
  2. package/ROADMAP.md +10 -7
  3. package/dist/{Lexical.dev-By5dOKBN.mjs → Lexical.dev-BsbWMhb3.mjs} +2265 -429
  4. package/dist/{Lexical.node-fXM8Jp7p.mjs → Lexical.node-DnR_u_Ke.mjs} +47 -10
  5. package/dist/Lexical.prod-B7L8eVsO.mjs +6816 -0
  6. package/dist/{LexicalClipboard.dev--HxGoSkO.mjs → LexicalClipboard.dev-BGSFbuTA.mjs} +131 -39
  7. package/dist/{LexicalClipboard.node-C3mRbrmW.mjs → LexicalClipboard.node-CUD_tpWb.mjs} +2 -2
  8. package/dist/LexicalClipboard.prod-DQXfRt3h.mjs +429 -0
  9. package/dist/{LexicalCodeCore.dev-DjSrd4A4.mjs → LexicalCodeCore.dev-B9lK_GSN.mjs} +81 -67
  10. package/dist/LexicalCodeCore.prod-CNWMPXhg.mjs +651 -0
  11. package/dist/LexicalDragon.dev-DRm2bGZ1.mjs +186 -0
  12. package/dist/{LexicalDragon.node-BVhw4C7s.mjs → LexicalDragon.node-d8gPruly.mjs} +3 -2
  13. package/dist/LexicalDragon.prod-ey3uKDJF.mjs +121 -0
  14. package/dist/{LexicalExtension.dev-BPNyvGqe.mjs → LexicalExtension.dev-CXtOJb83.mjs} +349 -35
  15. package/dist/{LexicalExtension.node-BVlcrgOx.mjs → LexicalExtension.node-CMsupJZs.mjs} +9 -4
  16. package/dist/{LexicalExtension.prod-DFKbiNt-.mjs → LexicalExtension.prod-BCLGhzcg.mjs} +477 -328
  17. package/dist/{LexicalHeadless.dev-B-cj7Pr5.mjs → LexicalHeadless.dev-yVDOBd64.mjs} +2 -2
  18. package/dist/{LexicalHeadless.prod-Byp1vNzT.mjs → LexicalHeadless.prod-B8qauuEA.mjs} +2 -2
  19. package/dist/{LexicalHtml.dev-prBAwszN.mjs → LexicalHtml.dev-3rdckXIU.mjs} +323 -265
  20. package/dist/{LexicalHtml.node-BvNF96jZ.mjs → LexicalHtml.node-DagZUjQ_.mjs} +6 -4
  21. package/dist/{LexicalHtml.prod-Sz3CW1ht.mjs → LexicalHtml.prod-B5AQaJDb.mjs} +354 -352
  22. package/dist/{LexicalLink.dev-NySTYhVR.mjs → LexicalLink.dev-CspSwLNB.mjs} +69 -58
  23. package/dist/{LexicalLink.prod-BuCM8gts.mjs → LexicalLink.prod-Da-ZW6H5.mjs} +210 -211
  24. package/dist/{LexicalList.dev-DIMOvSFD.mjs → LexicalList.dev-CNXmV6v8.mjs} +246 -198
  25. package/dist/LexicalList.prod-DgQzj4v9.mjs +944 -0
  26. package/dist/{LexicalMarkdown.dev-C7aylvCG.mjs → LexicalMarkdown.dev-0XURdo96.mjs} +129 -37
  27. package/dist/LexicalMarkdown.prod-qUsIQfJx.mjs +932 -0
  28. package/dist/{LexicalRichText.dev-DfICq6lU.mjs → LexicalRichText.dev-BqsEA7I9.mjs} +151 -122
  29. package/dist/{LexicalRichText.node-Bg9jND3Q.mjs → LexicalRichText.node-D73RR0Ck.mjs} +8 -11
  30. package/dist/LexicalRichText.prod-4Atyd7OR.mjs +538 -0
  31. package/dist/{LexicalSelection.dev-DGjj12wW.mjs → LexicalSelection.dev-DK5xfxKP.mjs} +10 -9
  32. package/dist/{LexicalSelection.node-BU5L4193.mjs → LexicalSelection.node-pyZyrANz.mjs} +4 -4
  33. package/dist/{LexicalSelection.prod-D-PwRbyK.mjs → LexicalSelection.prod-C5GrCbDC.mjs} +144 -146
  34. package/dist/{LexicalTable.dev-ChP7cugd.mjs → LexicalTable.dev-DiR_4rdI.mjs} +184 -119
  35. package/dist/LexicalTable.prod-Cbc5EasT.mjs +2336 -0
  36. package/dist/{LexicalUtils.dev-BiFU3789.mjs → LexicalUtils.dev-jhPjn1vQ.mjs} +375 -35
  37. package/dist/{LexicalUtils.node-j3Llm7Y3.mjs → LexicalUtils.node-Ck74ludK.mjs} +24 -12
  38. package/dist/LexicalUtils.prod-nuTBxnk_.mjs +504 -0
  39. package/dist/bin/mxs.mjs +1 -1
  40. package/dist/esm-BumPuCXw.mjs +2 -0
  41. package/dist/{esm-DFrz5rIo.mjs → esm-DupC6TTP.mjs} +214 -179
  42. package/dist/index.d.mts +46 -17
  43. package/dist/index.mjs +1 -1
  44. package/dist/{mxs-DXpzbUf4.mjs → mxs-BgAyMQdq.mjs} +8384 -6209
  45. package/package.json +17 -17
  46. package/skills/commands-ai.md +115 -0
  47. package/skills/overview.md +1 -0
  48. package/dist/Lexical.prod-BlCvXPGa.mjs +0 -6088
  49. package/dist/LexicalClipboard.prod-DNJzFMcT.mjs +0 -371
  50. package/dist/LexicalCodeCore.prod-DTDShkR3.mjs +0 -642
  51. package/dist/LexicalDragon.dev-DwprRH0z.mjs +0 -88
  52. package/dist/LexicalDragon.prod-nh4J-8vn.mjs +0 -59
  53. package/dist/LexicalList.prod-MVqfA6Vo.mjs +0 -925
  54. package/dist/LexicalMarkdown.prod-CfQSM406.mjs +0 -868
  55. package/dist/LexicalRichText.prod-GsFzCK-o.mjs +0 -550
  56. package/dist/LexicalTable.prod-Bpr9YRXp.mjs +0 -2311
  57. package/dist/LexicalUtils.prod-DCvrA78p.mjs +0 -373
  58. package/dist/esm-DXO9Afik.mjs +0 -2
package/README.md CHANGED
@@ -469,6 +469,65 @@ description: Expand-contract Postgres migrations safe for rolling deploys.
469
469
  Use when authoring or reviewing any Postgres migration in this codebase.
470
470
  ```
471
471
 
472
+ ## AI
473
+
474
+ Manage AI artifacts (summary, translation, insights) produced by the core AI module. Article references accept Snowflake id, post slug, or note nid — the CLI resolves to an article id via post-then-note lookup. Record references (`<recordId>`) are raw Snowflakes.
475
+
476
+ Generate verbs (`summary regen`, `translate run`, `insights refresh`) enqueue a task on the server, then poll `GET /tasks/:id` until the task reaches a terminal status (`completed`, `partial_failed`, `failed`, `cancelled`). Progress lines write to stderr. Pass `--no-wait` to return immediately with `status: pending` after the task is created. If the server reports `created: false`, an in-flight deduplicated task already exists and the CLI joins it instead of erroring. The polling cadence is 1000 ms by default; override via `MXS_AI_POLL_MS=<n>` for tests.
477
+
478
+ ### Summary
479
+
480
+ | Command | Description |
481
+ | -------------------------------------------------- | ----------------------------------------------------------------- |
482
+ | `mxs ai summary regen <id> [--to <lang>...]` | Regenerate an article's summary (optionally for given languages). |
483
+ | `mxs ai summary list [--page <n>] [--size <n>] [--grouped]` | List summaries (flat or grouped by article). |
484
+ | `mxs ai summary get <recordId>` | Get one summary by record id. |
485
+ | `mxs ai summary by-article <id> [--lang <l>] [--only-db]` | Show an article's summary; `--only-db` skips auto-generate. |
486
+ | `mxs ai summary edit <recordId>` | Edit the `summary` field via `$EDITOR` (JSON envelope). |
487
+ | `mxs ai summary delete <recordId> [--force]` | Delete a summary record. |
488
+
489
+ ### Translate
490
+
491
+ | Command | Description |
492
+ | -------------------------------------------------------- | ------------------------------------------------------------- |
493
+ | `mxs ai translate run <id> --to <lang>... [--no-wait]` | Translate an article into one or more languages (`--to` required, repeatable). |
494
+ | `mxs ai translate list [--page <n>] [--size <n>]` | List translations (always grouped by article — no flat list server-side). |
495
+ | `mxs ai translate get <recordId>` | Get one translation by record id. |
496
+ | `mxs ai translate by-article <id> [--lang <l>]` | Show an article's translations (single lang or all). |
497
+ | `mxs ai translate languages <id>` | List languages an article has been translated into. |
498
+ | `mxs ai translate edit <recordId>` | Edit translation fields via `$EDITOR` (JSON envelope). |
499
+ | `mxs ai translate delete <recordId> [--force]` | Delete a translation record. |
500
+
501
+ ### Translation Entries
502
+
503
+ The i18n dictionary entries layer used by category / topic / note metadata. `--key-path` accepts only the server-validated set: `category.name`, `topic.name`, `topic.introduce`, `topic.description`, `note.mood`, `note.weather`.
504
+
505
+ | Command | Description |
506
+ | ----------------------------------------------------------------------------- | ------------------------------------------------------ |
507
+ | `mxs ai translate entries list [--page <n>] [--size <n>] [--key-path <p>] [--lang <l>]` | List entries with optional filters. |
508
+ | `mxs ai translate entries generate [--key-path <p>...] [--to <lang>...]` | Trigger regeneration of entries. |
509
+ | `mxs ai translate entries edit <recordId>` | Edit `translatedText` via `$EDITOR` (JSON envelope). |
510
+ | `mxs ai translate entries delete <recordId> [--force]` | Delete an entry. |
511
+
512
+ ### Insights
513
+
514
+ | Command | Description |
515
+ | ------------------------------------------------------ | ------------------------------------------------------------------- |
516
+ | `mxs ai insights refresh <id> [--no-wait]` | Refresh AI insights for an article. |
517
+ | `mxs ai insights list [--page <n>] [--size <n>] [--grouped]` | List insights (flat or grouped by article). |
518
+ | `mxs ai insights get <recordId>` | Get one insights record by record id. |
519
+ | `mxs ai insights by-article <id> [--lang <l>] [--only-db]` | Show an article's insights; `--only-db` skips auto-generate. |
520
+ | `mxs ai insights edit <recordId>` | Edit the `content` field via `$EDITOR` (JSON envelope). |
521
+ | `mxs ai insights delete <recordId> [--force]` | Delete an insights record. |
522
+
523
+ ```bash
524
+ mxs ai summary regen my-post --to en --to ja
525
+ mxs ai translate run my-post --to en
526
+ mxs ai insights refresh my-post
527
+ mxs ai summary list --grouped
528
+ mxs ai translate languages my-post
529
+ ```
530
+
472
531
  ## Configuration
473
532
 
474
533
  | Command | Description |
package/ROADMAP.md CHANGED
@@ -24,15 +24,18 @@
24
24
 
25
25
  State map: `unread=0`, `read=1`, `junk=2`. Routes single-id verbs through the server's batch endpoints (`PATCH /comments/batch/state`, `DELETE /comments/batch`) for one unified path.
26
26
 
27
- ## v2 AI
27
+ ## Shipped in v0.13
28
28
 
29
- > **Note (v0.3):** Service interface placeholders for AI, Backup, and Cache are reserved in `src/services/{Ai,Backup,Cache}.ts` and threaded through the layer composition. Implementation is pending.
29
+ - `mxs ai` full management surface for AI artifacts.
30
+ - `mxs ai summary {regen,list,get,by-article,edit,delete}`
31
+ - `mxs ai translate {run,list,get,by-article,languages,edit,delete}`
32
+ - `mxs ai translate entries {list,generate,edit,delete}`
33
+ - `mxs ai insights {refresh,list,get,by-article,edit,delete}`
34
+ - Generate verbs enqueue a task on the server and poll `GET /tasks/:id` until terminal; `--no-wait` returns the `taskId` immediately. Dedup-aware: `created: false` joins the in-flight task.
30
35
 
31
- - AI module commands
32
- - `mxs ai summary regen <id>`
33
- - `mxs ai translate <id> --to <locale>`
34
- - `mxs ai insights refresh`
35
- - `mxs ai tokens`
36
+ ## v2 — AI tokens / usage
37
+
38
+ - `mxs ai tokens` aggregate `totalCost` and `totalTokens` across recent AI tasks. Pending a final decision on client-side aggregation vs. a dedicated `/ai/usage` endpoint on the server.
36
39
 
37
40
  ## v3
38
41