feat: add Autohand Code as a supported CLI provider#1237
feat: add Autohand Code as a supported CLI provider#1237arnestrickmann merged 9 commits intogeneralaction:mainfrom
Conversation
Add the Autohand Code logo as an SVG asset using currentColor fill for automatic light/dark theme adaptation.
Add Autohand Code (autohand-cli) as a new provider with: - CLI binary: autohand - Initial prompt via -p flag - Auto-approve via --unrestricted flag - Version detection via --version - Documentation at https://autohand.ai/docs/
Add Autohand Code icon import, agent asset definition, agent config entry, and terminal provider registration across all renderer modules. The SVG icon is imported as raw content for inline rendering.
Add description and metadata for the Autohand Code provider card shown when hovering over the agent selector in the UI.
Add AUTOHAND_API_KEY to the environment variable passthrough list so the Autohand Code CLI can authenticate when spawned via direct PTY mode (which skips shell profile loading).
Include autohand --unrestricted in the exhaustive auto-approve flag map so the test continues to verify every provider that declares an autoApproveFlag in the registry.
Insert Autohand Code alphabetically after Auggie in the provider table and bump the provider count from twenty-one to twenty-two.
Add Autohand Code to the provider install table and include it in the auto-approve feature support list. Bump provider count to 22.
Point the documentation link to the product page at /code/ instead of the generic /docs/ path.
|
Someone is attempting to deploy a commit to the General Action Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR registers Autohand Code ( Key changes:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| src/shared/providers/registry.ts | Adds autohand to PROVIDER_IDS and a complete ProviderDefinition entry with all expected fields: cli, commands, versionArgs, autoApproveFlag, initialPromptFlag, docUrl, installCommand, icon, and terminalOnly. Definition is well-formed and consistent with other provider entries. |
| src/main/services/ptyManager.ts | Adds AUTOHAND_API_KEY to the PTY environment passthrough list, but it is inserted out of alphabetical order — AUTOHAND_API_KEY appears before AUGMENT_SESSION_AUTH when it should follow it. |
| src/renderer/providers/assets.ts | Imports the raw SVG and registers the autohand asset entry correctly with isSvg: true. The name field ('Autohand') follows the existing convention of using the brand/org name rather than the full product name (e.g., 'Anthropic' for Claude, 'Sourcegraph' for Amp). |
| src/renderer/providers/meta.ts | Imports the autohand SVG icon and registers it in the ICONS map keyed by 'autohand.svg', matching the icon field in the registry. The agentMeta record derives autohand automatically from PROVIDERS, so no manual entry is needed. |
| src/renderer/lib/agentConfig.ts | Adds autohand to the agentConfig record with isSvg: true and the correct raw SVG import. Entry is placed within the "initial prompt support" group, which is correct since autohand has initialPromptFlag: '-p'. |
| src/renderer/components/AgentInfoCard.tsx | Adds the autohand entry to agentInfo with an accurate title and description; no issues found. |
| src/renderer/constants/agents.ts | Appends 'autohand' to TERMINAL_PROVIDER_IDS, correctly extending the TerminalProviderId union type. |
| src/test/main/ptyManager.test.ts | Exhaustive auto-approve test is correctly updated to include autohand: '--unrestricted', maintaining complete coverage of all providers with auto-approve flags. |
| src/assets/images/autohand.svg | New SVG icon using fill="currentColor" throughout all paths, enabling automatic theme adaptation. 16×16 viewBox is consistent with other SVG icons in the project. |
| README.md | Provider count updated from 21 to 22; Autohand Code inserted alphabetically (after Auggie, before Charm) in the supported providers table. |
| docs/content/docs/providers.mdx | Provider count updated to 22; Autohand Code added to the provider table and to the auto-approve feature description. |
Sequence Diagram
sequenceDiagram
participant UI as Renderer UI
participant Registry as providers/registry.ts
participant Meta as providers/meta.ts
participant PTY as ptyManager.ts
participant CLI as autohand CLI
UI->>Registry: getProvider('autohand')
Registry-->>UI: { cli: 'autohand', initialPromptFlag: '-p', autoApproveFlag: '--unrestricted' }
UI->>Meta: agentMeta['autohand']
Meta-->>UI: { label: 'Autohand Code', icon: autohand.svg, ... }
UI->>PTY: startDirectPty({ providerId: 'autohand', ... })
PTY->>PTY: resolveProviderCommandConfig('autohand')
PTY->>PTY: buildProviderCliArgs({ initialPromptFlag: '-p', autoApproveFlag: '--unrestricted' })
PTY->>PTY: inject AUTOHAND_API_KEY from env
PTY->>CLI: spawn('autohand', ['-p', prompt, '--unrestricted'])
CLI-->>PTY: PTY stream
PTY-->>UI: output data
Last reviewed commit: bae951d
| 'AUTOHAND_API_KEY', | ||
| 'AUGMENT_SESSION_AUTH', |
There was a problem hiding this comment.
AUTOHAND_API_KEY breaks alphabetical ordering
The AGENT_ENV_VARS array is sorted alphabetically throughout, but AUTOHAND_API_KEY is inserted before AUGMENT_SESSION_AUTH. Alphabetically, AUG (G = 7th letter) precedes AUT (T = 20th letter), so AUGMENT_SESSION_AUTH should come first.
| 'AUTOHAND_API_KEY', | |
| 'AUGMENT_SESSION_AUTH', | |
| 'AUGMENT_SESSION_AUTH', | |
| 'AUTOHAND_API_KEY', |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Hey @igorcosta, |
Summary
autohand-cli) as the 22nd supported CLI providercurrentColorfill for automatic light/dark theme adaptationAUTOHAND_API_KEYthrough the PTY environment for direct-spawn authenticationautohand: '--unrestricted'Provider Configuration
autohandnpm install -g autohand-cli-pflag--unrestricted--versionTest plan
pnpm run type-checkpassespnpm run lintpasses (0 errors)pnpm run format— no changes neededpnpm exec vitest run— 33/33 suites, 329/329 tests passptyManager.test.tsauto-approve flag exhaustive check includesautohandautohand-cli, open Emdash, verify Autohand Code appears in agent selector-pprompt--unrestrictedflag is passed