neohive 6.2.1 → 6.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.3.0] - 2026-04-05
4
+
5
+ ### Added
6
+
7
+ - **Unified `next_action` response chain** — every MCP tool response now includes a single `next_action` field that tells the AI agent exactly what to do next, replacing 10+ scattered hint fields (`_listen`, `_nudge`, `hint`, `action_required`, `unread_action`, `you_have_messages`, `urgent`, `mode_hint`, `_protocol`, etc.)
8
+ - **Tool-specific directives** — each tool sets a context-aware `next_action` (e.g. `update_task(done)` → "Send a summary via send_message(), then call listen()"; `lock_file` → "Edit the file, then call unlock_file() when done")
9
+ - **Coordinator-aware middleware** — post-processing middleware detects responsive coordinators and replaces any `listen()` directive with `consume_messages()` or removes it entirely, preventing coordinators from blocking in listen mode
10
+ - **Persistent listen loop** — `listen()` and `listen_group()` no longer return `retry: true` on timeout; they loop internally with fresh watchers and heartbeats, so agents cannot break out of listen mode
11
+ - **Managed mode next_action** — `buildListenGroupResponse` respects `should_respond` and floor state; agents without the floor get "do NOT respond" instead of "reply via send_message()"
12
+ - **Autonomous get_work() directives** — all 10 return types from `get_work()` carry specific `next_action` values guiding agents through the workflow/verify/advance cycle
13
+ - **Documentation** — `docs/reference/next-action-chain.md` with flow diagrams for standard agents, agent-to-agent communication, responsive/autonomous coordinators, managed mode, and persistent listen
14
+
15
+ ### Changed
16
+
17
+ - **Post-processing middleware rewrite** — removed the scattered nudge/unread/listen injection block (~80 lines) and replaced with a unified `next_action` block using priority logic: tool-specific > coordinator override > call-count warning > urgent messages > pending messages > default
18
+ - **`buildMessageResponse`** — `_protocol` field inside message objects replaced with top-level `next_action`; `coordinator_mode` field removed from listen responses
19
+ - **`buildListenGroupResponse`** — simplified `next_action` with mode-aware branching (autonomous/managed/standard)
20
+ - **`send_message` / `broadcast`** — removed `you_have_messages`, `urgent`, `mode_hint` fields; added `next_action: "Call listen() to receive replies."`
21
+ - **`verify_and_advance`** — replaced verbose `message` strings with concise `next_action` directives
22
+
23
+ ### Fixed
24
+
25
+ - **Responsive coordinator contradiction** — `send_message`, `broadcast`, and `create_task` no longer unconditionally tell responsive coordinators to call `listen()`; middleware overrides any `listen()` directive for responsive coordinators
26
+ - **Managed mode contradiction** — `buildListenGroupResponse` no longer sets "Reply via send_message()" when `should_respond: false` and `instructions: "DO NOT RESPOND"` are also present
27
+ - **Autonomous listen_group retry** — removed contradictory `retry: true` from autonomous mode timeout path where `next_action` directs to `get_work()` instead
28
+
3
29
  ## [6.1.0] - 2026-04-04
4
30
 
5
31
  ### Added
package/dashboard.html CHANGED
@@ -3257,8 +3257,30 @@
3257
3257
  align-items: center;
3258
3258
  gap: 10px;
3259
3259
  padding: 14px 16px 10px;
3260
+ position: relative;
3260
3261
  }
3261
3262
 
