@tinycloud/cli 1.3.0-beta.47 → 1.3.0-beta.48
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 +1 -1
- package/dist/legacy-entry.js +5 -4
- package/dist/legacy-entry.js.map +1 -1
- package/package.json +1 -1
- package/skills/tc-cli/SKILL.md +3 -1
package/package.json
CHANGED
package/skills/tc-cli/SKILL.md
CHANGED
|
@@ -74,7 +74,9 @@ Ask for the narrowest grant that does the job. The default is read-only, and one
|
|
|
74
74
|
|
|
75
75
|
- `--preset apps-agent` is **read-only**: KV get and list, SQL read, on the `applications` space, up to 7 days. That is enough to pick up where the user left off by reading `knowledge/*` and querying the data. The node refuses a KV put or a SQL write under it.
|
|
76
76
|
- `--app APP_ID` limits it to `APP_ID/` and is the recommended default. Repeat `--app` (up to 5) for a task that spans apps. Leave it off only to read every installed app; the command says so before the owner approves.
|
|
77
|
-
- **
|
|
77
|
+
- **Write access only when the owner asks to change an installed app's data** (for example, log a meal). The agent requests it from its own profile with one command: `"$TC" --profile agent auth request --preset apps-agent --app APP_ID --write --emit req.json`. The owner approves it once, then the agent imports the grant as above. `--write` needs `--app`, and the grant lasts up to 7 days.
|
|
78
|
+
- With `--write`, the agent can add and change that app's data: it writes files under `APP_ID/knowledge/` and `APP_ID/prefs/` and changes its tables. It cannot change the app's code, its manifest or its install record, and every other file under `APP_ID/` stays read-only. It cannot touch other apps, other spaces or secrets.
|
|
79
|
+
- Before you request write access, confirm with the owner. The grant covers one named app: never ask for the whole space, and never a write without `--app`.
|
|
78
80
|
- The preset cannot be combined with `--cap`, `--permission`, `--manifest` or `--expiry`, and device approval cannot grant it (SQL needs browser or `--paste`). The owner ends the grant with `tinycloud delegation revoke GRANT_CID`; the CID is in the `auth grant` output. Within its own grant the agent's key could pass the same access on to someone else, so keep the key and the grant file private.
|
|
79
81
|
- The owner's `auth grant` prints every permission it is about to sign, built from the request file. A request that holds anything the preset could never grant (another service or space, delete, schema, delegation, a write without a named app, a KV put outside `APP_ID/knowledge/` and `APP_ID/prefs/`) is listed first, marked `!`, under "MORE than the apps-agent preset" and is signed only after `--yes` or an interactive confirmation; without a terminal it exits 2 and signs nothing. If the text shows a different lifetime or scope than the one you asked for, the request file was edited.
|
|
80
82
|
- **A revoked or expired grant cannot be replaced in the same profile.** A delegate profile's session is its first imported grant; a later `auth import` succeeds but invocations keep using the first one, so `knowledge list` answers `AUTH_REQUIRED`. Create a new profile (`profile create`), make a new request from it and import the new grant there.
|