praxo-core 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b720116e91a4927eacec6a64291d1f9d7ae845e6d1d3e2f55af7dfeb11a21bd
4
- data.tar.gz: a4da48da732eb8cf41a303ad09a8d91d0ba0d17e4d6a57da1d2a9c7fe2bd1305
3
+ metadata.gz: 16f51199165f1dfbb11aea069e4aea7b246a352e900464e43fd6017a32187df5
4
+ data.tar.gz: 10bcb9c2f8856b6ad318f8a45e0b5cb58ed8aac3e1dc0b3e4ee43ea03f7b53f2
5
5
  SHA512:
6
- metadata.gz: 69c1fb1c50aaa2ca8adb3e55030a12f2563be7e974e0c92967e6cda12167803d945b83d6a1968c1be3eda23f0f17e7c3ccd17869a45149d2f5a6c456dad61880
7
- data.tar.gz: c688bf1bbae8f98aa6a6890822213806203a20d77fedea103376b0dedb64c9d9a42bfc99eb8f7e628820a7cebd3c975056ee4eb9eec86d9321065a15f9840620
6
+ metadata.gz: 3b7fef8001aa05f6c884f850820298a213cb6abafc8e0751a9b74867e3221ed79058ba1da42555d9236db1c73f7f7d6c53f5a333ab98397e9359acc867a2a2ff
7
+ data.tar.gz: d70c6a3138e435d5c7f77bde234377272b2dbdddb19514e2efa242c29cd10757fc586dbf56ee7dcaf1247eba7422ea637fa7f737f7c6a07ccc5218ce045cb2f1
data/README.md CHANGED
@@ -20,8 +20,10 @@ reference implementation.
20
20
 
