@clagentic/console 1.9.0-beta.1 → 1.9.0-beta.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 (61) hide show
  1. package/bin/cli.js +23 -1
  2. package/lib/agents.js +13 -3
  3. package/lib/build-sha.json +2 -2
  4. package/lib/cli/ipc-subcommands.js +84 -4
  5. package/lib/daemon.js +111 -7
  6. package/lib/effective-protocol.js +82 -0
  7. package/lib/project-connection.js +21 -8
  8. package/lib/project-filesystem.js +4 -4
  9. package/lib/project-http.js +4 -4
  10. package/lib/project-loop.js +49 -5
  11. package/lib/project-sessions.js +166 -68
  12. package/lib/project-user-mention.js +7 -7
  13. package/lib/project-user-message.js +81 -14
  14. package/lib/project.js +28 -22
  15. package/lib/public/app.js +18 -4
  16. package/lib/public/css/base.css +14 -0
  17. package/lib/public/css/filebrowser.css +6 -0
  18. package/lib/public/css/home-hub.css +28 -8
  19. package/lib/public/css/icon-strip.css +17 -0
  20. package/lib/public/css/messages.css +11 -0
  21. package/lib/public/css/mobile-nav.css +22 -0
  22. package/lib/public/css/server-settings.css +9 -0
  23. package/lib/public/css/sidebar.css +15 -0
  24. package/lib/public/css/title-bar.css +10 -1
  25. package/lib/public/index.html +9 -2
  26. package/lib/public/modules/activity-latch.js +45 -0
  27. package/lib/public/modules/activity-state.js +195 -0
  28. package/lib/public/modules/app-connection.js +31 -6
  29. package/lib/public/modules/app-favicon.js +75 -1
  30. package/lib/public/modules/app-home-hub.js +14 -11
  31. package/lib/public/modules/app-loop-ui.js +86 -2
  32. package/lib/public/modules/app-messages.js +178 -54
  33. package/lib/public/modules/app-panels.js +91 -32
  34. package/lib/public/modules/app-projects.js +46 -9
  35. package/lib/public/modules/app-rate-limit.js +13 -1
  36. package/lib/public/modules/server-settings.js +256 -21
  37. package/lib/public/modules/sidebar-mobile.js +32 -22
  38. package/lib/public/modules/sidebar-projects.js +42 -14
  39. package/lib/public/modules/sidebar-sessions.js +168 -48
  40. package/lib/public/modules/theme.js +2 -2
  41. package/lib/public/modules/tools.js +11 -39
  42. package/lib/sdk-bridge.js +375 -33
  43. package/lib/sdk-message-processor.js +98 -15
  44. package/lib/sdk-skill-discovery.js +46 -6
  45. package/lib/sdk-slash-enrichment.js +5 -2
  46. package/lib/server-dm.js +5 -5
  47. package/lib/server-hub-sessions.js +70 -0
  48. package/lib/server.js +78 -43
  49. package/lib/session-activity.js +9 -2
  50. package/lib/sessions.js +64 -18
  51. package/lib/smtp.js +10 -1
  52. package/lib/terminal-manager.js +6 -6
  53. package/lib/ws-schema.js +16 -0
  54. package/lib/yoke/adapters/claude.js +7 -1
  55. package/lib/yoke/adapters/codex.js +219 -31
  56. package/package.json +2 -2
  57. package/scripts/check-test-count.js +397 -0
  58. package/scripts/test-file-completion-reporter.js +43 -0
  59. package/scripts/verify-installed-build.js +242 -15
  60. package/lib/model-context-windows.js +0 -74
  61. package/lib/public/modules/model-context-windows.js +0 -71
@@ -25,13 +25,13 @@ var planContent = null;
25
25
  var currentPlanCardEl = null;
26
26
 
27
27
  // --- Backgrounded subagent (Task tool) liveness tracking ---
28
- // lr-255e: the parent turn's SDK stream ends with a normal 'result' message
29
- // as soon as a Task tool call is dispatched -- the Task itself keeps running
30
- // as a background child. app-messages.js's 'result' handler unconditionally
31
- // called setActivity(null), which killed the "thinking dots" indicator even
32
- // though a subagent was still actively working. Tracking live subagents here
33
- // (keyed by parentToolId, the same id used for the stop-button dedup guard)
34
- // lets callers ask hasActiveSubagents() before clearing the indicator.
28
+ // lr-255e originally added this (keyed by parentToolId, the same id used for
29
+ // the stop-button dedup guard below) so callers could avoid clearing the
30
+ // "thinking dots" indicator out from under a still-running subagent. lr-66c118
31
+ // removed the last such caller (hasActiveSubagents() had no consumers left
32
+ // once setActivity collapsed to a single optimistic raise site) but the
33
+ // tracking dict itself is still load-bearing for the Stop button UI
34
+ // (initSubagentStop/updateSubagentTaskStatus/markSubagentDone below).
35
35
  var activeSubagentToolIds = {};
36
36
 
37
37
  // --- Todo state ---
@@ -355,7 +355,6 @@ export function renderAskUserQuestion(toolId, input) {
355
355
 
356
356
  ctx.addToMessages(container);
357
357
  disableMainInput();
358
- ctx.setActivity(null);
359
358
  maybeScrollToBottom();
360
359
  }
361
360
 
@@ -591,7 +590,6 @@ function renderFormalPermission(requestId, toolName, toolInput, decisionReason)
591
590
 
592
591
  pendingPermissions[requestId] = container;
593
592
  refreshIcons(container);
594
- ctx.setActivity(null);
595
593
  maybeScrollToBottom();
596
594
  }
