@opengeni/config 1.2.0-canary.2 → 1.2.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/index.d.ts CHANGED
@@ -1,10 +1,14 @@
1
- import { Entitlements, LatencyMode, ReasoningEffort, SandboxBackend, StaticUsageLimits, TurnExecutionPolicyV1, type TurnExecutionLatencyModeSourceV1, type TurnExecutionModelSourceV1, type TurnExecutionReasoningSourceV1, type VideoGenerationResolution, type FirstPartyMcpToolName as FirstPartyMcpToolNameType } from "@opengeni/contracts";
1
+ export { managedUserEmailAllowed } from "./managed-user-admission.js";
2
+ export { CreditPromotionPolicy, signupCreditModelIds, promotionalCreditScope, } from "./credit-promotions.js";
3
+ import { type AgentConfigDeploymentLimits, Entitlements, LatencyMode, ReasoningEffort, SandboxBackend, StaticUsageLimits, TurnExecutionPolicyV1, type TurnExecutionLatencyModeSourceV1, type TurnExecutionModelSourceV1, type TurnExecutionReasoningSourceV1, type VideoGenerationResolution, type FirstPartyMcpToolName as FirstPartyMcpToolNameType } from "@opengeni/contracts";
4
+ import type { CodeSearchDeploymentPolicy } from "@opengeni/contracts/code-search";
2
5
  export { XAI_SUBSCRIPTION_MODEL_ID_PREFIX } from "@opengeni/xai-subscription";
3
6
  import { z } from "zod";
4
7
  export declare const DEFAULT_OPENROUTER_MODEL_ID: "openrouter/nvidia/nemotron-3-super-120b-a12b:free";
5
8
  export declare const DEFAULT_MODEL_COST_POLICY_JSON: string;
6
9
  export declare const SANDBOX_ARCHIVE_CAPTURE_MAX_TIMEOUT_MS: number;
7
10
  export declare const SANDBOX_ARCHIVE_CAPTURE_SETTLEMENT_GRACE_MS = 10000;
11
+ export declare const SANDBOX_DEADLINE_COMMAND_STOP_GRACE_MS = 120000;
8
12
  export declare const SANDBOX_SNAPSHOT_MAX_TIMEOUT_MS: number;
9
13
  export declare const GOOGLE_DRIVE_PROVIDER_REQUEST_TIMEOUT_MAX_MS = 60000;
10
14
  export declare const GOOGLE_DRIVE_PROVIDER_RETRY_DELAY_MAX_MS = 60000;