21
21
  - Registry introduction: [REGISTRY.md](https://github.com/axisvela/praxo-core/blob/main/language/ruby/REGISTRY.md)
22
22
  - Machine-readable entry: [llms.txt](https://github.com/axisvela/praxo-core/blob/main/language/ruby/llms.txt) and [llms.md](https://github.com/axisvela/praxo-core/blob/main/language/ruby/llms.md)
23
+ - [Examples](https://github.com/axisvela/praxo-core/tree/main/language/ruby/examples): runnable language-specific examples.
23
24
  - Coding-agent contract: [docs/getting-started/coding-agents.md](https://github.com/axisvela/praxo-core/blob/main/docs/getting-started/coding-agents.md)
24
- - Registry: [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.5.0)
25
+ - Registry: [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.7.0)
26
+ - Community: [X](https://x.com/axisvela) · [Weibo](https://weibo.com/u/1936025761)
25
27
 
26
28
  ## Install
27
29
 
@@ -132,5 +134,5 @@ before emitting.
132
134
 
133
135
  ## Release
134
136
 
135
- Tag shape: `ruby/v0.7.0`. The tag targets `SPEC_VERSION` `0.2.0`. See
137
+ Tag shape: `ruby/v0.8.0`. The tag targets `SPEC_VERSION` `0.2.0`. See
136
138
  [CHANGELOG.md](CHANGELOG.md) for per-release changes and compatibility notes.
data/REGISTRY.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # PRAXO-CORE Ruby Registry Introduction
2
2
 
3
- **Status:** published; split source repository. Source version `0.7.0`, source
4
- tag `ruby/v0.7.0`. Published registry version: `0.5.0`. Registry
3
+ **Status:** published; split source repository. Source version `0.8.0`, source
4
+ tag `ruby/v0.8.0`. Published registry version: `0.7.0`. Registry
5
5
  pages are release snapshots; verify the published version before relying on a
6
6
  feature.
7
7
 
@@ -14,12 +14,12 @@ PRAXO-CORE is an embeddable, MIT-licensed agent framework. This gem is its nativ
14
14
  | Field | Value |
15
15
  | --- | --- |
16
16
  | Package | `praxo-core` |
17
- | Registry | [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.5.0) |
18
- | Source version | `0.7.0` |
19
- | Published registry version | `0.5.0` |
17
+ | Registry | [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.7.0) |
18
+ | Source version | `0.8.0` |
19
+ | Published registry version | `0.7.0` |
20
20
  | Install (published) | `gem install praxo-core` |
21
21
  | Install (source/release prepared) | `gem install praxo-core` |
22
- | Source tag | `ruby/v0.7.0` |
22
+ | Source tag | `ruby/v0.8.0` |
23
23
  | Tier | Core |
24
24
  | Contract | `SPEC_VERSION` `0.2.0` |
25
25
  | Documentation | https://axisvela.github.io/praxo-core/languages/ruby/ |
@@ -39,11 +39,17 @@ PRAXO-CORE is an embeddable, MIT-licensed agent framework. This gem is its nativ
39
39
 
40
40
  ## Coding-agent entry
41
41
 
42
+ - [Examples](https://github.com/axisvela/praxo-core/tree/main/language/ruby/examples): runnable language-specific examples.
42
43
  - [llms.txt](llms.txt): compact machine-readable entry for this language.
43
44
  - [llms.md](llms.md): Markdown version of the same entry.
44
45
  - [Coding-agent contract](../../docs/getting-started/coding-agents.md): explicit
45
46
  scope, final-argument authorization, denial tests, and verification commands.
46
47
 
48
+ ## Community
49
+
50
+ - X: <https://x.com/axisvela>
51
+ - Weibo: <https://weibo.com/u/1936025761>
52
+
47
53
  ## Boundaries
48
54
 
49
55
  - PRAXO-CORE is an embeddable, MIT-licensed execution kernel, not a hosted
data/api/0.8.0.txt ADDED
@@ -0,0 +1,135 @@
1
+ # PRAXO-CORE Ruby API 0.8.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 FuncRetriever
11
+ class FuncTool
12
+ class MemoryStore
13
+ class MultiSink
14
+ class PathChecker
15
+ class PiiRedactor
16
+ class Runner
17
+ class StaticModel
18
+ class StructuredOutput
19
+ class SubagentManager
20
+ class ToolRegistry
21
+ class ToolSelection
22
+ def action
23
+ def after_run
24
+ def allowed?
25
+ def allows?
26
+ def apply
27
+ def apply_interrupt
28
+ def array
29
+ def as_int
30
+ def as_object
31
+ def as_string
32
+ def authorize
33
+ def before_model
34
+ def before_run
35
+ def before_tool
36
+ def bool
37
+ def cancel
38
+ def check
39
+ def check_cancelled
40
+ def check_enum
41
+ def check_keys
42
+ def compact
43
+ def content_block
44
+ def copy
45
+ def decision
46
+ def emit
47
+ def emit_stream
48
+ def equals
49
+ def error
50
+ def error_code
51
+ def estimate_tokens
52
+ def event
53
+ def execute
54
+ def execute_tool
55
+ def extract_json
56
+ def fallback_model
57
+ def filter
58
+ def generate
59
+ def get
60
+ def has?
61
+ def initialize
62
+ def int
63
+ def interrupt
64
+ def interrupt_decision
65
+ def invoke
66
+ def invoke_tool
67
+ def invoke_tools
68
+ def launch
69
+ def marshal
70
+ def memory_record
71
+ def message
72
+ def message_assistant
73
+ def message_text
74
+ def message_tool
75
+ def message_wire
76
+ def parse
77
+ def parse_input_json
78
+ def parse_json_call
79
+ def parse_manifest
80
+ def parse_plain
81
+ def parse_tag
82
+ def parse_toolcall
83
+ def parse_xml
84
+ def plus
85
+ def prepare_tool
86
+ def put
87
+ def redact
88
+ def redact_value
89
+ def register
90
+ def reject
91
+ def request
92
+ def resolve_path
93
+ def response
94
+ def retrieve
95
+ def run
96
+ def run_agent
97
+ def run_result
98
+ def search
99
+ def session
100
+ def set
101
+ def specs
102
+ def stream_part
103
+ def string
104
+ def stringify
105
+ def strip_markup
106
+ def structured_apply
107
+ def text_present
108
+ def timestamp
109
+ def to_wire
110
+ def tool_call
111
+ def tool_spec
112
+ def truncate_to_tokens
113
+ def unmarshal
114
+ def update
115
+ def usage
116
+ def validate
117
+ def visit
118
+ def visit_array
119
+ def visit_boolean
120
+ def visit_number
121
+ def visit_object
122
+ def visit_string
123
+ def wait
124
+ def within?
125
+ module Agent
126
+ module Delegation
127
+ module Json
128
+ module JsonSchema
129
+ module Middleware
130
+ module Models
131
+ module Plugin
132
+ module Praxo
133
+ module Runtime
134
+ module SSE
135
+ module Toolcall
data/lib/praxo/agent.rb CHANGED
@@ -36,7 +36,16 @@ module Praxo
36
36
 
37
37
  def specs
38
38
  @tools.values.map do |tool|
39
- Models.tool_spec(name: tool.name, description: tool.description)
39
+ if tool.respond_to?(:spec)
40
+ tool.spec
41
+ else
42
+ Models.tool_spec(
43
+ name: tool.name,
44
+ description: tool.description,
45
+ parameters: tool.respond_to?(:parameters) ? tool.parameters : nil,
46
+ risk: tool.respond_to?(:risk) ? tool.risk : nil
47
+ )
48
+ end
40
49
  end.sort_by(&:name)
41
50
  end
42
51
  end
@@ -67,7 +76,7 @@ module Praxo
67
76
  :max_steps, :max_tokens, :tool_choice, :middleware,
68
77
  :allowed_tools, :cancellation, :on_stream,
69
78
  :max_parallel_tools, :interrupt_on, :on_interrupt_decision,
70
- :on_interrupt
79
+ :on_interrupt, :require_policy, :require_tool_scope
71
80
 
72
81
  def initialize(model)
73
82
  @model = model
@@ -87,11 +96,21 @@ module Praxo
87
96
  @interrupt_on = []
88
97
  @on_interrupt_decision = nil
89
98
  @on_interrupt = nil
99
+ @require_policy = false
100
+ @require_tool_scope = false
90
101
  end
91
102
  end
92
103
 
93
104
  class Runner
94
105
  def initialize(options)
106
+ if options.require_policy && options.policy.nil?
107
+ Praxo.error('AGENT_INVALID_OPTIONS',
108
+ 'agent: require policy: policy is required')
109
+ end
110
+ if options.require_tool_scope && options.allowed_tools.empty?
111
+ Praxo.error('AGENT_INVALID_OPTIONS',
112
+ 'agent: require tool scope: allowed_tools must not be empty')
113
+ end
95
114
  @options = options
96
115
  end
97
116
 
data/llms.md CHANGED
@@ -7,12 +7,12 @@
7
7
  ## Package
8
8
 
9
9
  - package: `praxo-core`
10
- - registry: [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.5.0)
11
- - source_version: `0.7.0`
12
- - published_version: `0.5.0`
10
+ - registry: [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.7.0)
11
+ - source_version: `0.8.0`
12
+ - published_version: `0.7.0`
13
13
  - install_published: `gem install praxo-core`
14
14
  - install_source: `gem install praxo-core`
15
- - source_tag: `ruby/v0.7.0`
15
+ - source_tag: `ruby/v0.8.0`
16
16
  - tier: Core
17
17
  - contract: `SPEC_VERSION` `0.2.0`
18
18
  - documentation: https://axisvela.github.io/praxo-core/languages/ruby/
@@ -34,8 +34,14 @@
34
34
  - Registry introduction: `REGISTRY.md`
35
35
  - Markdown entry: `llms.md`
36
36
  - Compact entry: `llms.txt`
37
+ - [Examples](https://github.com/axisvela/praxo-core/tree/main/language/ruby/examples): runnable language-specific examples.
37
38
  - Coding-agent contract: ../../docs/getting-started/coding-agents.md
38
39
 
40
+ ## Community
41
+
42
+ - X: <https://x.com/axisvela>
43
+ - Weibo: <https://weibo.com/u/1936025761>
44
+
39
45
  ## Boundaries
40
46
 
41
47
  - In-process framework; not a model provider, hosted service, workflow engine,
data/llms.txt CHANGED
@@ -7,12 +7,12 @@
7
7
  # Package
8
8
 
9
9
  - package: `praxo-core`
10
- - registry: [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.5.0)
11
- - source_version: `0.7.0`
12
- - published_version: `0.5.0`
10
+ - registry: [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.7.0)
11
+ - source_version: `0.8.0`
12
+ - published_version: `0.7.0`
13
13
  - install_published: `gem install praxo-core`
14
14
  - install_source: `gem install praxo-core`
15
- - source_tag: `ruby/v0.7.0`
15
+ - source_tag: `ruby/v0.8.0`
16
16
  - tier: Core
17
17
  - contract: `SPEC_VERSION` `0.2.0`
18
18
  - documentation: https://axisvela.github.io/praxo-core/languages/ruby/
@@ -34,8 +34,14 @@
34
34
  - Registry introduction: `REGISTRY.md`
35
35
  - Markdown entry: `llms.md`
36
36
  - Compact entry: `llms.txt`
37
+ - [Examples](https://github.com/axisvela/praxo-core/tree/main/language/ruby/examples): runnable language-specific examples.
37
38
  - Coding-agent contract: ../../docs/getting-started/coding-agents.md
38
39
 
40
+ # Community
41
+
42
+ - X: <https://x.com/axisvela>
43
+ - Weibo: <https://weibo.com/u/1936025761>
44
+
39
45
  # Boundaries
40
46
 
41
47
  - In-process framework; not a model provider, hosted service, workflow engine,
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.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AxisVela
@@ -28,6 +28,7 @@ files:
28
28
  - api/0.5.0.txt
29
29
  - api/0.6.0.txt
30
30
  - api/0.7.0.txt
31
+ - api/0.8.0.txt
31
32
  - lib/praxo.rb
32
33
  - lib/praxo/adapters/anthropic.rb
33
34
  - lib/praxo/adapters/gemini.rb