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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8cf33a5ee5e4a2e658e9e9b7244f0b368a188cb1a9a81d580003d7ed7f5bcb32
4
- data.tar.gz: 4f0b398650815bde265b4becd15da23ae13f868ff06791b6a410e4c561775826
3
+ metadata.gz: b2d67418e2412efacf4d0b5c35d1897826f0da1c0a52c159f7503e8b794d66f1
4
+ data.tar.gz: 2b39ea638d11e5147058a1f35e3aa3c130650972082330e2dd30a752eeb68a36
5
5
  SHA512:
6
- metadata.gz: 807a0ccb0851c2d1d51f4351072188f681c3356afbc74a477e4f795fc4c3456cf523b5d623f5d827bc5a76ab36d62e13348d13cba3298ddd6cd7822aa757814d
7
- data.tar.gz: c9e02adf485410de34cbfbc8154a893aaffb2c5c72d618aeaeb6551d9a8c6482680683a5e5528a9f4e5398cef462bfd6018582e1021a1e70915b59277a8bc42d
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ask
4
- VERSION = "0.9.0"
4
+ VERSION = "0.10.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto