@cat-factory/contracts 0.43.2 → 0.44.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 (48) hide show
  1. package/dist/accountSettings.d.ts +164 -9
  2. package/dist/accountSettings.d.ts.map +1 -1
  3. package/dist/accountSettings.js +75 -7
  4. package/dist/accountSettings.js.map +1 -1
  5. package/dist/routes/_shared.d.ts +1 -1
  6. package/dist/routes/_shared.d.ts.map +1 -1
  7. package/dist/routes/accounts.d.ts +85 -19
  8. package/dist/routes/accounts.d.ts.map +1 -1
  9. package/dist/routes/agent-runs.d.ts +2 -2
  10. package/dist/routes/api-keys.d.ts +2 -2
  11. package/dist/routes/auth.d.ts +81 -2
  12. package/dist/routes/auth.d.ts.map +1 -1
  13. package/dist/routes/auth.js +35 -0
  14. package/dist/routes/auth.js.map +1 -1
  15. package/dist/routes/board.d.ts +8 -8
  16. package/dist/routes/bootstrap.d.ts +3 -3
  17. package/dist/routes/brainstorm.d.ts +8 -8
  18. package/dist/routes/clarity.d.ts +8 -8
  19. package/dist/routes/consensus.d.ts +1 -1
  20. package/dist/routes/documents.d.ts +6 -6
  21. package/dist/routes/environments.d.ts +3 -3
  22. package/dist/routes/execution.d.ts +12 -12
  23. package/dist/routes/followUp.d.ts +5 -5
  24. package/dist/routes/fragment-library.d.ts +6 -6
  25. package/dist/routes/github.d.ts +8 -8
  26. package/dist/routes/human-review.d.ts +1 -1
  27. package/dist/routes/human-test.d.ts +5 -5
  28. package/dist/routes/kaizen.d.ts +1 -1
  29. package/dist/routes/localModels.d.ts +2 -2
  30. package/dist/routes/merge.d.ts +2 -2
  31. package/dist/routes/model-presets.d.ts +2 -2
  32. package/dist/routes/models.d.ts +1 -1
  33. package/dist/routes/notifications.d.ts +2 -2
  34. package/dist/routes/openrouter.d.ts +3 -3
  35. package/dist/routes/personal-subscriptions.d.ts +1 -1
  36. package/dist/routes/pipelines.d.ts +5 -5
  37. package/dist/routes/recurring.d.ts +4 -4
  38. package/dist/routes/release.d.ts +2 -2
  39. package/dist/routes/requirements.d.ts +12 -12
  40. package/dist/routes/sandbox.d.ts +5 -5
  41. package/dist/routes/services.d.ts +3 -3
  42. package/dist/routes/spec.d.ts +1 -1
  43. package/dist/routes/tasks.d.ts +7 -7
  44. package/dist/routes/user-secret.d.ts +4 -4
  45. package/dist/routes/vendor-credentials.d.ts +1 -1
  46. package/dist/routes/visual-confirm.d.ts +3 -3
  47. package/dist/routes/workspaces.d.ts +3 -3
  48. package/package.json +4 -4
@@ -1,10 +1,71 @@
1
1
  import * as v from 'valibot';
2
2
  /**
3
- * Non-secret per-account config. Empty today (the integration credentials live in the
4
- * sealed secrets blob; an integration is enabled by having its creds set). Retained as
5
- * an object so forward-compatible non-secret tuning can be added without a migration.
3
+ * Where an account's binary artifacts (UI screenshots + reference designs) are stored.
4
+ * `off` disables storage (the visual-confirmation gate passes through). `fs`/`s3`/`db` are
5
+ * Node/local only (S3 is deliberately not offered on the Worker the AWS SDK does not belong
6
+ * in the Worker bundle); `r2` is Cloudflare only. Which of these a runtime actually supports
7
+ * is surfaced to the UI via {@link contentStorageCapabilitySchema}.
6
8
  */
