@opengeni/config 2.0.0 → 2.1.0-canary.35916963870001
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 +191 -0
- package/dist/index.js +261 -22
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +378 -54
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare const DEFAULT_OPENROUTER_MODEL_ID: "openrouter/nvidia/nemotron-3-
|
|
|
5
5
|
export declare const DEFAULT_MODEL_COST_POLICY_JSON: string;
|
|
6
6
|
export declare const SANDBOX_ARCHIVE_CAPTURE_MAX_TIMEOUT_MS: number;
|
|
7
7
|
export declare const SANDBOX_ARCHIVE_CAPTURE_SETTLEMENT_GRACE_MS = 10000;
|
|
8
|
+
export declare const SANDBOX_DEADLINE_COMMAND_STOP_GRACE_MS = 120000;
|
|
8
9
|
export declare const SANDBOX_SNAPSHOT_MAX_TIMEOUT_MS: number;
|
|
9
10
|
export declare const GOOGLE_DRIVE_PROVIDER_REQUEST_TIMEOUT_MAX_MS = 60000;
|
|
10
11
|
export declare const GOOGLE_DRIVE_PROVIDER_RETRY_DELAY_MAX_MS = 60000;
|
|
@@ -143,6 +144,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
143
144
|
disabled: "disabled";
|
|
144
145
|
stripe: "stripe";
|
|
145
146
|
}>>;
|
|
147
|
+
verifiedSignupTrialCreditsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
146
148
|
entitlementsMode: z.ZodDefault<z.ZodEnum<{
|
|
147
149
|
managed: "managed";
|
|
148
150
|
none: "none";
|
|
@@ -190,6 +192,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
190
192
|
computer_observe: "computer_observe";
|
|
191
193
|
computer_open: "computer_open";
|
|
192
194
|
computer_targets: "computer_targets";
|
|
195
|
+
connected_machine_enroll_token: "connected_machine_enroll_token";
|
|
193
196
|
connected_machine_remove: "connected_machine_remove";
|
|
194
197
|
editable_artifact_apply: "editable_artifact_apply";
|
|
195
198
|
editable_artifact_create: "editable_artifact_create";
|
|
@@ -359,6 +362,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
359
362
|
computer_observe: "computer_observe";
|
|
360
363
|
computer_open: "computer_open";
|
|
361
364
|
computer_targets: "computer_targets";
|
|
365
|
+
connected_machine_enroll_token: "connected_machine_enroll_token";
|
|
362
366
|
connected_machine_remove: "connected_machine_remove";
|
|
363
367
|
editable_artifact_apply: "editable_artifact_apply";
|
|
364
368
|
editable_artifact_create: "editable_artifact_create";
|
|
@@ -504,6 +508,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
504
508
|
environmentsEncryptionKey: z.ZodOptional<z.ZodString>;
|
|
505
509
|
integrationsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
506
510
|
integrationsStateSecret: z.ZodOptional<z.ZodString>;
|
|
511
|
+
integrationsOauthShortStateEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
507
512
|
integrationsAllowPrivateNetworkTargets: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
508
513
|
integrationsOauthClientsJson: z.ZodDefault<z.ZodString>;
|
|
509
514
|
slackClientId: z.ZodOptional<z.ZodString>;
|
|
@@ -605,6 +610,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
605
610
|
openrouterApiKey: z.ZodOptional<z.ZodString>;
|
|
606
611
|
resolvedGatewayModelsJson: z.ZodOptional<z.ZodString>;
|
|
607
612
|
resolvedOpenRouterModelsJson: z.ZodOptional<z.ZodString>;
|
|
613
|
+
resolvedCodexModelsJson: z.ZodOptional<z.ZodString>;
|
|
608
614
|
modelProvidersJson: z.ZodDefault<z.ZodString>;
|
|
609
615
|
codexSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
610
616
|
supergrokSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
@@ -784,6 +790,11 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
784
790
|
workspaceControlLockTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
785
791
|
rigSetupTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
786
792
|
sandboxWarmRateMicrosPerSecondJson: z.ZodDefault<z.ZodString>;
|
|
793
|
+
sandboxWarmBillingMode: z.ZodDefault<z.ZodEnum<{
|
|
794
|
+
credits: "credits";
|
|
795
|
+
shadow: "shadow";
|
|
796
|
+
usage_only: "usage_only";
|
|
797
|
+
}>>;
|
|
787
798
|
sandboxMaxWarmSecondsPerWorkspace: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
788
799
|
sandboxPreparationProfiles: z.ZodDefault<z.ZodString>;
|
|
789
800
|
sandboxEnvAllowlist: z.ZodDefault<z.ZodString>;
|
|
@@ -821,6 +832,13 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
821
832
|
documentEmbeddingDimensions: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
822
833
|
documentEmbeddingApiKey: z.ZodOptional<z.ZodString>;
|
|
823
834
|
documentEmbeddingBaseUrl: z.ZodOptional<z.ZodString>;
|
|
835
|
+
documentEmbeddingBillingMode: z.ZodDefault<z.ZodEnum<{
|
|
836
|
+
credits: "credits";
|
|
837
|
+
shadow: "shadow";
|
|
838
|
+
usage_only: "usage_only";
|
|
839
|
+
}>>;
|
|
840
|
+
documentEmbeddingCreditsActivatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
841
|
+
documentEmbeddingRateMicrosPerMillionBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
824
842
|
documentCurationProvider: z.ZodDefault<z.ZodEnum<{
|
|
825
843
|
heuristic: "heuristic";
|
|
826
844
|
none: "none";
|
|
@@ -1970,6 +1988,166 @@ export declare const ModelCatalogDocument: z.ZodObject<{
|
|
|
1970
1988
|
publicDefaultHeaderNames: z.ZodOptional<z.ZodNever>;
|
|
1971
1989
|
publicDefaultQueryNames: z.ZodOptional<z.ZodNever>;
|
|
1972
1990
|
}, z.core.$strict>>>;
|
|
1991
|
+
codexModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1992
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1993
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1994
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1995
|
+
contextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1996
|
+
effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1997
|
+
autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
|
|
1998
|
+
toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
|
|
1999
|
+
reasoningEffort: z.ZodOptional<z.ZodBoolean>;
|
|
2000
|
+
hostedWebSearch: z.ZodOptional<z.ZodBoolean>;
|
|
2001
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
2002
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
2003
|
+
retired: z.ZodOptional<z.ZodBoolean>;
|
|
2004
|
+
id: z.ZodString;
|
|
2005
|
+
upstreamModelId: z.ZodString;
|
|
2006
|
+
capabilities: z.ZodObject<{
|
|
2007
|
+
reasoning: z.ZodObject<{
|
|
2008
|
+
upstream: z.ZodEnum<{
|
|
2009
|
+
supported: "supported";
|
|
2010
|
+
unknown: "unknown";
|
|
2011
|
+
unsupported: "unsupported";
|
|
2012
|
+
}>;
|
|
2013
|
+
runnable: z.ZodBoolean;
|
|
2014
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
2015
|
+
high: "high";
|
|
2016
|
+
low: "low";
|
|
2017
|
+
max: "max";
|
|
2018
|
+
medium: "medium";
|
|
2019
|
+
minimal: "minimal";
|
|
2020
|
+
none: "none";
|
|
2021
|
+
xhigh: "xhigh";
|
|
2022
|
+
}>>;
|
|
2023
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
2024
|
+
high: "high";
|
|
2025
|
+
low: "low";
|
|
2026
|
+
max: "max";
|
|
2027
|
+
medium: "medium";
|
|
2028
|
+
minimal: "minimal";
|
|
2029
|
+
none: "none";
|
|
2030
|
+
xhigh: "xhigh";
|
|
2031
|
+
}>>;
|
|
2032
|
+
required: z.ZodBoolean;
|
|
2033
|
+
}, z.core.$strip>;
|
|
2034
|
+
functionCalling: z.ZodObject<{
|
|
2035
|
+
upstream: z.ZodEnum<{
|
|
2036
|
+
supported: "supported";
|
|
2037
|
+
unknown: "unknown";
|
|
2038
|
+
unsupported: "unsupported";
|
|
2039
|
+
}>;
|
|
2040
|
+
runnable: z.ZodBoolean;
|
|
2041
|
+
}, z.core.$strip>;
|
|
2042
|
+
structuredOutput: z.ZodObject<{
|
|
2043
|
+
upstream: z.ZodEnum<{
|
|
2044
|
+
supported: "supported";
|
|
2045
|
+
unknown: "unknown";
|
|
2046
|
+
unsupported: "unsupported";
|
|
2047
|
+
}>;
|
|
2048
|
+
runnable: z.ZodBoolean;
|
|
2049
|
+
}, z.core.$strip>;
|
|
2050
|
+
hostedTools: z.ZodObject<{
|
|
2051
|
+
webSearch: z.ZodObject<{
|
|
2052
|
+
upstream: z.ZodEnum<{
|
|
2053
|
+
supported: "supported";
|
|
2054
|
+
unknown: "unknown";
|
|
2055
|
+
unsupported: "unsupported";
|
|
2056
|
+
}>;
|
|
2057
|
+
runnable: z.ZodBoolean;
|
|
2058
|
+
}, z.core.$strip>;
|
|
2059
|
+
xSearch: z.ZodObject<{
|
|
2060
|
+
upstream: z.ZodEnum<{
|
|
2061
|
+
supported: "supported";
|
|
2062
|
+
unknown: "unknown";
|
|
2063
|
+
unsupported: "unsupported";
|
|
2064
|
+
}>;
|
|
2065
|
+
runnable: z.ZodBoolean;
|
|
2066
|
+
}, z.core.$strip>;
|
|
2067
|
+
codeExecution: z.ZodObject<{
|
|
2068
|
+
upstream: z.ZodEnum<{
|
|
2069
|
+
supported: "supported";
|
|
2070
|
+
unknown: "unknown";
|
|
2071
|
+
unsupported: "unsupported";
|
|
2072
|
+
}>;
|
|
2073
|
+
runnable: z.ZodBoolean;
|
|
2074
|
+
}, z.core.$strip>;
|
|
2075
|
+
imageGeneration: z.ZodDefault<z.ZodObject<{
|
|
2076
|
+
upstream: z.ZodEnum<{
|
|
2077
|
+
supported: "supported";
|
|
2078
|
+
unknown: "unknown";
|
|
2079
|
+
unsupported: "unsupported";
|
|
2080
|
+
}>;
|
|
2081
|
+
runnable: z.ZodBoolean;
|
|
2082
|
+
}, z.core.$strip>>;
|
|
2083
|
+
}, z.core.$strip>;
|
|
2084
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
2085
|
+
audio: "audio";
|
|
2086
|
+
image: "image";
|
|
2087
|
+
text: "text";
|
|
2088
|
+
}>>;
|
|
2089
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2090
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
2091
|
+
audio: "audio";
|
|
2092
|
+
image: "image";
|
|
2093
|
+
text: "text";
|
|
2094
|
+
}>>;
|
|
2095
|
+
transports: z.ZodObject<{
|
|
2096
|
+
sse: z.ZodObject<{
|
|
2097
|
+
upstream: z.ZodEnum<{
|
|
2098
|
+
supported: "supported";
|
|
2099
|
+
unknown: "unknown";
|
|
2100
|
+
unsupported: "unsupported";
|
|
2101
|
+
}>;
|
|
2102
|
+
runnable: z.ZodBoolean;
|
|
2103
|
+
}, z.core.$strip>;
|
|
2104
|
+
responsesWebSocket: z.ZodObject<{
|
|
2105
|
+
upstream: z.ZodEnum<{
|
|
2106
|
+
supported: "supported";
|
|
2107
|
+
unknown: "unknown";
|
|
2108
|
+
unsupported: "unsupported";
|
|
2109
|
+
}>;
|
|
2110
|
+
runnable: z.ZodBoolean;
|
|
2111
|
+
}, z.core.$strip>;
|
|
2112
|
+
realtimeAudio: z.ZodObject<{
|
|
2113
|
+
upstream: z.ZodEnum<{
|
|
2114
|
+
supported: "supported";
|
|
2115
|
+
unknown: "unknown";
|
|
2116
|
+
unsupported: "unsupported";
|
|
2117
|
+
}>;
|
|
2118
|
+
runnable: z.ZodBoolean;
|
|
2119
|
+
}, z.core.$strip>;
|
|
2120
|
+
}, z.core.$strip>;
|
|
2121
|
+
promptCaching: z.ZodOptional<z.ZodObject<{
|
|
2122
|
+
upstream: z.ZodEnum<{
|
|
2123
|
+
supported: "supported";
|
|
2124
|
+
unknown: "unknown";
|
|
2125
|
+
unsupported: "unsupported";
|
|
2126
|
+
}>;
|
|
2127
|
+
runnable: z.ZodBoolean;
|
|
2128
|
+
mode: z.ZodEnum<{
|
|
2129
|
+
automatic: "automatic";
|
|
2130
|
+
implicit: "implicit";
|
|
2131
|
+
none: "none";
|
|
2132
|
+
}>;
|
|
2133
|
+
}, z.core.$strip>>;
|
|
2134
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
2135
|
+
id: z.ZodEnum<{
|
|
2136
|
+
fast: "fast";
|
|
2137
|
+
priority: "priority";
|
|
2138
|
+
standard: "standard";
|
|
2139
|
+
}>;
|
|
2140
|
+
upstream: z.ZodEnum<{
|
|
2141
|
+
supported: "supported";
|
|
2142
|
+
unknown: "unknown";
|
|
2143
|
+
unsupported: "unsupported";
|
|
2144
|
+
}>;
|
|
2145
|
+
runnable: z.ZodBoolean;
|
|
2146
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
2147
|
+
}, z.core.$strip>>;
|
|
2148
|
+
}, z.core.$strip>;
|
|
2149
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
2150
|
+
}, z.core.$strict>>>;
|
|
1973
2151
|
gatewayModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1974
2152
|
productId: z.ZodString;
|
|
1975
2153
|
workspaceProductId: z.ZodString;
|
|
@@ -2500,6 +2678,14 @@ export declare function canonicalizeConfiguredModelId(settings: Settings, modelI
|
|
|
2500
2678
|
* openai allow-list, then registry ids.
|
|
2501
2679
|
*/
|
|
2502
2680
|
export declare function configuredAllowedModels(settings: Settings): string[];
|
|
2681
|
+
/** Retirement is selection metadata, never provider authority or executable identity. */
|
|
2682
|
+
export declare function isModelAvailableForNewSelection(settings: Settings, modelId: string): boolean;
|
|
2683
|
+
/** Called only with the durable policy installed for a claimed accepted attempt. */
|
|
2684
|
+
export declare function settingsForAcceptedSubscriptionTurn(settings: Settings, policy: TurnExecutionPolicyV1, expected: {
|
|
2685
|
+
modelId: string;
|
|
2686
|
+
reasoningEffort: Settings["openaiReasoningEffort"];
|
|
2687
|
+
latencyMode?: LatencyMode;
|
|
2688
|
+
}): Settings;
|
|
2503
2689
|
/**
|
|
2504
2690
|
* Resolve a model string to the provider that serves it and its configured
|
|
2505
2691
|
* shape. Returns undefined when the id is not exposed (built-in allow-list nor
|
|
@@ -2533,6 +2719,11 @@ export declare function resolveModelProviderForTurn(settings: Settings, modelId:
|
|
|
2533
2719
|
* neither proves readiness nor chooses, decrypts, leases, or exposes an account.
|
|
2534
2720
|
*/
|
|
2535
2721
|
export declare function resolveTurnExecutionPolicyV1(settings: Settings, input: ResolveTurnExecutionPolicyV1Input): TurnExecutionPolicyV1;
|
|
2722
|
+
/** Explicit accepted execution identity matches, but its definition digest differs. */
|
|
2723
|
+
export declare class TurnExecutionPolicyDefinitionMismatchError extends Error {
|
|
2724
|
+
readonly code = "turn_execution_policy_definition_mismatch";
|
|
2725
|
+
constructor();
|
|
2726
|
+
}
|
|
2536
2727
|
/**
|
|
2537
2728
|
* Parse-time validation lives in @opengeni/contracts; this verifier binds a
|
|
2538
2729
|
* present snapshot to the current executable definition and exact turn row.
|