rcrewai 0.7.0 → 0.8.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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +51 -1
  3. data/ROADMAP.md +144 -75
  4. data/docs/api/agent.md +8 -0
  5. data/docs/api/crew.md +53 -3
  6. data/docs/api/index.md +14 -13
  7. data/docs/api/task.md +7 -0
  8. data/docs/examples/async-execution.md +8 -5
  9. data/docs/examples/tool-composition.md +3 -3
  10. data/docs/index.md +22 -7
  11. data/docs/tutorials/agent-options.md +128 -0
  12. data/docs/tutorials/consensual-process.md +58 -0
  13. data/docs/tutorials/flows.md +135 -0
  14. data/docs/tutorials/index.md +45 -0
  15. data/docs/tutorials/knowledge.md +80 -0
  16. data/docs/tutorials/memory.md +90 -0
  17. data/lib/rcrewai/checkpoint/cli.rb +98 -0
  18. data/lib/rcrewai/checkpoint.rb +145 -0
  19. data/lib/rcrewai/cli.rb +12 -1
  20. data/lib/rcrewai/configuration.rb +7 -0
  21. data/lib/rcrewai/crew.rb +88 -2
  22. data/lib/rcrewai/events.rb +71 -5
  23. data/lib/rcrewai/legacy_react_runner.rb +14 -9
  24. data/lib/rcrewai/llm_client.rb +20 -15
  25. data/lib/rcrewai/llm_clients/anthropic.rb +13 -4
  26. data/lib/rcrewai/llm_clients/azure.rb +2 -2
  27. data/lib/rcrewai/llm_clients/base.rb +55 -1
  28. data/lib/rcrewai/llm_clients/bedrock.rb +134 -0
  29. data/lib/rcrewai/llm_clients/google.rb +13 -4
  30. data/lib/rcrewai/llm_clients/ollama.rb +18 -4
  31. data/lib/rcrewai/llm_clients/openai.rb +19 -15
  32. data/lib/rcrewai/llm_clients/openai_compatible.rb +34 -0
  33. data/lib/rcrewai/llm_clients/openai_responses.rb +127 -0
  34. data/lib/rcrewai/llm_clients/snowflake_cortex.rb +42 -0
  35. data/lib/rcrewai/process.rb +41 -2
  36. data/lib/rcrewai/task.rb +3 -2
  37. data/lib/rcrewai/tool_runner.rb +16 -10
  38. data/lib/rcrewai/version.rb +1 -1
  39. data/lib/rcrewai.rb +3 -0
  40. metadata +12 -1
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'securerandom'
3
4
  require_relative 'events'
4
5
  require_relative 'provider_schema'
5
6
 
@@ -16,7 +17,13 @@ module RCrewAI
16
17
  @sink = event_sink || ->(_) {}
17
18
  end
18
19
 
19
- def run(messages:) # rubocop:disable Metrics/AbcSize
20
+ def run(messages:)
21
+ Events.with_parent(@run_span_id ||= SecureRandom.uuid) { run_loop(messages: messages) }
22
+ end
23
+
24
+ private
25
+
26
+ def run_loop(messages:) # rubocop:disable Metrics/AbcSize
20
27
  msgs = messages.dup
21
28
  history = []
22
29
  iter = 0
@@ -78,8 +85,6 @@ module RCrewAI
78
85
  finish_reason: :max_iterations, usage: total_usage)
79
86
  end
80
87
 
81
- private
82
-
83
88
  # Trims the message list to the model's context window when the agent
84
89
  # supports it; a no-op otherwise.
85
90
  def fit_context(messages)
@@ -94,13 +99,13 @@ module RCrewAI
94
99
  type_sym = klass.name.split('::').last
95
100
  .gsub(/([A-Z])/) { "_#{Regexp.last_match(1).downcase}" }
96
101
  .sub(/^_/, '').to_sym
