ruby_llm-codex 0.3.0 → 0.4.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +30 -80
- data/UPGRADE.md +11 -0
- data/lib/ruby_llm/codex/version.rb +1 -1
- data/lib/ruby_llm/providers/codex.rb +3 -3
- metadata +2 -30
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd8ce8fd8d9ea9084dd8a54f70e7aac4a790a74ea932820d77466f2eee87c660
|
|
4
|
+
data.tar.gz: 46a28a66dd5c527e31be3b86fc007edd4e9de6a5182aab124dc535f4025f8718
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bc3d9164ed7f97cd26e22c259342df7bd870252a0c82306f9344dd6d9891f409c2604dee8a2e542c36454fb9fedbec87a88fde0d5d24f1db6b9ba00d2be481b5
|
|
7
|
+
data.tar.gz: bc03eb41c6baffa0c88872dd229d7f6dcb3b99adbfcaa7010fb94d9469bcae28cc76cc8641f7da45995221e9d83d73183ca8e49d5a8b050b950dffe2361f1f0c
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.4.0] - 2026-11-04
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- require Ruby 4 and adopt Gemkit
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
8
17
|
## [0.3.0] - 2026-10-12
|
|
9
18
|
|
|
10
19
|
|
data/README.md
CHANGED
|
@@ -18,7 +18,7 @@ supported mapping but not an identical wire-level request.
|
|
|
18
18
|
|
|
19
19
|
## Requirements
|
|
20
20
|
|
|
21
|
-
- Ruby
|
|
21
|
+
- Ruby 4.0 or newer
|
|
22
22
|
- RubyLLM 2.1.1 or newer, below 2.2
|
|
23
23
|
- Codex CLI 0.162.1 or newer, available as `codex`
|
|
24
24
|
- Linux or macOS (timeout cleanup relies on POSIX process groups)
|
|
@@ -164,95 +164,45 @@ client while keeping the same RubyLLM provider surface.
|
|
|
164
164
|
- **Local instructions affect output:** keep `ignore_user_config: true` and do
|
|
165
165
|
not set a working directory when you need isolated requests.
|
|
166
166
|
|
|
167
|
-
##
|
|
168
|
-
|
|
169
|
-
```bash
|
|
170
|
-
git clone https://github.com/ethos-link/ruby_llm-codex.git
|
|
171
|
-
cd ruby_llm-codex
|
|
172
|
-
|
|
173
|
-
bundle install
|
|
174
|
-
bundle exec rake
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
To test an unreleased checkout from another application, use a local path in
|
|
178
|
-
that application's `Gemfile`:
|
|
179
|
-
|
|
180
|
-
```ruby
|
|
181
|
-
gem "ruby_llm-codex", path: "/path/to/ruby_llm-codex"
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
The default Rake task runs the unit suite and Standard Ruby. CI runs the same
|
|
185
|
-
gate on Ruby 3.3, 3.4, and 4.0.3, then validates commit messages and
|
|
186
|
-
git-cliff changelog generation.
|
|
187
|
-
|
|
188
|
-
The authenticated smoke task is intentionally separate because it sends real
|
|
189
|
-
requests through the configured Codex account. Choose a model available to that
|
|
190
|
-
account:
|
|
167
|
+
## Contributing
|
|
191
168
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
169
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). By participating, you agree to follow
|
|
170
|
+
the [Code of Conduct](CODE_OF_CONDUCT.md). Security reports should follow
|
|
171
|
+
[SECURITY.md](SECURITY.md), not a public issue.
|
|
195
172
|
|
|
196
|
-
|
|
197
|
-
bounded process and memory scope.
|
|
173
|
+
## License
|
|
198
174
|
|
|
199
|
-
|
|
175
|
+
MIT License. See [LICENSE](LICENSE).
|
|
200
176
|
|
|
201
|
-
|
|
202
|
-
[commitlint](https://github.com/arandilopez/commitlint) gem. Hooks reject direct
|
|
203
|
-
commits to `main` or `master`, validate Conventional Commit messages, and run
|
|
204
|
-
Standard Ruby.
|
|
177
|
+
## Development and releases
|
|
205
178
|
|
|
206
|
-
|
|
179
|
+
Shared tooling uses published [Ethos Gemkit](https://github.com/ethos-link/ethos-gemkit).
|
|
180
|
+
Keep the exact Gemfile version and workflow commit pins on the same release.
|
|
207
181
|
|
|
208
|
-
```
|
|
182
|
+
```sh
|
|
183
|
+
bundle install
|
|
209
184
|
bundle exec lefthook install
|
|
185
|
+
bundle exec rake verify
|
|
210
186
|
```
|
|
211
187
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
through RubyGems trusted publishing, and creates the GitHub release from
|
|
216
|
-
`CHANGELOG.md`. See [docs/releasing.md](docs/releasing.md) for repository setup,
|
|
217
|
-
the first-release procedure, verification, and recovery guidance.
|
|
218
|
-
|
|
219
|
-
Install [git-cliff](https://git-cliff.org/) locally, check out a clean `main`,
|
|
220
|
-
and run one of:
|
|
221
|
-
|
|
222
|
-
```bash
|
|
223
|
-
bundle exec rake 'release:prepare[patch]'
|
|
224
|
-
bundle exec rake 'release:prepare[minor]'
|
|
225
|
-
bundle exec rake 'release:prepare[major]'
|
|
226
|
-
bundle exec rake 'release:prepare[0.2.0]'
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
For releases after `0.1.0`, the task:
|
|
230
|
-
|
|
231
|
-
1. Prepends the next changelog section from Conventional Commits.
|
|
232
|
-
2. Updates `lib/ruby_llm/codex/version.rb`.
|
|
233
|
-
3. Commits the release files and creates `vX.Y.Z`.
|
|
234
|
-
4. Pushes `main` and the tag to `origin`.
|
|
235
|
-
|
|
236
|
-
The initial `0.1.0` release only needs its existing version commit tagged after
|
|
237
|
-
the GitHub environment and pending RubyGems trusted publisher are configured.
|
|
188
|
+
Verification uses a fake Codex executable; it makes no live model requests.
|
|
189
|
+
The optional `codex:smoke` task requires your Codex account, an available
|
|
190
|
+
`CODEX_MODEL` and a bounded process/memory scope.
|
|
238
191
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
the [
|
|
243
|
-
[SECURITY.md](SECURITY.md), not a public issue.
|
|
244
|
-
|
|
245
|
-
## License
|
|
246
|
-
|
|
247
|
-
MIT License. See [LICENSE](LICENSE).
|
|
192
|
+
From clean, current `main`, run `bundle exec rake 'release:prepare[patch]'`
|
|
193
|
+
(or `minor`, `major`, or an explicit version). Review and merge the generated
|
|
194
|
+
release PR to publish through Actions. Shared prerequisites, registry credentials
|
|
195
|
+
and failed-job recovery are in the [Gemkit release guide](https://github.com/ethos-link/ethos-gemkit#releasing-a-gem).
|
|
248
196
|
|
|
249
|
-
##
|
|
197
|
+
## Built by Ethos Link
|
|
250
198
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
199
|
+
[Ethos Link](https://www.ethos-link.com) builds business software and integrations
|
|
200
|
+
that replace manual handoffs with connected workflows. We help teams automate
|
|
201
|
+
routine work, use their data and improve the processes their business runs on.
|
|
254
202
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
203
|
+
- [Reviato](https://www.reviato.com): Read public review trends and collect
|
|
204
|
+
private customer feedback, so your team can decide what to improve.
|
|
205
|
+
- [EthosPlaces](https://www.ethos.place): Give customers the details they need to
|
|
206
|
+
choose and visit your business, from opening hours to directions.
|
|
207
|
+
- [Nuntio](https://www.nuntiohq.com): Draft, review and schedule social posts in
|
|
208
|
+
one workspace, then track each publishing result.
|
data/UPGRADE.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Upgrade Guide
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Shared development and release tooling
|
|
6
|
+
|
|
7
|
+
Use Ruby 4 and published Gemkit 0.2.0. Install the bundle and hooks, then run the
|
|
8
|
+
project's verification command from the README. Prepare releases from clean,
|
|
9
|
+
current main; merging the generated release PR publishes through Actions.
|
|
10
|
+
See the [Gemkit upgrade guide](https://github.com/ethos-link/ethos-gemkit/blob/main/UPGRADE.md)
|
|
11
|
+
for workflow permissions and registry setup.
|
|
12
|
+
|
|
13
|
+
|
|
3
14
|
## RubyLLM 2.1
|
|
4
15
|
|
|
5
16
|
This provider now requires RubyLLM `~> 2.1.1` and Codex CLI 0.162.1 or newer.
|
|
@@ -418,7 +418,7 @@ module RubyLLM
|
|
|
418
418
|
end
|
|
419
419
|
|
|
420
420
|
def raise_invocation_error!(status, events, stderr)
|
|
421
|
-
event = events.
|
|
421
|
+
event = events.rfind { |item| %w[turn.failed error].include?(item["type"]) }
|
|
422
422
|
detail = event && (event["message"] || event["error"] || event).to_s
|
|
423
423
|
detail = stderr.strip if detail.to_s.strip.empty?
|
|
424
424
|
detail = "Codex exited with status #{status.exitstatus}" if detail.to_s.strip.empty?
|
|
@@ -426,14 +426,14 @@ module RubyLLM
|
|
|
426
426
|
end
|
|
427
427
|
|
|
428
428
|
def final_agent_message(events)
|
|
429
|
-
event = events.
|
|
429
|
+
event = events.rfind do |item|
|
|
430
430
|
item["type"] == "item.completed" && item.dig("item", "type") == "agent_message"
|
|
431
431
|
end
|
|
432
432
|
event&.dig("item", "text")
|
|
433
433
|
end
|
|
434
434
|
|
|
435
435
|
def build_message(content, model, events, stderr)
|
|
436
|
-
usage = events.
|
|
436
|
+
usage = events.rfind { |event| event["type"] == "turn.completed" }&.fetch("usage", {}) || {}
|
|
437
437
|
cached = integer_or_nil(usage["cached_input_tokens"])
|
|
438
438
|
total_input = integer_or_nil(usage["input_tokens"])
|
|
439
439
|
uncached_input = total_input && [total_input - cached.to_i, 0].max
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby_llm-codex
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Paulo Fidalgo
|
|
@@ -38,34 +38,6 @@ dependencies:
|
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '5'
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: rake
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - "~>"
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: '13'
|
|
48
|
-
type: :development
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - "~>"
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: '13'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: standard
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - "~>"
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '1.0'
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - "~>"
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '1.0'
|
|
69
41
|
description: |-
|
|
70
42
|
A RubyLLM provider that invokes the official Codex CLI, reuses local ChatGPT
|
|
71
43
|
authentication, and maps RubyLLM structured-output schemas to Codex output
|
|
@@ -103,7 +75,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
103
75
|
requirements:
|
|
104
76
|
- - ">="
|
|
105
77
|
- !ruby/object:Gem::Version
|
|
106
|
-
version:
|
|
78
|
+
version: '4.0'
|
|
107
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
80
|
requirements:
|
|
109
81
|
- - ">="
|