@tinycloud/cli 1.3.0-beta.5 → 1.3.0-beta.7
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 +77 -13
- package/dist/index.js +13253 -10366
- package/dist/index.js.map +1 -1
- package/dist/legacy-entry.js +20662 -26128
- package/dist/legacy-entry.js.map +1 -1
- package/package.json +7 -6
- package/skills/tc-cli/REFERENCE.md +45 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinycloud/cli",
|
|
3
|
-
"version": "1.3.0-beta.
|
|
3
|
+
"version": "1.3.0-beta.7",
|
|
4
4
|
"description": "TinyCloud CLI - manage data, delegations, and nodes from the terminal",
|
|
5
5
|
"author": "TinyCloud, Inc.",
|
|
6
6
|
"license": "EGPL",
|
|
@@ -33,10 +33,11 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@tinycloud/share-sdk": "1.1.1",
|
|
35
35
|
"@tinycloud/share-envelope": "1.1.0",
|
|
36
|
-
"@tinycloud/node-sdk": "3.
|
|
36
|
+
"@tinycloud/node-sdk": "3.3.0-beta.7",
|
|
37
37
|
"@tinycloud/node-sdk-wasm": "1.7.7",
|
|
38
|
-
"@tinycloud/sdk-core": "3.
|
|
39
|
-
"@tinycloud/
|
|
38
|
+
"@tinycloud/sdk-core": "3.3.0-beta.7",
|
|
39
|
+
"@tinycloud/sdk-services": "3.3.0-beta.7",
|
|
40
|
+
"@tinycloud/operations": "0.6.1-beta.7",
|
|
40
41
|
"chalk": "^5.3.0",
|
|
41
42
|
"commander": "^14.0.0",
|
|
42
43
|
"open": "^11.0.0",
|
|
@@ -44,8 +45,8 @@
|
|
|
44
45
|
"siwe": "^3.0.0"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
|
-
"@tinycloud/courier": "0.1.6-beta.
|
|
48
|
-
"@tinycloud/replica": "0.
|
|
48
|
+
"@tinycloud/courier": "0.1.6-beta.7",
|
|
49
|
+
"@tinycloud/replica": "0.3.0-beta.4",
|
|
49
50
|
"@types/node": "^20",
|
|
50
51
|
"tsup": "^8.0.0",
|
|
51
52
|
"typescript": "^5.9.3"
|
|
@@ -57,7 +57,7 @@ TC="${TC_BIN:-$HOME/.local/share/tinycloud/cli/node_modules/.bin/tinycloud}" #
|
|
|
57
57
|
| `--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 |
|
|
58
58
|
| `--replication-allow-secrets` | Explicitly allow prefixes in the `secrets` space or `vault` tree; replication stores ciphertext only |
|
|
59
59
|
| `--method openkey\|local` | Browser OpenKey flow or local Ethereum key |
|
|
60
|
-
| `--paste`, `--no-popup` |
|
|
60
|
+
| `--paste`, `--no-popup` | `--paste` waits up to five minutes for the one-line OpenKey signed code on stdin; `--no-popup` only prints the approval URL. An interactive CLI accepts paste if a browser callback is blocked. Safari, and Chromium browsers enforcing Local Network Access without granting it (including headless Chromium), may require paste for replica-enabled prepared-SIWE login because HTTPS-to-HTTP loopback is blocked. Non-TTY `--no-popup` cannot accept paste: if callback fails it expires nonzero with a `--paste` retry hint; the old signed code cannot be reused. An EOF in `--paste` mode returns `PASTE_CODE_MISSING` without saving a key or session. Ctrl-C, SIGINT or SIGTERM before the signed code arrives cancels the OpenKey handoff (best effort) and exits 130 `CANCELLED`. |
|
|
61
61
|
|
|
62
62
|
Device login JSON lists the signed, approved `permissions`, owner-unchecked `declined` capabilities, `ownerDid`, `spaceId` and `expiresAt`. `tinycloud auth request --manifest FILE --grant --device` adds another space to a logged-in profile the same way (default lifetime 7d). `tinycloud enable share [--replace-session]` is shorthand for device login with `builtin:share-publishing`. OpenKey refuses `tinycloud.sql` and other abilities outside its device policy; use browser login (`--method openkey --manifest`) for those. Non-interactive browser login without `--paste` or `--no-popup` fails fast with `INTERACTIVE_LOGIN_REQUIRED`. Only an explicit `--host` is stored on the profile. Errors: `MANIFEST_REQUIRED`, `SCOPE_REJECTED` (OpenKey refused a capability; the message names it), `SESSION_IN_USE` (the request or the approved scope would narrow a live session; use a new profile or `--replace-session`), `PROFILE_CHANGED_DURING_LOGIN` (another login, key rotation or logout changed the profile while approval was pending; nothing saved), `PROFILE_STATE_INCONSISTENT` (profile, key and session disagree after an interrupted write; `--replace-session` or a new profile), `PROFILE_LOCK_TIMEOUT` (another process held the profile lock past 45 s), `LOCAL_OWNER_PROFILE` (scoped or device login on a local-owner-key profile; use a separate profile), `OPENKEY_UNREACHABLE`, `DEVICE_AUTH_DENIED`, `DEVICE_AUTH_EXPIRED`, `DEVICE_AUTH_BINDING_MISMATCH` (OpenKey's approval metadata disagrees with the signed grant), `OPENKEY_OWNER_MISMATCH`, `OPENKEY_GRANT_BROADENED`, `OPENKEY_EXPIRY_EXCEEDED` (the signed session outlives `--expiry`). Owner addresses compare case-insensitively (EIP-55 or lowercase); chain id and space name compare exactly. See [AUTH.md](AUTH.md).
|
|
63
63
|
|
|
@@ -92,6 +92,12 @@ No `del` anywhere and no `list` on the bearer prefix: no `tinycloud share` comma
|
|
|
92
92
|
|
|
93
93
|
Actions are auto-prefixed with `tinycloud.` if not already.
|
|
94
94
|
|
|
95
|
+
`delegation revoke <cid>` is a generic exact-CID operation. When `<cid>` is
|
|
96
|
+
the current sign-in session, it requires `--yes` or an interactive confirmation
|
|
97
|
+
warning that revocation signs you out. After the node confirms that exact CID,
|
|
98
|
+
the CLI runs its normal durable logout, removes the restorable session and key,
|
|
99
|
+
and blocks implicit reauthentication. Unrelated CIDs do not sign you out.
|
|
100
|
+
|
|
95
101
|
`tinycloud auth import` stores delegations in `additional-delegations.json`. Every replay path installs only a grant with a locally verified proof and a binding containing its signed authority; unbound and proof-less grants never install, including while migration is deferred. [AUTH.md](AUTH.md#imported-delegations-and-their-request-bindings) covers migration and recovery.
|
|
96
102
|
|
|
97
103
|
### Stored grants
|
|
@@ -104,6 +110,10 @@ Actions are auto-prefixed with `tinycloud.` if not already.
|
|
|
104
110
|
|
|
105
111
|
`list` is local and does not contact the node. Its JSON contains `profile`, `session` (`cid` recomputed from stored header and `expiresAt`, or `null`), `localVerification` (`available`, `session_missing`, `session_expired`, `session_invalid`), and `grants`. Each indexed grant row contains `cid` (CID-shaped or `null`), `expiry`, `expired`, `local` (`verified`, `refused`, `not_checked`, `for_another_key`), `reason` (fixed skip code or `null`), `node: "not_checked"`, `bound`, `proof` (`siwe`, `compact`, `missing`, or `null`), `source`, `scope`, and `scopeSource` (`signed` or `stored`). `for_another_key` means the stored audience names another key; its scope is unverified stored metadata and it cannot install in this session. Local verification checks signed scope and binding, not the node's delegation chain or revocation status. Human output shows `CID | LOCAL | EXPIRES | SOURCE | BOUND | SCOPE` and the session CID.
|
|
106
112
|
|
|
113
|
+
The `session` JSON object has `label: "current session"` for the active CID;
|
|
114
|
+
human output marks that CID `(current session)`. Do not treat the session CID
|
|
115
|
+
as a disposable replica child grant.
|
|
116
|
+
|
|
107
117
|
`for_another_key` is decided from a verified signed compact audience, CID, and matching transport DID, not an unsigned `delegateDID` alone. Tampered records retain their refusal reason, and proofless records retain `proof_missing`.
|
|
108
118
|
|
|
109
119
|
Local `remove` deletes every row matching that exact CID, and is available to delegates. `--revoke` alone is owner-only: it uses normal verified local-node discovery unless a host is explicit, revokes on the node, and removes the rows only after success. If the local removal then fails, `GRANT_REVOKED_LOCAL_REMOVE_FAILED` directs a local-only retry without `--revoke`. OpenKey cannot sign raw `urn:cid` authority on the deployed version; owner OpenKey revocation uses a verified CID-bound owner-space fallback, or immediately fails `RAW_RECAP_RESOURCE_UNSUPPORTED`. Local removal does not revoke the delegation; delegated sessions cannot use `--revoke` because this SDK cannot issue a delegatee self-revocation.
|
|
@@ -279,8 +289,40 @@ equivalent yet (TC-1309).
|
|
|
279
289
|
On macOS and Windows, `replica reset --purge` and `auth logout` with a legacy
|
|
280
290
|
`replicas/` tree refuse local removal rather than delete through an unpinned
|
|
281
291
|
path. The existing files are retained.
|
|
282
|
-
`auth logout`
|
|
283
|
-
|
|
292
|
+
`auth logout` durably denies local replica reads, removes legacy and flag-owned
|
|
293
|
+
files, and shreds both restorable session and key. A pending marker keeps reads
|
|
294
|
+
denied while startup retries erasure. A signed-out profile cannot implicitly
|
|
295
|
+
authenticate with its stored owner key; use explicit `auth login` for a new
|
|
296
|
+
session. An unknown replica path, an unverified legacy SQLite schema, or an
|
|
297
|
+
unreadable gate refuses logout before a marker, credential deletion or node
|
|
298
|
+
request. Sync first, or pass `--discard-local-changes` to approve the displayed
|
|
299
|
+
paths, types and file identities. New or changed entries need fresh approval.
|
|
300
|
+
With a verified local-owner key, `auth logout --revoke --discard-local-changes`
|
|
301
|
+
preserves session, key and physical replicas through every online exact-CID
|
|
302
|
+
receipt; partial failure leaves them behind a durable denied marker for retry.
|
|
303
|
+
After a failed revoke, plain logout compares the original approved inventory
|
|
304
|
+
first. Changed paths refuse even with `--discard-local-changes`, retain all
|
|
305
|
+
credentials and files, and print a 32-hex-character token. A separate
|
|
306
|
+
`auth logout --discard-local-changes --approve-inventory <token>` approves
|
|
307
|
+
only the newly displayed identities; further changes invalidate the token.
|
|
308
|
+
After full remote success, cleanup shreds credentials and erases only approved
|
|
309
|
+
entries. A later inventory mismatch retains the marker and remaining files;
|
|
310
|
+
repeat `auth logout --discard-local-changes` for fresh approval without
|
|
311
|
+
repeating node revocations. OpenKey
|
|
312
|
+
owner revocation currently fails closed with `REVOCATION_AUTHORITY_UNAVAILABLE`,
|
|
313
|
+
retaining credentials and denied replica files until signed owner revoke
|
|
314
|
+
authority is supported.
|
|
315
|
+
When the replica gate belongs to a different account than the signed-in
|
|
316
|
+
session, logout signs that session out and removes only the profile's legacy
|
|
317
|
+
`replicas/` tree; the other account's gate and flag-owned replicas stay. An
|
|
318
|
+
interrupted earlier sign-out is reported, and a second `auth logout` completes
|
|
319
|
+
it. A gate that no longer matches its logout record (for example, restored
|
|
320
|
+
from an older copy) refuses logout; run `tc profile delete <name>` (after
|
|
321
|
+
`tc profile switch <other>` if it is the default) and sign in again.
|
|
322
|
+
|
|
323
|
+
`--keep-replicas` retains legacy files only when no replica gate, flag-owned
|
|
324
|
+
partition or pending purge exists; gated profiles refuse before mutation and
|
|
325
|
+
legacy-only keep still shreds credentials.
|
|
284
326
|
|
|
285
327
|
B-int release acceptance: test `tinycloud auth request --grant` against a real
|
|
286
328
|
OpenKey test account without production writes. Approve the request, confirm
|