@cat-factory/contracts 0.43.3 → 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.
@@ -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,CAAC,CAAC,WAAW,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEvF,8DAA8D;AAC9D,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,OAAO,GAAG,sBAAsB,CAEhF;AAID;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;aAQtC,CAAA;AACF,MAAM,MAA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oFAAoF;AACpF,eAAO,MAAM,2BAA2B;IACtC,0FAA0F;;IAE1F,0EAA0E;;IAE1E,qFAAqF;;IAErF,kFAAkF;;aAElF,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAErF,oEAAoE;AACpE,eAAO,MAAM,4BAA4B;;;;QAZvC,0FAA0F;;QAE1F,0EAA0E;;QAE1E,qFAAqF;;QAErF,kFAAkF;;;aAUlF,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEvF;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;;aAGzC,CAAA;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAE3F,wGAAwG;AACxG,eAAO,MAAM,yBAAyB;;;;;;;;;;gBAxIpC,8CAA8C;;gBAE9C,gFAAgF;;gBAEhF,yEAAyE;;;;;;;;;YAqGzE,0FAA0F;;YAE1F,0EAA0E;;YAE1E,qFAAqF;;YAErF,kFAAkF;;;;;;;;aA6BlF,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF,mFAAmF;AACnF,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,sBAAsB,EAC/B,MAAM,CAAC,EAAE,qBAAqB,GAC7B,sBAAsB,CAiBxB"}
@@ -7,12 +7,44 @@ import * as v from 'valibot';
7
7
  // Secrets are write-only — `GET` returns only the 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":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ema<{
712
- readonly config: v.ObjectSchema<{}, undefined>;
712
+ readonly config: v.ObjectSchema<{
713
+ readonly contentStorage: v.OptionalSchema<v.ObjectSchema<{
714
+ readonly backend: v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>;
715
+ readonly fs: v.OptionalSchema<v.ObjectSchema<{
716
+ readonly basePath: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 1024, undefined>]>, undefined>;
717
+ }, undefined>, undefined>;
718
+ readonly s3: v.OptionalSchema<v.ObjectSchema<{
719
+ readonly region: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
720
+ readonly bucket: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
721
+ readonly prefix: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
722
+ readonly endpoint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.UrlAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
723
+ readonly forcePathStyle: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
724
+ }, undefined>, undefined>;
725
+ }, undefined>, undefined>;
726
+ }, undefined>;
713
727
  readonly summary: v.ObjectSchema<{
714
728
  readonly slackOAuthConfigured: v.BooleanSchema<undefined>;
715
729
  readonly webSearch: v.NullableSchema<v.PicklistSchema<["brave", "searxng"], undefined>, undefined>;
730
+ readonly contentStorage: v.ObjectSchema<{
731
+ readonly backend: v.NullableSchema<v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>, undefined>;
732
+ readonly bucket: v.NullableSchema<v.StringSchema<undefined>, undefined>;
733
+ readonly basePath: v.NullableSchema<v.StringSchema<undefined>, undefined>;
734
+ readonly s3CredentialsConfigured: v.BooleanSchema<undefined>;
735
+ }, undefined>;
736
+ }, undefined>;
737
+ readonly contentStorageCapability: v.ObjectSchema<{
738
+ readonly supportedBackends: v.ArraySchema<v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>, undefined>;
739
+ readonly defaultBackend: v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>;
716
740
  }, undefined>;
717
741
  }, undefined>;
718
742
  };
@@ -726,7 +750,21 @@ export declare const updateAccountSettingsContract: {
726
750
  accountId: string;
727
751
  }) => string;
728
752
  readonly requestBodySchema: v.ObjectSchema<{
729
- readonly config: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
753
+ readonly config: v.OptionalSchema<v.ObjectSchema<{
754
+ readonly contentStorage: v.OptionalSchema<v.ObjectSchema<{
755
+ readonly backend: v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>;
756
+ readonly fs: v.OptionalSchema<v.ObjectSchema<{
757
+ readonly basePath: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 1024, undefined>]>, undefined>;
758
+ }, undefined>, undefined>;
759
+ readonly s3: v.OptionalSchema<v.ObjectSchema<{
760
+ readonly region: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
761
+ readonly bucket: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
762
+ readonly prefix: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
763
+ readonly endpoint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.UrlAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
764
+ readonly forcePathStyle: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
765
+ }, undefined>, undefined>;
766
+ }, undefined>, undefined>;
767
+ }, undefined>, undefined>;
730
768
  readonly secrets: v.OptionalSchema<v.ObjectSchema<{
731
769
  readonly slackOAuth: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
732
770
  readonly clientId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
@@ -738,6 +776,10 @@ export declare const updateAccountSettingsContract: {
738
776
  readonly searxngUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.UrlAction<string, undefined>]>, undefined>;
739
777
  readonly searxngApiKey: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
740
778
  }, undefined>, undefined>, undefined>;
