@teamclaws/teamclaw 2026.11.1 → 2026.11.3

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.
Files changed (45) hide show
  1. package/cli.mjs +96 -11
  2. package/dist/index.js +7 -0
  3. package/dist/src/controller/config-routes.js +138 -0
  4. package/dist/src/controller/http-server.js +18 -0
  5. package/dist/src/controller/journal.js +68 -0
  6. package/dist/src/controller/provisioning/process-supervisor.js +58 -2
  7. package/dist/src/controller/provisioning-config.js +53 -0
  8. package/dist/src/controller/route-table.js +11 -0
  9. package/dist/src/controller/security.js +39 -0
  10. package/dist/src/controller/teamauto-routes.js +12 -0
  11. package/dist/src/controller/tunnel-manager.js +33 -1
  12. package/dist/src/controller/tunnel-routes.js +17 -1
  13. package/dist/src/controller/websocket.js +4 -0
  14. package/dist/src/controller/worker-provisioning.js +36 -0
  15. package/dist/src/openclaw-workspace.js +36 -0
  16. package/dist/src/state.js +77 -1
  17. package/dist/src/teamauto/github-client.js +33 -0
  18. package/dist/src/teamauto/scanner.js +30 -3
  19. package/dist/src/teamauto/scheduler.js +300 -18
  20. package/dist/src/teamauto/store.js +9 -0
  21. package/dist/src/ui/app.js +188 -11
  22. package/dist/src/ui/index.html +38 -0
  23. package/index.ts +8 -0
  24. package/openclaw.plugin.json +1 -1
  25. package/package.json +1 -1
  26. package/src/controller/config-routes.ts +152 -0
  27. package/src/controller/http-server.ts +18 -0
  28. package/src/controller/journal.ts +89 -0
  29. package/src/controller/provisioning/process-supervisor.ts +56 -2
  30. package/src/controller/provisioning-config.ts +54 -0
  31. package/src/controller/route-table.ts +11 -0
  32. package/src/controller/security.ts +40 -0
  33. package/src/controller/teamauto-routes.ts +12 -0
  34. package/src/controller/tunnel-manager.ts +34 -1
  35. package/src/controller/tunnel-routes.ts +18 -1
  36. package/src/controller/websocket.ts +6 -0
  37. package/src/controller/worker-provisioning.ts +34 -0
  38. package/src/openclaw-workspace.ts +47 -0
  39. package/src/state.ts +73 -2
  40. package/src/teamauto/github-client.ts +36 -0
  41. package/src/teamauto/scanner.ts +31 -4
  42. package/src/teamauto/scheduler.ts +303 -18
  43. package/src/teamauto/store.ts +36 -1
  44. package/src/ui/app.js +188 -11
  45. package/src/ui/index.html +38 -0
