@arcadiasystems/morse-cli 0.1.0 → 0.2.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,40 @@ 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.2.0] - 2026-06-04
8
+
9
+ Wraps the allowlist + encrypted-file surface from `@arcadiasystems/morse-sdk`
10
+ 0.2.0. Existing publication / collection / entry / cap commands are unchanged.
11
+
12
+ ### Added
13
+
14
+ - `morse allowlist` group: `create`, `add-member`, `remove-member`,
15
+ `transfer-cap`, `delete`, `get`, `list-caps`. The admin Cap is auto-resolved
16
+ from the active account when `--cap` is omitted (mirrors OwnerCap/PublisherCap
17
+ resolution). `transfer-cap` and `delete` confirm unless `--yes`.
18
+ - `morse file` group: `upload` (encrypt with `--allowlist` or `--public`, upload
19
+ to Walrus, and register; prints a seal id for encrypted files), `register`
20
+ (register metadata for a blob already on Walrus), `download` (fetch content,
21
+ decrypting in place for encrypted files via `--seal-id`), `get`, `update`,
22
+ `transfer-ownership`, `delete`.
23
+ - `entry read` / `entry decrypt` / `file download` accept `--via-aggregator` to
24
+ read through the Walrus aggregator HTTP service instead of the storage-node
25
+ protocol (more reliable when nodes are flaky; trades client-side blob
26
+ verification for operator trust).
27
+
28
+ ### Changed
29
+
30
+ - Depends on `@arcadiasystems/morse-sdk` `^0.2.0` (testnet `packageId` updated to
31
+ the contracts v2 deployment).
32
+
33
+ ### Notes
34
+
35
+ - A file's seal id is not recoverable from its ciphertext; save the value
36
+ printed by `file upload` to decrypt later.
37
+ - Listing files accessible by allowlist membership is not exposed (encrypted
38
+ files are shared objects with no owner index); it needs event indexing.
39
+
40
+ ## [0.1.0] - 2026-05-29
8
41
 
9
42
  ### Added
10
43
 
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.2.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,39 @@ 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 get <file>` | Fetch a file's on-chain metadata. |
254
+ | `file update <file> --name <n> --content-type <m>` | Update name and MIME (owner only). |
255
+ | `file transfer-ownership <file> <newOwner> [-y]` | Transfer the metadata right (not decrypt access). |
256
+ | `file delete <file> [-y]` | Delete the metadata record (the Walrus blob expires on its own lease). |
257
+
258
+ Encrypting a file (`file upload -a <allowlist>`) prints a **seal id**. It is not
259
+ recoverable from the ciphertext, so save it: `file download` needs it (via
260
+ `--seal-id`) plus allowlist membership to decrypt. Listing "files I can decrypt
261
+ as a member" is not supported on-chain (encrypted files are shared objects with
262
+ no owner index); track file ids yourself or index the contract events.
263
+
231
264
  ## Output and scripting
232
265
 
233
266
  - Human-readable output goes to stdout; progress, warnings, and prompts go to
@@ -257,6 +290,7 @@ OwnerCap and PublisherCap IDs are auto-resolved from the active account when the
257
290
  - [`encrypt-decrypt.sh`](./examples/encrypt-decrypt.sh): encrypt with Seal and decrypt back.
258
291
  - [`delegation.sh`](./examples/delegation.sh): issue a PublisherCap to a delegate, then revoke it.
259
292
  - [`ci-noninteractive.sh`](./examples/ci-noninteractive.sh): env-var auth, `--yes`, and `--json` parsing.
293
+ - [`files.sh`](./examples/files.sh): allowlist + encrypted file round-trip (create allowlist, add a member, upload, download/decrypt, plus a public file).
260
294
 
261
295
  ## Limitations
262
296
 
@@ -266,6 +300,11 @@ OwnerCap and PublisherCap IDs are auto-resolved from the active account when the
266
300
  retrieved with `entry decrypt`, not `entry read`. A shareable Walrus link is
267
301
  printed by `entry add` (the `viewUrl` field), since the content id is known at
268
302
  upload time.
303
+ - `entry read` and `entry decrypt` default to reading from Walrus storage nodes,
304
+ which verifies the bytes against the on-chain blob id. Pass `--via-aggregator`
305
+ to read through the Walrus aggregator HTTP service instead: more reliable when
306
+ storage nodes are flaky (common on testnet), at the cost of trusting the
307
+ aggregator's bytes (no client-side verification).
269
308
  - Mainnet is not yet deployed; use `testnet`.
270
309
 
271
310
  ## Publishing
@@ -289,6 +328,23 @@ then `npm publish` (the package is `publishConfig.access: public`). `npm publish
289
328
  ships `dist`, `docs`, `README.md`, `LICENSE`, and `CHANGELOG.md` (see the `files`
290
329
  allowlist). Publish the SDK first; the CLI depends on `@arcadiasystems/morse-sdk`.
291
330
 
331
+ ## Development
332
+
333
+ | Command | What it does |
334
+ | --- | --- |
335
+ | `bun run test:unit` | In-process tests only (no subprocesses); ~2s, for a tight edit loop. |
336
+ | `bun run test:cli` | Subprocess CLI-smoke tests (`test/cli/`); spawns the real bin. |
337
+ | `bun test` | The full hermetic suite (unit + CLI smoke), no network. |
338
+ | `bun run typecheck` | `tsc --noEmit`. |
339
+ | `bun run lint` | Biome check. |
340
+ | `bun run coverage` | Run the suite with coverage and enforce the floor. |
341
+ | `bun run check` | Typecheck, lint, and the coverage gate (the CI gate). |
342
+ | `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`. |
343
+
344
+ The test layering, coverage policy, and anti-flake rules are described in
345
+ `CLAUDE.md`. CI runs `check` and `build` on every push and PR that touches the
346
+ package (`.github/workflows/cli-ci.yml`); the live e2e is excluded from CI.
347
+
292
348
  ## License
293
349
 
294
350
  MIT