@opengeni/contracts 0.30.0 → 0.31.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ConnectionMetadata
3
- } from "./chunk-YWKPXSLB.js";
3
+ } from "./chunk-TQC34EGL.js";
4
4
  import "./chunk-KGL5BVGF.js";
5
5
 
6
6
  // src/google-drive.ts
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>;
@@ -13501,6 +13516,19 @@ export declare const ModelCapabilitiesV1: z.ZodObject<{
13501
13516
  runnable: z.ZodBoolean;
13502
13517
  }, z.core.$strip>;
13503
13518
  }, z.core.$strip>;
13519
+ promptCaching: z.ZodOptional<z.ZodObject<{
13520
+ upstream: z.ZodEnum<{
13521
+ supported: "supported";
13522
+ unknown: "unknown";
13523
+ unsupported: "unsupported";
13524
+ }>;
13525
+ runnable: z.ZodBoolean;
13526
+ mode: z.ZodEnum<{
13527
+ automatic: "automatic";
13528
+ implicit: "implicit";
13529
+ none: "none";
13530
+ }>;
13531
+ }, z.core.$strip>>;
13504
13532
  latencyModes: z.ZodArray<z.ZodObject<{
13505
13533
  id: z.ZodEnum<{
13506
13534
  fast: "fast";
@@ -13706,6 +13734,11 @@ export declare const ClientModel: z.ZodObject<{
13706
13734
  chat: "chat";
13707
13735
  responses: "responses";
13708
13736
  }>;
13737
+ source: z.ZodOptional<z.ZodEnum<{
13738
+ codex: "codex";
13739
+ opengeni: "opengeni";
13740
+ workspace_gateway: "workspace_gateway";
13741
+ }>>;
13709
13742
  contextWindowTokens: z.ZodOptional<z.ZodNumber>;
13710
13743
  schemaVersion: z.ZodOptional<z.ZodLiteral<1>>;
13711
13744
  aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -13850,6 +13883,19 @@ export declare const ClientModel: z.ZodObject<{
13850
13883
  runnable: z.ZodBoolean;
13851
13884
  }, z.core.$strip>;
13852
13885
  }, z.core.$strip>;
13886
+ promptCaching: z.ZodOptional<z.ZodObject<{
13887
+ upstream: z.ZodEnum<{
13888
+ supported: "supported";
13889
+ unknown: "unknown";
13890
+ unsupported: "unsupported";
13891
+ }>;
13892
+ runnable: z.ZodBoolean;
13893
+ mode: z.ZodEnum<{
13894
+ automatic: "automatic";
13895
+ implicit: "implicit";
13896
+ none: "none";
13897
+ }>;
13898
+ }, z.core.$strip>>;
13853
13899
  latencyModes: z.ZodArray<z.ZodObject<{
13854
13900
  id: z.ZodEnum<{
13855
13901
  fast: "fast";
@@ -13935,6 +13981,11 @@ export declare const WorkspaceModelCatalogModel: z.ZodObject<{
13935
13981
  chat: "chat";
13936
13982
  responses: "responses";
13937
13983
  }>;
13984
+ source: z.ZodOptional<z.ZodEnum<{
13985
+ codex: "codex";
13986
+ opengeni: "opengeni";
13987
+ workspace_gateway: "workspace_gateway";
13988
+ }>>;
13938
13989
  contextWindowTokens: z.ZodOptional<z.ZodNumber>;
13939
13990
  schemaVersion: z.ZodOptional<z.ZodLiteral<1>>;
13940
13991
  aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -14079,6 +14130,19 @@ export declare const WorkspaceModelCatalogModel: z.ZodObject<{
14079
14130
  runnable: z.ZodBoolean;
14080
14131
  }, z.core.$strip>;
14081
14132
  }, z.core.$strip>;
14133
+ promptCaching: z.ZodOptional<z.ZodObject<{
14134
+ upstream: z.ZodEnum<{
14135
+ supported: "supported";
14136
+ unknown: "unknown";
14137
+ unsupported: "unsupported";
14138
+ }>;
14139
+ runnable: z.ZodBoolean;
14140
+ mode: z.ZodEnum<{
14141
+ automatic: "automatic";
14142
+ implicit: "implicit";
14143
+ none: "none";
14144
+ }>;
14145
+ }, z.core.$strip>>;
14082
14146
  latencyModes: z.ZodArray<z.ZodObject<{
14083
14147
  id: z.ZodEnum<{
14084
14148
  fast: "fast";
@@ -14163,6 +14227,11 @@ export declare const WorkspaceModelCatalogResponse: z.ZodObject<{
14163
14227
  chat: "chat";
14164
14228
  responses: "responses";
14165
14229
  }>;
14230
+ source: z.ZodOptional<z.ZodEnum<{
14231
+ codex: "codex";
14232
+ opengeni: "opengeni";
14233
+ workspace_gateway: "workspace_gateway";
14234
+ }>>;
14166
14235
  contextWindowTokens: z.ZodOptional<z.ZodNumber>;
14167
14236
  schemaVersion: z.ZodOptional<z.ZodLiteral<1>>;
14168
14237
  aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -14307,6 +14376,19 @@ export declare const WorkspaceModelCatalogResponse: z.ZodObject<{
14307
14376
  runnable: z.ZodBoolean;
14308
14377
  }, z.core.$strip>;
14309
14378
  }, z.core.$strip>;
14379
+ promptCaching: z.ZodOptional<z.ZodObject<{
14380
+ upstream: z.ZodEnum<{
14381
+ supported: "supported";
14382
+ unknown: "unknown";
14383
+ unsupported: "unsupported";
14384
+ }>;
14385
+ runnable: z.ZodBoolean;
14386
+ mode: z.ZodEnum<{
14387
+ automatic: "automatic";
14388
+ implicit: "implicit";
14389
+ none: "none";
14390
+ }>;
14391
+ }, z.core.$strip>>;
14310
14392
  latencyModes: z.ZodArray<z.ZodObject<{
14311
14393
  id: z.ZodEnum<{
14312
14394
  fast: "fast";
@@ -14409,6 +14491,11 @@ export declare const ClientConfig: z.ZodObject<{
14409
14491
  chat: "chat";
14410
14492
  responses: "responses";
14411
14493
  }>;
14494
+ source: z.ZodOptional<z.ZodEnum<{
14495
+ codex: "codex";
14496
+ opengeni: "opengeni";
14497
+ workspace_gateway: "workspace_gateway";
14498
+ }>>;
14412
14499
  contextWindowTokens: z.ZodOptional<z.ZodNumber>;
14413
14500
  schemaVersion: z.ZodOptional<z.ZodLiteral<1>>;
14414
14501
  aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -14553,6 +14640,19 @@ export declare const ClientConfig: z.ZodObject<{
14553
14640
  runnable: z.ZodBoolean;
14554
14641
  }, z.core.$strip>;
14555
14642
  }, z.core.$strip>;
14643
+ promptCaching: z.ZodOptional<z.ZodObject<{
14644
+ upstream: z.ZodEnum<{
14645
+ supported: "supported";
14646
+ unknown: "unknown";
14647
+ unsupported: "unsupported";
14648
+ }>;
14649
+ runnable: z.ZodBoolean;
14650
+ mode: z.ZodEnum<{
14651
+ automatic: "automatic";
14652
+ implicit: "implicit";
14653
+ none: "none";
14654
+ }>;
14655
+ }, z.core.$strip>>;
14556
14656
  latencyModes: z.ZodArray<z.ZodObject<{
14557
14657
  id: z.ZodEnum<{
14558
14658
  fast: "fast";
package/dist/index.js CHANGED
@@ -703,7 +703,7 @@ import {
703
703
  verifyRelayToken,
704
704
  verifyStreamToken,
705
705
  workspaceControlUtf8Bytes
706
- } from "./chunk-YWKPXSLB.js";
706
+ } from "./chunk-TQC34EGL.js";
707
707
  import {
708
708
  OPENGENI_SLACK_BOT_FORBIDDEN_SCOPES,
709
709
  OPENGENI_SLACK_BOT_REQUIRED_SCOPES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/contracts",
3
- "version": "0.30.0",
3
+ "version": "0.31.1",
4
4
  "description": "Shared zod schemas and wire-contract types for the OpenGeni API.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/index.ts CHANGED
@@ -5165,43 +5165,83 @@ export const CapabilityPack = z.preprocess(
5165
5165
  }
5166
5166
  return record;
5167
5167
  },
5168
- z.object({
5169
- id: z.string().min(1),
5170
- name: z.string().min(1),
5171
- description: z.string().min(1),
5172
- role: z.string().min(1),
5173
- category: z.string().min(1),
5174
- version: z.string().min(1),
5175
- // Container image ref (digest-pinned recommended) the pack's sessions run
5176
- // in. At most one enabled pack per workspace may declare one; with none,
5177
- // sessions use the deployment-wide image settings.
5178
- sandboxImage: z.string().trim().min(1).max(512).optional(),
5179
- // Skills delivered into the sandbox skill index when the pack is enabled.
5180
- skills: z
5181
- .array(CapabilityPackSkill)
5182
- .max(32)
5183
- .superRefine((skills, ctx) => {
5184
- const seen = new Set<string>();
5185
- skills.forEach((skill, index) => {
5186
- const key = skill.name.toLowerCase();
5187
- if (seen.has(key)) {
5188
- ctx.addIssue({
5189
- code: "custom",
5190
- message: `duplicate pack skill name: ${skill.name}`,
5191
- path: [index, "name"],
5192
- });
5193
- }
5194
- seen.add(key);
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
- .default([]),
5198
- tools: z.array(ToolRef).default([]),
5199
- connectors: z.array(CapabilityPackConnector).default([]),
5200
- knowledge: z.array(CapabilityPackKnowledge).default([]),
5201
- scheduledTaskTemplates: z.array(CapabilityPackScheduledTaskTemplate).default([]),
5202
- variableSet: CapabilityPackVariableSet.optional(),
5203
- metadata: z.record(z.string(), z.unknown()).default({}),
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
 
@@ -9084,6 +9124,9 @@ export const ModelCapabilitiesV1 = /* @__PURE__ */ defineModelContractSchema(()
9084
9124
  responsesWebSocket: ModelCapabilityStateV1,
9085
9125
  realtimeAudio: ModelCapabilityStateV1,
9086
9126
  }),
9127
+ promptCaching: ModelCapabilityStateV1.extend({
9128
+ mode: z.enum(["implicit", "automatic", "none"]),
9129
+ }).optional(),
9087
9130
  latencyModes: z.array(
9088
9131
  z.object({
9089
9132
  id: z.enum(["standard", "priority", "fast"]),
@@ -9299,6 +9342,7 @@ export const ClientModel = /* @__PURE__ */ defineModelContractSchema(() =>
9299
9342
  provider: z.string(), // provider id
9300
9343
  providerLabel: z.string(),
9301
9344
  api: z.enum(["responses", "chat"]),
9345
+ source: z.enum(["opengeni", "codex", "workspace_gateway"]).optional(),
9302
9346
  contextWindowTokens: z.number().int().positive().optional(),
9303
9347
  // Additive normalized definition metadata. Optional so older server payloads
9304
9348
  // remain parseable; current servers project the complete V1 set.