@postxl/schema 2.3.0 → 2.5.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.
- package/dist/enum/enum.brands.d.ts +3 -3
- package/dist/enum/enum.d.ts +2 -2
- package/dist/enum/enum.defaults.d.ts +8 -8
- package/dist/enum/enum.transformer.d.ts +4 -4
- package/dist/field/enum.d.ts +14 -5
- package/dist/field/enum.js +23 -0
- package/dist/field/field.d.ts +38 -29
- package/dist/field/id.d.ts +14 -12
- package/dist/field/id.js +3 -0
- package/dist/field/json.d.ts +4 -1
- package/dist/field/json.js +2 -0
- package/dist/field/relation.d.ts +11 -9
- package/dist/field/relation.js +2 -0
- package/dist/field/scalar.d.ts +5 -2
- package/dist/field/scalar.js +2 -0
- package/dist/field/shared/brands.d.ts +11 -11
- package/dist/field/shared/decoders.d.ts +1 -0
- package/dist/field/shared/decoders.js +6 -1
- package/dist/field/shared/types.d.ts +10 -0
- package/dist/model/model.brands.d.ts +2 -2
- package/dist/model/model.json-decoder.d.ts +12 -8
- package/dist/model/model.json-decoder.js +21 -0
- package/dist/model/model.transformer.d.ts +88 -72
- package/dist/model/model.transformer.js +13 -1
- package/dist/model/model.types.d.ts +17 -0
- package/dist/project-schema/project-schema.brands.d.ts +3 -3
- package/dist/project-schema/project-schema.defaults.d.ts +1 -1
- package/dist/project-schema/project-schema.json-decoder.d.ts +9 -4
- package/dist/project-schema/project-schema.json-decoder.js +5 -0
- package/dist/project-schema/project-schema.transformer.d.ts +21 -11
- package/dist/project-schema/project-schema.transformer.js +73 -2
- package/dist/samples/sample-schemas.d.ts +5947 -853
- package/dist/samples/sample-schemas.js +4 -0
- package/dist/samples/skaile-platform.schema.json +5362 -639
- package/dist/samples/skaile-store.schema.json +1077 -0
- package/dist/samples/titans-prototype.schema.json +1978 -0
- package/package.json +2 -2
|
@@ -0,0 +1,1077 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://postxl.dev/schema/v1.json",
|
|
3
|
+
"name": "skaile-store",
|
|
4
|
+
"slug": "skaile-store",
|
|
5
|
+
"description": "Public AI Asset Catalog backend for skaile.store. Anonymous browse + install in Phase 2; bearer-token gating layered on in Phase 3.",
|
|
6
|
+
"projectType": "standalone",
|
|
7
|
+
"version": "0.1.0",
|
|
8
|
+
"auth": {
|
|
9
|
+
"provider": "keycloak",
|
|
10
|
+
"roleClaimPath": "realm_access.roles",
|
|
11
|
+
"defaultDeny": true
|
|
12
|
+
},
|
|
13
|
+
"defaultRoles": [
|
|
14
|
+
"admin",
|
|
15
|
+
"viewer"
|
|
16
|
+
],
|
|
17
|
+
"schemas": [
|
|
18
|
+
{
|
|
19
|
+
"name": "PXL",
|
|
20
|
+
"auth": {
|
|
21
|
+
"read": {
|
|
22
|
+
"anyRole": [
|
|
23
|
+
"admin"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"write": {
|
|
27
|
+
"anyRole": [
|
|
28
|
+
"admin"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"adminUi": {
|
|
32
|
+
"visibleFor": [
|
|
33
|
+
"admin"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Data",
|
|
40
|
+
"auth": {
|
|
41
|
+
"read": {
|
|
42
|
+
"anyRole": [
|
|
43
|
+
"viewer",
|
|
44
|
+
"admin"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"write": {
|
|
48
|
+
"anyRole": [
|
|
49
|
+
"admin"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"adminUi": {
|
|
53
|
+
"visibleFor": [
|
|
54
|
+
"admin"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"defaultSchema": "Data",
|
|
61
|
+
"systemUser": {
|
|
62
|
+
"name": "System",
|
|
63
|
+
"email": "system@skaile.store",
|
|
64
|
+
"sub": null
|
|
65
|
+
},
|
|
66
|
+
"standardModels": [
|
|
67
|
+
"Action",
|
|
68
|
+
"ActionOperation",
|
|
69
|
+
"User",
|
|
70
|
+
"File",
|
|
71
|
+
"TableView"
|
|
72
|
+
],
|
|
73
|
+
"models": {
|
|
74
|
+
"AssetComment": {
|
|
75
|
+
"schema": "Data",
|
|
76
|
+
"description": "A community comment on an AssetDefinition. assetId is a free-text FK to AssetDefinition.id (no Prisma relation). userId is the Keycloak sub; userHandle is the denormalized preferred_username captured at write time. body is plain text, clamped to 2000 chars in the tRPC route.",
|
|
77
|
+
"labelField": "userHandle",
|
|
78
|
+
"auth": {
|
|
79
|
+
"read": {
|
|
80
|
+
"anyRole": [
|
|
81
|
+
"viewer",
|
|
82
|
+
"admin"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"write": {
|
|
86
|
+
"anyRole": [
|
|
87
|
+
"viewer",
|
|
88
|
+
"admin"
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"adminUi": {
|
|
92
|
+
"visibleFor": [
|
|
93
|
+
"admin"
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"fields": {
|
|
98
|
+
"assetId": {
|
|
99
|
+
"type": "String",
|
|
100
|
+
"label": "Asset",
|
|
101
|
+
"hasIndex": true,
|
|
102
|
+
"maxLength": 64
|
|
103
|
+
},
|
|
104
|
+
"userId": {
|
|
105
|
+
"type": "String",
|
|
106
|
+
"label": "User",
|
|
107
|
+
"maxLength": 128
|
|
108
|
+
},
|
|
109
|
+
"userHandle": {
|
|
110
|
+
"type": "String",
|
|
111
|
+
"label": "Handle",
|
|
112
|
+
"maxLength": 64
|
|
113
|
+
},
|
|
114
|
+
"body": {
|
|
115
|
+
"type": "String",
|
|
116
|
+
"label": "Body",
|
|
117
|
+
"maxLength": 2000
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"AssetDefinition": {
|
|
122
|
+
"_todo_phase2_indexes": "TODO(asset-store-phase-2): restore composite index [kind, category] when PostXL/PXL fixes getIndexDefinition (multi-column scalar indexes). Workaround until then: add @@index([kind, category]) to the generated Prisma schema via a // @custom-* block in store/backend/prisma/schema.prisma, OR a manual SQL migration. Tracked: PostXL/PXL upstream issue (filed 2026-05-07).",
|
|
123
|
+
"schema": "Data",
|
|
124
|
+
"description": "A Catalog index entry for a single published asset version. The Catalog stores a Pointer Triple (sourceCommitSha + filesJson with per-file hashes + composite sha256); clients fetch asset bytes directly from the upstream Source at install time. kind is an opaque string (per Phase 1.7 amendment A1: pluggable kinds, no fixed enum). Read = viewer+ (anonymous in Phase 2 via either the Keycloak anonymous viewer token or a // @custom-* read bypass — confirm at gate). Publish action requires admin+.",
|
|
125
|
+
"labelField": "name",
|
|
126
|
+
"keyField": "name",
|
|
127
|
+
"auth": {
|
|
128
|
+
"read": {
|
|
129
|
+
"anyRole": [
|
|
130
|
+
"viewer",
|
|
131
|
+
"admin"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"write": {
|
|
135
|
+
"anyRole": [
|
|
136
|
+
"admin"
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"actions": {
|
|
140
|
+
"publish": {
|
|
141
|
+
"anyRole": [
|
|
142
|
+
"admin"
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"unpublish": {
|
|
146
|
+
"anyRole": [
|
|
147
|
+
"admin"
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"adminUi": {
|
|
152
|
+
"visibleFor": [
|
|
153
|
+
"admin"
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"compositeUnique": [
|
|
158
|
+
[
|
|
159
|
+
"publisherId",
|
|
160
|
+
"name",
|
|
161
|
+
"version"
|
|
162
|
+
]
|
|
163
|
+
],
|
|
164
|
+
"fields": {
|
|
165
|
+
"publisherId": {
|
|
166
|
+
"type": "Publisher",
|
|
167
|
+
"label": "Publisher",
|
|
168
|
+
"description": "Owning publisher namespace. Identity is npm-style <publisher>/<name>@<version>."
|
|
169
|
+
},
|
|
170
|
+
"name": {
|
|
171
|
+
"type": "String",
|
|
172
|
+
"label": "Name",
|
|
173
|
+
"description": "Asset name within the publisher namespace (e.g. 'gmail', 'postgres'). Must follow the npm-style identifier rules.",
|
|
174
|
+
"hasIndex": true,
|
|
175
|
+
"maxLength": 128
|
|
176
|
+
},
|
|
177
|
+
"version": {
|
|
178
|
+
"type": "String",
|
|
179
|
+
"label": "Version",
|
|
180
|
+
"description": "Semver version string for the asset (e.g. '1.4.0'). Filter is snapshot-locked at publish time; the SHA256 covers the full curated file set.",
|
|
181
|
+
"maxLength": 64
|
|
182
|
+
},
|
|
183
|
+
"kind": {
|
|
184
|
+
"type": "String",
|
|
185
|
+
"label": "Kind",
|
|
186
|
+
"description": "Opaque kind string per Phase 1.7 amendment A1 (pluggable kinds). Phase 2 stores arbitrary kind strings without enum validation; client-side validation happens via the registered IAssetKindProvider. Storefront browse-by-kind reads distinct kinds at request time.",
|
|
187
|
+
"hasIndex": true,
|
|
188
|
+
"maxLength": 64
|
|
189
|
+
},
|
|
190
|
+
"kindProviderVersion": {
|
|
191
|
+
"type": "String?",
|
|
192
|
+
"label": "Kind Provider Version",
|
|
193
|
+
"description": "Provider semver captured when this row was last validated against a registered IAssetKindProvider. Optional in Phase 2 (best-effort population). Mismatch produces a WARN at read time (per amendment A6); informational, not blocking.",
|
|
194
|
+
"maxLength": 64
|
|
195
|
+
},
|
|
196
|
+
"category": {
|
|
197
|
+
"type": "String",
|
|
198
|
+
"label": "Category",
|
|
199
|
+
"description": "One of ~20 1-level top categories per spec (Communication, Storage, Search, etc.). Two-level reserved for v2.",
|
|
200
|
+
"hasIndex": true,
|
|
201
|
+
"maxLength": 64
|
|
202
|
+
},
|
|
203
|
+
"domainSlug": {
|
|
204
|
+
"type": "String?",
|
|
205
|
+
"label": "Domain",
|
|
206
|
+
"description": "Navigational domain this asset belongs to (sidecar-assigned via DOMAIN.md), or null when no domain claims it. Display-only — NOT part of identity. Joins to Domain.slug scoped by sourceId. Composite index (sourceId, domainSlug) deferred to PostXL/PXL#742; single-column index only for now.",
|
|
207
|
+
"hasIndex": true,
|
|
208
|
+
"maxLength": 39
|
|
209
|
+
},
|
|
210
|
+
"license": {
|
|
211
|
+
"type": "String",
|
|
212
|
+
"label": "License",
|
|
213
|
+
"description": "SPDX license identifier (e.g. 'MIT', 'Apache-2.0'). Required at the community tier per spec.",
|
|
214
|
+
"maxLength": 64
|
|
215
|
+
},
|
|
216
|
+
"sha256": {
|
|
217
|
+
"type": "String",
|
|
218
|
+
"label": "SHA256 (composite)",
|
|
219
|
+
"description": "Composite SHA256 over the sorted per-file-hash list in filesJson. Single asset-version hash for display and final integrity check at install. Per-file hashes in filesJson are the primary verification surface; this composite is the rollup. Recomputed at publish time and frozen.",
|
|
220
|
+
"hasIndex": true,
|
|
221
|
+
"maxLength": 64
|
|
222
|
+
},
|
|
223
|
+
"sourceId": {
|
|
224
|
+
"type": "Source",
|
|
225
|
+
"label": "Source",
|
|
226
|
+
"description": "The Source row this asset was ingested from."
|
|
227
|
+
},
|
|
228
|
+
"sourceCommitSha": {
|
|
229
|
+
"type": "String?",
|
|
230
|
+
"label": "Source Commit SHA",
|
|
231
|
+
"description": "Immutable git commit SHA in the upstream Source that this asset version was published from. The Pointer Triple (with filesJson + sha256) is the entire install manifest. NULL while the row is a candidate (post-sync, pre-publish); set to a 40-char SHA at publish time and never updated thereafter. If this commit becomes unreachable upstream (force-push, repo deletion), the asset becomes uninstallable.",
|
|
232
|
+
"maxLength": 64
|
|
233
|
+
},
|
|
234
|
+
"tier": {
|
|
235
|
+
"type": "CurationTier",
|
|
236
|
+
"label": "Curation Tier",
|
|
237
|
+
"description": "Phase 2 ships visual badges only; promotion is a manual admin action (auto-promotion deferred to Phase 4.6). Default for new ingestions: community.",
|
|
238
|
+
"defaultValue": "community"
|
|
239
|
+
},
|
|
240
|
+
"remote": {
|
|
241
|
+
"type": "Boolean",
|
|
242
|
+
"label": "Remote",
|
|
243
|
+
"description": "True when this asset has no installable bytes — a remote connector / remote-MCP whose config + endpoint live in a tenant instance, not in the Pointer Triple. getInstallManifest refuses remote assets (nothing to fetch); the platform reads catalog metadata to configure an instance. Default false (a normal byte-backed asset).",
|
|
244
|
+
"defaultValue": false
|
|
245
|
+
},
|
|
246
|
+
"configless": {
|
|
247
|
+
"type": "Boolean",
|
|
248
|
+
"label": "Configless",
|
|
249
|
+
"description": "True when this mcp-server asset needs no user configuration — a local/recipe MCP (stdio + nix recipe binding, no remote URL, no auth headers, no user-supplied env placeholder) the platform can auto-provision (e.g. excel/ppt). False for config-bearing MCPs (remote URL / auth / required env) and every non-mcp-server kind. Derived once at ingest from the MCP.md frontmatter; defaults false.",
|
|
250
|
+
"defaultValue": false
|
|
251
|
+
},
|
|
252
|
+
"manifestUrl": {
|
|
253
|
+
"type": "String",
|
|
254
|
+
"label": "Manifest URL",
|
|
255
|
+
"description": "Public URL of the manifest file in the upstream Source (e.g. raw.githubusercontent.com link to SKILL.md / CONNECTOR.md). Surfaced on the storefront detail page.",
|
|
256
|
+
"maxLength": 1024
|
|
257
|
+
},
|
|
258
|
+
"displayName": {
|
|
259
|
+
"type": "String?",
|
|
260
|
+
"label": "Display Name",
|
|
261
|
+
"description": "Human-readable name shown on storefront cards/detail pages. Falls back to '<publisher>/<name>'.",
|
|
262
|
+
"maxLength": 256
|
|
263
|
+
},
|
|
264
|
+
"description": {
|
|
265
|
+
"type": "String?",
|
|
266
|
+
"label": "Description",
|
|
267
|
+
"description": "Free-text description, populated from manifest frontmatter. Used as the storefront card subtitle and detail-page summary.",
|
|
268
|
+
"maxLength": 4096
|
|
269
|
+
},
|
|
270
|
+
"requiresJson": {
|
|
271
|
+
"type": "Json",
|
|
272
|
+
"label": "Requires (graph)",
|
|
273
|
+
"description": "Cross-asset requires graph extracted at ingestion. Auto-populated from typed manifest fields (composes:, nodes[].skill, contracts[]) plus admin-edited 'manual requires' entries (Phase 2 manual; AI-proposed in Phase 3). Schema is { refs: string[] } — the storefront detail page renders this read-only."
|
|
274
|
+
},
|
|
275
|
+
"filesJson": {
|
|
276
|
+
"type": "Json",
|
|
277
|
+
"label": "Files (filter + hashes)",
|
|
278
|
+
"description": "The curated file list snapshot-locked at publish time, with per-file SHA256 of the file bytes (raw, not base64-decoded). Defaults from IAssetKindProvider.defaultFileFilter() per the per-type defaults table; admin tweaks per asset. Schema is { paths: Array<{ path: string, sha256: string }> }. Per-file hashes are the primary verification at install."
|
|
279
|
+
},
|
|
280
|
+
"createdAt": {
|
|
281
|
+
"type": "DateTime",
|
|
282
|
+
"label": "Created At",
|
|
283
|
+
"isCreatedAt": true
|
|
284
|
+
},
|
|
285
|
+
"updatedAt": {
|
|
286
|
+
"type": "DateTime",
|
|
287
|
+
"label": "Updated At",
|
|
288
|
+
"isUpdatedAt": true
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"AssetSecurityAssessment": {
|
|
293
|
+
"_todo_phase2_indexes": "TODO(asset-store): the read-time lookup index [assetDefinitionId, sourceCommitSha] is multi-column and rejected by the generator (PostXL/PXL#742). It is declared in the hand-written migration only. The UNIQUE (assetDefinitionId, sourceCommitSha, provider) is expressed via compositeUnique below (PostXL emits unique constraints fine; only @@index multi-column scalars are broken).",
|
|
294
|
+
"schema": "Data",
|
|
295
|
+
"description": "An external security assessment for a published asset version, pinned to the commit it was scanned at. One AssetDefinition has N assessments (one per provider per commit). Imported by the skaile-skill-migrator from external scanners (ath/socket/snyk/zeroleaks) + our own preflight; never computed in-store. Read = viewer+ (catalog reads are anonymous via ctx.view); the public write path is the ownership-gated custom publisher.assetDefinitions.attachSecurity, NOT the generated CRUD (which stays admin-only).",
|
|
296
|
+
"labelField": "provider",
|
|
297
|
+
"auth": {
|
|
298
|
+
"read": {
|
|
299
|
+
"anyRole": [
|
|
300
|
+
"viewer",
|
|
301
|
+
"admin"
|
|
302
|
+
]
|
|
303
|
+
},
|
|
304
|
+
"write": {
|
|
305
|
+
"anyRole": [
|
|
306
|
+
"admin"
|
|
307
|
+
]
|
|
308
|
+
},
|
|
309
|
+
"adminUi": {
|
|
310
|
+
"visibleFor": [
|
|
311
|
+
"admin"
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"compositeUnique": [
|
|
316
|
+
[
|
|
317
|
+
"assetDefinitionId",
|
|
318
|
+
"sourceCommitSha",
|
|
319
|
+
"provider"
|
|
320
|
+
]
|
|
321
|
+
],
|
|
322
|
+
"fields": {
|
|
323
|
+
"assetDefinitionId": {
|
|
324
|
+
"type": "AssetDefinition",
|
|
325
|
+
"label": "Asset Definition",
|
|
326
|
+
"description": "The asset version this assessment is for. ON DELETE CASCADE — an assessment is meaningless without its asset."
|
|
327
|
+
},
|
|
328
|
+
"sourceCommitSha": {
|
|
329
|
+
"type": "String",
|
|
330
|
+
"label": "Source Commit SHA",
|
|
331
|
+
"description": "The upstream commit the scan pins to. Always equals the asset's published sourceCommitSha at attach time (strict check). Reads filter assessments to the asset's live commit, so a re-publish to a new commit starts fresh.",
|
|
332
|
+
"maxLength": 64
|
|
333
|
+
},
|
|
334
|
+
"provider": {
|
|
335
|
+
"type": "String",
|
|
336
|
+
"label": "Provider",
|
|
337
|
+
"description": "Scanner identifier, free-text (e.g. 'ath', 'socket', 'snyk', 'zeroleaks', 'skaile-preflight'). Free-text to tolerate new providers without a schema migration.",
|
|
338
|
+
"maxLength": 64
|
|
339
|
+
},
|
|
340
|
+
"risk": {
|
|
341
|
+
"type": "String",
|
|
342
|
+
"label": "Risk",
|
|
343
|
+
"description": "Risk level, free-text: 'safe'|'low'|'medium'|'high'|'critical'|'unscanned'. String (not enum) to match the CurationEvent.action free-text convention.",
|
|
344
|
+
"maxLength": 32
|
|
345
|
+
},
|
|
346
|
+
"score": {
|
|
347
|
+
"type": "Int?",
|
|
348
|
+
"label": "Score",
|
|
349
|
+
"description": "Provider-specific numeric score. Optional."
|
|
350
|
+
},
|
|
351
|
+
"alerts": {
|
|
352
|
+
"type": "Int?",
|
|
353
|
+
"label": "Alerts",
|
|
354
|
+
"description": "Provider-specific alert count. Optional."
|
|
355
|
+
},
|
|
356
|
+
"analyzedAt": {
|
|
357
|
+
"type": "DateTime?",
|
|
358
|
+
"label": "Analyzed At",
|
|
359
|
+
"description": "When the provider ran the scan. Optional."
|
|
360
|
+
},
|
|
361
|
+
"importedFrom": {
|
|
362
|
+
"type": "Json?",
|
|
363
|
+
"label": "Imported From",
|
|
364
|
+
"description": "Provenance of the import, e.g. { source, url }. Optional."
|
|
365
|
+
},
|
|
366
|
+
"raw": {
|
|
367
|
+
"type": "Json",
|
|
368
|
+
"label": "Raw",
|
|
369
|
+
"description": "Full provider output, surfaced on catalog.get / preview (omitted from the install manifest)."
|
|
370
|
+
},
|
|
371
|
+
"createdAt": {
|
|
372
|
+
"type": "DateTime",
|
|
373
|
+
"label": "Created At",
|
|
374
|
+
"isCreatedAt": true
|
|
375
|
+
},
|
|
376
|
+
"updatedAt": {
|
|
377
|
+
"type": "DateTime",
|
|
378
|
+
"label": "Updated At",
|
|
379
|
+
"isUpdatedAt": true
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"AssetStar": {
|
|
384
|
+
"schema": "Data",
|
|
385
|
+
"description": "A community star on an AssetDefinition. One row per (assetId, userId). The uniqueness of (assetId, userId) is enforced in the community.stars.toggle tRPC route (read-before-write), NOT by a composite DB index — PostXL PXL#742 rejects multi-column scalar indexes. assetId is a free-text FK to AssetDefinition.id (no Prisma relation, matching the CurationEvent convention). userId is the Keycloak sub claim.",
|
|
386
|
+
"labelField": "assetId",
|
|
387
|
+
"auth": {
|
|
388
|
+
"read": {
|
|
389
|
+
"anyRole": [
|
|
390
|
+
"viewer",
|
|
391
|
+
"admin"
|
|
392
|
+
]
|
|
393
|
+
},
|
|
394
|
+
"write": {
|
|
395
|
+
"anyRole": [
|
|
396
|
+
"viewer",
|
|
397
|
+
"admin"
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
"adminUi": {
|
|
401
|
+
"visibleFor": [
|
|
402
|
+
"admin"
|
|
403
|
+
]
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"fields": {
|
|
407
|
+
"assetId": {
|
|
408
|
+
"type": "String",
|
|
409
|
+
"label": "Asset",
|
|
410
|
+
"description": "FK to AssetDefinition.id.",
|
|
411
|
+
"hasIndex": true,
|
|
412
|
+
"maxLength": 64
|
|
413
|
+
},
|
|
414
|
+
"userId": {
|
|
415
|
+
"type": "String",
|
|
416
|
+
"label": "User",
|
|
417
|
+
"description": "Keycloak sub of the user who starred.",
|
|
418
|
+
"hasIndex": true,
|
|
419
|
+
"maxLength": 128
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"AssetWarning": {
|
|
424
|
+
"schema": "Data",
|
|
425
|
+
"description": "A community-reported warning on an AssetDefinition (broken/security/outdated/other + free text). type is free-text (nullable) matching the CurationEvent.action convention; the storefront validates the known set client-side. resolvedAt/resolvedBy are set by an admin via community.warnings.resolve. assetId is a free-text FK to AssetDefinition.id.",
|
|
426
|
+
"labelField": "userHandle",
|
|
427
|
+
"auth": {
|
|
428
|
+
"read": {
|
|
429
|
+
"anyRole": [
|
|
430
|
+
"viewer",
|
|
431
|
+
"admin"
|
|
432
|
+
]
|
|
433
|
+
},
|
|
434
|
+
"write": {
|
|
435
|
+
"anyRole": [
|
|
436
|
+
"viewer",
|
|
437
|
+
"admin"
|
|
438
|
+
]
|
|
439
|
+
},
|
|
440
|
+
"adminUi": {
|
|
441
|
+
"visibleFor": [
|
|
442
|
+
"admin"
|
|
443
|
+
]
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"fields": {
|
|
447
|
+
"assetId": {
|
|
448
|
+
"type": "String",
|
|
449
|
+
"label": "Asset",
|
|
450
|
+
"hasIndex": true,
|
|
451
|
+
"maxLength": 64
|
|
452
|
+
},
|
|
453
|
+
"userId": {
|
|
454
|
+
"type": "String",
|
|
455
|
+
"label": "User",
|
|
456
|
+
"maxLength": 128
|
|
457
|
+
},
|
|
458
|
+
"userHandle": {
|
|
459
|
+
"type": "String",
|
|
460
|
+
"label": "Handle",
|
|
461
|
+
"maxLength": 64
|
|
462
|
+
},
|
|
463
|
+
"type": {
|
|
464
|
+
"type": "String?",
|
|
465
|
+
"label": "Type",
|
|
466
|
+
"maxLength": 32
|
|
467
|
+
},
|
|
468
|
+
"body": {
|
|
469
|
+
"type": "String",
|
|
470
|
+
"label": "Body",
|
|
471
|
+
"maxLength": 2000
|
|
472
|
+
},
|
|
473
|
+
"resolvedAt": {
|
|
474
|
+
"type": "DateTime?",
|
|
475
|
+
"label": "Resolved At"
|
|
476
|
+
},
|
|
477
|
+
"resolvedBy": {
|
|
478
|
+
"type": "String?",
|
|
479
|
+
"label": "Resolved By",
|
|
480
|
+
"maxLength": 128
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
"CurationEvent": {
|
|
485
|
+
"_todo_phase2_indexes": "TODO(asset-store-phase-2): restore composite indexes [[assetRef, timestamp], [userId, timestamp]] once PostXL fixes getIndexDefinition (multi-column scalar indexes). Workaround: add @@index([...]) directives via a // @custom-* block in store/backend/prisma/schema.prisma, OR a manual SQL migration. Tracked: PostXL/PXL upstream issue (filed 2026-05-07).",
|
|
486
|
+
"schema": "Data",
|
|
487
|
+
"description": "Audit log entry for admin curation actions (Source register/sync, AssetDefinition publish, Preset publish, etc.). Read + write are admin-only. One row per discrete admin action; tier promotion / demotion ceremonies (Phase 4.6) write here too.",
|
|
488
|
+
"isReadonly": true,
|
|
489
|
+
"labelField": "id",
|
|
490
|
+
"auth": {
|
|
491
|
+
"read": {
|
|
492
|
+
"anyRole": [
|
|
493
|
+
"admin"
|
|
494
|
+
]
|
|
495
|
+
},
|
|
496
|
+
"write": {
|
|
497
|
+
"anyRole": [
|
|
498
|
+
"admin"
|
|
499
|
+
]
|
|
500
|
+
},
|
|
501
|
+
"adminUi": {
|
|
502
|
+
"visibleFor": [
|
|
503
|
+
"admin"
|
|
504
|
+
]
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
"fields": {
|
|
508
|
+
"userId": {
|
|
509
|
+
"type": "User?",
|
|
510
|
+
"label": "User",
|
|
511
|
+
"description": "The admin user who performed the action. Resolves to PostXL's standard User model (PXL schema). Nullable for Phase 2 system-driven events (e.g. webhook-triggered rescans). Phase 3 enforces non-null on user-initiated actions."
|
|
512
|
+
},
|
|
513
|
+
"assetRef": {
|
|
514
|
+
"type": "String",
|
|
515
|
+
"label": "Asset Ref",
|
|
516
|
+
"description": "Free-form ref string identifying the affected entity. Typically '<publisher>/<name>@<version>' for AssetDefinition / Preset events; URL for Source events.",
|
|
517
|
+
"hasIndex": true,
|
|
518
|
+
"maxLength": 256
|
|
519
|
+
},
|
|
520
|
+
"action": {
|
|
521
|
+
"type": "String",
|
|
522
|
+
"label": "Action",
|
|
523
|
+
"description": "Action verb (e.g. 'publish', 'unpublish', 'source.register', 'source.sync', 'tier.promote'). Free-text in Phase 2; may move to an enum in Phase 4 once the action vocabulary stabilizes.",
|
|
524
|
+
"hasIndex": true,
|
|
525
|
+
"maxLength": 64
|
|
526
|
+
},
|
|
527
|
+
"timestamp": {
|
|
528
|
+
"type": "DateTime",
|
|
529
|
+
"label": "Timestamp",
|
|
530
|
+
"isCreatedAt": true
|
|
531
|
+
},
|
|
532
|
+
"diffSummary": {
|
|
533
|
+
"type": "Json",
|
|
534
|
+
"label": "Diff Summary",
|
|
535
|
+
"description": "Human-readable summary of what changed. For publish events: { added: string[], removed: string[], changedFiles: number }. For source events: { lastSyncStatus, candidateCount }. Schema is intentionally loose; the admin UI renders this verbatim."
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
"Domain": {
|
|
540
|
+
"_todo_phase2_indexes": "TODO(sidecar-domains): add composite index [sourceId, domainSlug] on AssetDefinition once PostXL/PXL#742 (multi-column scalar indexes) is fixed. Until then assetDefinition.domainSlug carries a single-column index only.",
|
|
541
|
+
"schema": "Data",
|
|
542
|
+
"description": "A navigational grouping of assets, declared by a sidecar DOMAIN.md and resolved at ingest time. Display-only: a Domain is never part of asset identity, never an install-all bundle. A DOMAIN.md claims its directory plus everything below it (whole-segment containment); domains are strictly non-nested. Members of a domain relate as additions | alternatives | sequence. Per-repo in v1 (keyed by sourceId); cross-repo aggregation by (publisher, slug) is deferred to v2.",
|
|
543
|
+
"labelField": "title",
|
|
544
|
+
"keyField": "slug",
|
|
545
|
+
"auth": {
|
|
546
|
+
"read": {
|
|
547
|
+
"anyRole": [
|
|
548
|
+
"viewer",
|
|
549
|
+
"admin"
|
|
550
|
+
]
|
|
551
|
+
},
|
|
552
|
+
"write": {
|
|
553
|
+
"anyRole": [
|
|
554
|
+
"admin"
|
|
555
|
+
]
|
|
556
|
+
},
|
|
557
|
+
"adminUi": {
|
|
558
|
+
"visibleFor": [
|
|
559
|
+
"admin"
|
|
560
|
+
]
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
"compositeUnique": [
|
|
564
|
+
[
|
|
565
|
+
"sourceId",
|
|
566
|
+
"slug"
|
|
567
|
+
]
|
|
568
|
+
],
|
|
569
|
+
"fields": {
|
|
570
|
+
"slug": {
|
|
571
|
+
"type": "String",
|
|
572
|
+
"label": "Slug",
|
|
573
|
+
"description": "Stable domain id, unique per Source. GitHub-shaped (lowercase a-z0-9 + single hyphens, <=39 chars). The join key AssetDefinition.domainSlug references.",
|
|
574
|
+
"hasIndex": true,
|
|
575
|
+
"maxLength": 39
|
|
576
|
+
},
|
|
577
|
+
"title": {
|
|
578
|
+
"type": "String",
|
|
579
|
+
"label": "Title",
|
|
580
|
+
"description": "Human-readable domain title shown in the storefront, CLI manage, and forge panels.",
|
|
581
|
+
"maxLength": 128
|
|
582
|
+
},
|
|
583
|
+
"description": {
|
|
584
|
+
"type": "String?",
|
|
585
|
+
"label": "Description",
|
|
586
|
+
"description": "Domain summary rendered in the collapsed info region across all four surfaces. Sourced from the sidecar DOMAIN.md body/frontmatter.",
|
|
587
|
+
"maxLength": 4096
|
|
588
|
+
},
|
|
589
|
+
"relation": {
|
|
590
|
+
"type": "DomainRelation",
|
|
591
|
+
"label": "Relation",
|
|
592
|
+
"description": "How members relate: additions | alternatives | sequence. Navigational hint, never install-all.",
|
|
593
|
+
"defaultValue": "additions"
|
|
594
|
+
},
|
|
595
|
+
"order": {
|
|
596
|
+
"type": "Int?",
|
|
597
|
+
"label": "Order",
|
|
598
|
+
"description": "Display sort order among sibling domains under the same Source/publisher."
|
|
599
|
+
},
|
|
600
|
+
"sourceId": {
|
|
601
|
+
"type": "Source",
|
|
602
|
+
"label": "Source",
|
|
603
|
+
"description": "The upstream Source whose sidecar declared this domain. Domains are per-Source in v1."
|
|
604
|
+
},
|
|
605
|
+
"createdAt": {
|
|
606
|
+
"type": "DateTime",
|
|
607
|
+
"label": "Created At",
|
|
608
|
+
"isCreatedAt": true
|
|
609
|
+
},
|
|
610
|
+
"updatedAt": {
|
|
611
|
+
"type": "DateTime",
|
|
612
|
+
"label": "Updated At",
|
|
613
|
+
"isUpdatedAt": true
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
"NamespaceClaim": {
|
|
618
|
+
"schema": "Data",
|
|
619
|
+
"description": "A curated-tier namespace grant. An admin grants a namespace (e.g. 'acme-consulting') to a User; that User may then publish under '@acme-consulting'. Distinct from the personal tier (auto-granted from Keycloak preferred_username) and the GitHub-org tier (dynamic membership check against the user's brokered GitHub token).",
|
|
620
|
+
"labelField": "namespace",
|
|
621
|
+
"keyField": "namespace",
|
|
622
|
+
"auth": {
|
|
623
|
+
"read": {
|
|
624
|
+
"anyRole": [
|
|
625
|
+
"admin"
|
|
626
|
+
]
|
|
627
|
+
},
|
|
628
|
+
"write": {
|
|
629
|
+
"anyRole": [
|
|
630
|
+
"admin"
|
|
631
|
+
]
|
|
632
|
+
},
|
|
633
|
+
"adminUi": {
|
|
634
|
+
"visibleFor": [
|
|
635
|
+
"admin"
|
|
636
|
+
]
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
"fields": {
|
|
640
|
+
"namespace": {
|
|
641
|
+
"type": "String",
|
|
642
|
+
"label": "Namespace",
|
|
643
|
+
"description": "The granted publisher namespace. Unique across the curated tier — one User per namespace, no co-ownership in v1.",
|
|
644
|
+
"isUnique": true,
|
|
645
|
+
"hasIndex": true,
|
|
646
|
+
"maxLength": 64
|
|
647
|
+
},
|
|
648
|
+
"userId": {
|
|
649
|
+
"type": "User",
|
|
650
|
+
"label": "Grantee",
|
|
651
|
+
"description": "The User who may publish under this namespace."
|
|
652
|
+
},
|
|
653
|
+
"grantedById": {
|
|
654
|
+
"type": "User",
|
|
655
|
+
"label": "Granted By",
|
|
656
|
+
"description": "The admin User who granted the claim. Audit-only — non-nullable so an orphaned grant is impossible."
|
|
657
|
+
},
|
|
658
|
+
"method": {
|
|
659
|
+
"type": "String",
|
|
660
|
+
"label": "Method",
|
|
661
|
+
"description": "How the claim/grant was made (issue #43), free-text matching the CurationEvent.action convention: 'admin' (admin-granted curated tier, the pre-#43 default), 'github-personal' (claimant's githubLogin === namespace), or 'github-org-admin' (claimant is an admin of the GitHub org). Defaults to 'admin' so pre-existing admin-granted rows need no backfill.",
|
|
662
|
+
"defaultValue": "admin",
|
|
663
|
+
"maxLength": 32
|
|
664
|
+
},
|
|
665
|
+
"grantedAt": {
|
|
666
|
+
"type": "DateTime",
|
|
667
|
+
"label": "Granted At",
|
|
668
|
+
"description": "Server timestamp at grant time."
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
"Preset": {
|
|
673
|
+
"schema": "Data",
|
|
674
|
+
"description": "A unified composition + configuration entity. Carries 1+ polymorphic items; each item references an Asset, a Library Instance, or another Preset. Phase 2 ingests *.preset.yaml files via the same admin curation flow as AssetDefinition. Storefront classifies single-item Presets as 'Configured templates' and multi-item ones as 'Project starters' (derived from items.length).",
|
|
675
|
+
"labelField": "name",
|
|
676
|
+
"keyField": "name",
|
|
677
|
+
"auth": {
|
|
678
|
+
"read": {
|
|
679
|
+
"anyRole": [
|
|
680
|
+
"viewer",
|
|
681
|
+
"admin"
|
|
682
|
+
]
|
|
683
|
+
},
|
|
684
|
+
"write": {
|
|
685
|
+
"anyRole": [
|
|
686
|
+
"admin"
|
|
687
|
+
]
|
|
688
|
+
},
|
|
689
|
+
"actions": {
|
|
690
|
+
"publish": {
|
|
691
|
+
"anyRole": [
|
|
692
|
+
"admin"
|
|
693
|
+
]
|
|
694
|
+
},
|
|
695
|
+
"unpublish": {
|
|
696
|
+
"anyRole": [
|
|
697
|
+
"admin"
|
|
698
|
+
]
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
"adminUi": {
|
|
702
|
+
"visibleFor": [
|
|
703
|
+
"admin"
|
|
704
|
+
]
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
"compositeUnique": [
|
|
708
|
+
[
|
|
709
|
+
"publisherId",
|
|
710
|
+
"name",
|
|
711
|
+
"version"
|
|
712
|
+
]
|
|
713
|
+
],
|
|
714
|
+
"fields": {
|
|
715
|
+
"publisherId": {
|
|
716
|
+
"type": "Publisher",
|
|
717
|
+
"label": "Publisher",
|
|
718
|
+
"description": "Owning publisher namespace. Identity is npm-style <publisher>/<name>@<version>."
|
|
719
|
+
},
|
|
720
|
+
"name": {
|
|
721
|
+
"type": "String",
|
|
722
|
+
"label": "Name",
|
|
723
|
+
"description": "Preset name within the publisher namespace.",
|
|
724
|
+
"hasIndex": true,
|
|
725
|
+
"maxLength": 128
|
|
726
|
+
},
|
|
727
|
+
"version": {
|
|
728
|
+
"type": "String",
|
|
729
|
+
"label": "Version",
|
|
730
|
+
"description": "Semver version string. Bumping a Preset version triggers update propagation per consumer pin policy (structural changes require explicit `skaile preset upgrade`).",
|
|
731
|
+
"maxLength": 64
|
|
732
|
+
},
|
|
733
|
+
"category": {
|
|
734
|
+
"type": "String",
|
|
735
|
+
"label": "Category",
|
|
736
|
+
"description": "One of ~20 1-level top categories per spec.",
|
|
737
|
+
"hasIndex": true,
|
|
738
|
+
"maxLength": 64
|
|
739
|
+
},
|
|
740
|
+
"license": {
|
|
741
|
+
"type": "String",
|
|
742
|
+
"label": "License",
|
|
743
|
+
"description": "SPDX license identifier.",
|
|
744
|
+
"maxLength": 64
|
|
745
|
+
},
|
|
746
|
+
"sha256": {
|
|
747
|
+
"type": "String",
|
|
748
|
+
"label": "SHA256 (composite)",
|
|
749
|
+
"description": "Composite SHA256 over the sorted per-file-hash list in filesJson (typically just the .preset.yaml plus prose attachments). Single asset-version hash for display and final integrity check at install. Per-file hashes in filesJson are the primary verification surface; this composite is the rollup.",
|
|
750
|
+
"hasIndex": true,
|
|
751
|
+
"maxLength": 64
|
|
752
|
+
},
|
|
753
|
+
"sourceId": {
|
|
754
|
+
"type": "Source",
|
|
755
|
+
"label": "Source"
|
|
756
|
+
},
|
|
757
|
+
"sourceCommitSha": {
|
|
758
|
+
"type": "String?",
|
|
759
|
+
"label": "Source Commit SHA",
|
|
760
|
+
"description": "Immutable git commit SHA in the upstream Source that this preset version was published from. The Pointer Triple (with filesJson + sha256) is the entire install manifest. NULL while the row is a candidate (post-sync, pre-publish); set to a 40-char SHA at publish time and never updated thereafter. If this commit becomes unreachable upstream (force-push, repo deletion), the preset becomes uninstallable.",
|
|
761
|
+
"maxLength": 64
|
|
762
|
+
},
|
|
763
|
+
"tier": {
|
|
764
|
+
"type": "CurationTier",
|
|
765
|
+
"label": "Curation Tier",
|
|
766
|
+
"defaultValue": "community"
|
|
767
|
+
},
|
|
768
|
+
"manifestUrl": {
|
|
769
|
+
"type": "String",
|
|
770
|
+
"label": "Manifest URL",
|
|
771
|
+
"description": "Public URL of the *.preset.yaml in the upstream Source.",
|
|
772
|
+
"maxLength": 1024
|
|
773
|
+
},
|
|
774
|
+
"displayName": {
|
|
775
|
+
"type": "String?",
|
|
776
|
+
"label": "Display Name",
|
|
777
|
+
"maxLength": 256
|
|
778
|
+
},
|
|
779
|
+
"description": {
|
|
780
|
+
"type": "String?",
|
|
781
|
+
"label": "Description",
|
|
782
|
+
"maxLength": 4096
|
|
783
|
+
},
|
|
784
|
+
"requiresJson": {
|
|
785
|
+
"type": "Json",
|
|
786
|
+
"label": "Requires (graph)",
|
|
787
|
+
"description": "Cross-asset requires graph extracted at ingestion. For Presets this typically reflects the items[] graph plus any prose-referenced refs admin-flagged in the manual requires field."
|
|
788
|
+
},
|
|
789
|
+
"filesJson": {
|
|
790
|
+
"type": "Json",
|
|
791
|
+
"label": "Files (filter + hashes)",
|
|
792
|
+
"description": "The curated file list snapshot-locked at publish time, with per-file SHA256 of the file bytes (raw, not base64-decoded). For Presets this is usually just the *.preset.yaml; prose attachments may be included via admin override. Schema is { paths: Array<{ path: string, sha256: string }> }."
|
|
793
|
+
},
|
|
794
|
+
"itemsJson": {
|
|
795
|
+
"type": "Json",
|
|
796
|
+
"label": "Items",
|
|
797
|
+
"description": "The Preset's items[] array (polymorphic refs: library://, plain Asset ref, nested Preset ref). Apply semantics derive from item ref type, not from a 'mode:' field. Stored as JSON; schema is the items[] block from the .preset.yaml."
|
|
798
|
+
},
|
|
799
|
+
"placeholdersJson": {
|
|
800
|
+
"type": "Json",
|
|
801
|
+
"label": "Placeholders",
|
|
802
|
+
"description": "The Preset-level placeholders[] array. Two-namespace interpolation: ${INPUT:KEY} and ${SECRET:KEY}. Placeholder types in v1: text | multiline | secret | number | boolean | enum | oauth | instance-picker. Stored as JSON; one schema, two renderers (CLI inquirer + platform React forms)."
|
|
803
|
+
},
|
|
804
|
+
"createdAt": {
|
|
805
|
+
"type": "DateTime",
|
|
806
|
+
"label": "Created At",
|
|
807
|
+
"isCreatedAt": true
|
|
808
|
+
},
|
|
809
|
+
"updatedAt": {
|
|
810
|
+
"type": "DateTime",
|
|
811
|
+
"label": "Updated At",
|
|
812
|
+
"isUpdatedAt": true
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
},
|
|
816
|
+
"Publisher": {
|
|
817
|
+
"schema": "Data",
|
|
818
|
+
"description": "A publisher namespace (e.g. 'skaile', 'acme'). All AssetDefinitions and Presets live under exactly one Publisher. Visibility gates anonymous browse/search; bearer-token gating layered on in Phase 3.2.",
|
|
819
|
+
"labelField": "namespace",
|
|
820
|
+
"keyField": "namespace",
|
|
821
|
+
"auth": {
|
|
822
|
+
"read": {
|
|
823
|
+
"anyRole": [
|
|
824
|
+
"viewer",
|
|
825
|
+
"admin"
|
|
826
|
+
]
|
|
827
|
+
},
|
|
828
|
+
"write": {
|
|
829
|
+
"anyRole": [
|
|
830
|
+
"admin"
|
|
831
|
+
]
|
|
832
|
+
},
|
|
833
|
+
"adminUi": {
|
|
834
|
+
"visibleFor": [
|
|
835
|
+
"admin"
|
|
836
|
+
]
|
|
837
|
+
}
|
|
838
|
+
},
|
|
839
|
+
"fields": {
|
|
840
|
+
"namespace": {
|
|
841
|
+
"type": "String",
|
|
842
|
+
"label": "Namespace",
|
|
843
|
+
"description": "The npm-style publisher name (without leading '@'). Unique across the Catalog. Phase 2 has no auth binding for public namespaces; private namespaces gate via Phase 3.",
|
|
844
|
+
"isUnique": true,
|
|
845
|
+
"hasIndex": true,
|
|
846
|
+
"maxLength": 64
|
|
847
|
+
},
|
|
848
|
+
"visibility": {
|
|
849
|
+
"type": "Visibility",
|
|
850
|
+
"label": "Visibility",
|
|
851
|
+
"description": "public = visible to anonymous browsers; private = hidden from anonymous browse/search (Phase 2: no info leak; Phase 3.2: token-gated install).",
|
|
852
|
+
"defaultValue": "public"
|
|
853
|
+
},
|
|
854
|
+
"accessConfig": {
|
|
855
|
+
"type": "Json",
|
|
856
|
+
"label": "Access Config",
|
|
857
|
+
"description": "Free-form JSON describing how a private namespace gates access (e.g. { type: 'bearer-token', tokenHashEnv: 'SKAILE_PRIVATE_TOKEN_HASH' }). Empty object {} for public namespaces. Schema firms up in Phase 3.2."
|
|
858
|
+
},
|
|
859
|
+
"tokenHashEnv": {
|
|
860
|
+
"type": "String?",
|
|
861
|
+
"label": "Token Hash Env",
|
|
862
|
+
"description": "Name of the env var holding the hash of the bearer token that grants access (Phase 3.2). Null for public namespaces. Phase 2 stores only; install path does not consult it.",
|
|
863
|
+
"maxLength": 128
|
|
864
|
+
},
|
|
865
|
+
"displayName": {
|
|
866
|
+
"type": "String?",
|
|
867
|
+
"label": "Display Name",
|
|
868
|
+
"description": "Human-readable name shown on the storefront publisher page (e.g. 'Skaile AI'). Falls back to namespace.",
|
|
869
|
+
"maxLength": 128
|
|
870
|
+
},
|
|
871
|
+
"websiteUrl": {
|
|
872
|
+
"type": "String?",
|
|
873
|
+
"label": "Website URL",
|
|
874
|
+
"description": "Public website for the publisher; rendered as a link on the publisher page.",
|
|
875
|
+
"maxLength": 512
|
|
876
|
+
},
|
|
877
|
+
"ownerUserId": {
|
|
878
|
+
"type": "User?",
|
|
879
|
+
"label": "Owner",
|
|
880
|
+
"description": "The single User that owns this namespace (self-service publishing). null = Skaile-owned (system) namespace, admin-managed. Set by publisher.sources.add when a community publisher registers their first source — the draft Publisher row for '@<username>' is created on demand. Optional so existing Skaile-owned rows stay valid with a null owner. Unique among non-null owners: a User owns at most one Publisher, so two concurrent publisher.sources.add calls cannot create duplicate rows (Postgres treats NULLs as distinct, so the many null-owner Skaile rows remain valid).",
|
|
881
|
+
"isUnique": true
|
|
882
|
+
},
|
|
883
|
+
"status": {
|
|
884
|
+
"type": "PublisherStatus",
|
|
885
|
+
"label": "Status",
|
|
886
|
+
"description": "Lifecycle status. Defaults to 'active' so pre-existing Skaile-owned publishers need no migration; the self-service path (publisher.sources.add) creates community publishers as 'draft' explicitly, and publisher.assetDefinitions.publish flips them to 'active' on first publish.",
|
|
887
|
+
"defaultValue": "active"
|
|
888
|
+
},
|
|
889
|
+
"claimStatus": {
|
|
890
|
+
"type": "ClaimStatus",
|
|
891
|
+
"label": "Claim Status",
|
|
892
|
+
"description": "Claim lifecycle marker (issue #43). Defaults to 'claimed' so every pre-existing self-service / Skaile-owned row reads as a normal owned namespace without a backfill pass; escrow is set explicitly by the importer. Escrow rows keep ownerUserId NULL (the unique-owner index forbids a system-owned row); claiming records a curated NamespaceClaim and flips this to 'claimed' without touching ownerUserId.",
|
|
893
|
+
"defaultValue": "claimed"
|
|
894
|
+
},
|
|
895
|
+
"origin": {
|
|
896
|
+
"type": "Json?",
|
|
897
|
+
"label": "Origin",
|
|
898
|
+
"description": "Import provenance for an escrow namespace: { type:'skills.sh', source?, installs?, importedAt }. Null for non-imported (Skaile / self-service) publishers."
|
|
899
|
+
},
|
|
900
|
+
"claimedAt": {
|
|
901
|
+
"type": "DateTime?",
|
|
902
|
+
"label": "Claimed At",
|
|
903
|
+
"description": "Server timestamp set on a successful claim. Null until claimed."
|
|
904
|
+
},
|
|
905
|
+
"claimedById": {
|
|
906
|
+
"type": "User?",
|
|
907
|
+
"label": "Claimed By",
|
|
908
|
+
"description": "The User who claimed this namespace (issue #43). This — NOT ownerUserId — records the claimant, so the global unique index on ownerUserId is never touched. Null until claimed."
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
},
|
|
912
|
+
"Source": {
|
|
913
|
+
"schema": "Data",
|
|
914
|
+
"description": "A registered upstream Source (typically a GitHub repo URL + ref). The backend ingests via Octokit Trees API + sparse blob fetch (no full clone, ever) and produces candidate AssetDefinition / Preset rows for admin curation. Read + write are admin-only because Source registration determines what lands on the public Catalog.",
|
|
915
|
+
"labelField": "url",
|
|
916
|
+
"keyField": "url",
|
|
917
|
+
"auth": {
|
|
918
|
+
"read": {
|
|
919
|
+
"anyRole": [
|
|
920
|
+
"admin"
|
|
921
|
+
]
|
|
922
|
+
},
|
|
923
|
+
"write": {
|
|
924
|
+
"anyRole": [
|
|
925
|
+
"admin"
|
|
926
|
+
]
|
|
927
|
+
},
|
|
928
|
+
"adminUi": {
|
|
929
|
+
"visibleFor": [
|
|
930
|
+
"admin"
|
|
931
|
+
]
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
"fields": {
|
|
935
|
+
"url": {
|
|
936
|
+
"type": "String",
|
|
937
|
+
"label": "Repository URL",
|
|
938
|
+
"description": "Canonical Source URL (e.g. https://github.com/skaile-ai/skaile-ai-assets). Unique across the Catalog. The same repo can be re-registered against a different Catalog instance.",
|
|
939
|
+
"isUnique": true,
|
|
940
|
+
"hasIndex": true,
|
|
941
|
+
"maxLength": 512
|
|
942
|
+
},
|
|
943
|
+
"ref": {
|
|
944
|
+
"type": "String",
|
|
945
|
+
"label": "Git Ref",
|
|
946
|
+
"description": "Branch, tag, or commit SHA to ingest from (e.g. 'main', 'v1.4.0').",
|
|
947
|
+
"maxLength": 128
|
|
948
|
+
},
|
|
949
|
+
"sidecarUrl": {
|
|
950
|
+
"type": "String?",
|
|
951
|
+
"label": "Sidecar Repository URL",
|
|
952
|
+
"description": "Optional store-managed sidecar repo (a second GitHub URL) that carries DOMAIN.md navigational descriptors and an optional skaile.manifest.yaml overlay for this upstream Source. Read at sync time only; bytes never move off the upstream repo. Null = no sidecar (assets ingest with no domainSlug).",
|
|
953
|
+
"maxLength": 512
|
|
954
|
+
},
|
|
955
|
+
"sidecarRef": {
|
|
956
|
+
"type": "String?",
|
|
957
|
+
"label": "Sidecar Git Ref",
|
|
958
|
+
"description": "Branch, tag, or commit SHA to read the sidecar repo at. Defaults to 'main' in the service layer when sidecarUrl is set and this is null.",
|
|
959
|
+
"maxLength": 128
|
|
960
|
+
},
|
|
961
|
+
"visibility": {
|
|
962
|
+
"type": "Visibility",
|
|
963
|
+
"label": "Visibility",
|
|
964
|
+
"description": "public = open repo, no auth; private = uses Source-level auth (Phase 2: PAT in env; Phase 3: per-installation GitHub App token).",
|
|
965
|
+
"defaultValue": "public"
|
|
966
|
+
},
|
|
967
|
+
"authType": {
|
|
968
|
+
"type": "AuthType",
|
|
969
|
+
"label": "Auth Type",
|
|
970
|
+
"description": "How the backend authenticates against the Source host. Phase 2 default: pat.",
|
|
971
|
+
"defaultValue": "pat"
|
|
972
|
+
},
|
|
973
|
+
"authConfig": {
|
|
974
|
+
"type": "Json",
|
|
975
|
+
"label": "Auth Config",
|
|
976
|
+
"description": "Free-form JSON specific to authType. Phase 2 PAT: { envVar: 'GITHUB_INGESTION_PAT' }. Phase 3 githubApp: { installationId: '...' }. Empty object {} for authType=none."
|
|
977
|
+
},
|
|
978
|
+
"syncTrigger": {
|
|
979
|
+
"type": "SyncTrigger",
|
|
980
|
+
"label": "Sync Trigger",
|
|
981
|
+
"description": "How rescans are triggered. webhook (preferred) requires the upstream host to POST signed events; poll is the fallback for hosts without webhooks.",
|
|
982
|
+
"defaultValue": "webhook"
|
|
983
|
+
},
|
|
984
|
+
"pollInterval": {
|
|
985
|
+
"type": "Int?",
|
|
986
|
+
"label": "Poll Interval (s)",
|
|
987
|
+
"description": "Seconds between polls. Required when syncTrigger=poll; ignored otherwise. Minimum recommended: 600 (10 min). Lower bound (60s) enforced in service layer."
|
|
988
|
+
},
|
|
989
|
+
"publisherDefault": {
|
|
990
|
+
"type": "String",
|
|
991
|
+
"label": "Default Publisher Namespace",
|
|
992
|
+
"description": "Template for derived publishers when this Source's manifests do not specify one (e.g. '@<domain>'). Used by the discovery library's manifest-IR builder.",
|
|
993
|
+
"maxLength": 128
|
|
994
|
+
},
|
|
995
|
+
"ownerUserId": {
|
|
996
|
+
"type": "User?",
|
|
997
|
+
"label": "Owner",
|
|
998
|
+
"description": "The User who registered this Source via self-service publishing (publisher.sources.add). null = a Skaile/admin-registered Source. Distinct from publisherDefault (the namespace string used by discovery): this is the direct ownership link used by publisher.sources.list / sync / remove."
|
|
999
|
+
},
|
|
1000
|
+
"lastSyncedAt": {
|
|
1001
|
+
"type": "DateTime?",
|
|
1002
|
+
"label": "Last Synced At",
|
|
1003
|
+
"description": "Timestamp of the last successful sync run. Null until first sync."
|
|
1004
|
+
},
|
|
1005
|
+
"lastSyncStatus": {
|
|
1006
|
+
"type": "String?",
|
|
1007
|
+
"label": "Last Sync Status",
|
|
1008
|
+
"description": "Free-text status from the last sync run: 'ok', 'rate_limited', 'auth_failed', or an error message. Surfaced in the admin sources list.",
|
|
1009
|
+
"maxLength": 1024
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
},
|
|
1014
|
+
"enums": {
|
|
1015
|
+
"AuthType": {
|
|
1016
|
+
"schema": "Data",
|
|
1017
|
+
"description": "How the backend authenticates against a Source's host. Phase 2 uses pat (fine-grained PAT in env var); Phase 3 swaps to githubApp with per-installation tokens. bearer is reserved for non-GitHub generic Git hosts (v2). none indicates a fully public source needing no credentials.",
|
|
1018
|
+
"members": {
|
|
1019
|
+
"githubApp": "GitHub App installation token (Phase 3 bootstrap).",
|
|
1020
|
+
"pat": "Fine-grained personal access token (Phase 2 bootstrap; env var GITHUB_INGESTION_PAT).",
|
|
1021
|
+
"bearer": "Generic bearer token (reserved for non-GitHub Sources, v2).",
|
|
1022
|
+
"none": "Public source, no credentials required."
|
|
1023
|
+
}
|
|
1024
|
+
},
|
|
1025
|
+
"ClaimStatus": {
|
|
1026
|
+
"schema": "Data",
|
|
1027
|
+
"description": "Claim lifecycle of a Publisher namespace (issue #43). Orthogonal to PublisherStatus (draft/active) and Visibility. escrow = imported under the real namespace, unowned (ownerUserId NULL), awaiting a real claimant; claimed = a verified GitHub author took it via a curated NamespaceClaim grant (ownership is NOT flipped — the global unique index on owner_user_id forbids a user owning two namespaces); reserved = Skaile/partner-protected, the importer must never create or overwrite these.",
|
|
1028
|
+
"members": {
|
|
1029
|
+
"escrow": "Imported under the real namespace, unowned, awaiting a claim. Browsable (status active) but flagged unclaimed on the storefront.",
|
|
1030
|
+
"claimed": "A verified GitHub author has claimed the namespace via a curated grant.",
|
|
1031
|
+
"reserved": "Protected namespace (e.g. 'skaile', partners). Import must never touch it."
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1034
|
+
"CurationTier": {
|
|
1035
|
+
"schema": "Data",
|
|
1036
|
+
"description": "Curation tier for an AssetDefinition or Preset. community = anything-else default; verified = publisher-verified + automated checks; official = Skaile-reviewed. Phase 2 ships visual badges only; promotion is manual admin action (auto-promotion deferred to Phase 4.6).",
|
|
1037
|
+
"members": {
|
|
1038
|
+
"community": "Manifest validates, license declared, source URL reachable. Default tier for new ingestions.",
|
|
1039
|
+
"verified": "Publisher namespace ownership proven; automated security scan; manual Skaile review.",
|
|
1040
|
+
"official": "Authored or adopted by the Skaile team; full code review; documented maintenance commitment + SLA."
|
|
1041
|
+
}
|
|
1042
|
+
},
|
|
1043
|
+
"DomainRelation": {
|
|
1044
|
+
"schema": "Data",
|
|
1045
|
+
"description": "How the members of a Domain relate to one another. Navigational hint only — a Domain is never an install-all bundle. Mirrors the discovery library's DomainRelation union.",
|
|
1046
|
+
"members": {
|
|
1047
|
+
"additions": "Complementary assets — pick any. The default.",
|
|
1048
|
+
"alternatives": "Mutually-exclusive variants of one capability — pick one (one may be flagged recommended).",
|
|
1049
|
+
"sequence": "An ordered pipeline — members carry a display order and run 1..n."
|
|
1050
|
+
}
|
|
1051
|
+
},
|
|
1052
|
+
"PublisherStatus": {
|
|
1053
|
+
"schema": "Data",
|
|
1054
|
+
"description": "Lifecycle status of a Publisher namespace. A community publisher's row is created 'draft' on first source registration and becomes 'active' on first successful publish. Public catalog surfaces only show 'active' publishers — a 'draft' publisher with no published assets is invisible. Skaile-owned seed publishers default to 'active'.",
|
|
1055
|
+
"members": {
|
|
1056
|
+
"draft": "Namespace reserved for a community publisher who has not yet published an asset. Hidden from all public catalog surfaces.",
|
|
1057
|
+
"active": "Publisher has published at least one asset, or is a Skaile-owned namespace. Publicly visible."
|
|
1058
|
+
}
|
|
1059
|
+
},
|
|
1060
|
+
"SyncTrigger": {
|
|
1061
|
+
"schema": "Data",
|
|
1062
|
+
"description": "How a Source rescans for new commits. webhook = GitHub push event drives rescan; poll = backend polls on an interval (used for repos without webhook capability or for private mirrors).",
|
|
1063
|
+
"members": {
|
|
1064
|
+
"webhook": "GitHub push event (signed via X-Hub-Signature-256) triggers a rescan job.",
|
|
1065
|
+
"poll": "Backend polls the Source on a configured pollInterval; used as a fallback or for non-webhook-capable hosts."
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
"Visibility": {
|
|
1069
|
+
"schema": "Data",
|
|
1070
|
+
"description": "Visibility of a Source or Publisher namespace. Phase 2 has no auth: private rows are simply hidden from anonymous browse / search / catalog.list (no information leak in v1). Phase 3.2 layers token gating on top.",
|
|
1071
|
+
"members": {
|
|
1072
|
+
"public": "Visible to anonymous browsers and installable without auth.",
|
|
1073
|
+
"private": "Hidden from anonymous browse/search; requires bearer-token (Phase 3) to install."
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
}
|