@vibes.diy/api-impl 8.0.8 → 8.0.9
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/README.md +56 -48
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -227,82 +227,90 @@ interface VibesApiSQLCtx {
|
|
|
227
227
|
Defined in `svc/sql/vibes-diy-api-schema.ts` using Drizzle ORM.
|
|
228
228
|
|
|
229
229
|
**Assets** - Binary content storage (could move to R2)
|
|
230
|
-
|
|
231
|
-
|
|
230
|
+
|
|
231
|
+
| Column | Type | Description |
|
|
232
|
+
| --------- | ------- | -------------- |
|
|
232
233
|
| `assetId` | text PK | CID of content |
|
|
233
|
-
| `content` | blob
|
|
234
|
-
| `created` | text
|
|
234
|
+
| `content` | blob | Actual content |
|
|
235
|
+
| `created` | text | ISO timestamp |
|
|
235
236
|
|
|
236
237
|
**UserSlugBindings** - Maps users to their human-friendly slugs
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
|
238
|
+
|
|
239
|
+
| Column | Type | Description |
|
|
240
|
+
| ------------ | ---- | --------------------------------- |
|
|
241
|
+
| `userId` | text | User identifier |
|
|
240
242
|
| `userHandle` | text | Human-friendly user slug (unique) |
|
|
241
|
-
| `created`
|
|
243
|
+
| `created` | text | ISO timestamp |
|
|
242
244
|
|
|
243
245
|
Primary key: `(userHandle, userId)`. Unique index on `userHandle`.
|
|
244
246
|
|
|
245
247
|
**AppSlugBindings** - Maps apps to slugs within a user's namespace
|
|
246
|
-
|
|
247
|
-
|
|
248
|
+
|
|
249
|
+
| Column | Type | Description |
|
|
250
|
+
| ------------ | ------- | -------------------------------------- |
|
|
248
251
|
| `userHandle` | text FK | References UserSlugBindings.userHandle |
|
|
249
|
-
| `appSlug`
|
|
250
|
-
| `created`
|
|
252
|
+
| `appSlug` | text | Human-friendly app slug |
|
|
253
|
+
| `created` | text | ISO timestamp |
|
|
251
254
|
|
|
252
255
|
Primary key: `(appSlug, userHandle)`.
|
|
253
256
|
|
|
254
257
|
**Apps** - Deployed app versions with filesystem and environment
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
|
258
|
-
| `
|
|
259
|
-
| `
|
|
260
|
-
| `
|
|
261
|
-
| `
|
|
262
|
-
| `
|
|
258
|
+
|
|
259
|
+
| Column | Type | Description |
|
|
260
|
+
| ------------ | ---- | --------------------------------------- |
|
|
261
|
+
| `appSlug` | text | App identifier |
|
|
262
|
+
| `userId` | text | Owner |
|
|
263
|
+
| `userHandle` | text | Owner's slug |
|
|
264
|
+
| `releaseSeq` | int | Incremented on each deployment |
|
|
265
|
+
| `fsId` | text | CID of filesystem manifest |
|
|
266
|
+
| `env` | json | Environment variables (VibesEnv) |
|
|
263
267
|
| `fileSystem` | json | Array of FileSystemItem with transforms |
|
|
264
|
-
| `mode`
|
|
265
|
-
| `created`
|
|
268
|
+
| `mode` | text | 'production' or 'dev' |
|
|
269
|
+
| `created` | text | ISO timestamp |
|
|
266
270
|
|
|
267
271
|
Primary key: `(appSlug, userId, releaseSeq)`. Indexes on `fsId` and `created`.
|
|
268
272
|
|
|
269
273
|
**ChatContexts** - Chat session containers
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
|
273
|
-
| `
|
|
274
|
-
| `
|
|
274
|
+
|
|
275
|
+
| Column | Type | Description |
|
|
276
|
+
| ----------- | ------- | ------------- |
|
|
277
|
+
| `contextId` | text PK | UUID v4 |
|
|
278
|
+
| `userId` | text | Owner |
|
|
279
|
+
| `created` | text | ISO timestamp |
|
|
275
280
|
|
|
276
281
|
**ChatSections** - Individual messages/blocks within a chat
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
|
280
|
-
| `
|
|
281
|
-
| `
|
|
282
|
-
| `
|
|
283
|
-
| `
|
|
282
|
+
|
|
283
|
+
| Column | Type | Description |
|
|
284
|
+
| ----------- | ------- | ----------------------------------------------------- |
|
|
285
|
+
| `contextId` | text FK | References ChatContexts.contextId |
|
|
286
|
+
| `seq` | int | Section sequence number (0-indexed, auto-incremented) |
|
|
287
|
+
| `origin` | text | 'user' or 'llm' |
|
|
288
|
+
| `blocks` | json | Array of BlockMsgs or PromptMsg from call-ai-v2 |
|
|
289
|
+
| `created` | text | ISO timestamp |
|
|
284
290
|
|
|
285
291
|
Primary key: `(seq, contextId)`.
|
|
286
292
|
|
|
287
293
|
### Environment Variables
|
|
288
294
|
|
|
289
295
|
**Required:**
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
|
293
|
-
| `
|
|
294
|
-
| `
|
|
295
|
-
| `
|
|
296
|
-
| `
|
|
297
|
-
| `
|
|
296
|
+
|
|
297
|
+
| Variable | Purpose |
|
|
298
|
+
| ---------------------------- | --------------------------------------------------- |
|
|
299
|
+
| `CLOUD_SESSION_TOKEN_PUBLIC` | Public key for cloud session tokens |
|
|
300
|
+
| `CLERK_PUBLISHABLE_KEY` | Clerk auth verification |
|
|
301
|
+
| `DEVICE_ID_CA_PRIV_KEY` | Device ID certificate authority private key |
|
|
302
|
+
| `DEVICE_ID_CA_CERT` | Device ID certificate authority cert |
|
|
303
|
+
| `FP_VERSION` | Fireproof version for import maps |
|
|
304
|
+
| `VIBES_SVC_HOSTNAME_BASE` | Base hostname for deployed apps (e.g., `vibes.app`) |
|
|
298
305
|
|
|
299
306
|
**Optional (with defaults):**
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
|
303
|
-
| `
|
|
304
|
-
| `
|
|
305
|
-
| `
|
|
307
|
+
|
|
308
|
+
| Variable | Default | Purpose |
|
|
309
|
+
| --------------------------- | ------- | ---------------------------- |
|
|
310
|
+
| `VIBES_SVC_PROTOCOL` | `https` | Protocol for deployed apps |
|
|
311
|
+
| `MAX_APP_SLUG_PER_USER_ID` | `10` | Max app slugs per user |
|
|
312
|
+
| `MAX_USER_SLUG_PER_USER_ID` | `10` | Max user slugs per user |
|
|
313
|
+
| `MAX_APPS_PER_USER_ID` | `50` | Max app deployments per user |
|
|
306
314
|
|
|
307
315
|
## Message Types
|
|
308
316
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/api-impl",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.9",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@adviser/cement": "~0.5.34",
|
|
12
|
-
"@vibes.diy/api-pkg": "8.0.
|
|
13
|
-
"@vibes.diy/api-types": "8.0.
|
|
14
|
-
"@vibes.diy/call-ai-v2": "8.0.
|
|
15
|
-
"@vibes.diy/identity": "8.0.
|
|
16
|
-
"@vibes.diy/vibe-types": "8.0.
|
|
12
|
+
"@vibes.diy/api-pkg": "8.0.9",
|
|
13
|
+
"@vibes.diy/api-types": "8.0.9",
|
|
14
|
+
"@vibes.diy/call-ai-v2": "8.0.9",
|
|
15
|
+
"@vibes.diy/identity": "8.0.9",
|
|
16
|
+
"@vibes.diy/vibe-types": "8.0.9",
|
|
17
17
|
"arktype": "~2.2.3",
|
|
18
18
|
"ws": "~8.21.1"
|
|
19
19
|
},
|