@deepagents/context 2.2.0 → 2.3.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.
package/dist/index.js CHANGED
@@ -7327,9 +7327,10 @@ var DockerSandboxStrategy = class {
7327
7327
  resources;
7328
7328
  env;
7329
7329
  name;
7330
+ command;
7330
7331
  createdVolumes = /* @__PURE__ */ new Set();
7331
7332
  constructor(args = {}) {
7332
- const { volumes = [], resources = {}, env = {}, name } = args;
7333
+ const { volumes = [], resources = {}, env = {}, name, command } = args;
7333
7334
  for (const key of Object.keys(env)) {
7334
7335
  validateEnvKey2(key);
7335
7336
  }
@@ -7342,6 +7343,7 @@ var DockerSandboxStrategy = class {
7342
7343
  this.resources = resources;
7343
7344
  this.env = env;
7344
7345
  this.name = name;
7346
+ this.command = command;
7345
7347
  }
7346
7348
  async create() {
7347
7349
  const image = await this.getImage();
@@ -7549,7 +7551,12 @@ var DockerSandboxStrategy = class {
7549
7551
  for (const volume of this.volumes) {
7550
7552
  args.push("--mount", this.buildVolumeMountArg(volume));
7551
7553
  }
7552
- args.push(image, "tail", "-f", "/dev/null");
7554
+ args.push(image);
7555
+ if (this.command === void 0) {
7556
+ args.push("tail", "-f", "/dev/null");
7557
+ } else if (this.command !== null) {
7558
+ args.push(...this.command);
7559
+ }
7553
7560
  return args;
7554
7561
  }
7555
7562
  buildVolumeMountArg(volume) {
@@ -7796,7 +7803,8 @@ var RuntimeStrategy = class extends DockerSandboxStrategy {
7796
7803
  volumes: args.volumes,
7797
7804
  resources: args.resources,
7798
7805
  env: args.env,
7799
- name: args.name
7806
+ name: args.name,
7807
+ command: args.command
7800
7808
  });
7801
7809
  this.image = args.image ?? "alpine:latest";
7802
7810
  this.installers = args.installers ?? [];
@@ -7820,7 +7828,8 @@ var DockerfileStrategy = class extends DockerSandboxStrategy {
7820
7828
  volumes: args.volumes,
7821
7829
  resources: args.resources,
7822
7830
  env: args.env,
7823
- name: args.name
7831
+ name: args.name,
7832
+ command: args.command
7824
7833
  });
7825
7834
  this.dockerfile = args.dockerfile;
7826
7835
  this.dockerContext = args.context ?? ".";
@@ -7989,7 +7998,8 @@ async function createDockerSandbox(options = {}) {
7989
7998
  volumes: options.volumes,
7990
7999
  resources: options.resources,
7991
8000
  env: options.env,
7992
- name: options.name
8001
+ name: options.name,
8002
+ command: options.command
7993
8003
  });
7994
8004
  } else {
7995
8005
  strategy = new RuntimeStrategy({
@@ -7998,7 +8008,8 @@ async function createDockerSandbox(options = {}) {
7998
8008
  volumes: options.volumes,
7999
8009
  resources: options.resources,
8000
8010
  env: options.env,
8001
- name: options.name
8011
+ name: options.name,
8012
+ command: options.command
8002
8013
  });
8003
8014
  }
8004
8015
  return strategy.create();