779
+ readonly s3: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
780
+ readonly accessKeyId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
781
+ readonly secretAccessKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
782
+ }, undefined>, undefined>, undefined>;
741
783
  }, undefined>, undefined>;
742
784
  }, undefined>;
743
785
  readonly responsesByStatusCode: {
@@ -764,10 +806,34 @@ export declare const updateAccountSettingsContract: {
764
806
  }, undefined>;
765
807
  }, undefined>;
766
808
  readonly 200: v.ObjectSchema<{
767
- readonly config: v.ObjectSchema<{}, undefined>;
809
+ readonly config: v.ObjectSchema<{
810
+ readonly contentStorage: v.OptionalSchema<v.ObjectSchema<{
811
+ readonly backend: v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>;
812
+ readonly fs: v.OptionalSchema<v.ObjectSchema<{
813
+ readonly basePath: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 1024, undefined>]>, undefined>;
814
+ }, undefined>, undefined>;
815
+ readonly s3: v.OptionalSchema<v.ObjectSchema<{
816
+ readonly region: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
817
+ readonly bucket: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
818
+ readonly prefix: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
819
+ readonly endpoint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.UrlAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
820
+ readonly forcePathStyle: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
821
+ }, undefined>, undefined>;
822
+ }, undefined>, undefined>;
823
+ }, undefined>;
768
824
  readonly summary: v.ObjectSchema<{
769
825
  readonly slackOAuthConfigured: v.BooleanSchema<undefined>;
770
826
  readonly webSearch: v.NullableSchema<v.PicklistSchema<["brave", "searxng"], undefined>, undefined>;
827
+ readonly contentStorage: v.ObjectSchema<{
828
+ readonly backend: v.NullableSchema<v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>, undefined>;
829
+ readonly bucket: v.NullableSchema<v.StringSchema<undefined>, undefined>;
830
+ readonly basePath: v.NullableSchema<v.StringSchema<undefined>, undefined>;
831
+ readonly s3CredentialsConfigured: v.BooleanSchema<undefined>;
832
+ }, undefined>;
833
+ }, undefined>;
834
+ readonly contentStorageCapability: v.ObjectSchema<{
835
+ readonly supportedBackends: v.ArraySchema<v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>, undefined>;
836
+ readonly defaultBackend: v.PicklistSchema<["off", "fs", "s3", "r2", "db"], undefined>;
771
837
  }, undefined>;
772
838
  }, undefined>;
773
839
  };
@@ -1 +1 @@
1
- {"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/routes/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqC,MAAM,yBAAyB,CAAA;AAC3F,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAyC5B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI/B,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKhC,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhC,CAAA;AAIF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKrC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMnC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMjC,CAAA;AAIF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKlC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMnC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQnC,CAAA;AAIF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKrC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMxC,CAAA"}
@@ -6,6 +6,13 @@ import * as v from 'valibot';
6
6
  * shape: the server's `AppConfig.localMode` derives its type from it (see
7
7
  * `@cat-factory/server` config), and the SPA reads the inferred type directly.
8
8
  */
