@mx-space/cli 0.8.0 → 0.10.0
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 +30 -0
- package/ROADMAP.md +1 -0
- package/dist/bin/mxs.mjs +1 -1
- package/dist/esm-Bw9S3CPp.mjs +2 -0
- package/dist/{esm-Dg-WhPCe.mjs → esm-eihI6wbY.mjs} +1 -1
- package/dist/index.d.mts +10 -1
- package/dist/index.mjs +1 -1
- package/dist/{mxs-DT0oYk6U.mjs → mxs-BLgwEih6.mjs} +963 -517
- package/package.json +1 -1
- package/skills/commands-auth.md +1 -1
- package/skills/commands-category.md +1 -1
- package/skills/commands-comment.md +1 -1
- package/skills/commands-config.md +1 -1
- package/skills/commands-preview.md +1 -1
- package/skills/commands-profile.md +1 -1
- package/skills/commands-project.md +57 -0
- package/skills/commands-topic.md +1 -1
- package/skills/output-modes.md +1 -1
- package/skills/overview.md +2 -1
- package/skills/safety.md +10 -0
- package/dist/esm-By7trG9K.mjs +0 -2
package/README.md
CHANGED
|
@@ -288,6 +288,36 @@ URL follows the admin-vue3 hash-router convention
|
|
|
288
288
|
|
|
289
289
|
Page edit and page file payloads currently reuse the `<mxpost>` envelope shape.
|
|
290
290
|
|
|
291
|
+
## Projects
|
|
292
|
+
|
|
293
|
+
| Command | Description |
|
|
294
|
+
| -------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
295
|
+
| `mxs project list` | List projects. |
|
|
296
|
+
| `mxs project get <nameOrId>` | Read a project by Snowflake id or unique `name` (raw envelope). |
|
|
297
|
+
| `mxs project view <nameOrId>` | Show a project rendered for terminal / LLM consumption. |
|
|
298
|
+
| `mxs project create` | Create a project. `--name` and `--description` are required. |
|
|
299
|
+
| `mxs project edit <nameOrId>` | Edit through `$EDITOR` using a JSON envelope of editable fields. No change → no PATCH; malformed JSON exits with `validation.json`. |
|
|
300
|
+
| `mxs project update <nameOrId>` | Patch selected project fields. Missing flags leave the field untouched. |
|
|
301
|
+
| `mxs project delete <nameOrId>` | Delete a project. Requires `--force` in non-TTY contexts. |
|
|
302
|
+
|
|
303
|
+
### Project Write Flags
|
|
304
|
+
|
|
305
|
+
| Flag | Field | Notes |
|
|
306
|
+
| ---------------------- | --------------- | ---------------------------------------------- |
|
|
307
|
+
| `--name <text>` | `name` | Required on `create`. Unique server-side. |
|
|
308
|
+
| `--description <text>` | `description` | Required on `create`. |
|
|
309
|
+
| `--preview-url <url>` | `previewUrl` | http(s) URL. |
|
|
310
|
+
| `--project-url <url>` | `projectUrl` | http(s) URL. |
|
|
311
|
+
| `--doc-url <url>` | `docUrl` | http(s) URL. |
|
|
312
|
+
| `--avatar <url>` | `avatar` | http(s) URL. |
|
|
313
|
+
| `--images <csv>` | `images` | Comma-separated list of URLs (≤ 20). |
|
|
314
|
+
| `--text <text>` | `text` | Free-form plain text. |
|
|
315
|
+
| `--file <path>` | (merge) | JSON file whose recognised keys merge in first; per-flag values override. |
|
|
316
|
+
| `--open` | — | After success, open the admin edit page. |
|
|
317
|
+
| `--silent` | — | On success, emit `{ ok: true }` instead of the full row. |
|
|
318
|
+
|
|
319
|
+
Resolver: `<nameOrId>` accepts a Snowflake id directly, or a `name` resolved via `GET /projects/all`. Duplicate names surface from the server as `PROJECT_NAME_TAKEN` (409).
|
|
320
|
+
|
|
291
321
|
## Categories
|
|
292
322
|
|
|
293
323
|
| Command | Description |
|
package/ROADMAP.md
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
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
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
|
+
- `mxs project` — full CRUD for portfolio projects: `list`, `get`, `view`, `create`, `edit` ($EDITOR JSON envelope), `update`, `delete`. Resolver accepts unique `name` or Snowflake id. Server adds `PATCH /projects/:id`, a Zod DTO on create/update, and a `PROJECT_NAME_TAKEN` (409) error on duplicate names.
|
|
15
16
|
|
|
16
17
|
## Next — Comment moderation
|
|
17
18
|
|
package/dist/bin/mxs.mjs
CHANGED
|
@@ -37649,4 +37649,4 @@ const unsafeAdd = /*#__PURE__*/ dual((args) => isFiberSet(args[0]), (self, fiber
|
|
|
37649
37649
|
*/
|
|
37650
37650
|
const join = (self) => _await(self.deferred);
|
|
37651
37651
|
//#endregion
|
|
37652
|
-
export { drain as $,
|
|
37652
|
+
export { drain as $, pipe as $a, reduceRight as $i, uninterruptible as $n, has$4 as $r, either$1 as $t, compose as A, BaseProto as Aa, every$1 as Ai, orElse$3 as An, addFinalizer$1 as Ar, encodeSync as At, ensuring as B, combine$7 as Ba, headNonEmpty$2 as Bi, scoped$3 as Bn, update$1 as Br, async as Bt, Number$ as C, boolean as Ca, isMissingDataOnly as Ci, match$2 as Cn, Error$1 as Cr, currentContext as Ct, String$ as D, merge$3 as Da, contains as Di, onError as Dn, error as Dr, unsafeMake$3 as Dt, Schema_exports as E, left as Ea, appendAll$2 as Ei, negate as En, taggedEnum as Er, get$3 as Et, transform as F, symbolRedactable as Fa, findLast as Fi, retry as Fn, void_$2 as Fr, addFinalizer as Ft, mapError as G, isObject as Ga, make$48 as Gi, sync$1 as Gn, CommitPrototype as Gr, catchIf as Gt, fromChannel as H, string$3 as Ha, isEmptyReadonlyArray as Hi, serviceOption as Hn, allLevels as Hr, catchAll as Ht, make$5 as I, toStringUnknown as Ia, flatMap$8 as Ii, runFork$1 as In, ParentSpan as Ir, all as It, splitLines as J, constFalse as Ja, matchLeft as Ji, tapErrorCause as Jn, isNil as Jr, catchTags as Jt, run as K, isTagged as Ka, map$12 as Ki, tap as Kn, round as Kr, catchSome as Kt, isConfig as L, equals$3 as La, fromIterable$10 as Li, runSync as Ln, get$5 as Lr, annotateLogs as Lt, decodeUnknown as M, NodeInspectSymbol as Ma, filterMap as Mi, provide$1 as Mn, isInterruptedOnly as Mr, _void as Mt, int as N, format$4 as Na, findFirst$1 as Ni, provideService as Nn, fail$7 as Nr, acquireRelease as Nt, TaggedError as O, right as Oa, drop$1 as Oi, onInterrupt as On, log as Or, nominal as Ot, optional as P, redact as Pa, findFirstIndex as Pi, repeatN as Pn, isFailure as Pr, acquireUseRelease$2 as Pt, unwrapScoped as Q, identity as Qa, reduce$7 as Qi, try_ as Qn, get$9 as Qr, dieMessage as Qt, asyncScoped as R, symbol as Ra, getSomes as Ri, runtime as Rn, make$27 as Rr, as as Rt, Literal as S, some$1 as Sa, isConfigError as Si, mapInputContext as Sn, Equivalence$2 as Sr, succeed$1 as St, Record as T, string$2 as Ta, append$2 as Ti, matchEffect as Tn, tagged as Tr, currentTracerEnabled as Tt, fromReadableStream as U, symbol$1 as Ua, isNonEmptyReadonlyArray as Ui, succeed$3 as Un, getOrDefault as Ur, catchAllCause$1 as Ut, fail as V, hash as Va, isArray as Vi, serviceFunctions as Vn, updateAndGet as Vr, cached as Vt, mapChunks as W, hasProperty as Wa, join$3 as Wi, suspend$6 as Wn, updateAs as Wr, catchAllDefect as Wt, transduce as X, constVoid as Xa, of$2 as Xi, tryMap as Xn, empty$19 as Xr, contextWithEffect as Xt, suspend$1 as Y, constUndefined as Ya, matchRight as Yi, timeout as Yn, of as Yr, context as Yt, unwrap as Z, dual as Za, prepend$2 as Zi, tryPromise as Zn, fromIterable$5 as Zr, die as Zt, fromString as _, isSome as _a, Tag as _i, logError as _n, interrupt$1 as _r, effect$1 as _t, make$1 as a, take$3 as aa, fromIterable$6 as ai, filterOrDieMessage as an, when$2 as ar, embedInput as at, Defect as b, none$4 as ba, merge$1 as bi, mapBoth$1 as bn, succeed$4 as br, provideMerge as bt, defaultLogger as c, map$13 as ca, seconds as ci, fnUntraced as cn, zip$1 as cr, fromEffect as ct, get as d, fromNullable as da, of$1 as di, forkScoped as dn, zipWith as dr, write as dt, some as ea, isEmpty$5 as ei, ensuring$4 as en, __commonJSMin as eo, uninterruptibleMask as er, foldLeftChunks as et, make$3 as f, getOrElse as fa, reduce$6 as fi, gen as fn, DeferredTypeId as fr, spaced as ft, when as g, isOption as ga, Reference as gi, locally as gn, failCause$3 as gr, make$10 as gt, value as h, isNone as ha, GenericTag as hi, isEffect as hn, fail$5 as hr, get$1 as ht, isMailbox as i, tailNonEmpty$1 as ia, add as ii, filter$1 as in, useSpan as ir, acquireUseRelease as it, declare as j, Class$5 as ja, filter$4 as ji, orElseFail as jn, isInterrupted as jr, is as jt, Union as k, pipeArguments as ka, empty$26 as ki, orDie as kn, Scope as kr, decodeSync as kt, prettyLoggerDefault as l, filter$5 as la, appendAll$1 as li, forEach$2 as ln, zipLeft as lr, suspend$2 as lt, orElse as m, getOrUndefined as ma, unsafeFromArray as mi, interruptible as mn, complete as mr, updateContext as mt, make as n, span as na, set$4 as ni, failCause$2 as nn, __require as no, unsafeMakeLatch as nr, fromChannel$1 as nt, toChannel as o, unsafeGet$3 as oa, has$5 as oi, flatMap$4 as on, withFiberRuntime as or, ensuring$1 as ot, updateEffect as p, getOrThrow as pa, toArray$1 as pi, ignore as pn, _await as pr, runFork as pt, runCollect as q, globalValue as qa, match$8 as qi, tapError as qn, cons as qr, catchTag as qt, unsafeAdd as r, splitAt as ra, make$39 as ri, failSync as rn, __toESM as ro, unsafeMakeSemaphore as rr, unwrapScoped$1 as rt, unify as s, getEquivalence$5 as sa, remove$1 as si, flatten$3 as sn, withParentSpan as sr, flatMap as st, join as t, sort as ta, make$36 as ti, fail$4 as tn, __exportAll as to, unlessEffect as tr, forEach as tt, withMinimumLogLevel as u, flatMap$9 as ua, map$11 as ui, forkDaemon as un, zipRight$1 as ur, void_ as ut, Cause as v, map$14 as va, get$13 as vi, logWarning as vn, isDone as vr, mergeAll$1 as vt, NumberFromString as w, mapInput as wa, allocate as wi, matchCauseEffect as wn, TaggedError$1 as wr, currentLoggers as wt, Int as x, orElse$5 as xa, omit$3 as xi, mapError$4 as xn, unsafeDone as xr, scoped$2 as xt, Date$ as y, match$9 as ya, getOption$1 as yi, map$3 as yn, make$15 as yr, provide as yt, bufferChunks as z, cached$1 as za, head$2 as zi, scope as zn, set$2 as zr, asVoid as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1322,6 +1322,15 @@ declare class ValidationXml extends ValidationXml_base<{
|
|
|
1322
1322
|
readonly hint?: string;
|
|
1323
1323
|
readonly cause?: unknown;
|
|
1324
1324
|
}> {}
|
|
1325
|
+
declare const ValidationJson_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1326
|
+
readonly _tag: "ValidationJson";
|
|
1327
|
+
} & Readonly<A>;
|
|
1328
|
+
declare class ValidationJson extends ValidationJson_base<{
|
|
1329
|
+
readonly message?: string;
|
|
1330
|
+
readonly details?: unknown;
|
|
1331
|
+
readonly hint?: string;
|
|
1332
|
+
readonly cause?: unknown;
|
|
1333
|
+
}> {}
|
|
1325
1334
|
declare const ServerError_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1326
1335
|
readonly _tag: "ServerError";
|
|
1327
1336
|
} & Readonly<A>;
|
|
@@ -1493,7 +1502,7 @@ declare class Generic extends Generic_base<{
|
|
|
1493
1502
|
readonly hint?: string;
|
|
1494
1503
|
readonly cause?: unknown;
|
|
1495
1504
|
}> {}
|
|
1496
|
-
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;
|
|
1505
|
+
type CliError = AuthMissing | AuthExpired | AuthDenied | AuthProbe | NetworkTimeout | NetworkDns | NetworkRefused | ValidationFailed | ValidationXml | ValidationJson | ServerError | ResourceNotFound | ConfigMissingApiUrl | ConfigMissingToken | ConfigMigrationFailed | ProfileNotFound | ProfileNoneActive | ProfileInvalidName | WriteRequiresExplicit | UpdateDevEnvironment | UpdateTransientInstall | UpdatePmUnknown | UpdateRegistryUnreachable | UpdateNodeIncompatible | UpdateSpawnFailed | UpdatePermissionDenied | ArgvParse | ChapterNotFound | SkillCorpusEmpty | Generic;
|
|
1497
1506
|
type CliErrorTag = CliError['_tag'];
|
|
1498
1507
|
declare const tagToCode: Record<CliErrorTag, string>;
|
|
1499
1508
|
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-
|
|
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-BLgwEih6.mjs";
|
|
2
2
|
export { codeForTag, defaultGlobalFlags, defaultMessageFor, exitCodeForError, exitCodeForTag, parseGlobalFlags, run, tagToCode, toErrorEnvelope };
|