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
@@ -9,157 +9,45 @@ export declare const ReferenceContentsPageSchema: z.ZodObject<{
9
9
  url: z.ZodOptional<z.ZodString>;
10
10
  media: z.ZodArray<z.ZodObject<{
11
11
  hash: z.ZodString;
12
- mimeType: z.ZodEnum<["image/png", "image/jpeg", "image/webp", "image/gif"]>;
12
+ mimeType: z.ZodEnum<{
13
+ "image/png": "image/png";
14
+ "image/jpeg": "image/jpeg";
15
+ "image/webp": "image/webp";
16
+ "image/gif": "image/gif";
17
+ }>;
13
18
  bytes: z.ZodNumber;
14
- representation: z.ZodDefault<z.ZodEnum<["image", "video-cover", "page", "variant"]>>;
19
+ representation: z.ZodDefault<z.ZodEnum<{
20
+ variant: "variant";
21
+ image: "image";
22
+ "video-cover": "video-cover";
23
+ page: "page";
24
+ }>>;
15
25
  page: z.ZodOptional<z.ZodNumber>;
16
- }, "strip", z.ZodTypeAny, {
17
- hash: string;
18
- mimeType: "image/png" | "image/jpeg" | "image/webp" | "image/gif";
19
- bytes: number;
20
- representation: "variant" | "image" | "video-cover" | "page";
21
- page?: number | undefined;
22
- }, {
23
- hash: string;
24
- mimeType: "image/png" | "image/jpeg" | "image/webp" | "image/gif";
25
- bytes: number;
26
- page?: number | undefined;
27
- representation?: "variant" | "image" | "video-cover" | "page" | undefined;
28
- }>, "many">;
29
- remoteImages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
30
- remoteImageRepresentations: z.ZodOptional<z.ZodArray<z.ZodEnum<["image", "video-cover"]>, "many">>;
26
+ }, z.core.$strip>>;
27
+ remoteImages: z.ZodOptional<z.ZodArray<z.ZodString>>;
28
+ remoteImageRepresentations: z.ZodOptional<z.ZodArray<z.ZodEnum<{
29
+ image: "image";
30
+ "video-cover": "video-cover";
31
+ }>>>;
31
32
  unsupportedReason: z.ZodOptional<z.ZodString>;
32
33
  variant: z.ZodOptional<z.ZodObject<{
33
34
  projectId: z.ZodString;
34
35
  sessionId: z.ZodString;
35
36
  variantId: z.ZodString;
36
- } & {
37
37
  treeSha: z.ZodOptional<z.ZodString>;
38
- }, "strict", z.ZodTypeAny, {
39
- projectId: string;
40
- sessionId: string;
41
- variantId: string;
42
- treeSha?: string | undefined;
43
- }, {
44
- projectId: string;
45
- sessionId: string;
46
- variantId: string;
47
- treeSha?: string | undefined;
48
- }>>;
38
+ }, z.core.$strict>>;
49
39
  note: z.ZodOptional<z.ZodString>;
50
- } & {
51
- provider: z.ZodEnum<["cosmos", "pinterest", "arena", "x"]>;
52
- }, "strip", z.ZodTypeAny, {
53
- title: string;
54
- text: string;
55
- provider: "pinterest" | "arena" | "cosmos" | "x";
56
- remoteId: string;
57
- media: {
58
- hash: string;
59
- mimeType: "image/png" | "image/jpeg" | "image/webp" | "image/gif";
60
- bytes: number;
61
- representation: "variant" | "image" | "video-cover" | "page";
62
- page?: number | undefined;
63
- }[];
64
- variant?: {
65
- projectId: string;
66
- sessionId: string;
67
- variantId: string;
68
- treeSha?: string | undefined;
69
- } | undefined;
70
- url?: string | undefined;
71
- note?: string | undefined;
72
- remoteImages?: string[] | undefined;
73
- remoteImageRepresentations?: ("image" | "video-cover")[] | undefined;
74
- unsupportedReason?: string | undefined;
75
- }, {
76
- title: string;
77
- text: string;
78
- provider: "pinterest" | "arena" | "cosmos" | "x";
79
- remoteId: string;
80
- media: {
81
- hash: string;
82
- mimeType: "image/png" | "image/jpeg" | "image/webp" | "image/gif";
83
- bytes: number;
84
- page?: number | undefined;
85
- representation?: "variant" | "image" | "video-cover" | "page" | undefined;
86
- }[];
87
- variant?: {
88
- projectId: string;
89
- sessionId: string;
90
- variantId: string;
91
- treeSha?: string | undefined;
92
- } | undefined;
93
- url?: string | undefined;
94
- note?: string | undefined;
95
- remoteImages?: string[] | undefined;
96
- remoteImageRepresentations?: ("image" | "video-cover")[] | undefined;
97
- unsupportedReason?: string | undefined;
98
- }>, "many">;
40
+ provider: z.ZodEnum<{
41
+ pinterest: "pinterest";
42
+ arena: "arena";
43
+ cosmos: "cosmos";
44
+ x: "x";
45
+ }>;
46
+ }, z.core.$strip>>;
99
47
  total: z.ZodNullable<z.ZodNumber>;
100
48
  nextCursor: z.ZodNullable<z.ZodString>;
101
49
  isCollectionComplete: z.ZodBoolean;
102
- }, "strip", z.ZodTypeAny, {
103
- accountId: string;
104
- references: {
105
- title: string;
106
- text: string;
107
- provider: "pinterest" | "arena" | "cosmos" | "x";
108
- remoteId: string;
109
- media: {
110
- hash: string;
111
- mimeType: "image/png" | "image/jpeg" | "image/webp" | "image/gif";
112
- bytes: number;
113
- representation: "variant" | "image" | "video-cover" | "page";
114
- page?: number | undefined;
115
- }[];
116
- variant?: {
117
- projectId: string;
118
- sessionId: string;
119
- variantId: string;
120
- treeSha?: string | undefined;
121
- } | undefined;
122
- url?: string | undefined;
123
- note?: string | undefined;
124
- remoteImages?: string[] | undefined;
125
- remoteImageRepresentations?: ("image" | "video-cover")[] | undefined;
126
- unsupportedReason?: string | undefined;
127
- }[];
128
- total: number | null;
129
- nextCursor: string | null;
130
- collectionId: string;
131
- isCollectionComplete: boolean;
132
- }, {
133
- accountId: string;
134
- references: {
135
- title: string;
136
- text: string;
137
- provider: "pinterest" | "arena" | "cosmos" | "x";
138
- remoteId: string;
139
- media: {
140
- hash: string;
141
- mimeType: "image/png" | "image/jpeg" | "image/webp" | "image/gif";
142
- bytes: number;
143
- page?: number | undefined;
144
- representation?: "variant" | "image" | "video-cover" | "page" | undefined;
145
- }[];
146
- variant?: {
147
- projectId: string;
148
- sessionId: string;
149
- variantId: string;
150
- treeSha?: string | undefined;
151
- } | undefined;
152
- url?: string | undefined;
153
- note?: string | undefined;
154
- remoteImages?: string[] | undefined;
155
- remoteImageRepresentations?: ("image" | "video-cover")[] | undefined;
156
- unsupportedReason?: string | undefined;
157
- }[];
158
- total: number | null;
159
- nextCursor: string | null;
160
- collectionId: string;
161
- isCollectionComplete: boolean;
162
- }>;
50
+ }, z.core.$strip>;
163
51
  export type ReferenceContentsPage = z.infer<typeof ReferenceContentsPageSchema>;
164
52
  export declare class ReferenceConnectionError extends Error {
165
53
  readonly reason: 'not_connected' | 'account_changed';
@@ -4,83 +4,28 @@ export declare const XAccountSchema: z.ZodObject<{
4
4
  id: z.ZodString;
5
5
  username: z.ZodString;
6
6
  name: z.ZodOptional<z.ZodString>;
7
- }, "strip", z.ZodTypeAny, {
8
- id: string;
9
- username: string;
10
- name?: string | undefined;
11
- }, {
12
- id: string;
13
- username: string;
14
- name?: string | undefined;
15
- }>;
16
- export declare const XMediaUrlSchema: z.ZodEffects<z.ZodString, string, string>;
7
+ }, z.core.$strip>;
8
+ export declare const XMediaUrlSchema: z.ZodString;
17
9
  export declare const XBookmarkSchema: z.ZodObject<{
18
10
  id: z.ZodString;
19
11
  author: z.ZodObject<{
20
12
  id: z.ZodString;
21
13
  username: z.ZodString;
22
14
  name: z.ZodOptional<z.ZodString>;
23
- }, "strip", z.ZodTypeAny, {
24
- id: string;
25
- username: string;
26
- name?: string | undefined;
27
- }, {
28
- id: string;
29
- username: string;
30
- name?: string | undefined;
31
- }>;
15
+ }, z.core.$strip>;
32
16
  text: z.ZodString;
