blun-king-cli 9.1.104 → 9.1.106

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/LIESMICH.txt CHANGED
@@ -9,7 +9,7 @@ Installation
9
9
  ------------
10
10
  Die geprüfte Version exakt global installieren:
11
11
 
12
- npm install -g blun-king-cli@9.1.100
12
+ npm install -g blun-king-cli@9.1.106
13
13
 
14
14
  Start
15
15
  -----
@@ -105,6 +105,10 @@ Das Telemetrieereignis `tool_result_batch_offloaded` meldet ausschließlich die
105
105
 
106
106
  Reguläre `Agent`-Teilaufgaben verwenden eine eigene `ContextMemory` und eine eigene `wire.jsonl` in einem getrennten Agentenverzeichnis. Der Hauptagent erhält nur die Ergebniszusammenfassung, sodass lange Teilaufgaben nicht den Hauptverlauf füllen. `TodoList` speichert Pläne weiterhin maschinenlesbar im Sitzungs-Wire; `blun handoff` übergibt sie zusammen mit prüfbaren Hashes zwischen CLI, Desktop und Web.
107
107
 
108
+ Version 9.1.105 ergänzt `TaskUpdate` für laufende Hintergrundagenten. King übergibt zusätzliche Anweisungen am nächsten sicheren Modellschritt an denselben aktiven Agenten, ohne ihn zu stoppen oder einen weiteren Agenten zu starten. Unbekannte und bereits beendete Aufgaben, Shell-Aufgaben sowie Agenten, die keine Aktualisierung mehr annehmen, werden unverändert abgewiesen.
109
+
110
+ Version 9.1.106 erlaubt Agentenprofilen, Werkzeuge namentlich auszuschließen. King wendet diese Ausschlüsse erst an, nachdem dauerhaft geladene, dynamisch nachgeladene und MCP-Werkzeuge zusammengestellt wurden. Die Standardprofile `coder`, `explore` und `plan` können über Telegram weder antworten noch reagieren, Nachrichten bearbeiten oder Anhänge herunterladen; der Hauptagent bleibt unverändert. So senden delegierte Agenten keine Nachrichten am Hauptagenten vorbei, und ihre Modellanfragen enthalten weniger Werkzeugschemas. Nicht gefundene, namentlich angegebene Werkzeuge werden sichtbar gemeldet.
111
+
108
112
  Verliert ein delegierter Einzelagent oder ein Mitglied eines Agentenschwarms die Provider-Verbindung, erhält es eine leere Provider-Antwort, bricht sein Stream wegen Leerlaufs ab oder meldet der Server HTTP 408/500/502/503/504, setzt BLUN King denselben Agenten anhand seines dauerhaften Verlaufs fort. Bei Einzelagenten sowie bei Schwarm-Unterbrechungen außerhalb von HTTP 429 wartet die erste Fortsetzung zwei Sekunden und die zweite fünf Sekunden; danach bleibt der ursprüngliche Fehler sichtbar. HTTP 429 behält im Schwarm seine getrennte, längere Überlastungsregel. Authentifizierungs-, Zahlungs- oder Kontingent-, Richtlinien-, Kontext-, Werkzeug- und Codefehler sowie manuelle Abbrüche lösen keine automatische Fortsetzung aus. Jeder Fortsetzungsversuch verwendet die bestehende Agenten-ID, damit bereits abgeschlossene Arbeit nicht wiederholt wird.
109
113
 
110
114
  Rein lesende Sitzungsdiagnose
package/README.md CHANGED
@@ -9,7 +9,7 @@ Voraussetzung ist Node.js 24.15 oder neuer. Die geprüfte Version wird exakt
9
9
  installiert:
10
10
 
11
11
  ```powershell
12
- npm install -g blun-king-cli@9.1.104
12
+ npm install -g blun-king-cli@9.1.106
13
13
  ```
14
14
 
15
15
  ## Reproduzierbares Staging und Packen
@@ -113,6 +113,10 @@ Große textbasierte Werkzeugergebnisse bleiben nicht mehr vollständig im Modell
113
113
 
