ace-llm-providers-cli 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. checksums.yaml +7 -0
  2. data/.ace-defaults/llm/providers/claude.yml +24 -0
  3. data/.ace-defaults/llm/providers/codex.yml +22 -0
  4. data/.ace-defaults/llm/providers/codexoss.yml +13 -0
  5. data/.ace-defaults/llm/providers/gemini.yml +32 -0
  6. data/.ace-defaults/llm/providers/opencode.yml +26 -0
  7. data/.ace-defaults/llm/providers/pi.yml +43 -0
  8. data/CHANGELOG.md +457 -0
  9. data/LICENSE +21 -0
  10. data/README.md +36 -0
  11. data/Rakefile +14 -0
  12. data/exe/ace-llm-providers-cli-check +76 -0
  13. data/lib/ace/llm/providers/cli/atoms/args_normalizer.rb +82 -0
  14. data/lib/ace/llm/providers/cli/atoms/auth_checker.rb +74 -0
  15. data/lib/ace/llm/providers/cli/atoms/command_formatters.rb +19 -0
  16. data/lib/ace/llm/providers/cli/atoms/command_rewriter.rb +75 -0
  17. data/lib/ace/llm/providers/cli/atoms/execution_context.rb +28 -0
  18. data/lib/ace/llm/providers/cli/atoms/provider_detector.rb +48 -0
  19. data/lib/ace/llm/providers/cli/atoms/session_finders/claude_session_finder.rb +79 -0
  20. data/lib/ace/llm/providers/cli/atoms/session_finders/codex_session_finder.rb +84 -0
  21. data/lib/ace/llm/providers/cli/atoms/session_finders/gemini_session_finder.rb +66 -0
  22. data/lib/ace/llm/providers/cli/atoms/session_finders/open_code_session_finder.rb +119 -0
  23. data/lib/ace/llm/providers/cli/atoms/session_finders/pi_session_finder.rb +87 -0
  24. data/lib/ace/llm/providers/cli/atoms/skill_command_rewriter.rb +30 -0
  25. data/lib/ace/llm/providers/cli/atoms/worktree_dir_resolver.rb +56 -0
  26. data/lib/ace/llm/providers/cli/claude_code_client.rb +358 -0
  27. data/lib/ace/llm/providers/cli/claude_oai_client.rb +322 -0
  28. data/lib/ace/llm/providers/cli/cli_args_support.rb +19 -0
  29. data/lib/ace/llm/providers/cli/codex_client.rb +291 -0
  30. data/lib/ace/llm/providers/cli/codex_oai_client.rb +274 -0
  31. data/lib/ace/llm/providers/cli/gemini_client.rb +346 -0
  32. data/lib/ace/llm/providers/cli/molecules/health_checker.rb +80 -0
  33. data/lib/ace/llm/providers/cli/molecules/safe_capture.rb +153 -0
  34. data/lib/ace/llm/providers/cli/molecules/session_finder.rb +44 -0
  35. data/lib/ace/llm/providers/cli/molecules/skill_name_reader.rb +64 -0
  36. data/lib/ace/llm/providers/cli/open_code_client.rb +271 -0
  37. data/lib/ace/llm/providers/cli/pi_client.rb +331 -0
  38. data/lib/ace/llm/providers/cli/version.rb +11 -0
  39. data/lib/ace/llm/providers/cli.rb +47 -0
  40. metadata +139 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5065e45a6f893a5a089d59ea40e1ccbbbe009bd0863b60ed0410f924073a8024
