From fb97d4cb72d0a90dde102b7001603716ee6e4c3b Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Fri, 22 May 2026 00:19:14 +0900 Subject: feat: agent summoning system, todo improvements, security fixes, double-execution bug fix - Add summon/retrieve tools for spawning child agents in new tabs - summon: non-blocking, returns agent_id immediately - retrieve: blocking, waits for child to finish, returns result - Child tools are intersected with parent permissions (no privilege escalation) - Working directory validated to stay within workspace - Abort controller stops orphaned agents on tab close - Rename task_list tool to todo with comprehensive usage guidance in system prompt - Rename PermissionLog.svelte to ToolPermissions.svelte - Add 'Summon agents' toggle to tool permissions UI - Redesign TaskListPanel with DaisyUI checkboxes (indeterminate for in-progress) - Remove 'blocked' status from task system - Add tab-created WebSocket event for child agent tab visibility - Add HMR cleanup for WebSocket connections (close stale connections on hot reload) - Fix ensureAssistantMessage to not throw on closed tabs - Fix double tool execution: remove execute from AI SDK tool() in registry.ts (agent.ts already executes tools manually via executeToolWithStreaming) - Fix all pre-existing test failures (missing mocks, stale API signatures) - Add debug info to copy button (tab ID, injected skills, all tab IDs) - Add tab ID and tools to conversation copy output --- .../src/lib/components/PermissionLog.svelte | 105 ------------------ .../src/lib/components/SidebarPanel.svelte | 120 +++++++++++---------- .../src/lib/components/TaskListPanel.svelte | 103 ++++++++++-------- .../src/lib/components/ToolPermissions.svelte | 118 ++++++++++++++++++++ 4 files changed, 241 insertions(+), 205 deletions(-) delete mode 100644 packages/frontend/src/lib/components/PermissionLog.svelte create mode 100644 packages/frontend/src/lib/components/ToolPermissions.svelte (limited to 'packages/frontend/src/lib/components') diff --git a/packages/frontend/src/lib/components/PermissionLog.svelte b/packages/frontend/src/lib/components/PermissionLog.svelte deleted file mode 100644 index 7733dcf..0000000 --- a/packages/frontend/src/lib/components/PermissionLog.svelte +++ /dev/null @@ -1,105 +0,0 @@ - - -
-
Tool Permissions
-

Changes are applied when you send your next message.

- -
- {#each toolPermissions as perm (perm.id)} - - {/each} -
- - - -

Warning: changing tool access will reset the AI's prompt cache for active conversations, which may increase usage costs.

- - - {#if entries.length > 0} -
- -
- Log ({entries.length}) -
-
- {#each entries as entry (entry.id)} -
- - {entry.action} - - {entry.permission} - {entry.timestamp} -
-

{entry.description}

- {/each} -
-
- {/if} -
diff --git a/packages/frontend/src/lib/components/SidebarPanel.svelte b/packages/frontend/src/lib/components/SidebarPanel.svelte index 93d528e..a0aeb1d 100644 --- a/packages/frontend/src/lib/components/SidebarPanel.svelte +++ b/packages/frontend/src/lib/components/SidebarPanel.svelte @@ -1,64 +1,76 @@
@@ -115,7 +127,7 @@ {:else if panel.selected === "Skills"} {:else if panel.selected === "Tools"} - + {:else if panel.selected === "System Prompt"} {:else if panel.selected === "Settings"} diff --git a/packages/frontend/src/lib/components/TaskListPanel.svelte b/packages/frontend/src/lib/components/TaskListPanel.svelte index 5f2ffe2..d70373f 100644 --- a/packages/frontend/src/lib/components/TaskListPanel.svelte +++ b/packages/frontend/src/lib/components/TaskListPanel.svelte @@ -1,41 +1,45 @@
@@ -43,28 +47,35 @@

No tasks yet.

{:else}

- {tasks.length} task{tasks.length !== 1 ? "s" : ""} - ({doneCount} done, {inProgressCount} in progress) + {doneCount}/{tasks.length} done{#if inProgressCount > 0}, {inProgressCount} in progress{/if}

-
    +
      {#each tasks as task (task.id)} -
    • -
      - - {statusIcon(task.status)} - +
    • + +
      {task.title} + {#if task.description} +

      {task.description}

      + {/if}
      - {#if task.description} -

      {task.description}

      - {/if} -

      {task.id}

    • {/each}
    diff --git a/packages/frontend/src/lib/components/ToolPermissions.svelte b/packages/frontend/src/lib/components/ToolPermissions.svelte new file mode 100644 index 0000000..c6af47f --- /dev/null +++ b/packages/frontend/src/lib/components/ToolPermissions.svelte @@ -0,0 +1,118 @@ + + +
    +
    Tool Permissions
    +

    Changes are applied when you send your next message.

    + +
    + {#each toolPermissions as perm (perm.id)} + + {/each} +
    + + + +

    Warning: changing tool access will reset the AI's prompt cache for active conversations, which may increase usage costs.

    + + + {#if entries.length > 0} +
    + +
    + Log ({entries.length}) +
    +
    + {#each entries as entry (entry.id)} +
    + + {entry.action} + + {entry.permission} + {entry.timestamp} +
    +

    {entry.description}

    + {/each} +
    +
    + {/if} +
    -- cgit v1.2.3