114
114
  Version 9.1.104 lässt Shell-Befehle im Vordergrund auch bei sehr großen Ausgaben bis zum regulären Ende laufen. King schreibt bis zu 16 MiB fortlaufend in das private Aufgabenprotokoll, verwirft darüber hinausgehende Ausgaben und meldet den tatsächlichen Exit-Code, statt den Prozess wegen der Ausgabemenge zu beenden. Kleine Ausgaben, Hintergrundaufgaben, Zeitgrenzen und manuelle Abbrüche bleiben unverändert.
115
115
 
116
+ Version 9.1.105 ergänzt `TaskUpdate` für laufende Hintergrundagenten. King übergibt zusätzliche Anweisungen am nächsten sicheren Modellschritt an denselben aktiven Agenten, ohne ihn zu stoppen oder einen weiteren Agenten zu starten. Unbekannte und bereits beendete Aufgaben, Shell-Aufgaben sowie Agenten, die keine Aktualisierung mehr annehmen, werden unverändert abgewiesen.
117
+
118
+ Version 9.1.106 erlaubt Agentenprofilen, Werkzeuge namentlich auszuschließen. King wendet diese Ausschlüsse erst an, nachdem dauerhaft geladene, dynamisch nachgeladene und MCP-Werkzeuge zusammengestellt wurden. Die Standardprofile `coder`, `explore` und `plan` können über Telegram weder antworten noch reagieren, Nachrichten bearbeiten oder Anhänge herunterladen; der Hauptagent bleibt unverändert. So senden delegierte Agenten keine Nachrichten am Hauptagenten vorbei, und ihre Modellanfragen enthalten weniger Werkzeugschemas. Nicht gefundene, namentlich angegebene Werkzeuge werden sichtbar gemeldet.
119
+
116
120
  Ab BLUN King 9.1.99 werden auch direkt aufeinanderfolgende reine Textergebnisse als Stapel betrachtet. Enthalten sie zusammen mehr als 12.000 Zeichen, obwohl kein einzelnes Ergebnis diese Grenze überschreitet, speichert King so viele der größten geeigneten Ergebnisse wie nötig in privaten Dateien. In der Modellprojektion verbleiben lesbare Verweise. Der unveränderte Sitzungsrohverlauf bleibt vollständig erhalten. Gemischte Medienergebnisse, einzelne Ergebnisse unter 3.000 Zeichen und Stapel bis einschließlich 12.000 Zeichen bleiben unverändert. Beispiel: Bei zwei Suchergebnissen mit 7.000 und 6.000 Zeichen wird das größere Ergebnis privat gespeichert; Anfang, Ende, ausgelassene Zeichenzahl und `output_path` bleiben für den Agenten sichtbar.
117
121
 
