ask-core 0.9.0 → 0.10.0
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 +10 -0
- data/lib/ask/result.rb +15 -1
- data/lib/ask/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: b2d67418e2412efacf4d0b5c35d1897826f0da1c0a52c159f7503e8b794d66f1
|
|
4
|
+
data.tar.gz: 2b39ea638d11e5147058a1f35e3aa3c130650972082330e2dd30a752eeb68a36
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8910e469a984ca9f2758dc816b6b13714b5985fad2dbb0910b2d2d0b5313ff04abfcffad06e3fcf2de4a53eb2d3e34fda1292150867bae39d476b5ad4a3551e4
|
|
7
|
+
data.tar.gz: 6ed636a7ed4b15f423b5914708064e44ac286e6488b87857d271646e83fad113b8dec97a1a7082e95bbd598d1ee2c631a77bffa0d03595ebd7d10db9a965b2ab
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [0.10.0] - 2026-08-05
|
|
2
|
+
|
|
3
|
+
### Added
|
|
4
|
+
|
|
5
|
+
- **`Ask::Result.pending`** — a new `:pending` status for async tool
|
|
6
|
+
execution. A tool returns pending to hand the turn back to the agent
|
|
7
|
+
(the interim message gets voiced) while the real work continues in the
|
|
8
|
+
background; the session completes it later. `Result#pending?` predicates
|
|
9
|
+
it; `to_h` keeps the tool shape.
|
|
10
|
+
|
|
1
11
|
## [0.9.0] — 2026-08-03
|
|
2
12
|
|
|
3
13
|
### Changed
|
data/lib/ask/result.rb
CHANGED
|
@@ -18,7 +18,7 @@ module Ask
|
|
|
18
18
|
# Feature gems extend this class or build on it — they never redefine it.
|
|
19
19
|
# See ask-docs "Architecture & ownership" for the rule.
|
|
20
20
|
class Result
|
|
21
|
-
STATUSES = %i[success error aborted blocked short_circuited].freeze
|
|
21
|
+
STATUSES = %i[success error aborted blocked short_circuited pending].freeze
|
|
22
22
|
|
|
23
23
|
class << self
|
|
24
24
|
# @!group Factory Methods
|
|
@@ -55,6 +55,17 @@ module Ask
|
|
|
55
55
|
new(content: reason, status: :blocked)
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
# Create a pending result (async tool): the work continues in the
|
|
59
|
+
# background and the session completes it later via
|
|
60
|
+
# +Ask::Agent::Session#complete_pending_tool+. The agent voices the
|
|
61
|
+
# tool's interim message immediately and keeps talking.
|
|
62
|
+
# @param message [String] interim status the model can voice
|
|
63
|
+
# @param metadata [Hash] additional metadata
|
|
64
|
+
# @return [Ask::Result]
|
|
65
|
+
def pending(message, metadata: {})
|
|
66
|
+
new(content: message, status: :pending, metadata: metadata)
|
|
67
|
+
end
|
|
68
|
+
|
|
58
69
|
# Create a successful result (tool API — alias for +success+).
|
|
59
70
|
# @param data [Object] the tool's output
|
|
60
71
|
# @param metadata [Hash] optional metadata
|
|
@@ -117,6 +128,9 @@ module Ask
|
|
|
117
128
|
# @return [Boolean] true if the result is a success (tool API)
|
|
118
129
|
def ok? = @status == :success
|
|
119
130
|
|
|
131
|
+
# @return [Boolean] true if the result is pending (async tool running)
|
|
132
|
+
def pending? = @status == :pending
|
|
133
|
+
|
|
120
134
|
# @return [Boolean] true if the result is a success (tool API)
|
|
121
135
|
def ok = @status == :success
|
|
122
136
|
|
data/lib/ask/version.rb
CHANGED