just-bash 2.14.0 → 2.15.1-executor.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 (40) hide show
  1. package/dist/Bash.d.ts +88 -0
  2. package/dist/bin/chunks/chunk-MNMRGJJM.js +11 -0
  3. package/dist/bin/chunks/js-exec-RGKNWHHL.js +100 -0
  4. package/dist/bin/chunks/js-exec-worker.js +233 -1
  5. package/dist/bin/chunks/{python3-VCIXXAXF.js → python3-QOJU2POC.js} +1 -1
  6. package/dist/bin/chunks/worker.js +15 -1
  7. package/dist/bin/just-bash.js +238 -238
  8. package/dist/bin/shell/chunks/chunk-MNMRGJJM.js +11 -0
  9. package/dist/bin/shell/chunks/js-exec-DUGJM6RL.js +100 -0
  10. package/dist/bin/shell/chunks/{python3-KFZH67GD.js → python3-O4VTP6TD.js} +1 -1
  11. package/dist/bin/shell/shell.js +113 -113
  12. package/dist/bundle/browser.js +6 -6
  13. package/dist/bundle/chunks/chunk-B6O2PIY4.js +10 -0
  14. package/dist/bundle/chunks/js-exec-LSIPMWTQ.js +99 -0
  15. package/dist/bundle/chunks/js-exec-worker.js +233 -1
  16. package/dist/bundle/chunks/{python3-SG3DOKBZ.js → python3-5F2XPEW4.js} +1 -1
  17. package/dist/bundle/chunks/worker.js +15 -1
  18. package/dist/bundle/index.cjs +666 -663
  19. package/dist/bundle/index.js +49 -49
  20. package/dist/commands/js-exec/executor-adapter.d.ts +66 -0
  21. package/dist/commands/js-exec/js-exec.d.ts +19 -1
  22. package/dist/commands/js-exec/worker.d.ts +8 -0
  23. package/dist/commands/worker-bridge/bridge-handler.d.ts +3 -1
  24. package/dist/commands/worker-bridge/protocol.d.ts +1 -0
  25. package/dist/commands/worker-bridge/sync-backend.d.ts +5 -0
  26. package/dist/executor-init.d.ts +19 -0
  27. package/dist/interpreter/interpreter.d.ts +7 -0
  28. package/dist/interpreter/types.d.ts +10 -0
  29. package/dist/types.d.ts +17 -0
  30. package/package.json +37 -34
  31. package/vendor/cpython-emscripten/python.wasm +0 -0
  32. package/vendor/executor/executor-sdk-bundle.d.mts +18 -0
  33. package/vendor/executor/executor-sdk-bundle.mjs +512 -0
  34. package/vendor/executor/openapi-extractor-wasm/openapi_extractor_bg.wasm +0 -0
  35. package/dist/bin/chunks/chunk-3KAVXQP4.js +0 -11
  36. package/dist/bin/chunks/js-exec-BDQGEAU6.js +0 -97
  37. package/dist/bin/shell/chunks/chunk-3KAVXQP4.js +0 -11
  38. package/dist/bin/shell/chunks/js-exec-HPXZV7UJ.js +0 -97
  39. package/dist/bundle/chunks/chunk-S4EYC6T6.js +0 -10
  40. package/dist/bundle/chunks/js-exec-4CW5N6RM.js +0 -96
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Adapter for using js-exec as a CodeExecutor runtime for @executor/sdk.
3
+ *
4
+ * This module exports a Promise-based executor that can be wrapped with
5
+ * Effect.tryPromise() to satisfy the CodeExecutor interface.
6
+ *
7
+ * Usage with @executor/sdk:
8
+ *
9
+ * ```ts
10
+ * import { createJustBashCodeExecutor } from 'just-bash/executor';
11
+ * import { createExecutor } from '@executor/sdk';
12
+ * import type { CodeExecutor } from '@executor/sdk';
13
+ * import * as Effect from 'effect/Effect';
14
+ *
15
+ * const jb = createJustBashCodeExecutor();
16
+ *
17
+ * const codeExecutor: CodeExecutor = {
18
+ * execute: (code, toolInvoker) =>
19
+ * Effect.tryPromise(() =>
20
+ * jb.execute(code, (path, args) =>
21
+ * Effect.runPromise(toolInvoker.invoke({ path, args }))
22
+ * )
23
+ * ),
24
+ * };
25
+ *
26
+ * const executor = await createExecutor({
27
+ * runtime: codeExecutor,
28
+ * tools: { ... },
29
+ * });
30
+ * ```
31
+ */
32
+ import type { IFileSystem } from "../../fs/interface.js";
33
+ import type { SecureFetch } from "../../network/index.js";
34
+ import { type ExecutorResult } from "./js-exec.js";
35
+ export interface JustBashExecutorOptions {
36
+ /** Virtual filesystem for code to access. Defaults to an empty InMemoryFs. */
37
+ fs?: IFileSystem;
38
+ /** Working directory inside the sandbox. Defaults to /home/user. */
39
+ cwd?: string;
40
+ /** Environment variables available to code. Defaults to empty. */
41
+ env?: Record<string, string>;
42
+ /** Network fetch function. Defaults to undefined (no network). */
43
+ fetch?: SecureFetch;
44
+ }
45
+ export interface JustBashCodeExecutor {
46
+ /**
47
+ * Execute code with tool invocation support.
48
+ *
49
+ * @param code - JavaScript code to execute. Can use `await` and `return`.
50
+ * Tools are available as `tools.namespace.method(args)`.
51
+ * @param invokeTool - Callback to handle tool invocations.
52
+ * Receives (path, args) and should return the tool result.
53
+ * @returns ExecutorResult with result, error, and captured logs.
54
+ */
55
+ execute(code: string, invokeTool: (path: string, args: unknown) => Promise<unknown>): Promise<ExecutorResult>;
56
+ }
57
+ /**
58
+ * Create a js-exec based code executor for use with @executor/sdk.
59
+ *
60
+ * The executor runs JavaScript code in a QuickJS sandbox with:
61
+ * - A `tools` proxy for invoking registered tools
62
+ * - Console output captured to `logs` array
63
+ * - Return value captured in `result`
64
+ * - Full Node.js-compatible module system (fs, path, etc.)
65
+ */
66
+ export declare function createJustBashCodeExecutor(options?: JustBashExecutorOptions): JustBashCodeExecutor;
@@ -6,6 +6,24 @@
6
6
  *
7
7
  * This command is Node.js only (uses worker_threads).
8
8
  */
9
- import type { Command } from "../../types.js";
9
+ import type { Command, CommandContext } from "../../types.js";
10
+ /**
11
+ * Result from executing code in executor mode.
12
+ * Compatible with @executor/sdk's ExecuteResult shape.
13
+ */
14
+ export interface ExecutorResult {
15
+ result: unknown;
16
+ error?: string;
17
+ logs?: string[];
18
+ }
19
+ /**
20
+ * Execute JavaScript code in executor mode with tool invocation support.
21
+ * Used as the runtime for @executor/sdk's CodeExecutor interface.
22
+ *
23
+ * - Console output is captured to `logs` instead of stdout/stderr
24
+ * - Tool calls via `tools.x.y(args)` are routed through `invokeTool`
25
+ * - The return value of the code is captured in `result`
26
+ */
27
+ export declare function executeForExecutor(code: string, ctx: CommandContext, invokeTool: (path: string, argsJson: string) => Promise<string>): Promise<ExecutorResult>;
10
28
  export declare const jsExecCommand: Command;
11
29
  export declare const nodeStubCommand: Command;
@@ -21,10 +21,18 @@ export interface JsExecWorkerInput {
21
21
  isModule?: boolean;
22
22
  stripTypes?: boolean;
23
23
  timeoutMs?: number;
24
+ /** When true, tools proxy is available (console still goes to stdout/stderr) */
25
+ hasExecutorTools?: boolean;
26
+ /** When true, runs in full executor mode: tools proxy, log capture, result capture */
27
+ executorMode?: boolean;
24
28
  }
25
29
  export interface JsExecWorkerOutput {
26
30
  protocolToken?: string;
27
31
  success: boolean;
28
32
  error?: string;
29
33
  defenseStats?: WorkerDefenseStats;
34
+ /** JSON-serialized return value (executor mode only) */
35
+ executorResult?: string;
36
+ /** Captured console logs (executor mode only) */
37
+ executorLogs?: string[];
30
38
  }