@@ -70,6 +70,13 @@ export type TeamAutoRepo = {
70
70
  sweepFailures?: number;
71
71
  /** Epoch ms of the last auto-pausing sweep failure. */
72
72
  lastSweepErrorAt?: number;
73
+ /** Epoch ms of the last sweep ATTEMPT (success or failure), #266:
74
+ * lastSweepAt/lastSweepSummary stay success-scoped while lastAttemptAt
75
+ * answers "did the scheduler try recently" without the two surfaces
76
+ * contradicting each other when read side by side. */
77
+ lastAttemptAt?: number;
78
+ /** #267-2: bounded per-repo sweep ring (newest last, cap 20). */
79
+ sweeps?: TeamAutoSweepRecord[];
73
80
  dryRunDone: boolean;
74
81
  /** Bind-time provisioning state; ready/undefined means sweepable. */
75
82
  provision?: TeamAutoRepoProvision;
@@ -98,11 +105,16 @@ export type TeamAutoWriteBack = {
98
105
  lastErrorAt?: number;
99
106
  /** Epoch ms when the next retry becomes due (exponential backoff gate). */
100
107
  nextAttemptAt?: number;
108
+ /** #269: set (and persisted) BEFORE dispatch starts so overlapping
109
+ * reconcile passes can see the in-flight intent; cleared on success
110
+ * (doneAt) or failure (error/nextAttemptAt). A crashed process can
111
+ * leave it stale - reconciles older than 10 minutes are reset. */
112
+ inFlightAt?: number;
101
113
  /** Terminal marker: set when retry attempts are exhausted; never retried again. */
102
114
  failedAt?: number | null;
103
115
  };
104
116
 
105
- export type TeamAutoActivityKind = "bind" | "provision" | "sweep" | "task" | "writeback";
117
+ export type TeamAutoActivityKind = "bind" | "provision" | "sweep" | "task" | "writeback" | "claim" | "hygiene";
106
118
 
107
119
  export type TeamAutoActivityEntry = {
108
120
  at: number;
@@ -121,6 +133,29 @@ export function pushTeamAutoActivity(store: TeamAutoStore, entry: TeamAutoActivi
121
133
  }
122
134
  }
123
135
 
136
+ /** #267-2: bounded per-repo sweep ring (newest last, cap 20) - same slice
137
+ * pattern as pushTeamAutoActivity. */
138
+ export function pushSweepRecord(repo: TeamAutoRepo, entry: TeamAutoSweepRecord): void {
139
+ repo.sweeps = repo.sweeps ?? [];
140
+ repo.sweeps.push(entry);
141
+ if (repo.sweeps.length > 20) {
142
+ repo.sweeps = repo.sweeps.slice(repo.sweeps.length - 20);
143
+ }
144
+ }
145
+
146
+ /** #267-2 record type: one bounded per-repo sweep history entry. */
147
+ export type TeamAutoSweepRecord = {
148
+ at: number;
149
+ ok: boolean;
150
+ summary: string;
151
+ /** #267-1 classification when ok=false: auth | ratelimited | network. */
152
+ failClass?: "auth" | "ratelimited" | "network";
153
+ durationMs: number;
154
+ /** #267-3 per-sweep deltas of the client's cumulative etag counters. */
155
+ etagCalls: number;
156
+ etag304Hits: number;
157
+ };
158
+
124
159
  export type TeamAutoStore = {
125
160
  version: number;
126
161
  repos: TeamAutoRepo[];
package/src/ui/app.js CHANGED
@@ -76,6 +76,20 @@
76
76
  "tab.planning": "Planning",
77
77
  "tab.tasks": "Tasks",
78
78
  "tab.workspace": "Workspace",
79
+ "common.showOlder": "Show older ({n})",
80
+ "tab.settings": "Settings",
81
+ "tab.activity": "Activity",
82
+ "activity.events.title": "Controller activity",
83
+ "activity.events.hint": "Live provisioning, sweeps, task routing and team events (ring buffer, last 400).",
84
+ "activity.log.title": "TeamClaw log tail",
85
+ "activity.log.all": "unfiltered",
86
+ "settings.models.title": "Model settings",
87
+ "settings.models.hint": "Default model and per-role overrides.",
88
+ "settings.workers.title": "Worker scaling (hot)",
89
+ "settings.workers.hint": "Applies immediately without restarting the gateway. Lowering a cap never kills busy workers.",
90
+ "settings.workers.max": "Max workers / role",
91
+ "settings.workers.min": "Min warm / role",
92
+ "settings.workers.ttl": "Idle TTL (ms)",
79
93
  "tab.teamauto": "TeamAuto",
80
94
  "tab.clarifications": "Clarifications",
81
95
  "tab.messages": "Messages",
@@ -362,6 +376,20 @@
362
376
  "tab.planning": "规划",
363
377
  "tab.tasks": "任务",
364
378
  "tab.workspace": "工作区",
379
+ "common.showOlder": "显示更早({n})",
380
+ "tab.settings": "设置",
381
+ "tab.activity": "活动",
382
+ "activity.events.title": "控制器活动",
383
+ "activity.events.hint": "实时的 worker 供给、sweep、任务分派与团队事件(环形缓冲,最近 400 条)。",
384
+ "activity.log.title": "TeamClaw 日志尾随",
385
+ "activity.log.all": "不过滤",
386
+ "settings.models.title": "模型设置",
387
+ "settings.models.hint": "默认模型与按角色覆盖。",
388
+ "settings.workers.title": "Worker 弹性伸缩(热)",
389
+ "settings.workers.hint": "立即生效无需重启 gateway。下调上限不会终止忙碌 worker。",
390
+ "settings.workers.max": "每角色最大 worker",
391
+ "settings.workers.min": "每角色保活下限",
392
+ "settings.workers.ttl": "空闲回收 TTL(毫秒)",
365
393
  "tab.teamauto": "TeamAuto",
366
394
  "tab.clarifications": "澄清",
367
395
  "tab.messages": "消息",
@@ -1417,12 +1445,16 @@
1417
1445
  var selectedPlanningRunId = null;
1418
1446
 
1419
1447
  function renderPlanningTab(runs) {
1448
+ lastRenderedData.planning = runs || [];
1420
1449
  var sessionList = $("#planning-session-list");
1421
1450
  if (!sessionList) return;
1422
1451
 
1423
1452
  var planningRuns = (runs || [])
1424
1453
  .filter(function (r) { return r && r.manifest; })
1425
1454
  .sort(function (a, b) { return (b.updatedAt || 0) - (a.updatedAt || 0); });
1455
+ var planningWindow = splitByRecency(planningRuns, function (r) { return r.updatedAt || r.createdAt; }, "planning");
1456
+ planningRuns = planningWindow.shown;
1457
+ var planningOlderHtml = olderToggleHtml(planningWindow.olderCount, "planning");
1426
1458
 
1427
1459
  if (planningRuns.length === 0) {
1428
1460
  sessionList.innerHTML = '<div class="empty-state">' + escapeHtml(t("empty.noPlanningSessions")) + "</div>";
@@ -1452,7 +1484,7 @@
1452
1484
  ' <div class="planning-session-meta">' + escapeHtml(humanizeStatus(status)) + " · " + roles + " roles" + (assessments.length ? " · " + needed + " confirmed" : "") + " · " + escapeHtml(formatTime(run.updatedAt) || "") + "</div>" +
1453
1485
  "</button>"
1454
1486
  );
1455
- }).join("");
1487
+ }).join("") + planningOlderHtml;
1456
1488
 
