@opengeni/config 1.0.4 → 1.1.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,13 @@
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
+ import { type AgentConfigDeploymentLimits, Entitlements, LatencyMode, ReasoningEffort, SandboxBackend, StaticUsageLimits, TurnExecutionPolicyV1, type TurnExecutionLatencyModeSourceV1, type TurnExecutionModelSourceV1, type TurnExecutionReasoningSourceV1, type VideoGenerationResolution, type FirstPartyMcpToolName as FirstPartyMcpToolNameType } from "@opengeni/contracts";
3
+ import type { CodeSearchDeploymentPolicy } from "@opengeni/contracts/code-search";
2
4
  export { XAI_SUBSCRIPTION_MODEL_ID_PREFIX } from "@opengeni/xai-subscription";
3
5
  import { z } from "zod";
4
6
  export declare const DEFAULT_OPENROUTER_MODEL_ID: "openrouter/nvidia/nemotron-3-super-120b-a12b:free";
5
7
  export declare const DEFAULT_MODEL_COST_POLICY_JSON: string;
6
8
  export declare const SANDBOX_ARCHIVE_CAPTURE_MAX_TIMEOUT_MS: number;
7
9
  export declare const SANDBOX_ARCHIVE_CAPTURE_SETTLEMENT_GRACE_MS = 10000;
10
+ export declare const SANDBOX_DEADLINE_COMMAND_STOP_GRACE_MS = 120000;
8
11
  export declare const SANDBOX_SNAPSHOT_MAX_TIMEOUT_MS: number;
9
12
  export declare const GOOGLE_DRIVE_PROVIDER_REQUEST_TIMEOUT_MAX_MS = 60000;
10
13
  export declare const GOOGLE_DRIVE_PROVIDER_RETRY_DELAY_MAX_MS = 60000;
