@xfey/tutti 0.1.26 → 0.1.28

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.
Files changed (35) hide show
  1. package/dist/collaboration-state/index.d.ts +2 -2
  2. package/dist/collaboration-state/index.js +2 -2
  3. package/dist/collaboration-state/messages.d.ts +3 -1
  4. package/dist/collaboration-state/messages.js +25 -1
  5. package/dist/collaboration-state/scratchpad.js +15 -10
  6. package/dist/collaboration-state/worklist.d.ts +3 -2
  7. package/dist/collaboration-state/worklist.js +24 -0
  8. package/dist/control-plane/index.d.ts +1 -0
  9. package/dist/control-plane/index.js +39 -1
  10. package/dist/control-plane/task-compile-output.js +54 -2
  11. package/dist/server-shell/cli/host-runtime-endpoint.d.ts +3 -0
  12. package/dist/server-shell/cli/host-runtime-endpoint.js +20 -6
  13. package/dist/server-shell/cli/runtime-commands.d.ts +1 -1
  14. package/dist/server-shell/cli/runtime-commands.js +44 -5
  15. package/dist/server-shell/http/routes/project-api/openapi-collaboration-routes.d.ts +8 -0
  16. package/dist/server-shell/http/routes/project-api/openapi-workspace-routes.d.ts +8 -0
  17. package/dist/server-shell/http/routes/project-api/openapi.d.ts +16 -0
  18. package/dist/server-shell/http/routes/project-api/schemas.d.ts +8 -0
  19. package/node_modules/@tutti/shared/dist/schemas/api/clarifications.d.ts +21 -0
  20. package/node_modules/@tutti/shared/dist/schemas/api/index.d.ts +2 -2
  21. package/node_modules/@tutti/shared/dist/schemas/api/index.js +2 -2
  22. package/node_modules/@tutti/shared/dist/schemas/api/messages.d.ts +105 -0
  23. package/node_modules/@tutti/shared/dist/schemas/api/messages.js +17 -0
  24. package/node_modules/@tutti/shared/dist/schemas/api/runtime-events.d.ts +8 -0
  25. package/node_modules/@tutti/shared/dist/schemas/api/types.d.ts +5 -2
  26. package/node_modules/@tutti/shared/dist/schemas/api/viewer-reference.d.ts +21 -0
  27. package/node_modules/@tutti/shared/dist/schemas/api/work-items.d.ts +25 -1
  28. package/node_modules/@tutti/shared/dist/schemas/api/work-items.js +16 -7
  29. package/node_modules/@tutti/shared/dist/schemas/api/workspace-commands.d.ts +16 -0
  30. package/package.json +1 -1
  31. package/web/assets/index-CeGTRkQn.css +1 -0
  32. package/web/assets/index-DGnDFv9O.js +29 -0
  33. package/web/index.html +2 -2
  34. package/web/assets/index-BfFYfzeO.js +0 -29
  35. package/web/assets/index-De6mK5Q2.css +0 -1
@@ -1,6 +1,6 @@
1
1
  export { CollaborationStateCursorError } from "./serialization.js";
2
2
  export { createIdleExecutionStatusProjection } from "./execution-status.js";
