ask-agent 0.25.3 → 0.25.5

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: ec5991dad0128d2383500176d9872d4fda5ac504f81826eeac343a1b8435616b
4
- data.tar.gz: f62dd7104119cd637c2ca590bc8c3e7c7c6c32e8f85d2d0e7e2cc2cbd2e8b019
3
+ metadata.gz: d6b698047e4a92d613f1d6f21b7c82ab46a02ee12886f9625913feb701b67b1a
4
+ data.tar.gz: 6f2bd64156cafdeea1b8bdbcaca0b5eca9470250e1f3e65ead20ea2f1098a451
5
5
  SHA512:
6
- metadata.gz: 0ea8e0cf1e8750265f971b7379db7fddbc8c425d7f765835bc1d2b23e0fdf79001b2ceb93cc70e5647999e4327f6aa0ae3e56ed6708cdd8c66ea8e0006ddb039
7
- data.tar.gz: bd758b33c296cd20fd90429d269fb079b5a1501b074c854d1dcfe27c007c2234b509693e7a136abf801738c775ed7c64894e2e2bc7c7414499f14ec2bbd6b416
6
+ metadata.gz: 76e12be0f0ab184371e8253f4abfa0f1f8c80106ea905050afc3a6d7d7a07df4a71230d4ed42a2309359327956022b6728edc4f0c50a8f2fdbfe9b2d39237abc
7
+ data.tar.gz: 99b18d89c18690ebb314a2e7871fc05bb4c0d79ced8e87c630de1fe6b558eb18954f253eafac80dfdda45bcc38e44efbd461cab0089c7813df37ca7da1899e5c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ ## [0.25.5] - 2026-08-05
2
+
3
+ ### Changed
4
+
5
+ - **`load_skill` tool moved to ask-skills.** Sessions now inject
6
+ `Ask::Skills::LoadSkillTool` (ask-skills owns discovery, listing, and
7
+ loading). No API change for session users — `skills_disclosure false`
8
+ still opts out of the auto-injected tool.
9
+
10
+ ## [0.25.4] - 2026-08-05
11
+
12
+ ### Added
13
+
14
+ - **`skills_disclosure` opt-out for progressive skill disclosure.** Sessions
15
+ auto-inject the `load_skill` tool by default; agents with a fixed tool
16
+ surface (e.g. voice receptionists) can declare `skills_disclosure false`
17
+ in their definition (or pass `skills_disclosure: false` to
18
+ `Session.new`) to keep the tool payload minimal and deterministic.
19
+
1
20
  ## [0.25.3] - 2026-08-04
2
21
 
3
22
  ### Fixed
@@ -92,6 +92,18 @@ module Ask
92
92
  end
93
93
  end
94
94
 
95
+ # Set or get the progressive skill disclosure flag. When enabled
96
+ # (default), sessions include the load_skill tool so the model can
97
+ # pull in skills on demand. Voice/UI agents with a fixed tool
98
+ # surface can disable it to keep the payload minimal.
99
+ def skills_disclosure(value = :__no_value__)
100
+ if value == :__no_value__
101
+ _config.key?(:skills_disclosure) ? _config[:skills_disclosure] : true
102
+ else
103
+ _config[:skills_disclosure] = value
104
+ end
105
+ end
106
+
95
107
  # Set an arbitrary Session option. Accepts any key that
96
108
  # Ask::Agent::Session.new understands.
97
109
  #
@@ -21,12 +21,14 @@ module Ask
21
21
  compactor: nil, hooks: {}, state: nil, persistence: nil,
22
22
  id: nil, system_prompt: nil, parallel_tools: true,
23
23
  reflector: nil, telemetry: true, meta_agent: nil,
24
- agent_dir: nil, evaluator: nil, audit_log: nil, **chat_options)
24
+ agent_dir: nil, evaluator: nil, audit_log: nil,
25
+ skills_disclosure: true, **chat_options)
25
26
  @id = id || SecureRandom.uuid
26
27
  @agent_dir = agent_dir
27
28
  @max_turns = max_turns
28
29
  @max_tool_retries = max_tool_retries
29
30
  @parallel_tools = parallel_tools
31
+ @skills_disclosure = skills_disclosure
30
32
  @event_handlers = { all: [] }
31
33
  @running = false
32
34
  @deleted = false
