@mx-space/cli 0.6.0 → 0.6.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.
package/README.md CHANGED
@@ -485,6 +485,40 @@ Example profile config:
485
485
  | `6` | Server 5xx failure |
486
486
  | `7` | Resource not found |
487
487
 
488
+ ## Preview
489
+
490
+ `mxs preview <file>` renders a LiteXML fragment or `<mxpost>` / `<mxnote>` envelope to HTML and opens it in your default browser. Use it to sanity-check what the article will look like before publishing.
491
+
492
+ ```bash
493
+ mxs preview ./post.xml # open in browser
494
+ mxs preview - < note.xml # read stdin
495
+ mxs preview ./post.xml --theme dark # dark theme
496
+ mxs preview ./post.xml --save out.html # write HTML to file
497
+ mxs preview ./post.xml --print # emit HTML to stdout
498
+ ```
499
+
500
+ The variant (`article` / `note`) is auto-detected from the envelope root. Override with `--variant` for raw LiteXML fragments. The command does not contact `mx-core` — it's a pure local render via `@haklex/rich-litexml-cli`.
501
+
502
+ ## Skill bundle
503
+
504
+ `mxs skill` exposes the bundled AI-agent documentation directly from the CLI binary. Chapters are shipped inside the published `@mx-space/cli` package; liteXML chapters are pulled live from `@haklex/rich-litexml` at runtime (requires `@haklex/rich-litexml@>=0.16.0`).
505
+
506
+ | Command | Behaviour |
507
+ | -------------------------------- | ---------------------------------------------------------- |
508
+ | `mxs skill` | List every chapter (slug + one-line description). |
509
+ | `mxs skill get <slug>` | Print one chapter; default output is markdown for agents. |
510
+ | `mxs skill all` | Concatenate every chapter in registry order. |
511
+ | `mxs skill search <keyword>` | Substring search across title / description / body. |
512
+
513
+ All four verbs honour the global `--json`, `--output llm`, `--output xml`, and `--output readable` flags.
514
+
515
+ Override paths for development or vendoring:
516
+
517
+ | Variable | Effect |
518
+ | ----------------------- | ---------------------------------------------------------------------- |
519
+ | `MXS_SKILL_CLI_DIR` | Override the CLI-native skill directory (default: `<pkg>/skills/`). |
520
+ | `MXS_SKILL_HAKLEX_DIR` | Override the haklex liteXML skill directory. |
521
+
488
522
  ## Troubleshooting
489
523
 
490
524
  | Symptom | Resolution |
package/ROADMAP.md CHANGED
@@ -8,6 +8,11 @@
8
8
 
9
9
  - Internal rewrite onto Effect-TS (`@effect/cli` + `@effect/platform`). User-facing CLI surface is unchanged — see [`README.md`](./README.md#v030-behavior-changes) for the small list of behavioral adjustments and [`docs/architecture.md`](./docs/architecture.md) for the new internal architecture.
10
10
 
11
+ ## Shipped in v0.6
12
+
13
+ - `mxs skill` — bundled AI-agent documentation. List, get, all, search across chapters shipped inside the CLI (`packages/cli/skills/*.md`); liteXML chapters loaded live from the installed `@haklex/rich-litexml` package. Default output is raw markdown for direct context injection.
14
+ - `mxs preview <file>` — local HTML preview of a LiteXML fragment or `<mxpost>` / `<mxnote>` envelope. Wraps `@haklex/rich-litexml-cli` so the output matches the editor renderer.
15
+
11
16
  ## Next — Comment moderation
12
17
 
13
18
  - `mxs comment list [--page N] [--size N] [--state unread|read|junk] [--all]`
package/dist/bin/mxs.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { t as run } from "../mxs-DmOnpQrK.mjs";
2
+ import { t as run } from "../mxs-BxXhmqqF.mjs";
3
3
  export { run };
package/dist/index.d.mts CHANGED
@@ -1446,6 +1446,24 @@ declare class ArgvParse extends ArgvParse_base<{
1446
1446
  readonly details?: unknown;
1447
1447
  readonly hint?: string;
1448
1448
  }> {}
1449
+ declare const ChapterNotFound_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
1450
+ readonly _tag: "ChapterNotFound";
1451
+ } & Readonly<A>;
1452
+ declare class ChapterNotFound extends ChapterNotFound_base<{
1453
+ readonly message?: string;
1454
+ readonly slug?: string;
1455
+ readonly details?: unknown;
1456
+ readonly hint?: string;
1457
+ }> {}
1458
+ declare const SkillCorpusEmpty_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
1459
+ readonly _tag: "SkillCorpusEmpty";
1460
+ } & Readonly<A>;
1461
+ declare class SkillCorpusEmpty extends SkillCorpusEmpty_base<{
1462
+ readonly message?: string;
1463
+ readonly details?: unknown;
1464
+ readonly hint?: string;
1465
+ readonly cause?: unknown;
1466
+ }> {}
1449
1467
  declare const Generic_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
1450
1468
  readonly _tag: "Generic";
1451
1469
  } & Readonly<A>;
@@ -1455,7 +1473,7 @@ declare class Generic extends Generic_base<{
1455
1473
  readonly hint?: string;
1456
1474
  readonly cause?: unknown;
1457
1475
  }> {}
1458
- type CliError = AuthMissing | AuthExpired | AuthDenied | AuthProbe | NetworkTimeout | NetworkDns | NetworkRefused | ValidationFailed | ValidationXml | ServerError | ResourceNotFound | ConfigMissingApiUrl | ConfigMissingToken | ConfigMigrationFailed | ProfileNotFound | ProfileNoneActive | ProfileInvalidName | WriteRequiresExplicit | UpdateDevEnvironment | UpdateTransientInstall | UpdatePmUnknown | UpdateRegistryUnreachable | UpdateNodeIncompatible | UpdateSpawnFailed | UpdatePermissionDenied | ArgvParse | Generic;
1476
+ type CliError = AuthMissing | AuthExpired | AuthDenied | AuthProbe | NetworkTimeout | NetworkDns | NetworkRefused | ValidationFailed | ValidationXml | ServerError | ResourceNotFound | ConfigMissingApiUrl | ConfigMissingToken | ConfigMigrationFailed | ProfileNotFound | ProfileNoneActive | ProfileInvalidName | WriteRequiresExplicit | UpdateDevEnvironment | UpdateTransientInstall | UpdatePmUnknown | UpdateRegistryUnreachable | UpdateNodeIncompatible | UpdateSpawnFailed | UpdatePermissionDenied | ArgvParse | ChapterNotFound | SkillCorpusEmpty | Generic;
1459
1477
  type CliErrorTag = CliError['_tag'];
1460
1478
  declare const tagToCode: Record<CliErrorTag, string>;
1461
1479
  declare const codeForTag: (tag: CliErrorTag) => string;
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as defaultMessageFor, c as tagToCode, i as codeForTag, l as toErrorEnvelope, n as defaultGlobalFlags, o as exitCodeForError, r as parseGlobalFlags, s as exitCodeForTag, t as run } from "./mxs-DmOnpQrK.mjs";
1
+ import { a as defaultMessageFor, c as tagToCode, i as codeForTag, l as toErrorEnvelope, n as defaultGlobalFlags, o as exitCodeForError, r as parseGlobalFlags, s as exitCodeForTag, t as run } from "./mxs-BxXhmqqF.mjs";
2
2
  export { codeForTag, defaultGlobalFlags, defaultMessageFor, exitCodeForError, exitCodeForTag, parseGlobalFlags, run, tagToCode, toErrorEnvelope };