@opengeni/config 0.7.1 → 0.7.7

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
@@ -64,6 +64,7 @@ declare const SettingsSchema: z.ZodObject<{
64
64
  force: "force";
65
65
  scoped: "scoped";
66
66
  }>>;
67
+ runtimeDatabaseRole: z.ZodDefault<z.ZodString>;
67
68
  natsUrl: z.ZodDefault<z.ZodString>;
68
69
  temporalHost: z.ZodDefault<z.ZodString>;
69
70
  temporalNamespace: z.ZodDefault<z.ZodString>;
@@ -77,6 +78,13 @@ declare const SettingsSchema: z.ZodObject<{
77
78
  startupDependencyRetryAttempts: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
78
79
  startupDependencyRetryInitialDelayMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
79
80
  startupDependencyRetryMaxDelayMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
81
+ turnWorkerConcurrencyMode: z.ZodDefault<z.ZodEnum<{
82
+ fixed: "fixed";
83
+ "resource-based": "resource-based";
84
+ }>>;
85
+ turnWorkerMaxConcurrentTurns: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
86
+ turnWorkerTargetCpuUsage: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
87
+ turnWorkerTargetMemoryUsage: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
80
88
  observabilityStructuredLogs: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
81
89
  observabilityMetricsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
82
90
  observabilityOtlpEndpoint: z.ZodOptional<z.ZodString>;
@@ -147,6 +155,7 @@ declare const SettingsSchema: z.ZodObject<{
147
155
  modelPricingJson: z.ZodDefault<z.ZodString>;
148
156
  modelProvidersJson: z.ZodDefault<z.ZodString>;
149
157
  codexSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
158
+ codexConnectedAppsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
150
159
  codexProductSku: z.ZodOptional<z.ZodString>;
151
160
  codexToolSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
152
161
  codexCredentialLeasingEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
@@ -330,6 +339,14 @@ declare const SettingsSchema: z.ZodObject<{
330
339
  documentEmbeddingDimensions: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
331
340
  documentEmbeddingApiKey: z.ZodOptional<z.ZodString>;
332
341
  documentEmbeddingBaseUrl: z.ZodOptional<z.ZodString>;
342
+ documentCurationProvider: z.ZodDefault<z.ZodEnum<{
343
+ none: "none";
344
+ openai: "openai";
345
+ heuristic: "heuristic";
346
+ }>>;
347
+ documentCurationModel: z.ZodDefault<z.ZodString>;
348
+ documentCurationApiKey: z.ZodOptional<z.ZodString>;
349
+ documentCurationBaseUrl: z.ZodOptional<z.ZodString>;
333
350
  gitAuthorName: z.ZodOptional<z.ZodString>;
334
351
  gitAuthorEmail: z.ZodOptional<z.ZodString>;
335
352
  gitCommitterName: z.ZodOptional<z.ZodString>;
package/dist/index.js CHANGED
@@ -149,6 +149,10 @@ var SettingsSchema = z.object({
149
149
  // non-owner `opengeni_app` role. "scoped" = the embedded owner-role path (the
150
150
  // GUC is still emitted defensively, so the query path is identical).
151
151
  rlsStrategy: z.enum(["force", "scoped"]).default("force"),
152
+ // Exact PostgreSQL login identity required by the standalone FORCE-RLS
153
+ // startup/readiness assertion. Embedded `scoped` hosts own their role model
154
+ // and are deliberately not constrained to this name.
155
+ runtimeDatabaseRole: z.string().min(1).default("opengeni_app"),
152
156
  natsUrl: z.string().default("nats://127.0.0.1:4222"),
153
157
  temporalHost: z.string().default("127.0.0.1:7233"),
154
158
  temporalNamespace: z.string().default("default"),
@@ -162,6 +166,10 @@ var SettingsSchema = z.object({
162
166
  startupDependencyRetryAttempts: z.coerce.number().int().positive().default(30),
163
167
  startupDependencyRetryInitialDelayMs: z.coerce.number().int().positive().default(1e3),
164
168
  startupDependencyRetryMaxDelayMs: z.coerce.number().int().positive().default(5e3),
169
+ turnWorkerConcurrencyMode: z.enum(["fixed", "resource-based"]).default("fixed"),
170
+ turnWorkerMaxConcurrentTurns: z.coerce.number().int().positive().max(2e3).default(16),
171
+ turnWorkerTargetCpuUsage: z.coerce.number().positive().max(1).default(0.8),
172
+ turnWorkerTargetMemoryUsage: z.coerce.number().positive().max(0.8).default(0.75),
165
173
  observabilityStructuredLogs: EnvBoolean.default(false),
166
174
  observabilityMetricsEnabled: EnvBoolean.default(true),
167
175
  observabilityOtlpEndpoint: z.string().url().optional(),
@@ -279,13 +287,19 @@ var SettingsSchema = z.object({
279
287
  // provider whose models route through the ChatGPT backend (@opengeni/codex).
280
288
  codexSubscriptionEnabled: EnvBoolean.default(false),
281
289
  // OPENGENI_CODEX_SUBSCRIPTION_ENABLED
290
+ // Expose the connected apps attached to a Codex subscription through the
291
+ // synthetic codex_apps MCP server. Independent from subscription routing so
292
+ // operators can use Codex models without exposing ChatGPT connectors.
293
+ codexConnectedAppsEnabled: EnvBoolean.default(false),
294
+ // OPENGENI_CODEX_CONNECTED_APPS_ENABLED
282
295
  codexProductSku: z.string().optional(),
283
296
  // OPENGENI_CODEX_PRODUCT_SKU (X-OpenAI-Product-Sku, apps only)
284
- // Progressive connector disclosure (Codex-CLI-style tool_search): on a codex
285
- // turn, flag the ~217 codex_apps connector tools `defer_loading:true` (dropping
286
- // their schemas from model context) and add one client-executed tool_search
287
- // tool that BM25-discloses only the matching connectors. Default OFF a codex
288
- // turn is byte-for-byte unchanged until enabled. OPENGENI_CODEX_TOOL_SEARCH_ENABLED
297
+ // Progressive MCP disclosure (Codex-CLI-style tool_search): on a codex turn,
298
+ // flag non-mandatory selected MCP tools `defer_loading:true` (dropping their
299
+ // schemas from model context) and add one client-executed tool_search tool
300
+ // that BM25-discloses bounded matches. The mandatory OpenGeni tools stay
301
+ // eager. Default OFF — a codex turn is byte-for-byte unchanged until enabled.
302
+ // OPENGENI_CODEX_TOOL_SEARCH_ENABLED
289
303
  codexToolSearchEnabled: EnvBoolean.default(false),
290
304
  // credential allocator atomic, workspace-local credential allocation. Default OFF is a
291
305
  // deliberate rolling-deploy fence: migrate + roll every worker first, then
@@ -697,6 +711,10 @@ var SettingsSchema = z.object({
697
711
  documentEmbeddingDimensions: z.coerce.number().int().positive().default(3072),
698
712
  documentEmbeddingApiKey: z.string().optional(),
699
713
  documentEmbeddingBaseUrl: z.string().url().optional(),
714
+ documentCurationProvider: z.enum(["openai", "heuristic", "none"]).default("openai"),
715
+ documentCurationModel: z.string().min(1).default("gpt-4o-mini"),
716
+ documentCurationApiKey: z.string().optional(),
717
+ documentCurationBaseUrl: z.string().url().optional(),
700
718
  gitAuthorName: z.string().optional(),
701
719
  gitAuthorEmail: z.string().optional(),
702
720
  gitCommitterName: z.string().optional(),
@@ -1056,6 +1074,7 @@ function getSettings() {
1056
1074
  databaseUrl: optional("OPENGENI_DATABASE_URL"),
1057
1075
  dbSchema: optional("OPENGENI_DB_SCHEMA"),
1058
1076
  rlsStrategy: optional("OPENGENI_RLS_STRATEGY"),
1077
+ runtimeDatabaseRole: optional("OPENGENI_RUNTIME_DATABASE_ROLE"),
1059
1078
  natsUrl: optional("OPENGENI_NATS_URL"),
1060
1079
  temporalHost: optional("OPENGENI_TEMPORAL_HOST"),
1061
1080
  temporalNamespace: optional("OPENGENI_TEMPORAL_NAMESPACE"),
@@ -1073,6 +1092,10 @@ function getSettings() {
1073
1092
  "OPENGENI_STARTUP_DEPENDENCY_RETRY_INITIAL_DELAY_MS"
1074
1093
  ),
1075
1094
  startupDependencyRetryMaxDelayMs: optional("OPENGENI_STARTUP_DEPENDENCY_RETRY_MAX_DELAY_MS"),
1095
+ turnWorkerConcurrencyMode: optional("OPENGENI_TURN_WORKER_CONCURRENCY_MODE"),
1096
+ turnWorkerMaxConcurrentTurns: optional("OPENGENI_TURN_WORKER_MAX_CONCURRENT_TURNS"),
1097
+ turnWorkerTargetCpuUsage: optional("OPENGENI_TURN_WORKER_TARGET_CPU_USAGE"),
1098
+ turnWorkerTargetMemoryUsage: optional("OPENGENI_TURN_WORKER_TARGET_MEMORY_USAGE"),
1076
1099
  observabilityStructuredLogs: optional("OPENGENI_OBSERVABILITY_STRUCTURED_LOGS"),
1077
1100
  observabilityMetricsEnabled: optional("OPENGENI_OBSERVABILITY_METRICS_ENABLED"),
1078
1101
  observabilityOtlpEndpoint: optional("OPENGENI_OTEL_EXPORTER_OTLP_ENDPOINT") ?? optional("OTEL_EXPORTER_OTLP_ENDPOINT"),
@@ -1127,6 +1150,7 @@ function getSettings() {
1127
1150
  modelPricingJson: optional("OPENGENI_MODEL_PRICING_JSON"),
1128
1151
  modelProvidersJson: optional("OPENGENI_MODEL_PROVIDERS_JSON"),
1129
1152
  codexSubscriptionEnabled: optional("OPENGENI_CODEX_SUBSCRIPTION_ENABLED"),
1153
+ codexConnectedAppsEnabled: optional("OPENGENI_CODEX_CONNECTED_APPS_ENABLED"),
1130
1154
  codexToolSearchEnabled: optional("OPENGENI_CODEX_TOOL_SEARCH_ENABLED"),
1131
1155
  codexCredentialLeasingEnabled: optional("OPENGENI_CODEX_CREDENTIAL_LEASING_ENABLED"),
1132
1156
  codexFleetPolicyShadowEnabled: optional("OPENGENI_CODEX_FLEET_POLICY_SHADOW_ENABLED"),
@@ -1267,6 +1291,10 @@ function getSettings() {
1267
1291
  documentEmbeddingDimensions: optional("OPENGENI_DOCUMENT_EMBEDDING_DIMENSIONS"),
1268
1292
  documentEmbeddingApiKey: optional("OPENGENI_DOCUMENT_EMBEDDING_API_KEY"),
1269
1293
  documentEmbeddingBaseUrl: optional("OPENGENI_DOCUMENT_EMBEDDING_BASE_URL"),
1294
+ documentCurationProvider: optional("OPENGENI_DOCUMENT_CURATION_PROVIDER"),
1295
+ documentCurationModel: optional("OPENGENI_DOCUMENT_CURATION_MODEL"),
1296
+ documentCurationApiKey: optional("OPENGENI_DOCUMENT_CURATION_API_KEY"),
1297
+ documentCurationBaseUrl: optional("OPENGENI_DOCUMENT_CURATION_BASE_URL"),
1270
1298
  gitAuthorName: optional("OPENGENI_GIT_AUTHOR_NAME"),
1271
1299
  gitAuthorEmail: optional("OPENGENI_GIT_AUTHOR_EMAIL"),
1272
1300
  gitCommitterName: optional("OPENGENI_GIT_COMMITTER_NAME"),
@@ -1663,6 +1691,11 @@ function withCodexCatalogProvider(settings) {
1663
1691
  upstreamModelId: slug,
1664
1692
  label: slug,
1665
1693
  reasoningEffort: true,
1694
+ // The ChatGPT/Codex Responses backend accepts the native web_search
1695
+ // hosted tool (unlike hosted apply_patch/computer transports). Declaring
1696
+ // this here makes provider resolution truthful; the worker still applies
1697
+ // the durable session/turn policy gate before attaching it.
1698
+ hostedWebSearch: true,
1666
1699
  contextWindowTokens: CODEX_MODEL_CONTEXT_WINDOW_TOKENS,
1667
1700
  effectiveContextWindowTokens: CODEX_MODEL_EFFECTIVE_CONTEXT_WINDOW_TOKENS,
1668
1701
  autoCompactTokenLimit: CODEX_MODEL_AUTO_COMPACT_TOKEN_LIMIT,