@llblab/pi-kit 0.31.2 → 0.33.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/BACKLOG.md +1 -1
- package/CHANGELOG.md +8 -0
- package/README.md +5 -3
- package/node_modules/@llblab/pi-codex-usage/AGENTS.md +2 -1
- package/node_modules/@llblab/pi-codex-usage/CHANGELOG.md +4 -0
- package/node_modules/@llblab/pi-codex-usage/README.md +11 -9
- package/node_modules/@llblab/pi-codex-usage/lib/extension.ts +13 -10
- package/node_modules/@llblab/pi-codex-usage/lib/fast.ts +6 -5
- package/node_modules/@llblab/pi-codex-usage/lib/query.ts +4 -4
- package/node_modules/@llblab/pi-codex-usage/lib/status.ts +10 -10
- package/node_modules/@llblab/pi-codex-usage/lib/telegram.ts +1 -1
- package/node_modules/@llblab/pi-codex-usage/lib/usage.ts +2 -1
- package/node_modules/@llblab/pi-codex-usage/package.json +1 -1
- package/node_modules/@llblab/pi-telegram/AGENTS.md +4 -2
- package/node_modules/@llblab/pi-telegram/BACKLOG.md +1 -1
- package/node_modules/@llblab/pi-telegram/CHANGELOG.md +11 -0
- package/node_modules/@llblab/pi-telegram/README.md +5 -3
- package/node_modules/@llblab/pi-telegram/dist/lib/activity.d.ts +5 -1
- package/node_modules/@llblab/pi-telegram/dist/lib/activity.js +31 -2
- package/node_modules/@llblab/pi-telegram/dist/lib/bindings.d.ts +3 -1
- package/node_modules/@llblab/pi-telegram/dist/lib/bindings.js +8 -2
- package/node_modules/@llblab/pi-telegram/dist/lib/bus-api.d.ts +2 -2
- package/node_modules/@llblab/pi-telegram/dist/lib/bus-api.js +7 -2
- package/node_modules/@llblab/pi-telegram/dist/lib/bus-follower.d.ts +49 -3
- package/node_modules/@llblab/pi-telegram/dist/lib/bus-follower.js +313 -146
- package/node_modules/@llblab/pi-telegram/dist/lib/bus-leader.d.ts +3 -0
- package/node_modules/@llblab/pi-telegram/dist/lib/bus-leader.js +99 -18
- package/node_modules/@llblab/pi-telegram/dist/lib/bus.d.ts +5 -3
- package/node_modules/@llblab/pi-telegram/dist/lib/bus.js +13 -10
- package/node_modules/@llblab/pi-telegram/dist/lib/delivery.d.ts +4 -0
- package/node_modules/@llblab/pi-telegram/dist/lib/delivery.js +48 -15
- package/node_modules/@llblab/pi-telegram/dist/lib/extension.js +48 -6
- package/node_modules/@llblab/pi-telegram/dist/lib/lifecycle.d.ts +68 -0
- package/node_modules/@llblab/pi-telegram/dist/lib/lifecycle.js +178 -58
- package/node_modules/@llblab/pi-telegram/dist/lib/machine.d.ts +23 -0
- package/node_modules/@llblab/pi-telegram/dist/lib/machine.js +37 -0
- package/node_modules/@llblab/pi-telegram/dist/lib/media.d.ts +114 -28
- package/node_modules/@llblab/pi-telegram/dist/lib/media.js +292 -119
- package/node_modules/@llblab/pi-telegram/dist/lib/model.d.ts +54 -15
- package/node_modules/@llblab/pi-telegram/dist/lib/model.js +98 -53
- package/node_modules/@llblab/pi-telegram/dist/lib/polling.js +2 -0
- package/node_modules/@llblab/pi-telegram/dist/lib/preview.d.ts +128 -113
- package/node_modules/@llblab/pi-telegram/dist/lib/preview.js +448 -366
- package/node_modules/@llblab/pi-telegram/dist/lib/queue.d.ts +2 -2
- package/node_modules/@llblab/pi-telegram/dist/lib/queue.js +3 -3
- package/node_modules/@llblab/pi-telegram/dist/lib/routing.d.ts +6 -1
- package/node_modules/@llblab/pi-telegram/dist/lib/routing.js +334 -210
- package/node_modules/@llblab/pi-telegram/dist/lib/runtime.d.ts +77 -11
- package/node_modules/@llblab/pi-telegram/dist/lib/runtime.js +174 -92
- package/node_modules/@llblab/pi-telegram/dist/lib/sections.js +0 -1
- package/node_modules/@llblab/pi-telegram/dist/lib/telegram-api.d.ts +11 -9
- package/node_modules/@llblab/pi-telegram/dist/lib/telegram-api.js +53 -4
- package/node_modules/@llblab/pi-telegram/dist/lib/text-groups.d.ts +0 -26
- package/node_modules/@llblab/pi-telegram/dist/lib/text-groups.js +51 -98
- package/node_modules/@llblab/pi-telegram/dist/lib/thread-display.js +14 -6
- package/node_modules/@llblab/pi-telegram/dist/lib/threads.d.ts +18 -5
- package/node_modules/@llblab/pi-telegram/dist/lib/threads.js +107 -30
- package/node_modules/@llblab/pi-telegram/dist/lib/turns.d.ts +2 -0
- package/node_modules/@llblab/pi-telegram/dist/lib/turns.js +6 -1
- package/node_modules/@llblab/pi-telegram/dist/lib/updates.d.ts +11 -4
- package/node_modules/@llblab/pi-telegram/dist/lib/updates.js +54 -19
- package/node_modules/@llblab/pi-telegram/dist/package.json +1 -1
- package/node_modules/@llblab/pi-telegram/docs/activity.md +1 -1
- package/node_modules/@llblab/pi-telegram/docs/architecture.md +12 -11
- package/node_modules/@llblab/pi-telegram/docs/delivery.md +7 -5
- package/node_modules/@llblab/pi-telegram/docs/multi-instance-bus.md +18 -8
- package/node_modules/@llblab/pi-telegram/docs/public-api.md +2 -2
- package/node_modules/@llblab/pi-telegram/docs/ui-style.md +2 -2
- package/node_modules/@llblab/pi-telegram/lib/activity.ts +29 -5
- package/node_modules/@llblab/pi-telegram/lib/bindings.ts +9 -1
- package/node_modules/@llblab/pi-telegram/lib/bus-api.ts +11 -3
- package/node_modules/@llblab/pi-telegram/lib/bus-follower.ts +417 -203
- package/node_modules/@llblab/pi-telegram/lib/bus-leader.ts +88 -14
- package/node_modules/@llblab/pi-telegram/lib/bus.ts +17 -15
- package/node_modules/@llblab/pi-telegram/lib/delivery.ts +47 -19
- package/node_modules/@llblab/pi-telegram/lib/extension.ts +51 -9
- package/node_modules/@llblab/pi-telegram/lib/lifecycle.ts +229 -55
- package/node_modules/@llblab/pi-telegram/lib/machine.ts +60 -0
- package/node_modules/@llblab/pi-telegram/lib/media.ts +438 -172
- package/node_modules/@llblab/pi-telegram/lib/model.ts +169 -74
- package/node_modules/@llblab/pi-telegram/lib/polling.ts +2 -0
- package/node_modules/@llblab/pi-telegram/lib/preview.ts +715 -566
- package/node_modules/@llblab/pi-telegram/lib/queue.ts +5 -5
- package/node_modules/@llblab/pi-telegram/lib/routing.ts +325 -238
- package/node_modules/@llblab/pi-telegram/lib/runtime.ts +260 -104
- package/node_modules/@llblab/pi-telegram/lib/sections.ts +0 -2
- package/node_modules/@llblab/pi-telegram/lib/telegram-api.ts +61 -8
- package/node_modules/@llblab/pi-telegram/lib/text-groups.ts +75 -136
- package/node_modules/@llblab/pi-telegram/lib/thread-display.ts +15 -4
- package/node_modules/@llblab/pi-telegram/lib/threads.ts +120 -36
- package/node_modules/@llblab/pi-telegram/lib/turns.ts +8 -1
- package/node_modules/@llblab/pi-telegram/lib/updates.ts +58 -21
- package/node_modules/@llblab/pi-telegram/package.json +1 -1
- package/package.json +3 -3
|
@@ -3354,7 +3354,7 @@ export interface TelegramDispatchRuntimeDeps<TContext = unknown> {
|
|
|
3354
3354
|
{ kind: "control" }
|
|
3355
3355
|
>["item"],
|
|
3356
3356
|
) => void;
|
|
3357
|
-
onPromptDispatchStart: (chatId: number) => void;
|
|
3357
|
+
onPromptDispatchStart: (chatId: number, target?: TelegramQueueTarget) => void;
|
|
3358
3358
|
commitPromptDispatch?: (
|
|
3359
3359
|
item: Extract<
|
|
3360
3360
|
TelegramQueueDispatchAction<TContext>,
|
|
@@ -3383,7 +3383,7 @@ export interface TelegramQueueDispatchControllerDeps<
|
|
|
3383
3383
|
isDispatchGenerationActive?: (generation: number) => boolean;
|
|
3384
3384
|
updateStatus: (ctx: TContext, error?: string) => void;
|
|
3385
3385
|
sendTextReply: TelegramControlRuntimeDeps<TContext>["sendTextReply"];
|
|
3386
|
-
onPromptDispatchStart: (ctx: TContext, chatId: number) => void;
|
|
3386
|
+
onPromptDispatchStart: (ctx: TContext, chatId: number, target?: TelegramQueueTarget) => void;
|
|
3387
3387
|
commitPromptDispatch?: (
|
|
3388
3388
|
item: Extract<
|
|
3389
3389
|
TelegramQueueDispatchAction<TContext>,
|
|
@@ -3426,7 +3426,7 @@ export function executeTelegramQueueDispatchPlan<TContext = unknown>(
|
|
|
3426
3426
|
deps.executeControlItem(plan.item);
|
|
3427
3427
|
return;
|
|
3428
3428
|
}
|
|
3429
|
-
deps.onPromptDispatchStart(plan.item.chatId);
|
|
3429
|
+
deps.onPromptDispatchStart(plan.item.chatId, plan.item.target);
|
|
3430
3430
|
try {
|
|
3431
3431
|
if (deps.commitPromptDispatch && !deps.commitPromptDispatch(plan.item)) {
|
|
3432
3432
|
throw new Error(
|
|
@@ -3702,8 +3702,8 @@ export function createTelegramQueueDispatchController<TContext = unknown>(
|
|
|
3702
3702
|
},
|
|
3703
3703
|
});
|
|
3704
3704
|
},
|
|
3705
|
-
onPromptDispatchStart: (chatId) => {
|
|
3706
|
-
deps.onPromptDispatchStart(ctx, chatId);
|
|
3705
|
+
onPromptDispatchStart: (chatId, target) => {
|
|
3706
|
+
deps.onPromptDispatchStart(ctx, chatId, target);
|
|
3707
3707
|
},
|
|
3708
3708
|
commitPromptDispatch: deps.commitPromptDispatch
|
|
3709
3709
|
? (item) => deps.commitPromptDispatch!(item, ctx)
|