rivet-design 0.26.1 → 0.27.0

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.
Files changed (122) hide show
  1. package/bin/rivet.js +13 -0
  2. package/dist/agent-variants/PreviewRuntime.js +20 -7
  3. package/dist/agent-variants/WorkerExecutorService.d.ts +0 -2
  4. package/dist/agent-variants/WorkerExecutorService.js +0 -18
  5. package/dist/agent-variants/WorktreeOrchestrator.testHelpers.js +0 -8
  6. package/dist/agent-variants/contracts.d.ts +1001 -4868
  7. package/dist/agent-variants/contracts.js +1 -121
  8. package/dist/agent-variants/index.d.ts +1 -1
  9. package/dist/agent-variants/variantsTelemetry.d.ts +4 -8
  10. package/dist/agent-variants/variantsTelemetry.js +3 -0
  11. package/dist/agent-variants/workItemInput.d.ts +386 -386
  12. package/dist/cli/commands/contextRequest.js +1 -1
  13. package/dist/cli/commands/guidanceReferences.d.ts +2 -2
  14. package/dist/cli/commands/guidanceVerifierPackage.d.ts +2 -2
  15. package/dist/cli/commands/mcpServe.js +1 -0
  16. package/dist/cli/commands/serve.js +2 -0
  17. package/dist/cli/editorSession.d.ts +1 -13
  18. package/dist/cli/handoff.d.ts +1 -0
  19. package/dist/cli/handoff.js +20 -4
  20. package/dist/cli/router.js +1 -0
  21. package/dist/cli/runtimeInterruption.d.ts +2 -16
  22. package/dist/cli/telemetry.d.ts +10 -0
  23. package/dist/cli/telemetry.js +37 -1
  24. package/dist/config/pluginMetrics.js +36 -1
  25. package/dist/hosts/workerDefaults.d.ts +0 -11
  26. package/dist/hosts/workerDefaults.js +1 -30
  27. package/dist/index-core.d.ts +0 -1
  28. package/dist/index.d.ts +19 -0
  29. package/dist/index.js +15 -6
  30. package/dist/install/automaticCliUpdate.d.ts +1 -0
  31. package/dist/install/automaticCliUpdate.js +32 -22
  32. package/dist/install/channelCli.d.ts +1 -1
  33. package/dist/install/channelCli.js +11 -6
  34. package/dist/install/channelManager.d.ts +5 -2
  35. package/dist/install/globalBootstrap.d.ts +5 -3
  36. package/dist/install/globalBootstrap.js +21 -9
  37. package/dist/install/npmCommand.d.ts +15 -0
  38. package/dist/install/npmCommand.js +59 -0
  39. package/dist/routes/agentVariants.js +3 -14
  40. package/dist/routes/library/browserAccess.js +6 -2
  41. package/dist/routes/library/guidance.js +3 -1
  42. package/dist/routes/library/middleware.js +15 -9
  43. package/dist/routes/library/navigation.js +3 -1
  44. package/dist/routes/library/profiles.js +5 -5
  45. package/dist/routes/library/projects.js +17 -7
  46. package/dist/routes/library/referenceOnboarding.js +4 -2
  47. package/dist/routes/library/schemas.d.ts +2 -15
  48. package/dist/routes/telemetry.js +1 -1
  49. package/dist/routes/variantRequestSchema.d.ts +4 -4
  50. package/dist/routes/variantRequestSchema.js +7 -2
  51. package/dist/server.js +8 -0
  52. package/dist/services/AuthService.d.ts +3 -56
  53. package/dist/services/AuthService.js +0 -28
  54. package/dist/services/ConfigManager.d.ts +0 -2
  55. package/dist/services/ConfigManager.js +0 -14
  56. package/dist/services/DependencyPreparationService.js +57 -19
  57. package/dist/services/GuidanceVerifierRunner.js +4 -4
  58. package/dist/services/HubDiscovery.d.ts +1 -9
  59. package/dist/services/IntegrationsClient.d.ts +16 -16
  60. package/dist/services/MCPOnboardingTelemetry.d.ts +0 -14
  61. package/dist/services/MCPOnboardingTelemetry.js +0 -62
  62. package/dist/services/ProjectPackageManager.d.ts +5 -0
  63. package/dist/services/ProjectPackageManager.js +33 -11
  64. package/dist/services/ProjectRegistry.d.ts +5 -24
  65. package/dist/services/TelemetryService.d.ts +9 -64
  66. package/dist/services/TelemetryService.js +10 -113
  67. package/dist/services/TreeStore.d.ts +0 -2
  68. package/dist/services/TreeStore.js +0 -24
  69. package/dist/services/WorktreeManager.js +5 -0
  70. package/dist/services/profiles/DesignProfiles.d.ts +180 -125
  71. package/dist/services/profiles/DesignProfiles.js +16 -8
  72. package/dist/services/profiles/ProfilePlanning.d.ts +38 -38
  73. package/dist/services/profiles/ReferenceReader.d.ts +14 -14
  74. package/dist/services/profiles/modelContract.js +4 -4
  75. package/dist/storage/library/ProjectPreviewCache.d.ts +1 -13
  76. package/dist/storage/profiles/ProfilePlans.d.ts +137 -137
  77. package/dist/storage/profiles/ProfileRecords.d.ts +62 -37
  78. package/dist/storage/profiles/planSchema.d.ts +40 -40
  79. package/dist/storage/profiles/schema.d.ts +16 -16
  80. package/dist/types/api-responses.d.ts +174 -0
  81. package/dist/types/api-responses.js +108 -0
  82. package/dist/types/cosmos-profile.d.ts +17 -105
  83. package/dist/types/cosmos.d.ts +48 -266
  84. package/dist/types/design-library.d.ts +230 -61
  85. package/dist/types/design-library.js +38 -1
  86. package/dist/types/design-profile.d.ts +220 -529
  87. package/dist/types/design-profile.js +5 -1
  88. package/dist/types/guidance-references.d.ts +68 -316
  89. package/dist/types/guidance-verifier.d.ts +69 -560
  90. package/dist/types/guidance-verifier.js +15 -2
  91. package/dist/types/guidance.d.ts +182 -1643
  92. package/dist/types/guidance.js +4 -1
  93. package/dist/types/project-library.d.ts +60 -30
  94. package/dist/types/project-library.js +32 -1
  95. package/dist/types/reference-connectors.d.ts +38 -162
  96. package/dist/types/reference-onboarding.d.ts +144 -878
  97. package/dist/types/reference-pages.d.ts +27 -139
  98. package/dist/types/x-bookmarks.d.ts +40 -296
  99. package/dist/utils/devServerError.d.ts +5 -0
  100. package/dist/utils/devServerError.js +4 -0
  101. package/dist/utils/displayLocale.d.ts +0 -1
  102. package/dist/utils/displayLocale.js +1 -3
  103. package/dist/utils/failureReason.d.ts +16 -0
  104. package/dist/utils/failureReason.js +106 -0
  105. package/dist/utils/hostedLogPrivacy.d.ts +1 -0
  106. package/dist/utils/hostedLogPrivacy.js +10 -4
  107. package/dist/utils/skills/claude-skill.d.ts +1 -1
  108. package/dist/utils/skills/claude-skill.js +1 -1
  109. package/dist/utils/skills/cli-guidance.d.ts +1 -1
  110. package/dist/utils/skills/cli-guidance.js +3 -3
  111. package/dist/utils/skills/cursor-rules.d.ts +1 -1
  112. package/dist/utils/skills/cursor-rules.js +1 -1
  113. package/package.json +5 -5
  114. package/src/ui/dist/assets/LibraryEntry-RI9Lc7P3.js +37 -0
  115. package/src/ui/dist/assets/main-D0UmAaUe.css +1 -0
  116. package/src/ui/dist/assets/main-DgrLzS5j.js +497 -0
  117. package/src/ui/dist/index.html +2 -2
  118. package/dist/types/change-types.d.ts +0 -66
  119. package/dist/types/change-types.js +0 -3
  120. package/src/ui/dist/assets/LibraryEntry-Cr4GFYXW.js +0 -37
  121. package/src/ui/dist/assets/main-W3oTuTTl.css +0 -1
  122. package/src/ui/dist/assets/main-tPO1OCpZ.js +0 -439
