rivet-design 0.26.0 → 0.26.2

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 (96) hide show
  1. package/bin/rivet.js +13 -0
  2. package/dist/agent-variants/WorkerExecutorService.d.ts +0 -2
  3. package/dist/agent-variants/WorkerExecutorService.js +0 -18
  4. package/dist/agent-variants/WorktreeOrchestrator.testHelpers.js +0 -8
  5. package/dist/agent-variants/contracts.d.ts +1099 -4966
  6. package/dist/agent-variants/contracts.js +1 -121
  7. package/dist/agent-variants/index.d.ts +1 -1
  8. package/dist/agent-variants/variantsTelemetry.d.ts +0 -8
  9. package/dist/agent-variants/workItemInput.d.ts +464 -464
  10. package/dist/cli/commands/contextRequest.js +1 -1
  11. package/dist/cli/commands/guidanceReferences.d.ts +2 -2
  12. package/dist/cli/commands/guidanceVerifierPackage.d.ts +2 -2
  13. package/dist/cli/editorSession.d.ts +1 -13
  14. package/dist/cli/runtimeInterruption.d.ts +2 -16
  15. package/dist/config/pluginMetrics.js +0 -1
  16. package/dist/hosts/workerDefaults.d.ts +0 -11
  17. package/dist/hosts/workerDefaults.js +1 -30
  18. package/dist/index-core.d.ts +0 -1
  19. package/dist/index.js +1 -1
  20. package/dist/install/automaticCliUpdate.d.ts +1 -0
  21. package/dist/install/automaticCliUpdate.js +32 -22
  22. package/dist/install/channelCli.d.ts +1 -1
  23. package/dist/install/channelCli.js +11 -6
  24. package/dist/install/channelManager.d.ts +5 -2
  25. package/dist/install/globalBootstrap.d.ts +5 -3
  26. package/dist/install/globalBootstrap.js +21 -9
  27. package/dist/install/npmCommand.d.ts +15 -0
  28. package/dist/install/npmCommand.js +59 -0
  29. package/dist/routes/agentVariants.js +3 -14
  30. package/dist/routes/library/browserAccess.js +6 -2
  31. package/dist/routes/library/guidance.js +3 -1
  32. package/dist/routes/library/middleware.js +4 -4
  33. package/dist/routes/library/navigation.js +3 -1
  34. package/dist/routes/library/profiles.js +5 -5
  35. package/dist/routes/library/projects.js +17 -7
  36. package/dist/routes/library/referenceOnboarding.js +4 -2
  37. package/dist/routes/library/schemas.d.ts +2 -15
  38. package/dist/routes/telemetry.js +1 -1
  39. package/dist/routes/variantRequestSchema.d.ts +8 -8
  40. package/dist/routes/variantRequestSchema.js +7 -2
  41. package/dist/services/AuthService.d.ts +3 -56
  42. package/dist/services/AuthService.js +0 -28
  43. package/dist/services/ConfigManager.d.ts +0 -2
  44. package/dist/services/ConfigManager.js +0 -14
  45. package/dist/services/GuidanceVerifierRunner.js +13 -2
  46. package/dist/services/HubDiscovery.d.ts +1 -9
  47. package/dist/services/IntegrationsClient.d.ts +16 -16
  48. package/dist/services/MCPOnboardingTelemetry.d.ts +0 -14
  49. package/dist/services/MCPOnboardingTelemetry.js +0 -62
  50. package/dist/services/ProjectRegistry.d.ts +5 -24
  51. package/dist/services/TelemetryService.d.ts +1 -62
  52. package/dist/services/TelemetryService.js +0 -113
  53. package/dist/services/TreeStore.d.ts +0 -2
  54. package/dist/services/TreeStore.js +0 -24
  55. package/dist/services/profiles/DesignProfiles.d.ts +180 -125
  56. package/dist/services/profiles/ProfilePlanning.d.ts +38 -38
  57. package/dist/services/profiles/ReferenceReader.d.ts +14 -14
  58. package/dist/services/profiles/modelContract.js +4 -4
  59. package/dist/storage/library/ProjectPreviewCache.d.ts +1 -13
  60. package/dist/storage/profiles/ProfilePlans.d.ts +137 -137
  61. package/dist/storage/profiles/ProfileRecords.d.ts +62 -37
  62. package/dist/storage/profiles/planSchema.d.ts +40 -40
  63. package/dist/storage/profiles/schema.d.ts +16 -16
  64. package/dist/types/api-responses.d.ts +174 -0
  65. package/dist/types/api-responses.js +108 -0
  66. package/dist/types/cosmos-profile.d.ts +17 -105
  67. package/dist/types/cosmos.d.ts +48 -266
  68. package/dist/types/design-library.d.ts +230 -61
  69. package/dist/types/design-library.js +38 -1
  70. package/dist/types/design-profile.d.ts +220 -529
  71. package/dist/types/design-profile.js +5 -1
  72. package/dist/types/guidance-references.d.ts +68 -316
  73. package/dist/types/guidance-verifier.d.ts +103 -197
  74. package/dist/types/guidance-verifier.js +36 -13
  75. package/dist/types/guidance.d.ts +182 -1643
  76. package/dist/types/guidance.js +4 -1
  77. package/dist/types/project-library.d.ts +60 -30
  78. package/dist/types/project-library.js +32 -1
  79. package/dist/types/reference-connectors.d.ts +38 -162
  80. package/dist/types/reference-onboarding.d.ts +144 -878
  81. package/dist/types/reference-pages.d.ts +27 -139
  82. package/dist/types/x-bookmarks.d.ts +40 -296
  83. package/dist/utils/displayLocale.d.ts +0 -1
  84. package/dist/utils/displayLocale.js +1 -3
  85. package/dist/utils/skills/cli-guidance.d.ts +1 -1
  86. package/dist/utils/skills/cli-guidance.js +2 -2
  87. package/package.json +4 -4
  88. package/src/ui/dist/assets/LibraryEntry-92R_T-Xa.js +37 -0
  89. package/src/ui/dist/assets/main-D0UmAaUe.css +1 -0
  90. package/src/ui/dist/assets/main-DgEfJvYu.js +497 -0
  91. package/src/ui/dist/index.html +2 -2
  92. package/dist/types/change-types.d.ts +0 -66
  93. package/dist/types/change-types.js +0 -3
  94. package/src/ui/dist/assets/LibraryEntry-CFkd6v_O.js +0 -37
  95. package/src/ui/dist/assets/main-B_jie9r3.js +0 -439
  96. package/src/ui/dist/assets/main-W3oTuTTl.css +0 -1
