@openclaw/tlon 2026.11.5-beta.1 → 2026.11.5-beta.3
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-C6K2sVAS.mjs → api-C3N9E4O0.mjs} +2 -2
- package/dist/.setup/{channel-D7_rs7Qi.mjs → channel-bmlV7Bo5.mjs} +9 -6
- package/dist/.setup/{channel.runtime-BVE1h2Io.mjs → channel.runtime-CGmlLjBi.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-BjuM9rjU.mjs → setup-core-Cfw9JPWJ.mjs} +8 -4
- package/dist/.setup/{setup-surface-CsTGExtf.mjs → setup-surface-C0_CutPR.mjs} +3 -2
- package/dist/.source-module-urls/219ea9f09fb313a73daa9d49cae583628627d248b038afb8d4cbf4dbf34fd43c.json +1 -1
- package/dist/api.js +2 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -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
|
@@ -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-bmlV7Bo5.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-Cfw9JPWJ.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/channel.ts
|
|
72
74
|
const TLON_CHANNEL_ID = "tlon";
|
|
73
75
|
function resolveTlonOutboundSessionRoute(params) {
|
|
74
76
|
const parsed = parseTlonTarget(params.target);
|
|
@@ -90,7 +92,7 @@ function resolveTlonOutboundSessionRoute(params) {
|
|
|
90
92
|
to: `tlon:${peerId}`
|
|
91
93
|
});
|
|
92
94
|
}
|
|
93
|
-
const loadTlonChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-
|
|
95
|
+
const loadTlonChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-CGmlLjBi.mjs"));
|
|
94
96
|
const tlonSetupWizardProxy = createTlonSetupWizardBase(async (params) => await (await loadTlonChannelRuntime()).tlonSetupWizard.finalize(params));
|
|
95
97
|
const tlonConfigAdapter = createHybridChannelConfigAdapter({
|
|
96
98
|
sectionKey: TLON_CHANNEL_ID,
|
|
@@ -236,4 +238,5 @@ const tlonPlugin = createChatChannelPlugin({
|
|
|
236
238
|
},
|
|
237
239
|
outbound: tlonChannelOutbound
|
|
238
240
|
});
|
|
241
|
+
//#endregion
|
|
239
242
|
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-Cfw9JPWJ.mjs";
|
|
4
|
+
import { t as getTlonRuntime } from "./runtime-Ck3lNvST.mjs";
|
|
5
|
+
import { t as tlonSetupWizard } from "./setup-surface-C0_CutPR.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 { asBoolean, asFiniteNumber, asNullableRecord, filterStringEntries, normalizeLowercaseStringOrEmpty, normalizeNullableString, readStringField, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-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 UrbitUrlError = class extends Error {
|
|
157
159
|
constructor(message) {
|
|
158
160
|
super(message);
|
|
@@ -174,7 +176,8 @@ var UrbitAuthError = class extends Error {
|
|
|
174
176
|
this.name = "UrbitAuthError";
|
|
175
177
|
}
|
|
176
178
|
};
|
|
177
|
-
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region extensions/tlon/src/urbit/fetch.ts
|
|
178
181
|
async function urbitFetch(params) {
|
|
179
182
|
const validated = validateUrbitBaseUrl(params.baseUrl);
|
|
180
183
|
if (!validated.ok) throw new UrbitUrlError(validated.error);
|
|
@@ -197,7 +200,8 @@ async function urbitFetch(params) {
|
|
|
197
200
|
}
|
|
198
201
|
};
|
|
199
202
|
}
|
|
200
|
-
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region extensions/tlon/src/urbit/auth.ts
|
|
201
205
|
const MAX_AUTH_BODY_DRAIN_BYTES = 65536;
|
|
202
206
|
async function authenticate(url, code, options = {}) {
|
|
203
207
|
const { response, release } = await urbitFetch({
|
|
@@ -224,7 +228,8 @@ async function authenticate(url, code, options = {}) {
|
|
|
224
228
|
await release();
|
|
225
229
|
}
|
|
226
230
|
}
|
|
227
|
-
|
|
231
|
+
//#endregion
|
|
232
|
+
//#region extensions/tlon/src/urbit/context.ts
|
|
228
233
|
function normalizeUrbitCookie(cookie) {
|
|
229
234
|
return cookie.split(";")[0] ?? cookie;
|
|
230
235
|
}
|
|
@@ -236,7 +241,8 @@ function getUrbitContext(url, ship) {
|
|
|
236
241
|
ship: (ship?.replace(/^~/, "") ?? validated.hostname.split(".")[0] ?? validated.hostname).trim()
|
|
237
242
|
};
|
|
238
243
|
}
|
|
239
|
-
|
|
244
|
+
//#endregion
|
|
245
|
+
//#region extensions/tlon/src/urbit/story.ts
|
|
240
246
|
function matchMarkdownDestination(text, image) {
|
|
241
247
|
const prefix = (image ? /^!\[([^\]]*)\]\(/ : /^\[([^\]]+)\]\(/).exec(text);
|
|
242
248
|
if (!prefix) return null;
|
|
@@ -626,7 +632,8 @@ function markdownToStory(markdown) {
|
|
|
626
632
|
}
|
|
627
633
|
return story;
|
|
628
634
|
}
|
|
629
|
-
|
|
635
|
+
//#endregion
|
|
636
|
+
//#region extensions/tlon/src/urbit/send.ts
|
|
630
637
|
function createTlonSendReceipt(params) {
|
|
631
638
|
return createMessageReceiptFromOutboundResults({
|
|
632
639
|
results: [{
|
|
@@ -734,7 +741,8 @@ function buildMediaStory(text, mediaUrl) {
|
|
|
734
741
|
} }] });
|
|
735
742
|
return story.length > 0 ? story : [{ inline: [""] }];
|
|
736
743
|
}
|
|
737
|
-
|
|
744
|
+
//#endregion
|
|
745
|
+
//#region extensions/tlon/src/urbit/channel-ops.ts
|
|
738
746
|
async function putUrbitChannel(deps, params) {
|
|
739
747
|
return await urbitFetch({
|
|
740
748
|
baseUrl: deps.baseUrl,
|
|
@@ -842,7 +850,8 @@ async function ensureUrbitChannelOpen(deps, params) {
|
|
|
842
850
|
beforeRequest: params.beforeRequest
|
|
843
851
|
});
|
|
844
852
|
}
|
|
845
|
-
|
|
853
|
+
//#endregion
|
|
854
|
+
//#region extensions/tlon/src/urbit/sse-client.ts
|
|
846
855
|
const MAX_SSE_PAYLOAD_BYTES = 16777216;
|
|
847
856
|
const MAX_RECONNECT_ATTEMPTS = 10;
|
|
848
857
|
const SSE_STALL_TIMEOUT_MS = 6e4;
|
|
@@ -1231,7 +1240,8 @@ var UrbitSSEClient = class {
|
|
|
1231
1240
|
}
|
|
1232
1241
|
}
|
|
1233
1242
|
};
|
|
1234
|
-
|
|
1243
|
+
//#endregion
|
|
1244
|
+
//#region extensions/tlon/src/monitor/approval.ts
|
|
1235
1245
|
function createPendingApproval(params) {
|
|
1236
1246
|
const timestamp = Date.now();
|
|
1237
1247
|
return {
|
|
@@ -1327,7 +1337,8 @@ function formatPendingList(approvals) {
|
|
|
1327
1337
|
if (approvals.length === 0) return "No pending approval requests.";
|
|
1328
1338
|
return `Pending approvals (${approvals.length}):\n${approvals.map((a) => `• ${a.id}: ${a.type} from ${a.requestingShip}`).join("\n")}`;
|
|
1329
1339
|
}
|
|
1330
|
-
|
|
1340
|
+
//#endregion
|
|
1341
|
+
//#region extensions/tlon/src/monitor/approval-runtime.ts
|
|
1331
1342
|
function createTlonApprovalRuntime(params) {
|
|
1332
1343
|
const { api, runtime, botShipName, state, processApprovedMessage, refreshWatchedChannels } = params;
|
|
1333
1344
|
let approvalOverflowNoticeSent = false;
|
|
@@ -1558,7 +1569,8 @@ function createTlonApprovalRuntime(params) {
|
|
|
1558
1569
|
handleAdminCommand
|
|
1559
1570
|
};
|
|
1560
1571
|
}
|
|
1561
|
-
|
|
1572
|
+
//#endregion
|
|
1573
|
+
//#region extensions/tlon/src/monitor/authorization.ts
|
|
1562
1574
|
function resolveChannelAuthorization(cfg, channelNest, settings) {
|
|
1563
1575
|
const tlonConfig = cfg.channels?.tlon;
|
|
1564
1576
|
const fileRules = tlonConfig?.authorization?.channelRules ?? {};
|
|
@@ -1574,7 +1586,8 @@ function resolveChannelAuthorization(cfg, channelNest, settings) {
|
|
|
1574
1586
|
requireMentionInBotThreads: typeof requireMentionInBotThreads === "boolean" ? requireMentionInBotThreads : void 0
|
|
1575
1587
|
};
|
|
1576
1588
|
}
|
|
1577
|
-
|
|
1589
|
+
//#endregion
|
|
1590
|
+
//#region extensions/tlon/src/monitor/utils.ts
|
|
1578
1591
|
function formatModelName(modelString) {
|
|
1579
1592
|
if (!modelString) return "AI";
|
|
1580
1593
|
const modelName = modelString.includes("/") ? expectDefined(modelString.split("/").at(1), "provider/model second segment") : modelString;
|
|
@@ -1795,7 +1808,8 @@ function formatSummarizationHistoryText(history, cfg) {
|
|
|
1795
1808
|
envelope: envelopeOptions
|
|
1796
1809
|
})).join("\n");
|
|
1797
1810
|
}
|
|
1798
|
-
|
|
1811
|
+
//#endregion
|
|
1812
|
+
//#region extensions/tlon/src/monitor/cites.ts
|
|
1799
1813
|
const CITE_PATH_SEGMENT_RE = /^[A-Za-z0-9._~-]+$/;
|
|
1800
1814
|
const CITE_PATH_NORMALIZATION_BASE = "https://tlon.invalid";
|
|
1801
1815
|
const CITATION_SCOPE_SKIP_LOG = "[tlon] Skipping cited post: citation is outside explicit channel scope";
|
|
@@ -1860,7 +1874,8 @@ async function resolveTlonCitations(content, canExpandNest, api, runtime) {
|
|
|
1860
1874
|
}
|
|
1861
1875
|
return resolved.length > 0 ? `${resolved.join("\n")}\n\n` : "";
|
|
1862
1876
|
}
|
|
1863
|
-
|
|
1877
|
+
//#endregion
|
|
1878
|
+
//#region extensions/tlon/src/monitor/discovery.ts
|
|
1864
1879
|
/**
|
|
1865
1880
|
* Fetch groups-ui init data, returning channels and foreigns.
|
|
1866
1881
|
* This is a single scry that provides both channel discovery and pending invites.
|
|
@@ -1890,7 +1905,8 @@ async function fetchInitData(api, runtime) {
|
|
|
1890
1905
|
};
|
|
1891
1906
|
}
|
|
1892
1907
|
}
|
|
1893
|
-
|
|
1908
|
+
//#endregion
|
|
1909
|
+
//#region extensions/tlon/src/monitor/history.ts
|
|
1894
1910
|
/**
|
|
1895
1911
|
* Format a number as @ud (with dots every 3 digits from the right)
|
|
1896
1912
|
* e.g., 170141184507799509469114119040828178432 -> 170.141.184.507.799.509.469.114.119.040.828.178.432
|
|
@@ -2012,7 +2028,8 @@ async function fetchThreadHistory(api, channelNest, parentId, runtime) {
|
|
|
2012
2028
|
return [];
|
|
2013
2029
|
}
|
|
2014
2030
|
}
|
|
2015
|
-
|
|
2031
|
+
//#endregion
|
|
2032
|
+
//#region extensions/tlon/src/monitor/ingress.ts
|
|
2016
2033
|
const TLON_INGRESS_PAYLOAD_VERSION = 1;
|
|
2017
2034
|
const TlonIngressPermanentError = createChannelIngressError("TlonIngressPermanentError", { withReason: true });
|
|
2018
2035
|
var TlonIngressUnserializableEventError = class extends Error {
|
|
@@ -2167,12 +2184,14 @@ function createTlonIngressMonitor(options) {
|
|
|
2167
2184
|
waitForIdle: monitor.waitForIdle
|
|
2168
2185
|
};
|
|
2169
2186
|
}
|
|
2170
|
-
|
|
2187
|
+
//#endregion
|
|
2188
|
+
//#region extensions/tlon/src/media-fetch-timeouts.ts
|
|
2171
2189
|
const TLON_MEDIA_FETCH_TIMEOUTS = {
|
|
2172
2190
|
responseHeaderTimeoutMs: 12e4,
|
|
2173
2191
|
readIdleTimeoutMs: 3e4
|
|
2174
2192
|
};
|
|
2175
|
-
|
|
2193
|
+
//#endregion
|
|
2194
|
+
//#region extensions/tlon/src/monitor/media.ts
|
|
2176
2195
|
const MAX_IMAGES_PER_MESSAGE = 8;
|
|
2177
2196
|
/** Keeps Tlon's shipped path-duplicating prompt bytes paired with ordered facts. */
|
|
2178
2197
|
function buildTlonInboundMediaPrompt(messageText, media) {
|
|
@@ -2225,7 +2244,8 @@ async function downloadMessageImages(content, maxBytes) {
|
|
|
2225
2244
|
unavailableCount
|
|
2226
2245
|
};
|
|
2227
2246
|
}
|
|
2228
|
-
|
|
2247
|
+
//#endregion
|
|
2248
|
+
//#region src/channels/mention-gating.ts
|
|
2229
2249
|
function resolveBotThreadMentionPolicy(params) {
|
|
2230
2250
|
if (!params.isBotOwnedThread || params.requireMentionInBotThreads === void 0) return {
|
|
2231
2251
|
requireMention: params.requireMention,
|
|
@@ -2236,11 +2256,13 @@ function resolveBotThreadMentionPolicy(params) {
|
|
|
2236
2256
|
implicitMentionKinds: params.requireMentionInBotThreads ? params.implicitMentionKinds?.filter((kind) => kind === "native") : params.implicitMentionKinds
|
|
2237
2257
|
};
|
|
2238
2258
|
}
|
|
2239
|
-
|
|
2259
|
+
//#endregion
|
|
2260
|
+
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/channel-mention-gating
|
|
2240
2261
|
var channel_mention_gating_exports = /* @__PURE__ */ __exportAll({ resolveBotThreadMentionPolicy: () => resolveBotThreadMentionPolicy });
|
|
2241
2262
|
import * as import_openclaw_plugin_sdk_channel_mention_gating from "openclaw/plugin-sdk/channel-mention-gating";
|
|
2242
2263
|
__reExport(channel_mention_gating_exports, import_openclaw_plugin_sdk_channel_mention_gating);
|
|
2243
|
-
|
|
2264
|
+
//#endregion
|
|
2265
|
+
//#region extensions/tlon/src/monitor/mentions.ts
|
|
2244
2266
|
async function prepareTlonGroupAdmission(params) {
|
|
2245
2267
|
const { cfg, account, channelNest, botShipName, runtime } = params;
|
|
2246
2268
|
const parentId = readStringField(params.messageSeal, "parent-id") ?? readStringField(params.messageSeal, "parent") ?? null;
|
|
@@ -2296,7 +2318,8 @@ async function prepareTlonGroupAdmission(params) {
|
|
|
2296
2318
|
}
|
|
2297
2319
|
};
|
|
2298
2320
|
}
|
|
2299
|
-
|
|
2321
|
+
//#endregion
|
|
2322
|
+
//#region extensions/tlon/src/monitor/settings-helpers.ts
|
|
2300
2323
|
function buildTlonSettingsMigrations(account, currentSettings) {
|
|
2301
2324
|
return [...[
|
|
2302
2325
|
"dmAllowlist",
|
|
@@ -2366,7 +2389,8 @@ function createTlonSettingsInstaller(state, account, log) {
|
|
|
2366
2389
|
}
|
|
2367
2390
|
};
|
|
2368
2391
|
}
|
|
2369
|
-
|
|
2392
|
+
//#endregion
|
|
2393
|
+
//#region extensions/tlon/src/monitor/tracking.ts
|
|
2370
2394
|
function createParticipatedThreadTracker() {
|
|
2371
2395
|
const cache = createDedupeCache({
|
|
2372
2396
|
ttlMs: 0,
|
|
@@ -2396,7 +2420,8 @@ function createActiveSnapshotTracker() {
|
|
|
2396
2420
|
addIfAccepted: (key, accepted) => accepted && processed.add(key)
|
|
2397
2421
|
};
|
|
2398
2422
|
}
|
|
2399
|
-
|
|
2423
|
+
//#endregion
|
|
2424
|
+
//#region extensions/tlon/src/monitor/index.ts
|
|
2400
2425
|
/** Identity for an unverified group DM (club) author claim; never matches a bare ship. */
|
|
2401
2426
|
function clubSenderId(clubId, claimedShip) {
|
|
2402
2427
|
return `club:${clubId}:${claimedShip}`;
|
|
@@ -3225,7 +3250,8 @@ async function monitorTlonProvider(opts) {
|
|
|
3225
3250
|
}
|
|
3226
3251
|
}
|
|
3227
3252
|
}
|
|
3228
|
-
|
|
3253
|
+
//#endregion
|
|
3254
|
+
//#region extensions/tlon/src/tlon-api.ts
|
|
3229
3255
|
const MEMEX_BASE_URL = "https://memex.tlon.network";
|
|
3230
3256
|
/** Max bytes to read from the Memex upload JSON response. */
|
|
3231
3257
|
const MEMEX_UPLOAD_RESPONSE_MAX_BYTES = 65536;
|
|
@@ -3432,7 +3458,8 @@ async function uploadFile(params, clientConfig) {
|
|
|
3432
3458
|
await uploadBlob(signedUrl, signedUrl.includes("digitaloceanspaces.com") ? headers : void 0);
|
|
3433
3459
|
return { url: assertSafeUploadResultUrl(storageConfig.publicUrlBase ? buildCustomS3PublicUrl(storageConfig.publicUrlBase, fileKey) : expectDefined(signedUrl.split("?").at(0), "signed URL base segment"), "Upload result URL") };
|
|
3434
3460
|
}
|
|
3435
|
-
|
|
3461
|
+
//#endregion
|
|
3462
|
+
//#region extensions/tlon/src/urbit/upload.ts
|
|
3436
3463
|
/**
|
|
3437
3464
|
* Fetch an image from a URL and upload it to Tlon storage.
|
|
3438
3465
|
* Falls back to the original URL on error, but only after a bounded download when a cap is set.
|
|
@@ -3478,7 +3505,8 @@ async function uploadImageFromUrl(imageUrl, clientConfig, maxBytes) {
|
|
|
3478
3505
|
return imageUrl;
|
|
3479
3506
|
}
|
|
3480
3507
|
}
|
|
3481
|
-
|
|
3508
|
+
//#endregion
|
|
3509
|
+
//#region extensions/tlon/src/channel.runtime.ts
|
|
3482
3510
|
function resolveReplyId(replyToId, threadId) {
|
|
3483
3511
|
return replyToId ?? threadId ? String(replyToId ?? threadId) : void 0;
|
|
3484
3512
|
}
|
|
@@ -3598,4 +3626,5 @@ async function startTlonGatewayAccount(ctx) {
|
|
|
3598
3626
|
accountId: account.accountId
|
|
3599
3627
|
});
|
|
3600
3628
|
}
|
|
3629
|
+
//#endregion
|
|
3601
3630
|
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 { DEFAULT_ACCOUNT_ID, createSetupInputPresenceValidator, createSetupTrans
|
|
|
5
5
|
import { normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { expectDefined } from "openclaw/plugin-sdk/expect-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/types.ts
|
|
86
87
|
function resolveTlonChannelConfig(cfg) {
|
|
87
88
|
return cfg.channels?.tlon;
|
|
88
89
|
}
|
|
@@ -131,7 +132,8 @@ function resolveTlonAccount(cfg, accountId) {
|
|
|
131
132
|
ownerShip: merged.ownerShip ?? null
|
|
132
133
|
};
|
|
133
134
|
}
|
|
134
|
-
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region extensions/tlon/src/urbit/base-url.ts
|
|
135
137
|
function normalizeUrbitHostname(hostname) {
|
|
136
138
|
return (hostname ?? "").trim().toLowerCase().replace(/\.$/, "");
|
|
137
139
|
}
|
|
@@ -172,7 +174,8 @@ function isBlockedUrbitHostname(hostname) {
|
|
|
172
174
|
if (!normalized) return false;
|
|
173
175
|
return isBlockedHostnameOrIp(normalized);
|
|
174
176
|
}
|
|
175
|
-
|
|
177
|
+
//#endregion
|
|
178
|
+
//#region extensions/tlon/src/setup-core.ts
|
|
176
179
|
const t = createSetupTranslator();
|
|
177
180
|
function createTlonSetupWizardBase(finalize) {
|
|
178
181
|
return {
|
|
@@ -392,4 +395,5 @@ const tlonSetupContract = defineChannelSetupContract({
|
|
|
392
395
|
},
|
|
393
396
|
legacyAdapter: tlonSetupAdapter
|
|
394
397
|
});
|
|
398
|
+
//#endregion
|
|
395
399
|
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-Cfw9JPWJ.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;
|
|
@@ -51,4 +51,5 @@ const tlonSetupWizard = createTlonSetupWizardBase(async ({ cfg, accountId, promp
|
|
|
51
51
|
});
|
|
52
52
|
return { cfg: next };
|
|
53
53
|
});
|
|
54
|
+
//#endregion
|
|
54
55
|
export { tlonSetupWizard as t };
|
|
@@ -1 +1 @@
|
|
|
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-
|
|
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-C3N9E4O0.mjs","sha256":"84e553f1110a8ff8e0ad5301c965537ab50b8d3410b4676a15dda91fe537bb40","facadeSource":"extensions/tlon/api.ts","sources":[]},{"output":".setup/channel-bmlV7Bo5.mjs","sha256":"2b1c9f99f36d65ccf0b811a3d3526707b54e15c40abd19e444a76eebebb2e73e","facadeSource":null,"sources":["extensions/tlon/src/channel.ts","extensions/tlon/src/config-schema.ts","extensions/tlon/src/doctor.ts"]},{"output":".setup/channel.runtime-CGmlLjBi.mjs","sha256":"219850db869816e9def2e04a94b114a8efc465ecf399f8ad0a8e9aed4f418e10","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-bInPRAQZ.mjs","sha256":"ba06bce97c984451581c990c9cfebbc69f70f3087e0eae04f07659084b6b16ba","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-Ck3lNvST.mjs","sha256":"b47fecb040ffb94da7eaa7ea1f026897d4b982aad8459b1da6f42878f0af2fcd","facadeSource":null,"sources":["extensions/tlon/src/runtime.ts"]},{"output":".setup/setup-core-Cfw9JPWJ.mjs","sha256":"e927ddfae71b2b29ba08d479ecee065cabc700a9c2c031441fd372870a1df530","facadeSource":null,"sources":["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-C0_CutPR.mjs","sha256":"eb7684c22c80a227fe8f6b7d814478073be40adfdeeae2239ec53784d23b18e3","facadeSource":null,"sources":["extensions/tlon/src/setup-surface.ts"]},{"output":"api.js","sha256":"65e7a0d35e8aabb61c42b2b56a4f59603328531c6f57076a871c000c6d1de217","facadeSource":"extensions/tlon/api.ts","sources":[]},{"output":"channel-plugin-api.js","sha256":"74f7e7ed4dc4ea4a5ade022ae1ae0fddcd020fa6a419dd48f40c034a01803ebb","facadeSource":"extensions/tlon/channel-plugin-api.ts","sources":[]},{"output":"doctor-contract-api.js","sha256":"d8bfd31033274b1d661f7320b7d4ccaba6321d47ed309409003928b72403cb2f","facadeSource":"extensions/tlon/doctor-contract-api.ts","sources":[]},{"output":"index.js","sha256":"40ecbe760d30b082e1a5a9eb2590c33ef411f287fa5b655373df7d5126005654","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":"174eb1a77e44c095507aa23bd9e9d1b3b4d027c5411a23b4fb65e2ccc9f1f9ed","facadeSource":"extensions/tlon/setup-api.ts","sources":[]},{"output":"setup-entry.js","sha256":"5373636e056c24bf423ec283a90a2da38181bf4a67bb7c5911f52ca25227950c","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"]}
|
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-bmlV7Bo5.mjs";
|
|
3
|
+
import { n as setTlonRuntime } from "./.setup/runtime-Ck3lNvST.mjs";
|
|
4
4
|
export { SsrFBlockedError, createDedupeCache, createLoggerBackedRuntime, fetchWithSsrFGuard, isBlockedHostnameOrIp, setTlonRuntime, ssrfPolicyFromDangerouslyAllowPrivateNetwork, tlonPlugin };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as tlonPlugin } from "./.setup/channel-
|
|
1
|
+
export { t as tlonPlugin } from "./.setup/channel-bmlV7Bo5.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as legacyConfigRules, n as normalizeCompatibilityConfig } from "./.setup/doctor-contract-
|
|
1
|
+
export { t as legacyConfigRules, n as normalizeCompatibilityConfig } from "./.setup/doctor-contract-bInPRAQZ.mjs";
|
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-Cfw9JPWJ.mjs";
|
|
2
|
+
import { t as tlonSetupWizard } from "./.setup/setup-surface-C0_CutPR.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-C3N9E4O0.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.5-beta.
|
|
3
|
+
"version": "2026.11.5-beta.3",
|
|
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.5-beta.
|
|
22
|
+
"openclaw": ">=2026.11.5-beta.3"
|
|
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.5-beta.
|
|
124
|
+
"pluginApi": ">=2026.11.5-beta.3"
|
|
125
125
|
},
|
|
126
126
|
"build": {
|
|
127
|
-
"openclawVersion": "2026.11.5-beta.
|
|
127
|
+
"openclawVersion": "2026.11.5-beta.3"
|
|
128
128
|
},
|
|
129
129
|
"release": {
|
|
130
130
|
"bundleRuntimeDependencies": false,
|