@openclaw/tlon 2026.7.2-beta.2 → 2026.7.2-beta.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/setup-api.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as tlonSetupAdapter } from "./setup-core-BgykzCYT.js";
2
- import { t as tlonSetupWizard } from "./setup-surface-j5Hrbts7.js";
1
+ import { a as tlonSetupAdapter } from "./setup-core-CrZ1Pk4C.js";
2
+ import { t as tlonSetupWizard } from "./setup-surface-3Assi5YZ.js";
3
3
  export { tlonSetupAdapter, tlonSetupWizard };
@@ -1,5 +1,6 @@
1
1
  import { hasLegacyFlatAllowPrivateNetworkAlias, isBlockedHostnameOrIp, isPrivateNetworkOptInEnabled } from "openclaw/plugin-sdk/ssrf-runtime";
2
2
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
3
+ import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
3
4
  import { DEFAULT_ACCOUNT_ID, createSetupInputPresenceValidator, createSetupTranslator, formatDocsLink, normalizeAccountId, patchScopedAccountConfig, prepareScopedSetupConfig } from "openclaw/plugin-sdk/setup";
4
5
  import { normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
6
  import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, listCombinedAccountIds, normalizeAccountId as normalizeAccountId$1, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
@@ -361,7 +362,18 @@ function applyTlonSetupConfig(params) {
361
362
  });
362
363
  }
363
364
  const tlonSetupAdapter = {
365
+ singleAccountKeysToMove: ["url", "code"],
364
366
  resolveAccountId: ({ accountId }) => normalizeAccountId(accountId),
367
+ prepareAccountConfigInput: ({ input }) => {
368
+ const setupInput = input;
369
+ const url = normalizeOptionalString(setupInput.url);
370
+ if (!url) return setupInput;
371
+ const validatedUrl = validateUrbitBaseUrl(url);
372
+ return validatedUrl.ok ? {
373
+ ...setupInput,
374
+ url: validatedUrl.baseUrl
375
+ } : setupInput;
376
+ },
365
377
  applyAccountName: ({ cfg, accountId, name }) => prepareScopedSetupConfig({
366
378
  cfg,
367
379
  channelKey: tlonChannelId(),
@@ -369,12 +381,15 @@ const tlonSetupAdapter = {
369
381
  name
370
382
  }),
371
383
  validateInput: createSetupInputPresenceValidator({ validate: ({ cfg, accountId, input }) => {
384
+ const setupInput = input;
372
385
  const resolved = resolveTlonAccount(cfg, accountId ?? void 0);
373
- const ship = normalizeOptionalString(input.ship) || resolved.ship;
374
- const url = normalizeOptionalString(input.url) || resolved.url;
375
- const code = normalizeOptionalString(input.code) || resolved.code;
386
+ const ship = normalizeOptionalString(setupInput.ship ?? resolved.ship);
387
+ const url = normalizeOptionalString(setupInput.url ?? resolved.url);
388
+ const code = normalizeOptionalString(setupInput.code ?? resolved.code);
376
389
  if (!ship) return "Tlon requires --ship.";
377
390
  if (!url) return "Tlon requires --url.";
391
+ const validatedUrl = validateUrbitBaseUrl(url);
392
+ if (!validatedUrl.ok) return `Invalid URL: ${validatedUrl.error}`;
378
393
  if (!code) return "Tlon requires --code.";
379
394
  return null;
380
395
  } }),
@@ -384,5 +399,68 @@ const tlonSetupAdapter = {
384
399
  input
385
400
  })
386
401
  };
402
+ const tlonSetupContract = defineChannelSetupContract({
403
+ fields: {
404
+ ship: {
405
+ kind: "string",
406
+ cli: {
407
+ flags: "--ship <ship>",
408
+ description: "Tlon ship"
409
+ }
410
+ },
411
+ url: {
412
+ kind: "string",
413
+ cli: {
414
+ flags: "--url <url>",
415
+ description: "Tlon URL"
416
+ }
417
+ },
418
+ code: {
419
+ kind: "string",
420
+ sensitive: true,
421
+ cli: {
422
+ flags: "--code <code>",
423
+ description: "Tlon login code"
424
+ }
425
+ },
426
+ dangerouslyAllowPrivateNetwork: {
427
+ kind: "boolean",
428
+ cli: {
429
+ flags: "--dangerously-allow-private-network",
430
+ description: "Allow private-network Tlon URLs"
431
+ }
432
+ },
433
+ groupChannels: {
434
+ kind: "string-list",
435
+ cli: {
436
+ flags: "--group-channels <list>",
437
+ description: "Tlon group channels"
438
+ }
439
+ },
440
+ dmAllowlist: {
441
+ kind: "string-list",
442
+ cli: {
443
+ flags: "--dm-allowlist <list>",
444
+ description: "Tlon DM allowlist"
445
+ }
446
+ },
447
+ autoDiscoverChannels: {
448
+ kind: "boolean",
449
+ cli: {
450
+ flags: "--auto-discover-channels",
451
+ negatedFlags: "--no-auto-discover-channels",
452
+ description: "Auto-discover Tlon group channels"
453
+ }
454
+ },
455
+ ownerShip: {
456
+ kind: "string",
457
+ cli: {
458
+ flags: "--owner-ship <ship>",
459
+ description: "Tlon owner ship"
460
+ }
461
+ }
462
+ },
463
+ legacyAdapter: tlonSetupAdapter
464
+ });
387
465
  //#endregion
388
- export { tlonSetupAdapter as a, validateUrbitBaseUrl as c, formatTargetHint as d, normalizeShip as f, resolveTlonOutboundTarget as h, resolveTlonSetupStatusLines as i, listTlonAccountIds as l, parseTlonTarget as m, createTlonSetupWizardBase as n, isBlockedUrbitHostname as o, parseChannelNest as p, resolveTlonSetupConfigured as r, normalizeUrbitHostname as s, applyTlonSetupConfig as t, resolveTlonAccount as u };
466
+ export { tlonSetupAdapter as a, normalizeUrbitHostname as c, resolveTlonAccount as d, formatTargetHint as f, resolveTlonOutboundTarget as g, parseTlonTarget as h, resolveTlonSetupStatusLines as i, validateUrbitBaseUrl as l, parseChannelNest as m, createTlonSetupWizardBase as n, tlonSetupContract as o, normalizeShip as p, resolveTlonSetupConfigured as r, isBlockedUrbitHostname as s, applyTlonSetupConfig as t, listTlonAccountIds as u };
@@ -1,4 +1,4 @@
1
- import { c as validateUrbitBaseUrl, f as normalizeShip, i as resolveTlonSetupStatusLines, n as createTlonSetupWizardBase, o as isBlockedUrbitHostname, r as resolveTlonSetupConfigured, t as applyTlonSetupConfig, u as resolveTlonAccount } from "./setup-core-BgykzCYT.js";
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-CrZ1Pk4C.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