33
- links: z.ZodArray<z.ZodString, "many">;
17
+ links: z.ZodArray<z.ZodString>;
34
18
  unavailableVideoCount: z.ZodDefault<z.ZodNumber>;
35
19
  media: z.ZodArray<z.ZodObject<{
36
20
  key: z.ZodString;
37
- url: z.ZodEffects<z.ZodString, string, string>;
38
- representation: z.ZodEnum<["image", "video-cover"]>;
21
+ url: z.ZodString;
22
+ representation: z.ZodEnum<{
23
+ image: "image";
24
+ "video-cover": "video-cover";
25
+ }>;
39
26
  altText: z.ZodNullable<z.ZodString>;
40
- }, "strip", z.ZodTypeAny, {
41
- url: string;
42
- key: string;
43
- representation: "image" | "video-cover";
44
- altText: string | null;
45
- }, {
46
- url: string;
47
- key: string;
48
- representation: "image" | "video-cover";
49
- altText: string | null;
50
- }>, "many">;
51
- }, "strip", z.ZodTypeAny, {
52
- text: string;
53
- id: string;
54
- media: {
55
- url: string;
56
- key: string;
57
- representation: "image" | "video-cover";
58
- altText: string | null;
59
- }[];
60
- author: {
61
- id: string;
62
- username: string;
63
- name?: string | undefined;
64
- };
65
- links: string[];
66
- unavailableVideoCount: number;
67
- }, {
68
- text: string;
69
- id: string;
70
- media: {
71
- url: string;
72
- key: string;
73
- representation: "image" | "video-cover";
74
- altText: string | null;
75
- }[];
76
- author: {
77
- id: string;
78
- username: string;
79
- name?: string | undefined;
80
- };
81
- links: string[];
82
- unavailableVideoCount?: number | undefined;
83
- }>;
27
+ }, z.core.$strip>>;
28
+ }, z.core.$strip>;
84
29
  export declare const XBookmarksPageSchema: z.ZodObject<{
85
30
  bookmarks: z.ZodArray<z.ZodObject<{
86
31
  id: z.ZodString;
@@ -88,263 +33,62 @@ export declare const XBookmarksPageSchema: z.ZodObject<{
88
33
  id: z.ZodString;
89
34
  username: z.ZodString;
90
35
  name: z.ZodOptional<z.ZodString>;
91
- }, "strip", z.ZodTypeAny, {
92
- id: string;
93
- username: string;
94
- name?: string | undefined;
95
- }, {
96
- id: string;
97
- username: string;
98
- name?: string | undefined;
99
- }>;
36
+ }, z.core.$strip>;
100
37
  text: z.ZodString;
101
- links: z.ZodArray<z.ZodString, "many">;
38
+ links: z.ZodArray<z.ZodString>;
102
39
  unavailableVideoCount: z.ZodDefault<z.ZodNumber>;
103
40
  media: z.ZodArray<z.ZodObject<{
104
41
  key: z.ZodString;
105
- url: z.ZodEffects<z.ZodString, string, string>;
106
- representation: z.ZodEnum<["image", "video-cover"]>;
42
+ url: z.ZodString;
43
+ representation: z.ZodEnum<{
44
+ image: "image";
45
+ "video-cover": "video-cover";
46
+ }>;
107
47
  altText: z.ZodNullable<z.ZodString>;
108
- }, "strip", z.ZodTypeAny, {
109
- url: string;
110
- key: string;
111
- representation: "image" | "video-cover";
112
- altText: string | null;
113
- }, {
114
- url: string;
115
- key: string;
116
- representation: "image" | "video-cover";
117
- altText: string | null;
118
- }>, "many">;
119
- }, "strip", z.ZodTypeAny, {
120
- text: string;
121
- id: string;
122
- media: {
123
- url: string;
124
- key: string;
125
- representation: "image" | "video-cover";
126
- altText: string | null;
127
- }[];
128
- author: {
129
- id: string;
130
- username: string;
131
- name?: string | undefined;
132
- };
133
- links: string[];
134
- unavailableVideoCount: number;
135
- }, {
136
- text: string;
137
- id: string;
138
- media: {
139
- url: string;
140
- key: string;
141
- representation: "image" | "video-cover";
142
- altText: string | null;
143
- }[];
144
- author: {
145
- id: string;
146
- username: string;
147
- name?: string | undefined;
148
- };
149
- links: string[];
150
- unavailableVideoCount?: number | undefined;
151
- }>, "many">;
48
+ }, z.core.$strip>>;
49
+ }, z.core.$strip>>;
152
50
  nextCursor: z.ZodNullable<z.ZodString>;
