open-agents-ai 0.34.5 → 0.35.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/index.js +278 -34
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11576,6 +11576,52 @@ var init_ralphLoop = __esm({
|
|
|
11576
11576
|
}
|
|
11577
11577
|
});
|
|
11578
11578
|
|
|
11579
|
+
// packages/orchestrator/dist/personality.js
|
|
11580
|
+
function compilePersonalityPrompt(profile) {
|
|
11581
|
+
const avg = (profile.frequency + profile.depth + profile.threshold + profile.effort + profile.willingness) / 5;
|
|
11582
|
+
if (avg <= 1.5) {
|
|
11583
|
+
return `
|
|
11584
|
+
## Response Style
|
|
11585
|
+
Be extremely concise. Act silently \u2014 only speak when results are surprising or errors occur. No preamble, no summaries. Raw results and tool calls only.`;
|
|
11586
|
+
}
|
|
11587
|
+
if (avg <= 2.5) {
|
|
11588
|
+
return `
|
|
11589
|
+
## Response Style
|
|
11590
|
+
Be concise and direct. Brief status updates between tool calls. Skip reasoning explanation unless the approach is non-obvious. No markdown headers for short answers.`;
|
|
11591
|
+
}
|
|
11592
|
+
if (avg <= 3.5) {
|
|
11593
|
+
return "";
|
|
11594
|
+
}
|
|
11595
|
+
if (avg <= 4.5) {
|
|
11596
|
+
return `
|
|
11597
|
+
## Response Style
|
|
11598
|
+
Explain your reasoning as you work. Describe what you're looking for and why. Summarize findings. Use structured formatting for complex output.`;
|
|
11599
|
+
}
|
|
11600
|
+
return `
|
|
11601
|
+
## Response Style
|
|
11602
|
+
Provide thorough explanations of your reasoning at each step. Describe alternatives you considered. Offer suggestions beyond the immediate task. Use well-structured markdown with headers and examples.`;
|
|
11603
|
+
}
|
|
11604
|
+
function getPreset(name) {
|
|
11605
|
+
return PERSONALITY_PRESETS[name];
|
|
11606
|
+
}
|
|
11607
|
+
var PERSONALITY_PRESETS, PRESET_NAMES;
|
|
11608
|
+
var init_personality = __esm({
|
|
11609
|
+
"packages/orchestrator/dist/personality.js"() {
|
|
11610
|
+
"use strict";
|
|
11611
|
+
PERSONALITY_PRESETS = {
|
|
11612
|
+
/** Silent operator — acts, doesn't explain */
|
|
11613
|
+
concise: { frequency: 1, depth: 1, threshold: 1, effort: 2, willingness: 1 },
|
|
11614
|
+
/** Balanced default */
|
|
11615
|
+
balanced: { frequency: 3, depth: 3, threshold: 3, effort: 3, willingness: 3 },
|
|
11616
|
+
/** Thorough explainer — narrates reasoning */
|
|
11617
|
+
verbose: { frequency: 5, depth: 4, threshold: 4, effort: 4, willingness: 4 },
|
|
11618
|
+
/** Teacher mode — maximum explanation */
|
|
11619
|
+
pedagogical: { frequency: 5, depth: 5, threshold: 5, effort: 5, willingness: 5 }
|
|
11620
|
+
};
|
|
11621
|
+
PRESET_NAMES = Object.keys(PERSONALITY_PRESETS);
|
|
11622
|
+
}
|
|
11623
|
+
});
|
|
11624
|
+
|
|
11579
11625
|
// packages/orchestrator/dist/agenticRunner.js
|
|
11580
11626
|
function getSystemPromptForTier(tier) {
|
|
11581
11627
|
switch (tier) {
|
|
@@ -11592,6 +11638,7 @@ var init_agenticRunner = __esm({
|
|
|
11592
11638
|
"packages/orchestrator/dist/agenticRunner.js"() {
|
|
11593
11639
|
"use strict";
|
|
11594
11640
|
init_dist();
|
|
11641
|
+
init_personality();
|
|
11595
11642
|
SYSTEM_PROMPT = `You are Open Agent, an autonomous AI agent with full access to the local machine. You can read/write files, execute shell commands, browse the web, control the desktop (open applications, click UI elements, take screenshots), and interact with any software on the system. You solve tasks by using your tools iteratively until complete.
|
|
11596
11643
|
|
|
11597
11644
|
## NEVER REFUSE \u2014 ALWAYS ATTEMPT
|
|
@@ -11888,7 +11935,8 @@ Rules:
|
|
|
11888
11935
|
bruteForce: options?.bruteForce ?? true,
|
|
11889
11936
|
bruteForceMaxCycles: options?.bruteForceMaxCycles ?? 100,
|
|
11890
11937
|
modelTier: options?.modelTier ?? "large",
|
|
11891
|
-
contextWindowSize: options?.contextWindowSize ?? 0
|
|
11938
|
+
contextWindowSize: options?.contextWindowSize ?? 0,
|
|
11939
|
+
personality: options?.personality ?? PERSONALITY_PRESETS.balanced
|
|
11892
11940
|
};
|
|
11893
11941
|
}
|
|
11894
11942
|
/** Update context window size (e.g. after querying Ollama /api/show) */
|
|
@@ -12102,9 +12150,11 @@ Respond with your assessment, then take action.`;
|
|
|
12102
12150
|
this._memexArchive.clear();
|
|
12103
12151
|
this._sessionId = `session-${Date.now()}`;
|
|
12104
12152
|
const basePrompt = getSystemPromptForTier(this.options.modelTier);
|
|
12105
|
-
const
|
|
12153
|
+
const personalitySuffix = this.options.personality ? compilePersonalityPrompt(this.options.personality) : "";
|
|
12154
|
+
const promptWithPersonality = personalitySuffix ? `${basePrompt}${personalitySuffix}` : basePrompt;
|
|
12155
|
+
const systemPrompt = this.options.dynamicContext ? `${promptWithPersonality}
|
|
12106
12156
|
|
|
12107
|
-
${this.options.dynamicContext}` :
|
|
12157
|
+
${this.options.dynamicContext}` : promptWithPersonality;
|
|
12108
12158
|
const messages = [
|
|
12109
12159
|
{ role: "system", content: systemPrompt },
|
|
12110
12160
|
{ role: "user", content: context ? `${context}
|
|
@@ -12215,7 +12265,7 @@ Integrate this guidance into your current approach. Continue working on the task
|
|
|
12215
12265
|
const choiceContent = response.choices[0]?.message?.content ?? "";
|
|
12216
12266
|
const choiceArgs = response.choices[0]?.message?.toolCalls?.map((tc) => JSON.stringify(tc.arguments)).join("") ?? "";
|
|
12217
12267
|
estimatedTokens += Math.ceil((choiceContent.length + choiceArgs.length) / 4);
|
|
12218
|
-
const estimatedContextTokens = Math.ceil(
|
|
12268
|
+
const estimatedContextTokens = Math.ceil(compacted.reduce((sum, m) => sum + (typeof m.content === "string" ? m.content.length : 100), 0) / 4);
|
|
12219
12269
|
this.emit({
|
|
12220
12270
|
type: "token_usage",
|
|
12221
12271
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -12512,7 +12562,7 @@ Integrate this guidance into your current approach. Continue working on the task
|
|
|
12512
12562
|
const choiceContent2 = response.choices[0]?.message?.content ?? "";
|
|
12513
12563
|
const choiceArgs2 = response.choices[0]?.message?.toolCalls?.map((tc) => JSON.stringify(tc.arguments)).join("") ?? "";
|
|
12514
12564
|
estimatedTokens += Math.ceil((choiceContent2.length + choiceArgs2.length) / 4);
|
|
12515
|
-
const bfEstCtx = Math.ceil(
|
|
12565
|
+
const bfEstCtx = Math.ceil(compactedMsgs.reduce((sum, m) => sum + (typeof m.content === "string" ? m.content.length : 100), 0) / 4);
|
|
12516
12566
|
this.emit({
|
|
12517
12567
|
type: "token_usage",
|
|
12518
12568
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -14285,6 +14335,7 @@ var init_dist5 = __esm({
|
|
|
14285
14335
|
init_workEvaluator();
|
|
14286
14336
|
init_sessionMetrics();
|
|
14287
14337
|
init_taskLearning();
|
|
14338
|
+
init_personality();
|
|
14288
14339
|
}
|
|
14289
14340
|
});
|
|
14290
14341
|
|
|
@@ -15615,6 +15666,8 @@ function renderSlashHelp() {
|
|
|
15615
15666
|
["/skills", "List available AIWG skills"],
|
|
15616
15667
|
["/skills <keyword>", "Filter skills by name or trigger"],
|
|
15617
15668
|
["/<skill-name> [args]", "Invoke an AIWG skill directly"],
|
|
15669
|
+
["/style", "Show current response style"],
|
|
15670
|
+
["/style <preset>", "Set style: concise, balanced, verbose, pedagogical"],
|
|
15618
15671
|
["/verbose", "Toggle verbose mode"],
|
|
15619
15672
|
["/clear", "Clear the screen"],
|
|
15620
15673
|
["/help", "Show this help"],
|
|
@@ -18266,6 +18319,31 @@ async function handleSlashCommand(input, ctx) {
|
|
|
18266
18319
|
}
|
|
18267
18320
|
return "handled";
|
|
18268
18321
|
}
|
|
18322
|
+
case "style":
|
|
18323
|
+
case "personality": {
|
|
18324
|
+
if (!ctx.setStyle || !ctx.getStyle) {
|
|
18325
|
+
renderWarning("Style control not available.");
|
|
18326
|
+
return "handled";
|
|
18327
|
+
}
|
|
18328
|
+
if (!arg) {
|
|
18329
|
+
const current = ctx.getStyle();
|
|
18330
|
+
renderInfo(`Current style: ${c2.bold(current)}. Available: ${PRESET_NAMES.join(", ")}`);
|
|
18331
|
+
return "handled";
|
|
18332
|
+
}
|
|
18333
|
+
if (!PRESET_NAMES.includes(arg)) {
|
|
18334
|
+
renderWarning(`Unknown style "${arg}". Available: ${PRESET_NAMES.join(", ")}`);
|
|
18335
|
+
return "handled";
|
|
18336
|
+
}
|
|
18337
|
+
ctx.setStyle(arg);
|
|
18338
|
+
if (hasLocal) {
|
|
18339
|
+
ctx.saveLocalSettings({ style: arg });
|
|
18340
|
+
renderInfo(`Style set to ${c2.bold(arg)} (project-local). Takes effect on next task.`);
|
|
18341
|
+
} else {
|
|
18342
|
+
ctx.saveSettings({ style: arg });
|
|
18343
|
+
renderInfo(`Style set to ${c2.bold(arg)}. Takes effect on next task.`);
|
|
18344
|
+
}
|
|
18345
|
+
return "handled";
|
|
18346
|
+
}
|
|
18269
18347
|
case "compact":
|
|
18270
18348
|
case "gc": {
|
|
18271
18349
|
if (!ctx.hasActiveTask?.()) {
|
|
@@ -20074,9 +20152,18 @@ function modelOnnxPath(id) {
|
|
|
20074
20152
|
function modelConfigPath(id) {
|
|
20075
20153
|
return join29(modelDir(id), "config.json");
|
|
20076
20154
|
}
|
|
20077
|
-
function describeToolCall(toolName, args) {
|
|
20155
|
+
function describeToolCall(toolName, args, personality = 2) {
|
|
20078
20156
|
const path = args["path"];
|
|
20079
20157
|
const file = path ? path.split("/").pop() ?? path : "";
|
|
20158
|
+
if (personality <= 2) {
|
|
20159
|
+
return describeToolCallTerse(toolName, args, file);
|
|
20160
|
+
}
|
|
20161
|
+
if (personality <= 3) {
|
|
20162
|
+
return describeToolCallConversational(toolName, args, file);
|
|
20163
|
+
}
|
|
20164
|
+
return describeToolCallChatty(toolName, args, file);
|
|
20165
|
+
}
|
|
20166
|
+
function describeToolCallTerse(toolName, args, file) {
|
|
20080
20167
|
switch (toolName) {
|
|
20081
20168
|
case "file_read":
|
|
20082
20169
|
return `Reading ${file}`;
|
|
@@ -20086,22 +20173,8 @@ function describeToolCall(toolName, args) {
|
|
|
20086
20173
|
return `Editing ${file}`;
|
|
20087
20174
|
case "file_patch":
|
|
20088
20175
|
return `Patching ${file}`;
|
|
20089
|
-
case "shell":
|
|
20090
|
-
|
|
20091
|
-
if (/npm\s+test|vitest|jest|mocha/.test(cmd))
|
|
20092
|
-
return "Running tests";
|
|
20093
|
-
if (/npm\s+run\s+build|tsc|esbuild/.test(cmd))
|
|
20094
|
-
return "Building project";
|
|
20095
|
-
if (/npm\s+install|pnpm\s+install/.test(cmd))
|
|
20096
|
-
return "Installing dependencies";
|
|
20097
|
-
if (/git\s+/.test(cmd))
|
|
20098
|
-
return "Running git command";
|
|
20099
|
-
if (/npm\s+run\s+lint|eslint|biome/.test(cmd))
|
|
20100
|
-
return "Running linter";
|
|
20101
|
-
if (cmd.length > 40)
|
|
20102
|
-
return "Running shell command";
|
|
20103
|
-
return `Running ${cmd.slice(0, 30)}`;
|
|
20104
|
-
}
|
|
20176
|
+
case "shell":
|
|
20177
|
+
return describeShellTerse(String(args["command"] ?? ""));
|
|
20105
20178
|
case "grep_search":
|
|
20106
20179
|
return `Searching for ${args["pattern"] ?? "pattern"}`;
|
|
20107
20180
|
case "find_files":
|
|
@@ -20156,10 +20229,164 @@ function describeToolCall(toolName, args) {
|
|
|
20156
20229
|
return `Using ${toolName}`;
|
|
20157
20230
|
}
|
|
20158
20231
|
}
|
|
20159
|
-
function
|
|
20232
|
+
function describeToolCallConversational(toolName, args, file) {
|
|
20233
|
+
switch (toolName) {
|
|
20234
|
+
case "file_read":
|
|
20235
|
+
return `Let me take a look at ${file}`;
|
|
20236
|
+
case "file_write":
|
|
20237
|
+
return `Writing changes to ${file}`;
|
|
20238
|
+
case "file_edit":
|
|
20239
|
+
return `Making some edits to ${file}`;
|
|
20240
|
+
case "file_patch":
|
|
20241
|
+
return `Patching up ${file}`;
|
|
20242
|
+
case "shell":
|
|
20243
|
+
return describeShellConversational(String(args["command"] ?? ""));
|
|
20244
|
+
case "grep_search":
|
|
20245
|
+
return `Searching the code for ${args["pattern"] ?? "that pattern"}`;
|
|
20246
|
+
case "find_files":
|
|
20247
|
+
return `Looking for files matching ${args["pattern"] ?? "that pattern"}`;
|
|
20248
|
+
case "list_directory":
|
|
20249
|
+
return `Checking what's in ${file || "the directory"}`;
|
|
20250
|
+
case "web_search":
|
|
20251
|
+
return `Let me search the web for that`;
|
|
20252
|
+
case "web_fetch":
|
|
20253
|
+
return `Pulling up that web page`;
|
|
20254
|
+
case "memory_read":
|
|
20255
|
+
return `Checking my notes`;
|
|
20256
|
+
case "memory_write":
|
|
20257
|
+
return `Making a note of that`;
|
|
20258
|
+
case "task_complete":
|
|
20259
|
+
return String(args["summary"] ?? "All done");
|
|
20260
|
+
case "batch_edit":
|
|
20261
|
+
return `Editing several files at once`;
|
|
20262
|
+
case "codebase_map":
|
|
20263
|
+
return `Mapping out the project structure`;
|
|
20264
|
+
case "diagnostic":
|
|
20265
|
+
return `Running some diagnostics`;
|
|
20266
|
+
case "git_info":
|
|
20267
|
+
return `Checking the git status`;
|
|
20268
|
+
case "sub_agent":
|
|
20269
|
+
return `Handing this off to a sub agent`;
|
|
20270
|
+
case "image_read":
|
|
20271
|
+
return `Taking a look at that image`;
|
|
20272
|
+
case "screenshot":
|
|
20273
|
+
return `Grabbing a screenshot`;
|
|
20274
|
+
default:
|
|
20275
|
+
return `Working with ${toolName}`;
|
|
20276
|
+
}
|
|
20277
|
+
}
|
|
20278
|
+
function describeToolCallChatty(toolName, args, file) {
|
|
20279
|
+
switch (toolName) {
|
|
20280
|
+
case "file_read":
|
|
20281
|
+
return `Alright, let's crack open ${file} and see what we're working with`;
|
|
20282
|
+
case "file_write":
|
|
20283
|
+
return `Time to write this out to ${file}`;
|
|
20284
|
+
case "file_edit":
|
|
20285
|
+
return `Let me tweak ${file}, I think I see what needs to change`;
|
|
20286
|
+
case "file_patch":
|
|
20287
|
+
return `Patching up ${file}, this should do the trick`;
|
|
20288
|
+
case "shell":
|
|
20289
|
+
return describeShellChatty(String(args["command"] ?? ""));
|
|
20290
|
+
case "grep_search":
|
|
20291
|
+
return `Hunting through the code for ${args["pattern"] ?? "what we need"}`;
|
|
20292
|
+
case "find_files":
|
|
20293
|
+
return `Scouring the project for files matching ${args["pattern"] ?? "our target"}`;
|
|
20294
|
+
case "list_directory":
|
|
20295
|
+
return `Let's see what we've got in ${file || "this directory"}`;
|
|
20296
|
+
case "web_search":
|
|
20297
|
+
return `Off to the web to track this down`;
|
|
20298
|
+
case "web_fetch":
|
|
20299
|
+
return `Grabbing that page, one moment`;
|
|
20300
|
+
case "memory_read":
|
|
20301
|
+
return `Let me dig through my notes on this`;
|
|
20302
|
+
case "memory_write":
|
|
20303
|
+
return `Stashing this away for later`;
|
|
20304
|
+
case "task_complete":
|
|
20305
|
+
return String(args["summary"] ?? "And that's a wrap");
|
|
20306
|
+
case "batch_edit":
|
|
20307
|
+
return `Okay, editing a bunch of files here, bear with me`;
|
|
20308
|
+
case "codebase_map":
|
|
20309
|
+
return `Let me get the lay of the land on this project`;
|
|
20310
|
+
case "diagnostic":
|
|
20311
|
+
return `Running diagnostics, let's see if anything looks off`;
|
|
20312
|
+
case "git_info":
|
|
20313
|
+
return `Checking in with git to see where things stand`;
|
|
20314
|
+
case "sub_agent":
|
|
20315
|
+
return `Bringing in reinforcements for this one`;
|
|
20316
|
+
case "image_read":
|
|
20317
|
+
return `Let me get a good look at that image`;
|
|
20318
|
+
case "screenshot":
|
|
20319
|
+
return `Snapping a screenshot to see what's happening`;
|
|
20320
|
+
default:
|
|
20321
|
+
return `Pulling in ${toolName}, hang tight`;
|
|
20322
|
+
}
|
|
20323
|
+
}
|
|
20324
|
+
function describeShellTerse(cmd) {
|
|
20325
|
+
if (/npm\s+test|vitest|jest|mocha/.test(cmd))
|
|
20326
|
+
return "Running tests";
|
|
20327
|
+
if (/npm\s+run\s+build|tsc|esbuild/.test(cmd))
|
|
20328
|
+
return "Building project";
|
|
20329
|
+
if (/npm\s+install|pnpm\s+install/.test(cmd))
|
|
20330
|
+
return "Installing dependencies";
|
|
20331
|
+
if (/git\s+/.test(cmd))
|
|
20332
|
+
return "Running git command";
|
|
20333
|
+
if (/npm\s+run\s+lint|eslint|biome/.test(cmd))
|
|
20334
|
+
return "Running linter";
|
|
20335
|
+
if (cmd.length > 40)
|
|
20336
|
+
return "Running shell command";
|
|
20337
|
+
return `Running ${cmd.slice(0, 30)}`;
|
|
20338
|
+
}
|
|
20339
|
+
function describeShellConversational(cmd) {
|
|
20340
|
+
if (/npm\s+test|vitest|jest|mocha/.test(cmd))
|
|
20341
|
+
return "Let's run the tests and see how we're doing";
|
|
20342
|
+
if (/npm\s+run\s+build|tsc|esbuild/.test(cmd))
|
|
20343
|
+
return "Building the project now";
|
|
20344
|
+
if (/npm\s+install|pnpm\s+install/.test(cmd))
|
|
20345
|
+
return "Installing the dependencies";
|
|
20346
|
+
if (/git\s+/.test(cmd))
|
|
20347
|
+
return "Running a git command";
|
|
20348
|
+
if (/npm\s+run\s+lint|eslint|biome/.test(cmd))
|
|
20349
|
+
return "Checking the code with the linter";
|
|
20350
|
+
return "Running a command";
|
|
20351
|
+
}
|
|
20352
|
+
function describeShellChatty(cmd) {
|
|
20353
|
+
if (/npm\s+test|vitest|jest|mocha/.test(cmd))
|
|
20354
|
+
return "Alright, moment of truth, let's see if the tests pass";
|
|
20355
|
+
if (/npm\s+run\s+build|tsc|esbuild/.test(cmd))
|
|
20356
|
+
return "Kicking off a build, fingers crossed";
|
|
20357
|
+
if (/npm\s+install|pnpm\s+install/.test(cmd))
|
|
20358
|
+
return "Pulling in dependencies, this might take a sec";
|
|
20359
|
+
if (/git\s+/.test(cmd))
|
|
20360
|
+
return "Checking in with git";
|
|
20361
|
+
if (/npm\s+run\s+lint|eslint|biome/.test(cmd))
|
|
20362
|
+
return "Running the linter, let's keep things tidy";
|
|
20363
|
+
return "Firing off a shell command";
|
|
20364
|
+
}
|
|
20365
|
+
function describeToolResult(toolName, success, personality = 2) {
|
|
20160
20366
|
if (toolName === "task_complete")
|
|
20161
20367
|
return "";
|
|
20162
|
-
|
|
20368
|
+
if (personality <= 2) {
|
|
20369
|
+
return success ? "Done" : "That failed, trying to fix it";
|
|
20370
|
+
}
|
|
20371
|
+
if (personality <= 3) {
|
|
20372
|
+
return success ? "Got it" : "That didn't work, let me try another approach";
|
|
20373
|
+
}
|
|
20374
|
+
return success ? "Looking good, moving on" : "Hmm, that didn't go as planned. Let me take a different angle";
|
|
20375
|
+
}
|
|
20376
|
+
function describeTaskComplete(summary, completed, personality = 2) {
|
|
20377
|
+
const truncated = summary.length > 300 ? summary.slice(0, 300) + "..." : summary;
|
|
20378
|
+
if (!completed) {
|
|
20379
|
+
if (personality <= 2)
|
|
20380
|
+
return "Task did not complete.";
|
|
20381
|
+
if (personality <= 3)
|
|
20382
|
+
return "I wasn't able to finish that one.";
|
|
20383
|
+
return "Well, that didn't quite get there. You might want to take a look at what's left.";
|
|
20384
|
+
}
|
|
20385
|
+
if (personality <= 2)
|
|
20386
|
+
return `Task complete. ${truncated}`;
|
|
20387
|
+
if (personality <= 3)
|
|
20388
|
+
return `All done. ${truncated}`;
|
|
20389
|
+
return `And we're done! ${truncated}`;
|
|
20163
20390
|
}
|
|
20164
20391
|
function formatBytes2(bytes) {
|
|
20165
20392
|
if (bytes < 1024)
|
|
@@ -23076,7 +23303,14 @@ Use task_status("${taskId}") or task_output("${taskId}") to check progress.`
|
|
|
23076
23303
|
}
|
|
23077
23304
|
};
|
|
23078
23305
|
}
|
|
23079
|
-
function startTask(task, config, repoRoot, voice, stream, taskStores, bruteForce, statusBar, sudoCallback, costTracker, onComplete, taskType, contextWindowSize, modelCaps) {
|
|
23306
|
+
function startTask(task, config, repoRoot, voice, stream, taskStores, bruteForce, statusBar, sudoCallback, costTracker, onComplete, taskType, contextWindowSize, modelCaps, personality) {
|
|
23307
|
+
const voiceStyleMap = {
|
|
23308
|
+
concise: 1,
|
|
23309
|
+
balanced: 3,
|
|
23310
|
+
verbose: 4,
|
|
23311
|
+
pedagogical: 5
|
|
23312
|
+
};
|
|
23313
|
+
const vLevel = voiceStyleMap[personality ?? "balanced"];
|
|
23080
23314
|
const modelTier = getModelTier(config.model);
|
|
23081
23315
|
const projectCtx = buildProjectContext(repoRoot, taskStores?.contextStores);
|
|
23082
23316
|
let dynamicContext = formatContextForPrompt(projectCtx, modelTier);
|
|
@@ -23099,7 +23333,8 @@ function startTask(task, config, repoRoot, voice, stream, taskStores, bruteForce
|
|
|
23099
23333
|
bruteForce: bruteForce ?? true,
|
|
23100
23334
|
bruteForceMaxCycles: 100,
|
|
23101
23335
|
// effectively unlimited — no hard timeout, agent runs until complete or aborted
|
|
23102
|
-
contextWindowSize: contextWindowSize ?? 0
|
|
23336
|
+
contextWindowSize: contextWindowSize ?? 0,
|
|
23337
|
+
personality: personality ? getPreset(personality) : void 0
|
|
23103
23338
|
});
|
|
23104
23339
|
runner.setWorkingDirectory(repoRoot);
|
|
23105
23340
|
const tools = buildTools(repoRoot, config, contextWindowSize);
|
|
@@ -23198,7 +23433,7 @@ ${entry.fullContent}`
|
|
|
23198
23433
|
statusBar?.setActiveTool(event.toolName ?? null);
|
|
23199
23434
|
contentWrite(() => {
|
|
23200
23435
|
if (voice?.enabled) {
|
|
23201
|
-
const desc = describeToolCall(event.toolName ?? "unknown", event.toolArgs ?? {});
|
|
23436
|
+
const desc = describeToolCall(event.toolName ?? "unknown", event.toolArgs ?? {}, vLevel);
|
|
23202
23437
|
renderVoiceText(desc);
|
|
23203
23438
|
voice.speak(desc);
|
|
23204
23439
|
}
|
|
@@ -23225,7 +23460,7 @@ ${entry.fullContent}`
|
|
|
23225
23460
|
renderVerbose(`${event.toolName ?? "unknown"}: ${durStr}${sizeStr}`);
|
|
23226
23461
|
}
|
|
23227
23462
|
if (voice?.enabled && !(event.success ?? true)) {
|
|
23228
|
-
const desc = describeToolResult(event.toolName ?? "unknown", false);
|
|
23463
|
+
const desc = describeToolResult(event.toolName ?? "unknown", false, vLevel);
|
|
23229
23464
|
if (desc) {
|
|
23230
23465
|
renderVoiceText(desc);
|
|
23231
23466
|
voice.speak(desc);
|
|
@@ -23323,13 +23558,12 @@ ${entry.fullContent}`
|
|
|
23323
23558
|
if (onComplete)
|
|
23324
23559
|
onComplete(result.summary);
|
|
23325
23560
|
if (voice?.enabled && result.summary) {
|
|
23326
|
-
|
|
23327
|
-
voice.speak(`Task complete. ${ttsText}`);
|
|
23561
|
+
voice.speak(describeTaskComplete(result.summary, true, vLevel));
|
|
23328
23562
|
}
|
|
23329
23563
|
} else {
|
|
23330
23564
|
renderTaskIncomplete(result.turns, result.toolCalls, result.durationMs, tokens);
|
|
23331
23565
|
if (voice?.enabled) {
|
|
23332
|
-
voice.speak("
|
|
23566
|
+
voice.speak(describeTaskComplete("", false, vLevel));
|
|
23333
23567
|
}
|
|
23334
23568
|
}
|
|
23335
23569
|
});
|
|
@@ -23440,6 +23674,7 @@ async function startInteractive(config, repoPath) {
|
|
|
23440
23674
|
config = { ...config, dbPath: savedSettings.dbPath };
|
|
23441
23675
|
let streamEnabled = savedSettings.stream ?? false;
|
|
23442
23676
|
let bruteForceEnabled = savedSettings.bruteforce ?? true;
|
|
23677
|
+
let currentStyle = PRESET_NAMES.includes(savedSettings.style) ? savedSettings.style : "balanced";
|
|
23443
23678
|
if (savedSettings.emojis !== void 0)
|
|
23444
23679
|
setEmojisEnabled(savedSettings.emojis);
|
|
23445
23680
|
if (savedSettings.colors !== void 0)
|
|
@@ -23629,7 +23864,9 @@ async function startInteractive(config, repoPath) {
|
|
|
23629
23864
|
"/stop",
|
|
23630
23865
|
"/resume",
|
|
23631
23866
|
"/compact",
|
|
23632
|
-
"/gc"
|
|
23867
|
+
"/gc",
|
|
23868
|
+
"/style",
|
|
23869
|
+
"/personality"
|
|
23633
23870
|
];
|
|
23634
23871
|
const discoveredSkillNames = discoverSkills(repoRoot).map((s) => `/${s.name}`);
|
|
23635
23872
|
const allCompletions = [.../* @__PURE__ */ new Set([...BUILTIN_COMMANDS, ...discoveredSkillNames])].sort();
|
|
@@ -23789,6 +24026,12 @@ async function startInteractive(config, repoPath) {
|
|
|
23789
24026
|
bruteForceEnabled = !bruteForceEnabled;
|
|
23790
24027
|
return bruteForceEnabled;
|
|
23791
24028
|
},
|
|
24029
|
+
setStyle(preset) {
|
|
24030
|
+
currentStyle = preset;
|
|
24031
|
+
},
|
|
24032
|
+
getStyle() {
|
|
24033
|
+
return currentStyle;
|
|
24034
|
+
},
|
|
23792
24035
|
saveSettings(settings) {
|
|
23793
24036
|
try {
|
|
23794
24037
|
saveProjectSettings(repoRoot, settings);
|
|
@@ -24188,7 +24431,7 @@ Execute this skill now. Follow the behavioral guidance above.`;
|
|
|
24188
24431
|
toolPatternStore: toolPatternStore ?? void 0
|
|
24189
24432
|
}, bruteForceEnabled, statusBar, handleSudoRequest, costTracker, (summary) => {
|
|
24190
24433
|
lastCompletedSummary = summary;
|
|
24191
|
-
}, currentTaskType, resolvedContextWindowSize, resolvedCaps);
|
|
24434
|
+
}, currentTaskType, resolvedContextWindowSize, resolvedCaps, currentStyle);
|
|
24192
24435
|
activeTask = task;
|
|
24193
24436
|
showPrompt();
|
|
24194
24437
|
await task.promise;
|
|
@@ -24300,7 +24543,7 @@ NEW TASK: ${fullInput}`;
|
|
|
24300
24543
|
toolPatternStore: toolPatternStore ?? void 0
|
|
24301
24544
|
}, bruteForceEnabled, statusBar, handleSudoRequest, costTracker, (summary) => {
|
|
24302
24545
|
lastCompletedSummary = summary;
|
|
24303
|
-
}, currentTaskType, resolvedContextWindowSize, resolvedCaps);
|
|
24546
|
+
}, currentTaskType, resolvedContextWindowSize, resolvedCaps, currentStyle);
|
|
24304
24547
|
activeTask = task;
|
|
24305
24548
|
showPrompt();
|
|
24306
24549
|
await task.promise;
|
|
@@ -24436,6 +24679,7 @@ var init_interactive = __esm({
|
|
|
24436
24679
|
"packages/cli/dist/tui/interactive.js"() {
|
|
24437
24680
|
"use strict";
|
|
24438
24681
|
init_dist5();
|
|
24682
|
+
init_dist5();
|
|
24439
24683
|
init_dist2();
|
|
24440
24684
|
init_dist();
|
|
24441
24685
|
init_listen();
|
package/package.json
CHANGED