A2a worker

From oimiragieo/agent-studio · View interactive version

A2a worker is an AI agent skill from the GitHub repository oimiragieo/agent-studio. Builds A2A protocol integration - auto-start hook, client library, router wiring

How to use this skill

Skill file

A2A Worker

NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.

When to Use This Skill

Features involving:

Work Procedure

  1. Read CTO Directive #3 from AGENTS.md: A2A server MUST be spawned as fully detached background subprocess. NEVER synchronous.
  1. Study the existing pattern in .claude/hooks/channels/channel-auto-start.cjs:
  1. Write tests first (red) for the component you're building:
  1. Implement following existing A2A code patterns:
  1. For auto-start hook (a2a-server-autostart.cjs):
  1. For client library (client.cjs):
  1. For router integration:
  1. Run tests:

```

node --test tests/lib/a2a/*.test.cjs

```

  1. Verify coexistence with Telegram:
  1. Commit with descriptive message.

Example Handoff

{
  "salientSummary": "Created a2a-server-autostart.cjs hook following channel-auto-start.cjs pattern. Spawns Express server on port 3100 as detached background process via .bat file. Uses independent lockfile and PID tracking. Created A2A client at .claude/lib/a2a/client.cjs with discover/send/get/cancel/subscribe methods. Both Telegram and A2A auto-start work independently.",
  "whatWasImplemented": "Auto-start hook with env check, lockfile, PID tracking, detached spawn. Client library with full JSON-RPC 2.0 support and SSE streaming. Both registered in settings.json.",
  "whatWasLeftUndone": "",
  "verification": {
    "commandsRun": [
      {
        "command": "node --test tests/lib/a2a/a2a-server.test.cjs",
        "exitCode": 0,
        "observation": "All server tests pass"
      },
      {
        "command": "node --test tests/lib/a2a/a2a-client.test.cjs",
        "exitCode": 0,
        "observation": "All client tests pass"
      },
      { "command": "pnpm test:framework", "exitCode": 0, "observation": "No regressions" }
    ],
    "interactiveChecks": []
  },
  "tests": {
    "added": [
      {
        "file": "tests/lib/a2a/a2a-client.test.cjs",
        "cases": [
          { "name": "discovers remote agent card", "verifies": "client discovery" },
          { "name": "sends task via JSON-RPC", "verifies": "task creation" },
          { "name": "polls task status", "verifies": "status retrieval" }
        ]
      }
    ],
    "coverage": "A2A server, client, and autostart hook covered"
  },
  "discoveredIssues": []
}

When to Return to Orchestrator

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.