7
- export declare const accountSettingsConfigSchema: v.ObjectSchema<{}, undefined>;
9
+ export declare const contentStorageBackendSchema: v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>;
10
+ export type ContentStorageBackend = v.InferOutput<typeof contentStorageBackendSchema>;
11
+ /** Non-secret S3 connection settings (the access keys live in the sealed secrets blob). */
12
+ export declare const contentStorageS3ConfigSchema: v.ObjectSchema<{
13
+ readonly region: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
14
+ readonly bucket: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
15
+ /** Optional key prefix, e.g. `artifacts/`. */
16
+ readonly prefix: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
17
+ /** Optional custom endpoint (S3-compatible stores: MinIO, R2-over-S3, etc.). */
18
+ readonly endpoint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.UrlAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
19
+ /** Force path-style addressing (needed by most S3-compatible stores). */
20
+ readonly forcePathStyle: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
21
+ }, undefined>;
22
+ export type ContentStorageS3Config = v.InferOutput<typeof contentStorageS3ConfigSchema>;
23
+ /** Filesystem (Node/local) settings — just the base directory (defaults to `.file-storage`). */
24
+ export declare const contentStorageFsConfigSchema: v.ObjectSchema<{
25
+ readonly basePath: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 1024, undefined>]>, undefined>;
26
+ }, undefined>;
27
+ export type ContentStorageFsConfig = v.InferOutput<typeof contentStorageFsConfigSchema>;
28
+ /** Non-secret content-storage config: which backend + its non-secret connection settings. */
29
+ export declare const contentStorageConfigSchema: v.ObjectSchema<{
30
+ readonly backend: v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>;
31
+ readonly fs: v.OptionalSchema<v.ObjectSchema<{
32
+ readonly basePath: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 1024, undefined>]>, undefined>;
33
+ }, undefined>, undefined>;
34
+ readonly s3: v.OptionalSchema<v.ObjectSchema<{
35
+ readonly region: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
36
+ readonly bucket: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
37
+ /** Optional key prefix, e.g. `artifacts/`. */
38
+ readonly prefix: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
39
+ /** Optional custom endpoint (S3-compatible stores: MinIO, R2-over-S3, etc.). */
40
+ readonly endpoint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.UrlAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
41
+ /** Force path-style addressing (needed by most S3-compatible stores). */
42
+ readonly forcePathStyle: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
43
+ }, undefined>, undefined>;
44
+ }, undefined>;
45
+ export type ContentStorageConfig = v.InferOutput<typeof contentStorageConfigSchema>;
46
+ /**
47
+ * Non-secret per-account config. Holds the content-storage backend selection (the S3 access
48
+ * keys live in the sealed secrets blob). Retained as an object so forward-compatible
49
+ * non-secret tuning can be added without a migration.
50
+ */
51
+ export declare const accountSettingsConfigSchema: v.ObjectSchema<{
52
+ readonly contentStorage: v.OptionalSchema<v.ObjectSchema<{
53
+ readonly backend: v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>;
54
+ readonly fs: v.OptionalSchema<v.ObjectSchema<{
55
+ readonly basePath: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 1024, undefined>]>, undefined>;
56
+ }, undefined>, undefined>;
57
+ readonly s3: v.OptionalSchema<v.ObjectSchema<{
58
+ readonly region: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
59
+ readonly bucket: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
60
+ /** Optional key prefix, e.g. `artifacts/`. */
61
+ readonly prefix: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
62
+ /** Optional custom endpoint (S3-compatible stores: MinIO, R2-over-S3, etc.). */
63
+ readonly endpoint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.UrlAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
64
+ /** Force path-style addressing (needed by most S3-compatible stores). */
65
+ readonly forcePathStyle: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
66
+ }, undefined>, undefined>;
67
+ }, undefined>, undefined>;
68
+ }, undefined>;
8
69
  export type AccountSettingsConfig = v.InferOutput<typeof accountSettingsConfigSchema>;
9
70
  /** Built-in config used when an account has no row yet. */
10
71
  export declare const DEFAULT_ACCOUNT_SETTINGS_CONFIG: AccountSettingsConfig;
@@ -27,6 +88,12 @@ export declare const webSearchSecretSchema: v.ObjectSchema<{
27
88
  readonly searxngApiKey: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
28
89
  }, undefined>;
