talon-agent 5.0.0 → 5.1.0

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.
Files changed (136) hide show
  1. package/package.json +2 -2
  2. package/src/app.ts +3 -3
  3. package/src/backend/claude-sdk/factory.ts +21 -41
  4. package/src/backend/claude-sdk/handler.ts +191 -69
  5. package/src/backend/claude-sdk/host/in-process.ts +147 -0
  6. package/src/backend/claude-sdk/one-shot.ts +17 -2
  7. package/src/backend/claude-sdk/stream.ts +9 -0
  8. package/src/backend/codex/mcp-config.ts +1 -1
  9. package/src/backend/codex/one-shot.ts +18 -4
  10. package/src/backend/openai-agents/mcp-pool.ts +1 -1
  11. package/src/backend/remote-server/one-shot.ts +16 -3
  12. package/src/backend/runtime/index.ts +2 -2
  13. package/src/backend/runtime/one-shot-hooks.ts +45 -0
  14. package/src/backend/runtime/turn/delivery.ts +1 -1
  15. package/src/backend/runtime/turn/turn-phases.ts +1 -1
  16. package/src/bootstrap.ts +2 -2
  17. package/src/cli.ts +5 -2
  18. package/src/core/agent-runtime/README.md +15 -0
  19. package/src/core/agent-runtime/agent-host.ts +388 -0
  20. package/src/core/agent-runtime/capabilities.ts +3 -0
  21. package/src/core/background/cron/scheduler.ts +1 -1
  22. package/src/core/background/triggers/command.ts +1 -1
  23. package/src/{util → core/config}/harden.ts +1 -1
  24. package/src/core/config/index.ts +1 -1
  25. package/src/core/daemon/pidfile.ts +1 -1
  26. package/src/core/daemon/resource-sampler.ts +2 -2
  27. package/src/{util → core/daemon}/respawn.ts +1 -1
  28. package/src/core/doctor/index.ts +1 -1
  29. package/src/core/engine/gateway-actions/fetch-url.ts +1 -1
  30. package/src/core/engine/gateway-actions/index.ts +1 -1
  31. package/src/core/engine/gateway-actions/memory.ts +2 -2
  32. package/src/core/engine/gateway-actions/native/exec-background.ts +129 -0
  33. package/src/core/engine/gateway-actions/native/exec-remote.ts +85 -0
  34. package/src/core/engine/gateway-actions/native/exec.ts +182 -0
  35. package/src/core/engine/gateway-actions/native/index.ts +46 -0
  36. package/src/core/engine/gateway-actions/native/params.ts +46 -0
  37. package/src/core/engine/gateway-actions/native/read.ts +182 -0
  38. package/src/core/engine/gateway-actions/native/results.ts +34 -0
  39. package/src/core/engine/gateway-actions/native/search.ts +212 -0
  40. package/src/core/engine/gateway-actions/native/shell.ts +39 -0
  41. package/src/core/engine/gateway-actions/native/teleport.ts +55 -0
  42. package/src/core/engine/gateway-actions/native/write.ts +170 -0
  43. package/src/core/frontend-runtime/builtins.ts +2 -2
  44. package/src/core/mcp-hub/children.ts +21 -5
  45. package/src/core/mcp-hub/index.ts +1 -1
  46. package/src/core/mcp-hub/talon-server.ts +1 -1
  47. package/src/core/memory/taps.ts +1 -1
  48. package/src/core/plugin/mcp.ts +1 -1
  49. package/src/core/scripts/lua.ts +1 -1
  50. package/src/core/tools/{chat.ts → chat/chat.ts} +1 -1
  51. package/src/core/tools/{cross-send.ts → chat/cross-send.ts} +1 -1
  52. package/src/core/tools/{history.ts → chat/history.ts} +2 -2
  53. package/src/core/tools/{media.ts → chat/media.ts} +1 -1
  54. package/src/core/tools/{members.ts → chat/members.ts} +2 -2
  55. package/src/core/tools/{messaging.ts → chat/messaging.ts} +2 -2
  56. package/src/core/tools/{moderation.ts → chat/moderation.ts} +2 -2
  57. package/src/core/tools/{stickers.ts → chat/stickers.ts} +2 -2
  58. package/src/core/tools/{whatsapp.ts → chat/whatsapp.ts} +1 -1
  59. package/src/core/tools/{memory.ts → content/memory.ts} +2 -2
  60. package/src/core/tools/{web.ts → content/web.ts} +1 -1
  61. package/src/core/tools/index.ts +20 -20
  62. package/src/core/tools/{admin.ts → ops/admin.ts} +1 -1
  63. package/src/core/tools/{bridge.ts → ops/bridge.ts} +2 -2
  64. package/src/core/tools/{goals.ts → ops/goals.ts} +2 -2
  65. package/src/core/tools/{mesh.ts → ops/mesh.ts} +1 -1
  66. package/src/core/tools/{models.ts → ops/models.ts} +1 -1
  67. package/src/core/tools/{native.ts → ops/native.ts} +1 -1
  68. package/src/core/tools/{scheduling.ts → ops/scheduling.ts} +1 -1
  69. package/src/core/tools/{scripts.ts → ops/scripts.ts} +1 -1
  70. package/src/core/tools/{skills.ts → ops/skills.ts} +1 -1
  71. package/src/core/tools/{triggers.ts → ops/triggers.ts} +1 -1
  72. package/src/core/types.ts +11 -0
  73. package/src/{util → core/vfs}/workspace.ts +2 -2
  74. package/src/frontend/discord/callbacks/components/effort.ts +1 -1
  75. package/src/frontend/discord/callbacks/components/index.ts +1 -1
  76. package/src/frontend/discord/callbacks/components/settings.ts +1 -1
  77. package/src/frontend/discord/commands/admin.ts +1 -1
  78. package/src/frontend/discord/commands/info.ts +1 -1
  79. package/src/frontend/discord/commands/interaction.ts +1 -1
  80. package/src/frontend/discord/commands/session.ts +3 -3
  81. package/src/frontend/discord/commands/settings.ts +1 -1
  82. package/src/frontend/discord/handlers/messages.ts +1 -1
  83. package/src/frontend/discord/handlers/state.ts +1 -1
  84. package/src/frontend/discord/middleware.ts +1 -1
  85. package/src/frontend/discord/ready.ts +1 -1
  86. package/src/frontend/discord/render.ts +41 -259
  87. package/src/frontend/native/chats/chats.ts +1 -1
  88. package/src/frontend/native/surface/models.ts +1 -1
  89. package/src/frontend/native/turn/context.ts +1 -1
  90. package/src/frontend/native/turn/emit.ts +1 -1
  91. package/src/frontend/{shared → presentation}/format.ts +4 -3
  92. package/src/frontend/{shared → presentation}/reasoning-levels.ts +12 -0
  93. package/src/frontend/presentation/reports.ts +493 -0
  94. package/src/frontend/{shared → presentation}/session-status.ts +1 -1
  95. package/src/frontend/teams/commands.ts +2 -2
  96. package/src/frontend/teams/turn.ts +1 -1
  97. package/src/frontend/telegram/admin/health.ts +1 -1
  98. package/src/frontend/telegram/admin/sessions.ts +1 -1
  99. package/src/frontend/telegram/callbacks/effort.ts +2 -2
  100. package/src/frontend/telegram/callbacks/metrics.ts +1 -1
  101. package/src/frontend/telegram/callbacks/model/views.ts +1 -1
  102. package/src/frontend/telegram/callbacks/query.ts +1 -1
  103. package/src/frontend/telegram/callbacks/settings.ts +2 -2
  104. package/src/frontend/telegram/commands/admin.ts +4 -4
  105. package/src/frontend/telegram/commands/info.ts +2 -2
  106. package/src/frontend/telegram/commands/session.ts +4 -4
  107. package/src/frontend/telegram/commands/settings.ts +4 -2
  108. package/src/frontend/telegram/handlers/state.ts +1 -1
  109. package/src/frontend/telegram/model-menu.ts +1 -1
  110. package/src/frontend/telegram/render/html.ts +30 -0
  111. package/src/frontend/telegram/{helpers → render}/menu.ts +46 -19
  112. package/src/frontend/telegram/render/reports.ts +182 -0
  113. package/src/frontend/terminal/builtins/context.ts +2 -2
  114. package/src/frontend/terminal/builtins/session.ts +1 -1
  115. package/src/frontend/terminal/builtins/status.ts +2 -2
  116. package/src/frontend/terminal/index.ts +2 -2
  117. package/src/frontend/terminal/renderer.ts +1 -1
  118. package/src/frontend/whatsapp/commands.ts +5 -5
  119. package/src/frontend/whatsapp/registry.ts +1 -1
  120. package/src/index.ts +5 -2
  121. package/src/util/runtime.ts +1 -1
  122. package/src/core/engine/gateway-actions/native.ts +0 -1035
  123. package/src/frontend/telegram/helpers/diagnostics.ts +0 -428
  124. package/src/frontend/telegram/helpers/format.ts +0 -42
  125. package/src/frontend/telegram/helpers/index.ts +0 -13
  126. package/src/util/cleanup-registry.ts +0 -36
  127. /package/src/{util → core/daemon}/boot-timer.ts +0 -0
  128. /package/src/{util → core/frontend-runtime}/chat-id.ts +0 -0
  129. /package/src/{util/mcp-launcher.ts → core/mcp-hub/launcher.ts} +0 -0
  130. /package/src/{util → core/tools/content}/web-content.ts +0 -0
  131. /package/src/core/tools/{mcp-env.ts → ops/mcp-env.ts} +0 -0
  132. /package/src/{util → core/weaver}/session-name.ts +0 -0
  133. /package/src/frontend/{shared → presentation}/access.ts +0 -0
  134. /package/src/frontend/{shared → presentation}/model-commands.ts +0 -0
  135. /package/src/frontend/{shared → presentation}/plan-usage-report.ts +0 -0
  136. /package/src/frontend/{shared → presentation}/status-context.ts +0 -0