597
595
 
@@ -698,7 +696,6 @@ function renderPlanPermission(requestId) {
698
696
 
699
697
  pendingPermissions[requestId] = container;
700
698
  refreshIcons(container);
701
- ctx.setActivity(null);
702
699
  maybeScrollToBottom();
703
700
  // Focus the feedback input after render
704
701
  setTimeout(function () { feedbackInput.focus(); }, 50);
@@ -853,7 +850,6 @@ function renderConversationalPermission(requestId, toolName, toolInput, mateId,
853
850
  ctx.addToMessages(container);
854
851
  pendingPermissions[requestId] = container;
855
852
  refreshIcons(container);
856
- ctx.setActivity(null);
857
853
  maybeScrollToBottom();
858
854
  }
859
855
 
@@ -1080,7 +1076,6 @@ export function renderElicitationRequest(msg) {
1080
1076
 
1081
1077
  pendingElicitations[msg.requestId] = container;
1082
1078
  refreshIcons(container);
1083
- ctx.setActivity(null);
1084
1079
  maybeScrollToBottom();
1085
1080
  }
1086
1081
 
@@ -1508,7 +1503,6 @@ export function startThinking() {
1508
1503
  currentThinking = { el: el, fullText: "", startTime: Date.now() };
1509
1504
  refreshIcons(el);
1510
1505
  maybeScrollToBottom();
1511
- ctx.setActivity("thinking");
1512
1506
  return;
1513
1507
  }
1514
1508
 
@@ -1533,7 +1527,6 @@ export function startThinking() {
1533
1527
  maybeScrollToBottom();
1534
1528
  thinkingGroup = { el: el, count: 0, totalDuration: 0 };
1535
1529
  currentThinking = { el: el, fullText: "", startTime: Date.now() };
1536
- ctx.setActivity("thinking");
1537
1530
  }
1538
1531
 
1539
1532
  export function appendThinking(text) {
@@ -1650,7 +1643,6 @@ export function createToolItem(id, name) {
1650
1643
  maybeScrollToBottom();
1651
1644
 
1652
1645
  tools[id] = { el: el, name: name, input: null, done: false, groupId: currentToolGroup.id };
1653
- ctx.setActivity("Running " + name + "...");
1654
1646
  }
1655
1647
 
1656
1648
  export function updateToolExecuting(id, name, input) {
@@ -1680,8 +1672,6 @@ export function updateToolExecuting(id, name, input) {
1680
1672
  })(name, input);
1681
1673
  }
1682
1674
 
1683
- ctx.setActivity(toolActivityText(name, input));
1684
-
1685
1675
  var subtitleText = tool.el.querySelector(".tool-subtitle-text");
1686
1676
  if (subtitleText) subtitleText.textContent = toolActivityText(name, input);
1687
1677
 
@@ -2019,19 +2009,6 @@ export function markAllToolsDone() {
2019
2009
 
2020
2010
  // --- Sub-agent (Task tool) log ---
2021
2011
 
2022
- // lr-255e: whether any backgrounded Task subagent is still running for the
2023
- // current session. Callers (e.g. app-messages.js's 'result' handler) use
2024
- // this to decide whether it's safe to clear the "thinking dots" indicator —
2025
- // the parent turn's own stream can end while a dispatched subagent keeps
2026
- // working, and the indicator must stay up until the LAST live subagent
2027
- // actually finishes.
2028
- export function hasActiveSubagents() {
2029
- for (var id in activeSubagentToolIds) {
2030
- if (activeSubagentToolIds.hasOwnProperty(id)) return true;
2031
- }
2032
- return false;
2033
- }
2034
-
2035
2012
  export function updateSubagentActivity(parentToolId, text) {
2036
2013
  var tool = tools[parentToolId];
2037
2014
  if (!tool || !tool.el) return;
@@ -2048,7 +2025,6 @@ export function updateSubagentActivity(parentToolId, text) {
2048
2025
  tool.el.appendChild(log);
2049
2026
  }
2050
2027
 
2051
- ctx.setActivity(text);
2052
2028
  maybeScrollToBottom();
2053
2029
  }
2054
2030
 
@@ -2082,7 +2058,6 @@ export function addSubagentToolEntry(parentToolId, toolName, toolId, text) {
2082
2058
  // Auto-scroll to latest entry
2083
2059
  log.scrollTop = log.scrollHeight;
2084
2060
 
2085
- ctx.setActivity(text);
2086
2061
  maybeScrollToBottom();
2087
2062
  }
2088
2063
 
@@ -2176,13 +2151,10 @@ export function updateSubagentTaskStatus(parentToolId, patch) {
2176
2151
 
2177
2152
  export function markSubagentDone(parentToolId, status, summary, usage) {
2178
2153
  delete activeSubagentToolIds[parentToolId];
2179
- // lr-255e: the parent turn's 'result' already fired (and, per hasActiveSubagents(),
2180
- // may have skipped clearing the indicator because this subagent was still live).
2181
- // Once the last live subagent finishes, clear the indicator here too so it
2182
- // doesn't linger until some unrelated later message happens to null it out.
2183
- if (!hasActiveSubagents()) {
2184
- ctx.setActivity(null);
2185
- }
2154
+ // lr-66c118: the lr-255e hasActiveSubagents()-gated setActivity clear
2155
+ // call is removed — setActivity collapses to ONE optimistic raise
2156
+ // (input.js). activeSubagentToolIds tracking itself is unchanged and
2157
+ // still governs the real per-tool subagent UI below.
2186
2158
 
2187
2159
  var tool = tools[parentToolId];
2188
2160
  if (!tool || !tool.el) return;