@pellux/goodvibes-sdk 0.18.15 → 0.18.17
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/_internal/platform/agents/orchestrator.d.ts +1 -0
- package/dist/_internal/platform/agents/orchestrator.d.ts.map +1 -1
- package/dist/_internal/platform/config/manager.d.ts +3 -2
- package/dist/_internal/platform/config/manager.d.ts.map +1 -1
- package/dist/_internal/platform/config/manager.js +12 -7
- package/dist/_internal/platform/config/secrets.d.ts +6 -4
- package/dist/_internal/platform/config/secrets.d.ts.map +1 -1
- package/dist/_internal/platform/config/secrets.js +19 -16
- package/dist/_internal/platform/daemon/cli.js +2 -1
- package/dist/_internal/platform/daemon/facade-composition.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/facade-composition.js +1 -0
- package/dist/_internal/platform/discovery/mcp-scanner.d.ts +3 -1
- package/dist/_internal/platform/discovery/mcp-scanner.d.ts.map +1 -1
- package/dist/_internal/platform/discovery/mcp-scanner.js +6 -5
- package/dist/_internal/platform/discovery/scanner.d.ts +3 -1
- package/dist/_internal/platform/discovery/scanner.d.ts.map +1 -1
- package/dist/_internal/platform/discovery/scanner.js +3 -2
- package/dist/_internal/platform/input/keybindings.d.ts +1 -0
- package/dist/_internal/platform/input/keybindings.d.ts.map +1 -1
- package/dist/_internal/platform/input/keybindings.js +5 -2
- package/dist/_internal/platform/plugins/manager.d.ts.map +1 -1
- package/dist/_internal/platform/plugins/manager.js +5 -3
- package/dist/_internal/platform/runtime/bootstrap-background.d.ts +2 -0
- package/dist/_internal/platform/runtime/bootstrap-background.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/bootstrap-background.js +6 -6
- package/dist/_internal/platform/runtime/guidance.d.ts +1 -0
- package/dist/_internal/platform/runtime/guidance.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/guidance.js +6 -2
- package/dist/_internal/platform/runtime/remote/distributed-runtime-manager.d.ts +1 -1
- package/dist/_internal/platform/runtime/remote/distributed-runtime-manager.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/remote/distributed-runtime-manager.js +4 -3
- package/dist/_internal/platform/runtime/sandbox/provisioning.d.ts +7 -4
- package/dist/_internal/platform/runtime/sandbox/provisioning.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/sandbox/provisioning.js +9 -8
- package/dist/_internal/platform/runtime/services.d.ts +1 -0
- package/dist/_internal/platform/runtime/services.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/services.js +22 -19
- package/dist/_internal/platform/runtime/surface-root.d.ts +4 -0
- package/dist/_internal/platform/runtime/surface-root.d.ts.map +1 -0
- package/dist/_internal/platform/runtime/surface-root.js +14 -0
- package/dist/_internal/platform/sessions/orchestration/registry.d.ts +4 -5
- package/dist/_internal/platform/sessions/orchestration/registry.d.ts.map +1 -1
- package/dist/_internal/platform/sessions/orchestration/registry.js +7 -8
- package/dist/_internal/platform/tools/index.d.ts +1 -0
- package/dist/_internal/platform/tools/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/index.js +6 -1
- package/dist/_internal/platform/tools/repl/index.d.ts +4 -1
- package/dist/_internal/platform/tools/repl/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/repl/index.js +9 -7
- package/package.json +1 -1
|
@@ -5,10 +5,11 @@ import ts from 'typescript';
|
|
|
5
5
|
import { executeSandboxCommand } from '../../runtime/sandbox/backend.js';
|
|
6
6
|
import {} from '../../runtime/sandbox/manager.js';
|
|
7
7
|
import { SandboxSessionRegistry } from '../../runtime/sandbox/session-registry.js';
|
|
8
|
+
import { requireSurfaceRoot } from '../../runtime/surface-root.js';
|
|
8
9
|
import { summarizeError } from '../../utils/error-display.js';
|
|
9
10
|
import { REPL_TOOL_SCHEMA } from './schema.js';
|
|
10
|
-
function resolveHistoryPath(workspaceRoot) {
|
|
11
|
-
return join(workspaceRoot, '.goodvibes',
|
|
11
|
+
function resolveHistoryPath(workspaceRoot, surfaceRoot) {
|
|
12
|
+
return join(workspaceRoot, '.goodvibes', surfaceRoot, 'repl-history.json');
|
|
12
13
|
}
|
|
13
14
|
function createLocalExecPlan(workspaceRoot) {
|
|
14
15
|
return {
|
|
@@ -80,8 +81,8 @@ async function evalTypeScript(expression, bindings, configManager, sandboxSessio
|
|
|
80
81
|
}).outputText;
|
|
81
82
|
return evalJavaScriptInSandbox(transpiled, bindings, launchPlan, configManager, sandboxSessionRegistry, sessionId);
|
|
82
83
|
}
|
|
83
|
-
function evalPython(expression, workspaceRoot, configManager, sandboxSessionRegistry, launchPlan, sessionId) {
|
|
84
|
-
const replTempBase = join(workspaceRoot, '.goodvibes',
|
|
84
|
+
function evalPython(expression, workspaceRoot, surfaceRoot, configManager, sandboxSessionRegistry, launchPlan, sessionId) {
|
|
85
|
+
const replTempBase = join(workspaceRoot, '.goodvibes', surfaceRoot, 'repl-temp');
|
|
85
86
|
mkdirSync(replTempBase, { recursive: true });
|
|
86
87
|
const tempRoot = mkdtempSync(join(replTempBase, 'gv-repl-py-'));
|
|
87
88
|
const venvPath = join(tempRoot, 'venv');
|
|
@@ -178,7 +179,8 @@ process.stdout.write(JSON.stringify({
|
|
|
178
179
|
}
|
|
179
180
|
return result.stdout.trim();
|
|
180
181
|
}
|
|
181
|
-
export function createReplTool(configManager, sandboxSessionRegistry) {
|
|
182
|
+
export function createReplTool(configManager, sandboxSessionRegistry, options) {
|
|
183
|
+
const surfaceRoot = requireSurfaceRoot(options.surfaceRoot, 'ReplTool surfaceRoot');
|
|
182
184
|
return {
|
|
183
185
|
definition: {
|
|
184
186
|
name: 'repl',
|
|
@@ -195,7 +197,7 @@ export function createReplTool(configManager, sandboxSessionRegistry) {
|
|
|
195
197
|
if (!input.workspaceRoot || input.workspaceRoot.trim().length === 0) {
|
|
196
198
|
return { success: false, error: 'repl requires workspaceRoot.' };
|
|
197
199
|
}
|
|
198
|
-
const historyPath = resolveHistoryPath(input.workspaceRoot);
|
|
200
|
+
const historyPath = resolveHistoryPath(input.workspaceRoot, surfaceRoot);
|
|
199
201
|
const history = loadHistory(historyPath);
|
|
200
202
|
const localExecPlan = createLocalExecPlan(input.workspaceRoot);
|
|
201
203
|
if (input.mode === 'history') {
|
|
@@ -215,7 +217,7 @@ export function createReplTool(configManager, sandboxSessionRegistry) {
|
|
|
215
217
|
rendered = await evalTypeScript(input.expression, input.bindings ?? {}, configManager, sandboxSessionRegistry, sandboxSession.launchPlan ?? localExecPlan, sandboxSession.id);
|
|
216
218
|
break;
|
|
217
219
|
case 'python':
|
|
218
|
-
rendered = evalPython(input.expression, input.workspaceRoot, configManager, sandboxSessionRegistry, sandboxSession.launchPlan ?? localExecPlan, sandboxSession.id);
|
|
220
|
+
rendered = evalPython(input.expression, input.workspaceRoot, surfaceRoot, configManager, sandboxSessionRegistry, sandboxSession.launchPlan ?? localExecPlan, sandboxSession.id);
|
|
219
221
|
break;
|
|
220
222
|
case 'sql':
|
|
221
223
|
rendered = await evalSql(input.expression, configManager, sandboxSessionRegistry, sandboxSession.launchPlan ?? localExecPlan, sandboxSession.id);
|
package/package.json
CHANGED