@mx-space/cli 0.4.1 → 0.5.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
@@ -324,6 +324,41 @@ Page edit and page file payloads currently reuse the `<mxpost>` envelope shape.
324
324
  | `--description <text>` | `description` |
325
325
  | `--icon <text>` | `icon` |
326
326
 
327
+ ## Comments
328
+
329
+ Moderation commands for the comment queue. `state` is one of `unread`, `read`, or `junk` (server-side codes `0`, `1`, `2`).
330
+
331
+ | Command | Description |
332
+ | -------------------------------------- | ----------------------------------------------------------------- |
333
+ | `mxs comment list` | List comments (default `--state unread`). |
334
+ | `mxs comment unread` | Shortcut for `comment list --state unread` (accepts `--page` / `--size`). |
335
+ | `mxs comment get <id>` | Show a single comment by id. |
336
+ | `mxs comment approve <id...>` | Mark one or more comments as read (state→1). |
337
+ | `mxs comment reject <id...>` | Mark one or more comments as junk (state→2). |
338
+ | `mxs comment delete <id...>` | Soft-delete one or more comments. |
339
+
340
+ ### Comment List Flags
341
+
342
+ | Flag | Description |
343
+ | ----------------------------- | -------------------------------------------------------------------------- |
344
+ | `--page <n>` / `--size <n>` | Standard paging knobs. |
345
+ | `--state <unread|read|junk>` | Filter by state. Defaults to `unread`. |
346
+ | `--all` | Aggregate every state into one response (issues three parallel requests). |
347
+
348
+ ### Comment Moderation Flags
349
+
350
+ | Flag | Applies to | Description |
351
+ | ----------------------------- | ----------------------- | -------------------------------------------------------------------------- |
352
+ | `--all` | approve, reject, delete | Apply to every comment instead of the explicit `<id...>` list. |
353
+ | `--state <unread|read|junk>` | approve, reject, delete | When used with `--all`, restricts the affected set by current state. |
354
+ | `--force` | delete, any `--all` | Required in non-TTY contexts to confirm destructive operations. |
355
+
356
+ Guard summary:
357
+
358
+ - `delete` of a single id refuses to run in a non-TTY context without `--force`.
359
+ - Any `--all` invocation (`approve`, `reject`, `delete`) refuses to run in a non-TTY context without `--force`.
360
+ - `approve` and `reject` of explicit ids run without confirmation.
361
+
327
362
  ## Configuration
328
363
 
329
364
  | Command | Description |
package/ROADMAP.md CHANGED
@@ -8,7 +8,17 @@
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
- ## v2
11
+ ## Next — Comment moderation
12
+
13
+ - `mxs comment list [--page N] [--size N] [--state unread|read|junk] [--all]`
14
+ - `mxs comment get <id>`
15
+ - `mxs comment approve <id...> | --all [--state <s>]`
16
+ - `mxs comment reject <id...> | --all [--state <s>]`
17
+ - `mxs comment delete <id...> | --all [--state <s>] [--force]`
18
+
19
+ 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.
20
+
21
+ ## v2 — AI
12
22
 
13
23
  > **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.
14
24
 
@@ -17,12 +27,6 @@
17
27
  - `mxs ai translate <id> --to <locale>`
18
28
  - `mxs ai insights refresh`
19
29
  - `mxs ai tokens`
20
- - Comment moderation
21
- - `mxs comment list`
22
- - `mxs comment approve <id>`
23
- - `mxs comment reject <id>`
24
- - `mxs comment delete <id>`
25
- - Markdown → Lexical bridge (contingent on a haklex reader)
26
30
 
27
31
  ## v3
28
32
 
package/dist/bin/mxs.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { t as run } from "../mxs-D9X72Mkv.mjs";
2
+ import { t as run } from "../mxs-Dsh_ZkeN.mjs";
3
3
  export { run };
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-D9X72Mkv.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-Dsh_ZkeN.mjs";
2
2
  export { codeForTag, defaultGlobalFlags, defaultMessageFor, exitCodeForError, exitCodeForTag, parseGlobalFlags, run, tagToCode, toErrorEnvelope };