@tloncorp/tlon-skill 0.3.0 → 0.3.1
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/SKILL.md +34 -12
- package/package.json +5 -5
package/SKILL.md
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tlon
|
|
3
|
-
description: Interact with Tlon/Urbit API. Use for
|
|
3
|
+
description: Interact with Tlon/Urbit API. Use for reading activity, message history, contacts, channels, and groups. Also for group/channel administration, profile management, and exposing content to the clearweb.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Tlon Skill
|
|
7
7
|
|
|
8
|
-
Use the `tlon` command for
|
|
8
|
+
Use the `tlon` command for reading data, managing channels/groups/contacts, and administration.
|
|
9
|
+
|
|
10
|
+
## OpenClaw
|
|
11
|
+
|
|
12
|
+
When running as an OpenClaw skill, use the built-in `message` tool for sending outbound messages (DMs and channel posts). The `tlon` command is for reading data, administration, and management — not for sending messages. The `message` tool routes through the proper delivery infrastructure (threading, bot profile, rate limiting).
|
|
9
13
|
|
|
10
14
|
## Installation
|
|
11
15
|
|
|
12
16
|
**npm (Node.js):**
|
|
17
|
+
|
|
13
18
|
```bash
|
|
14
19
|
npm install @tloncorp/tlon-skill
|
|
15
20
|
tlon channels groups
|
|
16
21
|
```
|
|
17
22
|
|
|
18
23
|
**Direct binary (no Node required):**
|
|
24
|
+
|
|
19
25
|
```bash
|
|
20
26
|
curl -L https://registry.npmjs.org/@tloncorp/tlon-skill-darwin-arm64/-/tlon-skill-darwin-arm64-0.1.0.tgz | tar -xz
|
|
21
27
|
./package/tlon channels groups
|
|
@@ -23,10 +29,10 @@ curl -L https://registry.npmjs.org/@tloncorp/tlon-skill-darwin-arm64/-/tlon-skil
|
|
|
23
29
|
|
|
24
30
|
Replace `darwin-arm64` with `darwin-x64` or `linux-x64` as needed.
|
|
25
31
|
|
|
26
|
-
|
|
27
32
|
## Configuration
|
|
28
33
|
|
|
29
34
|
**CLI Flags (highest priority):**
|
|
35
|
+
|
|
30
36
|
```bash
|
|
31
37
|
# Cookie-based auth (fastest - ship parsed from cookie name)
|
|
32
38
|
tlon --url https://your-ship.tlon.network --cookie "urbauth-~your-ship=0v..." <command>
|
|
@@ -39,6 +45,7 @@ tlon --config ~/ships/my-ship.json <command>
|
|
|
39
45
|
```
|
|
40
46
|
|
|
41
47
|
Config file format:
|
|
48
|
+
|
|
42
49
|
```json
|
|
43
50
|
// Cookie-based (ship derived from cookie)
|
|
44
51
|
{"url": "...", "cookie": "urbauth-~ship=..."}
|
|
@@ -48,6 +55,7 @@ Config file format:
|
|
|
48
55
|
```
|
|
49
56
|
|
|
50
57
|
**Environment Variables:**
|
|
58
|
+
|
|
51
59
|
```bash
|
|
52
60
|
# Cookie-based (ship derived from cookie)
|
|
53
61
|
export URBIT_URL="https://your-ship.tlon.network"
|
|
@@ -64,6 +72,7 @@ export URBIT_CODE="sampel-ticlyt-migfun-falmel"
|
|
|
64
72
|
**Resolution order:** CLI flags → `TLON_CONFIG_FILE` → `URL + COOKIE` → `URL + SHIP + CODE` → `--ship` with cache → OpenClaw config → cached ships (auto-select if only one)
|
|
65
73
|
|
|
66
74
|
**Cookie vs Code:**
|
|
75
|
+
|
|
67
76
|
- **Cookie-based:** Uses pre-authenticated session cookie. Ship is parsed from the cookie name (`urbauth-~ship=...`). Fastest option.
|
|
68
77
|
- **Code-based:** Performs login to get session cookie. Requires URL + ship + code.
|
|
69
78
|
|
|
@@ -74,6 +83,7 @@ You can provide both cookie and code — cookie is used first, code serves as fa
|
|
|
74
83
|
The skill automatically caches auth cookies to `~/.tlon/cache/<ship>.json` after successful authentication. This makes subsequent invocations much faster by skipping the login request.
|
|
75
84
|
|
|
76
85
|
**How it works:**
|
|
86
|
+
|
|
77
87
|
```bash
|
|
78
88
|
# First time - authenticates and caches
|
|
79
89
|
$ tlon --url https://zod.tlon.network --ship ~zod --code abcd-efgh contacts self
|
|
@@ -90,6 +100,7 @@ $ tlon --ship ~bus contacts self
|
|
|
90
100
|
```
|
|
91
101
|
|
|
92
102
|
**Cache behavior:**
|
|
103
|
+
|
|
93
104
|
- Cached cookies are URL-specific (won't use a cookie for the wrong host)
|
|
94
105
|
- If only one ship is cached, it's auto-selected (no flags needed)
|
|
95
106
|
- If multiple ships are cached, you'll be prompted to specify with `--ship`
|
|
@@ -97,8 +108,6 @@ $ tlon --ship ~bus contacts self
|
|
|
97
108
|
|
|
98
109
|
**Clear cache:** `rm ~/.tlon/cache/*.json`
|
|
99
110
|
|
|
100
|
-
|
|
101
|
-
|
|
102
111
|
## Multi-Ship Usage
|
|
103
112
|
|
|
104
113
|
If you have credentials for multiple ships, you can use this skill to operate on behalf of any of them. This is useful for:
|
|
@@ -138,7 +147,6 @@ List and manage channels. DMs and group DMs show nicknames when available.
|
|
|
138
147
|
|
|
139
148
|
```bash
|
|
140
149
|
tlon channels dms # List DM contacts (with nicknames)
|
|
141
|
-
tlon channels group-dms # List group DMs (clubs, with nicknames)
|
|
142
150
|
tlon channels groups # List subscribed groups
|
|
143
151
|
tlon channels all # List everything
|
|
144
152
|
tlon channels info chat/~host/slug # Get channel details
|
|
@@ -155,6 +163,7 @@ tlon channels del-readers ~host/group chat/~host/slug admin # Open viewing
|
|
|
155
163
|
```
|
|
156
164
|
|
|
157
165
|
Notes on permissions:
|
|
166
|
+
|
|
158
167
|
- Empty writers list = anyone in the group can post (default for chat)
|
|
159
168
|
- Empty readers list = anyone in the group can view (default)
|
|
160
169
|
- Diaries default to admin-only writers
|
|
@@ -206,6 +215,19 @@ tlon groups update-role ~host/slug role-id --title "..." # Update a role
|
|
|
206
215
|
tlon groups assign-role ~host/slug role-id ~ship1 # Assign role
|
|
207
216
|
tlon groups remove-role ~host/slug role-id ~ship1 # Remove role
|
|
208
217
|
|
|
218
|
+
# Admin
|
|
219
|
+
tlon groups promote ~host/slug ~ship1 [~ship2 ...] # Promote member(s) to admin
|
|
220
|
+
tlon groups demote ~host/slug ~ship1 [~ship2 ...] # Demote member(s) from admin
|
|
221
|
+
|
|
222
|
+
Roles vs Admin:
|
|
223
|
+
- Regular roles are for organizing members and controlling channel read/write permissions.
|
|
224
|
+
- Admin is a special privilege on top of a role. Admins can manage group settings,
|
|
225
|
+
channels, members, and roles.
|
|
226
|
+
- `promote` creates an "admin" role (if one doesn't exist), grants it admin privileges,
|
|
227
|
+
and assigns it to the specified members. `demote` removes that role from them.
|
|
228
|
+
- To grant admin to members who already share a role, use `set-admin` on that role
|
|
229
|
+
via the backend directly (not yet exposed in the Tlon app UI).
|
|
230
|
+
|
|
209
231
|
# Channels
|
|
210
232
|
tlon groups add-channel ~host/slug "Name" [--kind chat|diary|heap]
|
|
211
233
|
```
|
|
@@ -239,18 +261,21 @@ tlon hooks rest 0v1a # Stop cron job
|
|
|
239
261
|
```
|
|
240
262
|
|
|
241
263
|
Notes:
|
|
264
|
+
|
|
242
265
|
- Hook IDs are @uv format (e.g., `0v1a.2b3c4...`)
|
|
243
266
|
- Schedules use @dr format: `~h1` (1 hour), `~m30` (30 minutes), `~d1` (1 day)
|
|
244
267
|
- Hooks run in order when triggered; use `order` to set priority
|
|
245
268
|
- Use `config` to pass channel-specific settings to a hook instance
|
|
246
269
|
|
|
247
270
|
**Writing Hooks:** See `references/hooks.md` for full documentation on writing hooks, including:
|
|
271
|
+
|
|
248
272
|
- Event types (`on-post`, `on-reply`, `cron`, `wake`)
|
|
249
273
|
- Bowl context (channel, group, config access)
|
|
250
274
|
- Effects (channel actions, group actions, scheduled wakes)
|
|
251
275
|
- Config handling with clam (`;;`)
|
|
252
276
|
|
|
253
277
|
**Examples:** See `references/hooks-examples/` for starter templates:
|
|
278
|
+
|
|
254
279
|
- `auto-react.hoon` — React to new posts with emoji
|
|
255
280
|
- `delete-old-posts.hoon` — Cron job to clean up old messages
|
|
256
281
|
- `word-filter.hoon` — Block posts containing banned words
|
|
@@ -274,19 +299,15 @@ finding surrounding conversation when you have a post from search or activity.
|
|
|
274
299
|
For DMs, use the ship name as the channel: `tlon messages context ~sampel 170.141...`
|
|
275
300
|
|
|
276
301
|
The `post` command fetches a single post with its replies/thread. For DM posts,
|
|
277
|
-
pass `--author ~ship` (required for DM
|
|
302
|
+
pass `--author ~ship` (required for DM lookups).
|
|
278
303
|
|
|
279
304
|
**Tip:** Use `search` to find a message, then `context` with its ID to see the surrounding conversation.
|
|
280
305
|
|
|
281
306
|
### DMs
|
|
282
307
|
|
|
283
|
-
Manage direct messages.
|
|
308
|
+
Manage direct messages — reactions, invites, and deletions.
|
|
284
309
|
|
|
285
310
|
```bash
|
|
286
|
-
# Group DMs (clubs)
|
|
287
|
-
tlon dms send <club-id> "hello" # Send to group DM
|
|
288
|
-
tlon dms reply <club-id> ~author/170.141... "reply" # Reply in group DM
|
|
289
|
-
|
|
290
311
|
# Management
|
|
291
312
|
tlon dms react ~sampel ~author/170.141... "👍" # React to a DM
|
|
292
313
|
tlon dms unreact ~sampel ~author/170.141... # Remove reaction
|
|
@@ -308,6 +329,7 @@ tlon expose url diary/~host/blog/170.141... # Get the public URL
|
|
|
308
329
|
```
|
|
309
330
|
|
|
310
331
|
Cite path formats:
|
|
332
|
+
|
|
311
333
|
- Simplified: `chat/~host/channel/170.141...` (auto-expands)
|
|
312
334
|
- Full: `/1/chan/chat/~host/channel/msg/170.141...`
|
|
313
335
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tloncorp/tlon-skill",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Tlon/Urbit skill for OpenClaw agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"postinstall": "node scripts/postinstall.js"
|
|
22
22
|
},
|
|
23
23
|
"optionalDependencies": {
|
|
24
|
-
"@tloncorp/tlon-skill-darwin-arm64": "0.3.
|
|
25
|
-
"@tloncorp/tlon-skill-darwin-x64": "0.3.
|
|
26
|
-
"@tloncorp/tlon-skill-linux-x64": "0.3.
|
|
27
|
-
"@tloncorp/tlon-skill-linux-arm64": "0.3.
|
|
24
|
+
"@tloncorp/tlon-skill-darwin-arm64": "0.3.1",
|
|
25
|
+
"@tloncorp/tlon-skill-darwin-x64": "0.3.1",
|
|
26
|
+
"@tloncorp/tlon-skill-linux-x64": "0.3.1",
|
|
27
|
+
"@tloncorp/tlon-skill-linux-arm64": "0.3.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@tloncorp/api": "git+https://github.com/tloncorp/api-beta.git#c5eb1720d94435b62503605acb294ef42a5440b3",
|