@llblab/pi-telegram 0.44.0 → 0.45.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/AGENTS.md +14 -9
- package/BACKLOG.md +23 -5
- package/CHANGELOG.md +18 -0
- package/README.md +13 -9
- package/docs/README.md +1 -0
- package/docs/architecture.md +227 -23
- package/docs/generative-apps.md +1 -1
- package/docs/multi-instance-bus.md +70 -19
- package/docs/outbound.md +6 -6
- package/docs/public-api.md +13 -6
- package/docs/ui-style.md +3 -1
- package/index.ts +4 -1418
- package/lib/agent-messages.ts +6 -3
- package/lib/bindings.ts +46 -1
- package/lib/bus-api.ts +32 -19
- package/lib/bus-follower.ts +600 -135
- package/lib/bus-leader.ts +962 -55
- package/lib/bus.ts +355 -26
- package/lib/channel-posts.ts +718 -0
- package/lib/commands.ts +237 -11
- package/lib/config.ts +242 -26
- package/lib/extension.ts +1851 -0
- package/lib/generative-apps.ts +20 -2
- package/lib/journal.ts +2184 -126
- package/lib/locks.ts +44 -2
- package/lib/menu-settings.ts +152 -13
- package/lib/outbound-attachments.ts +97 -10
- package/lib/paths.ts +29 -0
- package/lib/polling.ts +85 -17
- package/lib/preview.ts +17 -0
- package/lib/prompts.ts +6 -2
- package/lib/queue.ts +118 -26
- package/lib/rendering.ts +4 -1
- package/lib/replies.ts +21 -2
- package/lib/routing.ts +344 -112
- package/lib/setup.ts +44 -4
- package/lib/status.ts +51 -4
- package/lib/sync.ts +308 -39
- package/lib/telegram-api.ts +353 -22
- package/lib/thread-cleanup-manager.ts +664 -0
- package/lib/thread-display.ts +226 -0
- package/lib/thread-naming.ts +118 -0
- package/lib/threads.ts +1686 -129
- package/lib/turns.ts +7 -0
- package/lib/updates.ts +1319 -97
- package/lib/workspace-admission.ts +1643 -0
- package/lib/workspace-retirement.ts +968 -0
- package/lib/workspace-slots.ts +84 -0
- package/package.json +1 -1
- package/screenshot.png +0 -0
- package/scripts/measure-bus.mjs +83 -0
- package/scripts/measure-workspace.mjs +101 -0
- package/skills/show-me/SKILL.md +166 -0
- package/skills/show-me/references/telegram-surfaces.md +43 -0
- package/skills/telegram-bridge/references/delivery-and-threads.md +1 -1
- /package/lib/{logs.ts → logging.ts} +0 -0
package/lib/turns.ts
CHANGED
|
@@ -41,6 +41,9 @@ import {
|
|
|
41
41
|
|
|
42
42
|
export const TELEGRAM_PREFIX = "[telegram]";
|
|
43
43
|
|
|
44
|
+
export const TELEGRAM_GUEST_TURN_NOTE =
|
|
45
|
+
"[guest] delivery: answer quickly with one concise, self-contained reply";
|
|
46
|
+
|
|
44
47
|
export interface TelegramTurnTarget {
|
|
45
48
|
chatId: number;
|
|
46
49
|
threadId?: number;
|
|
@@ -198,6 +201,7 @@ export function buildTelegramTurnPrompt(options: {
|
|
|
198
201
|
historyTurns?: Pick<PendingTelegramTurn, "historyText">[];
|
|
199
202
|
timeLine?: string | null;
|
|
200
203
|
voiceContext?: Record<string, string>;
|
|
204
|
+
guestTurn?: boolean;
|
|
201
205
|
}): string {
|
|
202
206
|
let prompt = options.telegramPrefix;
|
|
203
207
|
if ((options.historyTurns?.length ?? 0) > 0) {
|
|
@@ -229,6 +233,9 @@ export function buildTelegramTurnPrompt(options: {
|
|
|
229
233
|
if (options.timeLine) {
|
|
230
234
|
prompt = `${prompt}\n\n[time] ${options.timeLine}`;
|
|
231
235
|
}
|
|
236
|
+
if (options.guestTurn) {
|
|
237
|
+
prompt = `${prompt}\n\n${TELEGRAM_GUEST_TURN_NOTE}`;
|
|
238
|
+
}
|
|
232
239
|
return prompt;
|
|
233
240
|
}
|
|
234
241
|
|