feat: add AdaL agent support (skills + MCP)

RI
3mo ago
+118-1

TL;DR

Adds AdaL to the agent registries used by firecrawl setup / firecrawl doctor / firecrawl init, so firecrawl setup mcp --agent adal and native skills install work the same way they already do for Hermes/OpenClaw/Cursor/etc.

Why AdaL needs a dedicated installer (not add-mcp)

AdaL stores MCP servers per-project inside a single global ~/.adal/settings.json, under projects.<absolute_project_path>.mcpServers — it doesn't have an add-mcp-compatible CLI or a global per-agent config file. This mirrors why Hermes (installHermesMcp) and OpenClaw (installOpenClawMcp) already have their own installer functions instead of going through installAddMcp.

Changes

  • src/utils/agents.ts — new adal AgentSpec for firecrawl doctor detection. Presence = ~/.adal; MCP config = ~/.adal/settings.json. The existing recursive JSON walker (hasFirecrawlMcpEntry) already finds a nested mcpServers.firecrawl entry at any depth, so no walker changes were needed.
  • src/commands/skills-native.ts — new adal AgentConfig for native skill installs. Global skills dir = ~/.adal/skills (matches AdaL's SkillsManager personal-skills path in its own source).
  • src/commands/setup.ts — new installAdalMcp(), modeled directly on installHermesMcp(). Reads/creates ~/.adal/settings.json, resolves the current project via process.cwd(), and injects projects[cwd].mcpServers.firecrawl = { type: 'http', url, headers }. Wired into resolveMcpAgent (--agent adal), the installMcp dispatch, and installAllMcpLaunchers (--agent all).

Testing

Ran a full E2E validation against a real AdaL checkout (not just unit tests):

  1. MCP registration: firecrawl setup mcp --agent adal correctly wrote projects.<cwd>.mcpServers.firecrawl into ~/.adal/settings.json.
  2. Live MCP discovery + tool call: Started AdaL against that project — its MCP client manager discovered and registered 3 live tools (mcp_firecrawl_firecrawl_scrape/search/parse) against Firecrawl's hosted MCP server (https://mcp.firecrawl.dev/v2/mcp, keyless). AdaL then successfully invoked mcp_firecrawl_firecrawl_scrape against https://example.com and got back real markdown + metadata (scrapeId, creditsUsed: 1, etc.) from Firecrawl's live API.
  3. Skills install: installSkillsNative({ agent: 'adal' }) correctly symlinked all 10 firecrawl/cli skills into ~/.adal/skills/. AdaL's own SkillsManager (in its deep_research backend) then discovered and indexed all 10 as personal skills, ready to inject into the agent prompt.
  4. Regression check: npx vitest run — all 391 existing tests pass, no changes to existing agent behavior.

Notes

  • --keyless is honored automatically for adal the same way it is for other keyless-capable agents (no code path changes there — getApiKey() naturally returns undefined without a stored/env key).
  • No new README claims are made in this PR; happy to add AdaL to the "Works with Claude Code, Antigravity, OpenCode, and more" line in a follow-up once this lands, since that's now backed by a real, tested install path per the docs guidance for this kind of change.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Adds AdaL agent support to the CLI for MCP setup, detection, and native skills. Use firecrawl setup mcp --agent adal to register Firecrawl with AdaL.

  • New Features

    • adal support: detection via ~/.adal and MCP config at ~/.adal/settings.json; installAdalMcp() writes projects[<cwd>].mcpServers.firecrawl and is wired to --agent adal/--agent all; native skills install to ~/.adal/skills.
  • Bug Fixes

    • installAdalMcp() now respects --keyless (no Authorization header) and validates settings.json shape with a clear error when not an object.