@lucashca/claudecontrol 0.3.26 → 0.3.28

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.
@@ -261,8 +261,8 @@ export async function sendToAgent(id: string, message: string, attachments?: Att
261
261
  const subagents = (isOrchestrator && runtime.enableSubagents) ? buildSubagents(cwd, session.role) : {};
262
262
  const hasAttachments = attachments && attachments.length > 0;
263
263
 
264
- // Inject pool context as message prefix (ensures model always sees curl instructions)
265
- const poolMsgContext = !skipPoolContext && !runtime.enableSubagents
264
+ // Inject pool context as message prefix only for orchestrators
265
+ const poolMsgContext = !skipPoolContext && !runtime.enableSubagents && isOrchestrator
266
266
  ? buildPoolContext(session.workspaceId, session.id)
267
267
  : '';
268
268
  const messageWithContext = poolMsgContext
@@ -118,8 +118,10 @@ export function pushLog(session: AgentSession, entry: LogEntry) {
118
118
  persistLogEntry(session.workspaceId, session.id, entry);
119
119
  }
120
120
 
121
- export function removeLogEntry(session: AgentSession, predicate: (e: LogEntry) => boolean) {
122
- session.log = session.log.filter(e => !predicate(e));
121
+ export function hideLogEntry(session: AgentSession, predicate: (e: LogEntry) => boolean) {
122
+ for (const entry of session.log) {
123
+ if (predicate(entry)) entry.hidden = true;
124
+ }
123
125
  const logPath = agentLogPath(session.workspaceId, session.id);
124
126
  try { writeFileSync(logPath, session.log.map(e => JSON.stringify(e)).join('\n') + (session.log.length ? '\n' : '')); } catch { /* ignore */ }
125
127
  }
@@ -5,7 +5,7 @@ import { broadcast } from '../ws.js';
5
5
  import { getWorkspaceById } from '../workspaces.js';
6
6
  import {
7
7
  genId, agents, agentAbortControllers, agentConversations,
8
- persistAgents, persistLogEntry, addAgentToIndex, pushLog, removeLogEntry,
8
+ persistAgents, persistLogEntry, addAgentToIndex, pushLog, hideLogEntry,
9
9
  delegations, agentQueues,
10
10
  } from '../agents/store.js';
11
11
  import { sendToAgent, runAgentQuery, delegateTask, compactAgentContext } from '../agents/lifecycle.js';
@@ -81,14 +81,14 @@ export async function handleAgentRoutes(
81
81
  return true;
82
82
  }
83
83
 
84
- // ── DELETE /api/agents/:id/log?delegationId=xxx (remove log entry) ──
85
- const deleteLogParams = matchRoute(path, '/api/agents/:id/log');
86
- if (deleteLogParams && method === 'DELETE') {
87
- const agent = agents.get(deleteLogParams.id);
84
+ // ── PATCH /api/agents/:id/log?delegationId=xxx (hide log entry) ──
85
+ const hideLogParams = matchRoute(path, '/api/agents/:id/log');
86
+ if (hideLogParams && method === 'PATCH') {
87
+ const agent = agents.get(hideLogParams.id);
88
88
  if (!agent) { jsonError(res, 'Agent not found', 404); return true; }
89
89
  const delegationId = _urlObj.searchParams.get('delegationId');
90
90
  if (!delegationId) { jsonError(res, 'delegationId is required'); return true; }
91
- removeLogEntry(agent, e => e.delegationId === delegationId);
91
+ hideLogEntry(agent, e => e.delegationId === delegationId);
92
92
  broadcast({ type: 'agent_log_updated', agentId: agent.id, workspaceId: agent.workspaceId, log: agent.log });
93
93
  json(res, { ok: true });
94
94
  return true;
package/backend/types.ts CHANGED
@@ -10,6 +10,7 @@ export interface AttachmentData {
10
10
 
11
11
  export interface LogEntry {
12
12
  type: 'agent' | 'user' | 'tool' | 'system' | 'delegation' | 'spawn_request';
13
+ hidden?: boolean;
13
14
  text: string;
14
15
  timestamp: string;
15
16
  tool?: string;
@@ -86,7 +86,7 @@ export const api = {
86
86
  post(`/workspaces/${wsId}/agents`, data),
87
87
 
88
88
  deleteAgent: (id: string) => del(`/agents/${id}`),
89
- removeLogEntry: (agentId: string, delegationId: string) => del(`/agents/${agentId}/log?delegationId=${encodeURIComponent(delegationId)}`),
89
+ hideLogEntry: (agentId: string, delegationId: string) => patch(`/agents/${agentId}/log?delegationId=${encodeURIComponent(delegationId)}`, {}),
90
90
 
91
91
  sendMessage: (agentId: string, message: string, attachments?: import('./types').Attachment[], effort?: string, model?: string) =>
92
92
  post(`/agents/${agentId}/send`, { message, attachments, effort, model }),
@@ -65,7 +65,7 @@ export function DelegationStatusBar({ agentId }: { agentId: string }) {
65
65
  if (!agent) return null;
66
66
 
67
67
  const allDelegations = agent.log.filter(
68
- e => e.type === 'delegation' && e.delegationTo && e.delegationStatus,
68
+ e => e.type === 'delegation' && e.delegationTo && e.delegationStatus && !e.hidden,
69
69
  );
70
70
 
71
71
  const delegations = allDelegations.filter(e => !dismissed[e.delegationId!]);
@@ -104,7 +104,7 @@ export function DelegationStatusBar({ agentId }: { agentId: string }) {
104
104
  <button
105
105
  onClick={() => {
106
106
  setDismissed(prev => { const next = { ...prev, [delegation.delegationId!]: true }; saveDismissed(next); return next; });
107
- api.removeLogEntry(agentId, delegation.delegationId!).catch(() => {});
107
+ api.hideLogEntry(agentId, delegation.delegationId!).catch(() => {});
108
108
  }}
109
109
  className="px-2 py-1.5 text-cc-muted hover:text-cc-text-secondary transition-colors shrink-0"
110
110
  >
@@ -31,6 +31,7 @@ export interface Attachment {
31
31
 
32
32
  export interface LogEntry {
33
33
  type: 'agent' | 'user' | 'tool' | 'system' | 'delegation' | 'spawn_request';
34
+ hidden?: boolean;
34
35
  text: string;
35
36
  timestamp: string;
36
37
  tool?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucashca/claudecontrol",
3
- "version": "0.3.26",
3
+ "version": "0.3.28",
4
4
  "description": "AI Agent Dashboard — manage multiple Claude Code agents across projects",
5
5
  "type": "module",
6
6
  "bin": {
package/version.json CHANGED
@@ -1 +1 @@
1
- {"version":"0.3.26","build":"2026-04-03T23:17:53.310Z"}
1
+ {"version":"0.3.28","build":"2026-04-03T23:25:03.559Z"}