{"id":45888283,"url":"https://github.com/mumez/pharo-acp","last_synced_at":"2026-02-27T16:58:21.051Z","repository":{"id":338625182,"uuid":"1157960073","full_name":"mumez/pharo-acp","owner":"mumez","description":"ACP (Agent Client Protocol) client library for Pharo Smalltalk.","archived":false,"fork":false,"pushed_at":"2026-02-24T15:23:32.000Z","size":143,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2026-02-24T20:06:05.830Z","etag":null,"topics":["acp","pharo-smalltalk"],"latest_commit_sha":null,"homepage":"","language":"Smalltalk","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mumez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-14T15:21:25.000Z","updated_at":"2026-02-24T15:28:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mumez/pharo-acp","commit_stats":null,"previous_names":["mumez/pharo-acp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mumez/pharo-acp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mumez%2Fpharo-acp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mumez%2Fpharo-acp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mumez%2Fpharo-acp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mumez%2Fpharo-acp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mumez","download_url":"https://codeload.github.com/mumez/pharo-acp/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mumez%2Fpharo-acp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29905542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T14:46:13.553Z","status":"ssl_error","status_checked_at":"2026-02-27T14:46:10.522Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acp","pharo-smalltalk"],"created_at":"2026-02-27T16:58:20.399Z","updated_at":"2026-02-27T16:58:21.046Z","avatar_url":"https://github.com/mumez.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pharo-acp\n\nACP (Agent Client Protocol) client library for Pharo Smalltalk.\n\nEnables Pharo to communicate with ACP-compatible coding agents ([Gemini CLI](https://github.com/google-gemini/gemini-cli), [OpenCode](https://opencode.ai/), etc.) over JSON-RPC 2.0 via stdio.\n\nReferences the [ACP TypeScript SDK](https://github.com/agentclientprotocol/typescript-sdk).\n\n## Requirements\n\n- Pharo 12+ (For Windows, use WSL since OSSubprocess does not support Windows)\n\n## Installation\n\n```smalltalk\nMetacello new\n    baseline: 'ACP';\n    repository: 'github://mumez/pharo-acp:main/src';\n    load.\n```\n\nTo include tests:\n\n```smalltalk\nMetacello new\n    baseline: 'ACP';\n    repository: 'github://mumez/pharo-acp:main/src';\n    load: 'Tests'.\n```\n\n## Quick Start\n\nYou need an ACP-compatible agent installed. Currently tested with:\n\n- [Gemini CLI](https://github.com/google-gemini/gemini-cli) — `gemini --experimental-acp`\n- [claude-code-acp](https://github.com/zed-industries/claude-agent-acp) — `claude-code-acp`\n- [OpenCode](https://github.com/anomalyco/opencode) — `opencode acp`\n\n\n```smalltalk\nclient := ACPClient new.\n\n\"Use Gemini CLI:\"\nclient agentCommand: '/usr/bin/env' arguments: #('gemini' '--experimental-acp').\n\"Or claude-code-acp:\"\n\"client agentCommand: '/usr/bin/env' arguments: #('claude-code-acp').\"\n\nclient connect.\n\n[\n    \"Initialize\"\n    client initializeBy: [ :params | \"uses default protocolVersion and capabilities\" ].\n\n    \"Create session\"\n    session := client newSessionBy: [ :params |\n        params cwd: FileSystem workingDirectory fullName ].\n\n    \"Send prompt (blocks until agent responds)\"\n    result := client promptBy: [ :params |\n        params sessionId: session sessionId.\n        params textPrompt: 'Hello!' ].\n\n    Transcript show: 'Stop reason: ', result stopReason; cr.\n] ensure: [ client disconnect ].\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eExample Transcript output (Gemini CLI)\u003c/summary\u003e\n\n```\nSession update [agent_thought_chunk]: ACPSessionUpdate(a Dictionary('sessionId'-\u003e'42f04b38-b27d-4adf-b1e5-f46f1d69216e' 'update'-\u003ea Dictionary('content'-\u003ea Dictionary('text'-\u003e'**Awaiting Initial Input**\n\nI''ve processed the initial setup details: directory structure and environment specs, which point to a Pharo Smalltalk environment. Currently, I''m simply standing by, waiting for the user''s first directive or request before moving forward.\n\n\n' 'type'-\u003e'text' ) 'sessionUpdate'-\u003e'agent_thought_chunk' ) ))\nSession update [agent_message_chunk]: ACPSessionUpdate(a Dictionary('sessionId'-\u003e'42f04b38-b27d-4adf-b1e5-f46f1d69216e' 'update'-\u003ea Dictionary('content'-\u003ea Dictionary('text'-\u003e'Hello! How can I help you today?' 'type'-\u003e'text' ) 'sessionUpdate'-\u003e'agent_message_chunk' ) ))\nStop reason: end_turn\n\n```\n\n\u003c/details\u003e\n\n## Example: Chat UI\n\n[pharo-acp-chat-ui](https://github.com/mumez/pharo-acp-chat-ui) is a minimal chat interface built on top of this library.\n\n```smalltalk\n\"Launch with Gemini CLI:\"\nACPChatPresenter gemini open.\n\n\"Or with Claude Code:\"\nACPChatPresenter claude open.\n```\n\n## Custmizing update handler\n\nBy default, `ACPClient` uses `ACPTranscriptHandler` which logs session updates to the Transcript and auto-approves permission requests. Provide a custom handler by subclassing `ACPClientHandler`:\n\n```smalltalk\nclient := ACPClient new.\nclient handler: MyCustomHandler new.\n```\n\n## Smoke Test\n\nRun the smoke test against the TypeScript SDK example agent.\n\n### Prerequisites\n\n- Node.js and npm installed\n- Clone the [TypeScript SDK](https://github.com/agentclientprotocol/typescript-sdk):\n  ```bash\n  git clone https://github.com/agentclientprotocol/typescript-sdk.git\n  cd typescript-sdk\n  npm install\n  ```\n- Verify the example agent works:\n  ```bash\n  npx tsx src/examples/agent.ts\n  ```\n  Paste `{\"jsonrpc\":\"2.0\",\"id\":0,\"method\":\"initialize\",\"params\":{\"protocolVersion\":1}}` and press Enter — you should get a response.\n\n### Run from Pharo\n\n```smalltalk\n\"Set the path to the TypeScript example agent (once per image)\"\nACPSmokeTest agentPath: '/path/to/typescript-sdk/src/examples/agent.ts'.\n\n\"Run the test\"\nACPSmokeTest suite run.\n```\n\n## Architecture\n\nFive-layer stack, each layer depending only on layers below:\n\n```\nACPClient                    — User-facing facade (connect/prompt/cancel)\nACPClientConnection          — ACP protocol methods + handler registration\nACPConnection                — Bidirectional JSON-RPC engine (readLoop + pending requests)\nACPNdJsonTransport           — ndjson line framing + mutex-protected writes\nACPProcessLauncher           — OSSUnixSubprocess wrapper (non-blocking pipes)\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmumez%2Fpharo-acp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmumez%2Fpharo-acp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmumez%2Fpharo-acp/lists"}