9
+ /**
10
+ * The source-control providers a PAT login can target. Mirrors kernel's `VcsProvider`
11
+ * (contracts sits below kernel, so it can't import it) — keep the two member lists in
12
+ * step. Drives the local-mode login UI's provider picker + the `/auth/pat` body.
13
+ */
14
+ export declare const vcsProviderSchema: v.PicklistSchema<["github", "gitlab"], undefined>;
15
+ export type VcsProviderWire = v.InferOutput<typeof vcsProviderSchema>;
9
16
  export declare const localModeConfigSchema: v.ObjectSchema<{
10
17
  /** True on the local-mode facade (a single developer running the whole product locally). */
11
18
  readonly enabled: v.BooleanSchema<undefined>;
@@ -14,6 +21,21 @@ export declare const localModeConfigSchema: v.ObjectSchema<{
14
21
  * pre-selected so the developer can create one in a click. Absent once a PAT is set.
15
22
  */
16
23
  readonly githubPatSetupUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
24
+ /**
25
+ * Source-control PAT login methods the local facade can serve, so the login screen
26
+ * renders the right controls without probing. Absent on non-local facades.
27
+ * - `configured` — providers with a PAT set server-side (env): one-click "Continue as …".
28
+ * - `available` — providers the user may paste a PAT for inline (a resolver is wired).
29
+ * - `setupUrls` — per-provider "create a PAT" link with the right scopes pre-selected,
30
+ * so the paste-a-PAT form can deep-link straight to the token page. The server owns
31
+ * the scopes (they differ per provider), so the SPA renders the link rather than
32
+ * hard-coding URLs. Keyed by provider; missing entry ⇒ no deep link for it.
33
+ */
34
+ readonly patLogin: v.OptionalSchema<v.ObjectSchema<{
35
+ readonly configured: v.ArraySchema<v.PicklistSchema<["github", "gitlab"], undefined>, undefined>;
36
+ readonly available: v.ArraySchema<v.PicklistSchema<["github", "gitlab"], undefined>, undefined>;
37
+ readonly setupUrls: v.OptionalSchema<v.RecordSchema<v.PicklistSchema<["github", "gitlab"], undefined>, v.StringSchema<undefined>, undefined>, undefined>;
38
+ }, undefined>, undefined>;
17
39
  }, undefined>;
18
40
  export type LocalModeConfig = v.InferOutput<typeof localModeConfigSchema>;
19
41
  export declare const authConfigContract: {
@@ -57,6 +79,21 @@ export declare const authConfigContract: {
57
79
  * pre-selected so the developer can create one in a click. Absent once a PAT is set.
58
80
  */
59
81
  readonly githubPatSetupUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
82
+ /**
83
+ * Source-control PAT login methods the local facade can serve, so the login screen
84
+ * renders the right controls without probing. Absent on non-local facades.
85
+ * - `configured` — providers with a PAT set server-side (env): one-click "Continue as …".
86
+ * - `available` — providers the user may paste a PAT for inline (a resolver is wired).
87
+ * - `setupUrls` — per-provider "create a PAT" link with the right scopes pre-selected,
88
+ * so the paste-a-PAT form can deep-link straight to the token page. The server owns
89
+ * the scopes (they differ per provider), so the SPA renders the link rather than
90
+ * hard-coding URLs. Keyed by provider; missing entry ⇒ no deep link for it.
91
+ */
92
+ readonly patLogin: v.OptionalSchema<v.ObjectSchema<{
93
+ readonly configured: v.ArraySchema<v.PicklistSchema<["github", "gitlab"], undefined>, undefined>;
94
+ readonly available: v.ArraySchema<v.PicklistSchema<["github", "gitlab"], undefined>, undefined>;
95
+ readonly setupUrls: v.OptionalSchema<v.RecordSchema<v.PicklistSchema<["github", "gitlab"], undefined>, v.StringSchema<undefined>, undefined>, undefined>;
96
+ }, undefined>, undefined>;
60
97
  }, undefined>, undefined>;
61
98
  }, undefined>;
62
99
  };
@@ -263,6 +300,48 @@ export declare const passwordLoginContract: {
263
300
  }, undefined>;
264
301
  };
265
302
  };