97
- @sink.call(klass.new(
98
- type: type_sym,
99
- timestamp: Time.now,
100
- agent: agent_name,
101
- iteration: iteration,
102
- **attrs
103
- ))
102
+ Events.emit(@sink, klass.new(
103
+ type: type_sym,
104
+ timestamp: Time.now,
105
+ agent: agent_name,
106
+ iteration: iteration,
107
+ **attrs
108
+ ))
104
109
  end
105
110
 
106
111
  def agent_name
@@ -110,6 +115,7 @@ module RCrewAI
110
115
  def retag(event, iter)
111
116
  event.agent = agent_name if event.respond_to?(:agent=) && event.agent.nil?
112
117
  event.iteration = iter if event.respond_to?(:iteration=) && event.iteration.nil?
118
+ event.parent_id ||= Events.current_parent
113
119
  event
114
120
  end
115
121
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RCrewAI
4
- VERSION = '0.7.0'
4
+ VERSION = '0.8.0'
5
5
  end
data/lib/rcrewai.rb CHANGED
@@ -19,6 +19,7 @@ end
19
19
  require_relative 'rcrewai/version'
20
20
  require_relative 'rcrewai/configuration'
21
21
  require_relative 'rcrewai/events'
22
+ require_relative 'rcrewai/checkpoint'
22
23
  require_relative 'rcrewai/sse_parser'
23
24
  require_relative 'rcrewai/pricing'
24
25
  require_relative 'rcrewai/llm_client'
@@ -56,3 +57,5 @@ require_relative 'rcrewai/task'
56
57
  require_relative 'rcrewai/crew'
57
58
  require_relative 'rcrewai/flow'
58
59
  require_relative 'rcrewai/mcp'
60
+ require_relative 'rcrewai/checkpoint/cli'
61
+ require_relative 'rcrewai/cli'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcrewai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - gkosmo
@@ -359,10 +359,15 @@ files:
359
359
  - docs/superpowers/specs/2026-07-06-cognitive-memory-design.md
360
360
  - docs/superpowers/specs/2026-07-07-consensual-process-design.md
361
361
  - docs/tutorials/advanced-agents.md
362
+ - docs/tutorials/agent-options.md
363
+ - docs/tutorials/consensual-process.md
362
364
  - docs/tutorials/custom-tools.md
363
365
  - docs/tutorials/deployment.md
366
+ - docs/tutorials/flows.md
364
367
  - docs/tutorials/getting-started.md
365
368
  - docs/tutorials/index.md
369
+ - docs/tutorials/knowledge.md
370
+ - docs/tutorials/memory.md
366
371
  - docs/tutorials/multiple-crews.md
367
372
  - docs/upgrading-to-0.3.md
368
373
  - docs/upgrading-to-0.4.md
@@ -384,6 +389,8 @@ files:
384
389
  - lib/rcrewai/agent.rb
385
390
  - lib/rcrewai/agent_augmentations.rb
386
391
  - lib/rcrewai/async_executor.rb
392
+ - lib/rcrewai/checkpoint.rb
393
+ - lib/rcrewai/checkpoint/cli.rb
387
394
  - lib/rcrewai/cli.rb
388
395
  - lib/rcrewai/configuration.rb
389
396
  - lib/rcrewai/context_window.rb
@@ -404,9 +411,13 @@ files:
404
411
  - lib/rcrewai/llm_clients/anthropic.rb
405
412
  - lib/rcrewai/llm_clients/azure.rb
406
413
  - lib/rcrewai/llm_clients/base.rb
414
+ - lib/rcrewai/llm_clients/bedrock.rb
407
415
  - lib/rcrewai/llm_clients/google.rb
408
416
  - lib/rcrewai/llm_clients/ollama.rb
409
417
  - lib/rcrewai/llm_clients/openai.rb
418
+ - lib/rcrewai/llm_clients/openai_compatible.rb
419
+ - lib/rcrewai/llm_clients/openai_responses.rb
420
+ - lib/rcrewai/llm_clients/snowflake_cortex.rb
410
421
  - lib/rcrewai/mcp.rb
411
422
  - lib/rcrewai/mcp/client.rb
412
423
  - lib/rcrewai/mcp/tool_adapter.rb