@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "OpenGeni runtime configuration: settings resolution, deployment knobs, and config validation shared across the server packages.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"prepublishOnly": "bash ../../scripts/prepublish-guard"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@opengeni/codex": "^0.2.
|
|
37
|
-
"@opengeni/contracts": "^0.
|
|
36
|
+
"@opengeni/codex": "^0.2.13",
|
|
37
|
+
"@opengeni/contracts": "^0.40.0",
|
|
38
38
|
"zod": "^4.2.1"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
package/src/index.ts
CHANGED
|
@@ -249,7 +249,13 @@ const SettingsSchema = z.object({
|
|
|
249
249
|
agentStableVersion: z
|
|
250
250
|
.string()
|
|
251
251
|
.regex(/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/u)
|
|
252
|
-
.default("0.1.
|
|
252
|
+
.default("0.1.12"),
|
|
253
|
+
// Optional independent beta-channel pointer. When unset, the beta update
|
|
254
|
+
// manifest route is unavailable rather than silently serving stable.
|
|
255
|
+
agentBetaVersion: z
|
|
256
|
+
.string()
|
|
257
|
+
.regex(/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/u)
|
|
258
|
+
.optional(),
|
|
253
259
|
productAccessMode: ProductAccessMode.default("local"),
|
|
254
260
|
billingMode: BillingMode.default("disabled"),
|
|
255
261
|
entitlementsMode: EntitlementsMode.default("none"),
|
|
@@ -370,6 +376,35 @@ const SettingsSchema = z.object({
|
|
|
370
376
|
.positive()
|
|
371
377
|
.max(25 * 1024 * 1024)
|
|
372
378
|
.default(25 * 1024 * 1024),
|
|
379
|
+
// Durable long-form capture uploads bounded chunks to object storage, then
|
|
380
|
+
// normalizes them into provider-safe segments. It is advertised only when
|
|
381
|
+
// object storage and the configured ffmpeg executable are both available.
|
|
382
|
+
voiceInputResumableEnabled: EnvBoolean.default(true),
|
|
383
|
+
voiceInputResumableMaxDurationSeconds: z.coerce
|
|
384
|
+
.number()
|
|
385
|
+
.int()
|
|
386
|
+
.positive()
|
|
387
|
+
.max(8 * 60 * 60)
|
|
388
|
+
.default(2 * 60 * 60),
|
|
389
|
+
voiceInputResumableMaxSizeBytes: z.coerce
|
|
390
|
+
.number()
|
|
391
|
+
.int()
|
|
392
|
+
.positive()
|
|
393
|
+
.max(512 * 1024 * 1024)
|
|
394
|
+
.default(512 * 1024 * 1024),
|
|
395
|
+
voiceInputResumableMaxChunkSizeBytes: z.coerce
|
|
396
|
+
.number()
|
|
397
|
+
.int()
|
|
398
|
+
.positive()
|
|
399
|
+
.max(25 * 1024 * 1024)
|
|
400
|
+
.default(8 * 1024 * 1024),
|
|
401
|
+
voiceInputResumableRetentionSeconds: z.coerce
|
|
402
|
+
.number()
|
|
403
|
+
.int()
|
|
404
|
+
.positive()
|
|
405
|
+
.max(7 * 24 * 60 * 60)
|
|
406
|
+
.default(24 * 60 * 60),
|
|
407
|
+
voiceInputFfmpegPath: z.string().trim().min(1).max(1024).default("ffmpeg"),
|
|
373
408
|
// Preferred provider order (comma-separated ids). First configured+ready wins.
|
|
374
409
|
// Codex subscription STT is preferred by default when subscription routing is
|
|
375
410
|
// enabled; operators can put openai/azure-openai first explicitly.
|
|
@@ -415,9 +450,11 @@ const SettingsSchema = z.object({
|
|
|
415
450
|
// flag non-mandatory selected MCP tools `defer_loading:true` (dropping their
|
|
416
451
|
// schemas from model context) and add one client-executed tool_search tool
|
|
417
452
|
// that BM25-discloses bounded matches. The mandatory OpenGeni tools stay
|
|
418
|
-
// eager. Default
|
|
453
|
+
// eager. Default ON so selected connector catalogues do not consume every
|
|
454
|
+
// Codex turn's context. Operators may explicitly disable it for emergency
|
|
455
|
+
// compatibility diagnosis.
|
|
419
456
|
// OPENGENI_CODEX_TOOL_SEARCH_ENABLED
|
|
420
|
-
codexToolSearchEnabled: EnvBoolean.default(
|
|
457
|
+
codexToolSearchEnabled: EnvBoolean.default(true),
|
|
421
458
|
// credential allocator atomic, workspace-local credential allocation. Default OFF is a
|
|
422
459
|
// deliberate rolling-deploy fence: migrate + roll every worker first, then
|
|
423
460
|
// enable. Turning it off restores the legacy sticky selector without a schema
|
|
@@ -669,10 +706,13 @@ const SettingsSchema = z.object({
|
|
|
669
706
|
// the deploy-staging IaC secret/configmap pattern.
|
|
670
707
|
sandboxSelfhostedEnabled: EnvBoolean.default(false),
|
|
671
708
|
// Gates the op-stream (streaming exec) transport to Connected Machines. The
|
|
672
|
-
// runner must ALSO advertise Capabilities.op_stream
|
|
673
|
-
//
|
|
709
|
+
// runner must ALSO advertise Capabilities.op_stream. Streaming is the default
|
|
710
|
+
// because it is the only transport that can keep a command alive without an
|
|
711
|
+
// arbitrary request/reply wall while still supporting replay and cancellation.
|
|
712
|
+
// Older runners remain usable when an explicit positive exec timeout is set.
|
|
713
|
+
// EnvBoolean (NOT
|
|
674
714
|
// z.coerce.boolean(), which coerces "false" -> true).
|
|
675
|
-
agentOpStreamEnabled: EnvBoolean.default(
|
|
715
|
+
agentOpStreamEnabled: EnvBoolean.default(true),
|
|
676
716
|
// The HMAC secret the control plane signs the enrollment bearer credential with
|
|
677
717
|
// (the `oge_` envelope the agent presents back to the control plane). Optional:
|
|
678
718
|
// when ABSENT and sandboxSelfhostedEnabled is on, the poll route reports the
|
|
@@ -730,23 +770,15 @@ const SettingsSchema = z.object({
|
|
|
730
770
|
selfhostedNatsControlUser: z.string().optional(),
|
|
731
771
|
selfhostedNatsControlPassword: z.string().optional(),
|
|
732
772
|
// --- selfhosted (Connected Machine) control/exec op deadlines ---------------
|
|
733
|
-
//
|
|
734
|
-
//
|
|
735
|
-
//
|
|
736
|
-
//
|
|
737
|
-
//
|
|
738
|
-
//
|
|
739
|
-
//
|
|
740
|
-
//
|
|
741
|
-
// The exec default is a DELIBERATELY MODEST 2min (not 5): the agent-side admission
|
|
742
|
-
// pool is (until a later agent release) a FLAT 8 permits with no per-class split,
|
|
743
|
-
// so 8 slow execs holding a permit for 5 minutes would blanket-DRAIN every fs/git
|
|
744
|
-
// op — shipping the amplifier before the class-aware-admission fix. 2min still
|
|
745
|
-
// clears the large majority of the observed >30s exec tail; genuinely long jobs run
|
|
746
|
-
// in the background (see the exec-deadline hint) or raise the knob per deployment.
|
|
747
|
-
// Knobs: OPENGENI_SANDBOX_SELFHOSTED_EXEC_TIMEOUT_MS (default 2min) and
|
|
773
|
+
// CONTROL ops (ping / fs / git / desktop / pty) keep a short request timeout so
|
|
774
|
+
// liveness failures surface promptly. EXEC duration is a different concern: by
|
|
775
|
+
// default it is unbounded (0), exactly like a command launched by an unrestricted
|
|
776
|
+
// local agent. The op-stream transport keeps control liveness, replay, and explicit
|
|
777
|
+
// cancellation independent of command duration. A deployment may opt into a hard
|
|
778
|
+
// process deadline by setting a positive value; 0 never schedules a process kill.
|
|
779
|
+
// Knobs: OPENGENI_SANDBOX_SELFHOSTED_EXEC_TIMEOUT_MS (default 0 = none) and
|
|
748
780
|
// OPENGENI_SANDBOX_SELFHOSTED_CONTROL_TIMEOUT_MS (default 30s).
|
|
749
|
-
sandboxSelfhostedExecTimeoutMs: z.coerce.number().int().
|
|
781
|
+
sandboxSelfhostedExecTimeoutMs: z.coerce.number().int().nonnegative().default(0),
|
|
750
782
|
sandboxSelfhostedControlTimeoutMs: z.coerce.number().int().positive().default(30_000),
|
|
751
783
|
// --- sandbox lease cadences (cadence invariant validated at boot below) ---
|
|
752
784
|
// reaperPeriod < viewerHolderTTL, and reaperPeriod + idleGrace < the EFFECTIVE
|
|
@@ -1726,6 +1758,7 @@ export function getSettings(): Settings {
|
|
|
1726
1758
|
webBaseUrl: optional("OPENGENI_WEB_BASE_URL"),
|
|
1727
1759
|
agentReleasesBaseUrl: optional("OPENGENI_AGENT_RELEASES_BASE_URL"),
|
|
1728
1760
|
agentStableVersion: optional("OPENGENI_AGENT_STABLE_VERSION"),
|
|
1761
|
+
agentBetaVersion: optional("OPENGENI_AGENT_BETA_VERSION"),
|
|
1729
1762
|
productAccessMode: optional("OPENGENI_PRODUCT_ACCESS_MODE"),
|
|
1730
1763
|
billingMode: optional("OPENGENI_BILLING_MODE"),
|
|
1731
1764
|
entitlementsMode: optional("OPENGENI_ENTITLEMENTS_MODE"),
|
|
@@ -1778,6 +1811,18 @@ export function getSettings(): Settings {
|
|
|
1778
1811
|
vercelAiGatewayApiKey: optional("OPENGENI_VERCEL_AI_GATEWAY_API_KEY"),
|
|
1779
1812
|
voiceInputMaxDurationSeconds: optional("OPENGENI_VOICE_INPUT_MAX_DURATION_SECONDS"),
|
|
1780
1813
|
voiceInputMaxSizeBytes: optional("OPENGENI_VOICE_INPUT_MAX_SIZE_BYTES"),
|
|
1814
|
+
voiceInputResumableEnabled: optional("OPENGENI_VOICE_INPUT_RESUMABLE_ENABLED"),
|
|
1815
|
+
voiceInputResumableMaxDurationSeconds: optional(
|
|
1816
|
+
"OPENGENI_VOICE_INPUT_RESUMABLE_MAX_DURATION_SECONDS",
|
|
1817
|
+
),
|
|
1818
|
+
voiceInputResumableMaxSizeBytes: optional("OPENGENI_VOICE_INPUT_RESUMABLE_MAX_SIZE_BYTES"),
|
|
1819
|
+
voiceInputResumableMaxChunkSizeBytes: optional(
|
|
1820
|
+
"OPENGENI_VOICE_INPUT_RESUMABLE_MAX_CHUNK_SIZE_BYTES",
|
|
1821
|
+
),
|
|
1822
|
+
voiceInputResumableRetentionSeconds: optional(
|
|
1823
|
+
"OPENGENI_VOICE_INPUT_RESUMABLE_RETENTION_SECONDS",
|
|
1824
|
+
),
|
|
1825
|
+
voiceInputFfmpegPath: optional("OPENGENI_VOICE_INPUT_FFMPEG_PATH"),
|
|
1781
1826
|
voiceInputProviderOrder: optional("OPENGENI_VOICE_INPUT_PROVIDER_ORDER"),
|
|
1782
1827
|
voiceInputOpenaiEnabled: optional("OPENGENI_VOICE_INPUT_OPENAI_ENABLED"),
|
|
1783
1828
|
voiceInputOpenaiApiKey: optional("OPENGENI_VOICE_INPUT_OPENAI_API_KEY"),
|
|
@@ -3661,16 +3706,8 @@ export function stableSandboxEnvironmentForRun(
|
|
|
3661
3706
|
environment.OPENGENI_GIT_CLI_WRAPPER_DIR ??= `${home}/.opengeni/bin`;
|
|
3662
3707
|
environment.PATH = prependPathEntry(environment.PATH, environment.OPENGENI_GIT_CLI_WRAPPER_DIR);
|
|
3663
3708
|
}
|
|
3664
|
-
if (settings.toolspaceEnabled) {
|
|
3665
|
-
|
|
3666
|
-
// stable shell-resolved pointer in the manifest; runtime expands this trusted
|
|
3667
|
-
// marker against the machine's own HOME for seed, renewal, and every command.
|
|
3668
|
-
// Never derive it from the selfhosted descriptor root (`/`), which would try
|
|
3669
|
-
// to write `/.opengeni` as an ordinary machine user.
|
|
3670
|
-
environment.OPENGENI_TOOLSPACE_TOKEN_FILE ??=
|
|
3671
|
-
settings.sandboxBackend === "selfhosted"
|
|
3672
|
-
? "$HOME/.opengeni/toolspace-token"
|
|
3673
|
-
: `${environment.HOME ?? descriptor.workspaceRoot}/.opengeni/toolspace-token`;
|
|
3709
|
+
if (settings.toolspaceEnabled && settings.sandboxBackend !== "selfhosted") {
|
|
3710
|
+
environment.OPENGENI_TOOLSPACE_TOKEN_FILE ??= `${environment.HOME ?? descriptor.workspaceRoot}/.opengeni/toolspace-token`;
|
|
3674
3711
|
if (settings.ogtoolPackageSpec) {
|
|
3675
3712
|
environment.OPENGENI_OGTOOL_PACKAGE_SPEC ??= settings.ogtoolPackageSpec;
|
|
3676
3713
|
}
|