@tloncorp/tlon-skill 0.3.5 → 0.4.0

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.
Files changed (3) hide show
  1. package/README.md +12 -1
  2. package/SKILL.md +68 -6
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -122,6 +122,17 @@ tlon contacts update-profile --nickname "My Name"
122
122
 
123
123
  # Create a group
124
124
  tlon groups create "My Group" --description "A cool group"
125
+
126
+ # Create a group for a bot owner
127
+ tlon groups create-owned "My Group" --owner ~owner-ship --description "A cool group"
128
+
129
+ # Join a public or invited group; private groups without an invite request one
130
+ tlon groups join ~host/group-slug
131
+
132
+ # Manage group invite flow explicitly
133
+ tlon groups request-invite ~host/group-slug
134
+ tlon groups accept-invite ~host/group-slug
135
+ tlon groups reject-invite ~host/group-slug
125
136
  ```
126
137
 
127
138
  ## Features
@@ -129,7 +140,7 @@ tlon groups create "My Group" --description "A cool group"
129
140
  - **Activity**: Mentions, replies, unreads (with nicknames)
130
141
  - **Channels**: List DMs, group DMs, subscribed groups (nicknames shown), reader/writer permissions
131
142
  - **Contacts**: List, get, update profiles
132
- - **Groups**: Create, join, invite, roles, privacy (member nicknames shown)
143
+ - **Groups**: Create, join, invite/request flows, roles, privacy (member nicknames shown)
133
144
  - **Hooks**: Manage channel hooks (add, edit, delete, order, config, cron)
134
145
  - **Messages**: History, search (author nicknames shown)
135
146
  - **DMs**: Send, react, accept/decline
package/SKILL.md CHANGED
@@ -11,6 +11,30 @@ Use the `tlon` command for reading data, managing channels/groups/contacts, and
11
11
 
12
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).
13
13
 
14
+ ### Diary / Notebook Thread Replies
15
+
16
+ Tlon diary/notebook channels are special: a channel-level `send` creates a **new notebook post/note**. Do **not** use `message` with `action: "send"` in a diary channel unless you intentionally want to create a new notebook post.
17
+
18
+ For normal conversation inside an existing diary/notebook post, use the `message` tool with `action: "reply"` and reply to the **parent diary post id**, not the newest reply id.
19
+
20
+ Working pattern:
21
+
22
+ ```json
23
+ {
24
+ "action": "reply",
25
+ "channel": "tlon",
26
+ "target": "diary/~host/slug",
27
+ "messageId": "170.141.184.507.950.303.933.087.606.997.052.817.408",
28
+ "message": "Reply text here"
29
+ }
30
+ ```
31
+
32
+ Important details:
33
+ - Use the dotted `@ud` post id format when available.
34
+ - `messageId` should be the parent notebook post/thread id.
35
+ - After sending, verify with `tlon messages post <diary-nest> <parent-post-id>` when correctness matters.
36
+ - If the tool reports success but the reply is not visible under the parent post, treat it as a delivery/plugin issue and do not claim success until verified.
37
+
14
38
  ## Installation
15
39
 
16
40
  **npm (Node.js):**
@@ -204,18 +228,25 @@ Full group management.
204
228
  tlon groups list # List your groups
205
229
  tlon groups info ~host/slug # Get group details
206
230
  tlon groups create "Name" [--description "..."] # Create a group
207
- tlon groups join ~host/slug # Join a group
231
+ tlon groups create-owned "Name" --owner ~ship [--description "..."] # Create group, invite owner, make owner admin
232
+ tlon groups join ~host/slug # Join public/invited group, or request invite if private
233
+ tlon groups request-invite ~host/slug # Request invite to a private group
234
+ tlon groups accept-invite ~host/slug # Accept an existing group invite
235
+ tlon groups reject-invite ~host/slug # Reject an existing group invite
236
+ tlon groups cancel-join ~host/slug # Cancel a pending join
237
+ tlon groups rescind-request ~host/slug # Cancel an invite request
208
238
  tlon groups leave ~host/slug # Leave a group
209
239
  tlon groups delete ~host/slug # Delete (host only)
210
240
  tlon groups update ~host/slug --title "..." [--description "..."]
211
241
 
212
242
  # Members (shown with nicknames when available)
213
243
  tlon groups invite ~host/slug ~ship1 ~ship2 # Invite members
244
+ tlon groups revoke-invite ~host/slug ~ship1 # Revoke pending member invite
214
245
  tlon groups kick ~host/slug ~ship1 # Kick members
215
246
  tlon groups ban ~host/slug ~ship1 # Ban members
216
247
  tlon groups unban ~host/slug ~ship1 # Unban members
217
- tlon groups accept-join ~host/slug ~ship1 # Accept join request
218
- tlon groups reject-join ~host/slug ~ship1 # Reject join request
248
+ tlon groups accept-join ~host/slug ~ship1 # Approve a member join request
249
+ tlon groups reject-join ~host/slug ~ship1 # Deny a member join request
219
250
  tlon groups set-privacy ~host/slug public|private|secret # Set privacy
220
251
 
221
252
  # Roles
@@ -257,6 +288,12 @@ tlon groups add-channel --help
257
288
 
258
289
  Group format: `~host-ship/group-slug`
259
290
 
291
+ Join behavior:
292
+ - `join` first checks whether you are already a member, then checks foreign/unjoined group state for a valid invite.
293
+ - Invited groups and public groups use the backend join action.
294
+ - Private groups without an invite use the invite-request action.
295
+ - Secret groups require an invite.
296
+
260
297
  ### Hooks
261
298
 
262
299
  Manage channel hooks — functions that run on triggers (posts, replies, reactions, crons).
@@ -366,7 +403,7 @@ Manage channel posts (reactions, edits, deletes).
366
403
  tlon posts react chat/~host/slug 170.141... "👍" # React to a post
367
404
  tlon posts unreact chat/~host/slug 170.141... # Remove reaction
368
405
  tlon posts edit chat/~host/slug 170.141... "New text" # Edit with plain text
369
- tlon posts edit diary/~host/slug 170.141... --title "T" --image <url> --content rich.json # Edit notebook
406
+ tlon posts edit diary/~host/slug 170.141... --title "T" --image <url> --content story.json # Edit notebook
370
407
  tlon posts delete chat/~host/slug 170.141... # Delete a post
371
408
  ```
