@openclaw/tlon 2026.11.1 → 2026.11.2
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/dist/.setup/{api-HlSecO8_.mjs → api-DCWWT3CU.mjs} +2 -2
- package/dist/.setup/{channel-geUIVRFJ.mjs → channel-C3JZ6wZF.mjs} +11 -7
- package/dist/.setup/{channel.runtime-DRjOGubO.mjs → channel.runtime-BzZXbsh4.mjs} +62 -33
- package/dist/.setup/{doctor-contract-CfYeTj9o.mjs → doctor-contract-bInPRAQZ.mjs} +12 -6
- package/dist/.setup/{runtime-ReERXJF_.mjs → runtime-Ck3lNvST.mjs} +2 -1
- package/dist/.setup/{setup-core-DnIfSMDp.mjs → setup-core-kO8u8noA.mjs} +10 -5
- package/dist/.setup/{setup-surface-CTiMlwQy.mjs → setup-surface-Byac6RoF.mjs} +3 -2
- package/dist/api.js +2 -2
- package/dist/channel-plugin-api.js +2 -1
- package/dist/doctor-contract-api.js +2 -1
- package/dist/index.js +2 -1
- package/dist/setup-api.js +2 -2
- package/dist/setup-entry.js +3 -2
- package/package.json +4 -4
- package/dist/.source-module-urls/219ea9f09fb313a73daa9d49cae583628627d248b038afb8d4cbf4dbf34fd43c.json +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SsrFBlockedError, createDedupeCache, createLoggerBackedRuntime, fetchWithSsrFGuard, isBlockedHostnameOrIp, ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "../runtime-api.js";
|
|
2
|
-
import { t as tlonPlugin } from "./channel-
|
|
3
|
-
import { n as setTlonRuntime } from "./runtime-
|
|
2
|
+
import { t as tlonPlugin } from "./channel-C3JZ6wZF.mjs";
|
|
3
|
+
import { n as setTlonRuntime } from "./runtime-Ck3lNvST.mjs";
|
|
4
4
|
import "../api.js";
|
|
5
5
|
export { SsrFBlockedError, createDedupeCache, createLoggerBackedRuntime, fetchWithSsrFGuard, isBlockedHostnameOrIp, setTlonRuntime, ssrfPolicyFromDangerouslyAllowPrivateNetwork, tlonPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
2
|
-
import { c as resolveTlonAccount, f as parseTlonTarget, i as tlonSetupContract, l as formatTargetHint, n as createTlonSetupWizardBase, p as resolveTlonOutboundTarget, s as listTlonAccountIds, u as normalizeShip } from "./setup-core-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-bInPRAQZ.mjs";
|
|
2
|
+
import { c as resolveTlonAccount, f as parseTlonTarget, i as tlonSetupContract, l as formatTargetHint, n as createTlonSetupWizardBase, p as resolveTlonOutboundTarget, s as listTlonAccountIds, u as normalizeShip } from "./setup-core-kO8u8noA.mjs";
|
|
3
3
|
import { buildChannelOutboundSessionRoute } from "openclaw/plugin-sdk/core";
|
|
4
4
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
5
5
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
@@ -11,7 +11,7 @@ import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState }
|
|
|
11
11
|
import { chunkTextForOutbound, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
12
12
|
import { ChannelImplicitMentionsSchema, buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
13
13
|
import { z } from "zod";
|
|
14
|
-
|
|
14
|
+
//#region extensions/tlon/src/config-schema.ts
|
|
15
15
|
const ShipSchema = z.string().min(1);
|
|
16
16
|
const ChannelNestSchema = z.string().min(1);
|
|
17
17
|
const TlonChannelRuleSchema = z.object({
|
|
@@ -63,12 +63,14 @@ const tlonChannelConfigSchema = buildChannelConfigSchema(TlonConfigSchema, { uiH
|
|
|
63
63
|
"accounts.*.requireMentionInBotThreads": botThreadMentionHint,
|
|
64
64
|
"authorization.channelRules.*.requireMentionInBotThreads": botThreadMentionHint
|
|
65
65
|
} });
|
|
66
|
-
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region extensions/tlon/src/doctor.ts
|
|
67
68
|
const tlonDoctor = {
|
|
68
69
|
legacyConfigRules,
|
|
69
70
|
normalizeCompatibilityConfig
|
|
70
71
|
};
|
|
71
|
-
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region extensions/tlon/src/session-route.ts
|
|
72
74
|
function resolveTlonOutboundSessionRoute(params) {
|
|
73
75
|
const parsed = parseTlonTarget(params.target);
|
|
74
76
|
if (!parsed) return null;
|
|
@@ -89,9 +91,10 @@ function resolveTlonOutboundSessionRoute(params) {
|
|
|
89
91
|
to: `tlon:${peerId}`
|
|
90
92
|
});
|
|
91
93
|
}
|
|
92
|
-
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region extensions/tlon/src/channel.ts
|
|
93
96
|
const TLON_CHANNEL_ID = "tlon";
|
|
94
|
-
const loadTlonChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-
|
|
97
|
+
const loadTlonChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-BzZXbsh4.mjs"));
|
|
95
98
|
const tlonSetupWizardProxy = createTlonSetupWizardBase(async (params) => await (await loadTlonChannelRuntime()).tlonSetupWizard.finalize(params));
|
|
96
99
|
const tlonConfigAdapter = createHybridChannelConfigAdapter({
|
|
97
100
|
sectionKey: TLON_CHANNEL_ID,
|
|
@@ -237,4 +240,5 @@ const tlonPlugin = createChatChannelPlugin({
|
|
|
237
240
|
},
|
|
238
241
|
outbound: tlonChannelOutbound
|
|
239
242
|
});
|
|
243
|
+
//#endregion
|
|
240
244
|
export { tlonPlugin as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as __reExport, r as __exportAll } from "./doctor-contract-
|
|
1
|
+
import { i as __reExport, r as __exportAll } from "./doctor-contract-bInPRAQZ.mjs";
|
|
2
2
|
import { createDedupeCache, createLoggerBackedRuntime } from "../runtime-api.js";
|
|
3
|
-
import { c as resolveTlonAccount, d as parseChannelNest, f as parseTlonTarget, l as formatTargetHint, o as validateUrbitBaseUrl, u as normalizeShip } from "./setup-core-
|
|
4
|
-
import { t as getTlonRuntime } from "./runtime-
|
|
5
|
-
import { t as tlonSetupWizard } from "./setup-surface-
|
|
3
|
+
import { c as resolveTlonAccount, d as parseChannelNest, f as parseTlonTarget, l as formatTargetHint, o as validateUrbitBaseUrl, u as normalizeShip } from "./setup-core-kO8u8noA.mjs";
|
|
4
|
+
import { t as getTlonRuntime } from "./runtime-Ck3lNvST.mjs";
|
|
5
|
+
import { t as tlonSetupWizard } from "./setup-surface-Byac6RoF.mjs";
|
|
6
6
|
import { fetchWithSsrFGuard, ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
7
7
|
import { bindIngressLifecycleToReplyOptions, createArmableStallWatchdog, createChannelIngressError, createChannelIngressMonitor, createMessageReceiptFromOutboundResults, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
|
|
8
8
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
@@ -25,7 +25,7 @@ import { bufferToBlobPart } from "openclaw/plugin-sdk/blob-runtime";
|
|
|
25
25
|
import { PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
|
|
26
26
|
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
|
|
27
27
|
import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
|
|
28
|
-
|
|
28
|
+
//#region extensions/tlon/src/settings.ts
|
|
29
29
|
const SETTINGS_DESK = "moltbot";
|
|
30
30
|
const SETTINGS_BUCKET = "tlon";
|
|
31
31
|
function parseJsonSetting(value) {
|
|
@@ -147,12 +147,14 @@ function createSettingsManager(api, logger) {
|
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
-
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region extensions/tlon/src/urbit/redact.ts
|
|
151
152
|
const URBIT_COOKIE_REFLECTION_RE = /\burbauth-[a-z0-9~-]+=[^\s"'(),;]+/gi;
|
|
152
153
|
function redactUrbitErrorText(text) {
|
|
153
154
|
return redactToolPayloadText(text).replace(URBIT_COOKIE_REFLECTION_RE, "***");
|
|
154
155
|
}
|
|
155
|
-
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region extensions/tlon/src/urbit/errors.ts
|
|
156
158
|
var UrbitError = class extends Error {
|
|
157
159
|
constructor(code, message, options) {
|
|
158
160
|
super(message, options);
|
|
@@ -183,7 +185,8 @@ var UrbitAuthError = class extends UrbitError {
|
|
|
183
185
|
this.name = "UrbitAuthError";
|
|
184
186
|
}
|
|
185
187
|
};
|
|
186
|
-
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region extensions/tlon/src/urbit/fetch.ts
|
|
187
190
|
async function urbitFetch(params) {
|
|
188
191
|
const validated = validateUrbitBaseUrl(params.baseUrl);
|
|
189
192
|
if (!validated.ok) throw new UrbitUrlError(validated.error);
|
|
@@ -208,7 +211,8 @@ async function urbitFetch(params) {
|
|
|
208
211
|
}
|
|
209
212
|
};
|
|
210
213
|
}
|
|
211
|
-
|
|
214
|
+
//#endregion
|
|
215
|
+
//#region extensions/tlon/src/urbit/auth.ts
|
|
212
216
|
const MAX_AUTH_BODY_DRAIN_BYTES = 65536;
|
|
213
217
|
async function authenticate(url, code, options = {}) {
|
|
214
218
|
const { response, release } = await urbitFetch({
|
|
@@ -237,7 +241,8 @@ async function authenticate(url, code, options = {}) {
|
|
|
237
241
|
await release();
|
|
238
242
|
}
|
|
239
243
|
}
|
|
240
|
-
|
|
244
|
+
//#endregion
|
|
245
|
+
//#region extensions/tlon/src/urbit/context.ts
|
|
241
246
|
function normalizeUrbitCookie(cookie) {
|
|
242
247
|
return cookie.split(";")[0] ?? cookie;
|
|
243
248
|
}
|
|
@@ -250,7 +255,8 @@ function getUrbitContext(url, ship) {
|
|
|
250
255
|
ship: (ship?.replace(/^~/, "") ?? validated.hostname.split(".")[0] ?? validated.hostname).trim()
|
|
251
256
|
};
|
|
252
257
|
}
|
|
253
|
-
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region extensions/tlon/src/urbit/story.ts
|
|
254
260
|
function matchMarkdownDestination(text, image) {
|
|
255
261
|
const prefix = (image ? /^!\[([^\]]*)\]\(/ : /^\[([^\]]+)\]\(/).exec(text);
|
|
256
262
|
if (!prefix) return null;
|
|
@@ -646,7 +652,8 @@ function markdownToStory(markdown) {
|
|
|
646
652
|
}
|
|
647
653
|
return story;
|
|
648
654
|
}
|
|
649
|
-
|
|
655
|
+
//#endregion
|
|
656
|
+
//#region extensions/tlon/src/urbit/send.ts
|
|
650
657
|
function createTlonSendReceipt(params) {
|
|
651
658
|
return createMessageReceiptFromOutboundResults({
|
|
652
659
|
results: [{
|
|
@@ -754,7 +761,8 @@ function buildMediaStory(text, mediaUrl) {
|
|
|
754
761
|
} }] });
|
|
755
762
|
return story.length > 0 ? story : [{ inline: [""] }];
|
|
756
763
|
}
|
|
757
|
-
|
|
764
|
+
//#endregion
|
|
765
|
+
//#region extensions/tlon/src/urbit/channel-ops.ts
|
|
758
766
|
async function putUrbitChannel(deps, params) {
|
|
759
767
|
return await urbitFetch({
|
|
760
768
|
baseUrl: deps.baseUrl,
|
|
@@ -865,7 +873,8 @@ async function ensureUrbitChannelOpen(deps, params) {
|
|
|
865
873
|
beforeRequest: params.beforeRequest
|
|
866
874
|
});
|
|
867
875
|
}
|
|
868
|
-
|
|
876
|
+
//#endregion
|
|
877
|
+
//#region extensions/tlon/src/urbit/sse-client.ts
|
|
869
878
|
const MAX_SSE_PAYLOAD_BYTES = 16777216;
|
|
870
879
|
const MAX_RECONNECT_ATTEMPTS = 10;
|
|
871
880
|
const SSE_STALL_TIMEOUT_MS = 6e4;
|
|
@@ -1273,7 +1282,8 @@ var UrbitSSEClient = class {
|
|
|
1273
1282
|
}
|
|
1274
1283
|
}
|
|
1275
1284
|
};
|
|
1276
|
-
|
|
1285
|
+
//#endregion
|
|
1286
|
+
//#region extensions/tlon/src/monitor/approval.ts
|
|
1277
1287
|
function generateApprovalId(type) {
|
|
1278
1288
|
return `${type}-${Date.now()}-${randomBytes(3).toString("hex")}`;
|
|
1279
1289
|
}
|
|
@@ -1369,7 +1379,8 @@ function formatPendingList(approvals) {
|
|
|
1369
1379
|
if (approvals.length === 0) return "No pending approval requests.";
|
|
1370
1380
|
return `Pending approvals (${approvals.length}):\n${approvals.map((a) => `• ${a.id}: ${a.type} from ${a.requestingShip}`).join("\n")}`;
|
|
1371
1381
|
}
|
|
1372
|
-
|
|
1382
|
+
//#endregion
|
|
1383
|
+
//#region extensions/tlon/src/monitor/approval-runtime.ts
|
|
1373
1384
|
function createTlonApprovalRuntime(params) {
|
|
1374
1385
|
const { api, runtime, botShipName, state, processApprovedMessage, refreshWatchedChannels } = params;
|
|
1375
1386
|
let approvalOverflowNoticeSent = false;
|
|
@@ -1600,7 +1611,8 @@ function createTlonApprovalRuntime(params) {
|
|
|
1600
1611
|
handleAdminCommand
|
|
1601
1612
|
};
|
|
1602
1613
|
}
|
|
1603
|
-
|
|
1614
|
+
//#endregion
|
|
1615
|
+
//#region extensions/tlon/src/monitor/authorization.ts
|
|
1604
1616
|
function resolveChannelAuthorization(cfg, channelNest, settings) {
|
|
1605
1617
|
const tlonConfig = cfg.channels?.tlon;
|
|
1606
1618
|
const fileRules = tlonConfig?.authorization?.channelRules ?? {};
|
|
@@ -1616,7 +1628,8 @@ function resolveChannelAuthorization(cfg, channelNest, settings) {
|
|
|
1616
1628
|
requireMentionInBotThreads: typeof requireMentionInBotThreads === "boolean" ? requireMentionInBotThreads : void 0
|
|
1617
1629
|
};
|
|
1618
1630
|
}
|
|
1619
|
-
|
|
1631
|
+
//#endregion
|
|
1632
|
+
//#region extensions/tlon/src/monitor/utils.ts
|
|
1620
1633
|
function formatModelName(modelString) {
|
|
1621
1634
|
if (!modelString) return "AI";
|
|
1622
1635
|
const modelName = modelString.includes("/") ? expectDefined(modelString.split("/").at(1), "provider/model second segment") : modelString;
|
|
@@ -1845,7 +1858,8 @@ function formatSummarizationHistoryText(history, cfg) {
|
|
|
1845
1858
|
envelope: envelopeOptions
|
|
1846
1859
|
})).join("\n");
|
|
1847
1860
|
}
|
|
1848
|
-
|
|
1861
|
+
//#endregion
|
|
1862
|
+
//#region extensions/tlon/src/monitor/cites.ts
|
|
1849
1863
|
const CITE_PATH_SEGMENT_RE = /^[A-Za-z0-9._~-]+$/;
|
|
1850
1864
|
const CITE_PATH_NORMALIZATION_BASE = "https://tlon.invalid";
|
|
1851
1865
|
function isSafeCitePathSegment(segment) {
|
|
@@ -1894,7 +1908,8 @@ async function resolveTlonCitations(content, api, runtime) {
|
|
|
1894
1908
|
}
|
|
1895
1909
|
return resolved.length > 0 ? `${resolved.join("\n")}\n\n` : "";
|
|
1896
1910
|
}
|
|
1897
|
-
|
|
1911
|
+
//#endregion
|
|
1912
|
+
//#region extensions/tlon/src/monitor/discovery.ts
|
|
1898
1913
|
/**
|
|
1899
1914
|
* Fetch groups-ui init data, returning channels and foreigns.
|
|
1900
1915
|
* This is a single scry that provides both channel discovery and pending invites.
|
|
@@ -1924,7 +1939,8 @@ async function fetchInitData(api, runtime) {
|
|
|
1924
1939
|
};
|
|
1925
1940
|
}
|
|
1926
1941
|
}
|
|
1927
|
-
|
|
1942
|
+
//#endregion
|
|
1943
|
+
//#region extensions/tlon/src/monitor/history.ts
|
|
1928
1944
|
/**
|
|
1929
1945
|
* Format a number as @ud (with dots every 3 digits from the right)
|
|
1930
1946
|
* e.g., 170141184507799509469114119040828178432 -> 170.141.184.507.799.509.469.114.119.040.828.178.432
|
|
@@ -2057,7 +2073,8 @@ async function fetchThreadHistory(api, channelNest, parentId, count = 50, runtim
|
|
|
2057
2073
|
return [];
|
|
2058
2074
|
}
|
|
2059
2075
|
}
|
|
2060
|
-
|
|
2076
|
+
//#endregion
|
|
2077
|
+
//#region extensions/tlon/src/monitor/ingress.ts
|
|
2061
2078
|
const TLON_INGRESS_PAYLOAD_VERSION = 1;
|
|
2062
2079
|
const TLON_INGRESS_POLL_INTERVAL_MS = 1e3;
|
|
2063
2080
|
const TlonIngressPermanentError = createChannelIngressError("TlonIngressPermanentError", { withReason: true });
|
|
@@ -2199,12 +2216,14 @@ function createTlonIngressMonitor(options) {
|
|
|
2199
2216
|
waitForIdle: monitor.waitForIdle
|
|
2200
2217
|
};
|
|
2201
2218
|
}
|
|
2202
|
-
|
|
2219
|
+
//#endregion
|
|
2220
|
+
//#region extensions/tlon/src/media-fetch-timeouts.ts
|
|
2203
2221
|
const TLON_MEDIA_FETCH_TIMEOUTS = {
|
|
2204
2222
|
responseHeaderTimeoutMs: 12e4,
|
|
2205
2223
|
readIdleTimeoutMs: 3e4
|
|
2206
2224
|
};
|
|
2207
|
-
|
|
2225
|
+
//#endregion
|
|
2226
|
+
//#region extensions/tlon/src/monitor/media.ts
|
|
2208
2227
|
const MAX_IMAGES_PER_MESSAGE = 8;
|
|
2209
2228
|
/** Keeps Tlon's shipped path-duplicating prompt bytes paired with ordered facts. */
|
|
2210
2229
|
function buildTlonInboundMediaPrompt(messageText, attachments) {
|
|
@@ -2274,7 +2293,8 @@ async function downloadMessageImages(content, maxBytes) {
|
|
|
2274
2293
|
unavailableCount
|
|
2275
2294
|
};
|
|
2276
2295
|
}
|
|
2277
|
-
|
|
2296
|
+
//#endregion
|
|
2297
|
+
//#region src/channels/mention-gating.ts
|
|
2278
2298
|
function resolveBotThreadMentionPolicy(params) {
|
|
2279
2299
|
if (!params.isBotOwnedThread || params.requireMentionInBotThreads === void 0) return {
|
|
2280
2300
|
requireMention: params.requireMention,
|
|
@@ -2285,11 +2305,13 @@ function resolveBotThreadMentionPolicy(params) {
|
|
|
2285
2305
|
implicitMentionKinds: params.requireMentionInBotThreads ? params.implicitMentionKinds?.filter((kind) => kind === "native") : params.implicitMentionKinds
|
|
2286
2306
|
};
|
|
2287
2307
|
}
|
|
2288
|
-
|
|
2308
|
+
//#endregion
|
|
2309
|
+
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/channel-mention-gating
|
|
2289
2310
|
var channel_mention_gating_exports = /* @__PURE__ */ __exportAll({ resolveBotThreadMentionPolicy: () => resolveBotThreadMentionPolicy });
|
|
2290
2311
|
import * as import_openclaw_plugin_sdk_channel_mention_gating from "openclaw/plugin-sdk/channel-mention-gating";
|
|
2291
2312
|
__reExport(channel_mention_gating_exports, import_openclaw_plugin_sdk_channel_mention_gating);
|
|
2292
|
-
|
|
2313
|
+
//#endregion
|
|
2314
|
+
//#region extensions/tlon/src/monitor/mentions.ts
|
|
2293
2315
|
function resolveTlonGroupMentionDecision(params) {
|
|
2294
2316
|
const implicitMentions = resolveChannelImplicitMentions({
|
|
2295
2317
|
cfg: params.cfg,
|
|
@@ -2353,7 +2375,8 @@ async function prepareTlonGroupAdmission(params) {
|
|
|
2353
2375
|
}
|
|
2354
2376
|
};
|
|
2355
2377
|
}
|
|
2356
|
-
|
|
2378
|
+
//#endregion
|
|
2379
|
+
//#region extensions/tlon/src/monitor/settings-helpers.ts
|
|
2357
2380
|
function buildTlonSettingsMigrations(account, currentSettings) {
|
|
2358
2381
|
return [...[
|
|
2359
2382
|
"dmAllowlist",
|
|
@@ -2407,7 +2430,8 @@ function applyTlonSettingsOverrides(params) {
|
|
|
2407
2430
|
function mergeUniqueStrings(base, next) {
|
|
2408
2431
|
return uniqueStrings([...base, ...next ?? []]);
|
|
2409
2432
|
}
|
|
2410
|
-
|
|
2433
|
+
//#endregion
|
|
2434
|
+
//#region extensions/tlon/src/monitor/tracking.ts
|
|
2411
2435
|
const TLON_PARTICIPATED_THREAD_LIMIT = 2e3;
|
|
2412
2436
|
function createParticipatedThreadTracker(limit = TLON_PARTICIPATED_THREAD_LIMIT) {
|
|
2413
2437
|
const cache = createDedupeCache({
|
|
@@ -2438,7 +2462,8 @@ function createActiveSnapshotTracker() {
|
|
|
2438
2462
|
addIfAccepted: (key, accepted) => accepted && processed.add(key)
|
|
2439
2463
|
};
|
|
2440
2464
|
}
|
|
2441
|
-
|
|
2465
|
+
//#endregion
|
|
2466
|
+
//#region extensions/tlon/src/monitor/index.ts
|
|
2442
2467
|
/** Identity for an unverified group DM (club) author claim; never matches a bare ship. */
|
|
2443
2468
|
function clubSenderId(clubId, claimedShip) {
|
|
2444
2469
|
return `club:${clubId}:${claimedShip}`;
|
|
@@ -3317,7 +3342,8 @@ async function monitorTlonProvider(opts) {
|
|
|
3317
3342
|
}
|
|
3318
3343
|
}
|
|
3319
3344
|
}
|
|
3320
|
-
|
|
3345
|
+
//#endregion
|
|
3346
|
+
//#region extensions/tlon/src/tlon-api.ts
|
|
3321
3347
|
const MEMEX_BASE_URL = "https://memex.tlon.network";
|
|
3322
3348
|
/** Max bytes to read from the Memex upload JSON response. */
|
|
3323
3349
|
const MEMEX_UPLOAD_RESPONSE_MAX_BYTES = 65536;
|
|
@@ -3523,7 +3549,8 @@ async function uploadFile(params, clientConfig) {
|
|
|
3523
3549
|
await uploadBlob(signedUrl, signedUrl.includes("digitaloceanspaces.com") ? headers : void 0);
|
|
3524
3550
|
return { url: assertSafeUploadResultUrl(storageConfig.publicUrlBase ? new URL(fileKey, storageConfig.publicUrlBase).toString() : expectDefined(signedUrl.split("?").at(0), "signed URL base segment"), "Upload result URL") };
|
|
3525
3551
|
}
|
|
3526
|
-
|
|
3552
|
+
//#endregion
|
|
3553
|
+
//#region extensions/tlon/src/urbit/upload.ts
|
|
3527
3554
|
/**
|
|
3528
3555
|
* Fetch an image from a URL and upload it to Tlon storage.
|
|
3529
3556
|
* Falls back to the original URL on error, but only after a bounded download when a cap is set.
|
|
@@ -3569,7 +3596,8 @@ async function uploadImageFromUrl(imageUrl, clientConfig, maxBytes) {
|
|
|
3569
3596
|
return imageUrl;
|
|
3570
3597
|
}
|
|
3571
3598
|
}
|
|
3572
|
-
|
|
3599
|
+
//#endregion
|
|
3600
|
+
//#region extensions/tlon/src/channel.runtime.ts
|
|
3573
3601
|
async function createHttpPokeApi(params) {
|
|
3574
3602
|
const ssrfPolicy = ssrfPolicyFromDangerouslyAllowPrivateNetwork(params.dangerouslyAllowPrivateNetwork);
|
|
3575
3603
|
const cookie = await authenticate(params.url, params.code, {
|
|
@@ -3725,4 +3753,5 @@ async function startTlonGatewayAccount(ctx) {
|
|
|
3725
3753
|
accountId: account.accountId
|
|
3726
3754
|
});
|
|
3727
3755
|
}
|
|
3756
|
+
//#endregion
|
|
3728
3757
|
export { probeTlonAccount, startTlonGatewayAccount, tlonRuntimeOutbound, tlonSetupWizard };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -23,7 +23,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
23
23
|
return to;
|
|
24
24
|
};
|
|
25
25
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
26
|
-
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region packages/normalization-core/src/record-coerce.ts
|
|
27
28
|
/** Type guard for non-array object records at browser-safe boundaries. */
|
|
28
29
|
function isRecord(value) {
|
|
29
30
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -32,7 +33,8 @@ function isRecord(value) {
|
|
|
32
33
|
function asNullableRecord(value) {
|
|
33
34
|
return isRecord(value) ? value : null;
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/config/channel-config-normalization.ts
|
|
36
38
|
/** Applies one channel-specific doctor migration to every object-shaped account. */
|
|
37
39
|
function normalizeChannelAccounts(params) {
|
|
38
40
|
const rawAccounts = asNullableRecord(params.entry.accounts);
|
|
@@ -108,7 +110,8 @@ function normalizeChannelConfigEntries(params) {
|
|
|
108
110
|
changes
|
|
109
111
|
};
|
|
110
112
|
}
|
|
111
|
-
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
112
115
|
/** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
|
|
113
116
|
function createLegacyWebhookListenerDoctorContract(params) {
|
|
114
117
|
const portKey = params.portKey ?? "webhookPort";
|
|
@@ -178,12 +181,15 @@ function createLegacyWebhookListenerDoctorContract(params) {
|
|
|
178
181
|
}
|
|
179
182
|
};
|
|
180
183
|
}
|
|
181
|
-
|
|
184
|
+
//#endregion
|
|
185
|
+
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
182
186
|
var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
|
|
183
187
|
import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
184
188
|
__reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
|
|
185
|
-
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region extensions/tlon/src/doctor-contract.ts
|
|
186
191
|
const contract = (0, runtime_doctor_migrations_exports.createLegacyPrivateNetworkDoctorContract)({ channelKey: "tlon" });
|
|
187
192
|
const legacyConfigRules = contract.legacyConfigRules;
|
|
188
193
|
const normalizeCompatibilityConfig = contract.normalizeCompatibilityConfig;
|
|
194
|
+
//#endregion
|
|
189
195
|
export { __reExport as i, normalizeCompatibilityConfig as n, __exportAll as r, legacyConfigRules as t };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
2
|
-
|
|
2
|
+
//#region extensions/tlon/src/runtime.ts
|
|
3
3
|
const { setRuntime: setTlonRuntime, getRuntime: getTlonRuntime } = createPluginRuntimeStore({
|
|
4
4
|
pluginId: "tlon",
|
|
5
5
|
errorMessage: "Tlon runtime not initialized"
|
|
6
6
|
});
|
|
7
|
+
//#endregion
|
|
7
8
|
export { setTlonRuntime as n, getTlonRuntime as t };
|
|
@@ -5,7 +5,7 @@ import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
|
5
5
|
import { DEFAULT_ACCOUNT_ID, createSetupInputPresenceValidator, createSetupTranslator, formatDocsLink, normalizeAccountId, patchScopedAccountConfig, prepareScopedSetupConfig } from "openclaw/plugin-sdk/setup";
|
|
6
6
|
import { normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/account-resolution";
|
|
8
|
-
|
|
8
|
+
//#region extensions/tlon/src/targets.ts
|
|
9
9
|
const SHIP_RE = /^~?[a-z-]+$/i;
|
|
10
10
|
const NEST_RE = /^chat\/([^/]+)\/([^/]+)$/i;
|
|
11
11
|
function normalizeShip(raw) {
|
|
@@ -82,7 +82,8 @@ function resolveTlonOutboundTarget(to) {
|
|
|
82
82
|
function formatTargetHint() {
|
|
83
83
|
return "dm/~sampel-palnet | ~sampel-palnet | chat/~host-ship/channel | group:~host-ship/channel";
|
|
84
84
|
}
|
|
85
|
-
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region extensions/tlon/src/account-fields.ts
|
|
86
87
|
function buildTlonAccountFields(input) {
|
|
87
88
|
return {
|
|
88
89
|
...input.ship ? { ship: input.ship } : {},
|
|
@@ -95,7 +96,8 @@ function buildTlonAccountFields(input) {
|
|
|
95
96
|
...input.ownerShip ? { ownerShip: input.ownerShip } : {}
|
|
96
97
|
};
|
|
97
98
|
}
|
|
98
|
-
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region extensions/tlon/src/types.ts
|
|
99
101
|
function resolveTlonChannelConfig(cfg) {
|
|
100
102
|
return cfg.channels?.tlon;
|
|
101
103
|
}
|
|
@@ -144,7 +146,8 @@ function resolveTlonAccount(cfg, accountId) {
|
|
|
144
146
|
ownerShip: merged.ownerShip ?? null
|
|
145
147
|
};
|
|
146
148
|
}
|
|
147
|
-
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region extensions/tlon/src/urbit/base-url.ts
|
|
148
151
|
function normalizeUrbitHostname(hostname) {
|
|
149
152
|
return (hostname ?? "").trim().toLowerCase().replace(/\.$/, "");
|
|
150
153
|
}
|
|
@@ -185,7 +188,8 @@ function isBlockedUrbitHostname(hostname) {
|
|
|
185
188
|
if (!normalized) return false;
|
|
186
189
|
return isBlockedHostnameOrIp(normalized);
|
|
187
190
|
}
|
|
188
|
-
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region extensions/tlon/src/setup-core.ts
|
|
189
193
|
const t = createSetupTranslator();
|
|
190
194
|
function createTlonSetupWizardBase(finalize) {
|
|
191
195
|
return {
|
|
@@ -396,4 +400,5 @@ const tlonSetupContract = defineChannelSetupContract({
|
|
|
396
400
|
},
|
|
397
401
|
legacyAdapter: tlonSetupAdapter
|
|
398
402
|
});
|
|
403
|
+
//#endregion
|
|
399
404
|
export { isBlockedUrbitHostname as a, resolveTlonAccount as c, parseChannelNest as d, parseTlonTarget as f, tlonSetupContract as i, formatTargetHint as l, createTlonSetupWizardBase as n, validateUrbitBaseUrl as o, resolveTlonOutboundTarget as p, tlonSetupAdapter as r, listTlonAccountIds as s, applyTlonSetupConfig as t, normalizeShip as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as isBlockedUrbitHostname, c as resolveTlonAccount, n as createTlonSetupWizardBase, o as validateUrbitBaseUrl, t as applyTlonSetupConfig, u as normalizeShip } from "./setup-core-
|
|
1
|
+
import { a as isBlockedUrbitHostname, c as resolveTlonAccount, n as createTlonSetupWizardBase, o as validateUrbitBaseUrl, t as applyTlonSetupConfig, u as normalizeShip } from "./setup-core-kO8u8noA.mjs";
|
|
2
2
|
import { createSetupTranslator, splitSetupEntries } from "openclaw/plugin-sdk/setup-runtime";
|
|
3
|
-
|
|
3
|
+
//#region extensions/tlon/src/setup-surface.ts
|
|
4
4
|
const t = createSetupTranslator();
|
|
5
5
|
const tlonSetupWizard = createTlonSetupWizardBase(async ({ cfg, accountId, prompter }) => {
|
|
6
6
|
let next = cfg;
|
|
@@ -63,4 +63,5 @@ const tlonSetupWizard = createTlonSetupWizardBase(async ({ cfg, accountId, promp
|
|
|
63
63
|
});
|
|
64
64
|
return { cfg: next };
|
|
65
65
|
});
|
|
66
|
+
//#endregion
|
|
66
67
|
export { tlonSetupWizard as t };
|
package/dist/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SsrFBlockedError, createDedupeCache, createLoggerBackedRuntime, fetchWithSsrFGuard, isBlockedHostnameOrIp, ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "./runtime-api.js";
|
|
2
|
-
import { t as tlonPlugin } from "./.setup/channel-
|
|
3
|
-
import { n as setTlonRuntime } from "./.setup/runtime-
|
|
2
|
+
import { t as tlonPlugin } from "./.setup/channel-C3JZ6wZF.mjs";
|
|
3
|
+
import { n as setTlonRuntime } from "./.setup/runtime-Ck3lNvST.mjs";
|
|
4
4
|
export { SsrFBlockedError, createDedupeCache, createLoggerBackedRuntime, fetchWithSsrFGuard, isBlockedHostnameOrIp, setTlonRuntime, ssrfPolicyFromDangerouslyAllowPrivateNetwork, tlonPlugin };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { t as tlonPlugin } from "./.setup/channel-C3JZ6wZF.mjs";
|
|
2
|
+
export { tlonPlugin };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./.setup/doctor-contract-bInPRAQZ.mjs";
|
|
2
|
+
export { legacyConfigRules, normalizeCompatibilityConfig };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
|
-
|
|
2
|
+
//#region extensions/tlon/index.ts
|
|
3
3
|
var tlon_default = defineBundledChannelEntry({
|
|
4
4
|
id: "tlon",
|
|
5
5
|
name: "Tlon",
|
|
@@ -14,4 +14,5 @@ var tlon_default = defineBundledChannelEntry({
|
|
|
14
14
|
exportName: "setTlonRuntime"
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
+
//#endregion
|
|
17
18
|
export { tlon_default as default };
|
package/dist/setup-api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { r as tlonSetupAdapter } from "./.setup/setup-core-
|
|
2
|
-
import { t as tlonSetupWizard } from "./.setup/setup-surface-
|
|
1
|
+
import { r as tlonSetupAdapter } from "./.setup/setup-core-kO8u8noA.mjs";
|
|
2
|
+
import { t as tlonSetupWizard } from "./.setup/setup-surface-Byac6RoF.mjs";
|
|
3
3
|
export { tlonSetupAdapter, tlonSetupWizard };
|
package/dist/setup-entry.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
|
|
3
|
+
//#region extensions/tlon/setup-entry.ts
|
|
4
4
|
var setup_entry_default = defineBundledChannelSetupEntry({
|
|
5
5
|
importMetaUrl: import.meta.url,
|
|
6
6
|
plugin: {
|
|
7
|
-
specifier: fileURLToPath(new URL(".setup/api-
|
|
7
|
+
specifier: fileURLToPath(new URL(".setup/api-DCWWT3CU.mjs", import.meta.url).href),
|
|
8
8
|
exportName: "tlonPlugin"
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
+
//#endregion
|
|
11
12
|
export { setup_entry_default as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/tlon",
|
|
3
|
-
"version": "2026.11.
|
|
3
|
+
"version": "2026.11.2",
|
|
4
4
|
"description": "OpenClaw Tlon/Urbit channel plugin for chat workflows.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"openclaw": "workspace:*"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"openclaw": ">=2026.11.
|
|
22
|
+
"openclaw": ">=2026.11.2"
|
|
23
23
|
},
|
|
24
24
|
"peerDependenciesMeta": {
|
|
25
25
|
"openclaw": {
|
|
@@ -121,10 +121,10 @@
|
|
|
121
121
|
"minHostVersion": ">=2026.4.10"
|
|
122
122
|
},
|
|
123
123
|
"compat": {
|
|
124
|
-
"pluginApi": ">=2026.11.
|
|
124
|
+
"pluginApi": ">=2026.11.2"
|
|
125
125
|
},
|
|
126
126
|
"build": {
|
|
127
|
-
"openclawVersion": "2026.11.
|
|
127
|
+
"openclawVersion": "2026.11.2"
|
|
128
128
|
},
|
|
129
129
|
"release": {
|
|
130
130
|
"bundleRuntimeDependencies": false,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"entries":[{"output":"api.js","source":"extensions/tlon/api.ts"},{"output":"channel-plugin-api.js","source":"extensions/tlon/channel-plugin-api.ts"},{"output":"doctor-contract-api.js","source":"extensions/tlon/doctor-contract-api.ts"},{"output":"index.js","source":"extensions/tlon/index.ts"},{"output":"runtime-api.js","source":"extensions/tlon/runtime-api.ts"},{"output":"setup-api.js","source":"extensions/tlon/setup-api.ts"},{"output":"setup-entry.js","source":"extensions/tlon/setup-entry.ts"}],"chunks":[{"output":".setup/api-HlSecO8_.mjs","sha256":"e087a8df7d359cd2aa6a333185d2e52aa5c7b39ac52504ebcb2e18cf2d87d776","facadeSource":"extensions/tlon/api.ts","sources":[]},{"output":".setup/channel-geUIVRFJ.mjs","sha256":"bf29ea4811275528e50f214535edd40e0f2d90d208e73d943f1babce369efb09","facadeSource":null,"sources":["extensions/tlon/src/channel.ts","extensions/tlon/src/config-schema.ts","extensions/tlon/src/doctor.ts","extensions/tlon/src/session-route.ts"]},{"output":".setup/channel.runtime-DRjOGubO.mjs","sha256":"eeb3d0414918d1875670778b5ccf72a3e8a39367510cdc76443dad1193a5f486","facadeSource":"extensions/tlon/src/channel.runtime.ts","sources":["extensions/tlon/src/channel.runtime.ts","extensions/tlon/src/media-fetch-timeouts.ts","extensions/tlon/src/monitor/approval-runtime.ts","extensions/tlon/src/monitor/approval.ts","extensions/tlon/src/monitor/authorization.ts","extensions/tlon/src/monitor/cites.ts","extensions/tlon/src/monitor/discovery.ts","extensions/tlon/src/monitor/history.ts","extensions/tlon/src/monitor/index.ts","extensions/tlon/src/monitor/ingress.ts","extensions/tlon/src/monitor/media.ts","extensions/tlon/src/monitor/mentions.ts","extensions/tlon/src/monitor/settings-helpers.ts","extensions/tlon/src/monitor/tracking.ts","extensions/tlon/src/monitor/utils.ts","extensions/tlon/src/settings.ts","extensions/tlon/src/tlon-api.ts","extensions/tlon/src/urbit/auth.ts","extensions/tlon/src/urbit/channel-ops.ts","extensions/tlon/src/urbit/context.ts","extensions/tlon/src/urbit/errors.ts","extensions/tlon/src/urbit/fetch.ts","extensions/tlon/src/urbit/redact.ts","extensions/tlon/src/urbit/send.ts","extensions/tlon/src/urbit/sse-client.ts","extensions/tlon/src/urbit/story.ts","extensions/tlon/src/urbit/upload.ts","src/channels/mention-gating.ts"]},{"output":".setup/doctor-contract-CfYeTj9o.mjs","sha256":"cd414672cef0faa7cc964028ec840a10c720f80b8c416ea4695a16931c249e63","facadeSource":null,"sources":["extensions/tlon/src/doctor-contract.ts","packages/normalization-core/src/record-coerce.ts","src/config/channel-config-normalization.ts","src/plugin-sdk/legacy-webhook-listener-migration.ts"]},{"output":".setup/runtime-ReERXJF_.mjs","sha256":"23ea20b9a79e00a2a761e2c1ee5753526019a34f8a5c9caa26b7f9fed435292e","facadeSource":null,"sources":["extensions/tlon/src/runtime.ts"]},{"output":".setup/setup-core-DnIfSMDp.mjs","sha256":"02128acec62c980ca0c7d904c99a4a6b7ce8604eea03f7b1f5af8f1fc2c56cfc","facadeSource":null,"sources":["extensions/tlon/src/account-fields.ts","extensions/tlon/src/setup-core.ts","extensions/tlon/src/targets.ts","extensions/tlon/src/types.ts","extensions/tlon/src/urbit/base-url.ts"]},{"output":".setup/setup-surface-CTiMlwQy.mjs","sha256":"0786c7d6949cb80b8b4801864ef3b729c43ac19bb102189e3f2e160c5ed5a21f","facadeSource":null,"sources":["extensions/tlon/src/setup-surface.ts"]},{"output":"api.js","sha256":"19a21d53dda7767adae6bbf7366b61918c8f3775a235731a31608492b03b94d2","facadeSource":"extensions/tlon/api.ts","sources":[]},{"output":"channel-plugin-api.js","sha256":"21f9e084da2dea77074105fa53be4fa6b2bbebd51ec5243bb44993aa22c0932c","facadeSource":"extensions/tlon/channel-plugin-api.ts","sources":[]},{"output":"doctor-contract-api.js","sha256":"269771e05b29fb710fa0c235a6c197e7bdae2550a2607fae3dcb5befd600a040","facadeSource":"extensions/tlon/doctor-contract-api.ts","sources":[]},{"output":"index.js","sha256":"71964a841ad9ec38d0abc3cbbb090b3d19f452a5070009a62ced5883999abd41","facadeSource":"extensions/tlon/index.ts","sources":["extensions/tlon/index.ts"]},{"output":"runtime-api.js","sha256":"84b5cef46a80daf5dd78edb6afd45310e3877e6d91d56716af7992f38f01e7cb","facadeSource":"extensions/tlon/runtime-api.ts","sources":[]},{"output":"setup-api.js","sha256":"c0e9f3d9df38b6d0f2f90b20a17ef0ed157577889e3bba70c958e89e86a8e87a","facadeSource":"extensions/tlon/setup-api.ts","sources":[]},{"output":"setup-entry.js","sha256":"11b5137991152eb7d94010369db401d00f75260dcae27a8e53070153021e1242","facadeSource":"extensions/tlon/setup-entry.ts","sources":["extensions/tlon/setup-entry.ts"]}],"unrenderedSources":["extensions/tlon/api.ts","extensions/tlon/channel-plugin-api.ts","extensions/tlon/config-doctor-api.ts","extensions/tlon/doctor-contract-api.ts","extensions/tlon/runtime-api.ts","extensions/tlon/setup-api.ts"]}
|