153
- }, "strip", z.ZodTypeAny, {
154
- nextCursor: string | null;
155
- bookmarks: {
156
- text: string;
157
- id: string;
158
- media: {
159
- url: string;
160
- key: string;
161
- representation: "image" | "video-cover";
162
- altText: string | null;
163
- }[];
164
- author: {
165
- id: string;
166
- username: string;
167
- name?: string | undefined;
168
- };
169
- links: string[];
170
- unavailableVideoCount: number;
171
- }[];
172
- }, {
173
- nextCursor: string | null;
174
- bookmarks: {
175
- text: string;
176
- id: string;
177
- media: {
178
- url: string;
179
- key: string;
180
- representation: "image" | "video-cover";
181
- altText: string | null;
182
- }[];
183
- author: {
184
- id: string;
185
- username: string;
186
- name?: string | undefined;
187
- };
188
- links: string[];
189
- unavailableVideoCount?: number | undefined;
190
- }[];
191
- }>;
192
- export declare const XBookmarksResultSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
51
+ }, z.core.$strip>;
52
+ export declare const XBookmarksResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
193
53
  bookmarks: z.ZodArray<z.ZodObject<{
194
54
  id: z.ZodString;
195
55
  author: z.ZodObject<{
196
56
  id: z.ZodString;
197
57
  username: z.ZodString;
198
58
  name: z.ZodOptional<z.ZodString>;
199
- }, "strip", z.ZodTypeAny, {
200
- id: string;
201
- username: string;
202
- name?: string | undefined;
203
- }, {
204
- id: string;
205
- username: string;
206
- name?: string | undefined;
207
- }>;
59
+ }, z.core.$strip>;
208
60
  text: z.ZodString;
209
- links: z.ZodArray<z.ZodString, "many">;
61
+ links: z.ZodArray<z.ZodString>;
210
62
  unavailableVideoCount: z.ZodDefault<z.ZodNumber>;
211
63
  media: z.ZodArray<z.ZodObject<{
212
64
  key: z.ZodString;
213
- url: z.ZodEffects<z.ZodString, string, string>;
214
- representation: z.ZodEnum<["image", "video-cover"]>;
65
+ url: z.ZodString;
66
+ representation: z.ZodEnum<{
67
+ image: "image";
68
+ "video-cover": "video-cover";
69
+ }>;
215
70
  altText: z.ZodNullable<z.ZodString>;
216
- }, "strip", z.ZodTypeAny, {
217
- url: string;
218
- key: string;
219
- representation: "image" | "video-cover";
220
- altText: string | null;
221
- }, {
222
- url: string;
223
- key: string;
224
- representation: "image" | "video-cover";
225
- altText: string | null;
226
- }>, "many">;
227
- }, "strip", z.ZodTypeAny, {
228
- text: string;
229
- id: string;
230
- media: {
231
- url: string;
232
- key: string;
233
- representation: "image" | "video-cover";
234
- altText: string | null;
235
- }[];
236
- author: {
237
- id: string;
238
- username: string;
239
- name?: string | undefined;
240
- };
241
- links: string[];
242
- unavailableVideoCount: number;
243
- }, {
244
- text: string;
245
- id: string;
246
- media: {
247
- url: string;
248
- key: string;
249
- representation: "image" | "video-cover";
250
- altText: string | null;
251
- }[];
252
- author: {
253
- id: string;
254
- username: string;
255
- name?: string | undefined;
256
- };
257
- links: string[];
258
- unavailableVideoCount?: number | undefined;
259
- }>, "many">;
71
+ }, z.core.$strip>>;
72
+ }, z.core.$strip>>;
260
73
  nextCursor: z.ZodNullable<z.ZodString>;
