telegram-agent-kit 0.4.0 → 0.4.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/README.md +5 -0
- package/dist/deepagents/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -189,6 +189,7 @@ the user in the chat instead of going silent.
|
|
|
189
189
|
Pass `errorNotice` (plain text, your language) to have a failed turn say so in the chat —
|
|
190
190
|
omit it and the user just sees the draft stop, which reads as being ignored.
|
|
191
191
|
- `sendReply(client, chatId, reply, opts, signal?)` / `sendText(...)` — the send path on its own.
|
|
192
|
+
`opts` is `{ rich: boolean, log: Logger }`, with the same `rich` semantics as above.
|
|
192
193
|
- Types: `BotClient`, `AgentStream`, `Checkpointer`, `ThreadStore`, `RenderEvent`, `ChatKey`, `Logger`.
|
|
193
194
|
|
|
194
195
|
**Errors**
|
|
@@ -204,6 +205,10 @@ the user in the chat instead of going silent.
|
|
|
204
205
|
`__pregel_*` LangGraph internal-execution key — are stripped so the kit retains full control over
|
|
205
206
|
checkpoint routing and execution.
|
|
206
207
|
- `streamAgent(agent, input, config, signal?)` — lower-level event stream if you need direct control.
|
|
208
|
+
Yields tokens from the **root** agent only: a delegated agent (a `subagents` entry, or the built-in
|
|
209
|
+
`task` tool) runs its own model node and LangChain replays its events into the parent stream, so
|
|
210
|
+
without this its monologue would interleave with the reply. Naming the root agent does not change
|
|
211
|
+
what streams.
|
|
207
212
|
|
|
208
213
|
> `@langchain/core` and `deepagents` are **type-only, optional** peers. The built
|
|
209
214
|
> `/deepagents` bundle contains no runtime import of either, so the core stays
|
package/dist/deepagents/index.js
CHANGED
|
@@ -18,6 +18,7 @@ async function* streamAgent(agent, input, config, signal) {
|
|
|
18
18
|
for await (const ev of iter) {
|
|
19
19
|
if (ev.event === "on_chat_model_stream") {
|
|
20
20
|
if (ev.metadata?.langgraph_node !== "model_request") continue;
|
|
21
|
+
if (ev.metadata?.checkpoint_ns?.includes("|")) continue;
|
|
21
22
|
const text = extractText(ev.data?.chunk?.content);
|
|
22
23
|
if (text) yield { type: "token", text };
|
|
23
24
|
}
|
package/package.json
CHANGED