ask-rails 0.15.2 → 0.15.3

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: 9b6a862555ac37ba174e915e11011a31a1f839b9baf29a1be9615c960542ebb9
4
- data.tar.gz: 6dd22901bb03b6652714a749da016ebf4ef5ea74a54886b61810afb9f4c7626c
3
+ metadata.gz: e259cec23b1c2cc2ffcf28aa4e88631c6b8324f06faf54796bfe3dd25811c7b8
4
+ data.tar.gz: 77f68fbcc68972b2f2e7ee25b4c191f3323ef7ac7fe67b87e28c34c133d76888
5
5
  SHA512:
6
- metadata.gz: 4b0556aedd3ff9c379323e3b8ed305470928e779bbd41e0b1fee5a9b55aec2d2597b749289ca185f6a5eb3da837cd06b724ff66bc4b394851b0912b8d364eb33
7
- data.tar.gz: ee27d507c6fa98a377ed35ace846dfbf00c32567b32b6cd36f2e82aba2f1b007c96cc54b58ace3497a8fd8a248449619a36f94b9601c477c528ef082ee46d2b7
6
+ metadata.gz: 57ac3ea96821f89d216ef96f6ef903c07c054f8fbced39df03753531a5034edfe5eee0edf4cd6895ca7f187509fec6a17805893ae5958b7262f7e5311c734c9d
7
+ data.tar.gz: 91b579013d926feb5e5d4991ed65f50478e7d537f272c9113e2e504f3763c36b8f815e4d4974032ce5ea51213b81abf117c5633403b9be4bbe4d9e5d5934fb37
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [0.15.3] — 2026-07-30
2
+
3
+ ### Added
4
+
5
+ - **Per-agent tools required at boot too.** The boot-time `require` now
6
+ covers `app/agents/*/tools/*.rb` as well as shared tools, so constants
7
+ for every registered tool resolve anywhere in the app (including test
8
+ classes compiled before discovery). The initializer was renamed to
9
+ `ask_rails.agent_tools`.
10
+
1
11
  ## [0.15.2] — 2026-07-30
2
12
 
3
13
  ### Added
@@ -18,16 +18,19 @@ module Ask
18
18
  end
19
19
  end
20
20
 
21
- # Shared tools (app/agents/shared/tools/*.rb) are required at boot so
22
- # the Ask::Tools registry is populated and their constants resolve
23
- # anywhere including code compiled before the first agent discovery
24
- # (e.g. test classes referencing Tools::Billing::InquiryTool).
25
- # ask-agent's own lazy discovery re-requires them idempotently.
26
- initializer "ask_rails.shared_tools" do |app|
27
- tools_path = app.root.join("app/agents/shared/tools")
28
- next unless tools_path.directory?
21
+ # Agent tools (app/agents/shared/tools/*.rb and per-agent
22
+ # app/agents/*/tools/*.rb) are required at boot so the Ask::Tools
23
+ # registry is populated and their constants resolve anywhere
24
+ # including code compiled before the first agent discovery (e.g. test
25
+ # classes referencing Tools::Billing::InquiryTool). ask-agent's own
26
+ # lazy discovery re-requires them idempotently.
27
+ initializer "ask_rails.agent_tools" do |app|
28
+ agents_path = app.root.join("app/agents")
29
+ next unless agents_path.directory?
29
30
 
30
- Dir[tools_path.join("*.rb")].sort.each { |file| require file }
31
+ Dir[agents_path.join("shared/tools/*.rb"), agents_path.join("*/tools/*.rb")].uniq.sort.each do |file|
32
+ require file
33
+ end
31
34
  end
32
35
  end
33
36
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ask
4
4
  module Rails
5
- VERSION = "0.15.2"
5
+ VERSION = "0.15.3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.2
4
+ version: 0.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto