@openclaw/tlon 2026.9.33 → 2026.9.34

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.
@@ -1,5 +1,5 @@
1
1
  import { SsrFBlockedError, createDedupeCache, createLoggerBackedRuntime, fetchWithSsrFGuard, isBlockedHostnameOrIp, ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "../runtime-api.js";
2
- import { t as tlonPlugin } from "./channel-DNzlsYXc.mjs";
2
+ import { t as tlonPlugin } from "./channel-BaO83mHZ.mjs";
3
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 };
@@ -94,7 +94,7 @@ function resolveTlonOutboundSessionRoute(params) {
94
94
  //#endregion
95
95
  //#region extensions/tlon/src/channel.ts
96
96
  const TLON_CHANNEL_ID = "tlon";
97
- const loadTlonChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-C_kML1QC.mjs"));
97
+ const loadTlonChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-D9MFsNd5.mjs"));
98
98
  const tlonSetupWizardProxy = createTlonSetupWizardBase(async (params) => await (await loadTlonChannelRuntime()).tlonSetupWizard.finalize(params));
99
99
  const tlonConfigAdapter = createHybridChannelConfigAdapter({
100
100
  sectionKey: TLON_CHANNEL_ID,
@@ -87,7 +87,7 @@ function parsePendingApprovals(value) {
87
87
  return parsed.filter((item) => {
88
88
  if (!item || typeof item !== "object") return false;
89
89
  const obj = item;
90
- return typeof obj.id === "string" && (obj.type === "dm" || obj.type === "channel" || obj.type === "group") && typeof obj.requestingShip === "string" && typeof obj.timestamp === "number";
90
+ return typeof obj.id === "string" && (obj.type === "dm" || obj.type === "channel" || obj.type === "group") && typeof obj.requestingShip === "string" && typeof obj.timestamp === "number" && (obj.clubId === void 0 || typeof obj.clubId === "string") && (obj.verifiedDirect === void 0 || typeof obj.verifiedDirect === "boolean");
91
91
  });
92
92
  }
93
93
  function parseSettingsEvent(event) {
@@ -1288,6 +1288,8 @@ function createPendingApproval(params) {
1288
1288
  id: generateApprovalId(params.type),
1289
1289
  type: params.type,
1290
1290
  requestingShip: params.requestingShip,
1291
+ ...params.clubId !== void 0 ? { clubId: params.clubId } : {},
1292
+ ...params.verifiedDirect === true ? { verifiedDirect: true } : {},
1291
1293
  channelNest: params.channelNest,
1292
1294
  groupFlag: params.groupFlag,
1293
1295
  messagePreview: params.messagePreview != null ? sliceUtf16Safe(params.messagePreview, 0, 100) : void 0,
@@ -1302,7 +1304,12 @@ function truncate(text, maxLength) {
1302
1304
  function formatApprovalRequest(approval) {
1303
1305
  const preview = approval.messagePreview ? `\n"${truncate(approval.messagePreview, 100)}"` : "";
1304
1306
  switch (approval.type) {
1305
- case "dm": return `New DM request from ${approval.requestingShip}:${preview}\n\nReply "approve", "deny", or "block" (ID: ${approval.id})`;
1307
+ case "dm":
1308
+ if (approval.clubId !== void 0) {
1309
+ const replayLine = approval.originalMessage ? `The message is answered as an unverified group DM sender, never as ${approval.requestingShip}.` : `The message is not kept, so it will not be answered; have ${approval.requestingShip} send it again in a normal direct message to get a reply.`;
1310
+ return `New group DM message claiming to be from ${approval.requestingShip} (unverified; group DM ${approval.clubId}):${preview}\n\nApproving adds ${approval.requestingShip} to the DM allowlist. ${replayLine}\nReply "approve", "deny", or "block" (ID: ${approval.id})`;
1311
+ }
1312
+ return `New DM request from ${approval.requestingShip}:${preview}\n\nReply "approve", "deny", or "block" (ID: ${approval.id})`;
1306
1313
  case "channel": return `${approval.requestingShip} mentioned you in ${approval.channelNest}:${preview}\n\nReply "approve", "deny", or "block"\n(ID: ${approval.id})`;
1307
1314
  case "group": return `Group invite from ${approval.requestingShip} to join ${approval.groupFlag}\n\nReply "approve", "deny", or "block"\n(ID: ${approval.id})`;
1308
1315
  }
@@ -1330,12 +1337,22 @@ function findPendingApproval(pendingApprovals, id) {
1330
1337
  function removePendingApproval(pendingApprovals, id) {
1331
1338
  return pendingApprovals.filter((a) => a.id !== id);
1332
1339
  }
1340
+ /**
1341
+ * DM requests saved before sender provenance was recorded cannot be told apart from unverified
1342
+ * group DM claims, so their stored message is never replayed; the sender must send it again.
1343
+ */
1344
+ function requiresResendAfterApproval(approval) {
1345
+ return approval.type === "dm" && approval.originalMessage !== void 0 && approval.clubId === void 0 && approval.verifiedDirect !== true;
1346
+ }
1333
1347
  function formatApprovalConfirmation(approval, action) {
1334
1348
  if (action === "block") return `Blocked ${approval.requestingShip}. They will no longer be able to contact the bot.`;
1335
1349
  const actionText = action === "approve" ? "Approved" : "Denied";
1336
1350
  switch (approval.type) {
1337
1351
  case "dm":
1338
- if (action === "approve") return `${actionText} DM access for ${approval.requestingShip}. They can now message the bot.`;
1352
+ if (action === "approve") {
1353
+ if (requiresResendAfterApproval(approval)) return `${actionText} DM access for ${approval.requestingShip}. They can now message the bot.\nTheir earlier message was saved before this version and its sender cannot be verified, so it was not processed. Ask ${approval.requestingShip} to send it again.`;
1354
+ return `${actionText} DM access for ${approval.requestingShip}. They can now message the bot.`;
1355
+ }
1339
1356
  return `${actionText} DM request from ${approval.requestingShip}.`;
1340
1357
  case "channel":
1341
1358
  if (action === "approve") return `${actionText} ${approval.requestingShip} for ${approval.channelNest}. They can now interact in this channel.`;
@@ -1498,11 +1515,13 @@ function createTlonApprovalRuntime(params) {
1498
1515
  return false;
1499
1516
  }
1500
1517
  const approvals = getPendingApprovals();
1501
- const existing = approvals.find((item) => item.type === approval.type && item.requestingShip === approval.requestingShip && (approval.type !== "channel" || item.channelNest === approval.channelNest) && (approval.type !== "group" || item.groupFlag === approval.groupFlag));
1518
+ const existing = approvals.find((item) => item.type === approval.type && item.requestingShip === approval.requestingShip && item.clubId === approval.clubId && (approval.type !== "channel" || item.channelNest === approval.channelNest) && (approval.type !== "group" || item.groupFlag === approval.groupFlag));
1502
1519
  if (existing) {
1503
1520
  if (approval.originalMessage) {
1504
1521
  existing.originalMessage = approval.originalMessage;
1505
1522
  existing.messagePreview = approval.messagePreview;
1523
+ if (approval.verifiedDirect === true) existing.verifiedDirect = true;
1524
+ else delete existing.verifiedDirect;
1506
1525
  }
1507
1526
  runtime.log?.(`[tlon] Updated existing approval for ${approval.requestingShip} (${approval.type}) - re-sending notification`);
1508
1527
  await savePendingApprovals(true);
@@ -1537,7 +1556,8 @@ function createTlonApprovalRuntime(params) {
1537
1556
  switch (approval.type) {
1538
1557
  case "dm":
1539
1558
  await addToDmAllowlist(approval.requestingShip);
1540
- if (approval.originalMessage) {
1559
+ if (requiresResendAfterApproval(approval)) runtime.log?.(`[tlon] Not replaying pre-upgrade DM request from ${approval.requestingShip}: sender provenance unknown; owner told to request a resend`);
1560
+ else if (approval.originalMessage) {
1541
1561
  runtime.log?.(`[tlon] Processing original message from ${approval.requestingShip} after approval`);
1542
1562
  await processApprovedMessage(approval);
1543
1563
  }
@@ -2540,6 +2560,10 @@ function createActiveSnapshotTracker() {
2540
2560
  }
2541
2561
  //#endregion
2542
2562
  //#region extensions/tlon/src/monitor/index.ts
2563
+ /** Identity for an unverified group DM (club) author claim; never matches a bare ship. */
2564
+ function clubSenderId(clubId, claimedShip) {
2565
+ return `club:${clubId}:${claimedShip}`;
2566
+ }
2543
2567
  async function monitorTlonProvider(opts = {}) {
2544
2568
  const core = getTlonRuntime();
2545
2569
  const cfg = core.config.current();
@@ -2659,9 +2683,17 @@ async function monitorTlonProvider(opts = {}) {
2659
2683
  if (!effectiveOwnerShip) return false;
2660
2684
  return normalizeShip(ship) === effectiveOwnerShip;
2661
2685
  }
2686
+ /** DM ingress allowlist for one chat event; club claims only match as their club-scoped id. */
2687
+ function resolveChatAllowFrom(params) {
2688
+ if (params.ownerDm) return [params.senderShip];
2689
+ if (!params.isClubMessage) return effectiveDmAllowlist;
2690
+ return effectiveDmAllowlist.some((ship) => normalizeShip(ship) === params.senderShip) ? [params.senderId] : [];
2691
+ }
2662
2692
  const processMessage = async (params) => {
2663
2693
  const { messageId, senderShip, isGroup, channelNest, timestamp, parentId, isThreadReply, isAdmissionAllowed, messageContent, turnAdoptionLifecycle, resolveChannelIngress } = params;
2664
2694
  let messageText = params.messageText;
2695
+ const clubId = params.clubId;
2696
+ const senderId = clubId === void 0 ? senderShip : clubSenderId(clubId, senderShip);
2665
2697
  let attachments = [];
2666
2698
  let unavailableMediaCount = 0;
2667
2699
  if (messageContent) try {
@@ -2749,13 +2781,13 @@ async function monitorTlonProvider(opts = {}) {
2749
2781
  }
2750
2782
  senders.add(senderShip);
2751
2783
  }
2752
- const senderRole = isOwner(senderShip) ? "owner" : "user";
2753
- const fromLabel = isGroup ? `${senderShip} [${senderRole}] in ${channelNest}` : `${senderShip} [${senderRole}]`;
2784
+ const senderRole = clubId === void 0 && isOwner(senderShip) ? "owner" : "user";
2785
+ const fromLabel = isGroup ? `${senderShip} [${senderRole}] in ${channelNest}` : clubId !== void 0 ? `${senderShip} (unverified) [${senderRole}] in group DM ${clubId}` : `${senderShip} [${senderRole}]`;
2754
2786
  const shouldComputeAuth = core.channel.commands.shouldComputeCommandAuthorized(messageText, cfg);
2755
2787
  let commandAuthorized = false;
2756
2788
  if (shouldComputeAuth) {
2757
2789
  commandAuthorized = (await resolveTlonCommandAuthorizationWithIngress({
2758
- senderShip,
2790
+ senderShip: senderId,
2759
2791
  ownerShip: effectiveOwnerShip,
2760
2792
  useAccessGroups: true
2761
2793
  })).commandAccess.authorized;
@@ -2782,10 +2814,10 @@ async function monitorTlonProvider(opts = {}) {
2782
2814
  accountId: route.accountId,
2783
2815
  messageId,
2784
2816
  timestamp,
2785
- from: isGroup ? `tlon:group:${channelNest}` : `tlon:${senderShip}`,
2817
+ from: isGroup ? `tlon:group:${channelNest}` : `tlon:${senderId}`,
2786
2818
  sender: {
2787
- id: senderShip,
2788
- name: senderShip,
2819
+ id: senderId,
2820
+ name: clubId === void 0 ? senderShip : senderId,
2789
2821
  roles: [senderRole]
2790
2822
  },
2791
2823
  conversation: {
@@ -2941,9 +2973,16 @@ async function monitorTlonProvider(opts = {}) {
2941
2973
  const isGroup = approval.type === "channel";
2942
2974
  const conversationId = isGroup ? approval.channelNest ?? "" : approval.requestingShip;
2943
2975
  if (isGroup && !conversationId) return;
2976
+ const clubId = !isGroup ? approval.clubId : void 0;
2977
+ if (!isGroup && clubId === void 0 && approval.verifiedDirect !== true) {
2978
+ runtime.log?.(`[tlon] Not replaying pre-upgrade DM request from ${approval.requestingShip}: sender provenance unknown`);
2979
+ return;
2980
+ }
2981
+ const replaySenderId = clubId === void 0 ? approval.requestingShip : clubSenderId(clubId, approval.requestingShip);
2944
2982
  await processMessage({
2945
2983
  messageId: approval.originalMessage.messageId,
2946
2984
  senderShip: approval.requestingShip,
2985
+ clubId,
2947
2986
  messageText: approval.originalMessage.messageText,
2948
2987
  messageContent: approval.originalMessage.messageContent,
2949
2988
  timestamp: approval.originalMessage.timestamp,
@@ -2954,13 +2993,13 @@ async function monitorTlonProvider(opts = {}) {
2954
2993
  isThreadReply: approval.originalMessage.isThreadReply
2955
2994
  } : {},
2956
2995
  resolveChannelIngress: async (contextBinding) => await resolveTlonMessageIngress({
2957
- senderShip: approval.requestingShip,
2996
+ senderShip: replaySenderId,
2958
2997
  accountId: account.accountId,
2959
2998
  conversation: {
2960
2999
  kind: isGroup ? "group" : "direct",
2961
3000
  id: conversationId
2962
3001
  },
2963
- allowFrom: [approval.requestingShip],
3002
+ allowFrom: [replaySenderId],
2964
3003
  ...isGroup ? { groupPolicy: "allowlist" } : { dmPolicy: "allowlist" },
2965
3004
  contextBinding
2966
3005
  })
@@ -3125,29 +3164,37 @@ async function monitorTlonProvider(opts = {}) {
3125
3164
  const authorShip = normalizeShip(readStringField(essay, "author") ?? "");
3126
3165
  const partnerShip = extractDmPartnerShip(whom);
3127
3166
  const senderShip = partnerShip || authorShip;
3167
+ const clubId = partnerShip ? void 0 : typeof whom === "string" && whom ? whom : "unknown";
3168
+ const isClubMessage = clubId !== void 0;
3169
+ const senderId = isClubMessage ? clubSenderId(clubId, senderShip) : senderShip;
3128
3170
  if (authorShip === botShipName) return;
3129
3171
  if (!senderShip || senderShip === botShipName) return;
3130
3172
  if (authorShip && partnerShip && authorShip !== partnerShip) runtime.log?.(`[tlon] DM ship mismatch (author=${authorShip}, partner=${partnerShip}) - routing to partner`);
3131
3173
  const rawText = extractMessageText(essay.content);
3132
3174
  if (!rawText.trim()) return;
3133
3175
  const messageText = rawText;
3134
- if (isOwner(senderShip) && await handleApprovalResponse(messageText)) {
3176
+ const ownerDm = !isClubMessage && isOwner(senderShip);
3177
+ if (ownerDm && await handleApprovalResponse(messageText)) {
3135
3178
  runtime.log?.(`[tlon] Processed approval response from owner: ${messageText}`);
3136
3179
  return;
3137
3180
  }
3138
- if (isOwner(senderShip) && await handleAdminCommand(messageText)) {
3181
+ if (ownerDm && await handleAdminCommand(messageText)) {
3139
3182
  runtime.log?.(`[tlon] Processed admin command from owner: ${messageText}`);
3140
3183
  return;
3141
3184
  }
3142
- const ownerDm = isOwner(senderShip);
3143
3185
  const resolveChannelIngress = async (contextBinding) => await resolveTlonMessageIngress({
3144
- senderShip,
3186
+ senderShip: senderId,
3145
3187
  accountId: account.accountId,
3146
3188
  conversation: {
3147
3189
  kind: "direct",
3148
3190
  id: senderShip
3149
3191
  },
3150
- allowFrom: ownerDm ? [senderShip] : effectiveDmAllowlist,
3192
+ allowFrom: resolveChatAllowFrom({
3193
+ ownerDm,
3194
+ isClubMessage,
3195
+ senderShip,
3196
+ senderId
3197
+ }),
3151
3198
  dmPolicy: "allowlist",
3152
3199
  contextBinding
3153
3200
  });
@@ -3157,12 +3204,13 @@ async function monitorTlonProvider(opts = {}) {
3157
3204
  type: "dm",
3158
3205
  requestingShip: senderShip,
3159
3206
  messagePreview: sliceUtf16Safe(messageText, 0, 100),
3160
- originalMessage: {
3207
+ ...isClubMessage ? { clubId } : { verifiedDirect: true },
3208
+ ...isClubMessage && isOwner(senderShip) ? {} : { originalMessage: {
3161
3209
  messageId,
3162
3210
  messageText,
3163
3211
  messageContent: essay.content,
3164
3212
  timestamp: asFiniteNumber(essay?.sent) ?? Date.now()
3165
- }
3213
+ } }
3166
3214
  });
3167
3215
  await queueApprovalRequest(approval);
3168
3216
  } else runtime.log?.(`[tlon] Blocked DM from ${senderShip}: not in allowlist`);
@@ -3179,6 +3227,7 @@ async function monitorTlonProvider(opts = {}) {
3179
3227
  messageText: resolvedMessageText,
3180
3228
  messageId,
3181
3229
  senderShip,
3230
+ clubId,
3182
3231
  messageContent: essay.content,
3183
3232
  isGroup: false,
3184
3233
  timestamp: asFiniteNumber(essay?.sent) ?? Date.now(),
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-DNzlsYXc.mjs";
2
+ import { t as tlonPlugin } from "./.setup/channel-BaO83mHZ.mjs";
3
3
  import { n as setTlonRuntime } from "./.setup/runtime-Ck3lNvST.mjs";
4
4
  export { SsrFBlockedError, createDedupeCache, createLoggerBackedRuntime, fetchWithSsrFGuard, isBlockedHostnameOrIp, setTlonRuntime, ssrfPolicyFromDangerouslyAllowPrivateNetwork, tlonPlugin };
@@ -1,2 +1 @@
1
- import { t as tlonPlugin } from "./.setup/channel-DNzlsYXc.mjs";
2
- export { tlonPlugin };
1
+ export { t as tlonPlugin } from "./.setup/channel-BaO83mHZ.mjs";
@@ -1,2 +1 @@
1
- import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./.setup/doctor-contract-BiiG6XQ7.mjs";
2
- export { legacyConfigRules, normalizeCompatibilityConfig };
1
+ export { t as legacyConfigRules, n as normalizeCompatibilityConfig } from "./.setup/doctor-contract-BiiG6XQ7.mjs";
@@ -4,7 +4,7 @@ import { fileURLToPath } from "node:url";
4
4
  var setup_entry_default = defineBundledChannelSetupEntry({
5
5
  importMetaUrl: import.meta.url,
6
6
  plugin: {
7
- specifier: fileURLToPath(new URL(".setup/api-zkJ1V5qJ.mjs", import.meta.url).href),
7
+ specifier: fileURLToPath(new URL(".setup/api-CFb7X3sR.mjs", import.meta.url).href),
8
8
  exportName: "tlonPlugin"
9
9
  }
10
10
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/tlon",
3
- "version": "2026.9.33",
3
+ "version": "2026.9.34",
4
4
  "description": "OpenClaw Tlon/Urbit channel plugin for chat workflows.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,14 +12,14 @@
12
12
  "@aws-sdk/s3-request-presigner": "3.1136.0",
13
13
  "@tloncorp/tlon-skill": "0.5.0",
14
14
  "@urbit/aura": "3.0.0",
15
- "zod": "4.6.5"
15
+ "zod": "4.6.7"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@openclaw/plugin-sdk": "workspace:*",
19
19
  "openclaw": "workspace:*"
20
20
  },
21
21
  "peerDependencies": {
22
- "openclaw": ">=2026.9.33"
22
+ "openclaw": ">=2026.9.34"
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.9.33"
124
+ "pluginApi": ">=2026.9.34"
125
125
  },
126
126
  "build": {
127
- "openclawVersion": "2026.9.33"
127
+ "openclawVersion": "2026.9.34"
128
128
  },
129
129
  "release": {
130
130
  "bundleRuntimeDependencies": false,