@opengeni/config 0.5.1 → 0.6.9

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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Entitlements, SandboxBackend, StaticUsageLimits, ReasoningEffort } from '@opengeni/contracts';
1
+ import { Entitlements, TurnExecutionModelSourceV1, TurnExecutionReasoningSourceV1, SandboxBackend, StaticUsageLimits, TurnExecutionPolicyV1, ReasoningEffort } from '@opengeni/contracts';
2
2
  import { z } from 'zod';
3
3
 
4
4
  declare const sandboxPreparationProfiles: Record<string, {
@@ -33,6 +33,7 @@ declare const AGENT_INSTRUCTIONS_CORE_PLACEHOLDER = "{{core}}";
33
33
  declare const DEFAULT_AGENT_INSTRUCTIONS: string;
34
34
  declare const McpServerConnectionRefSchema: z.ZodObject<{
35
35
  connectionId: z.ZodOptional<z.ZodString>;
36
+ provider: z.ZodOptional<z.ZodString>;
36
37
  providerDomain: z.ZodString;
37
38
  kind: z.ZodOptional<z.ZodEnum<{
38
39
  oauth2: "oauth2";
@@ -42,6 +43,10 @@ declare const McpServerConnectionRefSchema: z.ZodObject<{
42
43
  }>>;
43
44
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
44
45
  resource: z.ZodOptional<z.ZodString>;
46
+ selectedResources: z.ZodOptional<z.ZodArray<z.ZodObject<{
47
+ id: z.ZodString;
48
+ kind: z.ZodLiteral<"repository">;
49
+ }, z.core.$strict>>>;
45
50
  subjectScope: z.ZodOptional<z.ZodEnum<{
46
51
  workspace: "workspace";
47
52
  subject: "subject";
@@ -63,6 +68,12 @@ declare const SettingsSchema: z.ZodObject<{
63
68
  temporalHost: z.ZodDefault<z.ZodString>;
64
69
  temporalNamespace: z.ZodDefault<z.ZodString>;
65
70
  temporalTaskQueue: z.ZodDefault<z.ZodString>;
71
+ temporalTlsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
72
+ temporalApiKey: z.ZodOptional<z.ZodString>;
73
+ temporalTlsServerName: z.ZodOptional<z.ZodString>;
74
+ temporalTlsRootCaCertificateBase64: z.ZodOptional<z.ZodString>;
75
+ temporalTlsClientCertificateBase64: z.ZodOptional<z.ZodString>;
76
+ temporalTlsClientPrivateKeyBase64: z.ZodOptional<z.ZodString>;
66
77
  startupDependencyRetryAttempts: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
67
78
  startupDependencyRetryInitialDelayMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
68
79
  startupDependencyRetryMaxDelayMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -96,8 +107,10 @@ declare const SettingsSchema: z.ZodObject<{
96
107
  delegationSecret: z.ZodOptional<z.ZodString>;
97
108
  streamTokenSecret: z.ZodOptional<z.ZodString>;
98
109
  streamControlEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
110
+ sessionTurnToolReplacementEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
99
111
  toolspaceEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
100
112
  toolspaceMaxCallsPerTurn: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
113
+ ogtoolPackageSpec: z.ZodOptional<z.ZodString>;
101
114
  environmentsEncryptionKey: z.ZodOptional<z.ZodString>;
102
115
  integrationsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
103
116
  integrationsStateSecret: z.ZodOptional<z.ZodString>;
@@ -111,6 +124,7 @@ declare const SettingsSchema: z.ZodObject<{
111
124
  contextCompactionThresholdRatio: z.ZodPipe<z.ZodDefault<z.ZodCoercedNumber<unknown>>, z.ZodTransform<number, number>>;
112
125
  contextReservedOutputTokens: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
113
126
  contextAutoCompactThresholdTokens: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
127
+ modelToolOutputTruncationTokens: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
114
128
  authRequired: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
115
129
  accessKey: z.ZodOptional<z.ZodString>;
116
130
  authAllowHealth: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
@@ -134,7 +148,6 @@ declare const SettingsSchema: z.ZodObject<{
134
148
  codexProductSku: z.ZodOptional<z.ZodString>;
135
149
  codexToolSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
136
150
  codexCredentialLeasingEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
137
- codexRotationNearExhaustionPct: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
138
151
  openaiReasoningEffort: z.ZodDefault<z.ZodEnum<{
139
152
  none: "none";
140
153
  minimal: "minimal";
@@ -250,6 +263,7 @@ declare const SettingsSchema: z.ZodObject<{
250
263
  vercelTeamId: z.ZodOptional<z.ZodString>;
251
264
  vercelRuntime: z.ZodOptional<z.ZodString>;
252
265
  sandboxOwnershipEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
266
+ rigVerificationLeaseOwnershipEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
253
267
  sandboxLazyProvisionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
254
268
  sandboxSelfhostedEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
255
269
  agentOpStreamEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
@@ -341,10 +355,11 @@ declare const SettingsSchema: z.ZodObject<{
341
355
  allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
342
356
  timeoutMs: z.ZodOptional<z.ZodNumber>;
343
357
  cacheToolsList: z.ZodDefault<z.ZodBoolean>;
344
- requireApproval: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodArray<z.ZodString>]>>;
358
+ requireApproval: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>]>>;
345
359
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
346
360
  connectionRef: z.ZodOptional<z.ZodObject<{
347
361
  connectionId: z.ZodOptional<z.ZodString>;
362
+ provider: z.ZodOptional<z.ZodString>;
348
363
  providerDomain: z.ZodString;
349
364
  kind: z.ZodOptional<z.ZodEnum<{
350
365
  oauth2: "oauth2";
@@ -354,6 +369,10 @@ declare const SettingsSchema: z.ZodObject<{
354
369
  }>>;
355
370
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
356
371
  resource: z.ZodOptional<z.ZodString>;
372
+ selectedResources: z.ZodOptional<z.ZodArray<z.ZodObject<{
373
+ id: z.ZodString;
374
+ kind: z.ZodLiteral<"repository">;
375
+ }, z.core.$strict>>>;
357
376
  subjectScope: z.ZodOptional<z.ZodEnum<{
358
377
  workspace: "workspace";
359
378
  subject: "subject";
@@ -363,12 +382,32 @@ declare const SettingsSchema: z.ZodObject<{
363
382
  }, z.core.$strip>;
364
383
  type Settings = z.infer<typeof SettingsSchema>;
365
384
  type McpServerConfig = Settings["mcpServers"][number];
385
+ type TemporalTlsConnectionConfig = {
386
+ serverNameOverride?: string;
387
+ serverRootCACertificate?: Uint8Array;
388
+ clientCertPair?: {
389
+ crt: Uint8Array;
390
+ key: Uint8Array;
391
+ };
392
+ };
393
+ type TemporalConnectionOptions = {
394
+ address: string;
395
+ tls?: true | TemporalTlsConnectionConfig;
396
+ apiKey?: string;
397
+ };
366
398
  type ModelPricing = {
367
399
  inputMicrosPerMillionTokens: number;
368
400
  cachedInputMicrosPerMillionTokens?: number | undefined;
369
401
  outputMicrosPerMillionTokens: number;
370
402
  marginBps?: number | undefined;
371
403
  };
404
+ type ModelPricingScheduleV1 = {
405
+ default: ModelPricing;
406
+ inputTokenTiers?: Array<{
407
+ minimumInputTokens: number;
408
+ pricing: ModelPricing;
409
+ }> | undefined;
410
+ };
372
411
  type ModelUsageInput = {
373
412
  inputTokens?: number | undefined;
374
413
  outputTokens?: number | undefined;
@@ -378,6 +417,165 @@ type ModelUsageInput = {
378
417
  };
379
418
  type StaticUsageLimitsConfig = StaticUsageLimits;
380
419
  type EntitlementsConfig = Entitlements;
420
+ declare const CapabilitySupportV1: z.ZodEnum<{
421
+ unknown: "unknown";
422
+ supported: "supported";
423
+ unsupported: "unsupported";
424
+ }>;
425
+ type CapabilitySupportV1 = z.infer<typeof CapabilitySupportV1>;
426
+ declare const CapabilityStateV1Schema: z.ZodObject<{
427
+ upstream: z.ZodEnum<{
428
+ unknown: "unknown";
429
+ supported: "supported";
430
+ unsupported: "unsupported";
431
+ }>;
432
+ runnable: z.ZodBoolean;
433
+ }, z.core.$strip>;
434
+ type CapabilityStateV1 = z.infer<typeof CapabilityStateV1Schema>;
435
+ declare const ModelCapabilitiesV1Schema: z.ZodObject<{
436
+ reasoning: z.ZodObject<{
437
+ upstream: z.ZodEnum<{
438
+ unknown: "unknown";
439
+ supported: "supported";
440
+ unsupported: "unsupported";
441
+ }>;
442
+ runnable: z.ZodBoolean;
443
+ efforts: z.ZodArray<z.ZodEnum<{
444
+ none: "none";
445
+ minimal: "minimal";
446
+ low: "low";
447
+ medium: "medium";
448
+ high: "high";
449
+ xhigh: "xhigh";
450
+ }>>;
451
+ defaultEffort: z.ZodNullable<z.ZodEnum<{
452
+ none: "none";
453
+ minimal: "minimal";
454
+ low: "low";
455
+ medium: "medium";
456
+ high: "high";
457
+ xhigh: "xhigh";
458
+ }>>;
459
+ required: z.ZodBoolean;
460
+ }, z.core.$strip>;
461
+ functionCalling: z.ZodObject<{
462
+ upstream: z.ZodEnum<{
463
+ unknown: "unknown";
464
+ supported: "supported";
465
+ unsupported: "unsupported";
466
+ }>;
467
+ runnable: z.ZodBoolean;
468
+ }, z.core.$strip>;
469
+ structuredOutput: z.ZodObject<{
470
+ upstream: z.ZodEnum<{
471
+ unknown: "unknown";
472
+ supported: "supported";
473
+ unsupported: "unsupported";
474
+ }>;
475
+ runnable: z.ZodBoolean;
476
+ }, z.core.$strip>;
477
+ hostedTools: z.ZodObject<{
478
+ webSearch: z.ZodObject<{
479
+ upstream: z.ZodEnum<{
480
+ unknown: "unknown";
481
+ supported: "supported";
482
+ unsupported: "unsupported";
483
+ }>;
484
+ runnable: z.ZodBoolean;
485
+ }, z.core.$strip>;
486
+ xSearch: z.ZodObject<{
487
+ upstream: z.ZodEnum<{
488
+ unknown: "unknown";
489
+ supported: "supported";
490
+ unsupported: "unsupported";
491
+ }>;
492
+ runnable: z.ZodBoolean;
493
+ }, z.core.$strip>;
494
+ codeExecution: z.ZodObject<{
495
+ upstream: z.ZodEnum<{
496
+ unknown: "unknown";
497
+ supported: "supported";
498
+ unsupported: "unsupported";
499
+ }>;
500
+ runnable: z.ZodBoolean;
501
+ }, z.core.$strip>;
502
+ }, z.core.$strip>;
503
+ inputModalities: z.ZodArray<z.ZodEnum<{
504
+ text: "text";
505
+ image: "image";
506
+ audio: "audio";
507
+ }>>;
508
+ outputModalities: z.ZodArray<z.ZodEnum<{
509
+ text: "text";
510
+ image: "image";
511
+ audio: "audio";
512
+ }>>;
513
+ transports: z.ZodObject<{
514
+ sse: z.ZodObject<{
515
+ upstream: z.ZodEnum<{
516
+ unknown: "unknown";
517
+ supported: "supported";
518
+ unsupported: "unsupported";
519
+ }>;
520
+ runnable: z.ZodBoolean;
521
+ }, z.core.$strip>;
522
+ responsesWebSocket: z.ZodObject<{
523
+ upstream: z.ZodEnum<{
524
+ unknown: "unknown";
525
+ supported: "supported";
526
+ unsupported: "unsupported";
527
+ }>;
528
+ runnable: z.ZodBoolean;
529
+ }, z.core.$strip>;
530
+ realtimeAudio: z.ZodObject<{
531
+ upstream: z.ZodEnum<{
532
+ unknown: "unknown";
533
+ supported: "supported";
534
+ unsupported: "unsupported";
535
+ }>;
536
+ runnable: z.ZodBoolean;
537
+ }, z.core.$strip>;
538
+ }, z.core.$strip>;
539
+ latencyModes: z.ZodArray<z.ZodObject<{
540
+ id: z.ZodEnum<{
541
+ standard: "standard";
542
+ priority: "priority";
543
+ fast: "fast";
544
+ }>;
545
+ upstream: z.ZodEnum<{
546
+ unknown: "unknown";
547
+ supported: "supported";
548
+ unsupported: "unsupported";
549
+ }>;
550
+ runnable: z.ZodBoolean;
551
+ billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
552
+ }, z.core.$strip>>;
553
+ }, z.core.$strip>;
554
+ type ModelCapabilitiesV1 = z.infer<typeof ModelCapabilitiesV1Schema>;
555
+ type ModelDeploymentV1 = {
556
+ upstreamModelId: string;
557
+ wireApi: ModelProviderApi;
558
+ };
559
+ type ModelExecutionLimitsV1 = {
560
+ contextWindowTokens: number | null;
561
+ effectiveContextWindowTokens: number | null;
562
+ autoCompactTokenLimit: number | null;
563
+ toolOutputTruncationTokens: number | null;
564
+ };
565
+ type CredentialSourceV1 = {
566
+ kind: "deployment";
567
+ mechanism: "api_key" | "azure_ad_bearer";
568
+ } | {
569
+ kind: "connected_subscription";
570
+ provider: "codex";
571
+ } | {
572
+ kind: "workspace_connection";
573
+ mechanism: "api_key";
574
+ };
575
+ type BillingAttributionV1 = {
576
+ upstreamPayer: "deployment" | "workspace" | "connected_subscription";
577
+ metering: "opengeni_credits" | "external";
578
+ };
381
579
  /**
382
580
  * Wire API a provider speaks. The built-in OpenAI/Azure provider always uses
383
581
  * "responses" (the OpenAI Responses API). Extra registry providers default to
@@ -417,20 +615,164 @@ declare const RegistryProviderSchema: z.ZodObject<{
417
615
  apiKeyEnv: z.ZodOptional<z.ZodString>;
418
616
  defaultQuery: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
419
617
  defaultHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
618
+ publicDefaultQueryNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
619
+ publicDefaultHeaderNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
620
+ credentialSource: z.ZodOptional<z.ZodNever>;
621
+ billing: z.ZodOptional<z.ZodNever>;
420
622
  models: z.ZodArray<z.ZodObject<{
421
623
  id: z.ZodString;
624
+ upstreamModelId: z.ZodOptional<z.ZodString>;
625
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
422
626
  label: z.ZodOptional<z.ZodString>;
423
627
  contextWindowTokens: z.ZodOptional<z.ZodNumber>;
424
628
  effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
425
629
  autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
630
+ toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
426
631
  reasoningEffort: z.ZodOptional<z.ZodBoolean>;
427
632
  hostedWebSearch: z.ZodOptional<z.ZodBoolean>;
428
- pricing: z.ZodOptional<z.ZodObject<{
633
+ capabilities: z.ZodOptional<z.ZodObject<{
634
+ reasoning: z.ZodObject<{
635
+ upstream: z.ZodEnum<{
636
+ unknown: "unknown";
637
+ supported: "supported";
638
+ unsupported: "unsupported";
639
+ }>;
640
+ runnable: z.ZodBoolean;
641
+ efforts: z.ZodArray<z.ZodEnum<{
642
+ none: "none";
643
+ minimal: "minimal";
644
+ low: "low";
645
+ medium: "medium";
646
+ high: "high";
647
+ xhigh: "xhigh";
648
+ }>>;
649
+ defaultEffort: z.ZodNullable<z.ZodEnum<{
650
+ none: "none";
651
+ minimal: "minimal";
652
+ low: "low";
653
+ medium: "medium";
654
+ high: "high";
655
+ xhigh: "xhigh";
656
+ }>>;
657
+ required: z.ZodBoolean;
658
+ }, z.core.$strip>;
659
+ functionCalling: z.ZodObject<{
660
+ upstream: z.ZodEnum<{
661
+ unknown: "unknown";
662
+ supported: "supported";
663
+ unsupported: "unsupported";
664
+ }>;
665
+ runnable: z.ZodBoolean;
666
+ }, z.core.$strip>;
667
+ structuredOutput: z.ZodObject<{
668
+ upstream: z.ZodEnum<{
669
+ unknown: "unknown";
670
+ supported: "supported";
671
+ unsupported: "unsupported";
672
+ }>;
673
+ runnable: z.ZodBoolean;
674
+ }, z.core.$strip>;
675
+ hostedTools: z.ZodObject<{
676
+ webSearch: z.ZodObject<{
677
+ upstream: z.ZodEnum<{
678
+ unknown: "unknown";
679
+ supported: "supported";
680
+ unsupported: "unsupported";
681
+ }>;
682
+ runnable: z.ZodBoolean;
683
+ }, z.core.$strip>;
684
+ xSearch: z.ZodObject<{
685
+ upstream: z.ZodEnum<{
686
+ unknown: "unknown";
687
+ supported: "supported";
688
+ unsupported: "unsupported";
689
+ }>;
690
+ runnable: z.ZodBoolean;
691
+ }, z.core.$strip>;
692
+ codeExecution: z.ZodObject<{
693
+ upstream: z.ZodEnum<{
694
+ unknown: "unknown";
695
+ supported: "supported";
696
+ unsupported: "unsupported";
697
+ }>;
698
+ runnable: z.ZodBoolean;
699
+ }, z.core.$strip>;
700
+ }, z.core.$strip>;
701
+ inputModalities: z.ZodArray<z.ZodEnum<{
702
+ text: "text";
703
+ image: "image";
704
+ audio: "audio";
705
+ }>>;
706
+ outputModalities: z.ZodArray<z.ZodEnum<{
707
+ text: "text";
708
+ image: "image";
709
+ audio: "audio";
710
+ }>>;
711
+ transports: z.ZodObject<{
712
+ sse: z.ZodObject<{
713
+ upstream: z.ZodEnum<{
714
+ unknown: "unknown";
715
+ supported: "supported";
716
+ unsupported: "unsupported";
717
+ }>;
718
+ runnable: z.ZodBoolean;
719
+ }, z.core.$strip>;
720
+ responsesWebSocket: z.ZodObject<{
721
+ upstream: z.ZodEnum<{
722
+ unknown: "unknown";
723
+ supported: "supported";
724
+ unsupported: "unsupported";
725
+ }>;
726
+ runnable: z.ZodBoolean;
727
+ }, z.core.$strip>;
728
+ realtimeAudio: z.ZodObject<{
729
+ upstream: z.ZodEnum<{
730
+ unknown: "unknown";
731
+ supported: "supported";
732
+ unsupported: "unsupported";
733
+ }>;
734
+ runnable: z.ZodBoolean;
735
+ }, z.core.$strip>;
736
+ }, z.core.$strip>;
737
+ latencyModes: z.ZodArray<z.ZodObject<{
738
+ id: z.ZodEnum<{
739
+ standard: "standard";
740
+ priority: "priority";
741
+ fast: "fast";
742
+ }>;
743
+ upstream: z.ZodEnum<{
744
+ unknown: "unknown";
745
+ supported: "supported";
746
+ unsupported: "unsupported";
747
+ }>;
748
+ runnable: z.ZodBoolean;
749
+ billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
750
+ }, z.core.$strip>>;
751
+ }, z.core.$strip>>;
752
+ pricing: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
429
753
  inputMicrosPerMillionTokens: z.ZodNumber;
430
754
  cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
431
755
  outputMicrosPerMillionTokens: z.ZodNumber;
432
756
  marginBps: z.ZodOptional<z.ZodNumber>;
433
- }, z.core.$strip>>;
757
+ }, z.core.$strip>, z.ZodObject<{
758
+ default: z.ZodObject<{
759
+ inputMicrosPerMillionTokens: z.ZodNumber;
760
+ cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
761
+ outputMicrosPerMillionTokens: z.ZodNumber;
762
+ marginBps: z.ZodOptional<z.ZodNumber>;
763
+ }, z.core.$strip>;
764
+ inputTokenTiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
765
+ minimumInputTokens: z.ZodNumber;
766
+ pricing: z.ZodObject<{
767
+ inputMicrosPerMillionTokens: z.ZodNumber;
768
+ cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
769
+ outputMicrosPerMillionTokens: z.ZodNumber;
770
+ marginBps: z.ZodOptional<z.ZodNumber>;
771
+ }, z.core.$strip>;
772
+ }, z.core.$strip>>>;
773
+ }, z.core.$strip>]>>;
774
+ credentialSource: z.ZodOptional<z.ZodNever>;
775
+ billing: z.ZodOptional<z.ZodNever>;
434
776
  }, z.core.$strip>>;
435
777
  }, z.core.$strip>;
436
778
  type RegistryProvider = z.infer<typeof RegistryProviderSchema>;
@@ -461,17 +803,32 @@ interface ResolvedModelProvider {
461
803
  apiKey?: string | undefined;
462
804
  defaultQuery?: Record<string, string> | undefined;
463
805
  defaultHeaders?: Record<string, string> | undefined;
806
+ publicDefaultQueryNames?: string[] | undefined;
807
+ publicDefaultHeaderNames?: string[] | undefined;
808
+ credentialSource: CredentialSourceV1;
809
+ billing: BillingAttributionV1;
464
810
  }
465
811
  /** A single exposed model + the provider that serves it. */
466
812
  interface ConfiguredModel {
813
+ schemaVersion: 1;
467
814
  id: string;
815
+ aliases: string[];
468
816
  label: string;
469
817
  providerId: string;
470
818
  providerLabel: string;
471
819
  api: ModelProviderApi;
820
+ upstreamModelId: string;
821
+ deployment: ModelDeploymentV1;
822
+ executionLimits: ModelExecutionLimitsV1;
823
+ credentialSource: CredentialSourceV1;
824
+ billing: BillingAttributionV1;
825
+ capabilities: ModelCapabilitiesV1;
826
+ pricing?: ModelPricingScheduleV1 | undefined;
827
+ definitionVersion: string;
472
828
  contextWindowTokens?: number | undefined;
473
829
  effectiveContextWindowTokens?: number | undefined;
474
830
  autoCompactTokenLimit?: number | undefined;
831
+ toolOutputTruncationTokens?: number | undefined;
475
832
  reasoningEffort: boolean;
476
833
  hostedWebSearch: boolean;
477
834
  }
@@ -522,6 +879,13 @@ declare function builtinProviderId(settings: Pick<Settings, "openaiProvider">):
522
879
  * id — validateSettings rejects that at boot.
523
880
  */
524
881
  declare function configuredProviders(settings: Settings): ResolvedModelProvider[];
882
+ /**
883
+ * Pure catalog overlay for a workspace whose existing Codex connection seam
884
+ * reports ready. This describes product/provider identity only; it does not
885
+ * select, lease, refresh, or expose a concrete credential; those runtime
886
+ * operations remain owned by the credential allocator.
887
+ */
888
+ declare function withCodexCatalogProvider(settings: Settings): Settings;
525
889
  /**
526
890
  * The provider identity a model id resolves to, for workspace model-policy
527
891
  * evaluation — MUST agree with the real router (resolveTurnModel /
@@ -545,6 +909,8 @@ declare function policyProviderIdForModel(settings: Settings, modelId: string):
545
909
  * first and the built-in allow-list takes precedence over registry entries.
546
910
  */
547
911
  declare function configuredModels(settings: Settings): ConfiguredModel[];
912
+ /** Resolve a known canonical id or alias. Unknown strings are returned unchanged. */
913
+ declare function canonicalizeConfiguredModelId(settings: Settings, modelId: string): string;
548
914
  /**
549
915
  * Allowed model ids in selection order. Reimplemented on top of
550
916
  * configuredModels so it is the union of the built-in allow-list and every
@@ -563,12 +929,46 @@ declare function resolveModelProvider(settings: Settings, modelId: string): {
563
929
  provider: ResolvedModelProvider;
564
930
  model: ConfiguredModel;
565
931
  } | undefined;
932
+ type ResolveTurnExecutionPolicyV1Input = {
933
+ /** Effective persisted turn model. Aliases are accepted and canonicalized. */
934
+ modelId: string;
935
+ /** Exact caller-supplied input before canonicalization, only for explicit switches. */
936
+ requestedModelId: string | null;
937
+ modelSource: TurnExecutionModelSourceV1;
938
+ reasoningEffort: Settings["openaiReasoningEffort"];
939
+ reasoningSource: TurnExecutionReasoningSourceV1;
940
+ };
941
+ /**
942
+ * Build a trusted, secret-safe execution policy from the normalized catalog.
943
+ * The Codex overlay here contains static product/provider identity only; it
944
+ * neither proves readiness nor chooses, decrypts, leases, or exposes an account.
945
+ */
946
+ declare function resolveTurnExecutionPolicyV1(settings: Settings, input: ResolveTurnExecutionPolicyV1Input): TurnExecutionPolicyV1;
566
947
  /**
567
- * Effective per-model pricing. Merge order (later wins):
568
- * defaultModelPricing registry model `pricing` entries (keyed by model id)
569
- * parseModelPricingJson(settings.modelPricingJson) (explicit JSON wins).
948
+ * Parse-time validation lives in @opengeni/contracts; this verifier binds a
949
+ * present snapshot to the current executable definition and exact turn row.
950
+ * Any deployment/provider drift fails before a provider or compaction call.
570
951
  */
952
+ declare function assertTurnExecutionPolicyMatchesConfigV1(settings: Settings, policy: TurnExecutionPolicyV1, expected: {
953
+ modelId: string;
954
+ reasoningEffort: Settings["openaiReasoningEffort"];
955
+ }): {
956
+ policy: TurnExecutionPolicyV1;
957
+ provider: ResolvedModelProvider;
958
+ model: ConfiguredModel;
959
+ };
960
+ /**
961
+ * Effective per-model pricing schedules. Merge order (later wins): built-in
962
+ * flat defaults → registry model flat/scheduled pricing → explicit legacy flat
963
+ * OPENGENI_MODEL_PRICING_JSON. The explicit legacy map intentionally replaces
964
+ * a registry schedule with one flat default so its historical precedence stays
965
+ * exact.
966
+ */
967
+ declare function configuredModelPricingSchedules(settings: Settings): Record<string, ModelPricingScheduleV1>;
968
+ /** Legacy flat projection: returns the default/below-threshold price. */
571
969
  declare function configuredModelPricing(settings: Settings): Record<string, ModelPricing>;
970
+ /** Select the per-provider-request price at an exact input-token threshold. */
971
+ declare function selectModelPricing(schedule: ModelPricingScheduleV1, inputTokens: number): ModelPricing;
572
972
  /**
573
973
  * Usable input-token budget: an explicit model-catalog effective window when
574
974
  * available, otherwise the deployment window minus its output reserve.
@@ -579,7 +979,7 @@ declare function contextInputBudgetTokens(settings: Pick<Settings, "contextWindo
579
979
  * metadata is authoritative when present; deployment defaults remain the
580
980
  * fallback for models that do not declare their own limits.
581
981
  */
582
- declare function settingsWithResolvedModelContext(settings: Settings, model: Pick<ConfiguredModel, "contextWindowTokens" | "effectiveContextWindowTokens" | "autoCompactTokenLimit">): Settings;
982
+ declare function settingsWithResolvedModelContext(settings: Settings, model: Pick<ConfiguredModel, "contextWindowTokens" | "effectiveContextWindowTokens" | "autoCompactTokenLimit" | "toolOutputTruncationTokens">): Settings;
583
983
  declare function configuredStaticUsageLimits(settings: Settings): StaticUsageLimitsConfig;
584
984
  declare function configuredEntitlements(settings: Settings): EntitlementsConfig;
585
985
  declare function calculateModelUsageCostMicros(settings: Settings, model: string, usage: ModelUsageInput): number;
@@ -590,6 +990,13 @@ declare function configuredAllowedReasoningEfforts(settings: Settings): Array<z.
590
990
  * Throws naming only the env var, never echoing its value.
591
991
  */
592
992
  declare function environmentsEncryptionKeyBytes(settings: Settings): Uint8Array | null;
993
+ /**
994
+ * Build one structurally compatible connection policy for both
995
+ * `@temporalio/client` and `@temporalio/worker`. An API key or any custom TLS
996
+ * material enables TLS automatically; the explicit flag covers server-auth TLS
997
+ * without credentials. Secret values are never included in validation errors.
998
+ */
999
+ declare function temporalConnectionOptions(settings: Settings): TemporalConnectionOptions;
593
1000
  /**
594
1001
  * The connection `search_path` for OpenGeni's db handles + the managed-auth pool
595
1002
  * (Step I, §7.8 runtime half). Returns `undefined` when `dbSchema` is unset
@@ -597,7 +1004,7 @@ declare function environmentsEncryptionKeyBytes(settings: Settings): Uint8Array
597
1004
  * default (`public`) applies — byte-for-byte today's behavior. When `dbSchema`
598
1005
  * is set (embedded), returns `"<schema>,opengeni_private,public"` — `public`
599
1006
  * stays LAST so `gen_random_uuid()` (pgcrypto) and the `vector` type still
600
- * resolve (the SPIKE-1 live footgun). `opengeni_private` is on the path so the
1007
+ * resolve (the schema-isolation contract live footgun). `opengeni_private` is on the path so the
601
1008
  * RLS GUC-reader helpers resolve when referenced unqualified.
602
1009
  */
603
1010
  declare function dbSearchPath(settings: Pick<Settings, "dbSchema">): string | undefined;
@@ -733,7 +1140,7 @@ declare function parseStaticEntitlementsJson(raw: string): EntitlementsConfig;
733
1140
  declare function firstPartyMcpBaseUrl(settings: Settings): string;
734
1141
  declare function firstPartyMcpWorkspaceUrl(settings: Settings, workspaceId: string): string;
735
1142
  /**
736
- * Resolve the secret used to sign/verify scoped stream tokens (master-spine
1143
+ * Resolve the secret used to sign/verify scoped stream tokens (sandbox contract
737
1144
  * §C.3). Falls back to `delegationSecret` (the same HMAC envelope family —
738
1145
  * `ogs_` vs `ogd_` prefix) so a deployment that already carries a delegation
739
1146
  * secret does not need a second one. Returns undefined when neither is set,
@@ -742,13 +1149,13 @@ declare function firstPartyMcpWorkspaceUrl(settings: Settings, workspaceId: stri
742
1149
  declare function resolveStreamTokenSecret(settings: Settings): string | undefined;
743
1150
  /**
744
1151
  * True iff the desktop pixel plane must GRACEFULLY DEGRADE because desktop is
745
- * enabled but no stream-token secret is resolvable (I8/OD-8). When true,
1152
+ * enabled but no stream-token secret is resolvable (stream-token availability contract). When true,
746
1153
  * negotiateCapabilities forces DesktopStream.transport:null.
747
1154
  */
748
1155
  declare function streamTokenDegraded(settings: Settings): boolean;
749
1156
  /**
750
1157
  * Resolve the secret the control plane signs the enrollment bearer credential
751
- * with (the `oge_` envelope the agent presents back — M5/dossier §10.2). Falls
1158
+ * with (the `oge_` envelope the agent presents back — M5). Falls
752
1159
  * back to `delegationSecret` (the same HMAC envelope family) so a deployment that
753
1160
  * already carries a delegation secret needs no second one. Returns undefined when
754
1161
  * neither is set; when selfhosted is enabled but this is undefined, the poll route
@@ -758,7 +1165,7 @@ declare function streamTokenDegraded(settings: Settings): boolean;
758
1165
  declare function resolveEnrollmentSigningSecret(settings: Settings): string | undefined;
759
1166
  /**
760
1167
  * Resolve the HMAC secret the control plane signs the agent's relay PRODUCER token
761
- * with (the `ogr_` envelope; M8b/dossier §10.5). The RELAY verifies the producer
1168
+ * with (the `ogr_` envelope; M8b). The RELAY verifies the producer
762
1169
  * token with the SAME secret (injected into the relay via env). Prefers an explicit
763
1170
  * `selfhostedRelayTokenSecret`, then the `streamTokenSecret` (the relay already
764
1171
  * needs that one to verify the viewer's `ogs_` token, so a single secret can back
@@ -796,4 +1203,4 @@ interface NatsControlPlaneAuth {
796
1203
  }
797
1204
  declare function resolveNatsControlPlaneAuth(settings: Settings): NatsControlPlaneAuth | null;
798
1205
 
799
- export { AGENT_INSTRUCTIONS_CORE_PLACEHOLDER, type ConfiguredModel, DEFAULT_AGENT_INSTRUCTIONS, type EntitlementsConfig, type IntegrationOAuthClientConfig, IntegrationOAuthClientConfigSchema, type McpServerConfig, type McpServerConnectionRef, McpServerConnectionRefSchema, type ModelPricing, ModelProviderApi, type ModelUsageInput, type NatsCalloutConfig, type NatsControlPlaneAuth, type RegistryProvider, RegistryProviderKind, type ResolvedModelProvider, SANDBOX_REQUIRED_ENV, type SandboxRequiredEnv, type Settings, type StartupRetryOptions, type StaticUsageLimitsConfig, applyGitAuthPointerEnvironment, builtinProviderId, calculateModelUsageCostMicros, collectGitIdentityEnvironment, collectSandboxEnvironment, configuredAllowedModels, configuredAllowedReasoningEfforts, configuredEntitlements, configuredModelPricing, configuredModels, configuredProviders, configuredStaticUsageLimits, contextInputBudgetTokens, dbSearchPath, defaultModelPricing, effectiveModalIdleTimeoutSeconds, environmentsEncryptionKeyBytes, firstPartyMcpBaseUrl, firstPartyMcpWorkspaceUrl, getSettings, hasGitCredentialRepositorySelection, hasGitHubRepositorySelection, parseExposedPorts, parseIntegrationsOauthClientsJson, parseMcpServers, parseModelPricingJson, parseModelProvidersJson, parseSandboxWarmRateJson, parseStaticEntitlementsJson, parseStaticUsageLimitsJson, policyProviderIdForModel, requiredSandboxEnvForBackend, resolveEnrollmentSigningSecret, resolveModelProvider, resolveNatsCalloutConfig, resolveNatsControlPlaneAuth, resolveProviderApiKey, resolveRelayTokenSecret, resolveStreamTokenSecret, retryStartupDependency, sandboxEnvironmentVariableNames, sandboxLifecycleHookIds, sandboxPreparationProfiles, sandboxWarmRateMicrosPerSecond, settingsWithResolvedModelContext, stableSandboxEnvironmentForRun, startupRetryOptions, streamTokenDegraded };
1206
+ export { AGENT_INSTRUCTIONS_CORE_PLACEHOLDER, type BillingAttributionV1, type CapabilityStateV1, CapabilityStateV1Schema, CapabilitySupportV1, type ConfiguredModel, type CredentialSourceV1, DEFAULT_AGENT_INSTRUCTIONS, type EntitlementsConfig, type IntegrationOAuthClientConfig, IntegrationOAuthClientConfigSchema, type McpServerConfig, type McpServerConnectionRef, McpServerConnectionRefSchema, type ModelCapabilitiesV1, ModelCapabilitiesV1Schema, type ModelDeploymentV1, type ModelExecutionLimitsV1, type ModelPricing, type ModelPricingScheduleV1, ModelProviderApi, type ModelUsageInput, type NatsCalloutConfig, type NatsControlPlaneAuth, type RegistryProvider, RegistryProviderKind, type ResolveTurnExecutionPolicyV1Input, type ResolvedModelProvider, SANDBOX_REQUIRED_ENV, type SandboxRequiredEnv, type Settings, type StartupRetryOptions, type StaticUsageLimitsConfig, type TemporalConnectionOptions, type TemporalTlsConnectionConfig, applyGitAuthPointerEnvironment, assertTurnExecutionPolicyMatchesConfigV1, builtinProviderId, calculateModelUsageCostMicros, canonicalizeConfiguredModelId, collectGitIdentityEnvironment, collectSandboxEnvironment, configuredAllowedModels, configuredAllowedReasoningEfforts, configuredEntitlements, configuredModelPricing, configuredModelPricingSchedules, configuredModels, configuredProviders, configuredStaticUsageLimits, contextInputBudgetTokens, dbSearchPath, defaultModelPricing, effectiveModalIdleTimeoutSeconds, environmentsEncryptionKeyBytes, firstPartyMcpBaseUrl, firstPartyMcpWorkspaceUrl, getSettings, hasGitCredentialRepositorySelection, hasGitHubRepositorySelection, parseExposedPorts, parseIntegrationsOauthClientsJson, parseMcpServers, parseModelPricingJson, parseModelProvidersJson, parseSandboxWarmRateJson, parseStaticEntitlementsJson, parseStaticUsageLimitsJson, policyProviderIdForModel, requiredSandboxEnvForBackend, resolveEnrollmentSigningSecret, resolveModelProvider, resolveNatsCalloutConfig, resolveNatsControlPlaneAuth, resolveProviderApiKey, resolveRelayTokenSecret, resolveStreamTokenSecret, resolveTurnExecutionPolicyV1, retryStartupDependency, sandboxEnvironmentVariableNames, sandboxLifecycleHookIds, sandboxPreparationProfiles, sandboxWarmRateMicrosPerSecond, selectModelPricing, settingsWithResolvedModelContext, stableSandboxEnvironmentForRun, startupRetryOptions, streamTokenDegraded, temporalConnectionOptions, withCodexCatalogProvider };