1457
1489
  // Render selected run
1458
1490
  renderPlanningDetail(planningRuns.find(function (r) { return r.id === selectedPlanningRunId; }));
@@ -3078,7 +3110,38 @@
3078
3110
  return haystack.includes(keyword);
3079
3111
  }
3080
3112
 
3113
+ // ---- 24h recency window + lazy "show older" (#recent-window) ----
3114
+ // Planning / Tasks / Clarifications / Messages only list items from the
3115
+ // last 24h by default; older items appear after an explicit click.
3116
+ const TWENTY_FOUR_H_MS = 24 * 60 * 60 * 1000;
3117
+ const showOlderSections = { tasks: false, planning: false, clarifications: false, messages: false };
3118
+ const lastRenderedData = { tasks: [], planning: [], clarifications: [], messages: [] };
3119
+ function splitByRecency(items, tsOf, section) {
3120
+ const cutoff = Date.now() - TWENTY_FOUR_H_MS;
3121
+ const recent = [];
3122
+ const older = [];
3123
+ for (const item of items || []) {
3124
+ ((tsOf(item) || 0) >= cutoff ? recent : older).push(item);
3125
+ }
3126
+ return showOlderSections[section] ? { shown: recent.concat(older), olderCount: 0 } : { shown: recent, olderCount: older.length };
3127
+ }
3128
+ function olderToggleHtml(count, section) {
3129
+ if (!count) return "";
3130
+ return '<div style="text-align:center;padding:8px"><button type="button" class="btn btn-small" data-show-older="' + section + '">' +
3131
+ escapeHtml(t("common.showOlder", { n: count })) + "</button></div>";
3132
+ }
3133
+ document.addEventListener("click", function (event) {
3134
+ const btn = event.target instanceof Element && event.target.closest("[data-show-older]");
3135
+ if (!btn || btn.tagName !== "BUTTON") return;
3136
+ showOlderSections[btn.getAttribute("data-show-older")] = true;
3137
+ renderTasks(lastRenderedData.tasks);
3138
+ renderPlanningTab(lastRenderedData.planning);
3139
+ renderClarifications(lastRenderedData.clarifications);
3140
+ renderMessages(lastRenderedData.messages);
3141
+ });
3142
+
3081
3143
  function renderTasks(tasks) {
3144
+ lastRenderedData.tasks = tasks || [];
3082
3145
  const container = $("#tasks-board");
3083
3146
  if (!container) return;
3084
3147
 
@@ -3099,10 +3162,13 @@
3099
3162
  }
