@demicodes/shell 0.10.2 → 0.11.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.
Files changed (2) hide show
  1. package/dist/index.mjs +10 -9
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -783,13 +783,13 @@ function decodeForkStdin(stdin) {
783
783
  //#endregion
784
784
  //#region src/environment.ts
785
785
  const DEFAULT_TIMEOUT_MS = 1e4;
786
- const DEFAULT_OUTPUT_LIMIT_BYTES = 1024 * 1024;
786
+ const DEFAULT_OUTPUT_LIMIT_BYTES = 1048576;
787
787
  /**
788
788
  * Ceiling for a raw-byte final stream. Sized so an ordinary viewing-grade clip
789
789
  * survives the shell and reaches the layer that decides what to do with it,
790
790
  * while still bounding a runaway producer.
791
791
  */
792
- const DEFAULT_BINARY_LIMIT_BYTES = 16 * 1024 * 1024;
792
+ const DEFAULT_BINARY_LIMIT_BYTES = 16777216;
793
793
  /** Upper bound for a single exec observation window (also the command-bridge wait ceiling). */
794
794
  const MAX_TIMEOUT_MS = 6e5;
795
795
  var BashEnvironment = class {
@@ -1036,16 +1036,17 @@ var BashEnvironment = class {
1036
1036
  const storage = new AgentSessionCommandStorage(this.host.store, commandStorageId);
1037
1037
  for (const command of this.commands.list()) forkCommands.set(command.name, commandToForkCommand(session, command, storage, this.host));
1038
1038
  session.abortController = new AbortController();
1039
+ const limits = resolveLimits({
1040
+ maxOutputSize: 1073741824,
1041
+ maxCommandCount: 1e6,
1042
+ maxLoopIterations: 1e6,
1043
+ maxCallDepth: 1e3,
1044
+ maxGlobOperations: 1e6
1045
+ });
1039
1046
  session.interpreter = new Interpreter({
1040
1047
  fs,
1041
1048
  commands: forkCommands,
1042
- limits: resolveLimits({
1043
- maxOutputSize: 1024 * 1024 * 1024,
1044
- maxCommandCount: 1e6,
1045
- maxLoopIterations: 1e6,
1046
- maxCallDepth: 1e3,
1047
- maxGlobOperations: 1e6
1048
- }),
1049
+ limits,
1049
1050
  exec: async () => ({
1050
1051
  stdout: "",
1051
1052
  stderr: "",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@demicodes/shell",
3
3
  "description": "Sandboxable bash engine and Host contract for Demi.",
4
- "version": "0.10.2",
4
+ "version": "0.11.0",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "exports": {
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@demicodes/just-bash": "^3.0.1-demi.5",
23
- "@demicodes/utils": "^0.10.2",
23
+ "@demicodes/utils": "^0.11.0",
24
24
  "zod": "^4.0.0"
25
25
  },
26
26
  "license": "Apache-2.0",