praxo-core 0.1.0 → 0.2.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/LICENSE +21 -21
- data/README.md +74 -66
- data/api/0.2.0.txt +112 -0
- data/lib/praxo/agent.rb +221 -162
- data/lib/praxo/errors.rb +18 -18
- data/lib/praxo/json.rb +47 -47
- data/lib/praxo/jsonschema.rb +122 -122
- data/lib/praxo/middleware.rb +133 -133
- data/lib/praxo/models.rb +154 -154
- data/lib/praxo/plugin.rb +147 -147
- data/lib/praxo/runtime.rb +224 -224
- data/lib/praxo/toolcall.rb +96 -96
- data/lib/praxo.rb +9 -9
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 502bce398e33748c87f2943e8815ca97e790aa2cc294fbf81d1ecd5cbd82e742
|
|
4
|
+
data.tar.gz: 5b062bf089d542f73f77cef34ba8a023450023782fd32f9be6aba1ecf244575c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5544e44f1881d0116dab1e92ae17bf5294111165a1f001b6b132f67f9be840e1837a2c6a03400546ab295e9c0e7106bed6f21be81d7ef038262efd161c0be407
|
|
7
|
+
data.tar.gz: 9da94d37f066d0ae549366c3f09efd3e283c4167264639a84f15662d7b04a53de8c673efe93c24ca05ae5d1764a4f64874aecef0740ec343523cef9e25b21023
|
data/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 AxisVela
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AxisVela
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
|
@@ -1,66 +1,74 @@
|
|
|
1
|
-
# PRAXO-CORE Ruby Core
|
|
2
|
-
|
|
3
|
-
PRAXO-CORE is an embeddable, MIT-licensed agent framework. This gem is its
|
|
4
|
-
native Ruby Core: an agent loop with tool registration and dispatch, policy
|
|
5
|
-
hooks, typed events, memory, checkpoints, context budgets, middleware, JSON
|
|
6
|
-
Schema validation, and plugin manifest parsing.
|
|
7
|
-
|
|
8
|
-
The normative contract is [`spec/`](../../spec/README.md); Go remains the
|
|
9
|
-
reference implementation.
|
|
10
|
-
|
|
11
|
-
- `SPEC_VERSION`: `0.2.0`
|
|
12
|
-
- Core version: `0.
|
|
13
|
-
- Tier: core
|
|
14
|
-
- License: MIT
|
|
15
|
-
- Dependencies: Ruby standard library only
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
options
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
##
|
|
65
|
-
|
|
66
|
-
|
|
1
|
+
# PRAXO-CORE Ruby Core
|
|
2
|
+
|
|
3
|
+
PRAXO-CORE is an embeddable, MIT-licensed agent framework. This gem is its
|
|
4
|
+
native Ruby Core: an agent loop with tool registration and dispatch, policy
|
|
5
|
+
hooks, typed events, memory, checkpoints, context budgets, middleware, JSON
|
|
6
|
+
Schema validation, and plugin manifest parsing.
|
|
7
|
+
|
|
8
|
+
The normative contract is [`spec/`](../../spec/README.md); Go remains the
|
|
9
|
+
reference implementation.
|
|
10
|
+
|
|
11
|
+
- `SPEC_VERSION`: `0.2.0`
|
|
12
|
+
- Core version: `0.2.0`
|
|
13
|
+
- Tier: core
|
|
14
|
+
- License: MIT
|
|
15
|
+
- Dependencies: Ruby standard library only
|
|
16
|
+
- The latest RubyGems package is `praxo-core@0.1.0`; `0.2.0` is a source release
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
gem install praxo-core
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Scope
|
|
25
|
+
|
|
26
|
+
The Core implements all eleven vector groups: toolcall, JSON Schema, plugin,
|
|
27
|
+
memory, event, stream, checkpoint, policy, context, middleware, and the agent
|
|
28
|
+
loop. It includes a public API snapshot and a dependency-free test runner.
|
|
29
|
+
|
|
30
|
+
## Build and test
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
ruby language/ruby/conformance/run.rb
|
|
34
|
+
ruby language/ruby/api-snapshot.rb --check
|
|
35
|
+
ruby language/ruby/tests/run.rb
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Quickstart
|
|
39
|
+
|
|
40
|
+
```ruby
|
|
41
|
+
$LOAD_PATH.unshift('language/ruby/lib')
|
|
42
|
+
require 'praxo'
|
|
43
|
+
|
|
44
|
+
model = Praxo::Agent::StaticModel.new('hello')
|
|
45
|
+
options = Praxo::Agent::AgentOptions.new(model)
|
|
46
|
+
result = Praxo::Agent.run_agent(
|
|
47
|
+
options,
|
|
48
|
+
Praxo::Models.session(id: 'demo'),
|
|
49
|
+
'hello'
|
|
50
|
+
)
|
|
51
|
+
puts result.output
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Tools register on the options object:
|
|
55
|
+
|
|
56
|
+
```ruby
|
|
57
|
+
registry = Praxo::Agent::ToolRegistry.new
|
|
58
|
+
registry.register(Praxo::Agent::FuncTool.new('echo', 'Echo arguments',
|
|
59
|
+
->(arguments) { arguments }))
|
|
60
|
+
options.tools = registry
|
|
61
|
+
options.max_steps = 8
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Layout
|
|
65
|
+
|
|
66
|
+
- `lib/praxo/` package source.
|
|
67
|
+
- `conformance/run.rb` vector runner.
|
|
68
|
+
- `api-snapshot.rb` and `api/` public API snapshot.
|
|
69
|
+
- `tests/run.rb` test suite.
|
|
70
|
+
|
|
71
|
+
## Release
|
|
72
|
+
|
|
73
|
+
Tag shape: `ruby/v0.2.0`. The tag targets `SPEC_VERSION` `0.2.0`. See
|
|
74
|
+
[CHANGELOG.md](CHANGELOG.md) for per-release changes and compatibility notes.
|
data/api/0.2.0.txt
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# PRAXO-CORE Ruby API 0.2.0
|
|
2
|
+
# SPEC_VERSION 0.2.0
|
|
3
|
+
|
|
4
|
+
class AgentOptions
|
|
5
|
+
class CallLimit
|
|
6
|
+
class CheckpointAllowlist
|
|
7
|
+
class ContextBudget
|
|
8
|
+
class Error
|
|
9
|
+
class FilterSink
|
|
10
|
+
class FuncTool
|
|
11
|
+
class MemoryStore
|
|
12
|
+
class MultiSink
|
|
13
|
+
class PathChecker
|
|
14
|
+
class PiiRedactor
|
|
15
|
+
class Runner
|
|
16
|
+
class StaticModel
|
|
17
|
+
class StructuredOutput
|
|
18
|
+
class ToolRegistry
|
|
19
|
+
class ToolSelection
|
|
20
|
+
def action
|
|
21
|
+
def after_run
|
|
22
|
+
def allowed?
|
|
23
|
+
def allows?
|
|
24
|
+
def apply
|
|
25
|
+
def array
|
|
26
|
+
def as_int
|
|
27
|
+
def as_object
|
|
28
|
+
def as_string
|
|
29
|
+
def authorize
|
|
30
|
+
def before_model
|
|
31
|
+
def before_run
|
|
32
|
+
def before_tool
|
|
33
|
+
def bool
|
|
34
|
+
def check
|
|
35
|
+
def check_enum
|
|
36
|
+
def check_keys
|
|
37
|
+
def compact
|
|
38
|
+
def content_block
|
|
39
|
+
def decision
|
|
40
|
+
def emit
|
|
41
|
+
def equals
|
|
42
|
+
def error
|
|
43
|
+
def error_code
|
|
44
|
+
def estimate_tokens
|
|
45
|
+
def event
|
|
46
|
+
def extract_json
|
|
47
|
+
def fallback_model
|
|
48
|
+
def filter
|
|
49
|
+
def generate
|
|
50
|
+
def get
|
|
51
|
+
def has?
|
|
52
|
+
def initialize
|
|
53
|
+
def int
|
|
54
|
+
def invoke
|
|
55
|
+
def invoke_tool
|
|
56
|
+
def marshal
|
|
57
|
+
def memory_record
|
|
58
|
+
def message
|
|
59
|
+
def message_assistant
|
|
60
|
+
def message_text
|
|
61
|
+
def message_tool
|
|
62
|
+
def message_wire
|
|
63
|
+
def parse
|
|
64
|
+
def parse_input_json
|
|
65
|
+
def parse_json_call
|
|
66
|
+
def parse_manifest
|
|
67
|
+
def parse_plain
|
|
68
|
+
def parse_tag
|
|
69
|
+
def parse_toolcall
|
|
70
|
+
def parse_xml
|
|
71
|
+
def plus
|
|
72
|
+
def put
|
|
73
|
+
def redact
|
|
74
|
+
def redact_value
|
|
75
|
+
def register
|
|
76
|
+
def reject
|
|
77
|
+
def request
|
|
78
|
+
def resolve_path
|
|
79
|
+
def response
|
|
80
|
+
def run
|
|
81
|
+
def run_agent
|
|
82
|
+
def run_result
|
|
83
|
+
def search
|
|
84
|
+
def session
|
|
85
|
+
def specs
|
|
86
|
+
def string
|
|
87
|
+
def stringify
|
|
88
|
+
def strip_markup
|
|
89
|
+
def structured_apply
|
|
90
|
+
def text_present
|
|
91
|
+
def tool_call
|
|
92
|
+
def tool_spec
|
|
93
|
+
def truncate_to_tokens
|
|
94
|
+
def unmarshal
|
|
95
|
+
def usage
|
|
96
|
+
def validate
|
|
97
|
+
def visit
|
|
98
|
+
def visit_array
|
|
99
|
+
def visit_boolean
|
|
100
|
+
def visit_number
|
|
101
|
+
def visit_object
|
|
102
|
+
def visit_string
|
|
103
|
+
def within?
|
|
104
|
+
module Agent
|
|
105
|
+
module Json
|
|
106
|
+
module JsonSchema
|
|
107
|
+
module Middleware
|
|
108
|
+
module Models
|
|
109
|
+
module Plugin
|
|
110
|
+
module Praxo
|
|
111
|
+
module Runtime
|
|
112
|
+
module Toolcall
|