@tinycloud/cli 1.2.0-beta.1 → 1.2.0-beta.10
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 +61 -5
- package/dist/courier-entry.d.ts +3 -0
- package/dist/courier-entry.js +2096 -0
- package/dist/courier-entry.js.map +1 -0
- package/dist/index.js +2502 -1959
- package/dist/index.js.map +1 -1
- package/dist/legacy-entry.js +5059 -3050
- package/dist/legacy-entry.js.map +1 -1
- package/package.json +8 -6
- package/skills/courier/SKILL.md +164 -0
- package/skills/courier/release.json +16 -0
- package/skills/tc-cli/AUTH.md +19 -0
- package/skills/tc-cli/INSTALL.md +8 -6
- package/skills/tc-cli/REFERENCE.md +97 -6
- package/skills/tc-cli/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -8,17 +8,39 @@ Self-sovereign storage from the terminal. `tc` is the command-line interface for
|
|
|
8
8
|
npm install -g @tinycloud/cli
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Requires Node.js >= 20.
|
|
12
|
-
|
|
11
|
+
Requires Node.js >= 20.
|
|
12
|
+
|
|
13
|
+
On Linux, iproute2 installs `/usr/sbin/tc` (traffic control), which can shadow
|
|
14
|
+
this CLI on PATH. If the npm global prefix is root-owned, run
|
|
15
|
+
`npm config set prefix ~/.local` before installing: Ubuntu's default PATH puts
|
|
16
|
+
`~/.local/bin` before `/usr/sbin`, but `~/.profile` adds it only if the
|
|
17
|
+
directory existed at login, so start a new login shell after the first
|
|
18
|
+
install. Run `hash -r` if `tc` already ran in the same shell. Verify with
|
|
19
|
+
`command -v tc`, or call `"$(npm prefix --global)/bin/tc"` when in doubt.
|
|
13
20
|
|
|
14
21
|
## Agent skills
|
|
15
22
|
|
|
16
23
|
The package ships the general `tc-cli` skill and its references in
|
|
17
|
-
`skills/tc-cli
|
|
24
|
+
`skills/tc-cli`, and the `courier` skill for `tc courier` in `skills/courier`.
|
|
25
|
+
See [skill installation](skills/tc-cli/INSTALL.md) for a
|
|
18
26
|
pinned, cross-agent installation with OpenCode, Codex and Claude Code, and
|
|
19
27
|
[authentication](skills/tc-cli/AUTH.md) for device login and relaying the
|
|
20
28
|
approval code to the owner.
|
|
21
29
|
|
|
30
|
+
## Courier
|
|
31
|
+
|
|
32
|
+
`tc courier …` runs [Courier](https://github.com/TinyCloudLabs/js-sdk/tree/master/packages/courier#readme), agent-to-agent threads
|
|
33
|
+
over TinyCloud, bundled from `@tinycloud/courier` (beta). It takes the same
|
|
34
|
+
arguments as the standalone `courier` bin and keeps its own agent identity in
|
|
35
|
+
`$COURIER_HOME` (default `~/.courier`), not in a tc profile, so put every flag
|
|
36
|
+
after `courier`:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
tc courier init --paste --handle alice # the owner approves in OpenKey; paste the XXXX-XXXX code
|
|
40
|
+
tc courier inbox
|
|
41
|
+
tc courier --help
|
|
42
|
+
```
|
|
43
|
+
|
|
22
44
|
## Operations coverage
|
|
23
45
|
|
|
24
46
|
The migrated `tc secrets get` path is owned by `@tinycloud/operations` and
|
|
@@ -62,9 +84,15 @@ tc kv list
|
|
|
62
84
|
|
|
63
85
|
# Manage network-encrypted secrets on the default network
|
|
64
86
|
tc secrets network init
|
|
65
|
-
tc secrets put ANTHROPIC_API_KEY
|
|
87
|
+
printf '%s' "$ANTHROPIC_API_KEY" | tc secrets put ANTHROPIC_API_KEY --stdin
|
|
66
88
|
tc secrets get ANTHROPIC_API_KEY
|
|
67
89
|
|
|
90
|
+
# Ask the owner for a secret an agent needs, then wait for it
|
|
91
|
+
# (call TinyCloud's CLI by absolute path: a bare `tc` can be iproute2's /usr/sbin/tc)
|
|
92
|
+
TC_BIN="$(npm prefix --global)/bin/tc"
|
|
93
|
+
"$TC_BIN" --profile agent secrets request OPENAI_API_KEY --json # offline; prints the owner's link
|
|
94
|
+
"$TC_BIN" --profile agent secrets wait OPENAI_API_KEY --timeout 9m --json # 0 ready, 8 pending
|
|
95
|
+
|
|
68
96
|
# Manage spaces
|
|
69
97
|
tc space list
|
|
70
98
|
tc space create
|
|
@@ -105,9 +133,13 @@ tc delegation create --to did:pkh:eip155:1:0x...
|
|
|
105
133
|
| `tc secrets network show` | Show a secrets decryption network |
|
|
106
134
|
| `tc secrets network init` | Create or fetch the default secrets network |
|
|
107
135
|
| `tc secrets network grant` | Grant `tinycloud.encryption/decrypt` on a secrets network |
|
|
136
|
+
| `tc secrets request` | Print a Secret Manager link asking the owner to add secrets (offline) |
|
|
137
|
+
| `tc secrets wait` | Wait until secrets exist and are readable (never signs in; needs a stored session; exit 8 pending, 130 interrupted) |
|
|
138
|
+
| `tc secrets manage` | Print or open the Secret Manager page, `{url, opened}` |
|
|
108
139
|
| `tc vars` | Manage environment variables |
|
|
109
140
|
| `tc doctor` | Run diagnostic checks |
|
|
110
141
|
| `tc completion` | Generate shell completions |
|
|
142
|
+
| `tc courier` | Agent-to-agent threads over TinyCloud (beta; see [Courier](#courier)) |
|
|
111
143
|
|
|
112
144
|
Secret names are env-style uppercase identifiers such as `FIREFLIES_API_KEY`.
|
|
113
145
|
`tc secrets network show` accepts either a short network name or a full
|
|
@@ -124,8 +156,31 @@ network grant` takes the short name, resolves the network, and grants
|
|
|
124
156
|
-q, --quiet Suppress non-essential output
|
|
125
157
|
--json Force JSON output
|
|
126
158
|
--no-cache Disable caching
|
|
159
|
+
--replication Enable read-through replication (or TC_REPLICATION=1)
|
|
160
|
+
--no-replication Disable replication for this invocation
|
|
161
|
+
--replication-debug Write replication diagnostics to stderr
|
|
127
162
|
```
|
|
128
163
|
|
|
164
|
+
Replication is off by default. `--replication` enables it for one invocation;
|
|
165
|
+
`--no-replication` overrides `TC_REPLICATION=1`, and `--replication-debug`
|
|
166
|
+
writes diagnostics to stderr. Save explicit login prefixes with
|
|
167
|
+
`tc auth login --replication-prefix notes/`; saved prefixes are reapplied on
|
|
168
|
+
later logins and rotation. Prefixes are folders (`notes/`) or `/` for the
|
|
169
|
+
whole space. Whole-space replication requires `kv-sync-root` support and
|
|
170
|
+
`--replication-allow-secrets`, because it includes `vault/`. Replication needs
|
|
171
|
+
unrestricted `get` and explicit `sync` on that folder or broader; an exact-key
|
|
172
|
+
grant never qualifies. Bare replica prefixes are rejected; use `notes/`.
|
|
173
|
+
Use `tc replica report` for event aggregates and pinned keys; `--clear-pending`
|
|
174
|
+
prints a warning because later commits can be read as stale until a subsequent
|
|
175
|
+
sync. `auth logout` removes both legacy replicas and the flag-owned
|
|
176
|
+
`replication/` root; `auth logout --keep-replicas` keeps both. B-int release
|
|
177
|
+
acceptance must verify the OpenKey `tc auth request --grant` fallback against
|
|
178
|
+
a real OpenKey using a test account and no production writes: approve the
|
|
179
|
+
request, confirm the grant is stored, start a fresh process, and verify the
|
|
180
|
+
saved prefixes are replayed and the covered read is served locally. If OpenKey
|
|
181
|
+
rejects explicit `kv/get` plus `sync`, stop before release and resolve the
|
|
182
|
+
protocol contract.
|
|
183
|
+
|
|
129
184
|
## Output Modes
|
|
130
185
|
|
|
131
186
|
`tc` auto-detects your terminal:
|
|
@@ -185,7 +240,8 @@ file.
|
|
|
185
240
|
| Variable | Description |
|
|
186
241
|
|----------|-------------|
|
|
187
242
|
| `TC_HIDE_BANNER` | Set to `1` to suppress the startup banner |
|
|
188
|
-
| `
|
|
243
|
+
| `TC_REPLICATION` | Set to `1` to enable replication by default; `--no-replication` overrides it. |
|
|
244
|
+
| `TC_REPLICATION_DEBUG` | Set to `1` to enable replication diagnostics on stderr. |
|
|
189
245
|
|
|
190
246
|
## Development
|
|
191
247
|
|