3100
3163
 
3101
3164
  const sorted = filtered.slice().sort(taskComparator);
3165
+ // #recent-window: 24h recency first, older tasks behind the lazy toggle
3166
+ // (applied before the terminal chunking, so both windows stay fast).
3167
+ const recency = splitByRecency(sorted, function (task) { return task.updatedAt || task.createdAt; }, "tasks");
3102
3168
  // Active tasks render in full; terminal ones chunk so long-lived installs
3103
3169
  // with hundreds of completed tasks stay fast and meaningful.
3104
- const activeTasks = sorted.filter(function (task) { return !TERMINAL_STATUSES[task.status]; });
3105
- const terminalTasks = sorted.filter(function (task) { return TERMINAL_STATUSES[task.status]; });
3170
+ const activeTasks = recency.shown.filter(function (task) { return !TERMINAL_STATUSES[task.status]; });
3171
+ const terminalTasks = recency.shown.filter(function (task) { return TERMINAL_STATUSES[task.status]; });
3106
3172
  const visibleTerminal = terminalTasks.slice(0, terminalTasksVisible);
3107
3173
  const hiddenTerminal = terminalTasks.length - visibleTerminal.length;
3108
3174
  const visibleList = activeTasks.concat(visibleTerminal);
@@ -3154,7 +3220,7 @@
3154
3220
  " </div>" +
3155
3221
  "</div>"
3156
3222
  );
3157
- }).join("") + showMoreHtml;
3223
+ }).join("") + showMoreHtml + olderToggleHtml(recency.olderCount, "tasks");
3158
3224
 
3159
3225
  const showMoreBtn = $("#tasks-show-more");
3160
3226
  if (showMoreBtn) {
@@ -3808,6 +3874,7 @@
3808
3874
  }
3809
3875
 
3810
3876
  function renderClarifications(clarifications) {
3877
+ lastRenderedData.clarifications = clarifications || [];
3811
3878
  const container = $("#clarifications-list");
3812
3879
  if (!container) return;
3813
3880
 
@@ -3816,14 +3883,21 @@
3816
3883
  return;
3817
3884
  }
3818
3885
 
3819
- container.innerHTML = renderClarificationCards(sortClarifications(clarifications), { linkToTask: true });
3886
+ const clWindow = splitByRecency(sortClarifications(clarifications), function (c) { return c.createdAt || c.updatedAt; }, "clarifications");
3887
+ if (clWindow.shown.length === 0) {
3888
+ container.innerHTML = olderToggleHtml(clWindow.olderCount, "clarifications");
3889
+ return;
3890
+ }
3891
+ container.innerHTML = renderClarificationCards(clWindow.shown, { linkToTask: true }) +
3892
+ olderToggleHtml(clWindow.olderCount, "clarifications");
3820
3893
  }
3821
3894
 
