@opengeni/config 1.0.0-canary.6 → 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,17 +237,33 @@ 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";
217
258
  preference_propose: "preference_propose";
218
259
  preference_registry_get: "preference_registry_get";
219
260
  preference_registry_summary: "preference_registry_summary";
261
+ project_create: "project_create";
262
+ project_delete: "project_delete";
263
+ project_get: "project_get";
264
+ project_list: "project_list";
265
+ project_reorder: "project_reorder";
266
+ project_update: "project_update";
220
267
  reddit_accounts_list: "reddit_accounts_list";
221
268
  reddit_mentions_live: "reddit_mentions_live";
222
269
  reddit_post_reply: "reddit_post_reply";
@@ -252,6 +299,8 @@ declare const SettingsSchema: z.ZodObject<{
252
299
  session_pause: "session_pause";
253
300
  session_resume: "session_resume";
254
301
  session_send_message: "session_send_message";
302
+ session_set_model: "session_set_model";
303
+ session_set_project: "session_set_project";
255
304
  session_steer: "session_steer";
256
305
  session_wait: "session_wait";
257
306
  sessions_list: "sessions_list";
@@ -265,8 +314,11 @@ declare const SettingsSchema: z.ZodObject<{
265
314
  slack_bot_list_files: "slack_bot_list_files";
266
315
  slack_bot_list_users: "slack_bot_list_users";
267
316
  slack_bot_post_message: "slack_bot_post_message";
317
+ slack_bot_prepare_message: "slack_bot_prepare_message";
268
318
  slack_bot_search: "slack_bot_search";
319
+ slack_bot_send_prepared_message: "slack_bot_send_prepared_message";
269
320
  slack_bot_thread_replies: "slack_bot_thread_replies";
321
+ slack_bot_upload_file: "slack_bot_upload_file";
270
322
  social_connections_list: "social_connections_list";
271
323
  social_daily_analysis_context: "social_daily_analysis_context";
272
324
  social_mentions_live: "social_mentions_live";
@@ -311,11 +363,15 @@ declare const SettingsSchema: z.ZodObject<{
311
363
  browser_auth: "browser_auth";
312
364
  browser_clipboard: "browser_clipboard";
313
365
  browser_debug: "browser_debug";
366
+ browser_download_save: "browser_download_save";
367
+ browser_downloads: "browser_downloads";
314
368
  browser_identity: "browser_identity";
315
369
  browser_lifecycle: "browser_lifecycle";
316
370
  browser_observe: "browser_observe";
317
371
  browser_open: "browser_open";
318
372
  browser_publish: "browser_publish";
373
+ browser_read: "browser_read";
374
+ browser_screenshot: "browser_screenshot";
319
375
  browser_tabs: "browser_tabs";
320
376
  capability_authorization_request: "capability_authorization_request";
321
377
  capability_catalog_search: "capability_catalog_search";
@@ -329,7 +385,9 @@ declare const SettingsSchema: z.ZodObject<{
329
385
  computer_observe: "computer_observe";
330
386
  computer_open: "computer_open";
331
387
  computer_targets: "computer_targets";
388
+ connected_machine_enroll_token: "connected_machine_enroll_token";
332
389
  connected_machine_remove: "connected_machine_remove";
390
+ custom_mcp_setup_request: "custom_mcp_setup_request";
333
391
  editable_artifact_apply: "editable_artifact_apply";
334
392
  editable_artifact_create: "editable_artifact_create";
335
393
  editable_artifact_export: "editable_artifact_export";
@@ -358,17 +416,33 @@ declare const SettingsSchema: z.ZodObject<{
358
416
  goal_resume: "goal_resume";
359
417
  goal_set: "goal_set";
360
418
  goal_update: "goal_update";
419
+ instruction_policy_get: "instruction_policy_get";
361
420
  instruction_policy_propose: "instruction_policy_propose";
421
+ instruction_policy_save: "instruction_policy_save";
362
422
  interaction_discover: "interaction_discover";
363
423
  interaction_request_human: "interaction_request_human";
424
+ knowledge_archive: "knowledge_archive";
425
+ knowledge_browse: "knowledge_browse";
364
426
  knowledge_correct: "knowledge_correct";
427
+ knowledge_get: "knowledge_get";
428
+ knowledge_prepare_save: "knowledge_prepare_save";
365
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";
366
434
  memory_correct: "memory_correct";
367
435
  memory_save: "memory_save";
368
436
  memory_search: "memory_search";
369
437
  preference_propose: "preference_propose";
370
438
  preference_registry_get: "preference_registry_get";
371
439
  preference_registry_summary: "preference_registry_summary";
440
+ project_create: "project_create";
441
+ project_delete: "project_delete";
442
+ project_get: "project_get";
443
+ project_list: "project_list";
444
+ project_reorder: "project_reorder";
445
+ project_update: "project_update";
372
446
  reddit_accounts_list: "reddit_accounts_list";
373
447
  reddit_mentions_live: "reddit_mentions_live";
374
448
  reddit_post_reply: "reddit_post_reply";
@@ -404,6 +478,8 @@ declare const SettingsSchema: z.ZodObject<{
404
478
  session_pause: "session_pause";
405
479
  session_resume: "session_resume";
406
480
  session_send_message: "session_send_message";
481
+ session_set_model: "session_set_model";
482
+ session_set_project: "session_set_project";
407
483
  session_steer: "session_steer";
408
484
  session_wait: "session_wait";
409
485
  sessions_list: "sessions_list";
@@ -417,8 +493,11 @@ declare const SettingsSchema: z.ZodObject<{
417
493
  slack_bot_list_files: "slack_bot_list_files";
418
494
  slack_bot_list_users: "slack_bot_list_users";
419
495
  slack_bot_post_message: "slack_bot_post_message";
496
+ slack_bot_prepare_message: "slack_bot_prepare_message";
420
497
  slack_bot_search: "slack_bot_search";
498
+ slack_bot_send_prepared_message: "slack_bot_send_prepared_message";
421
499
  slack_bot_thread_replies: "slack_bot_thread_replies";
500
+ slack_bot_upload_file: "slack_bot_upload_file";
422
501
  social_connections_list: "social_connections_list";
423
502
  social_daily_analysis_context: "social_daily_analysis_context";
424
503
  social_mentions_live: "social_mentions_live";
@@ -457,11 +536,17 @@ declare const SettingsSchema: z.ZodObject<{
457
536
  environmentsEncryptionKey: z.ZodOptional<z.ZodString>;
458
537
  integrationsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
459
538
  integrationsStateSecret: z.ZodOptional<z.ZodString>;
539
+ integrationsOauthShortStateEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
460
540
  integrationsAllowPrivateNetworkTargets: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
461
541
  integrationsOauthClientsJson: z.ZodDefault<z.ZodString>;
542
+ gmailWatchTopicName: z.ZodOptional<z.ZodString>;
462
543
  slackClientId: z.ZodOptional<z.ZodString>;
463
544
  slackClientSecret: z.ZodOptional<z.ZodString>;
464
545
  slackSigningSecret: z.ZodOptional<z.ZodString>;
546
+ slackAccessMode: z.ZodDefault<z.ZodEnum<{
547
+ full: "full";
548
+ limited: "limited";
549
+ }>>;
465
550
  slackBotDisplayName: z.ZodDefault<z.ZodEnum<{
466
551
  OpenGeni: "OpenGeni";
467
552
  "OpenGeni Staging": "OpenGeni Staging";
@@ -491,7 +576,6 @@ declare const SettingsSchema: z.ZodObject<{
491
576
  goalIdleBackoffMs: z.ZodDefault<z.ZodPreprocess<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>>;
492
577
  goalIdleBackoffMaxMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
493
578
  childLifecycleNoticesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
494
- hostMcpAuthoritySourceAdmissionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
495
579
  slackWorkspaceRoutingEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
496
580
  agentMaxModelCallsPerTurn: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
497
581
  contextWindowTokens: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -506,10 +590,12 @@ declare const SettingsSchema: z.ZodObject<{
506
590
  authAllowMetrics: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
507
591
  apiHost: z.ZodDefault<z.ZodString>;
508
592
  apiPort: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
593
+ apiMetricsPort: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
509
594
  workerHttpPort: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
510
595
  opengeniMcpInternalUrl: z.ZodOptional<z.ZodString>;
511
596
  opengeniMcpUrl: z.ZodOptional<z.ZodString>;
512
597
  corsAllowOriginRegex: z.ZodDefault<z.ZodString>;
598
+ localAllowedOrigins: z.ZodOptional<z.ZodString>;
513
599
  openaiProvider: z.ZodDefault<z.ZodEnum<{
514
600
  azure: "azure";
515
601
  openai: "openai";
@@ -559,9 +645,11 @@ declare const SettingsSchema: z.ZodObject<{
559
645
  openrouterApiKey: z.ZodOptional<z.ZodString>;
560
646
  resolvedGatewayModelsJson: z.ZodOptional<z.ZodString>;
561
647
  resolvedOpenRouterModelsJson: z.ZodOptional<z.ZodString>;
648
+ resolvedCodexModelsJson: z.ZodOptional<z.ZodString>;
562
649
  modelProvidersJson: z.ZodDefault<z.ZodString>;
563
650
  codexSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
564
651
  supergrokSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
652
+ claudeSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
565
653
  supergrokResponseStreamIdleTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
566
654
  codexConnectedAppsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
567
655
  codexProductSku: z.ZodOptional<z.ZodString>;
@@ -569,6 +657,7 @@ declare const SettingsSchema: z.ZodObject<{
569
657
  lazyToolSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
570
658
  codexFleetPolicyShadowEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
571
659
  codexRotationNearExhaustionPct: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
660
+ reasoningConfigurationUpdatesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
572
661
  openaiReasoningEffort: z.ZodDefault<z.ZodEnum<{
573
662
  high: "high";
574
663
  low: "low";
@@ -579,6 +668,16 @@ declare const SettingsSchema: z.ZodObject<{
579
668
  xhigh: "xhigh";
580
669
  }>>;
581
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
+ }>>;
582
681
  openaiResponsesTransport: z.ZodDefault<z.ZodEnum<{
583
682
  http: "http";
584
683
  websocket: "websocket";
@@ -590,6 +689,16 @@ declare const SettingsSchema: z.ZodObject<{
590
689
  openaiReasoningEncryptedContent: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
591
690
  openaiMaxRetries: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
592
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
+ }>>;
593
702
  agentInstructionsTemplate: z.ZodDefault<z.ZodString>;
594
703
  azureOpenaiBaseUrl: z.ZodOptional<z.ZodString>;
595
704
  azureOpenaiEndpoint: z.ZodOptional<z.ZodString>;
@@ -619,6 +728,7 @@ declare const SettingsSchema: z.ZodObject<{
619
728
  dockerWorkspaceBaseDir: z.ZodOptional<z.ZodString>;
620
729
  modalAppName: z.ZodDefault<z.ZodString>;
621
730
  modalImageRef: z.ZodOptional<z.ZodString>;
731
+ modalCommandSupervisionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
622
732
  modalImageId: z.ZodOptional<z.ZodString>;
623
733
  modalImageRegistrySecret: z.ZodOptional<z.ZodString>;
624
734
  modalTimeoutSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -683,6 +793,7 @@ declare const SettingsSchema: z.ZodObject<{
683
793
  blaxelTtl: z.ZodOptional<z.ZodString>;
684
794
  cloudflareWorkerUrl: z.ZodOptional<z.ZodString>;
685
795
  cloudflareApiKey: z.ZodOptional<z.ZodString>;
796
+ experimentalBrowserContextPoolEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
686
797
  browserbaseApiKey: z.ZodOptional<z.ZodString>;
687
798
  kernelApiKey: z.ZodOptional<z.ZodString>;
688
799
  kernelEndpoint: z.ZodOptional<z.ZodString>;
@@ -725,6 +836,7 @@ declare const SettingsSchema: z.ZodObject<{
725
836
  sandboxViewerHolderTtlMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
726
837
  sandboxInteractionHolderTtlMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
727
838
  sandboxIdleGraceMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
839
+ sandboxIdleCommandContainmentMs: z.ZodPipe<z.ZodOptional<z.ZodCoercedNumber<unknown>>, z.ZodTransform<number | undefined, number | undefined>>;
728
840
  sandboxSnapshotIntervalMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
729
841
  sandboxSnapshotTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
730
842
  sandboxDrainSnapshotTimeoutMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
@@ -736,9 +848,15 @@ declare const SettingsSchema: z.ZodObject<{
736
848
  workspaceControlLockTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
737
849
  rigSetupTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
738
850
  sandboxWarmRateMicrosPerSecondJson: z.ZodDefault<z.ZodString>;
851
+ sandboxWarmBillingMode: z.ZodDefault<z.ZodEnum<{
852
+ credits: "credits";
853
+ shadow: "shadow";
854
+ usage_only: "usage_only";
855
+ }>>;
739
856
  sandboxMaxWarmSecondsPerWorkspace: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
740
857
  sandboxPreparationProfiles: z.ZodDefault<z.ZodString>;
741
858
  sandboxEnvAllowlist: z.ZodDefault<z.ZodString>;
859
+ sandboxImageAllowlist: z.ZodDefault<z.ZodString>;
742
860
  objectStorageEndpoint: z.ZodOptional<z.ZodString>;
743
861
  objectStorageInternalEndpoint: z.ZodOptional<z.ZodString>;
744
862
  objectStorageSandboxEndpoint: z.ZodOptional<z.ZodString>;
@@ -773,6 +891,13 @@ declare const SettingsSchema: z.ZodObject<{
773
891
  documentEmbeddingDimensions: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
774
892
  documentEmbeddingApiKey: z.ZodOptional<z.ZodString>;
775
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>>;
776
901
  documentCurationProvider: z.ZodDefault<z.ZodEnum<{
777
902
  heuristic: "heuristic";
778
903
  none: "none";
@@ -811,11 +936,13 @@ declare const SettingsSchema: z.ZodObject<{
811
936
  managedAuthGoogleClientSecret: z.ZodOptional<z.ZodString>;
812
937
  managedAuthGithubClientId: z.ZodOptional<z.ZodString>;
813
938
  managedAuthGithubClientSecret: z.ZodOptional<z.ZodString>;
939
+ allowedUserEmails: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodEmail, z.ZodTransform<string, string>>>>;
814
940
  managedAuthSessionSetMode: z.ZodDefault<z.ZodEnum<{
815
941
  broker: "broker";
816
942
  dual: "dual";
817
943
  legacy: "legacy";
818
944
  }>>;
945
+ managedAuthNewSignupsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
819
946
  organizationUserSetupEmailTokenTransport: z.ZodDefault<z.ZodEnum<{
820
947
  fragment: "fragment";
821
948
  query: "query";
@@ -838,6 +965,14 @@ declare const SettingsSchema: z.ZodObject<{
838
965
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
839
966
  connectionRef: z.ZodOptional<z.ZodObject<{
840
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>]>>;
841
976
  provider: z.ZodOptional<z.ZodString>;
842
977
  providerDomain: z.ZodString;
843
978
  kind: z.ZodOptional<z.ZodEnum<{
@@ -852,15 +987,99 @@ declare const SettingsSchema: z.ZodObject<{
852
987
  id: z.ZodString;
853
988
  kind: z.ZodLiteral<"repository">;
854
989
  }, z.core.$strict>>>;
855
- authoritySource: z.ZodOptional<z.ZodLiteral<"host">>;
856
990
  subjectScope: z.ZodOptional<z.ZodEnum<{
857
991
  subject: "subject";
858
992
  workspace: "workspace";
859
993
  }>>;
860
994
  }, z.core.$strict>>;
995
+ operationRecovery: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
996
+ observerTool: z.ZodString;
997
+ }, z.core.$strict>>>;
861
998
  }, z.core.$strip>>>;
862
999
  }, z.core.$strip>;
863
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;
864
1083
  export type McpServerConfig = Settings["mcpServers"][number];
865
1084
  export type GoogleDriveProviderRetryOptions = {
866
1085
  requestTimeoutMs: number;
@@ -915,6 +1134,17 @@ export type VoiceInputProviderConfig = {
915
1134
  kind: "supergrok-subscription";
916
1135
  experimental: true;
917
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;
918
1148
  /**
919
1149
  * Reject empty / template secrets so `.env.example` placeholders like
920
1150
  * `your-key` cannot advertise voice input as available and then 401 upstream.
@@ -968,6 +1198,24 @@ export type ModelUsageCostBreakdown = {
968
1198
  /** OpenGeni credit price after configured margin and latency-mode multiplier. */
969
1199
  creditCostMicros: number;
970
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
+ };
971
1219
  export type StaticUsageLimitsConfig = StaticUsageLimits;
972
1220
  export type EntitlementsConfig = Entitlements;
973
1221
  export declare const CapabilitySupportV1: z.ZodEnum<{
@@ -1144,7 +1392,7 @@ export type CredentialSourceV1 = {
1144
1392
  mechanism: "api_key" | "azure_ad_bearer" | "none";
1145
1393
  } | {
1146
1394
  kind: "connected_subscription";
1147
- provider: "codex" | "xai";
1395
+ provider: "codex" | "xai" | "claude";
1148
1396
  } | {
1149
1397
  kind: "workspace_connection";
1150
1398
  mechanism: "api_key";
@@ -1164,6 +1412,7 @@ export type BillingAttributionV1 = {
1164
1412
  * silently no-ops hosted tools (see docs/model-providers.md).
1165
1413
  */
1166
1414
  export declare const ModelProviderApi: z.ZodEnum<{
1415
+ "anthropic-messages": "anthropic-messages";
1167
1416
  chat: "chat";
1168
1417
  responses: "responses";
1169
1418
  }>;
@@ -1186,8 +1435,14 @@ export type ModelProviderWireProfile = z.infer<typeof ModelProviderWireProfile>;
1186
1435
  */
1187
1436
  export declare const RegistryProviderKind: z.ZodEnum<{
1188
1437
  anonymous: "anonymous";
1438
+ "anthropic-organization": "anthropic-organization";
1439
+ "anthropic-workspace": "anthropic-workspace";
1189
1440
  "api-key": "api-key";
1441
+ "claude-subscription-organization": "claude-subscription-organization";
1442
+ "claude-subscription-workspace": "claude-subscription-workspace";
1190
1443
  "codex-subscription": "codex-subscription";
1444
+ "direct-azure-workspace": "direct-azure-workspace";
1445
+ "direct-openai-workspace": "direct-openai-workspace";
1191
1446
  "openrouter-organization": "openrouter-organization";
1192
1447
  "openrouter-workspace": "openrouter-workspace";
1193
1448
  "vercel-gateway-managed": "vercel-gateway-managed";
@@ -1197,11 +1452,56 @@ export declare const RegistryProviderKind: z.ZodEnum<{
1197
1452
  }>;
1198
1453
  export type RegistryProviderKind = z.infer<typeof RegistryProviderKind>;
1199
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>;
1200
1494
  declare const RegistryProviderSchema: z.ZodObject<{
1201
1495
  kind: z.ZodDefault<z.ZodEnum<{
1202
1496
  anonymous: "anonymous";
1497
+ "anthropic-organization": "anthropic-organization";
1498
+ "anthropic-workspace": "anthropic-workspace";
1203
1499
  "api-key": "api-key";
1500
+ "claude-subscription-organization": "claude-subscription-organization";
1501
+ "claude-subscription-workspace": "claude-subscription-workspace";
1204
1502
  "codex-subscription": "codex-subscription";
1503
+ "direct-azure-workspace": "direct-azure-workspace";
1504
+ "direct-openai-workspace": "direct-openai-workspace";
1205
1505
  "openrouter-organization": "openrouter-organization";
1206
1506
  "openrouter-workspace": "openrouter-workspace";
1207
1507
  "vercel-gateway-managed": "vercel-gateway-managed";
@@ -1212,9 +1512,31 @@ declare const RegistryProviderSchema: z.ZodObject<{
1212
1512
  id: z.ZodString;
1213
1513
  label: z.ZodOptional<z.ZodString>;
1214
1514
  api: z.ZodDefault<z.ZodEnum<{
1515
+ "anthropic-messages": "anthropic-messages";
1215
1516
  chat: "chat";
1216
1517
  responses: "responses";
1217
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>>;
1218
1540
  wireProfile: z.ZodDefault<z.ZodEnum<{
1219
1541
  "azure-openai": "azure-openai";
1220
1542
  openai: "openai";
@@ -1650,9 +1972,31 @@ export declare const ModelCatalogDocument: z.ZodObject<{
1650
1972
  id: z.ZodString;
1651
1973
  label: z.ZodOptional<z.ZodString>;
1652
1974
  api: z.ZodDefault<z.ZodEnum<{
1975
+ "anthropic-messages": "anthropic-messages";
1653
1976
  chat: "chat";
1654
1977
  responses: "responses";
1655
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>>;
1656
2000
  wireProfile: z.ZodDefault<z.ZodEnum<{
1657
2001
  "azure-openai": "azure-openai";
1658
2002
  openai: "openai";
@@ -1830,6 +2174,324 @@ export declare const ModelCatalogDocument: z.ZodObject<{
1830
2174
  publicDefaultHeaderNames: z.ZodOptional<z.ZodNever>;
1831
2175
  publicDefaultQueryNames: z.ZodOptional<z.ZodNever>;
1832
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
+ }>>>>;
1833
2495
  gatewayModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
1834
2496
  productId: z.ZodString;
1835
2497
  workspaceProductId: z.ZodString;
@@ -2033,6 +2695,7 @@ export type IntegrationOAuthClientConfig = z.infer<typeof IntegrationOAuthClient
2033
2695
  * replacement.
2034
2696
  */
2035
2697
  export interface ResolvedModelProvider {
2698
+ anthropic?: z.infer<typeof AnthropicProviderOptions> | undefined;
2036
2699
  id: string;
2037
2700
  label: string;
2038
2701
  kind: RegistryProviderKind | "openrouter-managed";
@@ -2082,6 +2745,20 @@ export interface ConfiguredModel {
2082
2745
  reasoningEffort: boolean;
2083
2746
  hostedWebSearch: boolean;
2084
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;
2085
2762
  export declare const VERCEL_AI_GATEWAY_BASE_URL: "https://ai-gateway.vercel.sh/v1";
2086
2763
  export declare const VERCEL_AI_GATEWAY_AI_SDK_BASE_URL: "https://ai-gateway.vercel.sh/v4/ai";
2087
2764
  export declare const VERCEL_AI_GATEWAY_CONNECTION_DOMAIN: "ai-gateway.vercel.sh";
@@ -2166,6 +2843,8 @@ export declare function configuredOpenRouterOrganizationProductModelIds(settings
2166
2843
  * llm-prices.com as a ground-truth canary; it does not generate this table.
2167
2844
  */
2168
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>;
2169
2848
  export type SandboxRequiredEnv = {
2170
2849
  field: keyof Settings;
2171
2850
  env: string;
@@ -2235,6 +2914,17 @@ export declare function collectSandboxEnvironment(settings: Settings, source?: N
2235
2914
  */
2236
2915
  export declare function resolveProviderApiKey(provider: Pick<RegistryProvider, "apiKey" | "apiKeyEnv">, source?: NodeJS.ProcessEnv): string | undefined;
2237
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;
2238
2928
  /** Static catalog overlay; it contains no concrete workspace credential. */
2239
2929
  export declare function withWorkspaceGatewayCatalogProvider(settings: Settings, customModels?: readonly {
2240
2930
  upstreamModelId: string;
@@ -2296,6 +2986,13 @@ export declare function serviceTierForLatencyMode(providerId: string, latencyMod
2296
2986
  /** True when the response tier fulfills a non-standard Fast/priority request. */
2297
2987
  export declare function responseSatisfiesLatencyMode(requested: LatencyMode, responseServiceTier: string | null | undefined): boolean;
2298
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
+ }
2299
2996
  export declare function modelCostClassForConfiguredModel(_settings: Settings, model: Pick<ConfiguredModel, "cost">): ConfiguredModelCostClass;
2300
2997
  /**
2301
2998
  * The built-in provider's stable id: "openai" on the OpenAI platform, "azure"
@@ -2320,6 +3017,8 @@ export declare function configuredProviders(settings: Settings, source?: NodeJS.
2320
3017
  * select, lease, refresh, or expose a concrete credential; those runtime
2321
3018
  * operations remain owned by the credential allocator.
2322
3019
  */
3020
+ /** Exact upstream slugs of the active Codex catalog (or the built-in fallback list). */
3021
+ export declare function codexUpstreamModelSlugs(settings: Settings): string[];
2323
3022
  export declare function withCodexCatalogProvider(settings: Settings): Settings;
2324
3023
  /**
2325
3024
  * Static SuperGrok product catalogue, matching the Codex subscription seam.
@@ -2360,6 +3059,14 @@ export declare function canonicalizeConfiguredModelId(settings: Settings, modelI
2360
3059
  * openai allow-list, then registry ids.
2361
3060
  */
2362
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;
2363
3070
  /**
2364
3071
  * Resolve a model string to the provider that serves it and its configured
2365
3072
  * shape. Returns undefined when the id is not exposed (built-in allow-list nor
@@ -2393,10 +3100,15 @@ export declare function resolveModelProviderForTurn(settings: Settings, modelId:
2393
3100
  * neither proves readiness nor chooses, decrypts, leases, or exposes an account.
2394
3101
  */
2395
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
+ }
2396
3108
  /**
2397
3109
  * Parse-time validation lives in @opengeni/contracts; this verifier binds a
2398
3110
  * present snapshot to the current executable definition and exact turn row.
2399
- * Any deployment/provider drift fails before a provider or compaction call.
3111
+ * Non-additive executable drift fails before a provider or compaction call.
2400
3112
  */
2401
3113
  export declare function assertTurnExecutionPolicyMatchesConfigV1(settings: Settings, policy: TurnExecutionPolicyV1, expected: {
2402
3114
  modelId: string;
@@ -2414,6 +3126,13 @@ export declare function assertTurnExecutionPolicyMatchesConfigV1(settings: Setti
2414
3126
  * complete schedule, and always replace the lower-precedence schedule.
2415
3127
  */
2416
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>;
2417
3136
  /** Legacy flat projection: returns the default/below-threshold price. */
2418
3137
  export declare function configuredModelPricing(settings: Settings): Record<string, ModelPricing>;
2419
3138
  /** Select the per-provider-request price at an exact input-token threshold. */
@@ -2437,6 +3156,29 @@ export declare function calculateModelUsageCostMicros(settings: Settings, model:
2437
3156
  export declare function calculateModelUsageCostBreakdown(settings: Settings, model: string, usage: ModelUsageInput, options?: {
2438
3157
  latencyMode?: LatencyMode;
2439
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;
2440
3182
  /**
2441
3183
  * Convert AI Gateway's exact USD inference cost to OpenGeni credit micros and
2442
3184
  * apply the configured model margin. Decimal arithmetic is integer-only so a
@@ -2564,6 +3306,7 @@ export declare function applyGitAuthPointerEnvironment(environment: Record<strin
2564
3306
  email: string;
2565
3307
  } | null): Record<string, string>;
2566
3308
  export type StartupRetryOptions = {
3309
+ shouldRetry?: (error: unknown) => boolean;
2567
3310
  attempts?: number;
2568
3311
  initialDelayMs?: number;
2569
3312
  maxDelayMs?: number;
@@ -2575,7 +3318,7 @@ export type StartupRetryOptions = {
2575
3318
  error: unknown;
2576
3319
  }) => void;
2577
3320
  };
2578
- export declare function startupRetryOptions(settings: Settings): Required<Omit<StartupRetryOptions, "onRetry">>;
3321
+ export declare function startupRetryOptions(settings: Settings): Required<Omit<StartupRetryOptions, "onRetry" | "shouldRetry">>;
2579
3322
  export declare function retryStartupDependency<T>(label: string, operation: () => Promise<T>, options?: StartupRetryOptions): Promise<T>;
2580
3323
  export declare function sandboxEnvironmentVariableNames(settings: Settings): string[];
2581
3324
  export declare function sandboxLifecycleHookIds(settings: Settings): string[];
@@ -2624,6 +3367,31 @@ export declare function firstPartyMcpInternalBaseUrl(settings: Settings): string
2624
3367
  export declare function firstPartyMcpWorkspaceUrl(settings: Settings, workspaceId: string): string;
2625
3368
  export declare function firstPartyMcpInternalWorkspaceUrl(settings: Settings, workspaceId: string): string;
2626
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;
2627
3395
  /** Validate one fully resolved, secret-bearing executable catalog. */
2628
3396
  export declare function validateModelCatalogSettings(settings: Settings, source?: NodeJS.ProcessEnv): ConfiguredModel[];
2629
3397
  /**
@@ -2688,4 +3456,32 @@ export interface NatsControlPlaneAuth {
2688
3456
  user: string;
2689
3457
  password: string;
2690
3458
  }
2691
- 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";