@openclaw/tlon 2026.7.2-beta.2 → 2026.7.2-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/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-B3c5Sud6.js";
2
+ import { t as tlonPlugin } from "./channel-B_FSYQLm.js";
3
3
  import { n as setTlonRuntime } from "./runtime-Ck3lNvST.js";
4
4
  export { SsrFBlockedError, createDedupeCache, createLoggerBackedRuntime, fetchWithSsrFGuard, isBlockedHostnameOrIp, setTlonRuntime, ssrfPolicyFromDangerouslyAllowPrivateNetwork, tlonPlugin };
@@ -4,12 +4,12 @@ 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";
6
6
  import { createHybridChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
7
- import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
7
+ import { createChannelConfigUiHints, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
8
8
  import { createChannelMessageAdapterFromOutbound, createRuntimeOutboundDelegates } from "openclaw/plugin-sdk/channel-outbound";
9
9
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
10
10
  import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
11
11
  import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
12
- import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
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);
@@ -33,6 +33,7 @@ const tlonCommonConfigFields = {
33
33
  autoDiscoverChannels: z.boolean().optional(),
34
34
  showModelSignature: z.boolean().optional(),
35
35
  responsePrefix: z.string().optional(),
36
+ implicitMentions: ChannelImplicitMentionsSchema.optional(),
36
37
  autoAcceptDmInvites: z.boolean().optional(),
37
38
  autoAcceptGroupInvites: z.boolean().optional(),
38
39
  ownerShip: ShipSchema.optional()
@@ -43,7 +44,10 @@ const tlonChannelConfigSchema = buildChannelConfigSchema(z.object({
43
44
  authorization: TlonAuthorizationSchema.optional(),
44
45
  defaultAuthorizedShips: z.array(ShipSchema).optional(),
45
46
  accounts: z.record(z.string(), TlonAccountSchema).optional()
46
- }));
47
+ }), { uiHints: createChannelConfigUiHints({
48
+ channelLabel: "Tlon",
49
+ implicitMentions: true
50
+ }) });
47
51
  //#endregion
48
52
  //#region extensions/tlon/src/doctor.ts
