ask-agent 0.8.0 → 0.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f95edab12d96da68593e426829ac2507682b4b5620b5ec0b09269062bf168bd9
4
- data.tar.gz: 7353fff33dba2ebff749df32d4c079759f1f4b2eca9193a5299fe9ec7238966c
3
+ metadata.gz: 9a50ba3d8610e0e05d54ff53c23757a4ef6ecfddb3bc43094d469ebd252e6cfa
4
+ data.tar.gz: 2269528d25df7991e2aefbc84c4fc89a5a6a4ac4b1d9fbfb95ab9dd421bfa9ba
5
5
  SHA512:
6
- metadata.gz: 3e3dc6f6cae44b0c2f36e12c9253b3f21e97a17634907754cc1d2ea8930bd8bcc54b2f65ef2194dae9e1e60d4a721d8071a677f3f0bbfa0d99d68515c0da82b9
7
- data.tar.gz: ab443967abf274b113b9ebd8f2901feffa1cf2d7e1436e6a14df8d1dbb87fa1f204d0cb97d2d567858e89631c0b08ed97bf4183174c6ffce97aee363ffa0f724
6
+ metadata.gz: cc258ca1b71919c61a5986f18190c3c5b2bed2d17d1f8efa6e63a8f8f37e258694603ce9b9c382e1843b6c03f94f7121b976f2875d9e429146bd024dfbd9162c
7
+ data.tar.gz: b371ea561dcd8d67e49c26e0fa18eaa0d142040f0e1adb4de7eba9c517d5cc7e03892dda1edccf2f0b46a3c2e672408f4fe8103547dee9ebd029f5d6f23d0482
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## [0.8.1] — 2026-07-21
2
+
3
+ ### Added
4
+
5
+ - **Per-agent skills via `agent_dir:`** — `Session` now accepts `agent_dir:` parameter. When set, `Ask::Skills.discover(agent_dir:)` discovers skills scoped to that agent directory, loading them alongside shared skills.
6
+
7
+ - **Agent definitions pass `agent_dir` automatically** — `Ask::Agent.new("name")` passes the agent's directory path to `Session`, enabling per-agent skill discovery without any configuration.
8
+
9
+ ### Changed
10
+
11
+ - `Ask::Agent::Session#initialize` now accepts optional `agent_dir:` keyword.
12
+ - Skills discovery in Session uses `Ask::Skills.discover(agent_dir: @agent_dir)` instead of the plain `Ask::Skills.discover`, enabling the new per-agent and shared skills paths from ask-skills 0.3.0.
13
+
1
14
  ## [0.8.0] — 2026-07-21
2
15
 
3
16
  ### Added
@@ -4,7 +4,8 @@ module Ask
4
4
  module Agent
5
5
  class Configuration
6
6
  attr_accessor :default_model, :default_max_turns, :compactor_enabled,
7
- :compactor_threshold, :parallel_tool_execution, :max_tool_retries
7
+ :compactor_threshold, :parallel_tool_execution, :max_tool_retries,
8
+ :prompt_caching
8
9
 
9
10
  # @return [Middleware::Pipeline] the middleware pipeline for provider calls
10
11
  attr_reader :middleware
@@ -18,7 +19,7 @@ module Ask
18
19
  @compactor_enabled = true
19
20
  @compactor_threshold = 0.8
20
21
  @parallel_tool_execution = true
21
- @max_tool_retries = 3
22
+ @prompt_caching = false
22
23
 
23
24
  @middleware = Middleware::Pipeline.new
24
25
  @stream_transforms = StreamTransforms::Pipeline.new
@@ -20,8 +20,10 @@ module Ask
20
20
  def initialize(model:, tools: [], max_turns: 25, max_tool_retries: 3,
21
21
  compactor: nil, hooks: {}, persistence: nil,
22
22
  id: nil, system_prompt: nil, parallel_tools: true,
23
- reflector: nil, telemetry: true, meta_agent: nil, **chat_options)
23
+ reflector: nil, telemetry: true, meta_agent: nil,
24
+ agent_dir: nil, **chat_options)
24
25
  @id = id || SecureRandom.uuid
26
+ @agent_dir = agent_dir
25
27
  @max_turns = max_turns
26
28
  @max_tool_retries = max_tool_retries
27
29
  @parallel_tools = parallel_tools
@@ -46,8 +48,8 @@ module Ask
46
48
  @compactor = compactor ? build_compactor(compactor) : nil
47
49
  @hooks = Hooks.new(hooks)
48
50
 
49
- # Auto-discover skills and inject into system prompt
50
- @skills_registry = Ask::Skills.discover rescue nil
51
+ # Auto-discover skills (shared + per-agent if agent_dir is given)
52
+ @skills_registry = Ask::Skills.discover(agent_dir: @agent_dir) rescue nil
51
53
  if @skills_registry && !@skills_registry.names.empty?
52
54
  skill_text = @skills_registry.format_for_prompt
53
55
  if !skill_text.empty? && @chat.messages.any? { |m| m.role == :system }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ask
4
4
  module Agent
5
- VERSION = "0.8.0"
5
+ VERSION = "0.8.1"
6
6
  end
7
7
  end
data/lib/ask/agent.rb CHANGED
@@ -145,6 +145,9 @@ module Ask
145
145
  config = klass._config
146
146
  session_opts = { model: config[:model] || Ask::Agent.configuration.default_model }
147
147
 
148
+ # Pass agent directory for per-agent skills discovery
149
+ session_opts[:agent_dir] = dir
150
+
148
151
  # Resolve tools
149
152
  tools = resolve_definition_tools(config[:tools], dir)
150
153
  session_opts[:tools] = tools if tools.any?
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.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto