@arcadiasystems/morse-cli 0.1.0 → 0.3.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/CHANGELOG.md CHANGED
@@ -4,7 +4,69 @@ All notable changes to `@arcadiasystems/morse-cli` are documented here. The
4
4
  format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this
5
5
  project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [0.1.0] - unreleased
7
+ ## [0.3.0] - 2026-06-04
8
+
9
+ Event-based file listing, wrapping the SDK 0.3.0 reconcile helpers. Purely
10
+ additive; all existing commands are unchanged.
11
+
12
+ ### Added
13
+
14
+ - `morse file list`: list files owned by an address (default: the active
15
+ account), or, with `--accessible`, files decryptable via allowlist membership.
16
+ `--address <addr>` queries another address, `--hydrate` fetches the full record
17
+ per file (adds `blobId`; one read each), `--limit <n>` caps results, `--json`
18
+ emits the summary array.
19
+ - Event fetching via `cli/events.ts`: a paginator over `suix_queryEvents` feeding
20
+ the SDK's pure `reconcileFilesOwnedBy` / `reconcileFilesAccessibleBy` helpers.
21
+ `--indexer-url <url>` overrides the event source (any endpoint that speaks
22
+ `suix_queryEvents`).
23
+
24
+ ### Changed
25
+
26
+ - Depends on `@arcadiasystems/morse-sdk` `^0.3.0`.
27
+
28
+ ### Notes
29
+
30
+ - Listing reads `suix_queryEvents`, a deprecated Sui JSON-RPC endpoint Mysten is
31
+ sunsetting; on the public RPC it may degrade over time. Use `--indexer-url` to
32
+ point at your own indexer. Results are best-effort and eventually consistent.
33
+ - Summaries omit `blobId`/`blobObjectId` (not in the `FileCreated` event); use
34
+ `--hydrate` to fetch them.
35
+
36
+ ## [0.2.0] - 2026-06-04
37
+
38
+ Wraps the allowlist + encrypted-file surface from `@arcadiasystems/morse-sdk`
39
+ 0.2.0. Existing publication / collection / entry / cap commands are unchanged.
40
+
41
+ ### Added
42
+
43
+ - `morse allowlist` group: `create`, `add-member`, `remove-member`,
44
+ `transfer-cap`, `delete`, `get`, `list-caps`. The admin Cap is auto-resolved
45
+ from the active account when `--cap` is omitted (mirrors OwnerCap/PublisherCap
46
+ resolution). `transfer-cap` and `delete` confirm unless `--yes`.
47
+ - `morse file` group: `upload` (encrypt with `--allowlist` or `--public`, upload
48
+ to Walrus, and register; prints a seal id for encrypted files), `register`
49
+ (register metadata for a blob already on Walrus), `download` (fetch content,
50
+ decrypting in place for encrypted files via `--seal-id`), `get`, `update`,
51
+ `transfer-ownership`, `delete`.
52
+ - `entry read` / `entry decrypt` / `file download` accept `--via-aggregator` to
53
+ read through the Walrus aggregator HTTP service instead of the storage-node
54
+ protocol (more reliable when nodes are flaky; trades client-side blob
55
+ verification for operator trust).
56
+
57
+ ### Changed
58
+
59
+ - Depends on `@arcadiasystems/morse-sdk` `^0.2.0` (testnet `packageId` updated to
60
+ the contracts v2 deployment).
61
+
62
+ ### Notes
63
+
64
+ - A file's seal id is not recoverable from its ciphertext; save the value
65
+ printed by `file upload` to decrypt later.
66
+ - Listing files accessible by allowlist membership is not exposed (encrypted
67
+ files are shared objects with no owner index); it needs event indexing.
68
+
69
+ ## [0.1.0] - 2026-05-29
8
70
 
9
71
  ### Added
10
72
 
