@sylphx/contract 0.5.0 → 0.5.1
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.
- package/CHANGELOG.md +6 -0
- package/dist/endpoints/databases.d.ts +2 -2
- package/dist/endpoints/kv-admin.d.ts +1 -1
- package/dist/endpoints/kv-admin.js +1 -1
- package/dist/endpoints/kv.d.ts +19 -13
- package/dist/endpoints/kv.d.ts.map +1 -1
- package/dist/endpoints/kv.js +9 -9
- package/dist/endpoints/notifications.d.ts +7 -0
- package/dist/endpoints/notifications.d.ts.map +1 -1
- package/dist/endpoints/project-manifest.d.ts +110 -4
- package/dist/endpoints/project-manifest.d.ts.map +1 -1
- package/dist/endpoints/storage.d.ts +18 -0
- package/dist/endpoints/storage.d.ts.map +1 -1
- package/dist/endpoints/storage.js +11 -1
- package/dist/index.d.ts +155 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/schemas/auth.d.ts +1 -0
- package/dist/schemas/auth.d.ts.map +1 -1
- package/dist/schemas/auth.js +1 -0
- package/dist/schemas/database.d.ts +2 -2
- package/dist/schemas/database.js +2 -2
- package/dist/schemas/kv-admin.d.ts +1 -1
- package/dist/schemas/kv-admin.js +1 -1
- package/dist/schemas/kv.d.ts +12 -4
- package/dist/schemas/kv.d.ts.map +1 -1
- package/dist/schemas/kv.js +17 -5
- package/dist/schemas/notifications.d.ts +11 -0
- package/dist/schemas/notifications.d.ts.map +1 -1
- package/dist/schemas/notifications.js +11 -0
- package/dist/schemas/project-manifest.d.ts +226 -9
- package/dist/schemas/project-manifest.d.ts.map +1 -1
- package/dist/schemas/project-manifest.js +75 -3
- package/dist/schemas/resources.d.ts +4 -4
- package/dist/schemas/resources.js +2 -2
- package/dist/schemas/storage.d.ts +29 -0
- package/dist/schemas/storage.d.ts.map +1 -1
- package/dist/schemas/storage.js +19 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Plane: `management`. The manifest is the user-facing, editable surface
|
|
5
5
|
* declared in Git at repo root. The CLI parses `sylphx.toml` via Bun's
|
|
6
6
|
* built-in TOML parser, validates against this schema, and pushes to the
|
|
7
|
-
* Management API (`PUT /projects/:id/manifest
|
|
7
|
+
* Management API (`PUT /projects/:id/manifest`).
|
|
8
8
|
*
|
|
9
9
|
* Slug-valued (not TypeID) on purpose: the manifest is what users type,
|
|
10
10
|
* so slugs are the DX-correct surface. The server maps slugs → TypeIDs
|
|
@@ -32,6 +32,8 @@ export const MachineSize = Schema.Literal('nano', 'micro', 'small', 'standard',
|
|
|
32
32
|
export const BuildMachineSize = Schema.Literal('standard', 'large', 'xlarge');
|
|
33
33
|
/** Buildpack identifier per ADR-071. `auto` lets the platform detect. */
|
|
34
34
|
export const BuildpackName = Schema.Literal('auto', 'ruby', 'node', 'python', 'static', 'dockerfile');
|
|
35
|
+
/** Build strategy hint. `dockerfile` pins the build to the declared Dockerfile. */
|
|
36
|
+
export const BuildStrategy = Schema.Literal('auto', 'buildpack', 'dockerfile', 'nixpacks');
|
|
35
37
|
/** Service type discriminant — drives K8s workload shape (Deployment/Job). */
|
|
36
38
|
export const ServiceType = Schema.Literal('web', 'worker', 'cron', 'function');
|
|
37
39
|
/** Deploy strategy — `rolling` is the Sylphx default (ArgoCD PreSync-gated). */
|
|
@@ -61,8 +63,12 @@ export const ManifestBuildSection = Schema.Struct({
|
|
|
61
63
|
* package.json / Gemfile / requirements.txt / Dockerfile.
|
|
62
64
|
*/
|
|
63
65
|
buildpack: Schema.optional(BuildpackName),
|
|
66
|
+
/** High-level build strategy alias used by current sylphx.toml files. */
|
|
67
|
+
strategy: Schema.optional(BuildStrategy),
|
|
64
68
|
/** Override path to Dockerfile (implies buildpack=dockerfile). */
|
|
65
69
|
dockerfile: Schema.optional(Schema.String),
|
|
70
|
+
/** Docker build context path. `context` is the product-facing TOML alias. */
|
|
71
|
+
context: Schema.optional(Schema.String),
|
|
66
72
|
/** Docker build context path (default: repo root). */
|
|
67
73
|
docker_context: Schema.optional(Schema.String),
|
|
68
74
|
/** Custom build command; overrides buildpack default. */
|
|
@@ -91,10 +97,26 @@ export const ManifestDeploySection = Schema.Struct({
|
|
|
91
97
|
graceful_shutdown: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.between(0, 300))),
|
|
92
98
|
});
|
|
93
99
|
// ── [[services]] ───────────────────────────────────────────────────────────
|
|
100
|
+
export const ManifestServiceBuildSection = Schema.Struct({
|
|
101
|
+
strategy: Schema.optional(BuildStrategy),
|
|
102
|
+
dockerfile: Schema.optional(Schema.String),
|
|
103
|
+
context: Schema.optional(Schema.String),
|
|
104
|
+
docker_context: Schema.optional(Schema.String),
|
|
105
|
+
build_command: Schema.optional(Schema.String),
|
|
106
|
+
});
|
|
107
|
+
export const ManifestServiceHealthSection = Schema.Struct({
|
|
108
|
+
mode: Schema.optional(Schema.Literal('http', 'tcp', 'command')),
|
|
109
|
+
path: Schema.optional(Schema.String),
|
|
110
|
+
command: Schema.optional(Schema.String),
|
|
111
|
+
});
|
|
94
112
|
export const ManifestServiceSection = Schema.Struct({
|
|
95
113
|
/** Service name — unique within project. Used as K8s Deployment name. */
|
|
96
114
|
name: Slug,
|
|
97
115
|
type: ServiceType,
|
|
116
|
+
/** Per-service build override. Root [build] remains the default. */
|
|
117
|
+
build: Schema.optional(ManifestServiceBuildSection),
|
|
118
|
+
/** Per-service health contract. Platform owns probe translation. */
|
|
119
|
+
health: Schema.optional(ManifestServiceHealthSection),
|
|
98
120
|
/** Container start command. */
|
|
99
121
|
command: Schema.optional(Schema.String),
|
|
100
122
|
/** Internal container port; required for `web`. */
|
|
@@ -134,6 +156,22 @@ export const ManifestServiceSection = Schema.Struct({
|
|
|
134
156
|
env: Schema.optional(Schema.Array(Schema.String)),
|
|
135
157
|
/** Per-service resource bindings (by resource name). */
|
|
136
158
|
resources: Schema.optional(Schema.Array(Slug)),
|
|
159
|
+
/** Paths whose changes should trigger this service in monorepos. */
|
|
160
|
+
watch_paths: Schema.optional(Schema.Array(Schema.String)),
|
|
161
|
+
});
|
|
162
|
+
// ── [database] ─────────────────────────────────────────────────────────────
|
|
163
|
+
export const ManifestMigrationEngine = Schema.Literal('atlas', 'drizzle', 'prisma', 'alembic', 'flyway', 'goose', 'sqlx', 'custom');
|
|
164
|
+
export const ManifestMigrationDestructivePolicy = Schema.Literal('require-approval', 'allow');
|
|
165
|
+
export const ManifestMigrationsSection = Schema.Struct({
|
|
166
|
+
engine: ManifestMigrationEngine,
|
|
167
|
+
dir: Schema.optional(Schema.String),
|
|
168
|
+
image: Slug,
|
|
169
|
+
command: Schema.String.pipe(Schema.minLength(1)),
|
|
170
|
+
timeout: Schema.optional(Schema.String),
|
|
171
|
+
destructive_policy: Schema.optional(ManifestMigrationDestructivePolicy),
|
|
172
|
+
});
|
|
173
|
+
export const ManifestDatabaseSection = Schema.Struct({
|
|
174
|
+
migrations: Schema.optional(ManifestMigrationsSection),
|
|
137
175
|
});
|
|
138
176
|
// ── [env] ──────────────────────────────────────────────────────────────────
|
|
139
177
|
/**
|
|
@@ -157,10 +195,15 @@ export const ManifestDomainSection = Schema.Struct({
|
|
|
157
195
|
aliases: Schema.optional(Schema.Array(Schema.String)),
|
|
158
196
|
});
|
|
159
197
|
// ── [resources] ────────────────────────────────────────────────────────────
|
|
160
|
-
export const
|
|
198
|
+
export const ManifestManagedResourceTier = Schema.Literal('nano', 'micro', 'standard', 'large', 'xl', 'hobby', 'starter', 'pro', 'business', 'enterprise', 'enterprise-2x', 'enterprise-4x');
|
|
199
|
+
export const PostgresTier = ManifestManagedResourceTier;
|
|
161
200
|
export const PostgresVersion = Schema.Literal('15', '16', '17');
|
|
162
|
-
export const SearchTier =
|
|
201
|
+
export const SearchTier = ManifestManagedResourceTier;
|
|
202
|
+
export const KvTier = ManifestManagedResourceTier;
|
|
203
|
+
export const ManifestVolumeTier = ManifestManagedResourceTier;
|
|
204
|
+
export const ManifestVolumeAccessMode = Schema.Literal('ReadWriteOnce', 'ReadWriteMany');
|
|
163
205
|
export const ManifestDatabaseEngine = Schema.Literal('postgres');
|
|
206
|
+
export const ManifestKvEngine = Schema.Literal('valkey');
|
|
164
207
|
export const ManifestSearchEngine = Schema.Literal('typesense');
|
|
165
208
|
export const ManifestDatabaseResource = Schema.Struct({
|
|
166
209
|
/** Capability-specific engine. PostgreSQL is the first supported database engine. */
|
|
@@ -174,6 +217,12 @@ export const ManifestDatabaseResource = Schema.Struct({
|
|
|
174
217
|
/** Branch-per-preview (P0 gap #4 sibling). */
|
|
175
218
|
branch_on_preview: Schema.optional(Schema.Boolean),
|
|
176
219
|
});
|
|
220
|
+
export const ManifestKvResource = Schema.Struct({
|
|
221
|
+
/** Capability-specific engine. Valkey is the first supported KV engine. */
|
|
222
|
+
engine: Schema.optional(ManifestKvEngine),
|
|
223
|
+
tier: KvTier,
|
|
224
|
+
storage_gb: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.between(1, 10000))),
|
|
225
|
+
});
|
|
177
226
|
export const ManifestSearchResource = Schema.Struct({
|
|
178
227
|
/** Capability-specific engine. Typesense is the first supported search engine. */
|
|
179
228
|
engine: Schema.optional(ManifestSearchEngine),
|
|
@@ -181,9 +230,31 @@ export const ManifestSearchResource = Schema.Struct({
|
|
|
181
230
|
storage_gb: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.between(1, 10000))),
|
|
182
231
|
nodes: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.between(1, 9))),
|
|
183
232
|
});
|
|
233
|
+
export const ManifestVolumeResource = Schema.Struct({
|
|
234
|
+
tier: ManifestVolumeTier,
|
|
235
|
+
storage_gb: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.between(1, 10000))),
|
|
236
|
+
/**
|
|
237
|
+
* ReadWriteMany is required when a volume is shared by multiple sandboxes,
|
|
238
|
+
* workers, or replicas. ReadWriteOnce remains valid for single-writer app
|
|
239
|
+
* disks.
|
|
240
|
+
*/
|
|
241
|
+
access_mode: Schema.optional(ManifestVolumeAccessMode),
|
|
242
|
+
/**
|
|
243
|
+
* Optional env-facing path metadata. This does not mount the volume into an
|
|
244
|
+
* app service by itself; service/task mounts stay explicit bindings.
|
|
245
|
+
*/
|
|
246
|
+
mount_path: Schema.optional(Schema.String.pipe(Schema.pattern(/^\//))),
|
|
247
|
+
/**
|
|
248
|
+
* Binding role controls env var prefix. Example: role="workspace" emits
|
|
249
|
+
* WORKSPACE_VOLUME_ID for a volume binding.
|
|
250
|
+
*/
|
|
251
|
+
role: Schema.optional(Slug),
|
|
252
|
+
});
|
|
184
253
|
export const ManifestResourcesSection = Schema.Struct({
|
|
185
254
|
database: Schema.optional(ManifestDatabaseResource),
|
|
255
|
+
kv: Schema.optional(ManifestKvResource),
|
|
186
256
|
search: Schema.optional(ManifestSearchResource),
|
|
257
|
+
volume: Schema.optional(ManifestVolumeResource),
|
|
187
258
|
});
|
|
188
259
|
// ── [ci] ───────────────────────────────────────────────────────────────────
|
|
189
260
|
export const ManifestCiSection = Schema.Struct({
|
|
@@ -259,6 +330,7 @@ export const SylphxManifest = Schema.Struct({
|
|
|
259
330
|
build: Schema.optional(ManifestBuildSection),
|
|
260
331
|
deploy: Schema.optional(ManifestDeploySection),
|
|
261
332
|
services: Schema.optional(Schema.Array(ManifestServiceSection)),
|
|
333
|
+
database: Schema.optional(ManifestDatabaseSection),
|
|
262
334
|
env: Schema.optional(Schema.Record({ key: Schema.String, value: ManifestEnvValue })),
|
|
263
335
|
domains: Schema.optional(Schema.Array(ManifestDomainSection)),
|
|
264
336
|
environments: Schema.optional(ManifestEnvironmentsMap),
|
|
@@ -47,8 +47,8 @@ export declare const DatabaseResource: Schema.Struct<{
|
|
|
47
47
|
/** Plaintext metadata — safe to return (not secret) */
|
|
48
48
|
host: Schema.NullOr<typeof Schema.String>;
|
|
49
49
|
port: Schema.NullOr<typeof Schema.Number>;
|
|
50
|
-
dbUser:
|
|
51
|
-
dbName:
|
|
50
|
+
dbUser: typeof Schema.String;
|
|
51
|
+
dbName: typeof Schema.String;
|
|
52
52
|
clusterName: Schema.NullOr<typeof Schema.String>;
|
|
53
53
|
branchName: Schema.NullOr<typeof Schema.String>;
|
|
54
54
|
bindingCount: typeof Schema.Number;
|
|
@@ -87,8 +87,8 @@ export declare const ListDatabaseResourcesResult: Schema.Struct<{
|
|
|
87
87
|
/** Plaintext metadata — safe to return (not secret) */
|
|
88
88
|
host: Schema.NullOr<typeof Schema.String>;
|
|
89
89
|
port: Schema.NullOr<typeof Schema.Number>;
|
|
90
|
-
dbUser:
|
|
91
|
-
dbName:
|
|
90
|
+
dbUser: typeof Schema.String;
|
|
91
|
+
dbName: typeof Schema.String;
|
|
92
92
|
clusterName: Schema.NullOr<typeof Schema.String>;
|
|
93
93
|
branchName: Schema.NullOr<typeof Schema.String>;
|
|
94
94
|
bindingCount: typeof Schema.Number;
|
|
@@ -39,8 +39,8 @@ export const DatabaseResource = Schema.Struct({
|
|
|
39
39
|
/** Plaintext metadata — safe to return (not secret) */
|
|
40
40
|
host: Schema.NullOr(Schema.String),
|
|
41
41
|
port: Schema.NullOr(Schema.Number),
|
|
42
|
-
dbUser: Schema.
|
|
43
|
-
dbName: Schema.
|
|
42
|
+
dbUser: Schema.String,
|
|
43
|
+
dbName: Schema.String,
|
|
44
44
|
clusterName: Schema.NullOr(Schema.String),
|
|
45
45
|
branchName: Schema.NullOr(Schema.String),
|
|
46
46
|
bindingCount: Schema.Number,
|
|
@@ -199,6 +199,35 @@ export declare const SoftDeleteFileResult: Schema.Struct<{
|
|
|
199
199
|
isDeleted: Schema.Literal<[true]>;
|
|
200
200
|
}>;
|
|
201
201
|
export type SoftDeleteFileResult = typeof SoftDeleteFileResult.Type;
|
|
202
|
+
export declare const StorageTakedownReason: Schema.Literal<["dmca", "malware", "abuse", "legal"]>;
|
|
203
|
+
export type StorageTakedownReason = typeof StorageTakedownReason.Type;
|
|
204
|
+
export declare const TakedownFileRequest: Schema.Struct<{
|
|
205
|
+
reason: Schema.Literal<["dmca", "malware", "abuse", "legal"]>;
|
|
206
|
+
noticeId: Schema.optional<typeof Schema.String>;
|
|
207
|
+
source: Schema.optional<typeof Schema.String>;
|
|
208
|
+
description: Schema.optional<typeof Schema.String>;
|
|
209
|
+
}>;
|
|
210
|
+
export type TakedownFileRequest = typeof TakedownFileRequest.Type;
|
|
211
|
+
export declare const StorageTakedownRecord: Schema.Struct<{
|
|
212
|
+
reason: Schema.Literal<["dmca", "malware", "abuse", "legal"]>;
|
|
213
|
+
noticeId: Schema.NullOr<typeof Schema.String>;
|
|
214
|
+
source: Schema.NullOr<typeof Schema.String>;
|
|
215
|
+
description: Schema.NullOr<typeof Schema.String>;
|
|
216
|
+
actedAt: typeof Schema.DateFromString;
|
|
217
|
+
}>;
|
|
218
|
+
export type StorageTakedownRecord = typeof StorageTakedownRecord.Type;
|
|
219
|
+
export declare const TakedownFileResult: Schema.Struct<{
|
|
220
|
+
id: Schema.brand<typeof Schema.String, "FileId">;
|
|
221
|
+
isDeleted: Schema.Literal<[true]>;
|
|
222
|
+
takedown: Schema.Struct<{
|
|
223
|
+
reason: Schema.Literal<["dmca", "malware", "abuse", "legal"]>;
|
|
224
|
+
noticeId: Schema.NullOr<typeof Schema.String>;
|
|
225
|
+
source: Schema.NullOr<typeof Schema.String>;
|
|
226
|
+
description: Schema.NullOr<typeof Schema.String>;
|
|
227
|
+
actedAt: typeof Schema.DateFromString;
|
|
228
|
+
}>;
|
|
229
|
+
}>;
|
|
230
|
+
export type TakedownFileResult = typeof TakedownFileResult.Type;
|
|
202
231
|
export declare const RestoreFileResult: Schema.Struct<{
|
|
203
232
|
id: Schema.brand<typeof Schema.String, "FileId">;
|
|
204
233
|
filename: typeof Schema.String;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/schemas/storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAM/B,eAAO,MAAM,MAAM,8CAA6C,CAAA;AAChE,MAAM,MA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156,6 +156,25 @@ export const SoftDeleteFileResult = Schema.Struct({
|
|
|
156
156
|
id: FileId,
|
|
157
157
|
isDeleted: Schema.Literal(true),
|
|
158
158
|
});
|
|
159
|
+
export const StorageTakedownReason = Schema.Literal('dmca', 'malware', 'abuse', 'legal');
|
|
160
|
+
export const TakedownFileRequest = Schema.Struct({
|
|
161
|
+
reason: StorageTakedownReason,
|
|
162
|
+
noticeId: Schema.optional(Schema.String),
|
|
163
|
+
source: Schema.optional(Schema.String),
|
|
164
|
+
description: Schema.optional(Schema.String),
|
|
165
|
+
});
|
|
166
|
+
export const StorageTakedownRecord = Schema.Struct({
|
|
167
|
+
reason: StorageTakedownReason,
|
|
168
|
+
noticeId: Schema.NullOr(Schema.String),
|
|
169
|
+
source: Schema.NullOr(Schema.String),
|
|
170
|
+
description: Schema.NullOr(Schema.String),
|
|
171
|
+
actedAt: Schema.DateFromString,
|
|
172
|
+
});
|
|
173
|
+
export const TakedownFileResult = Schema.Struct({
|
|
174
|
+
id: FileId,
|
|
175
|
+
isDeleted: Schema.Literal(true),
|
|
176
|
+
takedown: StorageTakedownRecord,
|
|
177
|
+
});
|
|
159
178
|
export const RestoreFileResult = File;
|
|
160
179
|
// ============================================================================
|
|
161
180
|
// Signed URLs
|