@llblab/pi-telegram 0.23.2 → 0.23.3
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 +5 -0
- package/index.ts +5 -7
- package/lib/menu-settings.ts +11 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.23.3: Thread-Scoped Settings Hotfix
|
|
4
|
+
|
|
5
|
+
- `Thread-Scoped Settings Rehydration`: Preserved `message_thread_id` when rebuilding full Settings menu state after session reload or TTL expiry. Impact: a stale Settings message in Threaded Mode retains its exact Telegram target when later callbacks reopen menus or cross into model/status controls.
|
|
6
|
+
- `Composition Root Hygiene`: Sorted the local domain imports in `index.ts` and normalized adjacent wrapping without changing runtime composition. Impact: the entrypoint remains easier to scan and review while preserving the existing dependency graph and behavior.
|
|
7
|
+
|
|
3
8
|
## 0.23.2: Voice Policy And Turn Delivery Hotfix
|
|
4
9
|
|
|
5
10
|
- `Settings Persistence Race`: Rebuilt expired Settings callback state from the live model-menu context before applying mutations. Polling now persists only its monotonic `lastUpdateId` into the current config-store snapshot instead of later submitting the detached full config object captured when polling started. Impact: a subsequent Telegram update can no longer erase freshly persisted `voice.replyMode`, `assistant.proactivePush`, or other Settings values and return the menu to stale defaults.
|
package/index.ts
CHANGED
|
@@ -7,18 +7,18 @@
|
|
|
7
7
|
import * as Activity from "./lib/activity.ts";
|
|
8
8
|
import * as Bindings from "./lib/bindings.ts";
|
|
9
9
|
import * as BusApi from "./lib/bus-api.ts";
|
|
10
|
-
import * as Bus from "./lib/bus.ts";
|
|
11
10
|
import * as BusFollower from "./lib/bus-follower.ts";
|
|
12
11
|
import * as BusLeader from "./lib/bus-leader.ts";
|
|
13
12
|
import * as BusTransport from "./lib/bus-transport.ts";
|
|
13
|
+
import * as Bus from "./lib/bus.ts";
|
|
14
14
|
import * as CommandTemplates from "./lib/command-templates.ts";
|
|
15
15
|
import * as Commands from "./lib/commands.ts";
|
|
16
16
|
import * as Config from "./lib/config.ts";
|
|
17
17
|
import * as Delivery from "./lib/delivery.ts";
|
|
18
|
-
import * as Threads from "./lib/threads.ts";
|
|
19
18
|
import * as Inbound from "./lib/inbound.ts";
|
|
20
19
|
import * as Lifecycle from "./lib/lifecycle.ts";
|
|
21
20
|
import * as Locks from "./lib/locks.ts";
|
|
21
|
+
import * as Logs from "./lib/logs.ts";
|
|
22
22
|
import * as Media from "./lib/media.ts";
|
|
23
23
|
import * as MenuQueue from "./lib/menu-queue.ts";
|
|
24
24
|
import * as MenuSettings from "./lib/menu-settings.ts";
|
|
@@ -35,13 +35,13 @@ import * as Queue from "./lib/queue.ts";
|
|
|
35
35
|
import * as Replies from "./lib/replies.ts";
|
|
36
36
|
import * as Routing from "./lib/routing.ts";
|
|
37
37
|
import * as Runtime from "./lib/runtime.ts";
|
|
38
|
-
import * as Logs from "./lib/logs.ts";
|
|
39
38
|
import * as Sections from "./lib/sections.ts";
|
|
40
39
|
import * as Status from "./lib/status.ts";
|
|
41
40
|
import * as Sync from "./lib/sync.ts";
|
|
42
41
|
import * as TelegramApi from "./lib/telegram-api.ts";
|
|
43
42
|
import * as TextGroups from "./lib/text-groups.ts";
|
|
44
43
|
import * as ThreadReconciler from "./lib/thread-reconciler.ts";
|
|
44
|
+
import * as Threads from "./lib/threads.ts";
|
|
45
45
|
import * as TimeInjection from "./lib/time-injection.ts";
|
|
46
46
|
import * as Updates from "./lib/updates.ts";
|
|
47
47
|
import * as Voice from "./lib/voice.ts";
|
|
@@ -465,8 +465,7 @@ export default function (pi: Pi.ExtensionAPI) {
|
|
|
465
465
|
isTransportStampActive: telegramTransportStampRuntime.isActive,
|
|
466
466
|
ownsDirect: lockRuntime.owns,
|
|
467
467
|
getDirectEpoch: lockRuntime.getOwnedLeaderEpoch,
|
|
468
|
-
isFollowerRegistered:
|
|
469
|
-
telegramBusFollowerRegistrationState.isRegistered,
|
|
468
|
+
isFollowerRegistered: telegramBusFollowerRegistrationState.isRegistered,
|
|
470
469
|
getFollowerGeneration:
|
|
471
470
|
telegramBusFollowerRegistrationState.getGeneration,
|
|
472
471
|
},
|
|
@@ -776,8 +775,7 @@ export default function (pi: Pi.ExtensionAPI) {
|
|
|
776
775
|
return telegramActiveBusAuthSecret;
|
|
777
776
|
},
|
|
778
777
|
...forwardedRouteHandlers,
|
|
779
|
-
prepareForwardedMessage:
|
|
780
|
-
textGroupRuntime.prepareForwardedMessage,
|
|
778
|
+
prepareForwardedMessage: textGroupRuntime.prepareForwardedMessage,
|
|
781
779
|
recordRuntimeEvent,
|
|
782
780
|
},
|
|
783
781
|
targetReplacement: {
|
package/lib/menu-settings.ts
CHANGED
|
@@ -74,7 +74,11 @@ export interface TelegramSettingsMenuRuntime<TContext> {
|
|
|
74
74
|
query: {
|
|
75
75
|
id: string;
|
|
76
76
|
data?: string;
|
|
77
|
-
message?: {
|
|
77
|
+
message?: {
|
|
78
|
+
message_id?: number;
|
|
79
|
+
message_thread_id?: number;
|
|
80
|
+
chat?: { id?: number };
|
|
81
|
+
};
|
|
78
82
|
},
|
|
79
83
|
ctx: TContext,
|
|
80
84
|
) => Promise<boolean>;
|
|
@@ -98,6 +102,7 @@ export interface TelegramSettingsMenuRuntimeDeps<
|
|
|
98
102
|
getModelMenuState: (
|
|
99
103
|
chatId: number,
|
|
100
104
|
ctx: TContext,
|
|
105
|
+
threadId?: number,
|
|
101
106
|
) => Promise<TelegramModelMenuState<TModel>>;
|
|
102
107
|
getStoredModelMenuState: (
|
|
103
108
|
messageId: number | undefined,
|
|
@@ -672,7 +677,11 @@ export function createTelegramSettingsMenuRuntime<
|
|
|
672
677
|
);
|
|
673
678
|
return true;
|
|
674
679
|
}
|
|
675
|
-
state = await deps.getModelMenuState(
|
|
680
|
+
state = await deps.getModelMenuState(
|
|
681
|
+
chatId,
|
|
682
|
+
ctx,
|
|
683
|
+
query.message?.message_thread_id,
|
|
684
|
+
);
|
|
676
685
|
state.messageId = messageId;
|
|
677
686
|
state.mode = "settings";
|
|
678
687
|
deps.storeModelMenuState(state);
|