[AIDE-95] Agent Updates - #77
Merged
Merged
Conversation
Extract executable lookup logic from claude-adapter into a shared findExecutable utility. Use it in the ccusage handler so that Homebrew/npm/bun installs are found even when launchd starts the agent with a minimal PATH.
- Add bulk import, single/bulk export, and delete of command and workflow definitions with card-based multi-select UI - Add renameAgent GraphQL resolver and service method with validation - Extract downloadJson, downloadJsonFiles, exportFileStem to browser-utils - Fix devices page to not hardcode "iOS" prefix in OS version display - Update translations and GraphQL schemas for new operations
…ase handling - Skip tearing down the agent session when no alternate endpoint responds — lost sessions would cancel running jobs for nothing. - Report per-file import errors instead of aborting the whole batch on the first failure in commands and workflows pages. - Trim leading/trailing dashes from export file stems so a name like "!!!" produces "export.json" instead of "-.json". - Surface a clear "Agent not found" error in renameAgent instead of leaking a raw Prisma exception. - Disable quick-action button on imported commands whose target widened, and bound oversized JSON string payloads before parsing.
…flows from card clicks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds import/export/delete for command and workflow definitions, inline agent renaming, and control-plane endpoint failover for the agent runtime. Also extracts shared utilities for executable lookup and browser file downloads.
Changes
Command import/export/delete — New GraphQL resolvers and service methods let users export a command definition as a portable JSON file (targets serialized by name, not internal ID), import one back (resolving names to local records), and delete definitions that have no run history (those with history must be archived). Bulk selection UI with edit mode, select-all checkbox, export, and confirmation-based delete.
Workflow import/export/delete — Same pattern applied to workflow definitions: multi-file import, bulk export with sequenced downloads, and delete with confirmation dialog. Single-file imports redirect to the editor; multi-file imports stay on the list.
Agent rename — Inline editing on the agent detail page: pencil icon swaps the heading for an input field with save/cancel. Backend validates names are 1–200 characters, trims whitespace, and rejects blank names without touching the database.
Control-plane endpoint failover — Agents can now configure a local and remote address.
control-agentprobes each endpoint at startup, picking the first one that answers for this agent. If three heartbeats in a row fail, the session tears down and re-selects a different endpoint. New CLI commands (endpoints,enrollment,unenroll) manage addresses and inspect enrollment state.Executable lookup utility — Extracted
findExecutable()from the claude-adapter into a shared utility that searches PATH, Homebrew, npm, and bun install directories. The ccusage handler and claude adapter both use it, with environment-variable overrides for custom paths.Browser utils refactor — Extracted
downloadJson,exportFileStem, anddownloadJsonFilesfrom the workflow pages intobrowser-utils.ts, shared by both the command and workflow export UIs. Multi-file downloads are spaced 150ms apart so browsers do not drop them.Minor fixes — Fixed iOS version display on the devices page (removed hardcoded "iOS" prefix when osVersion is absent).
Ticket: AIDE-95