3
- export { createMainChatAgentMessage, createMainChatMessage, createMainChatSystemMessage, hasMainChatWorklistFeedbackMessage, readCompletedWorklistFeedbackTaskIds, readMessageProjectionById, readMainChatMessageWindow, readMainChatMessagesAfter, readMainChatMessagesAfterCursor, readMainChatMessagesBeforeCursor, } from "./messages.js";
3
+ export { createMainChatAgentMessage, createMainChatMessage, createMainChatSystemMessage, hasMainChatArtifactPreviewMessage, 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";
@@ -12,6 +12,6 @@ export { recordRunNeedsHumanResult, recordRunResult } from "./run-recording.js";
12
12
  export { recoverStaleRunningTasksAsFailed } from "./recovery.js";
13
13
  export { markReadStateScope, readReadStateSummary, recordReadNotificationEvent, } from "./read-state.js";
14
14
  export { readTaskDetailProjection } from "./task-details.js";
15
- export { applyTaskCompileProposal, markTaskRunStarted, readNextRunnableTask, readRecoverableScheduledRun, readTaskProjection, readWorklistProjection, } from "./worklist.js";
15
+ export { applyTaskCompileProposal, markTaskRunStarted, readNextRunnableTask, readRecoverableScheduledRun, readCompiledTaskSummariesByWorkflowRef, readTaskProjection, readWorklistProjection, } from "./worklist.js";
16
16
  export type { ApplyTaskCompileProposalResult, CloseTaskBoundClarificationRetaskingRequiredInput, CloseTaskBoundClarificationRetaskingRequiredResult, CreateClarificationRoundAgentMessageInput, CreateClarificationRoundMessageInput, CreateMainChatAgentMessageInput, CreateMainChatMessageInput, CreateMainChatSystemMessageInput, CursorPageOptions, MarkReadStateScopeInput, MarkReadStateScopeResult, MarkTaskRunStartedInput, MarkTaskRunStartedResult, MaterializeClarificationSuccessorInput, MaterializeTaskBoundRunSuccessorInput, MaterializeTaskBoundRunSuccessorResult, MessageAuthorInput, NextRunnableTaskResult, OpenNextTaskBoundClarificationRoundInput, OpenNextTaskBoundClarificationRoundResult, OpenNextTaskCompileClarificationRoundInput, OpenNextTaskCompileClarificationRoundResult, OpenTaskCompileClarificationRoundInput, OpenTaskCompileClarificationRoundResult, ReadMainChatMessagesAfterOptions, ReadMessageWindowOptions, ReadReadStateSummaryInput, RecoverStaleRunningTasksResult, RecoverableScheduledRun, RecordReadNotificationEventInput, RecordRecoverySummaryInput, RecordRecoverySummaryResult, RecordRunNeedsHumanResultInput, RecordRunNeedsHumanResultResult, RecordRunResultInput, RecordRunResultResult, RunResultPromotionProjection, ScratchpadSnapshotInput, SubmitScratchpadInput, SubmitScratchpadResult, SealedClarificationRoundWithoutSuccessor, SubmitClarificationRoundInput, TaskCompileProposalInput, TaskCompileProposalModuleInput, TaskCompileProposalTaskInput, } from "./types.js";
17
17
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
1
  export { CollaborationStateCursorError } from "./serialization.js";
2
2
  export { createIdleExecutionStatusProjection } from "./execution-status.js";
3
- export { createMainChatAgentMessage, createMainChatMessage, createMainChatSystemMessage, hasMainChatWorklistFeedbackMessage, readCompletedWorklistFeedbackTaskIds, readMessageProjectionById, readMainChatMessageWindow, readMainChatMessagesAfter, readMainChatMessagesAfterCursor, readMainChatMessagesBeforeCursor, } from "./messages.js";
3
+ export { createMainChatAgentMessage, createMainChatMessage, createMainChatSystemMessage, hasMainChatArtifactPreviewMessage, 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";
@@ -12,5 +12,5 @@ export { recordRunNeedsHumanResult, recordRunResult } from "./run-recording.js";
12
12
  export { recoverStaleRunningTasksAsFailed } from "./recovery.js";
13
13
  export { markReadStateScope, readReadStateSummary, recordReadNotificationEvent, } from "./read-state.js";
14
14
  export { readTaskDetailProjection } from "./task-details.js";
15
- export { applyTaskCompileProposal, markTaskRunStarted, readNextRunnableTask, readRecoverableScheduledRun, readTaskProjection, readWorklistProjection, } from "./worklist.js";
15
+ export { applyTaskCompileProposal, markTaskRunStarted, readNextRunnableTask, readRecoverableScheduledRun, readCompiledTaskSummariesByWorkflowRef, readTaskProjection, readWorklistProjection, } from "./worklist.js";
16
16
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { type MessageId, type TaskId } from "@tutti/shared/ids";
1
+ import { type MessageId, type RunResultId, type TaskId, type WorkflowInvocationRef } from "@tutti/shared/ids";
2
2
  import type { MessageProjection, MessageWindow } from "@tutti/shared/schemas/api";
3
3
  import type { SqliteDatabase } from "../store/index.js";
4
4
  import type { CreateMainChatAgentMessageInput, CreateMainChatMessageInput, CreateMainChatSystemMessageInput, ReadMainChatMessagesAfterOptions, ReadMessageWindowOptions } from "./types.js";
@@ -9,6 +9,8 @@ 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 hasMainChatWorklistCompileMessage(db: SqliteDatabase, workflowRef: WorkflowInvocationRef): boolean;
13
+ export declare function hasMainChatArtifactPreviewMessage(db: SqliteDatabase, runResultId: RunResultId): boolean;
12
14
  export declare function readCompletedWorklistFeedbackTaskIds(db: SqliteDatabase): Set<TaskId>;
13
15
  export declare function readMainChatMessageWindow(db: SqliteDatabase, options?: ReadMessageWindowOptions): MessageWindow;
14
16
  export declare function readMainChatMessagesAfter(db: SqliteDatabase, options: ReadMainChatMessagesAfterOptions): MessageProjection[];
@@ -1,4 +1,4 @@
1
- import { createMessageId } from "@tutti/shared/ids";
1
+ import { createMessageId, } from "@tutti/shared/ids";
2
2
  import { clampLimit, decodeCursor, messageCursor, nowIso, parseJson, stringifyJson, } from "./serialization.js";
3
3
  import { recordReadNotificationEvent } from "./read-state.js";
4
4
  function readClarificationCardForMessage(db, messageId) {
@@ -207,6 +207,30 @@ export function hasMainChatWorklistFeedbackMessage(db, feedbackKey) {
207
207
  .get(feedbackKey);
208
208
  return row !== undefined;
209
209
  }
210
+ export function hasMainChatWorklistCompileMessage(db, workflowRef) {
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, '$.worklist_compile.workflow_ref') = ?
217
+ LIMIT 1
218
+ `)
219
+ .get(workflowRef);
220
+ return row !== undefined;
221
+ }
222
+ export function hasMainChatArtifactPreviewMessage(db, runResultId) {
223
+ const row = db
224
+ .prepare(`
225
+ SELECT 1 AS exists_flag
226
+ FROM messages
227
+ WHERE scope_kind = 'main_chat'
228
+ AND json_extract(refs_json, '$.artifact_preview.run_result_id') = ?
229
+ LIMIT 1
230
+ `)
231
+ .get(runResultId);
232
+ return row !== undefined;
233
+ }
210
234
  export function readCompletedWorklistFeedbackTaskIds(db) {
211
235
  const rows = db
212
236
  .prepare(`
@@ -1,4 +1,5 @@
1
1
  import { nowIso, parseJson, stringifyJson } from "./serialization.js";
2
+ import { readCompiledTaskSummariesByWorkflowRef } from "./worklist.js";
2
3
  const SCRATCHPAD_RECEIPT_LIMIT = 100;
3
4
  function normalizeSourceRefs(sourceRefs = []) {
4
5
  const byMessageId = new Map();
@@ -80,16 +81,20 @@ function readScratchpadReceipts(db) {
80
81
  LIMIT ${SCRATCHPAD_RECEIPT_LIMIT}
81
82
  `)
82
83
  .all();
83
- return rows.map((row) => ({
84
- workflow_ref: row.workflow_ref,
85
- activity_ref: row.activity_ref,
86
- topic: row.topic,
87
- background_summary: row.background_summary,
88
- current_consensus: parseJson(row.current_consensus_json, []),
89
- open_questions: parseJson(row.open_questions_json, []),
90
- task_changes: parseJson(row.task_changes_json, []),
91
- submitted_at: row.submitted_at,
92
- }));
84
+ return rows.map((row) => {
85
+ const compiledTasks = readCompiledTaskSummariesByWorkflowRef(db, row.workflow_ref);
86
+ return {
87
+ workflow_ref: row.workflow_ref,
88
+ activity_ref: row.activity_ref,
89
+ topic: row.topic,
90
+ background_summary: row.background_summary,
91
+ current_consensus: parseJson(row.current_consensus_json, []),
92
+ open_questions: parseJson(row.open_questions_json, []),
93
+ task_changes: parseJson(row.task_changes_json, []),
94
+ submitted_at: row.submitted_at,
95
+ ...(compiledTasks.length === 0 ? {} : { compiled_tasks: compiledTasks }),
96
+ };
97
+ });
93
98
  }
94
99
  export function upsertScratchpadProjection(db, input) {
95
100
  const updatedAt = nowIso(input.now);
@@ -1,8 +1,9 @@
1
- import { type TaskId } from "@tutti/shared/ids";
2
- import type { TaskProjection, WorklistProjection } from "@tutti/shared/schemas/api";
1
+ import { type TaskId, type WorkflowInvocationRef } from "@tutti/shared/ids";
2
+ import type { TaskProjection, WorklistCompiledTaskSummary, WorklistProjection } from "@tutti/shared/schemas/api";
3
3
  import type { SqliteDatabase } from "../store/index.js";
4
4
  import type { ApplyTaskCompileProposalResult, MarkTaskRunStartedInput, MarkTaskRunStartedResult, NextRunnableTaskResult, RecoverableScheduledRun, TaskCompileProposalInput } from "./types.js";
5
5
  export declare function readTaskProjection(db: SqliteDatabase, taskId: TaskId): TaskProjection | null;
6
+ export declare function readCompiledTaskSummariesByWorkflowRef(db: SqliteDatabase, workflowRef: WorkflowInvocationRef): WorklistCompiledTaskSummary[];
6
7
  export declare function readWorklistProjection(db: SqliteDatabase): WorklistProjection;
7
8
  export declare function readNextRunnableTask(db: SqliteDatabase): NextRunnableTaskResult;
8
9
  export declare function readRecoverableScheduledRun(db: SqliteDatabase): RecoverableScheduledRun | null;
@@ -44,6 +44,30 @@ export function readTaskProjection(db, taskId) {
44
44
  const row = db.prepare("SELECT * FROM tasks WHERE id = ?").get(taskId);
45
45
  return row === undefined ? null : mapTaskRow(row);
46
46
  }
47
+ export function readCompiledTaskSummariesByWorkflowRef(db, workflowRef) {
48
+ const rows = db
49
+ .prepare(`
50
+ SELECT
51
+ tasks.*,
52
+ task_modules.name AS module_name
53
+ FROM tasks
54
+ JOIN task_modules ON task_modules.id = tasks.module_id
55
+ WHERE tasks.created_from_workflow_ref = ?
56
+ ORDER BY task_modules.sort_order ASC,
57
+ task_modules.id ASC,
58
+ tasks.sort_order ASC,
59
+ tasks.id ASC
60
+ `)
61
+ .all(workflowRef);
62
+ return rows.map((row) => ({
63
+ task_id: row.id,
64
+ title: row.title,
65
+ summary: row.summary,
66
+ status: row.status,
67
+ module_id: row.module_id,
68
+ module_name: row.module_name,
69
+ }));
70
+ }
47
71
  export function readWorklistProjection(db) {
48
72
  const moduleRows = db
49
73
  .prepare(`
@@ -48,6 +48,7 @@ export declare class Phase5ControlPlane {
48
48
  private readScratchpadRefreshBlocker;
49
49
  private publishTaskRunStarted;
50
50
  private publishRunResultRecorded;
51
+ private maybePublishArtifactPreviewMessage;
51
52
  private publishRunTransition;
52
53
  private handleRunTerminalTransition;
53
54
  private tryRunTaskArrivalScheduler;
@@ -1,4 +1,4 @@
1
- import { readWorklistProjection } from "../collaboration-state/index.js";
1
+ import { createMainChatAgentMessage, hasMainChatArtifactPreviewMessage, 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";
@@ -16,6 +16,10 @@ import { runControlPlaneSchedulerForTaskArrival, runControlPlaneSchedulerNow, }
16
16
  import { startControlPlaneRunForTask } from "./run-start.js";
17
17
  import { runSendClarificationRoundMessage, runSubmitClarificationRound, } from "./clarification-commands.js";
18
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
+ }
19
23
  export class Phase5ControlPlane {
20
24
  engine;
21
25
  runEngine;
@@ -270,6 +274,40 @@ export class Phase5ControlPlane {
270
274
  }
271
275
  publishRunResultRecorded(recorded) {
272
276
  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
+ });
273
311
  }
274
312
  publishRunTransition(state) {
275
313
  publishRunTransitionEvent({
@@ -1,5 +1,5 @@
1
- import { applyTaskCompileProposal, openNextTaskCompileClarificationRound, openTaskCompileClarificationRound, readWorklistProjection, submitScratchpadProjection, } from "../collaboration-state/index.js";
2
- import { clarificationInvalidates, taskCompileInvalidates, } from "./invalidations.js";
1
+ import { applyTaskCompileProposal, createMainChatAgentMessage, hasMainChatWorklistCompileMessage, readCompiledTaskSummariesByWorkflowRef, openNextTaskCompileClarificationRound, openTaskCompileClarificationRound, readWorklistProjection, submitScratchpadProjection, } from "../collaboration-state/index.js";
2
+ import { clarificationInvalidates, mainChatInvalidates, 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,6 +9,51 @@ 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
+ }
12
57
  function openTaskCompileNeedsHuman(input) {
13
58
  const opened = input.continueFromRoundId === undefined
14
59
  ? openTaskCompileClarificationRound(input.store.db, {
@@ -110,6 +155,13 @@ export function applyTaskCompileProcedureOutput(input) {
110
155
  },
111
156
  invalidates: taskCompileInvalidates(),
112
157
  });
158
+ publishWorklistCompileMessage({
159
+ store: input.store,
160
+ events: input.events,
161
+ workflowRef: input.workflowRef,
162
+ activityRef: input.activityRef,
163
+ now: input.now,
164
+ });
113
165
  if (input.continueFromRoundId !== undefined) {
114
166
  return {
115
167
  kind: "completed",
@@ -3,6 +3,9 @@ import type { MachineRuntimeEndpointRecord } from "./machine-local.js";
3
3
  export type FetchLike = (input: string | URL, init?: RequestInit) => Promise<Response>;
4
4
  export type HostRuntimeEndpointProbeResult = {
5
5
  kind: "alive";
6
+ readiness?: {
7
+ relay?: "not_connected" | "connected";
8
+ };
6
9
  } | {
7
10
  kind: "stale";
8
11
  reason: string;
@@ -5,12 +5,23 @@ function delay(ms) {
5
5
  setTimeout(resolve, ms);
6
6
  });
7
7
  }
8
- function isHostHealthPayload(value) {
8
+ function parseHostHealthPayload(value) {
9
9
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
10
- return false;
10
+ return null;
11
11
  }
12
12
  const record = value;
13
- return record.service === "tutti-host" && record.status === "ok";
13
+ if (record.service !== "tutti-host" || record.status !== "ok") {
14
+ return null;
15
+ }
16
+ if (typeof record.readiness !== "object" ||
17
+ record.readiness === null ||
18
+ Array.isArray(record.readiness)) {
19
+ return {};
20
+ }
21
+ const readiness = record.readiness;
22
+ return readiness.relay === "connected" || readiness.relay === "not_connected"
23
+ ? { relay: readiness.relay }
24
+ : {};
14
25
  }
15
26
  async function fetchWithTimeout(fetchImpl, url, init = {}, timeoutMs = DEFAULT_PROBE_TIMEOUT_MS) {
16
27
  const controller = new AbortController();
@@ -38,11 +49,14 @@ export function createRuntimeEndpointProbe(fetchImpl = fetch) {
38
49
  if (!response.ok) {
39
50
  return { kind: "stale", reason: `health returned HTTP ${response.status}` };
40
51
  }
41
- const payload = await response.json();
42
- if (!isHostHealthPayload(payload)) {
52
+ const readiness = parseHostHealthPayload(await response.json());
53
+ if (readiness === null) {
43
54
  return { kind: "stale", reason: "health response is not a Tutti host" };
44
55
  }
45
- return { kind: "alive" };
56
+ return {
57
+ kind: "alive",
58
+ ...(readiness.relay === undefined ? {} : { readiness }),
59
+ };
46
60
  }
47
61
  catch (error) {
48
62
  const reason = error instanceof Error ? error.message : "health check failed";
@@ -4,7 +4,7 @@ import { type MachineRuntimeEndpointRecord } from "./machine-local.js";
4
4
  import type { LocalControlFetch } from "./local-control-client.js";
5
5
  export type RuntimeProjectRow = {
6
6
  project_id: ProjectId;
7
- status: "online" | "stale";
7
+ status: "online" | "offline" | "stale";
8
8
  display_name: string;
9
9
  workspace_root: string;
10
10
  endpoint?: string;
@@ -11,6 +11,7 @@ import { resolveManagedProjectContext } from "./project-resolver.js";
11
11
  import { formatJoinLinkValidity, renderTerminalQr } from "./terminal-qr.js";
12
12
  import { resolveTuttiHome } from "../../providers/openai/index.js";
13
13
  import { readCliVersion } from "./version.js";
14
+ import { readProjectIdentity } from "./project-identity.js";
14
15
  const PROJECT_ID_DISPLAY_MIN_LENGTH = 12;
15
16
  function resolveProject(target, options = {}) {
16
17
  return resolveManagedProjectContext({
@@ -45,6 +46,30 @@ function readBindingFile(tuttiHome, projectId) {
45
46
  return null;
46
47
  }
47
48
  }
49
+ function workspaceBelongsToProject(workspaceRoot, projectId) {
50
+ if (!existsSync(workspaceRoot)) {
51
+ return false;
52
+ }
53
+ try {
54
+ const identity = readProjectIdentity(workspaceRoot);
55
+ return identity.kind === "present" && identity.project_id === projectId;
56
+ }
57
+ catch {
58
+ return false;
59
+ }
60
+ }
61
+ async function cleanupOrphanedRuntimeProject(options) {
62
+ if (options.hostAlive) {
63
+ await requestHostLocalShutdown({
64
+ endpoint: options.endpoint,
65
+ ...(options.fetchImpl === undefined ? {} : { fetchImpl: options.fetchImpl }),
66
+ }).catch(() => undefined);
67
+ }
68
+ deleteMachineProjectLocalState({
69
+ tuttiHome: options.tuttiHome,
70
+ projectId: options.projectId,
71
+ });
72
+ }
48
73
  export function formatProjectIdForDisplay(projectId, projectIds) {
49
74
  for (let length = Math.min(PROJECT_ID_DISPLAY_MIN_LENGTH, projectId.length); length <= projectId.length; length += 1) {
50
75
  const prefix = projectId.slice(0, length);
@@ -65,13 +90,27 @@ export async function listRuntimeProjects(options = {}) {
65
90
  continue;
66
91
  }
67
92
  const binding = readBindingFile(tuttiHome, projectId);
93
+ const workspaceRoot = binding?.workspace_root ?? endpoint.workspace_root;
94
+ const displayName = binding?.workspace_root === undefined
95
+ ? projectId
96
+ : binding.workspace_root.split(/[\\/]/u).pop() ?? projectId;
68
97
  const health = await probe(endpoint);
98
+ if (!workspaceBelongsToProject(workspaceRoot, projectId)) {
99
+ await cleanupOrphanedRuntimeProject({
100
+ tuttiHome,
101
+ projectId,
102
+ endpoint,
103
+ hostAlive: health.kind === "alive",
104
+ ...(options.fetchImpl === undefined ? {} : { fetchImpl: options.fetchImpl }),
105
+ });
106
+ continue;
107
+ }
69
108
  if (health.kind === "stale") {
70
109
  rows.push({
71
110
  project_id: projectId,
72
111
  status: "stale",
73
- display_name: binding?.workspace_root === undefined ? projectId : binding.workspace_root.split(/[\\/]/u).pop() ?? projectId,
74
- workspace_root: binding?.workspace_root ?? endpoint.workspace_root,
112
+ display_name: displayName,
113
+ workspace_root: workspaceRoot,
75
114
  endpoint: endpoint.base_url,
76
115
  });
77
116
  continue;
@@ -84,9 +123,9 @@ export async function listRuntimeProjects(options = {}) {
84
123
  ]);
85
124
  const row = {
86
125
  project_id: projectId,
87
- status: "online",
88
- display_name: project.status === "fulfilled" ? project.value.display_name : binding?.workspace_root.split(/[\\/]/u).pop() ?? projectId,
89
- workspace_root: binding?.workspace_root ?? endpoint.workspace_root,
126
+ status: health.readiness?.relay === "connected" ? "online" : "offline",
127
+ display_name: project.status === "fulfilled" ? project.value.display_name : displayName,
128
+ workspace_root: workspaceRoot,
90
129
  endpoint: endpoint.base_url,
91
130
  };
92
131
  if (provider.status === "fulfilled") {
@@ -109,6 +109,14 @@ export declare const HOST_PROJECT_COLLABORATION_OPENAPI_ROUTES: ({
109
109
  open_questions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
110
110
  task_changes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
111
111
  submitted_at: import("@sinclair/typebox").TString;
112
+ compiled_tasks: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
113
+ task_id: import("@sinclair/typebox").TString;
114
+ title: import("@sinclair/typebox").TString;
115
+ summary: import("@sinclair/typebox").TString;
116
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"todo">, import("@sinclair/typebox").TLiteral<"running">, import("@sinclair/typebox").TLiteral<"pending">, import("@sinclair/typebox").TLiteral<"done">, import("@sinclair/typebox").TLiteral<"failed">]>;
117
+ module_id: import("@sinclair/typebox").TString;
118
+ module_name: import("@sinclair/typebox").TString;
119
+ }>>>;
112
120
  }>>;
113
121
  }>;
114
122
  contentType?: never;
@@ -969,6 +969,14 @@ export declare const HOST_PROJECT_WORKSPACE_OPENAPI_ROUTES: ({
969
969
  open_questions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
970
970
  task_changes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
971
971
  submitted_at: import("@sinclair/typebox").TString;
972
+ compiled_tasks: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
973
+ task_id: import("@sinclair/typebox").TString;
974
+ title: import("@sinclair/typebox").TString;
975
+ summary: import("@sinclair/typebox").TString;
976
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"todo">, import("@sinclair/typebox").TLiteral<"running">, import("@sinclair/typebox").TLiteral<"pending">, import("@sinclair/typebox").TLiteral<"done">, import("@sinclair/typebox").TLiteral<"failed">]>;
977
+ module_id: import("@sinclair/typebox").TString;
978
+ module_name: import("@sinclair/typebox").TString;
979
+ }>>>;
972
980
  }>>;
973
981
  }>;
974
982
  readonly worklist: import("@sinclair/typebox").TObject<{
@@ -271,6 +271,14 @@ export declare const HOST_PROJECT_OPENAPI_ROUTES: ({
271
271
  open_questions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
272
272
  task_changes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
273
273
  submitted_at: import("@sinclair/typebox").TString;
274
+ compiled_tasks: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
275
+ task_id: import("@sinclair/typebox").TString;
276
+ title: import("@sinclair/typebox").TString;
277
+ summary: import("@sinclair/typebox").TString;
278
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"todo">, import("@sinclair/typebox").TLiteral<"running">, import("@sinclair/typebox").TLiteral<"pending">, import("@sinclair/typebox").TLiteral<"done">, import("@sinclair/typebox").TLiteral<"failed">]>;
279
+ module_id: import("@sinclair/typebox").TString;
280
+ module_name: import("@sinclair/typebox").TString;
281
+ }>>>;
274
282
  }>>;
275
283
  }>;
276
284
  contentType?: never;
@@ -2226,6 +2234,14 @@ export declare const HOST_PROJECT_OPENAPI_ROUTES: ({
2226
2234
  open_questions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
2227
2235
  task_changes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
2228
2236
  submitted_at: import("@sinclair/typebox").TString;
2237
+ compiled_tasks: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
2238
+ task_id: import("@sinclair/typebox").TString;
2239
+ title: import("@sinclair/typebox").TString;
2240
+ summary: import("@sinclair/typebox").TString;
2241
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"todo">, import("@sinclair/typebox").TLiteral<"running">, import("@sinclair/typebox").TLiteral<"pending">, import("@sinclair/typebox").TLiteral<"done">, import("@sinclair/typebox").TLiteral<"failed">]>;
2242
+ module_id: import("@sinclair/typebox").TString;
2243
+ module_name: import("@sinclair/typebox").TString;
2244
+ }>>>;
2229
2245
  }>>;
2230
2246
  }>;
2231
2247
  readonly worklist: import("@sinclair/typebox").TObject<{
@@ -951,6 +951,14 @@ export declare const BootstrapResponseSchema: {
951
951
  open_questions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
952
952
  task_changes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
953
953
  submitted_at: import("@sinclair/typebox").TString;
954
+ compiled_tasks: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
955
+ task_id: import("@sinclair/typebox").TString;
956
+ title: import("@sinclair/typebox").TString;
957
+ summary: import("@sinclair/typebox").TString;
958
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"todo">, import("@sinclair/typebox").TLiteral<"running">, import("@sinclair/typebox").TLiteral<"pending">, import("@sinclair/typebox").TLiteral<"done">, import("@sinclair/typebox").TLiteral<"failed">]>;
959
+ module_id: import("@sinclair/typebox").TString;
960
+ module_name: import("@sinclair/typebox").TString;
961
+ }>>>;
954
962
  }>>;
955
963
  }>;
956
964
  readonly worklist: import("@sinclair/typebox").TObject<{
@@ -526,6 +526,20 @@ export declare const SendClarificationRoundMessageResultSchema: import("@sinclai
526
526
  blocked_reason: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"binary">, import("@sinclair/typebox").TLiteral<"too_large">, import("@sinclair/typebox").TLiteral<"unsupported_encoding">, import("@sinclair/typebox").TLiteral<"restricted_path">, import("@sinclair/typebox").TLiteral<"secret_like">, import("@sinclair/typebox").TLiteral<"unknown">]>>;
527
527
  }>;
528
528
  }>>;
529
+ worklist_compile: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
530
+ kind: import("@sinclair/typebox").TLiteral<"worklist_compile">;
531
+ workflow_ref: import("@sinclair/typebox").TString;
532
+ title: import("@sinclair/typebox").TString;
533
+ task_count: import("@sinclair/typebox").TInteger;
534
+ tasks: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
535
+ task_id: import("@sinclair/typebox").TString;
536
+ title: import("@sinclair/typebox").TString;
537
+ summary: import("@sinclair/typebox").TString;
538
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"todo">, import("@sinclair/typebox").TLiteral<"running">, import("@sinclair/typebox").TLiteral<"pending">, import("@sinclair/typebox").TLiteral<"done">, import("@sinclair/typebox").TLiteral<"failed">]>;
539
+ module_id: import("@sinclair/typebox").TString;
540
+ module_name: import("@sinclair/typebox").TString;
541
+ }>>;
542
+ }>>;
529
543
  worklist_feedback: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
530
544
  kind: import("@sinclair/typebox").TLiteral<"worklist_terminal">;
531
545
  status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"completed">, import("@sinclair/typebox").TLiteral<"failed">]>;
@@ -555,6 +569,13 @@ export declare const SendClarificationRoundMessageResultSchema: import("@sinclai
555
569
  }>>>;
556
570
  primary_task_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
557
571
  }>>;
572
+ artifact_preview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
573
+ kind: import("@sinclair/typebox").TLiteral<"artifact_preview">;
574
+ title: import("@sinclair/typebox").TString;
575
+ status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"available">, import("@sinclair/typebox").TLiteral<"updated">]>;
576
+ task_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
577
+ run_result_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
578
+ }>>;
558
579
  }>>;
559
580
  clarification_card: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
560
581
  thread_id: import("@sinclair/typebox").TString;
@@ -6,8 +6,8 @@ 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, WorklistFeedbackItemSchema, WorklistFeedbackGeneratedFileSchema, WorklistFeedbackRefSchema, } from "./messages.js";
10
- export { CheckSkipReasonCodeSchema, ExternalSideEffectSummaryProjectionSchema, GetRecoverySummariesRequestSchema, GetRecoverySummariesResponseSchema, GetRecoverySummaryResponseSchema, RecoverySummaryProjectionSchema, ResultAnchorSchema, RunLineageSchema, RunResultProjectionSchema, ScratchpadProjectionSchema, ScratchpadReceiptProjectionSchema, TaskContractProjectionSchema, TaskDetailProjectionSchema, TaskDetailResultProjectionSchema, TaskModuleProjectionSchema, TaskProjectionSchema, TaskRunResultsPageSchema, TaskStatusSchema, WorklistProjectionSchema, } from "./work-items.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";
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";
13
13
  export { GetProjectDocRequestSchema, GetProjectDocResponseSchema, GetProjectDocsResponseSchema, GetReferenceFilesRequestSchema, GetReferenceFilesResponseSchema, GetViewerAssetRequestSchema, GetViewerFileRequestSchema, GetViewerFileResponseSchema, GetViewerTreeRequestSchema, GetViewerTreeResponseSchema, ProjectDocKeySchema, ProjectDocParamsSchema, ProjectDocSummaryProjectionSchema, ReferenceDirectoryProjectionSchema, ReferenceFileProjectionSchema, ReferenceSummaryProjectionSchema, ReferenceTextReadBlockedReasonSchema, RefreshReferenceSummariesBodySchema, RefreshReferenceSummariesDispositionSchema, RefreshReferenceSummariesPayloadSchema, RefreshReferenceSummariesResponseSchema, RefreshReferenceSummariesResultSchema, UploadReferenceFileBodySchema, UploadReferenceFileDispositionSchema, UploadReferenceFilePayloadSchema, UploadReferenceFileResponseSchema, UploadReferenceFileResultSchema, ViewerAssetVariantSchema, ViewerFileContentProjectionSchema, ViewerFileProjectionSchema, ViewerPageSchema, ViewerPathSchema, ViewerRepoSnapshotSchema, ViewerTreeEntryProjectionSchema, ViewerTreeTextReadBlockedReasonSchema, ViewerUnreadableReasonSchema, } from "./viewer-reference.js";