ask-agent 0.30.0 → 0.30.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 +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/ask/agent/session.rb +17 -6
- data/lib/ask/agent/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cf67fcc30605c8d4752a97133a13a7fbe500c32a68c47640552bc30cf6dbea5b
|
|
4
|
+
data.tar.gz: 638931a8c1c2c5ae0ca5535e9e78e9252910106af9134366a455523925b6d895
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 01ca01b502aa5789eef910f50626085bb6675e86dedd435b189b0e928d592ac27c48c145ff5c159580c2a9854528160c86074031dccd971b033b75b6f42bf3fa
|
|
7
|
+
data.tar.gz: 6bf3ebc3428cf64c8a1ee7e958e45c349669e4eaba92a8bc5d90b522f0b9a47d4f3743570db235b8d9b4e526d3ea470eb1a81795acc6492fd67afda4b59d9b70
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [0.30.1] — 2026-08-06
|
|
2
|
+
|
|
3
|
+
### Fixed
|
|
4
|
+
|
|
5
|
+
- **Framework-injected tools are no longer persisted in session metadata.**
|
|
6
|
+
The built-in `load_skill` tool was saved alongside user tools and could
|
|
7
|
+
not be auto-instantiated on load (`LoadSkillTool` requires a registry), so
|
|
8
|
+
the previous 0.30.0 fix skipped it with a broad rescue. Persisted metadata
|
|
9
|
+
now contains only user-supplied tools (`persisted_tools`); `load_skill` is
|
|
10
|
+
re-added by `resolve_tools` per session with a proper registry.
|
|
11
|
+
- **`Session.load` no longer swallows tool-restore failures silently.** The
|
|
12
|
+
safety net now rescues only `NameError` (renamed/removed classes) and
|
|
13
|
+
`ArgumentError` (constructors with required args), and warns with the
|
|
14
|
+
tool name instead of failing the whole load — genuine tool bugs surface
|
|
15
|
+
instead of disappearing.
|
|
16
|
+
|
|
1
17
|
## [0.30.0] — 2026-08-06
|
|
2
18
|
|
|
3
19
|
### Added
|
data/lib/ask/agent/session.rb
CHANGED
|
@@ -314,14 +314,16 @@ module Ask
|
|
|
314
314
|
session = new(
|
|
315
315
|
id: data[:id],
|
|
316
316
|
model: data.dig(:metadata, :model),
|
|
317
|
-
#
|
|
318
|
-
#
|
|
319
|
-
#
|
|
320
|
-
#
|
|
317
|
+
# Restore saved user tools by class name. Tools that cannot be
|
|
318
|
+
# restored — renamed/removed classes (NameError) or constructors
|
|
319
|
+
# with required args (ArgumentError) — are skipped with a warning
|
|
320
|
+
# instead of failing the whole load; resolve_tools re-adds the
|
|
321
|
+
# framework-injected load_skill tool with a proper registry.
|
|
321
322
|
tools: data.dig(:metadata, :tools).to_a.filter_map do |name|
|
|
322
323
|
begin
|
|
323
324
|
name.constantize.new
|
|
324
|
-
rescue
|
|
325
|
+
rescue NameError, ArgumentError => e
|
|
326
|
+
warn "[ask-agent] Session.load skipped tool '#{name}': #{e.class}: #{e.message}"
|
|
325
327
|
nil
|
|
326
328
|
end
|
|
327
329
|
end,
|
|
@@ -694,6 +696,15 @@ module Ask
|
|
|
694
696
|
target.instance_variable_set(:@turn_count, data.dig(:metadata, :turn_count) || 0)
|
|
695
697
|
end
|
|
696
698
|
|
|
699
|
+
# User-supplied tools only. Framework-injected tools (the built-in
|
|
700
|
+
# load_skill tool) are re-created by resolve_tools on every session, so
|
|
701
|
+
# persisting them would leak framework internals into user data — and
|
|
702
|
+
# they cannot be auto-instantiated on load anyway (LoadSkillTool needs
|
|
703
|
+
# a registry).
|
|
704
|
+
def persisted_tools
|
|
705
|
+
@tools.reject { |t| t.is_a?(Ask::Skills::LoadSkillTool) }
|
|
706
|
+
end
|
|
707
|
+
|
|
697
708
|
def persist!
|
|
698
709
|
payload = {
|
|
699
710
|
id: @id,
|
|
@@ -707,7 +718,7 @@ module Ask
|
|
|
707
718
|
},
|
|
708
719
|
metadata: {
|
|
709
720
|
model: @chat.model.respond_to?(:id) ? @chat.model.id : @chat.model,
|
|
710
|
-
tools:
|
|
721
|
+
tools: persisted_tools.map { |t| t.class.name },
|
|
711
722
|
max_turns: @max_turns,
|
|
712
723
|
turn_count: @turn_count,
|
|
713
724
|
created_at: @created_at.iso8601,
|
data/lib/ask/agent/version.rb
CHANGED