@openclaw/tlon 2026.9.1 → 2026.9.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/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-Dx1jbpJ1.js";
|
|
3
3
|
import { n as setTlonRuntime } from "./runtime-Ck3lNvST.js";
|
|
4
4
|
export { SsrFBlockedError, createDedupeCache, createLoggerBackedRuntime, fetchWithSsrFGuard, isBlockedHostnameOrIp, setTlonRuntime, ssrfPolicyFromDangerouslyAllowPrivateNetwork, tlonPlugin };
|
|
@@ -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-D5Rie0uM.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-Dx1jbpJ1.js";
|
|
2
2
|
export { tlonPlugin };
|
|
@@ -2161,15 +2161,7 @@ function createHistoryEntryFromMemo(params) {
|
|
|
2161
2161
|
id: typeof seal?.id === "string" ? seal.id : typeof fallbackId === "string" ? fallbackId : void 0
|
|
2162
2162
|
};
|
|
2163
2163
|
}
|
|
2164
|
-
const messageCache = /* @__PURE__ */ new Map();
|
|
2165
2164
|
const MAX_CACHED_MESSAGES = 100;
|
|
2166
|
-
function cacheMessage(channelNest, message) {
|
|
2167
|
-
if (!messageCache.has(channelNest)) messageCache.set(channelNest, []);
|
|
2168
|
-
const cache = messageCache.get(channelNest);
|
|
2169
|
-
if (!cache) return;
|
|
2170
|
-
cache.unshift(message);
|
|
2171
|
-
if (cache.length > MAX_CACHED_MESSAGES) cache.pop();
|
|
2172
|
-
}
|
|
2173
2165
|
async function fetchChannelHistory(api, channelNest, count = 50, runtime) {
|
|
2174
2166
|
try {
|
|
2175
2167
|
const scryPath = `/channels/v4/${channelNest}/posts/newest/${count}/outline.json`;
|
|
@@ -2204,14 +2196,25 @@ async function fetchChannelHistory(api, channelNest, count = 50, runtime) {
|
|
|
2204
2196
|
return [];
|
|
2205
2197
|
}
|
|
2206
2198
|
}
|
|
2207
|
-
|
|
2208
|
-
const
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2199
|
+
function createChannelHistoryCache() {
|
|
2200
|
+
const messageCache = /* @__PURE__ */ new Map();
|
|
2201
|
+
return {
|
|
2202
|
+
cacheMessage(channelNest, message) {
|
|
2203
|
+
const cache = messageCache.get(channelNest) ?? [];
|
|
2204
|
+
cache.unshift(message);
|
|
2205
|
+
if (cache.length > MAX_CACHED_MESSAGES) cache.pop();
|
|
2206
|
+
messageCache.set(channelNest, cache);
|
|
2207
|
+
},
|
|
2208
|
+
async getChannelHistory(api, channelNest, count = 50, runtime) {
|
|
2209
|
+
const cache = messageCache.get(channelNest) ?? [];
|
|
2210
|
+
if (cache.length >= count) {
|
|
2211
|
+
runtime?.log?.(`[tlon] Using cached messages (${cache.length} available)`);
|
|
2212
|
+
return cache.slice(0, count);
|
|
2213
|
+
}
|
|
2214
|
+
runtime?.log?.(`[tlon] Cache has ${cache.length} messages, need ${count}, fetching from scry...`);
|
|
2215
|
+
return await fetchChannelHistory(api, channelNest, count, runtime);
|
|
2216
|
+
}
|
|
2217
|
+
};
|
|
2215
2218
|
}
|
|
2216
2219
|
/**
|
|
2217
2220
|
* Fetch thread/reply history for a specific parent post.
|
|
@@ -2720,6 +2723,7 @@ async function monitorTlonProvider(opts = {}) {
|
|
|
2720
2723
|
let pendingApprovals = [];
|
|
2721
2724
|
let currentSettings = {};
|
|
2722
2725
|
const participatedThreads = createParticipatedThreadTracker();
|
|
2726
|
+
const channelHistory = createChannelHistoryCache();
|
|
2723
2727
|
const dmSendersBySession = /* @__PURE__ */ new Map();
|
|
2724
2728
|
let sharedSessionWarningSent = false;
|
|
2725
2729
|
try {
|
|
@@ -2812,7 +2816,7 @@ async function monitorTlonProvider(opts = {}) {
|
|
|
2812
2816
|
runtime?.log?.(`[tlon] Could not fetch thread context: ${formatErrorMessage(error)}`);
|
|
2813
2817
|
}
|
|
2814
2818
|
if (isGroup && groupChannel && isSummarizationRequest(messageText)) try {
|
|
2815
|
-
const history = await getChannelHistory(api, groupChannel, 50, runtime);
|
|
2819
|
+
const history = await channelHistory.getChannelHistory(api, groupChannel, 50, runtime);
|
|
2816
2820
|
if (history.length === 0) {
|
|
2817
2821
|
const noHistoryMsg = "I couldn't fetch any messages for this channel. It might be empty or there might be a permissions issue.";
|
|
2818
2822
|
if (isGroup) {
|
|
@@ -3165,7 +3169,7 @@ async function monitorTlonProvider(opts = {}) {
|
|
|
3165
3169
|
if (!rawText.trim()) return;
|
|
3166
3170
|
const contentBody = content.content;
|
|
3167
3171
|
const sentAt = asFiniteNumber(content?.sent) ?? Date.now();
|
|
3168
|
-
cacheMessage(nest, {
|
|
3172
|
+
channelHistory.cacheMessage(nest, {
|
|
3169
3173
|
author: senderShip,
|
|
3170
3174
|
content: rawText,
|
|
3171
3175
|
timestamp: sentAt,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/tlon",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.3",
|
|
4
4
|
"description": "OpenClaw Tlon/Urbit channel plugin for chat workflows.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@aws-sdk/client-s3": "3.
|
|
12
|
-
"@aws-sdk/s3-request-presigner": "3.
|
|
11
|
+
"@aws-sdk/client-s3": "3.1121.0",
|
|
12
|
+
"@aws-sdk/s3-request-presigner": "3.1121.0",
|
|
13
13
|
"@tloncorp/tlon-skill": "0.5.0",
|
|
14
14
|
"@urbit/aura": "3.0.0",
|
|
15
15
|
"zod": "4.4.3"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"openclaw": "workspace:*"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"openclaw": ">=2026.9.
|
|
22
|
+
"openclaw": ">=2026.9.3"
|
|
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.3"
|
|
124
124
|
},
|
|
125
125
|
"build": {
|
|
126
|
-
"openclawVersion": "2026.9.
|
|
126
|
+
"openclawVersion": "2026.9.3"
|
|
127
127
|
},
|
|
128
128
|
"release": {
|
|
129
129
|
"bundleRuntimeDependencies": false,
|