@peer-agent/protocol 0.0.4-beta.3 → 0.0.4-beta.4
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/task-overview.d.ts +40 -0
- package/dist/task-overview.js +11 -0
- package/package.json +1 -1
package/dist/task-overview.d.ts
CHANGED
|
@@ -133,6 +133,28 @@ export interface TaskOverviewItem {
|
|
|
133
133
|
readonly providerLabel?: string;
|
|
134
134
|
/** 动作按钮标签(原型「处理 →」「查看结果」「继续 →」)。 */
|
|
135
135
|
readonly actionLabel: string;
|
|
136
|
+
/**
|
|
137
|
+
* 目标线(Goal Thread)关系 —— 仅 source === 'goal_plan' 且计划携带
|
|
138
|
+
* 关系字段时出现。UI 依据 rootPlanId 把多条 result_ready 归组为一条
|
|
139
|
+
* 目标线;缺字段的历史计划无这些键,仍按单卡平铺(向后兼容)。
|
|
140
|
+
*/
|
|
141
|
+
readonly rootPlanId?: string;
|
|
142
|
+
readonly parentPlanId?: string;
|
|
143
|
+
readonly relationType?: 'derived';
|
|
144
|
+
/** 目标线内派生深度;顶层计划为 0。 */
|
|
145
|
+
readonly depth?: number;
|
|
146
|
+
/** 目标线内轮次序号,从 1 开始。 */
|
|
147
|
+
readonly round?: number;
|
|
148
|
+
/** 根目标标题;根卡片已移出列表时分组头仍可显示。 */
|
|
149
|
+
readonly rootPlanTitle?: string;
|
|
150
|
+
/** 质量自检状态;接口此前漏声明(实现与测试已在用),随目标线一并补齐。 */
|
|
151
|
+
readonly qualityReviewStatus?: 'reviewing' | 'passed' | 'failed';
|
|
152
|
+
readonly qualityChecks?: readonly {
|
|
153
|
+
readonly id: string;
|
|
154
|
+
readonly label: string;
|
|
155
|
+
readonly status: 'passed' | 'failed' | 'skipped';
|
|
156
|
+
readonly note?: string;
|
|
157
|
+
}[];
|
|
136
158
|
/**
|
|
137
159
|
* 是否存在用户尚未查看的新动态。
|
|
138
160
|
* 该值由主进程依据任务最近活跃时间与持久化阅读水位投影,renderer 不自行推断。
|
|
@@ -206,6 +228,24 @@ export interface GoalPlanProjectionSnapshot {
|
|
|
206
228
|
/** 有代码副作用时,完成门之后还要质量自检过线才能待验收。 */
|
|
207
229
|
readonly requiresQualityReview?: boolean;
|
|
208
230
|
readonly qualityReviewStatus?: 'reviewing' | 'passed' | 'failed';
|
|
231
|
+
/**
|
|
232
|
+
* 目标线(Goal Thread)关系字段 —— 追问派生出的新 plan 不再平铺,
|
|
233
|
+
* 而是挂进同一 rootPlanId 的目标线成为新一轮(demo:
|
|
234
|
+
* design/product/goal-thread-acceptance-demo.html)。
|
|
235
|
+
* 全部可选:历史数据缺字段时 UI 自然降级为单卡平铺。
|
|
236
|
+
*/
|
|
237
|
+
/** 所在目标线的根 planId;顶层计划等于自身 planId。 */
|
|
238
|
+
readonly rootPlanId?: string;
|
|
239
|
+
/** 根目标标题;根卡片已被验收移出列表时,分组头仍可显示。 */
|
|
240
|
+
readonly rootPlanTitle?: string;
|
|
241
|
+
/** 直接父计划;顶层计划省略。 */
|
|
242
|
+
readonly parentPlanId?: string;
|
|
243
|
+
/** 关系类型;当前仅有 derived(追问派生)。 */
|
|
244
|
+
readonly relationType?: 'derived';
|
|
245
|
+
/** 在目标线内的派生深度;顶层计划为 0。 */
|
|
246
|
+
readonly depth?: number;
|
|
247
|
+
/** 在目标线内的轮次序号,从 1 开始;顶层计划为 1。 */
|
|
248
|
+
readonly round?: number;
|
|
209
249
|
readonly qualityChecks?: readonly {
|
|
210
250
|
readonly id: string;
|
|
211
251
|
readonly label: string;
|
package/dist/task-overview.js
CHANGED
|
@@ -122,6 +122,17 @@ export function projectGoalPlan(snapshot, options) {
|
|
|
122
122
|
...(decision.needsYouReason ? { needsYouReason: decision.needsYouReason } : {}),
|
|
123
123
|
nextAction: decision.nextAction,
|
|
124
124
|
title: snapshot.title,
|
|
125
|
+
// 目标线关系透传:缺字段的旧计划不携带这些键,UI 自然降级为平铺。
|
|
126
|
+
...(snapshot.rootPlanId ? { rootPlanId: snapshot.rootPlanId } : {}),
|
|
127
|
+
...(snapshot.parentPlanId ? { parentPlanId: snapshot.parentPlanId } : {}),
|
|
128
|
+
...(snapshot.relationType ? { relationType: snapshot.relationType } : {}),
|
|
129
|
+
...(typeof snapshot.depth === 'number' && Number.isFinite(snapshot.depth)
|
|
130
|
+
? { depth: snapshot.depth }
|
|
131
|
+
: {}),
|
|
132
|
+
...(typeof snapshot.round === 'number' && Number.isFinite(snapshot.round)
|
|
133
|
+
? { round: snapshot.round }
|
|
134
|
+
: {}),
|
|
135
|
+
...(snapshot.rootPlanTitle ? { rootPlanTitle: snapshot.rootPlanTitle } : {}),
|
|
125
136
|
...(snapshot.workspaceLabel ? { workspaceLabel: snapshot.workspaceLabel } : {}),
|
|
126
137
|
...(snapshot.deliveryRoute ? { deliveryRoute: snapshot.deliveryRoute } : {}),
|
|
127
138
|
...(snapshot.deliveryHandoffLabel ? { deliveryHandoffLabel: snapshot.deliveryHandoffLabel } : {}),
|