3263
+ .pp-delete-x {
3264
+ position: absolute;
3265
+ top: 8px;
3266
+ right: 8px;
3267
+ width: 22px;
3268
+ height: 22px;
3269
+ border: none;
3270
+ background: transparent;
3271
+ color: var(--red, #ef4444);
3272
+ font-size: 16px;
3273
+ line-height: 1;
3274
+ cursor: pointer;
3275
+ border-radius: 4px;
3276
+ display: flex;
3277
+ align-items: center;
3278
+ justify-content: center;
3279
+ opacity: 0.5;
3280
+ transition: opacity 0.15s, background 0.15s;
3281
+ }
3282
+ .pp-delete-x:hover { opacity: 1; background: var(--red-dim, rgba(239,68,68,0.15)); }
3283
+
3262
3284
  .profile-popup-avatar {
3263
3285
  width: 36px;
3264
3286
  height: 36px;
@@ -4555,6 +4577,7 @@
4555
4577
  </div>
4556
4578
  <div class="profile-popup-id" id="pp-id"></div>
4557
4579
  </div>
4580
+ <button class="pp-delete-x" id="pp-delete-x" onclick="confirmDeleteAgentX()" title="Remove agent">&times;</button>
4558
4581
  </div>
4559
4582
  <!-- Tabs (hidden but kept for JS compat) -->
4560
4583
  <div class="pp-tabs" style="display:none">
@@ -7832,8 +7855,7 @@ function showAgentPopup(agentName) {
7832
7855
 
7833
7856
  document.addEventListener('click', function() {
7834
7857
  document.getElementById('profile-popup').classList.remove('open');
7835
- var delBtn = document.getElementById('pp-delete-btn');
7836
- if (delBtn) { delBtn.textContent = 'Delete Agent'; delBtn._confirming = false; }
7858
+ _resetDeleteBtns();
7837
7859
  });
7838
7860
 
7839
7861
  var _deleteConfirmTimer = null;
@@ -7841,50 +7863,71 @@ function confirmDeleteAgent() {
7841
7863
  var btn = document.getElementById('pp-delete-btn');
7842
7864
  if (!editingAgent) return;
7843
7865
  if (!btn._confirming) {
7844
- // First click: change to confirm state
7845
7866
  btn._confirming = true;
7846
7867
  btn.textContent = 'Confirm Delete';
7847
7868
  btn.style.background = 'var(--red-dim)';
7848
- // Reset after 3s if not confirmed
7849
7869
  _deleteConfirmTimer = setTimeout(function() {
7850
7870
  btn.textContent = 'Delete Agent';
7851
7871
  btn.style.background = '';
7852
7872
  btn._confirming = false;
7853
7873
  }, 3000);
7854
7874
  } else {
7855
- // Second click: actually delete
7856
7875
  if (_deleteConfirmTimer) clearTimeout(_deleteConfirmTimer);
7857
- btn.textContent = 'Deleting...';
7858
- btn.disabled = true;
7859
- var agentName = editingAgent;
7860
- var pq = projectParam();
7861
- lttFetch('/api/agents' + pq, {
7862
- method: 'DELETE',
7863
- headers: { 'Content-Type': 'application/json' },
7864
- body: JSON.stringify({ name: agentName })
7865
- }).then(function(r) { return r.json(); }).then(function(data) {
7866
- if (data.error) {
7867
- showToast('!', 'Delete failed: ' + data.error);
7868
- btn.textContent = 'Delete Agent';
7869
- btn.disabled = false;
7870
- btn._confirming = false;
7871
- } else {
7872
- showToast('&#x2713;', agentName + ' removed');
7873
- document.getElementById('profile-popup').classList.remove('open');
7874
- btn.textContent = 'Delete Agent';
7875
- btn.disabled = false;
7876
- btn._confirming = false;
7877
- poll(); // Refresh agents
7878
- }
7879
- }).catch(function() {
7880
- showToast('!', 'Delete failed');
7881
- btn.textContent = 'Delete Agent';
7882
- btn.disabled = false;
7876
+ _doDeleteAgent(editingAgent, btn);
7877
+ }
7878
+ }
7879
+
7880
+ function confirmDeleteAgentX() {
7881
+ var btn = document.getElementById('pp-delete-x');
7882
+ if (!editingAgent) return;
7883
+ if (!btn._confirming) {
7884
+ btn._confirming = true;
7885
+ btn.innerHTML = '&#x2713;';
7886
+ btn.title = 'Click again to confirm';
7887
+ btn.style.opacity = '1';
7888
+ btn.style.background = 'var(--red-dim, rgba(239,68,68,0.15))';
7889
+ _deleteConfirmTimer = setTimeout(function() {
7890
+ btn.innerHTML = '&times;';
7891
+ btn.title = 'Remove agent';
7892
+ btn.style.opacity = '';
7893
+ btn.style.background = '';
7883
7894
  btn._confirming = false;
7884
- });
7895
+ }, 3000);
7896
+ } else {
7897
+ if (_deleteConfirmTimer) clearTimeout(_deleteConfirmTimer);
7898
+ _doDeleteAgent(editingAgent, btn);
7885
7899
  }
7886
7900
  }
7887
7901
 
7902
+ function _doDeleteAgent(agentName, btn) {
7903
+ btn.disabled = true;
7904
+ var pq = projectParam();
7905
+ lttFetch('/api/agents' + pq, {
7906
+ method: 'DELETE',
7907
+ headers: { 'Content-Type': 'application/json' },
7908
+ body: JSON.stringify({ name: agentName })
7909
+ }).then(function(r) { return r.json(); }).then(function(data) {
7910
+ if (data.error) {
7911
+ showToast('!', 'Delete failed: ' + data.error);
7912
+ } else {
7913
+ showToast('&#x2713;', agentName + ' removed');
7914
+ document.getElementById('profile-popup').classList.remove('open');
7915
+ poll();
7916
+ }
7917
+ _resetDeleteBtns();
7918
+ }).catch(function() {
7919
+ showToast('!', 'Delete failed');
7920
+ _resetDeleteBtns();
7921
+ });
7922
+ }
7923
+
7924
+ function _resetDeleteBtns() {
7925
+ var xBtn = document.getElementById('pp-delete-x');
7926
+ if (xBtn) { xBtn.innerHTML = '&times;'; xBtn.title = 'Remove agent'; xBtn.style.opacity = ''; xBtn.style.background = ''; xBtn._confirming = false; xBtn.disabled = false; }
7927
+ var delBtn = document.getElementById('pp-delete-btn');
7928
+ if (delBtn) { delBtn.textContent = 'Delete Agent'; delBtn.style.background = ''; delBtn._confirming = false; delBtn.disabled = false; }
7929
+ }
7930
+
7888
7931
  // ==================== v3.0: PROFILE EDITOR ====================
7889
7932
 
7890
7933
  var BUILT_IN_AVATARS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neohive",
3
- "version": "6.2.1",
3
+ "version": "6.3.0",
4
4
  "description": "The MCP collaboration layer for AI CLI tools. Turn Claude Code, Gemini CLI, and Codex CLI into a team.",
5
5
  "main": "server.js",
6
6
  "bin": {