@@ -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 {
@@ -1,14 +1,51 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.designReferenceKeys = exports.DesignReferenceRequestSchema = exports.DesignReferenceKeySchema = exports.DESIGN_REFERENCE_BATCH_LIMIT = exports.DesignReferenceSearchRequestSchema = void 0;
3
+ exports.designReferenceKeys = exports.DesignReferenceRequestSchema = exports.DesignReferenceKeySchema = exports.DESIGN_REFERENCE_BATCH_LIMIT = exports.DesignReferenceSearchResultSchema = exports.DesignReferenceSearchRequestSchema = exports.DesignLibrarySnapshotSchema = exports.DesignLibraryReferenceSchema = exports.DesignLibrarySourceSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const design_profile_1 = require("./design-profile");
6
+ exports.DesignLibrarySourceSchema = zod_1.z.object({
7
+ id: zod_1.z.string(),
8
+ title: zod_1.z.string(),
9
+ provider: design_profile_1.ProfileProviderSchema,
10
+ isIncluded: zod_1.z.boolean(),
11
+ });
12
+ exports.DesignLibraryReferenceSchema = design_profile_1.ProfileReferenceSchema.extend({
13
+ sourceIds: zod_1.z.array(zod_1.z.string()),
14
+ observation: design_profile_1.ProfileObservationSchema.nullable(),
15
+ });
16
+ exports.DesignLibrarySnapshotSchema = zod_1.z.object({
17
+ profileId: zod_1.z.string(),
18
+ revision: zod_1.z.number(),
19
+ isEnabled: zod_1.z.boolean(),
20
+ sources: zod_1.z.array(exports.DesignLibrarySourceSchema),
21
+ references: zod_1.z.array(exports.DesignLibraryReferenceSchema),
22
+ });
6
23
  exports.DesignReferenceSearchRequestSchema = zod_1.z.object({
7
24
  query: zod_1.z.string().trim().min(2).max(1000),
8
25
  sourceId: zod_1.z.string().min(1).max(200).optional(),
9
26
  limit: zod_1.z.number().int().min(1).max(100).default(24),
10
27
  runtime: design_profile_1.ProfileRuntimeSchema.default('codex'),
11
28
  });
29
+ exports.DesignReferenceSearchResultSchema = zod_1.z.object({
30
+ profileId: zod_1.z.string(),
31
+ query: zod_1.z.string(),
32
+ coverage: zod_1.z.object({
33
+ saved: zod_1.z.number(),
34
+ analyzed: zod_1.z.number(),
35
+ indexed: zod_1.z.number(),
36
+ }),
37
+ results: zod_1.z.array(zod_1.z.object({
38
+ id: zod_1.z.string(),
39
+ key: zod_1.z.string(),
40
+ title: zod_1.z.string(),
41
+ provider: design_profile_1.ProfileProviderSchema,
42
+ url: zod_1.z.string().optional(),
43
+ description: zod_1.z.string().nullable(),
44
+ imageCount: zod_1.z.number(),
45
+ sources: zod_1.z.array(exports.DesignLibrarySourceSchema),
46
+ isIncluded: zod_1.z.boolean(),
47
+ })),
48
+ });
12
49
  exports.DESIGN_REFERENCE_BATCH_LIMIT = 50;
13
50
  const REFERENCE_PREFIX_LENGTH = 12;
14
51
  exports.DesignReferenceKeySchema = zod_1.z