29
90
  export type WebSearchSecret = v.InferOutput<typeof webSearchSecretSchema>;
91
+ /** S3 (or S3-compatible) access keys for the content-storage `s3` backend. */
92
+ export declare const s3CredentialsSecretSchema: v.ObjectSchema<{
93
+ readonly accessKeyId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
94
+ readonly secretAccessKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
95
+ }, undefined>;
96
+ export type S3CredentialsSecret = v.InferOutput<typeof s3CredentialsSecretSchema>;
30
97
  /** The decrypted secrets blob (every group optional). */
31
98
  export declare const accountSettingsSecretsSchema: v.ObjectSchema<{
32
99
  readonly slackOAuth: v.OptionalSchema<v.ObjectSchema<{
@@ -39,6 +106,10 @@ export declare const accountSettingsSecretsSchema: v.ObjectSchema<{
39
106
  readonly searxngUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.UrlAction<string, undefined>]>, undefined>;
40
107
  readonly searxngApiKey: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
41
108
  }, undefined>, undefined>;
109
+ readonly s3: v.OptionalSchema<v.ObjectSchema<{
110
+ readonly accessKeyId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
111
+ readonly secretAccessKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
112
+ }, undefined>, undefined>;
42
113
  }, undefined>;
43
114
  export type AccountSettingsSecrets = v.InferOutput<typeof accountSettingsSecretsSchema>;
44
115
  /** Validate a decrypted secrets blob at the read boundary. */
@@ -48,7 +119,24 @@ export declare function parseAccountSettingsSecrets(raw: unknown): AccountSettin
48
119
  * Each secrets group: absent ⇒ leave unchanged, `null` ⇒ clear, value ⇒ set.
49
120
  */
50
121
  export declare const updateAccountSettingsSchema: v.ObjectSchema<{
51
- readonly config: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
122
+ readonly config: v.OptionalSchema<v.ObjectSchema<{
123
+ readonly contentStorage: v.OptionalSchema<v.ObjectSchema<{
124
+ readonly backend: v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>;
125
+ readonly fs: v.OptionalSchema<v.ObjectSchema<{
126
+ readonly basePath: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 1024, undefined>]>, undefined>;
127
+ }, undefined>, undefined>;
128
+ readonly s3: v.OptionalSchema<v.ObjectSchema<{
129
+ readonly region: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
130
+ readonly bucket: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
131
+ /** Optional key prefix, e.g. `artifacts/`. */
132
+ readonly prefix: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
133
+ /** Optional custom endpoint (S3-compatible stores: MinIO, R2-over-S3, etc.). */
134
+ readonly endpoint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.UrlAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
135
+ /** Force path-style addressing (needed by most S3-compatible stores). */
136
+ readonly forcePathStyle: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
137
+ }, undefined>, undefined>;
138
+ }, undefined>, undefined>;
139
+ }, undefined>, undefined>;
52
140
  readonly secrets: v.OptionalSchema<v.ObjectSchema<{
53
141
  readonly slackOAuth: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
54
142
  readonly clientId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
@@ -60,24 +148,91 @@ export declare const updateAccountSettingsSchema: v.ObjectSchema<{
60
148
  readonly searxngUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.UrlAction<string, undefined>]>, undefined>;
61
149
  readonly searxngApiKey: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
62
150
  }, undefined>, undefined>, undefined>;
151
+ readonly s3: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
152
+ readonly accessKeyId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
153
+ readonly secretAccessKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
154
+ }, undefined>, undefined>, undefined>;
63
155
  }, undefined>, undefined>;
64
156
  }, undefined>;
65
157
  export type UpdateAccountSettingsInput = v.InferOutput<typeof updateAccountSettingsSchema>;
