@mx-space/cli 0.8.0 → 0.9.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 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
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { t as run } from "../mxs-DT0oYk6U.mjs";
2
+ import { t as run } from "../mxs-BR5Y5ash.mjs";
3
3
  export { run };
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-DT0oYk6U.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-BR5Y5ash.mjs";
2
2
  export { codeForTag, defaultGlobalFlags, defaultMessageFor, exitCodeForError, exitCodeForTag, parseGlobalFlags, run, tagToCode, toErrorEnvelope };