@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/config",
3
- "version": "0.7.1",
3
+ "version": "0.7.7",
4
4
  "description": "OpenGeni runtime configuration: settings resolution, deployment knobs, and config validation shared across the server packages.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@opengeni/codex": "^0.2.7",
37
- "@opengeni/contracts": "^0.19.0",
37
+ "@opengeni/contracts": "^0.20.0",
38
38
  "zod": "^4.2.1"
39
39
  },
40
40
  "engines": {
package/src/index.ts CHANGED
@@ -191,6 +191,10 @@ const SettingsSchema = z.object({
191
191
  // non-owner `opengeni_app` role. "scoped" = the embedded owner-role path (the
192
192
  // GUC is still emitted defensively, so the query path is identical).
193
193
  rlsStrategy: z.enum(["force", "scoped"]).default("force"),
194
+ // Exact PostgreSQL login identity required by the standalone FORCE-RLS
195
+ // startup/readiness assertion. Embedded `scoped` hosts own their role model
196
+ // and are deliberately not constrained to this name.
197
+ runtimeDatabaseRole: z.string().min(1).default("opengeni_app"),
194
198
  natsUrl: z.string().default("nats://127.0.0.1:4222"),
195
199
  temporalHost: z.string().default("127.0.0.1:7233"),
196
200
  temporalNamespace: z.string().default("default"),
@@ -204,6 +208,10 @@ const SettingsSchema = z.object({
204
208
  startupDependencyRetryAttempts: z.coerce.number().int().positive().default(30),
205
209
  startupDependencyRetryInitialDelayMs: z.coerce.number().int().positive().default(1000),
206
210
  startupDependencyRetryMaxDelayMs: z.coerce.number().int().positive().default(5000),
211
+ turnWorkerConcurrencyMode: z.enum(["fixed", "resource-based"]).default("fixed"),
212
+ turnWorkerMaxConcurrentTurns: z.coerce.number().int().positive().max(2_000).default(16),
213
+ turnWorkerTargetCpuUsage: z.coerce.number().positive().max(1).default(0.8),
214
+ turnWorkerTargetMemoryUsage: z.coerce.number().positive().max(0.8).default(0.75),
207
215
  observabilityStructuredLogs: EnvBoolean.default(false),
208
216
  observabilityMetricsEnabled: EnvBoolean.default(true),
209
217
  observabilityOtlpEndpoint: z.string().url().optional(),
@@ -332,12 +340,17 @@ const SettingsSchema = z.object({
332
340
  // subscription is injected as a synthetic "codex-subscription" registry
333
341
  // provider whose models route through the ChatGPT backend (@opengeni/codex).
334
342
  codexSubscriptionEnabled: EnvBoolean.default(false), // OPENGENI_CODEX_SUBSCRIPTION_ENABLED
343
+ // Expose the connected apps attached to a Codex subscription through the
344
+ // synthetic codex_apps MCP server. Independent from subscription routing so
345
+ // operators can use Codex models without exposing ChatGPT connectors.
346
+ codexConnectedAppsEnabled: EnvBoolean.default(false), // OPENGENI_CODEX_CONNECTED_APPS_ENABLED
335
347
  codexProductSku: z.string().optional(), // OPENGENI_CODEX_PRODUCT_SKU (X-OpenAI-Product-Sku, apps only)
336
- // Progressive connector disclosure (Codex-CLI-style tool_search): on a codex
337
- // turn, flag the ~217 codex_apps connector tools `defer_loading:true` (dropping
338
- // their schemas from model context) and add one client-executed tool_search
339
- // tool that BM25-discloses only the matching connectors. Default OFF a codex
340
- // turn is byte-for-byte unchanged until enabled. OPENGENI_CODEX_TOOL_SEARCH_ENABLED
348
+ // Progressive MCP disclosure (Codex-CLI-style tool_search): on a codex turn,
349
+ // flag non-mandatory selected MCP tools `defer_loading:true` (dropping their
350
+ // schemas from model context) and add one client-executed tool_search tool
351
+ // that BM25-discloses bounded matches. The mandatory OpenGeni tools stay
352
+ // eager. Default OFF — a codex turn is byte-for-byte unchanged until enabled.
353
+ // OPENGENI_CODEX_TOOL_SEARCH_ENABLED
341
354
  codexToolSearchEnabled: EnvBoolean.default(false),
342
355
  // credential allocator atomic, workspace-local credential allocation. Default OFF is a
343
356
  // deliberate rolling-deploy fence: migrate + roll every worker first, then
@@ -750,6 +763,10 @@ const SettingsSchema = z.object({
750
763
  documentEmbeddingDimensions: z.coerce.number().int().positive().default(3072),
751
764
  documentEmbeddingApiKey: z.string().optional(),
752
765
  documentEmbeddingBaseUrl: z.string().url().optional(),
766
+ documentCurationProvider: z.enum(["openai", "heuristic", "none"]).default("openai"),
767
+ documentCurationModel: z.string().min(1).default("gpt-4o-mini"),
768
+ documentCurationApiKey: z.string().optional(),
769
+ documentCurationBaseUrl: z.string().url().optional(),
753
770
  gitAuthorName: z.string().optional(),
754
771
  gitAuthorEmail: z.string().optional(),
755
772
  gitCommitterName: z.string().optional(),
@@ -1301,6 +1318,7 @@ export function getSettings(): Settings {
1301
1318
  databaseUrl: optional("OPENGENI_DATABASE_URL"),
1302
1319
  dbSchema: optional("OPENGENI_DB_SCHEMA"),
1303
1320
  rlsStrategy: optional("OPENGENI_RLS_STRATEGY"),
1321
+ runtimeDatabaseRole: optional("OPENGENI_RUNTIME_DATABASE_ROLE"),
1304
1322
  natsUrl: optional("OPENGENI_NATS_URL"),
1305
1323
  temporalHost: optional("OPENGENI_TEMPORAL_HOST"),
1306
1324
  temporalNamespace: optional("OPENGENI_TEMPORAL_NAMESPACE"),
@@ -1318,6 +1336,10 @@ export function getSettings(): Settings {
1318
1336
  "OPENGENI_STARTUP_DEPENDENCY_RETRY_INITIAL_DELAY_MS",
1319
1337
  ),
1320
1338
  startupDependencyRetryMaxDelayMs: optional("OPENGENI_STARTUP_DEPENDENCY_RETRY_MAX_DELAY_MS"),
1339
+ turnWorkerConcurrencyMode: optional("OPENGENI_TURN_WORKER_CONCURRENCY_MODE"),
1340
+ turnWorkerMaxConcurrentTurns: optional("OPENGENI_TURN_WORKER_MAX_CONCURRENT_TURNS"),
1341
+ turnWorkerTargetCpuUsage: optional("OPENGENI_TURN_WORKER_TARGET_CPU_USAGE"),
1342
+ turnWorkerTargetMemoryUsage: optional("OPENGENI_TURN_WORKER_TARGET_MEMORY_USAGE"),
1321
1343
  observabilityStructuredLogs: optional("OPENGENI_OBSERVABILITY_STRUCTURED_LOGS"),
1322
1344
  observabilityMetricsEnabled: optional("OPENGENI_OBSERVABILITY_METRICS_ENABLED"),
1323
1345
  observabilityOtlpEndpoint:
@@ -1374,6 +1396,7 @@ export function getSettings(): Settings {
1374
1396
  modelPricingJson: optional("OPENGENI_MODEL_PRICING_JSON"),
1375
1397
  modelProvidersJson: optional("OPENGENI_MODEL_PROVIDERS_JSON"),
1376
1398
  codexSubscriptionEnabled: optional("OPENGENI_CODEX_SUBSCRIPTION_ENABLED"),
1399
+ codexConnectedAppsEnabled: optional("OPENGENI_CODEX_CONNECTED_APPS_ENABLED"),
1377
1400
  codexToolSearchEnabled: optional("OPENGENI_CODEX_TOOL_SEARCH_ENABLED"),
1378
1401
  codexCredentialLeasingEnabled: optional("OPENGENI_CODEX_CREDENTIAL_LEASING_ENABLED"),
1379
1402
  codexFleetPolicyShadowEnabled: optional("OPENGENI_CODEX_FLEET_POLICY_SHADOW_ENABLED"),
@@ -1514,6 +1537,10 @@ export function getSettings(): Settings {
1514
1537
  documentEmbeddingDimensions: optional("OPENGENI_DOCUMENT_EMBEDDING_DIMENSIONS"),
1515
1538
  documentEmbeddingApiKey: optional("OPENGENI_DOCUMENT_EMBEDDING_API_KEY"),
1516
1539
  documentEmbeddingBaseUrl: optional("OPENGENI_DOCUMENT_EMBEDDING_BASE_URL"),
1540
+ documentCurationProvider: optional("OPENGENI_DOCUMENT_CURATION_PROVIDER"),
1541
+ documentCurationModel: optional("OPENGENI_DOCUMENT_CURATION_MODEL"),
1542
+ documentCurationApiKey: optional("OPENGENI_DOCUMENT_CURATION_API_KEY"),
1543
+ documentCurationBaseUrl: optional("OPENGENI_DOCUMENT_CURATION_BASE_URL"),
1517
1544
  gitAuthorName: optional("OPENGENI_GIT_AUTHOR_NAME"),
1518
1545
  gitAuthorEmail: optional("OPENGENI_GIT_AUTHOR_EMAIL"),
1519
1546
  gitCommitterName: optional("OPENGENI_GIT_COMMITTER_NAME"),
@@ -2030,6 +2057,11 @@ export function withCodexCatalogProvider(settings: Settings): Settings {
2030
2057
  upstreamModelId: slug,
2031
2058
  label: slug,
2032
2059
  reasoningEffort: true,
2060
+ // The ChatGPT/Codex Responses backend accepts the native web_search
2061
+ // hosted tool (unlike hosted apply_patch/computer transports). Declaring
2062
+ // this here makes provider resolution truthful; the worker still applies
2063
+ // the durable session/turn policy gate before attaching it.
2064
+ hostedWebSearch: true,
2033
2065
  contextWindowTokens: CODEX_MODEL_CONTEXT_WINDOW_TOKENS,
2034
2066
  effectiveContextWindowTokens: CODEX_MODEL_EFFECTIVE_CONTEXT_WINDOW_TOKENS,
2035
2067
  autoCompactTokenLimit: CODEX_MODEL_AUTO_COMPACT_TOKEN_LIMIT,