158
+ /** Non-secret content-storage presence/status for display — NEVER secret values. */
159
+ export declare const contentStorageSummarySchema: v.ObjectSchema<{
160
+ /** The explicitly-selected backend, or null when the account uses the runtime default. */
161
+ readonly backend: v.NullableSchema<v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>, undefined>;
162
+ /** Configured S3 bucket (non-secret), when the s3 backend is selected. */
163
+ readonly bucket: v.NullableSchema<v.StringSchema<undefined>, undefined>;
164
+ /** Configured filesystem base path (non-secret), when the fs backend is selected. */
165
+ readonly basePath: v.NullableSchema<v.StringSchema<undefined>, undefined>;
166
+ /** Whether S3 access keys are stored (the keys themselves are never returned). */
167
+ readonly s3CredentialsConfigured: v.BooleanSchema<undefined>;
168
+ }, undefined>;
169
+ export type ContentStorageSummary = v.InferOutput<typeof contentStorageSummarySchema>;
66
170
  /** Non-secret presence/status for display — NEVER secret values. */
67
171
  export declare const accountSettingsSummarySchema: v.ObjectSchema<{
68
172
  readonly slackOAuthConfigured: v.BooleanSchema<undefined>;
69
173
  readonly webSearch: v.NullableSchema<v.PicklistSchema<["brave", "searxng"], undefined>, undefined>;
174
+ readonly contentStorage: v.ObjectSchema<{
175
+ /** The explicitly-selected backend, or null when the account uses the runtime default. */
176
+ readonly backend: v.NullableSchema<v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>, undefined>;
177
+ /** Configured S3 bucket (non-secret), when the s3 backend is selected. */
178
+ readonly bucket: v.NullableSchema<v.StringSchema<undefined>, undefined>;
179
+ /** Configured filesystem base path (non-secret), when the fs backend is selected. */
180
+ readonly basePath: v.NullableSchema<v.StringSchema<undefined>, undefined>;
181
+ /** Whether S3 access keys are stored (the keys themselves are never returned). */
182
+ readonly s3CredentialsConfigured: v.BooleanSchema<undefined>;
183
+ }, undefined>;
70
184
  }, undefined>;
71
185
  export type AccountSettingsSummary = v.InferOutput<typeof accountSettingsSummarySchema>;
72
- /** What `GET /accounts/:id/settings` returns — config + summary, never secrets. */
186
+ /**
187
+ * Which content-storage backends THIS runtime can serve + its default when an account has
188
+ * nothing configured. Supplied by the facade so the UI only offers valid options (e.g. `fs`
189
+ * on Node/local, `r2` on Cloudflare) and shows the effective default.
190
+ */
191
+ export declare const contentStorageCapabilitySchema: v.ObjectSchema<{
192
+ readonly supportedBackends: v.ArraySchema<v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>, undefined>;
193
+ readonly defaultBackend: v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>;
194
+ }, undefined>;
195
+ export type ContentStorageCapability = v.InferOutput<typeof contentStorageCapabilitySchema>;
196
+ /** What `GET /accounts/:id/settings` returns — config + summary + runtime capability, never secrets. */
73
197
  export declare const accountSettingsViewSchema: v.ObjectSchema<{
74
- readonly config: v.ObjectSchema<{}, undefined>;
198
+ readonly config: v.ObjectSchema<{
199
+ readonly contentStorage: v.OptionalSchema<v.ObjectSchema<{
200
+ readonly backend: v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>;
201
+ readonly fs: v.OptionalSchema<v.ObjectSchema<{
202
+ readonly basePath: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 1024, undefined>]>, undefined>;
203
+ }, undefined>, undefined>;
204
+ readonly s3: v.OptionalSchema<v.ObjectSchema<{
205
+ readonly region: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
206
+ readonly bucket: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
207
+ /** Optional key prefix, e.g. `artifacts/`. */
208
+ readonly prefix: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
209
+ /** Optional custom endpoint (S3-compatible stores: MinIO, R2-over-S3, etc.). */
210
+ readonly endpoint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.UrlAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
211
+ /** Force path-style addressing (needed by most S3-compatible stores). */
212
+ readonly forcePathStyle: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
213
+ }, undefined>, undefined>;
214
+ }, undefined>, undefined>;
215
+ }, undefined>;
75
216
  readonly summary: v.ObjectSchema<{
76
217
  readonly slackOAuthConfigured: v.BooleanSchema<undefined>;
77
218
  readonly webSearch: v.NullableSchema<v.PicklistSchema<["brave", "searxng"], undefined>, undefined>;
219
+ readonly contentStorage: v.ObjectSchema<{
220
+ /** The explicitly-selected backend, or null when the account uses the runtime default. */
221
+ readonly backend: v.NullableSchema<v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>, undefined>;
222
+ /** Configured S3 bucket (non-secret), when the s3 backend is selected. */
223
+ readonly bucket: v.NullableSchema<v.StringSchema<undefined>, undefined>;
224
+ /** Configured filesystem base path (non-secret), when the fs backend is selected. */
225
+ readonly basePath: v.NullableSchema<v.StringSchema<undefined>, undefined>;
226
+ /** Whether S3 access keys are stored (the keys themselves are never returned). */
227
+ readonly s3CredentialsConfigured: v.BooleanSchema<undefined>;
228
+ }, undefined>;
229
+ }, undefined>;
230
+ readonly contentStorageCapability: v.ObjectSchema<{
231
+ readonly supportedBackends: v.ArraySchema<v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>, undefined>;
232
+ readonly defaultBackend: v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>;
78
233
  }, undefined>;