118
122
  Ab BLUN King 9.1.100 beendet eine begrenzte Grep-Inhaltssuche ripgrep, sobald der Versatz, die angeforderten Zeilen und eine zusätzliche Vorschauzeile vollständig vorliegen. Die Vorschauzeile belegt, ob eine weitere Seite existiert, ohne vorher bis zu 10 MB einzulesen. Unbegrenzte Suchen, Trefferzählungen und nach Änderungszeit sortierte Dateilisten laufen weiterhin vollständig durch.
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+
3
+ function normalizedExcludedToolNames(excludedNames) {
4
+ if (!Array.isArray(excludedNames)) return [];
5
+ return [...new Set(excludedNames
6
+ .map((name) => String(name || '').trim())
7
+ .filter(Boolean))];
8
+ }
9
+
10
+ function applyProfileToolExclusions(tools, excludedNames) {
11
+ const excluded = normalizedExcludedToolNames(excludedNames);
12
+ if (excluded.length === 0) return { tools, matched: [], unmatched: [] };
13
+
14
+ const excludedSet = new Set(excluded);
15
+ const matchedSet = new Set();
16
+ const filtered = [];
17
+ for (const tool of Array.isArray(tools) ? tools : []) {
18
+ const name = String(tool?.name || '');
19
+ if (excludedSet.has(name)) {
20
+ matchedSet.add(name);
21
+ continue;
22
+ }
23
+ filtered.push(tool);
24
+ }
25
+
26
+ return {
27
+ tools: filtered,
28
+ matched: excluded.filter((name) => matchedSet.has(name)),
29
+ unmatched: excluded.filter((name) => !matchedSet.has(name)),
30
+ };
31
+ }
32
+
33
+ module.exports = {
34
+ applyProfileToolExclusions,
35
+ normalizedExcludedToolNames,
36
+ };
37
+
package/blun.mjs CHANGED
@@ -21349,6 +21349,7 @@ var init_types$13 = __esmMin((() => {
21349
21349
  systemPromptTemplate: string().optional(),
21350
21350
  promptVars: record(string(), string()).optional(),
21351
21351
  tools: array(string()).optional(),
21352
+ excludedTools: array(string()).optional(),
21352
21353
  whenToUse: string().optional(),
21353
21354
  subagents: record(string(), RawSubagentProfileSchema).optional()
21354
21355
  });
@@ -28341,6 +28342,7 @@ function resolveMergedProfile(name, profileMap, cache, stack) {
28341
28342
  ...profile.promptVars
28342
28343
  },
28343
28344
  tools: profile.tools !== void 0 ? [...profile.tools] : [...parent?.tools ?? []],
28345
+ excludedTools: profile.excludedTools !== void 0 ? [...profile.excludedTools] : [...parent?.excludedTools ?? []],
28344
28346
  whenToUse: profile.whenToUse ?? parent?.whenToUse,
28345
28347
  subagents: cloneSubagents(profile.subagents)
28346
28348
  };
@@ -28353,6 +28355,7 @@ function toResolvedProfile(merged) {
28353
28355
  description: merged.description,
28354
28356
  systemPrompt: createSystemPromptRenderer(merged),
28355
28357
  tools: [...merged.tools],
28358
+ excludedTools: [...merged.excludedTools],
28356
28359
  whenToUse: merged.whenToUse
28357
28360
  };
28358
28361
  }
