Files
vibn-frontend/vibn-agent-runner/dist/agent-session-runner.d.ts
mawkone 3d07cf38b6 fix(runner): wire ToolContext vibnApiUrl + mcpToken so agent tools reach the frontend MCP
buildContext() hardcoded vibnApiUrl='http://localhost:3000' and mcpToken='',
so every agent tool call (projects_list, workspace_describe, apps_list, ...)
fetched the runner itself on a dead port and failed with 'fetch failed'.
Now /agent/execute reads mcpToken from the request body and sets
ctx.vibnApiUrl (from VIBN_API_URL), ctx.mcpToken, and ctx.projectId before
running the agent.
2026-05-30 19:15:43 -07:00

29 lines
907 B
TypeScript

/**
* agent-session-runner.ts
*
* Upgraded Cloud Agent Executor for VibnCode.
* Implements 4-level Smart Concurrency (parallel reads/lookups) and the
* Ralph Loop (autonomous self-correction) entirely inside your secure Cloud VM.
*/
import { AgentConfig } from "./agents";
import { ToolContext } from "./tools";
export interface OutputLine {
ts: string;
type: "step" | "stdout" | "stderr" | "info" | "error" | "done";
text: string;
}
export interface SessionRunOptions {
sessionId: string;
projectId: string;
vibnApiUrl: string;
appPath: string;
repoRoot?: string;
isStopped: () => boolean;
autoApprove?: boolean;
giteaRepo?: string;
coolifyAppUuid?: string;
coolifyApiUrl?: string;
coolifyApiToken?: string;
}
export declare function runSessionAgent(config: AgentConfig, task: string, ctx: ToolContext, opts: SessionRunOptions): Promise<void>;