@llblab/pi-telegram 0.43.2 → 0.45.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.
- package/AGENTS.md +14 -9
- package/BACKLOG.md +20 -4
- package/CHANGELOG.md +22 -5
- package/README.md +13 -9
- package/docs/README.md +1 -0
- package/docs/architecture.md +220 -18
- package/docs/generative-apps.md +1 -1
- package/docs/multi-instance-bus.md +70 -19
- package/docs/outbound.md +13 -7
- package/docs/public-api.md +13 -5
- package/docs/ui-style.md +3 -1
- package/index.ts +4 -1415
- package/lib/activity.ts +19 -5
- package/lib/agent-messages.ts +6 -3
- package/lib/bindings.ts +37 -2
- package/lib/bus-follower.ts +600 -135
- package/lib/bus-leader.ts +962 -55
- package/lib/bus.ts +350 -26
- package/lib/channel-posts.ts +544 -0
- package/lib/commands.ts +234 -11
- package/lib/config.ts +178 -25
- package/lib/delivery.ts +18 -18
- package/lib/extension.ts +1792 -0
- package/lib/generative-apps.ts +20 -2
- package/lib/journal.ts +2184 -126
- package/lib/lifecycle.ts +7 -1
- package/lib/locks.ts +38 -1
- package/lib/menu-settings.ts +154 -15
- package/lib/outbound-attachments.ts +74 -40
- package/lib/outbound-voice.ts +28 -42
- package/lib/outbound.ts +18 -14
- package/lib/paths.ts +29 -0
- package/lib/polling.ts +85 -17
- package/lib/preview.ts +115 -70
- package/lib/prompts.ts +5 -2
- package/lib/queue.ts +66 -22
- package/lib/replies.ts +47 -39
- package/lib/routing.ts +305 -112
- package/lib/status.ts +10 -0
- package/lib/sync.ts +308 -39
- package/lib/telegram-api.ts +315 -7
- 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/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/generative-apps.ts
CHANGED
|
@@ -862,6 +862,22 @@ export function formatGenerativeAppToolError(error: unknown): Error {
|
|
|
862
862
|
return new Error(`\n${message.replace(/^\n+/u, "") || "Generative App operation failed."}`);
|
|
863
863
|
}
|
|
864
864
|
|
|
865
|
+
const TELEGRAM_BIND_JSON_ARGUMENT_REFERENCE = "#/$defs/TelegramBindJsonValue";
|
|
866
|
+
const TELEGRAM_BIND_JSON_ARGUMENT_SCHEMA = {
|
|
867
|
+
$ref: TELEGRAM_BIND_JSON_ARGUMENT_REFERENCE,
|
|
868
|
+
} as unknown as ReturnType<typeof Type.Unknown>;
|
|
869
|
+
const TELEGRAM_BIND_JSON_ARGUMENT_DEFINITION = {
|
|
870
|
+
anyOf: [
|
|
871
|
+
{ type: "null" },
|
|
872
|
+
{ type: "boolean" },
|
|
873
|
+
{ type: "number" },
|
|
874
|
+
{ type: "string" },
|
|
875
|
+
{ type: "array", items: { $ref: TELEGRAM_BIND_JSON_ARGUMENT_REFERENCE } },
|
|
876
|
+
{ type: "object", properties: {},
|
|
877
|
+
additionalProperties: { $ref: TELEGRAM_BIND_JSON_ARGUMENT_REFERENCE } },
|
|
878
|
+
],
|
|
879
|
+
};
|
|
880
|
+
|
|
865
881
|
export function registerTelegramBindTool(
|
|
866
882
|
pi: ExtensionAPI,
|
|
867
883
|
deps: TelegramBindToolRegistrationDeps,
|
|
@@ -877,8 +893,10 @@ export function registerTelegramBindTool(
|
|
|
877
893
|
method: Type.Optional(Type.String()),
|
|
878
894
|
replace: Type.Optional(Type.Boolean()),
|
|
879
895
|
display: Type.Optional(Type.Boolean()),
|
|
880
|
-
argument: Type.Optional(
|
|
881
|
-
}, { additionalProperties: false
|
|
896
|
+
argument: Type.Optional(TELEGRAM_BIND_JSON_ARGUMENT_SCHEMA),
|
|
897
|
+
}, { additionalProperties: false,
|
|
898
|
+
$defs: { TelegramBindJsonValue: TELEGRAM_BIND_JSON_ARGUMENT_DEFINITION },
|
|
899
|
+
}),
|
|
882
900
|
async execute(_toolCallId, params) {
|
|
883
901
|
try {
|
|
884
902
|
const result = await bindGenerativeApp({
|