@@ -22,13 +22,14 @@ export declare class BridgeHandler {
22
22
  private secureFetch;
23
23
  private maxOutputSize;
24
24
  private exec;
25
+ private invokeTool;
25
26
  private protocol;
26
27
  private running;
27
28
  private output;
28
29
  private outputLimitExceeded;
29
30
  private startTime;
30
31
  private timeoutMs;
31
- constructor(sharedBuffer: SharedArrayBuffer, fs: IFileSystem, cwd: string, commandName: string, secureFetch?: SecureFetch | undefined, maxOutputSize?: number, exec?: ((command: string, options: CommandExecOptions) => Promise<ExecResult>) | undefined);
32
+ constructor(sharedBuffer: SharedArrayBuffer, fs: IFileSystem, cwd: string, commandName: string, secureFetch?: SecureFetch | undefined, maxOutputSize?: number, exec?: ((command: string, options: CommandExecOptions) => Promise<ExecResult>) | undefined, invokeTool?: ((path: string, argsJson: string) => Promise<string>) | undefined);
32
33
  /**
33
34
  * Returns remaining milliseconds before the overall execution deadline.
34
35
  */
@@ -67,5 +68,6 @@ export declare class BridgeHandler {
67
68
  private appendOutputLimitError;
68
69
  private handleHttpRequest;
69
70
  private handleExecCommand;
71
+ private handleInvokeTool;
70
72
  private setErrorFromException;
71
73
  }
@@ -38,6 +38,7 @@ export declare const OpCode: {
38
38
  readonly EXIT: 102;
39
39
  readonly HTTP_REQUEST: 200;
40
40
  readonly EXEC_COMMAND: 300;
41
+ readonly INVOKE_TOOL: 400;
41
42
  };
42
43
  export type OpCodeType = (typeof OpCode)[keyof typeof OpCode];
43
44
  /** Status codes for synchronization */
@@ -77,4 +77,9 @@ export declare class SyncBackend {
77
77
  stderr: string;
78
78
  exitCode: number;
79
79
  };
80
+ /**
81
+ * Invoke a tool through the main thread's tool invoker (executor mode).
82
+ * Returns the JSON-serialized result.
83
+ */
84
+ invokeTool(path: string, argsJson: string): string;
80
85
  }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Executor SDK lazy initialization.
3
+ * Separated from Bash.ts so the browser bundle never sees these imports.
4
+ * Only loaded at runtime behind a dynamic import.
5
+ */
6
+ import type { ExecutorConfig, ExecutorSDKHandle } from "./Bash.js";
7
+ export declare function initExecutorSDK(setup: (sdk: ExecutorSDKHandle) => Promise<void>, approval: ExecutorConfig["onToolApproval"] | undefined, fs: import("./fs/interface.js").IFileSystem, getCwd: () => string, getEnv: () => Map<string, string>, getLimits: () => import("./limits.js").ExecutionLimits | undefined): Promise<{
8
+ sdk: ExecutorSDKHandle;
9
+ /**
10
+ * Execute code through the SDK pipeline.
11
+ * The SDK creates the toolInvoker per-execution and passes it to our
12
+ * CodeExecutor, which runs the code in QuickJS with the tools proxy.
13
+ */
14
+ executeViaSdk: (code: string) => Promise<{
15
+ result: unknown;
16
+ error?: string;
17
+ logs?: string[];
18
+ }>;
19
+ }>;
@@ -41,6 +41,13 @@ export interface InterpreterOptions {
41
41
  requireDefenseContext?: boolean;
42
42
  /** Bootstrap JavaScript code for js-exec */
43
43
  jsBootstrapCode?: string;
44
+ /** Tool invoker for executor mode (js-exec) */
45
+ executorInvokeTool?: (path: string, argsJson: string) => Promise<string>;
46
+ executorExecFn?: (code: string) => Promise<{
47
+ result: unknown;
48
+ error?: string;
49
+ logs?: string[];
50
+ }>;
44
51
  }
