@tinycloud/cli 1.2.0-beta.2 → 1.2.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 +23 -1
- package/dist/index.js +319 -48
- package/dist/index.js.map +1 -1
- package/dist/legacy-entry.js +1700 -638
- package/dist/legacy-entry.js.map +1 -1
- package/package.json +5 -5
- package/skills/tc-cli/REFERENCE.md +28 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinycloud/cli",
|
|
3
|
-
"version": "1.2.0-beta.
|
|
3
|
+
"version": "1.2.0-beta.3",
|
|
4
4
|
"description": "TinyCloud CLI - manage data, delegations, and nodes from the terminal",
|
|
5
5
|
"author": "TinyCloud, Inc.",
|
|
6
6
|
"license": "EGPL",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@tinycloud/share-sdk": "1.1.0",
|
|
33
33
|
"@tinycloud/share-envelope": "1.1.0",
|
|
34
|
-
"@tinycloud/node-sdk": "3.2.0-beta.
|
|
34
|
+
"@tinycloud/node-sdk": "3.2.0-beta.3",
|
|
35
35
|
"@tinycloud/node-sdk-wasm": "1.7.7",
|
|
36
|
-
"@tinycloud/sdk-core": "3.2.0-beta.
|
|
37
|
-
"@tinycloud/operations": "0.5.0-beta.
|
|
36
|
+
"@tinycloud/sdk-core": "3.2.0-beta.3",
|
|
37
|
+
"@tinycloud/operations": "0.5.0-beta.3",
|
|
38
38
|
"chalk": "^5.3.0",
|
|
39
39
|
"commander": "^14.0.0",
|
|
40
40
|
"open": "^11.0.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"siwe": "^3.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@tinycloud/replica": "0.1.0",
|
|
45
|
+
"@tinycloud/replica": "0.1.1-beta.0",
|
|
46
46
|
"@types/node": "^20",
|
|
47
47
|
"tsup": "^8.0.0",
|
|
48
48
|
"typescript": "^5.9.3"
|
|
@@ -5,7 +5,7 @@ This release has **Commander coverage tracked, not complete parity**:
|
|
|
5
5
|
|
|
6
6
|
- 2 migrated registration(s).
|
|
7
7
|
- 1 partially migrated registration(s).
|
|
8
|
-
-
|
|
8
|
+
- 128 legacy registration(s) remain Commander-owned.
|
|
9
9
|
|
|
10
10
|
- `auth import [source]` → `tinycloud.auth.import@1` (partial; legacy inputs: v1 delegation artifact, v1 permission artifact without command, bare portable delegation, stored delegation wrapper, cross-user delegation persisted with activated=false).
|
|
11
11
|
- `secrets get <name>` → `tinycloud.secrets.get@1` (migrated).
|
|
@@ -26,6 +26,8 @@ This release has **Commander coverage tracked, not complete parity**:
|
|
|
26
26
|
| `-q, --quiet` | Suppress non-essential output |
|
|
27
27
|
| `--no-cache` | Disable caching |
|
|
28
28
|
| `--json` | Force machine-readable output |
|
|
29
|
+
| `--replication` / `--no-replication` | Enable/disable read-through replication for this invocation; `TC_REPLICATION=1` enables it by default, with command flags taking precedence |
|
|
30
|
+
| `--replication-debug` | Write per-read, write and sync diagnostics to stderr |
|
|
29
31
|
|
|
30
32
|
## Context and Login
|
|
31
33
|
|
|
@@ -45,6 +47,8 @@ tc --profile publisher context --json
|
|
|
45
47
|
| `--expiry <duration>` | Session lifetime (`1h`, `7d`, milliseconds; at least `1m`) counted from approval; ISO dates are refused because OpenKey signs approval time plus a lifetime. Enforced against the signed session on every login path. Device login: at most `30d`, default `30d` |
|
|
46
48
|
| `--owner <did>` | Refuse approval by any identity other than this `did:pkh`; must agree with an owner the profile already recorded. OpenKey preselects that owner's key, so this is how to sign in with a key that is not the account's primary key; it works on a plain login without `--manifest` too. Also names the secrets owner for a manifest's `secrets` when the profile has no recorded owner |
|
|
47
49
|
| `--replace-session` | Scoped or device login: replace a live session the new scope would narrow, change or shorten (otherwise `SESSION_IN_USE`); renewals and widenings that last at least as long need no flag |
|
|
50
|
+
| `--replication-prefix <prefix>` | Repeatable login request; adds `get` + `sync` only when an unrestricted covering `get` is already requested. Saves prefixes on the profile and reapplies them on later logins and rotation |
|
|
51
|
+
| `--replication-allow-secrets` | Explicitly allow prefixes in the `secrets` space or `vault` tree; replication stores ciphertext only |
|
|
48
52
|
| `--method openkey\|local` | Browser OpenKey flow or local Ethereum key |
|
|
49
53
|
| `--paste`, `--no-popup` | Browser flow without a local callback / without opening a browser. `--paste` reads the owner's code from stdin (newline-terminated; a final unterminated line is accepted); stdin ending without a code fails with `PASTE_CODE_MISSING` (exit 3) naming the approval URL |
|
|
50
54
|
|
|
@@ -240,6 +244,29 @@ tc --profile device replica reset [--purge]
|
|
|
240
244
|
- Exit codes: 0 ok; 1 busy, runtime or storage error; 2 usage, `NOT_COVERED`, `SECRETS_OPT_IN_REQUIRED`; 3 grant missing; 4 key absent, deleted, content missing or coverage incomplete; 5 grant expired, revoked or not yet valid; 6 network; 7 node, protocol or integrity error (`SOURCE_CHANGED`, `SCOPE_VIOLATION`, `CONTENT_MISMATCH`); 10 storage full.
|
|
241
245
|
- Store: `profiles/<profile>/replicas/<name>/` (honours `TC_HOME`): `replica.db` (SQLite WAL, `synchronous=FULL`; each feed page and its cursor commit in one transaction) and content-addressed `blobs/`, directories 0700 and files 0600. Only one process syncs a replica at a time (`REPLICA_BUSY`); a process whose sync lease expired or was taken over writes nothing more. `reset --purge` removes the replica only under a live lease on the database it opened, so it never removes a replica another process took over or recreated. A node answer `410 RESET_REQUIRED` resets the replica in place and re-bootstraps from the same source; `status.lastReset` records it. A feed from a different node is `SOURCE_CHANGED` until `tc replica reset` clears the pin. A profile deleted before or while any `tc replica` command runs ends it with `REPLICA_NOT_FOUND`; nothing is written into the profile and it is never recreated.
|
|
242
246
|
|
|
247
|
+
## Read-through Replication Diagnostics
|
|
248
|
+
|
|
249
|
+
`--replication` enables the read-through adapter for one command;
|
|
250
|
+
`--no-replication` overrides `TC_REPLICATION=1`. It is off by default.
|
|
251
|
+
`--replication-debug` (or `TC_REPLICATION_DEBUG=1`) writes per-read, write
|
|
252
|
+
and sync details to stderr. The event log is
|
|
253
|
+
`profiles/<profile>/replication/events.jsonl` under `TC_HOME`; it records
|
|
254
|
+
operational metadata, not values.
|
|
255
|
+
|
|
256
|
+
`tc replica report [--since 24h]` renders read source/reason counts, hit ratio,
|
|
257
|
+
latency and staleness percentiles, sync/write outcomes, recent divergences,
|
|
258
|
+
replica/grant status, and pinned keys. `--json` emits the aggregate as JSON.
|
|
259
|
+
`--clear-pending` clears pending replica writes and prints a warning: commits
|
|
260
|
+
that arrive later can be observed as stale until a subsequent sync.
|
|
261
|
+
`auth logout` purges legacy and flag-owned replicas unless `--keep-replicas`
|
|
262
|
+
is used.
|
|
263
|
+
|
|
264
|
+
B-int release acceptance: test `tc auth request --grant` against a real
|
|
265
|
+
OpenKey test account without production writes. Approve the request, confirm
|
|
266
|
+
the grant is stored, start a fresh process, and verify saved prefixes are
|
|
267
|
+
replayed and the covered read is served locally. If explicit `kv/get` plus
|
|
268
|
+
`sync` is rejected, stop before release and resolve the protocol contract.
|
|
269
|
+
|
|
243
270
|
## Node Health
|
|
244
271
|
|
|
245
272
|
```bash
|