@@ -1,36 +1,26 @@
1
1
  import { z } from 'zod';
2
- export declare const CosmosIdSchema: z.ZodEffects<z.ZodString, string, string>;
2
+ export declare const CosmosIdSchema: z.ZodString;
3
3
  export declare const CosmosCursorSchema: z.ZodString;
4
4
  export declare const parseCosmosProfileUrl: (value: string) => {
5
5
  username: string;
6
6
  url: string;
7
7
  };
8
- export declare const CosmosProfileUrlSchema: z.ZodEffects<z.ZodString, string, string>;
8
+ export declare const CosmosProfileUrlSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
9
9
  export declare const parseCosmosUrl: (value: string) => {
10
10
  ownerUsername: string;
11
11
  slug: string;
12
12
  subcollectionSlug: string;
13
13
  url: string;
14
14
  };
15
- export declare const CosmosMediaUrlSchema: z.ZodEffects<z.ZodString, string, string>;
15
+ export declare const CosmosMediaUrlSchema: z.ZodString;
16
16
  export declare const CosmosCollectionSchema: z.ZodObject<{
17
- id: z.ZodEffects<z.ZodString, string, string>;
17
+ id: z.ZodString;
18
18
  title: z.ZodString;
19
- url: z.ZodEffects<z.ZodString, string, string>;
20
- children: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
21
- }, "strip", z.ZodTypeAny, {
22
- url: string;
23
- title: string;
24
- id: string;
25
- children: string[];
26
- }, {
27
- url: string;
28
- title: string;
29
- id: string;
30
- children: string[];
31
- }>;
19
+ url: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
20
+ children: z.ZodArray<z.ZodString>;
21
+ }, z.core.$strip>;
32
22
  export declare const CosmosElementSchema: z.ZodObject<{
33
- id: z.ZodEffects<z.ZodString, string, string>;
23
+ id: z.ZodString;
34
24
  url: z.ZodString;
35
25
  title: z.ZodString;
36
26
  text: z.ZodString;
@@ -38,62 +28,23 @@ export declare const CosmosElementSchema: z.ZodObject<{
38
28
  owner: z.ZodNullable<z.ZodString>;
39
29
  sourceUrl: z.ZodNullable<z.ZodString>;
40
30
  images: z.ZodArray<z.ZodObject<{
41
- url: z.ZodEffects<z.ZodString, string, string>;
42
- representation: z.ZodEnum<["image", "video-cover"]>;
43
- }, "strip", z.ZodTypeAny, {
44
- url: string;
45
- representation: "image" | "video-cover";
46
- }, {
47
- url: string;
48
- representation: "image" | "video-cover";
49
- }>, "many">;
31
+ url: z.ZodString;
32
+ representation: z.ZodEnum<{
33
+ image: "image";
34
+ "video-cover": "video-cover";
35
+ }>;
36
+ }, z.core.$strip>>;
50
37
  unsupportedReason: z.ZodOptional<z.ZodString>;
51
- }, "strip", z.ZodTypeAny, {
52
- url: string;
53
- title: string;
54
- text: string;
55
- id: string;
56
- images: {
57
- url: string;
58
- representation: "image" | "video-cover";
59
- }[];
60
- author: string | null;
61
- owner: string | null;
62
- sourceUrl: string | null;
63
- unsupportedReason?: string | undefined;
64
- }, {
65
- url: string;
66
- title: string;
67
- text: string;
68
- id: string;
69
- images: {
70
- url: string;
71
- representation: "image" | "video-cover";
72
- }[];
73
- author: string | null;
74
- owner: string | null;
75
- sourceUrl: string | null;
76
- unsupportedReason?: string | undefined;
77
- }>;
38
+ }, z.core.$strip>;
78
39
  export declare const CosmosPageSchema: z.ZodObject<{
79
40
  collection: z.ZodObject<{
80
- id: z.ZodEffects<z.ZodString, string, string>;
41
+ id: z.ZodString;
81
42
  title: z.ZodString;
82
- url: z.ZodEffects<z.ZodString, string, string>;
83
- children: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
84
- }, "strip", z.ZodTypeAny, {
85
- url: string;
86
- title: string;
87
- id: string;
88
- children: string[];
89
- }, {
90
- url: string;
91
- title: string;
92
- id: string;
93
- children: string[];
94
- }>;
43
+ url: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
44
+ children: z.ZodArray<z.ZodString>;
45
+ }, z.core.$strip>;
95
46
  elements: z.ZodArray<z.ZodObject<{
96
- id: z.ZodEffects<z.ZodString, string, string>;
47
+ id: z.ZodString;
97
48
  url: z.ZodString;
98
49
  title: z.ZodString;
99
50
  text: z.ZodString;
@@ -101,111 +52,26 @@ export declare const CosmosPageSchema: z.ZodObject<{
101
52
  owner: z.ZodNullable<z.ZodString>;
102
53
  sourceUrl: z.ZodNullable<z.ZodString>;
103
54
  images: z.ZodArray<z.ZodObject<{
104
- url: z.ZodEffects<z.ZodString, string, string>;
105
- representation: z.ZodEnum<["image", "video-cover"]>;
106
- }, "strip", z.ZodTypeAny, {
107
- url: string;
108
- representation: "image" | "video-cover";
109
- }, {
110
- url: string;
111
- representation: "image" | "video-cover";
112
- }>, "many">;
55
+ url: z.ZodString;
56
+ representation: z.ZodEnum<{
57
+ image: "image";
58
+ "video-cover": "video-cover";
59
+ }>;
60
+ }, z.core.$strip>>;
113
61
  unsupportedReason: z.ZodOptional<z.ZodString>;
114
- }, "strip", z.ZodTypeAny, {
115
- url: string;
116
- title: string;
117
- text: string;
118
- id: string;
119
- images: {
120
- url: string;
121
- representation: "image" | "video-cover";
122
- }[];
123
- author: string | null;
124
- owner: string | null;
125
- sourceUrl: string | null;
126
- unsupportedReason?: string | undefined;
127
- }, {
128
- url: string;
129
- title: string;
130
- text: string;
131
- id: string;
132
- images: {
133
- url: string;
134
- representation: "image" | "video-cover";
135
- }[];
136
- author: string | null;
137
- owner: string | null;
138
- sourceUrl: string | null;
139
- unsupportedReason?: string | undefined;
140
- }>, "many">;
62
+ }, z.core.$strip>>;
141
63
  total: z.ZodNumber;
