@peer-agent/protocol 0.1.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/LICENSE +21 -0
- package/README.md +32 -0
- package/dist/chat.d.ts +222 -0
- package/dist/chat.js +29 -0
- package/dist/execution.d.ts +257 -0
- package/dist/execution.js +1 -0
- package/dist/goal.d.ts +378 -0
- package/dist/goal.js +1 -0
- package/dist/index.d.ts +609 -0
- package/dist/index.js +6 -0
- package/dist/memory.d.ts +104 -0
- package/dist/memory.js +1 -0
- package/dist/system-context.d.ts +180 -0
- package/dist/system-context.js +1 -0
- package/dist/updater.d.ts +72 -0
- package/dist/updater.js +1 -0
- package/package.json +42 -0
package/dist/goal.d.ts
ADDED
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Goal 模式协议类型 —— 见 Goal 模式设计。
|
|
3
|
+
*
|
|
4
|
+
* 设计要点(与提案一致):
|
|
5
|
+
* - 计划是持久化的 Evidence/artifact,采用「先规划 → 批准 → 执行」流程。
|
|
6
|
+
* - 子任务(含嵌套)独立追踪完成状态,`status` 只能由 Evidence 回写。
|
|
7
|
+
* - 批准 / 驳回 / 修订作为治理事实记录,复用 execution.ts 的 HumanConfirmation。
|
|
8
|
+
* - 进度(progress)由子任务自底向上聚合,不可手填。
|
|
9
|
+
*
|
|
10
|
+
* 复用既有协议:
|
|
11
|
+
* - 子任务状态复用 ExecutionStatus(execution.ts)。
|
|
12
|
+
* - 批准决策复用 HumanConfirmationDecision(execution.ts)。
|
|
13
|
+
*/
|
|
14
|
+
import type { ExecutionStatus, HumanConfirmationDecision } from './execution.ts';
|
|
15
|
+
/** 计划整体状态机,见提案 §2。 */
|
|
16
|
+
export type GoalPlanStatus = 'drafting' | 'awaiting_approval' | 'approved' | 'accepted' | 'executing' | 'paused' | 'completed' | 'cancelled' | 'failed';
|
|
17
|
+
/** Goal artifact 的工作流语义:Plan 审批门 vs Goal 自驱契约。 */
|
|
18
|
+
export type GoalWorkflowKind = 'plan_approval' | 'goal_self_driven';
|
|
19
|
+
/**
|
|
20
|
+
* Goal/Plan 的执行准入事实。
|
|
21
|
+
*
|
|
22
|
+
* `intake` 是 goal 模式下的「判别前置态」:用户首发消息先落成 intake 契约,
|
|
23
|
+
* Runner 在只读/问答/澄清的受限授权下判别真实意图,判定为明确目标后才升级为
|
|
24
|
+
* `accepted_goal` 进入正常自驱;判定为纯问答则由上层静默移除契约。
|
|
25
|
+
*/
|
|
26
|
+
export interface GoalActivation {
|
|
27
|
+
readonly kind: 'intake' | 'approval_required' | 'approved_plan' | 'accepted_goal';
|
|
28
|
+
readonly sourceMessageId?: string;
|
|
29
|
+
readonly acceptedAt?: string;
|
|
30
|
+
readonly acceptedBy?: string;
|
|
31
|
+
/** intake 阶段的判别结论;仅在 kind 从 intake 流转时写入,用于溯源。 */
|
|
32
|
+
readonly intakeResolution?: GoalIntakeResolution;
|
|
33
|
+
}
|
|
34
|
+
/** intake 判别的三种结论。 */
|
|
35
|
+
export type GoalIntakeResolution = 'inquiry' | 'clarifying' | 'goal_confirmed';
|
|
36
|
+
export type GoalAskUserReason = 'ambiguous_goal' | 'product_decision' | 'high_risk' | 'irreversible' | 'missing_permission' | 'missing_credentials' | 'verification_conflict' | 'scope_drift';
|
|
37
|
+
/** 执行策略:权限仍由 Runtime Projection / PermissionGrant / adapter enforcement 负责。 */
|
|
38
|
+
export interface GoalExecutionPolicy {
|
|
39
|
+
readonly autonomy: 'approval_gated' | 'self_driven';
|
|
40
|
+
readonly irreversibleRequiresConfirmation: boolean;
|
|
41
|
+
readonly writeScope: 'workspace_and_boundaries';
|
|
42
|
+
readonly askUserOn: readonly GoalAskUserReason[];
|
|
43
|
+
}
|
|
44
|
+
/** 异常处理策略动作。rollback 的 schema 先落地,执行器可后置。 */
|
|
45
|
+
export type ExceptionPolicyAction = 'pause' | 'rollback' | 'skip' | 'ask_user';
|
|
46
|
+
/** 结构化异常处理策略(MVP 必需)。 */
|
|
47
|
+
export interface ExceptionPolicy {
|
|
48
|
+
readonly id: string;
|
|
49
|
+
/** 何种异常触发 */
|
|
50
|
+
readonly trigger: string;
|
|
51
|
+
/** 作用域:'plan' 或某个 taskId */
|
|
52
|
+
readonly scope: 'plan' | string;
|
|
53
|
+
readonly action: ExceptionPolicyAction;
|
|
54
|
+
/** 回滚目标 taskId(仅 action='rollback' 时有意义) */
|
|
55
|
+
readonly rollbackOf?: string;
|
|
56
|
+
}
|
|
57
|
+
/** 计划边界条件。 */
|
|
58
|
+
export interface GoalBoundaries {
|
|
59
|
+
readonly inScope: string[];
|
|
60
|
+
readonly outOfScope: string[];
|
|
61
|
+
}
|
|
62
|
+
/** 子任务(树形,支持嵌套)。 */
|
|
63
|
+
export interface GoalTask {
|
|
64
|
+
readonly taskId: string;
|
|
65
|
+
/** 同层稳定排序 */
|
|
66
|
+
readonly order: number;
|
|
67
|
+
readonly title: string;
|
|
68
|
+
/** 子目标委派关系;历史任务可不含这些字段。 */
|
|
69
|
+
readonly childPlanIds?: readonly string[];
|
|
70
|
+
readonly executionMode?: 'direct' | 'delegated';
|
|
71
|
+
/** 达成路径 / 步骤 */
|
|
72
|
+
readonly path: string[];
|
|
73
|
+
/** 依赖的 taskId(约束见提案 §4:同层或祖先链之外,禁止成环) */
|
|
74
|
+
readonly dependsOn: string[];
|
|
75
|
+
/** 本任务完成判定 */
|
|
76
|
+
readonly acceptanceCriteria: string[];
|
|
77
|
+
readonly involvedFiles: string[];
|
|
78
|
+
/** 预期能力(对齐 Runtime Projection) */
|
|
79
|
+
readonly capabilityHints?: string[];
|
|
80
|
+
/** 子任务状态,复用 ExecutionStatus;只能由 Evidence 回写 */
|
|
81
|
+
readonly status: ExecutionStatus;
|
|
82
|
+
/** 完成的事实依据(Evidence id 列表) */
|
|
83
|
+
readonly evidenceRefs: string[];
|
|
84
|
+
readonly result?: string;
|
|
85
|
+
readonly failureReason?: string;
|
|
86
|
+
readonly blockedReason?: string;
|
|
87
|
+
readonly startedAt?: string;
|
|
88
|
+
readonly completedAt?: string;
|
|
89
|
+
/** 嵌套子任务(MVP 必需) */
|
|
90
|
+
readonly subtasks?: GoalTask[];
|
|
91
|
+
}
|
|
92
|
+
/** Goal 模式的全局 Evidence 索引记录;任务完成只允许引用这里登记过的 refs。 */
|
|
93
|
+
export interface EvidenceIndexRecord {
|
|
94
|
+
readonly evidenceRef: string;
|
|
95
|
+
readonly planId?: string;
|
|
96
|
+
readonly conversationId?: string;
|
|
97
|
+
readonly streamId?: string;
|
|
98
|
+
readonly toolCallId?: string;
|
|
99
|
+
readonly capabilityId?: string;
|
|
100
|
+
readonly toolName?: string;
|
|
101
|
+
readonly createdAt: string;
|
|
102
|
+
readonly artifactRefs?: readonly string[];
|
|
103
|
+
}
|
|
104
|
+
/** 批准事实(Evidence)。 */
|
|
105
|
+
export interface GoalApproval {
|
|
106
|
+
readonly decision: HumanConfirmationDecision;
|
|
107
|
+
/** 绑定 execution.ts 的 confirmationId */
|
|
108
|
+
readonly confirmationId: string;
|
|
109
|
+
readonly decidedBy?: string;
|
|
110
|
+
readonly decidedAt: string;
|
|
111
|
+
readonly feedback?: string;
|
|
112
|
+
}
|
|
113
|
+
/** 进度聚合(派生,由子任务 Evidence 聚合,不可手填)。 */
|
|
114
|
+
export interface GoalProgress {
|
|
115
|
+
readonly total: number;
|
|
116
|
+
readonly completed: number;
|
|
117
|
+
readonly failed: number;
|
|
118
|
+
readonly blocked: number;
|
|
119
|
+
/** 0–100 */
|
|
120
|
+
readonly percent: number;
|
|
121
|
+
}
|
|
122
|
+
/** 修订记录(来自 reject/revise 的 feedback)。 */
|
|
123
|
+
export interface GoalRevision {
|
|
124
|
+
readonly version: number;
|
|
125
|
+
readonly reason: string;
|
|
126
|
+
readonly changedAt: string;
|
|
127
|
+
readonly changedBy?: string;
|
|
128
|
+
}
|
|
129
|
+
/** Goal Runner 托管推进器状态。 */
|
|
130
|
+
export type GoalRunnerStatus = 'idle' | 'running' | 'paused' | 'exploring' | 'blocked' | 'budget_exhausted' | 'completed' | 'failed';
|
|
131
|
+
/** Goal Runner 当前推进意图;只描述编排意图,不替代工具执行 Evidence。 */
|
|
132
|
+
export type GoalRunnerIntent = 'execute' | 'verify' | 'explore' | 'synthesize' | 'block';
|
|
133
|
+
export type GoalRunnerPhase = 'orient' | 'inspect' | 'plan_scaffold' | 'act' | 'verify' | 'repair' | 'synthesize' | 'blocked';
|
|
134
|
+
export interface GoalBlockerAudit {
|
|
135
|
+
readonly fingerprint: string;
|
|
136
|
+
readonly occurrences: number;
|
|
137
|
+
readonly firstSeenAt: string;
|
|
138
|
+
readonly lastSeenAt: string;
|
|
139
|
+
readonly reason: string;
|
|
140
|
+
}
|
|
141
|
+
/** 动态 Explorer 子 Agent 的能力边界。第一版只允许只读探索。 */
|
|
142
|
+
export type GoalExplorerProfile = 'readonly_explorer';
|
|
143
|
+
export type GoalExplorerStatus = 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
144
|
+
/** Runner 动态生成的 Explorer 子 Agent 请求;定义任务实例,不定义固定角色。 */
|
|
145
|
+
export interface GoalExplorerRequest {
|
|
146
|
+
readonly explorerId: string;
|
|
147
|
+
readonly planId: string;
|
|
148
|
+
readonly question: string;
|
|
149
|
+
readonly reason: string;
|
|
150
|
+
readonly scope?: {
|
|
151
|
+
readonly include?: string[];
|
|
152
|
+
readonly exclude?: string[];
|
|
153
|
+
};
|
|
154
|
+
readonly profile: GoalExplorerProfile;
|
|
155
|
+
readonly budget: {
|
|
156
|
+
readonly maxToolCalls: number;
|
|
157
|
+
readonly maxDurationMs: number;
|
|
158
|
+
};
|
|
159
|
+
readonly exitCriteria: string[];
|
|
160
|
+
readonly createdAt: string;
|
|
161
|
+
}
|
|
162
|
+
export interface GoalExplorerFinding {
|
|
163
|
+
readonly claim: string;
|
|
164
|
+
readonly evidenceRefs: string[];
|
|
165
|
+
}
|
|
166
|
+
/** Explorer 子 Agent 的结构化报告;完成报告必须带 Evidence refs。 */
|
|
167
|
+
export interface GoalExplorerReport {
|
|
168
|
+
readonly explorerId: string;
|
|
169
|
+
readonly planId: string;
|
|
170
|
+
readonly question: string;
|
|
171
|
+
readonly findings: GoalExplorerFinding[];
|
|
172
|
+
readonly evidenceRefs: string[];
|
|
173
|
+
readonly confidence: 'low' | 'medium' | 'high';
|
|
174
|
+
readonly recommendedNextAction?: string;
|
|
175
|
+
readonly blockedReason?: string;
|
|
176
|
+
}
|
|
177
|
+
export interface GoalExplorerRun {
|
|
178
|
+
readonly explorerId: string;
|
|
179
|
+
readonly status: GoalExplorerStatus;
|
|
180
|
+
readonly request: GoalExplorerRequest;
|
|
181
|
+
/** Evidence refs produced by this Explorer's projected tool executions. */
|
|
182
|
+
readonly evidenceRefs?: string[];
|
|
183
|
+
readonly report?: GoalExplorerReport;
|
|
184
|
+
readonly failureReason?: string;
|
|
185
|
+
/** 同一 turn 内并发派发的一批 Explorer 共享同一 batchId;用于 UI 精确统计「本轮」进度。 */
|
|
186
|
+
readonly batchId?: string;
|
|
187
|
+
readonly createdAt: string;
|
|
188
|
+
readonly updatedAt: string;
|
|
189
|
+
}
|
|
190
|
+
/** 本轮(最近一批)Explorer 并发进度;供 UI 展示「已完成 / 本轮总数」。 */
|
|
191
|
+
export interface GoalExplorerBatch {
|
|
192
|
+
readonly batchId: string;
|
|
193
|
+
/** 本批派发的 Explorer 总数(分母)。 */
|
|
194
|
+
readonly total: number;
|
|
195
|
+
/** 本批已进入终止态(completed/failed/cancelled)的数量(分子)。 */
|
|
196
|
+
readonly done: number;
|
|
197
|
+
}
|
|
198
|
+
export interface GoalExploreQuestion {
|
|
199
|
+
readonly question: string;
|
|
200
|
+
readonly reason: string;
|
|
201
|
+
readonly scope?: {
|
|
202
|
+
readonly include?: string[];
|
|
203
|
+
readonly exclude?: string[];
|
|
204
|
+
};
|
|
205
|
+
readonly budget?: {
|
|
206
|
+
readonly maxToolCalls?: number;
|
|
207
|
+
readonly maxDurationMs?: number;
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
export interface GoalExplorePlan {
|
|
211
|
+
readonly requiredBeforeAct: boolean;
|
|
212
|
+
readonly questions: readonly GoalExploreQuestion[];
|
|
213
|
+
readonly exitCriteria: readonly string[];
|
|
214
|
+
readonly generatedAt: string;
|
|
215
|
+
}
|
|
216
|
+
export type GoalVerifierStatus = 'queued' | 'running' | 'passed' | 'failed' | 'blocked';
|
|
217
|
+
export type GoalVerifierTargetKind = 'plan' | 'task' | 'success_criterion';
|
|
218
|
+
export interface GoalVerifierTarget {
|
|
219
|
+
readonly kind: GoalVerifierTargetKind;
|
|
220
|
+
readonly taskId?: string;
|
|
221
|
+
readonly criterionId?: string;
|
|
222
|
+
}
|
|
223
|
+
export interface GoalVerifierIssue {
|
|
224
|
+
readonly taskId?: string;
|
|
225
|
+
readonly criterionId?: string;
|
|
226
|
+
readonly reason: string;
|
|
227
|
+
readonly evidenceRefs: string[];
|
|
228
|
+
}
|
|
229
|
+
export interface GoalVerifierReport {
|
|
230
|
+
readonly passed: boolean;
|
|
231
|
+
readonly failedCriteria: readonly GoalVerifierIssue[];
|
|
232
|
+
readonly missingEvidence: readonly GoalVerifierIssue[];
|
|
233
|
+
readonly risks: readonly string[];
|
|
234
|
+
readonly evidenceRefs: readonly string[];
|
|
235
|
+
readonly recommendedNextAction?: string;
|
|
236
|
+
}
|
|
237
|
+
/** Verifier 运行事实;记录验证动作与证据,不替代任务 Evidence 或 CriterionResult。 */
|
|
238
|
+
export interface GoalVerifierRun {
|
|
239
|
+
readonly verifierRunId: string;
|
|
240
|
+
readonly planId: string;
|
|
241
|
+
readonly target: GoalVerifierTarget;
|
|
242
|
+
readonly status: GoalVerifierStatus;
|
|
243
|
+
readonly evidenceRefs: string[];
|
|
244
|
+
readonly report?: GoalVerifierReport;
|
|
245
|
+
readonly summary?: string;
|
|
246
|
+
readonly failureReason?: string;
|
|
247
|
+
readonly createdAt: string;
|
|
248
|
+
readonly updatedAt: string;
|
|
249
|
+
readonly completedAt?: string;
|
|
250
|
+
}
|
|
251
|
+
export type GoalRunEventType = 'message_routed' | 'goal_intake_started' | 'goal_created' | 'plan_created' | 'plan_revised' | 'step_started' | 'step_completed' | 'action_started' | 'action_completed' | 'observation_recorded' | 'validation_started' | 'validation_passed' | 'validation_failed' | 'problem_found' | 'user_correction' | 'requirement_override' | 'self_correction' | 'checkpoint_created' | 'network_interrupted' | 'goal_resumed' | 'goal_paused' | 'goal_completed';
|
|
252
|
+
export interface GoalRunEvent {
|
|
253
|
+
readonly id: string;
|
|
254
|
+
readonly goalPlanId: string;
|
|
255
|
+
readonly nodeId?: string;
|
|
256
|
+
readonly parentNodeId?: string;
|
|
257
|
+
readonly type: GoalRunEventType;
|
|
258
|
+
readonly summary: string;
|
|
259
|
+
readonly payload?: Record<string, unknown>;
|
|
260
|
+
readonly evidenceRefs: readonly string[];
|
|
261
|
+
readonly createdAt: string;
|
|
262
|
+
}
|
|
263
|
+
/** Append-only execution ledger for Goal / Plan / Run projection. */
|
|
264
|
+
export interface GoalRunTrace {
|
|
265
|
+
readonly activeNodeId?: string;
|
|
266
|
+
readonly lastCheckpointNodeId?: string;
|
|
267
|
+
readonly events: readonly GoalRunEvent[];
|
|
268
|
+
}
|
|
269
|
+
export type GoalSuccessCriterionKind = 'command' | 'test' | 'file-contains' | 'file-exists' | 'manual';
|
|
270
|
+
export interface GoalSuccessCriterion {
|
|
271
|
+
readonly id: string;
|
|
272
|
+
readonly kind: GoalSuccessCriterionKind;
|
|
273
|
+
readonly description: string;
|
|
274
|
+
readonly command?: string;
|
|
275
|
+
readonly path?: string;
|
|
276
|
+
readonly expect?: string;
|
|
277
|
+
}
|
|
278
|
+
export interface GoalCriterionResult {
|
|
279
|
+
readonly criterionId: string;
|
|
280
|
+
readonly passed: boolean;
|
|
281
|
+
readonly evidenceRef?: string;
|
|
282
|
+
readonly detail?: string;
|
|
283
|
+
readonly checkedAt?: string;
|
|
284
|
+
}
|
|
285
|
+
export type GoalManualConfirmationKind = 'manual_dod';
|
|
286
|
+
export interface GoalManualConfirmation {
|
|
287
|
+
readonly confirmationId: string;
|
|
288
|
+
readonly kind: GoalManualConfirmationKind;
|
|
289
|
+
readonly decision: HumanConfirmationDecision;
|
|
290
|
+
readonly criterionIds: readonly string[];
|
|
291
|
+
readonly decidedBy?: string;
|
|
292
|
+
readonly decidedAt: string;
|
|
293
|
+
readonly feedback?: string;
|
|
294
|
+
}
|
|
295
|
+
/** GoalPlan 内嵌的轻量 runner 状态;不代表工具执行事实,任务完成仍必须由 Evidence 回写。 */
|
|
296
|
+
export interface GoalRunnerState {
|
|
297
|
+
readonly enabled: boolean;
|
|
298
|
+
readonly status: GoalRunnerStatus;
|
|
299
|
+
readonly intent?: GoalRunnerIntent;
|
|
300
|
+
readonly phase?: GoalRunnerPhase;
|
|
301
|
+
readonly currentTaskId?: string;
|
|
302
|
+
/** 预算计数:Runner tick 次数,用于 maxTurns 熔断判定。 */
|
|
303
|
+
readonly turnCount: number;
|
|
304
|
+
/** 展示计数:模型内部对话轮次,随执行实时爬升;与 turnCount(预算)解耦,仅用于 UI 呈现。 */
|
|
305
|
+
readonly roundCount: number;
|
|
306
|
+
readonly toolCallCount: number;
|
|
307
|
+
readonly explorerCount: number;
|
|
308
|
+
readonly maxTurns: number;
|
|
309
|
+
readonly maxToolCalls: number;
|
|
310
|
+
/**
|
|
311
|
+
* @deprecated 语义已弃用:不再作为「每计划累计可派发 Explorer 总数」的闸。
|
|
312
|
+
* 保留字段仅为向后兼容旧持久化数据;并发上限改由 explorerConcurrency 表达,
|
|
313
|
+
* 计划总数由 maxTurns 天然兜底。
|
|
314
|
+
*/
|
|
315
|
+
readonly maxExplorers: number;
|
|
316
|
+
/** 每个 turn 内 Explorer 的并发上限(并发池大小)。默认 5,硬上限 8。 */
|
|
317
|
+
readonly explorerConcurrency: number;
|
|
318
|
+
readonly explorers?: GoalExplorerRun[];
|
|
319
|
+
/** 最近一批并发 Explorer 的进度;无进行中批次时可缺省。 */
|
|
320
|
+
readonly explorerBatch?: GoalExplorerBatch;
|
|
321
|
+
/** Deterministic inspect planner output for the current inspect phase. */
|
|
322
|
+
readonly inspectPlan?: GoalExplorePlan;
|
|
323
|
+
/** Verifier 运行历史;用于追踪验证事实,不作为任务完成的唯一事实源。 */
|
|
324
|
+
readonly verifierRuns?: GoalVerifierRun[];
|
|
325
|
+
readonly blockerAudit?: GoalBlockerAudit;
|
|
326
|
+
readonly tokenBudget?: number;
|
|
327
|
+
readonly tokenUsed?: number;
|
|
328
|
+
readonly blockedReason?: string;
|
|
329
|
+
readonly lastError?: string;
|
|
330
|
+
readonly updatedAt: string;
|
|
331
|
+
}
|
|
332
|
+
/** 计划 Artifact 定型版,见提案 §3。 */
|
|
333
|
+
export interface GoalPlan {
|
|
334
|
+
readonly planId: string;
|
|
335
|
+
readonly conversationId?: string;
|
|
336
|
+
readonly threadId?: string;
|
|
337
|
+
readonly agentId?: number;
|
|
338
|
+
/** Workspace where the Goal was initiated and where contextual knowledge came from. */
|
|
339
|
+
readonly originWorkspacePath?: string;
|
|
340
|
+
/** Workspace/repository where the Goal should write and verify changes. */
|
|
341
|
+
readonly targetWorkspacePath?: string;
|
|
342
|
+
/** 派生目标关系;全部可选以兼容历史计划。 */
|
|
343
|
+
readonly parentPlanId?: string;
|
|
344
|
+
readonly sourceTaskId?: string;
|
|
345
|
+
readonly rootPlanId?: string;
|
|
346
|
+
readonly relationType?: 'derived';
|
|
347
|
+
readonly depth?: number;
|
|
348
|
+
readonly title: string;
|
|
349
|
+
readonly goal: string;
|
|
350
|
+
readonly successCriteria: readonly GoalSuccessCriterion[];
|
|
351
|
+
readonly criterionResults: readonly GoalCriterionResult[];
|
|
352
|
+
readonly manualConfirmations?: readonly GoalManualConfirmation[];
|
|
353
|
+
readonly boundaries: GoalBoundaries;
|
|
354
|
+
readonly exceptionPolicies: ExceptionPolicy[];
|
|
355
|
+
/** 顶层汇总(来源于子任务) */
|
|
356
|
+
readonly involvedFiles: string[];
|
|
357
|
+
/** 拆出的子事项(树形) */
|
|
358
|
+
readonly tasks: GoalTask[];
|
|
359
|
+
readonly workflowKind?: GoalWorkflowKind;
|
|
360
|
+
readonly activation?: GoalActivation;
|
|
361
|
+
readonly executionPolicy?: GoalExecutionPolicy;
|
|
362
|
+
readonly status: GoalPlanStatus;
|
|
363
|
+
readonly approval?: GoalApproval;
|
|
364
|
+
/** 由子任务聚合,派生,不可手填 */
|
|
365
|
+
readonly progress: GoalProgress;
|
|
366
|
+
/** Goal Runner 托管推进状态;旧计划可缺省。 */
|
|
367
|
+
readonly runner?: GoalRunnerState;
|
|
368
|
+
/** Execution/event ledger used by the Goal / Plan / Run right-panel projection. */
|
|
369
|
+
readonly runTrace?: GoalRunTrace;
|
|
370
|
+
readonly version: number;
|
|
371
|
+
readonly revisionHistory: GoalRevision[];
|
|
372
|
+
readonly evidenceRefs: string[];
|
|
373
|
+
/** 对齐 system-context.ts 的 epoch */
|
|
374
|
+
readonly promptContextEpochId?: string;
|
|
375
|
+
readonly createdAt: string;
|
|
376
|
+
readonly updatedAt: string;
|
|
377
|
+
readonly createdBy?: string;
|
|
378
|
+
}
|
package/dist/goal.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|