praxo-core 0.3.0 → 0.4.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 +4 -4
- data/README.md +5 -4
- data/api/0.1.0.txt +110 -110
- data/api/0.2.0.txt +112 -112
- data/api/0.3.0.txt +122 -119
- data/api/0.4.0.txt +122 -0
- data/lib/praxo/agent.rb +352 -292
- data/lib/praxo/models.rb +21 -0
- metadata +2 -1
data/lib/praxo/models.rb
CHANGED
|
@@ -29,6 +29,10 @@ module Praxo
|
|
|
29
29
|
Action = Struct.new(:kind, :session_id, :tool_name, :arguments, keyword_init: true)
|
|
30
30
|
Decision = Struct.new(:allowed, :reason, keyword_init: true)
|
|
31
31
|
Event = Struct.new(:type, :session_id, :run_id, :data, keyword_init: true)
|
|
32
|
+
Interrupt = Struct.new(:run_id, :session_id, :call, keyword_init: true)
|
|
33
|
+
InterruptDecision = Struct.new(
|
|
34
|
+
:action, :arguments, :response, :reason, keyword_init: true
|
|
35
|
+
)
|
|
32
36
|
StreamPart = Struct.new(:run_id, :session_id, :kind, :step, :data, keyword_init: true)
|
|
33
37
|
|
|
34
38
|
module_function
|
|
@@ -42,6 +46,23 @@ module Praxo
|
|
|
42
46
|
)
|
|
43
47
|
end
|
|
44
48
|
|
|
49
|
+
def interrupt(**args)
|
|
50
|
+
Interrupt.new(
|
|
51
|
+
run_id: args[:run_id] || '',
|
|
52
|
+
session_id: args[:session_id] || '',
|
|
53
|
+
call: args[:call]
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def interrupt_decision(**args)
|
|
58
|
+
InterruptDecision.new(
|
|
59
|
+
action: args[:action] || '',
|
|
60
|
+
arguments: args[:arguments],
|
|
61
|
+
response: args[:response] || '',
|
|
62
|
+
reason: args[:reason] || ''
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
45
66
|
def tool_call(**args)
|
|
46
67
|
ToolCall.new(
|
|
47
68
|
id: args[:id] || '',
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: praxo-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- AxisVela
|
|
@@ -22,6 +22,7 @@ files:
|
|
|
22
22
|
- api/0.1.0.txt
|
|
23
23
|
- api/0.2.0.txt
|
|
24
24
|
- api/0.3.0.txt
|
|
25
|
+
- api/0.4.0.txt
|
|
25
26
|
- lib/praxo.rb
|
|
26
27
|
- lib/praxo/agent.rb
|
|
27
28
|
- lib/praxo/errors.rb
|