3822
3895
  function renderMessages(messages) {
3896
+ lastRenderedData.messages = messages || [];
3823
3897
  const container = $("#messages-feed");
3824
3898
  if (!container) return;
3825
3899
 
3826
- const recent = (messages || [])
3900
+ var recent = (messages || [])
3827
3901
  .concat(controllerConversation || [])
3828
3902
  .sort(function (left, right) {
3829
3903
  return (right.createdAt || 0) - (left.createdAt || 0);
@@ -3834,7 +3908,13 @@
3834
3908
  return;
3835
3909
  }
3836
3910
 
3837
- container.innerHTML = renderMessageCards(recent);
3911
+ const msgWindow = splitByRecency(recent, function (m) { return m.createdAt; }, "messages");
3912
+ if (msgWindow.shown.length === 0) {
3913
+ container.innerHTML = olderToggleHtml(msgWindow.olderCount, "messages");
3914
+ return;
3915
+ }
3916
+ container.innerHTML = renderMessageCards(msgWindow.shown) +
3917
+ olderToggleHtml(msgWindow.olderCount, "messages");
3838
3918
  }
3839
3919
 
3840
3920
  function renderRoles(roles) {
@@ -4058,6 +4138,12 @@
4058
4138
  if (activeTab === "workspace") {
4059
4139
  refreshWorkspaceTree(false);
4060
4140
  }
4141
+ if (activeTab === "settings") {
4142
+ renderWorkerSettingsPanel();
4143
+ }
4144
+ if (activeTab === "activity") {
4145
+ renderActivityTab();
4146
+ }
4061
4147
  if (activeTab === "teamauto") {
4062
4148
  refreshTeamAutoTab();
4063
4149
  }
@@ -5050,10 +5136,13 @@
5050
5136
  opener.setAttribute("data-i18n", "ctl.tab.models");
5051
5137
  opener.textContent = t("ctl.tab.models");
5052
5138
  var refreshBtn = document.querySelector("#workspace-tree-refresh");
5053
- if (refreshBtn && refreshBtn.parentElement) {
5054
- refreshBtn.parentElement.appendChild(opener);
5055
- opener.addEventListener("click", openModelSettings);
5056
- }
5139
+ // Settings tab (#hot-config): the models opener now lives in the Settings
5140
+ // tab slot instead of the workspace header (its old home raised "why is
5141
+ // models inside workspace"). Workspace fallback only if the slot is absent.
5142
+ var settingsSlot = document.querySelector("#settings-models-slot");
5143
+ var mount = settingsSlot || (refreshBtn && refreshBtn.parentElement) || document.body;
5144
+ mount.appendChild(opener);
5145
+ opener.addEventListener("click", openModelSettings);
5057
5146
 
5058
5147
  var modal = document.querySelector("#model-settings-modal");
5059
5148
  if (!modal || modal.dataset.bound === "true") return;
@@ -5173,6 +5262,94 @@ function refreshGithubAuthStatus() {
5173
5262
  });
5174
5263
  }
5175
5264
 
