Skip to content

[AIDE-95] Agent Updates - #77

Merged
chandlerhuff merged 5 commits into
mainfrom
feature/AIDE-95-agent-updates
Jul 31, 2026
Merged

[AIDE-95] Agent Updates#77
chandlerhuff merged 5 commits into
mainfrom
feature/AIDE-95-agent-updates

Conversation

@chandlerhuff

Copy link
Copy Markdown
Member

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-agent probes 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, and downloadJsonFiles from the workflow pages into browser-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

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
@chandlerhuff chandlerhuff self-assigned this Jul 30, 2026
…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.
@chandlerhuff
chandlerhuff merged commit 2b46a92 into main Jul 31, 2026
3 checks passed
@chandlerhuff
chandlerhuff deleted the feature/AIDE-95-agent-updates branch July 31, 2026 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant