@xfey/tutti 0.1.79 → 0.1.80
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/providers/openai/index.d.ts +1 -0
- package/dist/providers/openai/index.js +1 -0
- package/dist/providers/openai/machine-local-files.d.ts +1 -1
- package/dist/providers/openai/machine-local-files.js +32 -9
- package/dist/providers/openai/provider-config.d.ts +5 -1
- package/dist/providers/openai/provider-config.js +25 -4
- package/dist/providers/openai/provider-models.d.ts +41 -0
- package/dist/providers/openai/provider-models.js +82 -0
- package/dist/providers/openai/provider-setup.js +5 -2
- package/dist/server-shell/cli/host-server-runtime.d.ts +1 -1
- package/dist/server-shell/cli/host-server-runtime.js +63 -1
- package/dist/server-shell/http/routes/project-api/invalidations.d.ts +1 -0
- package/dist/server-shell/http/routes/project-api/invalidations.js +4 -5
- package/dist/server-shell/http/routes/project-api/openapi-workspace-routes.d.ts +38 -14
- package/dist/server-shell/http/routes/project-api/openapi-workspace-routes.js +26 -1
- package/dist/server-shell/http/routes/project-api/openapi.d.ts +38 -14
- package/dist/server-shell/http/routes/project-api/schemas.d.ts +8 -2
- package/dist/server-shell/http/routes/project-api/schemas.js +2 -0
- package/dist/server-shell/http/routes/project-api/session-requirements.d.ts +1 -0
- package/dist/server-shell/http/routes/project-api/session-requirements.js +7 -0
- package/dist/server-shell/http/routes/project-api/system-routes.js +96 -5
- package/dist/server-shell/http/routes/project-api/types.d.ts +10 -1
- package/dist/server-shell/http/routes/project-api/workspace-projections.js +4 -2
- package/dist/server-shell/http/routes/project-api.d.ts +1 -1
- 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/provider-config.d.ts +36 -0
- package/node_modules/@tutti/shared/dist/schemas/api/provider-config.js +58 -1
- package/node_modules/@tutti/shared/dist/schemas/api/types.d.ts +9 -1
- package/package.json +1 -1
- package/web/assets/{homepage-motion-scene-BFQnHtRi.js → homepage-motion-scene-DXzmjALa.js} +1 -1
- package/web/assets/{index-C4cdSaSb.js → index-9gApbtPC.js} +3 -3
- package/web/assets/index-BKeSEhsn.css +1 -0
- package/web/index.html +2 -2
- package/web/assets/index-BUfAlA_H.css +0 -1
|
@@ -1350,6 +1350,36 @@ export declare const HOST_PROJECT_OPENAPI_ROUTES: ({
|
|
|
1350
1350
|
};
|
|
1351
1351
|
};
|
|
1352
1352
|
requestBody?: never;
|
|
1353
|
+
} | {
|
|
1354
|
+
method: "get";
|
|
1355
|
+
path: string;
|
|
1356
|
+
summary: string;
|
|
1357
|
+
tags: string[];
|
|
1358
|
+
responses: {
|
|
1359
|
+
200: {
|
|
1360
|
+
description: string;
|
|
1361
|
+
schema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
1362
|
+
status: import("@sinclair/typebox").TLiteral<"available">;
|
|
1363
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
1364
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
1365
|
+
status: import("@sinclair/typebox").TLiteral<"unavailable">;
|
|
1366
|
+
reason: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"model_list_unavailable">, import("@sinclair/typebox").TLiteral<"model_list_empty">, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_not_configured">, import("@sinclair/typebox").TLiteral<"provider_config_invalid">, import("@sinclair/typebox").TLiteral<"provider_credential_missing">]>]>;
|
|
1367
|
+
}>]>;
|
|
1368
|
+
};
|
|
1369
|
+
};
|
|
1370
|
+
requestBody?: never;
|
|
1371
|
+
} | {
|
|
1372
|
+
method: "post";
|
|
1373
|
+
path: string;
|
|
1374
|
+
summary: string;
|
|
1375
|
+
tags: string[];
|
|
1376
|
+
requestBody: import("@sinclair/typebox").TSchema;
|
|
1377
|
+
responses: {
|
|
1378
|
+
200: {
|
|
1379
|
+
description: string;
|
|
1380
|
+
schema: import("@sinclair/typebox").TSchema;
|
|
1381
|
+
};
|
|
1382
|
+
};
|
|
1353
1383
|
} | {
|
|
1354
1384
|
method: "get";
|
|
1355
1385
|
path: string;
|
|
@@ -1829,7 +1859,7 @@ export declare const HOST_PROJECT_OPENAPI_ROUTES: ({
|
|
|
1829
1859
|
};
|
|
1830
1860
|
readonly capabilities: {
|
|
1831
1861
|
readonly type: "object";
|
|
1832
|
-
readonly required: readonly ["sse", "relay_join", "repo_viewer", "provider_config_query", "browser_secret_write", "task_auto_scheduler", "task_run_now_scheduler", "clarification"];
|
|
1862
|
+
readonly required: readonly ["sse", "relay_join", "repo_viewer", "provider_config_query", "provider_model_update", "browser_secret_write", "task_auto_scheduler", "task_run_now_scheduler", "clarification"];
|
|
1833
1863
|
readonly additionalProperties: false;
|
|
1834
1864
|
readonly properties: {
|
|
1835
1865
|
readonly sse: {
|
|
@@ -1844,6 +1874,9 @@ export declare const HOST_PROJECT_OPENAPI_ROUTES: ({
|
|
|
1844
1874
|
readonly provider_config_query: {
|
|
1845
1875
|
readonly type: "boolean";
|
|
1846
1876
|
};
|
|
1877
|
+
readonly provider_model_update: {
|
|
1878
|
+
readonly type: "boolean";
|
|
1879
|
+
};
|
|
1847
1880
|
readonly browser_secret_write: {
|
|
1848
1881
|
readonly type: "boolean";
|
|
1849
1882
|
readonly enum: readonly [false];
|
|
@@ -1864,18 +1897,6 @@ export declare const HOST_PROJECT_OPENAPI_ROUTES: ({
|
|
|
1864
1897
|
};
|
|
1865
1898
|
};
|
|
1866
1899
|
requestBody?: never;
|
|
1867
|
-
} | {
|
|
1868
|
-
method: "post";
|
|
1869
|
-
path: string;
|
|
1870
|
-
summary: string;
|
|
1871
|
-
tags: string[];
|
|
1872
|
-
requestBody: import("@sinclair/typebox").TSchema;
|
|
1873
|
-
responses: {
|
|
1874
|
-
200: {
|
|
1875
|
-
description: string;
|
|
1876
|
-
schema: import("@sinclair/typebox").TSchema;
|
|
1877
|
-
};
|
|
1878
|
-
};
|
|
1879
1900
|
} | {
|
|
1880
1901
|
method: "get";
|
|
1881
1902
|
path: string;
|
|
@@ -2029,7 +2050,7 @@ export declare const HOST_PROJECT_OPENAPI_ROUTES: ({
|
|
|
2029
2050
|
};
|
|
2030
2051
|
readonly capabilities: {
|
|
2031
2052
|
readonly type: "object";
|
|
2032
|
-
readonly required: readonly ["sse", "relay_join", "repo_viewer", "provider_config_query", "browser_secret_write", "task_auto_scheduler", "task_run_now_scheduler", "clarification"];
|
|
2053
|
+
readonly required: readonly ["sse", "relay_join", "repo_viewer", "provider_config_query", "provider_model_update", "browser_secret_write", "task_auto_scheduler", "task_run_now_scheduler", "clarification"];
|
|
2033
2054
|
readonly additionalProperties: false;
|
|
2034
2055
|
readonly properties: {
|
|
2035
2056
|
readonly sse: {
|
|
@@ -2044,6 +2065,9 @@ export declare const HOST_PROJECT_OPENAPI_ROUTES: ({
|
|
|
2044
2065
|
readonly provider_config_query: {
|
|
2045
2066
|
readonly type: "boolean";
|
|
2046
2067
|
};
|
|
2068
|
+
readonly provider_model_update: {
|
|
2069
|
+
readonly type: "boolean";
|
|
2070
|
+
};
|
|
2047
2071
|
readonly browser_secret_write: {
|
|
2048
2072
|
readonly type: "boolean";
|
|
2049
2073
|
readonly enum: readonly [false];
|
|
@@ -560,7 +560,7 @@ export declare const WorkspaceResponseSchema: {
|
|
|
560
560
|
};
|
|
561
561
|
readonly capabilities: {
|
|
562
562
|
readonly type: "object";
|
|
563
|
-
readonly required: readonly ["sse", "relay_join", "repo_viewer", "provider_config_query", "browser_secret_write", "task_auto_scheduler", "task_run_now_scheduler", "clarification"];
|
|
563
|
+
readonly required: readonly ["sse", "relay_join", "repo_viewer", "provider_config_query", "provider_model_update", "browser_secret_write", "task_auto_scheduler", "task_run_now_scheduler", "clarification"];
|
|
564
564
|
readonly additionalProperties: false;
|
|
565
565
|
readonly properties: {
|
|
566
566
|
readonly sse: {
|
|
@@ -575,6 +575,9 @@ export declare const WorkspaceResponseSchema: {
|
|
|
575
575
|
readonly provider_config_query: {
|
|
576
576
|
readonly type: "boolean";
|
|
577
577
|
};
|
|
578
|
+
readonly provider_model_update: {
|
|
579
|
+
readonly type: "boolean";
|
|
580
|
+
};
|
|
578
581
|
readonly browser_secret_write: {
|
|
579
582
|
readonly type: "boolean";
|
|
580
583
|
readonly enum: readonly [false];
|
|
@@ -737,7 +740,7 @@ export declare const BootstrapResponseSchema: {
|
|
|
737
740
|
};
|
|
738
741
|
readonly capabilities: {
|
|
739
742
|
readonly type: "object";
|
|
740
|
-
readonly required: readonly ["sse", "relay_join", "repo_viewer", "provider_config_query", "browser_secret_write", "task_auto_scheduler", "task_run_now_scheduler", "clarification"];
|
|
743
|
+
readonly required: readonly ["sse", "relay_join", "repo_viewer", "provider_config_query", "provider_model_update", "browser_secret_write", "task_auto_scheduler", "task_run_now_scheduler", "clarification"];
|
|
741
744
|
readonly additionalProperties: false;
|
|
742
745
|
readonly properties: {
|
|
743
746
|
readonly sse: {
|
|
@@ -752,6 +755,9 @@ export declare const BootstrapResponseSchema: {
|
|
|
752
755
|
readonly provider_config_query: {
|
|
753
756
|
readonly type: "boolean";
|
|
754
757
|
};
|
|
758
|
+
readonly provider_model_update: {
|
|
759
|
+
readonly type: "boolean";
|
|
760
|
+
};
|
|
755
761
|
readonly browser_secret_write: {
|
|
756
762
|
readonly type: "boolean";
|
|
757
763
|
readonly enum: readonly [false];
|
|
@@ -311,6 +311,7 @@ export const WorkspaceResponseSchema = {
|
|
|
311
311
|
"relay_join",
|
|
312
312
|
"repo_viewer",
|
|
313
313
|
"provider_config_query",
|
|
314
|
+
"provider_model_update",
|
|
314
315
|
"browser_secret_write",
|
|
315
316
|
"task_auto_scheduler",
|
|
316
317
|
"task_run_now_scheduler",
|
|
@@ -322,6 +323,7 @@ export const WorkspaceResponseSchema = {
|
|
|
322
323
|
relay_join: { type: "boolean" },
|
|
323
324
|
repo_viewer: { type: "boolean" },
|
|
324
325
|
provider_config_query: { type: "boolean" },
|
|
326
|
+
provider_model_update: { type: "boolean" },
|
|
325
327
|
browser_secret_write: { type: "boolean", enum: [false] },
|
|
326
328
|
task_auto_scheduler: { type: "boolean" },
|
|
327
329
|
task_run_now_scheduler: { type: "boolean" },
|
|
@@ -3,6 +3,7 @@ import type { Phase5ControlPlane } from "../../../../control-plane/index.js";
|
|
|
3
3
|
import type { HostProjectStore } from "../../../../store/index.js";
|
|
4
4
|
import type { HostProjectApiRouteOptions, HostSessionProjection } from "./types.js";
|
|
5
5
|
export declare function requireHostProjectSession(request: FastifyRequest, options: HostProjectApiRouteOptions): HostSessionProjection;
|
|
6
|
+
export declare function requireHostProjectOwnerSession(request: FastifyRequest, options: HostProjectApiRouteOptions): HostSessionProjection;
|
|
6
7
|
export declare function requireProjectStore(options: HostProjectApiRouteOptions): HostProjectStore;
|
|
7
8
|
export declare function requireControlPlane(options: HostProjectApiRouteOptions): Phase5ControlPlane;
|
|
8
9
|
export declare function requireWorkspaceRoot(options: HostProjectApiRouteOptions): string;
|
|
@@ -33,6 +33,13 @@ export function requireHostProjectSession(request, options) {
|
|
|
33
33
|
},
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
+
export function requireHostProjectOwnerSession(request, options) {
|
|
37
|
+
const session = requireHostProjectSession(request, options);
|
|
38
|
+
if (session.membership.label !== "owner") {
|
|
39
|
+
throw new HostProjectForbiddenError();
|
|
40
|
+
}
|
|
41
|
+
return session;
|
|
42
|
+
}
|
|
36
43
|
export function requireProjectStore(options) {
|
|
37
44
|
if (options.store === undefined) {
|
|
38
45
|
throw new HostProjectStoreUnavailableError();
|
|
@@ -1,13 +1,40 @@
|
|
|
1
|
-
import { UpdateProjectDescriptionBodySchema, UpdateProjectDescriptionResponseSchema, UpdateProjectDisplayNameBodySchema, UpdateProjectDisplayNameResponseSchema, } from "@tutti/shared/schemas/api";
|
|
1
|
+
import { UpdateProjectDescriptionBodySchema, UpdateProjectDescriptionResponseSchema, UpdateProjectDisplayNameBodySchema, UpdateProjectDisplayNameResponseSchema, GetProviderModelsResponseSchema, UpdateProviderDefaultModelBodySchema, UpdateProviderDefaultModelResponseSchema, } from "@tutti/shared/schemas/api";
|
|
2
2
|
import { BootstrapResponseSchema, GetEventsRequestSchema, OpenApiDocumentProjectionSchema, ProviderConfigProjectionSchema, ProviderUsageProjectionSchema, SessionResponseSchema, WorkspaceResponseSchema, } from "./schemas.js";
|
|
3
|
-
import { executeIdempotentCommand } from "../../../command-idempotency/index.js";
|
|
3
|
+
import { decideCommandIdempotencyReplay, executeIdempotentCommand, readCommandIdempotencyRecord, } from "../../../command-idempotency/index.js";
|
|
4
4
|
import { HOST_PROJECT_API_BASE_PATH } from "./constants.js";
|
|
5
|
+
import { HostProjectStoreUnavailableError } from "./errors.js";
|
|
5
6
|
import { openWorkspaceEventStream } from "./events-stream.js";
|
|
6
|
-
import { projectMetadataInvalidates } from "./invalidations.js";
|
|
7
|
+
import { projectMetadataInvalidates, providerConfigInvalidates } from "./invalidations.js";
|
|
7
8
|
import { buildHostProjectOpenApiDocument } from "./openapi.js";
|
|
8
9
|
import { requireValidProjectDescriptionPayload, requireValidProjectDisplayNamePayload, } from "./payload-validation.js";
|
|
9
|
-
import { requireHostProjectSession, requireProjectStore, } from "./session-requirements.js";
|
|
10
|
-
import { buildBootstrapSnapshots, resolveWorkspaceProjection
|
|
10
|
+
import { requireHostProjectSession, requireHostProjectOwnerSession, requireProjectStore, } from "./session-requirements.js";
|
|
11
|
+
import { buildBootstrapSnapshots, resolveWorkspaceProjection } from "./workspace-projections.js";
|
|
12
|
+
const providerModelCommandTails = new WeakMap();
|
|
13
|
+
async function withProviderModelCommandLock(options, operation) {
|
|
14
|
+
const previous = providerModelCommandTails.get(options) ?? Promise.resolve();
|
|
15
|
+
let release = () => { };
|
|
16
|
+
const current = new Promise((resolve) => {
|
|
17
|
+
release = resolve;
|
|
18
|
+
});
|
|
19
|
+
const tail = previous.then(() => current);
|
|
20
|
+
providerModelCommandTails.set(options, tail);
|
|
21
|
+
await previous;
|
|
22
|
+
try {
|
|
23
|
+
return await operation();
|
|
24
|
+
}
|
|
25
|
+
finally {
|
|
26
|
+
release();
|
|
27
|
+
if (providerModelCommandTails.get(options) === tail) {
|
|
28
|
+
providerModelCommandTails.delete(options);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function requireProviderModelService(options) {
|
|
33
|
+
if (options.providerModel === undefined) {
|
|
34
|
+
throw new HostProjectStoreUnavailableError();
|
|
35
|
+
}
|
|
36
|
+
return options.providerModel;
|
|
37
|
+
}
|
|
11
38
|
function updateProjectDisplayName(options, payload) {
|
|
12
39
|
const currentName = options.project.display_name;
|
|
13
40
|
const nextName = payload.display_name;
|
|
@@ -71,6 +98,70 @@ export function registerSystemRoutes(app, { options, workspaceEvents, }) {
|
|
|
71
98
|
requireHostProjectSession(request, options);
|
|
72
99
|
return options.getProviderConfig?.() ?? { status: "not_configured" };
|
|
73
100
|
});
|
|
101
|
+
app.get(`${HOST_PROJECT_API_BASE_PATH}/provider/models`, {
|
|
102
|
+
schema: {
|
|
103
|
+
response: {
|
|
104
|
+
200: GetProviderModelsResponseSchema,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
}, async (request) => {
|
|
108
|
+
requireHostProjectOwnerSession(request, options);
|
|
109
|
+
return await requireProviderModelService(options).discover();
|
|
110
|
+
});
|
|
111
|
+
app.post(`${HOST_PROJECT_API_BASE_PATH}/provider/default-model`, {
|
|
112
|
+
schema: {
|
|
113
|
+
body: UpdateProviderDefaultModelBodySchema,
|
|
114
|
+
response: {
|
|
115
|
+
200: UpdateProviderDefaultModelResponseSchema,
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
}, async (request) => {
|
|
119
|
+
requireHostProjectOwnerSession(request, options);
|
|
120
|
+
const store = requireProjectStore(options);
|
|
121
|
+
const providerModel = requireProviderModelService(options);
|
|
122
|
+
return await withProviderModelCommandLock(options, async () => {
|
|
123
|
+
const command = {
|
|
124
|
+
command_name: "provider.update_default_model",
|
|
125
|
+
target_ref: `provider:${options.project.project_id}`,
|
|
126
|
+
payload: request.body.payload,
|
|
127
|
+
};
|
|
128
|
+
const replay = decideCommandIdempotencyReplay(readCommandIdempotencyRecord(store.db, request.body.command_id), command);
|
|
129
|
+
const updated = replay.kind === "start" ? await providerModel.update(request.body.payload) : undefined;
|
|
130
|
+
const execution = executeIdempotentCommand({
|
|
131
|
+
db: store.db,
|
|
132
|
+
command_id: request.body.command_id,
|
|
133
|
+
...command,
|
|
134
|
+
...(options.now === undefined ? {} : { now: options.now }),
|
|
135
|
+
execute: () => {
|
|
136
|
+
if (updated === undefined) {
|
|
137
|
+
throw new Error("Provider model update was not prepared");
|
|
138
|
+
}
|
|
139
|
+
return {
|
|
140
|
+
disposition: updated.disposition,
|
|
141
|
+
...(updated.provider_config === undefined ? {} : { result: updated.provider_config }),
|
|
142
|
+
};
|
|
143
|
+
},
|
|
144
|
+
});
|
|
145
|
+
const shouldRefresh = execution.disposition.kind === "updated" ||
|
|
146
|
+
execution.disposition.kind === "stale_default_model";
|
|
147
|
+
const invalidates = shouldRefresh ? providerConfigInvalidates() : [];
|
|
148
|
+
const response = {
|
|
149
|
+
command_id: execution.command_id,
|
|
150
|
+
disposition: execution.disposition,
|
|
151
|
+
invalidates,
|
|
152
|
+
};
|
|
153
|
+
if (!execution.replayed &&
|
|
154
|
+
execution.disposition.kind === "updated" &&
|
|
155
|
+
execution.result?.status === "configured") {
|
|
156
|
+
workspaceEvents.publish({
|
|
157
|
+
event_type: "provider_config.changed",
|
|
158
|
+
payload: { provider_config: execution.result },
|
|
159
|
+
invalidates,
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
return response;
|
|
163
|
+
});
|
|
164
|
+
});
|
|
74
165
|
app.get(`${HOST_PROJECT_API_BASE_PATH}/provider/usage`, {
|
|
75
166
|
schema: {
|
|
76
167
|
response: {
|
|
@@ -8,7 +8,7 @@ import type { AccountAvatarProjection } from "@tutti/shared/domain";
|
|
|
8
8
|
import type { TrustedRelaySessionMetadataStore } from "../../../session/relay-session-context.js";
|
|
9
9
|
import type { WorkspaceEventBus } from "../../workspace-events.js";
|
|
10
10
|
import type { HOST_MAINLINE_BRANCH } from "./constants.js";
|
|
11
|
-
import type { ProviderUsageProjection, RelayUploadProjection } from "@tutti/shared/schemas/api";
|
|
11
|
+
import type { GetProviderModelsResponse, ProviderUsageProjection, RelayUploadProjection, UpdateProviderDefaultModelDisposition, UpdateProviderDefaultModelPayload } from "@tutti/shared/schemas/api";
|
|
12
12
|
export type ResolvedStagedUpload = {
|
|
13
13
|
upload: RelayUploadProjection;
|
|
14
14
|
get: {
|
|
@@ -67,11 +67,19 @@ export type HostProjectApiCapabilities = {
|
|
|
67
67
|
relay_join: boolean;
|
|
68
68
|
repo_viewer: boolean;
|
|
69
69
|
provider_config_query: boolean;
|
|
70
|
+
provider_model_update: boolean;
|
|
70
71
|
browser_secret_write: false;
|
|
71
72
|
task_auto_scheduler: boolean;
|
|
72
73
|
task_run_now_scheduler: boolean;
|
|
73
74
|
clarification: boolean;
|
|
74
75
|
};
|
|
76
|
+
export type HostProviderModelService = {
|
|
77
|
+
discover: () => Promise<GetProviderModelsResponse>;
|
|
78
|
+
update: (payload: UpdateProviderDefaultModelPayload) => Promise<{
|
|
79
|
+
disposition: UpdateProviderDefaultModelDisposition;
|
|
80
|
+
provider_config?: HostProviderConfigProjection;
|
|
81
|
+
}>;
|
|
82
|
+
};
|
|
75
83
|
export type HostProjectApiRouteOptions = {
|
|
76
84
|
artifactPreview?: Omit<ArtifactPreviewManagerOptions, "onStatusChange">;
|
|
77
85
|
artifactPreviewManager?: ArtifactPreviewManager;
|
|
@@ -98,6 +106,7 @@ export type HostProjectApiRouteOptions = {
|
|
|
98
106
|
chatAssistant?: ReadOnlyChatAssistantHandle;
|
|
99
107
|
tuttiHome?: string;
|
|
100
108
|
getProviderConfig?: () => HostProviderConfigProjection;
|
|
109
|
+
providerModel?: HostProviderModelService;
|
|
101
110
|
getProviderUsage?: () => ProviderUsageProjection;
|
|
102
111
|
capabilities?: Partial<Omit<HostProjectApiCapabilities, "browser_secret_write">>;
|
|
103
112
|
getRepo?: () => HostRepoProjection;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { createIdleExecutionStatusProjection, readActiveClarificationProjection, readMainChatMessageWindow, readReadStateSummary, readScratchpadProjection, readWorklistProjection, } from "../../../../collaboration-state/index.js";
|
|
2
2
|
import { readFreshVisibleJoinUrl } from "../../../cli/join-url.js";
|
|
3
3
|
import { HOST_MAINLINE_BRANCH } from "./constants.js";
|
|
4
|
-
function defaultCapabilities(
|
|
4
|
+
function defaultCapabilities(options) {
|
|
5
|
+
const overrides = options.capabilities;
|
|
5
6
|
return {
|
|
6
7
|
sse: overrides?.sse ?? true,
|
|
7
8
|
relay_join: overrides?.relay_join ?? true,
|
|
8
9
|
repo_viewer: overrides?.repo_viewer ?? false,
|
|
9
10
|
provider_config_query: overrides?.provider_config_query ?? true,
|
|
11
|
+
provider_model_update: overrides?.provider_model_update ?? options.providerModel !== undefined,
|
|
10
12
|
browser_secret_write: false,
|
|
11
13
|
task_auto_scheduler: overrides?.task_auto_scheduler ?? false,
|
|
12
14
|
task_run_now_scheduler: overrides?.task_run_now_scheduler ?? true,
|
|
@@ -52,7 +54,7 @@ export function buildWorkspaceProjection(options, relayState = options.relay.get
|
|
|
52
54
|
},
|
|
53
55
|
relay: workspaceRelayProjection(relayState, now),
|
|
54
56
|
provider: providerSummary(providerConfig),
|
|
55
|
-
capabilities: defaultCapabilities(options
|
|
57
|
+
capabilities: defaultCapabilities(options),
|
|
56
58
|
};
|
|
57
59
|
}
|
|
58
60
|
export async function resolveWorkspaceProjection(options) {
|
|
@@ -3,6 +3,6 @@ import type { HostProjectApiRouteOptions } from "./project-api/types.js";
|
|
|
3
3
|
export { HOST_PROJECT_API_BASE_PATH, HOST_MAINLINE_BRANCH } from "./project-api/constants.js";
|
|
4
4
|
export { HOST_PROJECT_OPENAPI_ROUTES, buildHostProjectOpenApiDocument, } from "./project-api/openapi.js";
|
|
5
5
|
export { readHostRepoProjection } from "./project-api/repo-projection.js";
|
|
6
|
-
export type { HostProjectApiCapabilities, HostProjectApiRouteOptions, HostProviderConfigProjection, HostRepoProjection, HostSessionProjection, HostWorkspaceProjection, HostWorkspaceRelayState, } from "./project-api/types.js";
|
|
6
|
+
export type { HostProjectApiCapabilities, HostProjectApiRouteOptions, HostProviderConfigProjection, HostProviderModelService, HostRepoProjection, HostSessionProjection, HostWorkspaceProjection, HostWorkspaceRelayState, } from "./project-api/types.js";
|
|
7
7
|
export declare function registerHostProjectApiRoutes(app: FastifyInstance, options: HostProjectApiRouteOptions): void;
|
|
8
8
|
//# sourceMappingURL=project-api.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./openapi.js";
|
|
2
2
|
export type * from "./types.js";
|
|
3
3
|
export { ApiErrorCodeSchema, ApiErrorResponseSchema, CommandDispositionBaseSchema, CursorPageRequestSchema, DEFAULT_SSE_REPLAY_WINDOW_POLICY, InterruptedCommandDispositionSchema, QueryInvalidationHintSchema, RelayInvalidationHintSchema, RelaySseEventTypeSchema, SseReplayWindowPolicySchema, WorkspaceSseEventTypeSchema, commandEnvelopeSchema, commandResponseSchema, commandResponseWithResultSchema, cursorPageSchema, relaySseEventSchema, timelineWindowSchema, workspaceSseEventSchema, } from "./primitives.js";
|
|
4
|
-
export { ProviderConfigInvalidReasonCodeSchema, ProviderConfigProjectionSchema, ProviderUnavailableReasonCodeSchema, } from "./provider-config.js";
|
|
4
|
+
export { GetProviderModelsResponseSchema, MAX_PROVIDER_MODEL_NAME_LENGTH, ProviderConfigInvalidReasonCodeSchema, ProviderConfigProjectionSchema, ProviderModelDiscoveryUnavailableReasonSchema, ProviderModelNameSchema, ProviderModelValidationFailureReasonSchema, ProviderUnavailableReasonCodeSchema, ProjectProviderUnavailableReasonSchema, UpdateProviderDefaultModelBodySchema, UpdateProviderDefaultModelDispositionSchema, UpdateProviderDefaultModelPayloadSchema, UpdateProviderDefaultModelResponseSchema, } from "./provider-config.js";
|
|
5
5
|
export { ProviderUsageBreakdownProjectionSchema, ProviderUsageCategorySchema, ProviderUsageModelSummaryProjectionSchema, ProviderUsageProjectionSchema, ProviderUsageSourceSummaryProjectionSchema, } from "./provider-usage.js";
|
|
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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./openapi.js";
|
|
2
2
|
export { ApiErrorCodeSchema, ApiErrorResponseSchema, CommandDispositionBaseSchema, CursorPageRequestSchema, DEFAULT_SSE_REPLAY_WINDOW_POLICY, InterruptedCommandDispositionSchema, QueryInvalidationHintSchema, RelayInvalidationHintSchema, RelaySseEventTypeSchema, SseReplayWindowPolicySchema, WorkspaceSseEventTypeSchema, commandEnvelopeSchema, commandResponseSchema, commandResponseWithResultSchema, cursorPageSchema, relaySseEventSchema, timelineWindowSchema, workspaceSseEventSchema, } from "./primitives.js";
|
|
3
|
-
export { ProviderConfigInvalidReasonCodeSchema, ProviderConfigProjectionSchema, ProviderUnavailableReasonCodeSchema, } from "./provider-config.js";
|
|
3
|
+
export { GetProviderModelsResponseSchema, MAX_PROVIDER_MODEL_NAME_LENGTH, ProviderConfigInvalidReasonCodeSchema, ProviderConfigProjectionSchema, ProviderModelDiscoveryUnavailableReasonSchema, ProviderModelNameSchema, ProviderModelValidationFailureReasonSchema, ProviderUnavailableReasonCodeSchema, ProjectProviderUnavailableReasonSchema, UpdateProviderDefaultModelBodySchema, UpdateProviderDefaultModelDispositionSchema, UpdateProviderDefaultModelPayloadSchema, UpdateProviderDefaultModelResponseSchema, } from "./provider-config.js";
|
|
4
4
|
export { ProviderUsageBreakdownProjectionSchema, ProviderUsageCategorySchema, ProviderUsageModelSummaryProjectionSchema, ProviderUsageProjectionSchema, ProviderUsageSourceSummaryProjectionSchema, } from "./provider-usage.js";
|
|
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";
|
|
@@ -1,5 +1,41 @@
|
|
|
1
|
+
export declare const MAX_PROVIDER_MODEL_NAME_LENGTH = 256;
|
|
2
|
+
export declare const ProviderModelNameSchema: import("@sinclair/typebox").TString;
|
|
1
3
|
export declare const ProviderConfigInvalidReasonCodeSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_auth_invalid">, import("@sinclair/typebox").TLiteral<"provider_quota_or_billing_required">, import("@sinclair/typebox").TLiteral<"provider_rate_limited">, import("@sinclair/typebox").TLiteral<"provider_model_unavailable">, import("@sinclair/typebox").TLiteral<"provider_network_error">, import("@sinclair/typebox").TLiteral<"unknown">]>;
|
|
2
4
|
export declare const ProviderUnavailableReasonCodeSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_auth_invalid">, import("@sinclair/typebox").TLiteral<"provider_quota_or_billing_required">, import("@sinclair/typebox").TLiteral<"provider_rate_limited">, import("@sinclair/typebox").TLiteral<"provider_model_unavailable">, import("@sinclair/typebox").TLiteral<"provider_network_error">, import("@sinclair/typebox").TLiteral<"unknown">]>;
|
|
5
|
+
export declare const ProviderModelValidationFailureReasonSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_auth_invalid">, import("@sinclair/typebox").TLiteral<"provider_quota_or_billing_required">, import("@sinclair/typebox").TLiteral<"provider_rate_limited">, import("@sinclair/typebox").TLiteral<"provider_model_unavailable">, import("@sinclair/typebox").TLiteral<"provider_network_error">]>;
|
|
6
|
+
export declare const ProjectProviderUnavailableReasonSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_not_configured">, import("@sinclair/typebox").TLiteral<"provider_config_invalid">, import("@sinclair/typebox").TLiteral<"provider_credential_missing">]>;
|
|
7
|
+
export declare const ProviderModelDiscoveryUnavailableReasonSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"model_list_unavailable">, import("@sinclair/typebox").TLiteral<"model_list_empty">, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_not_configured">, import("@sinclair/typebox").TLiteral<"provider_config_invalid">, import("@sinclair/typebox").TLiteral<"provider_credential_missing">]>]>;
|
|
8
|
+
export declare const GetProviderModelsResponseSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
9
|
+
status: import("@sinclair/typebox").TLiteral<"available">;
|
|
10
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
11
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
12
|
+
status: import("@sinclair/typebox").TLiteral<"unavailable">;
|
|
13
|
+
reason: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"model_list_unavailable">, import("@sinclair/typebox").TLiteral<"model_list_empty">, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_not_configured">, import("@sinclair/typebox").TLiteral<"provider_config_invalid">, import("@sinclair/typebox").TLiteral<"provider_credential_missing">]>]>;
|
|
14
|
+
}>]>;
|
|
15
|
+
export declare const UpdateProviderDefaultModelPayloadSchema: import("@sinclair/typebox").TObject<{
|
|
16
|
+
default_model: import("@sinclair/typebox").TString;
|
|
17
|
+
expected_default_model: import("@sinclair/typebox").TString;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const UpdateProviderDefaultModelDispositionSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
20
|
+
kind: import("@sinclair/typebox").TLiteral<"updated">;
|
|
21
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
22
|
+
kind: import("@sinclair/typebox").TLiteral<"unchanged">;
|
|
23
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
24
|
+
kind: import("@sinclair/typebox").TLiteral<"stale_default_model">;
|
|
25
|
+
current_default_model: import("@sinclair/typebox").TString;
|
|
26
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
27
|
+
kind: import("@sinclair/typebox").TLiteral<"validation_failed">;
|
|
28
|
+
reason: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_auth_invalid">, import("@sinclair/typebox").TLiteral<"provider_quota_or_billing_required">, import("@sinclair/typebox").TLiteral<"provider_rate_limited">, import("@sinclair/typebox").TLiteral<"provider_model_unavailable">, import("@sinclair/typebox").TLiteral<"provider_network_error">]>;
|
|
29
|
+
retryable: import("@sinclair/typebox").TBoolean;
|
|
30
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
31
|
+
kind: import("@sinclair/typebox").TLiteral<"provider_unavailable">;
|
|
32
|
+
reason: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_not_configured">, import("@sinclair/typebox").TLiteral<"provider_config_invalid">, import("@sinclair/typebox").TLiteral<"provider_credential_missing">]>;
|
|
33
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
34
|
+
kind: import("@sinclair/typebox").TLiteral<"interrupted">;
|
|
35
|
+
retry_with_new_command_id: import("@sinclair/typebox").TLiteral<true>;
|
|
36
|
+
}>]>;
|
|
37
|
+
export declare const UpdateProviderDefaultModelBodySchema: import("@sinclair/typebox").TSchema;
|
|
38
|
+
export declare const UpdateProviderDefaultModelResponseSchema: import("@sinclair/typebox").TSchema;
|
|
3
39
|
export declare const ProviderConfigProjectionSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
4
40
|
status: import("@sinclair/typebox").TLiteral<"not_configured">;
|
|
5
41
|
}>, import("@sinclair/typebox").TObject<{
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
2
|
import { IsoDateTimeStringSchema } from "../domain/index.js";
|
|
3
|
-
import { NonEmptyStringSchema } from "./primitives.js";
|
|
3
|
+
import { InterruptedCommandDispositionSchema, NonEmptyStringSchema, commandEnvelopeSchema, commandResponseSchema, } from "./primitives.js";
|
|
4
|
+
export const MAX_PROVIDER_MODEL_NAME_LENGTH = 256;
|
|
5
|
+
export const ProviderModelNameSchema = Type.String({
|
|
6
|
+
minLength: 1,
|
|
7
|
+
maxLength: MAX_PROVIDER_MODEL_NAME_LENGTH,
|
|
8
|
+
pattern: "^\\S(?:.*\\S)?$",
|
|
9
|
+
});
|
|
4
10
|
export const ProviderConfigInvalidReasonCodeSchema = Type.Union([
|
|
5
11
|
Type.Literal("provider_auth_invalid"),
|
|
6
12
|
Type.Literal("provider_quota_or_billing_required"),
|
|
@@ -10,6 +16,57 @@ export const ProviderConfigInvalidReasonCodeSchema = Type.Union([
|
|
|
10
16
|
Type.Literal("unknown"),
|
|
11
17
|
]);
|
|
12
18
|
export const ProviderUnavailableReasonCodeSchema = ProviderConfigInvalidReasonCodeSchema;
|
|
19
|
+
export const ProviderModelValidationFailureReasonSchema = Type.Union([
|
|
20
|
+
Type.Literal("provider_auth_invalid"),
|
|
21
|
+
Type.Literal("provider_quota_or_billing_required"),
|
|
22
|
+
Type.Literal("provider_rate_limited"),
|
|
23
|
+
Type.Literal("provider_model_unavailable"),
|
|
24
|
+
Type.Literal("provider_network_error"),
|
|
25
|
+
]);
|
|
26
|
+
export const ProjectProviderUnavailableReasonSchema = Type.Union([
|
|
27
|
+
Type.Literal("provider_not_configured"),
|
|
28
|
+
Type.Literal("provider_config_invalid"),
|
|
29
|
+
Type.Literal("provider_credential_missing"),
|
|
30
|
+
]);
|
|
31
|
+
export const ProviderModelDiscoveryUnavailableReasonSchema = Type.Union([
|
|
32
|
+
Type.Literal("model_list_unavailable"),
|
|
33
|
+
Type.Literal("model_list_empty"),
|
|
34
|
+
ProjectProviderUnavailableReasonSchema,
|
|
35
|
+
]);
|
|
36
|
+
export const GetProviderModelsResponseSchema = Type.Union([
|
|
37
|
+
Type.Object({
|
|
38
|
+
status: Type.Literal("available"),
|
|
39
|
+
models: Type.Array(ProviderModelNameSchema),
|
|
40
|
+
}, { additionalProperties: false }),
|
|
41
|
+
Type.Object({
|
|
42
|
+
status: Type.Literal("unavailable"),
|
|
43
|
+
reason: ProviderModelDiscoveryUnavailableReasonSchema,
|
|
44
|
+
}, { additionalProperties: false }),
|
|
45
|
+
]);
|
|
46
|
+
export const UpdateProviderDefaultModelPayloadSchema = Type.Object({
|
|
47
|
+
default_model: ProviderModelNameSchema,
|
|
48
|
+
expected_default_model: ProviderModelNameSchema,
|
|
49
|
+
}, { additionalProperties: false });
|
|
50
|
+
export const UpdateProviderDefaultModelDispositionSchema = Type.Union([
|
|
51
|
+
Type.Object({ kind: Type.Literal("updated") }, { additionalProperties: false }),
|
|
52
|
+
Type.Object({ kind: Type.Literal("unchanged") }, { additionalProperties: false }),
|
|
53
|
+
Type.Object({
|
|
54
|
+
kind: Type.Literal("stale_default_model"),
|
|
55
|
+
current_default_model: ProviderModelNameSchema,
|
|
56
|
+
}, { additionalProperties: false }),
|
|
57
|
+
Type.Object({
|
|
58
|
+
kind: Type.Literal("validation_failed"),
|
|
59
|
+
reason: ProviderModelValidationFailureReasonSchema,
|
|
60
|
+
retryable: Type.Boolean(),
|
|
61
|
+
}, { additionalProperties: false }),
|
|
62
|
+
Type.Object({
|
|
63
|
+
kind: Type.Literal("provider_unavailable"),
|
|
64
|
+
reason: ProjectProviderUnavailableReasonSchema,
|
|
65
|
+
}, { additionalProperties: false }),
|
|
66
|
+
InterruptedCommandDispositionSchema,
|
|
67
|
+
]);
|
|
68
|
+
export const UpdateProviderDefaultModelBodySchema = commandEnvelopeSchema(UpdateProviderDefaultModelPayloadSchema);
|
|
69
|
+
export const UpdateProviderDefaultModelResponseSchema = commandResponseSchema(UpdateProviderDefaultModelDispositionSchema);
|
|
13
70
|
export const ProviderConfigProjectionSchema = Type.Union([
|
|
14
71
|
Type.Object({ status: Type.Literal("not_configured") }, { additionalProperties: false }),
|
|
15
72
|
Type.Object({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Static } from "@sinclair/typebox";
|
|
2
2
|
import type { IdempotencyKeySchema, IsoDateTimeStringSchema } from "../domain/index.js";
|
|
3
3
|
import type { ApiErrorCodeSchema, ApiErrorResponseSchema, CommandDispositionBaseSchema, CursorPageRequestSchema, InterruptedCommandDispositionSchema, QueryInvalidationHintSchema, RelayInvalidationHintSchema, RelaySseEventTypeSchema, SseReplayWindowPolicySchema, WorkspaceSseEventTypeSchema } from "./primitives.js";
|
|
4
|
-
import type { ProviderConfigInvalidReasonCodeSchema, ProviderConfigProjectionSchema, ProviderUnavailableReasonCodeSchema } from "./provider-config.js";
|
|
4
|
+
import type { GetProviderModelsResponseSchema, ProviderConfigInvalidReasonCodeSchema, ProviderConfigProjectionSchema, ProviderModelDiscoveryUnavailableReasonSchema, ProviderModelNameSchema, ProviderModelValidationFailureReasonSchema, ProviderUnavailableReasonCodeSchema, ProjectProviderUnavailableReasonSchema, UpdateProviderDefaultModelDispositionSchema, UpdateProviderDefaultModelPayloadSchema } from "./provider-config.js";
|
|
5
5
|
import type { ProviderUsageBreakdownProjectionSchema, ProviderUsageCategorySchema, ProviderUsageModelSummaryProjectionSchema, ProviderUsageProjectionSchema, ProviderUsageSourceSummaryProjectionSchema } from "./provider-usage.js";
|
|
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";
|
|
@@ -54,6 +54,14 @@ export type WorkspaceSseEventType = Static<typeof WorkspaceSseEventTypeSchema>;
|
|
|
54
54
|
export type RelaySseEventType = Static<typeof RelaySseEventTypeSchema>;
|
|
55
55
|
export type SseReplayWindowPolicy = Static<typeof SseReplayWindowPolicySchema>;
|
|
56
56
|
export type ProviderConfigInvalidReasonCode = Static<typeof ProviderConfigInvalidReasonCodeSchema>;
|
|
57
|
+
export type ProviderModelName = Static<typeof ProviderModelNameSchema>;
|
|
58
|
+
export type ProviderModelValidationFailureReason = Static<typeof ProviderModelValidationFailureReasonSchema>;
|
|
59
|
+
export type ProjectProviderUnavailableReason = Static<typeof ProjectProviderUnavailableReasonSchema>;
|
|
60
|
+
export type ProviderModelDiscoveryUnavailableReason = Static<typeof ProviderModelDiscoveryUnavailableReasonSchema>;
|
|
61
|
+
export type GetProviderModelsResponse = Static<typeof GetProviderModelsResponseSchema>;
|
|
62
|
+
export type UpdateProviderDefaultModelPayload = Static<typeof UpdateProviderDefaultModelPayloadSchema>;
|
|
63
|
+
export type UpdateProviderDefaultModelDisposition = Static<typeof UpdateProviderDefaultModelDispositionSchema>;
|
|
64
|
+
export type UpdateProviderDefaultModelResponse = CommandResponse<UpdateProviderDefaultModelDisposition>;
|
|
57
65
|
export type ProviderUnavailableReasonCode = Static<typeof ProviderUnavailableReasonCodeSchema>;
|
|
58
66
|
export type ProviderConfigProjection = Static<typeof ProviderConfigProjectionSchema>;
|
|
59
67
|
export type ProviderUsageBreakdownProjection = Static<typeof ProviderUsageBreakdownProjectionSchema>;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,w as x,x as S,y as C}from"./index-C4cdSaSb.js";var w=e(`mouse-pointer-2`,[[`path`,{d:`M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z`,key:`edeuup`}]]),T=e(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),E=x();function D(e){return{"--reveal":e}}function O(e,t,n){let r=(e,t)=>Number.parseInt(e.slice(t,t+2),16),i=i=>Math.round(r(e,i)+(r(t,i)-r(e,i))*n).toString(16).padStart(2,`0`);return`#${i(1)}${i(3)}${i(5)}`}function k(e){let t=r((e-p.runEnd)/(p.executionComplete-p.runEnd));return t+t*t-t*t*t}function A({progress:e,children:t,className:n=``}){return(0,E.jsx)(`div`,{className:`scene-reveal ${n}`,style:D(e),children:t})}function j({progress:e,author:t,avatar:n,tone:r,timestamp:i,online:a=!1,assets:o,children:s}){return(0,E.jsxs)(`article`,{className:`scene-message`,style:D(e),children:[(0,E.jsx)(`span`,{className:`scene-avatar is-${r} ${n===`tutti`?`is-tutti`:``} ${a?`is-online`:``}`,"aria-hidden":`true`,children:n===`tutti`?(0,E.jsx)(`img`,{className:`scene-avatar-image`,src:o.tuttiAvatarSrc,alt:``}):(0,E.jsx)(`img`,{className:`scene-avatar-image`,src:o.humanAvatars[n],alt:``})}),(0,E.jsxs)(`div`,{className:`scene-message-copy`,children:[(0,E.jsxs)(`header`,{children:[(0,E.jsx)(`strong`,{children:t}),(0,E.jsx)(`span`,{children:i})]}),(0,E.jsx)(`p`,{children:s})]})]})}function M({time:e,assets:r}){let i=e>=p.artifactLive,a=e>=p.artifactClick,o=e>=p.runEnd&&e<p.executionComplete,u=d(e,p.runEnd,19.2),f=d(e,p.artifactLive,30.92);return(0,E.jsxs)(`aside`,{className:`scene-sidebar`,children:[(0,E.jsx)(`button`,{className:`scene-brand`,type:`button`,"aria-label":`Tutti`,tabIndex:-1,children:(0,E.jsx)(`img`,{src:r.logoSrc,alt:``})}),(0,E.jsxs)(`div`,{className:`scene-nav-stack`,children:[(0,E.jsxs)(`nav`,{className:`scene-nav`,"aria-label":`Workspace pages`,children:[(0,E.jsx)(`button`,{className:a?``:`is-active`,type:`button`,"aria-label":`Chat`,tabIndex:-1,children:(0,E.jsx)(c,{"aria-hidden":`true`})}),(0,E.jsx)(`button`,{type:`button`,"aria-label":`Worklist`,tabIndex:-1,children:(0,E.jsx)(b,{"aria-hidden":`true`})}),(0,E.jsxs)(`button`,{className:a?`is-active`:``,type:`button`,"aria-label":`Artifacts`,tabIndex:-1,children:[(0,E.jsx)(l,{"aria-hidden":`true`}),i?(0,E.jsx)(`span`,{className:`scene-live-pill`,style:D(f),children:`Live`}):null]}),(0,E.jsx)(`button`,{type:`button`,"aria-label":`References`,tabIndex:-1,children:(0,E.jsx)(C,{"aria-hidden":`true`})}),(0,E.jsx)(`button`,{type:`button`,"aria-label":`Skills`,tabIndex:-1,children:(0,E.jsx)(s,{"aria-hidden":`true`})}),(0,E.jsx)(`button`,{type:`button`,"aria-label":`Timeline`,tabIndex:-1,children:(0,E.jsx)(t,{"aria-hidden":`true`})})]}),o?(0,E.jsx)(`button`,{className:`scene-status-entry is-running`,style:D(u),type:`button`,"aria-label":`Task running`,tabIndex:-1,children:(0,E.jsx)(n,{"aria-hidden":`true`})}):null]}),(0,E.jsx)(`button`,{className:`scene-settings`,type:`button`,"aria-label":`Settings`,tabIndex:-1,children:(0,E.jsx)(h,{"aria-hidden":`true`})})]})}function N({time:e,assets:t}){let n=d(e,30.35,30.92);return(0,E.jsxs)(`section`,{className:`scene-panel scene-chat-panel`,children:[(0,E.jsxs)(`header`,{className:`scene-panel-header`,children:[(0,E.jsx)(`span`,{className:`scene-icon-tile`,children:(0,E.jsx)(c,{"aria-hidden":`true`})}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h2`,{children:`Morrow Studio`}),(0,E.jsx)(`p`,{children:`Ceramics storefront`})]}),(0,E.jsxs)(`span`,{className:`scene-members`,"aria-hidden":`true`,children:[(0,E.jsx)(`i`,{className:`is-green`,children:(0,E.jsx)(`img`,{className:`scene-avatar-image`,src:t.humanAvatars.fey,alt:``})}),(0,E.jsx)(`i`,{className:`is-blue`,children:(0,E.jsx)(`img`,{className:`scene-avatar-image`,src:t.humanAvatars.avery,alt:``})}),(0,E.jsx)(`i`,{className:`is-yellow`,children:(0,E.jsx)(`img`,{className:`scene-avatar-image`,src:t.humanAvatars.jun,alt:``})})]})]}),(0,E.jsxs)(`div`,{className:`scene-chat-stream`,children:[(0,E.jsx)(j,{progress:d(e,1.35,2.05),author:`Fey`,avatar:`fey`,tone:`green`,timestamp:`10:12`,online:!0,assets:t,children:`🏺 Let's build an online shop for our ceramics studio.`}),(0,E.jsx)(j,{progress:d(e,2.65,3.35),author:`Avery`,avatar:`avery`,tone:`blue`,timestamp:`10:13`,online:!0,assets:t,children:`✨ Keep it warm, minimal, and editorial.`}),(0,E.jsx)(j,{progress:d(e,3.95,4.65),author:`Jun`,avatar:`jun`,tone:`yellow`,timestamp:`10:14`,online:!0,assets:t,children:`🎨 Let people preview every piece in different glazes.`}),(0,E.jsx)(j,{progress:d(e,5.25,5.95),author:`Tutti`,avatar:`tutti`,tone:`green`,timestamp:`10:15`,assets:t,children:`Got it — I'll put it together. ✨`}),(0,E.jsxs)(`article`,{className:`scene-task-result`,style:D(n),children:[(0,E.jsx)(`span`,{className:`scene-task-result-rail`,"aria-hidden":`true`}),(0,E.jsx)(`span`,{className:`scene-task-result-icon`,"aria-hidden":`true`,children:(0,E.jsx)(S,{})}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`span`,{children:`Task completed`}),(0,E.jsx)(`strong`,{children:`Build ceramics storefront`}),(0,E.jsx)(`small`,{children:`Storefront`}),(0,E.jsx)(`p`,{children:`Warm editorial shopping and glaze previews are ready in Artifacts.`})]}),(0,E.jsx)(i,{className:`scene-task-result-chevron`,"aria-hidden":`true`})]})]}),(0,E.jsxs)(`div`,{className:`scene-composer`,"aria-hidden":`true`,children:[(0,E.jsx)(`span`,{children:`Write a message`}),(0,E.jsx)(T,{})]})]})}function P({progress:e,icon:t,children:n}){return(0,E.jsxs)(`div`,{className:`scene-scratchpad-row`,style:D(e),children:[(0,E.jsx)(`span`,{"aria-hidden":`true`,children:t}),(0,E.jsx)(`p`,{children:n})]})}function F({time:e}){return(0,E.jsxs)(`section`,{className:`scene-panel scene-scratchpad-panel`,style:{"--scratchpad-collapse":d(e,p.runEnd,19.18)},children:[(0,E.jsxs)(`header`,{className:`scene-panel-header`,children:[(0,E.jsx)(`span`,{className:`scene-icon-tile`,children:(0,E.jsx)(v,{"aria-hidden":`true`})}),(0,E.jsx)(`h2`,{children:`Scratchpad`})]}),(0,E.jsxs)(`div`,{className:`scene-scratchpad-body`,children:[(0,E.jsxs)(A,{progress:d(e,8.95,10),className:`scene-scratchpad-intro`,children:[(0,E.jsx)(`h3`,{children:`Ceramics storefront`}),(0,E.jsx)(`p`,{children:`A warm, editorial storefront for a small-batch studio, centered on tactile product discovery.`})]}),(0,E.jsx)(A,{progress:d(e,9.85,10.65),className:`scene-scratchpad-label`,children:`Confirmed`}),(0,E.jsx)(P,{progress:d(e,10.4,11.25),icon:(0,E.jsx)(S,{}),children:`Product-first editorial layout with generous space`}),(0,E.jsx)(P,{progress:d(e,11.2,12.05),icon:(0,E.jsx)(S,{}),children:`Warm neutrals with quiet serif headlines`}),(0,E.jsx)(P,{progress:d(e,12,12.85),icon:(0,E.jsx)(S,{}),children:`Keep the collection small, curated, and story-led`}),(0,E.jsx)(A,{progress:d(e,12.75,13.55),className:`scene-scratchpad-label`,children:`Requested feature`}),(0,E.jsx)(P,{progress:d(e,13.3,14.2),icon:(0,E.jsx)(o,{}),children:`Preview every piece in clay, sage, and ink glazes`})]}),(0,E.jsxs)(`footer`,{className:`scene-scratchpad-footer`,style:D(d(e,15.7,16.8)),children:[(0,E.jsxs)(`span`,{className:`scene-writing-mark`,children:[(0,E.jsx)(`strong`,{children:`Updated`}),(0,E.jsx)(`span`,{children:`just now`})]}),(0,E.jsxs)(`button`,{className:`scene-run-button`,type:`button`,tabIndex:-1,children:[(0,E.jsx)(f,{"aria-hidden":`true`}),(0,E.jsx)(`span`,{children:`Run`})]})]})]})}function I(e,t){let n=Math.max(0,Math.floor((e-t)*50/5)*5);return`${Math.floor(n/60)}m${(n%60).toString().padStart(2,`0`)}s`}function L({time:e,scoreSrc:t}){let r=d(e,18.92,19.2),i=_(e),a=i.id===`complete`,o={prepare:p.runEnd,implement:p.executionPrepareEnd,validate:p.executionImplementEnd,update:p.executionValidateEnd,complete:p.executionComplete}[i.id],s=d(e,o,o+.32),c=k(e);return(0,E.jsx)(`div`,{className:`scene-execution`,style:{"--reveal":r,"--stage-reveal":s},children:(0,E.jsxs)(`article`,{className:`homepage-motion-panel homepage-motion-execution-panel homepage-motion-execution-card is-score-${a?`complete`:`running`}`,children:[(0,E.jsx)(`header`,{className:`homepage-motion-panel-header`,children:(0,E.jsxs)(`div`,{className:`homepage-motion-panel-title`,children:[(0,E.jsx)(`span`,{className:`scene-icon-tile`,"aria-hidden":`true`,children:(0,E.jsx)(y,{})}),(0,E.jsx)(`h3`,{children:`Tutti is working on`})]})}),(0,E.jsxs)(`div`,{className:`homepage-motion-execution-body`,children:[(0,E.jsxs)(`div`,{className:`homepage-motion-execution-step homepage-motion-execution-stage is-${a?`complete`:`running`} has-marker`,children:[(0,E.jsx)(`span`,{className:`homepage-motion-execution-marker ${a?`is-done`:`is-running`}`,"aria-hidden":`true`,children:a?(0,E.jsx)(S,{}):(0,E.jsx)(n,{})}),(0,E.jsx)(`span`,{className:`homepage-motion-execution-step-content homepage-motion-execution-stage-copy`,children:(0,E.jsxs)(`span`,{className:`homepage-motion-execution-step-title`,children:[(0,E.jsx)(`span`,{className:`homepage-motion-execution-step-label`,children:i.label}),a?null:(0,E.jsx)(`span`,{className:`homepage-motion-execution-step-elapsed`,children:` (${I(e,o)})`})]})},i.id)]}),(0,E.jsx)(`div`,{className:`homepage-motion-running-score ${a?`is-complete`:``}`,role:`img`,"aria-label":`Ode to Joy score phrase`,children:(0,E.jsx)(`div`,{className:`homepage-motion-score-passage`,style:{"--score-translate-x":`${-395.3*c}px`},"aria-hidden":`true`,children:(0,E.jsx)(`img`,{src:t,alt:``,draggable:!1})})})]})]})})}function R({color:e,variant:t=`vase`,className:n=``}){let r={"--ceramic-color":e};return t===`cup`?(0,E.jsxs)(`svg`,{className:`ceramic-object is-cup ${n}`,viewBox:`0 0 260 260`,style:r,"aria-hidden":`true`,children:[(0,E.jsx)(`path`,{className:`ceramic-main`,d:`M54 64h132l-9 126c-2 26-20 42-46 42h-22c-26 0-44-16-46-42Z`}),(0,E.jsx)(`path`,{className:`ceramic-outline`,d:`M186 92h18c34 0 34 72 1 76h-27`}),(0,E.jsx)(`ellipse`,{className:`ceramic-rim`,cx:`120`,cy:`64`,rx:`66`,ry:`13`}),(0,E.jsx)(`path`,{className:`ceramic-highlight`,d:`M78 90c5 62 4 91 20 114`})]}):t===`bowl`?(0,E.jsxs)(`svg`,{className:`ceramic-object is-bowl ${n}`,viewBox:`0 0 300 220`,style:r,"aria-hidden":`true`,children:[(0,E.jsx)(`ellipse`,{className:`ceramic-rim`,cx:`150`,cy:`55`,rx:`116`,ry:`24`}),(0,E.jsx)(`path`,{className:`ceramic-main`,d:`M34 55c8 82 45 132 116 132S258 137 266 55c-42 25-190 25-232 0Z`}),(0,E.jsx)(`path`,{className:`ceramic-highlight`,d:`M72 82c18 45 40 70 70 82`}),(0,E.jsx)(`path`,{className:`ceramic-base`,d:`M112 185h76`})]}):(0,E.jsxs)(`svg`,{className:`ceramic-object is-vase ${n}`,viewBox:`0 0 320 420`,style:r,"aria-hidden":`true`,children:[(0,E.jsx)(`path`,{className:`ceramic-main`,d:`M116 56c7 38-17 61-36 96-31 56-28 157 5 199 33 42 117 42 150 0 33-42 36-143 5-199-19-35-43-58-36-96Z`}),(0,E.jsx)(`ellipse`,{className:`ceramic-rim`,cx:`160`,cy:`56`,rx:`44`,ry:`12`}),(0,E.jsx)(`ellipse`,{className:`ceramic-base`,cx:`160`,cy:`365`,rx:`66`,ry:`13`}),(0,E.jsx)(`path`,{className:`ceramic-highlight`,d:`M108 153c-25 64-23 145 1 185`})]})}function z({time:e}){let t=d(e,p.artifactClick,33.25),n=d(e,34.25,34.52),r=d(e,34.88,35.15),i=d(e,35.55,35.82),a=g(e),o=O(`#d9cbb4`,`#c56f4f`,n);e>=34.88&&(o=O(`#c56f4f`,`#6f9275`,r)),e>=35.55&&(o=O(`#6f9275`,`#243a46`,i));let s=e>=35.55?`ink`:e>=34.88?`sage`:e>=34.25?`clay`:null,c={"--artifact-scroll":a};return(0,E.jsxs)(`section`,{className:`scene-panel scene-artifact-panel`,style:D(t),children:[(0,E.jsxs)(`header`,{className:`scene-panel-header`,children:[(0,E.jsx)(`span`,{className:`scene-icon-tile`,children:(0,E.jsx)(l,{"aria-hidden":`true`})}),(0,E.jsx)(`h2`,{children:`Artifacts`}),(0,E.jsx)(`span`,{className:`scene-ready-tag`,children:`Ready`})]}),(0,E.jsx)(`div`,{className:`scene-artifact-canvas`,children:(0,E.jsxs)(`div`,{className:`artifact-page-frame`,style:c,children:[(0,E.jsxs)(`div`,{className:`artifact-page-nav`,children:[(0,E.jsx)(`strong`,{children:`Morrow`}),(0,E.jsx)(`span`,{children:`Objects · Journal · Studio`})]}),(0,E.jsxs)(`section`,{className:`artifact-hero`,children:[(0,E.jsxs)(`div`,{className:`artifact-hero-copy`,children:[(0,E.jsx)(`span`,{className:`artifact-eyebrow`,children:`Hand-finished in small batches`}),(0,E.jsx)(`h3`,{children:`Objects for slower days.`}),(0,E.jsx)(`p`,{children:`Quiet forms, warm glazes, and useful pieces made to live with.`}),(0,E.jsx)(`button`,{type:`button`,tabIndex:-1,children:`Explore the collection`})]}),(0,E.jsxs)(`div`,{className:`artifact-hero-object`,children:[(0,E.jsx)(R,{color:o}),(0,E.jsxs)(`div`,{className:`artifact-glaze-picker`,"aria-label":`Glaze preview`,children:[(0,E.jsx)(`span`,{children:`Glaze`}),(0,E.jsx)(`i`,{className:s===`clay`?`is-active is-clay`:`is-clay`}),(0,E.jsx)(`i`,{className:s===`sage`?`is-active is-sage`:`is-sage`}),(0,E.jsx)(`i`,{className:s===`ink`?`is-active is-ink`:`is-ink`})]})]})]}),(0,E.jsxs)(`section`,{className:`artifact-collection`,children:[(0,E.jsxs)(`header`,{children:[(0,E.jsx)(`span`,{children:`Selected pieces`}),(0,E.jsx)(`p`,{children:`Everyday forms shaped for the rituals around them.`})]}),(0,E.jsxs)(`div`,{className:`artifact-product-grid`,children:[(0,E.jsxs)(`article`,{children:[(0,E.jsx)(R,{color:`#b9785f`,variant:`cup`}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`strong`,{children:`Low cup`}),(0,E.jsx)(`span`,{children:`Rust glaze`})]})]}),(0,E.jsxs)(`article`,{children:[(0,E.jsx)(R,{color:`#819283`,variant:`vase`}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`strong`,{children:`Field vase`}),(0,E.jsx)(`span`,{children:`Sage glaze`})]})]}),(0,E.jsxs)(`article`,{children:[(0,E.jsx)(R,{color:`#d5c7af`,variant:`bowl`}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`strong`,{children:`Gather bowl`}),(0,E.jsx)(`span`,{children:`Flax glaze`})]})]})]})]}),(0,E.jsxs)(`section`,{className:`artifact-studio`,children:[(0,E.jsx)(`span`,{children:`Made by hand · Meant for every day`}),(0,E.jsx)(`h3`,{children:`Useful things can still feel special.`}),(0,E.jsx)(`p`,{children:`We make a small number of considered objects, slowly and close to home.`}),(0,E.jsx)(`button`,{type:`button`,tabIndex:-1,children:`Visit the studio`})]}),(0,E.jsxs)(`footer`,{className:`artifact-page-footer`,children:[(0,E.jsx)(`strong`,{children:`Morrow Ceramics`}),(0,E.jsx)(`span`,{className:`artifact-built-with`,children:`Built with Tutti.`}),(0,E.jsx)(`span`,{children:`Small batch · Est. 2026`})]})]})})]})}function B(e,t,n){return e+(t-e)*n}function V(e,t,n,r,i){let a=d(e,t,n,m);return{x:B(r.x,i.x,a),y:B(r.y,i.y,a)}}function H(e,t,n){return e<t||e>n?0:Math.sin(Math.PI*((e-t)/(n-t)))}function U(e){if(e>=p.runCursorStart&&e<18.92){let t=V(e,p.runCursorStart,p.runCursorArrive,{x:86,y:76},{x:94.25,y:94.2});return{visible:!0,x:t.x,y:t.y,clickPulse:H(e,p.runClickStart,p.runEnd)}}if(e>=31&&e<33.45){let t=V(e,31,32.22,{x:50,y:58},{x:4,y:22.85});return{visible:!0,x:t.x,y:t.y,clickPulse:H(e,32.28,32.6)}}if(e>=33.45&&e<35.95){let t={x:87.27,y:66.35},n={x:88.95,y:66.35},r={x:90.64,y:66.35},i;return i=e<34.15?V(e,33.45,34.15,{x:4,y:22.85},t):e<34.78?V(e,34.5,34.78,t,n):e<35.45?V(e,35.15,35.45,n,r):r,{visible:!0,x:i.x,y:i.y,clickPulse:Math.max(H(e,34.15,34.4),H(e,34.78,35.03),H(e,35.45,35.7))}}return{visible:!1,x:50,y:50,clickPulse:0}}function W({time:e,assets:t}){let n=u(e),r=U(e),i=a(e),o=d(e,.08,1.05,m);return(0,E.jsx)(`div`,{className:`motion-scene`,role:`img`,"aria-label":`Tutti workflow animation from team discussion to a generated ceramics storefront`,style:{opacity:i,visibility:i<=.001?`hidden`:`visible`},children:(0,E.jsxs)(`div`,{className:`motion-stage`,style:{opacity:o,transform:`translate(50%, 50%) scale(${n.scale}) translate(${-n.centerX*100}%, ${-n.centerY*100}%)`},children:[(0,E.jsx)(M,{time:e,assets:t}),(0,E.jsxs)(`div`,{className:`scene-workspace-layer`,children:[(0,E.jsx)(N,{time:e,assets:t}),(0,E.jsx)(F,{time:e}),(0,E.jsx)(L,{time:e,scoreSrc:t.scoreSrc})]}),(0,E.jsx)(z,{time:e}),(0,E.jsxs)(`span`,{className:`scene-cursor ${r.visible?`is-visible`:``}`,style:{left:`${r.x}%`,top:`${r.y}%`,"--click-pulse":r.clickPulse},"aria-hidden":`true`,children:[(0,E.jsx)(w,{}),(0,E.jsx)(`i`,{})]})]})})}export{W as HomepageMotionScene};
|
|
1
|
+
import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,w as x,x as S,y as C}from"./index-9gApbtPC.js";var w=e(`mouse-pointer-2`,[[`path`,{d:`M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z`,key:`edeuup`}]]),T=e(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),E=x();function D(e){return{"--reveal":e}}function O(e,t,n){let r=(e,t)=>Number.parseInt(e.slice(t,t+2),16),i=i=>Math.round(r(e,i)+(r(t,i)-r(e,i))*n).toString(16).padStart(2,`0`);return`#${i(1)}${i(3)}${i(5)}`}function k(e){let t=r((e-p.runEnd)/(p.executionComplete-p.runEnd));return t+t*t-t*t*t}function A({progress:e,children:t,className:n=``}){return(0,E.jsx)(`div`,{className:`scene-reveal ${n}`,style:D(e),children:t})}function j({progress:e,author:t,avatar:n,tone:r,timestamp:i,online:a=!1,assets:o,children:s}){return(0,E.jsxs)(`article`,{className:`scene-message`,style:D(e),children:[(0,E.jsx)(`span`,{className:`scene-avatar is-${r} ${n===`tutti`?`is-tutti`:``} ${a?`is-online`:``}`,"aria-hidden":`true`,children:n===`tutti`?(0,E.jsx)(`img`,{className:`scene-avatar-image`,src:o.tuttiAvatarSrc,alt:``}):(0,E.jsx)(`img`,{className:`scene-avatar-image`,src:o.humanAvatars[n],alt:``})}),(0,E.jsxs)(`div`,{className:`scene-message-copy`,children:[(0,E.jsxs)(`header`,{children:[(0,E.jsx)(`strong`,{children:t}),(0,E.jsx)(`span`,{children:i})]}),(0,E.jsx)(`p`,{children:s})]})]})}function M({time:e,assets:r}){let i=e>=p.artifactLive,a=e>=p.artifactClick,o=e>=p.runEnd&&e<p.executionComplete,u=d(e,p.runEnd,19.2),f=d(e,p.artifactLive,30.92);return(0,E.jsxs)(`aside`,{className:`scene-sidebar`,children:[(0,E.jsx)(`button`,{className:`scene-brand`,type:`button`,"aria-label":`Tutti`,tabIndex:-1,children:(0,E.jsx)(`img`,{src:r.logoSrc,alt:``})}),(0,E.jsxs)(`div`,{className:`scene-nav-stack`,children:[(0,E.jsxs)(`nav`,{className:`scene-nav`,"aria-label":`Workspace pages`,children:[(0,E.jsx)(`button`,{className:a?``:`is-active`,type:`button`,"aria-label":`Chat`,tabIndex:-1,children:(0,E.jsx)(c,{"aria-hidden":`true`})}),(0,E.jsx)(`button`,{type:`button`,"aria-label":`Worklist`,tabIndex:-1,children:(0,E.jsx)(b,{"aria-hidden":`true`})}),(0,E.jsxs)(`button`,{className:a?`is-active`:``,type:`button`,"aria-label":`Artifacts`,tabIndex:-1,children:[(0,E.jsx)(l,{"aria-hidden":`true`}),i?(0,E.jsx)(`span`,{className:`scene-live-pill`,style:D(f),children:`Live`}):null]}),(0,E.jsx)(`button`,{type:`button`,"aria-label":`References`,tabIndex:-1,children:(0,E.jsx)(C,{"aria-hidden":`true`})}),(0,E.jsx)(`button`,{type:`button`,"aria-label":`Skills`,tabIndex:-1,children:(0,E.jsx)(s,{"aria-hidden":`true`})}),(0,E.jsx)(`button`,{type:`button`,"aria-label":`Timeline`,tabIndex:-1,children:(0,E.jsx)(t,{"aria-hidden":`true`})})]}),o?(0,E.jsx)(`button`,{className:`scene-status-entry is-running`,style:D(u),type:`button`,"aria-label":`Task running`,tabIndex:-1,children:(0,E.jsx)(n,{"aria-hidden":`true`})}):null]}),(0,E.jsx)(`button`,{className:`scene-settings`,type:`button`,"aria-label":`Settings`,tabIndex:-1,children:(0,E.jsx)(h,{"aria-hidden":`true`})})]})}function N({time:e,assets:t}){let n=d(e,30.35,30.92);return(0,E.jsxs)(`section`,{className:`scene-panel scene-chat-panel`,children:[(0,E.jsxs)(`header`,{className:`scene-panel-header`,children:[(0,E.jsx)(`span`,{className:`scene-icon-tile`,children:(0,E.jsx)(c,{"aria-hidden":`true`})}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h2`,{children:`Morrow Studio`}),(0,E.jsx)(`p`,{children:`Ceramics storefront`})]}),(0,E.jsxs)(`span`,{className:`scene-members`,"aria-hidden":`true`,children:[(0,E.jsx)(`i`,{className:`is-green`,children:(0,E.jsx)(`img`,{className:`scene-avatar-image`,src:t.humanAvatars.fey,alt:``})}),(0,E.jsx)(`i`,{className:`is-blue`,children:(0,E.jsx)(`img`,{className:`scene-avatar-image`,src:t.humanAvatars.avery,alt:``})}),(0,E.jsx)(`i`,{className:`is-yellow`,children:(0,E.jsx)(`img`,{className:`scene-avatar-image`,src:t.humanAvatars.jun,alt:``})})]})]}),(0,E.jsxs)(`div`,{className:`scene-chat-stream`,children:[(0,E.jsx)(j,{progress:d(e,1.35,2.05),author:`Fey`,avatar:`fey`,tone:`green`,timestamp:`10:12`,online:!0,assets:t,children:`🏺 Let's build an online shop for our ceramics studio.`}),(0,E.jsx)(j,{progress:d(e,2.65,3.35),author:`Avery`,avatar:`avery`,tone:`blue`,timestamp:`10:13`,online:!0,assets:t,children:`✨ Keep it warm, minimal, and editorial.`}),(0,E.jsx)(j,{progress:d(e,3.95,4.65),author:`Jun`,avatar:`jun`,tone:`yellow`,timestamp:`10:14`,online:!0,assets:t,children:`🎨 Let people preview every piece in different glazes.`}),(0,E.jsx)(j,{progress:d(e,5.25,5.95),author:`Tutti`,avatar:`tutti`,tone:`green`,timestamp:`10:15`,assets:t,children:`Got it — I'll put it together. ✨`}),(0,E.jsxs)(`article`,{className:`scene-task-result`,style:D(n),children:[(0,E.jsx)(`span`,{className:`scene-task-result-rail`,"aria-hidden":`true`}),(0,E.jsx)(`span`,{className:`scene-task-result-icon`,"aria-hidden":`true`,children:(0,E.jsx)(S,{})}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`span`,{children:`Task completed`}),(0,E.jsx)(`strong`,{children:`Build ceramics storefront`}),(0,E.jsx)(`small`,{children:`Storefront`}),(0,E.jsx)(`p`,{children:`Warm editorial shopping and glaze previews are ready in Artifacts.`})]}),(0,E.jsx)(i,{className:`scene-task-result-chevron`,"aria-hidden":`true`})]})]}),(0,E.jsxs)(`div`,{className:`scene-composer`,"aria-hidden":`true`,children:[(0,E.jsx)(`span`,{children:`Write a message`}),(0,E.jsx)(T,{})]})]})}function P({progress:e,icon:t,children:n}){return(0,E.jsxs)(`div`,{className:`scene-scratchpad-row`,style:D(e),children:[(0,E.jsx)(`span`,{"aria-hidden":`true`,children:t}),(0,E.jsx)(`p`,{children:n})]})}function F({time:e}){return(0,E.jsxs)(`section`,{className:`scene-panel scene-scratchpad-panel`,style:{"--scratchpad-collapse":d(e,p.runEnd,19.18)},children:[(0,E.jsxs)(`header`,{className:`scene-panel-header`,children:[(0,E.jsx)(`span`,{className:`scene-icon-tile`,children:(0,E.jsx)(v,{"aria-hidden":`true`})}),(0,E.jsx)(`h2`,{children:`Scratchpad`})]}),(0,E.jsxs)(`div`,{className:`scene-scratchpad-body`,children:[(0,E.jsxs)(A,{progress:d(e,8.95,10),className:`scene-scratchpad-intro`,children:[(0,E.jsx)(`h3`,{children:`Ceramics storefront`}),(0,E.jsx)(`p`,{children:`A warm, editorial storefront for a small-batch studio, centered on tactile product discovery.`})]}),(0,E.jsx)(A,{progress:d(e,9.85,10.65),className:`scene-scratchpad-label`,children:`Confirmed`}),(0,E.jsx)(P,{progress:d(e,10.4,11.25),icon:(0,E.jsx)(S,{}),children:`Product-first editorial layout with generous space`}),(0,E.jsx)(P,{progress:d(e,11.2,12.05),icon:(0,E.jsx)(S,{}),children:`Warm neutrals with quiet serif headlines`}),(0,E.jsx)(P,{progress:d(e,12,12.85),icon:(0,E.jsx)(S,{}),children:`Keep the collection small, curated, and story-led`}),(0,E.jsx)(A,{progress:d(e,12.75,13.55),className:`scene-scratchpad-label`,children:`Requested feature`}),(0,E.jsx)(P,{progress:d(e,13.3,14.2),icon:(0,E.jsx)(o,{}),children:`Preview every piece in clay, sage, and ink glazes`})]}),(0,E.jsxs)(`footer`,{className:`scene-scratchpad-footer`,style:D(d(e,15.7,16.8)),children:[(0,E.jsxs)(`span`,{className:`scene-writing-mark`,children:[(0,E.jsx)(`strong`,{children:`Updated`}),(0,E.jsx)(`span`,{children:`just now`})]}),(0,E.jsxs)(`button`,{className:`scene-run-button`,type:`button`,tabIndex:-1,children:[(0,E.jsx)(f,{"aria-hidden":`true`}),(0,E.jsx)(`span`,{children:`Run`})]})]})]})}function I(e,t){let n=Math.max(0,Math.floor((e-t)*50/5)*5);return`${Math.floor(n/60)}m${(n%60).toString().padStart(2,`0`)}s`}function L({time:e,scoreSrc:t}){let r=d(e,18.92,19.2),i=_(e),a=i.id===`complete`,o={prepare:p.runEnd,implement:p.executionPrepareEnd,validate:p.executionImplementEnd,update:p.executionValidateEnd,complete:p.executionComplete}[i.id],s=d(e,o,o+.32),c=k(e);return(0,E.jsx)(`div`,{className:`scene-execution`,style:{"--reveal":r,"--stage-reveal":s},children:(0,E.jsxs)(`article`,{className:`homepage-motion-panel homepage-motion-execution-panel homepage-motion-execution-card is-score-${a?`complete`:`running`}`,children:[(0,E.jsx)(`header`,{className:`homepage-motion-panel-header`,children:(0,E.jsxs)(`div`,{className:`homepage-motion-panel-title`,children:[(0,E.jsx)(`span`,{className:`scene-icon-tile`,"aria-hidden":`true`,children:(0,E.jsx)(y,{})}),(0,E.jsx)(`h3`,{children:`Tutti is working on`})]})}),(0,E.jsxs)(`div`,{className:`homepage-motion-execution-body`,children:[(0,E.jsxs)(`div`,{className:`homepage-motion-execution-step homepage-motion-execution-stage is-${a?`complete`:`running`} has-marker`,children:[(0,E.jsx)(`span`,{className:`homepage-motion-execution-marker ${a?`is-done`:`is-running`}`,"aria-hidden":`true`,children:a?(0,E.jsx)(S,{}):(0,E.jsx)(n,{})}),(0,E.jsx)(`span`,{className:`homepage-motion-execution-step-content homepage-motion-execution-stage-copy`,children:(0,E.jsxs)(`span`,{className:`homepage-motion-execution-step-title`,children:[(0,E.jsx)(`span`,{className:`homepage-motion-execution-step-label`,children:i.label}),a?null:(0,E.jsx)(`span`,{className:`homepage-motion-execution-step-elapsed`,children:` (${I(e,o)})`})]})},i.id)]}),(0,E.jsx)(`div`,{className:`homepage-motion-running-score ${a?`is-complete`:``}`,role:`img`,"aria-label":`Ode to Joy score phrase`,children:(0,E.jsx)(`div`,{className:`homepage-motion-score-passage`,style:{"--score-translate-x":`${-395.3*c}px`},"aria-hidden":`true`,children:(0,E.jsx)(`img`,{src:t,alt:``,draggable:!1})})})]})]})})}function R({color:e,variant:t=`vase`,className:n=``}){let r={"--ceramic-color":e};return t===`cup`?(0,E.jsxs)(`svg`,{className:`ceramic-object is-cup ${n}`,viewBox:`0 0 260 260`,style:r,"aria-hidden":`true`,children:[(0,E.jsx)(`path`,{className:`ceramic-main`,d:`M54 64h132l-9 126c-2 26-20 42-46 42h-22c-26 0-44-16-46-42Z`}),(0,E.jsx)(`path`,{className:`ceramic-outline`,d:`M186 92h18c34 0 34 72 1 76h-27`}),(0,E.jsx)(`ellipse`,{className:`ceramic-rim`,cx:`120`,cy:`64`,rx:`66`,ry:`13`}),(0,E.jsx)(`path`,{className:`ceramic-highlight`,d:`M78 90c5 62 4 91 20 114`})]}):t===`bowl`?(0,E.jsxs)(`svg`,{className:`ceramic-object is-bowl ${n}`,viewBox:`0 0 300 220`,style:r,"aria-hidden":`true`,children:[(0,E.jsx)(`ellipse`,{className:`ceramic-rim`,cx:`150`,cy:`55`,rx:`116`,ry:`24`}),(0,E.jsx)(`path`,{className:`ceramic-main`,d:`M34 55c8 82 45 132 116 132S258 137 266 55c-42 25-190 25-232 0Z`}),(0,E.jsx)(`path`,{className:`ceramic-highlight`,d:`M72 82c18 45 40 70 70 82`}),(0,E.jsx)(`path`,{className:`ceramic-base`,d:`M112 185h76`})]}):(0,E.jsxs)(`svg`,{className:`ceramic-object is-vase ${n}`,viewBox:`0 0 320 420`,style:r,"aria-hidden":`true`,children:[(0,E.jsx)(`path`,{className:`ceramic-main`,d:`M116 56c7 38-17 61-36 96-31 56-28 157 5 199 33 42 117 42 150 0 33-42 36-143 5-199-19-35-43-58-36-96Z`}),(0,E.jsx)(`ellipse`,{className:`ceramic-rim`,cx:`160`,cy:`56`,rx:`44`,ry:`12`}),(0,E.jsx)(`ellipse`,{className:`ceramic-base`,cx:`160`,cy:`365`,rx:`66`,ry:`13`}),(0,E.jsx)(`path`,{className:`ceramic-highlight`,d:`M108 153c-25 64-23 145 1 185`})]})}function z({time:e}){let t=d(e,p.artifactClick,33.25),n=d(e,34.25,34.52),r=d(e,34.88,35.15),i=d(e,35.55,35.82),a=g(e),o=O(`#d9cbb4`,`#c56f4f`,n);e>=34.88&&(o=O(`#c56f4f`,`#6f9275`,r)),e>=35.55&&(o=O(`#6f9275`,`#243a46`,i));let s=e>=35.55?`ink`:e>=34.88?`sage`:e>=34.25?`clay`:null,c={"--artifact-scroll":a};return(0,E.jsxs)(`section`,{className:`scene-panel scene-artifact-panel`,style:D(t),children:[(0,E.jsxs)(`header`,{className:`scene-panel-header`,children:[(0,E.jsx)(`span`,{className:`scene-icon-tile`,children:(0,E.jsx)(l,{"aria-hidden":`true`})}),(0,E.jsx)(`h2`,{children:`Artifacts`}),(0,E.jsx)(`span`,{className:`scene-ready-tag`,children:`Ready`})]}),(0,E.jsx)(`div`,{className:`scene-artifact-canvas`,children:(0,E.jsxs)(`div`,{className:`artifact-page-frame`,style:c,children:[(0,E.jsxs)(`div`,{className:`artifact-page-nav`,children:[(0,E.jsx)(`strong`,{children:`Morrow`}),(0,E.jsx)(`span`,{children:`Objects · Journal · Studio`})]}),(0,E.jsxs)(`section`,{className:`artifact-hero`,children:[(0,E.jsxs)(`div`,{className:`artifact-hero-copy`,children:[(0,E.jsx)(`span`,{className:`artifact-eyebrow`,children:`Hand-finished in small batches`}),(0,E.jsx)(`h3`,{children:`Objects for slower days.`}),(0,E.jsx)(`p`,{children:`Quiet forms, warm glazes, and useful pieces made to live with.`}),(0,E.jsx)(`button`,{type:`button`,tabIndex:-1,children:`Explore the collection`})]}),(0,E.jsxs)(`div`,{className:`artifact-hero-object`,children:[(0,E.jsx)(R,{color:o}),(0,E.jsxs)(`div`,{className:`artifact-glaze-picker`,"aria-label":`Glaze preview`,children:[(0,E.jsx)(`span`,{children:`Glaze`}),(0,E.jsx)(`i`,{className:s===`clay`?`is-active is-clay`:`is-clay`}),(0,E.jsx)(`i`,{className:s===`sage`?`is-active is-sage`:`is-sage`}),(0,E.jsx)(`i`,{className:s===`ink`?`is-active is-ink`:`is-ink`})]})]})]}),(0,E.jsxs)(`section`,{className:`artifact-collection`,children:[(0,E.jsxs)(`header`,{children:[(0,E.jsx)(`span`,{children:`Selected pieces`}),(0,E.jsx)(`p`,{children:`Everyday forms shaped for the rituals around them.`})]}),(0,E.jsxs)(`div`,{className:`artifact-product-grid`,children:[(0,E.jsxs)(`article`,{children:[(0,E.jsx)(R,{color:`#b9785f`,variant:`cup`}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`strong`,{children:`Low cup`}),(0,E.jsx)(`span`,{children:`Rust glaze`})]})]}),(0,E.jsxs)(`article`,{children:[(0,E.jsx)(R,{color:`#819283`,variant:`vase`}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`strong`,{children:`Field vase`}),(0,E.jsx)(`span`,{children:`Sage glaze`})]})]}),(0,E.jsxs)(`article`,{children:[(0,E.jsx)(R,{color:`#d5c7af`,variant:`bowl`}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`strong`,{children:`Gather bowl`}),(0,E.jsx)(`span`,{children:`Flax glaze`})]})]})]})]}),(0,E.jsxs)(`section`,{className:`artifact-studio`,children:[(0,E.jsx)(`span`,{children:`Made by hand · Meant for every day`}),(0,E.jsx)(`h3`,{children:`Useful things can still feel special.`}),(0,E.jsx)(`p`,{children:`We make a small number of considered objects, slowly and close to home.`}),(0,E.jsx)(`button`,{type:`button`,tabIndex:-1,children:`Visit the studio`})]}),(0,E.jsxs)(`footer`,{className:`artifact-page-footer`,children:[(0,E.jsx)(`strong`,{children:`Morrow Ceramics`}),(0,E.jsx)(`span`,{className:`artifact-built-with`,children:`Built with Tutti.`}),(0,E.jsx)(`span`,{children:`Small batch · Est. 2026`})]})]})})]})}function B(e,t,n){return e+(t-e)*n}function V(e,t,n,r,i){let a=d(e,t,n,m);return{x:B(r.x,i.x,a),y:B(r.y,i.y,a)}}function H(e,t,n){return e<t||e>n?0:Math.sin(Math.PI*((e-t)/(n-t)))}function U(e){if(e>=p.runCursorStart&&e<18.92){let t=V(e,p.runCursorStart,p.runCursorArrive,{x:86,y:76},{x:94.25,y:94.2});return{visible:!0,x:t.x,y:t.y,clickPulse:H(e,p.runClickStart,p.runEnd)}}if(e>=31&&e<33.45){let t=V(e,31,32.22,{x:50,y:58},{x:4,y:22.85});return{visible:!0,x:t.x,y:t.y,clickPulse:H(e,32.28,32.6)}}if(e>=33.45&&e<35.95){let t={x:87.27,y:66.35},n={x:88.95,y:66.35},r={x:90.64,y:66.35},i;return i=e<34.15?V(e,33.45,34.15,{x:4,y:22.85},t):e<34.78?V(e,34.5,34.78,t,n):e<35.45?V(e,35.15,35.45,n,r):r,{visible:!0,x:i.x,y:i.y,clickPulse:Math.max(H(e,34.15,34.4),H(e,34.78,35.03),H(e,35.45,35.7))}}return{visible:!1,x:50,y:50,clickPulse:0}}function W({time:e,assets:t}){let n=u(e),r=U(e),i=a(e),o=d(e,.08,1.05,m);return(0,E.jsx)(`div`,{className:`motion-scene`,role:`img`,"aria-label":`Tutti workflow animation from team discussion to a generated ceramics storefront`,style:{opacity:i,visibility:i<=.001?`hidden`:`visible`},children:(0,E.jsxs)(`div`,{className:`motion-stage`,style:{opacity:o,transform:`translate(50%, 50%) scale(${n.scale}) translate(${-n.centerX*100}%, ${-n.centerY*100}%)`},children:[(0,E.jsx)(M,{time:e,assets:t}),(0,E.jsxs)(`div`,{className:`scene-workspace-layer`,children:[(0,E.jsx)(N,{time:e,assets:t}),(0,E.jsx)(F,{time:e}),(0,E.jsx)(L,{time:e,scoreSrc:t.scoreSrc})]}),(0,E.jsx)(z,{time:e}),(0,E.jsxs)(`span`,{className:`scene-cursor ${r.visible?`is-visible`:``}`,style:{left:`${r.x}%`,top:`${r.y}%`,"--click-pulse":r.clickPulse},"aria-hidden":`true`,children:[(0,E.jsx)(w,{}),(0,E.jsx)(`i`,{})]})]})})}export{W as HomepageMotionScene};
|