@peer-agent/protocol 0.1.0-rc.48 → 0.1.0-rc.49
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/dist/bot-conversation-read.d.ts +29 -0
- package/dist/project.d.ts +2 -0
- package/dist/updater.d.ts +13 -3
- package/package.json +1 -1
|
@@ -23,3 +23,32 @@ export interface BotRecoveryStatus {
|
|
|
23
23
|
readonly retryable: boolean;
|
|
24
24
|
}
|
|
25
25
|
export declare function projectBotRecoveryStatus(error: unknown, phase?: string): BotRecoveryStatus;
|
|
26
|
+
export interface BotPendingInput {
|
|
27
|
+
readonly inputId: string;
|
|
28
|
+
readonly createdAt: string;
|
|
29
|
+
readonly text: string;
|
|
30
|
+
readonly threadTarget: {
|
|
31
|
+
readonly kind: 'main_chat';
|
|
32
|
+
} | {
|
|
33
|
+
readonly kind: 'matter';
|
|
34
|
+
readonly matterId: string;
|
|
35
|
+
};
|
|
36
|
+
readonly surface: 'desktop' | 'quick_chat' | 'tui' | 'remote';
|
|
37
|
+
}
|
|
38
|
+
export interface BotInputDeliveryBlocker {
|
|
39
|
+
readonly stage: 'lease' | 'recovery' | 'queue' | 'consume' | 'commit' | 'model' | 'execution';
|
|
40
|
+
readonly errorCode: string;
|
|
41
|
+
readonly pendingCount: number | null;
|
|
42
|
+
readonly leaseOwnerSurface: 'desktop' | 'tui' | null;
|
|
43
|
+
readonly heldByOtherHost: boolean;
|
|
44
|
+
readonly updatedAt: string;
|
|
45
|
+
readonly suggestedActions: readonly ('take_over' | 'retry' | 'open_diagnostics' | 'open_settings')[];
|
|
46
|
+
}
|
|
47
|
+
/** Pending text is authorized conversation data. Diagnostics carry only the blocker. */
|
|
48
|
+
export interface BotInputDeliveryRead {
|
|
49
|
+
readonly pendingInputs?: readonly BotPendingInput[];
|
|
50
|
+
readonly pendingInputsTotal?: number;
|
|
51
|
+
readonly pendingInputsTruncated?: boolean;
|
|
52
|
+
readonly pendingInputsErrorCode?: string;
|
|
53
|
+
readonly deliveryBlocker?: BotInputDeliveryBlocker | null;
|
|
54
|
+
}
|
package/dist/project.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Bot list projection. Sort is recent activity only.
|
|
3
3
|
* needsYou changes the badge and the filter, not the order.
|
|
4
4
|
*/
|
|
5
|
+
import type { BotInputDeliveryBlocker } from './bot-conversation-read.ts';
|
|
5
6
|
import type { ProjectModelPolicy } from './model-routing.ts';
|
|
6
7
|
import type { PendingApprovalState, WorkSessionStatus } from './delegation.ts';
|
|
7
8
|
import type { FollowUpProjection } from './task-overview.ts';
|
|
@@ -57,6 +58,7 @@ export interface ProjectDiagnostics {
|
|
|
57
58
|
readonly acquiredAt: string | null;
|
|
58
59
|
readonly heartbeatAt: string | null;
|
|
59
60
|
} | null;
|
|
61
|
+
readonly inputDeliveryBlocker?: BotInputDeliveryBlocker | null;
|
|
60
62
|
readonly input: {
|
|
61
63
|
readonly depth: number | null;
|
|
62
64
|
readonly executionDepth: number | null;
|
package/dist/updater.d.ts
CHANGED
|
@@ -17,12 +17,22 @@ export type UpdateChannelPreference = 'auto' | UpdateChannel;
|
|
|
17
17
|
export type UpdaterPhase = 'idle' | 'checking' | 'available' | 'not-available' | 'downloading'
|
|
18
18
|
/** 更新已下载,等待用户点击「安装」后退出替换并重启(mac / Windows / Linux AppImage 同一语义)。 */
|
|
19
19
|
| 'downloaded' | 'error';
|
|
20
|
+
export type UpdaterDownloadStage = 'connecting' | 'downloading' | 'verifying';
|
|
21
|
+
/** Download facts projected by the desktop host. The package estimate is independent of the transfer total. */
|
|
22
|
+
export interface UpdaterDownloadTelemetry {
|
|
23
|
+
readonly transferredBytes?: number;
|
|
24
|
+
readonly totalBytes?: number;
|
|
25
|
+
readonly bytesPerSecond?: number;
|
|
26
|
+
readonly downloadStage?: UpdaterDownloadStage;
|
|
27
|
+
readonly packageSizeBytes?: number;
|
|
28
|
+
readonly isFallbackFull?: boolean;
|
|
29
|
+
}
|
|
20
30
|
/** 主进程向渲染层广播的更新事件(与 auto-updater 的 onEvent 一一对应)。 */
|
|
21
|
-
export interface UpdaterEvent {
|
|
31
|
+
export interface UpdaterEvent extends UpdaterDownloadTelemetry {
|
|
22
32
|
readonly type: 'checking-for-update' | 'update-available' | 'update-not-available' | 'download-progress' | 'update-downloaded' | 'error';
|
|
23
33
|
/** 目标/可用版本号(available / downloaded / not-available 时携带)。 */
|
|
24
34
|
readonly version?: string;
|
|
25
|
-
/** 下载进度百分比(download-progress 时携带,0–100
|
|
35
|
+
/** 下载进度百分比(download-progress 时携带,0–100,最多一位小数)。 */
|
|
26
36
|
readonly percent?: number;
|
|
27
37
|
/** 错误信息(error 时携带)。 */
|
|
28
38
|
readonly message?: string;
|
|
@@ -32,7 +42,7 @@ export interface UpdaterEvent {
|
|
|
32
42
|
readonly releaseNotes?: string;
|
|
33
43
|
}
|
|
34
44
|
/** 渲染层订阅 / 主动查询时获得的更新状态快照。 */
|
|
35
|
-
export interface UpdaterStatus {
|
|
45
|
+
export interface UpdaterStatus extends UpdaterDownloadTelemetry {
|
|
36
46
|
/** 当前应用版本号(来自 app.getVersion)。 */
|
|
37
47
|
readonly currentVersion: string;
|
|
38
48
|
/** 实际生效的更新通道(preference=auto 时为版本号推断结果)。 */
|