261
- } & {
262
74
  status: z.ZodLiteral<"ok">;
263
75
  account: z.ZodObject<{
264
76
  id: z.ZodString;
265
77
  username: z.ZodString;
266
78
  name: z.ZodOptional<z.ZodString>;
267
- }, "strip", z.ZodTypeAny, {
268
- id: string;
269
- username: string;
270
- name?: string | undefined;
271
- }, {
272
- id: string;
273
- username: string;
274
- name?: string | undefined;
275
- }>;
276
- }, "strip", z.ZodTypeAny, {
277
- status: "ok";
278
- nextCursor: string | null;
279
- bookmarks: {
280
- text: string;
281
- id: string;
282
- media: {
283
- url: string;
284
- key: string;
285
- representation: "image" | "video-cover";
286
- altText: string | null;
287
- }[];
288
- author: {
289
- id: string;
290
- username: string;
291
- name?: string | undefined;
292
- };
293
- links: string[];
294
- unavailableVideoCount: number;
295
- }[];
296
- account: {
297
- id: string;
298
- username: string;
299
- name?: string | undefined;
300
- };
301
- }, {
302
- status: "ok";
303
- nextCursor: string | null;
304
- bookmarks: {
305
- text: string;
306
- id: string;
307
- media: {
308
- url: string;
309
- key: string;
310
- representation: "image" | "video-cover";
311
- altText: string | null;
312
- }[];
313
- author: {
314
- id: string;
315
- username: string;
316
- name?: string | undefined;
317
- };
318
- links: string[];
319
- unavailableVideoCount?: number | undefined;
320
- }[];
321
- account: {
322
- id: string;
323
- username: string;
324
- name?: string | undefined;
325
- };
326
- }>, z.ZodObject<{
79
+ }, z.core.$strip>;
80
+ }, z.core.$strip>, z.ZodObject<{
327
81
  status: z.ZodLiteral<"not_connected">;
328
- }, "strip", z.ZodTypeAny, {
329
- status: "not_connected";
330
- }, {
331
- status: "not_connected";
332
- }>, z.ZodObject<{
82
+ }, z.core.$strip>, z.ZodObject<{
333
83
  status: z.ZodLiteral<"error">;
334
84
  message: z.ZodString;
335
- reason: z.ZodOptional<z.ZodEnum<["rate_limited", "account_changed", "provider_unavailable"]>>;
85
+ reason: z.ZodOptional<z.ZodEnum<{
86
+ rate_limited: "rate_limited";
87
+ provider_unavailable: "provider_unavailable";
88
+ account_changed: "account_changed";
89
+ }>>;
336
90
  retryAfterMs: z.ZodOptional<z.ZodNumber>;
337
- }, "strip", z.ZodTypeAny, {
338
- message: string;
339
- status: "error";
340
- reason?: "rate_limited" | "provider_unavailable" | "account_changed" | undefined;
341
- retryAfterMs?: number | undefined;
342
- }, {
343
- message: string;
344
- status: "error";
345
- reason?: "rate_limited" | "provider_unavailable" | "account_changed" | undefined;
346
- retryAfterMs?: number | undefined;
347
- }>]>;
91
+ }, z.core.$strip>], "status">;
348
92
  export type XAccount = z.infer<typeof XAccountSchema>;
349
93
  export type XBookmark = z.infer<typeof XBookmarkSchema>;
350
94
  export type XBookmarksPage = z.infer<typeof XBookmarksPageSchema>;
@@ -1,3 +1,4 @@
1
+ import type { FailureReasonCode } from './failureReason';
1
2
  export type DevServerFailureReason = 'spawn_error' | 'exited' | 'timeout' | 'missing_dev_script' | 'compile_error' | 'dependency_install_failed';
2
3
  export declare const isCompilationFailureOutput: (output: string) => boolean;
3
4
  export declare function isPortInUseOutput(output: string): boolean;