@@ -28484,7 +28487,7 @@ var init_load = __esmMin((() => {
28484
28487
  //#region ../../packages/agent-core/src/profile/default/agent.yaml?raw
28485
28488
  var agent_default$1;
28486
28489
  var init_agent$3 = __esmMin((() => {
28487
- agent_default$1 = "name: agent\ndescription: Default BLUN King agent\n\nsystemPromptPath: ./system.md\npromptVars:\n roleAdditional: ''\n\ntools:\n - Read\n - Write\n - Edit\n - Grep\n - Glob\n - Bash\n - TaskList\n - TaskOutput\n - TaskStop\n - CronCreate\n - CronList\n - CronDelete\n - ReadMediaFile\n - TodoList\n - Skill\n - WebSearch\n - Agent\n - AgentSwarm\n - FetchURL\n - GenerateImage\n - GenerateVideo\n - GenerateSpeech\n - GetMedia\n - AskUserQuestion\n - MistakeRecord\n - CodebaseSearch\n - EnterPlanMode\n - ExitPlanMode\n - CreateGoal\n - GetGoal\n - SetGoalBudget\n - UpdateGoal\n - mcp__*\n\nsubagents:\n coder:\n description: General software engineering agent — the only subagent type with file-editing tools; use it for any delegated task that must modify code.\n explore:\n description: Fast codebase exploration with prompt-enforced read-only behavior.\n plan:\n description: Read-only implementation planning and architecture design.\n";
28490
+ agent_default$1 = "name: agent\ndescription: Default BLUN King agent\n\nsystemPromptPath: ./system.md\npromptVars:\n roleAdditional: ''\n\ntools:\n - Read\n - Write\n - Edit\n - Grep\n - Glob\n - Bash\n - TaskList\n - TaskOutput\n - TaskUpdate\n - TaskStop\n - CronCreate\n - CronList\n - CronDelete\n - ReadMediaFile\n - TodoList\n - Skill\n - WebSearch\n - Agent\n - AgentSwarm\n - FetchURL\n - GenerateImage\n - GenerateVideo\n - GenerateSpeech\n - GetMedia\n - AskUserQuestion\n - MistakeRecord\n - CodebaseSearch\n - EnterPlanMode\n - ExitPlanMode\n - CreateGoal\n - GetGoal\n - SetGoalBudget\n - UpdateGoal\n - mcp__*\n\nsubagents:\n coder:\n description: General software engineering agent — the only subagent type with file-editing tools; use it for any delegated task that must modify code.\n explore:\n description: Fast codebase exploration with prompt-enforced read-only behavior.\n plan:\n description: Read-only implementation planning and architecture design.\n";
28488
28491
  agent_default$1 = agent_default$1.replace(" - TodoList\n", " - TodoList\n - CompactConversation\n");
28489
28492
  }));
28490
28493
  //#endregion
@@ -28524,9 +28527,12 @@ var PROFILE_SOURCES, DEFAULT_INIT_PROMPT, DEFAULT_AGENT_PROFILES;
28524
28527
  var init_default$1 = __esmMin((() => {
28525
28528
  init_agent$3();
28526
28529
  init_coder();
28530
+ coder_default = coder_default.replace("\nwhenToUse:", "\nexcludedTools:\n - mcp__plugin-telegram_telegram__reply\n - mcp__plugin-telegram_telegram__react\n - mcp__plugin-telegram_telegram__edit_message\n - mcp__plugin-telegram_telegram__download_attachment\n\nwhenToUse:");
28527
28531
  init_explore();
28532
+ explore_default = explore_default.replace("\nwhenToUse:", "\nexcludedTools:\n - mcp__plugin-telegram_telegram__reply\n - mcp__plugin-telegram_telegram__react\n - mcp__plugin-telegram_telegram__edit_message\n - mcp__plugin-telegram_telegram__download_attachment\n\nwhenToUse:");
28528
28533
  init_init();
28529
28534
  init_plan$1();
28535
+ plan_default = plan_default.replace("\nwhenToUse:", "\nexcludedTools:\n - mcp__plugin-telegram_telegram__reply\n - mcp__plugin-telegram_telegram__react\n - mcp__plugin-telegram_telegram__edit_message\n - mcp__plugin-telegram_telegram__download_attachment\n\nwhenToUse:");
28530
28536
  init_system();
28531
28537
  init_load();
28532
28538
  PROFILE_SOURCES = {
@@ -29084,6 +29090,9 @@ var init_agent_task = __esmMin((() => {
29084
29090
  });
29085
29091
  }
29086
29092
  }
29093
+ update(message) {
29094
+ return this.subagentHost.updateActive(this.agentId, message);
29095
+ }
29087
29096
  onDetach() {
29088
29097
  this.runInBackground = true;
29089
29098
  this.subagentHost.markActiveChildDetached(this.agentId);
@@ -29497,6 +29506,17 @@ var init_background = __esmMin((() => {
29497
29506
  if (entry !== void 0) return this.toInfo(entry);
29498
29507
  return this.ghosts.get(taskId);
29499
29508
  }
29509
+ updateAgentTask(taskId, message) {
29510
+ const entry = this.tasks.get(taskId);
29511
+ if (entry === void 0) throw new Error(`Task not found: ${taskId}`);
29512
+ if (TERMINAL_STATUSES.has(entry.status)) throw new Error(`Task ${taskId} is already in terminal state: ${entry.status}`);
29513
+ if (entry.task.kind !== "agent" || typeof entry.task.update !== "function") throw new Error(`Task ${taskId} is not an agent task and cannot receive updates`);
29514
+ const turnId = entry.task.update(message);
29515
+ return {
29516
+ ...this.toInfo(entry),
29517
+ turnId
29518
+ };
29519
+ }
29500
29520
  /**
29501
29521
  * List tasks, optionally filtering to active-only.
29502
29522
  *
@@ -232803,7 +232823,7 @@ var init_manager$2 = __esmMin((() => {
232803
232823
  init_plugin_session_start();
232804
232824
  init_plan_mode();
232805
232825
  init_tool_awareness();
232806
- ACTIVE_BACKGROUND_TASK_GUIDANCE = "The conversation was compacted, so the earlier messages that started these background tasks are gone — but the tasks are still running from before. Do not start duplicates. Use TaskOutput to fetch a task’s result, TaskList to list them, and TaskStop to cancel one.";
232826
+ ACTIVE_BACKGROUND_TASK_GUIDANCE = "The conversation was compacted, so the earlier messages that started these background tasks are gone — but the tasks are still running from before. Do not start duplicates. Use TaskOutput to fetch a task’s result, TaskList to list them, TaskUpdate to send additional instructions to a running agent task, and TaskStop to cancel one.";
232807
232827
  InjectionManager = class {
232808
232828
  agent;
232809
232829
  injectors;
@@ -232980,6 +233000,7 @@ var init_default_tool_approve = __esmMin((() => {
232980
233000
  "TodoList",
232981
233001
  "TaskList",
232982
233002
  "TaskOutput",
233003
+ "TaskUpdate",
232983
233004
  "CronList",
232984
233005
  "WebSearch",
232985
233006
  "FetchURL",
@@ -250911,6 +250932,55 @@ var init_task_output = __esmMin((() => {
250911
250932
  };
250912
250933
  }));
250913
250934
  //#endregion
250935
+ //#region ../../packages/agent-core/src/tools/background/task-update.md?raw
250936
+ var task_update_default;
250937
+ var init_task_update$1 = __esmMin((() => {
250938
+ task_update_default = "Send additional instructions to a running background agent without stopping it or starting another agent.\n\nThe update is inserted into the same agent's active turn at the next safe model-step boundary, so the agent keeps its existing context and completed work. Use the exact task_id returned by Agent(run_in_background=true) or shown by TaskList.\n\nThis tool accepts only a currently running agent task. Shell tasks, unknown tasks, completed tasks, and tasks that are no longer accepting updates are rejected without changing them.";
250939
+ }));
250940
+ //#endregion
250941
+ //#region ../../packages/agent-core/src/tools/background/task-update.ts
250942
+ var TaskUpdateInputSchema, TaskUpdateTool;
250943
+ var init_task_update = __esmMin((() => {
250944
+ init_zod$1();
250945
+ init_input_schema();
250946
+ init_rule_match();
250947
+ init_task_update$1();
250948
+ TaskUpdateInputSchema = object({
250949
+ task_id: string().trim().min(1).describe("The running background agent task ID to update."),
250950
+ message: string().trim().min(1).describe("Additional instruction for the same running agent.")
250951
+ });
250952
+ TaskUpdateTool = class {
250953
+ manager;
250954
+ name = "TaskUpdate";
250955
+ description = task_update_default;
250956
+ parameters = toInputJsonSchema(TaskUpdateInputSchema);
250957
+ constructor(manager) {
250958
+ this.manager = manager;
250959
+ }
250960
+ resolveExecution(args) {
250961
+ return {
250962
+ description: `Updating agent task ${args.task_id}`,
250963
+ approvalRule: this.name,
250964
+ matchesRule: (ruleArgs) => matchesGlobRuleSubject(ruleArgs, args.task_id),
250965
+ execute: async () => {
250966
+ try {
250967
+ const info = this.manager.updateAgentTask(args.task_id, args.message);
250968
+ return {
250969
+ output: `task_id: ${info.taskId}\nstatus: ${info.status}\nagent_id: ${info.agentId}\nturn_id: ${String(info.turnId)}\nupdate: accepted`,
250970
+ isError: false
250971
+ };
250972
+ } catch (error) {
250973
+ return {
250974
+ output: error instanceof Error ? error.message : String(error),
250975
+ isError: true
250976
+ };
250977
+ }
250978
+ }
250979
+ };
250980
+ }
250981
+ };
250982
+ }));
250983
+ //#endregion
250914
250984
  //#region ../../packages/agent-core/src/tools/background/task-stop.md?raw
250915
250985
  var task_stop_default;
250916
250986
  var init_task_stop$1 = __esmMin((() => {
@@ -251950,6 +252020,22 @@ IMPORTANT:
251950
252020
  })
251951
252021
  };
251952
252022
  }
252023
+ updateActive(agentId, message) {
252024
+ const active = this.activeChildren.get(agentId);
252025
+ if (active === void 0 || active.runInBackground !== true) throw new Error(`Agent instance "${agentId}" is not running in the background`);
252026
+ const child = this.session.getReadyAgent(agentId);
252027
+ if (child === void 0 || !child.turn.hasActiveTurn) throw new Error(`Agent instance "${agentId}" has no active turn to update`);
252028
+ const turnId = child.turn.currentId;
252029
+ const acceptedTurnId = child.turn.steerActive([{
252030
+ type: "text",
252031
+ text: message
252032
+ }], turnId, {
252033
+ kind: "system_trigger",
252034
+ name: "subagent_update"
252035
+ });
252036
+ if (acceptedTurnId === null) throw new Error(`Agent instance "${agentId}" is not accepting updates at this boundary`);
252037
+ return acceptedTurnId;
252038
+ }
251953
252039
  async retry(agentId, options) {
251954
252040
  options.signal.throwIfAborted();
251955
252041
  const { parent, child, profileName } = await this.ensureIdleSubagent(agentId);
@@ -263218,6 +263304,7 @@ var init_blun_media$1 = __esmMin((() => {
263218
263304
  var init_builtin = __esmMin((() => {
263219
263305
  init_task_list();
263220
263306
  init_task_output();
263307
+ init_task_update();
263221
263308
  init_task_stop();
263222
263309
  init_cron_create();
263223
263310
  init_cron_delete();
@@ -263252,7 +263339,7 @@ var init_builtin = __esmMin((() => {
263252
263339
  var init_types$3 = __esmMin((() => {}));
263253
263340
  //#endregion
263254
263341
  //#region ../../packages/agent-core/src/agent/tool/index.ts
263255
- var import_picomatch, SHELL_FOREGROUND_TIMEOUT_S, ToolManager;
263342
+ var import_picomatch, profileToolExclusionPolicy, applyProfileToolExclusions, SHELL_FOREGROUND_TIMEOUT_S, ToolManager;
263256
263343
  var init_tool$1 = __esmMin((() => {
263257
263344
  init_dist$4();
263258
263345
  import_picomatch = /* @__PURE__ */ __toESM(require_picomatch(), 1);
@@ -263265,6 +263352,8 @@ var init_tool$1 = __esmMin((() => {
263265
263352
  init_builtin();
263266
263353
  init_compact_conversation_tool();
263267
263354
  init_types$3();
263355
+ profileToolExclusionPolicy = createRequire(import.meta.url)("./bin/profile-tool-exclusion-policy.cjs");
263356
+ applyProfileToolExclusions = profileToolExclusionPolicy.applyProfileToolExclusions;
263268
263357
  SHELL_FOREGROUND_TIMEOUT_S = 120;
263269
263358
  ToolManager = class {
263270
263359
  agent;
@@ -263280,6 +263369,8 @@ var init_tool$1 = __esmMin((() => {
263280
263369
  store = {};
263281
263370
  mcpToolStatusUnsubscribe;
263282
263371
  allowedTools;
263372
+ excludedTools = [];
263373
+ reportedUnmatchedExclusions = /* @__PURE__ */ new Set();
263283
263374
  /** Abort controllers for in-flight `!` shell commands, keyed by commandId so
263284
263375
  * the TUI can cancel (Esc / Ctrl+C) a running command. */
263285
263376
  shellCommandControllers = /* @__PURE__ */ new Map();
@@ -263600,6 +263691,14 @@ var init_tool$1 = __esmMin((() => {
263600
263691
  setAllowedTools(tools) {
263601
263692
  this.allowedTools = tools !== void 0 && tools.length > 0 ? [...tools] : void 0;
263602
263693
  }
263694
+ setExcludedTools(names) {
263695
+ this.excludedTools = [...new Set((Array.isArray(names) ? names : []).map((name) => String(name || "").trim()).filter(Boolean))];
263696
+ this.reportedUnmatchedExclusions.clear();
263697
+ this.agent.records.logRecord({
263698
+ type: "tools.set_excluded_tools",
263699
+ names: this.excludedTools
263700
+ });
263701
+ }
263603
263702
  copyLoopToolsFrom(source) {
263604
263703
  this.loopToolsOverride = source.loopTools;
263605
263704
  }
@@ -263660,6 +263759,7 @@ var init_tool$1 = __esmMin((() => {
263660
263759
  new CompactConversationTool(this.agent),
263661
263760
  new TaskListTool(background),
263662
263761
  new TaskOutputTool(background),
263762
+ new TaskUpdateTool(background),
263663
263763
  new TaskStopTool(background),
263664
263764
  this.agent.cron && new CronCreateTool(this.agent.cron),
263665
263765
  this.agent.cron && new CronListTool(this.agent.cron),
@@ -263739,12 +263839,22 @@ var init_tool$1 = __esmMin((() => {
263739
263839
  }
263740
263840
  }
263741
263841
  get loopTools() {
263742
- if (this.loopToolsOverride !== void 0) return this.loopToolsOverride;
263743
- const mcpNames = [...this.mcpTools.keys()].filter((name) => this.isMcpToolEnabled(name));
263744
- const hideGoalMutationTools = this.agent.goal.getGoal().goal === null;
263745
- const allowedTools = this.allowedTools;
263746
- const names = uniq([...this.enabledTools, ...mcpNames]).toSorted((a, b) => a.localeCompare(b)).filter((name) => !(hideGoalMutationTools && (name === "SetGoalBudget" || name === "UpdateGoal")));
263747
- return (allowedTools !== void 0 && allowedTools.length > 0 ? names.filter((name) => allowedTools.includes(name)) : names).map((name) => this.userTools.get(name) ?? this.mcpTools.get(name)?.tool ?? this.builtinTools.get(name)).filter((tool) => !!tool);
263842
+ let selectedTools;
263843
+ if (this.loopToolsOverride !== void 0) selectedTools = this.loopToolsOverride;
263844
+ else {
263845
+ const mcpNames = [...this.mcpTools.keys()].filter((name) => this.isMcpToolEnabled(name));
263846
+ const hideGoalMutationTools = this.agent.goal.getGoal().goal === null;
263847
+ const allowedTools = this.allowedTools;
263848
+ const names = uniq([...this.enabledTools, ...mcpNames]).toSorted((a, b) => a.localeCompare(b)).filter((name) => !(hideGoalMutationTools && (name === "SetGoalBudget" || name === "UpdateGoal")));
263849
+ selectedTools = (allowedTools !== void 0 && allowedTools.length > 0 ? names.filter((name) => allowedTools.includes(name)) : names).map((name) => this.userTools.get(name) ?? this.mcpTools.get(name)?.tool ?? this.builtinTools.get(name)).filter((tool) => !!tool);
263850
+ }
263851
+ const exclusion = applyProfileToolExclusions(selectedTools, this.excludedTools);
263852
+ for (const name of exclusion.unmatched) if (!this.reportedUnmatchedExclusions.has(name)) {
263853
+ this.reportedUnmatchedExclusions.add(name);
263854
+ this.agent.log.warn("profile tool exclusion did not match a loaded tool", { name });
263855
+ this.agent.telemetry.track("profile_tool_exclusion_unmatched", { tool_name: name });
263856
+ }
263857
+ return exclusion.tools;
263748
263858
  }
263749
263859
  };
263750
263860
  }));
@@ -264342,6 +264452,7 @@ var init_agent = __esmMin((() => {
264342
264452
  this.setActiveProfile(profile, brandHome);
264343
264453
  this.updateSystemPromptFromProfile(profile, context);
264344
264454
  this.tools.setActiveTools(profile.tools);
264455
+ this.tools.setExcludedTools(profile.excludedTools);
264345
264456
  }
264346
264457
  setActiveProfile(profile, brandHome) {
264347
264458
  this.activeProfile = profile;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "9.1.104",
3
+ "version": "9.1.106",
4
4
  "description": "BLUN CLI - your own AI agent with a Telegram channel. Get it done. With BLUN.",
5
5
  "license": "MIT",
6
6
  "bin": {