49
53
  const tlonDoctor = {
@@ -87,7 +91,7 @@ function resolveTlonOutboundSessionRoute(params) {
87
91
  //#endregion
88
92
  //#region extensions/tlon/src/channel.ts
89
93
  const TLON_CHANNEL_ID = "tlon";
90
- const loadTlonChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-BtBrqXGq.js"));
94
+ const loadTlonChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-CbQv5emM.js"));
91
95
  const tlonSetupWizardProxy = createTlonSetupWizardBase({
92
96
  resolveConfigured: async ({ cfg, accountId }) => await (await loadTlonChannelRuntime()).tlonSetupWizard.status.resolveConfigured({
93
97
  cfg,
@@ -1,2 +1,2 @@
1
- import { t as tlonPlugin } from "./channel-B3c5Sud6.js";
1
+ import { t as tlonPlugin } from "./channel-B_FSYQLm.js";
2
2
  export { tlonPlugin };
@@ -8,12 +8,15 @@ import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
8
8
  import { asFiniteNumber, normalizeLowercaseStringOrEmpty, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import crypto, { randomBytes, randomUUID } from "node:crypto";
10
10
  import { readProviderJsonResponse, readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
11
+ import { resolveHumanDelayConfig } from "openclaw/plugin-sdk/agent-runtime";
12
+ import { createChannelInboundEnvelopeBuilder, implicitMentionKindWhen, resolveInboundMentionDecision } from "openclaw/plugin-sdk/channel-inbound";
11
13
  import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
12
14
  import { sliceUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
13
15
  import { da, scot } from "@urbit/aura";
14
16
  import { Readable } from "node:stream";
15
17
  import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
16
- import { resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
18
+ import { resolveAllowlistMatchByCandidates } from "openclaw/plugin-sdk/allow-from";
19
+ import { resolveChannelImplicitMentions, resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
17
20
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
18
21
  import { mkdir, writeFile } from "node:fs/promises";
19
22
  import * as path from "node:path";
@@ -1694,10 +1697,37 @@ async function resolveTlonCommandAuthorizationWithIngress(params) {
1694
1697
  command: {}
1695
1698
  });
1696
1699
  }
1700
+ function resolveTlonGroupMentionDecision(params) {
1701
+ const implicitMentions = resolveChannelImplicitMentions({
1702
+ cfg: params.cfg,
1703
+ channel: "tlon",
1704
+ accountId: params.accountId
1705
+ });
1706
+ return resolveInboundMentionDecision({
1707
+ facts: {
1708
+ canDetectMention: true,
1709
+ wasMentioned: params.wasMentioned,
1710
+ implicitMentionKinds: implicitMentionKindWhen("bot_thread_participant", params.botParticipatedInThread)
1711
+ },
1712
+ policy: {
1713
+ isGroup: true,
1714
+ requireMention: true,
1715
+ implicitMentions,
1716
+ allowTextCommands: false,
1717
+ hasControlCommand: false,
1718
+ commandAuthorized: false
1719
+ }
1720
+ });
1721
+ }
1697
1722
  function isGroupInviteAllowed(inviterShip, allowlist) {
1698
- if (!allowlist || allowlist.length === 0) return false;
1699
1723
  const normalizedInviter = normalizeShip(inviterShip);
1700
- return allowlist.map((ship) => normalizeShip(ship)).some((ship) => ship === normalizedInviter);
1724
+ return resolveAllowlistMatchByCandidates({
1725
+ allowList: (allowlist ?? []).map((ship) => normalizeShip(ship)),
1726
+ candidates: [{
1727
+ value: normalizedInviter,
1728
+ source: "ship"
1729
+ }]
1730
+ }).allowed;
1701
1731
  }
1702
1732
  async function resolveAuthorizedMessageText(params) {
1703
1733
  const { rawText, content, authorizedForCites, resolveAllCites } = params;
@@ -2521,7 +2551,10 @@ async function monitorTlonProvider(opts = {}) {
2521
2551
  }
2522
2552
  let bodyWithAttachments = messageText;
2523
2553
  if (attachments.length > 0) bodyWithAttachments = attachments.map((a) => `[media attached: ${a.path} (${a.contentType}) | ${a.path}]`).join("\n") + "\n" + messageText;
2524
- const body = core.channel.reply.formatAgentEnvelope({
2554
+ const body = createChannelInboundEnvelopeBuilder({
2555
+ cfg,
2556
+ route
2557
+ })({
2525
2558
  channel: "Tlon",
2526
2559
  from: fromLabel,
2527
2560
  timestamp,
@@ -2547,6 +2580,7 @@ async function monitorTlonProvider(opts = {}) {
2547
2580
  },
2548
2581
  route: {
2549
2582
  agentId: route.agentId,
2583
+ dmScope: route.dmScope,
2550
2584
  accountId: route.accountId,
2551
2585
  routeSessionKey: route.sessionKey
2552
2586
  },
@@ -2572,8 +2606,7 @@ async function monitorTlonProvider(opts = {}) {
2572
2606
  });
2573
2607
  const dispatchStartTime = Date.now();
2574
2608
  const responsePrefix = core.channel.reply.resolveEffectiveMessagesConfig(cfg, route.agentId).responsePrefix;
2575
- const humanDelay = core.channel.reply.resolveHumanDelayConfig(cfg, route.agentId);
2576
- const storePath = core.channel.session.resolveStorePath(cfg.session?.store, { agentId: route.agentId });
2609
+ const humanDelay = resolveHumanDelayConfig(cfg, route.agentId);
2577
2610
  const deliveryTarget = isGroup ? groupChannel : senderShip;
2578
2611
  const prepareReplyPayload = (payload) => {
2579
2612
  const replyText = payload.text;
@@ -2592,16 +2625,16 @@ async function monitorTlonProvider(opts = {}) {
2592
2625
  participatedThreads.add(parentId);
2593
2626
  runtime.log?.(`[tlon] Now tracking thread for future replies: ${parentId}`);
2594
2627
  };
2595
- await core.channel.inbound.dispatchReply({
2628
+ await core.channel.inbound.dispatch({
2596
2629
  channel: "tlon",
2597
2630
  accountId: route.accountId,
2598
2631
  cfg,
2599
- agentId: route.agentId,
2600
- routeSessionKey: route.sessionKey,
2601
- storePath,
2632
+ route: {
2633
+ agentId: route.agentId,
2634
+ dmScope: route.dmScope,
2635
+ sessionKey: route.sessionKey
2636
+ },
2602
2637
  ctxPayload,
2603
- recordInboundSession: core.channel.session.recordInboundSession,
2604
- dispatchReplyWithBufferedBlockDispatcher: core.channel.reply.dispatchReplyWithBufferedBlockDispatcher,
2605
2638
  delivery: {
2606
2639
  preparePayload: prepareReplyPayload,
2607
2640
  durable: deliveryTarget ? () => ({
@@ -2760,8 +2793,14 @@ async function monitorTlonProvider(opts = {}) {
2760
2793
  const parentId = readString(seal, "parent-id") ?? readString(seal, "parent") ?? null;
2761
2794
  const mentioned = isBotMentioned(rawText, botShipName, botNickname ?? void 0);
2762
2795
  const inParticipatedThread = isThreadReply && parentId && participatedThreads.has(parentId);
2763
- if (!mentioned && !inParticipatedThread) return;
2764
- if (inParticipatedThread && !mentioned) runtime.log?.(`[tlon] Responding to thread we participated in (no mention): ${parentId}`);
2796
+ const mentionDecision = resolveTlonGroupMentionDecision({
2797
+ cfg,
2798
+ accountId: account.accountId,
2799
+ wasMentioned: mentioned,
2800
+ botParticipatedInThread: Boolean(inParticipatedThread)
2801
+ });
2802
+ if (mentionDecision.shouldSkip) return;
2803
+ if (mentionDecision.implicitMention && !mentioned) runtime.log?.(`[tlon] Responding to thread we participated in (no mention): ${parentId}`);
2765
2804
  if (isOwner(senderShip)) runtime.log?.(`[tlon] Owner ${senderShip} is always allowed in channels`);
2766
2805
  else {
2767
2806
  const { mode, allowedShips } = resolveChannelAuthorization(cfg, nest, currentSettings);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/tlon",
3
- "version": "2026.7.2-beta.2",
3
+ "version": "2026.7.2-beta.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/tlon",
9
- "version": "2026.7.2-beta.2",
9
+ "version": "2026.7.2-beta.3",
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.2"
18
+ "openclaw": ">=2026.7.2-beta.3"
19
19
  },
20
20
  "peerDependenciesMeta": {
21
21
  "openclaw": {
@@ -77,6 +77,21 @@
77
77
  "responsePrefix": {
78
78
  "type": "string"
79
79
  },
80
+ "implicitMentions": {
81
+ "type": "object",
82
+ "properties": {
83
+ "replyToBot": {
84
+ "type": "boolean"
85
+ },
86
+ "quotedBot": {
87
+ "type": "boolean"
88
+ },
89
+ "threadParticipation": {
90
+ "type": "boolean"
91
+ }
92
+ },
93
+ "additionalProperties": false
94
+ },
80
95
  "autoAcceptDmInvites": {
81
96
  "type": "boolean"
82
97
  },
@@ -189,6 +204,21 @@
189
204
  "responsePrefix": {
190
205
  "type": "string"
191
206
  },
207
+ "implicitMentions": {
208
+ "type": "object",
209
+ "properties": {
210
+ "replyToBot": {
211
+ "type": "boolean"
212
+ },
213
+ "quotedBot": {
214
+ "type": "boolean"
215
+ },
216
+ "threadParticipation": {
217
+ "type": "boolean"
218
+ }
219
+ },
220
+ "additionalProperties": false
221
+ },
192
222
  "autoAcceptDmInvites": {
193
223
  "type": "boolean"
194
224
  },
@@ -207,7 +237,25 @@
207
237
  "additionalProperties": false
208
238
  },
209
239
  "label": "Tlon",
210
- "description": "decentralized messaging on Urbit; install the plugin to enable."
240
+ "description": "decentralized messaging on Urbit; install the plugin to enable.",
241
+ "uiHints": {
242
+ "implicitMentions": {
243
+ "label": "Tlon Implicit Mentions",
244
+ "help": "Control which Tlon reply, quote, and thread-participation signals count as mentions. Unset flags preserve the channel defaults."
245
+ },
246
+ "implicitMentions.replyToBot": {
247
+ "label": "Tlon Replies to Bot",
248
+ "help": "Treat replies to the bot's own messages as implicit mentions when the channel reports that signal."
249
+ },
250
+ "implicitMentions.quotedBot": {
251
+ "label": "Tlon Quoted Bot Messages",
252
+ "help": "Treat messages quoting the bot as implicit mentions when the channel reports that signal."
253
+ },
254
+ "implicitMentions.threadParticipation": {
255
+ "label": "Tlon Thread Participation",
256
+ "help": "Treat follow-ups in threads where the bot participated as implicit mentions when the channel reports that signal."
257
+ }
258
+ }
211
259
  }
212
260
  }
213
261
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/tlon",
3
- "version": "2026.7.2-beta.2",
3
+ "version": "2026.7.2-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.7.2-beta.2"
22
+ "openclaw": ">=2026.7.2-beta.3"
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.2"
76
+ "pluginApi": ">=2026.7.2-beta.3"
77
77
  },
78
78
  "build": {
79
- "openclawVersion": "2026.7.2-beta.2"
79
+ "openclawVersion": "2026.7.2-beta.3"
80
80
  },
81
81
  "release": {
82
82
  "bundleRuntimeDependencies": false,