@agent-api/cli 0.1.2 → 0.2.1
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/agent/runner.d.ts +2 -0
- package/dist/agent/runner.js +3 -0
- package/dist/config.d.ts +24 -2
- package/dist/config.js +101 -11
- package/dist/conversation/index.js +8 -8
- package/dist/index.js +3 -2
- package/dist/runtime/index.d.ts +2 -2
- package/dist/runtime/index.js +142 -2
- package/dist/tui/ink/app.js +29 -1
- package/dist/tui/ink/components.d.ts +2 -1
- package/dist/tui/ink/components.js +4 -4
- package/dist/tui/workbench.d.ts +5 -2
- package/dist/tui/workbench.js +4 -1
- package/dist/workbench/command-controller.js +48 -0
- package/dist/workbench/isolator-installer.d.ts +29 -0
- package/dist/workbench/isolator-installer.js +208 -0
- package/dist/workbench/local-controller.d.ts +2 -0
- package/dist/workbench/local-controller.js +6 -1
- package/dist/workbench/session.js +3 -1
- package/dist/workbench/settings-controller.d.ts +28 -0
- package/dist/workbench/settings-controller.js +191 -2
- package/dist/workbench/shell-isolation.d.ts +20 -0
- package/dist/workbench/shell-isolation.js +13 -0
- package/dist/workbench/turn-controller.js +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type ShellIsolationMode = "none" | "auto" | "required";
|
|
2
|
+
export interface ShellIsolationPreferences {
|
|
3
|
+
mode?: ShellIsolationMode;
|
|
4
|
+
executablePath?: string | null;
|
|
5
|
+
version?: string | null;
|
|
6
|
+
sourceURL?: string | null;
|
|
7
|
+
sha256?: string | null;
|
|
8
|
+
installSkipped?: boolean | null;
|
|
9
|
+
}
|
|
10
|
+
export declare function localShellIsolationOptions(preferences?: ShellIsolationPreferences): {
|
|
11
|
+
readonly isolator?: {
|
|
12
|
+
executablePath: string;
|
|
13
|
+
} | undefined;
|
|
14
|
+
readonly isolation: ShellIsolationMode;
|
|
15
|
+
readonly isolationOptions: {
|
|
16
|
+
readonly filesystem: "workdir-readwrite";
|
|
17
|
+
readonly network: "allowed";
|
|
18
|
+
readonly env: "inherit";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function localShellIsolationOptions(preferences = {}) {
|
|
2
|
+
const executablePath = preferences.executablePath?.trim() || process.env.AGENT_ISOLATOR_PATH?.trim();
|
|
3
|
+
const isolation = preferences.mode ?? "auto";
|
|
4
|
+
return {
|
|
5
|
+
isolation,
|
|
6
|
+
isolationOptions: {
|
|
7
|
+
filesystem: "workdir-readwrite",
|
|
8
|
+
network: "allowed",
|
|
9
|
+
env: "inherit",
|
|
10
|
+
},
|
|
11
|
+
...(executablePath ? { isolator: { executablePath } } : {}),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -31,6 +31,7 @@ export function createWorkbenchTurnController(options) {
|
|
|
31
31
|
conversation: state.currentConversation,
|
|
32
32
|
includeLocalContext: state.contextEnabled,
|
|
33
33
|
accessMode: state.accessMode,
|
|
34
|
+
shellIsolation: state.shellIsolation,
|
|
34
35
|
restartConversation: false,
|
|
35
36
|
abortSignal: abortController.signal,
|
|
36
37
|
}, (event) => handleAgentEvent(event, assistantId));
|
|
@@ -68,6 +69,7 @@ export function createWorkbenchTurnController(options) {
|
|
|
68
69
|
conversation: state.currentConversation,
|
|
69
70
|
includeLocalContext: state.contextEnabled,
|
|
70
71
|
accessMode: input.accessMode,
|
|
72
|
+
shellIsolation: state.shellIsolation,
|
|
71
73
|
restartConversation: false,
|
|
72
74
|
abortSignal: abortController.signal,
|
|
73
75
|
}, input.approval, input.result, (event) => handleAgentEvent(event, assistantId));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-api/cli",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "First-class command line interface for Agent API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/scalebox-dev/agent-tui#readme",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"test": "npm run sync-version && npm run build && node --test test/*.test.mjs"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@agent-api/sdk": "^1.
|
|
34
|
+
"@agent-api/sdk": "^1.3.0",
|
|
35
35
|
"commander": "^14.0.3",
|
|
36
36
|
"ink": "^6.8.0",
|
|
37
37
|
"react": "^19.2.7",
|