@xfey/tutti 0.1.28 → 0.1.30
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/README.md +1 -1
- package/dist/collaboration-state/index.d.ts +1 -1
- package/dist/collaboration-state/index.js +1 -1
- package/dist/collaboration-state/messages.d.ts +1 -0
- package/dist/collaboration-state/messages.js +12 -0
- package/dist/control-plane/index.d.ts +0 -1
- package/dist/control-plane/index.js +16 -49
- package/dist/control-plane/task-compile-output.js +2 -54
- package/dist/control-plane/worklist-terminal-feedback.d.ts +9 -1
- package/dist/control-plane/worklist-terminal-feedback.js +99 -1
- package/dist/server-shell/cli/args.d.ts +9 -0
- package/dist/server-shell/cli/args.js +55 -5
- package/dist/server-shell/cli/cli.js +46 -7
- package/dist/server-shell/cli/errors.d.ts +1 -1
- package/dist/server-shell/cli/errors.js +6 -1
- package/dist/server-shell/cli/host-lifecycle.d.ts +1 -0
- package/dist/server-shell/cli/host-lifecycle.js +155 -41
- package/dist/server-shell/cli/host-relay-connection-manager.d.ts +50 -0
- package/dist/server-shell/cli/host-relay-connection-manager.js +447 -0
- package/dist/server-shell/cli/host-relay-status.d.ts +4 -0
- package/dist/server-shell/cli/host-relay-status.js +74 -15
- package/dist/server-shell/cli/host-runtime-endpoint.js +26 -0
- package/dist/server-shell/cli/host-server-runtime.d.ts +2 -2
- package/dist/server-shell/cli/host-server-runtime.js +19 -15
- package/dist/server-shell/cli/launch-command.d.ts +1 -0
- package/dist/server-shell/cli/launch-command.js +8 -10
- package/dist/server-shell/cli/launch.d.ts +1 -0
- package/dist/server-shell/cli/launch.js +7 -3
- package/dist/server-shell/cli/local-control-client.d.ts +5 -0
- package/dist/server-shell/cli/local-control-client.js +9 -0
- package/dist/server-shell/cli/machine-local.d.ts +8 -0
- package/dist/server-shell/cli/machine-local.js +29 -0
- package/dist/server-shell/cli/machine-project-inspector.d.ts +81 -0
- package/dist/server-shell/cli/machine-project-inspector.js +205 -0
- package/dist/server-shell/cli/project-resolver.js +22 -32
- package/dist/server-shell/cli/relay-registration.d.ts +5 -2
- package/dist/server-shell/cli/relay-registration.js +7 -3
- package/dist/server-shell/cli/runtime-commands.d.ts +30 -4
- package/dist/server-shell/cli/runtime-commands.js +230 -113
- package/dist/server-shell/http/routes/local-control.d.ts +10 -0
- package/dist/server-shell/http/routes/local-control.js +29 -0
- package/migrations/README.md +1 -1
- package/node_modules/@tutti/relay-client/dist/host-control.d.ts +23 -0
- package/node_modules/@tutti/relay-client/dist/host-control.js +70 -3
- package/node_modules/@tutti/relay-client/dist/tunnel-types.d.ts +6 -2
- package/node_modules/@tutti/relay-client/dist/tunnel.js +13 -2
- package/node_modules/@tutti/shared/dist/schemas/api/clarifications.d.ts +21 -0
- 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 +105 -0
- package/node_modules/@tutti/shared/dist/schemas/api/messages.js +16 -0
- package/node_modules/@tutti/shared/dist/schemas/api/types.d.ts +2 -1
- package/node_modules/@tutti/shared/dist/schemas/api/viewer-reference.d.ts +21 -0
- package/package.json +1 -1
- package/prompts/prompt-flow-map.md +1 -1
- package/prompts/runs/README.md +1 -1
- package/prompts/runs/task-continuation.md +1 -1
- package/prompts/runs/task-retry.md +1 -1
- package/prompts/runs/task-run.md +1 -1
- package/web/assets/index-BHRlhFwi.css +1 -0
- package/web/assets/index-DPU2uqZl.js +29 -0
- package/web/index.html +2 -2
- package/web/assets/index-CeGTRkQn.css +0 -1
- package/web/assets/index-DGnDFv9O.js +0 -29
|
@@ -20,6 +20,9 @@ function registrationUrl(relayUrl) {
|
|
|
20
20
|
function joinTokenUrl(relayUrl) {
|
|
21
21
|
return new URL("/host-control/v1/join-token", relayUrl);
|
|
22
22
|
}
|
|
23
|
+
function archiveProjectUrl(relayUrl) {
|
|
24
|
+
return new URL("/host-control/v1/projects/archive", relayUrl);
|
|
25
|
+
}
|
|
23
26
|
function uploadResolveUrl(relayUrl) {
|
|
24
27
|
return new URL("/host-control/v1/uploads/resolve", relayUrl);
|
|
25
28
|
}
|
|
@@ -82,6 +85,19 @@ function createRefreshJoinTokenPayload(options) {
|
|
|
82
85
|
}
|
|
83
86
|
return payload;
|
|
84
87
|
}
|
|
88
|
+
function createArchiveRelayProjectPayload(options) {
|
|
89
|
+
return {
|
|
90
|
+
project_identity: {
|
|
91
|
+
source: "git_config",
|
|
92
|
+
project_id: options.projectId,
|
|
93
|
+
},
|
|
94
|
+
relay_project_ref: options.relayProjectRef,
|
|
95
|
+
host_auth: {
|
|
96
|
+
kind: "host_registration_secret_v1",
|
|
97
|
+
secret: options.hostRegistrationSecret,
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
}
|
|
85
101
|
function createResolveRelayUploadPayload(options) {
|
|
86
102
|
return {
|
|
87
103
|
project_identity: {
|
|
@@ -116,7 +132,7 @@ function relayErrorCodeFromBody(value) {
|
|
|
116
132
|
}
|
|
117
133
|
return stringField(value.error, "code");
|
|
118
134
|
}
|
|
119
|
-
async function fetchWithTimeout(fetchImpl, url, init, timeoutMs) {
|
|
135
|
+
async function fetchWithTimeout(fetchImpl, url, init, timeoutMs, externalSignal) {
|
|
120
136
|
const controller = new AbortController();
|
|
121
137
|
const timeout = setTimeout(() => {
|
|
122
138
|
controller.abort();
|
|
@@ -124,7 +140,9 @@ async function fetchWithTimeout(fetchImpl, url, init, timeoutMs) {
|
|
|
124
140
|
try {
|
|
125
141
|
return await fetchImpl(url, {
|
|
126
142
|
...init,
|
|
127
|
-
signal:
|
|
143
|
+
signal: externalSignal === undefined
|
|
144
|
+
? controller.signal
|
|
145
|
+
: AbortSignal.any([controller.signal, externalSignal]),
|
|
128
146
|
});
|
|
129
147
|
}
|
|
130
148
|
finally {
|
|
@@ -147,6 +165,21 @@ function assertRefreshJoinTokenResponse(value) {
|
|
|
147
165
|
}
|
|
148
166
|
return value;
|
|
149
167
|
}
|
|
168
|
+
function assertArchiveRelayProjectResponse(value) {
|
|
169
|
+
if (!isRecord(value) ||
|
|
170
|
+
stringField(value, "command_id") === undefined ||
|
|
171
|
+
!isRecord(value.disposition)) {
|
|
172
|
+
throw new RelayHostControlClientError("relay_registration_failed", "Relay project archive response is invalid", false);
|
|
173
|
+
}
|
|
174
|
+
const kind = stringField(value.disposition, "kind");
|
|
175
|
+
if (kind !== "archived" && kind !== "already_archived" && kind !== "interrupted") {
|
|
176
|
+
throw new RelayHostControlClientError("relay_registration_failed", "Relay project archive disposition is invalid", false);
|
|
177
|
+
}
|
|
178
|
+
if (kind === "interrupted" && value.disposition.retry_with_new_command_id !== true) {
|
|
179
|
+
throw new RelayHostControlClientError("relay_registration_failed", "Relay project archive disposition is invalid", false);
|
|
180
|
+
}
|
|
181
|
+
return value;
|
|
182
|
+
}
|
|
150
183
|
function assertResolveRelayUploadResponse(value) {
|
|
151
184
|
if (!isRecord(value) || !isRecord(value.upload) || !isRecord(value.get)) {
|
|
152
185
|
throw new RelayHostControlClientError("relay_registration_failed", "Relay upload resolve response is invalid", false);
|
|
@@ -176,7 +209,7 @@ export async function registerRelayHostConnection(options) {
|
|
|
176
209
|
issued_at: issuedAt.toISOString(),
|
|
177
210
|
payload: createRegisterPayload(options),
|
|
178
211
|
}),
|
|
179
|
-
}, options.timeoutMs ?? DEFAULT_TIMEOUT_MS);
|
|
212
|
+
}, options.timeoutMs ?? DEFAULT_TIMEOUT_MS, options.signal);
|
|
180
213
|
}
|
|
181
214
|
catch {
|
|
182
215
|
throw new RelayHostControlClientError("relay_unavailable", `Cannot reach Relay at ${options.relayUrl}`, true);
|
|
@@ -223,6 +256,40 @@ export async function refreshRelayJoinToken(options) {
|
|
|
223
256
|
}
|
|
224
257
|
return assertRefreshJoinTokenResponse(await response.json());
|
|
225
258
|
}
|
|
259
|
+
export async function archiveRelayProject(options) {
|
|
260
|
+
const fetchImpl = options.fetch ?? fetch;
|
|
261
|
+
const commandId = options.commandId ?? createIdempotencyKey();
|
|
262
|
+
const issuedAt = options.issuedAt ?? new Date();
|
|
263
|
+
let response;
|
|
264
|
+
try {
|
|
265
|
+
response = await fetchWithTimeout(fetchImpl, archiveProjectUrl(options.relayUrl), {
|
|
266
|
+
method: "POST",
|
|
267
|
+
headers: {
|
|
268
|
+
accept: "application/json",
|
|
269
|
+
"content-type": "application/json",
|
|
270
|
+
},
|
|
271
|
+
body: JSON.stringify({
|
|
272
|
+
command_id: commandId,
|
|
273
|
+
issued_at: issuedAt.toISOString(),
|
|
274
|
+
payload: createArchiveRelayProjectPayload(options),
|
|
275
|
+
}),
|
|
276
|
+
}, options.timeoutMs ?? DEFAULT_TIMEOUT_MS);
|
|
277
|
+
}
|
|
278
|
+
catch {
|
|
279
|
+
throw new RelayHostControlClientError("relay_unavailable", `Cannot reach Relay at ${options.relayUrl}`, true);
|
|
280
|
+
}
|
|
281
|
+
if (!response.ok) {
|
|
282
|
+
let relayErrorCode;
|
|
283
|
+
try {
|
|
284
|
+
relayErrorCode = relayErrorCodeFromBody(await response.json());
|
|
285
|
+
}
|
|
286
|
+
catch {
|
|
287
|
+
relayErrorCode = undefined;
|
|
288
|
+
}
|
|
289
|
+
throw new RelayHostControlClientError(response.status >= 500 ? "relay_unavailable" : "relay_registration_failed", `Relay project archive failed with HTTP ${response.status}`, response.status >= 500, response.status, relayErrorCode);
|
|
290
|
+
}
|
|
291
|
+
return assertArchiveRelayProjectResponse(await response.json());
|
|
292
|
+
}
|
|
226
293
|
export async function resolveRelayUpload(options) {
|
|
227
294
|
const fetchImpl = options.fetch ?? fetch;
|
|
228
295
|
const response = await (async () => {
|
|
@@ -35,7 +35,7 @@ export type RelayHostTunnelStreamRequestHandler = (request: RelayHostTunnelReque
|
|
|
35
35
|
export type RelayHostTunnelWebSocketLike = {
|
|
36
36
|
on(event: "open", listener: () => void): void;
|
|
37
37
|
on(event: "message", listener: (data: unknown) => void): void;
|
|
38
|
-
on(event: "close", listener: () => void): void;
|
|
38
|
+
on(event: "close", listener: (code?: number, reason?: unknown) => void): void;
|
|
39
39
|
on(event: "error", listener: (error: unknown) => void): void;
|
|
40
40
|
send(data: string, callback?: (error?: Error) => void): void;
|
|
41
41
|
close(code?: number, reason?: string): void;
|
|
@@ -46,9 +46,13 @@ export type RelayHostTunnelConnector = (options: {
|
|
|
46
46
|
}) => RelayHostTunnelWebSocketLike;
|
|
47
47
|
export type RelayHostTunnelHandle = {
|
|
48
48
|
connected: Promise<void>;
|
|
49
|
-
closed: Promise<
|
|
49
|
+
closed: Promise<RelayHostTunnelCloseResult>;
|
|
50
50
|
close: (code?: number, reason?: string) => void;
|
|
51
51
|
};
|
|
52
|
+
export type RelayHostTunnelCloseResult = {
|
|
53
|
+
code?: number;
|
|
54
|
+
reason?: string;
|
|
55
|
+
};
|
|
52
56
|
export type ConnectRelayHostTunnelOptions = {
|
|
53
57
|
tunnelUrl: string;
|
|
54
58
|
relayProjectRef: RelayProjectRef;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
+
import { redactAndTruncateText } from "@tutti/shared/utils";
|
|
2
3
|
import { chunkToBase64, internalErrorResponse, parseHostRequestFrame, parseHostStreamCancelFrame, sendFrame, sendResponse, } from "./tunnel-frames.js";
|
|
3
4
|
const loadNativeModule = createRequire(import.meta.url);
|
|
4
5
|
function defaultConnector(options) {
|
|
@@ -123,7 +124,7 @@ export function connectRelayHostTunnel(options) {
|
|
|
123
124
|
rejectConnected(error instanceof Error ? error : new Error("Relay host tunnel failed"));
|
|
124
125
|
}
|
|
125
126
|
});
|
|
126
|
-
socket.on("close", () => {
|
|
127
|
+
socket.on("close", (code, reason) => {
|
|
127
128
|
for (const controller of streamControllers.values()) {
|
|
128
129
|
controller.abort();
|
|
129
130
|
}
|
|
@@ -131,7 +132,17 @@ export function connectRelayHostTunnel(options) {
|
|
|
131
132
|
if (!connectedSettled) {
|
|
132
133
|
rejectConnected(new Error("Relay host tunnel closed before it opened"));
|
|
133
134
|
}
|
|
134
|
-
|
|
135
|
+
const normalizedReason = typeof reason === "string"
|
|
136
|
+
? reason
|
|
137
|
+
: Buffer.isBuffer(reason)
|
|
138
|
+
? reason.toString("utf8")
|
|
139
|
+
: undefined;
|
|
140
|
+
resolveClosed({
|
|
141
|
+
...(code === undefined ? {} : { code }),
|
|
142
|
+
...(normalizedReason === undefined || normalizedReason === ""
|
|
143
|
+
? {}
|
|
144
|
+
: { reason: redactAndTruncateText(normalizedReason, 120) }),
|
|
145
|
+
});
|
|
135
146
|
});
|
|
136
147
|
return {
|
|
137
148
|
connected,
|
|
@@ -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({
|
|
@@ -6,7 +6,7 @@ import type { ProviderUsageBreakdownProjectionSchema, ProviderUsageCategorySchem
|
|
|
6
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
|
-
import type { GetMessagesRequestSchema, MessageCreatedEventPayloadSchema, MessageProjectionSchema, MessageReferenceFileRefSchema, ReferenceFileCategorySchema, SendMainChatMessageCreatedDispositionSchema, SendMainChatMessageDispositionSchema, SendMainChatMessagePayloadSchema, SendMainChatMessageResultSchema, ArtifactPreviewRefSchema, WorklistCompileRefSchema, WorklistFeedbackGeneratedFileSchema, WorklistFeedbackItemSchema, WorklistFeedbackRefSchema } from "./messages.js";
|
|
9
|
+
import type { GetMessagesRequestSchema, MessageCreatedEventPayloadSchema, MessageProjectionSchema, MessageReferenceFileRefSchema, ReferenceFileCategorySchema, SendMainChatMessageCreatedDispositionSchema, SendMainChatMessageDispositionSchema, SendMainChatMessagePayloadSchema, SendMainChatMessageResultSchema, ArtifactPreviewRefSchema, TaskResultRefSchema, WorklistCompileRefSchema, WorklistFeedbackGeneratedFileSchema, WorklistFeedbackItemSchema, WorklistFeedbackRefSchema } from "./messages.js";
|
|
10
10
|
import type { CheckSkipReasonCodeSchema, ExternalSideEffectSummaryProjectionSchema, GetRecoverySummariesRequestSchema, GetRecoverySummaryResponseSchema, RecoverySummaryProjectionSchema, RunResultProjectionSchema, ScratchpadProjectionSchema, ScratchpadReceiptProjectionSchema, TaskContractProjectionSchema, TaskDetailProjectionSchema, TaskDetailResultProjectionSchema, TaskModuleProjectionSchema, TaskProjectionSchema, TaskStatusSchema, WorklistCompiledTaskSummarySchema, WorklistProjectionSchema } from "./work-items.js";
|
|
11
11
|
import type { ActiveApprovalProjectionSchema, ApprovalCommandProjectionSchema, ApprovalDecisionKindSchema, ApprovalDecisionOptionProjectionSchema, ApprovalFileChangeProjectionSchema, ApprovalPermissionsProjectionSchema, ApprovalRequestKindSchema, ApprovalRequestProjectionSchema, ApprovalResolutionOutcomeSchema, ApprovalResolutionProjectionSchema, DecideApprovalDispositionSchema, DecideApprovalPayloadSchema, DecideApprovalResultSchema } from "./approvals.js";
|
|
12
12
|
import type { ActiveClarificationProjectionSchema, ClarificationChangedEventPayloadSchema, ClarificationOwnerProjectionSchema, ClarificationRequestPayloadSchema, ClarificationRoundProjectionSchema, ClarificationRoundSummaryProjectionSchema, ClarificationSuccessorRefSchema, ClarificationThreadProjectionSchema, ContextRefSchema, GetClarificationRoundMessagesRequestSchema, GetClarificationRoundResponseSchema, GetClarificationThreadResponseSchema, HumanInteractionPayloadSchema, HumanRequestPayloadSchema, SendClarificationRoundMessageDispositionSchema, SendClarificationRoundMessagePayloadSchema, SendClarificationRoundMessageResultSchema, SubmitClarificationRoundDispositionSchema, SubmitClarificationRoundPayloadSchema, SubmitClarificationRoundResultSchema } from "./clarifications.js";
|
|
@@ -104,6 +104,7 @@ export type MessageReferenceFileRef = Static<typeof MessageReferenceFileRefSchem
|
|
|
104
104
|
export type WorklistCompiledTaskSummary = Static<typeof WorklistCompiledTaskSummarySchema>;
|
|
105
105
|
export type WorklistCompileRef = Static<typeof WorklistCompileRefSchema>;
|
|
106
106
|
export type ArtifactPreviewRef = Static<typeof ArtifactPreviewRefSchema>;
|
|
107
|
+
export type TaskResultRef = Static<typeof TaskResultRefSchema>;
|
|
107
108
|
export type WorklistFeedbackItem = Static<typeof WorklistFeedbackItemSchema>;
|
|
108
109
|
export type WorklistFeedbackGeneratedFile = Static<typeof WorklistFeedbackGeneratedFileSchema>;
|
|
109
110
|
export type WorklistFeedbackRef = Static<typeof WorklistFeedbackRefSchema>;
|
|
@@ -467,6 +467,27 @@ export declare const UploadReferenceFileResultSchema: import("@sinclair/typebox"
|
|
|
467
467
|
}>>>;
|
|
468
468
|
primary_task_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
469
469
|
}>>;
|
|
470
|
+
task_result: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
471
|
+
kind: import("@sinclair/typebox").TLiteral<"task_result">;
|
|
472
|
+
status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"completed">, import("@sinclair/typebox").TLiteral<"failed">]>;
|
|
473
|
+
title: import("@sinclair/typebox").TString;
|
|
474
|
+
task_id: import("@sinclair/typebox").TString;
|
|
475
|
+
task_title: import("@sinclair/typebox").TString;
|
|
476
|
+
result_key: import("@sinclair/typebox").TString;
|
|
477
|
+
summary: import("@sinclair/typebox").TString;
|
|
478
|
+
module_name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
479
|
+
latest_run_result_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
480
|
+
activity_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
481
|
+
final_note: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
482
|
+
generated_files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
483
|
+
path: import("@sinclair/typebox").TString;
|
|
484
|
+
name: import("@sinclair/typebox").TString;
|
|
485
|
+
group: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
486
|
+
size_bytes: import("@sinclair/typebox").TInteger;
|
|
487
|
+
media_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
488
|
+
}>>>;
|
|
489
|
+
error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
490
|
+
}>>;
|
|
470
491
|
artifact_preview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
471
492
|
kind: import("@sinclair/typebox").TLiteral<"artifact_preview">;
|
|
472
493
|
title: import("@sinclair/typebox").TString;
|
package/package.json
CHANGED
|
@@ -127,7 +127,7 @@ launch / join
|
|
|
127
127
|
-> 可自纠 pipeline feedback 时在当前 Run 内部 retry
|
|
128
128
|
-> promotion
|
|
129
129
|
-> 如果 canonical Project Docs 被 promotion 修改,Project Brief 非阻塞尽力刷新
|
|
130
|
-
->
|
|
130
|
+
-> task result feedback
|
|
131
131
|
-> 当前 Worklist 全部 done 后阶段性 context_sync
|
|
132
132
|
-> Project Brief 尽力刷新
|
|
133
133
|
-> 回写状态 / 文档 / 下一轮讨论
|
package/prompts/runs/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Templates in this directory may describe task contracts, repo evidence, check ex
|
|
|
10
10
|
`task-run.md` allows `needs_human` only for human requirement decisions, non-secret context, or risk confirmation. Unusable candidates, ordinary missing diffs, or repo/tooling errors that prevent implementation should be returned as `failed` so the Run does not open task-bound clarification incorrectly. If the task contract does not require repository file changes, the output can use `completed_no_repo_changes`; otherwise a completed implementation is expected to produce a candidate diff. If the candidate is complete but Codex self-validation commands are unavailable or blocked, the task-run output should still be `completed`; Tutti checks are the authoritative validation gate.
|
|
11
11
|
Initial `task-run.md`, active `task-continuation.md`, and active pipeline `task-retry.md` receive only the compact task contract fields `title / goal / scope`; continuation adds the required `continuation` block, and pipeline self-correction retry adds the required `correction` block with only the previous failure summary, machine-generated reason code, correction guidance, and optional promotion failure summary. Provider-facing prompts do not receive task ids, task summaries, Run lineage, workflow anchors, changed paths, docs status, checks status, or the safety audit context entry.
|
|
12
12
|
All three Run templates use a slim mutually exclusive structured output schema under `result`: exactly one of `completed.{summary,user_note_candidate}`, `completed_no_repo_changes.{summary,user_note_candidate}`, `needs_human.{title,summary,request}`, or `failed.summary`. The `summary` is a concise, human-readable result note for project members who may not inspect the code. Completed branches also require `user_note_candidate`, which is either a short user-facing final-card sentence or `null`; it must not repeat `summary` or include file paths. Checks, docs, promotion, changed paths, and other Tutti status stay in structured fields derived by the Run pipeline. They do not ask Codex to self-report docs status or changed paths; both come from Run pipeline Git diff and derived projection.
|
|
13
|
-
Run templates describe `docs/reference/` as a user-visible file exchange area. Human uploads remain under `docs/reference/files/` and `docs/reference/images/`; `docs/reference/tutti/**` is for Tutti-generated files intended for direct member review in References, not temporary output, internal notes, logs, or canonical project documentation. Generated user-visible files must be written under `docs/reference/tutti/`, with `docs/reference/tutti/<meaningful-folder>/...` used when the folder name should be shown as a References UI group. Generated files under `docs/reference/tutti/` are discovered from promoted changed paths, rendered by References automatically, and may be listed in
|
|
13
|
+
Run templates describe `docs/reference/` as a user-visible file exchange area. Human uploads remain under `docs/reference/files/` and `docs/reference/images/`; `docs/reference/tutti/**` is for Tutti-generated files intended for direct member review in References, not temporary output, internal notes, logs, or canonical project documentation. Generated user-visible files must be written under `docs/reference/tutti/`, with `docs/reference/tutti/<meaningful-folder>/...` used when the folder name should be shown as a References UI group. Generated files under `docs/reference/tutti/` are discovered from promoted changed paths, rendered by References automatically, and may be listed in completed task result cards.
|
|
14
14
|
Initial `task-run.md`, active `task-continuation.md`, and active pipeline `task-retry.md` also instruct Codex to write or update the single active `tutti.artifact.json` manifest only when the task creates or updates a member-viewable visual artifact. The manifest schema requires top-level `version: 1`; it must include a viewer-facing `artifact.title` and must set `artifact.network: true` when the preview loads remote browser resources. The manifest remains repo truth and is not reported through the structured output schema.
|
|
15
15
|
Active task-bound follow-up still only starts continuation Runs from `Run.needs_human`. Pipeline self-correction retry happens before a terminal Run result is recorded and does not open clarification.
|
|
16
16
|
Provider transient retry is separate from self-correction. If a retryable Codex app-server workspace-write failure occurs before usable structured output, Run pipeline may rerun the same prompt family once in a fresh run workspace: initial Runs stay on `task-run.md`, continuation Runs stay on `task-continuation.md`, and self-correction attempts stay on `task-retry.md`. This retry does not add `RunCorrectionContext` unless the failed attempt was already a self-correction attempt.
|
|
@@ -64,7 +64,7 @@ Human-uploaded reference material is kept in the repository under `docs/referenc
|
|
|
64
64
|
- Use `docs/reference/tutti/**` for reviewable deliverables such as reports, notes, specs, exports, or similar generated files.
|
|
65
65
|
- Do not use `docs/reference/tutti/**` for temporary output, internal notes, logs, or canonical project documentation.
|
|
66
66
|
|
|
67
|
-
When this task explicitly produces such a file deliverable, write it under `docs/reference/tutti/`. Use `docs/reference/tutti/<meaningful-folder>/...` when a folder name helps explain the output group; that folder name is shown directly in the References UI and promoted files may be listed in
|
|
67
|
+
When this task explicitly produces such a file deliverable, write it under `docs/reference/tutti/`. Use `docs/reference/tutti/<meaningful-folder>/...` when a folder name helps explain the output group; that folder name is shown directly in the References UI and promoted files may be listed in completed task result cards. Do not create ad hoc folders at the `docs/reference/` root. Files under `docs/reference/tutti/` are displayed automatically, so `user_note_candidate` may mention generated file names but should not include paths.
|
|
68
68
|
|
|
69
69
|
# Documentation
|
|
70
70
|
|
|
@@ -69,7 +69,7 @@ Human-uploaded reference material is kept in the repository under `docs/referenc
|
|
|
69
69
|
- Use `docs/reference/tutti/**` for reviewable deliverables such as reports, notes, specs, exports, or similar generated files.
|
|
70
70
|
- Do not use `docs/reference/tutti/**` for temporary output, internal notes, logs, or canonical project documentation.
|
|
71
71
|
|
|
72
|
-
When this task explicitly produces such a file deliverable, write it under `docs/reference/tutti/`. Use `docs/reference/tutti/<meaningful-folder>/...` when a folder name helps explain the output group; that folder name is shown directly in the References UI and promoted files may be listed in
|
|
72
|
+
When this task explicitly produces such a file deliverable, write it under `docs/reference/tutti/`. Use `docs/reference/tutti/<meaningful-folder>/...` when a folder name helps explain the output group; that folder name is shown directly in the References UI and promoted files may be listed in completed task result cards. Do not create ad hoc folders at the `docs/reference/` root. Files under `docs/reference/tutti/` are displayed automatically, so `user_note_candidate` may mention generated file names but should not include paths.
|
|
73
73
|
|
|
74
74
|
# Documentation
|
|
75
75
|
|
package/prompts/runs/task-run.md
CHANGED
|
@@ -51,7 +51,7 @@ Human-uploaded reference material is kept in the repository under `docs/referenc
|
|
|
51
51
|
- Use `docs/reference/tutti/**` for reviewable deliverables such as reports, notes, specs, exports, or similar generated files.
|
|
52
52
|
- Do not use `docs/reference/tutti/**` for temporary output, internal notes, logs, or canonical project documentation.
|
|
53
53
|
|
|
54
|
-
When this task explicitly produces such a file deliverable, write it under `docs/reference/tutti/`. Use `docs/reference/tutti/<meaningful-folder>/...` when a folder name helps explain the output group; that folder name is shown directly in the References UI and promoted files may be listed in
|
|
54
|
+
When this task explicitly produces such a file deliverable, write it under `docs/reference/tutti/`. Use `docs/reference/tutti/<meaningful-folder>/...` when a folder name helps explain the output group; that folder name is shown directly in the References UI and promoted files may be listed in completed task result cards. Do not create ad hoc folders at the `docs/reference/` root. Files under `docs/reference/tutti/` are displayed automatically, so `user_note_candidate` may mention generated file names but should not include paths.
|
|
55
55
|
|
|
56
56
|
# Documentation
|
|
57
57
|
|