@@ -28,8 +31,9 @@ export declare const sandboxPreparationProfiles: Record<string, {
28
31
  export declare const AGENT_INSTRUCTIONS_CORE_PLACEHOLDER = "{{core}}";
29
32
  /**
30
33
  * 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.
34
+ * opinion (the white-labellable surface): the general-assistant identity line,
35
+ * the framing/opinion lines, and the mount-path facts. Domain-specific tooling
36
+ * guidance (for example Terraform or Checkov) belongs in opt-in Skills.
33
37
  *
34
38
  * The CORE that MUST survive any override — the goal-loop ownership line (which
35
39
  * names the opengeni__goal_* tools) and the dynamic workspace-environment block
@@ -45,6 +49,14 @@ export declare const AGENT_INSTRUCTIONS_CORE_PLACEHOLDER = "{{core}}";
45
49
  export declare const DEFAULT_AGENT_INSTRUCTIONS: string;
46
50
  export declare const McpServerConnectionRefSchema: z.ZodObject<{
47
51
  connectionId: z.ZodOptional<z.ZodString>;
52
+ accountSelection: z.ZodOptional<z.ZodLiteral<"all_eligible">>;
53
+ authoritySource: z.ZodOptional<z.ZodLiteral<"host">>;
54
+ hostBinding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
55
+ bindingId: z.ZodString;
56
+ generation: z.ZodNumber;
57
+ }, z.core.$strict>, z.ZodObject<{
58
+ selection: z.ZodLiteral<"accepted_turn">;
59
+ }, z.core.$strict>]>>;
48
60
  provider: z.ZodOptional<z.ZodString>;
49
61
  providerDomain: z.ZodString;
50
62
  kind: z.ZodOptional<z.ZodEnum<{
@@ -59,21 +71,25 @@ export declare const McpServerConnectionRefSchema: z.ZodObject<{
59
71
  id: z.ZodString;
60
72
  kind: z.ZodLiteral<"repository">;
61
73
  }, z.core.$strict>>>;
62
- authoritySource: z.ZodOptional<z.ZodLiteral<"host">>;
63
74
  subjectScope: z.ZodOptional<z.ZodEnum<{
64
75
  subject: "subject";
65
76
  workspace: "workspace";
66
77
  }>>;
67
78
  }, z.core.$strict>;
68
79
  export type McpServerConnectionRef = z.infer<typeof McpServerConnectionRefSchema>;
80
+ /** Operator-owned protocol binding. Tool annotations cannot establish recovery. */
81
+ export declare const McpOperationRecoverySchema: z.ZodRecord<z.ZodString, z.ZodObject<{
82
+ observerTool: z.ZodString;
83
+ }, z.core.$strict>>;
69
84
  /** Public, digest-pinned desktop image used by Modal unless the operator overrides it. */
70
- export declare const DEFAULT_MODAL_IMAGE_REF = "opengenipublicneuacr.azurecr.io/opengeni-desktop@sha256:c3bd17b8841de1bff9bb2777aad422cf8c75de78e2c30f9ac81d0cd6810a1b78";
85
+ export declare const DEFAULT_MODAL_IMAGE_REF = "opengenipublicneuacr.azurecr.io/opengeni-desktop@sha256:554d5b324a580071dd669e7c1190931e498eb1b397412a27c7de84a430ef393a";
71
86
  declare const SettingsSchema: z.ZodObject<{
72
87
  serviceName: z.ZodDefault<z.ZodString>;
73
88
  environment: z.ZodDefault<z.ZodString>;
74
89
  deploymentRevision: z.ZodDefault<z.ZodString>;
75
90
  serverVersion: z.ZodOptional<z.ZodString>;
76
91
  databaseUrl: z.ZodDefault<z.ZodString>;
92
+ apiDatabasePoolMax: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
77
93
  dbSchema: z.ZodDefault<z.ZodString>;
78
94
  rlsStrategy: z.ZodDefault<z.ZodEnum<{
79
95
  force: "force";
@@ -107,15 +123,22 @@ declare const SettingsSchema: z.ZodObject<{
107
123
  observabilityMetricsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
108
124
  observabilityOtlpEndpoint: z.ZodOptional<z.ZodString>;
109
125
  observabilityOtlpHeaders: z.ZodDefault<z.ZodString>;
126
+ observabilityDiagnosticsEndpoint: z.ZodOptional<z.ZodString>;
127
+ observabilityDiagnosticsHeaders: z.ZodDefault<z.ZodString>;
110
128
  analyticsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
111
129
  analyticsConsentRequired: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
112
130
  analyticsReoClientId: z.ZodOptional<z.ZodString>;
113
131
  analyticsPosthogProjectKey: z.ZodOptional<z.ZodString>;
114
132
  analyticsPosthogHost: z.ZodOptional<z.ZodString>;
115
133
  analyticsGa4MeasurementId: z.ZodOptional<z.ZodString>;
134
+ legalPrivacyPolicyUrl: z.ZodOptional<z.ZodString>;
135
+ legalTermsOfServiceUrl: z.ZodOptional<z.ZodString>;
136
+ supportEmail: z.ZodOptional<z.ZodString>;
116
137
  publicBaseUrl: z.ZodOptional<z.ZodString>;
138
+ documentationUrl: z.ZodPreprocess<z.ZodDefault<z.ZodNullable<z.ZodURL>>>;
117
139
  mcpOauthEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
118
- mcpOauthTrustedProxyHops: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
140
+ apiTrustedProxyHops: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
141
+ apiTrustedProxyCidrs: z.ZodDefault<z.ZodString>;
119
142
  webBaseUrl: z.ZodOptional<z.ZodString>;
120
143
  agentReleasesBaseUrl: z.ZodDefault<z.ZodString>;
121
144
  agentStableVersion: z.ZodDefault<z.ZodString>;
@@ -125,11 +148,11 @@ declare const SettingsSchema: z.ZodObject<{
125
148
  local: "local";
126
149
  managed: "managed";
127
150
  }>>;
128
- organizationTenancyCanonicalActivationEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
129
151
  billingMode: z.ZodDefault<z.ZodEnum<{
130
152
  disabled: "disabled";
131
153
  stripe: "stripe";
132
154
  }>>;
155
+ verifiedSignupTrialCreditsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
133
156
  entitlementsMode: z.ZodDefault<z.ZodEnum<{
134
157
  managed: "managed";
135
158
  none: "none";
@@ -140,6 +163,7 @@ declare const SettingsSchema: z.ZodObject<{
140
163
  none: "none";
141
164
  static: "static";
142
165
  }>>;
166
+ usageAllowancesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
143
167
  staticEntitlementsJson: z.ZodDefault<z.ZodString>;
144
168
  staticUsageLimitsJson: z.ZodDefault<z.ZodString>;
145
169
  delegationSecret: z.ZodOptional<z.ZodString>;
@@ -159,11 +183,15 @@ declare const SettingsSchema: z.ZodObject<{
159
183
  browser_auth: "browser_auth";
160
184
  browser_clipboard: "browser_clipboard";
161
185
  browser_debug: "browser_debug";
186
+ browser_download_save: "browser_download_save";
187
+ browser_downloads: "browser_downloads";
162
188
  browser_identity: "browser_identity";
163
189
  browser_lifecycle: "browser_lifecycle";
164
190
  browser_observe: "browser_observe";
165
191
  browser_open: "browser_open";
166
192
  browser_publish: "browser_publish";
193
+ browser_read: "browser_read";
194
+ browser_screenshot: "browser_screenshot";
167
195
  browser_tabs: "browser_tabs";
168
196
  capability_authorization_request: "capability_authorization_request";
169
197
  capability_catalog_search: "capability_catalog_search";
@@ -177,7 +205,9 @@ declare const SettingsSchema: z.ZodObject<{
177
205
  computer_observe: "computer_observe";
178
206
  computer_open: "computer_open";
179
207
  computer_targets: "computer_targets";
208
+ connected_machine_enroll_token: "connected_machine_enroll_token";
180
209
  connected_machine_remove: "connected_machine_remove";
210
+ custom_mcp_setup_request: "custom_mcp_setup_request";
181
211
  editable_artifact_apply: "editable_artifact_apply";
182
212
  editable_artifact_create: "editable_artifact_create";
183
213
  editable_artifact_export: "editable_artifact_export";
@@ -206,11 +236,21 @@ declare const SettingsSchema: z.ZodObject<{
206
236
  goal_resume: "goal_resume";
207
237
  goal_set: "goal_set";
208
238
  goal_update: "goal_update";
239
+ instruction_policy_get: "instruction_policy_get";
209
240
  instruction_policy_propose: "instruction_policy_propose";
241
+ instruction_policy_save: "instruction_policy_save";
210
242
  interaction_discover: "interaction_discover";
211
243
  interaction_request_human: "interaction_request_human";
244
+ knowledge_archive: "knowledge_archive";
245
+ knowledge_browse: "knowledge_browse";
212
246
  knowledge_correct: "knowledge_correct";
247
+ knowledge_get: "knowledge_get";
248
+ knowledge_prepare_save: "knowledge_prepare_save";
213
249
  knowledge_propose: "knowledge_propose";
250
+ knowledge_retain_file: "knowledge_retain_file";
251
+ knowledge_retain_message: "knowledge_retain_message";
252
+ knowledge_save: "knowledge_save";
253
+ knowledge_search: "knowledge_search";
214
254
  memory_correct: "memory_correct";
215
255
  memory_save: "memory_save";
216
256
  memory_search: "memory_search";
@@ -258,6 +298,7 @@ declare const SettingsSchema: z.ZodObject<{
258
298
  session_pause: "session_pause";
259
299
  session_resume: "session_resume";
260
300
  session_send_message: "session_send_message";
301
+ session_set_model: "session_set_model";
261
302
  session_set_project: "session_set_project";
262
303
  session_steer: "session_steer";
263
304
  session_wait: "session_wait";
@@ -272,8 +313,11 @@ declare const SettingsSchema: z.ZodObject<{
272
313
  slack_bot_list_files: "slack_bot_list_files";
273
314
  slack_bot_list_users: "slack_bot_list_users";
274
315
  slack_bot_post_message: "slack_bot_post_message";
316
+ slack_bot_prepare_message: "slack_bot_prepare_message";
275
317
  slack_bot_search: "slack_bot_search";
318
+ slack_bot_send_prepared_message: "slack_bot_send_prepared_message";
276
319
  slack_bot_thread_replies: "slack_bot_thread_replies";
320
+ slack_bot_upload_file: "slack_bot_upload_file";
277
321
  social_connections_list: "social_connections_list";
278
322
  social_daily_analysis_context: "social_daily_analysis_context";
279
323
  social_mentions_live: "social_mentions_live";
@@ -318,11 +362,15 @@ declare const SettingsSchema: z.ZodObject<{
318
362
  browser_auth: "browser_auth";
319
363
  browser_clipboard: "browser_clipboard";
320
364
  browser_debug: "browser_debug";
365
+ browser_download_save: "browser_download_save";
366
+ browser_downloads: "browser_downloads";
321
367
  browser_identity: "browser_identity";
322
368
  browser_lifecycle: "browser_lifecycle";
323
369
  browser_observe: "browser_observe";
324
370
  browser_open: "browser_open";
325
371
  browser_publish: "browser_publish";
372
+ browser_read: "browser_read";
373
+ browser_screenshot: "browser_screenshot";
326
374
  browser_tabs: "browser_tabs";
327
375
  capability_authorization_request: "capability_authorization_request";
328
376
  capability_catalog_search: "capability_catalog_search";
@@ -336,7 +384,9 @@ declare const SettingsSchema: z.ZodObject<{
336
384
  computer_observe: "computer_observe";
337
385
  computer_open: "computer_open";
338
386
  computer_targets: "computer_targets";
387
+ connected_machine_enroll_token: "connected_machine_enroll_token";
339
388
  connected_machine_remove: "connected_machine_remove";
389
+ custom_mcp_setup_request: "custom_mcp_setup_request";
340
390
  editable_artifact_apply: "editable_artifact_apply";
341
391
  editable_artifact_create: "editable_artifact_create";
342
392
  editable_artifact_export: "editable_artifact_export";
@@ -365,11 +415,21 @@ declare const SettingsSchema: z.ZodObject<{
365
415
  goal_resume: "goal_resume";
366
416
  goal_set: "goal_set";
367
417
  goal_update: "goal_update";
418
+ instruction_policy_get: "instruction_policy_get";
368
419
  instruction_policy_propose: "instruction_policy_propose";
420
+ instruction_policy_save: "instruction_policy_save";
369
421
  interaction_discover: "interaction_discover";
370
422
  interaction_request_human: "interaction_request_human";
423
+ knowledge_archive: "knowledge_archive";
424
+ knowledge_browse: "knowledge_browse";
371
425
  knowledge_correct: "knowledge_correct";
426
+ knowledge_get: "knowledge_get";
427
+ knowledge_prepare_save: "knowledge_prepare_save";
372
428
  knowledge_propose: "knowledge_propose";
429
+ knowledge_retain_file: "knowledge_retain_file";
430
+ knowledge_retain_message: "knowledge_retain_message";
431
+ knowledge_save: "knowledge_save";
432
+ knowledge_search: "knowledge_search";
373
433
  memory_correct: "memory_correct";
374
434
  memory_save: "memory_save";
375
435
  memory_search: "memory_search";
@@ -417,6 +477,7 @@ declare const SettingsSchema: z.ZodObject<{
417
477
  session_pause: "session_pause";
418
478
  session_resume: "session_resume";
419
479
  session_send_message: "session_send_message";
480
+ session_set_model: "session_set_model";
420
481
  session_set_project: "session_set_project";
421
482
  session_steer: "session_steer";
422
483
  session_wait: "session_wait";
@@ -431,8 +492,11 @@ declare const SettingsSchema: z.ZodObject<{
431
492
  slack_bot_list_files: "slack_bot_list_files";
432
493
  slack_bot_list_users: "slack_bot_list_users";
433
494
  slack_bot_post_message: "slack_bot_post_message";
495
+ slack_bot_prepare_message: "slack_bot_prepare_message";
434
496
  slack_bot_search: "slack_bot_search";
497
+ slack_bot_send_prepared_message: "slack_bot_send_prepared_message";
435
498
  slack_bot_thread_replies: "slack_bot_thread_replies";
499
+ slack_bot_upload_file: "slack_bot_upload_file";
436
500
  social_connections_list: "social_connections_list";
437
501
  social_daily_analysis_context: "social_daily_analysis_context";
438
502
  social_mentions_live: "social_mentions_live";
@@ -471,11 +535,17 @@ declare const SettingsSchema: z.ZodObject<{
471
535
  environmentsEncryptionKey: z.ZodOptional<z.ZodString>;
472
536
  integrationsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
473
537
  integrationsStateSecret: z.ZodOptional<z.ZodString>;
538
+ integrationsOauthShortStateEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
474
539
  integrationsAllowPrivateNetworkTargets: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
475
540
  integrationsOauthClientsJson: z.ZodDefault<z.ZodString>;
541
+ gmailWatchTopicName: z.ZodOptional<z.ZodString>;
476
542
  slackClientId: z.ZodOptional<z.ZodString>;
477
543
  slackClientSecret: z.ZodOptional<z.ZodString>;
478
544
  slackSigningSecret: z.ZodOptional<z.ZodString>;
545
+ slackAccessMode: z.ZodDefault<z.ZodEnum<{
546
+ full: "full";
547
+ limited: "limited";
548
+ }>>;
479
549
  slackBotDisplayName: z.ZodDefault<z.ZodEnum<{
480
550
  OpenGeni: "OpenGeni";
481
551
  "OpenGeni Staging": "OpenGeni Staging";
@@ -505,7 +575,6 @@ declare const SettingsSchema: z.ZodObject<{
505
575
  goalIdleBackoffMs: z.ZodDefault<z.ZodPreprocess<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>>;
506
576
  goalIdleBackoffMaxMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
507
577
  childLifecycleNoticesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
508
- hostMcpAuthoritySourceAdmissionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
509
578
  slackWorkspaceRoutingEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
510
579
  agentMaxModelCallsPerTurn: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
511
580
  contextWindowTokens: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -520,10 +589,12 @@ declare const SettingsSchema: z.ZodObject<{
520
589
  authAllowMetrics: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
521
590
  apiHost: z.ZodDefault<z.ZodString>;
522
591
  apiPort: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
592
+ apiMetricsPort: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
523
593
  workerHttpPort: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
524
594
  opengeniMcpInternalUrl: z.ZodOptional<z.ZodString>;
525
595
  opengeniMcpUrl: z.ZodOptional<z.ZodString>;
526
596
  corsAllowOriginRegex: z.ZodDefault<z.ZodString>;
597
+ localAllowedOrigins: z.ZodOptional<z.ZodString>;
527
598
  openaiProvider: z.ZodDefault<z.ZodEnum<{
528
599
  azure: "azure";
529
600
  openai: "openai";
@@ -573,9 +644,11 @@ declare const SettingsSchema: z.ZodObject<{
573
644
  openrouterApiKey: z.ZodOptional<z.ZodString>;
574
645
  resolvedGatewayModelsJson: z.ZodOptional<z.ZodString>;
575
646
  resolvedOpenRouterModelsJson: z.ZodOptional<z.ZodString>;
647
+ resolvedCodexModelsJson: z.ZodOptional<z.ZodString>;
576
648
  modelProvidersJson: z.ZodDefault<z.ZodString>;
577
649
  codexSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
578
650
  supergrokSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
651
+ claudeSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
579
652
  supergrokResponseStreamIdleTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
580
653
  codexConnectedAppsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
581
654
  codexProductSku: z.ZodOptional<z.ZodString>;
@@ -583,6 +656,7 @@ declare const SettingsSchema: z.ZodObject<{
583
656
  lazyToolSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
584
657
  codexFleetPolicyShadowEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
585
658
  codexRotationNearExhaustionPct: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
659
+ reasoningConfigurationUpdatesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
586
660
  openaiReasoningEffort: z.ZodDefault<z.ZodEnum<{
587
661
  high: "high";
588
662
  low: "low";
@@ -593,6 +667,16 @@ declare const SettingsSchema: z.ZodObject<{
593
667
  xhigh: "xhigh";
594
668
  }>>;
595
669
  openaiAllowedReasoningEfforts: z.ZodDefault<z.ZodString>;
670
+ creditsDefaultModel: z.ZodDefault<z.ZodString>;
671
+ creditsDefaultReasoningEffort: z.ZodDefault<z.ZodEnum<{
672
+ high: "high";
673
+ low: "low";
674
+ max: "max";
675
+ medium: "medium";
676
+ minimal: "minimal";
677
+ none: "none";
678
+ xhigh: "xhigh";
679
+ }>>;
596
680
  openaiResponsesTransport: z.ZodDefault<z.ZodEnum<{
597
681
  http: "http";
598
682
  websocket: "websocket";
@@ -604,6 +688,16 @@ declare const SettingsSchema: z.ZodObject<{
604
688
  openaiReasoningEncryptedContent: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
605
689
  openaiMaxRetries: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
606
690
  webSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
691
+ jevApiKey: z.ZodOptional<z.ZodString>;
692
+ jevBaseUrl: z.ZodDefault<z.ZodString>;
693
+ jevModel: z.ZodDefault<z.ZodString>;
694
+ jevRequestTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
695
+ codeSearchMode: z.ZodDefault<z.ZodEnum<{
696
+ default_on: "default_on";
697
+ experiment: "experiment";
698
+ off: "off";
699
+ opt_in: "opt_in";
700
+ }>>;
607
701
  agentInstructionsTemplate: z.ZodDefault<z.ZodString>;
608
702
  azureOpenaiBaseUrl: z.ZodOptional<z.ZodString>;
609
703
  azureOpenaiEndpoint: z.ZodOptional<z.ZodString>;
@@ -633,6 +727,7 @@ declare const SettingsSchema: z.ZodObject<{
633
727
  dockerWorkspaceBaseDir: z.ZodOptional<z.ZodString>;
634
728
  modalAppName: z.ZodDefault<z.ZodString>;
635
729
  modalImageRef: z.ZodOptional<z.ZodString>;
730
+ modalCommandSupervisionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
636
731
  modalImageId: z.ZodOptional<z.ZodString>;
637
732
  modalImageRegistrySecret: z.ZodOptional<z.ZodString>;
638
733
  modalTimeoutSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -697,6 +792,7 @@ declare const SettingsSchema: z.ZodObject<{
697
792
  blaxelTtl: z.ZodOptional<z.ZodString>;
698
793
  cloudflareWorkerUrl: z.ZodOptional<z.ZodString>;
699
794
  cloudflareApiKey: z.ZodOptional<z.ZodString>;
795
+ experimentalBrowserContextPoolEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
700
796
  browserbaseApiKey: z.ZodOptional<z.ZodString>;
701
797
  kernelApiKey: z.ZodOptional<z.ZodString>;
702
798
  kernelEndpoint: z.ZodOptional<z.ZodString>;
@@ -739,6 +835,7 @@ declare const SettingsSchema: z.ZodObject<{
739
835
  sandboxViewerHolderTtlMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
740
836
  sandboxInteractionHolderTtlMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
741
837
  sandboxIdleGraceMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
838
+ sandboxIdleCommandContainmentMs: z.ZodPipe<z.ZodOptional<z.ZodCoercedNumber<unknown>>, z.ZodTransform<number | undefined, number | undefined>>;
742
839
  sandboxSnapshotIntervalMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
743
840
  sandboxSnapshotTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
744
841
  sandboxDrainSnapshotTimeoutMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
@@ -750,9 +847,15 @@ declare const SettingsSchema: z.ZodObject<{
750
847
  workspaceControlLockTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
751
848
  rigSetupTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
752
849
  sandboxWarmRateMicrosPerSecondJson: z.ZodDefault<z.ZodString>;
850
+ sandboxWarmBillingMode: z.ZodDefault<z.ZodEnum<{
851
+ credits: "credits";
852
+ shadow: "shadow";
853
+ usage_only: "usage_only";
854
+ }>>;
753
855
  sandboxMaxWarmSecondsPerWorkspace: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
754
856
  sandboxPreparationProfiles: z.ZodDefault<z.ZodString>;
755
857
  sandboxEnvAllowlist: z.ZodDefault<z.ZodString>;
858
+ sandboxImageAllowlist: z.ZodDefault<z.ZodString>;
756
859
  objectStorageEndpoint: z.ZodOptional<z.ZodString>;
757
860
  objectStorageInternalEndpoint: z.ZodOptional<z.ZodString>;
758
861
  objectStorageSandboxEndpoint: z.ZodOptional<z.ZodString>;
@@ -787,6 +890,13 @@ declare const SettingsSchema: z.ZodObject<{
787
890
  documentEmbeddingDimensions: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
788
891
  documentEmbeddingApiKey: z.ZodOptional<z.ZodString>;
789
892
  documentEmbeddingBaseUrl: z.ZodOptional<z.ZodString>;
893
+ documentEmbeddingBillingMode: z.ZodDefault<z.ZodEnum<{
894
+ credits: "credits";
895
+ shadow: "shadow";
896
+ usage_only: "usage_only";
897
+ }>>;
898
+ documentEmbeddingCreditsActivatedAt: z.ZodOptional<z.ZodISODateTime>;
899
+ documentEmbeddingRateMicrosPerMillionBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
790
900
  documentCurationProvider: z.ZodDefault<z.ZodEnum<{
791
901
  heuristic: "heuristic";
792
902
  none: "none";
@@ -825,11 +935,13 @@ declare const SettingsSchema: z.ZodObject<{
825
935
  managedAuthGoogleClientSecret: z.ZodOptional<z.ZodString>;
826
936
  managedAuthGithubClientId: z.ZodOptional<z.ZodString>;
827
937
  managedAuthGithubClientSecret: z.ZodOptional<z.ZodString>;
938
+ allowedUserEmails: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodEmail, z.ZodTransform<string, string>>>>;
828
939
  managedAuthSessionSetMode: z.ZodDefault<z.ZodEnum<{
829
940
  broker: "broker";
830
941
  dual: "dual";
831
942
  legacy: "legacy";
832
943
  }>>;
944
+ managedAuthNewSignupsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
833
945
  organizationUserSetupEmailTokenTransport: z.ZodDefault<z.ZodEnum<{
834
946
  fragment: "fragment";
835
947
  query: "query";
@@ -852,6 +964,14 @@ declare const SettingsSchema: z.ZodObject<{
852
964
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
853
965
  connectionRef: z.ZodOptional<z.ZodObject<{
854
966
  connectionId: z.ZodOptional<z.ZodString>;
967
+ accountSelection: z.ZodOptional<z.ZodLiteral<"all_eligible">>;
968
+ authoritySource: z.ZodOptional<z.ZodLiteral<"host">>;
969
+ hostBinding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
970
+ bindingId: z.ZodString;
971
+ generation: z.ZodNumber;
972
+ }, z.core.$strict>, z.ZodObject<{
973
+ selection: z.ZodLiteral<"accepted_turn">;
974
+ }, z.core.$strict>]>>;
855
975
  provider: z.ZodOptional<z.ZodString>;
856
976
  providerDomain: z.ZodString;
857
977
  kind: z.ZodOptional<z.ZodEnum<{
@@ -866,15 +986,99 @@ declare const SettingsSchema: z.ZodObject<{
866
986
  id: z.ZodString;
867
987
  kind: z.ZodLiteral<"repository">;
868
988
  }, z.core.$strict>>>;
869
- authoritySource: z.ZodOptional<z.ZodLiteral<"host">>;
870
989
  subjectScope: z.ZodOptional<z.ZodEnum<{
871
990
  subject: "subject";
872
991
  workspace: "workspace";
873
992
  }>>;
874
993
  }, z.core.$strict>>;
994
+ operationRecovery: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
995
+ observerTool: z.ZodString;
996
+ }, z.core.$strict>>>;
875
997
  }, z.core.$strip>>>;
876
998
  }, z.core.$strip>;
877
999
  export type Settings = z.infer<typeof SettingsSchema>;
1000
+ declare const ArtifactOutboxSettingsSchema: z.ZodObject<{
1001
+ serviceName: z.ZodDefault<z.ZodString>;
1002
+ environment: z.ZodDefault<z.ZodString>;
1003
+ deploymentRevision: z.ZodDefault<z.ZodString>;
1004
+ dbSchema: z.ZodDefault<z.ZodString>;
1005
+ rlsStrategy: z.ZodDefault<z.ZodEnum<{
1006
+ force: "force";
1007
+ scoped: "scoped";
1008
+ }>>;
1009
+ observabilityStructuredLogs: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
1010
+ observabilityMetricsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
1011
+ observabilityOtlpEndpoint: z.ZodOptional<z.ZodString>;
1012
+ observabilityOtlpHeaders: z.ZodDefault<z.ZodString>;
1013
+ natsUrl: z.ZodDefault<z.ZodString>;
1014
+ selfhostedNatsControlUser: z.ZodOptional<z.ZodString>;
1015
+ selfhostedNatsControlPassword: z.ZodOptional<z.ZodString>;
1016
+ }, z.core.$strip>;
1017
+ declare const ObjectStorageSettingsSchema: z.ZodObject<{
1018
+ objectStorageEndpoint: z.ZodOptional<z.ZodString>;
1019
+ objectStorageInternalEndpoint: z.ZodOptional<z.ZodString>;
1020
+ objectStorageSandboxEndpoint: z.ZodOptional<z.ZodString>;
1021
+ objectStorageBackend: z.ZodDefault<z.ZodEnum<{
1022
+ "aws-s3": "aws-s3";
1023
+ "azure-blob": "azure-blob";
1024
+ gcs: "gcs";
1025
+ "s3-compatible": "s3-compatible";
1026
+ }>>;
1027
+ objectStorageBucket: z.ZodDefault<z.ZodString>;
1028
+ objectStorageRegion: z.ZodDefault<z.ZodString>;
1029
+ objectStorageAccessKeyId: z.ZodOptional<z.ZodString>;
1030
+ objectStorageSecretAccessKey: z.ZodOptional<z.ZodString>;
1031
+ objectStorageForcePathStyle: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
1032
+ objectStorageAzureConnectionString: z.ZodOptional<z.ZodString>;
1033
+ objectStorageAzureAccountName: z.ZodOptional<z.ZodString>;
1034
+ objectStorageAzureAccountKey: z.ZodOptional<z.ZodString>;
1035
+ objectStorageAzureEndpoint: z.ZodOptional<z.ZodString>;
1036
+ objectStorageGcsProjectId: z.ZodOptional<z.ZodString>;
1037
+ objectStorageGcsCredentialsJson: z.ZodOptional<z.ZodString>;
1038
+ objectStorageGcsKeyFilename: z.ZodOptional<z.ZodString>;
1039
+ objectStorageGcsApiEndpoint: z.ZodOptional<z.ZodString>;
1040
+ }, z.core.$strip>;
1041
+ declare const ArtifactMaterializerSettingsSchema: z.ZodObject<{
1042
+ serviceName: z.ZodDefault<z.ZodString>;
1043
+ environment: z.ZodDefault<z.ZodString>;
1044
+ deploymentRevision: z.ZodDefault<z.ZodString>;
1045
+ dbSchema: z.ZodDefault<z.ZodString>;
1046
+ rlsStrategy: z.ZodDefault<z.ZodEnum<{
1047
+ force: "force";
1048
+ scoped: "scoped";
1049
+ }>>;
1050
+ observabilityStructuredLogs: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
1051
+ observabilityMetricsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
1052
+ observabilityOtlpEndpoint: z.ZodOptional<z.ZodString>;
1053
+ observabilityOtlpHeaders: z.ZodDefault<z.ZodString>;
1054
+ objectStorageEndpoint: z.ZodOptional<z.ZodString>;
1055
+ objectStorageInternalEndpoint: z.ZodOptional<z.ZodString>;
1056
+ objectStorageSandboxEndpoint: z.ZodOptional<z.ZodString>;
1057
+ objectStorageBackend: z.ZodDefault<z.ZodEnum<{
1058
+ "aws-s3": "aws-s3";
1059
+ "azure-blob": "azure-blob";
1060
+ gcs: "gcs";
1061
+ "s3-compatible": "s3-compatible";
1062
+ }>>;
1063
+ objectStorageBucket: z.ZodDefault<z.ZodString>;
1064
+ objectStorageRegion: z.ZodDefault<z.ZodString>;
1065
+ objectStorageAccessKeyId: z.ZodOptional<z.ZodString>;
1066
+ objectStorageSecretAccessKey: z.ZodOptional<z.ZodString>;
1067
+ objectStorageForcePathStyle: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
1068
+ objectStorageAzureConnectionString: z.ZodOptional<z.ZodString>;
1069
+ objectStorageAzureAccountName: z.ZodOptional<z.ZodString>;
1070
+ objectStorageAzureAccountKey: z.ZodOptional<z.ZodString>;
1071
+ objectStorageAzureEndpoint: z.ZodOptional<z.ZodString>;
1072
+ objectStorageGcsProjectId: z.ZodOptional<z.ZodString>;
1073
+ objectStorageGcsCredentialsJson: z.ZodOptional<z.ZodString>;
1074
+ objectStorageGcsKeyFilename: z.ZodOptional<z.ZodString>;
1075
+ objectStorageGcsApiEndpoint: z.ZodOptional<z.ZodString>;
1076
+ }, z.core.$strip>;
1077
+ export type ArtifactOutboxSettings = z.infer<typeof ArtifactOutboxSettingsSchema>;
1078
+ export type ObjectStorageSettings = z.infer<typeof ObjectStorageSettingsSchema>;
1079
+ export type ArtifactMaterializerSettings = z.infer<typeof ArtifactMaterializerSettingsSchema>;
1080
+ export declare function getArtifactOutboxSettings(source?: NodeJS.ProcessEnv): ArtifactOutboxSettings;
1081
+ export declare function getArtifactMaterializerSettings(source?: NodeJS.ProcessEnv): ArtifactMaterializerSettings;
878
1082
  export type McpServerConfig = Settings["mcpServers"][number];
879
1083
  export type GoogleDriveProviderRetryOptions = {
880
1084
  requestTimeoutMs: number;
@@ -929,6 +1133,17 @@ export type VoiceInputProviderConfig = {
929
1133
  kind: "supergrok-subscription";
930
1134
  experimental: true;
931
1135
  };
1136
+ /** The deployment's Jev key, or undefined when it is missing or a placeholder. */
1137
+ export declare function usableJevApiKey(settings: Pick<Settings, "jevApiKey">): string | undefined;
1138
+ /** Deployment half of agent configuration: hard capability limits. */
1139
+ export declare function agentConfigDeploymentPolicy(settings: Pick<Settings, "webSearchEnabled" | "defaultFirstPartyMcpTools" | "allowedFirstPartyMcpTools">): AgentConfigDeploymentLimits;
1140
+ /**
1141
+ * Deployment half of the `code_search` decision. `available` is false when
1142
+ * the mode is off or no usable Jev key is configured; workspaces then cannot
1143
+ * turn it on. `workspaceDefault` applies to workspaces without their own
1144
+ * setting.
1145
+ */
1146
+ export declare function codeSearchDeploymentPolicy(settings: Pick<Settings, "codeSearchMode" | "jevApiKey">): CodeSearchDeploymentPolicy;
932
1147
  /**
933
1148
  * Reject empty / template secrets so `.env.example` placeholders like
934
1149
  * `your-key` cannot advertise voice input as available and then 401 upstream.
@@ -982,6 +1197,24 @@ export type ModelUsageCostBreakdown = {
982
1197
  /** OpenGeni credit price after configured margin and latency-mode multiplier. */
983
1198
  creditCostMicros: number;
984
1199
  };
1200
+ export type ModelListCostClassesMicros = {
1201
+ uncachedInput: number;
1202
+ cacheRead: number;
1203
+ cacheWrite: number;
1204
+ output: number;
1205
+ };
1206
+ export type ModelListUsageCostSnapshot = ModelUsageCostBreakdown & {
1207
+ /** Captured upstream list costs, summing to providerCostMicros, never debits. */
1208
+ listByClassMicros: ModelListCostClassesMicros | null;
1209
+ /** True only when a returned class split includes latency rounding allocation. */
1210
+ listByClassApprox: boolean;
1211
+ };
1212
+ export type ModelRecordedListCostAllocation = {
1213
+ /** Approximate attribution of a stored upstream total, never a new price. */
1214
+ listByClassMicros: ModelListCostClassesMicros | null;
1215
+ /** True for every eligible historical allocation, including known zero. */
1216
+ listByClassApprox: boolean;
1217
+ };
985
1218
  export type StaticUsageLimitsConfig = StaticUsageLimits;
986
1219
  export type EntitlementsConfig = Entitlements;
987
1220
  export declare const CapabilitySupportV1: z.ZodEnum<{
@@ -1158,7 +1391,7 @@ export type CredentialSourceV1 = {
1158
1391
  mechanism: "api_key" | "azure_ad_bearer" | "none";
1159
1392
  } | {
1160
1393
  kind: "connected_subscription";
1161
- provider: "codex" | "xai";
1394
+ provider: "codex" | "xai" | "claude";
1162
1395
  } | {
1163
1396
  kind: "workspace_connection";
1164
1397
  mechanism: "api_key";
@@ -1178,6 +1411,7 @@ export type BillingAttributionV1 = {
1178
1411
  * silently no-ops hosted tools (see docs/model-providers.md).
1179
1412
  */
1180
1413
  export declare const ModelProviderApi: z.ZodEnum<{
1414
+ "anthropic-messages": "anthropic-messages";
1181
1415
  chat: "chat";
1182
1416
  responses: "responses";
1183
1417
  }>;
@@ -1200,8 +1434,14 @@ export type ModelProviderWireProfile = z.infer<typeof ModelProviderWireProfile>;
1200
1434
  */
1201
1435
  export declare const RegistryProviderKind: z.ZodEnum<{
1202
1436
  anonymous: "anonymous";
1437
+ "anthropic-organization": "anthropic-organization";
1438
+ "anthropic-workspace": "anthropic-workspace";
1203
1439
  "api-key": "api-key";
1440
+ "claude-subscription-organization": "claude-subscription-organization";
1441
+ "claude-subscription-workspace": "claude-subscription-workspace";
1204
1442
  "codex-subscription": "codex-subscription";
1443
+ "direct-azure-workspace": "direct-azure-workspace";
1444
+ "direct-openai-workspace": "direct-openai-workspace";
1205
1445
  "openrouter-organization": "openrouter-organization";
1206
1446
  "openrouter-workspace": "openrouter-workspace";
1207
1447
  "vercel-gateway-managed": "vercel-gateway-managed";
@@ -1211,11 +1451,56 @@ export declare const RegistryProviderKind: z.ZodEnum<{
1211
1451
  }>;
1212
1452
  export type RegistryProviderKind = z.infer<typeof RegistryProviderKind>;
1213
1453
  /** A non-built-in provider declared by the host via OPENGENI_MODEL_PROVIDERS_JSON. */
1454
+ export declare const ClaudeSubscriptionIdentity: z.ZodObject<{
1455
+ accountUuid: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
1456
+ deviceId: z.ZodString;
1457
+ }, z.core.$strict>;
1458
+ export type ClaudeSubscriptionIdentity = z.infer<typeof ClaudeSubscriptionIdentity>;
1459
+ export declare const ClaudeSubscriptionCredential: z.ZodObject<{
1460
+ version: z.ZodLiteral<1>;
1461
+ token: z.ZodString;
1462
+ identity: z.ZodObject<{
1463
+ accountUuid: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
1464
+ deviceId: z.ZodString;
1465
+ }, z.core.$strict>;
1466
+ oauth: z.ZodOptional<z.ZodObject<{
1467
+ refreshToken: z.ZodString;
1468
+ expiresAt: z.ZodString;
1469
+ scopes: z.ZodArray<z.ZodString>;
1470
+ }, z.core.$strict>>;
1471
+ }, z.core.$strict>;
1472
+ declare const AnthropicProviderOptions: z.ZodObject<{
1473
+ identity: z.ZodOptional<z.ZodObject<{
1474
+ accountUuid: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
1475
+ deviceId: z.ZodString;
1476
+ }, z.core.$strict>>;
1477
+ credentialBinding: z.ZodOptional<z.ZodObject<{
1478
+ connectionId: z.ZodString;
1479
+ credentialVersion: z.ZodNumber;
1480
+ }, z.core.$strict>>;
1481
+ auth: z.ZodDefault<z.ZodEnum<{
1482
+ "api-key": "api-key";
1483
+ oauth: "oauth";
1484
+ }>>;
1485
+ cacheTtl: z.ZodDefault<z.ZodEnum<{
1486
+ "1h": "1h";
1487
+ "5m": "5m";
1488
+ off: "off";
1489
+ }>>;
1490
+ maxOutputTokens: z.ZodDefault<z.ZodNumber>;
1491
+ streamIdleTimeoutMs: z.ZodDefault<z.ZodNumber>;
1492
+ }, z.core.$strip>;
1214
1493
  declare const RegistryProviderSchema: z.ZodObject<{
1215
1494
  kind: z.ZodDefault<z.ZodEnum<{
1216
1495
  anonymous: "anonymous";
1496
+ "anthropic-organization": "anthropic-organization";
1497
+ "anthropic-workspace": "anthropic-workspace";
1217
1498
  "api-key": "api-key";
1499
+ "claude-subscription-organization": "claude-subscription-organization";
1500
+ "claude-subscription-workspace": "claude-subscription-workspace";
1218
1501
  "codex-subscription": "codex-subscription";
1502
+ "direct-azure-workspace": "direct-azure-workspace";
1503
+ "direct-openai-workspace": "direct-openai-workspace";
1219
1504
  "openrouter-organization": "openrouter-organization";
1220
1505
  "openrouter-workspace": "openrouter-workspace";
1221
1506
  "vercel-gateway-managed": "vercel-gateway-managed";
@@ -1226,9 +1511,31 @@ declare const RegistryProviderSchema: z.ZodObject<{
1226
1511
  id: z.ZodString;
1227
1512
  label: z.ZodOptional<z.ZodString>;
1228
1513
  api: z.ZodDefault<z.ZodEnum<{
1514
+ "anthropic-messages": "anthropic-messages";
1229
1515
  chat: "chat";
1230
1516
  responses: "responses";
1231
1517
  }>>;
1518
+ anthropic: z.ZodOptional<z.ZodObject<{
1519
+ identity: z.ZodOptional<z.ZodObject<{
1520
+ accountUuid: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
1521
+ deviceId: z.ZodString;
1522
+ }, z.core.$strict>>;
1523
+ credentialBinding: z.ZodOptional<z.ZodObject<{
1524
+ connectionId: z.ZodString;
1525
+ credentialVersion: z.ZodNumber;
1526
+ }, z.core.$strict>>;
1527
+ auth: z.ZodDefault<z.ZodEnum<{
1528
+ "api-key": "api-key";
1529
+ oauth: "oauth";
1530
+ }>>;
1531
+ cacheTtl: z.ZodDefault<z.ZodEnum<{
1532
+ "1h": "1h";
1533
+ "5m": "5m";
1534
+ off: "off";
1535
+ }>>;
1536
+ maxOutputTokens: z.ZodDefault<z.ZodNumber>;
1537
+ streamIdleTimeoutMs: z.ZodDefault<z.ZodNumber>;
1538
+ }, z.core.$strip>>;
1232
1539
  wireProfile: z.ZodDefault<z.ZodEnum<{
1233
1540
  "azure-openai": "azure-openai";
1234
1541
  openai: "openai";
@@ -1664,9 +1971,31 @@ export declare const ModelCatalogDocument: z.ZodObject<{
1664
1971
  id: z.ZodString;
1665
1972
  label: z.ZodOptional<z.ZodString>;
1666
1973
  api: z.ZodDefault<z.ZodEnum<{
1974
+ "anthropic-messages": "anthropic-messages";
1667
1975
  chat: "chat";
1668
1976
  responses: "responses";
1669
1977
  }>>;
1978
+ anthropic: z.ZodOptional<z.ZodObject<{
1979
+ identity: z.ZodOptional<z.ZodObject<{
1980
+ accountUuid: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
1981
+ deviceId: z.ZodString;
1982
+ }, z.core.$strict>>;
1983
+ credentialBinding: z.ZodOptional<z.ZodObject<{
1984
+ connectionId: z.ZodString;
1985
+ credentialVersion: z.ZodNumber;
1986
+ }, z.core.$strict>>;
1987
+ auth: z.ZodDefault<z.ZodEnum<{
1988
+ "api-key": "api-key";
1989
+ oauth: "oauth";
1990
+ }>>;
1991
+ cacheTtl: z.ZodDefault<z.ZodEnum<{
1992
+ "1h": "1h";
1993
+ "5m": "5m";
1994
+ off: "off";
1995
+ }>>;
1996
+ maxOutputTokens: z.ZodDefault<z.ZodNumber>;
1997
+ streamIdleTimeoutMs: z.ZodDefault<z.ZodNumber>;
1998
+ }, z.core.$strip>>;
1670
1999
  wireProfile: z.ZodDefault<z.ZodEnum<{
1671
2000
  "azure-openai": "azure-openai";
1672
2001
  openai: "openai";
@@ -1844,6 +2173,324 @@ export declare const ModelCatalogDocument: z.ZodObject<{
1844
2173
  publicDefaultHeaderNames: z.ZodOptional<z.ZodNever>;
1845
2174
  publicDefaultQueryNames: z.ZodOptional<z.ZodNever>;
1846
2175
  }, z.core.$strict>>>;
2176
+ codexModels: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
2177
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
2178
+ label: z.ZodOptional<z.ZodString>;
2179
+ shortLabel: z.ZodOptional<z.ZodString>;
2180
+ contextWindowTokens: z.ZodOptional<z.ZodNumber>;
2181
+ effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
2182
+ autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
2183
+ toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
2184
+ reasoningEffort: z.ZodOptional<z.ZodBoolean>;
2185
+ hostedWebSearch: z.ZodOptional<z.ZodBoolean>;
2186
+ credentialSource: z.ZodOptional<z.ZodNever>;
2187
+ billing: z.ZodOptional<z.ZodNever>;
2188
+ retired: z.ZodOptional<z.ZodBoolean>;
2189
+ id: z.ZodString;
2190
+ upstreamModelId: z.ZodString;
2191
+ capabilities: z.ZodObject<{
2192
+ reasoning: z.ZodObject<{
2193
+ upstream: z.ZodEnum<{
2194
+ supported: "supported";
2195
+ unknown: "unknown";
2196
+ unsupported: "unsupported";
2197
+ }>;
2198
+ runnable: z.ZodBoolean;
2199
+ efforts: z.ZodArray<z.ZodEnum<{
2200
+ high: "high";
2201
+ low: "low";
2202
+ max: "max";
2203
+ medium: "medium";
2204
+ minimal: "minimal";
2205
+ none: "none";
2206
+ xhigh: "xhigh";
2207
+ }>>;
2208
+ defaultEffort: z.ZodNullable<z.ZodEnum<{
2209
+ high: "high";
2210
+ low: "low";
2211
+ max: "max";
2212
+ medium: "medium";
2213
+ minimal: "minimal";
2214
+ none: "none";
2215
+ xhigh: "xhigh";
2216
+ }>>;
2217
+ required: z.ZodBoolean;
2218
+ }, z.core.$strip>;
2219
+ functionCalling: z.ZodObject<{
2220
+ upstream: z.ZodEnum<{
2221
+ supported: "supported";
2222
+ unknown: "unknown";
2223
+ unsupported: "unsupported";
2224
+ }>;
2225
+ runnable: z.ZodBoolean;
2226
+ }, z.core.$strip>;
2227
+ structuredOutput: z.ZodObject<{
2228
+ upstream: z.ZodEnum<{
2229
+ supported: "supported";
2230
+ unknown: "unknown";
2231
+ unsupported: "unsupported";
2232
+ }>;
2233
+ runnable: z.ZodBoolean;
2234
+ }, z.core.$strip>;
2235
+ hostedTools: z.ZodObject<{
2236
+ webSearch: z.ZodObject<{
2237
+ upstream: z.ZodEnum<{
2238
+ supported: "supported";
2239
+ unknown: "unknown";
2240
+ unsupported: "unsupported";
2241
+ }>;
2242
+ runnable: z.ZodBoolean;
2243
+ }, z.core.$strip>;
2244
+ xSearch: z.ZodObject<{
2245
+ upstream: z.ZodEnum<{
2246
+ supported: "supported";
2247
+ unknown: "unknown";
2248
+ unsupported: "unsupported";
2249
+ }>;
2250
+ runnable: z.ZodBoolean;
2251
+ }, z.core.$strip>;
2252
+ codeExecution: z.ZodObject<{
2253
+ upstream: z.ZodEnum<{
2254
+ supported: "supported";
2255
+ unknown: "unknown";
2256
+ unsupported: "unsupported";
2257
+ }>;
2258
+ runnable: z.ZodBoolean;
2259
+ }, z.core.$strip>;
2260
+ imageGeneration: z.ZodDefault<z.ZodObject<{
2261
+ upstream: z.ZodEnum<{
2262
+ supported: "supported";
2263
+ unknown: "unknown";
2264
+ unsupported: "unsupported";
2265
+ }>;
2266
+ runnable: z.ZodBoolean;
2267
+ }, z.core.$strip>>;
2268
+ }, z.core.$strip>;
2269
+ inputModalities: z.ZodArray<z.ZodEnum<{
2270
+ audio: "audio";
2271
+ image: "image";
2272
+ text: "text";
2273
+ }>>;
2274
+ inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
2275
+ outputModalities: z.ZodArray<z.ZodEnum<{
2276
+ audio: "audio";
2277
+ image: "image";
2278
+ text: "text";
2279
+ }>>;
2280
+ transports: z.ZodObject<{
2281
+ sse: z.ZodObject<{
2282
+ upstream: z.ZodEnum<{
2283
+ supported: "supported";
2284
+ unknown: "unknown";
2285
+ unsupported: "unsupported";
2286
+ }>;
2287
+ runnable: z.ZodBoolean;
2288
+ }, z.core.$strip>;
2289
+ responsesWebSocket: z.ZodObject<{
2290
+ upstream: z.ZodEnum<{
2291
+ supported: "supported";
2292
+ unknown: "unknown";
2293
+ unsupported: "unsupported";
2294
+ }>;
2295
+ runnable: z.ZodBoolean;
2296
+ }, z.core.$strip>;
2297
+ realtimeAudio: z.ZodObject<{
2298
+ upstream: z.ZodEnum<{
2299
+ supported: "supported";
2300
+ unknown: "unknown";
2301
+ unsupported: "unsupported";
2302
+ }>;
2303
+ runnable: z.ZodBoolean;
2304
+ }, z.core.$strip>;
2305
+ }, z.core.$strip>;
2306
+ promptCaching: z.ZodOptional<z.ZodObject<{
2307
+ upstream: z.ZodEnum<{
2308
+ supported: "supported";
2309
+ unknown: "unknown";
2310
+ unsupported: "unsupported";
2311
+ }>;
2312
+ runnable: z.ZodBoolean;
2313
+ mode: z.ZodEnum<{
2314
+ automatic: "automatic";
2315
+ implicit: "implicit";
2316
+ none: "none";
2317
+ }>;
2318
+ }, z.core.$strip>>;
2319
+ latencyModes: z.ZodArray<z.ZodObject<{
2320
+ id: z.ZodEnum<{
2321
+ fast: "fast";
2322
+ priority: "priority";
2323
+ standard: "standard";
2324
+ }>;
2325
+ upstream: z.ZodEnum<{
2326
+ supported: "supported";
2327
+ unknown: "unknown";
2328
+ unsupported: "unsupported";
2329
+ }>;
2330
+ runnable: z.ZodBoolean;
2331
+ billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
2332
+ }, z.core.$strip>>;
2333
+ }, z.core.$strip>;
2334
+ pricing: z.ZodOptional<z.ZodNever>;
2335
+ }, z.core.$strict>, z.ZodTransform<{
2336
+ aliases?: string[] | undefined;
2337
+ label?: string | undefined;
2338
+ shortLabel?: string | undefined;
2339
+ contextWindowTokens?: number | undefined;
2340
+ effectiveContextWindowTokens?: number | undefined;
2341
+ autoCompactTokenLimit?: number | undefined;
2342
+ toolOutputTruncationTokens?: number | undefined;
2343
+ reasoningEffort?: boolean | undefined;
2344
+ hostedWebSearch?: boolean | undefined;
2345
+ credentialSource?: undefined;
2346
+ billing?: undefined;
2347
+ retired?: boolean | undefined;
2348
+ id: string;
2349
+ upstreamModelId: string;
2350
+ pricing?: undefined;
2351
+ capabilities: {
2352
+ reasoning: {
2353
+ upstream: "supported" | "unknown" | "unsupported";
2354
+ runnable: boolean;
2355
+ efforts: ("high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh")[];
2356
+ defaultEffort: "high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh" | null;
2357
+ required: boolean;
2358
+ };
2359
+ functionCalling: {
2360
+ upstream: "supported" | "unknown" | "unsupported";
2361
+ runnable: boolean;
2362
+ };
2363
+ structuredOutput: {
2364
+ upstream: "supported" | "unknown" | "unsupported";
2365
+ runnable: boolean;
2366
+ };
2367
+ hostedTools: {
2368
+ webSearch: {
2369
+ upstream: "supported" | "unknown" | "unsupported";
2370
+ runnable: boolean;
2371
+ };
2372
+ xSearch: {
2373
+ upstream: "supported" | "unknown" | "unsupported";
2374
+ runnable: boolean;
2375
+ };
2376
+ codeExecution: {
2377
+ upstream: "supported" | "unknown" | "unsupported";
2378
+ runnable: boolean;
2379
+ };
2380
+ imageGeneration: {
2381
+ upstream: "supported" | "unknown" | "unsupported";
2382
+ runnable: boolean;
2383
+ };
2384
+ };
2385
+ inputModalities: ("audio" | "image" | "text")[];
2386
+ inputFileMediaTypes: string[];
2387
+ outputModalities: ("audio" | "image" | "text")[];
2388
+ transports: {
2389
+ sse: {
2390
+ upstream: "supported" | "unknown" | "unsupported";
2391
+ runnable: boolean;
2392
+ };
2393
+ responsesWebSocket: {
2394
+ upstream: "supported" | "unknown" | "unsupported";
2395
+ runnable: boolean;
2396
+ };
2397
+ realtimeAudio: {
2398
+ upstream: "supported" | "unknown" | "unsupported";
2399
+ runnable: boolean;
2400
+ };
2401
+ };
2402
+ promptCaching?: {
2403
+ upstream: "supported" | "unknown" | "unsupported";
2404
+ runnable: boolean;
2405
+ mode: "automatic" | "implicit" | "none";
2406
+ } | undefined;
2407
+ latencyModes: {
2408
+ id: "fast" | "priority" | "standard";
2409
+ upstream: "supported" | "unknown" | "unsupported";
2410
+ runnable: boolean;
2411
+ billingMultiplierBps?: number | undefined;
2412
+ }[];
2413
+ };
2414
+ }, {
2415
+ aliases?: string[] | undefined;
2416
+ label?: string | undefined;
2417
+ shortLabel?: string | undefined;
2418
+ contextWindowTokens?: number | undefined;
2419
+ effectiveContextWindowTokens?: number | undefined;
2420
+ autoCompactTokenLimit?: number | undefined;
2421
+ toolOutputTruncationTokens?: number | undefined;
2422
+ reasoningEffort?: boolean | undefined;
2423
+ hostedWebSearch?: boolean | undefined;
2424
+ credentialSource?: undefined;
2425
+ billing?: undefined;
2426
+ retired?: boolean | undefined;
2427
+ id: string;
2428
+ upstreamModelId: string;
2429
+ capabilities: {
2430
+ reasoning: {
2431
+ upstream: "supported" | "unknown" | "unsupported";
2432
+ runnable: boolean;
2433
+ efforts: ("high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh")[];
2434
+ defaultEffort: "high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh" | null;
2435
+ required: boolean;
2436
+ };
2437
+ functionCalling: {
2438
+ upstream: "supported" | "unknown" | "unsupported";
2439
+ runnable: boolean;
2440
+ };
2441
+ structuredOutput: {
2442
+ upstream: "supported" | "unknown" | "unsupported";
2443
+ runnable: boolean;
2444
+ };
2445
+ hostedTools: {
2446
+ webSearch: {
2447
+ upstream: "supported" | "unknown" | "unsupported";
2448
+ runnable: boolean;
2449
+ };
2450
+ xSearch: {
2451
+ upstream: "supported" | "unknown" | "unsupported";
2452
+ runnable: boolean;
2453
+ };
2454
+ codeExecution: {
2455
+ upstream: "supported" | "unknown" | "unsupported";
2456
+ runnable: boolean;
2457
+ };
2458
+ imageGeneration: {
2459
+ upstream: "supported" | "unknown" | "unsupported";
2460
+ runnable: boolean;
2461
+ };
2462
+ };
2463
+ inputModalities: ("audio" | "image" | "text")[];
2464
+ inputFileMediaTypes: string[];
2465
+ outputModalities: ("audio" | "image" | "text")[];
2466
+ transports: {
2467
+ sse: {
2468
+ upstream: "supported" | "unknown" | "unsupported";
2469
+ runnable: boolean;
2470
+ };
2471
+ responsesWebSocket: {
2472
+ upstream: "supported" | "unknown" | "unsupported";
2473
+ runnable: boolean;
2474
+ };
2475
+ realtimeAudio: {
2476
+ upstream: "supported" | "unknown" | "unsupported";
2477
+ runnable: boolean;
2478
+ };
2479
+ };
2480
+ promptCaching?: {
2481
+ upstream: "supported" | "unknown" | "unsupported";
2482
+ runnable: boolean;
2483
+ mode: "automatic" | "implicit" | "none";
2484
+ } | undefined;
2485
+ latencyModes: {
2486
+ id: "fast" | "priority" | "standard";
2487
+ upstream: "supported" | "unknown" | "unsupported";
2488
+ runnable: boolean;
2489
+ billingMultiplierBps?: number | undefined;
2490
+ }[];
2491
+ };
2492
+ pricing?: undefined;
2493
+ }>>>>;
1847
2494
  gatewayModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
1848
2495
  productId: z.ZodString;
1849
2496
  workspaceProductId: z.ZodString;
@@ -2047,6 +2694,7 @@ export type IntegrationOAuthClientConfig = z.infer<typeof IntegrationOAuthClient
2047
2694
  * replacement.
2048
2695
  */
2049
2696
  export interface ResolvedModelProvider {
2697
+ anthropic?: z.infer<typeof AnthropicProviderOptions> | undefined;
2050
2698
  id: string;
2051
2699
  label: string;
2052
2700
  kind: RegistryProviderKind | "openrouter-managed";
@@ -2096,6 +2744,20 @@ export interface ConfiguredModel {
2096
2744
  reasoningEffort: boolean;
2097
2745
  hostedWebSearch: boolean;
2098
2746
  }
2747
+ /**
2748
+ * Whether a resolved route is the deployment-funded OpenRouter free tier: the
2749
+ * managed OpenRouter provider, which sends every workspace's requests with the
2750
+ * deployment's one OpenRouter key, serving an upstream `:free` variant (the
2751
+ * curated catalog admits nothing else). OpenRouter limits free-variant
2752
+ * requests per account per minute and per day, so each request on this route
2753
+ * spends quota that every turn on the deployment shares. A workspace or
2754
+ * organization OpenRouter connection uses its own account and is not this
2755
+ * route.
2756
+ */
2757
+ export declare function isManagedOpenRouterFreeRoute(route: {
2758
+ provider: Pick<ResolvedModelProvider, "kind">;
2759
+ configured: Pick<ConfiguredModel, "upstreamModelId">;
2760
+ }): boolean;
2099
2761
  export declare const VERCEL_AI_GATEWAY_BASE_URL: "https://ai-gateway.vercel.sh/v1";
2100
2762
  export declare const VERCEL_AI_GATEWAY_AI_SDK_BASE_URL: "https://ai-gateway.vercel.sh/v4/ai";
2101
2763
  export declare const VERCEL_AI_GATEWAY_CONNECTION_DOMAIN: "ai-gateway.vercel.sh";
@@ -2180,6 +2842,8 @@ export declare function configuredOpenRouterOrganizationProductModelIds(settings
2180
2842
  * llm-prices.com as a ground-truth canary; it does not generate this table.
2181
2843
  */
2182
2844
  export declare const defaultModelPricing: Record<string, ModelPricingScheduleV1>;
2845
+ /** Reviewed comparison rates only; never debit or execution-definition defaults. */
2846
+ export declare const reviewedModelListPricing: Record<string, ModelPricingScheduleV1>;
2183
2847
  export type SandboxRequiredEnv = {
2184
2848
  field: keyof Settings;
2185
2849
  env: string;
@@ -2249,6 +2913,17 @@ export declare function collectSandboxEnvironment(settings: Settings, source?: N
2249
2913
  */
2250
2914
  export declare function resolveProviderApiKey(provider: Pick<RegistryProvider, "apiKey" | "apiKeyEnv">, source?: NodeJS.ProcessEnv): string | undefined;
2251
2915
  export declare function gatewayRequestPolicyForUpstreamModel(upstreamModelId: string, models?: readonly GatewayCatalogModel[]): ConfiguredModel["requestPolicy"];
2916
+ /** Customer-owned OpenAI/Azure routes, bound to immutable connection identity. */
2917
+ export declare function withDirectModelProviders(settings: Settings, connections: readonly {
2918
+ id: string;
2919
+ version: number;
2920
+ subjectId: string | null;
2921
+ kind: string;
2922
+ status: string;
2923
+ providerDomain: string;
2924
+ metadata: Record<string, unknown>;
2925
+ apiKey?: string;
2926
+ }[]): Settings;
2252
2927
  /** Static catalog overlay; it contains no concrete workspace credential. */
2253
2928
  export declare function withWorkspaceGatewayCatalogProvider(settings: Settings, customModels?: readonly {
2254
2929
  upstreamModelId: string;
@@ -2310,6 +2985,13 @@ export declare function serviceTierForLatencyMode(providerId: string, latencyMod
2310
2985
  /** True when the response tier fulfills a non-standard Fast/priority request. */
2311
2986
  export declare function responseSatisfiesLatencyMode(requested: LatencyMode, responseServiceTier: string | null | undefined): boolean;
2312
2987
  export declare function runnableLatencyModesForModel(settings: Settings, modelId: string): LatencyMode[];
2988
+ export declare class UnsupportedLatencyModeError extends Error {
2989
+ readonly modelId: string;
2990
+ readonly latencyMode: LatencyMode;
2991
+ readonly allowedLatencyModes: readonly LatencyMode[];
2992
+ readonly code = "UNSUPPORTED_LATENCY_MODE";
2993
+ constructor(modelId: string, latencyMode: LatencyMode, allowedLatencyModes: readonly LatencyMode[]);
2994
+ }
2313
2995
  export declare function modelCostClassForConfiguredModel(_settings: Settings, model: Pick<ConfiguredModel, "cost">): ConfiguredModelCostClass;
2314
2996
  /**
2315
2997
  * The built-in provider's stable id: "openai" on the OpenAI platform, "azure"
@@ -2334,6 +3016,8 @@ export declare function configuredProviders(settings: Settings, source?: NodeJS.
2334
3016
  * select, lease, refresh, or expose a concrete credential; those runtime
2335
3017
  * operations remain owned by the credential allocator.
2336
3018
  */
3019
+ /** Exact upstream slugs of the active Codex catalog (or the built-in fallback list). */
3020
+ export declare function codexUpstreamModelSlugs(settings: Settings): string[];
2337
3021
  export declare function withCodexCatalogProvider(settings: Settings): Settings;
2338
3022
  /**
2339
3023
  * Static SuperGrok product catalogue, matching the Codex subscription seam.
@@ -2374,6 +3058,14 @@ export declare function canonicalizeConfiguredModelId(settings: Settings, modelI
2374
3058
  * openai allow-list, then registry ids.
2375
3059
  */
2376
3060
  export declare function configuredAllowedModels(settings: Settings): string[];
3061
+ /** Retirement is selection metadata, never provider authority or executable identity. */
3062
+ export declare function isModelAvailableForNewSelection(settings: Settings, modelId: string): boolean;
3063
+ /** Called only with the durable policy installed for a claimed accepted attempt. */
3064
+ export declare function settingsForAcceptedSubscriptionTurn(settings: Settings, policy: TurnExecutionPolicyV1, expected: {
3065
+ modelId: string;
3066
+ reasoningEffort: Settings["openaiReasoningEffort"];
3067
+ latencyMode?: LatencyMode;
3068
+ }): Settings;
2377
3069
  /**
2378
3070
  * Resolve a model string to the provider that serves it and its configured
2379
3071
  * shape. Returns undefined when the id is not exposed (built-in allow-list nor
@@ -2401,16 +3093,29 @@ export type ResolveTurnExecutionPolicyV1Input = {
2401
3093
  * callers must keep their live credential/readiness gate authoritative.
2402
3094
  */
2403
3095
  export declare function resolveModelProviderForTurn(settings: Settings, modelId: string): ReturnType<typeof resolveModelProvider>;
3096
+ /**
3097
+ * The requested model cannot start new work: it is retired from new selection
3098
+ * or absent from the configured catalog. Callers that own a durable refusal
3099
+ * (for example a scheduled occurrence) record it instead of failing blindly.
3100
+ */
3101
+ export declare class TurnExecutionPolicyModelUnavailableError extends Error {
3102
+ constructor(message: string);
3103
+ }
2404
3104
  /**
2405
3105
  * Build a trusted, secret-safe execution policy from the normalized catalog.
2406
3106
  * The Codex overlay here contains static product/provider identity only; it
2407
3107
  * neither proves readiness nor chooses, decrypts, leases, or exposes an account.
2408
3108
  */
2409
3109
  export declare function resolveTurnExecutionPolicyV1(settings: Settings, input: ResolveTurnExecutionPolicyV1Input): TurnExecutionPolicyV1;
3110
+ /** Explicit accepted execution identity matches, but its definition digest differs. */
3111
+ export declare class TurnExecutionPolicyDefinitionMismatchError extends Error {
3112
+ readonly code = "turn_execution_policy_definition_mismatch";
3113
+ constructor();
3114
+ }
2410
3115
  /**
2411
3116
  * Parse-time validation lives in @opengeni/contracts; this verifier binds a
2412
3117
  * present snapshot to the current executable definition and exact turn row.
2413
- * Any deployment/provider drift fails before a provider or compaction call.
3118
+ * Non-additive executable drift fails before a provider or compaction call.
2414
3119
  */
2415
3120
  export declare function assertTurnExecutionPolicyMatchesConfigV1(settings: Settings, policy: TurnExecutionPolicyV1, expected: {
2416
3121
  modelId: string;
@@ -2428,6 +3133,13 @@ export declare function assertTurnExecutionPolicyMatchesConfigV1(settings: Setti
2428
3133
  * complete schedule, and always replace the lower-precedence schedule.
2429
3134
  */
2430
3135
  export declare function configuredModelPricingSchedules(settings: Settings): Record<string, ModelPricingScheduleV1>;
3136
+ /**
3137
+ * Insights list-price metadata, including reviewed namespaced provider routes.
3138
+ * Kept separate from debit/catalog pricing: adding a comparison must not change
3139
+ * an accepted turn's frozen execution-definition hash or payer classification.
3140
+ * Inline registry and explicit product-ID prices always win over projections.
3141
+ */
3142
+ export declare function configuredModelListPricingSchedules(settings: Settings): Record<string, ModelPricingScheduleV1>;
2431
3143
  /** Legacy flat projection: returns the default/below-threshold price. */
2432
3144
  export declare function configuredModelPricing(settings: Settings): Record<string, ModelPricing>;
2433
3145
  /** Select the per-provider-request price at an exact input-token threshold. */
@@ -2451,6 +3163,29 @@ export declare function calculateModelUsageCostMicros(settings: Settings, model:
2451
3163
  export declare function calculateModelUsageCostBreakdown(settings: Settings, model: string, usage: ModelUsageInput, options?: {
2452
3164
  latencyMode?: LatencyMode;
2453
3165
  }): ModelUsageCostBreakdown;
3166
+ /** Provider-list/equivalent-credit comparison only; never debit authority. */
3167
+ export declare function calculateModelListUsageCostBreakdown(settings: Settings, model: string, usage: ModelUsageInput, options?: {
3168
+ latencyMode?: LatencyMode;
3169
+ }): ModelUsageCostBreakdown;
3170
+ /**
3171
+ * Forward-only list comparison snapshot for the model-call fact writer.
3172
+ * Callers must establish request price provenance (including geography/service
3173
+ * tier) and retain per-request counters. Unknown counters/TTL/modifiers yield
3174
+ * no class split, not invented zeros. Historical facts must not use this helper.
3175
+ * Native Claude details preserve cache_write_tokens_5m and cache_write_tokens_1h.
3176
+ */
3177
+ export declare function calculateModelListUsageCostSnapshot(settings: Settings, model: string, usage: ModelUsageInput, options?: {
3178
+ latencyMode?: LatencyMode;
3179
+ priceContextKnown?: boolean;
3180
+ }): ModelListUsageCostSnapshot;
3181
+ /**
3182
+ * Approximate class attribution of a previously recorded upstream list total.
3183
+ * Current reviewed rates are weights only: this never recomputes that total,
3184
+ * credits, or charges. Missing class counters/rates remain unknown. Historical
3185
+ * cache writes use the schedule's single TTL rate, not an exact TTL assertion.
3186
+ * Reasoning is already included in outputTokens and is never added again.
3187
+ */
3188
+ export declare function allocateRecordedModelListCostByClass(settings: Settings, model: string, usage: ModelUsageInput, recordedProviderCostMicros: number | null | undefined): ModelRecordedListCostAllocation;
2454
3189
  /**
2455
3190
  * Convert AI Gateway's exact USD inference cost to OpenGeni credit micros and
2456
3191
  * apply the configured model margin. Decimal arithmetic is integer-only so a
@@ -2578,6 +3313,7 @@ export declare function applyGitAuthPointerEnvironment(environment: Record<strin
2578
3313
  email: string;
2579
3314
  } | null): Record<string, string>;
2580
3315
  export type StartupRetryOptions = {
3316
+ shouldRetry?: (error: unknown) => boolean;
2581
3317
  attempts?: number;
2582
3318
  initialDelayMs?: number;
2583
3319
  maxDelayMs?: number;
@@ -2589,7 +3325,7 @@ export type StartupRetryOptions = {
2589
3325
  error: unknown;
2590
3326
  }) => void;
2591
3327
  };
2592
- export declare function startupRetryOptions(settings: Settings): Required<Omit<StartupRetryOptions, "onRetry">>;
3328
+ export declare function startupRetryOptions(settings: Settings): Required<Omit<StartupRetryOptions, "onRetry" | "shouldRetry">>;
2593
3329
  export declare function retryStartupDependency<T>(label: string, operation: () => Promise<T>, options?: StartupRetryOptions): Promise<T>;
2594
3330
  export declare function sandboxEnvironmentVariableNames(settings: Settings): string[];
2595
3331
  export declare function sandboxLifecycleHookIds(settings: Settings): string[];
@@ -2638,6 +3374,31 @@ export declare function firstPartyMcpInternalBaseUrl(settings: Settings): string
2638
3374
  export declare function firstPartyMcpWorkspaceUrl(settings: Settings, workspaceId: string): string;
2639
3375
  export declare function firstPartyMcpInternalWorkspaceUrl(settings: Settings, workspaceId: string): string;
2640
3376
  export declare function codemodeWorkspaceUrl(settings: Settings, workspaceId: string): string;
3377
+ export type TrustedProxyCidr = {
3378
+ address: string;
3379
+ prefix: number;
3380
+ family: "ipv4" | "ipv6";
3381
+ };
3382
+ /**
3383
+ * Parse `OPENGENI_API_TRUSTED_PROXY_CIDRS`: comma-separated IPv4/IPv6 CIDRs or
3384
+ * single addresses. Throws on any malformed entry so a typo can never widen or
3385
+ * silently disable the trusted proxy set.
3386
+ */
3387
+ export declare function trustedProxyCidrEntries(raw: string): TrustedProxyCidr[];
3388
+ /**
3389
+ * Parse `OPENGENI_LOCAL_ALLOWED_ORIGINS`: comma-separated exact browser origins
3390
+ * (`http(s)://host[:port]`, no path, query, credentials, or wildcard). Throws on
3391
+ * any malformed entry so a typo can never widen or silently disable the local
3392
+ * browser boundary.
3393
+ */
3394
+ export declare function localAllowedOriginEntries(raw: string | undefined): string[];
3395
+ /**
3396
+ * Local development only: whether a normalized API path is one a sandbox calls
3397
+ * (Codemode, first-party MCP, and the personal Git broker). The Linux Docker
3398
+ * sandbox route relays only these, and the local API serves only these on the
3399
+ * addresses that only sandboxes use (see `apps/api/src/http/local-browser-boundary.ts`).
3400
+ */
3401
+ export declare function localSandboxApiRouteAllowed(pathname: string): boolean;
2641
3402
  /** Validate one fully resolved, secret-bearing executable catalog. */
2642
3403
  export declare function validateModelCatalogSettings(settings: Settings, source?: NodeJS.ProcessEnv): ConfiguredModel[];
2643
3404
  /**
@@ -2702,4 +3463,32 @@ export interface NatsControlPlaneAuth {
2702
3463
  user: string;
2703
3464
  password: string;
2704
3465
  }
2705
- export declare function resolveNatsControlPlaneAuth(settings: Settings): NatsControlPlaneAuth | null;
3466
+ export declare function resolveNatsControlPlaneAuth(settings: Pick<Settings, "selfhostedNatsControlUser" | "selfhostedNatsControlPassword">): NatsControlPlaneAuth | null;
3467
+ /** Image references a workspace may select as its default sandbox image. */
3468
+ export declare function sandboxImageAllowlist(settings: Pick<Settings, "sandboxImageAllowlist">): string[];
3469
+ /** Native Claude connections reuse the encrypted workspace and organization boundaries. */
3470
+ export declare const CLAUDE_CONNECTION_KINDS: readonly ["anthropic", "claude_subscription"];
3471
+ export type ClaudeConnectionKind = (typeof CLAUDE_CONNECTION_KINDS)[number];
3472
+ export declare function claudeNativeModelProfile(upstreamModelId: string): Readonly<{
3473
+ efforts: readonly ReasoningEffort[];
3474
+ defaultEffort: ReasoningEffort | null;
3475
+ contextWindowTokens: number;
3476
+ maxOutputTokens: number;
3477
+ }> | undefined;
3478
+ export declare function claudeProviderId(kind: ClaudeConnectionKind, scope?: "workspace" | "organization"): string;
3479
+ export type ClaudeConnectionCatalog = Partial<Record<ClaudeConnectionKind, {
3480
+ active?: boolean;
3481
+ models: readonly {
3482
+ upstreamModelId: string;
3483
+ label?: string | null;
3484
+ }[];
3485
+ }>>;
3486
+ export declare function withClaudeConnectionCatalog(settings: Settings, connections: ClaudeConnectionCatalog, scope?: "workspace" | "organization"): Settings;
3487
+ export declare function withClaudeConnectionCredential(settings: Settings, kind: ClaudeConnectionKind, credential: string, scope?: "workspace" | "organization", credentialBinding?: {
3488
+ connectionId: string;
3489
+ credentialVersion: number;
3490
+ }): Settings;
3491
+ export * from "./claude-subscription-usage.js";
3492
+ export * from "./claude-subscription-oauth.js";
3493
+ export * from "./subscription-account-selection.js";
3494
+ export * from "./claude-subscription-capacity.js";