372
409
 
@@ -378,11 +415,36 @@ Post to diary/notebook channels.
378
415
 
379
416
  ```bash
380
417
  tlon notebook diary/~host/slug "Title" # Post with no body
381
- tlon notebook diary/~host/slug "Title" --content rich.json # Post with Story JSON
418
+ tlon notebook diary/~host/slug "Title" --content story.json # Post with Story JSON
419
+ tlon notebook diary/~host/slug "Title" --markdown post.md # Post with Markdown
420
+ cat post.md | tlon notebook diary/~host/slug "Title" --markdown-stdin
382
421
  tlon notebook diary/~host/slug "Title" --image <url> # Post with cover image
383
422
  ```
384
423
 
385
- The `--content` file should be Story JSON format (array of verses with headers, code blocks, formatting). See the [Story types in tlon-apps](https://github.com/tloncorp/tlon-apps/blob/develop/packages/shared/src/urbit/content.ts).
424
+ The `--content` file should be **Urbit Story JSON**: an array of verses accepted by the ship's `story-json` decoder. Use `--markdown` for Markdown files instead of passing Markdown or editor-export JSON through `--content`.
425
+
426
+ Working examples:
427
+
428
+ ```json
429
+ [{"inline": ["Hello world"]}]
430
+ ```
431
+
432
+ ```json
433
+ [{"block": {"header": {"tag": "h1", "content": ["Title"]}}}]
434
+ ```
435
+
436
+ ```json
437
+ [{"inline": ["Use ", {"inline-code": "ha-q"}, " for entity queries."]}]
438
+ ```
439
+
440
+ Important gotcha:
441
+ - Do **not** assume newer block-editor JSON shapes or arbitrary markdown-export JSON will work.
442
+ - If posting fails with a `channel-action-2` cast error mentioning `content -> add -> post -> action -> channel`, the first thing to check is whether the content file matches the ship's Story JSON shape.
443
+ - When debugging, post a minimal one-verse story first so you do not create duplicate full notebook posts.
444
+
445
+ See the ship-side decoder and types here:
446
+ - `tlon-apps/desk/lib/story-json.hoon`
447
+ - [Story types in tlon-apps](https://github.com/tloncorp/tlon-apps/blob/develop/packages/shared/src/urbit/content.ts)
386
448
 
387
449
  ### Upload
388
450
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tloncorp/tlon-skill",
3
- "version": "0.3.5",
3
+ "version": "0.4.0",
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.5",
25
- "@tloncorp/tlon-skill-darwin-x64": "0.3.5",
26
- "@tloncorp/tlon-skill-linux-x64": "0.3.5",
27
- "@tloncorp/tlon-skill-linux-arm64": "0.3.5"
24
+ "@tloncorp/tlon-skill-darwin-arm64": "0.4.0",
25
+ "@tloncorp/tlon-skill-darwin-x64": "0.4.0",
26
+ "@tloncorp/tlon-skill-linux-x64": "0.4.0",
27
+ "@tloncorp/tlon-skill-linux-arm64": "0.4.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@tloncorp/api": "^0.0.4",