@@ -5,8 +5,8 @@
5
5
  */
6
6
 
7
7
  import { z } from "zod";
8
- import type { ToolDefinition } from "./types.js";
9
- import { chatIdSchema, snowflakeOrIdSchema } from "./schemas.js";
8
+ import type { ToolDefinition } from "../types.js";
9
+ import { chatIdSchema, snowflakeOrIdSchema } from "../schemas.js";
10
10
 
11
11
  export const moderationTools: ToolDefinition[] = [
12
12
  {
@@ -3,8 +3,8 @@
3
3
  */
4
4
 
5
5
  import { z } from "zod";
6
- import type { ToolDefinition } from "./types.js";
7
- import { idSchema } from "./schemas.js";
6
+ import type { ToolDefinition } from "../types.js";
7
+ import { idSchema } from "../schemas.js";
8
8
 
9
9
  export const stickerTools: ToolDefinition[] = [
10
10
  {
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import type { ToolDefinition } from "./types.js";
2
+ import type { ToolDefinition } from "../types.js";
3
3
 
4
4
  /**
5
5
  * WhatsApp account management. Deliberately NOT frontend-restricted
@@ -9,8 +9,8 @@
9
9
  */
10
10
 
11
11
  import { z } from "zod";
12
- import type { ToolDefinition } from "./types.js";
13
- import type { MemoryKind } from "../../storage/memory.js";
12
+ import type { ToolDefinition } from "../types.js";
13
+ import type { MemoryKind } from "../../../storage/memory.js";
14
14
 
15
15
  /**
16
16
  * The store's kinds, spelled out here rather than imported.
@@ -8,7 +8,7 @@
8
8
  */
9
9
 
10
10
  import { z } from "zod";
11
- import type { ToolDefinition } from "./types.js";
11
+ import type { ToolDefinition } from "../types.js";
12
12
 
13
13
  export const webTools: ToolDefinition[] = [
14
14
  {
@@ -7,26 +7,26 @@
7
7
 
8
8
  import type { ToolDefinition, ToolFrontend, ToolTag } from "./types.js";
9
9
 
10
- import { messagingTools } from "./messaging.js";
11
- import { chatTools } from "./chat.js";
12
- import { historyTools } from "./history.js";
13
- import { memberTools } from "./members.js";
14
- import { mediaTools } from "./media.js";
15
- import { stickerTools } from "./stickers.js";
16
- import { schedulingTools } from "./scheduling.js";
17
- import { triggerTools } from "./triggers.js";
18
- import { goalTools } from "./goals.js";
19
- import { memoryTools } from "./memory.js";
20
- import { scriptTools } from "./scripts.js";
21
- import { skillTools } from "./skills.js";
22
- import { webTools } from "./web.js";
23
- import { adminTools } from "./admin.js";
24
- import { modelTools } from "./models.js";
25
- import { meshTools } from "./mesh.js";
26
- import { crossSendTools } from "./cross-send.js";
27
- import { whatsappTools } from "./whatsapp.js";
28
- import { moderationTools } from "./moderation.js";
29
- import { nativeTools } from "./native.js";
10
+ import { messagingTools } from "./chat/messaging.js";
11
+ import { chatTools } from "./chat/chat.js";
12
+ import { historyTools } from "./chat/history.js";
13
+ import { memberTools } from "./chat/members.js";
14
+ import { mediaTools } from "./chat/media.js";
15
+ import { stickerTools } from "./chat/stickers.js";
16
+ import { schedulingTools } from "./ops/scheduling.js";
17
+ import { triggerTools } from "./ops/triggers.js";
18
+ import { goalTools } from "./ops/goals.js";
19
+ import { memoryTools } from "./content/memory.js";
20
+ import { scriptTools } from "./ops/scripts.js";
21
+ import { skillTools } from "./ops/skills.js";
22
+ import { webTools } from "./content/web.js";
23
+ import { adminTools } from "./ops/admin.js";
24
+ import { modelTools } from "./ops/models.js";
25
+ import { meshTools } from "./ops/mesh.js";
26
+ import { crossSendTools } from "./chat/cross-send.js";
27
+ import { whatsappTools } from "./chat/whatsapp.js";
28
+ import { moderationTools } from "./chat/moderation.js";
29
+ import { nativeTools } from "./ops/native.js";
30
30
 
31
31
  /** All built-in tool definitions. */
32
32
  export const ALL_TOOLS: readonly ToolDefinition[] = [
@@ -5,7 +5,7 @@
5
5
  * messaging or content. Available on all frontends.
6
6
  */
7
7
 
8
- import type { ToolDefinition } from "./types.js";
8
+ import type { ToolDefinition } from "../types.js";
9
9
 
10
10
  export const adminTools: ToolDefinition[] = [
11
11
  {
@@ -6,8 +6,8 @@
6
6
  */
7
7
 
8
8
  import { Agent, fetch as undiciFetch } from "undici";
9
- import { isBunRuntime } from "../../util/runtime.js";
10
- import type { BridgeFunction } from "./types.js";
9
+ import { isBunRuntime } from "../../../util/runtime.js";
10
+ import type { BridgeFunction } from "../types.js";
11
11
 
12
12
  /** Default wall-clock budget for a bridge action. */
13
13
  const DEFAULT_TIMEOUT_MS = 120_000;
@@ -10,8 +10,8 @@
10
10
  */
11
11
 
12
12
  import { z } from "zod";
13
- import type { ToolDefinition } from "./types.js";
14
- import { chatIdSchema } from "./schemas.js";
13
+ import type { ToolDefinition } from "../types.js";
14
+ import { chatIdSchema } from "../schemas.js";
15
15
 
16
16
  /**
17
17
  * Heartbeat-mode routing: like `send`, every goal tool threads an
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import type { ToolDefinition } from "./types.js";
2
+ import type { ToolDefinition } from "../types.js";
3
3
 
4
4
  /**
5
5
  * Device-mesh tools. Deliberately NOT frontend-restricted: the mesh is
@@ -9,7 +9,7 @@
9
9
  */
10
10
 
11
11
  import { z } from "zod";
12
- import type { ToolDefinition } from "./types.js";
12
+ import type { ToolDefinition } from "../types.js";
13
13
 
14
14
  export const modelTools: ToolDefinition[] = [
15
15
  {
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import type { ToolDefinition } from "./types.js";
2
+ import type { ToolDefinition } from "../types.js";
3
3
 
4
4
  /**
5
5
  * Native tools — Talon's own shell/filesystem primitives, the replacement
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { z } from "zod";
6
- import type { ToolDefinition } from "./types.js";
6
+ import type { ToolDefinition } from "../types.js";
7
7
 
8
8
  export const schedulingTools: ToolDefinition[] = [
9
9
  {
@@ -10,7 +10,7 @@
10
10
  */
11
11
 
12
12
  import { z } from "zod";
13
- import type { ToolDefinition } from "./types.js";
13
+ import type { ToolDefinition } from "../types.js";
14
14
 
15
15
  export const scriptTools: ToolDefinition[] = [
16
16
  {
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import { z } from "zod";
14
- import type { ToolDefinition } from "./types.js";
14
+ import type { ToolDefinition } from "../types.js";
15
15
 
16
16
  export const skillTools: ToolDefinition[] = [
17
17
  {
@@ -9,7 +9,7 @@
9
9
  */
10
10
 
11
11
  import { z } from "zod";
12
- import type { ToolDefinition } from "./types.js";
12
+ import type { ToolDefinition } from "../types.js";
13
13
 
14
14
  const TRIGGER_DESCRIPTION = `Create a long-running watcher script. The script runs as a supervised
15
15
  subprocess and signals back via stdout or its exit code.
package/src/core/types.ts CHANGED
@@ -161,6 +161,17 @@ export type OneShotAgentParams = {
161
161
  abortController: AbortController;
162
162
  /** Append a string to the run log (markdown). */
163
163
  appendLog: (text: string) => Promise<void>;
164
+ /**
165
+ * Called with each assistant text segment as the run produces it (final
166
+ * answers, not reasoning/thinking, not tool-call payloads). Optional so
167
+ * heartbeat/dream/cron callers are untouched; a sub-agent runner uses it to
168
+ * capture the run's result without parsing the markdown log.
169
+ *
170
+ * Synchronous and best-effort: every backend invokes it through
171
+ * `emitAssistantText` (backend/runtime/one-shot-hooks.ts), which swallows
172
+ * and logs a throwing callback so a consumer bug can never fail the run.
173
+ */
174
+ onAssistantText?: (text: string) => void;
164
175
  };
165
176
 
166
177
  /** How much cache telemetry a backend can surface in /status. */
@@ -20,8 +20,8 @@ import {
20
20
  } from "node:fs";
21
21
  import { createHash } from "node:crypto";
22
22
  import { join, resolve } from "node:path";
23
- import { log } from "./log.js";
24
- import { dirs, files as pathFiles } from "./paths.js";
23
+ import { log } from "../../util/log.js";
24
+ import { dirs, files as pathFiles } from "../../util/paths.js";
25
25
  import { listSeedPrompts, readPromptAsset } from "#prompt-assets";
26
26
 
27
27
  const IDENTITY_SEED = `# Identity
@@ -14,7 +14,7 @@ import {
14
14
  import {
15
15
  getActiveReasoningLevels,
16
16
  supportsReasoningLevel,
17
- } from "../../../shared/reasoning-levels.js";
17
+ } from "../../../presentation/reasoning-levels.js";
18
18
  import type { ComponentContext, ComponentInteraction } from "./types.js";
19
19
 
20
20
  async function selectEffort(
@@ -24,7 +24,7 @@
24
24
  import { MessageFlags } from "discord.js";
25
25
  import type { TalonConfig } from "../../../../core/config/index.js";
26
26
  import type { Gateway } from "../../../../core/engine/gateway.js";
27
- import { deriveNumericChatId } from "../../../../util/chat-id.js";
27
+ import { deriveNumericChatId } from "../../../../core/frontend-runtime/chat-id.js";
28
28
  import { logError } from "../../../../util/log.js";
29
29
  import {
30
30
  isInteractionAllowed,
@@ -41,7 +41,7 @@ import {
41
41
  displayReasoningEffort,
42
42
  getActiveReasoningLevels,
43
43
  supportsReasoningLevel,
44
- } from "../../../shared/reasoning-levels.js";
44
+ } from "../../../presentation/reasoning-levels.js";
45
45
  import { logError } from "../../../../util/log.js";
46
46
  import { safeSlice } from "../../formatting.js";
47
47
  import type { ComponentContext, ComponentInteraction } from "./types.js";
@@ -12,7 +12,7 @@ import {
12
12
  } from "discord.js";
13
13
  import type { TalonConfig } from "../../../core/config/index.js";
14
14
  import type { Gateway } from "../../../core/engine/gateway.js";
15
- import { respawnSelf } from "../../../util/respawn.js";
15
+ import { respawnSelf } from "../../../core/daemon/respawn.js";
16
16
  import { forceDream } from "../../../core/background/dream/index.js";
17
17
  import {
18
18
  formatDuration,
@@ -13,7 +13,7 @@ import {
13
13
  renderUsageMessage,
14
14
  } from "../render.js";
15
15
  import type { TalonConfig } from "../../../core/config/index.js";
16
- import { collectPlanUsage } from "../../shared/plan-usage-report.js";
16
+ import { collectPlanUsage } from "../../presentation/plan-usage-report.js";
17
17
  import { getLoadedPlugins } from "../../../core/plugin/index.js";
18
18
  import { getMeshService } from "../../../core/mesh/index.js";
19
19
  import type { MeshPingResult } from "../../../core/mesh/service.js";
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import { type ChatInputCommandInteraction, MessageFlags } from "discord.js";
7
- import { deriveNumericChatId } from "../../../util/chat-id.js";
7
+ import { deriveNumericChatId } from "../../../core/frontend-runtime/chat-id.js";
8
8
  import {
9
9
  suppressMentions,
10
10
  splitMessage,
@@ -2,7 +2,7 @@
2
2
  * Session commands — /reset and /status.
3
3
  *
4
4
  * Data gathering and the reset sequence live in
5
- * frontend/shared/session-status.ts; this file only renders Discord markdown.
5
+ * frontend/presentation/session-status.ts; this file only renders Discord markdown.
6
6
  */
7
7
 
8
8
  import { type ChatInputCommandInteraction, MessageFlags } from "discord.js";
@@ -22,11 +22,11 @@ import {
22
22
  import {
23
23
  performSessionReset,
24
24
  collectSessionStatus,
25
- } from "../../shared/session-status.js";
25
+ } from "../../presentation/session-status.js";
26
26
  import {
27
27
  formatCacheTempLine,
28
28
  formatDaemonLine,
29
- } from "../../shared/status-context.js";
29
+ } from "../../presentation/status-context.js";
30
30
  import { stopCurrentTurn } from "../../../core/engine/dispatcher.js";
31
31
  import { reply } from "./interaction.js";
32
32
 
@@ -38,7 +38,7 @@ import {
38
38
  displayReasoningEffort,
39
39
  getActiveReasoningLevels,
40
40
  supportsReasoningLevel,
41
- } from "../../shared/reasoning-levels.js";
41
+ } from "../../presentation/reasoning-levels.js";
42
42
  import {
43
43
  getBackendIdForChat,
44
44
  resolveChatBackend,
@@ -9,7 +9,7 @@ import { ChannelType } from "discord.js";
9
9
  import type { TalonConfig } from "../../../core/config/index.js";
10
10
  import { setMessageFilePath } from "../../../storage/history.js";
11
11
  import { addMedia } from "../../../storage/media-index.js";
12
- import { deriveNumericChatId } from "../../../util/chat-id.js";
12
+ import { deriveNumericChatId } from "../../../core/frontend-runtime/chat-id.js";
13
13
  import { logError } from "../../../util/log.js";
14
14
  import {
15
15
  shouldHandleInGuild,
@@ -11,7 +11,7 @@ import {
11
11
  createDmUserTracker,
12
12
  createNoticeCooldown,
13
13
  createRateLimiter,
14
- } from "../../shared/access.js";
14
+ } from "../../presentation/access.js";
15
15
 
16
16
  // ── Chat registry: numericChatId → Discord channel info ─────────────────────
17
17
  // The gateway/dispatcher uses numeric chatIds. Action handlers need to map
@@ -19,7 +19,7 @@ import { ChannelType } from "discord.js";
19
19
  import type { TalonConfig } from "../../core/config/index.js";
20
20
  import { pushMessage } from "../../storage/history.js";
21
21
  import { registerChat } from "../../core/background/pulse/pulse.js";
22
- import { deriveNumericChatId } from "../../util/chat-id.js";
22
+ import { deriveNumericChatId } from "../../core/frontend-runtime/chat-id.js";
23
23
  import { handleMessage, getSenderName } from "./handlers/index.js";
24
24
 
25
25
  export function registerMiddleware(client: Client, config: TalonConfig): void {
@@ -6,7 +6,7 @@
6
6
 
7
7
  import { ActivityType, type Client } from "discord.js";
8
8
  import { log, logError } from "../../util/log.js";
9
- import { deriveNumericChatId } from "../../util/chat-id.js";
9
+ import { deriveNumericChatId } from "../../core/frontend-runtime/chat-id.js";
10
10
  import { registerCommandsForGuilds } from "./commands/index.js";
11
11
  import { registerDiscordChat } from "./handlers/index.js";
12
12
  import { leaveNonWhitelistedGuilds } from "./guild-policy.js";