@opengeni/config 0.23.2-canary.0 → 1.0.0-canary.1

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
@@ -66,6 +66,8 @@ export declare const McpServerConnectionRefSchema: z.ZodObject<{
66
66
  }>>;
67
67
  }, z.core.$strict>;
68
68
  export type McpServerConnectionRef = z.infer<typeof McpServerConnectionRefSchema>;
69
+ /** 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";
69
71
  declare const SettingsSchema: z.ZodObject<{
70
72
  serviceName: z.ZodDefault<z.ZodString>;
71
73
  environment: z.ZodDefault<z.ZodString>;
@@ -112,6 +114,8 @@ declare const SettingsSchema: z.ZodObject<{
112
114
  analyticsPosthogHost: z.ZodOptional<z.ZodString>;
113
115
  analyticsGa4MeasurementId: z.ZodOptional<z.ZodString>;
114
116
  publicBaseUrl: z.ZodOptional<z.ZodString>;
117
+ mcpOauthEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
118
+ mcpOauthTrustedProxyHops: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
115
119
  webBaseUrl: z.ZodOptional<z.ZodString>;
116
120
  agentReleasesBaseUrl: z.ZodDefault<z.ZodString>;
117
121
  agentStableVersion: z.ZodDefault<z.ZodString>;
@@ -140,10 +144,13 @@ declare const SettingsSchema: z.ZodObject<{
140
144
  staticUsageLimitsJson: z.ZodDefault<z.ZodString>;
141
145
  delegationSecret: z.ZodOptional<z.ZodString>;
142
146
  defaultFirstPartyMcpTools: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
147
+ artifacts_archive: "artifacts_archive";
143
148
  artifacts_create: "artifacts_create";
144
149
  artifacts_get_source: "artifacts_get_source";
145
150
  artifacts_list: "artifacts_list";
151
+ artifacts_prepare_upload: "artifacts_prepare_upload";
146
152
  artifacts_publish: "artifacts_publish";
153
+ artifacts_restore: "artifacts_restore";
147
154
  artifacts_rollback: "artifacts_rollback";
148
155
  atlassian_get: "atlassian_get";
149
156
  atlassian_search: "atlassian_search";
@@ -160,6 +167,8 @@ declare const SettingsSchema: z.ZodObject<{
160
167
  browser_tabs: "browser_tabs";
161
168
  capability_authorization_request: "capability_authorization_request";
162
169
  capability_catalog_search: "capability_catalog_search";
170
+ command_read: "command_read";
171
+ command_wait: "command_wait";
163
172
  company_profile_confirm: "company_profile_confirm";
164
173
  company_profile_propose: "company_profile_propose";
165
174
  computer_act: "computer_act";
@@ -194,9 +203,9 @@ declare const SettingsSchema: z.ZodObject<{
194
203
  goal_complete: "goal_complete";
195
204
  goal_pause: "goal_pause";
196
205
  goal_progress: "goal_progress";
206
+ goal_resume: "goal_resume";
197
207
  goal_set: "goal_set";
198
208
  goal_update: "goal_update";
199
- goal_wait: "goal_wait";
200
209
  instruction_policy_propose: "instruction_policy_propose";
201
210
  interaction_discover: "interaction_discover";
202
211
  interaction_request_human: "interaction_request_human";
@@ -276,6 +285,7 @@ declare const SettingsSchema: z.ZodObject<{
276
285
  variable_set_get_variable: "variable_set_get_variable";
277
286
  variable_set_list: "variable_set_list";
278
287
  variable_set_set_variable: "variable_set_set_variable";
288
+ wait_for_input: "wait_for_input";
279
289
  work_claim_release: "work_claim_release";
280
290
  work_claim_upsert: "work_claim_upsert";
281
291
  x_accounts_list: "x_accounts_list";
@@ -286,10 +296,13 @@ declare const SettingsSchema: z.ZodObject<{
286
296
  x_thread_fetch: "x_thread_fetch";
287
297
  }>>>>;
288
298
  allowedFirstPartyMcpTools: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
299
+ artifacts_archive: "artifacts_archive";
289
300
  artifacts_create: "artifacts_create";
290
301
  artifacts_get_source: "artifacts_get_source";
291
302
  artifacts_list: "artifacts_list";
303
+ artifacts_prepare_upload: "artifacts_prepare_upload";
292
304
  artifacts_publish: "artifacts_publish";
305
+ artifacts_restore: "artifacts_restore";
293
306
  artifacts_rollback: "artifacts_rollback";
294
307
  atlassian_get: "atlassian_get";
295
308
  atlassian_search: "atlassian_search";
@@ -306,6 +319,8 @@ declare const SettingsSchema: z.ZodObject<{
306
319
  browser_tabs: "browser_tabs";
307
320
  capability_authorization_request: "capability_authorization_request";
308
321
  capability_catalog_search: "capability_catalog_search";
322
+ command_read: "command_read";
323
+ command_wait: "command_wait";
309
324
  company_profile_confirm: "company_profile_confirm";
310
325
  company_profile_propose: "company_profile_propose";
311
326
  computer_act: "computer_act";
@@ -340,9 +355,9 @@ declare const SettingsSchema: z.ZodObject<{
340
355
  goal_complete: "goal_complete";
341
356
  goal_pause: "goal_pause";
342
357
  goal_progress: "goal_progress";
358
+ goal_resume: "goal_resume";
343
359
  goal_set: "goal_set";
344
360
  goal_update: "goal_update";
345
- goal_wait: "goal_wait";
346
361
  instruction_policy_propose: "instruction_policy_propose";
347
362
  interaction_discover: "interaction_discover";
348
363
  interaction_request_human: "interaction_request_human";
@@ -422,6 +437,7 @@ declare const SettingsSchema: z.ZodObject<{
422
437
  variable_set_get_variable: "variable_set_get_variable";
423
438
  variable_set_list: "variable_set_list";
424
439
  variable_set_set_variable: "variable_set_set_variable";
440
+ wait_for_input: "wait_for_input";
425
441
  work_claim_release: "work_claim_release";
426
442
  work_claim_upsert: "work_claim_upsert";
427
443
  x_accounts_list: "x_accounts_list";
@@ -551,7 +567,6 @@ declare const SettingsSchema: z.ZodObject<{
551
567
  codexProductSku: z.ZodOptional<z.ZodString>;
552
568
  codexToolSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
553
569
  lazyToolSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
554
- codexCredentialLeasingEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
555
570
  codexFleetPolicyShadowEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
556
571
  codexRotationNearExhaustionPct: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
557
572
  openaiReasoningEffort: z.ZodDefault<z.ZodEnum<{
@@ -801,6 +816,11 @@ declare const SettingsSchema: z.ZodObject<{
801
816
  dual: "dual";
802
817
  legacy: "legacy";
803
818
  }>>;
819
+ organizationUserSetupEmailTokenTransport: z.ZodDefault<z.ZodEnum<{
820
+ fragment: "fragment";
821
+ query: "query";
822
+ }>>;
823
+ organizationUserSetupQueryEdgeSanitizationConfirmed: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
804
824
  resendApiKey: z.ZodOptional<z.ZodString>;
805
825
  emailFrom: z.ZodDefault<z.ZodString>;
806
826
  stripeSecretKey: z.ZodOptional<z.ZodString>;
package/dist/index.js CHANGED
@@ -207,6 +207,7 @@ var McpServerConnectionRefSchema = z.object({
207
207
  });
208
208
  }
209
209
  });
210
+ var DEFAULT_MODAL_IMAGE_REF = "opengenipublicneuacr.azurecr.io/opengeni-desktop@sha256:c3bd17b8841de1bff9bb2777aad422cf8c75de78e2c30f9ac81d0cd6810a1b78";
210
211
  var SettingsSchema = z.object({
211
212
  serviceName: z.string().default("opengeni"),
212
213
  environment: z.string().default("local"),
@@ -263,6 +264,12 @@ var SettingsSchema = z.object({
263
264
  analyticsPosthogHost: z.string().url().max(2048).optional(),
264
265
  analyticsGa4MeasurementId: z.string().max(32).regex(/^G-[A-Z0-9]+$/u).optional(),
265
266
  publicBaseUrl: z.string().url().optional(),
267
+ // Standards-based OAuth authorization server for external workspace MCP
268
+ // clients. Opt-in because it creates a new public authentication surface.
269
+ mcpOauthEnabled: EnvBoolean.default(false),
270
+ // Forwarded client addresses are ignored by default. Operators may trust an
271
+ // exact number of proxy hops only when direct access to the API is blocked.
272
+ mcpOauthTrustedProxyHops: z.coerce.number().int().min(0).max(16).default(0),
266
273
  // Browser origin when the web app and API use separate origins in local
267
274
  // development. Production normally leaves this unset and uses publicBaseUrl.
268
275
  webBaseUrl: z.string().url().optional(),
@@ -589,11 +596,6 @@ var SettingsSchema = z.object({
589
596
  // the Codex rollout so an emergency Codex opt-out cannot disable every model.
590
597
  // OPENGENI_LAZY_TOOL_SEARCH_ENABLED
591
598
  lazyToolSearchEnabled: EnvBoolean.default(true),
592
- // credential allocator atomic, workspace-local credential allocation. Default OFF is a
593
- // deliberate rolling-deploy fence: migrate + roll every worker first, then
594
- // enable. Turning it off restores the legacy sticky selector without a schema
595
- // rollback; the additive lease table/cursor columns become inert.
596
- codexCredentialLeasingEnabled: EnvBoolean.default(false),
597
599
  // Decision-observability fence. When enabled, the worker emits one
598
600
  // bounded, metadata-only adaptive-policy replay record alongside the unchanged
599
601
  // sticky-sharded decision. It never changes placement/admission/failover.
@@ -1117,6 +1119,15 @@ var SettingsSchema = z.object({
1117
1119
  // Rolling browser login-slot compatibility. Repository/deployment default is
1118
1120
  // deliberately legacy; changing to broker is an operator-authorized rollout.
1119
1121
  managedAuthSessionSetMode: z.enum(["legacy", "dual", "broker"]).default("legacy"),
1122
+ // Query transport is an explicit second-stage rollout. A pre-compatibility
1123
+ // web image understands only fragment bearers, so API replicas must keep
1124
+ // generating fragment links until the compatible web fleet has converged.
1125
+ organizationUserSetupEmailTokenTransport: z.enum(["fragment", "query"]).default("fragment"),
1126
+ // Query-bearing setup links may appear in controller/edge error logs even
1127
+ // when access logs and request tracing are disabled. This explicit operator
1128
+ // confirmation keeps query transport fail closed until that separate sink is
1129
+ // proven sanitized.
1130
+ organizationUserSetupQueryEdgeSanitizationConfirmed: EnvBoolean.default(false),
1120
1131
  resendApiKey: z.string().optional(),
1121
1132
  emailFrom: z.string().default("OpenGeni <auth@mail.opengeni.ai>"),
1122
1133
  stripeSecretKey: z.string().optional(),
@@ -2190,6 +2201,8 @@ function getSettings(source = process.env) {
2190
2201
  analyticsPosthogHost: optional("OPENGENI_ANALYTICS_POSTHOG_HOST"),
2191
2202
  analyticsGa4MeasurementId: optional("OPENGENI_ANALYTICS_GA4_MEASUREMENT_ID"),
2192
2203
  publicBaseUrl: optional("OPENGENI_PUBLIC_BASE_URL"),
2204
+ mcpOauthEnabled: optional("OPENGENI_MCP_OAUTH_ENABLED"),
2205
+ mcpOauthTrustedProxyHops: optional("OPENGENI_MCP_OAUTH_TRUSTED_PROXY_HOPS"),
2193
2206
  webBaseUrl: optional("OPENGENI_WEB_BASE_URL"),
2194
2207
  agentReleasesBaseUrl: optional("OPENGENI_AGENT_RELEASES_BASE_URL"),
2195
2208
  agentStableVersion: optional("OPENGENI_AGENT_STABLE_VERSION"),
@@ -2346,7 +2359,6 @@ function getSettings(source = process.env) {
2346
2359
  codexConnectedAppsEnabled: optional("OPENGENI_CODEX_CONNECTED_APPS_ENABLED"),
2347
2360
  codexToolSearchEnabled: optional("OPENGENI_CODEX_TOOL_SEARCH_ENABLED"),
2348
2361
  lazyToolSearchEnabled: optional("OPENGENI_LAZY_TOOL_SEARCH_ENABLED"),
2349
- codexCredentialLeasingEnabled: optional("OPENGENI_CODEX_CREDENTIAL_LEASING_ENABLED"),
2350
2362
  codexFleetPolicyShadowEnabled: optional("OPENGENI_CODEX_FLEET_POLICY_SHADOW_ENABLED"),
2351
2363
  codexProductSku: optional("OPENGENI_CODEX_PRODUCT_SKU"),
2352
2364
  openaiReasoningEffort: optional("OPENGENI_OPENAI_REASONING_EFFORT"),
@@ -2371,7 +2383,7 @@ function getSettings(source = process.env) {
2371
2383
  dockerNetwork: optional("OPENGENI_DOCKER_NETWORK"),
2372
2384
  dockerWorkspaceBaseDir: optional("OPENGENI_DOCKER_WORKSPACE_BASE_DIR"),
2373
2385
  modalAppName: optional("OPENGENI_MODAL_APP_NAME"),
2374
- modalImageRef: optional("OPENGENI_MODAL_IMAGE_REF"),
2386
+ modalImageRef: optional("OPENGENI_MODAL_IMAGE_REF") ?? DEFAULT_MODAL_IMAGE_REF,
2375
2387
  modalImageId: optional("OPENGENI_MODAL_IMAGE_ID"),
2376
2388
  modalImageRegistrySecret: optional("OPENGENI_MODAL_IMAGE_REGISTRY_SECRET"),
2377
2389
  modalTimeoutSeconds: optional("OPENGENI_MODAL_TIMEOUT_SECONDS"),
@@ -2548,6 +2560,12 @@ function getSettings(source = process.env) {
2548
2560
  managedAuthGithubClientId: optional("OPENGENI_MANAGED_AUTH_GITHUB_CLIENT_ID"),
2549
2561
  managedAuthGithubClientSecret: optional("OPENGENI_MANAGED_AUTH_GITHUB_CLIENT_SECRET"),
2550
2562
  managedAuthSessionSetMode: optional("OPENGENI_MANAGED_AUTH_SESSION_SET_MODE"),
2563
+ organizationUserSetupEmailTokenTransport: optional(
2564
+ "OPENGENI_ORGANIZATION_USER_SETUP_EMAIL_TOKEN_TRANSPORT"
2565
+ ),
2566
+ organizationUserSetupQueryEdgeSanitizationConfirmed: optional(
2567
+ "OPENGENI_ORGANIZATION_USER_SETUP_QUERY_EDGE_SANITIZATION_CONFIRMED"
2568
+ ),
2551
2569
  resendApiKey: optional("OPENGENI_RESEND_API_KEY"),
2552
2570
  emailFrom: optional("OPENGENI_EMAIL_FROM"),
2553
2571
  stripeSecretKey: optional("OPENGENI_STRIPE_SECRET_KEY"),
@@ -2588,7 +2606,9 @@ function resolveFirstPartyMcpToolPolicy(settings) {
2588
2606
  function allowedFirstPartyMcpToolsForSession(settings, selected) {
2589
2607
  const policy = resolveFirstPartyMcpToolPolicy(settings);
2590
2608
  const allowed = new Set(policy.allowed);
2591
- return [...selected ?? policy.default].filter((tool) => allowed.has(tool));
2609
+ const tools = new Set(selected ?? policy.default);
2610
+ if (tools.has("goal_pause")) tools.add("goal_resume");
2611
+ return [...tools].filter((tool) => allowed.has(tool));
2592
2612
  }
2593
2613
  function effectiveModalIdleTimeoutSeconds(settings) {
2594
2614
  return settings.modalIdleTimeoutSeconds ?? settings.modalTimeoutSeconds;
@@ -3205,6 +3225,8 @@ function productShortLabelForModelId(modelId) {
3205
3225
  return "5.6 Terra";
3206
3226
  case "gpt-5.6-luna":
3207
3227
  return "5.6 Luna";
3228
+ case "gpt-6-astra":
3229
+ return "6 Astra";
3208
3230
  default:
3209
3231
  return null;
3210
3232
  }
@@ -3224,7 +3246,7 @@ function builtinContextLimitsForModel(settings, modelId) {
3224
3246
  return { contextWindowTokens: settings.contextWindowTokens };
3225
3247
  }
3226
3248
  function builtinLatencyModesForModel(modelId) {
3227
- if (isBuiltinGpt56ModelId(modelId) || modelId.startsWith("codex/gpt-5.6-")) {
3249
+ if (isBuiltinGpt56ModelId(modelId) || modelId.startsWith("codex/gpt-5.6-") || modelId === "codex/gpt-6-astra") {
3228
3250
  return [
3229
3251
  { id: "standard", upstream: "supported", runnable: true },
3230
3252
  {
@@ -3478,7 +3500,7 @@ function withCodexCatalogProvider(settings) {
3478
3500
  ...legacyModelCapabilities(settings, {
3479
3501
  reasoningEffort: true,
3480
3502
  hostedWebSearch: true,
3481
- vision: slug.startsWith("gpt-5.6-")
3503
+ vision: slug.startsWith("gpt-5.6-") || slug === "gpt-6-astra"
3482
3504
  }),
3483
3505
  ...builtinPromptCachingForModel(`${CODEX_MODEL_ID_PREFIX}${slug}`) ? {
3484
3506
  promptCaching: builtinPromptCachingForModel(`${CODEX_MODEL_ID_PREFIX}${slug}`)
@@ -4612,6 +4634,11 @@ function isDigestPinnedModalDesktopImage(settings) {
4612
4634
  }
4613
4635
  function validateSettings(settings, source = process.env) {
4614
4636
  temporalConnectionOptions(settings);
4637
+ if (settings.organizationUserSetupEmailTokenTransport === "query" && !settings.organizationUserSetupQueryEdgeSanitizationConfirmed) {
4638
+ throw new Error(
4639
+ "OPENGENI_ORGANIZATION_USER_SETUP_QUERY_EDGE_SANITIZATION_CONFIRMED=true is required when OPENGENI_ORGANIZATION_USER_SETUP_EMAIL_TOKEN_TRANSPORT=query"
4640
+ );
4641
+ }
4615
4642
  if (settings.goalIdleBackoffMs.some((delayMs) => delayMs > settings.goalIdleBackoffMaxMs)) {
4616
4643
  throw new Error(
4617
4644
  `OPENGENI_GOAL_IDLE_BACKOFF_MS entries must not exceed OPENGENI_GOAL_IDLE_BACKOFF_MAX_MS (${settings.goalIdleBackoffMaxMs})`
@@ -4689,6 +4716,24 @@ function validateSettings(settings, source = process.env) {
4689
4716
  );
4690
4717
  }
4691
4718
  }
4719
+ if (settings.mcpOauthEnabled) {
4720
+ if (settings.productAccessMode === "configured") {
4721
+ throw new Error(
4722
+ "OPENGENI_MCP_OAUTH_ENABLED=true requires managed or local product access mode"
4723
+ );
4724
+ }
4725
+ const publicOrigin = canonicalPublicOrigin(settings.publicBaseUrl);
4726
+ if (!publicOrigin) {
4727
+ throw new Error(
4728
+ "OPENGENI_PUBLIC_BASE_URL must be a credential-free HTTP(S) origin when OPENGENI_MCP_OAUTH_ENABLED=true"
4729
+ );
4730
+ }
4731
+ if (!publicOrigin.startsWith("https://") && !["local", "test"].includes(settings.environment)) {
4732
+ throw new Error(
4733
+ "OPENGENI_PUBLIC_BASE_URL must use https when OPENGENI_MCP_OAUTH_ENABLED=true outside local/test"
4734
+ );
4735
+ }
4736
+ }
4692
4737
  environmentsEncryptionKeyBytes(settings);
4693
4738
  if (settings.integrationsEnabled) {
4694
4739
  if (settings.productAccessMode === "managed" && !settings.publicBaseUrl) {
@@ -5288,6 +5333,7 @@ export {
5288
5333
  DEFAULT_AGENT_INSTRUCTIONS,
5289
5334
  DEFAULT_GOAL_IDLE_BACKOFF_MAX_MS,
5290
5335
  DEFAULT_GOAL_IDLE_BACKOFF_MS,
5336
+ DEFAULT_MODAL_IMAGE_REF,
5291
5337
  DEFAULT_MODEL_COST_POLICY_JSON,
5292
5338
  DEFAULT_OPENROUTER_MODEL_ID,
5293
5339
  GOOGLE_DRIVE_PROVIDER_REQUEST_TIMEOUT_MAX_MS,