@xfey/tutti 0.1.121 → 0.1.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/platform-outbound/repository.js +5 -0
- package/dist/platform-outbound/task-result-text.d.ts +3 -0
- package/dist/platform-outbound/task-result-text.js +26 -0
- package/dist/server-shell/local-console/managed-project-routes.js +29 -3
- package/dist/server-shell/local-console/managed-project-service.d.ts +36 -0
- package/dist/server-shell/local-console/managed-project-service.js +31 -0
- package/node_modules/@tutti/relay-client/dist/project-authority.d.ts +24 -1
- package/node_modules/@tutti/relay-client/dist/project-authority.js +32 -1
- package/node_modules/@tutti/shared/dist/schemas/api/local-console-account-handoffs.d.ts +1 -0
- package/node_modules/@tutti/shared/dist/schemas/api/local-console-account-handoffs.js +1 -0
- package/node_modules/@tutti/shared/dist/schemas/internal/project-authority.d.ts +16 -0
- package/node_modules/@tutti/shared/dist/schemas/internal/project-authority.js +4 -0
- package/package.json +1 -1
- package/web/assets/{homepage-motion-scene-WfLyzcCG.js → homepage-motion-scene-OK0IlBO1.js} +1 -1
- package/web/assets/index-BcWfL_Uk.js +70 -0
- package/web/assets/index-Ii1DXtvi.css +1 -0
- package/web/index.html +2 -2
- package/web/assets/index-ATsYiBZs.css +0 -1
- package/web/assets/index-o9YCtzEd.js +0 -70
|
@@ -2,6 +2,7 @@ import { createIdempotencyKey, } from "@tutti/shared/ids";
|
|
|
2
2
|
import { Value } from "@sinclair/typebox/value";
|
|
3
3
|
import { PlatformOutboundContentSchema, } from "@tutti/shared/schemas/internal";
|
|
4
4
|
import { readClarificationRoundProjection, readClarificationThreadResponse, } from "../collaboration-state/index.js";
|
|
5
|
+
import { platformTaskResultText } from "./task-result-text.js";
|
|
5
6
|
const MAX_PLATFORM_OUTBOUND_TEXT_LENGTH = 4_000;
|
|
6
7
|
function boundedPlatformOutboundText(value) {
|
|
7
8
|
const characters = [...value.trim()];
|
|
@@ -153,6 +154,7 @@ export function materializePlatformStatusOutboundIntents(db, now = () => new Dat
|
|
|
153
154
|
(status !== "completed" && status !== "failed")) {
|
|
154
155
|
continue;
|
|
155
156
|
}
|
|
157
|
+
const contentText = platformTaskResultText(taskResult);
|
|
156
158
|
const result = createPlatformStatusOutboundIntent(db, {
|
|
157
159
|
eventKind: status === "completed" ? "task_completed" : "task_failed",
|
|
158
160
|
eventKey: `task_result:${resultKey}`,
|
|
@@ -160,6 +162,9 @@ export function materializePlatformStatusOutboundIntents(db, now = () => new Dat
|
|
|
160
162
|
subjectRef: resultKey,
|
|
161
163
|
targetKind: "work",
|
|
162
164
|
canonicalMessageId: candidate.id,
|
|
165
|
+
// Freeze new presentation with the intent. Upgrade/retry must not reformat
|
|
166
|
+
// previously captured payloads or change Integration's content hash.
|
|
167
|
+
...(contentText === undefined ? {} : { contentText }),
|
|
163
168
|
now,
|
|
164
169
|
});
|
|
165
170
|
if (result?.created === true) {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Value } from "@sinclair/typebox/value";
|
|
2
|
+
import { TaskResultRefSchema } from "@tutti/shared/schemas/api";
|
|
3
|
+
function excerpt(value, limit) {
|
|
4
|
+
const characters = [...value.trim()];
|
|
5
|
+
return characters.length <= limit
|
|
6
|
+
? characters.join("")
|
|
7
|
+
: `${characters.slice(0, limit - 1).join("")}…`;
|
|
8
|
+
}
|
|
9
|
+
/** Presentation only: never parses fallback prose or rewrites canonical results. */
|
|
10
|
+
export function platformTaskResultText(value) {
|
|
11
|
+
if (!Value.Check(TaskResultRefSchema, value))
|
|
12
|
+
return undefined;
|
|
13
|
+
const title = value.status === "completed" ? "Task completed" : "Task failed";
|
|
14
|
+
const summary = (value.status === "completed" ? value.final_note?.trim() : undefined) || value.summary.trim();
|
|
15
|
+
const parts = [title, excerpt(value.task_title, 240)];
|
|
16
|
+
if (summary !== "")
|
|
17
|
+
parts.push(excerpt(summary, 1_600));
|
|
18
|
+
// Keep discoverability of deliverables without repeating the full file inventory.
|
|
19
|
+
const files = value.generated_files ?? [];
|
|
20
|
+
if (files.length > 0) {
|
|
21
|
+
const names = files.slice(0, 3).map((file) => excerpt(file.name.replace(/\s+/gu, " "), 120));
|
|
22
|
+
parts.push(`Files: ${names.join(", ")}${files.length > 3 ? ` (+${files.length - 3})` : ""}`);
|
|
23
|
+
}
|
|
24
|
+
return parts.join("\n\n");
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=task-result-text.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
2
|
import { Value } from "@sinclair/typebox/value";
|
|
3
3
|
import { IdempotencyKeySchema } from "@tutti/shared/schemas/domain";
|
|
4
|
+
import { PROJECT_TRIAL_POLICY } from "@tutti/shared/schemas/internal";
|
|
4
5
|
import { serializeRuntimeLogLine } from "@tutti/shared/utils";
|
|
5
6
|
import { NativeAuthorityTransportError } from "@tutti/relay-client";
|
|
6
7
|
import { appendHostLogLine, getHostLogFilePath } from "../cli/machine-local.js";
|
|
@@ -10,9 +11,20 @@ import { LocalConsoleOperationConflictError } from "./operation-coordinator.js";
|
|
|
10
11
|
import { LaunchError } from "../cli/errors.js";
|
|
11
12
|
import { ManagedDraftInputSchema, } from "./managed-project-service.js";
|
|
12
13
|
const ReadSchema = Type.Object({ request_ref: IdempotencyKeySchema }, { additionalProperties: false });
|
|
14
|
+
const ConfirmSchema = Type.Object({ request_ref: IdempotencyKeySchema, trial_consent: Type.Literal(PROJECT_TRIAL_POLICY) }, { additionalProperties: false });
|
|
13
15
|
export function registerLocalConsoleManagedProjectRoutes(app, options) {
|
|
14
|
-
for (const operation of [
|
|
15
|
-
|
|
16
|
+
for (const operation of [
|
|
17
|
+
"usage",
|
|
18
|
+
"prepare",
|
|
19
|
+
"authorize",
|
|
20
|
+
"read",
|
|
21
|
+
"reconcile",
|
|
22
|
+
"validate",
|
|
23
|
+
"launch",
|
|
24
|
+
]) {
|
|
25
|
+
app.post(operation === "usage"
|
|
26
|
+
? "/local-console/v1/account/managed-usage"
|
|
27
|
+
: `/local-console/v1/managed-projects/${operation}`, {
|
|
16
28
|
bodyLimit: 8192,
|
|
17
29
|
errorHandler: (error, request, reply) => {
|
|
18
30
|
if (error.code !== "FST_ERR_CTP_INVALID_JSON_BODY" &&
|
|
@@ -60,11 +72,25 @@ export function registerLocalConsoleManagedProjectRoutes(app, options) {
|
|
|
60
72
|
if (Object.keys(request.query).length)
|
|
61
73
|
throw new ManagedLocalStateError("managed_creation_input_invalid");
|
|
62
74
|
let result;
|
|
63
|
-
if (operation === "
|
|
75
|
+
if (operation === "usage") {
|
|
76
|
+
if (!Value.Check(Type.Object({}, { additionalProperties: false }), request.body))
|
|
77
|
+
throw new ManagedLocalStateError("managed_creation_input_invalid");
|
|
78
|
+
result = await options.service.readAccountUsage(session.context, session.accountHandoff?.token);
|
|
79
|
+
const current = options.requireSession(request, true);
|
|
80
|
+
if (!current.accountReady ||
|
|
81
|
+
current.accountHandoff?.token !== session.accountHandoff?.token)
|
|
82
|
+
throw new ManagedLocalStateError("console_setup_access_invalid");
|
|
83
|
+
}
|
|
84
|
+
else if (operation === "prepare") {
|
|
64
85
|
if (!Value.Check(ManagedDraftInputSchema, request.body))
|
|
65
86
|
throw new ManagedLocalStateError("managed_creation_input_invalid");
|
|
66
87
|
result = await options.service.prepare(request.body, session.context);
|
|
67
88
|
}
|
|
89
|
+
else if (operation === "authorize") {
|
|
90
|
+
if (!Value.Check(ConfirmSchema, request.body))
|
|
91
|
+
throw new ManagedLocalStateError("managed_creation_input_invalid");
|
|
92
|
+
result = await options.service.authorize(request.body.request_ref, session.context, session.accountHandoff?.token);
|
|
93
|
+
}
|
|
68
94
|
else {
|
|
69
95
|
if (!Value.Check(ReadSchema, request.body))
|
|
70
96
|
throw new ManagedLocalStateError("managed_creation_input_invalid");
|
|
@@ -75,6 +75,42 @@ export declare class LocalConsoleManagedProjectService {
|
|
|
75
75
|
trial_consent: "trial-project-v1";
|
|
76
76
|
};
|
|
77
77
|
};
|
|
78
|
+
readAccountUsage(context: LocalConsoleInvocationContext, consoleToken?: string): Promise<{
|
|
79
|
+
state: "not_initialized";
|
|
80
|
+
unit: "newapi_quota";
|
|
81
|
+
} | {
|
|
82
|
+
state: "ready";
|
|
83
|
+
unit: "newapi_quota";
|
|
84
|
+
remaining: number;
|
|
85
|
+
used: number;
|
|
86
|
+
request_count: number;
|
|
87
|
+
}>;
|
|
88
|
+
authorize(requestRef: string, context: LocalConsoleInvocationContext, consoleToken?: string): Promise<{
|
|
89
|
+
draft: {
|
|
90
|
+
state: "validation_failed" | "prepared" | "registered" | "validated" | "awaiting_authorization" | "validation_unknown";
|
|
91
|
+
expires_at: string;
|
|
92
|
+
existing_project_id?: `prj_${string}`;
|
|
93
|
+
surface: "standalone" | "feishu";
|
|
94
|
+
description?: string;
|
|
95
|
+
request_ref: string;
|
|
96
|
+
project_id: `prj_${string}`;
|
|
97
|
+
display_name: string;
|
|
98
|
+
workspace_path: string;
|
|
99
|
+
};
|
|
100
|
+
relay_origin: string;
|
|
101
|
+
preparation: {
|
|
102
|
+
existing_relay_project_ref?: string;
|
|
103
|
+
expires_before?: string;
|
|
104
|
+
installation_ref: string;
|
|
105
|
+
surface: "standalone" | "feishu";
|
|
106
|
+
request_ref: string;
|
|
107
|
+
project_id: string;
|
|
108
|
+
installation_secret_hash: string;
|
|
109
|
+
handoff_token_hash: string;
|
|
110
|
+
host_registration_secret_hash: string;
|
|
111
|
+
trial_consent: "trial-project-v1";
|
|
112
|
+
};
|
|
113
|
+
}>;
|
|
78
114
|
reconcile(requestRef: string, context: LocalConsoleInvocationContext): Promise<{
|
|
79
115
|
draft: {
|
|
80
116
|
state: "validation_failed" | "prepared" | "registered" | "validated" | "awaiting_authorization" | "validation_unknown";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Value } from "@sinclair/typebox/value";
|
|
2
|
+
import { prepareNativeConsoleAuthority, readNativeConsoleAccountUsage } from "@tutti/relay-client";
|
|
2
3
|
import { Type } from "@sinclair/typebox";
|
|
3
4
|
import { IdempotencyKeySchema, ProjectIdSchema } from "@tutti/shared/schemas/domain";
|
|
4
5
|
import { resolveLaunchLocalContext } from "../cli/launch.js";
|
|
@@ -108,6 +109,36 @@ export class LocalConsoleManagedProjectService {
|
|
|
108
109
|
preparation: state.preparationBody(requestRef),
|
|
109
110
|
};
|
|
110
111
|
}
|
|
112
|
+
readAccountUsage(context, consoleToken) {
|
|
113
|
+
if (!consoleToken)
|
|
114
|
+
throw new ManagedLocalStateError("console_setup_access_invalid");
|
|
115
|
+
// Reading credit creates no project, journal, gateway account or credential.
|
|
116
|
+
return readNativeConsoleAccountUsage({
|
|
117
|
+
relayUrl: this.environment(context).TUTTI_RELAY_URL ?? "https://tutti.now",
|
|
118
|
+
consoleToken,
|
|
119
|
+
...(this.options.fetchImpl === undefined ? {} : { fetchImpl: this.options.fetchImpl }),
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
async authorize(requestRef, context, consoleToken) {
|
|
123
|
+
return this.options.operations.runProjectOperation(async () => {
|
|
124
|
+
if (!consoleToken)
|
|
125
|
+
throw new ManagedLocalStateError("console_setup_access_invalid");
|
|
126
|
+
const state = this.state(context);
|
|
127
|
+
await prepareNativeConsoleAuthority({
|
|
128
|
+
relayUrl: state.origin,
|
|
129
|
+
body: { console_token: consoleToken, preparation: state.preparationBody(requestRef) },
|
|
130
|
+
...(this.options.fetchImpl === undefined ? {} : { fetchImpl: this.options.fetchImpl }),
|
|
131
|
+
});
|
|
132
|
+
// Never advance the journal from the setup receipt alone: prove the exact native binding.
|
|
133
|
+
await reconcileNativePreparation({
|
|
134
|
+
state,
|
|
135
|
+
requestRef,
|
|
136
|
+
now: this.options.now?.() ?? new Date(),
|
|
137
|
+
...(this.options.fetchImpl === undefined ? {} : { fetchImpl: this.options.fetchImpl }),
|
|
138
|
+
});
|
|
139
|
+
return this.read(requestRef, context);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
111
142
|
async reconcile(requestRef, context) {
|
|
112
143
|
return this.options.operations.runProjectOperation(async () => {
|
|
113
144
|
const state = this.state(context);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HostDelegationStatusBody, type NativeCreationProof } from "@tutti/shared/schemas/internal";
|
|
1
|
+
import { type ConsoleProjectAuthority, type HostDelegationStatusBody, type NativeCreationProof } from "@tutti/shared/schemas/internal";
|
|
2
2
|
export declare class NativeAuthorityTransportError extends Error {
|
|
3
3
|
readonly code: string;
|
|
4
4
|
readonly status?: number | undefined;
|
|
@@ -10,6 +10,29 @@ type Transport = {
|
|
|
10
10
|
fetchImpl?: typeof fetch;
|
|
11
11
|
signal?: AbortSignal;
|
|
12
12
|
};
|
|
13
|
+
export declare function prepareNativeConsoleAuthority(options: Transport & {
|
|
14
|
+
body: ConsoleProjectAuthority;
|
|
15
|
+
}): Promise<{
|
|
16
|
+
relay_project_ref?: string;
|
|
17
|
+
expires_at: string;
|
|
18
|
+
state: "expired" | "prepared" | "activated" | "revoked";
|
|
19
|
+
installation_ref: string;
|
|
20
|
+
project_id: string;
|
|
21
|
+
surface: "standalone" | "feishu";
|
|
22
|
+
creation_ref: string;
|
|
23
|
+
}>;
|
|
24
|
+
export declare function readNativeConsoleAccountUsage(options: Transport & {
|
|
25
|
+
consoleToken: string;
|
|
26
|
+
}): Promise<{
|
|
27
|
+
state: "not_initialized";
|
|
28
|
+
unit: "newapi_quota";
|
|
29
|
+
} | {
|
|
30
|
+
state: "ready";
|
|
31
|
+
remaining: number;
|
|
32
|
+
unit: "newapi_quota";
|
|
33
|
+
used: number;
|
|
34
|
+
request_count: number;
|
|
35
|
+
}>;
|
|
13
36
|
export declare function validateNativeCreationAuthority(options: Transport & {
|
|
14
37
|
body: NativeCreationProof;
|
|
15
38
|
}): Promise<{
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Value } from "@sinclair/typebox/value";
|
|
2
|
-
import {
|
|
2
|
+
import { Type } from "@sinclair/typebox";
|
|
3
|
+
import { ManagedAccountUsageSchema } from "@tutti/shared/schemas/api";
|
|
4
|
+
import { HostDelegationProjectionSchema, HostDelegationStatusBodySchema, NativeCreationProofSchema, NativeCreationStatusSchema, CreationValidationResultSchema, NativeRuntimeAuthorizationSchema, ConsoleProjectAuthoritySchema, ManagedCreationProjectionSchema, } from "@tutti/shared/schemas/internal";
|
|
3
5
|
export class NativeAuthorityTransportError extends Error {
|
|
4
6
|
code;
|
|
5
7
|
status;
|
|
@@ -13,6 +15,16 @@ export class NativeAuthorityTransportError extends Error {
|
|
|
13
15
|
}
|
|
14
16
|
}
|
|
15
17
|
const safeReasons = new Set([
|
|
18
|
+
"console_setup_access_invalid",
|
|
19
|
+
"managed_usage_unavailable",
|
|
20
|
+
"project_already_registered",
|
|
21
|
+
"project_authority_conflict",
|
|
22
|
+
"command_replay_mismatch",
|
|
23
|
+
"creation_limit_reached",
|
|
24
|
+
"project_creation_pending",
|
|
25
|
+
"installation_identity_conflict",
|
|
26
|
+
"host_delegation_already_active",
|
|
27
|
+
"host_delegation_revocation_pending",
|
|
16
28
|
"account_session_required",
|
|
17
29
|
"account_authority_inactive",
|
|
18
30
|
"project_owner_required",
|
|
@@ -95,6 +107,25 @@ async function request(options, path, body, schema, timeoutMs = 15_000) {
|
|
|
95
107
|
: new NativeAuthorityTransportError("managed_authority_unavailable");
|
|
96
108
|
}
|
|
97
109
|
}
|
|
110
|
+
export async function prepareNativeConsoleAuthority(options) {
|
|
111
|
+
if (!Value.Check(ConsoleProjectAuthoritySchema, options.body))
|
|
112
|
+
throw new NativeAuthorityTransportError("managed_authority_invalid_request");
|
|
113
|
+
const result = await request(options, "/host-control/v1/managed-authority/prepare", options.body, ManagedCreationProjectionSchema);
|
|
114
|
+
if (result.project_id !== options.body.preparation.project_id ||
|
|
115
|
+
result.surface !== options.body.preparation.surface ||
|
|
116
|
+
result.installation_ref !== options.body.preparation.installation_ref)
|
|
117
|
+
throw new NativeAuthorityTransportError("managed_authority_invalid_response");
|
|
118
|
+
return result;
|
|
119
|
+
}
|
|
120
|
+
const ConsoleUsageSchema = Type.Pick(ConsoleProjectAuthoritySchema, ["console_token"], {
|
|
121
|
+
additionalProperties: false,
|
|
122
|
+
});
|
|
123
|
+
export async function readNativeConsoleAccountUsage(options) {
|
|
124
|
+
const body = { console_token: options.consoleToken };
|
|
125
|
+
if (!Value.Check(ConsoleUsageSchema, body))
|
|
126
|
+
throw new NativeAuthorityTransportError("managed_authority_invalid_request");
|
|
127
|
+
return request(options, "/host-control/v1/managed-authority/account-usage", body, ManagedAccountUsageSchema);
|
|
128
|
+
}
|
|
98
129
|
export async function validateNativeCreationAuthority(options) {
|
|
99
130
|
if (!Value.Check(NativeCreationProofSchema, options.body))
|
|
100
131
|
throw new NativeAuthorityTransportError("managed_authority_invalid_request");
|
|
@@ -2,6 +2,7 @@ import type { Static } from "@sinclair/typebox";
|
|
|
2
2
|
export declare const LOCAL_CONSOLE_ACCOUNT_HANDOFF_TOKEN_MIN_LENGTH = 32;
|
|
3
3
|
export declare const LOCAL_CONSOLE_ACCOUNT_HANDOFF_TOKEN_MAX_LENGTH = 128;
|
|
4
4
|
export declare const RegisterLocalConsoleAccountHandoffBodySchema: import("@sinclair/typebox").TObject<{
|
|
5
|
+
setup_access: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<true>>;
|
|
5
6
|
handoff_token: import("@sinclair/typebox").TString;
|
|
6
7
|
}>;
|
|
7
8
|
export declare const RegisterLocalConsoleAccountHandoffResponseSchema: import("@sinclair/typebox").TObject<{
|
|
@@ -3,6 +3,7 @@ import { IsoDateTimeStringSchema } from "../domain/index.js";
|
|
|
3
3
|
export const LOCAL_CONSOLE_ACCOUNT_HANDOFF_TOKEN_MIN_LENGTH = 32;
|
|
4
4
|
export const LOCAL_CONSOLE_ACCOUNT_HANDOFF_TOKEN_MAX_LENGTH = 128;
|
|
5
5
|
export const RegisterLocalConsoleAccountHandoffBodySchema = Type.Object({
|
|
6
|
+
setup_access: Type.Optional(Type.Literal(true)),
|
|
6
7
|
handoff_token: Type.String({
|
|
7
8
|
minLength: LOCAL_CONSOLE_ACCOUNT_HANDOFF_TOKEN_MIN_LENGTH,
|
|
8
9
|
maxLength: LOCAL_CONSOLE_ACCOUNT_HANDOFF_TOKEN_MAX_LENGTH,
|
|
@@ -21,6 +21,22 @@ export declare const PrepareProjectAuthoritySchema: import("@sinclair/typebox").
|
|
|
21
21
|
expires_before: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
22
22
|
}>;
|
|
23
23
|
export type PrepareProjectAuthority = Static<typeof PrepareProjectAuthoritySchema>;
|
|
24
|
+
export declare const ConsoleProjectAuthoritySchema: import("@sinclair/typebox").TObject<{
|
|
25
|
+
console_token: import("@sinclair/typebox").TString;
|
|
26
|
+
preparation: import("@sinclair/typebox").TObject<{
|
|
27
|
+
request_ref: import("@sinclair/typebox").TString;
|
|
28
|
+
project_id: import("@sinclair/typebox").TString;
|
|
29
|
+
surface: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"standalone">, import("@sinclair/typebox").TLiteral<"feishu">]>;
|
|
30
|
+
existing_relay_project_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
31
|
+
installation_ref: import("@sinclair/typebox").TString;
|
|
32
|
+
installation_secret_hash: import("@sinclair/typebox").TString;
|
|
33
|
+
handoff_token_hash: import("@sinclair/typebox").TString;
|
|
34
|
+
host_registration_secret_hash: import("@sinclair/typebox").TString;
|
|
35
|
+
trial_consent: import("@sinclair/typebox").TLiteral<"trial-project-v1">;
|
|
36
|
+
expires_before: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
37
|
+
}>;
|
|
38
|
+
}>;
|
|
39
|
+
export type ConsoleProjectAuthority = Static<typeof ConsoleProjectAuthoritySchema>;
|
|
24
40
|
export declare const ManagedProjectBootstrapSchema: import("@sinclair/typebox").TObject<{
|
|
25
41
|
kind: import("@sinclair/typebox").TLiteral<"managed_project_authority_v2">;
|
|
26
42
|
creation_ref: import("@sinclair/typebox").TString;
|
|
@@ -30,6 +30,10 @@ export const PrepareProjectAuthoritySchema = Type.Object({
|
|
|
30
30
|
trial_consent: Type.Literal(PROJECT_TRIAL_POLICY),
|
|
31
31
|
expires_before: Type.Optional(AuthorityTimestampSchema),
|
|
32
32
|
}, { additionalProperties: false });
|
|
33
|
+
export const ConsoleProjectAuthoritySchema = Type.Object({
|
|
34
|
+
console_token: AuthoritySecretSchema,
|
|
35
|
+
preparation: PrepareProjectAuthoritySchema,
|
|
36
|
+
}, { additionalProperties: false });
|
|
33
37
|
export const ManagedProjectBootstrapSchema = Type.Object({
|
|
34
38
|
kind: Type.Literal("managed_project_authority_v2"),
|
|
35
39
|
creation_ref: ManagedCreationRefSchema,
|
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-o9YCtzEd.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)}}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-BcWfL_Uk.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)}}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};
|