Automatisierungsvorschlaege nur mit n8n-Anbindung (#726)

An instance without n8n has no use for workflow proposals. New instance
setting automation.enabled ("this instance works with n8n"), off by default:
- off: automation_find/automation_propose refuse, no candidates are put to
  agents, and the escalation tool does not mention proposals at all;
- the switch sits in the settings card for external MCP servers; the
  approvals view says proposals are off instead of standing empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard
2026-10-01 20:29:19 +02:00
co-authored by Claude Opus 5.5
parent 184a507e3d
commit a17ac2957f
12 changed files with 124 additions and 4 deletions
@@ -165,6 +165,22 @@ public sealed class AutomationProposalsTests : IDisposable
varied.ShouldNotBe(same);
}
[Fact]
public async Task Without_n8n_nothing_is_proposed_and_no_candidate_is_put_to_anyone()
{
var settings = new AutomationSettings { Enabled = false };
var storage = new SqliteStorage(Path.Combine(_directory, "off.db"));
var off = new AutomationProposals(storage, _audit, _tasks, _board, NullLogger.Instance, () => settings);
var taskId = await RecurringTask(9);
off.Enabled.ShouldBeFalse();
(await off.ProposeAsync(Request(taskId), default)).Message.ShouldContain("does not work with n8n");
(await off.FindCandidatesAsync(default)).ShouldBeEmpty();
settings.Enabled = true;
(await off.ProposeAsync(Request(taskId), default)).Ok.ShouldBeTrue();
}
[Fact]
public void The_signature_folds_repeats_and_leaves_out_bookkeeping()
{
@@ -0,0 +1,20 @@
using ClawdDotNet.Tools.Taskboard;
using Shouldly;
namespace ClawdDotNet.Tools.Tests.Taskboard;
/// <summary>#726: Agents hear of workflow proposals only in an instance that works with n8n.</summary>
public sealed class AutomationHintTests
{
[Fact]
public void The_hint_follows_the_n8n_switch()
{
var enabled = false;
var tool = new EscalationTool { AutomationEnabled = () => enabled };
tool.Description.ShouldNotContain("automation_propose");
enabled = true;
tool.Description.ShouldContain("automation_propose");
new EscalationTool().Description.ShouldNotContain("automation_propose", customMessage: "without the host saying so, nothing is proposed");
}
}