4
+ data.tar.gz: 90e8f0276496a9812407682c11f91da03f8abaa424d20ec6dad4864817a03590
5
+ SHA512:
6
+ metadata.gz: 500f6b58d1bf63596f0e9c279f7fb0523ba942e30b3160f2ec9201f4aac4cebf6ac1a0db35a1677a3cae089fa0569b0c5f8796ccff4872247e15b4150e75ffac
7
+ data.tar.gz: 14d49ef076e20414f53d896c51c8b9e046a478da069e5978c85168bd24275c9970462f21547ef69faa10822560e950be5f62a1f21bdc64bd55c61540791c9897
@@ -0,0 +1,24 @@
1
+ name: claude
2
+ class: Ace::LLM::Providers::CLI::ClaudeCodeClient
3
+ gem: ace-llm-providers-cli
4
+ models:
5
+ - claude-opus-4-1
6
+ - claude-sonnet-4-0
7
+ - claude-3-5-haiku-latest
8
+ aliases:
9
+ global:
10
+ cc: claude:sonnet
11
+ cc-opus: claude:opus
12
+ cc-sonnet: claude:sonnet
13
+ cc-haiku: claude:haiku
14
+ model:
15
+ opus: claude-opus-4-1
16
+ sonnet: claude-sonnet-4-0
17
+ haiku: claude-3-5-haiku-latest
18
+ capabilities:
19
+ - text_generation
20
+ - streaming
21
+ - function_calling
22
+ - vision
23
+ default_options:
24
+ temperature: 0.7
@@ -0,0 +1,22 @@
1
+ name: codex
2
+ class: Ace::LLM::Providers::CLI::CodexClient
3
+ gem: ace-llm-providers-cli
4
+ models:
5
+ - gpt-5
6
+ - gpt-5-mini
7
+ aliases:
8
+ global:
9
+ codex-gpt5: codex:gpt-5
10
+ codex-mini: codex:gpt-5-mini
11
+ model:
12
+ 5: gpt-5
13
+ mini: gpt-5-mini
14
+ m: gpt-5-mini
15
+ capabilities:
16
+ - text_generation
17
+ - code_generation
18
+ - function_calling
19
+ - skill_rewriting
20
+ default_options:
21
+ temperature: 0.7
22
+ skills_dir: .codex/skills
@@ -0,0 +1,13 @@
1
+ name: codexoss
2
+ class: Ace::LLM::Providers::CLI::CodexOSSClient
3
+ gem: ace-llm-providers-cli
4
+ models:
5
+ - default
6
+ aliases:
7
+ global:
8
+ codex-oss: codexoss:default
9
+ capabilities:
10
+ - text_generation
11
+ - code_generation
12
+ default_options:
13
+ temperature: 0.7
@@ -0,0 +1,32 @@
1
+ name: gemini
2
+ class: Ace::LLM::Providers::CLI::GeminiClient
3
+ gem: ace-llm-providers-cli
4
+ models_dev_id: google
5
+ models:
6
+ - gemini-2.5-flash
7
+ - gemini-2.5-pro
8
+ - gemini-2.0-flash
9
+ - gemini-1.5-pro-latest
10
+ aliases:
11
+ global:
12
+ gemini-flash: gemini:gemini-2.5-flash
13
+ gemini-pro: gemini:gemini-2.5-pro
14
+ gflash: gemini:gemini-2.5-flash
15
+ gpro: gemini:gemini-2.5-pro
16
+ model:
17
+ 2.5-flash: gemini-2.5-flash
18
+ 2.5-pro: gemini-2.5-pro
19
+ 2.0-flash: gemini-2.0-flash
20
+ 1.5-pro: gemini-1.5-pro-latest
21
+ flash: gemini-2.5-flash
22
+ pro: gemini-2.5-pro
23
+ capabilities:
24
+ - text_generation
25
+ - code_generation
26
+ - vision
27
+ default_options:
28
+ temperature: 0.7
29
+ # Maximum prompt length before switching to file-based prompts (characters)
30
+ # Gemini's actual token limit is ~1M, but this provides a safeguard for CLI usage
31
+ max_prompt_length: 100000
32
+ system_prompt: "Output only the direct answer to stdout. No conversational filler, no acknowledgments, no explanations. Do not attempt to use tools. Be concise and direct."
@@ -0,0 +1,26 @@
1
+ name: opencode
2
+ class: Ace::LLM::Providers::CLI::OpenCodeClient
3
+ gem: ace-llm-providers-cli
4
+ models:
5
+ - google/gemini-2.5-flash
6
+ - google/gemini-2.0-flash-experimental
7
+ - google/gemini-1.5-pro
8
+ - anthropic/claude-3-5-sonnet
9
+ - anthropic/claude-3-5-haiku
10
+ - openai/gpt-4o
11
+ - openai/gpt-4o-mini
12
+ aliases:
13
+ global:
14
+ oc: opencode:google/gemini-2.5-flash
15
+ model:
16
+ gemini: google/gemini-2.5-flash
17
+ claude: anthropic/claude-3-5-sonnet
18
+ gpt4: openai/gpt-4o
19
+ capabilities:
20
+ - text_generation
21
+ - streaming
22
+ - function_calling
23
+ - vision
24
+ - multi_provider
25
+ default_options:
26
+ temperature: 0.7
@@ -0,0 +1,43 @@
1
+ name: pi
2
+ class: Ace::LLM::Providers::CLI::PiClient
3
+ gem: ace-llm-providers-cli
4
+ models:
5
+ # ZAI (default provider)
6
+ - zai/glm-4.7
7
+ # Anthropic
8
+ - anthropic/claude-opus-4-6
9
+ - anthropic/claude-opus-4-5
10
+ - anthropic/claude-sonnet-4-5
11
+ - anthropic/claude-sonnet-4-0
12
+ - anthropic/claude-haiku-4-5
13
+ # Google Gemini
14
+ - google-gemini-cli/gemini-3-pro-preview
15
+ - google-gemini-cli/gemini-3-flash-preview
16
+ - google-gemini-cli/gemini-2.5-pro
17
+ - google-gemini-cli/gemini-2.5-flash
18
+ # OpenAI Codex
19
+ - openai-codex/gpt-5.3-codex
20
+ - openai-codex/gpt-5.2-codex
21
+ - openai-codex/gpt-5.2
22
+ - openai-codex/gpt-5.1
23
+ aliases:
24
+ global:
25
+ pi: pi:zai/glm-4.7
26
+ model:
27
+ glm: zai/glm-4.7
28
+ opus: anthropic/claude-opus-4-6
29
+ sonnet: anthropic/claude-sonnet-4-5
30
+ haiku: anthropic/claude-haiku-4-5
31
+ gemini-pro: google-gemini-cli/gemini-2.5-pro
32
+ gemini: google-gemini-cli/gemini-2.5-flash
33
+ gpt: openai-codex/gpt-5.2
34
+ capabilities:
35
+ - text_generation
36
+ - streaming
37
+ - function_calling
38
+ - vision
39
+ - multi_provider
40
+ - skill_rewriting
41
+ default_options:
42
+ temperature: 0.7
43
+ skills_dir: .pi/skills
data/CHANGELOG.md ADDED
@@ -0,0 +1,457 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.27.0] - 2026-03-23
11
+
12
+ ### Changed
13
+ - Updated gemspec description to include Gemini CLI, OpenCode, and pi-agent alongside Claude Code and Codex.
14
+ - Removed scaffolding boilerplate comment from gemspec.
15
+
16
+ ## [0.26.2] - 2026-03-23
17
+
18
+ ### Changed
19
+ - Refreshed README to the current package layout pattern with concise sections for how it works, use cases, features, quick start, and ACE linkage.
20
+
21
+ ## [0.26.1] - 2026-03-22
22
+
23
+ ### Changed
24
+ - Refreshed README structure with a dedicated purpose section, ACE-native test/lint command guidance, updated contributing workflow notes, and the canonical ACE footer link.
25
+
26
+ ## [0.26.0] - 2026-03-21
27
+
28
+ ### Changed
29
+ - Added initial `TS-LLMCLI-001` value-gated smoke E2E coverage for `ace-llm-providers-cli-check`, including deterministic no-tools and stubbed-tools command-path validation.
30
+
31
+ ### Technical
32
+ - Added E2E runner/verifier artifacts and decision-record evidence for ADD/SKIP test-case gating.
33
+
34
+ ## [0.25.7] - 2026-03-18
35
+
36
+ ### Technical
37
+ - Added Claude command coverage for explicit tool allowlists so provider presets can distinguish tool-assisted read-only mode from strict no-tools prompt-only mode.
38
+
39
+ ## [0.25.6] - 2026-03-18
40
+
41
+ ### Fixed
42
+ - Preserve explicit empty CLI argument values in array-based `cli_args` normalization so flags like Claude `--tools ""` are forwarded correctly instead of losing their required value.
43
+
44
+ ### Technical
45
+ - Added regression coverage for empty-value CLI arg normalization and Claude command construction.
46
+
47
+ ## [0.25.5] - 2026-03-18
48
+
49
+ ### Fixed
50
+ - Fixed Claude response extraction when the provider payload returned nested JSON content instead of a top-level string, preventing valid outputs from being dropped as empty.
51
+
52
+ ### Technical
53
+ - Added nested payload parsing coverage for `parse_claude_response` to ensure future response-shape changes continue saving valid LLM output.
54
+
55
+ ## [0.25.4] - 2026-03-17
56
+
57
+ ### Fixed
58
+ - Raised `ProviderError` with structured payload details when Claude CLI exits successfully but returns empty response text.
59
+
60
+ ### Technical
61
+ - Added regression coverage for parsed empty-response and `is_error` payload paths in `parse_claude_response`.
62
+
63
+ ## [0.25.3] - 2026-03-17
64
+
65
+ ### Fixed
66
+ - Rescue `Errno::EPIPE` in `SafeCapture` stdin write so broken-pipe crashes (e.g., Codex instant exit) capture stderr for the real error instead of raising an unhandled exception.
67
+ - Detect Claude CLI empty responses (exit 0 but 0-byte output) and raise `ProviderError` instead of silently writing empty files.
68
+ - Removed deprecated `--allowed-tools read_file` from Gemini CLI command builder; `--approval-mode` alone controls tool access.
69
+
70
+ ### Technical
71
+ - Updated Gemini client tests to assert `--allowed-tools` is no longer present in built commands.
72
+
73
+ ## [0.25.2] - 2026-03-15
74
+
75
+ ### Fixed
76
+ - Removed unsupported CLI temperature forwarding for Claude Code CLI adapters so `--temperature` is no longer passed to subprocesses.
77
+
78
+ ## [0.25.1] - 2026-03-12
79
+
80
+ ### Fixed
81
+ - Resolved CLI-provider subprocess working directory from explicit `working_dir`, then `PROJECT_ROOT_PATH`, before falling back to process cwd, so sandbox-relative E2E artifact writes no longer leak into the repo root.
82
+ - Updated Codex, Claude, Claude OAI, Gemini, OpenCode, and Pi clients to use the resolved execution root for subprocess `chdir` and provider-side skill/worktree/prompt-cache path discovery.
83
+
84
+ ## [0.25.0] - 2026-03-12
85
+
86
+ ### Changed
87
+ - Codex now resolves skills from `.codex/skills` only and no longer falls back to `.agent/skills` or `.claude/skills`.
88
+ - Updated the default Codex provider `skills_dir` configuration to `.codex/skills`.
89
+
90
+ ## [0.24.0] - 2026-03-10
91
+
92
+ ### Changed
93
+ - PI now resolves skills from `.pi/skills` as its provider-native directory and no longer falls back to `.agent/skills` or `.claude/skills`.
94
+ - Updated the default PI provider `skills_dir` configuration to `.pi/skills`.
95
+
96
+ ## [0.23.0] - 2026-03-09
97
+
98
+ ### Added
99
+ - Generalized provider skills directory resolution with multi-path fallback for Codex, CodexOAI, ClaudeOAI, and Pi clients
100
+ - Default `skills_dir` configuration for Codex and Pi providers pointing to `.agent/skills`
101
+
102
+ ### Technical
103
+ - Added fallback order tests for `codex_client` and `pi_client` skill directory resolution
104
+
105
+ ## [0.22.2] - 2026-03-09
106
+
107
+ ### Technical
108
+ - Added `SkillNameReader` regression coverage to ensure canonical SKILL frontmatter with nested `skill`/`assign` metadata still yields provider skill names.
109
+ - Added malformed-frontmatter guard test coverage for `SkillNameReader`.
110
+
111
+ ## [0.22.1] - 2026-03-05
112
+
113
+ ### Fixed
114
+ - `SessionFinder` dispatcher test now exercises the actual dispatch path instead of calling the Claude finder directly.
115
+
116
+ ### Changed
117
+ - Added explanatory comment in `OpenCodeSessionFinder` documenting why `project_id` serves as a nil-gate only (OpenCode sessions lack project references).
118
+ - Added explanatory comment in `ClaudeSessionFinder` documenting why substring matching (`include?`) is used instead of exact equality.
119
+
120
+ ## [0.22.0] - 2026-03-05
121
+
122
+ ### Added
123
+ - Provider-specific session finders for Claude, Codex, Pi, Gemini, and OpenCode that detect fork sessions by scanning local session storage and matching by prompt.
124
+ - `SessionFinder` molecule dispatcher that routes session detection to the correct provider-specific atom.
125
+
126
+ ## [0.21.1] - 2026-03-05
127
+
128
+ ### Technical
129
+ - Documented `--output-last-message` minimum version requirement for Codex CLI in README, including verification command and graceful-degradation note.
130
+
131
+ ## [0.21.0] - 2026-03-05
132
+
133
+ ### Added
134
+ - `--output-last-message <path>` flag in `CodexClient#build_codex_command` when `last_message_file:` option is provided, enabling progressive last-message capture for timeout-resilient stall diagnosis.
135
+
136
+ ## [0.20.1] - 2026-03-04
137
+
138
+ ### Changed
139
+ - Gemini CLI prompt staging now uses `.ace-local/llm/prompts`.
140
+
141
+
142
+ ## [0.20.0] - 2026-03-04
143
+
144
+ ### Added
145
+ - Split shell-style tokens within array CLI arguments so multi-word entries like `"--sandbox danger-full-access"` normalize to discrete CLI flags/values.
146
+
147
+ ## [0.19.4] - 2026-03-04
148
+
149
+ ### Fixed
150
+ - Normalize timeout input in CLI provider capture so numeric and numeric-string values are accepted consistently for dry-run provider execution.
151
+
152
+ ## [0.19.3] - 2026-02-23
153
+
154
+ ### Changed
155
+ - Refactored cli-check script into ATOM structure with ProviderDetector, AuthChecker atoms and HealthChecker molecule
156
+
157
+ ### Technical
158
+ - Updated internal dependency version constraints to current releases
159
+
160
+ ## [0.19.2] - 2026-02-22
161
+
162
+ ### Fixed
163
+ - Document that first matching tier wins when multiple tiers map to the same model in `ClaudeOaiClient`
164
+
165
+ ## [0.19.1] - 2026-02-22
166
+
167
+ ### Fixed
168
+ - `ClaudeOaiClient` now passes tier alias (`sonnet`/`opus`/`haiku`) to `--model` instead of backend model name (`glm-5`), fixing claude CLI model recognition errors
169
+ - Sets `ANTHROPIC_DEFAULT_<TIER>_MODEL` env var so tier alias resolves to backend model name at runtime
170
+
171
+ ### Added
172
+ - `model_tiers` mapping in backend config (`claudeoai.yml`) to associate backend models with Claude CLI tier aliases
173
+ - `resolve_model_tier` method for tier lookup with `sonnet` fallback
174
+
175
+ ## [0.19.0] - 2026-02-22
176
+
177
+ ### Added
178
+ - Git worktree sandbox support for `CodexClient` and `CodexOaiClient` — automatically appends `--add-dir` with the common `.git/` directory when running inside a git worktree, allowing Codex sandbox to write git metadata (index.lock etc.)
179
+ - New `WorktreeDirResolver` atom that detects git worktree environments and resolves the common git directory path
180
+
181
+ ## [0.18.0] - 2026-02-22
182
+
183
+ ### Added
184
+ - New `ClaudeOaiClient` provider for Claude over Anthropic-compatible APIs (Z.ai, OpenRouter)
185
+ - Provider config `claudeoai.yml` with Z.ai backend targeting Anthropic-compatible endpoint (`/api/anthropic`)
186
+ - Backend env injection: sets `ANTHROPIC_BASE_URL`, `ANTHROPIC_AUTH_TOKEN`, and clears `ANTHROPIC_API_KEY` on subprocess
187
+ - Skill command rewriting support via `CommandRewriter` and `SkillNameReader`
188
+ - Tests for backend env injection, command building, model splitting, availability validation, and JSON response parsing
189
+
190
+ ## [0.17.1] - 2026-02-22
191
+
192
+ ### Changed
193
+ - Update codexoai provider: add `name` field to backend config, remove `wire_api` setting, rename env key to `ZAI_API_KEY`
194
+ - `CodexOaiClient` now passes provider `name` to codex via `-c` config override, falls back to backend key when name not configured
195
+ - Remove `wire_api` config override from `CodexOaiClient` (no longer needed)
196
+
197
+ ### Technical
198
+ - Updated tests for new provider name assertion, env key rename, and name fallback behavior
199
+
200
+ ## [0.17.0] - 2026-02-22
201
+
202
+ ### Added
203
+ - New `CodexOaiClient` multi-backend provider that wraps `codex` CLI to target any OpenAI-compatible endpoint via `-c` flag overrides
204
+ - Provider config `codexoai.yml` with Z.ai backend (glm-5, glm-4.7, glm-4.6) and model aliases
205
+ - Tests for command building, backend model splitting, availability validation, and generate flow
206
+
207
+ ### Removed
208
+ - `CodexOSSClient` and `codexoss.yml` provider (called non-existent `codex-oss` binary)
209
+
210
+ ## [0.16.10] - 2026-02-22
211
+
212
+ ### Changed
213
+ - Migrate skill naming and invocation references to hyphenated `ace-*` format (no underscores).
214
+
215
+ ## [0.16.9] - 2026-02-21
216
+
217
+ ### Fixed
218
+ - `ClaudeCodeClient` now merges `subprocess_env` into the subprocess environment, ensuring env vars like `ACE_TMUX_SESSION` are set on the actual `claude -p` process instead of only appearing as text in the prompt
219
+
220
+ ### Added
221
+ - Unit tests for `ClaudeCodeClient` covering env merging, nil handling, and subprocess_env forwarding from `generate()`
222
+
223
+ ## [0.16.8] - 2026-02-21
224
+
225
+ ### Added
226
+ - Process-group lifecycle hardening in `SafeCapture`: isolate subprocesses in dedicated process groups and clean up descendants on timeout and successful parent exit
227
+ - Regression tests for success-path and timeout-path descendant cleanup in `SafeCapture`
228
+ - Debug lifecycle tracing for CLI subprocess management via `ACE_LLM_DEBUG_SUBPROCESS=1`
229
+
230
+ ### Changed
231
+ - `ClaudeCodeClient` now emits debug subprocess context (timeout, command, prompt size) when `ACE_LLM_DEBUG_SUBPROCESS=1`
232
+
233
+ ## [0.16.7] - 2026-02-21
234
+
235
+ ### Changed
236
+ - Update skill name handling and documentation for colon-free convention (`ace_domain_action` format)
237
+ - Update command rewriter tests for new skill naming convention
238
+
239
+ ## [0.16.6] - 2026-02-17
240
+
241
+ ### Fixed
242
+ - Added `SafeCapture` molecule test coverage to verify `env:` parameter propagation into subprocess execution (`test_env_option_passed_to_subprocess`)
243
+
244
+ ## [0.16.5] - 2026-02-15
245
+
246
+ ### Changed
247
+ - **ClaudeCodeClient**: Optimize subprocess environment — pass minimal env override `{"CLAUDECODE" => nil}` instead of copying entire `ENV.to_h`
248
+
249
+ ## [0.16.4] - 2026-02-15
250
+
251
+ ### Fixed
252
+ - **ClaudeCodeClient**: Pass prompt via stdin instead of CLI argument to avoid Linux `MAX_ARG_STRLEN` (128KB) limit on large prompts
253
+ - **ClaudeCodeClient**: Remove `--system-prompt` and `--append-system-prompt` CLI args (system content already embedded in formatted prompt)
254
+
255
+ ### Changed
256
+ - **CodexClient**: `--sandbox` mode is now caller-controlled via `options[:sandbox]` instead of hardcoded `read-only`
257
+
258
+ ## [0.16.3] - 2026-02-15
259
+
260
+ ### Fixed
261
+ - **ClaudeCodeClient**: Clear `CLAUDECODE` env var before spawning subprocess to allow `claude -p` (one-shot mode) to run from within a Claude Code session — works around nested session guard added in Claude Code v2.1.41
262
+ - **CodexClient**: Add `--sandbox read-only` to prevent agent from executing commands instead of reviewing the prompt content
263
+ - **SafeCapture**: Added optional `env:` parameter for subprocess environment control
264
+
265
+ ## [0.16.2] - 2026-02-07
266
+
267
+ ### Fixed
268
+ - **PiClient**: Thread-safety fix — removed `@pending_system_prompt` shared mutable state; `build_full_prompt` now returns `[prompt, system_prompt]` tuple passed explicitly to `build_pi_command`
269
+ - **SkillCommandRewriter**: Replaced misleading "Deprecated" docstring with accurate "Convenience wrapper" description
270
+
271
+ ### Changed
272
+ - **SafeCapture**: Moved from `atoms/` to `molecules/` to comply with ATOM architecture (performs I/O via Open3, Process.kill, Thread spawning)
273
+ - Updated all 6 CLI clients to reference `Molecules::SafeCapture` instead of `Atoms::SafeCapture`
274
+
275
+ ### Technical
276
+ - 215 tests, 511 assertions, 0 failures (10 skipped)
277
+
278
+ ## [0.16.1] - 2026-02-07
279
+
280
+ ### Fixed
281
+ - **PiClient**: Handle nested provider pattern with colon (e.g., `openrouter:openai/gpt-oss-120b`)
282
+ - Updated `split_provider_model` to correctly parse provider:model format
283
+ - Now splits on `:` before `/` when colon is present in model string
284
+ - Added regression tests for standard provider/model format
285
+
286
+ ### Technical
287
+ - 2 new tests for nested provider model parsing
288
+
289
+ ## [0.16.0] - 2026-02-07
290
+
291
+ ### Added
292
+ - **CodexClient**: Skill command rewriting support transforms `/name` → `$name` for Codex CLI skill discovery
293
+ - **CodexClient**: `skill_rewriting` capability and `skills_dir` configuration option in provider defaults
294
+
295
+ ### Changed
296
+ - Refactored skill command rewriting into provider-agnostic `CommandRewriter` base class with configurable formatter proc
297
+ - `SkillCommandRewriter` now a thin wrapper using `CommandRewriter` with `PI_FORMATTER` for backward compatibility
298
+ - `PiClient` updated to use `CommandRewriter` with `CommandFormatters::PI_FORMATTER`
299
+
300
+ ### Technical
301
+ - New `CommandRewriter` atom in `atoms/command_rewriter.rb` for provider-agnostic command rewriting
302
+ - New `CommandFormatters` module in `atoms/command_formatters.rb` with `PI_FORMATTER` and `CODEX_FORMATTER`
303
+ - 20 tests for `CommandRewriter` covering both Pi and Codex formatters
304
+ - 25 tests for `CodexClient` covering skill rewriting and configuration
305
+
306
+ ## [0.15.0] - 2026-02-07
307
+
308
+ ### Added
309
+ - **PiClient**: New CLI provider for Pi (v0.52.7), a multi-provider terminal AI agent
310
+ - Supports ZAI, Anthropic, Google Gemini, and OpenAI Codex models via Pi's unified platform
311
+ - Skill command rewriting: transforms `/name` → `/skill:name` for Pi's skill discovery
312
+ - NDJSON response parsing with plain text fallback
313
+ - System prompt support via native `--system-prompt` flag
314
+ - 17 tests for `SkillCommandRewriter` atom covering code blocks, URLs, edge cases
315
+ - 37 tests for `PiClient` covering command building, prompt preprocessing, NDJSON parsing
316
+
317
+ ### Technical
318
+ - New `SkillCommandRewriter` atom in `atoms/skill_command_rewriter.rb` for pure function skill command rewriting
319
+ - New `SkillNameReader` molecule in `molecules/skill_name_reader.rb` for reading skill names from SKILL.md frontmatter
320
+
321
+ ## [0.14.2] - 2026-02-06
322
+
323
+ ### Fixed
324
+ - Replace unsafe `Timeout.timeout { Open3.capture3 }` with thread-safe `SafeCapture` atom using `Open3.popen3` + `Process.kill` for process-level timeout — eliminates "stream closed in another thread (IOError)" errors during parallel CLI execution
325
+
326
+ ### Technical
327
+ - New `SafeCapture` atom in `atoms/safe_capture.rb` with 7 tests covering stdout/stderr capture, timeout kill, stdin_data, chdir, and error messages
328
+ - Updated all 5 CLI clients (Claude, Codex, Codex OSS, Gemini, OpenCode) to use `SafeCapture`
329
+ - Updated Gemini client test stub from `Open3.capture3` to `SafeCapture.call`
330
+
331
+ ## [0.14.1] - 2026-02-06
332
+
333
+ ### Fixed
334
+ - Honor `--` sentinel in ArgsNormalizer: args after `--` now pass through verbatim without auto-prefixing
335
+ - User CLI args now take precedence over command-generated flags (moved to end of command construction in all 4 clients)
336
+
337
+ ## [0.14.0] - 2026-02-05
338
+
339
+ ### Added
340
+ - CLI argument passthrough support with normalization for CLI providers
341
+
342
+ ### Fixed
343
+ - Improved CLI argument error reporting and provider command wiring
344
+
345
+ ## [0.13.2] - 2026-01-22
346
+
347
+ ### Fixed
348
+ - **OpenCodeClient**: Prevent client hang on 400 error and improve output
349
+ - Added `stdin_data: ""` to `Open3.capture3` to prevent hanging on interactive prompts
350
+ - Added `--format json` flag for structured output
351
+ - Improved 400 Bad Request error detection with clearer error messages
352
+ - Updated test expectations for `--format json` flag
353
+
354
+ ## [0.13.1] - 2026-01-16
355
+
356
+ ### Fixed
357
+ - **OpenCodeClient**: Fixed command syntax to match current OpenCode CLI interface
358
+ - Changed from `opencode generate` to `opencode run` subcommand
359
+ - Pass prompt as positional argument instead of `--prompt` flag
360
+ - Removed unsupported flags: `--format`, `--temperature`, `--max-tokens`, `--system`
361
+ - Handle system prompts by prepending to main prompt (no native `--system` flag)
362
+ - Added regression tests for correct OpenCode command building
363
+
364
+ ## [0.13.0] - 2026-01-13
365
+
366
+ ### Added
367
+ - **GeminiClient**: Added Google Gemini CLI provider integration
368
+ - Supports Gemini 2.5 Flash, Gemini 2.5 Pro, Gemini 2.0 Flash, and Gemini 1.5 Pro models
369
+ - JSON output parsing for structured responses with token metadata
370
+ - System prompt embedding (Gemini CLI lacks native `--system-prompt` flag)
371
+ - Provider aliases: `gflash`, `gpro`, `gemini-flash`, `gemini-pro`
372
+ - Auto-registers with ace-llm provider system
373
+
374
+ ## [0.12.0] - 2026-01-03
375
+
376
+ ### Changed
377
+ - **BREAKING**: Minimum Ruby version raised to 3.3.0 (was 3.1.0)
378
+ - Standardized gemspec file patterns with deterministic Dir.glob
379
+ - Added MIT LICENSE file
380
+
381
+ ## [0.11.1] - 2025-12-30
382
+
383
+ ### Changed
384
+
385
+ * Replace ace-support-core dependency with ace-config
386
+
387
+ ## [0.11.0] - 2025-12-30
388
+
389
+ ### Changed
390
+
391
+ * Rename `.ace.example/` to `.ace-defaults/` for gem defaults directory
392
+
393
+
394
+ ## [0.10.2] - 2025-12-06
395
+
396
+ ### Technical
397
+ - Updated ace-llm dependency from `~> 0.12.0` to `~> 0.13.0` for OpenRouter provider support
398
+
399
+ ## [0.10.1] - 2025-11-17
400
+
401
+ ### Technical
402
+ - Updated ace-llm dependency from `~> 0.10.0` to `~> 0.11.0` for graceful provider fallback support
403
+
404
+ ## [0.10.0] - 2025-11-15
405
+
406
+ ### Added
407
+ - **ClaudeCodeClient Enhancement**: Added support for `--append-system-prompt` flag
408
+ - Maps `system_append` option to Claude CLI's `--append-system-prompt` flag
409
+ - Enables flexible prompt composition with Claude models
410
+
411
+ ### Fixed
412
+ - **ClaudeCodeClient Bug**: Fixed system prompt handling to use correct `--system-prompt` flag
413
+ - Changed from non-existent `--system` to proper `--system-prompt` flag
414
+ - Resolves issue where system prompts were ignored with Claude provider
415
+
416
+ ### Changed
417
+ - **Dependency Update**: Updated ace-llm dependency to ~> 0.10.0
418
+ - Aligns with ace-llm minor version bump for system prompt control features
419
+
420
+ ### Technical
421
+ - Added deprecation note for `append_system_prompt` option, prefer `system_append` for consistency
422
+
423
+ ## [0.9.3] - 2025-10-08
424
+
425
+ ### Changed
426
+
427
+ - **Test Structure Reorganization**: Reorganized tests with proper ATOM categorization
428
+ - Moved `test/ace/llm_providers_cli_test.rb` → `test/llm_providers_cli_test.rb`
429
+ - Created `test/molecules/` for CLI provider tests
430
+ - Created `test/edge/` for edge case tests (new pattern)
431
+ - Created `test/integration/` for provider registration tests
432
+ - Fixed require paths to match new structure
433
+ - Aligns with standardized flat ATOM structure across all ACE packages
434
+
435
+ ## [0.9.2] - 2025-10-07
436
+
437
+ ### Changed
438
+ - **Test maintainability improvement**: Version tests now validate semantic versioning format instead of exact version values
439
+ - Prevents test failures on every version bump
440
+ - Uses regex pattern `/\A\d+\.\d+\.\d+/` to validate version format
441
+
442
+ ## [0.9.1] - 2025-10-07
443
+
444
+ ### Fixed
445
+ - Standardized test file naming to follow project convention (`*_test.rb` suffix instead of `test_*` prefix)
446
+ - Renamed `test_cli_execution_edge.rb` → `cli_execution_edge_test.rb`
447
+ - Renamed `test_cli_providers.rb` → `cli_providers_test.rb`
448
+ - Renamed `test_provider_registration.rb` → `provider_registration_test.rb`
449
+ - Test count increased from 51 to 57 tests (all tests now properly discovered)
450
+
451
+ ## [0.9.0] - 2024-XX-XX
452
+
453
+ ### Added
454
+ - Initial release with CLI-based LLM provider support
455
+ - Support for Claude Code and Codex providers
456
+ - Provider registration and configuration system
457
+ - OpenCode client implementation
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Michal Czyz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.