robot_lab-audit 0.2.8 → 0.6.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef178bcab0fa1ddd03a137fb4c2bb97032d66e3e78120a171970c87bcc5ca6af
4
- data.tar.gz: 0eeb18834c2ef6a1355e528308ef31805d86c48e1557359b75d1372d8ef5e52f
3
+ metadata.gz: 60192634b8dbccb970a0c11b3763198c47b7d08177c83cb31088232a4693b85f
4
+ data.tar.gz: 7f04d815fb74344cab91520de98f1439e32fbecdbfac9736c4e536dcfb3d5521
5
5
  SHA512:
6
- metadata.gz: 77e6579549b5b4d05cc34162cdae304cd1fa1c38ce6d5257cb3c4344f62bef4fa6adaaa6bd2afddbecaf6dd7b953048c44229e8b3841ff6bb601c7c3fbb11097
7
- data.tar.gz: 0d1b28b9d41dc6d312f2777752664b91f5f197d765c26bf17d3ca84a42f09cb25e049e4ddad141ced0f6ae2d18e9c687d5e4160a0945ad08f9f83ead419520f2
6
+ metadata.gz: 4328afcfe1cf4bed9ceb59269129452191abed0cf9002a90722d9ec406d60b272b7243c81256133eeff27161212af58c4364110aa81e8afacf3408ea5f710594
7
+ data.tar.gz: 24ef105b89c98417190c150ae7e56fad1db8e25e8bec06ec1bdea710a8168c56aaa9951b5ad7877f508f5b78d6e669b56ccb983798925cb33207db74ded2485f
data/.envrc CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  source_up
4
4
 
5
- export RR=`pwd`
6
- export BUNDLE_GEMFILE=Gemfile
5
+ export RR=$(pwd)
6
+ # BUNDLE_GEMFILE is inherited from the project root .envrc (asgard dev|prod)
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 4.0.9
data/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.1] - 2026-11-19
11
+
12
+ ### Changed
13
+
14
+ - **Minimum Ruby raised to 4.0.9.** `required_ruby_version` is now `>= 4.0.9` (was `>= 3.2.0`), and a `.ruby-version` file pins development to 4.0.9.
15
+ - **Requires `robot_lab ~> 0.6`** (was `~> 0.3.0`). Verified against robot_lab 0.6.1 and ruby_llm 2.2.3; no code changes were needed.
16
+
10
17
  ## [0.2.8] - 2026-09-09
11
18
 
12
19
  Released in lockstep with `robot_lab` core v0.2.8: this gem now resolves the released core gem from RubyGems instead of the local sibling checkout (local-path development remains available via `BUNDLE_GEMFILE=Gemfile.local`). Also in this release: gem lifecycle tasks (build/install/release) moved from the Rakefile to the asgard task runner.
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Prerequisites
4
4
 