@@ -356,13 +358,20 @@ module Ask
356
358
  tool.is_a?(Class) ? tool.new : tool
357
359
  end
358
360
  # Always include the load_skill tool for progressive skill disclosure,
359
- # unless the test framework is loaded (test mode keeps tools deterministic)
360
- unless defined?(Ask::Agent::Test) && Ask::Agent::Test
361
- resolved << Skills::LoadSkillTool.new(registry: @skills_registry) unless resolved.any? { |t| t.name == "load_skill" }
361
+ # unless disabled by the agent (voice agents keep a minimal tool
362
+ # surface) or the test framework is loaded (test mode keeps tools
363
+ # deterministic)
364
+ if skills_disclosure_enabled?
365
+ resolved << Ask::Skills::LoadSkillTool.new(registry: @skills_registry) unless resolved.any? { |t| t.name == "load_skill" }
362
366
  end
363
367
  resolved
364
368
  end
365
369
 
370
+ # Whether progressive skill disclosure is active for this session.
371
+ def skills_disclosure_enabled?
372
+ @skills_disclosure && !(defined?(Ask::Agent::Test) && Ask::Agent::Test)
373
+ end
374
+
366
375
  def build_compactor(config)
367
376
  global = Ask::Agent.configuration
368
377
  compactor = Compactor.new(
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ask
4
4
  module Agent
5
- VERSION = "0.25.3"
5
+ VERSION = "0.25.5"
6
6
  end
7
7
  end
data/lib/ask/agent.rb CHANGED
@@ -170,6 +170,7 @@ module Ask
170
170
  session_opts[:provider] = config[:provider] if config[:provider]
171
171
  session_opts[:max_turns] = config[:max_turns] if config[:max_turns]
172
172
  session_opts[:parallel_tools] = config[:parallel_tools] if config.key?(:parallel_tools)
173
+ session_opts[:skills_disclosure] = config[:skills_disclosure] if config.key?(:skills_disclosure)
173
174
 
174
175
  # Pass arbitrary session options
175
176
  if config[:options]
@@ -260,7 +261,6 @@ require_relative "agent/configuration"
260
261
  require_relative "agent/meta_agent"
261
262
  require_relative "agent/persistence/base"
262
263
  require_relative "agent/persistence/in_memory"
263
- require_relative "agent/skills/load_skill_tool"
264
264
  require_relative "agent/scheduler"
265
265
  require_relative "agent/definition"
266
266
  require_relative "agent/cli"
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.25.3
4
+ version: 0.25.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto
@@ -191,7 +191,6 @@ files:
191
191
  - lib/ask/agent/reflector.rb
192
192
  - lib/ask/agent/scheduler.rb
193
193
  - lib/ask/agent/session.rb
194
- - lib/ask/agent/skills/load_skill_tool.rb
195
194
  - lib/ask/agent/stream_transforms/base.rb
196
195
  - lib/ask/agent/stream_transforms/extract_json.rb
197
196
  - lib/ask/agent/stream_transforms/pipeline.rb
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Ask
4
- module Agent
5
- module Skills
6
- # Built-in tool that lets the LLM load a discovered skill's full
7
- # instructions on demand. Skills are listed by name and description
8
- # via progressive disclosure — the LLM decides which to load.
9
- #
10
- # Usage by the LLM: call load_skill with the skill name.
11
- class LoadSkillTool < Ask::Tool
12
- description "Load the full instructions for a skill by name. Use this when a listed skill seems relevant to the current task."
13
-
14
- param :name, type: :string, desc: "Name of the skill to load (e.g., writing-guide)", required: true
15
-
16
- def initialize(registry:)
17
- @registry = registry
18
- super()
19
- end
20
-
21
- def execute(name:)
22
- skill = @registry&.[](name)
23
- unless skill
24
- available = @registry&.names&.join(", ") || "none"
25
- return Ask::Result.failure("Skill '#{name}' not found. Available skills: #{available}")
26
- end
27
-
28
- # Return the full skill content so it can be injected into conversation
29
- content = "## Skill: #{skill.name}\n#{skill.description}\n\n#{skill.instructions}"
30
- Ask::Result.ok(data: { name: skill.name, content: content })
31
- end
32
-
33
- def name
34
- "load_skill"
35
- end
36
- end
37
- end
38
- end
39
- end