package/README.md CHANGED
@@ -6,7 +6,7 @@ content entries from your terminal, signing with a locally encrypted key.
6
6
  Content is stored on [Walrus](https://walrus.xyz); private entries are encrypted
7
7
  with [Seal](https://github.com/MystenLabs/seal).
8
8
 
9
- > Status: v0.1.0, targeting Sui testnet. The command surface is stable; mainnet
9
+ > Status: v0.3.0, targeting Sui testnet. The command surface is stable; mainnet
10
10
  > support lands when the contracts are frozen.
11
11
 
12
12
  ## Requirements
@@ -187,13 +187,13 @@ and `-C, --collection <name>`, both defaulting to the active context.
187
187
  | Command | Purpose |
188
188
  | --- | --- |
189
189
  | `entry get <entryId> [-P …] [-C …]` | Fetch a single entry's metadata. |
190
- | `entry read <entryId> [revisionIndex] [--out <path>] [-P …] [-C …]` | Fetch a public entry's content to stdout or a file. |
190
+ | `entry read <entryId> [revisionIndex] [--out <path>] [--via-aggregator] [-P …] [-C …]` | Fetch a public entry's content to stdout or a file. |
191
191
  | `entry list [-P …] [-C …]` | List entries (paginated). |
192
192
  | `entry scan [-P …] [-C …]` | List every entry (auto-paginated). |
193
193
  | `entry add <name> --file <path> [-P …] [-C …]` | Upload content and add a new entry; prints a viewable link. |
194
194
  | `entry delete <entryId> [-P …] [-C …]` | Delete an entry. |
195
195
  | `entry add-encrypted <name> --file <path> [-P …] [-C …]` | Encrypt, upload, and add a new entry. |
196
- | `entry decrypt <entryId> [revisionIndex] [--out <path>] [-P …] [-C …]` | Decrypt an encrypted revision. |
196
+ | `entry decrypt <entryId> [revisionIndex] [--out <path>] [--via-aggregator] [-P …] [-C …]` | Decrypt an encrypted revision. |
197
197
 
198
198
  `add`, `add-encrypted`, and the revision commands accept `--file <path>` (or `-`
199
199
  for stdin), `--stdin`, and `--content-type <type>` (inferred from the file
@@ -228,6 +228,49 @@ OwnerCap and PublisherCap IDs are auto-resolved from the active account when the
228
228
  `--owner-cap` / `--publisher-cap` override is omitted. Destructive operations
229
229
  (`delete`, `revoke`, `destroy`, `transfer`) confirm interactively unless `--yes`.
230
230
 
231
+ ### allowlist
232
+
233
+ Per-wallet allowlists gate who can decrypt encrypted files. The admin Cap is
234
+ auto-resolved from the active account when `--cap` is omitted.
235
+
236
+ | Command | Purpose |
237
+ | --- | --- |
238
+ | `allowlist create --name <name>` | Create an allowlist; transfers its admin Cap to you. |
239
+ | `allowlist add-member <addr> -a <id> [--cap <id>]` | Add a wallet that may decrypt. |
240
+ | `allowlist remove-member <addr> -a <id> [--cap <id>]` | Remove a wallet. |
241
+ | `allowlist transfer-cap <recipient> -a <id> [--cap <id>] [-y]` | Hand off admin rights. |
242
+ | `allowlist delete -a <id> [--cap <id>] [-y]` | Delete an allowlist (dependent files become undecryptable). |
243
+ | `allowlist get <id>` | Show an allowlist's name and members. |
244
+ | `allowlist list-caps [address]` | List allowlist admin Caps held by an address. |
245
+
246
+ ### file
247
+
248
+ | Command | Purpose |
249
+ | --- | --- |
250
+ | `file upload <path> --name <n> [-a <id>] [--public] [--content-type <m>] [--epochs <n>]` | Upload to Walrus and register; `-a` encrypts, `--public` is world-readable. |
251
+ | `file register --blob-id <id> --name <n> --content-type <m> --size <bytes> [-a <id>] [--public] [--blob-object-id <id>]` | Register metadata for a blob already on Walrus. |
252
+ | `file download <file> [--out <path>] [--seal-id <hex>] [--via-aggregator]` | Download content; decrypts in place when encrypted. |
253
+ | `file list [--address <addr>] [--accessible] [--hydrate] [--limit <n>] [--indexer-url <url>]` | List files owned by (or, with `--accessible`, decryptable by) an address. |
254
+ | `file get <file>` | Fetch a file's on-chain metadata. |
255
+ | `file update <file> --name <n> --content-type <m>` | Update name and MIME (owner only). |
256
+ | `file transfer-ownership <file> <newOwner> [-y]` | Transfer the metadata right (not decrypt access). |
257
+ | `file delete <file> [-y]` | Delete the metadata record (the Walrus blob expires on its own lease). |
258
+
259
+ Encrypting a file (`file upload -a <allowlist>`) prints a **seal id**. It is not
260
+ recoverable from the ciphertext, so save it: `file download` needs it (via
261
+ `--seal-id`) plus allowlist membership to decrypt.
262
+
263
+ `file list` reconstructs the file set from contract events. Encrypted files are
264
+ shared objects with no on-chain owner index, so listing is event-derived, not a
265
+ direct query. By default the command reads events via `suix_queryEvents` on the
266
+ configured Sui RPC. That endpoint is **deprecated** (Mysten is sunsetting it), so
267
+ listing may degrade or stop working on the public RPC over time; point
268
+ `--indexer-url <url>` at any source that speaks `suix_queryEvents` (a self-hosted
269
+ indexer, a third-party endpoint) to stay in control. Results are best-effort and
270
+ eventually consistent (subject to indexer lag and retention). `EncryptedFileSummary`
271
+ rows omit `blobId`/`blobObjectId`; add `--hydrate` to fetch the full record per
272
+ file (one read each) when you need them.
273
+
231
274
  ## Output and scripting
232
275
 
233
276
  - Human-readable output goes to stdout; progress, warnings, and prompts go to
@@ -257,6 +300,7 @@ OwnerCap and PublisherCap IDs are auto-resolved from the active account when the
257
300
  - [`encrypt-decrypt.sh`](./examples/encrypt-decrypt.sh): encrypt with Seal and decrypt back.
258
301
  - [`delegation.sh`](./examples/delegation.sh): issue a PublisherCap to a delegate, then revoke it.
259
302
  - [`ci-noninteractive.sh`](./examples/ci-noninteractive.sh): env-var auth, `--yes`, and `--json` parsing.
303
+ - [`files.sh`](./examples/files.sh): allowlist + encrypted file round-trip (create allowlist, add a member, upload, download/decrypt, plus a public file).
260
304
 
261
305
  ## Limitations
262
306
 
@@ -266,6 +310,11 @@ OwnerCap and PublisherCap IDs are auto-resolved from the active account when the
266
310
  retrieved with `entry decrypt`, not `entry read`. A shareable Walrus link is
267
311
  printed by `entry add` (the `viewUrl` field), since the content id is known at
268
312
  upload time.
313
+ - `entry read` and `entry decrypt` default to reading from Walrus storage nodes,
314
+ which verifies the bytes against the on-chain blob id. Pass `--via-aggregator`
315
+ to read through the Walrus aggregator HTTP service instead: more reliable when
316
+ storage nodes are flaky (common on testnet), at the cost of trusting the
317
+ aggregator's bytes (no client-side verification).
269
318
  - Mainnet is not yet deployed; use `testnet`.
270
319
 
271
320
  ## Publishing
@@ -289,6 +338,23 @@ then `npm publish` (the package is `publishConfig.access: public`). `npm publish
289
338
  ships `dist`, `docs`, `README.md`, `LICENSE`, and `CHANGELOG.md` (see the `files`
290
339
  allowlist). Publish the SDK first; the CLI depends on `@arcadiasystems/morse-sdk`.
291
340
 
341
+ ## Development
342
+
343
+ | Command | What it does |
344
+ | --- | --- |
345
+ | `bun run test:unit` | In-process tests only (no subprocesses); ~2s, for a tight edit loop. |
346
+ | `bun run test:cli` | Subprocess CLI-smoke tests (`test/cli/`); spawns the real bin. |
347
+ | `bun test` | The full hermetic suite (unit + CLI smoke), no network. |
348
+ | `bun run typecheck` | `tsc --noEmit`. |
349
+ | `bun run lint` | Biome check. |
350
+ | `bun run coverage` | Run the suite with coverage and enforce the floor. |
351
+ | `bun run check` | Typecheck, lint, and the coverage gate (the CI gate). |
352
+ | `bun run test:e2e` | Live testnet lifecycle. Opt-in: needs `MORSE_PRIVATE_KEY` (or `.env.testnet`) funded with testnet SUI and WAL. Set `MORSE_E2E_AGGREGATOR=1` to route the read steps through `--via-aggregator`. |
353
+
354
+ The test layering, coverage policy, and anti-flake rules are described in
355
+ `CLAUDE.md`. CI runs `check` and `build` on every push and PR that touches the
356
+ package (`.github/workflows/cli-ci.yml`); the live e2e is excluded from CI.
357
+
292
358
  ## License
293
359
 
294
360
  MIT