ask-agent 0.24.0 → 0.24.2

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: c4f30ce069402dd4a125120e13e63fbbb438ca2270cd683a199d8f774d93b40c
4
+ data.tar.gz: db1e37fea28111e58ac75723d483019c6e13bec7ed0fa4b3ed0c81dcbda0621d
5
5
  SHA512:
6
- metadata.gz: d203c97f1a1b232cb40a3103f485c23c1d3e09bc1e5d0112a2bf31add57d24cfd36cfc452bc366d051baf4c3f445a53567477a089f4770dfa77f872d0f621c5e
7
- data.tar.gz: b390769fa7c9ccedc0d30a8d4acab448222f8d9ac0e8e4608a40d2cf85cb7ca5eac8c0bc4daa2e1e79c461f339c358e27f395b2e04033a6e4b9fd2de4ec4f089
6
+ metadata.gz: 2d4562819a0a62a758e173ef3473800880c3da920a1bf00466933a1ff39a488e6cfc35b82e89429add6c5a255f4593888e48c191bed4c286324da0a5132bec5a
7
+ data.tar.gz: d1f94898e2155cf63d8ef04e6e458582ef9fed2c5b74adf007a27c1562bd0958165a79070612b5a08cca87b18e16e216fc6efd5352e79a39e6f76d94b0d4fe5a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## [0.24.2] — 2026-07-30
2
+
3
+ ### Fixed
4
+
5
+ - **Definitions discovered through an intermediate base class no longer
6
+ crash.** `Definition.inherited` appended to `@subclasses` on `self`, so
7
+ subclassing `Ask::Agent::Definition` through an application base class
8
+ (e.g. `class Agent < ApplicationAgent` in a Rails app) made the ivar nil
9
+ and raised `NoMethodError` on load. Tracking now reads the registry from
10
+ `Definition` itself, and `Definition.subclasses` reports the same list
11
+ regardless of receiver.
12
+
13
+ - **Changelog for 0.24.1.** The subclass-chain fix shipped as 0.24.1
14
+ without a changelog entry; it is documented here and republished as
15
+ 0.24.2 so the gem content includes it.
16
+
1
17
  ## [0.24.0] — 2026-07-30
2
18
 
3
19
  ### Changed
@@ -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.2"
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto