@xfey/tutti 0.1.28 → 0.1.29

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.
@@ -1,6 +1,6 @@
1
1
  export { CollaborationStateCursorError } from "./serialization.js";
2
2
  export { createIdleExecutionStatusProjection } from "./execution-status.js";
3
- export { createMainChatAgentMessage, createMainChatMessage, createMainChatSystemMessage, hasMainChatArtifactPreviewMessage, hasMainChatWorklistCompileMessage, hasMainChatWorklistFeedbackMessage, readCompletedWorklistFeedbackTaskIds, readMessageProjectionById, readMainChatMessageWindow, readMainChatMessagesAfter, readMainChatMessagesAfterCursor, readMainChatMessagesBeforeCursor, } from "./messages.js";
3
+ export { createMainChatAgentMessage, createMainChatMessage, createMainChatSystemMessage, hasMainChatArtifactPreviewMessage, hasMainChatTaskResultMessage, hasMainChatWorklistCompileMessage, hasMainChatWorklistFeedbackMessage, readCompletedWorklistFeedbackTaskIds, readMessageProjectionById, readMainChatMessageWindow, readMainChatMessagesAfter, readMainChatMessagesAfterCursor, readMainChatMessagesBeforeCursor, } from "./messages.js";
4
4
  export { createEmptyScratchpadProjection, readScratchpadReceiptSourceRefs, readScratchpadProjection, submitScratchpadProjection, upsertScratchpadProjection, } from "./scratchpad.js";
5
5
  export { advanceScratchpadTaskCompileSourceCursor, markScratchpadRefreshFailed, markScratchpadRefreshStarted, markScratchpadRefreshSucceeded, markScratchpadSourceDirty, readScratchpadSourceState, } from "./scratchpad-source-state.js";
6
6
  export { deleteStaleClarificationSubmitReplayHints, readActiveClarificationProjection, readClarificationRoundProjection, readClarificationRoundsForThread, readClarificationThreadResponse, readSealedClarificationRoundsWithoutSuccessor, readSubmittedTaskCompileClarificationRounds, readSubmittedTaskCompileClarificationRoundsAfterCursor, } from "./clarification-records.js";
@@ -1,6 +1,6 @@
1
1
  export { CollaborationStateCursorError } from "./serialization.js";
2
2
  export { createIdleExecutionStatusProjection } from "./execution-status.js";
3
- export { createMainChatAgentMessage, createMainChatMessage, createMainChatSystemMessage, hasMainChatArtifactPreviewMessage, hasMainChatWorklistCompileMessage, hasMainChatWorklistFeedbackMessage, readCompletedWorklistFeedbackTaskIds, readMessageProjectionById, readMainChatMessageWindow, readMainChatMessagesAfter, readMainChatMessagesAfterCursor, readMainChatMessagesBeforeCursor, } from "./messages.js";
3
+ export { createMainChatAgentMessage, createMainChatMessage, createMainChatSystemMessage, hasMainChatArtifactPreviewMessage, hasMainChatTaskResultMessage, hasMainChatWorklistCompileMessage, hasMainChatWorklistFeedbackMessage, readCompletedWorklistFeedbackTaskIds, readMessageProjectionById, readMainChatMessageWindow, readMainChatMessagesAfter, readMainChatMessagesAfterCursor, readMainChatMessagesBeforeCursor, } from "./messages.js";
4
4
  export { createEmptyScratchpadProjection, readScratchpadReceiptSourceRefs, readScratchpadProjection, submitScratchpadProjection, upsertScratchpadProjection, } from "./scratchpad.js";
5
5
  export { advanceScratchpadTaskCompileSourceCursor, markScratchpadRefreshFailed, markScratchpadRefreshStarted, markScratchpadRefreshSucceeded, markScratchpadSourceDirty, readScratchpadSourceState, } from "./scratchpad-source-state.js";
6
6
  export { deleteStaleClarificationSubmitReplayHints, readActiveClarificationProjection, readClarificationRoundProjection, readClarificationRoundsForThread, readClarificationThreadResponse, readSealedClarificationRoundsWithoutSuccessor, readSubmittedTaskCompileClarificationRounds, readSubmittedTaskCompileClarificationRoundsAfterCursor, } from "./clarification-records.js";
@@ -9,6 +9,7 @@ export declare function createMainChatSystemMessage(db: SqliteDatabase, input: C
9
9
  export declare function createMainChatAgentMessage(db: SqliteDatabase, input: CreateMainChatAgentMessageInput): MessageProjection;
10
10
  export declare function readMessageProjectionById(db: SqliteDatabase, messageId: MessageId): MessageProjection | null;
11
11
  export declare function hasMainChatWorklistFeedbackMessage(db: SqliteDatabase, feedbackKey: string): boolean;
12
+ export declare function hasMainChatTaskResultMessage(db: SqliteDatabase, resultKey: string): boolean;
12
13
  export declare function hasMainChatWorklistCompileMessage(db: SqliteDatabase, workflowRef: WorkflowInvocationRef): boolean;
13
14
  export declare function hasMainChatArtifactPreviewMessage(db: SqliteDatabase, runResultId: RunResultId): boolean;
14
15
  export declare function readCompletedWorklistFeedbackTaskIds(db: SqliteDatabase): Set<TaskId>;
@@ -207,6 +207,18 @@ export function hasMainChatWorklistFeedbackMessage(db, feedbackKey) {
207
207
  .get(feedbackKey);
208
208
  return row !== undefined;
209
209
  }
210
+ export function hasMainChatTaskResultMessage(db, resultKey) {
211
+ const row = db
212
+ .prepare(`
213
+ SELECT 1 AS exists_flag
214
+ FROM messages
215
+ WHERE scope_kind = 'main_chat'
216
+ AND json_extract(refs_json, '$.task_result.result_key') = ?
217
+ LIMIT 1
218
+ `)
219
+ .get(resultKey);
220
+ return row !== undefined;
221
+ }
210
222
  export function hasMainChatWorklistCompileMessage(db, workflowRef) {
211
223
  const row = db
212
224
  .prepare(`
@@ -48,7 +48,6 @@ export declare class Phase5ControlPlane {
48
48
  private readScratchpadRefreshBlocker;
49
49
  private publishTaskRunStarted;
50
50
  private publishRunResultRecorded;
51
- private maybePublishArtifactPreviewMessage;
52
51
  private publishRunTransition;
53
52
  private handleRunTerminalTransition;
54
53
  private tryRunTaskArrivalScheduler;
@@ -1,4 +1,4 @@
1
- import { createMainChatAgentMessage, hasMainChatArtifactPreviewMessage, readWorklistProjection, } from "../collaboration-state/index.js";
1
+ import { readWorklistProjection } from "../collaboration-state/index.js";
2
2
  import { ProcedureEngine } from "../procedure-engine/index.js";
3
3
  import { RunEngine } from "../run-engine/index.js";
4
4
  import { publishProcedureTransition as publishProcedureTransitionEvent, publishRunResultRecorded as publishRunResultRecordedEvent, publishRunTransition as publishRunTransitionEvent, publishTaskRunStarted as publishTaskRunStartedEvent, } from "./event-publishers.js";
@@ -15,11 +15,7 @@ import { startControlPlaneTaskBoundFollowUpCheck } from "./follow-up-start.js";
15
15
  import { runControlPlaneSchedulerForTaskArrival, runControlPlaneSchedulerNow, } from "./run-scheduler.js";
16
16
  import { startControlPlaneRunForTask } from "./run-start.js";
17
17
  import { runSendClarificationRoundMessage, runSubmitClarificationRound, } from "./clarification-commands.js";
18
- import { emitWorklistCompletedFeedback, emitWorklistFailedFeedback, } from "./worklist-terminal-feedback.js";
19
- import { mainChatInvalidates } from "./invalidations.js";
20
- function artifactPreviewChangedPaths(paths) {
21
- return paths?.some((path) => path === "tutti.artifact.json") ?? false;
22
- }
18
+ import { emitTaskCompletedResultMessage, emitTaskFailedResultMessage, } from "./worklist-terminal-feedback.js";
23
19
  export class Phase5ControlPlane {
24
20
  engine;
25
21
  runEngine;
@@ -274,40 +270,6 @@ export class Phase5ControlPlane {
274
270
  }
275
271
  publishRunResultRecorded(recorded) {
276
272
  publishRunResultRecordedEvent(this.events, recorded);
277
- this.maybePublishArtifactPreviewMessage(recorded);
278
- }
279
- maybePublishArtifactPreviewMessage(recorded) {
280
- const result = recorded.task_detail.detail.result;
281
- if (result.promotion?.status !== "promoted" ||
282
- !artifactPreviewChangedPaths(result.changed_paths)) {
283
- return;
284
- }
285
- const runResultId = recorded.run_result.id;
286
- if (hasMainChatArtifactPreviewMessage(this.store.db, runResultId)) {
287
- return;
288
- }
289
- const title = "Preview updated";
290
- const message = createMainChatAgentMessage(this.store.db, {
291
- body: `${title}\n\nThe current artifact preview was updated by "${recorded.task.title}". Open Artifacts to review the latest preview.`,
292
- refs: {
293
- scratchpad_source: "exclude",
294
- task_id: recorded.task.id,
295
- activity_ref: recorded.run_result.activity_ref,
296
- artifact_preview: {
297
- kind: "artifact_preview",
298
- title,
299
- status: "updated",
300
- task_id: recorded.task.id,
301
- run_result_id: runResultId,
302
- },
303
- },
304
- now: this.now,
305
- });
306
- this.events.publish({
307
- event_type: "message.created",
308
- payload: { message },
309
- invalidates: mainChatInvalidates(),
310
- });
311
273
  }
312
274
  publishRunTransition(state) {
313
275
  publishRunTransitionEvent({
@@ -321,14 +283,27 @@ export class Phase5ControlPlane {
321
283
  }
322
284
  handleRunTerminalTransition(state) {
323
285
  if (state.activity.status === "finished") {
286
+ if (state.activity.task_id !== undefined) {
287
+ emitTaskCompletedResultMessage({
288
+ store: this.store,
289
+ events: this.events,
290
+ taskId: state.activity.task_id,
291
+ activityRef: state.activity.activity_ref,
292
+ ...(this.projectContext === undefined
293
+ ? {}
294
+ : { workspaceRoot: this.projectContext.workspaceRoot }),
295
+ now: this.now,
296
+ });
297
+ }
324
298
  this.maybeScheduleAfterRunCompletion();
325
299
  return;
326
300
  }
327
301
  if (state.activity.status === "failed" && state.activity.task_id !== undefined) {
328
- emitWorklistFailedFeedback({
302
+ emitTaskFailedResultMessage({
329
303
  store: this.store,
330
304
  events: this.events,
331
305
  taskId: state.activity.task_id,
306
+ activityRef: state.activity.activity_ref,
332
307
  now: this.now,
333
308
  });
334
309
  }
@@ -348,14 +323,6 @@ export class Phase5ControlPlane {
348
323
  if (this.tryRunTaskArrivalScheduler()) {
349
324
  return;
350
325
  }
351
- emitWorklistCompletedFeedback({
352
- store: this.store,
353
- events: this.events,
354
- ...(this.projectContext === undefined
355
- ? {}
356
- : { workspaceRoot: this.projectContext.workspaceRoot }),
357
- now: this.now,
358
- });
359
326
  this.maybeStartContextSyncAfterWorklistCompletion();
360
327
  }
361
328
  worklistCompletionContextSyncTrigger() {
@@ -1,5 +1,5 @@
1
- import { applyTaskCompileProposal, createMainChatAgentMessage, hasMainChatWorklistCompileMessage, readCompiledTaskSummariesByWorkflowRef, openNextTaskCompileClarificationRound, openTaskCompileClarificationRound, readWorklistProjection, submitScratchpadProjection, } from "../collaboration-state/index.js";
2
- import { clarificationInvalidates, mainChatInvalidates, taskCompileInvalidates, } from "./invalidations.js";
1
+ import { applyTaskCompileProposal, openNextTaskCompileClarificationRound, openTaskCompileClarificationRound, readWorklistProjection, submitScratchpadProjection, } from "../collaboration-state/index.js";
2
+ import { clarificationInvalidates, taskCompileInvalidates, } from "./invalidations.js";
3
3
  import { normalizeTaskCompileProposal } from "./task-proposal.js";
4
4
  const EMPTY_INITIAL_WORKLIST_CLARIFICATION = {
5
5
  title: "Worklist scope needed",
@@ -9,51 +9,6 @@ const EMPTY_INITIAL_WORKLIST_CLARIFICATION = {
9
9
  function countWorklistTasks(worklist) {
10
10
  return worklist.modules.reduce((count, module) => count + module.tasks.length, 0);
11
11
  }
12
- function taskCountLabel(count) {
13
- return count === 1 ? "1 task" : `${count} tasks`;
14
- }
15
- function worklistCompileFallback(input) {
16
- const lines = [input.title, ""];
17
- for (const task of input.tasks) {
18
- lines.push(`- ${task.title} (${task.module_name})`);
19
- if (task.summary.trim().length > 0) {
20
- lines.push(` ${task.summary}`);
21
- }
22
- }
23
- lines.push("", "Open Worklist to review the compiled tasks.");
24
- return lines.join("\n");
25
- }
26
- function publishWorklistCompileMessage(input) {
27
- if (hasMainChatWorklistCompileMessage(input.store.db, input.workflowRef)) {
28
- return;
29
- }
30
- const tasks = readCompiledTaskSummariesByWorkflowRef(input.store.db, input.workflowRef);
31
- if (tasks.length === 0) {
32
- return;
33
- }
34
- const title = `Compiled ${taskCountLabel(tasks.length)} into Worklist`;
35
- const message = createMainChatAgentMessage(input.store.db, {
36
- body: worklistCompileFallback({ title, tasks }),
37
- refs: {
38
- scratchpad_source: "exclude",
39
- workflow_ref: input.workflowRef,
40
- activity_ref: input.activityRef,
41
- worklist_compile: {
42
- kind: "worklist_compile",
43
- workflow_ref: input.workflowRef,
44
- title,
45
- task_count: tasks.length,
46
- tasks,
47
- },
48
- },
49
- now: input.now,
50
- });
51
- input.events.publish({
52
- event_type: "message.created",
53
- payload: { message },
54
- invalidates: mainChatInvalidates(),
55
- });
56
- }
57
12
  function openTaskCompileNeedsHuman(input) {
58
13
  const opened = input.continueFromRoundId === undefined
59
14
  ? openTaskCompileClarificationRound(input.store.db, {
@@ -155,13 +110,6 @@ export function applyTaskCompileProcedureOutput(input) {
155
110
  },
156
111
  invalidates: taskCompileInvalidates(),
157
112
  });
158
- publishWorklistCompileMessage({
159
- store: input.store,
160
- events: input.events,
161
- workflowRef: input.workflowRef,
162
- activityRef: input.activityRef,
163
- now: input.now,
164
- });
165
113
  if (input.continueFromRoundId !== undefined) {
166
114
  return {
167
115
  kind: "completed",
@@ -1,4 +1,4 @@
1
- import type { TaskId } from "@tutti/shared/ids";
1
+ import type { ActivityRef, TaskId } from "@tutti/shared/ids";
2
2
  import type { MessageProjection } from "@tutti/shared/schemas/api";
3
3
  import type { HostProjectStore } from "../store/index.js";
4
4
  import type { WorkspaceEventBus } from "../server-shell/http/workspace-events.js";
@@ -8,6 +8,14 @@ type EmitWorklistFeedbackInput = {
8
8
  workspaceRoot?: string;
9
9
  now: () => Date;
10
10
  };
11
+ export declare function emitTaskCompletedResultMessage(input: EmitWorklistFeedbackInput & {
12
+ taskId: TaskId;
13
+ activityRef?: ActivityRef;
14
+ }): MessageProjection | null;
15
+ export declare function emitTaskFailedResultMessage(input: EmitWorklistFeedbackInput & {
16
+ taskId: TaskId;
17
+ activityRef?: ActivityRef;
18
+ }): MessageProjection | null;
11
19
  export declare function emitWorklistCompletedFeedback(input: EmitWorklistFeedbackInput): MessageProjection | null;
12
20
  export declare function emitWorklistFailedFeedback(input: EmitWorklistFeedbackInput & {
13
21
  taskId: TaskId;
@@ -1,5 +1,5 @@
1
1
  import { readViewerFile, referenceFileSourceForPath, referenceMediaTypeForPath, referenceTuttiGroupForPath, } from "../workspace-ops/index.js";
2
- import { createMainChatAgentMessage, hasMainChatWorklistFeedbackMessage, readCompletedWorklistFeedbackTaskIds, readTaskDetailProjection, readWorklistProjection, } from "../collaboration-state/index.js";
2
+ import { createMainChatAgentMessage, hasMainChatTaskResultMessage, hasMainChatWorklistFeedbackMessage, readCompletedWorklistFeedbackTaskIds, readTaskDetailProjection, readWorklistProjection, } from "../collaboration-state/index.js";
3
3
  import { mainChatInvalidates } from "./invalidations.js";
4
4
  const BODY_ITEM_LIMIT = 12;
5
5
  function summaryText(value, fallback) {
@@ -177,6 +177,104 @@ function markdownFallback(feedback) {
177
177
  }
178
178
  return lines.join("\n");
179
179
  }
180
+ function taskResultKey(item) {
181
+ return `task-result:${item.status}:${item.task_id}:${item.latest_run_result_id ?? "no-result"}`;
182
+ }
183
+ function taskResultFallback(result) {
184
+ const moduleText = result.module_name === undefined ? "" : ` (${result.module_name})`;
185
+ const lines = [result.title, "", `${result.task_title}${moduleText}`, ""];
186
+ if (result.final_note !== undefined && result.final_note.trim().length > 0) {
187
+ lines.push(result.final_note.trim(), "");
188
+ }
189
+ if (result.generated_files !== undefined && result.generated_files.length > 0) {
190
+ lines.push("Generated files:");
191
+ for (const file of result.generated_files) {
192
+ lines.push(`- ${file.name}`);
193
+ }
194
+ lines.push("");
195
+ }
196
+ if (result.summary.trim().length > 0) {
197
+ lines.push(result.summary.trim(), "");
198
+ }
199
+ if (result.status === "failed") {
200
+ lines.push("Review the Worklist task detail for the failure context.");
201
+ }
202
+ else {
203
+ lines.push("Open the Worklist task detail to review the result.");
204
+ }
205
+ return lines.join("\n");
206
+ }
207
+ function publishTaskResultMessage(input, result) {
208
+ if (hasMainChatTaskResultMessage(input.store.db, result.result_key)) {
209
+ return null;
210
+ }
211
+ const message = createMainChatAgentMessage(input.store.db, {
212
+ body: taskResultFallback(result),
213
+ refs: {
214
+ scratchpad_source: "exclude",
215
+ task_id: result.task_id,
216
+ ...(result.activity_ref === undefined ? {} : { activity_ref: result.activity_ref }),
217
+ task_result: result,
218
+ },
219
+ now: input.now,
220
+ });
221
+ input.events.publish({
222
+ event_type: "message.created",
223
+ payload: { message },
224
+ invalidates: mainChatInvalidates(),
225
+ });
226
+ return message;
227
+ }
228
+ export function emitTaskCompletedResultMessage(input) {
229
+ const entry = readWorklistTaskEntries(input.store).find((item) => item.task.id === input.taskId);
230
+ if (entry === undefined || entry.task.status !== "done") {
231
+ return null;
232
+ }
233
+ const item = feedbackItemFromEntry(entry);
234
+ const finalNote = userNoteCandidateFromEntry(entry);
235
+ const generatedFiles = generatedFilesForCompletedEntries(input, [entry]);
236
+ const result = {
237
+ kind: "task_result",
238
+ status: "completed",
239
+ title: "Task completed",
240
+ task_id: item.task_id,
241
+ task_title: item.title,
242
+ result_key: taskResultKey(item),
243
+ summary: item.summary,
244
+ ...(item.module_name === undefined ? {} : { module_name: item.module_name }),
245
+ ...(item.latest_run_result_id === undefined
246
+ ? {}
247
+ : { latest_run_result_id: item.latest_run_result_id }),
248
+ ...(input.activityRef === undefined ? {} : { activity_ref: input.activityRef }),
249
+ ...(finalNote === undefined ? {} : { final_note: finalNote }),
250
+ ...(generatedFiles.length === 0 ? {} : { generated_files: generatedFiles }),
251
+ };
252
+ return publishTaskResultMessage(input, result);
253
+ }
254
+ export function emitTaskFailedResultMessage(input) {
255
+ const entry = readWorklistTaskEntries(input.store).find((item) => item.task.id === input.taskId);
256
+ if (entry === undefined || entry.task.status !== "failed") {
257
+ return null;
258
+ }
259
+ const item = feedbackItemFromEntry(entry);
260
+ const errorCode = entry.detail?.detail.result.error_code;
261
+ const result = {
262
+ kind: "task_result",
263
+ status: "failed",
264
+ title: "Task failed",
265
+ task_id: item.task_id,
266
+ task_title: item.title,
267
+ result_key: taskResultKey(item),
268
+ summary: item.summary,
269
+ ...(item.module_name === undefined ? {} : { module_name: item.module_name }),
270
+ ...(item.latest_run_result_id === undefined
271
+ ? {}
272
+ : { latest_run_result_id: item.latest_run_result_id }),
273
+ ...(input.activityRef === undefined ? {} : { activity_ref: input.activityRef }),
274
+ ...(errorCode === undefined ? {} : { error_code: errorCode }),
275
+ };
276
+ return publishTaskResultMessage(input, result);
277
+ }
180
278
  function publishFeedbackMessage(input, feedback) {
181
279
  if (hasExistingFeedback(input.store, feedback.feedback_key)) {
182
280
  return null;
@@ -31,7 +31,7 @@
31
31
 
32
32
  - `0001_init.sql`、`0002_allow_sealed_round_successor_note.sql`、`0003_drop_scratchpad_source_message_refs.sql`、`0004_read_state.sql`、`0005_provider_usage.sql`、`0006_scratchpad_source_state.sql`、`0007_workspace_signal_read_state_scopes.sql`、`0008_provider_usage_anchors.sql`、`0009_project_timeline_events.sql`、`0010_project_brief.sql`、`0011_message_author_avatar.sql`、`0012_scratchpad_receipts.sql` 与 `0013_scratchpad_receipt_sources.sql` 已存在,代表当前 host project SQLite schema contract。
33
33
  - SQLite adapter、migration runner、checksum 校验、store metadata 初始化、transaction helper 与 command recovery scan helper 已实现。
34
- - 协作 repository 与 Control Plane 已实现第一批业务读写;Phase 7 首批已复用 `0001_init.sql` 中的 `tasks.latest_run_result_id`、`task_details.result_json` 与 `run_results` 表完成 Run result / checks / promotion 摘要持久化。Control Plane recovery resolver 与 task-bound continuation / retry 复用现有 schema;deterministic promotion reconcile 的业务 truth 仍写入最终 Run result / task detail result,Timeline 默认从 `tasks`、`run_results` 与主群聊 `refs.worklist_feedback` 投影三类任务级审计节点,`project_timeline_events` 只保留缺少稳定 record 的轻量可观测性事件。merge workspace 不进入 SQLite truth。`provider_usage_events` 只保存 token 计数、调用来源、模型名、记录时间和可空 anchor,不保存 provider secret、prompt 或 raw response。store 基础设施本身已经可以创建并迁移 `tutti.sqlite`。
34
+ - 协作 repository 与 Control Plane 已实现第一批业务读写;Phase 7 首批已复用 `0001_init.sql` 中的 `tasks.latest_run_result_id`、`task_details.result_json` 与 `run_results` 表完成 Run result / checks / promotion 摘要持久化。Control Plane recovery resolver 与 task-bound continuation / retry 复用现有 schema;deterministic promotion reconcile 的业务 truth 仍写入最终 Run result / task detail result,Timeline 默认从 `tasks`、`run_results` 与历史主群聊 `refs.worklist_feedback` 投影任务级审计节点,当前 task terminal Chat feedback 写入 `refs.task_result` 消息;`project_timeline_events` 只保留缺少稳定 record 的轻量可观测性事件。merge workspace 不进入 SQLite truth。`provider_usage_events` 只保存 token 计数、调用来源、模型名、记录时间和可空 anchor,不保存 provider secret、prompt 或 raw response。store 基础设施本身已经可以创建并迁移 `tutti.sqlite`。
35
35
 
36
36
  ## PRAGMA 边界
37
37
 
@@ -569,6 +569,27 @@ export declare const SendClarificationRoundMessageResultSchema: import("@sinclai
569
569
  }>>>;
570
570
  primary_task_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
571
571
  }>>;
572
+ task_result: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
573
+ kind: import("@sinclair/typebox").TLiteral<"task_result">;
574
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"completed">, import("@sinclair/typebox").TLiteral<"failed">]>;
575
+ title: import("@sinclair/typebox").TString;
576
+ task_id: import("@sinclair/typebox").TString;
577
+ task_title: import("@sinclair/typebox").TString;
578
+ result_key: import("@sinclair/typebox").TString;
579
+ summary: import("@sinclair/typebox").TString;
580
+ module_name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
581
+ latest_run_result_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
582
+ activity_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
583
+ final_note: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
584
+ generated_files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
585
+ path: import("@sinclair/typebox").TString;
586
+ name: import("@sinclair/typebox").TString;
587
+ group: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
588
+ size_bytes: import("@sinclair/typebox").TInteger;
589
+ media_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
590
+ }>>>;
591
+ error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
592
+ }>>;
572
593
  artifact_preview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
573
594
  kind: import("@sinclair/typebox").TLiteral<"artifact_preview">;
574
595
  title: import("@sinclair/typebox").TString;
@@ -6,7 +6,7 @@ export { ProviderUsageBreakdownProjectionSchema, ProviderUsageCategorySchema, Pr
6
6
  export { ProjectTimelineChangeStatusSchema, ProjectTimelineClarificationTraceSchema, ProjectTimelineDecisionSummarySchema, ProjectTimelineItemKindSchema, ProjectTimelineItemSchema, ProjectTimelineItemStatusSchema, ProjectTimelineResponseSchema, ProjectTimelineSourceSnippetSchema, ProjectTimelineTaskUpdateStateSchema, ProjectTimelineTraceCardSchema, ProjectTimelineTraceLinkSchema, ProjectTimelineTraceToneSchema, } from "./project-timeline.js";
7
7
  export { MAX_REFERENCE_STAGED_UPLOAD_BYTES, MAX_SKILL_ZIP_STAGED_UPLOAD_BYTES, MAX_STAGED_UPLOAD_BYTES, PresignedUploadPutSchema, ReferenceFileStartRelayUploadPayloadSchema, ReferenceStagedUploadReferenceProperties, RelayUploadProjectionSchema, RelayUploadPurposeSchema, Sha256DigestSchema, SkillZipStartRelayUploadPayloadSchema, SkillZipStagedUploadReferenceProperties, StagedUploadReferenceProperties, StagedUploadReferenceSchema, StartRelayUploadBodySchema, StartRelayUploadDispositionSchema, StartRelayUploadPayloadSchema, StartRelayUploadResponseSchema, StartRelayUploadResultSchema, maxStagedUploadBytesForPurpose, } from "./uploads.js";
8
8
  export { MarkReadBodySchema, MarkReadDispositionSchema, MarkReadPayloadSchema, MarkReadResponseSchema, MarkReadResultSchema, ReadStateScopeProjectionSchema, ReadStateScopeSchema, ReadStateSummaryProjectionSchema, } from "./read-state.js";
9
- export { GetMessagesRequestSchema, MessageAuthorSchema, MessageCreatedEventPayloadSchema, MessageKindSchema, MessageProjectionSchema, MessageReferenceFileRefSchema, MessageRefsSchema, MessageScopeSchema, MessageWindowSchema, ReferenceFileCategorySchema, SendMainChatMessageBodySchema, SendMainChatMessageCreatedDispositionSchema, SendMainChatMessageDispositionSchema, SendMainChatMessagePayloadSchema, SendMainChatMessageResponseSchema, SendMainChatMessageResultSchema, ArtifactPreviewRefSchema, WorklistCompileRefSchema, WorklistFeedbackItemSchema, WorklistFeedbackGeneratedFileSchema, WorklistFeedbackRefSchema, } from "./messages.js";
9
+ export { GetMessagesRequestSchema, MessageAuthorSchema, MessageCreatedEventPayloadSchema, MessageKindSchema, MessageProjectionSchema, MessageReferenceFileRefSchema, MessageRefsSchema, MessageScopeSchema, MessageWindowSchema, ReferenceFileCategorySchema, SendMainChatMessageBodySchema, SendMainChatMessageCreatedDispositionSchema, SendMainChatMessageDispositionSchema, SendMainChatMessagePayloadSchema, SendMainChatMessageResponseSchema, SendMainChatMessageResultSchema, ArtifactPreviewRefSchema, TaskResultRefSchema, WorklistCompileRefSchema, WorklistFeedbackItemSchema, WorklistFeedbackGeneratedFileSchema, WorklistFeedbackRefSchema, } from "./messages.js";
10
10
  export { CheckSkipReasonCodeSchema, ExternalSideEffectSummaryProjectionSchema, GetRecoverySummariesRequestSchema, GetRecoverySummariesResponseSchema, GetRecoverySummaryResponseSchema, RecoverySummaryProjectionSchema, ResultAnchorSchema, RunLineageSchema, RunResultProjectionSchema, ScratchpadProjectionSchema, ScratchpadReceiptProjectionSchema, TaskContractProjectionSchema, TaskDetailProjectionSchema, TaskDetailResultProjectionSchema, TaskModuleProjectionSchema, TaskProjectionSchema, TaskRunResultsPageSchema, TaskStatusSchema, WorklistCompiledTaskSummarySchema, WorklistProjectionSchema, } from "./work-items.js";
11
11
  export { ActiveApprovalProjectionSchema, ApprovalCommandProjectionSchema, ApprovalDecisionKindSchema, ApprovalDecisionOptionProjectionSchema, ApprovalDecisionToneSchema, ApprovalFileChangeProjectionSchema, ApprovalPermissionsProjectionSchema, ApprovalRequestKindSchema, ApprovalRequestProjectionSchema, ApprovalResolutionOutcomeSchema, ApprovalResolutionProjectionSchema, DecideApprovalBodySchema, DecideApprovalDispositionSchema, DecideApprovalPayloadSchema, DecideApprovalResponseSchema, DecideApprovalResultSchema, } from "./approvals.js";
12
12
  export { ActiveClarificationProjectionSchema, ClarificationChangedEventPayloadSchema, ClarificationOwnerProjectionSchema, ClarificationRequestPayloadSchema, ClarificationRoundProjectionSchema, ClarificationRoundSummaryProjectionSchema, ClarificationSuccessorRefSchema, ClarificationThreadProjectionSchema, ContextRefSchema, GetClarificationRoundMessagesRequestSchema, GetClarificationRoundResponseSchema, GetClarificationThreadResponseSchema, HumanInteractionPayloadSchema, HumanRequestPayloadSchema, SendClarificationRoundMessageBodySchema, SendClarificationRoundMessageDispositionSchema, SendClarificationRoundMessagePayloadSchema, SendClarificationRoundMessageResponseSchema, SendClarificationRoundMessageResultSchema, SubmitClarificationRoundBodySchema, SubmitClarificationRoundDispositionSchema, SubmitClarificationRoundPayloadSchema, SubmitClarificationRoundResponseSchema, SubmitClarificationRoundResultSchema, } from "./clarifications.js";
@@ -5,7 +5,7 @@ export { ProviderUsageBreakdownProjectionSchema, ProviderUsageCategorySchema, Pr
5
5
  export { ProjectTimelineChangeStatusSchema, ProjectTimelineClarificationTraceSchema, ProjectTimelineDecisionSummarySchema, ProjectTimelineItemKindSchema, ProjectTimelineItemSchema, ProjectTimelineItemStatusSchema, ProjectTimelineResponseSchema, ProjectTimelineSourceSnippetSchema, ProjectTimelineTaskUpdateStateSchema, ProjectTimelineTraceCardSchema, ProjectTimelineTraceLinkSchema, ProjectTimelineTraceToneSchema, } from "./project-timeline.js";
6
6
  export { MAX_REFERENCE_STAGED_UPLOAD_BYTES, MAX_SKILL_ZIP_STAGED_UPLOAD_BYTES, MAX_STAGED_UPLOAD_BYTES, PresignedUploadPutSchema, ReferenceFileStartRelayUploadPayloadSchema, ReferenceStagedUploadReferenceProperties, RelayUploadProjectionSchema, RelayUploadPurposeSchema, Sha256DigestSchema, SkillZipStartRelayUploadPayloadSchema, SkillZipStagedUploadReferenceProperties, StagedUploadReferenceProperties, StagedUploadReferenceSchema, StartRelayUploadBodySchema, StartRelayUploadDispositionSchema, StartRelayUploadPayloadSchema, StartRelayUploadResponseSchema, StartRelayUploadResultSchema, maxStagedUploadBytesForPurpose, } from "./uploads.js";
7
7
  export { MarkReadBodySchema, MarkReadDispositionSchema, MarkReadPayloadSchema, MarkReadResponseSchema, MarkReadResultSchema, ReadStateScopeProjectionSchema, ReadStateScopeSchema, ReadStateSummaryProjectionSchema, } from "./read-state.js";
8
- export { GetMessagesRequestSchema, MessageAuthorSchema, MessageCreatedEventPayloadSchema, MessageKindSchema, MessageProjectionSchema, MessageReferenceFileRefSchema, MessageRefsSchema, MessageScopeSchema, MessageWindowSchema, ReferenceFileCategorySchema, SendMainChatMessageBodySchema, SendMainChatMessageCreatedDispositionSchema, SendMainChatMessageDispositionSchema, SendMainChatMessagePayloadSchema, SendMainChatMessageResponseSchema, SendMainChatMessageResultSchema, ArtifactPreviewRefSchema, WorklistCompileRefSchema, WorklistFeedbackItemSchema, WorklistFeedbackGeneratedFileSchema, WorklistFeedbackRefSchema, } from "./messages.js";
8
+ export { GetMessagesRequestSchema, MessageAuthorSchema, MessageCreatedEventPayloadSchema, MessageKindSchema, MessageProjectionSchema, MessageReferenceFileRefSchema, MessageRefsSchema, MessageScopeSchema, MessageWindowSchema, ReferenceFileCategorySchema, SendMainChatMessageBodySchema, SendMainChatMessageCreatedDispositionSchema, SendMainChatMessageDispositionSchema, SendMainChatMessagePayloadSchema, SendMainChatMessageResponseSchema, SendMainChatMessageResultSchema, ArtifactPreviewRefSchema, TaskResultRefSchema, WorklistCompileRefSchema, WorklistFeedbackItemSchema, WorklistFeedbackGeneratedFileSchema, WorklistFeedbackRefSchema, } from "./messages.js";
9
9
  export { CheckSkipReasonCodeSchema, ExternalSideEffectSummaryProjectionSchema, GetRecoverySummariesRequestSchema, GetRecoverySummariesResponseSchema, GetRecoverySummaryResponseSchema, RecoverySummaryProjectionSchema, ResultAnchorSchema, RunLineageSchema, RunResultProjectionSchema, ScratchpadProjectionSchema, ScratchpadReceiptProjectionSchema, TaskContractProjectionSchema, TaskDetailProjectionSchema, TaskDetailResultProjectionSchema, TaskModuleProjectionSchema, TaskProjectionSchema, TaskRunResultsPageSchema, TaskStatusSchema, WorklistCompiledTaskSummarySchema, WorklistProjectionSchema, } from "./work-items.js";
10
10
  export { ActiveApprovalProjectionSchema, ApprovalCommandProjectionSchema, ApprovalDecisionKindSchema, ApprovalDecisionOptionProjectionSchema, ApprovalDecisionToneSchema, ApprovalFileChangeProjectionSchema, ApprovalPermissionsProjectionSchema, ApprovalRequestKindSchema, ApprovalRequestProjectionSchema, ApprovalResolutionOutcomeSchema, ApprovalResolutionProjectionSchema, DecideApprovalBodySchema, DecideApprovalDispositionSchema, DecideApprovalPayloadSchema, DecideApprovalResponseSchema, DecideApprovalResultSchema, } from "./approvals.js";
11
11
  export { ActiveClarificationProjectionSchema, ClarificationChangedEventPayloadSchema, ClarificationOwnerProjectionSchema, ClarificationRequestPayloadSchema, ClarificationRoundProjectionSchema, ClarificationRoundSummaryProjectionSchema, ClarificationSuccessorRefSchema, ClarificationThreadProjectionSchema, ContextRefSchema, GetClarificationRoundMessagesRequestSchema, GetClarificationRoundResponseSchema, GetClarificationThreadResponseSchema, HumanInteractionPayloadSchema, HumanRequestPayloadSchema, SendClarificationRoundMessageBodySchema, SendClarificationRoundMessageDispositionSchema, SendClarificationRoundMessagePayloadSchema, SendClarificationRoundMessageResponseSchema, SendClarificationRoundMessageResultSchema, SubmitClarificationRoundBodySchema, SubmitClarificationRoundDispositionSchema, SubmitClarificationRoundPayloadSchema, SubmitClarificationRoundResponseSchema, SubmitClarificationRoundResultSchema, } from "./clarifications.js";
@@ -89,6 +89,27 @@ export declare const WorklistFeedbackRefSchema: import("@sinclair/typebox").TObj
89
89
  }>>>;
90
90
  primary_task_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
91
91
  }>;
92
+ export declare const TaskResultRefSchema: import("@sinclair/typebox").TObject<{
93
+ kind: import("@sinclair/typebox").TLiteral<"task_result">;
94
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"completed">, import("@sinclair/typebox").TLiteral<"failed">]>;
95
+ title: import("@sinclair/typebox").TString;
96
+ task_id: import("@sinclair/typebox").TString;
97
+ task_title: import("@sinclair/typebox").TString;
98
+ result_key: import("@sinclair/typebox").TString;
99
+ summary: import("@sinclair/typebox").TString;
100
+ module_name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
101
+ latest_run_result_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
102
+ activity_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
103
+ final_note: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
104
+ generated_files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
105
+ path: import("@sinclair/typebox").TString;
106
+ name: import("@sinclair/typebox").TString;
107
+ group: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
108
+ size_bytes: import("@sinclair/typebox").TInteger;
109
+ media_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
110
+ }>>>;
111
+ error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
112
+ }>;
92
113
  export declare const WorklistCompileRefSchema: import("@sinclair/typebox").TObject<{
93
114
  kind: import("@sinclair/typebox").TLiteral<"worklist_compile">;
94
115
  workflow_ref: import("@sinclair/typebox").TString;
@@ -173,6 +194,27 @@ export declare const MessageRefsSchema: import("@sinclair/typebox").TObject<{
173
194
  }>>>;
174
195
  primary_task_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
175
196
  }>>;
197
+ task_result: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
198
+ kind: import("@sinclair/typebox").TLiteral<"task_result">;
199
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"completed">, import("@sinclair/typebox").TLiteral<"failed">]>;
200
+ title: import("@sinclair/typebox").TString;
201
+ task_id: import("@sinclair/typebox").TString;
202
+ task_title: import("@sinclair/typebox").TString;
203
+ result_key: import("@sinclair/typebox").TString;
204
+ summary: import("@sinclair/typebox").TString;
205
+ module_name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
206
+ latest_run_result_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
207
+ activity_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
208
+ final_note: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
209
+ generated_files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
210
+ path: import("@sinclair/typebox").TString;
211
+ name: import("@sinclair/typebox").TString;
212
+ group: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
213
+ size_bytes: import("@sinclair/typebox").TInteger;
214
+ media_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
215
+ }>>>;
216
+ error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
217
+ }>>;
176
218
  artifact_preview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
177
219
  kind: import("@sinclair/typebox").TLiteral<"artifact_preview">;
178
220
  title: import("@sinclair/typebox").TString;
@@ -269,6 +311,27 @@ export declare const MessageProjectionSchema: import("@sinclair/typebox").TObjec
269
311
  }>>>;
270
312
  primary_task_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
271
313
  }>>;
314
+ task_result: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
315
+ kind: import("@sinclair/typebox").TLiteral<"task_result">;
316
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"completed">, import("@sinclair/typebox").TLiteral<"failed">]>;
317
+ title: import("@sinclair/typebox").TString;
318
+ task_id: import("@sinclair/typebox").TString;
319
+ task_title: import("@sinclair/typebox").TString;
320
+ result_key: import("@sinclair/typebox").TString;
321
+ summary: import("@sinclair/typebox").TString;
322
+ module_name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
323
+ latest_run_result_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
324
+ activity_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
325
+ final_note: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
326
+ generated_files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
327
+ path: import("@sinclair/typebox").TString;
328
+ name: import("@sinclair/typebox").TString;
329
+ group: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
330
+ size_bytes: import("@sinclair/typebox").TInteger;
331
+ media_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
332
+ }>>>;
333
+ error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
334
+ }>>;
272
335
  artifact_preview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
273
336
  kind: import("@sinclair/typebox").TLiteral<"artifact_preview">;
274
337
  title: import("@sinclair/typebox").TString;
@@ -389,6 +452,27 @@ export declare const SendMainChatMessageResultSchema: import("@sinclair/typebox"
389
452
  }>>>;
390
453
  primary_task_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
391
454
  }>>;
455
+ task_result: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
456
+ kind: import("@sinclair/typebox").TLiteral<"task_result">;
457
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"completed">, import("@sinclair/typebox").TLiteral<"failed">]>;
458
+ title: import("@sinclair/typebox").TString;
459
+ task_id: import("@sinclair/typebox").TString;
460
+ task_title: import("@sinclair/typebox").TString;
461
+ result_key: import("@sinclair/typebox").TString;
462
+ summary: import("@sinclair/typebox").TString;
463
+ module_name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
464
+ latest_run_result_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
465
+ activity_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
466
+ final_note: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
467
+ generated_files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
468
+ path: import("@sinclair/typebox").TString;
469
+ name: import("@sinclair/typebox").TString;
470
+ group: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
471
+ size_bytes: import("@sinclair/typebox").TInteger;
472
+ media_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
473
+ }>>>;
474
+ error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
475
+ }>>;
392
476
  artifact_preview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
393
477
  kind: import("@sinclair/typebox").TLiteral<"artifact_preview">;
394
478
  title: import("@sinclair/typebox").TString;
@@ -506,6 +590,27 @@ export declare const MessageCreatedEventPayloadSchema: import("@sinclair/typebox
506
590
  }>>>;
507
591
  primary_task_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
508
592
  }>>;
593
+ task_result: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
594
+ kind: import("@sinclair/typebox").TLiteral<"task_result">;
595
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"completed">, import("@sinclair/typebox").TLiteral<"failed">]>;
596
+ title: import("@sinclair/typebox").TString;
597
+ task_id: import("@sinclair/typebox").TString;
598
+ task_title: import("@sinclair/typebox").TString;
599
+ result_key: import("@sinclair/typebox").TString;
600
+ summary: import("@sinclair/typebox").TString;
601
+ module_name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
602
+ latest_run_result_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
603
+ activity_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
604
+ final_note: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
605
+ generated_files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
606
+ path: import("@sinclair/typebox").TString;
607
+ name: import("@sinclair/typebox").TString;
608
+ group: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
609
+ size_bytes: import("@sinclair/typebox").TInteger;
610
+ media_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
611
+ }>>>;
612
+ error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
613
+ }>>;
509
614
  artifact_preview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
510
615
  kind: import("@sinclair/typebox").TLiteral<"artifact_preview">;
511
616
  title: import("@sinclair/typebox").TString;
@@ -92,6 +92,21 @@ export const WorklistFeedbackRefSchema = Type.Object({
92
92
  generated_files: Type.Optional(Type.Array(WorklistFeedbackGeneratedFileSchema)),
93
93
  primary_task_id: Type.Optional(TaskIdSchema),
94
94
  }, { additionalProperties: false });
95
+ export const TaskResultRefSchema = Type.Object({
96
+ kind: Type.Literal("task_result"),
97
+ status: Type.Union([Type.Literal("completed"), Type.Literal("failed")]),
98
+ title: NonEmptyStringSchema,
99
+ task_id: TaskIdSchema,
100
+ task_title: NonEmptyStringSchema,
101
+ result_key: NonEmptyStringSchema,
102
+ summary: Type.String(),
103
+ module_name: Type.Optional(NonEmptyStringSchema),
104
+ latest_run_result_id: Type.Optional(RunResultIdSchema),
105
+ activity_ref: Type.Optional(ActivityRefSchema),
106
+ final_note: Type.Optional(Type.String()),
107
+ generated_files: Type.Optional(Type.Array(WorklistFeedbackGeneratedFileSchema)),
108
+ error_code: Type.Optional(NonEmptyStringSchema),
109
+ }, { additionalProperties: false });
95
110
  export const WorklistCompileRefSchema = Type.Object({
96
111
  kind: Type.Literal("worklist_compile"),
97
112
  workflow_ref: WorkflowInvocationRefSchema,
@@ -116,6 +131,7 @@ export const MessageRefsSchema = Type.Object({
116
131
  reference_file: Type.Optional(MessageReferenceFileRefSchema),
117
132
  worklist_compile: Type.Optional(WorklistCompileRefSchema),
118
133
  worklist_feedback: Type.Optional(WorklistFeedbackRefSchema),
134
+ task_result: Type.Optional(TaskResultRefSchema),
119
135
  artifact_preview: Type.Optional(ArtifactPreviewRefSchema),
120
136
  }, { additionalProperties: false });
121
137
  export const MessageProjectionSchema = Type.Object({