@framers/agentos-ext-channel-tlon 0.1.3 → 0.1.5
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 +74 -0
- package/manifest.json +1 -1
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Tlon channel
|
|
2
|
+
|
|
3
|
+
This pack gives an agent direct and group text messaging on Tlon through an Urbit ship's HTTP API and SSE subscriptions. It uses `@urbit/aura` to format direct-message identifiers.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @framers/agentos-ext-channel-tlon
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Peer dependency: `@framers/agentos` `>=0.10.40`.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { AgentOS } from '@framers/agentos';
|
|
17
|
+
|
|
18
|
+
const agentos = await AgentOS.create({
|
|
19
|
+
extensionManifest: {
|
|
20
|
+
packs: [
|
|
21
|
+
{
|
|
22
|
+
package: '@framers/agentos-ext-channel-tlon',
|
|
23
|
+
options: {
|
|
24
|
+
shipUrl: process.env.TLON_SHIP_URL,
|
|
25
|
+
code: process.env.TLON_CODE,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Configuration
|
|
34
|
+
|
|
35
|
+
| Option | Secret id | Environment variable | Required | Default |
|
|
36
|
+
| --- | --- | --- | --- | --- |
|
|
37
|
+
| `shipUrl` | `tlon.shipUrl` | `TLON_SHIP_URL` | Yes | None |
|
|
38
|
+
| `code` | `tlon.code` | `TLON_CODE` | Yes | None |
|
|
39
|
+
| `groupChannels` | None | `TLON_GROUP_CHANNELS` | No | `[]` |
|
|
40
|
+
| `autoSubscribeDms` | None | None | No | `true` |
|
|
41
|
+
| `autoReconnect` | None | None | No | `true` |
|
|
42
|
+
| `priority` | None | None | No | `50` |
|
|
43
|
+
| `secrets` | `tlon.shipUrl`, `tlon.code` | None | No | None |
|
|
44
|
+
|
|
45
|
+
Credentials resolve from options, then `options.secrets`, then environment variables. A nonempty `groupChannels` array overrides the comma-separated `TLON_GROUP_CHANNELS` value. Group subscription targets use `chat/~host/channel`.
|
|
46
|
+
|
|
47
|
+
## Tools
|
|
48
|
+
|
|
49
|
+
| Tool | What it does |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| `tlonChannelSendMessage` | Send a text message through the Tlon/Urbit channel adapter. |
|
|
52
|
+
|
|
53
|
+
### `tlonChannelSendMessage`
|
|
54
|
+
|
|
55
|
+
| Parameter | Type | Required | Description |
|
|
56
|
+
| --- | --- | --- | --- |
|
|
57
|
+
| `conversationId` | string | Yes | Target: `dm/~ship` \| `~ship` \| `chat/~host/channel` \| `group:~host/channel` |
|
|
58
|
+
| `text` | string | Yes | Message text |
|
|
59
|
+
|
|
60
|
+
## Channel adapter
|
|
61
|
+
|
|
62
|
+
The adapter registers platform `tlon`. Activation authenticates with `code` at `/~/login`, reads the ship name from `/~/name`, and opens an SSE stream at `/~/channel/<id>`. It discovers direct-message subscriptions through `/~/scry/chat/dm.json` when `autoSubscribeDms` is enabled and subscribes to configured group channels.
|
|
63
|
+
|
|
64
|
+
Sending uses the first text block. Direct messages poke the `chat` app with `chat-dm-action`; group messages poke the `channels` app with `channel-action-1`. Inbound direct messages, group posts and group replies become text message events. Empty text and messages authored by the connected ship are ignored. Typing indicators do nothing.
|
|
65
|
+
|
|
66
|
+
## Notes
|
|
67
|
+
|
|
68
|
+
An Urbit ship URL and login code are required. Creating the pack throws if either credential is missing. URLs without a scheme receive `http://`. Sending trims text and rejects empty text or an invalid target. Messages are sent to the selected ship or group channel.
|
|
69
|
+
|
|
70
|
+
Login requests time out after `15000` ms; ship-name, channel-write and scry requests time out after `30000` ms. SSE reconnection uses exponential delay capped at `30000` ms when `autoReconnect` is enabled. Failed direct-message discovery logs a warning and allows group subscriptions to continue.
|
|
71
|
+
|
|
72
|
+
## License
|
|
73
|
+
|
|
74
|
+
Apache-2.0
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://agentos.sh/schemas/extension-manifest-v1.json",
|
|
3
3
|
"id": "com.framers.channels.tlon",
|
|
4
4
|
"name": "Tlon (Urbit) Channel Extension",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.5",
|
|
6
6
|
"description": "Tlon / Urbit messaging — peer-to-peer, identity-sovereign communication.",
|
|
7
7
|
"categories": ["channel", "communication"],
|
|
8
8
|
"platforms": ["tlon"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@framers/agentos-ext-channel-tlon",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Tlon / Urbit channel adapter for AgentOS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"name": "Framers AI",
|
|
17
17
|
"url": "https://frame.dev"
|
|
18
18
|
},
|
|
19
|
-
"license": "
|
|
19
|
+
"license": "Apache-2.0",
|
|
20
20
|
"files": [
|
|
21
21
|
"dist",
|
|
22
22
|
"manifest.json"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@types/node": "^20.0.0",
|
|
32
32
|
"typescript": "^5.0.0",
|
|
33
33
|
"vitest": "^3.2.7",
|
|
34
|
-
"@framers/agentos": "^0.
|
|
34
|
+
"@framers/agentos": "^0.13.47"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": ">=22"
|