@llblab/pi-telegram 0.27.6 → 0.27.7
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/CHANGELOG.md +4 -0
- package/lib/agent-messages.ts +5 -1
- package/lib/updates.ts +14 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.27.7: Bidirectional Thread Messaging Hotfix
|
|
4
|
+
|
|
5
|
+
- `Follower-to-Leader Agent Turns`: Internal cross-instance turns now bypass ownership lookup for the already-sent Telegram message id while retaining that id as reply context. Impact: a follower targeting the leader reaches the leader queue instead of ownership routing the synthetic turn back to the sending follower.
|
|
6
|
+
|
|
3
7
|
## 0.27.6: Autonomous Follow-Up Delivery Hotfix
|
|
4
8
|
|
|
5
9
|
- `Follow-Up Finals`: Completed public assistant blocks from unclassified Pi turns now follow the default-enabled Proactive Push path, alongside explicitly local and autonomous turns. Impact: actor terminal follow-ups and comparable extension-triggered continuations no longer show reasoning/activity in Telegram while silently dropping the final answer.
|
package/lib/agent-messages.ts
CHANGED
|
@@ -11,6 +11,7 @@ import type {
|
|
|
11
11
|
} from "./bus.ts";
|
|
12
12
|
import type { TelegramRoutedMessage } from "./routing.ts";
|
|
13
13
|
import type { TelegramTarget } from "./target.ts";
|
|
14
|
+
import { TELEGRAM_INTERNAL_AGENT_MESSAGE } from "./updates.ts";
|
|
14
15
|
|
|
15
16
|
export interface TelegramAgentMessageRuntimeDeps<TContext, TUpdate> {
|
|
16
17
|
instanceId: string;
|
|
@@ -110,7 +111,10 @@ export function createTelegramAgentMessageRuntime<TContext, TUpdate>(
|
|
|
110
111
|
message_thread_id: target.threadId,
|
|
111
112
|
text: `[agent|from-thread:${sourceLabel}]\n\n${input.message.text}`,
|
|
112
113
|
} as TelegramRoutedMessage;
|
|
113
|
-
await deps.handleUpdate(
|
|
114
|
+
await deps.handleUpdate(
|
|
115
|
+
{ message, [TELEGRAM_INTERNAL_AGENT_MESSAGE]: true } as TUpdate,
|
|
116
|
+
ctx,
|
|
117
|
+
);
|
|
114
118
|
},
|
|
115
119
|
};
|
|
116
120
|
}
|
package/lib/updates.ts
CHANGED
|
@@ -303,9 +303,14 @@ export interface TelegramMessageReactionUpdated {
|
|
|
303
303
|
new_reaction: TelegramReactionType[];
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
+
export const TELEGRAM_INTERNAL_AGENT_MESSAGE = Symbol(
|
|
307
|
+
"telegram.internalAgentMessage",
|
|
308
|
+
);
|
|
309
|
+
|
|
306
310
|
export interface TelegramUpdateFlow
|
|
307
311
|
extends TelegramUpdateRouting, TelegramUpdateDeletion {
|
|
308
312
|
message_reaction?: TelegramMessageReactionUpdated;
|
|
313
|
+
[TELEGRAM_INTERNAL_AGENT_MESSAGE]?: true;
|
|
309
314
|
}
|
|
310
315
|
|
|
311
316
|
export type TelegramUpdateFlowAction<
|
|
@@ -807,9 +812,17 @@ export async function executeTelegramUpdate<
|
|
|
807
812
|
NonNullable<TUpdate["message"] | TUpdate["edited_message"]>
|
|
808
813
|
>,
|
|
809
814
|
): Promise<void> {
|
|
815
|
+
const runtimeDeps = update[TELEGRAM_INTERNAL_AGENT_MESSAGE]
|
|
816
|
+
? {
|
|
817
|
+
...deps,
|
|
818
|
+
getMessageOwnership: undefined,
|
|
819
|
+
getTargetOwnership: undefined,
|
|
820
|
+
recordMessageOwnership: undefined,
|
|
821
|
+
}
|
|
822
|
+
: deps;
|
|
810
823
|
await executeTelegramUpdatePlan(
|
|
811
824
|
buildTelegramUpdateExecutionPlanFromUpdate(update, allowedUserId),
|
|
812
|
-
|
|
825
|
+
runtimeDeps,
|
|
813
826
|
);
|
|
814
827
|
}
|
|
815
828
|
|