@opengeni/contracts 0.30.0 → 0.31.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/{chunk-YWKPXSLB.js → chunk-H4NRLOOX.js} +29 -1
- package/dist/chunk-H4NRLOOX.js.map +1 -0
- package/dist/google-drive.js +1 -1
- package/dist/index.d.ts +15 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +76 -36
- package/dist/chunk-YWKPXSLB.js.map +0 -1
package/dist/google-drive.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -6305,6 +6305,11 @@ export declare const CapabilityPack: z.ZodPreprocess<z.ZodObject<{
|
|
|
6305
6305
|
category: z.ZodString;
|
|
6306
6306
|
version: z.ZodString;
|
|
6307
6307
|
sandboxImage: z.ZodOptional<z.ZodString>;
|
|
6308
|
+
sandboxProviderImages: z.ZodOptional<z.ZodObject<{
|
|
6309
|
+
modal: z.ZodOptional<z.ZodObject<{
|
|
6310
|
+
imageId: z.ZodString;
|
|
6311
|
+
}, z.core.$strict>>;
|
|
6312
|
+
}, z.core.$strict>>;
|
|
6308
6313
|
skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
6309
6314
|
name: z.ZodString;
|
|
6310
6315
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -6395,6 +6400,11 @@ export declare const RegisterCapabilityPackRequest: z.ZodPreprocess<z.ZodObject<
|
|
|
6395
6400
|
category: z.ZodString;
|
|
6396
6401
|
version: z.ZodString;
|
|
6397
6402
|
sandboxImage: z.ZodOptional<z.ZodString>;
|
|
6403
|
+
sandboxProviderImages: z.ZodOptional<z.ZodObject<{
|
|
6404
|
+
modal: z.ZodOptional<z.ZodObject<{
|
|
6405
|
+
imageId: z.ZodString;
|
|
6406
|
+
}, z.core.$strict>>;
|
|
6407
|
+
}, z.core.$strict>>;
|
|
6398
6408
|
skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
6399
6409
|
name: z.ZodString;
|
|
6400
6410
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -6488,6 +6498,11 @@ export declare const WorkspaceRegisteredPack: z.ZodObject<{
|
|
|
6488
6498
|
category: z.ZodString;
|
|
6489
6499
|
version: z.ZodString;
|
|
6490
6500
|
sandboxImage: z.ZodOptional<z.ZodString>;
|
|
6501
|
+
sandboxProviderImages: z.ZodOptional<z.ZodObject<{
|
|
6502
|
+
modal: z.ZodOptional<z.ZodObject<{
|
|
6503
|
+
imageId: z.ZodString;
|
|
6504
|
+
}, z.core.$strict>>;
|
|
6505
|
+
}, z.core.$strict>>;
|
|
6491
6506
|
skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
6492
6507
|
name: z.ZodString;
|
|
6493
6508
|
description: z.ZodOptional<z.ZodString>;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -5165,43 +5165,83 @@ export const CapabilityPack = z.preprocess(
|
|
|
5165
5165
|
}
|
|
5166
5166
|
return record;
|
|
5167
5167
|
},
|
|
5168
|
-
z
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
.
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
})
|
|
5193
|
-
|
|
5194
|
-
|
|
5168
|
+
z
|
|
5169
|
+
.object({
|
|
5170
|
+
id: z.string().min(1),
|
|
5171
|
+
name: z.string().min(1),
|
|
5172
|
+
description: z.string().min(1),
|
|
5173
|
+
role: z.string().min(1),
|
|
5174
|
+
category: z.string().min(1),
|
|
5175
|
+
version: z.string().min(1),
|
|
5176
|
+
// Container image ref (digest-pinned recommended) the pack's sessions run
|
|
5177
|
+
// in. At most one enabled pack per workspace may declare one; with none,
|
|
5178
|
+
// sessions use the deployment-wide image settings.
|
|
5179
|
+
sandboxImage: z.string().trim().min(1).max(512).optional(),
|
|
5180
|
+
// Optional provider-native immutable identities for the exact logical
|
|
5181
|
+
// sandboxImage above. These avoid re-importing a private registry image on
|
|
5182
|
+
// every provider while preserving sandboxImage as the cross-provider image
|
|
5183
|
+
// provenance and lease-conflict identity.
|
|
5184
|
+
sandboxProviderImages: z
|
|
5185
|
+
.object({
|
|
5186
|
+
modal: z
|
|
5187
|
+
.object({
|
|
5188
|
+
imageId: z
|
|
5189
|
+
.string()
|
|
5190
|
+
.trim()
|
|
5191
|
+
.regex(/^im-[A-Za-z0-9]{22}$/),
|
|
5192
|
+
})
|
|
5193
|
+
.strict()
|
|
5194
|
+
.optional(),
|
|
5195
|
+
})
|
|
5196
|
+
.strict()
|
|
5197
|
+
.optional(),
|
|
5198
|
+
// Skills delivered into the sandbox skill index when the pack is enabled.
|
|
5199
|
+
skills: z
|
|
5200
|
+
.array(CapabilityPackSkill)
|
|
5201
|
+
.max(32)
|
|
5202
|
+
.superRefine((skills, ctx) => {
|
|
5203
|
+
const seen = new Set<string>();
|
|
5204
|
+
skills.forEach((skill, index) => {
|
|
5205
|
+
const key = skill.name.toLowerCase();
|
|
5206
|
+
if (seen.has(key)) {
|
|
5207
|
+
ctx.addIssue({
|
|
5208
|
+
code: "custom",
|
|
5209
|
+
message: `duplicate pack skill name: ${skill.name}`,
|
|
5210
|
+
path: [index, "name"],
|
|
5211
|
+
});
|
|
5212
|
+
}
|
|
5213
|
+
seen.add(key);
|
|
5214
|
+
});
|
|
5215
|
+
})
|
|
5216
|
+
.default([]),
|
|
5217
|
+
tools: z.array(ToolRef).default([]),
|
|
5218
|
+
connectors: z.array(CapabilityPackConnector).default([]),
|
|
5219
|
+
knowledge: z.array(CapabilityPackKnowledge).default([]),
|
|
5220
|
+
scheduledTaskTemplates: z.array(CapabilityPackScheduledTaskTemplate).default([]),
|
|
5221
|
+
variableSet: CapabilityPackVariableSet.optional(),
|
|
5222
|
+
metadata: z.record(z.string(), z.unknown()).default({}),
|
|
5223
|
+
})
|
|
5224
|
+
.superRefine((pack, ctx) => {
|
|
5225
|
+
if (!pack.sandboxProviderImages?.modal) {
|
|
5226
|
+
return;
|
|
5227
|
+
}
|
|
5228
|
+
if (!pack.sandboxImage) {
|
|
5229
|
+
ctx.addIssue({
|
|
5230
|
+
code: "custom",
|
|
5231
|
+
message: "sandboxProviderImages.modal requires sandboxImage",
|
|
5232
|
+
path: ["sandboxProviderImages", "modal"],
|
|
5195
5233
|
});
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5234
|
+
return;
|
|
5235
|
+
}
|
|
5236
|
+
if (!/@sha256:[0-9a-f]{64}$/i.test(pack.sandboxImage)) {
|
|
5237
|
+
ctx.addIssue({
|
|
5238
|
+
code: "custom",
|
|
5239
|
+
message:
|
|
5240
|
+
"sandboxProviderImages.modal requires sandboxImage to be pinned by an OCI sha256 digest",
|
|
5241
|
+
path: ["sandboxImage"],
|
|
5242
|
+
});
|
|
5243
|
+
}
|
|
5244
|
+
}),
|
|
5205
5245
|
);
|
|
5206
5246
|
export type CapabilityPack = z.infer<typeof CapabilityPack>;
|
|
5207
5247
|
|