142
64
  nextCursor: z.ZodNullable<z.ZodString>;
143
- }, "strip", z.ZodTypeAny, {
144
- collection: {
145
- url: string;
146
- title: string;
147
- id: string;
148
- children: string[];
149
- };
150
- elements: {
151
- url: string;
152
- title: string;
153
- text: string;
154
- id: string;
155
- images: {
156
- url: string;
157
- representation: "image" | "video-cover";
158
- }[];
159
- author: string | null;
160
- owner: string | null;
161
- sourceUrl: string | null;
162
- unsupportedReason?: string | undefined;
163
- }[];
164
- total: number;
165
- nextCursor: string | null;
166
- }, {
167
- collection: {
168
- url: string;
169
- title: string;
170
- id: string;
171
- children: string[];
172
- };
173
- elements: {
174
- url: string;
175
- title: string;
176
- text: string;
177
- id: string;
178
- images: {
179
- url: string;
180
- representation: "image" | "video-cover";
181
- }[];
182
- author: string | null;
183
- owner: string | null;
184
- sourceUrl: string | null;
185
- unsupportedReason?: string | undefined;
186
- }[];
187
- total: number;
188
- nextCursor: string | null;
189
- }>;
190
- export declare const CosmosResultSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
65
+ }, z.core.$strip>;
66
+ export declare const CosmosResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
191
67
  collection: z.ZodObject<{
192
- id: z.ZodEffects<z.ZodString, string, string>;
68
+ id: z.ZodString;
193
69
  title: z.ZodString;
194
- url: z.ZodEffects<z.ZodString, string, string>;
195
- children: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
196
- }, "strip", z.ZodTypeAny, {
197
- url: string;
198
- title: string;
199
- id: string;
200
- children: string[];
201
- }, {
202
- url: string;
203
- title: string;
204
- id: string;
205
- children: string[];
206
- }>;
70
+ url: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
71
+ children: z.ZodArray<z.ZodString>;
72
+ }, z.core.$strip>;
207
73
  elements: z.ZodArray<z.ZodObject<{
208
- id: z.ZodEffects<z.ZodString, string, string>;
74
+ id: z.ZodString;
209
75
  url: z.ZodString;
210
76
  title: z.ZodString;
211
77
  text: z.ZodString;
@@ -213,111 +79,27 @@ export declare const CosmosResultSchema: z.ZodDiscriminatedUnion<"status", [z.Zo
213
79
  owner: z.ZodNullable<z.ZodString>;
214
80
  sourceUrl: z.ZodNullable<z.ZodString>;
215
81
  images: z.ZodArray<z.ZodObject<{
216
- url: z.ZodEffects<z.ZodString, string, string>;
217
- representation: z.ZodEnum<["image", "video-cover"]>;
218
- }, "strip", z.ZodTypeAny, {
219
- url: string;
220
- representation: "image" | "video-cover";
221
- }, {
222
- url: string;
223
- representation: "image" | "video-cover";
224
- }>, "many">;
82
+ url: z.ZodString;
83
+ representation: z.ZodEnum<{
84
+ image: "image";
85
+ "video-cover": "video-cover";
86
+ }>;
87
+ }, z.core.$strip>>;
225
88
  unsupportedReason: z.ZodOptional<z.ZodString>;
226
- }, "strip", z.ZodTypeAny, {
227
- url: string;
228
- title: string;
229
- text: string;
230
- id: string;
231
- images: {
232
- url: string;
233
- representation: "image" | "video-cover";
234
- }[];
235
- author: string | null;
236
- owner: string | null;
237
- sourceUrl: string | null;
238
- unsupportedReason?: string | undefined;
239
- }, {
240
- url: string;
241
- title: string;
242
- text: string;
243
- id: string;
244
- images: {
245
- url: string;
246
- representation: "image" | "video-cover";
247
- }[];
248
- author: string | null;
249
- owner: string | null;
250
- sourceUrl: string | null;
251
- unsupportedReason?: string | undefined;
252
- }>, "many">;
89
+ }, z.core.$strip>>;
253
90
  total: z.ZodNumber;