45
52
  export declare class Interpreter {
46
53
  private ctx;
@@ -341,4 +341,14 @@ export interface InterpreterContext {
341
341
  * Threaded through the context chain instead of shell env.
342
342
  */
343
343
  jsBootstrapCode?: string;
344
+ /**
345
+ * Tool invoker for executor mode (js-exec).
346
+ * When present, js-exec sets up a `tools` proxy.
347
+ */
348
+ executorInvokeTool?: (path: string, argsJson: string) => Promise<string>;
349
+ executorExecFn?: (code: string) => Promise<{
350
+ result: unknown;
351
+ error?: string;
352
+ logs?: string[];
353
+ }>;
344
354
  }
package/dist/types.d.ts CHANGED
@@ -182,6 +182,23 @@ export interface CommandContext {
182
182
  * user access/injection via environment variables.
183
183
  */
184
184
  jsBootstrapCode?: string;
185
+ /**
186
+ * Tool invoker for executor mode (js-exec).
187
+ * When present, js-exec sets up a `tools` proxy that routes calls through this.
188
+ * The function receives (path, argsJson) and returns a JSON result string.
189
+ */
190
+ executorInvokeTool?: (path: string, argsJson: string) => Promise<string>;
191
+ /**
192
+ * When set, js-exec routes execution through this function instead of
193
+ * running code directly. Used by the @executor/sdk integration — the
194
+ * SDK creates the toolInvoker (with all discovered sources) and calls
195
+ * our CodeExecutor which runs the code in QuickJS.
196
+ */
197
+ executorExecFn?: (code: string) => Promise<{
198
+ result: unknown;
199
+ error?: string;
200
+ logs?: string[];
201
+ }>;
185
202
  }
186
203
  export interface Command {
187
204
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "just-bash",
3
- "version": "2.14.0",
3
+ "version": "2.15.1-executor.0",
4
4
  "description": "A simulated bash environment with virtual filesystem",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,6 +44,7 @@
44
44
  "dist/sandbox/*.d.ts",
45
45
  "dist/utils/*.d.ts",
46
46
  "vendor/cpython-emscripten/",
47
+ "vendor/executor/",
47
48
  "README.md",
48
49
  "dist/AGENTS.md"
49
50
  ],
@@ -54,6 +55,38 @@
54
55
  "publishConfig": {
55
56
  "access": "public"
56
57
  },
58
+ "scripts": {
59
+ "build": "rm -rf dist && tsc && pnpm build:lib && pnpm build:lib:cjs && pnpm build:browser && pnpm build:cli && pnpm build:shell && pnpm build:worker && pnpm build:clean && cp dist/index.d.ts dist/index.d.cts && sed '1,/^-->/d' AGENTS.npm.md > dist/AGENTS.md",
60
+ "build:clean": "find dist -name '*.test.js' -delete && find dist -name '*.test.d.ts' -delete",
61
+ "build:worker": "esbuild src/commands/python3/worker.ts --bundle --platform=node --format=esm --outfile=src/commands/python3/worker.js --external:../../../vendor/cpython-emscripten/* && cp src/commands/python3/worker.js dist/commands/python3/worker.js && mkdir -p dist/bin/chunks && cp src/commands/python3/worker.js dist/bin/chunks/worker.js && mkdir -p dist/bundle/chunks && cp src/commands/python3/worker.js dist/bundle/chunks/worker.js && esbuild src/commands/js-exec/worker.ts --bundle --platform=node --format=esm --outfile=src/commands/js-exec/worker.js --external:quickjs-emscripten && cp src/commands/js-exec/worker.js dist/commands/js-exec/worker.js && cp src/commands/js-exec/worker.js dist/bin/chunks/js-exec-worker.js && cp src/commands/js-exec/worker.js dist/bundle/chunks/js-exec-worker.js",
62
+ "build:lib": "esbuild dist/index.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bundle --chunk-names=chunks/[name]-[hash] --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs --external:effect --external:@effect/platform --external:@effect/platform-node --external:../vendor/executor/*",
63
+ "build:lib:cjs": "esbuild dist/index.js --bundle --platform=node --format=cjs --minify --outfile=dist/bundle/index.cjs --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs --external:effect --external:@effect/platform --external:@effect/platform-node --external:../vendor/executor/*",
64
+ "build:browser": "esbuild dist/browser.js --bundle --platform=browser --format=esm --minify --outfile=dist/bundle/browser.js --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:node:zlib --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs --define:__BROWSER__=true --alias:node:dns=./src/shims/browser-unsupported.js",
65
+ "build:cli": "esbuild dist/cli/just-bash.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs --external:effect --external:@effect/platform --external:@effect/platform-node --external:../vendor/executor/*",
66
+ "build:shell": "esbuild dist/cli/shell.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin/shell --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs",
67
+ "prepublishOnly": "pnpm validate",
68
+ "validate": "pnpm lint && pnpm knip && pnpm typecheck && pnpm build && pnpm check:worker-sync && pnpm test:run && pnpm test:wasm && pnpm test:dist && pnpm test:examples",
69
+ "test:examples": "cd examples/cjs-consumer && pnpm install --no-frozen-lockfile && npx tsc --noEmit",
70
+ "typecheck": "tsc --noEmit",
71
+ "lint": "biome check . && pnpm lint:banned",
72
+ "check:worker-sync": "node scripts/check-worker-sync.js",
73
+ "lint:banned": "node scripts/check-banned-patterns.js",
74
+ "lint:fix": "biome check --write .",
75
+ "knip": "knip",
76
+ "test": "vitest",
77
+ "test:run": "vitest run --exclude src/security/fuzzing/ --exclude src/commands/python3/ --exclude src/commands/sqlite3/ --exclude src/commands/js-exec/ --exclude src/agent-examples/python-scripting.test.ts",
78
+ "test:dist": "vitest run src/cli/just-bash.bundle.test.ts",
79
+ "test:unit": "vitest run --config vitest.unit.config.ts",
80
+ "test:wasm": "vitest run --config vitest.wasm.config.ts",
81
+ "test:comparison": "vitest run --config vitest.comparison.config.ts",
82
+ "test:comparison:record": "RECORD_FIXTURES=1 vitest run --config vitest.comparison.config.ts",
83
+ "test:coverage": "vitest run --coverage",
84
+ "test:coverage:unit": "vitest run --config vitest.unit.config.ts --coverage",
85
+ "test:fuzz": "vitest run src/security/fuzzing/",
86
+ "test:fuzz:long": "FUZZ_RUNS=10000 vitest run src/security/fuzzing/",
87
+ "shell": "npx tsx src/cli/shell.ts",
88
+ "dev:exec": "npx tsx src/cli/exec.ts"
89
+ },
57
90
  "keywords": [],
58
91
  "author": "Malte and Claude",
59
92
  "license": "Apache-2.0",
@@ -75,6 +108,7 @@
75
108
  "dependencies": {
76
109
  "compressjs": "^1.0.3",
77
110
  "diff": "^8.0.2",
111
+ "effect": "^3.21.0",
78
112
  "fast-xml-parser": "^5.3.3",
79
113
  "file-type": "^21.2.0",
80
114
  "ini": "^6.0.0",
@@ -93,36 +127,5 @@
93
127
  "@mongodb-js/zstd": "^7.0.0",
94
128
  "node-liblzma": "^2.0.3"
95
129
  },
96
- "packageManager": "pnpm@8.15.9+sha512.499434c9d8fdd1a2794ebf4552b3b25c0a633abcee5bb15e7b5de90f32f47b513aca98cd5cfd001c31f0db454bc3804edccd578501e4ca293a6816166bbd9f81",
97
- "scripts": {
98
- "build": "rm -rf dist && tsc && pnpm build:lib && pnpm build:lib:cjs && pnpm build:browser && pnpm build:cli && pnpm build:shell && pnpm build:worker && pnpm build:clean && cp dist/index.d.ts dist/index.d.cts && sed '1,/^-->/d' AGENTS.npm.md > dist/AGENTS.md",
99
- "build:clean": "find dist -name '*.test.js' -delete && find dist -name '*.test.d.ts' -delete",
100
- "build:worker": "esbuild src/commands/python3/worker.ts --bundle --platform=node --format=esm --outfile=src/commands/python3/worker.js --external:../../../vendor/cpython-emscripten/* && cp src/commands/python3/worker.js dist/commands/python3/worker.js && mkdir -p dist/bin/chunks && cp src/commands/python3/worker.js dist/bin/chunks/worker.js && mkdir -p dist/bundle/chunks && cp src/commands/python3/worker.js dist/bundle/chunks/worker.js && esbuild src/commands/js-exec/worker.ts --bundle --platform=node --format=esm --outfile=src/commands/js-exec/worker.js --external:quickjs-emscripten && cp src/commands/js-exec/worker.js dist/commands/js-exec/worker.js && cp src/commands/js-exec/worker.js dist/bin/chunks/js-exec-worker.js && cp src/commands/js-exec/worker.js dist/bundle/chunks/js-exec-worker.js",
101
- "build:lib": "esbuild dist/index.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bundle --chunk-names=chunks/[name]-[hash] --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs",
102
- "build:lib:cjs": "esbuild dist/index.js --bundle --platform=node --format=cjs --minify --outfile=dist/bundle/index.cjs --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs",
103
- "build:browser": "esbuild dist/browser.js --bundle --platform=browser --format=esm --minify --outfile=dist/bundle/browser.js --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:node:zlib --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs --define:__BROWSER__=true --alias:node:dns=./src/shims/browser-unsupported.js",
104
- "build:cli": "esbuild dist/cli/just-bash.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs",
105
- "build:shell": "esbuild dist/cli/shell.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin/shell --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:compressjs",
106
- "validate": "pnpm lint && pnpm knip && pnpm typecheck && pnpm build && pnpm check:worker-sync && pnpm test:run && pnpm test:wasm && pnpm test:dist && pnpm test:examples",
107
- "test:examples": "cd examples/cjs-consumer && pnpm install --no-frozen-lockfile && npx tsc --noEmit",
108
- "typecheck": "tsc --noEmit",
109
- "lint": "biome check . && pnpm lint:banned",
110
- "check:worker-sync": "node scripts/check-worker-sync.js",
111
- "lint:banned": "node scripts/check-banned-patterns.js",
112
- "lint:fix": "biome check --write .",
113
- "knip": "knip",
114
- "test": "vitest",
115
- "test:run": "vitest run --exclude src/security/fuzzing/ --exclude src/commands/python3/ --exclude src/commands/sqlite3/ --exclude src/commands/js-exec/ --exclude src/agent-examples/python-scripting.test.ts",
116
- "test:dist": "vitest run src/cli/just-bash.bundle.test.ts",
117
- "test:unit": "vitest run --config vitest.unit.config.ts",
118
- "test:wasm": "vitest run --config vitest.wasm.config.ts",
119
- "test:comparison": "vitest run --config vitest.comparison.config.ts",
120
- "test:comparison:record": "RECORD_FIXTURES=1 vitest run --config vitest.comparison.config.ts",
121
- "test:coverage": "vitest run --coverage",
122
- "test:coverage:unit": "vitest run --config vitest.unit.config.ts --coverage",
123
- "test:fuzz": "vitest run src/security/fuzzing/",
124
- "test:fuzz:long": "FUZZ_RUNS=10000 vitest run src/security/fuzzing/",
125
- "shell": "npx tsx src/cli/shell.ts",
126
- "dev:exec": "npx tsx src/cli/exec.ts"
127
- }
128
- }
130
+ "packageManager": "pnpm@8.15.9+sha512.499434c9d8fdd1a2794ebf4552b3b25c0a633abcee5bb15e7b5de90f32f47b513aca98cd5cfd001c31f0db454bc3804edccd578501e4ca293a6816166bbd9f81"
131
+ }
File without changes
@@ -0,0 +1,18 @@
1
+ /** Vendored @executor/sdk bundle — re-exports createExecutor and types */
2
+ export declare function createExecutor(options: {
3
+ runtime?: unknown;
4
+ storage?: unknown;
5
+ tools?: Record<string, { description?: string; execute: (...args: unknown[]) => unknown }>;
6
+ onToolApproval?: unknown;
7
+ onInteraction?: unknown;
8
+ resolveSecret?: unknown;
9
+ }): Promise<{
10
+ execute: (code: string) => Promise<{ result: unknown; error?: string; logs?: string[] }>;
11
+ sources: {
12
+ add: (input: Record<string, unknown>, options?: Record<string, unknown>) => Promise<unknown>;
13
+ list: () => Promise<unknown[]>;
14
+ [key: string]: unknown;
15
+ };
16
+ close: () => Promise<void>;
17
+ [key: string]: unknown;
18
+ }>;