@openclaw/tlon 2026.7.2-beta.1 → 2026.7.2-beta.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/api.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as ssrfPolicyFromAllowPrivateNetwork, i as isBlockedHostnameOrIp, n as createDedupeCache, o as ssrfPolicyFromDangerouslyAllowPrivateNetwork, r as fetchWithSsrFGuard, s as createLoggerBackedRuntime, t as SsrFBlockedError } from "./runtime-api-C5wXFh-q.js";
2
- import { t as tlonPlugin } from "./channel-Czb0L98O.js";
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-B3c5Sud6.js";
3
3
  import { n as setTlonRuntime } from "./runtime-Ck3lNvST.js";
4
- export { SsrFBlockedError, createDedupeCache, createLoggerBackedRuntime, fetchWithSsrFGuard, isBlockedHostnameOrIp, setTlonRuntime, ssrfPolicyFromAllowPrivateNetwork, ssrfPolicyFromDangerouslyAllowPrivateNetwork, tlonPlugin };
4
+ export { SsrFBlockedError, createDedupeCache, createLoggerBackedRuntime, fetchWithSsrFGuard, isBlockedHostnameOrIp, setTlonRuntime, ssrfPolicyFromDangerouslyAllowPrivateNetwork, tlonPlugin };
@@ -87,7 +87,7 @@ function resolveTlonOutboundSessionRoute(params) {
87
87
  //#endregion
88
88
  //#region extensions/tlon/src/channel.ts
89
89
  const TLON_CHANNEL_ID = "tlon";
90
- const loadTlonChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-BlqhnFR6.js"));
90
+ const loadTlonChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-BtBrqXGq.js"));
91
91
  const tlonSetupWizardProxy = createTlonSetupWizardBase({
92
92
  resolveConfigured: async ({ cfg, accountId }) => await (await loadTlonChannelRuntime()).tlonSetupWizard.status.resolveConfigured({
93
93
  cfg,
@@ -1,2 +1,2 @@
1
- import { t as tlonPlugin } from "./channel-Czb0L98O.js";
1
+ import { t as tlonPlugin } from "./channel-B3c5Sud6.js";
2
2
  export { tlonPlugin };
@@ -1,4 +1,4 @@
1
- import { n as createDedupeCache, s as createLoggerBackedRuntime } from "./runtime-api-C5wXFh-q.js";
1
+ import { n as createDedupeCache, o as createLoggerBackedRuntime } from "./runtime-api-BXVe40nS.js";
2
2
  import { c as validateUrbitBaseUrl, d as formatTargetHint, f as normalizeShip, h as resolveTlonOutboundTarget, m as parseTlonTarget, p as parseChannelNest, s as normalizeUrbitHostname, u as resolveTlonAccount } from "./setup-core-BgykzCYT.js";
3
3
  import { t as getTlonRuntime } from "./runtime-Ck3lNvST.js";
4
4
  import { t as tlonSetupWizard } from "./setup-surface-j5Hrbts7.js";
@@ -456,7 +456,12 @@ function createImageBlock(src, alt = "", height = 0, width = 0) {
456
456
  * Check if URL looks like an image
457
457
  */
458
458
  function isImageUrl(url) {
459
- return /\.(jpg|jpeg|png|gif|webp|svg|bmp|ico)(\?.*)?$/i.test(url);
459
+ const imageExtensions = /\.(jpg|jpeg|png|gif|webp|svg|bmp|ico)$/i;
460
+ let path = url.split(/[?#]/, 1)[0] ?? url;
461
+ try {
462
+ path = new URL(url).pathname;
463
+ } catch {}
464
+ return imageExtensions.test(path);
460
465
  }
461
466
  /**
462
467
  * Process inlines and extract any image markers into blocks
@@ -886,33 +891,38 @@ var UrbitSSEClient = class {
886
891
  const controller = new AbortController();
887
892
  const timeoutId = setTimeout(() => controller.abort(), 6e4);
888
893
  this.streamController = controller;
889
- const { response, release } = await urbitFetch({
890
- baseUrl: this.url,
891
- path: `/~/channel/${this.channelId}`,
892
- init: {
893
- method: "GET",
894
- headers: {
895
- Accept: "text/event-stream",
896
- Cookie: this.cookie
897
- }
898
- },
899
- ssrfPolicy: this.ssrfPolicy,
900
- lookupFn: this.lookupFn,
901
- fetchImpl: this.fetchImpl,
902
- signal: controller.signal,
903
- auditContext: "tlon-urbit-sse-stream"
904
- });
894
+ let stream;
895
+ try {
896
+ stream = await urbitFetch({
897
+ baseUrl: this.url,
898
+ path: `/~/channel/${this.channelId}`,
899
+ init: {
900
+ method: "GET",
901
+ headers: {
902
+ Accept: "text/event-stream",
903
+ Cookie: this.cookie
904
+ }
905
+ },
906
+ ssrfPolicy: this.ssrfPolicy,
907
+ lookupFn: this.lookupFn,
908
+ fetchImpl: this.fetchImpl,
909
+ signal: controller.signal,
910
+ auditContext: "tlon-urbit-sse-stream"
911
+ });
912
+ } finally {
913
+ clearTimeout(timeoutId);
914
+ }
915
+ const { response, release } = stream;
905
916
  this.streamRelease = release;
906
- clearTimeout(timeoutId);
907
917
  if (!response.ok) {
908
- await release();
909
918
  this.streamRelease = null;
919
+ await release();
910
920
  throw new Error(`Stream connection failed: ${response.status}`);
911
921
  }
912
922
  this.processStream(response.body).catch((error) => {
913
923
  if (!this.aborted) {
914
924
  this.logger.error?.(`Stream error: ${String(error)}`);
915
- for (const { err } of this.eventHandlers.values()) if (err) err(error);
925
+ for (const { err } of this.eventHandlers.values()) err?.(error);
916
926
  }
917
927
  });
918
928
  }
@@ -3248,6 +3258,10 @@ async function monitorTlonProvider(opts = {}) {
3248
3258
  const MEMEX_BASE_URL = "https://memex.tlon.network";
3249
3259
  /** Max bytes to read from the Memex upload JSON response. */
3250
3260
  const MEMEX_UPLOAD_RESPONSE_MAX_BYTES = 64 * 1024;
3261
+ /** Total deadline for the Memex upload URL lookup, including DNS and response reading. */
3262
+ const TLON_MEMEX_UPLOAD_URL_TIMEOUT_MS = 3e4;
3263
+ /** Total deadline for Memex and custom S3 PUTs, including DNS and the full upload. */
3264
+ const TLON_UPLOAD_TIMEOUT_MS = 3e5;
3251
3265
  let currentClientConfig = null;
3252
3266
  function configureClient(params) {
3253
3267
  currentClientConfig = {
@@ -3364,7 +3378,8 @@ async function getMemexUploadUrl(params) {
3364
3378
  },
3365
3379
  auditContext: "tlon-memex-upload-url",
3366
3380
  capture: false,
3367
- maxRedirects: 0
3381
+ maxRedirects: 0,
3382
+ timeoutMs: TLON_MEMEX_UPLOAD_URL_TIMEOUT_MS
3368
3383
  });
3369
3384
  release = guarded.release;
3370
3385
  if (!guarded.response.ok) throw new Error(`Memex upload request failed: ${guarded.response.status}`);
@@ -3410,7 +3425,8 @@ async function uploadFile(params) {
3410
3425
  },
3411
3426
  auditContext: "tlon-memex-upload",
3412
3427
  capture: false,
3413
- maxRedirects: 0
3428
+ maxRedirects: 0,
3429
+ timeoutMs: TLON_UPLOAD_TIMEOUT_MS
3414
3430
  });
3415
3431
  release = guarded.release;
3416
3432
  assertTrustedMemexUploadUrl(guarded.finalUrl, "Memex final upload URL");
@@ -3454,7 +3470,8 @@ async function uploadFile(params) {
3454
3470
  auditContext: "tlon-custom-s3-upload",
3455
3471
  capture: false,
3456
3472
  maxRedirects: 0,
3457
- policy: privateNetworkPolicy
3473
+ policy: privateNetworkPolicy,
3474
+ timeoutMs: TLON_UPLOAD_TIMEOUT_MS
3458
3475
  });
3459
3476
  release = guarded.release;
3460
3477
  if (!guarded.response.ok) throw new Error(`Upload failed: ${guarded.response.status}`);
@@ -0,0 +1,4 @@
1
+ import { createDedupeCache } from "openclaw/plugin-sdk/core";
2
+ import { createLoggerBackedRuntime } from "openclaw/plugin-sdk/runtime";
3
+ import { SsrFBlockedError, fetchWithSsrFGuard as fetchWithSsrFGuard$1, isBlockedHostnameOrIp as isBlockedHostnameOrIp$1, ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
4
+ export { ssrfPolicyFromDangerouslyAllowPrivateNetwork as a, isBlockedHostnameOrIp$1 as i, createDedupeCache as n, createLoggerBackedRuntime as o, fetchWithSsrFGuard$1 as r, SsrFBlockedError as t };
@@ -1,2 +1,2 @@
1
- import { a as ssrfPolicyFromAllowPrivateNetwork, i as isBlockedHostnameOrIp, n as createDedupeCache, o as ssrfPolicyFromDangerouslyAllowPrivateNetwork, r as fetchWithSsrFGuard, s as createLoggerBackedRuntime, t as SsrFBlockedError } from "./runtime-api-C5wXFh-q.js";
2
- export { SsrFBlockedError, createDedupeCache, createLoggerBackedRuntime, fetchWithSsrFGuard, isBlockedHostnameOrIp, ssrfPolicyFromAllowPrivateNetwork, ssrfPolicyFromDangerouslyAllowPrivateNetwork };
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
+ export { SsrFBlockedError, createDedupeCache, createLoggerBackedRuntime, fetchWithSsrFGuard, isBlockedHostnameOrIp, ssrfPolicyFromDangerouslyAllowPrivateNetwork };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/tlon",
3
- "version": "2026.7.2-beta.1",
3
+ "version": "2026.7.2-beta.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/tlon",
9
- "version": "2026.7.2-beta.1",
9
+ "version": "2026.7.2-beta.2",
10
10
  "dependencies": {
11
11
  "@aws-sdk/client-s3": "3.1078.0",
12
12
  "@aws-sdk/s3-request-presigner": "3.1078.0",
@@ -15,7 +15,7 @@
15
15
  "zod": "4.4.3"
16
16
  },
17
17
  "peerDependencies": {
18
- "openclaw": ">=2026.7.2-beta.1"
18
+ "openclaw": ">=2026.7.2-beta.2"
19
19
  },
20
20
  "peerDependenciesMeta": {
21
21
  "openclaw": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/tlon",
3
- "version": "2026.7.2-beta.1",
3
+ "version": "2026.7.2-beta.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.7.2-beta.1"
22
+ "openclaw": ">=2026.7.2-beta.2"
23
23
  },
24
24
  "peerDependenciesMeta": {
25
25
  "openclaw": {
@@ -73,10 +73,10 @@
73
73
  "minHostVersion": ">=2026.4.10"
74
74
  },
75
75
  "compat": {
76
- "pluginApi": ">=2026.7.2-beta.1"
76
+ "pluginApi": ">=2026.7.2-beta.2"
77
77
  },
78
78
  "build": {
79
- "openclawVersion": "2026.7.2-beta.1"
79
+ "openclawVersion": "2026.7.2-beta.2"
80
80
  },
81
81
  "release": {
82
82
  "bundleRuntimeDependencies": false,
@@ -1,4 +0,0 @@
1
- import { createDedupeCache } from "openclaw/plugin-sdk/core";
2
- import { createLoggerBackedRuntime } from "openclaw/plugin-sdk/runtime";
3
- import { SsrFBlockedError, fetchWithSsrFGuard as fetchWithSsrFGuard$1, isBlockedHostnameOrIp as isBlockedHostnameOrIp$1, ssrfPolicyFromAllowPrivateNetwork, ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
4
- export { ssrfPolicyFromAllowPrivateNetwork as a, isBlockedHostnameOrIp$1 as i, createDedupeCache as n, ssrfPolicyFromDangerouslyAllowPrivateNetwork as o, fetchWithSsrFGuard$1 as r, createLoggerBackedRuntime as s, SsrFBlockedError as t };