@xfey/tutti 0.1.126 → 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/README.md +2 -0
- package/dist/approvals/decision-command.d.ts +2 -2
- package/dist/chat-assistant/diagnostics.d.ts +11 -3
- 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 +241 -54
- package/dist/chat-assistant/language-context.d.ts +8 -0
- package/dist/chat-assistant/language-context.js +41 -0
- 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/communication-language.d.ts +31 -0
- package/dist/collaboration-state/communication-language.js +36 -0
- package/dist/collaboration-state/task-compile-context.d.ts +1 -1
- package/dist/collaboration-state/task-compile-context.js +20 -1
- package/dist/collaboration-state/task-compile-requests.d.ts +6 -0
- package/dist/collaboration-state/task-compile-requests.js +16 -0
- package/dist/communication-language/index.d.ts +75 -0
- package/dist/communication-language/index.js +122 -0
- package/dist/communication-language/live-smoke-cli.d.ts +2 -0
- package/dist/communication-language/live-smoke-cli.js +368 -0
- package/dist/communication-language/prompt.d.ts +22 -0
- package/dist/communication-language/prompt.js +73 -0
- package/dist/control-plane/communication-language.d.ts +33 -0
- package/dist/control-plane/communication-language.js +72 -0
- package/dist/control-plane/context-sync.js +7 -0
- package/dist/control-plane/follow-up-output.js +25 -4
- package/dist/control-plane/follow-up-start.js +17 -0
- package/dist/control-plane/project-brief-refresh.js +10 -1
- package/dist/control-plane/project-context-bootstrap.d.ts +2 -0
- package/dist/control-plane/project-context-bootstrap.js +8 -0
- package/dist/control-plane/reference-summary-refresh.js +7 -0
- package/dist/control-plane/run-start.js +14 -6
- package/dist/control-plane/scratchpad-refresh-start.d.ts +1 -0
- package/dist/control-plane/scratchpad-refresh-start.js +13 -0
- package/dist/control-plane/scratchpad-refresh.d.ts +2 -0
- package/dist/control-plane/scratchpad-refresh.js +40 -26
- package/dist/control-plane/task-compile-continuation.js +16 -1
- package/dist/control-plane/task-compile-output.js +38 -14
- 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.d.ts +1 -0
- package/dist/control-plane/task-compile-start.js +62 -3
- package/dist/control-plane/types.d.ts +2 -0
- package/dist/control-plane/workflows/openai.js +48 -28
- package/dist/control-plane/workflows/types.d.ts +18 -13
- package/dist/prompt-templates/index.d.ts +1 -1
- package/dist/prompt-templates/index.js +2 -0
- 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/run-pipeline/task-run-invocation.js +12 -9
- 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/0023_communication_language.sql +14 -0
- 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/prompts/README.md +1 -0
- package/prompts/chat-assistant.md +1 -1
- package/prompts/communication-language-result.md +27 -0
- package/prompts/communication-language.md +50 -0
- package/prompts/procedures/follow-up-check.md +1 -1
- package/prompts/procedures/scratchpad-refresh.md +2 -2
- package/prompts/procedures/task-compile.md +1 -1
- package/prompts/prompt-flow-map.md +2 -0
- 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,5 +1,6 @@
|
|
|
1
1
|
import { openAiCredentialAccess } from "../providers/openai/execution-access.js";
|
|
2
2
|
import { renderPromptTemplate } from "../prompt-templates/index.js";
|
|
3
|
+
import { renderLanguageAwarePrompt } from "../communication-language/prompt.js";
|
|
3
4
|
import { CODEX_APP_SERVER_VERSION } from "../providers/openai/codex-app-server.js";
|
|
4
5
|
import { CodexAppServerWorkspaceWriteRunError, runCodexAppServerWorkspaceWriteRun, } from "../providers/openai/app-server/workspace-write-run.js";
|
|
5
6
|
import { acquireCodexTaskSessionLock, createProviderFingerprint, markCodexTaskSessionArchived, openCodexTaskSession, readCodexSessionRecoveryEvidence, recordCodexSessionArchiveFailure, recordCodexTaskSessionThread, writeCodexSessionRecoveryEvidence, } from "../providers/openai/app-server/session-store.js";
|
|
@@ -55,24 +56,26 @@ function createExecutePrompt(options, input, session) {
|
|
|
55
56
|
else {
|
|
56
57
|
executionInput = taskContractRunInput(input);
|
|
57
58
|
}
|
|
58
|
-
return
|
|
59
|
+
return renderLanguageAwarePrompt({
|
|
59
60
|
templateKey: "runs.task_execute",
|
|
60
61
|
...(options.promptsRoot === undefined ? {} : { promptsRoot: options.promptsRoot }),
|
|
61
62
|
variables: { execution_input_json: executionInput },
|
|
62
|
-
});
|
|
63
|
+
}, input.communication_language);
|
|
63
64
|
}
|
|
64
|
-
function createFinalizePrompt(options) {
|
|
65
|
-
return
|
|
65
|
+
function createFinalizePrompt(options, input) {
|
|
66
|
+
return renderLanguageAwarePrompt({
|
|
66
67
|
templateKey: "runs.task_finalize",
|
|
67
68
|
...(options.promptsRoot === undefined ? {} : { promptsRoot: options.promptsRoot }),
|
|
68
69
|
variables: { result_contract: renderResultContract(options) },
|
|
69
|
-
});
|
|
70
|
+
}, input.communication_language);
|
|
70
71
|
}
|
|
71
72
|
function createRecoveryPrompt(input) {
|
|
72
73
|
const needsCanonicalContext = input.session === undefined || input.session.metadata.thread_id === undefined;
|
|
73
|
-
return
|
|
74
|
+
return renderLanguageAwarePrompt({
|
|
74
75
|
templateKey: "runs.task_recovery",
|
|
75
|
-
...(input.options.promptsRoot === undefined
|
|
76
|
+
...(input.options.promptsRoot === undefined
|
|
77
|
+
? {}
|
|
78
|
+
: { promptsRoot: input.options.promptsRoot }),
|
|
76
79
|
variables: {
|
|
77
80
|
recovery_input_json: {
|
|
78
81
|
...(needsCanonicalContext
|
|
@@ -82,7 +85,7 @@ function createRecoveryPrompt(input) {
|
|
|
82
85
|
},
|
|
83
86
|
result_contract: renderResultContract(input.options),
|
|
84
87
|
},
|
|
85
|
-
});
|
|
88
|
+
}, input.pipelineInput.communication_language);
|
|
86
89
|
}
|
|
87
90
|
function usageSource(input, phase) {
|
|
88
91
|
if (phase === "finalize") {
|
|
@@ -372,7 +375,7 @@ export async function runWorkspaceWriteTask(options, input) {
|
|
|
372
375
|
structuredResult = await runTaskTurn({
|
|
373
376
|
options,
|
|
374
377
|
pipelineInput: input,
|
|
375
|
-
prompt: createFinalizePrompt(options),
|
|
378
|
+
prompt: createFinalizePrompt(options, input),
|
|
376
379
|
phase: "finalize",
|
|
377
380
|
sandboxMode: "read-only",
|
|
378
381
|
networkAccess: false,
|
package/dist/runtime-failures.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { providerFailureCode } from "./providers/failure-classification.js";
|
|
1
2
|
const STABLE_FAILURE_CODE = /^[a-z][a-z0-9_]{0,63}$/u;
|
|
2
3
|
export function stableRuntimeFailureCode(error, fallback) {
|
|
3
4
|
if (typeof error === "object" &&
|
|
@@ -17,6 +18,19 @@ export function safeRuntimeFailureSummary(subject, error, fallbackCode) {
|
|
|
17
18
|
if (code === "admission_unavailable" || code === "admission_closed") {
|
|
18
19
|
return `${subject} stopped because provider execution is unavailable while the Host is closing. Retry after the Host is ready. (${code})`;
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
if (code === "reference_authorization_required") {
|
|
22
|
+
return `${subject} needs document access. Authorize using the group card, then review the task or request before continuing. (${code})`;
|
|
23
|
+
}
|
|
24
|
+
const providerCode = providerFailureCode(error);
|
|
25
|
+
if (providerCode === "provider_auth_invalid" ||
|
|
26
|
+
providerCode === "provider_quota_or_billing_required" ||
|
|
27
|
+
providerCode === "provider_model_unavailable" ||
|
|
28
|
+
providerCode === "provider_not_configured") {
|
|
29
|
+
return `${subject} could not use model access. Ask the project owner to check the provider or account, then review available recovery actions. (${providerCode})`;
|
|
30
|
+
}
|
|
31
|
+
if (providerCode === "provider_rate_limited") {
|
|
32
|
+
return `${subject} stopped because the model service is busy. Wait, then review available recovery actions. (${providerCode})`;
|
|
33
|
+
}
|
|
34
|
+
return `${subject} could not complete. Review its status and available recovery actions before continuing. (${code})`;
|
|
21
35
|
}
|
|
22
36
|
//# sourceMappingURL=runtime-failures.js.map
|
|
@@ -4,7 +4,7 @@ import { requestExternalReferences } from "@tutti/relay-client";
|
|
|
4
4
|
import { isExternalReferenceList, isExternalReferenceReadResult, isExternalReferenceDescriptor, isReferenceAuthorizationRequired, } from "@tutti/shared/schemas/internal";
|
|
5
5
|
import { ExternalReferenceCache } from "../../reference-access/cache.js";
|
|
6
6
|
import { ExternalReferenceAccess, ReferenceAuthorizationRequiredError, } from "../../reference-access/service.js";
|
|
7
|
-
import { recordExternalReferenceRead } from "../../reference-access/read-evidence.js";
|
|
7
|
+
import { recordExternalReferenceRead, recordExternalReferenceAccessRequirement, } from "../../reference-access/read-evidence.js";
|
|
8
8
|
import { downloadStagedUploadWithResolver, cleanupDownloadedStagedUpload, } from "../http/routes/project-api/staged-uploads.js";
|
|
9
9
|
import { readHostRegistrationSecret } from "./machine-local.js";
|
|
10
10
|
export function createExternalReferenceRuntime(options) {
|
|
@@ -14,6 +14,7 @@ export function createExternalReferenceRuntime(options) {
|
|
|
14
14
|
if (!relay)
|
|
15
15
|
throw new Error("reference_host_offline");
|
|
16
16
|
const secret = readHostRegistrationSecret(preparation.tutti_home, preparation.project_id);
|
|
17
|
+
const requestRef = `eref_${randomUUID().replaceAll("-", "")}`;
|
|
17
18
|
const result = await requestExternalReferences({
|
|
18
19
|
relayUrl: preparation.relay_url,
|
|
19
20
|
body: {
|
|
@@ -22,15 +23,17 @@ export function createExternalReferenceRuntime(options) {
|
|
|
22
23
|
host_auth: { kind: "host_registration_secret_v1", secret: secret.secret },
|
|
23
24
|
relay_project_ref: relay.relay_project_ref,
|
|
24
25
|
host_connection_ref: relay.host_connection_ref,
|
|
25
|
-
request_ref:
|
|
26
|
+
request_ref: requestRef,
|
|
26
27
|
invocation_ref: invocation.reference_invocation_ref,
|
|
27
28
|
action,
|
|
28
29
|
...(sourceRef === undefined ? {} : { source_ref: sourceRef }),
|
|
29
30
|
...(documentUrl === undefined ? {} : { document_url: documentUrl }),
|
|
30
31
|
},
|
|
31
32
|
});
|
|
32
|
-
if (isReferenceAuthorizationRequired(result))
|
|
33
|
+
if (isReferenceAuthorizationRequired(result)) {
|
|
34
|
+
recordExternalReferenceAccessRequirement(options.store.db, invocation, requestRef, result.authorization);
|
|
33
35
|
throw new ReferenceAuthorizationRequiredError(result);
|
|
36
|
+
}
|
|
34
37
|
return result;
|
|
35
38
|
}
|
|
36
39
|
return new ExternalReferenceAccess({
|
|
@@ -464,7 +464,9 @@ export async function startForegroundHostServer(options) {
|
|
|
464
464
|
model: createManagedChatModel(managedRuntime, runtimeOptions),
|
|
465
465
|
};
|
|
466
466
|
if (resolution.kind !== "ready") {
|
|
467
|
-
throw new Error("Provider is not configured.")
|
|
467
|
+
throw Object.assign(new Error("Provider is not configured."), {
|
|
468
|
+
code: "provider_not_configured",
|
|
469
|
+
});
|
|
468
470
|
}
|
|
469
471
|
return await resolution.model.answer(input);
|
|
470
472
|
},
|
|
@@ -704,6 +706,7 @@ export async function startForegroundHostServer(options) {
|
|
|
704
706
|
workspaceRoot: options.preparation.workspace_root,
|
|
705
707
|
recoverInProgressCommands: true,
|
|
706
708
|
});
|
|
709
|
+
chatAssistant.start();
|
|
707
710
|
};
|
|
708
711
|
// Managed creation / reauthorization activates during Relay registration. Do
|
|
709
712
|
// not recover a stored task against a not-yet-activated native delegation.
|
|
@@ -66,6 +66,7 @@ export async function registerHostWithRelay(options) {
|
|
|
66
66
|
integration_development_bot_v1: true,
|
|
67
67
|
integration_clarification_v1: true,
|
|
68
68
|
feishu_supporting_reads_v1: true,
|
|
69
|
+
request_status_v1: true,
|
|
69
70
|
integration_external_references_v1: true,
|
|
70
71
|
integration_attachment_ingestion_v1: true,
|
|
71
72
|
integration_managed_reference_ingestion_v1: true,
|
|
@@ -1,11 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { MessageIdSchema } from "@tutti/shared/schemas/domain";
|
|
3
|
+
import { GetMessagesRequestSchema, ChatRequestStatusSchema, MessageWindowSchema, SendMainChatMessageBodySchema, SendMainChatMessageResponseSchema, } from "@tutti/shared/schemas/api";
|
|
2
4
|
import { createArtifactFeedbackMessage } from "../../../../artifact-feedback/index.js";
|
|
3
5
|
import { ingestMainChatMessage } from "../../../../collaboration-ingestion/index.js";
|
|
4
6
|
import { readMainChatMessageWindow } from "../../../../collaboration-state/index.js";
|
|
5
7
|
import { HOST_PROJECT_API_BASE_PATH } from "./constants.js";
|
|
6
8
|
import { requireValidMessageWindowRequest, requireValidSendMainChatPayload, } from "./payload-validation.js";
|
|
7
9
|
import { requireHostProjectSession, requireProjectStore, requireWorkspaceRoot, } from "./session-requirements.js";
|
|
10
|
+
import { HostProjectNotFoundError, HostProjectBadRequestError } from "./errors.js";
|
|
11
|
+
import { chatRequestStatus, readChatRequest } from "../../../../chat-assistant/requests.js";
|
|
8
12
|
export function registerMessagesRoutes(app, { options, workspaceEvents, artifactPreviewManager, }) {
|
|
13
|
+
app.get(`${HOST_PROJECT_API_BASE_PATH}/chat-requests/:messageId`, {
|
|
14
|
+
preValidation: (request, _reply, done) => done(Object.keys(request.query).length === 0
|
|
15
|
+
? undefined
|
|
16
|
+
: new HostProjectBadRequestError("Request status does not accept query parameters")),
|
|
17
|
+
schema: {
|
|
18
|
+
params: Type.Object({ messageId: MessageIdSchema }, { additionalProperties: false }),
|
|
19
|
+
querystring: Type.Object({}, { additionalProperties: false }),
|
|
20
|
+
response: { 200: ChatRequestStatusSchema },
|
|
21
|
+
},
|
|
22
|
+
}, (request, reply) => {
|
|
23
|
+
requireHostProjectSession(request, options);
|
|
24
|
+
reply.header("cache-control", "no-store");
|
|
25
|
+
const record = readChatRequest(requireProjectStore(options).db, request.params.messageId);
|
|
26
|
+
if (record === null)
|
|
27
|
+
throw new HostProjectNotFoundError();
|
|
28
|
+
return chatRequestStatus(record);
|
|
29
|
+
});
|
|
9
30
|
app.get(`${HOST_PROJECT_API_BASE_PATH}/messages`, {
|
|
10
31
|
schema: {
|
|
11
32
|
querystring: GetMessagesRequestSchema,
|
|
@@ -1,4 +1,139 @@
|
|
|
1
1
|
export declare const HOST_PROJECT_COLLABORATION_OPENAPI_ROUTES: ({
|
|
2
|
+
method: "get";
|
|
3
|
+
path: string;
|
|
4
|
+
summary: string;
|
|
5
|
+
tags: string[];
|
|
6
|
+
querystring: import("@sinclair/typebox").TObject<{
|
|
7
|
+
workflow_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
8
|
+
command_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
|
+
}>;
|
|
10
|
+
responses: {
|
|
11
|
+
200: {
|
|
12
|
+
description: string;
|
|
13
|
+
schema: import("@sinclair/typebox").TObject<{
|
|
14
|
+
request: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
15
|
+
status: import("@sinclair/typebox").TLiteral<"running">;
|
|
16
|
+
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">]>;
|
|
17
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
18
|
+
kind: import("@sinclair/typebox").TLiteral<"worklist_submit">;
|
|
19
|
+
ref: import("@sinclair/typebox").TString;
|
|
20
|
+
}>;
|
|
21
|
+
created_at: import("@sinclair/typebox").TString;
|
|
22
|
+
activity_ref: import("@sinclair/typebox").TString;
|
|
23
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
24
|
+
status: import("@sinclair/typebox").TLiteral<"waiting_input">;
|
|
25
|
+
phase: import("@sinclair/typebox").TLiteral<"clarification">;
|
|
26
|
+
round_id: import("@sinclair/typebox").TString;
|
|
27
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
28
|
+
kind: import("@sinclair/typebox").TLiteral<"worklist_submit">;
|
|
29
|
+
ref: import("@sinclair/typebox").TString;
|
|
30
|
+
}>;
|
|
31
|
+
created_at: import("@sinclair/typebox").TString;
|
|
32
|
+
activity_ref: import("@sinclair/typebox").TString;
|
|
33
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
34
|
+
status: import("@sinclair/typebox").TLiteral<"succeeded">;
|
|
35
|
+
phase: import("@sinclair/typebox").TLiteral<"settled">;
|
|
36
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
37
|
+
kind: import("@sinclair/typebox").TLiteral<"worklist_submit">;
|
|
38
|
+
ref: import("@sinclair/typebox").TString;
|
|
39
|
+
}>;
|
|
40
|
+
created_at: import("@sinclair/typebox").TString;
|
|
41
|
+
activity_ref: import("@sinclair/typebox").TString;
|
|
42
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
43
|
+
status: import("@sinclair/typebox").TLiteral<"failed">;
|
|
44
|
+
phase: import("@sinclair/typebox").TLiteral<"settled">;
|
|
45
|
+
failure: import("@sinclair/typebox").TObject<{
|
|
46
|
+
code: import("@sinclair/typebox").TString;
|
|
47
|
+
category: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"interrupted" | "capacity" | "access" | "configuration" | "dependency" | "internal">[]>;
|
|
48
|
+
recovery: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"resend_request" | "check_provider" | "restart_host" | "contact_support" | "none">[]>;
|
|
49
|
+
diagnostic_id: import("@sinclair/typebox").TString;
|
|
50
|
+
}>;
|
|
51
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
52
|
+
kind: import("@sinclair/typebox").TLiteral<"worklist_submit">;
|
|
53
|
+
ref: import("@sinclair/typebox").TString;
|
|
54
|
+
}>;
|
|
55
|
+
created_at: import("@sinclair/typebox").TString;
|
|
56
|
+
activity_ref: import("@sinclair/typebox").TString;
|
|
57
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
58
|
+
status: import("@sinclair/typebox").TLiteral<"unknown">;
|
|
59
|
+
phase: import("@sinclair/typebox").TLiteral<"unconfirmed">;
|
|
60
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
61
|
+
kind: import("@sinclair/typebox").TLiteral<"worklist_submit">;
|
|
62
|
+
ref: import("@sinclair/typebox").TString;
|
|
63
|
+
}>;
|
|
64
|
+
created_at: import("@sinclair/typebox").TString;
|
|
65
|
+
activity_ref: import("@sinclair/typebox").TString;
|
|
66
|
+
}>]>, import("@sinclair/typebox").TNull]>;
|
|
67
|
+
}>;
|
|
68
|
+
contentType?: never;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
parameters?: never;
|
|
72
|
+
requestBody?: never;
|
|
73
|
+
} | {
|
|
74
|
+
method: "get";
|
|
75
|
+
path: string;
|
|
76
|
+
summary: string;
|
|
77
|
+
tags: string[];
|
|
78
|
+
parameters: import("@tutti/shared/schemas/api").BrowserFacingOpenApiParameter[];
|
|
79
|
+
responses: {
|
|
80
|
+
200: {
|
|
81
|
+
description: string;
|
|
82
|
+
schema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
83
|
+
status: import("@sinclair/typebox").TLiteral<"queued">;
|
|
84
|
+
phase: import("@sinclair/typebox").TLiteral<"queue">;
|
|
85
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
86
|
+
kind: import("@sinclair/typebox").TLiteral<"chat_answer">;
|
|
87
|
+
ref: import("@sinclair/typebox").TString;
|
|
88
|
+
}>;
|
|
89
|
+
revision: import("@sinclair/typebox").TInteger;
|
|
90
|
+
created_at: import("@sinclair/typebox").TString;
|
|
91
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
92
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
93
|
+
status: import("@sinclair/typebox").TLiteral<"running">;
|
|
94
|
+
phase: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"workspace_wait">, import("@sinclair/typebox").TLiteral<"answer">]>;
|
|
95
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
96
|
+
kind: import("@sinclair/typebox").TLiteral<"chat_answer">;
|
|
97
|
+
ref: import("@sinclair/typebox").TString;
|
|
98
|
+
}>;
|
|
99
|
+
revision: import("@sinclair/typebox").TInteger;
|
|
100
|
+
created_at: import("@sinclair/typebox").TString;
|
|
101
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
102
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
103
|
+
status: import("@sinclair/typebox").TLiteral<"succeeded">;
|
|
104
|
+
phase: import("@sinclair/typebox").TLiteral<"settled">;
|
|
105
|
+
response_message_id: import("@sinclair/typebox").TString;
|
|
106
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
107
|
+
kind: import("@sinclair/typebox").TLiteral<"chat_answer">;
|
|
108
|
+
ref: import("@sinclair/typebox").TString;
|
|
109
|
+
}>;
|
|
110
|
+
revision: import("@sinclair/typebox").TInteger;
|
|
111
|
+
created_at: import("@sinclair/typebox").TString;
|
|
112
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
113
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
114
|
+
status: import("@sinclair/typebox").TLiteral<"failed">;
|
|
115
|
+
phase: import("@sinclair/typebox").TLiteral<"settled">;
|
|
116
|
+
failure: import("@sinclair/typebox").TObject<{
|
|
117
|
+
code: import("@sinclair/typebox").TString;
|
|
118
|
+
category: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"interrupted" | "capacity" | "access" | "configuration" | "dependency" | "internal">[]>;
|
|
119
|
+
recovery: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"resend_request" | "check_provider" | "restart_host" | "contact_support" | "none">[]>;
|
|
120
|
+
diagnostic_id: import("@sinclair/typebox").TString;
|
|
121
|
+
}>;
|
|
122
|
+
response_message_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
123
|
+
operation: import("@sinclair/typebox").TObject<{
|
|
124
|
+
kind: import("@sinclair/typebox").TLiteral<"chat_answer">;
|
|
125
|
+
ref: import("@sinclair/typebox").TString;
|
|
126
|
+
}>;
|
|
127
|
+
revision: import("@sinclair/typebox").TInteger;
|
|
128
|
+
created_at: import("@sinclair/typebox").TString;
|
|
129
|
+
updated_at: import("@sinclair/typebox").TString;
|
|
130
|
+
}>]>;
|
|
131
|
+
contentType?: never;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
querystring?: never;
|
|
135
|
+
requestBody?: never;
|
|
136
|
+
} | {
|
|
2
137
|
method: "get";
|
|
3
138
|
path: string;
|
|
4
139
|
summary: string;
|
|
@@ -17,8 +152,8 @@ export declare const HOST_PROJECT_COLLABORATION_OPENAPI_ROUTES: ({
|
|
|
17
152
|
contentType?: never;
|
|
18
153
|
};
|
|
19
154
|
};
|
|
20
|
-
requestBody?: never;
|
|
21
155
|
parameters?: never;
|
|
156
|
+
requestBody?: never;
|
|
22
157
|
} | {
|
|
23
158
|
method: "post";
|
|
24
159
|
path: string;
|
|
@@ -77,8 +212,8 @@ export declare const HOST_PROJECT_COLLABORATION_OPENAPI_ROUTES: ({
|
|
|
77
212
|
};
|
|
78
213
|
};
|
|
79
214
|
};
|
|
80
|
-
requestBody?: never;
|
|
81
215
|
parameters?: never;
|
|
216
|
+
requestBody?: never;
|
|
82
217
|
} | {
|
|
83
218
|
method: "get";
|
|
84
219
|
path: string;
|
|
@@ -123,8 +258,8 @@ export declare const HOST_PROJECT_COLLABORATION_OPENAPI_ROUTES: ({
|
|
|
123
258
|
};
|
|
124
259
|
};
|
|
125
260
|
querystring?: never;
|
|
126
|
-
requestBody?: never;
|
|
127
261
|
parameters?: never;
|
|
262
|
+
requestBody?: never;
|
|
128
263
|
} | {
|
|
129
264
|
method: "get";
|
|
130
265
|
path: string;
|
|
@@ -165,8 +300,8 @@ export declare const HOST_PROJECT_COLLABORATION_OPENAPI_ROUTES: ({
|
|
|
165
300
|
};
|
|
166
301
|
};
|
|
167
302
|
querystring?: never;
|
|
168
|
-
requestBody?: never;
|
|
169
303
|
parameters?: never;
|
|
304
|
+
requestBody?: never;
|
|
170
305
|
} | {
|
|
171
306
|
method: "post";
|
|
172
307
|
path: string;
|
|
@@ -294,8 +429,8 @@ export declare const HOST_PROJECT_COLLABORATION_OPENAPI_ROUTES: ({
|
|
|
294
429
|
};
|
|
295
430
|
};
|
|
296
431
|
querystring?: never;
|
|
297
|
-
requestBody?: never;
|
|
298
432
|
parameters?: never;
|
|
433
|
+
requestBody?: never;
|
|
299
434
|
} | {
|
|
300
435
|
method: "get";
|
|
301
436
|
path: string;
|
|
@@ -1,8 +1,35 @@
|
|
|
1
|
-
import { ActiveClarificationProjectionSchema, GetClarificationRoundMessagesRequestSchema, GetClarificationRoundResponseSchema, GetClarificationThreadResponseSchema, GetMessagesRequestSchema, MessageWindowSchema, RunSchedulerNowBodySchema, RunSchedulerNowResponseSchema, ScratchpadProjectionSchema, SendClarificationRoundMessageBodySchema, SendClarificationRoundMessageResponseSchema, SendMainChatMessageResponseSchema, SubmitClarificationRoundBodySchema, SubmitClarificationRoundResponseSchema, SubmitWorklistBodySchema, SubmitWorklistResponseSchema, WorklistProjectionSchema, } from "@tutti/shared/schemas/api";
|
|
1
|
+
import { ActiveClarificationProjectionSchema, ChatRequestStatusSchema, CurrentWorklistSubmissionSchema, WorklistSubmissionQuerySchema, GetClarificationRoundMessagesRequestSchema, GetClarificationRoundResponseSchema, GetClarificationThreadResponseSchema, GetMessagesRequestSchema, MessageWindowSchema, RunSchedulerNowBodySchema, RunSchedulerNowResponseSchema, ScratchpadProjectionSchema, SendClarificationRoundMessageBodySchema, SendClarificationRoundMessageResponseSchema, SendMainChatMessageResponseSchema, SubmitClarificationRoundBodySchema, SubmitClarificationRoundResponseSchema, SubmitWorklistBodySchema, SubmitWorklistResponseSchema, WorklistProjectionSchema, } from "@tutti/shared/schemas/api";
|
|
2
|
+
import { MessageIdSchema } from "@tutti/shared/schemas/domain";
|
|
2
3
|
import { HOST_PROJECT_API_BASE_PATH } from "./constants.js";
|
|
3
4
|
import { EventStreamResponseSchema, GetEventsRequestSchema, SendMainChatMessageBodySchema, } from "./schemas.js";
|
|
4
|
-
import { ClarificationRoundIdPathParameter, ClarificationThreadIdPathParameter, } from "./openapi-path-parameters.js";
|
|
5
|
+
import { ClarificationRoundIdPathParameter, pathParameter, ClarificationThreadIdPathParameter, } from "./openapi-path-parameters.js";
|
|
5
6
|
export const HOST_PROJECT_COLLABORATION_OPENAPI_ROUTES = [
|
|
7
|
+
{
|
|
8
|
+
method: "get",
|
|
9
|
+
path: `${HOST_PROJECT_API_BASE_PATH}/worklist/submission`,
|
|
10
|
+
summary: "Read the latest or identified Submit operation; acceptance is not completion.",
|
|
11
|
+
tags: ["worklist"],
|
|
12
|
+
querystring: WorklistSubmissionQuerySchema,
|
|
13
|
+
responses: {
|
|
14
|
+
200: {
|
|
15
|
+
description: "Submission evidence or null when not recorded.",
|
|
16
|
+
schema: CurrentWorklistSubmissionSchema,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
method: "get",
|
|
22
|
+
path: `${HOST_PROJECT_API_BASE_PATH}/chat-requests/{message_id}`,
|
|
23
|
+
summary: "Read a durable answer request by its trigger message id.",
|
|
24
|
+
tags: ["messages"],
|
|
25
|
+
parameters: [pathParameter("message_id", MessageIdSchema, "Original question message id.")],
|
|
26
|
+
responses: {
|
|
27
|
+
200: {
|
|
28
|
+
description: "Host processing status, not platform delivery status.",
|
|
29
|
+
schema: ChatRequestStatusSchema,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
6
33
|
{
|
|
7
34
|
method: "get",
|
|
8
35
|
path: `${HOST_PROJECT_API_BASE_PATH}/messages`,
|
|
@@ -25,6 +25,7 @@ export declare const HOST_PROJECT_SKILLS_OPENAPI_ROUTES: ({
|
|
|
25
25
|
message: import("@sinclair/typebox").TString;
|
|
26
26
|
retryable: import("@sinclair/typebox").TBoolean;
|
|
27
27
|
details: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
|
|
28
|
+
request_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
28
29
|
}>;
|
|
29
30
|
}>;
|
|
30
31
|
};
|
|
@@ -60,6 +61,7 @@ export declare const HOST_PROJECT_SKILLS_OPENAPI_ROUTES: ({
|
|
|
60
61
|
message: import("@sinclair/typebox").TString;
|
|
61
62
|
retryable: import("@sinclair/typebox").TBoolean;
|
|
62
63
|
details: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
|
|
64
|
+
request_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
63
65
|
}>;
|
|
64
66
|
}>;
|
|
65
67
|
};
|
|
@@ -575,6 +575,9 @@ export declare const HOST_PROJECT_WORKSPACE_OPENAPI_ROUTES: ({
|
|
|
575
575
|
readonly artifact_feedback: {
|
|
576
576
|
readonly type: "boolean";
|
|
577
577
|
};
|
|
578
|
+
readonly request_status_v1: {
|
|
579
|
+
readonly type: "boolean";
|
|
580
|
+
};
|
|
578
581
|
};
|
|
579
582
|
};
|
|
580
583
|
};
|
|
@@ -769,6 +772,9 @@ export declare const HOST_PROJECT_WORKSPACE_OPENAPI_ROUTES: ({
|
|
|
769
772
|
readonly artifact_feedback: {
|
|
770
773
|
readonly type: "boolean";
|
|
771
774
|
};
|
|
775
|
+
readonly request_status_v1: {
|
|
776
|
+
readonly type: "boolean";
|
|
777
|
+
};
|
|
772
778
|
};
|
|
773
779
|
};
|
|
774
780
|
};
|