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