claude_swarm 0.3.1 → 0.3.2

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: 84d6a42818a51bc2b0d47519fb874d77875c23646559a0d8820087866cc1a6d4
4
- data.tar.gz: 4f4b1a8cb570cab6c38a385e00d3155715f04a4b55f41fe87f0fb397caf0be6c
3
+ metadata.gz: 7b271585c56ae3f85e921a7558bd46d82430ee60383fc999b6e89f27ffcdd0b0
4
+ data.tar.gz: 6b84e34b59412155d1a43cc00e8c41fe989287da7b98e2b12f8e1576f2002f87
5
5
  SHA512:
6
- metadata.gz: 55fce00688afa714aa79897b008e885f600fb198b37e2bb2ba90563e57345ff922f448a86f2bde93409fdb4d5486fb763cfc1a27ba826b79106c55a92116a1e4
7
- data.tar.gz: 8f9c58fbee771dec48c0c41fd13f078633120b686ecaa95517f95269e8796f8aaaf6d9ff54556edaa8389bda10a6a53bb45d1e0318ffc79027a7b6a7e848ef11
6
+ metadata.gz: 98c7d8d77ea9fb5256556fe7e73f83194cca4893084cab5b9b1826c6426052afd12b86f4fabad28e8e35d36a0114f6f7d6e1cd25fd4f02fb40f4450a5f048940
7
+ data.tar.gz: 33c134e8f553510dfee481b935c67eae21e196c4bc8bc494657042e69e32b91238169feaf0b138a632abda219fef791ad224294da958732c135b04a9fc7a1cf0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [0.3.2]
2
+
3
+ ### Added
4
+ - **Thinking budget support**: When delegating tasks between instances, orchestrators can now leverage Claude's extended thinking feature
5
+ - Connected instances automatically support thinking budgets: "think", "think hard", "think harder", "ultrathink"
6
+ - Orchestrator instances can assign thinking levels programmatically based on task complexity
7
+ - Example: Complex architectural decisions can be delegated with "think harder" while simple queries use no thinking
8
+ - Results in better quality outputs for complex tasks and faster responses for simple ones
9
+ - Works seamlessly with existing swarm configurations - no changes needed to benefit from this feature
10
+
1
11
  ## [0.3.1]
2
12
 
3
13
  ### Added
@@ -63,10 +63,11 @@ module ClaudeSwarm
63
63
  )
64
64
 
65
65
  # Set dynamic description for TaskTool based on instance config
66
+ thinking_info = " Thinking budget levels: \"think\" < \"think hard\" < \"think harder\" < \"ultrathink\"."
66
67
  if @instance_config[:description]
67
- Tools::TaskTool.description("Execute a task using Agent #{@instance_config[:name]}. #{@instance_config[:description]}")
68
+ Tools::TaskTool.description("Execute a task using Agent #{@instance_config[:name]}. #{@instance_config[:description]} #{thinking_info}")
68
69
  else
69
- Tools::TaskTool.description("Execute a task using Agent #{@instance_config[:name]}")
70
+ Tools::TaskTool.description("Execute a task using Agent #{@instance_config[:name]}. #{thinking_info}")
70
71
  end
71
72
 
72
73
  # Register tool classes (not instances)
@@ -12,12 +12,20 @@ module ClaudeSwarm
12
12
  optional(:new_session).filled(:bool).description("Start a new session (default: false)")
13
13
  optional(:system_prompt).filled(:string).description("Override the system prompt for this request")
14
14
  optional(:description).filled(:string).description("A description for the request")
15
+ optional(:thinking_budget).filled(:string).description("Thinking budget: \"think\" < \"think hard\" < \"think harder\" < \"ultrathink\". Each level increases Claude's thinking allocation. Auto-select based on task complexity.")
15
16
  end
16
17
 
17
- def call(prompt:, new_session: false, system_prompt: nil, description: nil)
18
+ def call(prompt:, new_session: false, system_prompt: nil, description: nil, thinking_budget: nil)
18
19
  executor = ClaudeMcpServer.executor
19
20
  instance_config = ClaudeMcpServer.instance_config
20
21
 
22
+ # Prepend thinking budget to prompt if provided
23
+ final_prompt = if thinking_budget
24
+ "#{thinking_budget}: #{prompt}"
25
+ else
26
+ prompt
27
+ end
28
+
21
29
  options = {
22
30
  new_session: new_session,
23
31
  system_prompt: system_prompt || instance_config[:prompt],
@@ -33,7 +41,7 @@ module ClaudeSwarm
33
41
  # Add connections from instance config
34
42
  options[:connections] = instance_config[:connections] if instance_config[:connections]&.any?
35
43
 
36
- response = executor.execute(prompt, options)
44
+ response = executor.execute(final_prompt, options)
37
45
 
38
46
  # Return just the result text as expected by MCP
39
47
  response["result"]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ClaudeSwarm
4
- VERSION = "0.3.1"
4
+ VERSION = "0.3.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: claude_swarm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo Arruda