@absolutejs/artifacts 0.1.5 → 0.2.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/dist/manifest.js CHANGED
@@ -1,8 +1,9 @@
1
1
  // @bun
2
2
  // node_modules/@absolutejs/manifest/dist/index.js
3
- import { Value } from "@sinclair/typebox/value";
4
- import { Type } from "@sinclair/typebox";
5
- import { Value as Value2 } from "@sinclair/typebox/value";
3
+ import { Type } from "typebox";
4
+ import { Value } from "typebox/value";
5
+ import { Type as Type2 } from "typebox";
6
+ import { Value as Value2 } from "typebox/value";
6
7
  var defineImplementation = () => (implementation) => {
7
8
  const defined = implementation;
8
9
  return defined;
@@ -21,29 +22,29 @@ var toolFactory = () => {
21
22
  return { runtime, workspace };
22
23
  };
23
24
  var TOOL_NAME_PATTERN = /^[a-z][a-z0-9_]{0,63}$/;
24
- var envRequirement = Type.Object({
25
- description: Type.String(),
26
- docsUrl: Type.Optional(Type.String()),
27
- example: Type.Optional(Type.String()),
28
- key: Type.String({ pattern: "^[A-Z][A-Z0-9_]*$" }),
29
- optional: Type.Optional(Type.Boolean()),
30
- secret: Type.Optional(Type.Boolean()),
31
- when: Type.Optional(Type.String())
25
+ var envRequirement = Type2.Object({
26
+ description: Type2.String(),
27
+ docsUrl: Type2.Optional(Type2.String()),
28
+ example: Type2.Optional(Type2.String()),
29
+ key: Type2.String({ pattern: "^[A-Z][A-Z0-9_]*$" }),
30
+ optional: Type2.Optional(Type2.Boolean()),
31
+ secret: Type2.Optional(Type2.Boolean()),
32
+ when: Type2.Optional(Type2.String())
32
33
  });
33
- var wiringImport = Type.Object({
34
- from: Type.String(),
35
- names: Type.Array(Type.String()),
36
- typeOnly: Type.Optional(Type.Boolean())
34
+ var wiringImport = Type2.Object({
35
+ from: Type2.String(),
36
+ names: Type2.Array(Type2.String()),
37
+ typeOnly: Type2.Optional(Type2.Boolean())
37
38
  });
38
- var wiringSnippet = Type.Object({
39
- code: Type.String(),
40
- imports: Type.Array(wiringImport),
41
- placement: Type.Optional(Type.Union([
42
- Type.Literal("client-entry"),
43
- Type.Literal("module-scope"),
44
- Type.Literal("server-boundary"),
45
- Type.Literal("server-factory"),
46
- Type.Literal("server-plugin")
39
+ var wiringSnippet = Type2.Object({
40
+ code: Type2.String(),
41
+ imports: Type2.Array(wiringImport),
42
+ placement: Type2.Optional(Type2.Union([
43
+ Type2.Literal("client-entry"),
44
+ Type2.Literal("module-scope"),
45
+ Type2.Literal("server-boundary"),
46
+ Type2.Literal("server-factory"),
47
+ Type2.Literal("server-plugin")
47
48
  ]))
48
49
  });
49
50
  var clientFrameworks = [
@@ -53,244 +54,244 @@ var clientFrameworks = [
53
54
  "svelte",
54
55
  "vue"
55
56
  ];
56
- var wiringRecipe = Type.Object({
57
- client: Type.Optional(Type.Partial(Type.Object(Object.fromEntries(clientFrameworks.map((framework) => [framework, wiringSnippet]))))),
58
- description: Type.Optional(Type.String()),
59
- id: Type.String({ minLength: 1 }),
60
- server: Type.Optional(wiringSnippet),
61
- title: Type.String()
57
+ var wiringRecipe = Type2.Object({
58
+ client: Type2.Optional(Type2.Partial(Type2.Object(Object.fromEntries(clientFrameworks.map((framework) => [framework, wiringSnippet]))))),
59
+ description: Type2.Optional(Type2.String()),
60
+ id: Type2.String({ minLength: 1 }),
61
+ server: Type2.Optional(wiringSnippet),
62
+ title: Type2.String()
62
63
  });
63
- var adapterSlot = Type.Object({
64
- configPath: Type.String({ minLength: 1 }),
65
- contract: Type.String({ pattern: "^[a-z0-9-]+/[a-z0-9-]+$" }),
66
- description: Type.String(),
67
- known: Type.Optional(Type.Array(Type.String())),
68
- required: Type.Optional(Type.Boolean())
64
+ var adapterSlot = Type2.Object({
65
+ configPath: Type2.String({ minLength: 1 }),
66
+ contract: Type2.String({ pattern: "^[a-z0-9-]+/[a-z0-9-]+$" }),
67
+ description: Type2.String(),
68
+ known: Type2.Optional(Type2.Array(Type2.String())),
69
+ required: Type2.Optional(Type2.Boolean())
69
70
  });
70
- var jsonSchemaObject = Type.Record(Type.String(), Type.Unknown());
71
- var peerRequirement = Type.Object({
72
- name: Type.String(),
73
- range: Type.String(),
74
- reason: Type.Optional(Type.String())
71
+ var jsonSchemaObject = Type2.Record(Type2.String(), Type2.Unknown());
72
+ var peerRequirement = Type2.Object({
73
+ name: Type2.String(),
74
+ range: Type2.String(),
75
+ reason: Type2.Optional(Type2.String())
75
76
  });
76
- var serviceRequirement = Type.Object({
77
- description: Type.String(),
78
- id: Type.String(),
79
- optional: Type.Optional(Type.Boolean())
77
+ var serviceRequirement = Type2.Object({
78
+ description: Type2.String(),
79
+ id: Type2.String(),
80
+ optional: Type2.Optional(Type2.Boolean())
80
81
  });
81
- var manifestRequirements = Type.Object({
82
- env: Type.Optional(Type.Array(envRequirement)),
83
- peers: Type.Optional(Type.Array(peerRequirement)),
84
- services: Type.Optional(Type.Array(serviceRequirement))
82
+ var manifestRequirements = Type2.Object({
83
+ env: Type2.Optional(Type2.Array(envRequirement)),
84
+ peers: Type2.Optional(Type2.Array(peerRequirement)),
85
+ services: Type2.Optional(Type2.Array(serviceRequirement))
85
86
  });
86
- var adapterImplementation = Type.Object({
87
- contract: Type.String({ pattern: "^[a-z0-9-]+/[a-z0-9-]+$" }),
88
- factory: Type.String({ minLength: 1 }),
89
- from: Type.String({ minLength: 1 }),
90
- requires: Type.Optional(manifestRequirements),
91
- settings: Type.Optional(jsonSchemaObject),
92
- title: Type.String(),
87
+ var adapterImplementation = Type2.Object({
88
+ contract: Type2.String({ pattern: "^[a-z0-9-]+/[a-z0-9-]+$" }),
89
+ factory: Type2.String({ minLength: 1 }),
90
+ from: Type2.String({ minLength: 1 }),
91
+ requires: Type2.Optional(manifestRequirements),
92
+ settings: Type2.Optional(jsonSchemaObject),
93
+ title: Type2.String(),
93
94
  wiring: wiringSnippet
94
95
  });
95
- var lifecycleStep = Type.Object({
96
- command: Type.Optional(Type.String()),
97
- docsUrl: Type.Optional(Type.String()),
98
- id: Type.String({ minLength: 1 }),
99
- idempotent: Type.Optional(Type.Boolean()),
100
- kind: Type.Union([
101
- Type.Literal("migration"),
102
- Type.Literal("post-install"),
103
- Type.Literal("verify")
96
+ var lifecycleStep = Type2.Object({
97
+ command: Type2.Optional(Type2.String()),
98
+ docsUrl: Type2.Optional(Type2.String()),
99
+ id: Type2.String({ minLength: 1 }),
100
+ idempotent: Type2.Optional(Type2.Boolean()),
101
+ kind: Type2.Union([
102
+ Type2.Literal("migration"),
103
+ Type2.Literal("post-install"),
104
+ Type2.Literal("verify")
104
105
  ]),
105
- title: Type.String(),
106
- when: Type.Union([
107
- Type.Literal("after-install"),
108
- Type.Literal("after-upgrade"),
109
- Type.Literal("before-first-run"),
110
- Type.Literal("manual")
106
+ title: Type2.String(),
107
+ when: Type2.Union([
108
+ Type2.Literal("after-install"),
109
+ Type2.Literal("after-upgrade"),
110
+ Type2.Literal("before-first-run"),
111
+ Type2.Literal("manual")
111
112
  ])
112
113
  });
113
- var toolAnnotations = Type.Object({
114
- destructiveHint: Type.Optional(Type.Boolean()),
115
- idempotentHint: Type.Optional(Type.Boolean()),
116
- openWorldHint: Type.Optional(Type.Boolean()),
117
- readOnlyHint: Type.Optional(Type.Boolean()),
118
- title: Type.Optional(Type.String())
114
+ var toolAnnotations = Type2.Object({
115
+ destructiveHint: Type2.Optional(Type2.Boolean()),
116
+ idempotentHint: Type2.Optional(Type2.Boolean()),
117
+ openWorldHint: Type2.Optional(Type2.Boolean()),
118
+ readOnlyHint: Type2.Optional(Type2.Boolean()),
119
+ title: Type2.Optional(Type2.String())
119
120
  });
120
- var toolAuthorization = Type.Object({
121
- approval: Type.Union([
122
- Type.Literal("always"),
123
- Type.Literal("never"),
124
- Type.Literal("policy")
121
+ var toolAuthorization = Type2.Object({
122
+ approval: Type2.Union([
123
+ Type2.Literal("always"),
124
+ Type2.Literal("never"),
125
+ Type2.Literal("policy")
125
126
  ]),
126
- audience: Type.Union([
127
- Type.Literal("admin"),
128
- Type.Literal("authenticated"),
129
- Type.Literal("owner"),
130
- Type.Literal("public")
127
+ audience: Type2.Union([
128
+ Type2.Literal("admin"),
129
+ Type2.Literal("authenticated"),
130
+ Type2.Literal("owner"),
131
+ Type2.Literal("public")
131
132
  ]),
132
- compensatingTool: Type.Optional(Type.String({ pattern: TOOL_NAME_PATTERN.source })),
133
- destinationFields: Type.Optional(Type.Array(Type.String({ minLength: 1 }), { minItems: 1 })),
134
- destinations: Type.Optional(Type.Array(Type.String({ minLength: 1 }), { minItems: 1 })),
135
- effects: Type.Array(Type.String({ minLength: 1 }), { minItems: 1 }),
136
- idempotency: Type.Optional(Type.Union([
137
- Type.Object({
138
- field: Type.String({ minLength: 1 }),
139
- mode: Type.Literal("field")
133
+ compensatingTool: Type2.Optional(Type2.String({ pattern: TOOL_NAME_PATTERN.source })),
134
+ destinationFields: Type2.Optional(Type2.Array(Type2.String({ minLength: 1 }), { minItems: 1 })),
135
+ destinations: Type2.Optional(Type2.Array(Type2.String({ minLength: 1 }), { minItems: 1 })),
136
+ effects: Type2.Array(Type2.String({ minLength: 1 }), { minItems: 1 }),
137
+ idempotency: Type2.Optional(Type2.Union([
138
+ Type2.Object({
139
+ field: Type2.String({ minLength: 1 }),
140
+ mode: Type2.Literal("field")
140
141
  }),
141
- Type.Object({ mode: Type.Literal("host") }),
142
- Type.Object({ mode: Type.Literal("resource") })
142
+ Type2.Object({ mode: Type2.Literal("host") }),
143
+ Type2.Object({ mode: Type2.Literal("resource") })
143
144
  ])),
144
- requiredScopes: Type.Optional(Type.Array(Type.String({ minLength: 1 }), { minItems: 1 })),
145
- resource: Type.Optional(Type.Object({
146
- idField: Type.Optional(Type.String({ minLength: 1 })),
147
- ownerIdField: Type.Optional(Type.String({ minLength: 1 })),
148
- tenantIdField: Type.Optional(Type.String({ minLength: 1 })),
149
- type: Type.String({ minLength: 1 })
145
+ requiredScopes: Type2.Optional(Type2.Array(Type2.String({ minLength: 1 }), { minItems: 1 })),
146
+ resource: Type2.Optional(Type2.Object({
147
+ idField: Type2.Optional(Type2.String({ minLength: 1 })),
148
+ ownerIdField: Type2.Optional(Type2.String({ minLength: 1 })),
149
+ tenantIdField: Type2.Optional(Type2.String({ minLength: 1 })),
150
+ type: Type2.String({ minLength: 1 })
150
151
  })),
151
- reversible: Type.Optional(Type.Boolean()),
152
- spend: Type.Optional(Type.Object({
153
- amountMinorField: Type.String({ minLength: 1 }),
154
- currencyField: Type.String({ minLength: 1 }),
155
- maximumAmountMinor: Type.Optional(Type.Integer({ minimum: 0 }))
152
+ reversible: Type2.Optional(Type2.Boolean()),
153
+ spend: Type2.Optional(Type2.Object({
154
+ amountMinorField: Type2.String({ minLength: 1 }),
155
+ currencyField: Type2.String({ minLength: 1 }),
156
+ maximumAmountMinor: Type2.Optional(Type2.Integer({ minimum: 0 }))
156
157
  }))
157
158
  });
158
- var serializedTool = Type.Object({
159
- annotations: Type.Optional(toolAnnotations),
160
- authorization: Type.Optional(toolAuthorization),
161
- capabilities: Type.Optional(Type.Array(Type.Union([
162
- Type.Literal("exec"),
163
- Type.Literal("glob"),
164
- Type.Literal("read"),
165
- Type.Literal("write")
159
+ var serializedTool = Type2.Object({
160
+ annotations: Type2.Optional(toolAnnotations),
161
+ authorization: Type2.Optional(toolAuthorization),
162
+ capabilities: Type2.Optional(Type2.Array(Type2.Union([
163
+ Type2.Literal("exec"),
164
+ Type2.Literal("glob"),
165
+ Type2.Literal("read"),
166
+ Type2.Literal("write")
166
167
  ]))),
167
- description: Type.String(),
168
+ description: Type2.String(),
168
169
  input: jsonSchemaObject,
169
- kind: Type.Union([Type.Literal("runtime"), Type.Literal("workspace")])
170
+ kind: Type2.Union([Type2.Literal("runtime"), Type2.Literal("workspace")])
170
171
  });
171
- var productId = Type.String({ pattern: "^[a-z][a-z0-9_-]{0,63}$" });
172
+ var productId = Type2.String({ pattern: "^[a-z][a-z0-9_-]{0,63}$" });
172
173
  var productCopy = {
173
- description: Type.String({ minLength: 1 }),
174
+ description: Type2.String({ minLength: 1 }),
174
175
  id: productId,
175
- title: Type.String({ minLength: 1 })
176
+ title: Type2.String({ minLength: 1 })
176
177
  };
177
- var productOperation = Type.Union([
178
- Type.Literal("aggregate"),
179
- Type.Literal("create"),
180
- Type.Literal("delete"),
181
- Type.Literal("detail"),
182
- Type.Literal("list"),
183
- Type.Literal("update")
178
+ var productOperation = Type2.Union([
179
+ Type2.Literal("aggregate"),
180
+ Type2.Literal("create"),
181
+ Type2.Literal("delete"),
182
+ Type2.Literal("detail"),
183
+ Type2.Literal("list"),
184
+ Type2.Literal("update")
184
185
  ]);
185
- var productProjection = Type.Object({
186
- blocks: Type.Optional(Type.Array(Type.Object({
186
+ var productProjection = Type2.Object({
187
+ blocks: Type2.Optional(Type2.Array(Type2.Object({
187
188
  ...productCopy,
188
- category: Type.String({ minLength: 1 }),
189
- componentExport: Type.String({ minLength: 1 }),
190
- frameworks: Type.Optional(Type.Array(Type.Union(clientFrameworks.map((framework) => Type.Literal(framework))))),
189
+ category: Type2.String({ minLength: 1 }),
190
+ componentExport: Type2.String({ minLength: 1 }),
191
+ frameworks: Type2.Optional(Type2.Array(Type2.Union(clientFrameworks.map((framework) => Type2.Literal(framework))))),
191
192
  props: jsonSchemaObject
192
193
  }))),
193
- connections: Type.Optional(Type.Array(Type.Object({
194
+ connections: Type2.Optional(Type2.Array(Type2.Object({
194
195
  ...productCopy,
195
- envKeys: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
196
- kind: Type.Union([
197
- Type.Literal("none"),
198
- Type.Literal("oauth"),
199
- Type.Literal("secret")
196
+ envKeys: Type2.Optional(Type2.Array(Type2.String({ minLength: 1 }))),
197
+ kind: Type2.Union([
198
+ Type2.Literal("none"),
199
+ Type2.Literal("oauth"),
200
+ Type2.Literal("secret")
200
201
  ]),
201
- setupTool: Type.Optional(Type.String({ pattern: TOOL_NAME_PATTERN.source })),
202
- testTool: Type.Optional(Type.String({ pattern: TOOL_NAME_PATTERN.source }))
202
+ setupTool: Type2.Optional(Type2.String({ pattern: TOOL_NAME_PATTERN.source })),
203
+ testTool: Type2.Optional(Type2.String({ pattern: TOOL_NAME_PATTERN.source }))
203
204
  }))),
204
- dataSources: Type.Optional(Type.Array(Type.Object({
205
+ dataSources: Type2.Optional(Type2.Array(Type2.Object({
205
206
  ...productCopy,
206
- operations: Type.Array(productOperation, { minItems: 1 }),
207
+ operations: Type2.Array(productOperation, { minItems: 1 }),
207
208
  schema: jsonSchemaObject,
208
- tools: Type.Optional(Type.Partial(Type.Object({
209
- aggregate: Type.String({ pattern: TOOL_NAME_PATTERN.source }),
210
- create: Type.String({ pattern: TOOL_NAME_PATTERN.source }),
211
- delete: Type.String({ pattern: TOOL_NAME_PATTERN.source }),
212
- detail: Type.String({ pattern: TOOL_NAME_PATTERN.source }),
213
- list: Type.String({ pattern: TOOL_NAME_PATTERN.source }),
214
- update: Type.String({ pattern: TOOL_NAME_PATTERN.source })
209
+ tools: Type2.Optional(Type2.Partial(Type2.Object({
210
+ aggregate: Type2.String({ pattern: TOOL_NAME_PATTERN.source }),
211
+ create: Type2.String({ pattern: TOOL_NAME_PATTERN.source }),
212
+ delete: Type2.String({ pattern: TOOL_NAME_PATTERN.source }),
213
+ detail: Type2.String({ pattern: TOOL_NAME_PATTERN.source }),
214
+ list: Type2.String({ pattern: TOOL_NAME_PATTERN.source }),
215
+ update: Type2.String({ pattern: TOOL_NAME_PATTERN.source })
215
216
  })))
216
217
  }))),
217
- events: Type.Optional(Type.Array(Type.Object({
218
+ events: Type2.Optional(Type2.Array(Type2.Object({
218
219
  ...productCopy,
219
220
  schema: jsonSchemaObject,
220
- source: Type.Union([
221
- Type.Literal("data"),
222
- Type.Literal("package"),
223
- Type.Literal("ui"),
224
- Type.Literal("webhook")
221
+ source: Type2.Union([
222
+ Type2.Literal("data"),
223
+ Type2.Literal("package"),
224
+ Type2.Literal("ui"),
225
+ Type2.Literal("webhook")
225
226
  ])
226
227
  }))),
227
- healthChecks: Type.Optional(Type.Array(Type.Object({
228
+ healthChecks: Type2.Optional(Type2.Array(Type2.Object({
228
229
  ...productCopy,
229
- tool: Type.String({ pattern: TOOL_NAME_PATTERN.source })
230
+ tool: Type2.String({ pattern: TOOL_NAME_PATTERN.source })
230
231
  }))),
231
- releaseChecks: Type.Optional(Type.Array(Type.Object({
232
+ releaseChecks: Type2.Optional(Type2.Array(Type2.Object({
232
233
  ...productCopy,
233
- healthCheckIds: Type.Optional(Type.Array(productId)),
234
- severity: Type.Union([
235
- Type.Literal("blocking"),
236
- Type.Literal("warning")
234
+ healthCheckIds: Type2.Optional(Type2.Array(productId)),
235
+ severity: Type2.Union([
236
+ Type2.Literal("blocking"),
237
+ Type2.Literal("warning")
237
238
  ])
238
239
  }))),
239
- workflowActions: Type.Optional(Type.Array(Type.Object({
240
+ workflowActions: Type2.Optional(Type2.Array(Type2.Object({
240
241
  ...productCopy,
241
- tool: Type.String({ pattern: TOOL_NAME_PATTERN.source })
242
+ tool: Type2.String({ pattern: TOOL_NAME_PATTERN.source })
242
243
  })))
243
244
  });
244
- var manifestSchema = Type.Object({
245
- contract: Type.Union([Type.Literal(1), Type.Literal(2)]),
246
- discovery: Type.Optional(Type.Object({
247
- audiences: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
248
- certificationUrl: Type.Optional(Type.String()),
249
- intents: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
250
- keywords: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
251
- protocols: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
252
- url: Type.Optional(Type.String())
245
+ var manifestSchema = Type2.Object({
246
+ contract: Type2.Union([Type2.Literal(1), Type2.Literal(2)]),
247
+ discovery: Type2.Optional(Type2.Object({
248
+ audiences: Type2.Optional(Type2.Array(Type2.String({ minLength: 1 }))),
249
+ certificationUrl: Type2.Optional(Type2.String()),
250
+ intents: Type2.Optional(Type2.Array(Type2.String({ minLength: 1 }))),
251
+ keywords: Type2.Optional(Type2.Array(Type2.String({ minLength: 1 }))),
252
+ protocols: Type2.Optional(Type2.Array(Type2.String({ minLength: 1 }))),
253
+ url: Type2.Optional(Type2.String())
253
254
  })),
254
- identity: Type.Object({
255
- accent: Type.Optional(Type.String({ pattern: "^#[0-9a-fA-F]{3,8}$" })),
256
- category: Type.String({ minLength: 1 }),
257
- description: Type.Optional(Type.String()),
258
- docsUrl: Type.Optional(Type.String()),
259
- logo: Type.Optional(Type.Object({
260
- svg: Type.Optional(Type.String()),
261
- url: Type.Optional(Type.String())
255
+ identity: Type2.Object({
256
+ accent: Type2.Optional(Type2.String({ pattern: "^#[0-9a-fA-F]{3,8}$" })),
257
+ category: Type2.String({ minLength: 1 }),
258
+ description: Type2.Optional(Type2.String()),
259
+ docsUrl: Type2.Optional(Type2.String()),
260
+ logo: Type2.Optional(Type2.Object({
261
+ svg: Type2.Optional(Type2.String()),
262
+ url: Type2.Optional(Type2.String())
262
263
  })),
263
- name: Type.String({
264
+ name: Type2.String({
264
265
  pattern: "^(@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$"
265
266
  }),
266
- tagline: Type.String({ minLength: 1 })
267
+ tagline: Type2.String({ minLength: 1 })
267
268
  }),
268
- implements: Type.Optional(Type.Array(adapterImplementation)),
269
- integration: Type.Optional(Type.Object({
270
- description: Type.Optional(Type.String({ minLength: 1 })),
271
- mode: Type.Union([
272
- Type.Literal("adapter"),
273
- Type.Literal("code-first"),
274
- Type.Literal("recipe")
269
+ implements: Type2.Optional(Type2.Array(adapterImplementation)),
270
+ integration: Type2.Optional(Type2.Object({
271
+ description: Type2.Optional(Type2.String({ minLength: 1 })),
272
+ mode: Type2.Union([
273
+ Type2.Literal("adapter"),
274
+ Type2.Literal("code-first"),
275
+ Type2.Literal("recipe")
275
276
  ])
276
277
  })),
277
- lifecycle: Type.Optional(Type.Array(lifecycleStep)),
278
- presets: Type.Optional(Type.Array(Type.Object({
279
- description: Type.Optional(Type.String()),
280
- id: Type.String({ minLength: 1 }),
281
- title: Type.String(),
282
- values: Type.Record(Type.String(), Type.Unknown())
278
+ lifecycle: Type2.Optional(Type2.Array(lifecycleStep)),
279
+ presets: Type2.Optional(Type2.Array(Type2.Object({
280
+ description: Type2.Optional(Type2.String()),
281
+ id: Type2.String({ minLength: 1 }),
282
+ title: Type2.String(),
283
+ values: Type2.Record(Type2.String(), Type2.Unknown())
283
284
  }))),
284
- product: Type.Optional(productProjection),
285
- requires: Type.Optional(manifestRequirements),
285
+ product: Type2.Optional(productProjection),
286
+ requires: Type2.Optional(manifestRequirements),
286
287
  settings: jsonSchemaObject,
287
- slots: Type.Optional(Type.Record(Type.String(), adapterSlot)),
288
- tools: Type.Optional(Type.Record(Type.String({ pattern: TOOL_NAME_PATTERN.source }), serializedTool)),
289
- wiring: Type.Array(wiringRecipe)
288
+ slots: Type2.Optional(Type2.Record(Type2.String(), adapterSlot)),
289
+ tools: Type2.Optional(Type2.Record(Type2.String({ pattern: TOOL_NAME_PATTERN.source }), serializedTool)),
290
+ wiring: Type2.Array(wiringRecipe)
290
291
  });
291
292
 
292
293
  // src/manifest.ts
293
- import { Type as Type2 } from "@sinclair/typebox";
294
+ import { Type as Type3 } from "typebox";
294
295
  var tool = toolFactory();
295
296
  var manifest = defineManifest()({
296
297
  contract: 2,
@@ -310,9 +311,9 @@ var manifest = defineManifest()({
310
311
  description: "Browse a typed artifact, its lifecycle state, and immutable revision history.",
311
312
  frameworks: ["react", "client"],
312
313
  id: "artifact_workspace",
313
- props: Type2.Object({
314
- artifactId: Type2.String({ minLength: 1 }),
315
- ownerId: Type2.String({ minLength: 1 })
314
+ props: Type3.Object({
315
+ artifactId: Type3.String({ minLength: 1 }),
316
+ ownerId: Type3.String({ minLength: 1 })
316
317
  }),
317
318
  title: "Artifact workspace"
318
319
  }
@@ -322,11 +323,11 @@ var manifest = defineManifest()({
322
323
  description: "Owner-scoped typed artifacts with current state and immutable revisions.",
323
324
  id: "artifacts",
324
325
  operations: ["list", "detail"],
325
- schema: Type2.Object({
326
- artifactId: Type2.String(),
327
- kind: Type2.String(),
328
- ownerId: Type2.String(),
329
- revision: Type2.Integer()
326
+ schema: Type3.Object({
327
+ artifactId: Type3.String(),
328
+ kind: Type3.String(),
329
+ ownerId: Type3.String(),
330
+ revision: Type3.Integer()
330
331
  }),
331
332
  title: "Artifacts",
332
333
  tools: {
@@ -391,7 +392,7 @@ var manifest = defineManifest()({
391
392
  }
392
393
  })
393
394
  ],
394
- settings: Type2.Object({}),
395
+ settings: Type3.Object({}),
395
396
  slots: {
396
397
  store: {
397
398
  configPath: "$self",
@@ -420,9 +421,9 @@ var manifest = defineManifest()({
420
421
  },
421
422
  description: "Open one artifact owned by a user.",
422
423
  handler: async ({ artifactId, ownerId }, service) => JSON.stringify(await service.get(ownerId, artifactId)),
423
- input: Type2.Object({
424
- artifactId: Type2.String({ minLength: 1 }),
425
- ownerId: Type2.String({ minLength: 1 })
424
+ input: Type3.Object({
425
+ artifactId: Type3.String({ minLength: 1 }),
426
+ ownerId: Type3.String({ minLength: 1 })
426
427
  })
427
428
  }),
428
429
  artifact_list: tool.runtime({
@@ -436,9 +437,9 @@ var manifest = defineManifest()({
436
437
  },
437
438
  description: "List artifacts owned by a user.",
438
439
  handler: async ({ kind, ownerId }, service) => JSON.stringify(await service.list(ownerId, { kind })),
439
- input: Type2.Object({
440
- kind: Type2.Optional(Type2.String({ minLength: 1 })),
441
- ownerId: Type2.String({ minLength: 1 })
440
+ input: Type3.Object({
441
+ kind: Type3.Optional(Type3.String({ minLength: 1 })),
442
+ ownerId: Type3.String({ minLength: 1 })
442
443
  })
443
444
  }),
444
445
  artifact_history: tool.runtime({
@@ -456,9 +457,9 @@ var manifest = defineManifest()({
456
457
  },
457
458
  description: "List immutable revisions of one artifact owned by a user.",
458
459
  handler: async ({ artifactId, ownerId }, service) => JSON.stringify(await service.listRevisions(ownerId, artifactId)),
459
- input: Type2.Object({
460
- artifactId: Type2.String({ minLength: 1 }),
461
- ownerId: Type2.String({ minLength: 1 })
460
+ input: Type3.Object({
461
+ artifactId: Type3.String({ minLength: 1 }),
462
+ ownerId: Type3.String({ minLength: 1 })
462
463
  })
463
464
  }),
464
465
  artifact_restore: tool.runtime({
@@ -477,10 +478,10 @@ var manifest = defineManifest()({
477
478
  },
478
479
  description: "Restore an old artifact revision as a new private draft.",
479
480
  handler: async ({ artifactId, ownerId, revision }, service) => JSON.stringify(await service.restore(ownerId, artifactId, revision)),
480
- input: Type2.Object({
481
- artifactId: Type2.String({ minLength: 1 }),
482
- ownerId: Type2.String({ minLength: 1 }),
483
- revision: Type2.Integer({ minimum: 1 })
481
+ input: Type3.Object({
482
+ artifactId: Type3.String({ minLength: 1 }),
483
+ ownerId: Type3.String({ minLength: 1 }),
484
+ revision: Type3.Integer({ minimum: 1 })
484
485
  })
485
486
  })
486
487
  },
@@ -510,7 +511,7 @@ var manifest = defineManifest()({
510
511
  from: "@absolutejs/artifacts",
511
512
  names: ["createArtifactService", "defineArtifactRegistry"]
512
513
  },
513
- { from: "@sinclair/typebox", names: ["Type"] }
514
+ { from: "typebox", names: ["Type"] }
514
515
  ],
515
516
  placement: "module-scope"
516
517
  },