@opengeni/config 0.11.0 → 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 +1 -0
- package/dist/index.js +21 -22
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +24 -30
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";
|
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"),
|
|
@@ -613,10 +616,13 @@ var SettingsSchema = z.object({
|
|
|
613
616
|
// the deploy-staging IaC secret/configmap pattern.
|
|
614
617
|
sandboxSelfhostedEnabled: EnvBoolean.default(false),
|
|
615
618
|
// Gates the op-stream (streaming exec) transport to Connected Machines. The
|
|
616
|
-
// runner must ALSO advertise Capabilities.op_stream
|
|
617
|
-
//
|
|
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
|
|
618
624
|
// z.coerce.boolean(), which coerces "false" -> true).
|
|
619
|
-
agentOpStreamEnabled: EnvBoolean.default(
|
|
625
|
+
agentOpStreamEnabled: EnvBoolean.default(true),
|
|
620
626
|
// The HMAC secret the control plane signs the enrollment bearer credential with
|
|
621
627
|
// (the `oge_` envelope the agent presents back to the control plane). Optional:
|
|
622
628
|
// when ABSENT and sandboxSelfhostedEnabled is on, the poll route reports the
|
|
@@ -674,23 +680,15 @@ var SettingsSchema = z.object({
|
|
|
674
680
|
selfhostedNatsControlUser: z.string().optional(),
|
|
675
681
|
selfhostedNatsControlPassword: z.string().optional(),
|
|
676
682
|
// --- selfhosted (Connected Machine) control/exec op deadlines ---------------
|
|
677
|
-
//
|
|
678
|
-
//
|
|
679
|
-
//
|
|
680
|
-
//
|
|
681
|
-
//
|
|
682
|
-
//
|
|
683
|
-
//
|
|
684
|
-
//
|
|
685
|
-
// The exec default is a DELIBERATELY MODEST 2min (not 5): the agent-side admission
|
|
686
|
-
// pool is (until a later agent release) a FLAT 8 permits with no per-class split,
|
|
687
|
-
// so 8 slow execs holding a permit for 5 minutes would blanket-DRAIN every fs/git
|
|
688
|
-
// op — shipping the amplifier before the class-aware-admission fix. 2min still
|
|
689
|
-
// clears the large majority of the observed >30s exec tail; genuinely long jobs run
|
|
690
|
-
// in the background (see the exec-deadline hint) or raise the knob per deployment.
|
|
691
|
-
// 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
|
|
692
690
|
// OPENGENI_SANDBOX_SELFHOSTED_CONTROL_TIMEOUT_MS (default 30s).
|
|
693
|
-
sandboxSelfhostedExecTimeoutMs: z.coerce.number().int().
|
|
691
|
+
sandboxSelfhostedExecTimeoutMs: z.coerce.number().int().nonnegative().default(0),
|
|
694
692
|
sandboxSelfhostedControlTimeoutMs: z.coerce.number().int().positive().default(3e4),
|
|
695
693
|
// --- sandbox lease cadences (cadence invariant validated at boot below) ---
|
|
696
694
|
// reaperPeriod < viewerHolderTTL, and reaperPeriod + idleGrace < the EFFECTIVE
|
|
@@ -1354,6 +1352,7 @@ function getSettings() {
|
|
|
1354
1352
|
webBaseUrl: optional("OPENGENI_WEB_BASE_URL"),
|
|
1355
1353
|
agentReleasesBaseUrl: optional("OPENGENI_AGENT_RELEASES_BASE_URL"),
|
|
1356
1354
|
agentStableVersion: optional("OPENGENI_AGENT_STABLE_VERSION"),
|
|
1355
|
+
agentBetaVersion: optional("OPENGENI_AGENT_BETA_VERSION"),
|
|
1357
1356
|
productAccessMode: optional("OPENGENI_PRODUCT_ACCESS_MODE"),
|
|
1358
1357
|
billingMode: optional("OPENGENI_BILLING_MODE"),
|
|
1359
1358
|
entitlementsMode: optional("OPENGENI_ENTITLEMENTS_MODE"),
|
|
@@ -2735,8 +2734,8 @@ function stableSandboxEnvironmentForRun(settings, workspaceEnvironment = {}, opt
|
|
|
2735
2734
|
environment.OPENGENI_GIT_CLI_WRAPPER_DIR ??= `${home}/.opengeni/bin`;
|
|
2736
2735
|
environment.PATH = prependPathEntry(environment.PATH, environment.OPENGENI_GIT_CLI_WRAPPER_DIR);
|
|
2737
2736
|
}
|
|
2738
|
-
if (settings.toolspaceEnabled) {
|
|
2739
|
-
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`;
|
|
2740
2739
|
if (settings.ogtoolPackageSpec) {
|
|
2741
2740
|
environment.OPENGENI_OGTOOL_PACKAGE_SPEC ??= settings.ogtoolPackageSpec;
|
|
2742
2741
|
}
|