@opengeni/config 1.2.2 → 2.0.0-canary.35625901699001

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
@@ -45,6 +45,7 @@ export declare const AGENT_INSTRUCTIONS_CORE_PLACEHOLDER = "{{core}}";
45
45
  export declare const DEFAULT_AGENT_INSTRUCTIONS: string;
46
46
  export declare const McpServerConnectionRefSchema: z.ZodObject<{
47
47
  connectionId: z.ZodOptional<z.ZodString>;
48
+ accountSelection: z.ZodOptional<z.ZodLiteral<"all_eligible">>;
48
49
  authoritySource: z.ZodOptional<z.ZodLiteral<"host">>;
49
50
  hostBinding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
50
51
  bindingId: z.ZodString;
@@ -117,6 +118,8 @@ declare const SettingsSchema: z.ZodObject<{
117
118
  observabilityMetricsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
118
119
  observabilityOtlpEndpoint: z.ZodOptional<z.ZodString>;
119
120
  observabilityOtlpHeaders: z.ZodDefault<z.ZodString>;
121
+ observabilityDiagnosticsEndpoint: z.ZodOptional<z.ZodString>;
122
+ observabilityDiagnosticsHeaders: z.ZodDefault<z.ZodString>;
120
123
  analyticsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
121
124
  analyticsConsentRequired: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
122
125
  analyticsReoClientId: z.ZodOptional<z.ZodString>;
@@ -225,6 +228,7 @@ declare const SettingsSchema: z.ZodObject<{
225
228
  knowledge_browse: "knowledge_browse";
226
229
  knowledge_correct: "knowledge_correct";
227
230
  knowledge_get: "knowledge_get";
231
+ knowledge_prepare_save: "knowledge_prepare_save";
228
232
  knowledge_propose: "knowledge_propose";
229
233
  knowledge_retain_file: "knowledge_retain_file";
230
234
  knowledge_retain_message: "knowledge_retain_message";
@@ -393,6 +397,7 @@ declare const SettingsSchema: z.ZodObject<{
393
397
  knowledge_browse: "knowledge_browse";
394
398
  knowledge_correct: "knowledge_correct";
395
399
  knowledge_get: "knowledge_get";
400
+ knowledge_prepare_save: "knowledge_prepare_save";
396
401
  knowledge_propose: "knowledge_propose";
397
402
  knowledge_retain_file: "knowledge_retain_file";
398
403
  knowledge_retain_message: "knowledge_retain_message";
@@ -533,8 +538,6 @@ declare const SettingsSchema: z.ZodObject<{
533
538
  goalIdleBackoffMs: z.ZodDefault<z.ZodPreprocess<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>>;
534
539
  goalIdleBackoffMaxMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
535
540
  childLifecycleNoticesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
536
- hostMcpAuthoritySourceAdmissionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
537
- hostMcpCredentialResolversJson: z.ZodOptional<z.ZodString>;
538
541
  slackWorkspaceRoutingEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
539
542
  agentMaxModelCallsPerTurn: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
540
543
  contextWindowTokens: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -612,6 +615,7 @@ declare const SettingsSchema: z.ZodObject<{
612
615
  lazyToolSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
613
616
  codexFleetPolicyShadowEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
614
617
  codexRotationNearExhaustionPct: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
618
+ reasoningConfigurationUpdatesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
615
619
  openaiReasoningEffort: z.ZodDefault<z.ZodEnum<{
616
620
  high: "high";
617
621
  low: "low";
@@ -662,6 +666,7 @@ declare const SettingsSchema: z.ZodObject<{
662
666
  dockerWorkspaceBaseDir: z.ZodOptional<z.ZodString>;
663
667
  modalAppName: z.ZodDefault<z.ZodString>;
664
668
  modalImageRef: z.ZodOptional<z.ZodString>;
669
+ modalCommandSupervisionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
665
670
  modalImageId: z.ZodOptional<z.ZodString>;
666
671
  modalImageRegistrySecret: z.ZodOptional<z.ZodString>;
667
672
  modalTimeoutSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -881,6 +886,7 @@ declare const SettingsSchema: z.ZodObject<{
881
886
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
882
887
  connectionRef: z.ZodOptional<z.ZodObject<{
883
888
  connectionId: z.ZodOptional<z.ZodString>;
889
+ accountSelection: z.ZodOptional<z.ZodLiteral<"all_eligible">>;
884
890
  authoritySource: z.ZodOptional<z.ZodLiteral<"host">>;
885
891
  hostBinding: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
886
892
  bindingId: z.ZodString;
@@ -913,6 +919,88 @@ declare const SettingsSchema: z.ZodObject<{
913
919
  }, z.core.$strip>>>;
914
920
  }, z.core.$strip>;
915
921
  export type Settings = z.infer<typeof SettingsSchema>;
922
+ declare const ArtifactOutboxSettingsSchema: z.ZodObject<{
923
+ serviceName: z.ZodDefault<z.ZodString>;
924
+ environment: z.ZodDefault<z.ZodString>;
925
+ deploymentRevision: z.ZodDefault<z.ZodString>;
926
+ dbSchema: z.ZodDefault<z.ZodString>;
927
+ rlsStrategy: z.ZodDefault<z.ZodEnum<{
928
+ force: "force";
929
+ scoped: "scoped";
930
+ }>>;
931
+ observabilityStructuredLogs: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
932
+ observabilityMetricsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
933
+ observabilityOtlpEndpoint: z.ZodOptional<z.ZodString>;
934
+ observabilityOtlpHeaders: z.ZodDefault<z.ZodString>;
935
+ natsUrl: z.ZodDefault<z.ZodString>;
936
+ selfhostedNatsControlUser: z.ZodOptional<z.ZodString>;
937
+ selfhostedNatsControlPassword: z.ZodOptional<z.ZodString>;
938
+ }, z.core.$strip>;
939
+ declare const ObjectStorageSettingsSchema: z.ZodObject<{
940
+ objectStorageEndpoint: z.ZodOptional<z.ZodString>;
941
+ objectStorageInternalEndpoint: z.ZodOptional<z.ZodString>;
942
+ objectStorageSandboxEndpoint: z.ZodOptional<z.ZodString>;
943
+ objectStorageBackend: z.ZodDefault<z.ZodEnum<{
944
+ "aws-s3": "aws-s3";
945
+ "azure-blob": "azure-blob";
946
+ gcs: "gcs";
947
+ "s3-compatible": "s3-compatible";
948
+ }>>;
949
+ objectStorageBucket: z.ZodDefault<z.ZodString>;
950
+ objectStorageRegion: z.ZodDefault<z.ZodString>;
951
+ objectStorageAccessKeyId: z.ZodOptional<z.ZodString>;
952
+ objectStorageSecretAccessKey: z.ZodOptional<z.ZodString>;
953
+ objectStorageForcePathStyle: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
954
+ objectStorageAzureConnectionString: z.ZodOptional<z.ZodString>;
955
+ objectStorageAzureAccountName: z.ZodOptional<z.ZodString>;
956
+ objectStorageAzureAccountKey: z.ZodOptional<z.ZodString>;
957
+ objectStorageAzureEndpoint: z.ZodOptional<z.ZodString>;
958
+ objectStorageGcsProjectId: z.ZodOptional<z.ZodString>;
959
+ objectStorageGcsCredentialsJson: z.ZodOptional<z.ZodString>;
960
+ objectStorageGcsKeyFilename: z.ZodOptional<z.ZodString>;
961
+ objectStorageGcsApiEndpoint: z.ZodOptional<z.ZodString>;
962
+ }, z.core.$strip>;
963
+ declare const ArtifactMaterializerSettingsSchema: z.ZodObject<{
964
+ serviceName: z.ZodDefault<z.ZodString>;
965
+ environment: z.ZodDefault<z.ZodString>;
966
+ deploymentRevision: z.ZodDefault<z.ZodString>;
967
+ dbSchema: z.ZodDefault<z.ZodString>;
968
+ rlsStrategy: z.ZodDefault<z.ZodEnum<{
969
+ force: "force";
970
+ scoped: "scoped";
971
+ }>>;
972
+ observabilityStructuredLogs: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
973
+ observabilityMetricsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
974
+ observabilityOtlpEndpoint: z.ZodOptional<z.ZodString>;
975
+ observabilityOtlpHeaders: z.ZodDefault<z.ZodString>;
976
+ objectStorageEndpoint: z.ZodOptional<z.ZodString>;
977
+ objectStorageInternalEndpoint: z.ZodOptional<z.ZodString>;
978
+ objectStorageSandboxEndpoint: z.ZodOptional<z.ZodString>;
979
+ objectStorageBackend: z.ZodDefault<z.ZodEnum<{
980
+ "aws-s3": "aws-s3";
981
+ "azure-blob": "azure-blob";
982
+ gcs: "gcs";
983
+ "s3-compatible": "s3-compatible";
984
+ }>>;
985
+ objectStorageBucket: z.ZodDefault<z.ZodString>;
986
+ objectStorageRegion: z.ZodDefault<z.ZodString>;
987
+ objectStorageAccessKeyId: z.ZodOptional<z.ZodString>;
988
+ objectStorageSecretAccessKey: z.ZodOptional<z.ZodString>;
989
+ objectStorageForcePathStyle: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
990
+ objectStorageAzureConnectionString: z.ZodOptional<z.ZodString>;
991
+ objectStorageAzureAccountName: z.ZodOptional<z.ZodString>;
992
+ objectStorageAzureAccountKey: z.ZodOptional<z.ZodString>;
993
+ objectStorageAzureEndpoint: z.ZodOptional<z.ZodString>;
994
+ objectStorageGcsProjectId: z.ZodOptional<z.ZodString>;
995
+ objectStorageGcsCredentialsJson: z.ZodOptional<z.ZodString>;
996
+ objectStorageGcsKeyFilename: z.ZodOptional<z.ZodString>;
997
+ objectStorageGcsApiEndpoint: z.ZodOptional<z.ZodString>;
998
+ }, z.core.$strip>;
999
+ export type ArtifactOutboxSettings = z.infer<typeof ArtifactOutboxSettingsSchema>;
1000
+ export type ObjectStorageSettings = z.infer<typeof ObjectStorageSettingsSchema>;
1001
+ export type ArtifactMaterializerSettings = z.infer<typeof ArtifactMaterializerSettingsSchema>;
1002
+ export declare function getArtifactOutboxSettings(source?: NodeJS.ProcessEnv): ArtifactOutboxSettings;
1003
+ export declare function getArtifactMaterializerSettings(source?: NodeJS.ProcessEnv): ArtifactMaterializerSettings;
916
1004
  export type McpServerConfig = Settings["mcpServers"][number];
917
1005
  export type GoogleDriveProviderRetryOptions = {
918
1006
  requestTimeoutMs: number;
@@ -2616,6 +2704,7 @@ export declare function applyGitAuthPointerEnvironment(environment: Record<strin
2616
2704
  email: string;
2617
2705
  } | null): Record<string, string>;
2618
2706
  export type StartupRetryOptions = {
2707
+ shouldRetry?: (error: unknown) => boolean;
2619
2708
  attempts?: number;
2620
2709
  initialDelayMs?: number;
2621
2710
  maxDelayMs?: number;
@@ -2627,7 +2716,7 @@ export type StartupRetryOptions = {
2627
2716
  error: unknown;
2628
2717
  }) => void;
2629
2718
  };
2630
- export declare function startupRetryOptions(settings: Settings): Required<Omit<StartupRetryOptions, "onRetry">>;
2719
+ export declare function startupRetryOptions(settings: Settings): Required<Omit<StartupRetryOptions, "onRetry" | "shouldRetry">>;
2631
2720
  export declare function retryStartupDependency<T>(label: string, operation: () => Promise<T>, options?: StartupRetryOptions): Promise<T>;
2632
2721
  export declare function sandboxEnvironmentVariableNames(settings: Settings): string[];
2633
2722
  export declare function sandboxLifecycleHookIds(settings: Settings): string[];
@@ -2740,4 +2829,4 @@ export interface NatsControlPlaneAuth {
2740
2829
  user: string;
2741
2830
  password: string;
2742
2831
  }
2743
- export declare function resolveNatsControlPlaneAuth(settings: Settings): NatsControlPlaneAuth | null;
2832
+ export declare function resolveNatsControlPlaneAuth(settings: Pick<Settings, "selfhostedNatsControlUser" | "selfhostedNatsControlPassword">): NatsControlPlaneAuth | null;
package/dist/index.js CHANGED
@@ -144,7 +144,7 @@ var sandboxPreparationProfiles = {
144
144
  var AGENT_INSTRUCTIONS_CORE_PLACEHOLDER = "{{core}}";
145
145
  var DEFAULT_AGENT_INSTRUCTIONS = [
146
146
  "You are an OpenGeni workspace agent.",
147
- "Follow the user's task and any enabled pack or skill instructions for the current role.",
147
+ "Follow the user's task and the applicable Skill instructions for the current role.",
148
148
  "Work inside the sandbox workspace and use filesystem and shell tools when useful.",
149
149
  "Repository resources are mounted under repos/<host>/<owner>/<repo> unless the session specifies another collision-free mount path.",
150
150
  "File resources are mounted under .opengeni/files/<file-id>/ unless the session specifies another mount path.",
@@ -221,6 +221,8 @@ var SettingsSchema = z.object({
221
221
  observabilityMetricsEnabled: EnvBoolean.default(true),
222
222
  observabilityOtlpEndpoint: z.string().url().optional(),
223
223
  observabilityOtlpHeaders: z.string().default(""),
224
+ observabilityDiagnosticsEndpoint: z.string().url().optional(),
225
+ observabilityDiagnosticsHeaders: z.string().default(""),
224
226
  analyticsEnabled: EnvBoolean.default(false),
225
227
  analyticsConsentRequired: EnvBoolean.default(true),
226
228
  analyticsReoClientId: z.string().max(128).regex(/^[A-Za-z0-9_-]+$/u).optional(),
@@ -367,16 +369,6 @@ var SettingsSchema = z.object({
367
369
  // into @opengeni/db once at boot.
368
370
  // Env: OPENGENI_CHILD_LIFECYCLE_NOTICES_ENABLED.
369
371
  childLifecycleNoticesEnabled: EnvBoolean.default(false),
370
- // Explicit host-owned MCP connection authority is a rolling protocol
371
- // activation. Keep it off while any API, worker, or browser bundle predates
372
- // the authority discriminator; enable it only after the whole fleet runs an
373
- // image that understands host refs. Legacy markerless non-UUID refs remain a
374
- // separate compatibility lane for already-persisted embedding integrations.
375
- // Env: OPENGENI_HOST_MCP_AUTHORITY_SOURCE_ADMISSION_ENABLED.
376
- hostMcpAuthoritySourceAdmissionEnabled: EnvBoolean.default(false),
377
- // Server-owned per-organization remote MCP resolver configuration. Optional;
378
- // inline credentials and native provider OAuth do not require this service.
379
- hostMcpCredentialResolversJson: z.string().optional(),
380
372
  // Per-channel and per-DM Slack workspace routing. Default ON. A channel does
381
373
  // not count a personal workspace as a candidate, so an organization with one
382
374
  // shared workspace resolves it as the sole candidate and never asks; the
@@ -571,6 +563,7 @@ var SettingsSchema = z.object({
571
563
  // rotated TO — when EITHER usage window (5h/weekly) is at/over this percent. Default 90 to
572
564
  // match the UI danger flip (UsageBar danger at pct >= 90). OPENGENI_CODEX_ROTATION_NEAR_EXHAUSTION_PCT.
573
565
  codexRotationNearExhaustionPct: z.coerce.number().int().min(1).max(100).default(90),
566
+ reasoningConfigurationUpdatesEnabled: EnvBoolean.default(false),
574
567
  openaiReasoningEffort: ReasoningEffort.default("low"),
575
568
  openaiAllowedReasoningEfforts: z.string().default("low,medium,high,xhigh,max"),
576
569
  openaiResponsesTransport: z.enum(["http", "websocket"]).default("http"),
@@ -619,7 +612,6 @@ var SettingsSchema = z.object({
619
612
  // the verified, self-contained native artifact runtime at its fixed image
620
613
  // paths. Disabled by default so arbitrary/custom provider images never make
621
614
  // document/spreadsheet/presentation skills appear when their runtime is
622
- // absent. Per-pack/per-rig image overrides fail closed in the worker even
623
615
  // when this base-image contract is enabled.
624
616
  sandboxArtifactRuntimeEnabled: EnvBoolean.default(false),
625
617
  dockerExposedPorts: z.string().default(""),
@@ -631,6 +623,9 @@ var SettingsSchema = z.object({
631
623
  dockerWorkspaceBaseDir: z.string().min(1).optional(),
632
624
  modalAppName: z.string().default("opengeni-sandbox"),
633
625
  modalImageRef: z.string().optional(),
626
+ // Activate only after descriptor-aware readers, DB fences and the exact
627
+ // native image have passed the supervised-command rollout canary.
628
+ modalCommandSupervisionEnabled: EnvBoolean.default(false),
634
629
  // Provider-native immutable Modal image ID for the exact logical
635
630
  // `modalImageRef`. When set, the runtime uses ModalImageSelector.fromId and
636
631
  // never asks Modal to parse or import the registry ref. The logical ref is
@@ -1123,6 +1118,103 @@ var SettingsSchema = z.object({
1123
1118
  })
1124
1119
  ).default([])
1125
1120
  });
1121
+ var ArtifactServiceSettingsSchema = SettingsSchema.pick({
1122
+ serviceName: true,
1123
+ environment: true,
1124
+ deploymentRevision: true,
1125
+ dbSchema: true,
1126
+ rlsStrategy: true,
1127
+ observabilityStructuredLogs: true,
1128
+ observabilityMetricsEnabled: true,
1129
+ observabilityOtlpEndpoint: true,
1130
+ observabilityOtlpHeaders: true
1131
+ });
1132
+ var ArtifactOutboxSettingsSchema = ArtifactServiceSettingsSchema.extend({
1133
+ natsUrl: SettingsSchema.shape.natsUrl,
1134
+ selfhostedNatsControlUser: SettingsSchema.shape.selfhostedNatsControlUser,
1135
+ selfhostedNatsControlPassword: SettingsSchema.shape.selfhostedNatsControlPassword
1136
+ });
1137
+ var ObjectStorageSettingsSchema = SettingsSchema.pick({
1138
+ objectStorageBackend: true,
1139
+ objectStorageEndpoint: true,
1140
+ objectStorageInternalEndpoint: true,
1141
+ objectStorageSandboxEndpoint: true,
1142
+ objectStorageBucket: true,
1143
+ objectStorageRegion: true,
1144
+ objectStorageAccessKeyId: true,
1145
+ objectStorageSecretAccessKey: true,
1146
+ objectStorageForcePathStyle: true,
1147
+ objectStorageAzureConnectionString: true,
1148
+ objectStorageAzureAccountName: true,
1149
+ objectStorageAzureAccountKey: true,
1150
+ objectStorageAzureEndpoint: true,
1151
+ objectStorageGcsProjectId: true,
1152
+ objectStorageGcsCredentialsJson: true,
1153
+ objectStorageGcsKeyFilename: true,
1154
+ objectStorageGcsApiEndpoint: true
1155
+ });
1156
+ var ArtifactMaterializerSettingsSchema = ArtifactServiceSettingsSchema.extend(
1157
+ ObjectStorageSettingsSchema.shape
1158
+ );
1159
+ function artifactServiceEnvironment(source) {
1160
+ const optional = (name) => optionalEnvironmentValue(name, source);
1161
+ return {
1162
+ serviceName: optional("OPENGENI_SERVICE_NAME"),
1163
+ environment: optional("OPENGENI_ENVIRONMENT"),
1164
+ deploymentRevision: optional("OPENGENI_DEPLOYMENT_REVISION") ?? optional("SOURCE_VERSION") ?? optional("GITHUB_SHA"),
1165
+ dbSchema: optional("OPENGENI_DB_SCHEMA"),
1166
+ rlsStrategy: optional("OPENGENI_RLS_STRATEGY"),
1167
+ observabilityStructuredLogs: optional("OPENGENI_OBSERVABILITY_STRUCTURED_LOGS"),
1168
+ observabilityMetricsEnabled: optional("OPENGENI_OBSERVABILITY_METRICS_ENABLED"),
1169
+ observabilityOtlpEndpoint: optional("OPENGENI_OTEL_EXPORTER_OTLP_ENDPOINT") ?? optional("OTEL_EXPORTER_OTLP_ENDPOINT"),
1170
+ observabilityOtlpHeaders: optional("OPENGENI_OTEL_EXPORTER_OTLP_HEADERS") ?? optional("OTEL_EXPORTER_OTLP_HEADERS")
1171
+ };
1172
+ }
1173
+ function getArtifactOutboxSettings(source = process.env) {
1174
+ const settings = ArtifactOutboxSettingsSchema.parse({
1175
+ ...artifactServiceEnvironment(source),
1176
+ natsUrl: optionalEnvironmentValue("OPENGENI_NATS_URL", source),
1177
+ selfhostedNatsControlUser: optionalEnvironmentValue(
1178
+ "OPENGENI_SELFHOSTED_NATS_CONTROL_USER",
1179
+ source
1180
+ ),
1181
+ selfhostedNatsControlPassword: optionalEnvironmentValue(
1182
+ "OPENGENI_SELFHOSTED_NATS_CONTROL_PASSWORD",
1183
+ source
1184
+ )
1185
+ });
1186
+ dbSearchPath(settings);
1187
+ if (Boolean(settings.selfhostedNatsControlUser) !== Boolean(settings.selfhostedNatsControlPassword)) {
1188
+ throw new Error("Artifact outbox NATS control user and password must be configured together");
1189
+ }
1190
+ return settings;
1191
+ }
1192
+ function getArtifactMaterializerSettings(source = process.env) {
1193
+ const optional = (name) => optionalEnvironmentValue(name, source);
1194
+ const settings = ArtifactMaterializerSettingsSchema.parse({
1195
+ ...artifactServiceEnvironment(source),
1196
+ objectStorageEndpoint: optional("OPENGENI_OBJECT_STORAGE_ENDPOINT"),
1197
+ objectStorageInternalEndpoint: optional("OPENGENI_OBJECT_STORAGE_INTERNAL_ENDPOINT"),
1198
+ objectStorageSandboxEndpoint: optional("OPENGENI_OBJECT_STORAGE_SANDBOX_ENDPOINT"),
1199
+ objectStorageBackend: optional("OPENGENI_OBJECT_STORAGE_BACKEND"),
1200
+ objectStorageBucket: optional("OPENGENI_OBJECT_STORAGE_BUCKET"),
1201
+ objectStorageRegion: optional("OPENGENI_OBJECT_STORAGE_REGION"),
1202
+ objectStorageAccessKeyId: optional("OPENGENI_OBJECT_STORAGE_ACCESS_KEY_ID"),
1203
+ objectStorageSecretAccessKey: optional("OPENGENI_OBJECT_STORAGE_SECRET_ACCESS_KEY"),
1204
+ objectStorageForcePathStyle: optional("OPENGENI_OBJECT_STORAGE_FORCE_PATH_STYLE"),
1205
+ objectStorageAzureConnectionString: optional("OPENGENI_OBJECT_STORAGE_AZURE_CONNECTION_STRING"),
1206
+ objectStorageAzureAccountName: optional("OPENGENI_OBJECT_STORAGE_AZURE_ACCOUNT_NAME"),
1207
+ objectStorageAzureAccountKey: optional("OPENGENI_OBJECT_STORAGE_AZURE_ACCOUNT_KEY"),
1208
+ objectStorageAzureEndpoint: optional("OPENGENI_OBJECT_STORAGE_AZURE_ENDPOINT"),
1209
+ objectStorageGcsProjectId: optional("OPENGENI_OBJECT_STORAGE_GCS_PROJECT_ID"),
1210
+ objectStorageGcsCredentialsJson: optional("OPENGENI_OBJECT_STORAGE_GCS_CREDENTIALS_JSON"),
1211
+ objectStorageGcsKeyFilename: optional("OPENGENI_OBJECT_STORAGE_GCS_KEY_FILENAME"),
1212
+ objectStorageGcsApiEndpoint: optional("OPENGENI_OBJECT_STORAGE_GCS_API_ENDPOINT")
1213
+ });
1214
+ dbSearchPath(settings);
1215
+ validateObjectStorageSettings(settings);
1216
+ return settings;
1217
+ }
1126
1218
  function configuredGoogleDriveSyncLimits(settings) {
1127
1219
  return KnowledgeSourceSyncLimits.parse({
1128
1220
  maxItems: settings.googleDriveSyncMaxItems,
@@ -2160,6 +2252,8 @@ function getSettings(source = process.env) {
2160
2252
  observabilityMetricsEnabled: optional("OPENGENI_OBSERVABILITY_METRICS_ENABLED"),
2161
2253
  observabilityOtlpEndpoint: optional("OPENGENI_OTEL_EXPORTER_OTLP_ENDPOINT") ?? optional("OTEL_EXPORTER_OTLP_ENDPOINT"),
2162
2254
  observabilityOtlpHeaders: optional("OPENGENI_OTEL_EXPORTER_OTLP_HEADERS") ?? optional("OTEL_EXPORTER_OTLP_HEADERS"),
2255
+ observabilityDiagnosticsEndpoint: optional("OPENGENI_OBSERVABILITY_DIAGNOSTICS_ENDPOINT"),
2256
+ observabilityDiagnosticsHeaders: optional("OPENGENI_OBSERVABILITY_DIAGNOSTICS_HEADERS"),
2163
2257
  analyticsEnabled: optional("OPENGENI_ANALYTICS_ENABLED"),
2164
2258
  analyticsConsentRequired: optional("OPENGENI_ANALYTICS_CONSENT_REQUIRED"),
2165
2259
  analyticsReoClientId: optional("OPENGENI_ANALYTICS_REO_CLIENT_ID"),
@@ -2240,10 +2334,6 @@ function getSettings(source = process.env) {
2240
2334
  goalIdleBackoffMs: optional("OPENGENI_GOAL_IDLE_BACKOFF_MS"),
2241
2335
  goalIdleBackoffMaxMs: optional("OPENGENI_GOAL_IDLE_BACKOFF_MAX_MS"),
2242
2336
  childLifecycleNoticesEnabled: optional("OPENGENI_CHILD_LIFECYCLE_NOTICES_ENABLED"),
2243
- hostMcpAuthoritySourceAdmissionEnabled: optional(
2244
- "OPENGENI_HOST_MCP_AUTHORITY_SOURCE_ADMISSION_ENABLED"
2245
- ),
2246
- hostMcpCredentialResolversJson: optional("OPENGENI_HOST_MCP_CREDENTIAL_RESOLVERS_JSON"),
2247
2337
  slackWorkspaceRoutingEnabled: optional("OPENGENI_SLACK_WORKSPACE_ROUTING_ENABLED"),
2248
2338
  agentMaxModelCallsPerTurn: optional("OPENGENI_AGENT_MAX_MODEL_CALLS_PER_TURN"),
2249
2339
  contextWindowTokens: optional("OPENGENI_CONTEXT_WINDOW_TOKENS"),
@@ -2328,6 +2418,9 @@ function getSettings(source = process.env) {
2328
2418
  lazyToolSearchEnabled: optional("OPENGENI_LAZY_TOOL_SEARCH_ENABLED"),
2329
2419
  codexFleetPolicyShadowEnabled: optional("OPENGENI_CODEX_FLEET_POLICY_SHADOW_ENABLED"),
2330
2420
  codexProductSku: optional("OPENGENI_CODEX_PRODUCT_SKU"),
2421
+ reasoningConfigurationUpdatesEnabled: optional(
2422
+ "OPENGENI_REASONING_CONFIGURATION_UPDATES_ENABLED"
2423
+ ),
2331
2424
  openaiReasoningEffort: optional("OPENGENI_OPENAI_REASONING_EFFORT"),
2332
2425
  openaiAllowedReasoningEfforts: optional("OPENGENI_OPENAI_ALLOWED_REASONING_EFFORTS"),
2333
2426
  openaiResponsesTransport: optional("OPENGENI_OPENAI_RESPONSES_TRANSPORT"),
@@ -2351,6 +2444,7 @@ function getSettings(source = process.env) {
2351
2444
  dockerWorkspaceBaseDir: optional("OPENGENI_DOCKER_WORKSPACE_BASE_DIR"),
2352
2445
  modalAppName: optional("OPENGENI_MODAL_APP_NAME"),
2353
2446
  modalImageRef: optional("OPENGENI_MODAL_IMAGE_REF") ?? DEFAULT_MODAL_IMAGE_REF,
2447
+ modalCommandSupervisionEnabled: optional("OPENGENI_MODAL_COMMAND_SUPERVISION_ENABLED"),
2354
2448
  modalImageId: optional("OPENGENI_MODAL_IMAGE_ID"),
2355
2449
  modalImageRegistrySecret: optional("OPENGENI_MODAL_IMAGE_REGISTRY_SECRET"),
2356
2450
  modalTimeoutSeconds: optional("OPENGENI_MODAL_TIMEOUT_SECONDS"),
@@ -4192,7 +4286,7 @@ async function retryStartupDependency(label, operation, options = {}) {
4192
4286
  try {
4193
4287
  return await operation();
4194
4288
  } catch (error) {
4195
- if (attempt >= attempts) {
4289
+ if (attempt >= attempts || options.shouldRetry?.(error) === false) {
4196
4290
  throw error;
4197
4291
  }
4198
4292
  const delayMs = Math.min(maxDelayMs, initialDelayMs * 2 ** (attempt - 1));
@@ -4936,60 +5030,7 @@ function validateSettings(settings, source = process.env) {
4936
5030
  );
4937
5031
  }
4938
5032
  }
4939
- if (settings.objectStorageBackend === "s3-compatible" || settings.objectStorageBackend === "aws-s3") {
4940
- if (Boolean(settings.objectStorageAccessKeyId) !== Boolean(settings.objectStorageSecretAccessKey)) {
4941
- throw new Error(
4942
- "OPENGENI_OBJECT_STORAGE_ACCESS_KEY_ID and OPENGENI_OBJECT_STORAGE_SECRET_ACCESS_KEY must both be set or both omitted"
4943
- );
4944
- }
4945
- if (settings.objectStorageBackend === "s3-compatible" && (settings.objectStorageEndpoint || settings.objectStorageInternalEndpoint || settings.objectStorageSandboxEndpoint) && (!settings.objectStorageAccessKeyId || !settings.objectStorageSecretAccessKey)) {
4946
- throw new Error(
4947
- "S3-compatible object storage endpoints require OPENGENI_OBJECT_STORAGE_ACCESS_KEY_ID and OPENGENI_OBJECT_STORAGE_SECRET_ACCESS_KEY"
4948
- );
4949
- }
4950
- if (settings.objectStorageAzureConnectionString || settings.objectStorageAzureAccountName || settings.objectStorageAzureAccountKey || settings.objectStorageAzureEndpoint) {
4951
- throw new Error(
4952
- "S3 object storage uses OPENGENI_OBJECT_STORAGE_* S3 settings, not OPENGENI_OBJECT_STORAGE_AZURE_* settings"
4953
- );
4954
- }
4955
- if (settings.objectStorageGcsProjectId || settings.objectStorageGcsCredentialsJson || settings.objectStorageGcsKeyFilename || settings.objectStorageGcsApiEndpoint) {
4956
- throw new Error(
4957
- "S3 object storage uses OPENGENI_OBJECT_STORAGE_* S3 settings, not OPENGENI_OBJECT_STORAGE_GCS_* settings"
4958
- );
4959
- }
4960
- } else if (settings.objectStorageBackend === "azure-blob") {
4961
- if (settings.objectStorageEndpoint || settings.objectStorageInternalEndpoint || settings.objectStorageSandboxEndpoint || settings.objectStorageAccessKeyId || settings.objectStorageSecretAccessKey) {
4962
- throw new Error(
4963
- "Azure Blob storage uses OPENGENI_OBJECT_STORAGE_AZURE_* settings, not S3-compatible object storage settings"
4964
- );
4965
- }
4966
- if (settings.objectStorageGcsProjectId || settings.objectStorageGcsCredentialsJson || settings.objectStorageGcsKeyFilename || settings.objectStorageGcsApiEndpoint) {
4967
- throw new Error(
4968
- "Azure Blob storage uses OPENGENI_OBJECT_STORAGE_AZURE_* settings, not OPENGENI_OBJECT_STORAGE_GCS_* settings"
4969
- );
4970
- }
4971
- const hasConnectionString = Boolean(settings.objectStorageAzureConnectionString);
4972
- const hasSharedKey = Boolean(settings.objectStorageAzureAccountName) && Boolean(settings.objectStorageAzureAccountKey);
4973
- if (!hasConnectionString && !hasSharedKey) {
4974
- throw new Error(
4975
- "Azure Blob storage requires OPENGENI_OBJECT_STORAGE_AZURE_CONNECTION_STRING or OPENGENI_OBJECT_STORAGE_AZURE_ACCOUNT_NAME plus OPENGENI_OBJECT_STORAGE_AZURE_ACCOUNT_KEY"
4976
- );
4977
- }
4978
- } else {
4979
- if (settings.objectStorageEndpoint || settings.objectStorageInternalEndpoint || settings.objectStorageSandboxEndpoint || settings.objectStorageAccessKeyId || settings.objectStorageSecretAccessKey) {
4980
- throw new Error(
4981
- "GCS object storage uses OPENGENI_OBJECT_STORAGE_GCS_* settings, not S3-compatible object storage settings"
4982
- );
4983
- }
4984
- if (settings.objectStorageAzureConnectionString || settings.objectStorageAzureAccountName || settings.objectStorageAzureAccountKey || settings.objectStorageAzureEndpoint) {
4985
- throw new Error(
4986
- "GCS object storage uses OPENGENI_OBJECT_STORAGE_GCS_* settings, not OPENGENI_OBJECT_STORAGE_AZURE_* settings"
4987
- );
4988
- }
4989
- if (settings.objectStorageGcsCredentialsJson) {
4990
- parseGcsCredentialsJson(settings.objectStorageGcsCredentialsJson);
4991
- }
4992
- }
5033
+ validateObjectStorageSettings(settings);
4993
5034
  if (settings.documentChunkOverlap >= settings.documentChunkSize) {
4994
5035
  throw new Error(
4995
5036
  "OPENGENI_DOCUMENT_CHUNK_OVERLAP must be smaller than OPENGENI_DOCUMENT_CHUNK_SIZE"
@@ -5017,9 +5058,9 @@ function validateSettings(settings, source = process.env) {
5017
5058
  throw new Error(`OPENGENI_MCP_SERVERS contains duplicate id ${server.id}`);
5018
5059
  }
5019
5060
  serverIds.add(server.id);
5020
- if (server.connectionRef?.authoritySource === "host" && !settings.hostMcpAuthoritySourceAdmissionEnabled) {
5061
+ if (server.connectionRef?.authoritySource === "host") {
5021
5062
  throw new Error(
5022
- "OPENGENI_MCP_SERVERS host-owned connection refs require OPENGENI_HOST_MCP_AUTHORITY_SOURCE_ADMISSION_ENABLED=true after the whole API/worker fleet is upgraded"
5063
+ "OPENGENI_MCP_SERVERS host-owned connection refs are no longer supported; select ordinary native connections"
5023
5064
  );
5024
5065
  }
5025
5066
  }
@@ -5242,6 +5283,62 @@ function resolveNatsCalloutConfig(settings) {
5242
5283
  }
5243
5284
  return { accountSeed, accountName, user, password };
5244
5285
  }
5286
+ function validateObjectStorageSettings(settings) {
5287
+ if (settings.objectStorageBackend === "s3-compatible" || settings.objectStorageBackend === "aws-s3") {
5288
+ if (Boolean(settings.objectStorageAccessKeyId) !== Boolean(settings.objectStorageSecretAccessKey)) {
5289
+ throw new Error(
5290
+ "OPENGENI_OBJECT_STORAGE_ACCESS_KEY_ID and OPENGENI_OBJECT_STORAGE_SECRET_ACCESS_KEY must both be set or both omitted"
5291
+ );
5292
+ }
5293
+ if (settings.objectStorageBackend === "s3-compatible" && (settings.objectStorageEndpoint || settings.objectStorageInternalEndpoint || settings.objectStorageSandboxEndpoint) && (!settings.objectStorageAccessKeyId || !settings.objectStorageSecretAccessKey)) {
5294
+ throw new Error(
5295
+ "S3-compatible object storage endpoints require OPENGENI_OBJECT_STORAGE_ACCESS_KEY_ID and OPENGENI_OBJECT_STORAGE_SECRET_ACCESS_KEY"
5296
+ );
5297
+ }
5298
+ if (settings.objectStorageAzureConnectionString || settings.objectStorageAzureAccountName || settings.objectStorageAzureAccountKey || settings.objectStorageAzureEndpoint) {
5299
+ throw new Error(
5300
+ "S3 object storage uses OPENGENI_OBJECT_STORAGE_* S3 settings, not OPENGENI_OBJECT_STORAGE_AZURE_* settings"
5301
+ );
5302
+ }
5303
+ if (settings.objectStorageGcsProjectId || settings.objectStorageGcsCredentialsJson || settings.objectStorageGcsKeyFilename || settings.objectStorageGcsApiEndpoint) {
5304
+ throw new Error(
5305
+ "S3 object storage uses OPENGENI_OBJECT_STORAGE_* S3 settings, not OPENGENI_OBJECT_STORAGE_GCS_* settings"
5306
+ );
5307
+ }
5308
+ } else if (settings.objectStorageBackend === "azure-blob") {
5309
+ if (settings.objectStorageEndpoint || settings.objectStorageInternalEndpoint || settings.objectStorageSandboxEndpoint || settings.objectStorageAccessKeyId || settings.objectStorageSecretAccessKey) {
5310
+ throw new Error(
5311
+ "Azure Blob storage uses OPENGENI_OBJECT_STORAGE_AZURE_* settings, not S3-compatible object storage settings"
5312
+ );
5313
+ }
5314
+ if (settings.objectStorageGcsProjectId || settings.objectStorageGcsCredentialsJson || settings.objectStorageGcsKeyFilename || settings.objectStorageGcsApiEndpoint) {
5315
+ throw new Error(
5316
+ "Azure Blob storage uses OPENGENI_OBJECT_STORAGE_AZURE_* settings, not OPENGENI_OBJECT_STORAGE_GCS_* settings"
5317
+ );
5318
+ }
5319
+ const hasConnectionString = Boolean(settings.objectStorageAzureConnectionString);
5320
+ const hasSharedKey = Boolean(settings.objectStorageAzureAccountName) && Boolean(settings.objectStorageAzureAccountKey);
5321
+ if (!hasConnectionString && !hasSharedKey) {
5322
+ throw new Error(
5323
+ "Azure Blob storage requires OPENGENI_OBJECT_STORAGE_AZURE_CONNECTION_STRING or OPENGENI_OBJECT_STORAGE_AZURE_ACCOUNT_NAME plus OPENGENI_OBJECT_STORAGE_AZURE_ACCOUNT_KEY"
5324
+ );
5325
+ }
5326
+ } else {
5327
+ if (settings.objectStorageEndpoint || settings.objectStorageInternalEndpoint || settings.objectStorageSandboxEndpoint || settings.objectStorageAccessKeyId || settings.objectStorageSecretAccessKey) {
5328
+ throw new Error(
5329
+ "GCS object storage uses OPENGENI_OBJECT_STORAGE_GCS_* settings, not S3-compatible object storage settings"
5330
+ );
5331
+ }
5332
+ if (settings.objectStorageAzureConnectionString || settings.objectStorageAzureAccountName || settings.objectStorageAzureAccountKey || settings.objectStorageAzureEndpoint) {
5333
+ throw new Error(
5334
+ "GCS object storage uses OPENGENI_OBJECT_STORAGE_GCS_* settings, not OPENGENI_OBJECT_STORAGE_AZURE_* settings"
5335
+ );
5336
+ }
5337
+ if (settings.objectStorageGcsCredentialsJson) {
5338
+ parseGcsCredentialsJson(settings.objectStorageGcsCredentialsJson);
5339
+ }
5340
+ }
5341
+ }
5245
5342
  function resolveNatsControlPlaneAuth(settings) {
5246
5343
  const user = settings.selfhostedNatsControlUser?.trim();
5247
5344
  const password = settings.selfhostedNatsControlPassword?.trim();
@@ -5385,6 +5482,8 @@ export {
5385
5482
  firstPartyMcpInternalWorkspaceUrl,
5386
5483
  firstPartyMcpWorkspaceUrl,
5387
5484
  gatewayRequestPolicyForUpstreamModel,
5485
+ getArtifactMaterializerSettings,
5486
+ getArtifactOutboxSettings,
5388
5487
  getSettings,
5389
5488
  googleDriveOAuthCallbackUrl,
5390
5489
  googleDriveProviderRetryOptions,