254
91
  nextCursor: z.ZodNullable<z.ZodString>;
255
- } & {
256
92
  status: z.ZodLiteral<"ok">;
257
- }, "strip", z.ZodTypeAny, {
258
- status: "ok";
259
- collection: {
260
- url: string;
261
- title: string;
262
- id: string;
263
- children: string[];
264
- };
265
- elements: {
266
- url: string;
267
- title: string;
268
- text: string;
269
- id: string;
270
- images: {
271
- url: string;
272
- representation: "image" | "video-cover";
273
- }[];
274
- author: string | null;
275
- owner: string | null;
276
- sourceUrl: string | null;
277
- unsupportedReason?: string | undefined;
278
- }[];
279
- total: number;
280
- nextCursor: string | null;
281
- }, {
282
- status: "ok";
283
- collection: {
284
- url: string;
285
- title: string;
286
- id: string;
287
- children: string[];
288
- };
289
- elements: {
290
- url: string;
291
- title: string;
292
- text: string;
293
- id: string;
294
- images: {
295
- url: string;
296
- representation: "image" | "video-cover";
297
- }[];
298
- author: string | null;
299
- owner: string | null;
300
- sourceUrl: string | null;
301
- unsupportedReason?: string | undefined;
302
- }[];
303
- total: number;
304
- nextCursor: string | null;
305
- }>, z.ZodObject<{
93
+ }, z.core.$strip>, z.ZodObject<{
306
94
  status: z.ZodLiteral<"error">;
307
95
  message: z.ZodString;
308
- reason: z.ZodOptional<z.ZodEnum<["rate_limited", "provider_unavailable", "collection_unavailable"]>>;
96
+ reason: z.ZodOptional<z.ZodEnum<{
97
+ rate_limited: "rate_limited";
98
+ provider_unavailable: "provider_unavailable";
99
+ collection_unavailable: "collection_unavailable";
100
+ }>>;
309
101
  retryAfterMs: z.ZodOptional<z.ZodNumber>;
310
- }, "strip", z.ZodTypeAny, {
311
- message: string;
312
- status: "error";
313
- reason?: "rate_limited" | "provider_unavailable" | "collection_unavailable" | undefined;
314
- retryAfterMs?: number | undefined;
315
- }, {
316
- message: string;
317
- status: "error";
318
- reason?: "rate_limited" | "provider_unavailable" | "collection_unavailable" | undefined;
319
- retryAfterMs?: number | undefined;
320
- }>]>;
102
+ }, z.core.$strip>], "status">;
321
103
  export type CosmosPage = z.infer<typeof CosmosPageSchema>;