5265
+ // Hot worker-provisioning config (#hot-config): renders into the Settings
5266
+ // tab's static form (#tab-settings). PATCH /team/config applies in-memory to
5267
+ // the running controller (no restart) and persists to the host openclaw.json
5268
+ // where the deployment shape allows it.
5269
+ var workerSettingsBound = false;
5270
+ function renderWorkerSettingsPanel() {
5271
+ var modal = document.getElementById("wk-save");
5272
+ if (!modal) return;
5273
+ apiRequest("/team/config").then(function (cfg) {
5274
+ if (cfg.workerProvisioningMaxPerRole != null) {
5275
+ var mx = document.getElementById("wk-max");
5276
+ if (mx) mx.value = cfg.workerProvisioningMaxPerRole;
5277
+ }
5278
+ if (cfg.workerProvisioningMinPerRole != null) {
5279
+ var mn = document.getElementById("wk-min");
5280
+ if (mn) mn.value = cfg.workerProvisioningMinPerRole;
5281
+ }
5282
+ if (cfg.workerProvisioningIdleTtlMs != null) {
5283
+ var ttl = document.getElementById("wk-ttl");
5284
+ if (ttl) ttl.value = cfg.workerProvisioningIdleTtlMs;
5285
+ }
5286
+ var mode = document.getElementById("wk-mode");
5287
+ if (mode) {
5288
+ mode.textContent = "provisioning: " + (cfg.workerProvisioningType || "process") +
5289
+ (cfg.persistenceMode === "memory-only" ? " | persistence: memory-only (restart reverts)" : " | persistence: host config");
5290
+ }
5291
+ }).catch(function (err) {
5292
+ var mode = document.getElementById("wk-mode");
5293
+ if (mode) mode.textContent = (err && err.message) || "load failed";
5294
+ });
5295
+ if (workerSettingsBound) return;
5296
+ workerSettingsBound = true;
5297
+ document.getElementById("wk-save").addEventListener("click", function () {
5298
+ var payload = {};
5299
+ var mxEl = document.getElementById("wk-max");
5300
+ var mnEl = document.getElementById("wk-min");
5301
+ var ttlEl = document.getElementById("wk-ttl");
5302
+ var mx = Number(mxEl && mxEl.value);
5303
+ var mn = Number(mnEl && mnEl.value);
5304
+ var ttl = Number(ttlEl && ttlEl.value);
5305
+ if (mxEl && mxEl.value !== "" && Number.isFinite(mx)) payload.workerProvisioningMaxPerRole = mx;
5306
+ if (mnEl && mnEl.value !== "" && Number.isFinite(mn)) payload.workerProvisioningMinPerRole = mn;
5307
+ if (ttlEl && ttlEl.value !== "" && Number.isFinite(ttl)) payload.workerProvisioningIdleTtlMs = ttl;
5308
+ if (!Object.keys(payload).length) return;
5309
+ var save = document.getElementById("wk-save");
5310
+ save.disabled = true;
5311
+ apiRequest("/team/config", { method: "PATCH", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload) })
5312
+ .then(function (out) {
5313
+ document.getElementById("wk-result").textContent = out && out.persisted === false ? "Applied (memory only)" : "Applied";
5314
+ })
5315
+ .catch(function (err) {
5316
+ document.getElementById("wk-result").textContent = (err && err.message) || "failed";
5317
+ })
5318
+ .finally(function () { save.disabled = false; });
5319
+ });
5320
+ }
5321
+
5322
+ // Controller Activity tab (#ui-blindness): journal event stream + gateway
5323
+ // log tail. Polls only while the tab is active (no background traffic).
5324
+ var activityTimer = null;
5325
+ function renderActivityTab() {
5326
+ var journalEl = document.getElementById("activity-journal");
5327
+ if (!journalEl) return;
5328
+ function fmtTime(at) {
5329
+ var d = new Date(at);
5330
+ return ("0" + d.getHours()).slice(-2) + ":" + ("0" + d.getMinutes()).slice(-2) + ":" + ("0" + d.getSeconds()).slice(-2);
5331
+ }
5332
+ function load() {
5333
+ apiRequest("/controller/journal?limit=200").then(function (d) {
5334
+ var ev = d.events || [];
5335
+ journalEl.innerHTML = ev.length
5336
+ ? ev.map(function (e) { return escapeHtml(fmtTime(e.at) + " [" + e.type + "] " + e.summary); }).join("\n")
5337
+ : "(no events yet)";
5338
+ }).catch(function (err) { journalEl.textContent = (err && err.message) || "load failed"; });
5339
+ var all = document.getElementById("activity-log-all");
5340
+ apiRequest("/controller/log-tail?lines=200" + (all && all.checked ? "&all=1" : "")).then(function (d) {
5341
+ var logEl = document.getElementById("activity-log");
5342
+ if (logEl) {
5343
+ logEl.textContent = ((d.path || "") + "\n" + (d.lines || []).join("\n")) || "(no log lines matched)";
5344
+ logEl.scrollTop = logEl.scrollHeight;
5345
+ }
5346
+ }).catch(function () { /* transient */ });
5347
+ }
5348
+ if (activityTimer) clearInterval(activityTimer);
5349
+ load();
5350
+ activityTimer = setInterval(load, 5000);
5351
+ }
5352
+
5176
5353
  function openModelSettings() {
5177
5354
  var modal = document.querySelector("#model-settings-modal");
5178
5355
  if (!modal) return;
package/src/ui/index.html CHANGED
@@ -78,6 +78,8 @@
78
78
  <span id="tasks-tab-signal" class="tab-signal"></span>
79
79
  </button>
80
80
  <button class="tab" data-tab="workspace"><span class="tab-label" data-i18n="tab.workspace">Workspace</span></button>
81
+ <button class="tab" data-tab="settings"><span class="tab-label" data-i18n="tab.settings">Settings</span></button>
82
+ <button class="tab" data-tab="activity"><span class="tab-label" data-i18n="tab.activity">Activity</span></button>
81
83
  <button class="tab" data-tab="clarifications">
82
84
  <span class="tab-label" data-i18n="tab.clarifications">Clarifications</span>
83
85
  <span id="clarifications-tab-count" class="tab-badge">0</span>
@@ -150,6 +152,42 @@
150
152
  </div>
151
153
 
152
154
  <!-- Workspace Tab -->
155
+ <div id="tab-activity" class="tab-panel">
156
+ <div class="panel-note" style="padding:12px 14px">
157
+ <h3 data-i18n="activity.events.title" style="margin:0 0 6px">Controller activity</h3>
158
+ <p data-i18n="activity.events.hint" style="margin:0 0 8px;color:#666">Live provisioning, sweeps, task routing and team events (ring buffer, last 400).</p>
159
+ <div id="activity-journal" style="font:12px/1.6 ui-monospace,monospace;max-height:320px;overflow:auto;background:#f6f6f6;padding:8px;border-radius:6px;white-space:pre-wrap"></div>
160
+ </div>
161
+ <div class="panel-note" style="padding:12px 14px;margin-top:10px">
162
+ <h3 data-i18n="activity.log.title" style="margin:0 0 6px">TeamClaw log tail</h3>
163
+ <p style="margin:0 0 8px">
164
+ <label style="font-size:12px;color:#666"><input id="activity-log-all" type="checkbox" /> <span data-i18n="activity.log.all">unfiltered</span></label>
165
+ </p>
166
+ <div id="activity-log" style="font:12px/1.6 ui-monospace,monospace;max-height:420px;overflow:auto;background:#111;color:#9f9;padding:10px;border-radius:6px;white-space:pre-wrap"></div>
167
+ </div>
168
+ </div>
169
+ <div id="tab-settings" class="tab-panel">
170
+ <div class="panel-note" style="padding:12px 14px">
171
+ <h3 data-i18n="settings.models.title" style="margin:0 0 6px">Model settings</h3>
172
+ <p data-i18n="settings.models.hint" style="margin:0 0 8px;color:#666">Default model and per-role overrides.</p>
173
+ <div id="settings-models-slot"></div>
174
+ </div>
175
+ <div class="panel-note" style="padding:12px 14px;margin-top:10px">
176
+ <h3 data-i18n="settings.workers.title" style="margin:0 0 6px">Worker scaling (hot)</h3>
177
+ <p data-i18n="settings.workers.hint" style="margin:0 0 8px;color:#666">Applies immediately without restarting the gateway. Lowering a cap never kills busy workers.</p>
178
+ <div style="display:flex;gap:10px;flex-wrap:wrap;align-items:end">
179
+ <label style="display:flex;flex-direction:column;gap:4px;font-size:12px"><span data-i18n="settings.workers.max">Max workers / role</span>
180
+ <input id="wk-max" type="number" min="1" max="50" style="width:90px" /></label>
181
+ <label style="display:flex;flex-direction:column;gap:4px;font-size:12px"><span data-i18n="settings.workers.min">Min warm / role</span>
182
+ <input id="wk-min" type="number" min="0" max="50" style="width:90px" /></label>
183
+ <label style="display:flex;flex-direction:column;gap:4px;font-size:12px"><span data-i18n="settings.workers.ttl">Idle TTL (ms)</span>
184
+ <input id="wk-ttl" type="number" min="1000" max="86400000" step="1000" style="width:120px" /></label>
185
+ <button id="wk-save" type="button" class="btn btn-small">Apply</button>
186
+ <span id="wk-result" style="margin-left:8px;color:#080"></span>
187
+ </div>
188
+ <p id="wk-mode" style="margin:8px 0 0;color:#666;font-size:12px"></p>
189
+ </div>
190
+ </div>
153
191
  <div id="tab-workspace" class="tab-panel">
154
192
  <div class="workspace-browser">
155
193
  <aside class="workspace-sidebar-panel">