@opengeni/config 2.1.0 → 2.1.1-canary.36199476632001
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 +99 -1
- package/dist/index.js +231 -10
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +366 -12
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Entitlements, LatencyMode, ReasoningEffort, SandboxBackend, StaticUsageLimits, TurnExecutionPolicyV1, type TurnExecutionLatencyModeSourceV1, type TurnExecutionModelSourceV1, type TurnExecutionReasoningSourceV1, type VideoGenerationResolution, type FirstPartyMcpToolName as FirstPartyMcpToolNameType } from "@opengeni/contracts";
|
|
2
|
+
import type { CodeSearchDeploymentPolicy } from "@opengeni/contracts/code-search";
|
|
2
3
|
export { XAI_SUBSCRIPTION_MODEL_ID_PREFIX } from "@opengeni/xai-subscription";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
export declare const DEFAULT_OPENROUTER_MODEL_ID: "openrouter/nvidia/nemotron-3-super-120b-a12b:free";
|
|
5
6
|
export declare const DEFAULT_MODEL_COST_POLICY_JSON: string;
|
|
6
7
|
export declare const SANDBOX_ARCHIVE_CAPTURE_MAX_TIMEOUT_MS: number;
|
|
7
8
|
export declare const SANDBOX_ARCHIVE_CAPTURE_SETTLEMENT_GRACE_MS = 10000;
|
|
9
|
+
export declare const SANDBOX_DEADLINE_COMMAND_STOP_GRACE_MS = 120000;
|
|
8
10
|
export declare const SANDBOX_SNAPSHOT_MAX_TIMEOUT_MS: number;
|
|
9
11
|
export declare const GOOGLE_DRIVE_PROVIDER_REQUEST_TIMEOUT_MAX_MS = 60000;
|
|
10
12
|
export declare const GOOGLE_DRIVE_PROVIDER_RETRY_DELAY_MAX_MS = 60000;
|
|
@@ -127,8 +129,10 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
127
129
|
analyticsPosthogHost: z.ZodOptional<z.ZodString>;
|
|
128
130
|
analyticsGa4MeasurementId: z.ZodOptional<z.ZodString>;
|
|
129
131
|
publicBaseUrl: z.ZodOptional<z.ZodString>;
|
|
132
|
+
documentationUrl: z.ZodPreprocess<z.ZodDefault<z.ZodNullable<z.ZodURL>>>;
|
|
130
133
|
mcpOauthEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
131
|
-
|
|
134
|
+
apiTrustedProxyHops: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
135
|
+
apiTrustedProxyCidrs: z.ZodDefault<z.ZodString>;
|
|
132
136
|
webBaseUrl: z.ZodOptional<z.ZodString>;
|
|
133
137
|
agentReleasesBaseUrl: z.ZodDefault<z.ZodString>;
|
|
134
138
|
agentStableVersion: z.ZodDefault<z.ZodString>;
|
|
@@ -143,6 +147,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
143
147
|
disabled: "disabled";
|
|
144
148
|
stripe: "stripe";
|
|
145
149
|
}>>;
|
|
150
|
+
verifiedSignupTrialCreditsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
146
151
|
entitlementsMode: z.ZodDefault<z.ZodEnum<{
|
|
147
152
|
managed: "managed";
|
|
148
153
|
none: "none";
|
|
@@ -177,6 +182,8 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
177
182
|
browser_observe: "browser_observe";
|
|
178
183
|
browser_open: "browser_open";
|
|
179
184
|
browser_publish: "browser_publish";
|
|
185
|
+
browser_read: "browser_read";
|
|
186
|
+
browser_screenshot: "browser_screenshot";
|
|
180
187
|
browser_tabs: "browser_tabs";
|
|
181
188
|
capability_authorization_request: "capability_authorization_request";
|
|
182
189
|
capability_catalog_search: "capability_catalog_search";
|
|
@@ -192,6 +199,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
192
199
|
computer_targets: "computer_targets";
|
|
193
200
|
connected_machine_enroll_token: "connected_machine_enroll_token";
|
|
194
201
|
connected_machine_remove: "connected_machine_remove";
|
|
202
|
+
custom_mcp_setup_request: "custom_mcp_setup_request";
|
|
195
203
|
editable_artifact_apply: "editable_artifact_apply";
|
|
196
204
|
editable_artifact_create: "editable_artifact_create";
|
|
197
205
|
editable_artifact_export: "editable_artifact_export";
|
|
@@ -347,6 +355,8 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
347
355
|
browser_observe: "browser_observe";
|
|
348
356
|
browser_open: "browser_open";
|
|
349
357
|
browser_publish: "browser_publish";
|
|
358
|
+
browser_read: "browser_read";
|
|
359
|
+
browser_screenshot: "browser_screenshot";
|
|
350
360
|
browser_tabs: "browser_tabs";
|
|
351
361
|
capability_authorization_request: "capability_authorization_request";
|
|
352
362
|
capability_catalog_search: "capability_catalog_search";
|
|
@@ -362,6 +372,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
362
372
|
computer_targets: "computer_targets";
|
|
363
373
|
connected_machine_enroll_token: "connected_machine_enroll_token";
|
|
364
374
|
connected_machine_remove: "connected_machine_remove";
|
|
375
|
+
custom_mcp_setup_request: "custom_mcp_setup_request";
|
|
365
376
|
editable_artifact_apply: "editable_artifact_apply";
|
|
366
377
|
editable_artifact_create: "editable_artifact_create";
|
|
367
378
|
editable_artifact_export: "editable_artifact_export";
|
|
@@ -555,10 +566,12 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
555
566
|
authAllowMetrics: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
556
567
|
apiHost: z.ZodDefault<z.ZodString>;
|
|
557
568
|
apiPort: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
569
|
+
apiMetricsPort: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
558
570
|
workerHttpPort: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
559
571
|
opengeniMcpInternalUrl: z.ZodOptional<z.ZodString>;
|
|
560
572
|
opengeniMcpUrl: z.ZodOptional<z.ZodString>;
|
|
561
573
|
corsAllowOriginRegex: z.ZodDefault<z.ZodString>;
|
|
574
|
+
localAllowedOrigins: z.ZodOptional<z.ZodString>;
|
|
562
575
|
openaiProvider: z.ZodDefault<z.ZodEnum<{
|
|
563
576
|
azure: "azure";
|
|
564
577
|
openai: "openai";
|
|
@@ -630,6 +643,16 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
630
643
|
xhigh: "xhigh";
|
|
631
644
|
}>>;
|
|
632
645
|
openaiAllowedReasoningEfforts: z.ZodDefault<z.ZodString>;
|
|
646
|
+
creditsDefaultModel: z.ZodDefault<z.ZodString>;
|
|
647
|
+
creditsDefaultReasoningEffort: z.ZodDefault<z.ZodEnum<{
|
|
648
|
+
high: "high";
|
|
649
|
+
low: "low";
|
|
650
|
+
max: "max";
|
|
651
|
+
medium: "medium";
|
|
652
|
+
minimal: "minimal";
|
|
653
|
+
none: "none";
|
|
654
|
+
xhigh: "xhigh";
|
|
655
|
+
}>>;
|
|
633
656
|
openaiResponsesTransport: z.ZodDefault<z.ZodEnum<{
|
|
634
657
|
http: "http";
|
|
635
658
|
websocket: "websocket";
|
|
@@ -641,6 +664,16 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
641
664
|
openaiReasoningEncryptedContent: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
642
665
|
openaiMaxRetries: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
643
666
|
webSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
667
|
+
jevApiKey: z.ZodOptional<z.ZodString>;
|
|
668
|
+
jevBaseUrl: z.ZodDefault<z.ZodString>;
|
|
669
|
+
jevModel: z.ZodDefault<z.ZodString>;
|
|
670
|
+
jevRequestTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
671
|
+
codeSearchMode: z.ZodDefault<z.ZodEnum<{
|
|
672
|
+
default_on: "default_on";
|
|
673
|
+
experiment: "experiment";
|
|
674
|
+
off: "off";
|
|
675
|
+
opt_in: "opt_in";
|
|
676
|
+
}>>;
|
|
644
677
|
agentInstructionsTemplate: z.ZodDefault<z.ZodString>;
|
|
645
678
|
azureOpenaiBaseUrl: z.ZodOptional<z.ZodString>;
|
|
646
679
|
azureOpenaiEndpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -788,6 +821,11 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
788
821
|
workspaceControlLockTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
789
822
|
rigSetupTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
790
823
|
sandboxWarmRateMicrosPerSecondJson: z.ZodDefault<z.ZodString>;
|
|
824
|
+
sandboxWarmBillingMode: z.ZodDefault<z.ZodEnum<{
|
|
825
|
+
credits: "credits";
|
|
826
|
+
shadow: "shadow";
|
|
827
|
+
usage_only: "usage_only";
|
|
828
|
+
}>>;
|
|
791
829
|
sandboxMaxWarmSecondsPerWorkspace: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
792
830
|
sandboxPreparationProfiles: z.ZodDefault<z.ZodString>;
|
|
793
831
|
sandboxEnvAllowlist: z.ZodDefault<z.ZodString>;
|
|
@@ -825,6 +863,13 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
825
863
|
documentEmbeddingDimensions: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
826
864
|
documentEmbeddingApiKey: z.ZodOptional<z.ZodString>;
|
|
827
865
|
documentEmbeddingBaseUrl: z.ZodOptional<z.ZodString>;
|
|
866
|
+
documentEmbeddingBillingMode: z.ZodDefault<z.ZodEnum<{
|
|
867
|
+
credits: "credits";
|
|
868
|
+
shadow: "shadow";
|
|
869
|
+
usage_only: "usage_only";
|
|
870
|
+
}>>;
|
|
871
|
+
documentEmbeddingCreditsActivatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
872
|
+
documentEmbeddingRateMicrosPerMillionBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
828
873
|
documentCurationProvider: z.ZodDefault<z.ZodEnum<{
|
|
829
874
|
heuristic: "heuristic";
|
|
830
875
|
none: "none";
|
|
@@ -1059,6 +1104,15 @@ export type VoiceInputProviderConfig = {
|
|
|
1059
1104
|
kind: "supergrok-subscription";
|
|
1060
1105
|
experimental: true;
|
|
1061
1106
|
};
|
|
1107
|
+
/** The deployment's Jev key, or undefined when it is missing or a placeholder. */
|
|
1108
|
+
export declare function usableJevApiKey(settings: Pick<Settings, "jevApiKey">): string | undefined;
|
|
1109
|
+
/**
|
|
1110
|
+
* Deployment half of the `code_search` decision. `available` is false when
|
|
1111
|
+
* the mode is off or no usable Jev key is configured; workspaces then cannot
|
|
1112
|
+
* turn it on. `workspaceDefault` applies to workspaces without their own
|
|
1113
|
+
* setting.
|
|
1114
|
+
*/
|
|
1115
|
+
export declare function codeSearchDeploymentPolicy(settings: Pick<Settings, "codeSearchMode" | "jevApiKey">): CodeSearchDeploymentPolicy;
|
|
1062
1116
|
/**
|
|
1063
1117
|
* Reject empty / template secrets so `.env.example` placeholders like
|
|
1064
1118
|
* `your-key` cannot advertise voice input as available and then 401 upstream.
|
|
@@ -2386,6 +2440,20 @@ export interface ConfiguredModel {
|
|
|
2386
2440
|
reasoningEffort: boolean;
|
|
2387
2441
|
hostedWebSearch: boolean;
|
|
2388
2442
|
}
|
|
2443
|
+
/**
|
|
2444
|
+
* Whether a resolved route is the deployment-funded OpenRouter free tier: the
|
|
2445
|
+
* managed OpenRouter provider, which sends every workspace's requests with the
|
|
2446
|
+
* deployment's one OpenRouter key, serving an upstream `:free` variant (the
|
|
2447
|
+
* curated catalog admits nothing else). OpenRouter limits free-variant
|
|
2448
|
+
* requests per account per minute and per day, so each request on this route
|
|
2449
|
+
* spends quota that every turn on the deployment shares. A workspace or
|
|
2450
|
+
* organization OpenRouter connection uses its own account and is not this
|
|
2451
|
+
* route.
|
|
2452
|
+
*/
|
|
2453
|
+
export declare function isManagedOpenRouterFreeRoute(route: {
|
|
2454
|
+
provider: Pick<ResolvedModelProvider, "kind">;
|
|
2455
|
+
configured: Pick<ConfiguredModel, "upstreamModelId">;
|
|
2456
|
+
}): boolean;
|
|
2389
2457
|
export declare const VERCEL_AI_GATEWAY_BASE_URL: "https://ai-gateway.vercel.sh/v1";
|
|
2390
2458
|
export declare const VERCEL_AI_GATEWAY_AI_SDK_BASE_URL: "https://ai-gateway.vercel.sh/v4/ai";
|
|
2391
2459
|
export declare const VERCEL_AI_GATEWAY_CONNECTION_DOMAIN: "ai-gateway.vercel.sh";
|
|
@@ -2705,6 +2773,11 @@ export declare function resolveModelProviderForTurn(settings: Settings, modelId:
|
|
|
2705
2773
|
* neither proves readiness nor chooses, decrypts, leases, or exposes an account.
|
|
2706
2774
|
*/
|
|
2707
2775
|
export declare function resolveTurnExecutionPolicyV1(settings: Settings, input: ResolveTurnExecutionPolicyV1Input): TurnExecutionPolicyV1;
|
|
2776
|
+
/** Explicit accepted execution identity matches, but its definition digest differs. */
|
|
2777
|
+
export declare class TurnExecutionPolicyDefinitionMismatchError extends Error {
|
|
2778
|
+
readonly code = "turn_execution_policy_definition_mismatch";
|
|
2779
|
+
constructor();
|
|
2780
|
+
}
|
|
2708
2781
|
/**
|
|
2709
2782
|
* Parse-time validation lives in @opengeni/contracts; this verifier binds a
|
|
2710
2783
|
* present snapshot to the current executable definition and exact turn row.
|
|
@@ -2937,6 +3010,31 @@ export declare function firstPartyMcpInternalBaseUrl(settings: Settings): string
|
|
|
2937
3010
|
export declare function firstPartyMcpWorkspaceUrl(settings: Settings, workspaceId: string): string;
|
|
2938
3011
|
export declare function firstPartyMcpInternalWorkspaceUrl(settings: Settings, workspaceId: string): string;
|
|
2939
3012
|
export declare function codemodeWorkspaceUrl(settings: Settings, workspaceId: string): string;
|
|
3013
|
+
export type TrustedProxyCidr = {
|
|
3014
|
+
address: string;
|
|
3015
|
+
prefix: number;
|
|
3016
|
+
family: "ipv4" | "ipv6";
|
|
3017
|
+
};
|
|
3018
|
+
/**
|
|
3019
|
+
* Parse `OPENGENI_API_TRUSTED_PROXY_CIDRS`: comma-separated IPv4/IPv6 CIDRs or
|
|
3020
|
+
* single addresses. Throws on any malformed entry so a typo can never widen or
|
|
3021
|
+
* silently disable the trusted proxy set.
|
|
3022
|
+
*/
|
|
3023
|
+
export declare function trustedProxyCidrEntries(raw: string): TrustedProxyCidr[];
|
|
3024
|
+
/**
|
|
3025
|
+
* Parse `OPENGENI_LOCAL_ALLOWED_ORIGINS`: comma-separated exact browser origins
|
|
3026
|
+
* (`http(s)://host[:port]`, no path, query, credentials, or wildcard). Throws on
|
|
3027
|
+
* any malformed entry so a typo can never widen or silently disable the local
|
|
3028
|
+
* browser boundary.
|
|
3029
|
+
*/
|
|
3030
|
+
export declare function localAllowedOriginEntries(raw: string | undefined): string[];
|
|
3031
|
+
/**
|
|
3032
|
+
* Local development only: whether a normalized API path is one a sandbox calls
|
|
3033
|
+
* (Codemode, first-party MCP, and the personal Git broker). The Linux Docker
|
|
3034
|
+
* sandbox route relays only these, and the local API serves only these on the
|
|
3035
|
+
* addresses that only sandboxes use (see `apps/api/src/http/local-browser-boundary.ts`).
|
|
3036
|
+
*/
|
|
3037
|
+
export declare function localSandboxApiRouteAllowed(pathname: string): boolean;
|
|
2940
3038
|
/** Validate one fully resolved, secret-bearing executable catalog. */
|
|
2941
3039
|
export declare function validateModelCatalogSettings(settings: Settings, source?: NodeJS.ProcessEnv): ConfiguredModel[];
|
|
2942
3040
|
/**
|