@openclaw/tlon 2026.2.21 → 2026.5.2-beta.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/api.ts +16 -0
- package/channel-plugin-api.ts +1 -0
- package/doctor-contract-api.ts +1 -0
- package/index.ts +177 -11
- package/openclaw.plugin.json +194 -1
- package/package.json +57 -4
- package/runtime-api.ts +17 -0
- package/setup-api.ts +2 -0
- package/setup-entry.ts +9 -0
- package/src/account-fields.ts +9 -3
- package/src/channel.runtime.ts +248 -0
- package/src/channel.ts +153 -364
- package/src/config-schema.ts +22 -16
- package/src/core.test.ts +278 -0
- package/src/doctor-contract.ts +9 -0
- package/src/doctor.test.ts +40 -0
- package/src/doctor.ts +10 -0
- package/src/logger-runtime.ts +1 -0
- package/src/monitor/approval-runtime.ts +363 -0
- package/src/monitor/approval.test.ts +33 -0
- package/src/monitor/approval.ts +286 -0
- package/src/monitor/authorization.ts +30 -0
- package/src/monitor/cites.ts +54 -0
- package/src/monitor/discovery.ts +44 -54
- package/src/monitor/history.ts +155 -21
- package/src/monitor/index.ts +1290 -369
- package/src/monitor/media.test.ts +91 -0
- package/src/monitor/media.ts +172 -0
- package/src/monitor/processed-messages.test.ts +36 -1
- package/src/monitor/processed-messages.ts +62 -19
- package/src/monitor/settings-helpers.test.ts +113 -0
- package/src/monitor/settings-helpers.ts +158 -0
- package/src/monitor/utils.ts +311 -45
- package/src/runtime.ts +8 -13
- package/src/security.test.ts +622 -0
- package/src/session-route.ts +40 -0
- package/src/settings.ts +391 -0
- package/src/setup-core.ts +228 -0
- package/src/setup-surface.ts +103 -0
- package/src/targets.ts +29 -16
- package/src/tlon-api.test.ts +589 -0
- package/src/tlon-api.ts +402 -0
- package/src/types.ts +106 -45
- package/src/urbit/auth.ssrf.test.ts +3 -2
- package/src/urbit/auth.ts +2 -2
- package/src/urbit/base-url.test.ts +18 -11
- package/src/urbit/base-url.ts +9 -5
- package/src/urbit/channel-ops.ts +40 -59
- package/src/urbit/context.ts +13 -10
- package/src/urbit/errors.ts +2 -2
- package/src/urbit/fetch.ts +6 -3
- package/src/urbit/foreigns.ts +49 -0
- package/src/urbit/send.ts +53 -8
- package/src/urbit/sse-client.test.ts +184 -25
- package/src/urbit/sse-client.ts +123 -69
- package/src/urbit/story.ts +332 -0
- package/src/urbit/upload.test.ts +154 -0
- package/src/urbit/upload.ts +60 -0
- package/test-api.ts +1 -0
- package/tsconfig.json +16 -0
- package/src/config-schema.test.ts +0 -31
- package/src/onboarding.ts +0 -229
- package/src/urbit/channel-client.ts +0 -157
package/api.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export {
|
|
2
|
+
createDedupeCache,
|
|
3
|
+
createLoggerBackedRuntime,
|
|
4
|
+
fetchWithSsrFGuard,
|
|
5
|
+
isBlockedHostnameOrIp,
|
|
6
|
+
type LookupFn,
|
|
7
|
+
type OpenClawConfig,
|
|
8
|
+
type ReplyPayload,
|
|
9
|
+
type RuntimeEnv,
|
|
10
|
+
SsrFBlockedError,
|
|
11
|
+
type SsrFPolicy,
|
|
12
|
+
ssrfPolicyFromAllowPrivateNetwork,
|
|
13
|
+
ssrfPolicyFromDangerouslyAllowPrivateNetwork,
|
|
14
|
+
} from "./runtime-api.js";
|
|
15
|
+
export { tlonPlugin } from "./src/channel.js";
|
|
16
|
+
export { setTlonRuntime } from "./src/runtime.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { tlonPlugin } from "./src/channel.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { normalizeCompatibilityConfig, legacyConfigRules } from "./src/doctor-contract.js";
|
package/index.ts
CHANGED
|
@@ -1,17 +1,183 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
6
|
+
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
5
7
|
|
|
6
|
-
const
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
|
|
10
|
+
const ALLOWED_TLON_COMMANDS = new Set([
|
|
11
|
+
"activity",
|
|
12
|
+
"channels",
|
|
13
|
+
"contacts",
|
|
14
|
+
"groups",
|
|
15
|
+
"messages",
|
|
16
|
+
"dms",
|
|
17
|
+
"posts",
|
|
18
|
+
"notebook",
|
|
19
|
+
"settings",
|
|
20
|
+
"help",
|
|
21
|
+
"version",
|
|
22
|
+
]);
|
|
23
|
+
|
|
24
|
+
let cachedTlonBinary: string | undefined;
|
|
25
|
+
|
|
26
|
+
function findTlonBinary(): string {
|
|
27
|
+
if (cachedTlonBinary) {
|
|
28
|
+
return cachedTlonBinary;
|
|
29
|
+
}
|
|
30
|
+
const skillBin = join(__dirname, "node_modules", ".bin", "tlon");
|
|
31
|
+
if (existsSync(skillBin)) {
|
|
32
|
+
cachedTlonBinary = skillBin;
|
|
33
|
+
return skillBin;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const platformPkg = `@tloncorp/tlon-skill-${process.platform}-${process.arch}`;
|
|
37
|
+
const platformBin = join(__dirname, "node_modules", platformPkg, "tlon");
|
|
38
|
+
if (existsSync(platformBin)) {
|
|
39
|
+
cachedTlonBinary = platformBin;
|
|
40
|
+
return platformBin;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
cachedTlonBinary = "tlon";
|
|
44
|
+
return cachedTlonBinary;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function shellSplit(str: string): string[] {
|
|
48
|
+
const args: string[] = [];
|
|
49
|
+
let cur = "";
|
|
50
|
+
let inDouble = false;
|
|
51
|
+
let inSingle = false;
|
|
52
|
+
let escape = false;
|
|
53
|
+
|
|
54
|
+
for (const ch of str) {
|
|
55
|
+
if (escape) {
|
|
56
|
+
cur += ch;
|
|
57
|
+
escape = false;
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (ch === "\\" && !inSingle) {
|
|
61
|
+
escape = true;
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
if (ch === '"' && !inSingle) {
|
|
65
|
+
inDouble = !inDouble;
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
if (ch === "'" && !inDouble) {
|
|
69
|
+
inSingle = !inSingle;
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
if (/\s/.test(ch) && !inDouble && !inSingle) {
|
|
73
|
+
if (cur) {
|
|
74
|
+
args.push(cur);
|
|
75
|
+
cur = "";
|
|
76
|
+
}
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
cur += ch;
|
|
80
|
+
}
|
|
81
|
+
if (cur) {
|
|
82
|
+
args.push(cur);
|
|
83
|
+
}
|
|
84
|
+
return args;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function runTlonCommand(binary: string, args: string[]): Promise<string> {
|
|
88
|
+
return new Promise((resolve, reject) => {
|
|
89
|
+
const child = spawn(binary, args, { env: process.env });
|
|
90
|
+
|
|
91
|
+
let stdout = "";
|
|
92
|
+
let stderr = "";
|
|
93
|
+
|
|
94
|
+
child.stdout.on("data", (data) => {
|
|
95
|
+
stdout += data.toString();
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
child.stderr.on("data", (data) => {
|
|
99
|
+
stderr += data.toString();
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
child.on("error", (err) => {
|
|
103
|
+
reject(new Error(`Failed to run tlon: ${err.message}`));
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
child.on("close", (code) => {
|
|
107
|
+
if (code !== 0) {
|
|
108
|
+
reject(new Error(stderr || `tlon exited with code ${code}`));
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
resolve(stdout);
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export default defineBundledChannelEntry({
|
|
7
117
|
id: "tlon",
|
|
8
118
|
name: "Tlon",
|
|
9
119
|
description: "Tlon/Urbit channel plugin",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
120
|
+
importMetaUrl: import.meta.url,
|
|
121
|
+
plugin: {
|
|
122
|
+
specifier: "./channel-plugin-api.js",
|
|
123
|
+
exportName: "tlonPlugin",
|
|
14
124
|
},
|
|
15
|
-
|
|
125
|
+
runtime: {
|
|
126
|
+
specifier: "./api.js",
|
|
127
|
+
exportName: "setTlonRuntime",
|
|
128
|
+
},
|
|
129
|
+
registerFull(api) {
|
|
130
|
+
api.registerTool({
|
|
131
|
+
name: "tlon",
|
|
132
|
+
label: "Tlon CLI",
|
|
133
|
+
description:
|
|
134
|
+
"Tlon/Urbit API operations: activity, channels, contacts, groups, messages, dms, posts, notebook, settings. " +
|
|
135
|
+
"Examples: 'activity mentions --limit 10', 'channels groups', 'contacts self', 'groups list'",
|
|
136
|
+
parameters: {
|
|
137
|
+
type: "object",
|
|
138
|
+
properties: {
|
|
139
|
+
command: {
|
|
140
|
+
type: "string",
|
|
141
|
+
description:
|
|
142
|
+
"The tlon command and arguments. " +
|
|
143
|
+
"Examples: 'activity mentions --limit 10', 'contacts get ~sampel-palnet', 'groups list'",
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
required: ["command"],
|
|
147
|
+
},
|
|
148
|
+
async execute(_id: string, params: { command: string }) {
|
|
149
|
+
try {
|
|
150
|
+
const args = shellSplit(params.command);
|
|
151
|
+
const subcommand = args[0];
|
|
152
|
+
if (!ALLOWED_TLON_COMMANDS.has(subcommand)) {
|
|
153
|
+
return {
|
|
154
|
+
content: [
|
|
155
|
+
{
|
|
156
|
+
type: "text" as const,
|
|
157
|
+
text: `Error: Unknown tlon subcommand '${subcommand}'. Allowed: ${[...ALLOWED_TLON_COMMANDS].join(", ")}`,
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
details: { error: true },
|
|
161
|
+
};
|
|
162
|
+
}
|
|
16
163
|
|
|
17
|
-
|
|
164
|
+
const output = await runTlonCommand(findTlonBinary(), args);
|
|
165
|
+
return {
|
|
166
|
+
content: [{ type: "text" as const, text: output }],
|
|
167
|
+
details: undefined,
|
|
168
|
+
};
|
|
169
|
+
} catch (error: unknown) {
|
|
170
|
+
return {
|
|
171
|
+
content: [
|
|
172
|
+
{
|
|
173
|
+
type: "text" as const,
|
|
174
|
+
text: `Error: ${formatErrorMessage(error)}`,
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
details: { error: true },
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
});
|
|
182
|
+
},
|
|
183
|
+
});
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,9 +1,202 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "tlon",
|
|
3
|
-
"
|
|
3
|
+
"activation": {
|
|
4
|
+
"onStartup": false
|
|
5
|
+
},
|
|
6
|
+
"channels": [
|
|
7
|
+
"tlon"
|
|
8
|
+
],
|
|
9
|
+
"contracts": {
|
|
10
|
+
"tools": [
|
|
11
|
+
"tlon"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"skills": [
|
|
15
|
+
"node_modules/@tloncorp/tlon-skill"
|
|
16
|
+
],
|
|
4
17
|
"configSchema": {
|
|
5
18
|
"type": "object",
|
|
6
19
|
"additionalProperties": false,
|
|
7
20
|
"properties": {}
|
|
21
|
+
},
|
|
22
|
+
"channelConfigs": {
|
|
23
|
+
"tlon": {
|
|
24
|
+
"schema": {
|
|
25
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
26
|
+
"type": "object",
|
|
27
|
+
"properties": {
|
|
28
|
+
"name": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"enabled": {
|
|
32
|
+
"type": "boolean"
|
|
33
|
+
},
|
|
34
|
+
"ship": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1
|
|
37
|
+
},
|
|
38
|
+
"url": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"code": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"network": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"properties": {
|
|
47
|
+
"dangerouslyAllowPrivateNetwork": {
|
|
48
|
+
"type": "boolean"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"additionalProperties": false
|
|
52
|
+
},
|
|
53
|
+
"groupChannels": {
|
|
54
|
+
"type": "array",
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"minLength": 1
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"dmAllowlist": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"minLength": 1
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"autoDiscoverChannels": {
|
|
68
|
+
"type": "boolean"
|
|
69
|
+
},
|
|
70
|
+
"showModelSignature": {
|
|
71
|
+
"type": "boolean"
|
|
72
|
+
},
|
|
73
|
+
"responsePrefix": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
},
|
|
76
|
+
"autoAcceptDmInvites": {
|
|
77
|
+
"type": "boolean"
|
|
78
|
+
},
|
|
79
|
+
"autoAcceptGroupInvites": {
|
|
80
|
+
"type": "boolean"
|
|
81
|
+
},
|
|
82
|
+
"ownerShip": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"minLength": 1
|
|
85
|
+
},
|
|
86
|
+
"authorization": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"properties": {
|
|
89
|
+
"channelRules": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"propertyNames": {
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
94
|
+
"additionalProperties": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"properties": {
|
|
97
|
+
"mode": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"enum": [
|
|
100
|
+
"restricted",
|
|
101
|
+
"open"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"allowedShips": {
|
|
105
|
+
"type": "array",
|
|
106
|
+
"items": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"minLength": 1
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"additionalProperties": false
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"additionalProperties": false
|
|
117
|
+
},
|
|
118
|
+
"defaultAuthorizedShips": {
|
|
119
|
+
"type": "array",
|
|
120
|
+
"items": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"minLength": 1
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"accounts": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"propertyNames": {
|
|
128
|
+
"type": "string"
|
|
129
|
+
},
|
|
130
|
+
"additionalProperties": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"properties": {
|
|
133
|
+
"name": {
|
|
134
|
+
"type": "string"
|
|
135
|
+
},
|
|
136
|
+
"enabled": {
|
|
137
|
+
"type": "boolean"
|
|
138
|
+
},
|
|
139
|
+
"ship": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"minLength": 1
|
|
142
|
+
},
|
|
143
|
+
"url": {
|
|
144
|
+
"type": "string"
|
|
145
|
+
},
|
|
146
|
+
"code": {
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"network": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"properties": {
|
|
152
|
+
"dangerouslyAllowPrivateNetwork": {
|
|
153
|
+
"type": "boolean"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"additionalProperties": false
|
|
157
|
+
},
|
|
158
|
+
"groupChannels": {
|
|
159
|
+
"type": "array",
|
|
160
|
+
"items": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"minLength": 1
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"dmAllowlist": {
|
|
166
|
+
"type": "array",
|
|
167
|
+
"items": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"minLength": 1
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"autoDiscoverChannels": {
|
|
173
|
+
"type": "boolean"
|
|
174
|
+
},
|
|
175
|
+
"showModelSignature": {
|
|
176
|
+
"type": "boolean"
|
|
177
|
+
},
|
|
178
|
+
"responsePrefix": {
|
|
179
|
+
"type": "string"
|
|
180
|
+
},
|
|
181
|
+
"autoAcceptDmInvites": {
|
|
182
|
+
"type": "boolean"
|
|
183
|
+
},
|
|
184
|
+
"autoAcceptGroupInvites": {
|
|
185
|
+
"type": "boolean"
|
|
186
|
+
},
|
|
187
|
+
"ownerShip": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"minLength": 1
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"additionalProperties": false
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"additionalProperties": false
|
|
197
|
+
},
|
|
198
|
+
"label": "Tlon",
|
|
199
|
+
"description": "decentralized messaging on Urbit; install the plugin to enable."
|
|
200
|
+
}
|
|
8
201
|
}
|
|
9
202
|
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/tlon",
|
|
3
|
-
"version": "2026.2.
|
|
3
|
+
"version": "2026.5.2-beta.1",
|
|
4
4
|
"description": "OpenClaw Tlon/Urbit channel plugin",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/openclaw/openclaw"
|
|
8
|
+
},
|
|
5
9
|
"type": "module",
|
|
6
10
|
"dependencies": {
|
|
11
|
+
"@aws-sdk/client-s3": "3.1041.0",
|
|
12
|
+
"@aws-sdk/s3-request-presigner": "3.1041.0",
|
|
13
|
+
"@tloncorp/tlon-skill": "0.3.5",
|
|
7
14
|
"@urbit/aura": "^3.0.0"
|
|
8
15
|
},
|
|
9
16
|
"devDependencies": {
|
|
17
|
+
"@openclaw/plugin-sdk": "workspace:*",
|
|
10
18
|
"openclaw": "workspace:*"
|
|
11
19
|
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"openclaw": ">=2026.5.2-beta.1"
|
|
22
|
+
},
|
|
23
|
+
"peerDependenciesMeta": {
|
|
24
|
+
"openclaw": {
|
|
25
|
+
"optional": true
|
|
26
|
+
}
|
|
27
|
+
},
|
|
12
28
|
"openclaw": {
|
|
13
29
|
"extensions": [
|
|
14
30
|
"./index.ts"
|
|
15
31
|
],
|
|
32
|
+
"setupEntry": "./setup-entry.ts",
|
|
16
33
|
"channel": {
|
|
17
34
|
"id": "tlon",
|
|
18
35
|
"label": "Tlon",
|
|
@@ -21,12 +38,48 @@
|
|
|
21
38
|
"docsLabel": "tlon",
|
|
22
39
|
"blurb": "decentralized messaging on Urbit; install the plugin to enable.",
|
|
23
40
|
"order": 90,
|
|
24
|
-
"quickstartAllowFrom": true
|
|
41
|
+
"quickstartAllowFrom": true,
|
|
42
|
+
"cliAddOptions": [
|
|
43
|
+
{
|
|
44
|
+
"flags": "--ship <ship>",
|
|
45
|
+
"description": "Tlon ship name (~sampel-palnet)"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"flags": "--code <code>",
|
|
49
|
+
"description": "Tlon login code"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"flags": "--group-channels <list>",
|
|
53
|
+
"description": "Tlon group channels (comma-separated)"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"flags": "--dm-allowlist <list>",
|
|
57
|
+
"description": "Tlon DM allowlist (comma-separated ships)"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"flags": "--auto-discover-channels",
|
|
61
|
+
"description": "Tlon auto-discover group channels"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"flags": "--no-auto-discover-channels",
|
|
65
|
+
"description": "Disable Tlon auto-discovery"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
25
68
|
},
|
|
26
69
|
"install": {
|
|
27
70
|
"npmSpec": "@openclaw/tlon",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
71
|
+
"defaultChoice": "npm",
|
|
72
|
+
"minHostVersion": ">=2026.4.10"
|
|
73
|
+
},
|
|
74
|
+
"compat": {
|
|
75
|
+
"pluginApi": ">=2026.5.2-beta.1"
|
|
76
|
+
},
|
|
77
|
+
"build": {
|
|
78
|
+
"openclawVersion": "2026.5.2-beta.1"
|
|
79
|
+
},
|
|
80
|
+
"release": {
|
|
81
|
+
"publishToClawHub": true,
|
|
82
|
+
"publishToNpm": true
|
|
30
83
|
}
|
|
31
84
|
}
|
|
32
85
|
}
|
package/runtime-api.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Private runtime barrel for the bundled Tlon extension.
|
|
2
|
+
// Keep this barrel thin and aligned with the local extension surface.
|
|
3
|
+
|
|
4
|
+
export type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime";
|
|
5
|
+
export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";
|
|
6
|
+
export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime";
|
|
7
|
+
export { createDedupeCache } from "openclaw/plugin-sdk/core";
|
|
8
|
+
export { createLoggerBackedRuntime } from "./src/logger-runtime.js";
|
|
9
|
+
export {
|
|
10
|
+
fetchWithSsrFGuard,
|
|
11
|
+
isBlockedHostnameOrIp,
|
|
12
|
+
ssrfPolicyFromAllowPrivateNetwork,
|
|
13
|
+
ssrfPolicyFromDangerouslyAllowPrivateNetwork,
|
|
14
|
+
type LookupFn,
|
|
15
|
+
type SsrFPolicy,
|
|
16
|
+
} from "openclaw/plugin-sdk/ssrf-runtime";
|
|
17
|
+
export { SsrFBlockedError } from "openclaw/plugin-sdk/ssrf-runtime";
|
package/setup-api.ts
ADDED
package/setup-entry.ts
ADDED
package/src/account-fields.ts
CHANGED
|
@@ -2,10 +2,11 @@ export type TlonAccountFieldsInput = {
|
|
|
2
2
|
ship?: string;
|
|
3
3
|
url?: string;
|
|
4
4
|
code?: string;
|
|
5
|
-
|
|
5
|
+
dangerouslyAllowPrivateNetwork?: boolean;
|
|
6
6
|
groupChannels?: string[];
|
|
7
7
|
dmAllowlist?: string[];
|
|
8
8
|
autoDiscoverChannels?: boolean;
|
|
9
|
+
ownerShip?: string;
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
export function buildTlonAccountFields(input: TlonAccountFieldsInput) {
|
|
@@ -13,13 +14,18 @@ export function buildTlonAccountFields(input: TlonAccountFieldsInput) {
|
|
|
13
14
|
...(input.ship ? { ship: input.ship } : {}),
|
|
14
15
|
...(input.url ? { url: input.url } : {}),
|
|
15
16
|
...(input.code ? { code: input.code } : {}),
|
|
16
|
-
...(typeof input.
|
|
17
|
-
? {
|
|
17
|
+
...(typeof input.dangerouslyAllowPrivateNetwork === "boolean"
|
|
18
|
+
? {
|
|
19
|
+
network: {
|
|
20
|
+
dangerouslyAllowPrivateNetwork: input.dangerouslyAllowPrivateNetwork,
|
|
21
|
+
},
|
|
22
|
+
}
|
|
18
23
|
: {}),
|
|
19
24
|
...(input.groupChannels ? { groupChannels: input.groupChannels } : {}),
|
|
20
25
|
...(input.dmAllowlist ? { dmAllowlist: input.dmAllowlist } : {}),
|
|
21
26
|
...(typeof input.autoDiscoverChannels === "boolean"
|
|
22
27
|
? { autoDiscoverChannels: input.autoDiscoverChannels }
|
|
23
28
|
: {}),
|
|
29
|
+
...(input.ownerShip ? { ownerShip: input.ownerShip } : {}),
|
|
24
30
|
};
|
|
25
31
|
}
|