@moxt-ai/cli 0.9.0-beta.1 → 0.9.0-beta.3

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
@@ -31,7 +31,9 @@ configured service manager and updates its absolute Node and CLI paths. Active
31
31
  Jobs are reported before the restart and recover as interrupted with
32
32
  `daemon_restarted`. A foreground `moxt machine daemon` process is never
33
33
  restarted automatically. Updates performed by Homebrew, a package manager, or
34
- the standalone installer are reconciled on the new CLI's next normal command.
34
+ the standalone installer are reconciled on the new CLI's next normal command
35
+ when it uses the managed service's recorded stable launcher path. A different
36
+ CLI installation cannot take over the service automatically.
35
37
 
36
38
  If the CLI installation succeeds but the Connector refresh fails, the CLI
37
39
  update remains successful. Moxt validates the new CLI entrypoint before changing
@@ -39,6 +41,12 @@ the service and restores the prior service definition when a refresh cannot be
39
41
  completed. It reports the failed refresh stage on stderr; run `moxt machine
40
42
  service restart` after correcting the reported problem.
41
43
 
44
+ CLI invocations inside a Local Machine Job never reconcile or mutate the
45
+ Connector carrying that Job. Status, logs, doctor, and other safe queries remain
46
+ available. Isolated daemon development remains available by assigning a
47
+ dedicated `MOXT_MACHINE_HOME`; its runtime, socket, locks, logs, and service
48
+ configuration must not be shared with the carrying Connector.
49
+
42
50
  ```bash
43
51
  moxt upgrade # Check, install, verify the PATH version
44
52
  moxt upgrade --check # Refresh and report the current channel only
@@ -152,6 +160,10 @@ moxt file read -w <workspace-id> --teammate-id <teammateId> -p <path>
152
160
  # Read file content by URL
153
161
  moxt file read --url <moxt-url>
154
162
 
163
+ # Read file content and metadata as JSON (path or URL mode)
164
+ moxt file read -w <workspace-id> -p <path> --json
165
+ moxt file read --url <moxt-url> --json
166
+
155
167
  # Resolve the shareable browser URL for a file by path
156
168
  moxt file get-url -w <workspace-id> -p <path>
157
169
 
@@ -312,12 +324,38 @@ Workflow status type values are `1=todo`, `2=in-progress`, and `3=done`.
312
324
  | `--teammate-id <id>` | Teammate ID (teammate space) |
313
325
  | `-p, --path <path>` | File or directory path |
314
326
  | `-u, --url <url>` | Moxt file URL (e.g., `https://moxt.ai/w/{workspaceId}/{fileId}`) |
327
+ | `--json` | Emit `file read` content and metadata as JSON |
315
328
  | `-l, --local-path <path>` | Local file path (for upload) |
316
329
  | `-r, --recursive` | Create parent directories if needed (path mode only) |
317
330
 
318
331
  > **Note**: `-s`, `--personal`, `--team-space-id`, and `--teammate-id` are mutually exclusive.
319
332
  > For `file read` and `file put`, use either `--url` or `--workspace` with `--path`. They are mutually exclusive.
320
333
  > `--url` with `file put` overwrites an existing file identified by the URL; it never creates new files. Use `--recursive` is not allowed in URL mode.
334
+
335
+ #### `file read` output
336
+
337
+ Without `--json`, a successful `file read` writes only the file content to stdout. With
338
+ `--json`, success writes exactly one JSON object to stdout using this shape:
339
+
340
+ ```json
341
+ {"path":"/notes/today.md","type":"file","entries":null,"content":"Hello\n","updatedAt":1785830950000}
342
+ ```
343
+
344
+ `updatedAt` is always a non-null Unix epoch-millisecond integer for a successful JSON
345
+ read. JSON mode writes no progress or color sequences.
346
+
347
+ Every `file read --json` failure exits with status 1, leaves stdout empty, and writes
348
+ exactly one uncolored JSON object to stderr:
349
+
350
+ ```json
351
+ {"error":{"code":"not_found","message":"/missing.md does not exist","status":404,"details":{"message":"not found"}}}
352
+ ```
353
+
354
+ The `error` object always contains `code`, `message`, `status`, and `details`. `status`
355
+ is the HTTP status for API responses and `null` for local or protocol failures;
356
+ `details` is the API response body when available and otherwise `null`. Stable error
357
+ codes are `invalid_arguments`, `configuration_error`, `authentication_failed`,
358
+ `not_found`, `not_a_file`, `api_error`, and `request_failed`.
321
359
  > `file get-url` returns a stable Moxt URL (e.g., `https://moxt.ai/w/{workspaceId}/{fileId}`) for the given path; the URL is unchanged across writes to the same path and can be fed back into `file read --url` or `file put --url`.
322
360
 
323
361
  ## Configuration