79
234
  }, undefined>;
80
235
  export type AccountSettingsView = v.InferOutput<typeof accountSettingsViewSchema>;
81
- /** Derive the non-secret summary from the secrets blob. */
82
- export declare function accountSettingsSummary(secrets: AccountSettingsSecrets): AccountSettingsSummary;
236
+ /** Derive the non-secret summary from the secrets blob + the non-secret config. */
237
+ export declare function accountSettingsSummary(secrets: AccountSettingsSecrets, config?: AccountSettingsConfig): AccountSettingsSummary;
83
238
  //# sourceMappingURL=accountSettings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"accountSettings.d.ts","sourceRoot":"","sources":["../src/accountSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAW5B;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,+BAAe,CAAA;AACvD,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAErF,2DAA2D;AAC3D,eAAO,MAAM,+BAA+B,EAAE,qBAG7C,CAAA;AAED,4EAA4E;AAC5E,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,OAAO,GAAG,qBAAqB,CAE9E;AAID,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB;;;;aAIjC,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;aAIhC,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,yDAAyD;AACzD,eAAO,MAAM,4BAA4B;;;;;;;;;;;aAGvC,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,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derived `summary`. DB is the source of
8
8
  // truth (no env fallback). An integration is "on" for an account when its creds exist.
9
9
  // ---------------------------------------------------------------------------
10
+ // ---- Content (binary-artifact) storage -------------------------------------
10
11
  /**
11
- * Non-secret per-account config. Empty today (the integration credentials live in the
12
- * sealed secrets blob; an integration is enabled by having its creds set). Retained as
13
- * an object so forward-compatible non-secret tuning can be added without a migration.
12
+ * Where an account's binary artifacts (UI screenshots + reference designs) are stored.
13
+ * `off` disables storage (the visual-confirmation gate passes through). `fs`/`s3`/`db` are
14
+ * Node/local only (S3 is deliberately not offered on the Worker the AWS SDK does not belong
15
+ * in the Worker bundle); `r2` is Cloudflare only. Which of these a runtime actually supports
16
+ * is surfaced to the UI via {@link contentStorageCapabilitySchema}.
14
17
  */