@@ -28,8 +32,9 @@ export declare const sandboxPreparationProfiles: Record<string, {
28
32
  export declare const AGENT_INSTRUCTIONS_CORE_PLACEHOLDER = "{{core}}";
29
33
  /**
30
34
  * Default per-workspace agent persona template. This is the BRAND + tool-usage
31
- * opinion (the white-labellable surface): the "You are an OpenGeni workspace
32
- * agent." identity line, the framing/opinion lines, and the mount-path facts.
35
+ * opinion (the white-labellable surface): the general-assistant identity line,
36
+ * the framing/opinion lines, and the mount-path facts. Domain-specific tooling
37
+ * guidance (for example Terraform or Checkov) belongs in opt-in Skills.
33
38
  *
34
39
  * The CORE that MUST survive any override — the goal-loop ownership line (which
35
40
  * names the opengeni__goal_* tools) and the dynamic workspace-environment block
@@ -45,6 +50,7 @@ export declare const AGENT_INSTRUCTIONS_CORE_PLACEHOLDER = "{{core}}";
45
50
  export declare const DEFAULT_AGENT_INSTRUCTIONS: string;
46
51
  export declare const McpServerConnectionRefSchema: z.ZodObject<{
47
52
  connectionId: z.ZodOptional<z.ZodString>;
53
+ accountSelection: z.ZodOptional<z.ZodLiteral<"all_eligible">>;
48
54
  authoritySource: z.ZodOptional<z.ZodLiteral<"host">>;
49
55
  hostBinding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
50
56
  bindingId: z.ZodString;
@@ -77,13 +83,14 @@ export declare const McpOperationRecoverySchema: z.ZodRecord<z.ZodString, z.ZodO
77
83
  observerTool: z.ZodString;
78
84
  }, z.core.$strict>>;
79
85
  /** Public, digest-pinned desktop image used by Modal unless the operator overrides it. */
80
- export declare const DEFAULT_MODAL_IMAGE_REF = "opengenipublicneuacr.azurecr.io/opengeni-desktop@sha256:c3bd17b8841de1bff9bb2777aad422cf8c75de78e2c30f9ac81d0cd6810a1b78";
86
+ export declare const DEFAULT_MODAL_IMAGE_REF = "opengenipublicneuacr.azurecr.io/opengeni-desktop@sha256:554d5b324a580071dd669e7c1190931e498eb1b397412a27c7de84a430ef393a";
81
87
  declare const SettingsSchema: z.ZodObject<{
82
88
  serviceName: z.ZodDefault<z.ZodString>;
83
89
  environment: z.ZodDefault<z.ZodString>;
84
90
  deploymentRevision: z.ZodDefault<z.ZodString>;
85
91
  serverVersion: z.ZodOptional<z.ZodString>;
86
92
  databaseUrl: z.ZodDefault<z.ZodString>;
93
+ apiDatabasePoolMax: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
87
94
  dbSchema: z.ZodDefault<z.ZodString>;
88
95
  rlsStrategy: z.ZodDefault<z.ZodEnum<{
89
96
  force: "force";
@@ -117,15 +124,22 @@ declare const SettingsSchema: z.ZodObject<{
117
124
  observabilityMetricsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
118
125
  observabilityOtlpEndpoint: z.ZodOptional<z.ZodString>;
119
126
  observabilityOtlpHeaders: z.ZodDefault<z.ZodString>;
127
+ observabilityDiagnosticsEndpoint: z.ZodOptional<z.ZodString>;
128
+ observabilityDiagnosticsHeaders: z.ZodDefault<z.ZodString>;
120
129
  analyticsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
121
130
  analyticsConsentRequired: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
122
131
  analyticsReoClientId: z.ZodOptional<z.ZodString>;
123
132
  analyticsPosthogProjectKey: z.ZodOptional<z.ZodString>;
124
133
  analyticsPosthogHost: z.ZodOptional<z.ZodString>;
125
134
  analyticsGa4MeasurementId: z.ZodOptional<z.ZodString>;
135
+ legalPrivacyPolicyUrl: z.ZodOptional<z.ZodString>;
136
+ legalTermsOfServiceUrl: z.ZodOptional<z.ZodString>;
137
+ supportEmail: z.ZodOptional<z.ZodString>;
126
138
  publicBaseUrl: z.ZodOptional<z.ZodString>;
139
+ documentationUrl: z.ZodPreprocess<z.ZodDefault<z.ZodNullable<z.ZodURL>>>;
127
140
  mcpOauthEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
128
- mcpOauthTrustedProxyHops: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
141
+ apiTrustedProxyHops: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
142
+ apiTrustedProxyCidrs: z.ZodDefault<z.ZodString>;
129
143
  webBaseUrl: z.ZodOptional<z.ZodString>;
130
144
  agentReleasesBaseUrl: z.ZodDefault<z.ZodString>;
131
145
  agentStableVersion: z.ZodDefault<z.ZodString>;
@@ -135,11 +149,19 @@ declare const SettingsSchema: z.ZodObject<{
135
149
  local: "local";
136
150
  managed: "managed";
137
151
  }>>;
138
- organizationTenancyCanonicalActivationEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
139
152
  billingMode: z.ZodDefault<z.ZodEnum<{
140
153
  disabled: "disabled";
141
154
  stripe: "stripe";
142
155
  }>>;
156
+ verifiedSignupTrialCreditsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
157
+ creditPromotionPolicy: z.ZodPreprocess<z.ZodDefault<z.ZodObject<{
158
+ defaultModelIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
159
+ signupModelIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
160
+ offers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
161
+ label: z.ZodString;
162
+ eligibleModelIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
163
+ }, z.core.$strict>>>;
164
+ }, z.core.$strict>>>;
143
165
  entitlementsMode: z.ZodDefault<z.ZodEnum<{
144
166
  managed: "managed";
145
167
  none: "none";
@@ -150,6 +172,7 @@ declare const SettingsSchema: z.ZodObject<{
150
172
  none: "none";
151
173
  static: "static";
152
174
  }>>;
175
+ usageAllowancesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
153
176
  staticEntitlementsJson: z.ZodDefault<z.ZodString>;
154
177
  staticUsageLimitsJson: z.ZodDefault<z.ZodString>;
155
178
  delegationSecret: z.ZodOptional<z.ZodString>;
@@ -169,11 +192,15 @@ declare const SettingsSchema: z.ZodObject<{
169
192
  browser_auth: "browser_auth";
170
193
  browser_clipboard: "browser_clipboard";
171
194
  browser_debug: "browser_debug";
195
+ browser_download_save: "browser_download_save";
196
+ browser_downloads: "browser_downloads";
172
197
  browser_identity: "browser_identity";
173
198
  browser_lifecycle: "browser_lifecycle";
174
199
  browser_observe: "browser_observe";
175
200
  browser_open: "browser_open";
176
201
  browser_publish: "browser_publish";
202
+ browser_read: "browser_read";
203
+ browser_screenshot: "browser_screenshot";
177
204
  browser_tabs: "browser_tabs";
178
205
  capability_authorization_request: "capability_authorization_request";
179
206
  capability_catalog_search: "capability_catalog_search";
@@ -187,7 +214,9 @@ declare const SettingsSchema: z.ZodObject<{
187
214
  computer_observe: "computer_observe";
188
215
  computer_open: "computer_open";
189
216
  computer_targets: "computer_targets";
217
+ connected_machine_enroll_token: "connected_machine_enroll_token";
190
218
  connected_machine_remove: "connected_machine_remove";
219
+ custom_mcp_setup_request: "custom_mcp_setup_request";
191
220
  editable_artifact_apply: "editable_artifact_apply";
192
221
  editable_artifact_create: "editable_artifact_create";
193
222
  editable_artifact_export: "editable_artifact_export";
@@ -225,6 +254,7 @@ declare const SettingsSchema: z.ZodObject<{
225
254
  knowledge_browse: "knowledge_browse";
226
255
  knowledge_correct: "knowledge_correct";
227
256
  knowledge_get: "knowledge_get";
257
+ knowledge_prepare_save: "knowledge_prepare_save";
228
258
  knowledge_propose: "knowledge_propose";
229
259
  knowledge_retain_file: "knowledge_retain_file";
230
260
  knowledge_retain_message: "knowledge_retain_message";
@@ -277,6 +307,7 @@ declare const SettingsSchema: z.ZodObject<{
277
307
  session_pause: "session_pause";
278
308
  session_resume: "session_resume";
279
309
  session_send_message: "session_send_message";
310
+ session_set_model: "session_set_model";
280
311
  session_set_project: "session_set_project";
281
312
  session_steer: "session_steer";
282
313
  session_wait: "session_wait";
@@ -291,8 +322,11 @@ declare const SettingsSchema: z.ZodObject<{
291
322
  slack_bot_list_files: "slack_bot_list_files";
292
323
  slack_bot_list_users: "slack_bot_list_users";
293
324
  slack_bot_post_message: "slack_bot_post_message";
325
+ slack_bot_prepare_message: "slack_bot_prepare_message";
294
326
  slack_bot_search: "slack_bot_search";
327
+ slack_bot_send_prepared_message: "slack_bot_send_prepared_message";
295
328
  slack_bot_thread_replies: "slack_bot_thread_replies";
329
+ slack_bot_upload_file: "slack_bot_upload_file";
296
330
  social_connections_list: "social_connections_list";
297
331
  social_daily_analysis_context: "social_daily_analysis_context";
298
332
  social_mentions_live: "social_mentions_live";
@@ -337,11 +371,15 @@ declare const SettingsSchema: z.ZodObject<{
337
371
  browser_auth: "browser_auth";
338
372
  browser_clipboard: "browser_clipboard";
339
373
  browser_debug: "browser_debug";
374
+ browser_download_save: "browser_download_save";
375
+ browser_downloads: "browser_downloads";
340
376
  browser_identity: "browser_identity";
341
377
  browser_lifecycle: "browser_lifecycle";
342
378
  browser_observe: "browser_observe";
343
379
  browser_open: "browser_open";
344
380
  browser_publish: "browser_publish";
381
+ browser_read: "browser_read";
382
+ browser_screenshot: "browser_screenshot";
345
383
  browser_tabs: "browser_tabs";
346
384
  capability_authorization_request: "capability_authorization_request";
347
385
  capability_catalog_search: "capability_catalog_search";
@@ -355,7 +393,9 @@ declare const SettingsSchema: z.ZodObject<{
355
393
  computer_observe: "computer_observe";
356
394
  computer_open: "computer_open";
357
395
  computer_targets: "computer_targets";
396
+ connected_machine_enroll_token: "connected_machine_enroll_token";
358
397
  connected_machine_remove: "connected_machine_remove";
398
+ custom_mcp_setup_request: "custom_mcp_setup_request";
359
399
  editable_artifact_apply: "editable_artifact_apply";
360
400
  editable_artifact_create: "editable_artifact_create";
361
401
  editable_artifact_export: "editable_artifact_export";
@@ -393,6 +433,7 @@ declare const SettingsSchema: z.ZodObject<{
393
433
  knowledge_browse: "knowledge_browse";
394
434
  knowledge_correct: "knowledge_correct";
395
435
  knowledge_get: "knowledge_get";
436
+ knowledge_prepare_save: "knowledge_prepare_save";
396
437
  knowledge_propose: "knowledge_propose";
397
438
  knowledge_retain_file: "knowledge_retain_file";
398
439
  knowledge_retain_message: "knowledge_retain_message";
@@ -445,6 +486,7 @@ declare const SettingsSchema: z.ZodObject<{
445
486
  session_pause: "session_pause";
446
487
  session_resume: "session_resume";
447
488
  session_send_message: "session_send_message";
489
+ session_set_model: "session_set_model";
448
490
  session_set_project: "session_set_project";
449
491
  session_steer: "session_steer";
450
492
  session_wait: "session_wait";
@@ -459,8 +501,11 @@ declare const SettingsSchema: z.ZodObject<{
459
501
  slack_bot_list_files: "slack_bot_list_files";
460
502
  slack_bot_list_users: "slack_bot_list_users";
461
503
  slack_bot_post_message: "slack_bot_post_message";
504
+ slack_bot_prepare_message: "slack_bot_prepare_message";
462
505
  slack_bot_search: "slack_bot_search";
506
+ slack_bot_send_prepared_message: "slack_bot_send_prepared_message";
463
507
  slack_bot_thread_replies: "slack_bot_thread_replies";
508
+ slack_bot_upload_file: "slack_bot_upload_file";
464
509
  social_connections_list: "social_connections_list";
465
510
  social_daily_analysis_context: "social_daily_analysis_context";
466
511
  social_mentions_live: "social_mentions_live";
@@ -499,11 +544,17 @@ declare const SettingsSchema: z.ZodObject<{
499
544
  environmentsEncryptionKey: z.ZodOptional<z.ZodString>;
500
545
  integrationsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
501
546
  integrationsStateSecret: z.ZodOptional<z.ZodString>;
547
+ integrationsOauthShortStateEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
502
548
  integrationsAllowPrivateNetworkTargets: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
503
549
  integrationsOauthClientsJson: z.ZodDefault<z.ZodString>;
550
+ gmailWatchTopicName: z.ZodOptional<z.ZodString>;
504
551
  slackClientId: z.ZodOptional<z.ZodString>;
505
552
  slackClientSecret: z.ZodOptional<z.ZodString>;
506
553
  slackSigningSecret: z.ZodOptional<z.ZodString>;
554
+ slackAccessMode: z.ZodDefault<z.ZodEnum<{
555
+ full: "full";
556
+ limited: "limited";
557
+ }>>;
507
558
  slackBotDisplayName: z.ZodDefault<z.ZodEnum<{
508
559
  OpenGeni: "OpenGeni";
509
560
  "OpenGeni Staging": "OpenGeni Staging";
@@ -533,8 +584,6 @@ declare const SettingsSchema: z.ZodObject<{
533
584
  goalIdleBackoffMs: z.ZodDefault<z.ZodPreprocess<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>>;
534
585
  goalIdleBackoffMaxMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
535
586
  childLifecycleNoticesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
536
- hostMcpAuthoritySourceAdmissionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
537
- hostMcpCredentialResolversJson: z.ZodOptional<z.ZodString>;
538
587
  slackWorkspaceRoutingEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
539
588
  agentMaxModelCallsPerTurn: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
540
589
  contextWindowTokens: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -549,10 +598,12 @@ declare const SettingsSchema: z.ZodObject<{
549
598
  authAllowMetrics: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
550
599
  apiHost: z.ZodDefault<z.ZodString>;
551
600
  apiPort: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
601
+ apiMetricsPort: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
552
602
  workerHttpPort: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
553
603
  opengeniMcpInternalUrl: z.ZodOptional<z.ZodString>;
554
604
  opengeniMcpUrl: z.ZodOptional<z.ZodString>;
555
605
  corsAllowOriginRegex: z.ZodDefault<z.ZodString>;
606
+ localAllowedOrigins: z.ZodOptional<z.ZodString>;
556
607
  openaiProvider: z.ZodDefault<z.ZodEnum<{
557
608
  azure: "azure";
558
609
  openai: "openai";
@@ -602,9 +653,11 @@ declare const SettingsSchema: z.ZodObject<{
602
653
  openrouterApiKey: z.ZodOptional<z.ZodString>;
603
654
  resolvedGatewayModelsJson: z.ZodOptional<z.ZodString>;
604
655
  resolvedOpenRouterModelsJson: z.ZodOptional<z.ZodString>;
656
+ resolvedCodexModelsJson: z.ZodOptional<z.ZodString>;
605
657
  modelProvidersJson: z.ZodDefault<z.ZodString>;
606
658
  codexSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
607
659
  supergrokSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
660
+ claudeSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
608
661
  supergrokResponseStreamIdleTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
609
662
  codexConnectedAppsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
610
663
  codexProductSku: z.ZodOptional<z.ZodString>;
@@ -612,6 +665,7 @@ declare const SettingsSchema: z.ZodObject<{
612
665
  lazyToolSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
613
666
  codexFleetPolicyShadowEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
614
667
  codexRotationNearExhaustionPct: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
668
+ reasoningConfigurationUpdatesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
615
669
  openaiReasoningEffort: z.ZodDefault<z.ZodEnum<{
616
670
  high: "high";
617
671
  low: "low";
@@ -622,6 +676,16 @@ declare const SettingsSchema: z.ZodObject<{
622
676
  xhigh: "xhigh";
623
677
  }>>;
624
678
  openaiAllowedReasoningEfforts: z.ZodDefault<z.ZodString>;
679
+ creditsDefaultModel: z.ZodDefault<z.ZodString>;
680
+ creditsDefaultReasoningEffort: z.ZodDefault<z.ZodEnum<{
681
+ high: "high";
682
+ low: "low";
683
+ max: "max";
684
+ medium: "medium";
685
+ minimal: "minimal";
686
+ none: "none";
687
+ xhigh: "xhigh";
688
+ }>>;
625
689
  openaiResponsesTransport: z.ZodDefault<z.ZodEnum<{
626
690
  http: "http";
627
691
  websocket: "websocket";
@@ -633,6 +697,16 @@ declare const SettingsSchema: z.ZodObject<{
633
697
  openaiReasoningEncryptedContent: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
634
698
  openaiMaxRetries: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
635
699
  webSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
700
+ jevApiKey: z.ZodOptional<z.ZodString>;
701
+ jevBaseUrl: z.ZodDefault<z.ZodString>;
702
+ jevModel: z.ZodDefault<z.ZodString>;
703
+ jevRequestTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
704
+ codeSearchMode: z.ZodDefault<z.ZodEnum<{
705
+ default_on: "default_on";
706
+ experiment: "experiment";
707
+ off: "off";
708
+ opt_in: "opt_in";
709
+ }>>;
636
710
  agentInstructionsTemplate: z.ZodDefault<z.ZodString>;
637
711
  azureOpenaiBaseUrl: z.ZodOptional<z.ZodString>;
638
712
  azureOpenaiEndpoint: z.ZodOptional<z.ZodString>;
@@ -662,6 +736,7 @@ declare const SettingsSchema: z.ZodObject<{
662
736
  dockerWorkspaceBaseDir: z.ZodOptional<z.ZodString>;
663
737
  modalAppName: z.ZodDefault<z.ZodString>;
664
738
  modalImageRef: z.ZodOptional<z.ZodString>;
739
+ modalCommandSupervisionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
665
740
  modalImageId: z.ZodOptional<z.ZodString>;
666
741
  modalImageRegistrySecret: z.ZodOptional<z.ZodString>;
667
742
  modalTimeoutSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -726,6 +801,7 @@ declare const SettingsSchema: z.ZodObject<{
726
801
  blaxelTtl: z.ZodOptional<z.ZodString>;
727
802
  cloudflareWorkerUrl: z.ZodOptional<z.ZodString>;
728
803
  cloudflareApiKey: z.ZodOptional<z.ZodString>;
804
+ experimentalBrowserContextPoolEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
729
805
  browserbaseApiKey: z.ZodOptional<z.ZodString>;
730
806
  kernelApiKey: z.ZodOptional<z.ZodString>;
731
807
  kernelEndpoint: z.ZodOptional<z.ZodString>;
@@ -768,6 +844,7 @@ declare const SettingsSchema: z.ZodObject<{
768
844
  sandboxViewerHolderTtlMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
769
845
  sandboxInteractionHolderTtlMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
770
846
  sandboxIdleGraceMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
847
+ sandboxIdleCommandContainmentMs: z.ZodPipe<z.ZodOptional<z.ZodCoercedNumber<unknown>>, z.ZodTransform<number | undefined, number | undefined>>;
771
848
  sandboxSnapshotIntervalMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
772
849
  sandboxSnapshotTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
773
850
  sandboxDrainSnapshotTimeoutMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
@@ -779,9 +856,15 @@ declare const SettingsSchema: z.ZodObject<{
779
856
  workspaceControlLockTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
780
857
  rigSetupTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
781
858
  sandboxWarmRateMicrosPerSecondJson: z.ZodDefault<z.ZodString>;
859
+ sandboxWarmBillingMode: z.ZodDefault<z.ZodEnum<{
860
+ credits: "credits";
861
+ shadow: "shadow";
862
+ usage_only: "usage_only";
863
+ }>>;
782
864
  sandboxMaxWarmSecondsPerWorkspace: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
783
865
  sandboxPreparationProfiles: z.ZodDefault<z.ZodString>;
784
866
  sandboxEnvAllowlist: z.ZodDefault<z.ZodString>;
867
+ sandboxImageAllowlist: z.ZodDefault<z.ZodString>;
785
868
  objectStorageEndpoint: z.ZodOptional<z.ZodString>;
786
869
  objectStorageInternalEndpoint: z.ZodOptional<z.ZodString>;
787
870
  objectStorageSandboxEndpoint: z.ZodOptional<z.ZodString>;
@@ -816,6 +899,13 @@ declare const SettingsSchema: z.ZodObject<{
816
899
  documentEmbeddingDimensions: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
817
900
  documentEmbeddingApiKey: z.ZodOptional<z.ZodString>;
818
901
  documentEmbeddingBaseUrl: z.ZodOptional<z.ZodString>;
902
+ documentEmbeddingBillingMode: z.ZodDefault<z.ZodEnum<{
903
+ credits: "credits";
904
+ shadow: "shadow";
905
+ usage_only: "usage_only";
906
+ }>>;
907
+ documentEmbeddingCreditsActivatedAt: z.ZodOptional<z.ZodISODateTime>;
908
+ documentEmbeddingRateMicrosPerMillionBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
819
909
  documentCurationProvider: z.ZodDefault<z.ZodEnum<{
820
910
  heuristic: "heuristic";
821
911
  none: "none";
@@ -854,11 +944,13 @@ declare const SettingsSchema: z.ZodObject<{
854
944
  managedAuthGoogleClientSecret: z.ZodOptional<z.ZodString>;
855
945
  managedAuthGithubClientId: z.ZodOptional<z.ZodString>;
856
946
  managedAuthGithubClientSecret: z.ZodOptional<z.ZodString>;
947
+ allowedUserEmails: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodEmail, z.ZodTransform<string, string>>>>;
857
948
  managedAuthSessionSetMode: z.ZodDefault<z.ZodEnum<{
858
949
  broker: "broker";
859
950
  dual: "dual";
860
951
  legacy: "legacy";
861
952
  }>>;
953
+ managedAuthNewSignupsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
862
954
  organizationUserSetupEmailTokenTransport: z.ZodDefault<z.ZodEnum<{
863
955
  fragment: "fragment";
864
956
  query: "query";
@@ -881,6 +973,7 @@ declare const SettingsSchema: z.ZodObject<{
881
973
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
882
974
  connectionRef: z.ZodOptional<z.ZodObject<{
883
975
  connectionId: z.ZodOptional<z.ZodString>;
976
+ accountSelection: z.ZodOptional<z.ZodLiteral<"all_eligible">>;
884
977
  authoritySource: z.ZodOptional<z.ZodLiteral<"host">>;
885
978
  hostBinding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
886
979
  bindingId: z.ZodString;
@@ -913,6 +1006,88 @@ declare const SettingsSchema: z.ZodObject<{
913
1006
  }, z.core.$strip>>>;
914
1007
  }, z.core.$strip>;
915
1008
  export type Settings = z.infer<typeof SettingsSchema>;
1009
+ declare const ArtifactOutboxSettingsSchema: z.ZodObject<{
1010
+ serviceName: z.ZodDefault<z.ZodString>;
1011
+ environment: z.ZodDefault<z.ZodString>;
1012
+ deploymentRevision: z.ZodDefault<z.ZodString>;
1013
+ dbSchema: z.ZodDefault<z.ZodString>;
1014
+ rlsStrategy: z.ZodDefault<z.ZodEnum<{
1015
+ force: "force";
1016
+ scoped: "scoped";
1017
+ }>>;
1018
+ observabilityStructuredLogs: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
1019
+ observabilityMetricsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
1020
+ observabilityOtlpEndpoint: z.ZodOptional<z.ZodString>;
1021
+ observabilityOtlpHeaders: z.ZodDefault<z.ZodString>;
1022
+ natsUrl: z.ZodDefault<z.ZodString>;
1023
+ selfhostedNatsControlUser: z.ZodOptional<z.ZodString>;
1024
+ selfhostedNatsControlPassword: z.ZodOptional<z.ZodString>;
1025
+ }, z.core.$strip>;
1026
+ declare const ObjectStorageSettingsSchema: z.ZodObject<{
1027
+ objectStorageEndpoint: z.ZodOptional<z.ZodString>;
1028
+ objectStorageInternalEndpoint: z.ZodOptional<z.ZodString>;
1029
+ objectStorageSandboxEndpoint: z.ZodOptional<z.ZodString>;
1030
+ objectStorageBackend: z.ZodDefault<z.ZodEnum<{
1031
+ "aws-s3": "aws-s3";
1032
+ "azure-blob": "azure-blob";
1033
+ gcs: "gcs";
1034
+ "s3-compatible": "s3-compatible";
1035
+ }>>;
1036
+ objectStorageBucket: z.ZodDefault<z.ZodString>;
1037
+ objectStorageRegion: z.ZodDefault<z.ZodString>;
1038
+ objectStorageAccessKeyId: z.ZodOptional<z.ZodString>;
1039
+ objectStorageSecretAccessKey: z.ZodOptional<z.ZodString>;
1040
+ objectStorageForcePathStyle: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
1041
+ objectStorageAzureConnectionString: z.ZodOptional<z.ZodString>;
1042
+ objectStorageAzureAccountName: z.ZodOptional<z.ZodString>;
1043
+ objectStorageAzureAccountKey: z.ZodOptional<z.ZodString>;
1044
+ objectStorageAzureEndpoint: z.ZodOptional<z.ZodString>;
1045
+ objectStorageGcsProjectId: z.ZodOptional<z.ZodString>;
1046
+ objectStorageGcsCredentialsJson: z.ZodOptional<z.ZodString>;
1047
+ objectStorageGcsKeyFilename: z.ZodOptional<z.ZodString>;
1048
+ objectStorageGcsApiEndpoint: z.ZodOptional<z.ZodString>;
1049
+ }, z.core.$strip>;
1050
+ declare const ArtifactMaterializerSettingsSchema: z.ZodObject<{
1051
+ serviceName: z.ZodDefault<z.ZodString>;
1052
+ environment: z.ZodDefault<z.ZodString>;
1053
+ deploymentRevision: z.ZodDefault<z.ZodString>;
1054
+ dbSchema: z.ZodDefault<z.ZodString>;
1055
+ rlsStrategy: z.ZodDefault<z.ZodEnum<{
1056
+ force: "force";
1057
+ scoped: "scoped";
1058
+ }>>;
1059
+ observabilityStructuredLogs: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
1060
+ observabilityMetricsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
1061
+ observabilityOtlpEndpoint: z.ZodOptional<z.ZodString>;
1062
+ observabilityOtlpHeaders: z.ZodDefault<z.ZodString>;
1063
+ objectStorageEndpoint: z.ZodOptional<z.ZodString>;
1064
+ objectStorageInternalEndpoint: z.ZodOptional<z.ZodString>;
1065
+ objectStorageSandboxEndpoint: z.ZodOptional<z.ZodString>;
1066
+ objectStorageBackend: z.ZodDefault<z.ZodEnum<{
1067
+ "aws-s3": "aws-s3";
1068
+ "azure-blob": "azure-blob";
1069
+ gcs: "gcs";
1070
+ "s3-compatible": "s3-compatible";
1071
+ }>>;
1072
+ objectStorageBucket: z.ZodDefault<z.ZodString>;
1073
+ objectStorageRegion: z.ZodDefault<z.ZodString>;
1074
+ objectStorageAccessKeyId: z.ZodOptional<z.ZodString>;
1075
+ objectStorageSecretAccessKey: z.ZodOptional<z.ZodString>;
1076
+ objectStorageForcePathStyle: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
1077
+ objectStorageAzureConnectionString: z.ZodOptional<z.ZodString>;
1078
+ objectStorageAzureAccountName: z.ZodOptional<z.ZodString>;
1079
+ objectStorageAzureAccountKey: z.ZodOptional<z.ZodString>;
1080
+ objectStorageAzureEndpoint: z.ZodOptional<z.ZodString>;
1081
+ objectStorageGcsProjectId: z.ZodOptional<z.ZodString>;
1082
+ objectStorageGcsCredentialsJson: z.ZodOptional<z.ZodString>;
1083
+ objectStorageGcsKeyFilename: z.ZodOptional<z.ZodString>;
1084
+ objectStorageGcsApiEndpoint: z.ZodOptional<z.ZodString>;
1085
+ }, z.core.$strip>;
1086
+ export type ArtifactOutboxSettings = z.infer<typeof ArtifactOutboxSettingsSchema>;
1087
+ export type ObjectStorageSettings = z.infer<typeof ObjectStorageSettingsSchema>;
1088
+ export type ArtifactMaterializerSettings = z.infer<typeof ArtifactMaterializerSettingsSchema>;
1089
+ export declare function getArtifactOutboxSettings(source?: NodeJS.ProcessEnv): ArtifactOutboxSettings;
1090
+ export declare function getArtifactMaterializerSettings(source?: NodeJS.ProcessEnv): ArtifactMaterializerSettings;
916
1091
  export type McpServerConfig = Settings["mcpServers"][number];
917
1092
  export type GoogleDriveProviderRetryOptions = {
918
1093
  requestTimeoutMs: number;
@@ -967,6 +1142,17 @@ export type VoiceInputProviderConfig = {
967
1142
  kind: "supergrok-subscription";
968
1143
  experimental: true;
969
1144
  };
1145
+ /** The deployment's Jev key, or undefined when it is missing or a placeholder. */
1146
+ export declare function usableJevApiKey(settings: Pick<Settings, "jevApiKey">): string | undefined;
1147
+ /** Deployment half of agent configuration: hard capability limits. */
1148
+ export declare function agentConfigDeploymentPolicy(settings: Pick<Settings, "webSearchEnabled" | "defaultFirstPartyMcpTools" | "allowedFirstPartyMcpTools">): AgentConfigDeploymentLimits;
1149
+ /**
1150
+ * Deployment half of the `code_search` decision. `available` is false when
1151
+ * the mode is off or no usable Jev key is configured; workspaces then cannot
1152
+ * turn it on. `workspaceDefault` applies to workspaces without their own
1153
+ * setting.
1154
+ */
1155
+ export declare function codeSearchDeploymentPolicy(settings: Pick<Settings, "codeSearchMode" | "jevApiKey">): CodeSearchDeploymentPolicy;
970
1156
  /**
971
1157
  * Reject empty / template secrets so `.env.example` placeholders like
972
1158
  * `your-key` cannot advertise voice input as available and then 401 upstream.
@@ -1020,6 +1206,24 @@ export type ModelUsageCostBreakdown = {
1020
1206
  /** OpenGeni credit price after configured margin and latency-mode multiplier. */
1021
1207
  creditCostMicros: number;
1022
1208
  };
1209
+ export type ModelListCostClassesMicros = {
1210
+ uncachedInput: number;
1211
+ cacheRead: number;
1212
+ cacheWrite: number;
1213
+ output: number;
1214
+ };
1215
+ export type ModelListUsageCostSnapshot = ModelUsageCostBreakdown & {
1216
+ /** Captured upstream list costs, summing to providerCostMicros, never debits. */
1217
+ listByClassMicros: ModelListCostClassesMicros | null;
1218
+ /** True only when a returned class split includes latency rounding allocation. */
1219
+ listByClassApprox: boolean;
1220
+ };
1221
+ export type ModelRecordedListCostAllocation = {
1222
+ /** Approximate attribution of a stored upstream total, never a new price. */
1223
+ listByClassMicros: ModelListCostClassesMicros | null;
1224
+ /** True for every eligible historical allocation, including known zero. */
1225
+ listByClassApprox: boolean;
1226
+ };
1023
1227
  export type StaticUsageLimitsConfig = StaticUsageLimits;
1024
1228
  export type EntitlementsConfig = Entitlements;
1025
1229
  export declare const CapabilitySupportV1: z.ZodEnum<{
@@ -1196,7 +1400,7 @@ export type CredentialSourceV1 = {
1196
1400
  mechanism: "api_key" | "azure_ad_bearer" | "none";
1197
1401
  } | {
1198
1402
  kind: "connected_subscription";
1199
- provider: "codex" | "xai";
1403
+ provider: "codex" | "xai" | "claude";
1200
1404
  } | {
1201
1405
  kind: "workspace_connection";
1202
1406
  mechanism: "api_key";
@@ -1216,6 +1420,7 @@ export type BillingAttributionV1 = {
1216
1420
  * silently no-ops hosted tools (see docs/model-providers.md).
1217
1421
  */
1218
1422
  export declare const ModelProviderApi: z.ZodEnum<{
1423
+ "anthropic-messages": "anthropic-messages";
1219
1424
  chat: "chat";
1220
1425
  responses: "responses";
1221
1426
  }>;
@@ -1238,8 +1443,14 @@ export type ModelProviderWireProfile = z.infer<typeof ModelProviderWireProfile>;
1238
1443
  */
1239
1444
  export declare const RegistryProviderKind: z.ZodEnum<{
1240
1445
  anonymous: "anonymous";
1446
+ "anthropic-organization": "anthropic-organization";
1447
+ "anthropic-workspace": "anthropic-workspace";
1241
1448
  "api-key": "api-key";
1449
+ "claude-subscription-organization": "claude-subscription-organization";
1450
+ "claude-subscription-workspace": "claude-subscription-workspace";
1242
1451
  "codex-subscription": "codex-subscription";
1452
+ "direct-azure-workspace": "direct-azure-workspace";
1453
+ "direct-openai-workspace": "direct-openai-workspace";
1243
1454
  "openrouter-organization": "openrouter-organization";
1244
1455
  "openrouter-workspace": "openrouter-workspace";
1245
1456
  "vercel-gateway-managed": "vercel-gateway-managed";
@@ -1249,11 +1460,56 @@ export declare const RegistryProviderKind: z.ZodEnum<{
1249
1460
  }>;
1250
1461
  export type RegistryProviderKind = z.infer<typeof RegistryProviderKind>;
1251
1462
  /** A non-built-in provider declared by the host via OPENGENI_MODEL_PROVIDERS_JSON. */
1463
+ export declare const ClaudeSubscriptionIdentity: z.ZodObject<{
1464
+ accountUuid: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
1465
+ deviceId: z.ZodString;
1466
+ }, z.core.$strict>;
1467
+ export type ClaudeSubscriptionIdentity = z.infer<typeof ClaudeSubscriptionIdentity>;
1468
+ export declare const ClaudeSubscriptionCredential: z.ZodObject<{
1469
+ version: z.ZodLiteral<1>;
1470
+ token: z.ZodString;
1471
+ identity: z.ZodObject<{
1472
+ accountUuid: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
1473
+ deviceId: z.ZodString;
1474
+ }, z.core.$strict>;
1475
+ oauth: z.ZodOptional<z.ZodObject<{
1476
+ refreshToken: z.ZodString;
1477
+ expiresAt: z.ZodString;
1478
+ scopes: z.ZodArray<z.ZodString>;
1479
+ }, z.core.$strict>>;
1480
+ }, z.core.$strict>;
1481
+ declare const AnthropicProviderOptions: z.ZodObject<{
1482
+ identity: z.ZodOptional<z.ZodObject<{
1483
+ accountUuid: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
1484
+ deviceId: z.ZodString;
1485
+ }, z.core.$strict>>;
1486
+ credentialBinding: z.ZodOptional<z.ZodObject<{
1487
+ connectionId: z.ZodString;
1488
+ credentialVersion: z.ZodNumber;
1489
+ }, z.core.$strict>>;
1490
+ auth: z.ZodDefault<z.ZodEnum<{
1491
+ "api-key": "api-key";
1492
+ oauth: "oauth";
1493
+ }>>;
1494
+ cacheTtl: z.ZodDefault<z.ZodEnum<{
1495
+ "1h": "1h";
1496
+ "5m": "5m";
1497
+ off: "off";
1498
+ }>>;
1499
+ maxOutputTokens: z.ZodDefault<z.ZodNumber>;
1500
+ streamIdleTimeoutMs: z.ZodDefault<z.ZodNumber>;
1501
+ }, z.core.$strip>;
1252
1502
  declare const RegistryProviderSchema: z.ZodObject<{
1253
1503
  kind: z.ZodDefault<z.ZodEnum<{
1254
1504
  anonymous: "anonymous";
1505
+ "anthropic-organization": "anthropic-organization";
1506
+ "anthropic-workspace": "anthropic-workspace";
1255
1507
  "api-key": "api-key";
1508
+ "claude-subscription-organization": "claude-subscription-organization";
1509
+ "claude-subscription-workspace": "claude-subscription-workspace";
1256
1510
  "codex-subscription": "codex-subscription";
1511
+ "direct-azure-workspace": "direct-azure-workspace";
1512
+ "direct-openai-workspace": "direct-openai-workspace";
1257
1513
  "openrouter-organization": "openrouter-organization";
1258
1514
  "openrouter-workspace": "openrouter-workspace";
1259
1515
  "vercel-gateway-managed": "vercel-gateway-managed";
@@ -1264,9 +1520,31 @@ declare const RegistryProviderSchema: z.ZodObject<{
1264
1520
  id: z.ZodString;
1265
1521
  label: z.ZodOptional<z.ZodString>;
1266
1522
  api: z.ZodDefault<z.ZodEnum<{
1523
+ "anthropic-messages": "anthropic-messages";
1267
1524
  chat: "chat";
1268
1525
  responses: "responses";
1269
1526
  }>>;
1527
+ anthropic: z.ZodOptional<z.ZodObject<{
1528
+ identity: z.ZodOptional<z.ZodObject<{
1529
+ accountUuid: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
1530
+ deviceId: z.ZodString;
1531
+ }, z.core.$strict>>;
1532
+ credentialBinding: z.ZodOptional<z.ZodObject<{
1533
+ connectionId: z.ZodString;
1534
+ credentialVersion: z.ZodNumber;
1535
+ }, z.core.$strict>>;
1536
+ auth: z.ZodDefault<z.ZodEnum<{
1537
+ "api-key": "api-key";
1538
+ oauth: "oauth";
1539
+ }>>;
1540
+ cacheTtl: z.ZodDefault<z.ZodEnum<{
1541
+ "1h": "1h";
1542
+ "5m": "5m";
1543
+ off: "off";
1544
+ }>>;
1545
+ maxOutputTokens: z.ZodDefault<z.ZodNumber>;
1546
+ streamIdleTimeoutMs: z.ZodDefault<z.ZodNumber>;
1547
+ }, z.core.$strip>>;
1270
1548
  wireProfile: z.ZodDefault<z.ZodEnum<{
1271
1549
  "azure-openai": "azure-openai";
1272
1550
  openai: "openai";
@@ -1286,6 +1564,7 @@ declare const RegistryProviderSchema: z.ZodObject<{
1286
1564
  aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
1287
1565
  label: z.ZodOptional<z.ZodString>;
1288
1566
  shortLabel: z.ZodOptional<z.ZodString>;
1567
+ logoUrl: z.ZodOptional<z.ZodString>;
1289
1568
  contextWindowTokens: z.ZodOptional<z.ZodNumber>;
1290
1569
  effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
1291
1570
  autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
@@ -1499,6 +1778,7 @@ export declare const GatewayCatalogModel: z.ZodObject<{
1499
1778
  upstreamModelId: z.ZodString;
1500
1779
  label: z.ZodString;
1501
1780
  shortLabel: z.ZodOptional<z.ZodString>;
1781
+ logoUrl: z.ZodOptional<z.ZodString>;
1502
1782
  providers: z.ZodArray<z.ZodString>;
1503
1783
  implicitCaching: z.ZodDefault<z.ZodBoolean>;
1504
1784
  vision: z.ZodDefault<z.ZodBoolean>;
@@ -1540,6 +1820,7 @@ export declare const OpenRouterCatalogModel: z.ZodObject<{
1540
1820
  upstreamModelId: z.ZodString;
1541
1821
  label: z.ZodString;
1542
1822
  shortLabel: z.ZodOptional<z.ZodString>;
1823
+ logoUrl: z.ZodOptional<z.ZodString>;
1543
1824
  aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
1544
1825
  capabilities: z.ZodObject<{
1545
1826
  reasoning: z.ZodObject<{
@@ -1702,9 +1983,31 @@ export declare const ModelCatalogDocument: z.ZodObject<{
1702
1983
  id: z.ZodString;
1703
1984
  label: z.ZodOptional<z.ZodString>;
1704
1985
  api: z.ZodDefault<z.ZodEnum<{
1986
+ "anthropic-messages": "anthropic-messages";
1705
1987
  chat: "chat";
1706
1988
  responses: "responses";
1707
1989
  }>>;
1990
+ anthropic: z.ZodOptional<z.ZodObject<{
1991
+ identity: z.ZodOptional<z.ZodObject<{
1992
+ accountUuid: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
1993
+ deviceId: z.ZodString;
1994
+ }, z.core.$strict>>;
1995
+ credentialBinding: z.ZodOptional<z.ZodObject<{
1996
+ connectionId: z.ZodString;
1997
+ credentialVersion: z.ZodNumber;
1998
+ }, z.core.$strict>>;
1999
+ auth: z.ZodDefault<z.ZodEnum<{
2000
+ "api-key": "api-key";
2001
+ oauth: "oauth";
2002
+ }>>;
2003
+ cacheTtl: z.ZodDefault<z.ZodEnum<{
2004
+ "1h": "1h";
2005
+ "5m": "5m";
2006
+ off: "off";
2007
+ }>>;
2008
+ maxOutputTokens: z.ZodDefault<z.ZodNumber>;
2009
+ streamIdleTimeoutMs: z.ZodDefault<z.ZodNumber>;
2010
+ }, z.core.$strip>>;
1708
2011
  wireProfile: z.ZodDefault<z.ZodEnum<{
1709
2012
  "azure-openai": "azure-openai";
1710
2013
  openai: "openai";
@@ -1722,6 +2025,7 @@ export declare const ModelCatalogDocument: z.ZodObject<{
1722
2025
  aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
1723
2026
  label: z.ZodOptional<z.ZodString>;
1724
2027
  shortLabel: z.ZodOptional<z.ZodString>;
2028
+ logoUrl: z.ZodOptional<z.ZodString>;
1725
2029
  contextWindowTokens: z.ZodOptional<z.ZodNumber>;
1726
2030
  effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
1727
2031
  autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
@@ -1882,12 +2186,334 @@ export declare const ModelCatalogDocument: z.ZodObject<{
1882
2186
  publicDefaultHeaderNames: z.ZodOptional<z.ZodNever>;
1883
2187
  publicDefaultQueryNames: z.ZodOptional<z.ZodNever>;
1884
2188
  }, z.core.$strict>>>;
2189
+ codexModels: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
2190
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
2191
+ label: z.ZodOptional<z.ZodString>;
2192
+ shortLabel: z.ZodOptional<z.ZodString>;
2193
+ logoUrl: z.ZodOptional<z.ZodString>;
2194
+ contextWindowTokens: z.ZodOptional<z.ZodNumber>;
2195
+ effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
2196
+ autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
2197
+ toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
2198
+ reasoningEffort: z.ZodOptional<z.ZodBoolean>;
2199
+ hostedWebSearch: z.ZodOptional<z.ZodBoolean>;
2200
+ credentialSource: z.ZodOptional<z.ZodNever>;
2201
+ billing: z.ZodOptional<z.ZodNever>;
2202
+ retired: z.ZodOptional<z.ZodBoolean>;
2203
+ id: z.ZodString;
2204
+ upstreamModelId: z.ZodString;
2205
+ capabilities: z.ZodObject<{
2206
+ reasoning: z.ZodObject<{
2207
+ upstream: z.ZodEnum<{
2208
+ supported: "supported";
2209
+ unknown: "unknown";
2210
+ unsupported: "unsupported";
2211
+ }>;
2212
+ runnable: z.ZodBoolean;
2213
+ efforts: z.ZodArray<z.ZodEnum<{
2214
+ high: "high";
2215
+ low: "low";
2216
+ max: "max";
2217
+ medium: "medium";
2218
+ minimal: "minimal";
2219
+ none: "none";
2220
+ xhigh: "xhigh";
2221
+ }>>;
2222
+ defaultEffort: z.ZodNullable<z.ZodEnum<{
2223
+ high: "high";
2224
+ low: "low";
2225
+ max: "max";
2226
+ medium: "medium";
2227
+ minimal: "minimal";
2228
+ none: "none";
2229
+ xhigh: "xhigh";
2230
+ }>>;
2231
+ required: z.ZodBoolean;
2232
+ }, z.core.$strip>;
2233
+ functionCalling: z.ZodObject<{
2234
+ upstream: z.ZodEnum<{
2235
+ supported: "supported";
2236
+ unknown: "unknown";
2237
+ unsupported: "unsupported";
2238
+ }>;
2239
+ runnable: z.ZodBoolean;
2240
+ }, z.core.$strip>;
2241
+ structuredOutput: z.ZodObject<{
2242
+ upstream: z.ZodEnum<{
2243
+ supported: "supported";
2244
+ unknown: "unknown";
2245
+ unsupported: "unsupported";
2246
+ }>;
2247
+ runnable: z.ZodBoolean;
2248
+ }, z.core.$strip>;
2249
+ hostedTools: z.ZodObject<{
2250
+ webSearch: z.ZodObject<{
2251
+ upstream: z.ZodEnum<{
2252
+ supported: "supported";
2253
+ unknown: "unknown";
2254
+ unsupported: "unsupported";
2255
+ }>;
2256
+ runnable: z.ZodBoolean;
2257
+ }, z.core.$strip>;
2258
+ xSearch: z.ZodObject<{
2259
+ upstream: z.ZodEnum<{
2260
+ supported: "supported";
2261
+ unknown: "unknown";
2262
+ unsupported: "unsupported";
2263
+ }>;
2264
+ runnable: z.ZodBoolean;
2265
+ }, z.core.$strip>;
2266
+ codeExecution: z.ZodObject<{
2267
+ upstream: z.ZodEnum<{
2268
+ supported: "supported";
2269
+ unknown: "unknown";
2270
+ unsupported: "unsupported";
2271
+ }>;
2272
+ runnable: z.ZodBoolean;
2273
+ }, z.core.$strip>;
2274
+ imageGeneration: z.ZodDefault<z.ZodObject<{
2275
+ upstream: z.ZodEnum<{
2276
+ supported: "supported";
2277
+ unknown: "unknown";
2278
+ unsupported: "unsupported";
2279
+ }>;
2280
+ runnable: z.ZodBoolean;
2281
+ }, z.core.$strip>>;
2282
+ }, z.core.$strip>;
2283
+ inputModalities: z.ZodArray<z.ZodEnum<{
2284
+ audio: "audio";
2285
+ image: "image";
2286
+ text: "text";
2287
+ }>>;
2288
+ inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
2289
+ outputModalities: z.ZodArray<z.ZodEnum<{
2290
+ audio: "audio";
2291
+ image: "image";
2292
+ text: "text";
2293
+ }>>;
2294
+ transports: z.ZodObject<{
2295
+ sse: z.ZodObject<{
2296
+ upstream: z.ZodEnum<{
2297
+ supported: "supported";
2298
+ unknown: "unknown";
2299
+ unsupported: "unsupported";
2300
+ }>;
2301
+ runnable: z.ZodBoolean;
2302
+ }, z.core.$strip>;
2303
+ responsesWebSocket: z.ZodObject<{
2304
+ upstream: z.ZodEnum<{
2305
+ supported: "supported";
2306
+ unknown: "unknown";
2307
+ unsupported: "unsupported";
2308
+ }>;
2309
+ runnable: z.ZodBoolean;
2310
+ }, z.core.$strip>;
2311
+ realtimeAudio: z.ZodObject<{
2312
+ upstream: z.ZodEnum<{
2313
+ supported: "supported";
2314
+ unknown: "unknown";
2315
+ unsupported: "unsupported";
2316
+ }>;
2317
+ runnable: z.ZodBoolean;
2318
+ }, z.core.$strip>;
2319
+ }, z.core.$strip>;
2320
+ promptCaching: z.ZodOptional<z.ZodObject<{
2321
+ upstream: z.ZodEnum<{
2322
+ supported: "supported";
2323
+ unknown: "unknown";
2324
+ unsupported: "unsupported";
2325
+ }>;
2326
+ runnable: z.ZodBoolean;
2327
+ mode: z.ZodEnum<{
2328
+ automatic: "automatic";
2329
+ implicit: "implicit";
2330
+ none: "none";
2331
+ }>;
2332
+ }, z.core.$strip>>;
2333
+ latencyModes: z.ZodArray<z.ZodObject<{
2334
+ id: z.ZodEnum<{
2335
+ fast: "fast";
2336
+ priority: "priority";
2337
+ standard: "standard";
2338
+ }>;
2339
+ upstream: z.ZodEnum<{
2340
+ supported: "supported";
2341
+ unknown: "unknown";
2342
+ unsupported: "unsupported";
2343
+ }>;
2344
+ runnable: z.ZodBoolean;
2345
+ billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
2346
+ }, z.core.$strip>>;
2347
+ }, z.core.$strip>;
2348
+ pricing: z.ZodOptional<z.ZodNever>;
2349
+ }, z.core.$strict>, z.ZodTransform<{
2350
+ aliases?: string[] | undefined;
2351
+ label?: string | undefined;
2352
+ shortLabel?: string | undefined;
2353
+ logoUrl?: string | undefined;
2354
+ contextWindowTokens?: number | undefined;
2355
+ effectiveContextWindowTokens?: number | undefined;
2356
+ autoCompactTokenLimit?: number | undefined;
2357
+ toolOutputTruncationTokens?: number | undefined;
2358
+ reasoningEffort?: boolean | undefined;
2359
+ hostedWebSearch?: boolean | undefined;
2360
+ credentialSource?: undefined;
2361
+ billing?: undefined;
2362
+ retired?: boolean | undefined;
2363
+ id: string;
2364
+ upstreamModelId: string;
2365
+ pricing?: undefined;
2366
+ capabilities: {
2367
+ reasoning: {
2368
+ upstream: "supported" | "unknown" | "unsupported";
2369
+ runnable: boolean;
2370
+ efforts: ("high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh")[];
2371
+ defaultEffort: "high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh" | null;
2372
+ required: boolean;
2373
+ };
2374
+ functionCalling: {
2375
+ upstream: "supported" | "unknown" | "unsupported";
2376
+ runnable: boolean;
2377
+ };
2378
+ structuredOutput: {
2379
+ upstream: "supported" | "unknown" | "unsupported";
2380
+ runnable: boolean;
2381
+ };
2382
+ hostedTools: {
2383
+ webSearch: {
2384
+ upstream: "supported" | "unknown" | "unsupported";
2385
+ runnable: boolean;
2386
+ };
2387
+ xSearch: {
2388
+ upstream: "supported" | "unknown" | "unsupported";
2389
+ runnable: boolean;
2390
+ };
2391
+ codeExecution: {
2392
+ upstream: "supported" | "unknown" | "unsupported";
2393
+ runnable: boolean;
2394
+ };
2395
+ imageGeneration: {
2396
+ upstream: "supported" | "unknown" | "unsupported";
2397
+ runnable: boolean;
2398
+ };
2399
+ };
2400
+ inputModalities: ("audio" | "image" | "text")[];
2401
+ inputFileMediaTypes: string[];
2402
+ outputModalities: ("audio" | "image" | "text")[];
2403
+ transports: {
2404
+ sse: {
2405
+ upstream: "supported" | "unknown" | "unsupported";
2406
+ runnable: boolean;
2407
+ };
2408
+ responsesWebSocket: {
2409
+ upstream: "supported" | "unknown" | "unsupported";
2410
+ runnable: boolean;
2411
+ };
2412
+ realtimeAudio: {
2413
+ upstream: "supported" | "unknown" | "unsupported";
2414
+ runnable: boolean;
2415
+ };
2416
+ };
2417
+ promptCaching?: {
2418
+ upstream: "supported" | "unknown" | "unsupported";
2419
+ runnable: boolean;
2420
+ mode: "automatic" | "implicit" | "none";
2421
+ } | undefined;
2422
+ latencyModes: {
2423
+ id: "fast" | "priority" | "standard";
2424
+ upstream: "supported" | "unknown" | "unsupported";
2425
+ runnable: boolean;
2426
+ billingMultiplierBps?: number | undefined;
2427
+ }[];
2428
+ };
2429
+ }, {
2430
+ aliases?: string[] | undefined;
2431
+ label?: string | undefined;
2432
+ shortLabel?: string | undefined;
2433
+ logoUrl?: string | undefined;
2434
+ contextWindowTokens?: number | undefined;
2435
+ effectiveContextWindowTokens?: number | undefined;
2436
+ autoCompactTokenLimit?: number | undefined;
2437
+ toolOutputTruncationTokens?: number | undefined;
2438
+ reasoningEffort?: boolean | undefined;
2439
+ hostedWebSearch?: boolean | undefined;
2440
+ credentialSource?: undefined;
2441
+ billing?: undefined;
2442
+ retired?: boolean | undefined;
2443
+ id: string;
2444
+ upstreamModelId: string;
2445
+ capabilities: {
2446
+ reasoning: {
2447
+ upstream: "supported" | "unknown" | "unsupported";
2448
+ runnable: boolean;
2449
+ efforts: ("high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh")[];
2450
+ defaultEffort: "high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh" | null;
2451
+ required: boolean;
2452
+ };
2453
+ functionCalling: {
2454
+ upstream: "supported" | "unknown" | "unsupported";
2455
+ runnable: boolean;
2456
+ };
2457
+ structuredOutput: {
2458
+ upstream: "supported" | "unknown" | "unsupported";
2459
+ runnable: boolean;
2460
+ };
2461
+ hostedTools: {
2462
+ webSearch: {
2463
+ upstream: "supported" | "unknown" | "unsupported";
2464
+ runnable: boolean;
2465
+ };
2466
+ xSearch: {
2467
+ upstream: "supported" | "unknown" | "unsupported";
2468
+ runnable: boolean;
2469
+ };
2470
+ codeExecution: {
2471
+ upstream: "supported" | "unknown" | "unsupported";
2472
+ runnable: boolean;
2473
+ };
2474
+ imageGeneration: {
2475
+ upstream: "supported" | "unknown" | "unsupported";
2476
+ runnable: boolean;
2477
+ };
2478
+ };
2479
+ inputModalities: ("audio" | "image" | "text")[];
2480
+ inputFileMediaTypes: string[];
2481
+ outputModalities: ("audio" | "image" | "text")[];
2482
+ transports: {
2483
+ sse: {
2484
+ upstream: "supported" | "unknown" | "unsupported";
2485
+ runnable: boolean;
2486
+ };
2487
+ responsesWebSocket: {
2488
+ upstream: "supported" | "unknown" | "unsupported";
2489
+ runnable: boolean;
2490
+ };
2491
+ realtimeAudio: {
2492
+ upstream: "supported" | "unknown" | "unsupported";
2493
+ runnable: boolean;
2494
+ };
2495
+ };
2496
+ promptCaching?: {
2497
+ upstream: "supported" | "unknown" | "unsupported";
2498
+ runnable: boolean;
2499
+ mode: "automatic" | "implicit" | "none";
2500
+ } | undefined;
2501
+ latencyModes: {
2502
+ id: "fast" | "priority" | "standard";
2503
+ upstream: "supported" | "unknown" | "unsupported";
2504
+ runnable: boolean;
2505
+ billingMultiplierBps?: number | undefined;
2506
+ }[];
2507
+ };
2508
+ pricing?: undefined;
2509
+ }>>>>;
1885
2510
  gatewayModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
1886
2511
  productId: z.ZodString;
1887
2512
  workspaceProductId: z.ZodString;
1888
2513
  upstreamModelId: z.ZodString;
1889
2514
  label: z.ZodString;
1890
2515
  shortLabel: z.ZodOptional<z.ZodString>;
2516
+ logoUrl: z.ZodOptional<z.ZodString>;
1891
2517
  providers: z.ZodArray<z.ZodString>;
1892
2518
  implicitCaching: z.ZodDefault<z.ZodBoolean>;
1893
2519
  vision: z.ZodDefault<z.ZodBoolean>;
@@ -1904,6 +2530,7 @@ export declare const ModelCatalogDocument: z.ZodObject<{
1904
2530
  upstreamModelId: z.ZodString;
1905
2531
  label: z.ZodString;
1906
2532
  shortLabel: z.ZodOptional<z.ZodString>;
2533
+ logoUrl: z.ZodOptional<z.ZodString>;
1907
2534
  aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
1908
2535
  capabilities: z.ZodObject<{
1909
2536
  reasoning: z.ZodObject<{
@@ -2085,6 +2712,7 @@ export type IntegrationOAuthClientConfig = z.infer<typeof IntegrationOAuthClient
2085
2712
  * replacement.
2086
2713
  */
2087
2714
  export interface ResolvedModelProvider {
2715
+ anthropic?: z.infer<typeof AnthropicProviderOptions> | undefined;
2088
2716
  id: string;
2089
2717
  label: string;
2090
2718
  kind: RegistryProviderKind | "openrouter-managed";
@@ -2108,6 +2736,8 @@ export interface ConfiguredModel {
2108
2736
  label: string;
2109
2737
  /** Optional curated compact label for dense UI (e.g. mobile composer). */
2110
2738
  shortLabel?: string | undefined;
2739
+ /** Optional HTTPS maker logo; display metadata does not change execution identity. */
2740
+ logoUrl?: string | undefined;
2111
2741
  providerId: string;
2112
2742
  providerLabel: string;
2113
2743
  api: ModelProviderApi;
@@ -2134,6 +2764,20 @@ export interface ConfiguredModel {
2134
2764
  reasoningEffort: boolean;
2135
2765
  hostedWebSearch: boolean;
2136
2766
  }
2767
+ /**
2768
+ * Whether a resolved route is the deployment-funded OpenRouter free tier: the
2769
+ * managed OpenRouter provider, which sends every workspace's requests with the
2770
+ * deployment's one OpenRouter key, serving an upstream `:free` variant (the
2771
+ * curated catalog admits nothing else). OpenRouter limits free-variant
2772
+ * requests per account per minute and per day, so each request on this route
2773
+ * spends quota that every turn on the deployment shares. A workspace or
2774
+ * organization OpenRouter connection uses its own account and is not this
2775
+ * route.
2776
+ */
2777
+ export declare function isManagedOpenRouterFreeRoute(route: {
2778
+ provider: Pick<ResolvedModelProvider, "kind">;
2779
+ configured: Pick<ConfiguredModel, "upstreamModelId">;
2780
+ }): boolean;
2137
2781
  export declare const VERCEL_AI_GATEWAY_BASE_URL: "https://ai-gateway.vercel.sh/v1";
2138
2782
  export declare const VERCEL_AI_GATEWAY_AI_SDK_BASE_URL: "https://ai-gateway.vercel.sh/v4/ai";
2139
2783
  export declare const VERCEL_AI_GATEWAY_CONNECTION_DOMAIN: "ai-gateway.vercel.sh";
@@ -2218,6 +2862,8 @@ export declare function configuredOpenRouterOrganizationProductModelIds(settings
2218
2862
  * llm-prices.com as a ground-truth canary; it does not generate this table.
2219
2863
  */
2220
2864
  export declare const defaultModelPricing: Record<string, ModelPricingScheduleV1>;
2865
+ /** Reviewed comparison rates only; never debit or execution-definition defaults. */
2866
+ export declare const reviewedModelListPricing: Record<string, ModelPricingScheduleV1>;
2221
2867
  export type SandboxRequiredEnv = {
2222
2868
  field: keyof Settings;
2223
2869
  env: string;
@@ -2287,6 +2933,17 @@ export declare function collectSandboxEnvironment(settings: Settings, source?: N
2287
2933
  */
2288
2934
  export declare function resolveProviderApiKey(provider: Pick<RegistryProvider, "apiKey" | "apiKeyEnv">, source?: NodeJS.ProcessEnv): string | undefined;
2289
2935
  export declare function gatewayRequestPolicyForUpstreamModel(upstreamModelId: string, models?: readonly GatewayCatalogModel[]): ConfiguredModel["requestPolicy"];
2936
+ /** Customer-owned OpenAI/Azure routes, bound to immutable connection identity. */
2937
+ export declare function withDirectModelProviders(settings: Settings, connections: readonly {
2938
+ id: string;
2939
+ version: number;
2940
+ subjectId: string | null;
2941
+ kind: string;
2942
+ status: string;
2943
+ providerDomain: string;
2944
+ metadata: Record<string, unknown>;
2945
+ apiKey?: string;
2946
+ }[]): Settings;
2290
2947
  /** Static catalog overlay; it contains no concrete workspace credential. */
2291
2948
  export declare function withWorkspaceGatewayCatalogProvider(settings: Settings, customModels?: readonly {
2292
2949
  upstreamModelId: string;
@@ -2348,6 +3005,13 @@ export declare function serviceTierForLatencyMode(providerId: string, latencyMod
2348
3005
  /** True when the response tier fulfills a non-standard Fast/priority request. */
2349
3006
  export declare function responseSatisfiesLatencyMode(requested: LatencyMode, responseServiceTier: string | null | undefined): boolean;
2350
3007
  export declare function runnableLatencyModesForModel(settings: Settings, modelId: string): LatencyMode[];
3008
+ export declare class UnsupportedLatencyModeError extends Error {
3009
+ readonly modelId: string;
3010
+ readonly latencyMode: LatencyMode;
3011
+ readonly allowedLatencyModes: readonly LatencyMode[];
3012
+ readonly code = "UNSUPPORTED_LATENCY_MODE";
3013
+ constructor(modelId: string, latencyMode: LatencyMode, allowedLatencyModes: readonly LatencyMode[]);
3014
+ }
2351
3015
  export declare function modelCostClassForConfiguredModel(_settings: Settings, model: Pick<ConfiguredModel, "cost">): ConfiguredModelCostClass;
2352
3016
  /**
2353
3017
  * The built-in provider's stable id: "openai" on the OpenAI platform, "azure"
@@ -2372,6 +3036,8 @@ export declare function configuredProviders(settings: Settings, source?: NodeJS.
2372
3036
  * select, lease, refresh, or expose a concrete credential; those runtime
2373
3037
  * operations remain owned by the credential allocator.
2374
3038
  */
3039
+ /** Exact upstream slugs of the active Codex catalog (or the built-in fallback list). */
3040
+ export declare function codexUpstreamModelSlugs(settings: Settings): string[];
2375
3041
  export declare function withCodexCatalogProvider(settings: Settings): Settings;
2376
3042
  /**
2377
3043
  * Static SuperGrok product catalogue, matching the Codex subscription seam.
@@ -2412,6 +3078,14 @@ export declare function canonicalizeConfiguredModelId(settings: Settings, modelI
2412
3078
  * openai allow-list, then registry ids.
2413
3079
  */
2414
3080
  export declare function configuredAllowedModels(settings: Settings): string[];
3081
+ /** Retirement is selection metadata, never provider authority or executable identity. */
3082
+ export declare function isModelAvailableForNewSelection(settings: Settings, modelId: string): boolean;
3083
+ /** Called only with the durable policy installed for a claimed accepted attempt. */
3084
+ export declare function settingsForAcceptedSubscriptionTurn(settings: Settings, policy: TurnExecutionPolicyV1, expected: {
3085
+ modelId: string;
3086
+ reasoningEffort: Settings["openaiReasoningEffort"];
3087
+ latencyMode?: LatencyMode;
3088
+ }): Settings;
2415
3089
  /**
2416
3090
  * Resolve a model string to the provider that serves it and its configured
2417
3091
  * shape. Returns undefined when the id is not exposed (built-in allow-list nor
@@ -2439,16 +3113,29 @@ export type ResolveTurnExecutionPolicyV1Input = {
2439
3113
  * callers must keep their live credential/readiness gate authoritative.
2440
3114
  */
2441
3115
  export declare function resolveModelProviderForTurn(settings: Settings, modelId: string): ReturnType<typeof resolveModelProvider>;
3116
+ /**
3117
+ * The requested model cannot start new work: it is retired from new selection
3118
+ * or absent from the configured catalog. Callers that own a durable refusal
3119
+ * (for example a scheduled occurrence) record it instead of failing blindly.
3120
+ */
3121
+ export declare class TurnExecutionPolicyModelUnavailableError extends Error {
3122
+ constructor(message: string);
3123
+ }
2442
3124
  /**
2443
3125
  * Build a trusted, secret-safe execution policy from the normalized catalog.
2444
3126
  * The Codex overlay here contains static product/provider identity only; it
2445
3127
  * neither proves readiness nor chooses, decrypts, leases, or exposes an account.
2446
3128
  */
2447
3129
  export declare function resolveTurnExecutionPolicyV1(settings: Settings, input: ResolveTurnExecutionPolicyV1Input): TurnExecutionPolicyV1;
3130
+ /** Explicit accepted execution identity matches, but its definition digest differs. */
3131
+ export declare class TurnExecutionPolicyDefinitionMismatchError extends Error {
3132
+ readonly code = "turn_execution_policy_definition_mismatch";
3133
+ constructor();
3134
+ }
2448
3135
  /**
2449
3136
  * Parse-time validation lives in @opengeni/contracts; this verifier binds a
2450
3137
  * present snapshot to the current executable definition and exact turn row.
2451
- * Any deployment/provider drift fails before a provider or compaction call.
3138
+ * Non-additive executable drift fails before a provider or compaction call.
2452
3139
  */
2453
3140
  export declare function assertTurnExecutionPolicyMatchesConfigV1(settings: Settings, policy: TurnExecutionPolicyV1, expected: {
2454
3141
  modelId: string;
@@ -2466,6 +3153,13 @@ export declare function assertTurnExecutionPolicyMatchesConfigV1(settings: Setti
2466
3153
  * complete schedule, and always replace the lower-precedence schedule.
2467
3154
  */
2468
3155
  export declare function configuredModelPricingSchedules(settings: Settings): Record<string, ModelPricingScheduleV1>;
3156
+ /**
3157
+ * Insights list-price metadata, including reviewed namespaced provider routes.
3158
+ * Kept separate from debit/catalog pricing: adding a comparison must not change
3159
+ * an accepted turn's frozen execution-definition hash or payer classification.
3160
+ * Inline registry and explicit product-ID prices always win over projections.
3161
+ */
3162
+ export declare function configuredModelListPricingSchedules(settings: Settings): Record<string, ModelPricingScheduleV1>;
2469
3163
  /** Legacy flat projection: returns the default/below-threshold price. */
2470
3164
  export declare function configuredModelPricing(settings: Settings): Record<string, ModelPricing>;
2471
3165
  /** Select the per-provider-request price at an exact input-token threshold. */
@@ -2489,6 +3183,29 @@ export declare function calculateModelUsageCostMicros(settings: Settings, model:
2489
3183
  export declare function calculateModelUsageCostBreakdown(settings: Settings, model: string, usage: ModelUsageInput, options?: {
2490
3184
  latencyMode?: LatencyMode;
2491
3185
  }): ModelUsageCostBreakdown;
3186
+ /** Provider-list/equivalent-credit comparison only; never debit authority. */
3187
+ export declare function calculateModelListUsageCostBreakdown(settings: Settings, model: string, usage: ModelUsageInput, options?: {
3188
+ latencyMode?: LatencyMode;
3189
+ }): ModelUsageCostBreakdown;
3190
+ /**
3191
+ * Forward-only list comparison snapshot for the model-call fact writer.
3192
+ * Callers must establish request price provenance (including geography/service
3193
+ * tier) and retain per-request counters. Unknown counters/TTL/modifiers yield
3194
+ * no class split, not invented zeros. Historical facts must not use this helper.
3195
+ * Native Claude details preserve cache_write_tokens_5m and cache_write_tokens_1h.
3196
+ */
3197
+ export declare function calculateModelListUsageCostSnapshot(settings: Settings, model: string, usage: ModelUsageInput, options?: {
3198
+ latencyMode?: LatencyMode;
3199
+ priceContextKnown?: boolean;
3200
+ }): ModelListUsageCostSnapshot;
3201
+ /**
3202
+ * Approximate class attribution of a previously recorded upstream list total.
3203
+ * Current reviewed rates are weights only: this never recomputes that total,
3204
+ * credits, or charges. Missing class counters/rates remain unknown. Historical
3205
+ * cache writes use the schedule's single TTL rate, not an exact TTL assertion.
3206
+ * Reasoning is already included in outputTokens and is never added again.
3207
+ */
3208
+ export declare function allocateRecordedModelListCostByClass(settings: Settings, model: string, usage: ModelUsageInput, recordedProviderCostMicros: number | null | undefined): ModelRecordedListCostAllocation;
2492
3209
  /**
2493
3210
  * Convert AI Gateway's exact USD inference cost to OpenGeni credit micros and
2494
3211
  * apply the configured model margin. Decimal arithmetic is integer-only so a
@@ -2616,6 +3333,7 @@ export declare function applyGitAuthPointerEnvironment(environment: Record<strin
2616
3333
  email: string;
2617
3334
  } | null): Record<string, string>;
2618
3335
  export type StartupRetryOptions = {
3336
+ shouldRetry?: (error: unknown) => boolean;
2619
3337
  attempts?: number;
2620
3338
  initialDelayMs?: number;
2621
3339
  maxDelayMs?: number;
@@ -2627,7 +3345,7 @@ export type StartupRetryOptions = {
2627
3345
  error: unknown;
2628
3346
  }) => void;
2629
3347
  };
2630
- export declare function startupRetryOptions(settings: Settings): Required<Omit<StartupRetryOptions, "onRetry">>;
3348
+ export declare function startupRetryOptions(settings: Settings): Required<Omit<StartupRetryOptions, "onRetry" | "shouldRetry">>;
2631
3349
  export declare function retryStartupDependency<T>(label: string, operation: () => Promise<T>, options?: StartupRetryOptions): Promise<T>;
2632
3350
  export declare function sandboxEnvironmentVariableNames(settings: Settings): string[];
2633
3351
  export declare function sandboxLifecycleHookIds(settings: Settings): string[];
@@ -2676,6 +3394,31 @@ export declare function firstPartyMcpInternalBaseUrl(settings: Settings): string
2676
3394
  export declare function firstPartyMcpWorkspaceUrl(settings: Settings, workspaceId: string): string;
2677
3395
  export declare function firstPartyMcpInternalWorkspaceUrl(settings: Settings, workspaceId: string): string;
2678
3396
  export declare function codemodeWorkspaceUrl(settings: Settings, workspaceId: string): string;
3397
+ export type TrustedProxyCidr = {
3398
+ address: string;
3399
+ prefix: number;
3400
+ family: "ipv4" | "ipv6";
3401
+ };
3402
+ /**
3403
+ * Parse `OPENGENI_API_TRUSTED_PROXY_CIDRS`: comma-separated IPv4/IPv6 CIDRs or
3404
+ * single addresses. Throws on any malformed entry so a typo can never widen or
3405
+ * silently disable the trusted proxy set.
3406
+ */
3407
+ export declare function trustedProxyCidrEntries(raw: string): TrustedProxyCidr[];
3408
+ /**
3409
+ * Parse `OPENGENI_LOCAL_ALLOWED_ORIGINS`: comma-separated exact browser origins
3410
+ * (`http(s)://host[:port]`, no path, query, credentials, or wildcard). Throws on
3411
+ * any malformed entry so a typo can never widen or silently disable the local
3412
+ * browser boundary.
3413
+ */
3414
+ export declare function localAllowedOriginEntries(raw: string | undefined): string[];
3415
+ /**
3416
+ * Local development only: whether a normalized API path is one a sandbox calls
3417
+ * (Codemode, first-party MCP, and the personal Git broker). The Linux Docker
3418
+ * sandbox route relays only these, and the local API serves only these on the
3419
+ * addresses that only sandboxes use (see `apps/api/src/http/local-browser-boundary.ts`).
3420
+ */
3421
+ export declare function localSandboxApiRouteAllowed(pathname: string): boolean;
2679
3422
  /** Validate one fully resolved, secret-bearing executable catalog. */
2680
3423
  export declare function validateModelCatalogSettings(settings: Settings, source?: NodeJS.ProcessEnv): ConfiguredModel[];
2681
3424
  /**
@@ -2740,4 +3483,32 @@ export interface NatsControlPlaneAuth {
2740
3483
  user: string;
2741
3484
  password: string;
2742
3485
  }
2743
- export declare function resolveNatsControlPlaneAuth(settings: Settings): NatsControlPlaneAuth | null;
3486
+ export declare function resolveNatsControlPlaneAuth(settings: Pick<Settings, "selfhostedNatsControlUser" | "selfhostedNatsControlPassword">): NatsControlPlaneAuth | null;
3487
+ /** Image references a workspace may select as its default sandbox image. */
3488
+ export declare function sandboxImageAllowlist(settings: Pick<Settings, "sandboxImageAllowlist">): string[];
3489
+ /** Native Claude connections reuse the encrypted workspace and organization boundaries. */
3490
+ export declare const CLAUDE_CONNECTION_KINDS: readonly ["anthropic", "claude_subscription"];
3491
+ export type ClaudeConnectionKind = (typeof CLAUDE_CONNECTION_KINDS)[number];
3492
+ export declare function claudeNativeModelProfile(upstreamModelId: string): Readonly<{
3493
+ efforts: readonly ReasoningEffort[];
3494
+ defaultEffort: ReasoningEffort | null;
3495
+ contextWindowTokens: number;
3496
+ maxOutputTokens: number;
3497
+ }> | undefined;
3498
+ export declare function claudeProviderId(kind: ClaudeConnectionKind, scope?: "workspace" | "organization"): string;
3499
+ export type ClaudeConnectionCatalog = Partial<Record<ClaudeConnectionKind, {
3500
+ active?: boolean;
3501
+ models: readonly {
3502
+ upstreamModelId: string;
3503
+ label?: string | null;
3504
+ }[];
3505
+ }>>;
3506
+ export declare function withClaudeConnectionCatalog(settings: Settings, connections: ClaudeConnectionCatalog, scope?: "workspace" | "organization"): Settings;
3507
+ export declare function withClaudeConnectionCredential(settings: Settings, kind: ClaudeConnectionKind, credential: string, scope?: "workspace" | "organization", credentialBinding?: {
3508
+ connectionId: string;
3509
+ credentialVersion: number;
3510
+ }): Settings;
3511
+ export * from "./claude-subscription-usage.js";
3512
+ export * from "./claude-subscription-oauth.js";
3513
+ export * from "./subscription-account-selection.js";
3514
+ export * from "./claude-subscription-capacity.js";