322
104
  export type CosmosResult = z.infer<typeof CosmosResultSchema>;
323
105
  export type CosmosElement = z.infer<typeof CosmosElementSchema>;
@@ -1,74 +1,243 @@
1
1
  import { z } from 'zod';
2
- import type { ProfileObservation, ProfileProvider, ProfileReference } from './design-profile';
3
- export interface DesignLibrarySource {
4
- id: string;
5
- title: string;
6
- provider: ProfileProvider;
7
- isIncluded: boolean;
8
- }
9
- export interface DesignLibraryReference extends ProfileReference {
10
- sourceIds: string[];
11
- observation: ProfileObservation | null;
12
- }
13
- export interface DesignLibrarySnapshot {
14
- profileId: string;
15
- revision: number;
16
- isEnabled: boolean;
17
- sources: DesignLibrarySource[];
18
- references: DesignLibraryReference[];
19
- }
2
+ import type { ProfileObservation, ProfileReference } from './design-profile';
3
+ export declare const DesignLibrarySourceSchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ title: z.ZodString;
6
+ provider: z.ZodEnum<{
7
+ variant: "variant";
8
+ text: "text";
9
+ pinterest: "pinterest";
10
+ arena: "arena";
11
+ cosmos: "cosmos";
12
+ x: "x";
13
+ image: "image";
14
+ pdf: "pdf";
15
+ }>;
16
+ isIncluded: z.ZodBoolean;
17
+ }, z.core.$strip>;
18
+ export type DesignLibrarySource = z.infer<typeof DesignLibrarySourceSchema>;
19
+ export declare const DesignLibraryReferenceSchema: z.ZodObject<{
20
+ provider: z.ZodEnum<{
21
+ variant: "variant";
22
+ text: "text";
23
+ pinterest: "pinterest";
24
+ arena: "arena";
25
+ cosmos: "cosmos";
26
+ x: "x";
27
+ image: "image";
28
+ pdf: "pdf";
29
+ }>;
30
+ remoteId: z.ZodString;
31
+ title: z.ZodString;
32
+ text: z.ZodString;
33
+ url: z.ZodOptional<z.ZodString>;
34
+ media: z.ZodArray<z.ZodObject<{
35
+ hash: z.ZodString;
36
+ mimeType: z.ZodEnum<{
37
+ "image/png": "image/png";
38
+ "image/jpeg": "image/jpeg";
39
+ "image/webp": "image/webp";
40
+ "image/gif": "image/gif";
41
+ }>;
42
+ bytes: z.ZodNumber;
43
+ representation: z.ZodDefault<z.ZodEnum<{
44
+ variant: "variant";
45
+ image: "image";
46
+ "video-cover": "video-cover";
47
+ page: "page";
48
+ }>>;
49
+ page: z.ZodOptional<z.ZodNumber>;
50
+ }, z.core.$strip>>;
51
+ remoteImages: z.ZodOptional<z.ZodArray<z.ZodString>>;
52
+ remoteImageRepresentations: z.ZodOptional<z.ZodArray<z.ZodEnum<{
53
+ image: "image";
54
+ "video-cover": "video-cover";
55
+ }>>>;
56
+ unsupportedReason: z.ZodOptional<z.ZodString>;
57
+ variant: z.ZodOptional<z.ZodObject<{
58
+ projectId: z.ZodString;
59
+ sessionId: z.ZodString;
60
+ variantId: z.ZodString;
61
+ treeSha: z.ZodOptional<z.ZodString>;
62
+ }, z.core.$strict>>;
63
+ note: z.ZodOptional<z.ZodString>;
64
+ id: z.ZodString;
65
+ revision: z.ZodNumber;
66
+ sourceIds: z.ZodArray<z.ZodString>;
67
+ observation: z.ZodNullable<z.ZodObject<{
68
+ referenceId: z.ZodString;
69
+ revision: z.ZodNumber;
70
+ description: z.ZodString;
71
+ runtime: z.ZodUnion<readonly [z.ZodEnum<{
72
+ claude: "claude";
73
+ codex: "codex";
74
+ cursor: "cursor";
75
+ }>, z.ZodLiteral<"user">]>;
76
+ evidence: z.ZodEnum<{
77
+ observation: "observation";
78
+ preference: "preference";
79
+ }>;
80
+ usage: z.ZodOptional<z.ZodObject<{
81
+ inputTokens: z.ZodOptional<z.ZodNumber>;
82
+ outputTokens: z.ZodOptional<z.ZodNumber>;
83
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
84
+ allocation: z.ZodOptional<z.ZodLiteral<"equal-share">>;
85
+ }, z.core.$strip>>;
86
+ }, z.core.$strip>>;
87
+ }, z.core.$strip>;
88
+ export type DesignLibraryReference = z.infer<typeof DesignLibraryReferenceSchema>;
89
+ export declare const DesignLibrarySnapshotSchema: z.ZodObject<{
90
+ profileId: z.ZodString;
91
+ revision: z.ZodNumber;
92
+ isEnabled: z.ZodBoolean;
93
+ sources: z.ZodArray<z.ZodObject<{
94
+ id: z.ZodString;
95
+ title: z.ZodString;
96
+ provider: z.ZodEnum<{
97
+ variant: "variant";
98
+ text: "text";
99
+ pinterest: "pinterest";
100
+ arena: "arena";
101
+ cosmos: "cosmos";
102
+ x: "x";
103
+ image: "image";
104
+ pdf: "pdf";
105
+ }>;
106
+ isIncluded: z.ZodBoolean;
107
+ }, z.core.$strip>>;
108
+ references: z.ZodArray<z.ZodObject<{
109
+ provider: z.ZodEnum<{
110
+ variant: "variant";
111
+ text: "text";
112
+ pinterest: "pinterest";
113
+ arena: "arena";
114
+ cosmos: "cosmos";
115
+ x: "x";
116
+ image: "image";
117
+ pdf: "pdf";
118
+ }>;
119
+ remoteId: z.ZodString;
120
+ title: z.ZodString;
121
+ text: z.ZodString;
122
+ url: z.ZodOptional<z.ZodString>;
123
+ media: z.ZodArray<z.ZodObject<{
124
+ hash: z.ZodString;
125
+ mimeType: z.ZodEnum<{
126
+ "image/png": "image/png";
127
+ "image/jpeg": "image/jpeg";
128
+ "image/webp": "image/webp";
129
+ "image/gif": "image/gif";
130
+ }>;
131
+ bytes: z.ZodNumber;
132
+ representation: z.ZodDefault<z.ZodEnum<{
133
+ variant: "variant";
134
+ image: "image";
135
+ "video-cover": "video-cover";
136
+ page: "page";
137
+ }>>;
138
+ page: z.ZodOptional<z.ZodNumber>;
139
+ }, z.core.$strip>>;
140
+ remoteImages: z.ZodOptional<z.ZodArray<z.ZodString>>;
141
+ remoteImageRepresentations: z.ZodOptional<z.ZodArray<z.ZodEnum<{
142
+ image: "image";
143
+ "video-cover": "video-cover";
144
+ }>>>;
145
+ unsupportedReason: z.ZodOptional<z.ZodString>;
146
+ variant: z.ZodOptional<z.ZodObject<{
147
+ projectId: z.ZodString;
148
+ sessionId: z.ZodString;
149
+ variantId: z.ZodString;
150
+ treeSha: z.ZodOptional<z.ZodString>;
151
+ }, z.core.$strict>>;
152
+ note: z.ZodOptional<z.ZodString>;
153
+ id: z.ZodString;
154
+ revision: z.ZodNumber;
155
+ sourceIds: z.ZodArray<z.ZodString>;
156
+ observation: z.ZodNullable<z.ZodObject<{
157
+ referenceId: z.ZodString;
158
+ revision: z.ZodNumber;
159
+ description: z.ZodString;
160
+ runtime: z.ZodUnion<readonly [z.ZodEnum<{
161
+ claude: "claude";
162
+ codex: "codex";
163
+ cursor: "cursor";
164
+ }>, z.ZodLiteral<"user">]>;
165
+ evidence: z.ZodEnum<{
166
+ observation: "observation";
167
+ preference: "preference";
168
+ }>;
169
+ usage: z.ZodOptional<z.ZodObject<{
170
+ inputTokens: z.ZodOptional<z.ZodNumber>;
171
+ outputTokens: z.ZodOptional<z.ZodNumber>;
172
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
173
+ allocation: z.ZodOptional<z.ZodLiteral<"equal-share">>;
174
+ }, z.core.$strip>>;
175
+ }, z.core.$strip>>;
176
+ }, z.core.$strip>>;
177
+ }, z.core.$strip>;
178
+ export type DesignLibrarySnapshot = z.infer<typeof DesignLibrarySnapshotSchema>;
20
179
  export declare const DesignReferenceSearchRequestSchema: z.ZodObject<{
21
180
  query: z.ZodString;
22
181
  sourceId: z.ZodOptional<z.ZodString>;
23
182
  limit: z.ZodDefault<z.ZodNumber>;
24
- runtime: z.ZodDefault<z.ZodEnum<["codex", "claude", "cursor"]>>;
25
- }, "strip", z.ZodTypeAny, {
26
- query: string;
27
- limit: number;
28
- runtime: "claude" | "codex" | "cursor";
29
- sourceId?: string | undefined;
30
- }, {
31
- query: string;
32
- limit?: number | undefined;
33
- runtime?: "claude" | "codex" | "cursor" | undefined;
34
- sourceId?: string | undefined;
35
- }>;
183
+ runtime: z.ZodDefault<z.ZodEnum<{
184
+ claude: "claude";
185
+ codex: "codex";
186
+ cursor: "cursor";
187
+ }>>;
188
+ }, z.core.$strip>;
36
189
  export type DesignReferenceSearchRequest = z.infer<typeof DesignReferenceSearchRequestSchema>;
