ask-agent 0.24.0 → 0.24.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: bd63de3a8095e799ea8d20b85973d6d1235b7d5799b7a5114982e6ac5a318537
4
- data.tar.gz: 5c61e5fe8075a348ef40b643c1da1a313530ce53d5b7e3160fc4a6d832d8bb94
3
+ metadata.gz: e5268e3474f109d7471749692a535a89b266e5a9d10c20499a565087500eaee8
4
+ data.tar.gz: 24fc0068d51f1eedc2e0d6f427234db468db375e915a4383533086993dab8b5d
5
5
  SHA512:
6
- metadata.gz: d203c97f1a1b232cb40a3103f485c23c1d3e09bc1e5d0112a2bf31add57d24cfd36cfc452bc366d051baf4c3f445a53567477a089f4770dfa77f872d0f621c5e
7
- data.tar.gz: b390769fa7c9ccedc0d30a8d4acab448222f8d9ac0e8e4608a40d2cf85cb7ca5eac8c0bc4daa2e1e79c461f339c358e27f395b2e04033a6e4b9fd2de4ec4f089
6
+ metadata.gz: 8dddca135834b42108d217fc09a121a4fc4fd4ad44da326849b9654f30ba393bc115b44a3bc756433a7cbb8bd1b729d02dc246feb540e6f0ff39dc2aff1e56ad
7
+ data.tar.gz: 5cde0691f9aa8bd6723c20344211c50cc18e15ffdf392d97710896d4752b8343c583faab5de7e4156e261049676dbe06e2136162a8d10d1b48e9ae3e174f7786
@@ -27,10 +27,18 @@ module Ask
27
27
 
28
28
  class << self
29
29
  # All subclasses that have been loaded, in definition order.
30
- attr_reader :subclasses
30
+ # Reads from Definition itself so intermediate base classes
31
+ # (e.g. ApplicationAgent) report the same registry.
32
+ def subclasses
33
+ Definition.instance_variable_get(:@subclasses) || []
34
+ end
31
35
 
32
36
  def inherited(subclass)
33
- @subclasses << subclass
37
+ # Track on Definition itself, not self — inherited fires with the
38
+ # immediate parent as receiver, so an intermediate base class
39
+ # (e.g. an ApplicationAgent in a Rails app) would otherwise have a
40
+ # nil @subclasses ivar.
41
+ Definition.subclasses << subclass
34
42
  subclass.instance_variable_set(:@_config, { tools: [] })
35
43
 
36
44
  # Auto-detect the directory from the file where this class is defined
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ask
4
4
  module Agent
5
- VERSION = "0.24.0"
5
+ VERSION = "0.24.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask-agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.0
4
+ version: 0.24.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto