@mx-space/cli 0.5.1 → 0.6.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.
package/README.md CHANGED
@@ -243,7 +243,7 @@ URL follows the admin-vue3 hash-router convention
243
243
 
244
244
  | Flag | Field |
245
245
  | ---------------------- | ---------------------------------------------------------------------- |
246
- | `--title <text>` | `title`; defaults to `无题` for create payloads. |
246
+ | `--title <text>` | `title`; defaults to `无题` ("Untitled") for create payloads. |
247
247
  | `--slug <slug>` | `slug` |
248
248
  | `--topic <id-or-name>` | Resolved to `topicId` by id, slug, or name. |
249
249
  | `--content <spec>` | Body source. |
@@ -485,6 +485,26 @@ Example profile config:
485
485
  | `6` | Server 5xx failure |
486
486
  | `7` | Resource not found |
487
487
 
488
+ ## Skill bundle
489
+
490
+ `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`).
491
+
492
+ | Command | Behaviour |
493
+ | -------------------------------- | ---------------------------------------------------------- |
494
+ | `mxs skill` | List every chapter (slug + one-line description). |
495
+ | `mxs skill get <slug>` | Print one chapter; default output is markdown for agents. |
496
+ | `mxs skill all` | Concatenate every chapter in registry order. |
497
+ | `mxs skill search <keyword>` | Substring search across title / description / body. |
498
+
499
+ All four verbs honour the global `--json`, `--output llm`, `--output xml`, and `--output readable` flags.
500
+
501
+ Override paths for development or vendoring:
502
+
503
+ | Variable | Effect |
504
+ | ----------------------- | ---------------------------------------------------------------------- |
505
+ | `MXS_SKILL_CLI_DIR` | Override the CLI-native skill directory (default: `<pkg>/skills/`). |
506
+ | `MXS_SKILL_HAKLEX_DIR` | Override the haklex liteXML skill directory. |
507
+
488
508
  ## Troubleshooting
489
509
 
490
510
  | Symptom | Resolution |
package/ROADMAP.md CHANGED
@@ -8,6 +8,10 @@
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.7
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
+
11
15
  ## Next — Comment moderation
12
16
 
13
17
  - `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-CCu8LdBX.mjs";
2
+ import { t as run } from "../mxs-Bs_7ZKs9.mjs";
3
3
  export { run };
@@ -37649,4 +37649,4 @@ const unsafeAdd = /* @__PURE__ */ dual((args) => isFiberSet(args[0]), (self, fib
37649
37649
  */
37650
37650
  const join = (self) => _await(self.deferred);
37651
37651
  //#endregion
37652
- export { transduce as $, constUndefined as $a, matchRight as $i, timeout as $n, of as $r, contextWithEffect as $t, TaggedError as A, left as Aa, appendAll$2 as Ai, onError as An, taggedEnum as Ar, unsafeMake$3 as At, isConfig as B, toStringUnknown as Ba, flatMap$8 as Bi, runPromise as Bn, ParentSpan as Br, annotateLogs as Bt, Literal as C, match$9 as Ca, getOption$1 as Ci, mapBoth$1 as Cn, make$15 as Cr, provideMerge as Ct, Schema_exports as D, boolean as Da, isMissingDataOnly as Di, matchCauseEffect as Dn, Error$1 as Dr, currentLoggers as Dt, Record as E, some$1 as Ea, isConfigError as Ei, match$2 as En, Equivalence$2 as Er, currentContext as Et, decodeUnknown as F, Class$5 as Fa, filter$4 as Fi, provide$1 as Fn, isInterrupted as Fr, _void as Ft, fromChannel as G, hash as Ga, isArray as Gi, serviceFunctions as Gn, updateAndGet as Gr, catchAll as Gt, bufferChunks as H, symbol as Ha, getSomes as Hi, runtime as Hn, make$27 as Hr, asVoid as Ht, int as I, NodeInspectSymbol as Ia, filterMap as Ii, provideService as In, isInterruptedOnly as Ir, acquireRelease as It, mapError as J, hasProperty as Ja, join$3 as Ji, suspend$6 as Jn, updateAs as Jr, catchIf as Jt, fromReadableStream as K, string$3 as Ka, isEmptyReadonlyArray as Ki, serviceOption as Kn, allLevels as Kr, catchAllCause$1 as Kt, optional as L, format$4 as La, findFirst$1 as Li, repeatN as Ln, fail$7 as Lr, acquireUseRelease$2 as Lt, Unknown as M, right as Ma, drop$1 as Mi, orDie as Mn, log as Mr, decodeSync as Mt, compose as N, pipeArguments as Na, empty$26 as Ni, orElse$3 as Nn, Scope as Nr, encodeSync as Nt, String$ as O, mapInput as Oa, allocate as Oi, matchEffect as On, TaggedError$1 as Or, currentTracerEnabled as Ot, declare as P, BaseProto as Pa, every$1 as Pi, orElseFail as Pn, addFinalizer$1 as Pr, is as Pt, suspend$1 as Q, constFalse as Qa, matchLeft as Qi, tapErrorCause as Qn, isNil as Qr, context as Qt, transform as R, redact as Ra, findFirstIndex as Ri, retry as Rn, isFailure as Rr, addFinalizer as Rt, Int as S, map$14 as Sa, get$13 as Si, map$3 as Sn, isDone as Sr, provide as St, NumberFromString as T, orElse$5 as Ta, omit$3 as Ti, mapInputContext as Tn, unsafeDone as Tr, succeed$1 as Tt, ensuring as U, cached$1 as Ua, head$2 as Ui, scope as Un, set$2 as Ur, async as Ut, asyncScoped as V, equals$3 as Va, fromIterable$10 as Vi, runSync as Vn, get$5 as Vr, as as Vt, fail as W, combine$7 as Wa, headNonEmpty$2 as Wi, scoped$3 as Wn, update$1 as Wr, cached as Wt, runCollect as X, isTagged as Xa, map$12 as Xi, tap as Xn, round as Xr, catchTag as Xt, run as Y, isObject as Ya, make$48 as Yi, sync$1 as Yn, CommitPrototype as Yr, catchSome as Yt, splitLines as Z, globalValue as Za, match$8 as Zi, tapError as Zn, cons as Zr, catchTags as Zt, fromString as _, getOrThrow as _a, toArray$1 as _i, interruptible as _n, _await as _r, updateContext as _t, make$1 as a, sort as aa, make$36 as ai, failCause$2 as an, __exportAll as ao, unlessEffect as ar, fromChannel$1 as at, Date$ as b, isOption as ba, Reference as bi, logError as bn, failCause$3 as br, effect$1 as bt, make$3 as c, tailNonEmpty$1 as ca, add as ci, filterOrDieMessage as cn, useSpan as cr, embedInput as ct, defaultLogger as d, getEquivalence$5 as da, remove$1 as di, fnUntraced as dn, withParentSpan as dr, fromEffect as dt, of$2 as ea, empty$19 as ei, die as en, constVoid as eo, tryMap as er, unwrap as et, prettyLoggerDefault as f, map$13 as fa, seconds as fi, forEach$2 as fn, zip$1 as fr, suspend$2 as ft, when as g, getOrElse as ga, reduce$6 as gi, ignore as gn, DeferredTypeId as gr, runFork as gt, value as h, fromNullable as ha, of$1 as hi, gen as hn, zipWith as hr, spaced as ht, isMailbox as i, some as ia, isEmpty$5 as ii, fail$4 as in, __commonJSMin as io, uninterruptibleMask as ir, forEach as it, Union as j, merge$3 as ja, contains as ji, onInterrupt as jn, error as jr, nominal as jt, Struct as k, string$2 as ka, append$2 as ki, negate as kn, tagged as kr, get$3 as kt, updateEffect as l, take$3 as la, fromIterable$6 as li, flatMap$4 as ln, when$2 as lr, ensuring$1 as lt, orElse as m, flatMap$9 as ma, map$11 as mi, forkScoped as mn, zipRight$1 as mr, write as mt, make as n, reduce$7 as na, get$9 as ni, either$1 as nn, identity as no, try_ as nr, drain as nt, toChannel as o, span as oa, set$4 as oi, failSync as on, __require as oo, unsafeMakeLatch as or, unwrapScoped$1 as ot, withMinimumLogLevel as p, filter$5 as pa, appendAll$1 as pi, forkDaemon as pn, zipLeft as pr, void_ as pt, mapChunks as q, symbol$1 as qa, isNonEmptyReadonlyArray as qi, succeed$3 as qn, getOrDefault as qr, catchAllDefect as qt, unsafeAdd as r, reduceRight as ra, has$4 as ri, ensuring$4 as rn, pipe as ro, uninterruptible as rr, foldLeftChunks as rt, get as s, splitAt as sa, make$39 as si, filter$1 as sn, __toESM as so, unsafeMakeSemaphore as sr, acquireUseRelease as st, join as t, prepend$2 as ta, fromIterable$5 as ti, dieMessage as tn, dual as to, tryPromise as tr, unwrapScoped as tt, unify as u, unsafeGet$3 as ua, has$5 as ui, flatten$3 as un, withFiberRuntime as ur, flatMap as ut, Array$ as v, getOrUndefined as va, unsafeFromArray as vi, isEffect as vn, complete as vr, get$1 as vt, Number$ as w, none$4 as wa, merge$1 as wi, mapError$4 as wn, succeed$4 as wr, scoped$2 as wt, Defect as x, isSome as xa, Tag as xi, logWarning as xn, interrupt$1 as xr, mergeAll$1 as xt, Cause as y, isNone as ya, GenericTag as yi, locally as yn, fail$5 as yr, make$10 as yt, make$5 as z, symbolRedactable as za, findLast as zi, runFork$1 as zn, void_$2 as zr, all as zt };
37652
+ export { drain as $, identity as $a, reduce$7 as $i, try_ as $n, get$9 as $r, either$1 as $t, compose as A, pipeArguments as Aa, empty$26 as Ai, orElse$3 as An, Scope as Ar, encodeSync as At, ensuring as B, cached$1 as Ba, head$2 as Bi, scope as Bn, set$2 as Br, async as Bt, Number$ as C, some$1 as Ca, isConfigError as Ci, match$2 as Cn, Equivalence$2 as Cr, currentContext as Ct, String$ as D, left as Da, appendAll$2 as Di, onError as Dn, taggedEnum as Dr, unsafeMake$3 as Dt, Schema_exports as E, string$2 as Ea, append$2 as Ei, negate as En, tagged as Er, get$3 as Et, transform as F, redact as Fa, findFirstIndex as Fi, retry as Fn, isFailure as Fr, addFinalizer as Ft, mapError as G, hasProperty as Ga, join$3 as Gi, suspend$6 as Gn, updateAs as Gr, catchIf as Gt, fromChannel as H, hash as Ha, isArray as Hi, serviceFunctions as Hn, updateAndGet as Hr, catchAll as Ht, make$5 as I, symbolRedactable as Ia, findLast as Ii, runFork$1 as In, void_$2 as Ir, all as It, splitLines as J, globalValue as Ja, match$8 as Ji, tapError as Jn, cons as Jr, catchTags as Jt, run as K, isObject as Ka, make$48 as Ki, sync$1 as Kn, CommitPrototype as Kr, catchSome as Kt, isConfig as L, toStringUnknown as La, flatMap$8 as Li, runPromise as Ln, ParentSpan as Lr, annotateLogs as Lt, decodeUnknown as M, Class$5 as Ma, filter$4 as Mi, provide$1 as Mn, isInterrupted as Mr, _void as Mt, int as N, NodeInspectSymbol as Na, filterMap as Ni, provideService as Nn, isInterruptedOnly as Nr, acquireRelease as Nt, TaggedError as O, merge$3 as Oa, contains as Oi, onInterrupt as On, error as Or, nominal as Ot, optional as P, format$4 as Pa, findFirst$1 as Pi, repeatN as Pn, fail$7 as Pr, acquireUseRelease$2 as Pt, unwrapScoped as Q, dual as Qa, prepend$2 as Qi, tryPromise as Qn, fromIterable$5 as Qr, dieMessage as Qt, asyncScoped as R, equals$3 as Ra, fromIterable$10 as Ri, runSync as Rn, get$5 as Rr, as as Rt, Literal as S, orElse$5 as Sa, omit$3 as Si, mapInputContext as Sn, unsafeDone as Sr, succeed$1 as St, Record as T, mapInput as Ta, allocate as Ti, matchEffect as Tn, TaggedError$1 as Tr, currentTracerEnabled as Tt, fromReadableStream as U, string$3 as Ua, isEmptyReadonlyArray as Ui, serviceOption as Un, allLevels as Ur, catchAllCause$1 as Ut, fail as V, combine$7 as Va, headNonEmpty$2 as Vi, scoped$3 as Vn, update$1 as Vr, cached as Vt, mapChunks as W, symbol$1 as Wa, isNonEmptyReadonlyArray as Wi, succeed$3 as Wn, getOrDefault as Wr, catchAllDefect as Wt, transduce as X, constUndefined as Xa, matchRight as Xi, timeout as Xn, of as Xr, contextWithEffect as Xt, suspend$1 as Y, constFalse as Ya, matchLeft as Yi, tapErrorCause as Yn, isNil as Yr, context as Yt, unwrap as Z, constVoid as Za, of$2 as Zi, tryMap as Zn, empty$19 as Zr, die as Zt, fromString as _, isOption as _a, Reference as _i, logError as _n, failCause$3 as _r, effect$1 as _t, make$1 as a, tailNonEmpty$1 as aa, add as ai, filterOrDieMessage as an, useSpan as ar, embedInput as at, Defect as b, match$9 as ba, getOption$1 as bi, mapBoth$1 as bn, make$15 as br, provideMerge as bt, make$3 as c, getEquivalence$5 as ca, remove$1 as ci, fnUntraced as cn, withParentSpan as cr, fromEffect as ct, defaultLogger as d, flatMap$9 as da, map$11 as di, forkScoped as dn, zipRight$1 as dr, write as dt, reduceRight as ea, has$4 as ei, ensuring$4 as en, pipe as eo, uninterruptible as er, foldLeftChunks as et, prettyLoggerDefault as f, fromNullable as fa, of$1 as fi, gen as fn, zipWith as fr, spaced as ft, when as g, isNone as ga, GenericTag as gi, locally as gn, fail$5 as gr, make$10 as gt, value as h, getOrUndefined as ha, unsafeFromArray as hi, isEffect as hn, complete as hr, get$1 as ht, isMailbox as i, splitAt as ia, make$39 as ii, filter$1 as in, __toESM as io, unsafeMakeSemaphore as ir, acquireUseRelease as it, declare as j, BaseProto as ja, every$1 as ji, orElseFail as jn, addFinalizer$1 as jr, is as jt, Union as k, right as ka, drop$1 as ki, orDie as kn, log as kr, decodeSync as kt, updateEffect as l, map$13 as la, seconds as li, forEach$2 as ln, zip$1 as lr, suspend$2 as lt, orElse as m, getOrThrow as ma, toArray$1 as mi, interruptible as mn, _await as mr, updateContext as mt, make as n, sort as na, make$36 as ni, failCause$2 as nn, __exportAll as no, unlessEffect as nr, fromChannel$1 as nt, toChannel as o, take$3 as oa, fromIterable$6 as oi, flatMap$4 as on, when$2 as or, ensuring$1 as ot, withMinimumLogLevel as p, getOrElse as pa, reduce$6 as pi, ignore as pn, DeferredTypeId as pr, runFork as pt, runCollect as q, isTagged as qa, map$12 as qi, tap as qn, round as qr, catchTag as qt, unsafeAdd as r, span as ra, set$4 as ri, failSync as rn, __require as ro, unsafeMakeLatch as rr, unwrapScoped$1 as rt, get as s, unsafeGet$3 as sa, has$5 as si, flatten$3 as sn, withFiberRuntime as sr, flatMap as st, join as t, some as ta, isEmpty$5 as ti, fail$4 as tn, __commonJSMin as to, uninterruptibleMask as tr, forEach as tt, unify as u, filter$5 as ua, appendAll$1 as ui, forkDaemon as un, zipLeft as ur, void_ as ut, Cause as v, isSome as va, Tag as vi, logWarning as vn, interrupt$1 as vr, mergeAll$1 as vt, NumberFromString as w, boolean as wa, isMissingDataOnly as wi, matchCauseEffect as wn, Error$1 as wr, currentLoggers as wt, Int as x, none$4 as xa, merge$1 as xi, mapError$4 as xn, succeed$4 as xr, scoped$2 as xt, Date$ as y, map$14 as ya, get$13 as yi, map$3 as yn, isDone as yr, provide as yt, bufferChunks as z, symbol as za, getSomes as zi, runtime as zn, make$27 as zr, asVoid as zt };
@@ -0,0 +1,2 @@
1
+ import { E as Schema_exports } from "./esm-CK9m5JKX.mjs";
2
+ export { Schema_exports as Schema };
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-CCu8LdBX.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-Bs_7ZKs9.mjs";
2
2
  export { codeForTag, defaultGlobalFlags, defaultMessageFor, exitCodeForError, exitCodeForTag, parseGlobalFlags, run, tagToCode, toErrorEnvelope };