@opengeni/config 0.10.14 → 0.12.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 +7 -0
- package/dist/index.js +46 -24
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +69 -32
package/dist/index.d.ts
CHANGED
|
@@ -98,6 +98,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
98
98
|
webBaseUrl: z.ZodOptional<z.ZodString>;
|
|
99
99
|
agentReleasesBaseUrl: z.ZodDefault<z.ZodString>;
|
|
100
100
|
agentStableVersion: z.ZodDefault<z.ZodString>;
|
|
101
|
+
agentBetaVersion: z.ZodOptional<z.ZodString>;
|
|
101
102
|
productAccessMode: z.ZodDefault<z.ZodEnum<{
|
|
102
103
|
configured: "configured";
|
|
103
104
|
local: "local";
|
|
@@ -166,6 +167,12 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
166
167
|
vercelAiGatewayApiKey: z.ZodOptional<z.ZodString>;
|
|
167
168
|
voiceInputMaxDurationSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
168
169
|
voiceInputMaxSizeBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
170
|
+
voiceInputResumableEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
171
|
+
voiceInputResumableMaxDurationSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
172
|
+
voiceInputResumableMaxSizeBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
173
|
+
voiceInputResumableMaxChunkSizeBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
174
|
+
voiceInputResumableRetentionSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
175
|
+
voiceInputFfmpegPath: z.ZodDefault<z.ZodString>;
|
|
169
176
|
voiceInputProviderOrder: z.ZodDefault<z.ZodString>;
|
|
170
177
|
voiceInputOpenaiEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
171
178
|
voiceInputOpenaiApiKey: z.ZodOptional<z.ZodString>;
|
package/dist/index.js
CHANGED
|
@@ -192,7 +192,10 @@ var SettingsSchema = z.object({
|
|
|
192
192
|
// Explicit operator-controlled promotion pointer for `/agent/latest/*`.
|
|
193
193
|
// Versioned agent releases are immutable; changing this setting promotes or
|
|
194
194
|
// rolls back the stable channel without moving or deleting a provider tag.
|
|
195
|
-
agentStableVersion: z.string().regex(/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/u).default("0.1.
|
|
195
|
+
agentStableVersion: z.string().regex(/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/u).default("0.1.12"),
|
|
196
|
+
// Optional independent beta-channel pointer. When unset, the beta update
|
|
197
|
+
// manifest route is unavailable rather than silently serving stable.
|
|
198
|
+
agentBetaVersion: z.string().regex(/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/u).optional(),
|
|
196
199
|
productAccessMode: ProductAccessMode.default("local"),
|
|
197
200
|
billingMode: BillingMode.default("disabled"),
|
|
198
201
|
entitlementsMode: EntitlementsMode.default("none"),
|
|
@@ -302,6 +305,15 @@ var SettingsSchema = z.object({
|
|
|
302
305
|
// the same clip across vendors after an upstream request may have started.
|
|
303
306
|
voiceInputMaxDurationSeconds: z.coerce.number().int().positive().max(600).default(60),
|
|
304
307
|
voiceInputMaxSizeBytes: z.coerce.number().int().positive().max(25 * 1024 * 1024).default(25 * 1024 * 1024),
|
|
308
|
+
// Durable long-form capture uploads bounded chunks to object storage, then
|
|
309
|
+
// normalizes them into provider-safe segments. It is advertised only when
|
|
310
|
+
// object storage and the configured ffmpeg executable are both available.
|
|
311
|
+
voiceInputResumableEnabled: EnvBoolean.default(true),
|
|
312
|
+
voiceInputResumableMaxDurationSeconds: z.coerce.number().int().positive().max(8 * 60 * 60).default(2 * 60 * 60),
|
|
313
|
+
voiceInputResumableMaxSizeBytes: z.coerce.number().int().positive().max(512 * 1024 * 1024).default(512 * 1024 * 1024),
|
|
314
|
+
voiceInputResumableMaxChunkSizeBytes: z.coerce.number().int().positive().max(25 * 1024 * 1024).default(8 * 1024 * 1024),
|
|
315
|
+
voiceInputResumableRetentionSeconds: z.coerce.number().int().positive().max(7 * 24 * 60 * 60).default(24 * 60 * 60),
|
|
316
|
+
voiceInputFfmpegPath: z.string().trim().min(1).max(1024).default("ffmpeg"),
|
|
305
317
|
// Preferred provider order (comma-separated ids). First configured+ready wins.
|
|
306
318
|
// Codex subscription STT is preferred by default when subscription routing is
|
|
307
319
|
// enabled; operators can put openai/azure-openai first explicitly.
|
|
@@ -350,9 +362,11 @@ var SettingsSchema = z.object({
|
|
|
350
362
|
// flag non-mandatory selected MCP tools `defer_loading:true` (dropping their
|
|
351
363
|
// schemas from model context) and add one client-executed tool_search tool
|
|
352
364
|
// that BM25-discloses bounded matches. The mandatory OpenGeni tools stay
|
|
353
|
-
// eager. Default
|
|
365
|
+
// eager. Default ON so selected connector catalogues do not consume every
|
|
366
|
+
// Codex turn's context. Operators may explicitly disable it for emergency
|
|
367
|
+
// compatibility diagnosis.
|
|
354
368
|
// OPENGENI_CODEX_TOOL_SEARCH_ENABLED
|
|
355
|
-
codexToolSearchEnabled: EnvBoolean.default(
|
|
369
|
+
codexToolSearchEnabled: EnvBoolean.default(true),
|
|
356
370
|
// credential allocator atomic, workspace-local credential allocation. Default OFF is a
|
|
357
371
|
// deliberate rolling-deploy fence: migrate + roll every worker first, then
|
|
358
372
|
// enable. Turning it off restores the legacy sticky selector without a schema
|
|
@@ -602,10 +616,13 @@ var SettingsSchema = z.object({
|
|
|
602
616
|
// the deploy-staging IaC secret/configmap pattern.
|
|
603
617
|
sandboxSelfhostedEnabled: EnvBoolean.default(false),
|
|
604
618
|
// Gates the op-stream (streaming exec) transport to Connected Machines. The
|
|
605
|
-
// runner must ALSO advertise Capabilities.op_stream
|
|
606
|
-
//
|
|
619
|
+
// runner must ALSO advertise Capabilities.op_stream. Streaming is the default
|
|
620
|
+
// because it is the only transport that can keep a command alive without an
|
|
621
|
+
// arbitrary request/reply wall while still supporting replay and cancellation.
|
|
622
|
+
// Older runners remain usable when an explicit positive exec timeout is set.
|
|
623
|
+
// EnvBoolean (NOT
|
|
607
624
|
// z.coerce.boolean(), which coerces "false" -> true).
|
|
608
|
-
agentOpStreamEnabled: EnvBoolean.default(
|
|
625
|
+
agentOpStreamEnabled: EnvBoolean.default(true),
|
|
609
626
|
// The HMAC secret the control plane signs the enrollment bearer credential with
|
|
610
627
|
// (the `oge_` envelope the agent presents back to the control plane). Optional:
|
|
611
628
|
// when ABSENT and sandboxSelfhostedEnabled is on, the poll route reports the
|
|
@@ -663,23 +680,15 @@ var SettingsSchema = z.object({
|
|
|
663
680
|
selfhostedNatsControlUser: z.string().optional(),
|
|
664
681
|
selfhostedNatsControlPassword: z.string().optional(),
|
|
665
682
|
// --- selfhosted (Connected Machine) control/exec op deadlines ---------------
|
|
666
|
-
//
|
|
667
|
-
//
|
|
668
|
-
//
|
|
669
|
-
//
|
|
670
|
-
//
|
|
671
|
-
//
|
|
672
|
-
//
|
|
673
|
-
//
|
|
674
|
-
// The exec default is a DELIBERATELY MODEST 2min (not 5): the agent-side admission
|
|
675
|
-
// pool is (until a later agent release) a FLAT 8 permits with no per-class split,
|
|
676
|
-
// so 8 slow execs holding a permit for 5 minutes would blanket-DRAIN every fs/git
|
|
677
|
-
// op — shipping the amplifier before the class-aware-admission fix. 2min still
|
|
678
|
-
// clears the large majority of the observed >30s exec tail; genuinely long jobs run
|
|
679
|
-
// in the background (see the exec-deadline hint) or raise the knob per deployment.
|
|
680
|
-
// Knobs: OPENGENI_SANDBOX_SELFHOSTED_EXEC_TIMEOUT_MS (default 2min) and
|
|
683
|
+
// CONTROL ops (ping / fs / git / desktop / pty) keep a short request timeout so
|
|
684
|
+
// liveness failures surface promptly. EXEC duration is a different concern: by
|
|
685
|
+
// default it is unbounded (0), exactly like a command launched by an unrestricted
|
|
686
|
+
// local agent. The op-stream transport keeps control liveness, replay, and explicit
|
|
687
|
+
// cancellation independent of command duration. A deployment may opt into a hard
|
|
688
|
+
// process deadline by setting a positive value; 0 never schedules a process kill.
|
|
689
|
+
// Knobs: OPENGENI_SANDBOX_SELFHOSTED_EXEC_TIMEOUT_MS (default 0 = none) and
|
|
681
690
|
// OPENGENI_SANDBOX_SELFHOSTED_CONTROL_TIMEOUT_MS (default 30s).
|
|
682
|
-
sandboxSelfhostedExecTimeoutMs: z.coerce.number().int().
|
|
691
|
+
sandboxSelfhostedExecTimeoutMs: z.coerce.number().int().nonnegative().default(0),
|
|
683
692
|
sandboxSelfhostedControlTimeoutMs: z.coerce.number().int().positive().default(3e4),
|
|
684
693
|
// --- sandbox lease cadences (cadence invariant validated at boot below) ---
|
|
685
694
|
// reaperPeriod < viewerHolderTTL, and reaperPeriod + idleGrace < the EFFECTIVE
|
|
@@ -1343,6 +1352,7 @@ function getSettings() {
|
|
|
1343
1352
|
webBaseUrl: optional("OPENGENI_WEB_BASE_URL"),
|
|
1344
1353
|
agentReleasesBaseUrl: optional("OPENGENI_AGENT_RELEASES_BASE_URL"),
|
|
1345
1354
|
agentStableVersion: optional("OPENGENI_AGENT_STABLE_VERSION"),
|
|
1355
|
+
agentBetaVersion: optional("OPENGENI_AGENT_BETA_VERSION"),
|
|
1346
1356
|
productAccessMode: optional("OPENGENI_PRODUCT_ACCESS_MODE"),
|
|
1347
1357
|
billingMode: optional("OPENGENI_BILLING_MODE"),
|
|
1348
1358
|
entitlementsMode: optional("OPENGENI_ENTITLEMENTS_MODE"),
|
|
@@ -1395,6 +1405,18 @@ function getSettings() {
|
|
|
1395
1405
|
vercelAiGatewayApiKey: optional("OPENGENI_VERCEL_AI_GATEWAY_API_KEY"),
|
|
1396
1406
|
voiceInputMaxDurationSeconds: optional("OPENGENI_VOICE_INPUT_MAX_DURATION_SECONDS"),
|
|
1397
1407
|
voiceInputMaxSizeBytes: optional("OPENGENI_VOICE_INPUT_MAX_SIZE_BYTES"),
|
|
1408
|
+
voiceInputResumableEnabled: optional("OPENGENI_VOICE_INPUT_RESUMABLE_ENABLED"),
|
|
1409
|
+
voiceInputResumableMaxDurationSeconds: optional(
|
|
1410
|
+
"OPENGENI_VOICE_INPUT_RESUMABLE_MAX_DURATION_SECONDS"
|
|
1411
|
+
),
|
|
1412
|
+
voiceInputResumableMaxSizeBytes: optional("OPENGENI_VOICE_INPUT_RESUMABLE_MAX_SIZE_BYTES"),
|
|
1413
|
+
voiceInputResumableMaxChunkSizeBytes: optional(
|
|
1414
|
+
"OPENGENI_VOICE_INPUT_RESUMABLE_MAX_CHUNK_SIZE_BYTES"
|
|
1415
|
+
),
|
|
1416
|
+
voiceInputResumableRetentionSeconds: optional(
|
|
1417
|
+
"OPENGENI_VOICE_INPUT_RESUMABLE_RETENTION_SECONDS"
|
|
1418
|
+
),
|
|
1419
|
+
voiceInputFfmpegPath: optional("OPENGENI_VOICE_INPUT_FFMPEG_PATH"),
|
|
1398
1420
|
voiceInputProviderOrder: optional("OPENGENI_VOICE_INPUT_PROVIDER_ORDER"),
|
|
1399
1421
|
voiceInputOpenaiEnabled: optional("OPENGENI_VOICE_INPUT_OPENAI_ENABLED"),
|
|
1400
1422
|
voiceInputOpenaiApiKey: optional("OPENGENI_VOICE_INPUT_OPENAI_API_KEY"),
|
|
@@ -2712,8 +2734,8 @@ function stableSandboxEnvironmentForRun(settings, workspaceEnvironment = {}, opt
|
|
|
2712
2734
|
environment.OPENGENI_GIT_CLI_WRAPPER_DIR ??= `${home}/.opengeni/bin`;
|
|
2713
2735
|
environment.PATH = prependPathEntry(environment.PATH, environment.OPENGENI_GIT_CLI_WRAPPER_DIR);
|
|
2714
2736
|
}
|
|
2715
|
-
if (settings.toolspaceEnabled) {
|
|
2716
|
-
environment.OPENGENI_TOOLSPACE_TOKEN_FILE ??=
|
|
2737
|
+
if (settings.toolspaceEnabled && settings.sandboxBackend !== "selfhosted") {
|
|
2738
|
+
environment.OPENGENI_TOOLSPACE_TOKEN_FILE ??= `${environment.HOME ?? descriptor.workspaceRoot}/.opengeni/toolspace-token`;
|
|
2717
2739
|
if (settings.ogtoolPackageSpec) {
|
|
2718
2740
|
environment.OPENGENI_OGTOOL_PACKAGE_SPEC ??= settings.ogtoolPackageSpec;
|
|
2719
2741
|
}
|