15
- export const accountSettingsConfigSchema = v.object({});
18
+ export const contentStorageBackendSchema = v.picklist(['off', 'fs', 's3', 'r2', 'db']);
19
+ /** Non-secret S3 connection settings (the access keys live in the sealed secrets blob). */
20
+ export const contentStorageS3ConfigSchema = v.object({
21
+ region: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(120)),
22
+ bucket: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(255)),
23
+ /** Optional key prefix, e.g. `artifacts/`. */
24
+ prefix: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(255))),
25
+ /** Optional custom endpoint (S3-compatible stores: MinIO, R2-over-S3, etc.). */
26
+ endpoint: v.optional(v.pipe(v.string(), v.trim(), v.url(), v.maxLength(255))),
27
+ /** Force path-style addressing (needed by most S3-compatible stores). */
28
+ forcePathStyle: v.optional(v.boolean()),
29
+ });
30
+ /** Filesystem (Node/local) settings — just the base directory (defaults to `.file-storage`). */
31
+ export const contentStorageFsConfigSchema = v.object({
32
+ basePath: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(1024))),
33
+ });
34
+ /** Non-secret content-storage config: which backend + its non-secret connection settings. */
35
+ export const contentStorageConfigSchema = v.object({
36
+ backend: contentStorageBackendSchema,
37
+ fs: v.optional(contentStorageFsConfigSchema),
38
+ s3: v.optional(contentStorageS3ConfigSchema),
39
+ });
40
+ /**
41
+ * Non-secret per-account config. Holds the content-storage backend selection (the S3 access
42
+ * keys live in the sealed secrets blob). Retained as an object so forward-compatible
43
+ * non-secret tuning can be added without a migration.
44
+ */
45
+ export const accountSettingsConfigSchema = v.object({
46
+ contentStorage: v.optional(contentStorageConfigSchema),
47
+ });
16
48
  /** Built-in config used when an account has no row yet. */
17
49
  export const DEFAULT_ACCOUNT_SETTINGS_CONFIG = v.parse(accountSettingsConfigSchema, {});
18
50
  /** Parse + fully-default a (possibly partial/legacy) stored config blob. */
@@ -35,10 +67,16 @@ export const webSearchSecretSchema = v.object({
35
67
  searxngUrl: v.optional(v.pipe(v.string(), v.trim(), v.url())),
36
68
  searxngApiKey: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1))),
37
69
  });
70
+ /** S3 (or S3-compatible) access keys for the content-storage `s3` backend. */
71
+ export const s3CredentialsSecretSchema = v.object({
72
+ accessKeyId: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(255)),
73
+ secretAccessKey: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(255)),
74
+ });
38
75
  /** The decrypted secrets blob (every group optional). */
39
76
  export const accountSettingsSecretsSchema = v.object({
40
77
  slackOAuth: v.optional(slackOAuthSecretSchema),
41
78
  webSearch: v.optional(webSearchSecretSchema),
79
+ s3: v.optional(s3CredentialsSecretSchema),
42
80
  });
43
81
  /** Validate a decrypted secrets blob at the read boundary. */
