@opengeni/config 0.23.2-canary.0 → 1.0.0-canary.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 +17 -3
- package/dist/index.js +53 -9
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +62 -9
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,12 @@ 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";
|
|
146
151
|
artifacts_publish: "artifacts_publish";
|
|
152
|
+
artifacts_restore: "artifacts_restore";
|
|
147
153
|
artifacts_rollback: "artifacts_rollback";
|
|
148
154
|
atlassian_get: "atlassian_get";
|
|
149
155
|
atlassian_search: "atlassian_search";
|
|
@@ -160,6 +166,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
160
166
|
browser_tabs: "browser_tabs";
|
|
161
167
|
capability_authorization_request: "capability_authorization_request";
|
|
162
168
|
capability_catalog_search: "capability_catalog_search";
|
|
169
|
+
command_wait: "command_wait";
|
|
163
170
|
company_profile_confirm: "company_profile_confirm";
|
|
164
171
|
company_profile_propose: "company_profile_propose";
|
|
165
172
|
computer_act: "computer_act";
|
|
@@ -196,7 +203,6 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
196
203
|
goal_progress: "goal_progress";
|
|
197
204
|
goal_set: "goal_set";
|
|
198
205
|
goal_update: "goal_update";
|
|
199
|
-
goal_wait: "goal_wait";
|
|
200
206
|
instruction_policy_propose: "instruction_policy_propose";
|
|
201
207
|
interaction_discover: "interaction_discover";
|
|
202
208
|
interaction_request_human: "interaction_request_human";
|
|
@@ -276,6 +282,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
276
282
|
variable_set_get_variable: "variable_set_get_variable";
|
|
277
283
|
variable_set_list: "variable_set_list";
|
|
278
284
|
variable_set_set_variable: "variable_set_set_variable";
|
|
285
|
+
wait_for_input: "wait_for_input";
|
|
279
286
|
work_claim_release: "work_claim_release";
|
|
280
287
|
work_claim_upsert: "work_claim_upsert";
|
|
281
288
|
x_accounts_list: "x_accounts_list";
|
|
@@ -286,10 +293,12 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
286
293
|
x_thread_fetch: "x_thread_fetch";
|
|
287
294
|
}>>>>;
|
|
288
295
|
allowedFirstPartyMcpTools: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
296
|
+
artifacts_archive: "artifacts_archive";
|
|
289
297
|
artifacts_create: "artifacts_create";
|
|
290
298
|
artifacts_get_source: "artifacts_get_source";
|
|
291
299
|
artifacts_list: "artifacts_list";
|
|
292
300
|
artifacts_publish: "artifacts_publish";
|
|
301
|
+
artifacts_restore: "artifacts_restore";
|
|
293
302
|
artifacts_rollback: "artifacts_rollback";
|
|
294
303
|
atlassian_get: "atlassian_get";
|
|
295
304
|
atlassian_search: "atlassian_search";
|
|
@@ -306,6 +315,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
306
315
|
browser_tabs: "browser_tabs";
|
|
307
316
|
capability_authorization_request: "capability_authorization_request";
|
|
308
317
|
capability_catalog_search: "capability_catalog_search";
|
|
318
|
+
command_wait: "command_wait";
|
|
309
319
|
company_profile_confirm: "company_profile_confirm";
|
|
310
320
|
company_profile_propose: "company_profile_propose";
|
|
311
321
|
computer_act: "computer_act";
|
|
@@ -342,7 +352,6 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
342
352
|
goal_progress: "goal_progress";
|
|
343
353
|
goal_set: "goal_set";
|
|
344
354
|
goal_update: "goal_update";
|
|
345
|
-
goal_wait: "goal_wait";
|
|
346
355
|
instruction_policy_propose: "instruction_policy_propose";
|
|
347
356
|
interaction_discover: "interaction_discover";
|
|
348
357
|
interaction_request_human: "interaction_request_human";
|
|
@@ -422,6 +431,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
422
431
|
variable_set_get_variable: "variable_set_get_variable";
|
|
423
432
|
variable_set_list: "variable_set_list";
|
|
424
433
|
variable_set_set_variable: "variable_set_set_variable";
|
|
434
|
+
wait_for_input: "wait_for_input";
|
|
425
435
|
work_claim_release: "work_claim_release";
|
|
426
436
|
work_claim_upsert: "work_claim_upsert";
|
|
427
437
|
x_accounts_list: "x_accounts_list";
|
|
@@ -551,7 +561,6 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
551
561
|
codexProductSku: z.ZodOptional<z.ZodString>;
|
|
552
562
|
codexToolSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
553
563
|
lazyToolSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
554
|
-
codexCredentialLeasingEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
555
564
|
codexFleetPolicyShadowEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
556
565
|
codexRotationNearExhaustionPct: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
557
566
|
openaiReasoningEffort: z.ZodDefault<z.ZodEnum<{
|
|
@@ -801,6 +810,11 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
801
810
|
dual: "dual";
|
|
802
811
|
legacy: "legacy";
|
|
803
812
|
}>>;
|
|
813
|
+
organizationUserSetupEmailTokenTransport: z.ZodDefault<z.ZodEnum<{
|
|
814
|
+
fragment: "fragment";
|
|
815
|
+
query: "query";
|
|
816
|
+
}>>;
|
|
817
|
+
organizationUserSetupQueryEdgeSanitizationConfirmed: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
804
818
|
resendApiKey: z.ZodOptional<z.ZodString>;
|
|
805
819
|
emailFrom: z.ZodDefault<z.ZodString>;
|
|
806
820
|
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"),
|
|
@@ -3205,6 +3223,8 @@ function productShortLabelForModelId(modelId) {
|
|
|
3205
3223
|
return "5.6 Terra";
|
|
3206
3224
|
case "gpt-5.6-luna":
|
|
3207
3225
|
return "5.6 Luna";
|
|
3226
|
+
case "gpt-6-astra":
|
|
3227
|
+
return "6 Astra";
|
|
3208
3228
|
default:
|
|
3209
3229
|
return null;
|
|
3210
3230
|
}
|
|
@@ -3224,7 +3244,7 @@ function builtinContextLimitsForModel(settings, modelId) {
|
|
|
3224
3244
|
return { contextWindowTokens: settings.contextWindowTokens };
|
|
3225
3245
|
}
|
|
3226
3246
|
function builtinLatencyModesForModel(modelId) {
|
|
3227
|
-
if (isBuiltinGpt56ModelId(modelId) || modelId.startsWith("codex/gpt-5.6-")) {
|
|
3247
|
+
if (isBuiltinGpt56ModelId(modelId) || modelId.startsWith("codex/gpt-5.6-") || modelId === "codex/gpt-6-astra") {
|
|
3228
3248
|
return [
|
|
3229
3249
|
{ id: "standard", upstream: "supported", runnable: true },
|
|
3230
3250
|
{
|
|
@@ -3478,7 +3498,7 @@ function withCodexCatalogProvider(settings) {
|
|
|
3478
3498
|
...legacyModelCapabilities(settings, {
|
|
3479
3499
|
reasoningEffort: true,
|
|
3480
3500
|
hostedWebSearch: true,
|
|
3481
|
-
vision: slug.startsWith("gpt-5.6-")
|
|
3501
|
+
vision: slug.startsWith("gpt-5.6-") || slug === "gpt-6-astra"
|
|
3482
3502
|
}),
|
|
3483
3503
|
...builtinPromptCachingForModel(`${CODEX_MODEL_ID_PREFIX}${slug}`) ? {
|
|
3484
3504
|
promptCaching: builtinPromptCachingForModel(`${CODEX_MODEL_ID_PREFIX}${slug}`)
|
|
@@ -4612,6 +4632,11 @@ function isDigestPinnedModalDesktopImage(settings) {
|
|
|
4612
4632
|
}
|
|
4613
4633
|
function validateSettings(settings, source = process.env) {
|
|
4614
4634
|
temporalConnectionOptions(settings);
|
|
4635
|
+
if (settings.organizationUserSetupEmailTokenTransport === "query" && !settings.organizationUserSetupQueryEdgeSanitizationConfirmed) {
|
|
4636
|
+
throw new Error(
|
|
4637
|
+
"OPENGENI_ORGANIZATION_USER_SETUP_QUERY_EDGE_SANITIZATION_CONFIRMED=true is required when OPENGENI_ORGANIZATION_USER_SETUP_EMAIL_TOKEN_TRANSPORT=query"
|
|
4638
|
+
);
|
|
4639
|
+
}
|
|
4615
4640
|
if (settings.goalIdleBackoffMs.some((delayMs) => delayMs > settings.goalIdleBackoffMaxMs)) {
|
|
4616
4641
|
throw new Error(
|
|
4617
4642
|
`OPENGENI_GOAL_IDLE_BACKOFF_MS entries must not exceed OPENGENI_GOAL_IDLE_BACKOFF_MAX_MS (${settings.goalIdleBackoffMaxMs})`
|
|
@@ -4689,6 +4714,24 @@ function validateSettings(settings, source = process.env) {
|
|
|
4689
4714
|
);
|
|
4690
4715
|
}
|
|
4691
4716
|
}
|
|
4717
|
+
if (settings.mcpOauthEnabled) {
|
|
4718
|
+
if (settings.productAccessMode === "configured") {
|
|
4719
|
+
throw new Error(
|
|
4720
|
+
"OPENGENI_MCP_OAUTH_ENABLED=true requires managed or local product access mode"
|
|
4721
|
+
);
|
|
4722
|
+
}
|
|
4723
|
+
const publicOrigin = canonicalPublicOrigin(settings.publicBaseUrl);
|
|
4724
|
+
if (!publicOrigin) {
|
|
4725
|
+
throw new Error(
|
|
4726
|
+
"OPENGENI_PUBLIC_BASE_URL must be a credential-free HTTP(S) origin when OPENGENI_MCP_OAUTH_ENABLED=true"
|
|
4727
|
+
);
|
|
4728
|
+
}
|
|
4729
|
+
if (!publicOrigin.startsWith("https://") && !["local", "test"].includes(settings.environment)) {
|
|
4730
|
+
throw new Error(
|
|
4731
|
+
"OPENGENI_PUBLIC_BASE_URL must use https when OPENGENI_MCP_OAUTH_ENABLED=true outside local/test"
|
|
4732
|
+
);
|
|
4733
|
+
}
|
|
4734
|
+
}
|
|
4692
4735
|
environmentsEncryptionKeyBytes(settings);
|
|
4693
4736
|
if (settings.integrationsEnabled) {
|
|
4694
4737
|
if (settings.productAccessMode === "managed" && !settings.publicBaseUrl) {
|
|
@@ -5288,6 +5331,7 @@ export {
|
|
|
5288
5331
|
DEFAULT_AGENT_INSTRUCTIONS,
|
|
5289
5332
|
DEFAULT_GOAL_IDLE_BACKOFF_MAX_MS,
|
|
5290
5333
|
DEFAULT_GOAL_IDLE_BACKOFF_MS,
|
|
5334
|
+
DEFAULT_MODAL_IMAGE_REF,
|
|
5291
5335
|
DEFAULT_MODEL_COST_POLICY_JSON,
|
|
5292
5336
|
DEFAULT_OPENROUTER_MODEL_ID,
|
|
5293
5337
|
GOOGLE_DRIVE_PROVIDER_REQUEST_TIMEOUT_MAX_MS,
|