303
+ export declare const patLoginContract: {
304
+ readonly method: "post";
305
+ readonly pathResolver: () => string;
306
+ readonly requestBodySchema: v.ObjectSchema<{
307
+ readonly provider: v.PicklistSchema<["github", "gitlab"], undefined>;
308
+ readonly token: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 4000, undefined>]>, undefined>;
309
+ }, undefined>;
310
+ readonly responsesByStatusCode: {
311
+ readonly '4xx': v.ObjectSchema<{
312
+ readonly error: v.ObjectSchema<{
313
+ readonly code: v.StringSchema<undefined>;
314
+ readonly message: v.StringSchema<undefined>;
315
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
316
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
317
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
318
+ readonly message: v.StringSchema<undefined>;
319
+ }, undefined>, undefined>, undefined>;
320
+ }, undefined>;
321
+ }, undefined>;
322
+ readonly '5xx': v.ObjectSchema<{
323
+ readonly error: v.ObjectSchema<{
324
+ readonly code: v.StringSchema<undefined>;
325
+ readonly message: v.StringSchema<undefined>;
326
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
327
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
328
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
329
+ readonly message: v.StringSchema<undefined>;
330
+ }, undefined>, undefined>, undefined>;
331
+ }, undefined>;
332
+ }, undefined>;
333
+ readonly 200: v.ObjectSchema<{
334
+ readonly token: v.StringSchema<undefined>;
335
+ readonly user: v.ObjectSchema<{
336
+ readonly id: v.StringSchema<undefined>;
337
+ readonly login: v.StringSchema<undefined>;
338
+ readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
339
+ readonly avatarUrl: v.NullableSchema<v.StringSchema<undefined>, undefined>;
340
+ readonly email: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
341
+ }, undefined>;
342
+ }, undefined>;
343
+ };
344
+ };
266
345
  export declare const forgotPasswordContract: {
267
346
  readonly method: "post";
268
347
  readonly pathResolver: () => string;
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/routes/auth.ts"],"names":[],"mappings":"A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B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQ3B,CAAA;AAMF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKjC,CAAA;AAGF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKhC,CAAA;AAIF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKjC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMnC,CAAA;AAIF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIrB,CAAA;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKzB,CAAA"}
@@ -24,6 +24,12 @@ const sessionUserViewSchema = v.object({
24
24
  * shape: the server's `AppConfig.localMode` derives its type from it (see
25
25
  * `@cat-factory/server` config), and the SPA reads the inferred type directly.
26
26
  */
27
+ /**
28
+ * The source-control providers a PAT login can target. Mirrors kernel's `VcsProvider`
29
+ * (contracts sits below kernel, so it can't import it) — keep the two member lists in
30
+ * step. Drives the local-mode login UI's provider picker + the `/auth/pat` body.
31
+ */
32
+ export const vcsProviderSchema = v.picklist(['github', 'gitlab']);
27
33
  export const localModeConfigSchema = v.object({
28
34
  /** True on the local-mode facade (a single developer running the whole product locally). */
29
35
  enabled: v.boolean(),
@@ -32,6 +38,21 @@ export const localModeConfigSchema = v.object({
32
38
  * pre-selected so the developer can create one in a click. Absent once a PAT is set.
33
39
  */
34
40
  githubPatSetupUrl: v.optional(v.string()),
41
+ /**
42
+ * Source-control PAT login methods the local facade can serve, so the login screen
43
+ * renders the right controls without probing. Absent on non-local facades.
44
+ * - `configured` — providers with a PAT set server-side (env): one-click "Continue as …".
45
+ * - `available` — providers the user may paste a PAT for inline (a resolver is wired).
46
+ * - `setupUrls` — per-provider "create a PAT" link with the right scopes pre-selected,
47
+ * so the paste-a-PAT form can deep-link straight to the token page. The server owns
48
+ * the scopes (they differ per provider), so the SPA renders the link rather than
49
+ * hard-coding URLs. Keyed by provider; missing entry ⇒ no deep link for it.
50
+ */
51
+ patLogin: v.optional(v.object({
52
+ configured: v.array(vcsProviderSchema),
53
+ available: v.array(vcsProviderSchema),
54
+ setupUrls: v.optional(v.record(vcsProviderSchema, v.string())),
55
+ })),
35
56
  });
36
57
  const authConfigViewSchema = v.object({
37
58
  enabled: v.boolean(),
@@ -100,6 +121,20 @@ export const passwordLoginContract = defineApiContract({
100
121
  requestBodySchema: passwordLoginSchema,
101
122
  responsesByStatusCode: { 200: loginResultSchema, ...errorResponses },
102
123
  });
124
+ // ---- Source-control PAT login (local mode) --------------------------------
125
+ // Log in as the account a source-control PAT belongs to. `token` omitted ⇒ use the
126
+ // server-configured PAT for that provider (the one-click path); `token` present ⇒ the
127
+ // user pasted one inline. Returns the same `{ token, user }` as password login. Served
128
+ // only where an identity resolver is wired (local mode); 503 otherwise.
129
+ export const patLoginContract = defineApiContract({
130
+ method: 'post',
131
+ pathResolver: () => '/pat',
132
+ requestBodySchema: v.object({
133
+ provider: vcsProviderSchema,
134
+ token: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(4000))),
135
+ }),
136
+ responsesByStatusCode: { 200: loginResultSchema, ...errorResponses },
137
+ });
103
138
  // ---- Forgot / reset password ----------------------------------------------
104
139
  // Request a reset link. ALWAYS succeeds (204) regardless of whether the email is
105
140
  // registered, so the response can't be used to enumerate accounts.
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/routes/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB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AAE,EAAE,EAAE,CAAC,gBAAgB,KAAK,SAAS;IAC3D,iBAAiB,EAAE,cAAc;IACjC,qBAAqB,EAAE,EAAE,GAAG,EAAE,4BAA4B,EAAE,GAAG,cAAc,EAAE;CAChF,CAAC,CAAA;AAEF,8EAA8E;AAE9E,MAAM,CAAC,MAAM,UAAU,GAAG,iBAAiB,CAAC;IAC1C,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,GAAG,EAAE,CAAC,KAAK;IACzB,qBAAqB,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,cAAc,EAAE;CAChE,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,iBAAiB,CAAC;IAC9C,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,GAAG,EAAE,CAAC,SAAS;IAC7B,iBAAiB,EAAE,cAAc;IACjC,qBAAqB,EAAE,EAAE,GAAG,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE;CAClE,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/contracts",
3
- "version": "0.43.3",
3
+ "version": "0.44.0",
4
4
  "description": "Valibot wire contract shared between the Agent Architecture Board frontend and backend.",
5
5
  "repository": {
6
6
  "type": "git",