@xfey/tutti 0.1.21 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/collaboration-state/index.d.ts +1 -1
- package/dist/collaboration-state/index.js +1 -1
- package/dist/collaboration-state/messages.js +50 -1
- package/dist/collaboration-state/scratchpad.d.ts +2 -0
- package/dist/collaboration-state/scratchpad.js +63 -0
- package/dist/collaboration-state/storage-types.d.ts +5 -0
- package/dist/collaboration-state/types.d.ts +8 -1
- package/dist/control-plane/scratchpad-refresh-start.d.ts +2 -0
- package/dist/control-plane/scratchpad-refresh-start.js +10 -0
- package/dist/control-plane/scratchpad-refresh.d.ts +2 -0
- package/dist/control-plane/scratchpad-refresh.js +1 -0
- package/dist/project-timeline/index.d.ts +17 -3
- package/dist/server-shell/http/routes/project-api/openapi-collaboration-routes.d.ts +1 -0
- package/dist/server-shell/http/routes/project-api/openapi-timeline-routes.d.ts +94 -5
- package/dist/server-shell/http/routes/project-api/openapi.d.ts +95 -5
- package/dist/server-shell/http/routes/project-api/payload-validation.d.ts +6 -2
- package/dist/server-shell/http/routes/project-api/payload-validation.js +3 -0
- package/dist/server-shell/http/routes/project-api/project-timeline-projection.js +694 -502
- package/migrations/0013_scratchpad_receipt_sources.sql +24 -0
- package/migrations/README.md +3 -2
- package/node_modules/@tutti/shared/dist/schemas/api/index.d.ts +1 -1
- package/node_modules/@tutti/shared/dist/schemas/api/index.js +1 -1
- package/node_modules/@tutti/shared/dist/schemas/api/messages.d.ts +1 -0
- package/node_modules/@tutti/shared/dist/schemas/api/messages.js +1 -0
- package/node_modules/@tutti/shared/dist/schemas/api/project-timeline.d.ts +313 -12
- package/node_modules/@tutti/shared/dist/schemas/api/project-timeline.js +131 -14
- package/node_modules/@tutti/shared/dist/schemas/api/types.d.ts +5 -1
- package/package.json +1 -1
- package/web/assets/index-BfFYfzeO.js +29 -0
- package/web/assets/index-De6mK5Q2.css +1 -0
- package/web/index.html +2 -2
- package/web/assets/index-BtneECwp.js +0 -29
- package/web/assets/index-CM9mbbeW.css +0 -1
|
@@ -1,23 +1,139 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
|
-
import { ActivityRefSchema, IsoDateTimeStringSchema, TaskIdSchema, WorkflowInvocationRefSchema, } from "../domain/index.js";
|
|
2
|
+
import { ActivityRefSchema, IsoDateTimeStringSchema, MessageIdSchema, RunResultIdSchema, TaskIdSchema, WorkflowInvocationRefSchema, } from "../domain/index.js";
|
|
3
3
|
import { ProviderUsageBreakdownProjectionSchema, ProviderUsageModelSummaryProjectionSchema, ProviderUsageProjectionSchema, ProviderUsageSourceSummaryProjectionSchema, } from "./provider-usage.js";
|
|
4
4
|
export const ProjectTimelineItemKindSchema = Type.Union([
|
|
5
|
-
Type.Literal("
|
|
6
|
-
Type.Literal("
|
|
7
|
-
Type.Literal("
|
|
8
|
-
Type.Literal("usage"),
|
|
9
|
-
Type.Literal("clarification"),
|
|
10
|
-
Type.Literal("checks"),
|
|
11
|
-
Type.Literal("promotion"),
|
|
12
|
-
Type.Literal("recovery"),
|
|
5
|
+
Type.Literal("task_accepted"),
|
|
6
|
+
Type.Literal("task_update"),
|
|
7
|
+
Type.Literal("checkpoint"),
|
|
13
8
|
]);
|
|
14
9
|
export const ProjectTimelineItemStatusSchema = Type.Union([
|
|
15
|
-
Type.Literal("running"),
|
|
16
10
|
Type.Literal("completed"),
|
|
17
11
|
Type.Literal("failed"),
|
|
18
12
|
Type.Literal("needs_human"),
|
|
19
|
-
Type.Literal("skipped"),
|
|
20
13
|
]);
|
|
14
|
+
export const ProjectTimelineTaskUpdateStateSchema = Type.Union([
|
|
15
|
+
Type.Literal("needs_input"),
|
|
16
|
+
Type.Literal("completed"),
|
|
17
|
+
Type.Literal("failed"),
|
|
18
|
+
]);
|
|
19
|
+
export const ProjectTimelineTraceToneSchema = Type.Union([
|
|
20
|
+
Type.Literal("neutral"),
|
|
21
|
+
Type.Literal("success"),
|
|
22
|
+
Type.Literal("warning"),
|
|
23
|
+
Type.Literal("error"),
|
|
24
|
+
]);
|
|
25
|
+
export const ProjectTimelineTraceLinkSchema = Type.Object({
|
|
26
|
+
kind: Type.Union([
|
|
27
|
+
Type.Literal("worklist_task"),
|
|
28
|
+
Type.Literal("chat_message"),
|
|
29
|
+
Type.Literal("reference_file"),
|
|
30
|
+
Type.Literal("repo_path"),
|
|
31
|
+
]),
|
|
32
|
+
label: Type.String({ minLength: 1 }),
|
|
33
|
+
task_id: Type.Optional(TaskIdSchema),
|
|
34
|
+
message_id: Type.Optional(MessageIdSchema),
|
|
35
|
+
path: Type.Optional(Type.String({ minLength: 1 })),
|
|
36
|
+
}, { additionalProperties: false });
|
|
37
|
+
export const ProjectTimelineSourceSnippetSchema = Type.Object({
|
|
38
|
+
message_id: MessageIdSchema,
|
|
39
|
+
author: Type.String({ minLength: 1 }),
|
|
40
|
+
body: Type.String(),
|
|
41
|
+
created_at: IsoDateTimeStringSchema,
|
|
42
|
+
}, { additionalProperties: false });
|
|
43
|
+
export const ProjectTimelineDecisionSummarySchema = Type.Object({
|
|
44
|
+
title: Type.Optional(Type.String({ minLength: 1 })),
|
|
45
|
+
summary: Type.String({ minLength: 1 }),
|
|
46
|
+
source: Type.Optional(Type.Union([
|
|
47
|
+
Type.Literal("scratchpad"),
|
|
48
|
+
Type.Literal("clarification"),
|
|
49
|
+
Type.Literal("contract"),
|
|
50
|
+
])),
|
|
51
|
+
}, { additionalProperties: false });
|
|
52
|
+
export const ProjectTimelineClarificationTraceSchema = Type.Object({
|
|
53
|
+
title: Type.Optional(Type.String({ minLength: 1 })),
|
|
54
|
+
summary: Type.Optional(Type.String()),
|
|
55
|
+
request: Type.Optional(Type.String()),
|
|
56
|
+
status: Type.Optional(Type.Union([Type.Literal("active"), Type.Literal("resolved")])),
|
|
57
|
+
answer_count: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
58
|
+
answers: Type.Optional(Type.Array(ProjectTimelineSourceSnippetSchema)),
|
|
59
|
+
}, { additionalProperties: false });
|
|
60
|
+
export const ProjectTimelineChangeStatusSchema = Type.Union([
|
|
61
|
+
Type.Literal("added"),
|
|
62
|
+
Type.Literal("modified"),
|
|
63
|
+
Type.Literal("deleted"),
|
|
64
|
+
Type.Literal("renamed"),
|
|
65
|
+
Type.Literal("unknown"),
|
|
66
|
+
]);
|
|
67
|
+
export const ProjectTimelineTraceCardSchema = Type.Object({
|
|
68
|
+
tone: ProjectTimelineTraceToneSchema,
|
|
69
|
+
summary: Type.Optional(Type.String()),
|
|
70
|
+
origin: Type.Optional(Type.Object({
|
|
71
|
+
title: Type.Optional(Type.String({ minLength: 1 })),
|
|
72
|
+
summary: Type.Optional(Type.String()),
|
|
73
|
+
snippets: Type.Optional(Type.Array(ProjectTimelineSourceSnippetSchema)),
|
|
74
|
+
source_count: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
75
|
+
unavailable_reason: Type.Optional(Type.String({ minLength: 1 })),
|
|
76
|
+
}, { additionalProperties: false })),
|
|
77
|
+
decisions: Type.Optional(Type.Array(ProjectTimelineDecisionSummarySchema)),
|
|
78
|
+
clarification: Type.Optional(ProjectTimelineClarificationTraceSchema),
|
|
79
|
+
contract: Type.Optional(Type.Object({
|
|
80
|
+
goal: Type.String(),
|
|
81
|
+
scope: Type.Array(Type.String()),
|
|
82
|
+
truncated: Type.Optional(Type.Boolean()),
|
|
83
|
+
}, { additionalProperties: false })),
|
|
84
|
+
result: Type.Optional(Type.Object({
|
|
85
|
+
summary: Type.String(),
|
|
86
|
+
error_code: Type.Optional(Type.String({ minLength: 1 })),
|
|
87
|
+
}, { additionalProperties: false })),
|
|
88
|
+
changes: Type.Optional(Type.Object({
|
|
89
|
+
items: Type.Array(Type.Object({
|
|
90
|
+
status: ProjectTimelineChangeStatusSchema,
|
|
91
|
+
path: Type.String({ minLength: 1 }),
|
|
92
|
+
previous_path: Type.Optional(Type.String({ minLength: 1 })),
|
|
93
|
+
}, { additionalProperties: false })),
|
|
94
|
+
total_count: Type.Integer({ minimum: 0 }),
|
|
95
|
+
truncated: Type.Boolean(),
|
|
96
|
+
}, { additionalProperties: false })),
|
|
97
|
+
verification: Type.Optional(Type.Object({
|
|
98
|
+
checks: Type.Union([
|
|
99
|
+
Type.Literal("passed"),
|
|
100
|
+
Type.Literal("failed"),
|
|
101
|
+
Type.Literal("skipped"),
|
|
102
|
+
]),
|
|
103
|
+
skip_reason_code: Type.Optional(Type.String({ minLength: 1 })),
|
|
104
|
+
skip_reason_summary: Type.Optional(Type.String()),
|
|
105
|
+
}, { additionalProperties: false })),
|
|
106
|
+
promotion: Type.Optional(Type.Object({
|
|
107
|
+
status: Type.Union([
|
|
108
|
+
Type.Literal("promoted"),
|
|
109
|
+
Type.Literal("not_promoted"),
|
|
110
|
+
Type.Literal("not_attempted"),
|
|
111
|
+
]),
|
|
112
|
+
commit_oid: Type.Optional(Type.String({ minLength: 1 })),
|
|
113
|
+
commit_short_oid: Type.Optional(Type.String({ minLength: 1 })),
|
|
114
|
+
summary: Type.Optional(Type.String()),
|
|
115
|
+
reason_code: Type.Optional(Type.String({ minLength: 1 })),
|
|
116
|
+
}, { additionalProperties: false })),
|
|
117
|
+
checkpoint: Type.Optional(Type.Object({
|
|
118
|
+
counters: Type.Object({
|
|
119
|
+
completed: Type.Integer({ minimum: 0 }),
|
|
120
|
+
failed: Type.Integer({ minimum: 0 }),
|
|
121
|
+
remaining: Type.Integer({ minimum: 0 }),
|
|
122
|
+
}, { additionalProperties: false }),
|
|
123
|
+
items: Type.Array(Type.Object({
|
|
124
|
+
task_id: TaskIdSchema,
|
|
125
|
+
title: Type.String({ minLength: 1 }),
|
|
126
|
+
status: Type.Union([Type.Literal("done"), Type.Literal("failed")]),
|
|
127
|
+
summary: Type.String(),
|
|
128
|
+
}, { additionalProperties: false })),
|
|
129
|
+
generated_files: Type.Optional(Type.Array(Type.Object({
|
|
130
|
+
path: Type.String({ minLength: 1 }),
|
|
131
|
+
name: Type.String({ minLength: 1 }),
|
|
132
|
+
}, { additionalProperties: false }))),
|
|
133
|
+
truncated: Type.Optional(Type.Boolean()),
|
|
134
|
+
}, { additionalProperties: false })),
|
|
135
|
+
links: Type.Array(ProjectTimelineTraceLinkSchema),
|
|
136
|
+
}, { additionalProperties: false });
|
|
21
137
|
export const ProjectTimelineItemSchema = Type.Object({
|
|
22
138
|
id: Type.String({ minLength: 1 }),
|
|
23
139
|
kind: ProjectTimelineItemKindSchema,
|
|
@@ -28,13 +144,14 @@ export const ProjectTimelineItemSchema = Type.Object({
|
|
|
28
144
|
task_title: Type.Optional(Type.String({ minLength: 1 })),
|
|
29
145
|
activity_ref: Type.Optional(ActivityRefSchema),
|
|
30
146
|
workflow_ref: Type.Optional(WorkflowInvocationRefSchema),
|
|
31
|
-
|
|
32
|
-
|
|
147
|
+
run_result_id: Type.Optional(RunResultIdSchema),
|
|
148
|
+
message_id: Type.Optional(MessageIdSchema),
|
|
33
149
|
status: Type.Optional(ProjectTimelineItemStatusSchema),
|
|
150
|
+
update_state: Type.Optional(ProjectTimelineTaskUpdateStateSchema),
|
|
34
151
|
token_usage: Type.Optional(ProviderUsageBreakdownProjectionSchema),
|
|
35
152
|
usage_sources: Type.Optional(Type.Array(ProviderUsageSourceSummaryProjectionSchema)),
|
|
36
153
|
usage_models: Type.Optional(Type.Array(ProviderUsageModelSummaryProjectionSchema)),
|
|
37
|
-
|
|
154
|
+
trace_card: Type.Optional(ProjectTimelineTraceCardSchema),
|
|
38
155
|
}, { additionalProperties: false });
|
|
39
156
|
export const ProjectTimelineResponseSchema = Type.Object({
|
|
40
157
|
generated_at: IsoDateTimeStringSchema,
|
|
@@ -3,7 +3,7 @@ import type { IdempotencyKeySchema, IsoDateTimeStringSchema } from "../domain/in
|
|
|
3
3
|
import type { ApiErrorCodeSchema, ApiErrorResponseSchema, CommandDispositionBaseSchema, CursorPageRequestSchema, InterruptedCommandDispositionSchema, QueryInvalidationHintSchema, RelayInvalidationHintSchema, RelaySseEventTypeSchema, SseReplayWindowPolicySchema, WorkspaceSseEventTypeSchema } from "./primitives.js";
|
|
4
4
|
import type { ProviderConfigInvalidReasonCodeSchema, ProviderConfigProjectionSchema, ProviderUnavailableReasonCodeSchema } from "./provider-config.js";
|
|
5
5
|
import type { ProviderUsageBreakdownProjectionSchema, ProviderUsageCategorySchema, ProviderUsageModelSummaryProjectionSchema, ProviderUsageProjectionSchema, ProviderUsageSourceSummaryProjectionSchema } from "./provider-usage.js";
|
|
6
|
-
import type { ProjectTimelineItemKindSchema, ProjectTimelineItemSchema, ProjectTimelineItemStatusSchema, ProjectTimelineResponseSchema } from "./project-timeline.js";
|
|
6
|
+
import type { ProjectTimelineItemKindSchema, ProjectTimelineItemSchema, ProjectTimelineItemStatusSchema, ProjectTimelineResponseSchema, ProjectTimelineTaskUpdateStateSchema, ProjectTimelineClarificationTraceSchema, ProjectTimelineTraceCardSchema, ProjectTimelineTraceLinkSchema } from "./project-timeline.js";
|
|
7
7
|
import type { PresignedUploadPutSchema, RelayUploadProjectionSchema, RelayUploadPurposeSchema, Sha256DigestSchema, StagedUploadReferenceSchema, StartRelayUploadDispositionSchema, StartRelayUploadPayloadSchema, StartRelayUploadResultSchema } from "./uploads.js";
|
|
8
8
|
import type { MarkReadDispositionSchema, MarkReadPayloadSchema, MarkReadResultSchema, ReadStateScopeProjectionSchema, ReadStateScopeSchema, ReadStateSummaryProjectionSchema } from "./read-state.js";
|
|
9
9
|
import type { GetMessagesRequestSchema, MessageCreatedEventPayloadSchema, MessageProjectionSchema, MessageReferenceFileRefSchema, ReferenceFileCategorySchema, SendMainChatMessageCreatedDispositionSchema, SendMainChatMessageDispositionSchema, SendMainChatMessagePayloadSchema, SendMainChatMessageResultSchema, WorklistFeedbackGeneratedFileSchema, WorklistFeedbackItemSchema, WorklistFeedbackRefSchema } from "./messages.js";
|
|
@@ -63,6 +63,10 @@ export type ProviderUsageModelSummaryProjection = Static<typeof ProviderUsageMod
|
|
|
63
63
|
export type ProviderUsageProjection = Static<typeof ProviderUsageProjectionSchema>;
|
|
64
64
|
export type ProjectTimelineItemKind = Static<typeof ProjectTimelineItemKindSchema>;
|
|
65
65
|
export type ProjectTimelineItemStatus = Static<typeof ProjectTimelineItemStatusSchema>;
|
|
66
|
+
export type ProjectTimelineTaskUpdateState = Static<typeof ProjectTimelineTaskUpdateStateSchema>;
|
|
67
|
+
export type ProjectTimelineClarificationTrace = Static<typeof ProjectTimelineClarificationTraceSchema>;
|
|
68
|
+
export type ProjectTimelineTraceCard = Static<typeof ProjectTimelineTraceCardSchema>;
|
|
69
|
+
export type ProjectTimelineTraceLink = Static<typeof ProjectTimelineTraceLinkSchema>;
|
|
66
70
|
export type ProjectTimelineItem = Static<typeof ProjectTimelineItemSchema>;
|
|
67
71
|
export type ProjectTimelineResponse = Static<typeof ProjectTimelineResponseSchema>;
|
|
68
72
|
export type ApprovalRequestKind = Static<typeof ApprovalRequestKindSchema>;
|