pi-harness-runtime 1.1.427 → 1.1.429
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 +2 -2
- package/RULES.md +2 -3
- package/package.json +1 -1
- package/packages/a2a-adapter/package.json +1 -1
- package/packages/agent-policy/package.json +1 -1
- package/packages/architecture-generator/package.json +1 -1
- package/packages/auth/package.json +1 -1
- package/packages/autonomous-refactor/package.json +1 -1
- package/packages/autonomous-runtime/package.json +1 -1
- package/packages/cache-strategy/package.json +1 -1
- package/packages/capability-registry/package.json +1 -1
- package/packages/checkpoint/package.json +1 -1
- package/packages/cli-plugin-sdk/package.json +1 -1
- package/packages/clipboard/package.json +1 -1
- package/packages/clipboard-plugin/dist/index.js +1 -1
- package/packages/clipboard-plugin/dist/index.js.map +1 -1
- package/packages/clipboard-plugin/package.json +1 -2
- package/packages/clipboard-plugin/src/index.ts +1 -1
- package/packages/code-generation/package.json +1 -1
- package/packages/code-review/package.json +1 -1
- package/packages/codex-adapter/package.json +1 -1
- package/packages/codex-watcher/package.json +1 -1
- package/packages/config-capture/package.json +1 -1
- package/packages/connection-runtime/package.json +1 -1
- package/packages/context-compiler/package.json +1 -1
- package/packages/context-discovery/package.json +1 -1
- package/packages/context-manager/package.json +1 -1
- package/packages/contracts/package.json +1 -1
- package/packages/cookie-sanitizer/package.json +1 -1
- package/packages/cost-optimizer/package.json +1 -1
- package/packages/dependency-analyzer/package.json +1 -1
- package/packages/django-plugin/package.json +1 -1
- package/packages/doc-generator/package.json +1 -1
- package/packages/durable-review/package.json +1 -1
- package/packages/e2e-tester/package.json +1 -1
- package/packages/evaluation-engine/package.json +1 -1
- package/packages/evaluation-runner/package.json +1 -1
- package/packages/event-bus/package.json +1 -1
- package/packages/event-sink/package.json +1 -1
- package/packages/event-store/package.json +1 -1
- package/packages/experience-replay/package.json +1 -1
- package/packages/feedback-collector/package.json +1 -1
- package/packages/file-copy-helper/package.json +1 -1
- package/packages/framework-detector/package.json +1 -1
- package/packages/framework-plugin-sdk/package.json +1 -1
- package/packages/frappe-plugin/package.json +1 -1
- package/packages/generic-web-plugin/package.json +1 -1
- package/packages/health-monitor/package.json +1 -1
- package/packages/intent-analyzer/package.json +1 -1
- package/packages/jev-judge/package.json +1 -1
- package/packages/knowledge-graph/package.json +1 -1
- package/packages/knowledge-retrieval/package.json +1 -1
- package/packages/laravel-plugin/package.json +1 -1
- package/packages/learning-engine/package.json +1 -1
- package/packages/logging/package.json +1 -1
- package/packages/mcp-adapter/package.json +1 -1
- package/packages/memory-engine/package.json +1 -1
- package/packages/milestone-manager/package.json +1 -1
- package/packages/model-registry/package.json +1 -1
- package/packages/nextjs-plugin/package.json +1 -1
- package/packages/notification/package.json +1 -1
- package/packages/observability/package.json +1 -1
- package/packages/okf-indexer/package.json +1 -1
- package/packages/paperclip-integration/package.json +1 -1
- package/packages/performance-optimizer/package.json +1 -1
- package/packages/permission-mode/package.json +1 -1
- package/packages/privilege-broker/package.json +1 -1
- package/packages/project-analyzer/package.json +1 -1
- package/packages/project-bootstrap/package.json +1 -1
- package/packages/projection-engine/package.json +1 -1
- package/packages/prompt-compiler/package.json +1 -1
- package/packages/prompt-versioning/package.json +1 -1
- package/packages/provider-adapter-sdk/package.json +1 -1
- package/packages/provider-router/package.json +1 -1
- package/packages/provider-selector/package.json +1 -1
- package/packages/providers/package.json +1 -1
- package/packages/qdrant-skills/package.json +1 -1
- package/packages/quota-manager/package.json +1 -1
- package/packages/rate-limiter/package.json +1 -1
- package/packages/react-vite-plugin/package.json +1 -1
- package/packages/relay/package.json +1 -1
- package/packages/release-manager/package.json +1 -1
- package/packages/requirement-compiler/package.json +1 -1
- package/packages/runtime/package.json +1 -1
- package/packages/scheduler/package.json +1 -1
- package/packages/scheduler-adapter/package.json +1 -1
- package/packages/session/package.json +1 -1
- package/packages/session-api/package.json +1 -1
- package/packages/session-export/package.json +1 -1
- package/packages/shared-context/package.json +1 -1
- package/packages/skill-mcp-client/package.json +1 -1
- package/packages/skill-registry/package.json +1 -1
- package/packages/skills/package.json +1 -1
- package/packages/sprint-planner/package.json +1 -1
- package/packages/subscription-engine/package.json +1 -1
- package/packages/task-compiler/package.json +1 -1
- package/packages/tencentdb-memory/package.json +1 -1
- package/packages/tencentdb-sync/package.json +1 -1
- package/packages/test-data-generator/package.json +1 -1
- package/packages/test-generator/package.json +1 -1
- package/packages/todo-bd-sync/package.json +1 -1
- package/packages/token-estimation/package.json +1 -1
- package/packages/token-optimizer/package.json +1 -1
- package/packages/tooling-preference/package.json +1 -1
- package/packages/trajectory/package.json +1 -1
- package/packages/tui/package.json +1 -1
- package/packages/two-phase-review/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/voice-api/package.json +1 -1
- package/packages/webmcp-tester/package.json +1 -1
- package/packages/wiki/package.json +1 -1
- package/packages/workflow-events/package.json +1 -1
- package/packages/workspace-scanner/package.json +1 -1
- package/packages/worktree/package.json +1 -1
- package/packages/write-review/package.json +1 -1
- package/scripts/lib/runtime-imports.ts +263 -0
- package/scripts/verify-package-contents.ts +112 -18
- package/packages/telegram/package.json +0 -22
- package/packages/telegram/src/agent-messages.d.ts +0 -28
- package/packages/telegram/src/agent-messages.js +0 -90
- package/packages/telegram/src/bindings.d.ts +0 -296
- package/packages/telegram/src/bindings.js +0 -1086
- package/packages/telegram/src/bus.d.ts +0 -759
- package/packages/telegram/src/bus.js +0 -2732
- package/packages/telegram/src/commands.d.ts +0 -761
- package/packages/telegram/src/commands.js +0 -2622
- package/packages/telegram/src/config.d.ts +0 -222
- package/packages/telegram/src/config.js +0 -844
- package/packages/telegram/src/delivery.d.ts +0 -161
- package/packages/telegram/src/delivery.js +0 -550
- package/packages/telegram/src/extension.d.ts +0 -7
- package/packages/telegram/src/extension.js +0 -2444
- package/packages/telegram/src/inbound.d.ts +0 -94
- package/packages/telegram/src/inbound.js +0 -478
- package/packages/telegram/src/index.d.ts +0 -6
- package/packages/telegram/src/index.js +0 -6
- package/packages/telegram/src/keyboard.d.ts +0 -21
- package/packages/telegram/src/keyboard.js +0 -37
- package/packages/telegram/src/lifecycle.d.ts +0 -210
- package/packages/telegram/src/lifecycle.js +0 -538
- package/packages/telegram/src/pi.d.ts +0 -76
- package/packages/telegram/src/pi.js +0 -130
- package/packages/telegram/src/polling.d.ts +0 -332
- package/packages/telegram/src/polling.js +0 -1219
- package/packages/telegram/src/replies.d.ts +0 -210
- package/packages/telegram/src/replies.js +0 -752
- package/packages/telegram/src/routing.d.ts +0 -388
- package/packages/telegram/src/routing.js +0 -7886
- package/packages/telegram/src/runtime.d.ts +0 -159
- package/packages/telegram/src/runtime.js +0 -351
- package/packages/telegram/src/telegram-api.d.ts +0 -564
- package/packages/telegram/src/telegram-api.js +0 -1332
- package/packages/telegram/src/turns.d.ts +0 -108
- package/packages/telegram/src/turns.js +0 -482
- package/packages/telegram/src/updates.d.ts +0 -1545
- package/packages/telegram/src/updates.js +0 -6420
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Telegram bridge binding composition
|
|
3
|
-
* Zones: telegram, pi agent, orchestration
|
|
4
|
-
* Owns pi-facing tool, command, and lifecycle hook registration for the entrypoint
|
|
5
|
-
*/
|
|
6
|
-
import * as ActivityVerbosity from "./activity-verbosity.ts";
|
|
7
|
-
import * as Activity from "./activity.ts";
|
|
8
|
-
import * as BusApi from "./bus-api.ts";
|
|
9
|
-
import type { TelegramBusFollowerCommandOwner } from "./bus-follower.ts";
|
|
10
|
-
import type { TelegramBusLiveRebindWorkState } from "./bus.ts";
|
|
11
|
-
import * as ChannelPosts from "./channel-posts.ts";
|
|
12
|
-
import * as Commands from "./commands.ts";
|
|
13
|
-
import * as Config from "./config.ts";
|
|
14
|
-
import * as Delivery from "./delivery.ts";
|
|
15
|
-
import * as GenerativeApps from "./generative-apps.ts";
|
|
16
|
-
import * as Keyboard from "./keyboard.ts";
|
|
17
|
-
import * as Lifecycle from "./lifecycle.ts";
|
|
18
|
-
import * as Locks from "./locks.ts";
|
|
19
|
-
import * as Menu from "./menu.ts";
|
|
20
|
-
import * as Model from "./model.ts";
|
|
21
|
-
import * as OutboundAttachments from "./outbound-attachments.ts";
|
|
22
|
-
import * as OutboundHandlers from "./outbound.ts";
|
|
23
|
-
import * as Pi from "./pi.ts";
|
|
24
|
-
import * as Preview from "./preview.ts";
|
|
25
|
-
import * as Prompts from "./prompts.ts";
|
|
26
|
-
import * as Queue from "./queue.ts";
|
|
27
|
-
import * as Replies from "./replies.ts";
|
|
28
|
-
import * as Routing from "./routing.ts";
|
|
29
|
-
import * as Runtime from "./runtime.ts";
|
|
30
|
-
import * as Setup from "./setup.ts";
|
|
31
|
-
import * as Status from "./status.ts";
|
|
32
|
-
import type { TelegramTarget } from "./target.ts";
|
|
33
|
-
import * as TelegramApi from "./telegram-api.ts";
|
|
34
|
-
/** Compose any registered held command over captured recipient effects; no ordinary follower API fallback. */
|
|
35
|
-
export declare function createTelegramFollowerSelectedCommandBinding<TContext, TModel extends Model.MenuModel = Model.MenuModel>(deps: {
|
|
36
|
-
ctx: TContext;
|
|
37
|
-
operationId: string;
|
|
38
|
-
registrationGeneration: string;
|
|
39
|
-
name: string;
|
|
40
|
-
target: TelegramTarget & {
|
|
41
|
-
threadId: number;
|
|
42
|
-
};
|
|
43
|
-
recipient: Pick<TelegramBusFollowerCommandOwner<TContext>, "isCurrent" | "assertRecipientCurrent">;
|
|
44
|
-
command: Pick<ReturnType<typeof Commands.createTelegramCommandHandlerTargetRuntime<Commands.TelegramCommandRuntimeMessage, TContext>>, "prepareHeldCommand" | "canPrepareHeldCommand">;
|
|
45
|
-
menu?: Omit<Menu.TelegramMenuActionRuntimeDeps<TContext, TModel>, "sendTextReply" | "sendInteractiveMessage" | "editInteractiveMessage">;
|
|
46
|
-
deliver: Parameters<typeof BusApi.createTelegramSelectedMenuTextApi>[0]["deliver"];
|
|
47
|
-
recordOwnership: NonNullable<Replies.TelegramRenderedMessageDeliveryRuntimeDeps<Menu.TelegramReplyMarkup>["recordOwnership"]>;
|
|
48
|
-
}): TelegramBusFollowerCommandOwner<TContext> | undefined;
|
|
49
|
-
type ActivePiModel = NonNullable<Pi.ExtensionContext["model"]>;
|
|
50
|
-
type TelegramRuntimeEventRecorder = (category: string, error: unknown, details?: Record<string, unknown>) => void;
|
|
51
|
-
type TelegramBridgeStatusUpdater = Status.TelegramStatusRuntime<Pi.ExtensionContext>["updateStatus"];
|
|
52
|
-
type TelegramAgentTargetResolver = NonNullable<OutboundAttachments.TelegramOutboundMessageToolRegistrationDeps["resolveAgentTarget"]>;
|
|
53
|
-
type TelegramAgentMessageRouter = NonNullable<OutboundAttachments.TelegramOutboundMessageToolRegistrationDeps["routeAgentMessage"]>;
|
|
54
|
-
export interface TelegramQueueBindingRuntime<TContext> {
|
|
55
|
-
mutation: Queue.TelegramQueueMutationController<TContext>;
|
|
56
|
-
dispatchNext: (ctx: TContext) => void;
|
|
57
|
-
requestNextDispatchAnnouncement: () => void;
|
|
58
|
-
cancelNextDispatchAnnouncement: () => void;
|
|
59
|
-
watchdog: Queue.TelegramQueueDispatchWatchdogRuntime<TContext>;
|
|
60
|
-
}
|
|
61
|
-
export declare function createTelegramQueueBindingRuntime<TContext>(deps: {
|
|
62
|
-
store: Queue.TelegramQueueStateStore<TContext>;
|
|
63
|
-
queue: Pick<Runtime.TelegramBridgeRuntime["queue"], "allocateItemOrder">;
|
|
64
|
-
lifecycle: Pick<Runtime.TelegramBridgeRuntime["lifecycle"], "isCompactionInProgress" | "hasDispatchPending">;
|
|
65
|
-
activeTurn: Pick<Queue.TelegramActiveTurnStore, "has">;
|
|
66
|
-
admission: {
|
|
67
|
-
getSettlement: () => {
|
|
68
|
-
onItemsDiscarded: (items: readonly Queue.TelegramQueueItem<TContext>[], ctx: TContext) => boolean;
|
|
69
|
-
isItemReady: (item: Queue.TelegramQueueItem<TContext>) => boolean;
|
|
70
|
-
onPromptHandedOff?: (item: Queue.PendingTelegramTurn, ctx: TContext) => boolean;
|
|
71
|
-
onControlSettled: (item: Queue.PendingTelegramControlItem<TContext>, ctx: TContext) => void;
|
|
72
|
-
} | undefined;
|
|
73
|
-
hasPendingQueueMutationForItem: (item: Queue.TelegramQueueItem<TContext>) => boolean;
|
|
74
|
-
};
|
|
75
|
-
transportStamp: Pick<Queue.TelegramTransportStampRuntime, "isActive">;
|
|
76
|
-
deferredDispatch: Pick<Queue.TelegramDeferredQueueDispatchRuntime<TContext>, "isBound" | "getGeneration" | "isGenerationActive">;
|
|
77
|
-
promptDispatch: Runtime.TelegramPromptDispatchRuntime<TContext>;
|
|
78
|
-
isIdle: (ctx: TContext) => boolean;
|
|
79
|
-
hasPendingMessages: (ctx: TContext) => boolean;
|
|
80
|
-
updateStatus: (ctx: TContext, error?: string) => void;
|
|
81
|
-
sendTextReply: Queue.TelegramQueueDispatchRuntimeDeps<TContext>["sendTextReply"];
|
|
82
|
-
sendUserMessage: Queue.TelegramQueueDispatchRuntimeDeps<TContext>["sendUserMessage"];
|
|
83
|
-
reconcileNextDispatchAnnouncementReplyOwnership?: (item: Queue.PendingTelegramTurn) => void;
|
|
84
|
-
recordRuntimeEvent?: TelegramRuntimeEventRecorder;
|
|
85
|
-
}): TelegramQueueBindingRuntime<TContext>;
|
|
86
|
-
export interface TelegramGenerativeAppLiveSurfaceBinding {
|
|
87
|
-
get: () => GenerativeApps.GenerativeAppLiveSurfaceRuntime<GenerativeApps.TelegramBindLiveHandle> | undefined;
|
|
88
|
-
set: (runtime: GenerativeApps.GenerativeAppLiveSurfaceRuntime<GenerativeApps.TelegramBindLiveHandle> | undefined) => void;
|
|
89
|
-
shutdown: () => void;
|
|
90
|
-
}
|
|
91
|
-
export declare function createTelegramGenerativeAppLiveSurfaceBinding(): TelegramGenerativeAppLiveSurfaceBinding;
|
|
92
|
-
export declare function createTelegramGenerativeAppBoundButtonActionInvoker<TQuery extends {
|
|
93
|
-
message?: {
|
|
94
|
-
chat?: {
|
|
95
|
-
id?: number;
|
|
96
|
-
};
|
|
97
|
-
message_id?: number;
|
|
98
|
-
message_thread_id?: number;
|
|
99
|
-
};
|
|
100
|
-
}>(deps: {
|
|
101
|
-
agentDir: string;
|
|
102
|
-
assertExecutionCurrent: (query: TQuery) => void;
|
|
103
|
-
getExecutionFence: (query: TQuery) => GenerativeApps.GenerativeAppExecutionFence | undefined;
|
|
104
|
-
getActiveProfileName?: () => string | undefined;
|
|
105
|
-
getLiveSurfaceRuntime?: () => GenerativeApps.GenerativeAppLiveSurfaceRuntime<GenerativeApps.TelegramBindLiveHandle> | undefined;
|
|
106
|
-
planOutput: ReturnType<typeof OutboundHandlers.createTelegramOutboundReplyPlanner>;
|
|
107
|
-
sendMarkdownReply: (chatId: number, replyToMessageId: number, markdown: string, options?: {
|
|
108
|
-
replyMarkup?: OutboundHandlers.TelegramOutboundButtonMarkup;
|
|
109
|
-
}) => Promise<unknown>;
|
|
110
|
-
editInteractiveMessage?: (chatId: number, messageId: number, markdown: string, mode: "markdown", replyMarkup: OutboundHandlers.TelegramOutboundButtonMarkup) => Promise<void>;
|
|
111
|
-
recordRuntimeEvent: TelegramRuntimeEventRecorder;
|
|
112
|
-
}): (action: OutboundHandlers.TelegramOutboundButtonAction, query: TQuery) => Promise<false | "new" | "edit">;
|
|
113
|
-
export interface TelegramAgentMessageToolRoutingRuntime {
|
|
114
|
-
resolveAgentTarget: TelegramAgentTargetResolver;
|
|
115
|
-
routeAgentMessage: TelegramAgentMessageRouter;
|
|
116
|
-
canSendDirect: () => boolean;
|
|
117
|
-
}
|
|
118
|
-
export declare function createTelegramAgentMessageToolRoutingRuntime(deps: {
|
|
119
|
-
ownsLeader: () => boolean;
|
|
120
|
-
ownsDirectDelivery: () => boolean;
|
|
121
|
-
isFollowerRegistered: () => boolean;
|
|
122
|
-
getSourceTarget: () => TelegramTarget | undefined;
|
|
123
|
-
getSourceThreadName: () => string | undefined;
|
|
124
|
-
local: {
|
|
125
|
-
resolveTarget: (selector: Parameters<TelegramAgentTargetResolver>[0], sourceTarget?: TelegramTarget) => Awaited<ReturnType<TelegramAgentTargetResolver>> | undefined;
|
|
126
|
-
route: (input: {
|
|
127
|
-
sourceTarget?: TelegramTarget;
|
|
128
|
-
sourceThreadName?: string;
|
|
129
|
-
message: Parameters<TelegramAgentMessageRouter>[0];
|
|
130
|
-
}) => Promise<void>;
|
|
131
|
-
};
|
|
132
|
-
follower: {
|
|
133
|
-
resolveTarget: TelegramAgentTargetResolver;
|
|
134
|
-
routeMessage: TelegramAgentMessageRouter;
|
|
135
|
-
};
|
|
136
|
-
}): TelegramAgentMessageToolRoutingRuntime;
|
|
137
|
-
export interface TelegramAssistantOutputBindingRuntime<TTransportStamp> {
|
|
138
|
-
runtime: Activity.TelegramAssistantOutputRuntime;
|
|
139
|
-
observeEvent: (event: Activity.TelegramActivityEvent) => void;
|
|
140
|
-
authority: Routing.TelegramAssistantOutputAuthorityRuntime<TTransportStamp>;
|
|
141
|
-
}
|
|
142
|
-
export declare function createTelegramAssistantOutputBindingRuntime<TTransportStamp>(deps: {
|
|
143
|
-
authority: {
|
|
144
|
-
getPreferredTarget: () => OutboundAttachments.TelegramQueuedOutboundAttachmentTurnView["target"] | undefined;
|
|
145
|
-
getFallbackChatId: () => number | undefined;
|
|
146
|
-
getTransportStamp: () => TTransportStamp;
|
|
147
|
-
isTransportStampActive: (stamp: TTransportStamp) => boolean;
|
|
148
|
-
ownsDirect: () => boolean;
|
|
149
|
-
getDirectEpoch: () => number | string | undefined;
|
|
150
|
-
isFollowerRegistered: () => boolean;
|
|
151
|
-
getFollowerGeneration: () => string | undefined;
|
|
152
|
-
};
|
|
153
|
-
sender: Parameters<typeof OutboundHandlers.createTelegramAssistantOutputSender<TTransportStamp>>[0];
|
|
154
|
-
waitForActivityIdle?: () => Promise<void>;
|
|
155
|
-
prepareTelegramPreview?: () => Activity.TelegramAssistantOutputPreparation | undefined;
|
|
156
|
-
enqueue?: Activity.TelegramActivityPublicationRuntime["enqueue"];
|
|
157
|
-
recordRuntimeEvent: TelegramRuntimeEventRecorder;
|
|
158
|
-
}): TelegramAssistantOutputBindingRuntime<TTransportStamp>;
|
|
159
|
-
type TelegramAssistantOutputAuthority<TTransportStamp> = ReturnType<Routing.TelegramAssistantOutputAuthorityRuntime<TTransportStamp>["captureAuthority"]>;
|
|
160
|
-
export interface TelegramBridgePublicationRuntime {
|
|
161
|
-
enqueue: Activity.TelegramActivityPublicationRuntime["enqueue"];
|
|
162
|
-
reserve: Activity.TelegramActivityPublicationRuntime["reserve"];
|
|
163
|
-
hasPending: Activity.TelegramActivityPublicationRuntime["hasPending"];
|
|
164
|
-
beginWork: Activity.TelegramActivityPublicationRuntime["beginWork"];
|
|
165
|
-
hasUnconfirmed: Activity.TelegramActivityPublicationRuntime["hasUnconfirmed"];
|
|
166
|
-
capture: () => {
|
|
167
|
-
target?: Queue.TelegramQueueTarget;
|
|
168
|
-
isCurrent: () => boolean;
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
export interface TelegramActivityBindingRuntime {
|
|
172
|
-
publicationRuntime: TelegramBridgePublicationRuntime;
|
|
173
|
-
activityRuntime: Activity.TelegramActivityRuntime;
|
|
174
|
-
activityVerbosityRuntime: ActivityVerbosity.TelegramActivityVerbosityRuntime;
|
|
175
|
-
assistantOutputRuntime: Activity.TelegramAssistantOutputRuntime;
|
|
176
|
-
}
|
|
177
|
-
/** Compose public activity fanout, verbosity, and assistant output ordering. */
|
|
178
|
-
export declare function createTelegramActivityBindingRuntime<TTransportStamp>(deps: {
|
|
179
|
-
generation: string;
|
|
180
|
-
assistantOutput: Omit<Parameters<typeof createTelegramAssistantOutputBindingRuntime<TTransportStamp>>[0], "waitForActivityIdle" | "enqueue">;
|
|
181
|
-
activityVerbosity: Omit<Parameters<typeof ActivityVerbosity.createTelegramActivityVerbosityRuntime<TelegramAssistantOutputAuthority<TTransportStamp>>>[0], "captureAuthority" | "isAuthorityActive" | "recordFailure" | "enqueue">;
|
|
182
|
-
}): TelegramActivityBindingRuntime;
|
|
183
|
-
/** Fresh current work projection; a snapshot is not a cleanup grant or target-application ACK. */
|
|
184
|
-
export declare function createTelegramLiveTargetWorkObserver<TContext>(deps: {
|
|
185
|
-
queue: Pick<Queue.TelegramQueueStateStore<TContext>, "getQueuedItems">;
|
|
186
|
-
activeTurn: Pick<Queue.TelegramActiveTurnStore, "get">;
|
|
187
|
-
lifecycle: Pick<Runtime.TelegramBridgeRuntime["lifecycle"], "hasDispatchPending" | "isCompactionInProgress" | "getActiveToolExecutions">;
|
|
188
|
-
isIdle(ctx: TContext): boolean;
|
|
189
|
-
hasPendingMessages(ctx: TContext): boolean;
|
|
190
|
-
hasPendingControl(): boolean;
|
|
191
|
-
publication: Pick<TelegramBridgePublicationRuntime, "hasPending" | "hasUnconfirmed">;
|
|
192
|
-
activity: Pick<Activity.TelegramActivityRuntime, "hasPending">;
|
|
193
|
-
delivery: Pick<ReturnType<typeof Delivery.createTelegramDeliveryLifecycleHooks>, "hasPendingTarget">;
|
|
194
|
-
api: Pick<TelegramApi.TelegramApiTargetActivityRuntime, "hasPendingTarget">;
|
|
195
|
-
}): (target: TelegramTarget & {
|
|
196
|
-
threadId: number;
|
|
197
|
-
}, ctx: TContext) => TelegramBusLiveRebindWorkState;
|
|
198
|
-
interface TelegramCommandsAndToolsBindingDeps {
|
|
199
|
-
pi: Pi.ExtensionAPI;
|
|
200
|
-
agentDir: string;
|
|
201
|
-
configStore: Config.TelegramConfigStore;
|
|
202
|
-
persistConfig: (config?: Config.TelegramConfig) => Promise<void>;
|
|
203
|
-
setup: Setup.TelegramSetupGuard;
|
|
204
|
-
activeTurnRuntime: Queue.TelegramActiveTurnStore<Queue.PendingTelegramTurn>;
|
|
205
|
-
lockedPollingRuntime: Locks.TelegramLockedPollingRuntime<Pi.ExtensionContext>;
|
|
206
|
-
stopPolling?: () => Promise<void | string>;
|
|
207
|
-
getDisconnectThreadName?: () => string | undefined;
|
|
208
|
-
onTransportChanged?: () => Promise<void> | void;
|
|
209
|
-
getStatusLines: (options?: Status.TelegramBridgeStatusLineOptions) => string[];
|
|
210
|
-
buttonActionStore: OutboundHandlers.TelegramButtonActionStore;
|
|
211
|
-
sendMarkdownReply: (chatId: number, replyToMessageId: number | undefined, markdown: string, options?: {
|
|
212
|
-
replyMarkup?: unknown;
|
|
213
|
-
target?: {
|
|
214
|
-
chatId: number;
|
|
215
|
-
threadId?: number;
|
|
216
|
-
};
|
|
217
|
-
}) => Promise<number | undefined>;
|
|
218
|
-
sendChannelMarkdownMessage: NonNullable<OutboundAttachments.TelegramOutboundMessageToolRegistrationDeps["sendChannelMarkdownMessage"]>;
|
|
219
|
-
sendChannelMediaMessage: NonNullable<OutboundAttachments.TelegramOutboundMessageToolRegistrationDeps["sendChannelMediaMessage"]>;
|
|
220
|
-
listChannelPosts: ChannelPosts.TelegramChannelPostJournalStore["list"];
|
|
221
|
-
mutateChannelPost(input: {
|
|
222
|
-
action: "edit" | "delete";
|
|
223
|
-
operationId: string;
|
|
224
|
-
mutationId: string;
|
|
225
|
-
markdown?: string;
|
|
226
|
-
}): Promise<ChannelPosts.TelegramChannelPostRecord>;
|
|
227
|
-
callMultipart: OutboundHandlers.TelegramVoiceReplySenderDeps["sendMultipart"];
|
|
228
|
-
getDefaultChatId: () => number | undefined;
|
|
229
|
-
getDefaultTarget?: () => OutboundAttachments.TelegramQueuedOutboundAttachmentTurnView["target"];
|
|
230
|
-
resolveAgentTarget?: OutboundAttachments.TelegramOutboundMessageToolRegistrationDeps["resolveAgentTarget"];
|
|
231
|
-
routeAgentMessage?: OutboundAttachments.TelegramOutboundMessageToolRegistrationDeps["routeAgentMessage"];
|
|
232
|
-
canSendDirect: () => boolean;
|
|
233
|
-
setGenerativeAppLiveSurfaceRuntime?: (runtime: GenerativeApps.GenerativeAppLiveSurfaceRuntime<GenerativeApps.TelegramBindLiveHandle> | undefined) => void;
|
|
234
|
-
updateStatus: TelegramBridgeStatusUpdater;
|
|
235
|
-
isContextCurrent: (ctx: Pi.ExtensionContext) => boolean;
|
|
236
|
-
getSessionGeneration: () => number;
|
|
237
|
-
connectionIntent: NonNullable<Commands.TelegramBridgeCommandRegistrationDeps["connectionIntent"]>;
|
|
238
|
-
recordRuntimeEvent: TelegramRuntimeEventRecorder;
|
|
239
|
-
}
|
|
240
|
-
export declare function registerTelegramCommandsAndTools({ pi, agentDir, configStore, persistConfig, setup, activeTurnRuntime, lockedPollingRuntime, stopPolling, getDisconnectThreadName, onTransportChanged, getStatusLines, buttonActionStore, sendMarkdownReply, sendChannelMarkdownMessage, sendChannelMediaMessage, listChannelPosts, mutateChannelPost, callMultipart, getDefaultChatId, getDefaultTarget, resolveAgentTarget, routeAgentMessage, canSendDirect, setGenerativeAppLiveSurfaceRuntime, recordRuntimeEvent, updateStatus, isContextCurrent, getSessionGeneration, connectionIntent, }: TelegramCommandsAndToolsBindingDeps): void;
|
|
241
|
-
interface TelegramLifecycleBindingDeps {
|
|
242
|
-
pi: Pi.ExtensionAPI;
|
|
243
|
-
publicationRuntime: TelegramBridgePublicationRuntime;
|
|
244
|
-
activityRuntime: Activity.TelegramActivityRuntime;
|
|
245
|
-
activityVerbosityRuntime?: ActivityVerbosity.TelegramActivityVerbosityRuntime;
|
|
246
|
-
diagnostics?: {
|
|
247
|
-
onSessionStart(): void;
|
|
248
|
-
onSessionShutdown(): Promise<void>;
|
|
249
|
-
};
|
|
250
|
-
assistantOutputRuntime: Pick<Activity.TelegramAssistantOutputRuntime, "start" | "beginTurn" | "hasAdmittedTelegramIntermediate" | "waitForIdle" | "stop">;
|
|
251
|
-
sessionLifecycleRuntime: Pick<Lifecycle.TelegramLifecycleRegistrationDeps, "onSessionStart" | "onSessionShutdown" | "onModelSelect">;
|
|
252
|
-
configStore: Pick<Config.TelegramConfigStore, "get" | "getOutboundHandlers" | "hasBotToken" | "load">;
|
|
253
|
-
abort: Runtime.TelegramRuntimeAbortPort;
|
|
254
|
-
typing: Runtime.TelegramRuntimeTypingPort;
|
|
255
|
-
lifecycle: Runtime.TelegramRuntimeLifecyclePort;
|
|
256
|
-
activeTurnRuntime: Queue.TelegramActiveTurnStore<Queue.PendingTelegramTurn>;
|
|
257
|
-
telegramQueueStore: Queue.TelegramQueueStore<Pi.ExtensionContext>;
|
|
258
|
-
modelSwitchController: Model.TelegramModelSwitchController<Pi.ExtensionContext, Model.ScopedTelegramModel<ActivePiModel>>;
|
|
259
|
-
previewRuntime: Preview.TelegramAssistantPreviewRuntime<Pi.AgentEndEvent["messages"][number], Keyboard.TelegramInlineKeyboardMarkup>;
|
|
260
|
-
promptDispatchRuntime: Runtime.TelegramPromptDispatchRuntime<Pi.ExtensionContext>;
|
|
261
|
-
deferredQueueDispatchRuntime: Queue.TelegramDeferredQueueDispatchRuntime<Pi.ExtensionContext>;
|
|
262
|
-
modelContextAvailabilityRuntime: Prompts.TelegramModelContextAvailabilityRuntime;
|
|
263
|
-
disconnectOnQuit?: () => Promise<unknown>;
|
|
264
|
-
onSessionStarted?: (event: Pi.SessionStartEvent, ctx: Pi.ExtensionContext) => void;
|
|
265
|
-
shutdownGenerativeAppLiveSurfaces?: () => void;
|
|
266
|
-
resolveAutomaticThreadCleanupEnabled?: () => boolean | Promise<boolean>;
|
|
267
|
-
buttonActionStore: OutboundHandlers.TelegramButtonActionStore;
|
|
268
|
-
callMultipart: OutboundHandlers.TelegramVoiceReplySenderDeps["sendMultipart"];
|
|
269
|
-
sendChatAction: NonNullable<OutboundHandlers.TelegramVoiceReplySenderDeps["sendChatAction"]>;
|
|
270
|
-
sendRecordVoiceAction: NonNullable<OutboundHandlers.TelegramVoiceReplySenderDeps["sendRecordVoiceAction"]>;
|
|
271
|
-
sendMarkdownReply: Queue.TelegramAgentEndHookRuntimeDeps<Queue.PendingTelegramTurn, Pi.ExtensionContext, Pi.AgentEndEvent["messages"][number], Keyboard.TelegramInlineKeyboardMarkup>["sendMarkdownReply"];
|
|
272
|
-
sendTextReply: Queue.TelegramAgentEndHookRuntimeDeps<Queue.PendingTelegramTurn, Pi.ExtensionContext, Pi.AgentEndEvent["messages"][number], Keyboard.TelegramInlineKeyboardMarkup>["sendTextReply"] & NonNullable<OutboundHandlers.TelegramVoiceReplySenderDeps["sendTextReply"]>;
|
|
273
|
-
dispatchNextQueuedTelegramTurn: (ctx: Pi.ExtensionContext) => void;
|
|
274
|
-
onPromptHandedOff?: (turn: Queue.PendingTelegramTurn, ctx: Pi.ExtensionContext) => void;
|
|
275
|
-
answerGuestQuery: TelegramApi.TelegramBridgeApiRuntime["answerGuestQuery"];
|
|
276
|
-
deleteMessage: TelegramApi.TelegramBridgeApiRuntime["deleteMessage"];
|
|
277
|
-
sendGuestReply: NonNullable<Queue.TelegramAgentEndHookRuntimeDeps<Queue.PendingTelegramTurn, Pi.ExtensionContext, Pi.AgentEndEvent["messages"][number], Keyboard.TelegramInlineKeyboardMarkup>["sendGuestReply"]>;
|
|
278
|
-
editGuestReply?: Queue.TelegramAgentEndHookRuntimeDeps<Queue.PendingTelegramTurn, Pi.ExtensionContext, Pi.AgentEndEvent["messages"][number], Keyboard.TelegramInlineKeyboardMarkup>["editGuestReply"];
|
|
279
|
-
stopGuestPlaceholder?: Queue.TelegramAgentEndHookRuntimeDeps<Queue.PendingTelegramTurn, Pi.ExtensionContext, Pi.AgentEndEvent["messages"][number], Keyboard.TelegramInlineKeyboardMarkup>["stopGuestPlaceholder"];
|
|
280
|
-
preparePreviewDelivery?: Queue.TelegramAgentEndRuntimeDeps<Queue.PendingTelegramTurn>["preparePreviewDelivery"];
|
|
281
|
-
finalizeMarkdownPreview: Queue.TelegramAgentEndHookRuntimeDeps<Queue.PendingTelegramTurn, Pi.ExtensionContext, Pi.AgentEndEvent["messages"][number], Keyboard.TelegramInlineKeyboardMarkup>["finalizeMarkdownPreview"];
|
|
282
|
-
proactivePushTargetGetter: () => Queue.TelegramQueueTarget | undefined;
|
|
283
|
-
getAssistantRenderingMode: () => "rich" | "html";
|
|
284
|
-
recordMessageOwnership?: (input: {
|
|
285
|
-
chatId: number;
|
|
286
|
-
messageId: number;
|
|
287
|
-
target?: Queue.TelegramQueueTarget;
|
|
288
|
-
}) => void;
|
|
289
|
-
canSendAgentActivity: (ctx: Pi.ExtensionContext) => boolean;
|
|
290
|
-
isSessionContextActive: (ctx: Pi.ExtensionContext) => boolean;
|
|
291
|
-
isTurnTransportActive?: (turn: Queue.PendingTelegramTurn) => boolean;
|
|
292
|
-
updateStatus: TelegramBridgeStatusUpdater;
|
|
293
|
-
recordRuntimeEvent: TelegramRuntimeEventRecorder;
|
|
294
|
-
}
|
|
295
|
-
export declare function registerTelegramLifecycleRuntimeHooks({ pi, publicationRuntime, activityRuntime, activityVerbosityRuntime, diagnostics, assistantOutputRuntime, sessionLifecycleRuntime, configStore, abort, typing, lifecycle, activeTurnRuntime, telegramQueueStore, modelSwitchController, previewRuntime, promptDispatchRuntime, deferredQueueDispatchRuntime, modelContextAvailabilityRuntime, disconnectOnQuit, onSessionStarted, shutdownGenerativeAppLiveSurfaces, resolveAutomaticThreadCleanupEnabled, buttonActionStore, callMultipart, sendChatAction, sendRecordVoiceAction, sendMarkdownReply, sendTextReply, dispatchNextQueuedTelegramTurn, onPromptHandedOff, answerGuestQuery, deleteMessage, sendGuestReply, editGuestReply, stopGuestPlaceholder, preparePreviewDelivery, finalizeMarkdownPreview, proactivePushTargetGetter, getAssistantRenderingMode, recordMessageOwnership, canSendAgentActivity, isSessionContextActive, isTurnTransportActive, updateStatus, recordRuntimeEvent, }: TelegramLifecycleBindingDeps): void;
|
|
296
|
-
export {};
|