@tinycloud/cli 1.3.0-beta.6 → 1.3.0-beta.8
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 +20642 -26235
- package/dist/legacy-entry.js.map +1 -1
- package/package.json +7 -6
- package/skills/tc-cli/REFERENCE.md +45 -3
package/README.md
CHANGED
|
@@ -171,23 +171,87 @@ whole space. Whole-space replication requires `kv-sync-root` support and
|
|
|
171
171
|
`--replication-allow-secrets`, because it includes `vault/`. Replication needs
|
|
172
172
|
unrestricted `get` and explicit `sync` on that folder or broader; an exact-key
|
|
173
173
|
grant never qualifies. Bare replica prefixes are rejected; use `notes/`.
|
|
174
|
+
|
|
175
|
+
An explicit local-owner sign-in saves the verified replica lifecycle stamp with
|
|
176
|
+
its session; later CLI processes validate that stamp before local reads. Without
|
|
177
|
+
it, network sign-in and KV reads still work, but local replica reads stay gated
|
|
178
|
+
until a new verified sign-in. A gated root prefix does not imply `kv-sync-root`
|
|
179
|
+
support.
|
|
180
|
+
|
|
181
|
+
Replica-enabled OpenKey login uses the SDK-prepared SIWE approval URL, not the
|
|
182
|
+
older browser-created session. Specify `--owner did:pkh:eip155:CHAIN:ADDRESS`
|
|
183
|
+
unless this profile already has a verified owner session. The CLI verifies the
|
|
184
|
+
signed result before saving its new key, session and replica stamp. Safari, and
|
|
185
|
+
Chromium browsers that enforce Local Network Access without granting it (headless
|
|
186
|
+
Chromium cannot show the prompt), may block the HTTPS page's plain-HTTP loopback
|
|
187
|
+
callback: use an interactive CLI terminal and paste the same one-line code shown
|
|
188
|
+
by OpenKey, or start with
|
|
189
|
+
`tc auth login --method openkey --replication-prefix notes/ --owner DID --paste`
|
|
190
|
+
for a headless terminal. Non-TTY `--no-popup` cannot accept a paste; if that
|
|
191
|
+
callback fails, it exits nonzero at the five-minute expiry with a `--paste`
|
|
192
|
+
retry hint and discards the candidate key. Restarting requires a new approval
|
|
193
|
+
and cannot reuse the old signed code. Ctrl-C, SIGINT or SIGTERM before approval
|
|
194
|
+
arrives cancels the OpenKey handoff (best effort) and exits 130 `CANCELLED`
|
|
195
|
+
without saving a key or session.
|
|
196
|
+
|
|
174
197
|
Use `tc replica report` for read-only aggregates of persisted replication events
|
|
175
198
|
and identity partitions. Live replica status is unavailable there. Report
|
|
176
199
|
`--purge` and `--clear-pending` refuse with exit 2 `REPORT_READ_ONLY`.
|
|
177
200
|
`tc replica reset --replica <name> --purge` is a partial alternative for a
|
|
178
|
-
named local replica only.
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
`
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
201
|
+
named local replica only. Flag-owned purge and pending clearing have no
|
|
202
|
+
equivalent yet (TC-1309). On macOS and Windows, `replica reset --purge` and
|
|
203
|
+
`auth logout` with a legacy `replicas/` tree refuse local removal rather than
|
|
204
|
+
delete through an unpinned path; leave that tree intact and retry on a supported
|
|
205
|
+
platform.
|
|
206
|
+
|
|
207
|
+
`auth logout` durably fences replica reads, removes both legacy replicas and the
|
|
208
|
+
flag-owned `replication/` root, and shreds `session.json` and `key.json`. If
|
|
209
|
+
erasure fails, the marker keeps reads denied and startup retries cleanup. An
|
|
210
|
+
explicit logout also blocks implicit sign-in with the stored profile owner key;
|
|
211
|
+
use `auth login` to establish a fresh session. Unknown legacy or flag-owned
|
|
212
|
+
paths, an unverified legacy SQLite schema, or an unreadable gate refuse logout
|
|
213
|
+
before a marker, credential deletion, or node revocation. Sync local writes or
|
|
214
|
+
pass `--discard-local-changes` to approve the displayed paths, types and file
|
|
215
|
+
identities; newly added or changed paths require fresh approval. With `auth
|
|
216
|
+
logout --revoke --discard-local-changes`, physical files and credentials remain
|
|
217
|
+
through partial or failed node revocation. Only after every exact-CID receipt
|
|
218
|
+
does local cleanup begin. After a failed revoke, plain `auth logout` first
|
|
219
|
+
compares the original approved inventory. If it changed, even
|
|
220
|
+
`--discard-local-changes` refuses without deleting credentials or files and
|
|
221
|
+
prints the changed identities and a 32-character approval token. Run a separate
|
|
222
|
+
`auth logout --discard-local-changes --approve-inventory <token>` to approve
|
|
223
|
+
that exact inventory; a new change invalidates the token. After successful
|
|
224
|
+
remote revocation, a cleanup mismatch retains the marker and remaining files
|
|
225
|
+
while the profile stays signed out; `auth logout --discard-local-changes`
|
|
226
|
+
reapproves cleanup without repeating node revocations. OpenKey owner revocation
|
|
227
|
+
fails closed with `REVOCATION_AUTHORITY_UNAVAILABLE`, retaining credentials and
|
|
228
|
+
denied replica files until signed owner revoke authority is supported.
|
|
229
|
+
`--keep-replicas` is available only for legacy-only profiles with no gate,
|
|
230
|
+
flag-owned partition or pending purge; it retains those legacy files but still
|
|
231
|
+
shreds credentials and blocks implicit reauthentication.
|
|
232
|
+
When the profile's replica gate belongs to a different account than the
|
|
233
|
+
signed-in session, `auth logout` signs that session out and removes the
|
|
234
|
+
profile's legacy `replicas/` tree, but leaves the other account's gate and
|
|
235
|
+
flag-owned replicas untouched; startup finishes the legacy removal if it is
|
|
236
|
+
interrupted. If an earlier sign-out was interrupted, logout reports it and a
|
|
237
|
+
second `auth logout` completes it. A gate that no longer matches its logout
|
|
238
|
+
record (for example, restored from an older copy) refuses logout; switch the
|
|
239
|
+
default profile if needed, then run `tc profile delete <name>` and sign in
|
|
240
|
+
again.
|
|
241
|
+
|
|
242
|
+
`tc auth grants list` labels the signed-in delegation CID `(current session)`.
|
|
243
|
+
`tc delegation revoke <cid>` still accepts any eligible exact CID, but when
|
|
244
|
+
`<cid>` is the current session it requires `--yes` or an interactive confirmation
|
|
245
|
+
before contacting the node. An exact-CID success then runs the same durable
|
|
246
|
+
local sign-out and key shred as `auth logout`; revoking another CID leaves the
|
|
247
|
+
session intact.
|
|
248
|
+
|
|
249
|
+
B-int release acceptance must
|
|
250
|
+
verify the OpenKey `tc auth request --grant` fallback against a real OpenKey
|
|
251
|
+
using a test account and no production writes: approve the request, confirm the
|
|
252
|
+
grant is stored, start a fresh process, and verify the saved prefixes are
|
|
253
|
+
replayed and the covered read is served locally. If OpenKey rejects explicit
|
|
254
|
+
`kv/get` plus `sync`, stop before release and resolve the protocol contract.
|
|
191
255
|
|
|
192
256
|
## Output Modes
|
|
193
257
|
|