talon-agent 3.33.4 → 3.34.1
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/package.json +5 -2
- package/src/app.ts +16 -8
- package/src/backend/claude-sdk/handler.ts +428 -415
- package/src/backend/claude-sdk/stream.ts +76 -53
- package/src/backend/codex/handler/message.ts +275 -366
- package/src/backend/codex/handler/rollout-accounting.ts +137 -0
- package/src/backend/openai-agents/handler/message.ts +282 -356
- package/src/backend/remote-server/chat-turn.ts +66 -122
- package/src/backend/remote-server/index.ts +4 -0
- package/src/backend/remote-server/mcp.ts +73 -9
- package/src/backend/remote-server/model-catalog/presentation.ts +269 -228
- package/src/backend/remote-server/sessions.ts +2 -2
- package/src/backend/remote-server/turn.ts +58 -55
- package/src/backend/shared/cache-telemetry.ts +17 -1
- package/src/backend/shared/handler-to-events.ts +11 -16
- package/src/backend/shared/index.ts +14 -15
- package/src/backend/shared/result-events.ts +30 -0
- package/src/backend/shared/turn-phases.ts +277 -0
- package/src/bootstrap.ts +120 -79
- package/src/cli/setup.ts +375 -349
- package/src/core/background/cron-spec.ts +273 -0
- package/src/core/background/heartbeat/agent.ts +167 -104
- package/src/core/background/triggers/exit.ts +19 -2
- package/src/core/background/triggers/resume.ts +14 -7
- package/src/core/background/triggers/state.ts +9 -0
- package/src/core/engine/backend-controller/pool.ts +2 -0
- package/src/core/engine/backend-controller/state.ts +25 -12
- package/src/core/engine/gateway-actions/cron.ts +28 -292
- package/src/core/engine/gateway-routes.ts +239 -0
- package/src/core/engine/gateway.ts +66 -238
- package/src/core/mcp-hub/child-transport.ts +215 -0
- package/src/core/mcp-hub/children.ts +72 -13
- package/src/core/mcp-hub/index.ts +32 -13
- package/src/core/models/active-model.ts +29 -6
- package/src/core/vfs/mounts/files.ts +128 -115
- package/src/core/weaver/shuttle.ts +33 -2
- package/src/core/weaver/weaver.ts +37 -6
- package/src/frontend/discord/callbacks/components/agent-buttons.ts +82 -0
- package/src/frontend/discord/callbacks/components/backend-select.ts +149 -0
- package/src/frontend/discord/callbacks/components/effort.ts +72 -0
- package/src/frontend/discord/callbacks/components/index.ts +120 -0
- package/src/frontend/discord/callbacks/components/metrics.ts +24 -0
- package/src/frontend/discord/callbacks/components/model-nav.ts +93 -0
- package/src/frontend/discord/callbacks/components/model-select.ts +118 -0
- package/src/frontend/discord/callbacks/components/model.ts +33 -0
- package/src/frontend/discord/callbacks/components/pulse.ts +93 -0
- package/src/frontend/discord/callbacks/components/settings.ts +243 -0
- package/src/frontend/discord/callbacks/components/types.ts +34 -0
- package/src/frontend/discord/callbacks/index.ts +4 -4
- package/src/frontend/discord/connection.ts +36 -0
- package/src/frontend/discord/diagnostics.ts +62 -0
- package/src/frontend/discord/guild-policy.ts +89 -0
- package/src/frontend/discord/index.ts +44 -305
- package/src/frontend/discord/outbound.ts +61 -0
- package/src/frontend/discord/ready.ts +73 -0
- package/src/frontend/discord/runtime.ts +55 -0
- package/src/frontend/native/chat-lifecycle.ts +39 -0
- package/src/frontend/native/chat-wire.ts +69 -0
- package/src/frontend/native/context.ts +106 -0
- package/src/frontend/native/control.ts +78 -0
- package/src/frontend/native/emit.ts +167 -0
- package/src/frontend/native/empty-chat-sweep.ts +50 -0
- package/src/frontend/native/handlers.ts +121 -0
- package/src/frontend/native/history.ts +101 -0
- package/src/frontend/native/index.ts +90 -1293
- package/src/frontend/native/media.ts +43 -0
- package/src/frontend/native/models.ts +221 -0
- package/src/frontend/native/queue.ts +47 -0
- package/src/frontend/native/reset.ts +50 -0
- package/src/frontend/native/routes/chats.ts +115 -0
- package/src/frontend/native/routes/daemon.ts +70 -0
- package/src/frontend/native/routes/host.ts +151 -0
- package/src/frontend/native/routes/index.ts +22 -0
- package/src/frontend/native/routes/mesh.ts +72 -0
- package/src/frontend/native/routes/models.ts +54 -0
- package/src/frontend/native/routes/params.ts +29 -0
- package/src/frontend/native/routes/pre-auth.ts +94 -0
- package/src/frontend/native/routes/table.ts +92 -0
- package/src/frontend/native/runtime.ts +109 -0
- package/src/frontend/native/server.ts +30 -555
- package/src/frontend/native/status.ts +26 -0
- package/src/frontend/native/tool-result.ts +48 -0
- package/src/frontend/native/turn.ts +341 -0
- package/src/frontend/telegram/admin.ts +75 -52
- package/src/frontend/whatsapp/access.ts +67 -0
- package/src/frontend/whatsapp/connection.ts +280 -0
- package/src/frontend/whatsapp/inbound.ts +327 -0
- package/src/frontend/whatsapp/index.ts +28 -599
- package/src/frontend/whatsapp/runtime.ts +74 -0
- package/src/storage/metrics.ts +18 -0
- package/src/storage/session-record.ts +29 -0
- package/src/storage/sessions.ts +24 -0
- package/src/storage/trigger-store.ts +8 -0
- package/src/util/boot-timer.ts +31 -0
- package/src/util/concurrency.ts +28 -0
- package/src/util/watchdog.ts +32 -7
- package/src/frontend/discord/callbacks/components.ts +0 -793
- package/src/frontend/discord/callbacks/shared.ts +0 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "talon-agent",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.34.1",
|
|
4
4
|
"description": "Multi-frontend AI agent with full tool access, streaming, cron jobs, and plugin system",
|
|
5
5
|
"author": "Dylan Neve",
|
|
6
6
|
"license": "MIT",
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
"lint": "oxlint src/",
|
|
84
84
|
"depcruise": "node scripts/check-architecture.mjs",
|
|
85
85
|
"ratchets": "node scripts/check-ratchets.mjs",
|
|
86
|
+
"function-size": "node scripts/check-function-size.mjs",
|
|
86
87
|
"knip": "knip",
|
|
87
88
|
"format": "prettier --write src/ prompts/",
|
|
88
89
|
"format:check": "prettier --check src/ prompts/",
|
|
@@ -119,6 +120,7 @@
|
|
|
119
120
|
"discord.js": "^14.16.3",
|
|
120
121
|
"file-type": "^22.0.1",
|
|
121
122
|
"grammy": "^1.45.1",
|
|
123
|
+
"link-preview-js": "^5.0.0",
|
|
122
124
|
"liquidjs": "^10.27.0",
|
|
123
125
|
"marked": "^18.0.0",
|
|
124
126
|
"mem0ai": "^3.0.13",
|
|
@@ -154,6 +156,7 @@
|
|
|
154
156
|
"overrides": {
|
|
155
157
|
"@anthropic-ai/sdk": "^0.104.1",
|
|
156
158
|
"ip-address": "^10.1.1",
|
|
157
|
-
"fast-uri": "^3.1.2"
|
|
159
|
+
"fast-uri": "^3.1.2",
|
|
160
|
+
"link-preview-js": "^5.0.0"
|
|
158
161
|
}
|
|
159
162
|
}
|
package/src/app.ts
CHANGED
|
@@ -27,6 +27,7 @@ import { pruneSettledTriggers } from "./storage/trigger-store.js";
|
|
|
27
27
|
import { startWatchdog, stopWatchdog } from "./util/watchdog.js";
|
|
28
28
|
import { spawnSuccessor } from "./util/respawn.js";
|
|
29
29
|
import { log, logError, logWarn } from "./util/log.js";
|
|
30
|
+
import { bootPhase, bootReport } from "./util/boot-timer.js";
|
|
30
31
|
import {
|
|
31
32
|
getVfs,
|
|
32
33
|
mountNamespaceFs,
|
|
@@ -51,7 +52,7 @@ import {
|
|
|
51
52
|
removePidRecordIfOwnedBy,
|
|
52
53
|
} from "./core/daemon/pidfile.js";
|
|
53
54
|
|
|
54
|
-
const { config } = await bootstrap();
|
|
55
|
+
const { config } = await bootPhase("bootstrap", () => bootstrap());
|
|
55
56
|
|
|
56
57
|
// Record this process as the daemon. The gateway port is appended once
|
|
57
58
|
// the gateway binds (it may fall back from the default on EADDRINUSE).
|
|
@@ -69,15 +70,19 @@ gateway.onShutdownRequest((reason) => void gracefulShutdown(reason));
|
|
|
69
70
|
const configuredFrontends = [...new Set(getFrontends(config))];
|
|
70
71
|
|
|
71
72
|
const frontends: Frontend[] = [];
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
73
|
+
await bootPhase("frontends create", async () => {
|
|
74
|
+
for (const name of configuredFrontends) {
|
|
75
|
+
const frontend = await createFrontendById(name, config, gateway);
|
|
76
|
+
frontends.push(frontend);
|
|
77
|
+
log("bot", `Frontend: ${getFrontendDescriptor(name)?.label ?? name}`);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
77
80
|
|
|
78
81
|
// ── Create backend + wire dispatcher ─────────────────────────────────────────
|
|
79
82
|
|
|
80
|
-
const { backend } = await
|
|
83
|
+
const { backend } = await bootPhase("backend + dispatcher", () =>
|
|
84
|
+
initBackendAndDispatcher(config, frontends),
|
|
85
|
+
);
|
|
81
86
|
gateway.backend = backend;
|
|
82
87
|
|
|
83
88
|
// Subscribe the gateway to chat-role rebinds so `/model`, `/settings`,
|
|
@@ -303,7 +308,10 @@ async function main(): Promise<void> {
|
|
|
303
308
|
"Terminal frontend shares stdin with the other frontends; it will run alongside them without blocking startup.",
|
|
304
309
|
);
|
|
305
310
|
}
|
|
306
|
-
await
|
|
311
|
+
await bootPhase("frontends start", () =>
|
|
312
|
+
Promise.all(blockingFrontends.map((frontend) => frontend.start())),
|
|
313
|
+
);
|
|
314
|
+
log("bot", `Ready in ${bootReport()}`);
|
|
307
315
|
for (const frontend of stdinFrontends) {
|
|
308
316
|
void frontend
|
|
309
317
|
.start()
|