37
- export interface DesignReferenceSearchResult {
38
- profileId: string;
39
- query: string;
40
- coverage: {
41
- saved: number;
42
- analyzed: number;
43
- indexed: number;
44
- };
45
- results: Array<{
46
- id: string;
47
- key: string;
48
- title: string;
49
- provider: ProfileProvider;
50
- url?: string;
51
- description: string | null;
52
- imageCount: number;
53
- sources: DesignLibrarySource[];
54
- isIncluded: boolean;
55
- }>;
56
- }
190
+ export declare const DesignReferenceSearchResultSchema: z.ZodObject<{
191
+ profileId: z.ZodString;
192
+ query: z.ZodString;
193
+ coverage: z.ZodObject<{
194
+ saved: z.ZodNumber;
195
+ analyzed: z.ZodNumber;
196
+ indexed: z.ZodNumber;
197
+ }, z.core.$strip>;
198
+ results: z.ZodArray<z.ZodObject<{
199
+ id: z.ZodString;
200
+ key: z.ZodString;
201
+ title: z.ZodString;
202
+ provider: z.ZodEnum<{
203
+ variant: "variant";
204
+ text: "text";
205
+ pinterest: "pinterest";
206
+ arena: "arena";
207
+ cosmos: "cosmos";
208
+ x: "x";
209
+ image: "image";
210
+ pdf: "pdf";
211
+ }>;
212
+ url: z.ZodOptional<z.ZodString>;
213
+ description: z.ZodNullable<z.ZodString>;
214
+ imageCount: z.ZodNumber;
215
+ sources: z.ZodArray<z.ZodObject<{
216
+ id: z.ZodString;
217
+ title: z.ZodString;
218
+ provider: z.ZodEnum<{
219
+ variant: "variant";
220
+ text: "text";
221
+ pinterest: "pinterest";
222
+ arena: "arena";
223
+ cosmos: "cosmos";
224
+ x: "x";
225
+ image: "image";
226
+ pdf: "pdf";
227
+ }>;
228
+ isIncluded: z.ZodBoolean;
229
+ }, z.core.$strip>>;
230
+ isIncluded: z.ZodBoolean;
231
+ }, z.core.$strip>>;
232
+ }, z.core.$strip>;
233
+ export type DesignReferenceSearchResult = z.infer<typeof DesignReferenceSearchResultSchema>;
57
234
  export declare const DESIGN_REFERENCE_BATCH_LIMIT = 50;
58
- export declare const DesignReferenceKeySchema: z.ZodEffects<z.ZodString, string, string>;
235
+ export declare const DesignReferenceKeySchema: z.ZodString;
59
236
  export declare const DesignReferenceRequestSchema: z.ZodObject<{
60
237
  profileId: z.ZodString;
61
- keys: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
238
+ keys: z.ZodArray<z.ZodString>;
62
239
  isDetailed: z.ZodDefault<z.ZodBoolean>;
63
- }, "strip", z.ZodTypeAny, {
64
- keys: string[];
65
- profileId: string;
66
- isDetailed: boolean;
67
- }, {
68
- keys: string[];
69
- profileId: string;
70
- isDetailed?: boolean | undefined;
71
- }>;
240
+ }, z.core.$strip>;
72
241
  export type DesignReferenceRequest = z.infer<typeof DesignReferenceRequestSchema>;
73
242
  export declare const designReferenceKeys: (items: Pick<ProfileReference, "id" | "revision">[]) => Map<string, string>;
74
243
  export interface DesignReferenceSummary {