@xfey/tutti 0.1.127 → 0.1.128
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/approvals/decision-command.d.ts +2 -2
- package/dist/chat-assistant/diagnostics.d.ts +7 -2
- package/dist/chat-assistant/diagnostics.js +5 -2
- package/dist/chat-assistant/failures.d.ts +27 -0
- package/dist/chat-assistant/failures.js +102 -0
- package/dist/chat-assistant/index.d.ts +14 -2
- package/dist/chat-assistant/index.js +226 -48
- package/dist/chat-assistant/requests.d.ts +30 -0
- package/dist/chat-assistant/requests.js +58 -0
- package/dist/collaboration-ingestion/clarification.js +3 -1
- package/dist/collaboration-ingestion/main-chat.js +1 -0
- package/dist/collaboration-ingestion/types.d.ts +2 -0
- package/dist/collaboration-state/clarification-snapshot.d.ts +5 -5
- package/dist/collaboration-state/task-compile-context.d.ts +1 -1
- package/dist/collaboration-state/task-compile-context.js +11 -1
- package/dist/collaboration-state/task-compile-requests.d.ts +6 -0
- package/dist/collaboration-state/task-compile-requests.js +16 -0
- package/dist/control-plane/task-compile-continuation.js +2 -0
- package/dist/control-plane/task-compile-request-status.d.ts +6 -0
- package/dist/control-plane/task-compile-request-status.js +70 -0
- package/dist/control-plane/task-compile-start.js +40 -2
- package/dist/providers/failure-classification.d.ts +23 -0
- package/dist/providers/failure-classification.js +43 -0
- package/dist/reference-access/read-evidence.d.ts +2 -0
- package/dist/reference-access/read-evidence.js +5 -0
- package/dist/reference-access/service.d.ts +2 -0
- package/dist/reference-access/service.js +2 -0
- package/dist/runtime-failures.js +15 -1
- package/dist/server-shell/cli/external-reference-runtime.js +6 -3
- package/dist/server-shell/cli/host-server-runtime.js +4 -1
- package/dist/server-shell/cli/relay-registration.js +1 -0
- package/dist/server-shell/http/routes/project-api/messages-routes.js +22 -1
- package/dist/server-shell/http/routes/project-api/openapi-collaboration-routes.d.ts +140 -5
- package/dist/server-shell/http/routes/project-api/openapi-collaboration-routes.js +29 -2
- package/dist/server-shell/http/routes/project-api/openapi-skills-routes.d.ts +2 -0
- package/dist/server-shell/http/routes/project-api/openapi-workspace-routes.d.ts +6 -0
- package/dist/server-shell/http/routes/project-api/openapi.d.ts +148 -5
- package/dist/server-shell/http/routes/project-api/schemas.d.ts +6 -0
- package/dist/server-shell/http/routes/project-api/schemas.js +1 -0
- package/dist/server-shell/http/routes/project-api/types.d.ts +1 -0
- package/dist/server-shell/http/routes/project-api/workflow-routes.js +39 -3
- package/dist/server-shell/http/routes/project-api/workspace-projections.js +1 -0
- package/dist/server-shell/http/validation.js +8 -2
- package/dist/server-shell/local-console/managed-project-service.d.ts +1 -1
- package/dist/server-shell/managed-access/transport.d.ts +1 -1
- package/migrations/0024_chat_requests.sql +19 -0
- package/migrations/0025_task_compile_requests.sql +50 -0
- package/migrations/README.md +3 -1
- package/node_modules/@tutti/relay-client/dist/host-control.d.ts +1 -0
- package/node_modules/@tutti/relay-client/dist/host-control.js +1 -0
- package/node_modules/@tutti/shared/dist/schemas/api/index.d.ts +1 -0
- package/node_modules/@tutti/shared/dist/schemas/api/index.js +1 -0
- package/node_modules/@tutti/shared/dist/schemas/api/operation-status.d.ts +174 -0
- package/node_modules/@tutti/shared/dist/schemas/api/operation-status.js +75 -0
- package/node_modules/@tutti/shared/dist/schemas/api/primitives.d.ts +1 -0
- package/node_modules/@tutti/shared/dist/schemas/api/primitives.js +1 -0
- package/node_modules/@tutti/shared/dist/schemas/api/workspace-commands.d.ts +1 -0
- package/node_modules/@tutti/shared/dist/schemas/api/workspace-commands.js +2 -1
- package/package.json +1 -1
- package/web/assets/{homepage-motion-scene-DyEmWwvt.js → homepage-motion-scene-BcMt0AVW.js} +1 -1
- package/web/assets/index-2eX37Jx6.js +70 -0
- package/web/assets/index-BJvKuUiT.css +1 -0
- package/web/index.html +2 -2
- package/web/assets/index-By3idT4U.js +0 -70
- package/web/assets/index-DSBjOZmJ.css +0 -1
|
@@ -1,10 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Value } from "@sinclair/typebox/value";
|
|
2
|
+
import { HostProjectBadRequestError } from "./errors.js";
|
|
3
|
+
import { readTaskCompileRequestStatus, readTaskCompileCommandRef, } from "../../../../control-plane/task-compile-request-status.js";
|
|
4
|
+
import { RunSchedulerNowBodySchema, CurrentWorklistSubmissionSchema, WorklistSubmissionQuerySchema, RunSchedulerNowResponseSchema, ScratchpadProjectionSchema, SubmitWorklistBodySchema, SubmitWorklistResponseSchema, WorklistProjectionSchema, } from "@tutti/shared/schemas/api";
|
|
2
5
|
import { readScratchpadProjection, readWorklistProjection, } from "../../../../collaboration-state/index.js";
|
|
3
6
|
import { executeIdempotentCommand } from "../../../command-idempotency/index.js";
|
|
4
7
|
import { HOST_PROJECT_API_BASE_PATH } from "./constants.js";
|
|
5
|
-
import { schedulerRunNowInvalidates, worklistSubmitInvalidates
|
|
8
|
+
import { schedulerRunNowInvalidates, worklistSubmitInvalidates } from "./invalidations.js";
|
|
6
9
|
import { requireControlPlane, requireHostProjectSession, requireProjectStore, } from "./session-requirements.js";
|
|
7
10
|
export function registerWorkflowRoutes(app, options) {
|
|
11
|
+
app.get(`${HOST_PROJECT_API_BASE_PATH}/worklist/submission`, {
|
|
12
|
+
preValidation: (request, _reply, done) => done(Value.Check(WorklistSubmissionQuerySchema, request.query)
|
|
13
|
+
? undefined
|
|
14
|
+
: new HostProjectBadRequestError("Request status query is invalid")),
|
|
15
|
+
schema: {
|
|
16
|
+
querystring: WorklistSubmissionQuerySchema,
|
|
17
|
+
response: { 200: CurrentWorklistSubmissionSchema },
|
|
18
|
+
},
|
|
19
|
+
}, (request, reply) => {
|
|
20
|
+
requireHostProjectSession(request, options);
|
|
21
|
+
reply.header("cache-control", "no-store");
|
|
22
|
+
const db = requireProjectStore(options).db;
|
|
23
|
+
const ref = request.query.command_id === undefined
|
|
24
|
+
? request.query.workflow_ref
|
|
25
|
+
: readTaskCompileCommandRef(db, request.query.command_id);
|
|
26
|
+
return {
|
|
27
|
+
request: request.query.command_id !== undefined && ref === undefined
|
|
28
|
+
? null
|
|
29
|
+
: readTaskCompileRequestStatus(db, requireControlPlane(options).getExecutionStatus(), ref),
|
|
30
|
+
};
|
|
31
|
+
});
|
|
8
32
|
app.get(`${HOST_PROJECT_API_BASE_PATH}/scratchpad`, {
|
|
9
33
|
schema: {
|
|
10
34
|
response: {
|
|
@@ -43,7 +67,14 @@ export function registerWorkflowRoutes(app, options) {
|
|
|
43
67
|
target_ref: "scratchpad:current",
|
|
44
68
|
payload: request.body.payload,
|
|
45
69
|
...(options.now === undefined ? {} : { now: options.now }),
|
|
46
|
-
execute: () =>
|
|
70
|
+
execute: (tx) => {
|
|
71
|
+
const result = controlPlane.startTaskCompile(request.body.payload);
|
|
72
|
+
const ref = result.result?.submission_ref;
|
|
73
|
+
if (ref !== undefined) {
|
|
74
|
+
tx.prepare("INSERT INTO task_compile_request_commands (command_id, workflow_ref) VALUES (?, ?)").run(request.body.command_id, ref);
|
|
75
|
+
}
|
|
76
|
+
return result;
|
|
77
|
+
},
|
|
47
78
|
});
|
|
48
79
|
const response = {
|
|
49
80
|
command_id: execution.command_id,
|
|
@@ -53,6 +84,11 @@ export function registerWorkflowRoutes(app, options) {
|
|
|
53
84
|
if (execution.result !== undefined) {
|
|
54
85
|
response.result = execution.result;
|
|
55
86
|
}
|
|
87
|
+
else if (execution.replayed) {
|
|
88
|
+
const ref = readTaskCompileCommandRef(store.db, request.body.command_id);
|
|
89
|
+
if (ref !== undefined)
|
|
90
|
+
response.result = { submission_ref: ref };
|
|
91
|
+
}
|
|
56
92
|
return response;
|
|
57
93
|
});
|
|
58
94
|
app.post(`${HOST_PROJECT_API_BASE_PATH}/scheduler/run-now`, {
|
|
@@ -4,6 +4,7 @@ import { HOST_MAINLINE_BRANCH } from "./constants.js";
|
|
|
4
4
|
function defaultCapabilities(options) {
|
|
5
5
|
const overrides = options.capabilities;
|
|
6
6
|
return {
|
|
7
|
+
request_status_v1: options.controlPlane !== undefined && (overrides?.request_status_v1 ?? true),
|
|
7
8
|
sse: overrides?.sse ?? true,
|
|
8
9
|
relay_join: overrides?.relay_join ?? true,
|
|
9
10
|
repo_viewer: overrides?.repo_viewer ?? false,
|
|
@@ -125,14 +125,20 @@ export function toApiErrorResponse(error) {
|
|
|
125
125
|
export function registerApiErrorHandler(app) {
|
|
126
126
|
app.setErrorHandler((error, request, reply) => {
|
|
127
127
|
if (getValidationArray(error) !== undefined) {
|
|
128
|
-
|
|
128
|
+
const response = toValidationErrorResponse(error);
|
|
129
|
+
if (/^[A-Za-z0-9_-]{1,128}$/u.test(request.id))
|
|
130
|
+
response.error.request_id = request.id;
|
|
131
|
+
void reply.status(400).send(response);
|
|
129
132
|
return;
|
|
130
133
|
}
|
|
131
134
|
const statusCode = statusCodeFromError(error);
|
|
132
135
|
if (statusCode >= 500) {
|
|
133
136
|
request.log.error({ err: error }, "Unhandled host request error");
|
|
134
137
|
}
|
|
135
|
-
|
|
138
|
+
const response = toApiErrorResponse(error);
|
|
139
|
+
if (/^[A-Za-z0-9_-]{1,128}$/u.test(request.id))
|
|
140
|
+
response.error.request_id = request.id;
|
|
141
|
+
void reply.status(statusCode).send(response);
|
|
136
142
|
});
|
|
137
143
|
}
|
|
138
144
|
//# sourceMappingURL=validation.js.map
|
|
@@ -139,7 +139,7 @@ export declare class LocalConsoleManagedProjectService {
|
|
|
139
139
|
}>;
|
|
140
140
|
validate(requestRef: string, context: LocalConsoleInvocationContext): Promise<{
|
|
141
141
|
validation: {
|
|
142
|
-
state: "failed" | "
|
|
142
|
+
state: "failed" | "succeeded" | "unknown" | "started";
|
|
143
143
|
installation_ref: string;
|
|
144
144
|
reason_code: "validation_started" | "validation_succeeded" | "validation_route_unavailable" | "validation_http_rejected" | "validation_response_invalid" | "validation_transport_unknown" | "validation_interrupted";
|
|
145
145
|
project_id: string;
|
|
@@ -34,7 +34,7 @@ export declare function validateNativePreparation(options: {
|
|
|
34
34
|
fetchImpl?: typeof fetch;
|
|
35
35
|
signal?: AbortSignal;
|
|
36
36
|
}): Promise<{
|
|
37
|
-
state: "failed" | "
|
|
37
|
+
state: "failed" | "succeeded" | "unknown" | "started";
|
|
38
38
|
installation_ref: string;
|
|
39
39
|
reason_code: "validation_started" | "validation_succeeded" | "validation_route_unavailable" | "validation_http_rejected" | "validation_response_invalid" | "validation_transport_unknown" | "validation_interrupted";
|
|
40
40
|
project_id: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
CREATE TABLE chat_requests (
|
|
2
|
+
enqueue_order INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
3
|
+
trigger_message_id TEXT NOT NULL UNIQUE REFERENCES messages(id),
|
|
4
|
+
status TEXT NOT NULL CHECK (status IN ('queued', 'running', 'succeeded', 'failed')),
|
|
5
|
+
phase TEXT NOT NULL CHECK (phase IN ('queue', 'workspace_wait', 'answer', 'settled')),
|
|
6
|
+
revision INTEGER NOT NULL DEFAULT 1 CHECK (revision > 0),
|
|
7
|
+
attempt_ref TEXT,
|
|
8
|
+
response_message_id TEXT UNIQUE REFERENCES messages(id),
|
|
9
|
+
failure_json TEXT,
|
|
10
|
+
created_at TEXT NOT NULL,
|
|
11
|
+
updated_at TEXT NOT NULL,
|
|
12
|
+
CHECK (
|
|
13
|
+
(status = 'queued' AND phase = 'queue' AND failure_json IS NULL AND response_message_id IS NULL) OR
|
|
14
|
+
(status = 'running' AND phase IN ('workspace_wait', 'answer') AND attempt_ref IS NOT NULL AND failure_json IS NULL AND response_message_id IS NULL) OR
|
|
15
|
+
(status = 'succeeded' AND phase = 'settled' AND response_message_id IS NOT NULL AND failure_json IS NULL) OR
|
|
16
|
+
(status = 'failed' AND phase = 'settled' AND failure_json IS NOT NULL)
|
|
17
|
+
)
|
|
18
|
+
);
|
|
19
|
+
CREATE INDEX chat_requests_pending ON chat_requests(status, enqueue_order);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
-- Identity / closure evidence only. Pending inputs, clarification and receipts
|
|
2
|
+
-- remain authoritative; this table does not schedule or replay work.
|
|
3
|
+
CREATE TABLE task_compile_requests (
|
|
4
|
+
workflow_ref TEXT PRIMARY KEY,
|
|
5
|
+
accepted_activity_ref TEXT NOT NULL,
|
|
6
|
+
current_activity_ref TEXT NOT NULL,
|
|
7
|
+
created_at TEXT NOT NULL,
|
|
8
|
+
failure_code TEXT CHECK (failure_code IN ('task_compile_failed', 'scratchpad_empty_after_refresh')),
|
|
9
|
+
closed_at TEXT,
|
|
10
|
+
CHECK ((failure_code IS NULL) = (closed_at IS NULL))
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
CREATE TABLE task_compile_request_commands (
|
|
14
|
+
command_id TEXT PRIMARY KEY REFERENCES command_idempotency_records(command_id),
|
|
15
|
+
workflow_ref TEXT NOT NULL REFERENCES task_compile_requests(workflow_ref)
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
CREATE INDEX idx_task_compile_requests_latest ON task_compile_requests(created_at DESC);
|
|
19
|
+
|
|
20
|
+
-- Only live submissions have provable identity at migration time. Do not infer
|
|
21
|
+
-- failed historical requests from missing contexts or unrelated activities.
|
|
22
|
+
INSERT INTO task_compile_requests
|
|
23
|
+
(workflow_ref, accepted_activity_ref, current_activity_ref, created_at)
|
|
24
|
+
SELECT workflow_ref, accepted_activity_ref, accepted_activity_ref, requested_at
|
|
25
|
+
FROM pending_task_compile_submissions;
|
|
26
|
+
INSERT OR IGNORE INTO task_compile_requests
|
|
27
|
+
(workflow_ref, accepted_activity_ref, current_activity_ref, created_at)
|
|
28
|
+
SELECT workflow_ref, captured_by_activity_ref, captured_by_activity_ref, submitted_at
|
|
29
|
+
FROM active_task_compile_context;
|
|
30
|
+
|
|
31
|
+
-- Read requirement evidence, not an authorization/token mirror. Several model
|
|
32
|
+
-- invocations may encounter the same Integration-owned authorization request.
|
|
33
|
+
CREATE TABLE external_reference_access_requirements (
|
|
34
|
+
invocation_ref TEXT NOT NULL,
|
|
35
|
+
request_ref TEXT NOT NULL,
|
|
36
|
+
activity_ref TEXT,
|
|
37
|
+
authorization_ref TEXT NOT NULL,
|
|
38
|
+
profile TEXT NOT NULL CHECK (profile IN ('docx', 'wiki_docx', 'drive_file')),
|
|
39
|
+
observed_at TEXT NOT NULL,
|
|
40
|
+
PRIMARY KEY (invocation_ref, request_ref)
|
|
41
|
+
);
|
|
42
|
+
CREATE INDEX idx_external_reference_requirements_activity
|
|
43
|
+
ON external_reference_access_requirements(activity_ref);
|
|
44
|
+
|
|
45
|
+
CREATE TABLE chat_request_invocations (
|
|
46
|
+
message_id TEXT NOT NULL REFERENCES chat_requests(trigger_message_id),
|
|
47
|
+
attempt_ref TEXT NOT NULL,
|
|
48
|
+
invocation_ref TEXT NOT NULL,
|
|
49
|
+
PRIMARY KEY (message_id, attempt_ref)
|
|
50
|
+
);
|
package/migrations/README.md
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
## 当前 migrations
|
|
15
15
|
|
|
16
|
+
后续 `0021`/`0022`/`0023` 分别增加外部读取证据、clarification 投影 cursor 和协作语言 metadata。`0024_chat_requests.sql` 为普通 Chat 增加持久 FIFO、状态/阶段 CHECK、attempt/revision、原始与回复 message FK;不回填历史提问,不保存正文/prompt。最新 `0025_task_compile_requests.sql` 增加 Submit identity/明确关闭证据、command 关联、外部授权 requirement 与 Chat attempt→invocation 关联;仅回填 live pending/captured submission,不重建历史状态/command,不复制 token 或授权状态。恢复仍由原 owner 负责,见 [请求状态与恢复](../../../docs/system/request-status-and-recovery.md)。
|
|
17
|
+
|
|
16
18
|
- `0001_init.sql`:初始化本地 `tutti.sqlite`,包含协作 truth records、store metadata、command idempotency、clarification replay hint、索引和关键 trigger。
|
|
17
19
|
- `0002_allow_sealed_round_successor_note.sql`:允许 Control Plane 在 sealed clarification round 内追加只读 Tutti successor 结论消息,同时继续禁止人类补充消息写入 sealed round。
|
|
18
20
|
- `0003_drop_scratchpad_source_message_refs.sql`:从 Scratchpad 持久化中移除不再暴露给模型、API 或 UI 的来源消息追溯字段。
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
|
|
37
39
|
## 当前实现状态
|
|
38
40
|
|
|
39
|
-
-
|
|
41
|
+
- 当前 Host migrations 已到 `0025_task_compile_requests.sql`,后续表的 owner 见上方说明。`0014` 明确采用开发数据库重建策略,不提供旧 Scratchpad source/cursor 数据兼容;`0016`–`0017`不回填既有 internal Chat message/agent response 的 external mapping/outbound intent,`0018`保留旧 intent 并阻止历史 status 回填,`0019`无损加入 structured card content,`0020`加入独立 managed Reference recovery checkpoint;`0024`不回填历史 Chat 请求,`0025`只回填 live submission identity。
|
|
40
42
|
- SQLite adapter、migration runner、checksum 校验、store metadata 初始化、transaction helper 与 command recovery scan helper 已实现。
|
|
41
43
|
- 协作 repository 与 Control Plane 已实现第一批业务读写;Phase 7 首批已复用 `0001_init.sql` 中的 `tasks.latest_run_result_id`、`task_details.result_json` 与 `run_results` 表完成 Run result / checks / promotion 摘要持久化。Control Plane recovery resolver 与 task-bound continuation / retry 复用现有 schema;新 Run 的 accepted checkpoint 业务 truth 继续写入最终 Run result / task detail result,Git tag / commit trailer 承担 crash recovery evidence。Timeline 默认从 `tasks`、`run_results` 与历史主群聊 `refs.worklist_feedback` 投影任务级审计节点,当前 task terminal Chat feedback 写入 `refs.task_result` 消息;`project_timeline_events` 只保留缺少稳定 record 的轻量可观测性事件和历史 reconcile 兼容记录。project workspace、working diff 与 ignored runtime state 都不进入 SQLite truth。`provider_usage_events` 只保存 token 计数、调用来源、模型名、记录时间和可空 anchor,不保存 provider secret、prompt 或 raw response。store 基础设施本身已经可以创建并迁移 `tutti.sqlite`。
|
|
42
44
|
|
|
@@ -48,6 +48,7 @@ export type RegisterRelayHostConnectionPayload = {
|
|
|
48
48
|
integration_development_bot_v1?: boolean;
|
|
49
49
|
integration_clarification_v1?: boolean;
|
|
50
50
|
feishu_supporting_reads_v1?: boolean;
|
|
51
|
+
request_status_v1?: boolean;
|
|
51
52
|
integration_external_references_v1?: boolean;
|
|
52
53
|
integration_attachment_ingestion_v1?: boolean;
|
|
53
54
|
integration_managed_reference_ingestion_v1?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./openapi.js";
|
|
2
2
|
export * from "./managed-account.js";
|
|
3
|
+
export * from "./operation-status.js";
|
|
3
4
|
export type * from "./types.js";
|
|
4
5
|
export { ARTIFACT_FEEDBACK_MAX_ANNOTATIONS, ARTIFACT_FEEDBACK_MAX_AUTHORED_TEXT_LENGTH, ARTIFACT_FEEDBACK_MAX_COMMENT_LENGTH, ARTIFACT_FEEDBACK_MAX_SERIALIZED_BYTES, ARTIFACT_FEEDBACK_MAX_SUMMARY_LENGTH, ArtifactElementAnchorSchema, ArtifactElementKindSchema, ArtifactElementTargetSchema, ArtifactFeedbackAnnotationSchema, ArtifactFeedbackCommandSchema, ArtifactFeedbackRefSchema, ArtifactSemanticContextSchema, ArtifactSemanticSnapshotSchema, ArtifactSemanticStateSchema, } from "./artifact-feedback.js";
|
|
5
6
|
export { CompleteDesktopEntryContinuationBodySchema, CompleteDesktopEntryContinuationResponseSchema, CreateDesktopEntryContinuationResponseSchema, DESKTOP_ENTRY_COMPLETION_TOKEN_LENGTH, DESKTOP_ENTRY_PAYLOAD_KEY_LENGTH, DESKTOP_ENTRY_SEALED_IV_LENGTH, DesktopEntryCompletionTokenSchema, DesktopEntryContinuationPendingProjectionSchema, DesktopEntryContinuationReadyProjectionSchema, DesktopEntryPayloadKeySchema, GetDesktopEntryContinuationResponseSchema, MAX_DESKTOP_ENTRY_SEALED_CIPHERTEXT_LENGTH, SealedDesktopEntryPayloadSchema, } from "./desktop-entry-continuations.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./openapi.js";
|
|
2
2
|
export * from "./managed-account.js";
|
|
3
|
+
export * from "./operation-status.js";
|
|
3
4
|
export { ARTIFACT_FEEDBACK_MAX_ANNOTATIONS, ARTIFACT_FEEDBACK_MAX_AUTHORED_TEXT_LENGTH, ARTIFACT_FEEDBACK_MAX_COMMENT_LENGTH, ARTIFACT_FEEDBACK_MAX_SERIALIZED_BYTES, ARTIFACT_FEEDBACK_MAX_SUMMARY_LENGTH, ArtifactElementAnchorSchema, ArtifactElementKindSchema, ArtifactElementTargetSchema, ArtifactFeedbackAnnotationSchema, ArtifactFeedbackCommandSchema, ArtifactFeedbackRefSchema, ArtifactSemanticContextSchema, ArtifactSemanticSnapshotSchema, ArtifactSemanticStateSchema, } from "./artifact-feedback.js";
|
|
4
5
|
export { CompleteDesktopEntryContinuationBodySchema, CompleteDesktopEntryContinuationResponseSchema, CreateDesktopEntryContinuationResponseSchema, DESKTOP_ENTRY_COMPLETION_TOKEN_LENGTH, DESKTOP_ENTRY_PAYLOAD_KEY_LENGTH, DESKTOP_ENTRY_SEALED_IV_LENGTH, DesktopEntryCompletionTokenSchema, DesktopEntryContinuationPendingProjectionSchema, DesktopEntryContinuationReadyProjectionSchema, DesktopEntryPayloadKeySchema, GetDesktopEntryContinuationResponseSchema, MAX_DESKTOP_ENTRY_SEALED_CIPHERTEXT_LENGTH, SealedDesktopEntryPayloadSchema, } from "./desktop-entry-continuations.js";
|
|
5
6
|
export { LOCAL_CONSOLE_ACCOUNT_HANDOFF_TOKEN_MAX_LENGTH, LOCAL_CONSOLE_ACCOUNT_HANDOFF_TOKEN_MIN_LENGTH, RegisterLocalConsoleAccountHandoffBodySchema, RegisterLocalConsoleAccountHandoffResponseSchema, } from "./local-console-account-handoffs.js";
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { type Static } from "@sinclair/typebox";
|
|
2
|
+
export declare const OperationFailureSchema: import("@sinclair/typebox").TObject<{
|
|
3
|
+
code: import("@sinclair/typebox").TString;
|
|
4
|
+
category: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"capacity" | "access" | "configuration" | "dependency" | "interrupted" | "internal">[]>;
|
|
5
|
+
recovery: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"resend_request" | "check_provider" | "restart_host" | "contact_support" | "none">[]>;
|
|
6
|
+
diagnostic_id: import("@sinclair/typebox").TString;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const ChatRequestStatusSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
9
|
+
status: import("@sinclair/typebox").TLiteral<"queued">;
|
|
10
|
+
phase: import("@sinclair/typebox").TLiteral<"queue">;
|
|
11
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
12
|
+
kind: import("@sinclair/typebox").TLiteral<"chat_answer">;
|
|
13
|
+
ref: import("@sinclair/typebox").TString;
|
|
14
|
+
}>;
|
|
15
|
+
revision: import("@sinclair/typebox").TInteger;
|
|
16
|
+
created_at: import("@sinclair/typebox").TString;
|
|
17
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
18
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
19
|
+
status: import("@sinclair/typebox").TLiteral<"running">;
|
|
20
|
+
phase: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"workspace_wait">, import("@sinclair/typebox").TLiteral<"answer">]>;
|
|
21
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
22
|
+
kind: import("@sinclair/typebox").TLiteral<"chat_answer">;
|
|
23
|
+
ref: import("@sinclair/typebox").TString;
|
|
24
|
+
}>;
|
|
25
|
+
revision: import("@sinclair/typebox").TInteger;
|
|
26
|
+
created_at: import("@sinclair/typebox").TString;
|
|
27
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
28
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
29
|
+
status: import("@sinclair/typebox").TLiteral<"succeeded">;
|
|
30
|
+
phase: import("@sinclair/typebox").TLiteral<"settled">;
|
|
31
|
+
response_message_id: import("@sinclair/typebox").TString;
|
|
32
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
33
|
+
kind: import("@sinclair/typebox").TLiteral<"chat_answer">;
|
|
34
|
+
ref: import("@sinclair/typebox").TString;
|
|
35
|
+
}>;
|
|
36
|
+
revision: import("@sinclair/typebox").TInteger;
|
|
37
|
+
created_at: import("@sinclair/typebox").TString;
|
|
38
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
39
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
40
|
+
status: import("@sinclair/typebox").TLiteral<"failed">;
|
|
41
|
+
phase: import("@sinclair/typebox").TLiteral<"settled">;
|
|
42
|
+
failure: import("@sinclair/typebox").TObject<{
|
|
43
|
+
code: import("@sinclair/typebox").TString;
|
|
44
|
+
category: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"capacity" | "access" | "configuration" | "dependency" | "interrupted" | "internal">[]>;
|
|
45
|
+
recovery: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"resend_request" | "check_provider" | "restart_host" | "contact_support" | "none">[]>;
|
|
46
|
+
diagnostic_id: import("@sinclair/typebox").TString;
|
|
47
|
+
}>;
|
|
48
|
+
response_message_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
49
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
50
|
+
kind: import("@sinclair/typebox").TLiteral<"chat_answer">;
|
|
51
|
+
ref: import("@sinclair/typebox").TString;
|
|
52
|
+
}>;
|
|
53
|
+
revision: import("@sinclair/typebox").TInteger;
|
|
54
|
+
created_at: import("@sinclair/typebox").TString;
|
|
55
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
56
|
+
}>]>;
|
|
57
|
+
export type OperationFailure = Static<typeof OperationFailureSchema>;
|
|
58
|
+
export type ChatRequestStatus = Static<typeof ChatRequestStatusSchema>;
|
|
59
|
+
export declare const WorklistSubmissionStatusSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
60
|
+
status: import("@sinclair/typebox").TLiteral<"running">;
|
|
61
|
+
phase: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"preparing">, import("@sinclair/typebox").TLiteral<"scratchpad_refresh">, import("@sinclair/typebox").TLiteral<"reference_summary_refresh">, import("@sinclair/typebox").TLiteral<"project_context_bootstrap">, import("@sinclair/typebox").TLiteral<"task_compile">]>;
|
|
62
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
63
|
+
kind: import("@sinclair/typebox").TLiteral<"worklist_submit">;
|
|
64
|
+
ref: import("@sinclair/typebox").TString;
|
|
65
|
+
}>;
|
|
66
|
+
created_at: import("@sinclair/typebox").TString;
|
|
67
|
+
activity_ref: import("@sinclair/typebox").TString;
|
|
68
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
69
|
+
status: import("@sinclair/typebox").TLiteral<"waiting_input">;
|
|
70
|
+
phase: import("@sinclair/typebox").TLiteral<"clarification">;
|
|
71
|
+
round_id: import("@sinclair/typebox").TString;
|
|
72
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
73
|
+
kind: import("@sinclair/typebox").TLiteral<"worklist_submit">;
|
|
74
|
+
ref: import("@sinclair/typebox").TString;
|
|
75
|
+
}>;
|
|
76
|
+
created_at: import("@sinclair/typebox").TString;
|
|
77
|
+
activity_ref: import("@sinclair/typebox").TString;
|
|
78
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
79
|
+
status: import("@sinclair/typebox").TLiteral<"succeeded">;
|
|
80
|
+
phase: import("@sinclair/typebox").TLiteral<"settled">;
|
|
81
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
82
|
+
kind: import("@sinclair/typebox").TLiteral<"worklist_submit">;
|
|
83
|
+
ref: import("@sinclair/typebox").TString;
|
|
84
|
+
}>;
|
|
85
|
+
created_at: import("@sinclair/typebox").TString;
|
|
86
|
+
activity_ref: import("@sinclair/typebox").TString;
|
|
87
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
88
|
+
status: import("@sinclair/typebox").TLiteral<"failed">;
|
|
89
|
+
phase: import("@sinclair/typebox").TLiteral<"settled">;
|
|
90
|
+
failure: import("@sinclair/typebox").TObject<{
|
|
91
|
+
code: import("@sinclair/typebox").TString;
|
|
92
|
+
category: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"capacity" | "access" | "configuration" | "dependency" | "interrupted" | "internal">[]>;
|
|
93
|
+
recovery: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"resend_request" | "check_provider" | "restart_host" | "contact_support" | "none">[]>;
|
|
94
|
+
diagnostic_id: import("@sinclair/typebox").TString;
|
|
95
|
+
}>;
|
|
96
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
97
|
+
kind: import("@sinclair/typebox").TLiteral<"worklist_submit">;
|
|
98
|
+
ref: import("@sinclair/typebox").TString;
|
|
99
|
+
}>;
|
|
100
|
+
created_at: import("@sinclair/typebox").TString;
|
|
101
|
+
activity_ref: import("@sinclair/typebox").TString;
|
|
102
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
103
|
+
status: import("@sinclair/typebox").TLiteral<"unknown">;
|
|
104
|
+
phase: import("@sinclair/typebox").TLiteral<"unconfirmed">;
|
|
105
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
106
|
+
kind: import("@sinclair/typebox").TLiteral<"worklist_submit">;
|
|
107
|
+
ref: import("@sinclair/typebox").TString;
|
|
108
|
+
}>;
|
|
109
|
+
created_at: import("@sinclair/typebox").TString;
|
|
110
|
+
activity_ref: import("@sinclair/typebox").TString;
|
|
111
|
+
}>]>;
|
|
112
|
+
export declare const CurrentWorklistSubmissionSchema: import("@sinclair/typebox").TObject<{
|
|
113
|
+
request: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
114
|
+
status: import("@sinclair/typebox").TLiteral<"running">;
|
|
115
|
+
phase: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"preparing">, import("@sinclair/typebox").TLiteral<"scratchpad_refresh">, import("@sinclair/typebox").TLiteral<"reference_summary_refresh">, import("@sinclair/typebox").TLiteral<"project_context_bootstrap">, import("@sinclair/typebox").TLiteral<"task_compile">]>;
|
|
116
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
117
|
+
kind: import("@sinclair/typebox").TLiteral<"worklist_submit">;
|
|
118
|
+
ref: import("@sinclair/typebox").TString;
|
|
119
|
+
}>;
|
|
120
|
+
created_at: import("@sinclair/typebox").TString;
|
|
121
|
+
activity_ref: import("@sinclair/typebox").TString;
|
|
122
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
123
|
+
status: import("@sinclair/typebox").TLiteral<"waiting_input">;
|
|
124
|
+
phase: import("@sinclair/typebox").TLiteral<"clarification">;
|
|
125
|
+
round_id: import("@sinclair/typebox").TString;
|
|
126
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
127
|
+
kind: import("@sinclair/typebox").TLiteral<"worklist_submit">;
|
|
128
|
+
ref: import("@sinclair/typebox").TString;
|
|
129
|
+
}>;
|
|
130
|
+
created_at: import("@sinclair/typebox").TString;
|
|
131
|
+
activity_ref: import("@sinclair/typebox").TString;
|
|
132
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
133
|
+
status: import("@sinclair/typebox").TLiteral<"succeeded">;
|
|
134
|
+
phase: import("@sinclair/typebox").TLiteral<"settled">;
|
|
135
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
136
|
+
kind: import("@sinclair/typebox").TLiteral<"worklist_submit">;
|
|
137
|
+
ref: import("@sinclair/typebox").TString;
|
|
138
|
+
}>;
|
|
139
|
+
created_at: import("@sinclair/typebox").TString;
|
|
140
|
+
activity_ref: import("@sinclair/typebox").TString;
|
|
141
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
142
|
+
status: import("@sinclair/typebox").TLiteral<"failed">;
|
|
143
|
+
phase: import("@sinclair/typebox").TLiteral<"settled">;
|
|
144
|
+
failure: import("@sinclair/typebox").TObject<{
|
|
145
|
+
code: import("@sinclair/typebox").TString;
|
|
146
|
+
category: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"capacity" | "access" | "configuration" | "dependency" | "interrupted" | "internal">[]>;
|
|
147
|
+
recovery: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"resend_request" | "check_provider" | "restart_host" | "contact_support" | "none">[]>;
|
|
148
|
+
diagnostic_id: import("@sinclair/typebox").TString;
|
|
149
|
+
}>;
|
|
150
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
151
|
+
kind: import("@sinclair/typebox").TLiteral<"worklist_submit">;
|
|
152
|
+
ref: import("@sinclair/typebox").TString;
|
|
153
|
+
}>;
|
|
154
|
+
created_at: import("@sinclair/typebox").TString;
|
|
155
|
+
activity_ref: import("@sinclair/typebox").TString;
|
|
156
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
157
|
+
status: import("@sinclair/typebox").TLiteral<"unknown">;
|
|
158
|
+
phase: import("@sinclair/typebox").TLiteral<"unconfirmed">;
|
|
159
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
160
|
+
kind: import("@sinclair/typebox").TLiteral<"worklist_submit">;
|
|
161
|
+
ref: import("@sinclair/typebox").TString;
|
|
162
|
+
}>;
|
|
163
|
+
created_at: import("@sinclair/typebox").TString;
|
|
164
|
+
activity_ref: import("@sinclair/typebox").TString;
|
|
165
|
+
}>]>, import("@sinclair/typebox").TNull]>;
|
|
166
|
+
}>;
|
|
167
|
+
export type WorklistSubmissionStatus = Static<typeof WorklistSubmissionStatusSchema>;
|
|
168
|
+
export type CurrentWorklistSubmission = Static<typeof CurrentWorklistSubmissionSchema>;
|
|
169
|
+
export declare const WorklistSubmissionQuerySchema: import("@sinclair/typebox").TObject<{
|
|
170
|
+
workflow_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
171
|
+
command_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
172
|
+
}>;
|
|
173
|
+
export type WorklistSubmissionQuery = Static<typeof WorklistSubmissionQuerySchema>;
|
|
174
|
+
//# sourceMappingURL=operation-status.d.ts.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { ActivityRefSchema, ClarificationRoundRefSchema, IdempotencyKeySchema, IsoDateTimeStringSchema, MessageIdSchema, WorkflowInvocationRefSchema, } from "../domain/index.js";
|
|
3
|
+
// Shared vocabulary, not a second Task/Run state machine. Add operation kinds only
|
|
4
|
+
// when an authoritative adapter and its query contract actually exist.
|
|
5
|
+
export const OperationFailureSchema = Type.Object({
|
|
6
|
+
code: Type.String({ pattern: "^[a-z][a-z0-9_]{0,63}$" }),
|
|
7
|
+
category: Type.Union(["capacity", "access", "configuration", "dependency", "interrupted", "internal"].map((value) => Type.Literal(value))),
|
|
8
|
+
recovery: Type.Union(["resend_request", "check_provider", "restart_host", "contact_support", "none"].map((value) => Type.Literal(value))),
|
|
9
|
+
diagnostic_id: Type.String({ pattern: "^[A-Za-z0-9_-]{1,128}$" }),
|
|
10
|
+
}, { additionalProperties: false });
|
|
11
|
+
const common = {
|
|
12
|
+
operation: Type.Object({ kind: Type.Literal("chat_answer"), ref: MessageIdSchema }, { additionalProperties: false }),
|
|
13
|
+
revision: Type.Integer({ minimum: 1 }),
|
|
14
|
+
created_at: IsoDateTimeStringSchema,
|
|
15
|
+
updated_at: IsoDateTimeStringSchema,
|
|
16
|
+
};
|
|
17
|
+
export const ChatRequestStatusSchema = Type.Union([
|
|
18
|
+
Type.Object({ ...common, status: Type.Literal("queued"), phase: Type.Literal("queue") }, { additionalProperties: false }),
|
|
19
|
+
Type.Object({
|
|
20
|
+
...common,
|
|
21
|
+
status: Type.Literal("running"),
|
|
22
|
+
phase: Type.Union([Type.Literal("workspace_wait"), Type.Literal("answer")]),
|
|
23
|
+
}, { additionalProperties: false }),
|
|
24
|
+
Type.Object({
|
|
25
|
+
...common,
|
|
26
|
+
status: Type.Literal("succeeded"),
|
|
27
|
+
phase: Type.Literal("settled"),
|
|
28
|
+
response_message_id: MessageIdSchema,
|
|
29
|
+
}, { additionalProperties: false }),
|
|
30
|
+
Type.Object({
|
|
31
|
+
...common,
|
|
32
|
+
status: Type.Literal("failed"),
|
|
33
|
+
phase: Type.Literal("settled"),
|
|
34
|
+
failure: OperationFailureSchema,
|
|
35
|
+
response_message_id: Type.Optional(MessageIdSchema),
|
|
36
|
+
}, { additionalProperties: false }),
|
|
37
|
+
]);
|
|
38
|
+
const submission = {
|
|
39
|
+
operation: Type.Object({ kind: Type.Literal("worklist_submit"), ref: WorkflowInvocationRefSchema }, { additionalProperties: false }),
|
|
40
|
+
created_at: IsoDateTimeStringSchema,
|
|
41
|
+
activity_ref: ActivityRefSchema,
|
|
42
|
+
};
|
|
43
|
+
export const WorklistSubmissionStatusSchema = Type.Union([
|
|
44
|
+
Type.Object({
|
|
45
|
+
...submission,
|
|
46
|
+
status: Type.Literal("running"),
|
|
47
|
+
phase: Type.Union([
|
|
48
|
+
Type.Literal("preparing"),
|
|
49
|
+
Type.Literal("scratchpad_refresh"),
|
|
50
|
+
Type.Literal("reference_summary_refresh"),
|
|
51
|
+
Type.Literal("project_context_bootstrap"),
|
|
52
|
+
Type.Literal("task_compile"),
|
|
53
|
+
]),
|
|
54
|
+
}, { additionalProperties: false }),
|
|
55
|
+
Type.Object({
|
|
56
|
+
...submission,
|
|
57
|
+
status: Type.Literal("waiting_input"),
|
|
58
|
+
phase: Type.Literal("clarification"),
|
|
59
|
+
round_id: ClarificationRoundRefSchema,
|
|
60
|
+
}, { additionalProperties: false }),
|
|
61
|
+
Type.Object({ ...submission, status: Type.Literal("succeeded"), phase: Type.Literal("settled") }, { additionalProperties: false }),
|
|
62
|
+
Type.Object({
|
|
63
|
+
...submission,
|
|
64
|
+
status: Type.Literal("failed"),
|
|
65
|
+
phase: Type.Literal("settled"),
|
|
66
|
+
failure: OperationFailureSchema,
|
|
67
|
+
}, { additionalProperties: false }),
|
|
68
|
+
Type.Object({ ...submission, status: Type.Literal("unknown"), phase: Type.Literal("unconfirmed") }, { additionalProperties: false }),
|
|
69
|
+
]);
|
|
70
|
+
export const CurrentWorklistSubmissionSchema = Type.Object({ request: Type.Union([WorklistSubmissionStatusSchema, Type.Null()]) }, { additionalProperties: false });
|
|
71
|
+
export const WorklistSubmissionQuerySchema = Type.Object({
|
|
72
|
+
workflow_ref: Type.Optional(WorkflowInvocationRefSchema),
|
|
73
|
+
command_id: Type.Optional(IdempotencyKeySchema),
|
|
74
|
+
}, { additionalProperties: false, maxProperties: 1 });
|
|
75
|
+
//# sourceMappingURL=operation-status.js.map
|
|
@@ -79,6 +79,7 @@ export declare const ApiErrorResponseSchema: import("@sinclair/typebox").TObject
|
|
|
79
79
|
message: import("@sinclair/typebox").TString;
|
|
80
80
|
retryable: import("@sinclair/typebox").TBoolean;
|
|
81
81
|
details: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
|
|
82
|
+
request_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
82
83
|
}>;
|
|
83
84
|
}>;
|
|
84
85
|
export declare const WorkspaceSseEventTypeSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"connection.ready">, import("@sinclair/typebox").TLiteral<"message.created">, import("@sinclair/typebox").TLiteral<"scratchpad.updated">, import("@sinclair/typebox").TLiteral<"worklist.changed">, import("@sinclair/typebox").TLiteral<"task.updated">, import("@sinclair/typebox").TLiteral<"task_detail.updated">, import("@sinclair/typebox").TLiteral<"clarification.changed">, import("@sinclair/typebox").TLiteral<"approval.changed">, import("@sinclair/typebox").TLiteral<"activity.event">, import("@sinclair/typebox").TLiteral<"execution_status.changed">, import("@sinclair/typebox").TLiteral<"provider_config.changed">, import("@sinclair/typebox").TLiteral<"workspace.recovered">, import("@sinclair/typebox").TLiteral<"query.invalidate">]>;
|
|
@@ -115,6 +115,7 @@ export const ApiErrorResponseSchema = Type.Object({
|
|
|
115
115
|
message: Type.String({ minLength: 1 }),
|
|
116
116
|
retryable: Type.Boolean(),
|
|
117
117
|
details: Type.Optional(Type.Unknown()),
|
|
118
|
+
request_id: Type.Optional(Type.String({ pattern: "^[A-Za-z0-9_-]{1,128}$" })),
|
|
118
119
|
}, { additionalProperties: false }),
|
|
119
120
|
}, { additionalProperties: false });
|
|
120
121
|
export const WorkspaceSseEventTypeSchema = Type.Union([
|
|
@@ -106,6 +106,7 @@ export declare const SubmitWorklistDispositionSchema: import("@sinclair/typebox"
|
|
|
106
106
|
retry_with_new_command_id: import("@sinclair/typebox").TLiteral<true>;
|
|
107
107
|
}>]>;
|
|
108
108
|
export declare const SubmitWorklistResultSchema: import("@sinclair/typebox").TObject<{
|
|
109
|
+
submission_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
109
110
|
activity_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
110
111
|
workflow_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
111
112
|
}>;
|
|
@@ -2,7 +2,7 @@ import { Type } from "@sinclair/typebox";
|
|
|
2
2
|
import { ActivityRefSchema, ClarificationRoundRefSchema, ClarificationThreadRefSchema, IsoDateTimeStringSchema, TaskIdSchema, RunResultIdSchema, WorkflowInvocationRefSchema, } from "../domain/index.js";
|
|
3
3
|
import { ProviderUnavailableReasonCodeSchema } from "./provider-config.js";
|
|
4
4
|
import { InterruptedCommandDispositionSchema, NonEmptyStringSchema, commandEnvelopeSchema, commandResponseSchema, commandResponseWithResultSchema, } from "./primitives.js";
|
|
5
|
-
import { ProjectDocSummaryProjectionSchema, ViewerPathSchema
|
|
5
|
+
import { ProjectDocSummaryProjectionSchema, ViewerPathSchema } from "./viewer-reference.js";
|
|
6
6
|
import { ScratchpadProjectionSchema } from "./work-items.js";
|
|
7
7
|
export const RefreshScratchpadDispositionSchema = Type.Union([
|
|
8
8
|
Type.Object({ kind: Type.Literal("accepted") }, { additionalProperties: false }),
|
|
@@ -47,6 +47,7 @@ export const SubmitWorklistDispositionSchema = Type.Union([
|
|
|
47
47
|
InterruptedCommandDispositionSchema,
|
|
48
48
|
]);
|
|
49
49
|
export const SubmitWorklistResultSchema = Type.Object({
|
|
50
|
+
submission_ref: Type.Optional(WorkflowInvocationRefSchema),
|
|
50
51
|
activity_ref: Type.Optional(ActivityRefSchema),
|
|
51
52
|
workflow_ref: Type.Optional(WorkflowInvocationRefSchema),
|
|
52
53
|
}, { additionalProperties: false });
|