@@ -8,6 +9,8 @@ export declare class DevServerStartError extends Error {
8
9
  readonly detail: string;
9
10
  readonly exitCode: number | null;
10
11
  readonly signal: NodeJS.Signals | null;
12
+ readonly reasonCode?: FailureReasonCode;
13
+ readonly summary?: string;
11
14
  constructor(opts: {
12
15
  message: string;
13
16
  reason: DevServerFailureReason;
@@ -15,6 +18,8 @@ export declare class DevServerStartError extends Error {
15
18
  detail: string;
16
19
  exitCode?: number | null;
17
20
  signal?: NodeJS.Signals | null;
21
+ reasonCode?: FailureReasonCode;
22
+ summary?: string;
18
23
  });
19
24
  }
20
25
  export declare function isDevServerStartError(err: unknown): err is DevServerStartError;
@@ -21,6 +21,8 @@ class DevServerStartError extends Error {
21
21
  detail;
22
22
  exitCode;
23
23
  signal;
24
+ reasonCode;
25
+ summary;
24
26
  constructor(opts) {
25
27
  super(opts.message);
26
28
  this.name = 'DevServerStartError';
@@ -29,6 +31,8 @@ class DevServerStartError extends Error {
29
31
  this.detail = opts.detail;
30
32
  this.exitCode = opts.exitCode ?? null;
31
33
  this.signal = opts.signal ?? null;
34
+ this.reasonCode = opts.reasonCode;
35
+ this.summary = opts.summary;
32
36
  }
33
37
  }
34
38
  exports.DevServerStartError = DevServerStartError;
@@ -3,6 +3,5 @@ type ResolveDisplayLocaleOptions = {
3
3
  systemLocale?: string;
4
4
  };
5
5
  export declare const resolveDisplayLocale: (options?: ResolveDisplayLocaleOptions) => string;
6
- export declare const isEnglishDisplayLocale: (locale: string) => boolean;
7
6
  export {};
8
7
  //# sourceMappingURL=displayLocale.d.ts.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isEnglishDisplayLocale = exports.resolveDisplayLocale = void 0;
3
+ exports.resolveDisplayLocale = void 0;
4
4
  const DEFAULT_DISPLAY_LOCALE = 'en';
5
5
  const canonicalLocale = (candidate) => {
6
6
  if (!candidate)
@@ -23,6 +23,4 @@ const resolveDisplayLocale = (options = {}) => {
23
23
  DEFAULT_DISPLAY_LOCALE);
24
24
  };
25
25
  exports.resolveDisplayLocale = resolveDisplayLocale;
26
- const isEnglishDisplayLocale = (locale) => locale.toLowerCase().split('-')[0] === 'en';
27
- exports.isEnglishDisplayLocale = isEnglishDisplayLocale;
28
26
  //# sourceMappingURL=displayLocale.js.map
@@ -0,0 +1,16 @@
1
+ export declare const FAILURE_REASON_CODES: readonly ["multiple_lockfiles", "unsupported_package_manager", "invalid_package_manager_field", "invalid_manifest", "invalid_workspace", "path_outside_workspace", "dangling_symlink", "version_unreadable", "version_mismatch", "no_install_command", "install_failed", "installer_unstoppable", "inputs_changed", "ENOENT", "EACCES", "EPERM", "EEXIST", "ENOTDIR", "EISDIR", "ELOOP", "ENOSPC", "EMFILE", "EADDRINUSE", "ECONNREFUSED", "ECONNRESET", "ETIMEDOUT", "EBUSY", "ENOTSUP", "EINVAL", "ENOTEMPTY", "EROFS", "EAI_AGAIN", "timeout", "aborted", "unknown"];
2
+ export type FailureReasonCode = (typeof FAILURE_REASON_CODES)[number];
3
+ export interface FailureReason {
4
+ reasonCode: FailureReasonCode;
5
+ reasonDetail?: string;
6
+ }
7
+ export declare const failureReasonCode: (error: unknown) => FailureReasonCode;
8
+ export declare const failureReason: (error: unknown) => FailureReason;
9
+ export declare const failureReasonProperties: (error: unknown) => {
10
+ reason_code?: FailureReasonCode;
11
+ reason_detail?: string;
12
+ };
13
+ export declare const failureReasonCodeProperties: (error: unknown) => {
14
+ reason_code?: FailureReasonCode;
15
+ };
16
+ //# sourceMappingURL=failureReason.d.ts.map