@opengeni/runtime 0.4.0 → 0.5.0

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.
@@ -637,6 +637,17 @@ function setSelfhostedApplyDiff(fn) {
637
637
  injectedApplyDiff = fn;
638
638
  }
639
639
  var SELFHOSTED_DEFAULT_TIMEOUT_MS = 3e4;
640
+ var SELFHOSTED_EXEC_ENV_ALLOWLIST = ["OPENGENI_TOOLSPACE_URL", "OPENGENI_TOOLSPACE_TOKEN_FILE"];
641
+ function selfhostedExecEnv(environment) {
642
+ const env = {};
643
+ for (const key of SELFHOSTED_EXEC_ENV_ALLOWLIST) {
644
+ const value = environment[key];
645
+ if (value) {
646
+ env[key] = value;
647
+ }
648
+ }
649
+ return env;
650
+ }
640
651
  var SELFHOSTED_RELAY_STREAM_PATH = "/stream";
641
652
  var SelfhostedSession = class {
642
653
  backendId = "selfhosted";
@@ -733,7 +744,11 @@ var SelfhostedSession = class {
733
744
  // SELFHOSTED_VIRTUAL_ROOT). Empty → the session workingDir (itself "" by
734
745
  // default ⇒ the agent runs in its workspace_root).
735
746
  cwd: toMachinePath(args.workdir, this.workingDir),
736
- env: {},
747
+ // The machine owns its own shell environment; the manifest env is NOT
748
+ // exported here. The ONE exception is the non-secret toolspace pointers
749
+ // (URL + token-file path), so a programmatic `ogtool` call and the token-
750
+ // seed hook can find the tool surface. See SELFHOSTED_EXEC_ENV_ALLOWLIST.
751
+ env: selfhostedExecEnv(this.state.environment),
737
752
  stdin: new Uint8Array(0),
738
753
  timeoutMs: 0
739
754
  };
@@ -3711,4 +3726,4 @@ export {
3711
3726
  collectSandboxEnvironment2 as collectSandboxEnvironment,
3712
3727
  parseExposedPorts2 as parseExposedPorts
3713
3728
  };
3714
- //# sourceMappingURL=chunk-HGQ252FL.js.map
3729
+ //# sourceMappingURL=chunk-Q36E4MDM.js.map