44
82
  export function parseAccountSettingsSecrets(raw) {
@@ -54,28 +92,58 @@ export const updateAccountSettingsSchema = v.object({
54
92
  secrets: v.optional(v.object({
55
93
  slackOAuth: v.optional(v.nullable(slackOAuthSecretSchema)),
56
94
  webSearch: v.optional(v.nullable(webSearchSecretSchema)),
95
+ s3: v.optional(v.nullable(s3CredentialsSecretSchema)),
57
96
  })),
58
97
  });
98
+ /** Non-secret content-storage presence/status for display — NEVER secret values. */
99
+ export const contentStorageSummarySchema = v.object({
100
+ /** The explicitly-selected backend, or null when the account uses the runtime default. */
101
+ backend: v.nullable(contentStorageBackendSchema),
102
+ /** Configured S3 bucket (non-secret), when the s3 backend is selected. */
103
+ bucket: v.nullable(v.string()),
104
+ /** Configured filesystem base path (non-secret), when the fs backend is selected. */
105
+ basePath: v.nullable(v.string()),
106
+ /** Whether S3 access keys are stored (the keys themselves are never returned). */
107
+ s3CredentialsConfigured: v.boolean(),
108
+ });
59
109
  /** Non-secret presence/status for display — NEVER secret values. */
60
110
  export const accountSettingsSummarySchema = v.object({
61
111
  slackOAuthConfigured: v.boolean(),
62
112
  webSearch: v.nullable(v.picklist(['brave', 'searxng'])),
113
+ contentStorage: contentStorageSummarySchema,
114
+ });
115
+ /**
116
+ * Which content-storage backends THIS runtime can serve + its default when an account has
117
+ * nothing configured. Supplied by the facade so the UI only offers valid options (e.g. `fs`
118
+ * on Node/local, `r2` on Cloudflare) and shows the effective default.
119
+ */
120
+ export const contentStorageCapabilitySchema = v.object({
121
+ supportedBackends: v.array(contentStorageBackendSchema),
122
+ defaultBackend: contentStorageBackendSchema,
63
123
  });
64
- /** What `GET /accounts/:id/settings` returns — config + summary, never secrets. */
124
+ /** What `GET /accounts/:id/settings` returns — config + summary + runtime capability, never secrets. */
65
125
  export const accountSettingsViewSchema = v.object({
66
126
  config: accountSettingsConfigSchema,
67
127
  summary: accountSettingsSummarySchema,
128
+ contentStorageCapability: contentStorageCapabilitySchema,
68
129
  });
69
- /** Derive the non-secret summary from the secrets blob. */
70
- export function accountSettingsSummary(secrets) {
130
+ /** Derive the non-secret summary from the secrets blob + the non-secret config. */
131
+ export function accountSettingsSummary(secrets, config) {
71
132
  const webSearch = secrets.webSearch?.braveApiKey
72
133
  ? 'brave'
73
134
  : secrets.webSearch?.searxngUrl
74
135
  ? 'searxng'
75
136
  : null;
137
+ const cs = config?.contentStorage;
76
138
  return {
77
139
  slackOAuthConfigured: Boolean(secrets.slackOAuth),
78
140
  webSearch,
141
+ contentStorage: {
142
+ backend: cs?.backend ?? null,
143
+ bucket: cs?.s3?.bucket ?? null,
144
+ basePath: cs?.fs?.basePath ?? null,
145
+ s3CredentialsConfigured: Boolean(secrets.s3),
146
+ },
79
147
  };
80
148
  }
81
149
  //# sourceMappingURL=accountSettings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"accountSettings.js","sourceRoot":"","sources":["../src/accountSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,8EAA8E;AAC9E,mFAAmF;AACnF,wFAAwF;AACxF,oFAAoF;AACpF,sFAAsF;AACtF,yFAAyF;AACzF,uFAAuF;AACvF,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;AAGvD,2DAA2D;AAC3D,MAAM,CAAC,MAAM,+BAA+B,GAA0B,CAAC,CAAC,KAAK,CAC3E,2BAA2B,EAC3B,EAAE,CACH,CAAA;AAED,4EAA4E;AAC5E,MAAM,UAAU,0BAA0B,CAAC,GAAY;IACrD,OAAO,CAAC,CAAC,KAAK,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAA;AAClD,CAAC;AAED,+EAA+E;AAE/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACtD,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC1D,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAA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AAE,EAAE,EAAE,QAAQ,IAAI,IAAI;YAClC,uBAAuB,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;SAC7C;KACF,CAAA;AACH,CAAC"}
@@ -54,5 +54,5 @@ export declare const errorResponses: {
54
54
  * not a widened `Record<string, string>`), so the handler's `c.req.valid('param')` and the
55
55
  * client's `pathParams` stay as precise as the inline form.
56
56
  */
57
- export declare function singleStringParam<const K extends string>(key: K): v.ObjectSchema<{ [P in K]: v.StringSchema<undefined>; }, undefined> & import("@toad-contracts/core").ObjectKeysCarrier;
57
+ export declare function singleStringParam<const K extends string>(key: K): v.ObjectSchema<{ [P in K]: v.StringSchema<undefined>; }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
58
58
  //# sourceMappingURL=_shared.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/routes/_shared.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAS5B;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;aAc9B,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErE;;;;;GAKG;AACH,eAAO,MAAM,cAAc;aACzB,KAAK;;;;;;;;;;;aACL,KAAK;;;;;;;;;;;CACG,CAAA;AAEV;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,qBACH,CAAC,oGAC7D"}
1
+ {"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/routes/_shared.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAS5B;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;aAc9B,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErE;;;;;GAKG;AACH,eAAO,MAAM,cAAc;aACzB,KAAK;;;;;;;;;;;aACL,KAAK;;;;;;;;;;;CACG,CAAA;AAEV;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,qBACH,CAAC,yHAC7D"}