5
- - Ruby 3.2+ (per the gemspec's `required_ruby_version`)
5
+ - Ruby 4.0.9+ (per the gemspec's `required_ruby_version`)
6
6
  - `robot_lab` — `robot_lab/audit` requires `RobotLab::Hook` to already be defined, so `robot_lab` must be `require`d first.
7
7
  - SQLite — the gem depends on the `sqlite3` gem directly; no separate database server to run.
8
8
 
@@ -33,7 +33,7 @@ end
33
33
 
34
34
  class WordCountTool < RobotLab::Tool
35
35
  description 'Counts words in a text string'
36
- param :text, type: 'string', desc: 'The text to analyse'
36
+ parameter :text, type: 'string', description: 'The text to analyse'
37
37
 
38
38
  def execute(text:)
39
39
  { word_count: text.split.size, status: 'ok' }
@@ -43,7 +43,7 @@ end
43
43
 
44
44
  class SentimentTool < RobotLab::Tool
45
45
  description 'Returns a sentiment score for a text string'
46
- param :text, type: 'string', desc: 'The text to score'
46
+ parameter :text, type: 'string', description: 'The text to score'
47
47
 
48
48
  def execute(text:)
49
49
  score = text.downcase.include?('great') ? 0.9 : 0.5
@@ -54,7 +54,7 @@ end
54
54
 
55
55
  class FailingTool < RobotLab::Tool
56
56
  description 'Always raises a ToolError (for error logging demo)'
57
- param :reason, type: 'string', desc: 'Failure reason'
57
+ parameter :reason, type: 'string', description: 'Failure reason'
58
58
 
59
59
  def execute(reason:)
60
60
  raise RobotLab::ToolError, "Simulated failure: #{reason}"
@@ -198,8 +198,8 @@ word_count.instance_variable_set(:@robot, analyst)
198
198
  sentiment = SentimentTool.new
199
199
  sentiment.instance_variable_set(:@robot, analyst)
200
200
 
201
- word_count.call({ 'text' => input })
202
- sentiment.call({ 'text' => input })
201
+ word_count.call(**{ 'text' => input })
202
+ sentiment.call(**{ 'text' => input })
203
203
 
204
204
  all_tool_events = log.instance_variable_get(:@db)
205
205
  .execute("SELECT * FROM audit_events WHERE event_type = 'tool_call'")
@@ -224,7 +224,7 @@ TEXT
224
224
 
225
225
  failing = FailingTool.new
226
226
  failing.instance_variable_set(:@robot, analyst)
227
- failing.call({ 'reason' => 'network timeout' })
227
+ failing.call(**{ 'reason' => 'network timeout' })
228
228
 
229
229
  print_events(log.recent_errors, label: 'recent_errors (newest first):')
230
230
 
data/examples/common.rb CHANGED
@@ -7,6 +7,9 @@ require_relative '../lib/robot_lab/audit'
7
7
 
8
8
  RubyLLM.configure do |c|
9
9
  c.logger = Logger.new(File::NULL)
10
+ # The demo robots stub out chat.ask, so no request ever reaches a provider —
11
+ # but ruby_llm 2.0 validates provider configuration when the chat is built.
12
+ c.anthropic_api_key = ENV.fetch("ANTHROPIC_API_KEY", "stub-key-never-used")
10
13
  end
11
14
 
12
15
  RobotLab.configure do |c|
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RobotLab
4
4
  module Audit
5
- VERSION = '0.2.8'
5
+ VERSION = '0.6.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,96 +1,102 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: robot_lab-audit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
- - Dewayne VanHoozer
7
+ - Dewayne VanHoozer
8
8
  bindir: exe
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
- - !ruby/object:Gem::Dependency
13
- name: robot_lab
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - ">="
17
- - !ruby/object:Gem::Version
18
- version: '0.1'
19
- type: :runtime
20
- prerelease: false
21
- version_requirements: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - ">="
24
- - !ruby/object:Gem::Version
25
- version: '0.1'
26
- - !ruby/object:Gem::Dependency
27
- name: sqlite3
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - "~>"
31
- - !ruby/object:Gem::Version
32
- version: '2.0'
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '2.0'
40
- description: Appends structured records for network runs, robot invocations, and tool
41
- calls to a SQLite database for post-mortem analysis.
12
+ - !ruby/object:Gem::Dependency
13
+ name: robot_lab
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ -
17
+ - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: "0.6"
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ -
25
+ - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: "0.6"
28
+ - !ruby/object:Gem::Dependency
29
+ name: sqlite3
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ -
33
+ - ~>
34
+ - !ruby/object:Gem::Version
35
+ version: "2.0"
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ -
41
+ - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: "2.0"
44
+ description: "Appends structured records for network runs, robot invocations, and tool calls to a SQLite database for post-mortem analysis."
42
45
  email:
43
- - dvanhoozer@gmail.com
46
+ - dvanhoozer@gmail.com
44
47
  executables: []
45
48
  extensions: []
46
49
  extra_rdoc_files: []
47
50
  files:
48
- - ".envrc"
49
- - ".github/workflows/deploy-github-pages.yml"
50
- - ".loki"
51
- - ".quality/reek_baseline.txt"
52
- - ".rubocop.yml"
53
- - CHANGELOG.md
54
- - CLAUDE.md
55
- - COMMITS.md
56
- - LICENSE.txt
57
- - README.md
58
- - Rakefile
59
- - docs/getting_started.md
60
- - docs/how_it_works.md
61
- - docs/index.md
62
- - docs/querying.md
63
- - examples/01_basic_usage.rb
64
- - examples/common.rb
65
- - lib/robot_lab/audit.rb
66
- - lib/robot_lab/audit/event_log.rb
67
- - lib/robot_lab/audit/hook.rb
68
- - lib/robot_lab/audit/version.rb
69
- - mkdocs.yml
70
- - sig/robot_lab/audit.rbs
71
- homepage: https://github.com/MadBomber/robot_lab-audit
51
+ - .envrc
52
+ - .github/workflows/deploy-github-pages.yml
53
+ - .loki
54
+ - .quality/reek_baseline.txt
55
+ - .rubocop.yml
56
+ - .ruby-version
57
+ - CHANGELOG.md
58
+ - CLAUDE.md
59
+ - COMMITS.md
60
+ - LICENSE.txt
61
+ - README.md
62
+ - Rakefile
63
+ - docs/getting_started.md
64
+ - docs/how_it_works.md
65
+ - docs/index.md
66
+ - docs/querying.md
67
+ - examples/01_basic_usage.rb
68
+ - examples/common.rb
69
+ - lib/robot_lab/audit.rb
70
+ - lib/robot_lab/audit/event_log.rb
71
+ - lib/robot_lab/audit/hook.rb
72
+ - lib/robot_lab/audit/version.rb
73
+ - mkdocs.yml
74
+ - sig/robot_lab/audit.rbs
75
+ homepage: "https://github.com/MadBomber/robot_lab-audit"
72
76
  licenses:
73
- - MIT
77
+ - MIT
74
78
  metadata:
75
- homepage_uri: https://github.com/MadBomber/robot_lab-audit
76
- source_code_uri: https://github.com/MadBomber/robot_lab-audit
77
- changelog_uri: https://github.com/MadBomber/robot_lab-audit/blob/main/CHANGELOG.md
78
- rubygems_mfa_required: 'true'
79
+ homepage_uri: "https://github.com/MadBomber/robot_lab-audit"
80
+ source_code_uri: "https://github.com/MadBomber/robot_lab-audit"
81
+ changelog_uri: "https://github.com/MadBomber/robot_lab-audit/blob/main/CHANGELOG.md"
82
+ rubygems_mfa_required: "true"
79
83
  rdoc_options: []
80
84
  require_paths:
81
- - lib
85
+ - lib
82
86
  required_ruby_version: !ruby/object:Gem::Requirement
83
87
  requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- version: 3.2.0
88
+ -
89
+ - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: 4.0.9
87
92
  required_rubygems_version: !ruby/object:Gem::Requirement
88
93
  requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- version: '0'
94
+ -
95
+ - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: "0"
92
98
  requirements: []
93
- rubygems_version: 4.0.20
99
+ rubygems_version: 4.1.0
94
100
  specification_version: 4
95
101
  summary: SQLite-backed execution audit log for RobotLab via the Hook system.
96
102
  test_files: []