Allow to change the agents name + Workspace files
Rolling release / release (push) Successful in 8m2s
Rolling release / release (push) Successful in 8m2s
This commit is contained in:
@@ -5,10 +5,11 @@ import { acquireQvac, closeQvac, releaseQvac, Agent, QVAC_MASTER } from './qvac-
|
||||
import { createRuntimeTools } from '../skills/runtime-tools.js';
|
||||
import { createPhase2Tools, filesystemRoots } from '../skills/phase2-tools.js';
|
||||
import { createQvacTools } from '../skills/qvac-tools.js';
|
||||
import { VOICE_SYSTEM_PROMPT, parseHudSidecar } from '../skills/voice-prompt.js';
|
||||
import { voiceSystemPrompt, parseHudSidecar } from '../skills/voice-prompt.js';
|
||||
import { createComputerObserveTools } from '../skills/computer-observe.js';
|
||||
import { createComputerActTools } from '../skills/computer-act.js';
|
||||
import { createPhase9GatewayTool } from '../skills/phase9-tools.js';
|
||||
import { ensureAgentWorkspace, normalizeAssistantName } from './agent-workspace.js';
|
||||
|
||||
export function harnessRoots(fsAccess) {
|
||||
if (fsAccess === 'filesystem') return ['/'];
|
||||
@@ -17,29 +18,31 @@ export function harnessRoots(fsAccess) {
|
||||
}
|
||||
|
||||
export class HarnessBridge extends EventEmitter {
|
||||
constructor({ cwd = process.cwd(), model = QVAC_MASTER.model, tools = [], computer, observer, actuator, permissionMode = 'ask', fsAccess } = {}) {
|
||||
constructor({ cwd, model = QVAC_MASTER.model, tools = [], computer, observer, actuator, permissionMode = 'ask', fsAccess } = {}) {
|
||||
super();
|
||||
const settings = voiceSettings();
|
||||
const access = fsAccess ?? settings.fsAccess;
|
||||
const assistantName = normalizeAssistantName(settings.assistantName);
|
||||
const workspace = cwd || ensureAgentWorkspace({ name: assistantName });
|
||||
const roots = harnessRoots(access);
|
||||
this.options = {
|
||||
cwd,
|
||||
cwd: workspace,
|
||||
roots,
|
||||
model,
|
||||
tools: [
|
||||
...createRuntimeTools({ computer }),
|
||||
...createPhase2Tools({ cwd, computer, roots: filesystemRoots(access, cwd) }),
|
||||
...createPhase2Tools({ cwd: workspace, computer, roots: filesystemRoots(access, workspace) }),
|
||||
...createComputerObserveTools({ computer, observer }),
|
||||
...createComputerActTools({ actuator }),
|
||||
...createQvacTools(),
|
||||
...createPhase9GatewayTool(),
|
||||
...tools,
|
||||
],
|
||||
builtinTools: ['read_file', 'list_dir', 'grep', 'run_terminal_cmd', 'web_fetch', 'fetch_page', 'google_search', 'web_search', 'wiki_search', 'hn_search', 'code_search'],
|
||||
builtinTools: ['read_file', 'write_file', 'search_replace', 'list_dir', 'grep', 'run_terminal_cmd', 'web_fetch', 'fetch_page', 'google_search', 'web_search', 'wiki_search', 'hn_search', 'code_search'],
|
||||
webFetch: true,
|
||||
permissionMode,
|
||||
origin: 'jarvis-qvac',
|
||||
system: VOICE_SYSTEM_PROMPT,
|
||||
system: voiceSystemPrompt(assistantName),
|
||||
voice: true,
|
||||
maxTurns: settings.maxTurns,
|
||||
maxShellCalls: settings.maxShellCalls,
|
||||
|
||||
Reference in New Issue
Block a user