just-bash 2.15.0-executor.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.
- package/dist/Bash.d.ts +2 -0
- package/dist/bin/chunks/js-exec-RGKNWHHL.js +100 -0
- package/dist/bin/just-bash.js +43 -43
- package/dist/bin/shell/chunks/js-exec-DUGJM6RL.js +100 -0
- package/dist/bin/shell/shell.js +68 -68
- package/dist/bundle/browser.js +5 -5
- package/dist/bundle/chunks/js-exec-LSIPMWTQ.js +99 -0
- package/dist/bundle/index.cjs +11 -8
- package/dist/bundle/index.js +49 -49
- package/dist/executor-init.d.ts +11 -2
- package/dist/interpreter/interpreter.d.ts +5 -0
- package/dist/interpreter/types.d.ts +5 -0
- package/dist/types.d.ts +11 -0
- package/package.json +1 -1
- package/vendor/executor/executor-sdk-bundle.mjs +345 -805
- package/vendor/executor/openapi-extractor-wasm/openapi_extractor_bg.wasm +0 -0
- package/dist/bin/chunks/js-exec-6UJKEL4G.js +0 -97
- package/dist/bin/shell/chunks/js-exec-H26D5H6V.js +0 -97
- package/dist/bundle/chunks/js-exec-OOPTBRNB.js +0 -96
package/dist/executor-init.d.ts
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Executor SDK lazy initialization.
|
|
3
3
|
* Separated from Bash.ts so the browser bundle never sees these imports.
|
|
4
|
-
* Only loaded at runtime behind a
|
|
4
|
+
* Only loaded at runtime behind a dynamic import.
|
|
5
5
|
*/
|
|
6
6
|
import type { ExecutorConfig, ExecutorSDKHandle } from "./Bash.js";
|
|
7
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
8
|
sdk: ExecutorSDKHandle;
|
|
9
|
-
|
|
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
|
+
}>;
|
|
10
19
|
}>;
|
|
@@ -43,6 +43,11 @@ export interface InterpreterOptions {
|
|
|
43
43
|
jsBootstrapCode?: string;
|
|
44
44
|
/** Tool invoker for executor mode (js-exec) */
|
|
45
45
|
executorInvokeTool?: (path: string, argsJson: string) => Promise<string>;
|
|
46
|
+
executorExecFn?: (code: string) => Promise<{
|
|
47
|
+
result: unknown;
|
|
48
|
+
error?: string;
|
|
49
|
+
logs?: string[];
|
|
50
|
+
}>;
|
|
46
51
|
}
|
|
47
52
|
export declare class Interpreter {
|
|
48
53
|
private ctx;
|
|
@@ -346,4 +346,9 @@ export interface InterpreterContext {
|
|
|
346
346
|
* When present, js-exec sets up a `tools` proxy.
|
|
347
347
|
*/
|
|
348
348
|
executorInvokeTool?: (path: string, argsJson: string) => Promise<string>;
|
|
349
|
+
executorExecFn?: (code: string) => Promise<{
|
|
350
|
+
result: unknown;
|
|
351
|
+
error?: string;
|
|
352
|
+
logs?: string[];
|
|
353
|
+
}>;
|
|
349
354
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -188,6 +188,17 @@ export interface CommandContext {
|
|
|
188
188
|
* The function receives (path, argsJson) and returns a JSON result string.
|
|
189
189
|
*/
|
|
190
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
|
+
}>;
|
|
191
202
|
}
|
|
192
203
|
export interface Command {
|
|
193
204
|
name: string;
|