@absolutejs/artifacts 0.0.4 → 0.1.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/README.md +21 -0
- package/dist/drizzle.js +245 -0
- package/dist/manifest.js +175 -23
- package/dist/manifest.json +123 -7
- package/dist/src/drizzle.d.ts +1586 -0
- package/dist/src/manifest.d.ts +74 -2
- package/package.json +18 -6
package/dist/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"contract":
|
|
2
|
+
"contract": 2,
|
|
3
3
|
"identity": {
|
|
4
4
|
"accent": "#8b5cf6",
|
|
5
5
|
"category": "ai",
|
|
@@ -8,16 +8,70 @@
|
|
|
8
8
|
"name": "@absolutejs/artifacts",
|
|
9
9
|
"tagline": "Give everything your AI makes a real lifecycle."
|
|
10
10
|
},
|
|
11
|
+
"implements": [
|
|
12
|
+
{
|
|
13
|
+
"contract": "artifacts/store",
|
|
14
|
+
"factory": "createMemoryArtifactStore",
|
|
15
|
+
"from": "@absolutejs/artifacts",
|
|
16
|
+
"title": "In memory (development only — history resets on restart)",
|
|
17
|
+
"wiring": {
|
|
18
|
+
"code": "createMemoryArtifactStore()",
|
|
19
|
+
"imports": [
|
|
20
|
+
{
|
|
21
|
+
"from": "@absolutejs/artifacts",
|
|
22
|
+
"names": [
|
|
23
|
+
"createMemoryArtifactStore"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"contract": "artifacts/store",
|
|
31
|
+
"factory": "createDrizzleArtifactStore",
|
|
32
|
+
"from": "@absolutejs/artifacts/drizzle",
|
|
33
|
+
"requires": {
|
|
34
|
+
"peers": [
|
|
35
|
+
{
|
|
36
|
+
"name": "drizzle-orm",
|
|
37
|
+
"range": ">=1.0.0-rc.4 <2",
|
|
38
|
+
"reason": "Typed artifact revisions, indexing state, and transactional outbox persistence"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"services": [
|
|
42
|
+
{
|
|
43
|
+
"description": "Artifact lifecycle and revision database",
|
|
44
|
+
"id": "postgres"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"title": "Drizzle Postgres (production, including Neon)",
|
|
49
|
+
"wiring": {
|
|
50
|
+
"code": "createDrizzleArtifactStore({ db })",
|
|
51
|
+
"imports": [
|
|
52
|
+
{
|
|
53
|
+
"from": "@absolutejs/artifacts/drizzle",
|
|
54
|
+
"names": [
|
|
55
|
+
"createDrizzleArtifactStore"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
],
|
|
11
62
|
"settings": {
|
|
12
63
|
"type": "object",
|
|
13
64
|
"properties": {}
|
|
14
65
|
},
|
|
15
66
|
"slots": {
|
|
16
|
-
"
|
|
67
|
+
"store": {
|
|
17
68
|
"configPath": "$self",
|
|
18
|
-
"contract": "artifacts/
|
|
19
|
-
"description": "
|
|
20
|
-
"known": [
|
|
69
|
+
"contract": "artifacts/store",
|
|
70
|
+
"description": "Where current artifacts, immutable revisions, indexing state, and transactional outbox events live",
|
|
71
|
+
"known": [
|
|
72
|
+
"@absolutejs/artifacts#createMemoryArtifactStore",
|
|
73
|
+
"@absolutejs/artifacts#drizzle"
|
|
74
|
+
],
|
|
21
75
|
"required": true
|
|
22
76
|
}
|
|
23
77
|
},
|
|
@@ -26,13 +80,12 @@
|
|
|
26
80
|
"description": "Define structured artifact kinds, provide a store, and create the lifecycle service. Add a publisher only when your host supports public access.",
|
|
27
81
|
"id": "default",
|
|
28
82
|
"server": {
|
|
29
|
-
"code": "const artifactRegistry = defineArtifactRegistry({\n\tpage: {\n\t\tcapabilities: ['archive', 'edit', 'preview', 'publish'],\n\t\tcontent: Type.Object({ blocks: Type.Array(Type.Unknown()) }),\n\t\tlabel: 'Page'\n\t}\n});\n\nconst artifactStore =
|
|
83
|
+
"code": "const artifactRegistry = defineArtifactRegistry({\n\tpage: {\n\t\tcapabilities: ['archive', 'edit', 'preview', 'publish'],\n\t\tcontent: Type.Object({ blocks: Type.Array(Type.Unknown()) }),\n\t\tlabel: 'Page'\n\t}\n});\n\nconst artifactStore = ${slot.store};\nconst artifactService = createArtifactService({\n\tregistry: artifactRegistry,\n\tstore: artifactStore\n});",
|
|
30
84
|
"imports": [
|
|
31
85
|
{
|
|
32
86
|
"from": "@absolutejs/artifacts",
|
|
33
87
|
"names": [
|
|
34
88
|
"createArtifactService",
|
|
35
|
-
"createMemoryArtifactStore",
|
|
36
89
|
"defineArtifactRegistry"
|
|
37
90
|
]
|
|
38
91
|
},
|
|
@@ -53,6 +106,21 @@
|
|
|
53
106
|
"annotations": {
|
|
54
107
|
"readOnlyHint": true
|
|
55
108
|
},
|
|
109
|
+
"authorization": {
|
|
110
|
+
"approval": "never",
|
|
111
|
+
"audience": "owner",
|
|
112
|
+
"effects": [
|
|
113
|
+
"read"
|
|
114
|
+
],
|
|
115
|
+
"requiredScopes": [
|
|
116
|
+
"artifacts:read"
|
|
117
|
+
],
|
|
118
|
+
"resource": {
|
|
119
|
+
"idField": "artifactId",
|
|
120
|
+
"ownerIdField": "ownerId",
|
|
121
|
+
"type": "artifact"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
56
124
|
"description": "Open one artifact owned by a user.",
|
|
57
125
|
"input": {
|
|
58
126
|
"type": "object",
|
|
@@ -77,6 +145,20 @@
|
|
|
77
145
|
"annotations": {
|
|
78
146
|
"readOnlyHint": true
|
|
79
147
|
},
|
|
148
|
+
"authorization": {
|
|
149
|
+
"approval": "never",
|
|
150
|
+
"audience": "owner",
|
|
151
|
+
"effects": [
|
|
152
|
+
"read"
|
|
153
|
+
],
|
|
154
|
+
"requiredScopes": [
|
|
155
|
+
"artifacts:read"
|
|
156
|
+
],
|
|
157
|
+
"resource": {
|
|
158
|
+
"ownerIdField": "ownerId",
|
|
159
|
+
"type": "artifact"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
80
162
|
"description": "List artifacts owned by a user.",
|
|
81
163
|
"input": {
|
|
82
164
|
"type": "object",
|
|
@@ -100,6 +182,21 @@
|
|
|
100
182
|
"annotations": {
|
|
101
183
|
"readOnlyHint": true
|
|
102
184
|
},
|
|
185
|
+
"authorization": {
|
|
186
|
+
"approval": "never",
|
|
187
|
+
"audience": "owner",
|
|
188
|
+
"effects": [
|
|
189
|
+
"read"
|
|
190
|
+
],
|
|
191
|
+
"requiredScopes": [
|
|
192
|
+
"artifacts:read"
|
|
193
|
+
],
|
|
194
|
+
"resource": {
|
|
195
|
+
"idField": "artifactId",
|
|
196
|
+
"ownerIdField": "ownerId",
|
|
197
|
+
"type": "artifact-revision"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
103
200
|
"description": "List immutable revisions of one artifact owned by a user.",
|
|
104
201
|
"input": {
|
|
105
202
|
"type": "object",
|
|
@@ -121,6 +218,25 @@
|
|
|
121
218
|
"kind": "runtime"
|
|
122
219
|
},
|
|
123
220
|
"artifact_restore": {
|
|
221
|
+
"authorization": {
|
|
222
|
+
"approval": "policy",
|
|
223
|
+
"audience": "owner",
|
|
224
|
+
"effects": [
|
|
225
|
+
"write"
|
|
226
|
+
],
|
|
227
|
+
"idempotency": {
|
|
228
|
+
"mode": "host"
|
|
229
|
+
},
|
|
230
|
+
"requiredScopes": [
|
|
231
|
+
"artifacts:write"
|
|
232
|
+
],
|
|
233
|
+
"resource": {
|
|
234
|
+
"idField": "artifactId",
|
|
235
|
+
"ownerIdField": "ownerId",
|
|
236
|
+
"type": "artifact-revision"
|
|
237
|
+
},
|
|
238
|
+
"reversible": false
|
|
239
|
+
},
|
|
124
240
|
"description": "Restore an old artifact revision as a new private draft.",
|
|
125
241
|
"input": {
|
|
126
242
|
"type": "object",
|