@openclaw/tlon 2026.9.3 → 2026.9.4
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/api.js +1 -1
- package/dist/{channel-Dx1jbpJ1.js → channel-CbhSVuV_.js} +2 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-D5Rie0uM.js → channel.runtime-Dt6D-3_j.js} +72 -31
- package/dist/setup-api.js +2 -2
- package/dist/{setup-core-CYiZjoTI.js → setup-core-Ny4-ZMK0.js} +4 -12
- package/dist/{setup-surface-35N3bJMh.js → setup-surface-Bf6uwW8f.js} +1 -1
- package/openclaw.plugin.json +3 -0
- package/package.json +4 -4
package/dist/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as ssrfPolicyFromDangerouslyAllowPrivateNetwork, i as isBlockedHostnameOrIp, n as createDedupeCache, o as createLoggerBackedRuntime, r as fetchWithSsrFGuard, t as SsrFBlockedError } from "./runtime-api-BXVe40nS.js";
|
|
2
|
-
import { t as tlonPlugin } from "./channel-
|
|
2
|
+
import { t as tlonPlugin } from "./channel-CbhSVuV_.js";
|
|
3
3
|
import { n as setTlonRuntime } from "./runtime-Ck3lNvST.js";
|
|
4
4
|
export { SsrFBlockedError, createDedupeCache, createLoggerBackedRuntime, fetchWithSsrFGuard, isBlockedHostnameOrIp, setTlonRuntime, ssrfPolicyFromDangerouslyAllowPrivateNetwork, tlonPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-CZ8OWBXt.js";
|
|
2
|
-
import { d as resolveTlonAccount, f as formatTargetHint, g as resolveTlonOutboundTarget, h as parseTlonTarget, n as createTlonSetupWizardBase, o as tlonSetupContract, p as normalizeShip, u as listTlonAccountIds } from "./setup-core-
|
|
2
|
+
import { d as resolveTlonAccount, f as formatTargetHint, g as resolveTlonOutboundTarget, h as parseTlonTarget, n as createTlonSetupWizardBase, o as tlonSetupContract, p as normalizeShip, u as listTlonAccountIds } from "./setup-core-Ny4-ZMK0.js";
|
|
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";
|
|
@@ -95,7 +95,7 @@ function resolveTlonOutboundSessionRoute(params) {
|
|
|
95
95
|
//#endregion
|
|
96
96
|
//#region extensions/tlon/src/channel.ts
|
|
97
97
|
const TLON_CHANNEL_ID = "tlon";
|
|
98
|
-
const loadTlonChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-
|
|
98
|
+
const loadTlonChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-Dt6D-3_j.js"));
|
|
99
99
|
const tlonSetupWizardProxy = createTlonSetupWizardBase({
|
|
100
100
|
resolveConfigured: async ({ cfg, accountId }) => await (await loadTlonChannelRuntime()).tlonSetupWizard.status.resolveConfigured({
|
|
101
101
|
cfg,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as tlonPlugin } from "./channel-
|
|
1
|
+
import { t as tlonPlugin } from "./channel-CbhSVuV_.js";
|
|
2
2
|
export { tlonPlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as createDedupeCache, o as createLoggerBackedRuntime } from "./runtime-api-BXVe40nS.js";
|
|
2
|
-
import { c as normalizeUrbitHostname, d as resolveTlonAccount, f as formatTargetHint, h as parseTlonTarget, l as validateUrbitBaseUrl, m as parseChannelNest, p as normalizeShip } from "./setup-core-
|
|
2
|
+
import { c as normalizeUrbitHostname, d as resolveTlonAccount, f as formatTargetHint, h as parseTlonTarget, l as validateUrbitBaseUrl, m as parseChannelNest, p as normalizeShip } from "./setup-core-Ny4-ZMK0.js";
|
|
3
3
|
import { t as getTlonRuntime } from "./runtime-Ck3lNvST.js";
|
|
4
|
-
import { t as tlonSetupWizard } from "./setup-surface-
|
|
4
|
+
import { t as tlonSetupWizard } from "./setup-surface-Bf6uwW8f.js";
|
|
5
5
|
import { fetchWithSsrFGuard, ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
6
6
|
import { bindIngressLifecycleToReplyOptions, createChannelIngressError, createChannelIngressMonitor, createMessageReceiptFromOutboundResults, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
|
|
7
7
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
@@ -1802,33 +1802,42 @@ function resolveChannelAuthorization(cfg, channelNest, settings) {
|
|
|
1802
1802
|
function extractCites(content) {
|
|
1803
1803
|
if (!content || !Array.isArray(content)) return [];
|
|
1804
1804
|
const cites = [];
|
|
1805
|
-
for (const verse of content)
|
|
1806
|
-
const
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1805
|
+
for (const verse of content) {
|
|
1806
|
+
const verseRecord = asNullableRecord(verse);
|
|
1807
|
+
const block = asNullableRecord(verseRecord?.block);
|
|
1808
|
+
const cite = asNullableRecord(block?.cite);
|
|
1809
|
+
if (cite) {
|
|
1810
|
+
const chan = asNullableRecord(cite.chan);
|
|
1811
|
+
const group = readStringField(cite, "group");
|
|
1812
|
+
const desk = asNullableRecord(cite.desk);
|
|
1813
|
+
const bait = asNullableRecord(cite.bait);
|
|
1814
|
+
if (chan) {
|
|
1815
|
+
const nest = readStringField(chan, "nest");
|
|
1816
|
+
const where = readStringField(chan, "where");
|
|
1817
|
+
const whereMatch = where?.match(/\/msg\/(~[a-z-]+)\/(.+)/);
|
|
1818
|
+
cites.push({
|
|
1819
|
+
type: "chan",
|
|
1820
|
+
nest,
|
|
1821
|
+
where,
|
|
1822
|
+
author: whereMatch?.[1],
|
|
1823
|
+
postId: whereMatch?.[2]
|
|
1824
|
+
});
|
|
1825
|
+
} else if (group) cites.push({
|
|
1826
|
+
type: "group",
|
|
1827
|
+
group
|
|
1816
1828
|
});
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
nest: cite.bait.graph,
|
|
1830
|
-
where: cite.bait.where
|
|
1831
|
-
});
|
|
1829
|
+
else if (desk) cites.push({
|
|
1830
|
+
type: "desk",
|
|
1831
|
+
flag: readStringField(desk, "flag"),
|
|
1832
|
+
where: readStringField(desk, "where")
|
|
1833
|
+
});
|
|
1834
|
+
else if (bait) cites.push({
|
|
1835
|
+
type: "bait",
|
|
1836
|
+
group: readStringField(bait, "group"),
|
|
1837
|
+
nest: readStringField(bait, "graph"),
|
|
1838
|
+
where: readStringField(bait, "where")
|
|
1839
|
+
});
|
|
1840
|
+
}
|
|
1832
1841
|
}
|
|
1833
1842
|
return cites;
|
|
1834
1843
|
}
|
|
@@ -2066,12 +2075,37 @@ function formatSummarizationHistoryText(history, cfg) {
|
|
|
2066
2075
|
}
|
|
2067
2076
|
//#endregion
|
|
2068
2077
|
//#region extensions/tlon/src/monitor/cites.ts
|
|
2078
|
+
const CITE_PATH_SEGMENT_RE = /^[A-Za-z0-9._~-]+$/;
|
|
2079
|
+
const CITE_PATH_NORMALIZATION_BASE = "https://tlon.invalid";
|
|
2080
|
+
function isSafeCitePathSegment(segment) {
|
|
2081
|
+
if (segment === "." || segment === "..") return false;
|
|
2082
|
+
return CITE_PATH_SEGMENT_RE.test(segment);
|
|
2083
|
+
}
|
|
2084
|
+
/**
|
|
2085
|
+
* Build the channel-post scry path for a citation, or return null when the cited
|
|
2086
|
+
* identifiers cannot address exactly that resource. The normalization check is the
|
|
2087
|
+
* boundary guarantee: `scryUrbitPath` prefixes `/~/scry` and `urbitFetch` resolves the
|
|
2088
|
+
* result through `new URL`, so a path that changes under normalization would leave the
|
|
2089
|
+
* channel-post namespace while still carrying the Urbit auth cookie.
|
|
2090
|
+
*/
|
|
2091
|
+
function buildCitedPostScryPath(nest, postId) {
|
|
2092
|
+
const nestSegments = nest.split("/");
|
|
2093
|
+
if (nestSegments.length !== 3 || !nestSegments.every(isSafeCitePathSegment)) return null;
|
|
2094
|
+
if (!isSafeCitePathSegment(postId)) return null;
|
|
2095
|
+
const scryPath = `/channels/v4/${nest}/posts/post/${postId}.json`;
|
|
2096
|
+
if (new URL(scryPath, CITE_PATH_NORMALIZATION_BASE).pathname !== scryPath) return null;
|
|
2097
|
+
return scryPath;
|
|
2098
|
+
}
|
|
2069
2099
|
function createTlonCitationResolver(params) {
|
|
2070
2100
|
const { api, runtime } = params;
|
|
2071
2101
|
const resolveCiteContent = async (cite) => {
|
|
2072
2102
|
if (cite.type !== "chan" || !cite.nest || !cite.postId) return null;
|
|
2103
|
+
const scryPath = buildCitedPostScryPath(cite.nest, cite.postId);
|
|
2104
|
+
if (!scryPath) {
|
|
2105
|
+
runtime.log?.("[tlon] Skipping cited post: citation does not name a channel post");
|
|
2106
|
+
return null;
|
|
2107
|
+
}
|
|
2073
2108
|
try {
|
|
2074
|
-
const scryPath = `/channels/v4/${cite.nest}/posts/post/${cite.postId}.json`;
|
|
2075
2109
|
runtime.log?.(`[tlon] Fetching cited post: ${scryPath}`);
|
|
2076
2110
|
const data = asNullableRecord(await api.scry(scryPath));
|
|
2077
2111
|
const essay = asNullableRecord(data?.essay);
|
|
@@ -2892,7 +2926,7 @@ async function monitorTlonProvider(opts = {}) {
|
|
|
2892
2926
|
api,
|
|
2893
2927
|
fromShip: botShipName,
|
|
2894
2928
|
toShip: effectiveOwnerShip,
|
|
2895
|
-
text: "⚠️ Security Warning: Multiple users are sharing a DM session with this bot. This can leak conversation context between users.\n\nFix: Add to your OpenClaw config:\nsession:\n dmScope: \"per-channel-peer\"\n\nDocs: https://docs.openclaw.ai/concepts/session#
|
|
2929
|
+
text: "⚠️ Security Warning: Multiple users are sharing a DM session with this bot. This can leak conversation context between users.\n\nFix: Add to your OpenClaw config:\nsession:\n dmScope: \"per-channel-peer\"\n\nDocs: https://docs.openclaw.ai/concepts/session#dm-isolation"
|
|
2896
2930
|
}).catch((err) => runtime.error?.(`[tlon] Failed to send security warning to owner: ${formatErrorMessage(err)}`));
|
|
2897
2931
|
}
|
|
2898
2932
|
}
|
|
@@ -3970,7 +4004,14 @@ async function createHttpPokeApi(params) {
|
|
|
3970
4004
|
}
|
|
3971
4005
|
function resolveOutboundContext(params) {
|
|
3972
4006
|
const account = resolveTlonAccount(params.cfg, params.accountId ?? void 0);
|
|
3973
|
-
if (!account.configured || !account.ship || !account.url || !account.code)
|
|
4007
|
+
if (!account.configured || !account.ship || !account.url || !account.code) {
|
|
4008
|
+
const missingFields = [
|
|
4009
|
+
account.ship ? void 0 : "ship",
|
|
4010
|
+
account.url ? void 0 : "url",
|
|
4011
|
+
account.code ? void 0 : "code"
|
|
4012
|
+
].filter((field) => field !== void 0);
|
|
4013
|
+
throw new Error(`Tlon account ${account.accountId} not configured (missing ${missingFields.join(", ")})`);
|
|
4014
|
+
}
|
|
3974
4015
|
const parsed = parseTlonTarget(params.to);
|
|
3975
4016
|
if (!parsed) throw new Error(`Invalid Tlon target. Use ${formatTargetHint()}`);
|
|
3976
4017
|
return {
|
package/dist/setup-api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as tlonSetupAdapter } from "./setup-core-
|
|
2
|
-
import { t as tlonSetupWizard } from "./setup-surface-
|
|
1
|
+
import { a as tlonSetupAdapter } from "./setup-core-Ny4-ZMK0.js";
|
|
2
|
+
import { t as tlonSetupWizard } from "./setup-surface-Bf6uwW8f.js";
|
|
3
3
|
export { tlonSetupAdapter, tlonSetupWizard };
|
|
@@ -337,22 +337,14 @@ function applyTlonSetupConfig(params) {
|
|
|
337
337
|
});
|
|
338
338
|
const base = namedConfig.channels?.tlon ?? {};
|
|
339
339
|
const payload = buildTlonAccountFields(input);
|
|
340
|
-
if (useDefault) return {
|
|
341
|
-
...namedConfig,
|
|
342
|
-
channels: {
|
|
343
|
-
...namedConfig.channels,
|
|
344
|
-
tlon: {
|
|
345
|
-
...base,
|
|
346
|
-
enabled: true,
|
|
347
|
-
...payload
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
};
|
|
351
340
|
return patchScopedAccountConfig({
|
|
352
341
|
cfg: namedConfig,
|
|
353
342
|
channelKey: tlonChannelId(),
|
|
354
343
|
accountId,
|
|
355
|
-
patch:
|
|
344
|
+
patch: useDefault ? {
|
|
345
|
+
enabled: true,
|
|
346
|
+
...payload
|
|
347
|
+
} : { enabled: base.enabled ?? true },
|
|
356
348
|
accountPatch: {
|
|
357
349
|
enabled: true,
|
|
358
350
|
...payload
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as resolveTlonAccount, i as resolveTlonSetupStatusLines, l as validateUrbitBaseUrl, n as createTlonSetupWizardBase, p as normalizeShip, r as resolveTlonSetupConfigured, s as isBlockedUrbitHostname, t as applyTlonSetupConfig } from "./setup-core-
|
|
1
|
+
import { d as resolveTlonAccount, i as resolveTlonSetupStatusLines, l as validateUrbitBaseUrl, n as createTlonSetupWizardBase, p as normalizeShip, r as resolveTlonSetupConfigured, s as isBlockedUrbitHostname, t as applyTlonSetupConfig } from "./setup-core-Ny4-ZMK0.js";
|
|
2
2
|
import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { createSetupTranslator } from "openclaw/plugin-sdk/setup-runtime";
|
|
4
4
|
//#region extensions/tlon/src/setup-surface.ts
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/tlon",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.4",
|
|
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.9.
|
|
22
|
+
"openclaw": ">=2026.9.4"
|
|
23
23
|
},
|
|
24
24
|
"peerDependenciesMeta": {
|
|
25
25
|
"openclaw": {
|
|
@@ -120,10 +120,10 @@
|
|
|
120
120
|
"minHostVersion": ">=2026.4.10"
|
|
121
121
|
},
|
|
122
122
|
"compat": {
|
|
123
|
-
"pluginApi": ">=2026.9.
|
|
123
|
+
"pluginApi": ">=2026.9.4"
|
|
124
124
|
},
|
|
125
125
|
"build": {
|
|
126
|
-
"openclawVersion": "2026.9.
|
|
126
|
+
"openclawVersion": "2026.9.4"
|
|
127
127
|
},
|
|
128
128
|
"release": {
|
|
129
129
|
"bundleRuntimeDependencies": false,
|