praxo-core 0.8.2 → 0.9.1

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: 2511d9120f9fdcf0969637cbd95a035fa4cba3c975ddd4241228072c0947c810
4
- data.tar.gz: 71654456f560e5a7e8f9634fffa0a564ecc60c1d31ceb400769acaa74964e382
3
+ metadata.gz: be16bce13a6b7c4279e6f0fa0f27c421433ed936629ba8fa477d517776751032
4
+ data.tar.gz: 92f2ccab54ce5f82b3c704924df17092ab7f7809bdcaa2917e646fda7805d8a5
5
5
  SHA512:
6
- metadata.gz: e7f654ee7aa6ff2c8f982b5320b53d831e5d0f5178c61c68418b173edc2254a7e1425c5e80e7d8865f91f922b2ccbd02492a4516a9da8c5ec5bbe8acb6ba2d90
7
- data.tar.gz: 79019fffde0873e05e655a99dc8dfbfea16cb671591fe1b03300c1afe0ffd51dfd8bf1c1e37c2094c51b66eb624e98539b7d46d3b622a6dfda5a1eff7aea0c87
6
+ metadata.gz: 137f7de2a26498e2cd7a7db55dd9b9d8756c69399b095809d29d1fe67c3bc7556f3ad0b23b79644ef5ff211ea4f96210a15023f077dcddaf28f2d3f6054ab2b9
7
+ data.tar.gz: e2f65cfa2a93571e8a5555c08fb557c7ad71953e8caf0db470858f7cfad3d1e81db21abdfb438db5b567ca74537bcf3f4ea2cdfa62ff546f0e6a506f3d9742a7
data/README.md CHANGED
@@ -13,12 +13,14 @@ The normative contract is [`spec/`](../../spec/README.md); Go remains the
13
13
  reference implementation.
14
14
 
15
15
  - `SPEC_VERSION`: `0.2.0`
16
- - Core version: `0.8.2`
16
+ - Core version: `0.9.1`
17
17
  - Tier: core
18
18
  - License: MIT
19
19
  - Dependencies: Ruby standard library only
20
20
  - Ruby source repository: https://github.com/axisvela/praxo-core-ruby
21
- - The latest RubyGems package is `praxo-core@0.8.2`
21
+ - The latest RubyGems package is `praxo-core@0.9.0`
22
+ - `0.9.1` removes the undeclared `base64` dependency, restoring Ruby 3.4
23
+ Bundler loading; registry publication is pending
22
24
 
23
25
  ## Registry and Coding-Agent Entry
24
26
 
@@ -26,7 +28,7 @@ reference implementation.
26
28
  - 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)
27
29
  - [Examples](https://github.com/axisvela/praxo-core/tree/main/language/ruby/examples): runnable language-specific examples.
28
30
  - Coding-agent contract: [docs/getting-started/coding-agents.md](https://github.com/axisvela/praxo-core/blob/main/docs/getting-started/coding-agents.md)
29
- - Registry: [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.8.1)
31
+ - Registry: [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.9.0)
30
32
  - Community: [X](https://x.com/axisvela) · [Weibo](https://weibo.com/u/1936025761)
31
33
 
32
34
  ## Get started
@@ -130,12 +132,16 @@ execution, and run-scoped call limits:
130
132
 
131
133
  `Praxo::SSE.parse` parses OpenAI-compatible server-sent-event text and raises
132
134
  `MODEL_STREAM` for truncated streams or malformed half packets.
135
+ `Praxo::SSE.parse_response` additionally reassembles fragmented tool calls,
136
+ usage, and `finish_reason`; `OpenAICompatible#generate_stream` uses it with an
137
+ injected `stream_transport` or the built-in HTTP path. Set `on_delta` on the
138
+ agent options to use streaming.
133
139
 
134
140
  ## Model Adapters
135
141
 
136
142
  - `Praxo::Adapters::OpenAICompatible` for OpenAI, DeepSeek, Kimi/Moonshot, and
137
143
  other OpenAI-compatible endpoints.
138
- - `Praxo::Adapters::Anthropic` for the Anthropic Messages API.
144
+ - `Praxo::Adapters::Anthropic` for the Anthropic Messages API, including `generate_stream` SSE reassembly.
139
145
  - `Praxo::Adapters::Gemini` for the Gemini generateContent API.
140
146
 
141
147
  Each adapter accepts a `transport` lambda for deterministic tests.
@@ -166,6 +172,11 @@ status and a bounded body. The sink adds no authentication, retries, buffering,
166
172
  ordering, or exactly-once delivery. Use HTTPS and filter sensitive event data
167
173
  before emitting.
168
174
 
175
+ ## Process plugin host
176
+
177
+ `Praxo::PluginProcessHost` speaks the framework JSON-Lines process plugin
178
+ protocol with token authentication, health handshake, invocation timeout,
179
+ cooperative cancel, and typed call errors.
169
180
  ## Layout
170
181
 
171
182
  - `lib/praxo/` package source.
@@ -175,5 +186,5 @@ before emitting.
175
186
 
176
187
  ## Release
177
188
 
178
- Tag shape: `ruby/v0.8.2`. The tag targets `SPEC_VERSION` `0.2.0`. See
189
+ Tag shape: `ruby/v0.9.0`. The tag targets `SPEC_VERSION` `0.2.0`. See
179
190
  [CHANGELOG.md](CHANGELOG.md) for per-release changes and compatibility notes.
data/REGISTRY.md CHANGED
@@ -1,27 +1,25 @@
1
1
  # PRAXO-CORE Ruby Registry Introduction
2
2
 
3
- **Status:** published; split source repository. Source version `0.8.2`, source
4
- tag `ruby/v0.8.2`. Published registry version: `0.8.1`. Registry
5
- pages are release snapshots; verify the published version before relying on a
6
- feature.
3
+ **Status:** published `0.9.0`; split source repository. Source version `0.9.1`,
4
+ source tag `ruby/v0.9.1`. Published registry version: `0.9.0`; `0.9.1`
5
+ publication pending. Registry pages are release snapshots; verify the published
6
+ version before relying on a feature.
7
7
 
8
8
  ## Positioning
9
9
 
10
10
  PRAXO-CORE is an embeddable, MIT-licensed agent framework. This gem is its native Ruby Core: an agent loop with tool registration and dispatch, policy hooks, typed events, memory, checkpoints, context budgets, middleware, JSON Schema validation, and plugin manifest parsing.
11
11
 
12
- Use it when an existing Ruby application needs a governed model/tool loop without adding a sidecar in another language. It is not an HTTP user agent, crawler, hosted agent service, or model provider.
13
-
14
12
  ## Package
15
13
 
16
14
  | Field | Value |
17
15
  | --- | --- |
18
16
  | Package | `praxo-core` |
19
- | Registry | [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.8.1) |
20
- | Source version | `0.8.2` |
21
- | Published registry version | `0.8.1` |
17
+ | Registry | [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.9.0) |
18
+ | Source version | `0.9.1` |
19
+ | Published registry version | `0.9.0` |
22
20
  | Install (published) | `gem install praxo-core` |
23
21
  | Install (source/release prepared) | `gem install praxo-core` |
24
- | Source tag | `ruby/v0.8.2` |
22
+ | Source tag | `ruby/v0.9.1` |
25
23
  | Tier | Core |
26
24
  | Contract | `SPEC_VERSION` `0.2.0` |
27
25
  | Documentation | https://axisvela.github.io/praxo-core/languages/ruby/ |
@@ -30,9 +28,9 @@ Use it when an existing Ruby application needs a governed model/tool loop withou
30
28
 
31
29
  | Adapter | Status | Detail |
32
30
  | --- | --- | --- |
33
- | OpenAI-compatible model | native | `Praxo::Adapters::OpenAICompatible` |
34
- | Anthropic model | native | `Praxo::Adapters::Anthropic`; injectable transport |
35
- | Gemini model | native | `Praxo::Adapters::Gemini`; injectable transport |
31
+ | OpenAI-compatible model | native | `Praxo::Adapters::OpenAICompatible`; `generate_stream` reassembles SSE content, tool calls, usage, and finish reason |
32
+ | Anthropic model | native | `Praxo::Adapters::Anthropic`; injectable transport; `generate_stream` reassembles Anthropic SSE |
33
+ | Gemini model | native | `Praxo::Adapters::Gemini`; injectable transport; `generate_stream` reassembles Gemini SSE |
36
34
  | MCP client | native | `Praxo::Adapters::MCPClient`; stdio, plus `HttpMCPTransport` for Streamable HTTP 2025-03-26 |
37
35
  | Harmovela sink | native | `Praxo::Adapters::HarmovelaSink` |
38
36
  | OpenTelemetry sink | native (transport seam) | `OtelSink`; caller supplies OTLP/HTTP transport |
data/api/0.8.2.txt CHANGED
@@ -13,6 +13,9 @@ class MemoryStore
13
13
  class MultiSink
14
14
  class PathChecker
15
15
  class PiiRedactor
16
+ class PluginCallError
17
+ class PluginProcessConfig
18
+ class PluginProcessHost
16
19
  class Runner
17
20
  class StaticModel
18
21
  class StructuredOutput
@@ -20,6 +23,7 @@ class SubagentManager
20
23
  class ToolRegistry
21
24
  class ToolSelection
22
25
  def action
26
+ def active?
23
27
  def after_run
24
28
  def allowed?
25
29
  def allows?
@@ -34,6 +38,7 @@ def before_model
34
38
  def before_run
35
39
  def before_tool
36
40
  def bool
41
+ def call
37
42
  def cancel
38
43
  def check
39
44
  def check_cancelled
@@ -78,6 +83,7 @@ def parse_input_json
78
83
  def parse_json_call
79
84
  def parse_manifest
80
85
  def parse_plain
86
+ def parse_response
81
87
  def parse_tag
82
88
  def parse_toolcall
83
89
  def parse_xml
@@ -96,14 +102,19 @@ def run
96
102
  def run_agent
97
103
  def run_result
98
104
  def search
105
+ def send_cancel
99
106
  def session
100
107
  def set
101
108
  def specs
109
+ def start
110
+ def stderr_text
111
+ def stop
102
112
  def stream_part
103
113
  def string
104
114
  def stringify
105
115
  def strip_markup
106
116
  def structured_apply
117
+ def terminate
107
118
  def text_present
108
119
  def timestamp
109
120
  def to_wire
data/api/0.9.0.txt ADDED
@@ -0,0 +1,146 @@
1
+ # PRAXO-CORE Ruby API 0.9.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 PluginCallError
17
+ class PluginProcessConfig
18
+ class PluginProcessHost
19
+ class Runner
20
+ class StaticModel
21
+ class StructuredOutput
22
+ class SubagentManager
23
+ class ToolRegistry
24
+ class ToolSelection
25
+ def action
26
+ def active?
27
+ def after_run
28
+ def allowed?
29
+ def allows?
30
+ def apply
31
+ def apply_interrupt
32
+ def array
33
+ def as_int
34
+ def as_object
35
+ def as_string
36
+ def authorize
37
+ def before_model
38
+ def before_run
39
+ def before_tool
40
+ def bool
41
+ def call
42
+ def cancel
43
+ def check
44
+ def check_cancelled
45
+ def check_enum
46
+ def check_keys
47
+ def compact
48
+ def content_block
49
+ def copy
50
+ def decision
51
+ def emit
52
+ def emit_stream
53
+ def equals
54
+ def error
55
+ def error_code
56
+ def estimate_tokens
57
+ def event
58
+ def execute
59
+ def execute_tool
60
+ def extract_json
61
+ def fallback_model
62
+ def filter
63
+ def generate
64
+ def get
65
+ def has?
66
+ def initialize
67
+ def int
68
+ def interrupt
69
+ def interrupt_decision
70
+ def invoke
71
+ def invoke_tool
72
+ def invoke_tools
73
+ def launch
74
+ def marshal
75
+ def memory_record
76
+ def message
77
+ def message_assistant
78
+ def message_text
79
+ def message_tool
80
+ def message_wire
81
+ def parse
82
+ def parse_input_json
83
+ def parse_json_call
84
+ def parse_manifest
85
+ def parse_plain
86
+ def parse_response
87
+ def parse_tag
88
+ def parse_toolcall
89
+ def parse_xml
90
+ def plus
91
+ def prepare_tool
92
+ def put
93
+ def redact
94
+ def redact_value
95
+ def register
96
+ def reject
97
+ def request
98
+ def resolve_path
99
+ def response
100
+ def retrieve
101
+ def run
102
+ def run_agent
103
+ def run_result
104
+ def search
105
+ def send_cancel
106
+ def session
107
+ def set
108
+ def specs
109
+ def start
110
+ def stderr_text
111
+ def stop
112
+ def stream_part
113
+ def string
114
+ def stringify
115
+ def strip_markup
116
+ def structured_apply
117
+ def terminate
118
+ def text_present
119
+ def timestamp
120
+ def to_wire
121
+ def tool_call
122
+ def tool_spec
123
+ def truncate_to_tokens
124
+ def unmarshal
125
+ def update
126
+ def usage
127
+ def validate
128
+ def visit
129
+ def visit_array
130
+ def visit_boolean
131
+ def visit_number
132
+ def visit_object
133
+ def visit_string
134
+ def wait
135
+ def within?
136
+ module Agent
137
+ module Delegation
138
+ module Json
139
+ module JsonSchema
140
+ module Middleware
141
+ module Models
142
+ module Plugin
143
+ module Praxo
144
+ module Runtime
145
+ module SSE
146
+ module Toolcall
data/api/0.9.1.txt ADDED
@@ -0,0 +1,146 @@
1
+ # PRAXO-CORE Ruby API 0.9.1
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 PluginCallError
17
+ class PluginProcessConfig
18
+ class PluginProcessHost
19
+ class Runner
20
+ class StaticModel
21
+ class StructuredOutput
22
+ class SubagentManager
23
+ class ToolRegistry
24
+ class ToolSelection
25
+ def action
26
+ def active?
27
+ def after_run
28
+ def allowed?
29
+ def allows?
30
+ def apply
31
+ def apply_interrupt
32
+ def array
33
+ def as_int
34
+ def as_object
35
+ def as_string
36
+ def authorize
37
+ def before_model
38
+ def before_run
39
+ def before_tool
40
+ def bool
41
+ def call
42
+ def cancel
43
+ def check
44
+ def check_cancelled
45
+ def check_enum
46
+ def check_keys
47
+ def compact
48
+ def content_block
49
+ def copy
50
+ def decision
51
+ def emit
52
+ def emit_stream
53
+ def equals
54
+ def error
55
+ def error_code
56
+ def estimate_tokens
57
+ def event
58
+ def execute
59
+ def execute_tool
60
+ def extract_json
61
+ def fallback_model
62
+ def filter
63
+ def generate
64
+ def get
65
+ def has?
66
+ def initialize
67
+ def int
68
+ def interrupt
69
+ def interrupt_decision
70
+ def invoke
71
+ def invoke_tool
72
+ def invoke_tools
73
+ def launch
74
+ def marshal
75
+ def memory_record
76
+ def message
77
+ def message_assistant
78
+ def message_text
79
+ def message_tool
80
+ def message_wire
81
+ def parse
82
+ def parse_input_json
83
+ def parse_json_call
84
+ def parse_manifest
85
+ def parse_plain
86
+ def parse_response
87
+ def parse_tag
88
+ def parse_toolcall
89
+ def parse_xml
90
+ def plus
91
+ def prepare_tool
92
+ def put
93
+ def redact
94
+ def redact_value
95
+ def register
96
+ def reject
97
+ def request
98
+ def resolve_path
99
+ def response
100
+ def retrieve
101
+ def run
102
+ def run_agent
103
+ def run_result
104
+ def search
105
+ def send_cancel
106
+ def session
107
+ def set
108
+ def specs
109
+ def start
110
+ def stderr_text
111
+ def stop
112
+ def stream_part
113
+ def string
114
+ def stringify
115
+ def strip_markup
116
+ def structured_apply
117
+ def terminate
118
+ def text_present
119
+ def timestamp
120
+ def to_wire
121
+ def tool_call
122
+ def tool_spec
123
+ def truncate_to_tokens
124
+ def unmarshal
125
+ def update
126
+ def usage
127
+ def validate
128
+ def visit
129
+ def visit_array
130
+ def visit_boolean
131
+ def visit_number
132
+ def visit_object
133
+ def visit_string
134
+ def wait
135
+ def within?
136
+ module Agent
137
+ module Delegation
138
+ module Json
139
+ module JsonSchema
140
+ module Middleware
141
+ module Models
142
+ module Plugin
143
+ module Praxo
144
+ module Runtime
145
+ module SSE
146
+ module Toolcall
@@ -12,16 +12,26 @@ module Praxo
12
12
  DEFAULT_VERSION = '2023-06-01'
13
13
 
14
14
  def initialize(base_url: DEFAULT_BASE_URL, model:, api_key: nil, version: DEFAULT_VERSION,
15
- max_tokens: 1024, transport: nil, timeout: 60)
15
+ max_tokens: 1024, transport: nil, stream_transport: nil, timeout: 60)
16
16
  @base_url = base_url.to_s.sub(%r{/$}, '')
17
17
  @model = model
18
18
  @api_key = api_key
19
19
  @version = version
20
20
  @max_tokens = max_tokens
21
21
  @transport = transport
22
+ @stream_transport = stream_transport
22
23
  @timeout = timeout
23
24
  end
24
25
 
26
+ def generate_stream(request, on_delta)
27
+ Praxo.error('MODEL_CONFIG', 'anthropic: API key is required') unless @api_key && !@api_key.empty?
28
+ Praxo.error('MODEL_CONFIG', 'anthropic: model is required') unless @model && !@model.empty?
29
+
30
+ payload = build_payload(request, true)
31
+ text = @stream_transport ? @stream_transport.call('/v1/messages', payload) : post_stream(payload)
32
+ parse_stream(text, on_delta)
33
+ end
34
+
25
35
  def generate(request)
26
36
  Praxo.error('MODEL_CONFIG', 'anthropic: API key is required') unless @api_key && !@api_key.empty?
27
37
  Praxo.error('MODEL_CONFIG', 'anthropic: model is required') unless @model && !@model.empty?
@@ -33,7 +43,7 @@ module Praxo
33
43
 
34
44
  private
35
45
 
36
- def build_payload(request)
46
+ def build_payload(request, stream = false)
37
47
  system, messages = build_messages(request.messages)
38
48
  payload = {
39
49
  model: @model,
@@ -54,6 +64,7 @@ module Praxo
54
64
  payload[:tool_choice] = choice if choice
55
65
  end
56
66
  payload[:temperature] = request.temperature if request.temperature
67
+ payload[:stream] = true if stream
57
68
  payload
58
69
  end
59
70
 
@@ -115,6 +126,89 @@ module Praxo
115
126
  end
116
127
  end
117
128
 
129
+ def parse_stream(text, on_delta)
130
+ content = +''
131
+ calls = {}
132
+ input_tokens = 0
133
+ output_tokens = 0
134
+ cached_tokens = 0
135
+ stop_reason = nil
136
+ stopped = false
137
+ text.to_s.each_line do |raw|
138
+ line = raw.strip
139
+ next unless line.start_with?('data:')
140
+ chunk = line[5..].to_s.strip
141
+ next if chunk.empty?
142
+ event = begin
143
+ Json.parse(chunk)
144
+ rescue StandardError
145
+ Praxo.error('MODEL_STREAM', 'anthropic: invalid stream chunk')
146
+ end
147
+ next unless event.is_a?(Hash)
148
+
149
+ case event['type']
150
+ when 'message_start'
151
+ usage = (event['message'] || {})['usage'] || {}
152
+ input_tokens = usage['input_tokens'].to_i
153
+ cached_tokens = usage['cache_read_input_tokens'].to_i
154
+ when 'content_block_start'
155
+ index = event['index'].to_i
156
+ block = event['content_block'] || {}
157
+ if block['type'] == 'tool_use'
158
+ calls[index] = { id: block['id'].to_s, name: block['name'].to_s, arguments: +'' }
159
+ end
160
+ when 'content_block_delta'
161
+ index = event['index'].to_i
162
+ delta = event['delta'] || {}
163
+ case delta['type']
164
+ when 'text_delta'
165
+ piece = delta['text'].to_s
166
+ unless piece.empty?
167
+ content << piece
168
+ on_delta.call(piece)
169
+ end
170
+ when 'input_json_delta'
171
+ if calls[index]
172
+ calls[index][:arguments] << delta['partial_json'].to_s
173
+ end
174
+ end
175
+ when 'message_delta'
176
+ stop_reason = (event['delta'] || {})['stop_reason'] || stop_reason
177
+ output_tokens = (event['usage'] || {})['output_tokens'] || output_tokens
178
+ when 'message_stop'
179
+ stopped = true
180
+ when 'error'
181
+ Praxo.error('MODEL_STREAM', 'anthropic: stream error')
182
+ end
183
+ end
184
+ Praxo.error('MODEL_STREAM', 'anthropic: stream ended before completion') unless stopped || stop_reason
185
+ tool_calls = calls.keys.sort.filter_map do |index|
186
+ call = calls[index]
187
+ next if call[:name].empty?
188
+
189
+ arguments = {}
190
+ unless call[:arguments].empty?
191
+ begin
192
+ arguments = Json.parse(call[:arguments])
193
+ rescue StandardError
194
+ Praxo.error('PROVIDER_JSON', 'anthropic: invalid tool arguments')
195
+ end
196
+ unless arguments.is_a?(Hash)
197
+ Praxo.error('PROVIDER_JSON', 'anthropic: invalid tool arguments')
198
+ end
199
+ end
200
+ Models.tool_call(id: call[:id], name: call[:name], arguments: arguments)
201
+ end
202
+ result = Models.response(
203
+ message: Models.message(role: Models::ASSISTANT, content: content,
204
+ tool_calls: tool_calls),
205
+ usage: Models.usage(input_tokens: input_tokens, output_tokens: output_tokens)
206
+ )
207
+ result.usage.cached_tokens = cached_tokens if result.usage.respond_to?(:cached_tokens=)
208
+ result.finish_reason = stop_reason if result.respond_to?(:finish_reason=)
209
+ result
210
+ end
211
+
118
212
  def parse_response(data)
119
213
  Praxo.error('MODEL_HTTP', "anthropic: #{data['error']['message']}") if data['error']
120
214
 
@@ -148,6 +242,27 @@ module Praxo
148
242
  )
149
243
  end
150
244
 
245
+ def post_stream(payload)
246
+ uri = URI.join(@base_url + '/', 'v1/messages')
247
+ request = Net::HTTP::Post.new(uri)
248
+ request['Content-Type'] = 'application/json'
249
+ request['Accept'] = 'text/event-stream'
250
+ request['x-api-key'] = @api_key if @api_key
251
+ request['anthropic-version'] = @version
252
+ request.body = Json.stringify(payload)
253
+ response = Net::HTTP.start(
254
+ uri.host,
255
+ uri.port,
256
+ use_ssl: uri.scheme == 'https',
257
+ read_timeout: @timeout
258
+ ) { |http| http.request(request) }
259
+ body = response.body.to_s
260
+ unless response.is_a?(Net::HTTPSuccess)
261
+ Praxo.error('PROVIDER_HTTP', "provider returned HTTP #{response.code}: #{body}")
262
+ end
263
+ body
264
+ end
265
+
151
266
  def post(payload)
152
267
  uri = URI.join(@base_url + '/', 'v1/messages')
153
268
  request = Net::HTTP::Post.new(uri)
@@ -10,12 +10,14 @@ module Praxo
10
10
  DEFAULT_BASE_URL = 'https://generativelanguage.googleapis.com'
11
11
 
12
12
  def initialize(base_url: DEFAULT_BASE_URL, model:, api_key: nil,
13
- max_output_tokens: 0, transport: nil, timeout: 60)
13
+ max_output_tokens: 0, transport: nil, stream_transport: nil,
14
+ timeout: 60)
14
15
  @base_url = base_url.to_s.sub(%r{/$}, '')
15
16
  @model = model
16
17
  @api_key = api_key
17
18
  @max_output_tokens = max_output_tokens
18
19
  @transport = transport
20
+ @stream_transport = stream_transport
19
21
  @timeout = timeout
20
22
  end
21
23
 
@@ -29,6 +31,20 @@ module Praxo
29
31
  parse_response(data)
30
32
  end
31
33
 
34
+ def generate_stream(request, on_delta)
35
+ Praxo.error('MODEL_CONFIG', 'gemini: API key is required') unless @api_key && !@api_key.empty?
36
+ Praxo.error('MODEL_CONFIG', 'gemini: model is required') unless @model && !@model.empty?
37
+
38
+ payload = build_payload(request)
39
+ path = "/v1beta/models/#{URI.encode_www_form_component(@model)}:streamGenerateContent?alt=sse"
40
+ text = if @stream_transport
41
+ @stream_transport.call(path, payload)
42
+ else
43
+ post_stream(path, payload)
44
+ end
45
+ parse_stream(text, on_delta)
46
+ end
47
+
32
48
  private
33
49
 
34
50
  def build_payload(request)
@@ -156,6 +172,83 @@ module Praxo
156
172
  )
157
173
  end
158
174
 
175
+ def parse_stream(text, on_delta)
176
+ content = +''
177
+ calls = []
178
+ input_tokens = 0
179
+ output_tokens = 0
180
+ cached_tokens = 0
181
+ finish_reason = nil
182
+ text.to_s.each_line do |raw|
183
+ line = raw.strip
184
+ next unless line.start_with?('data:')
185
+
186
+ chunk_text = line[5..].to_s.strip
187
+ next if chunk_text.empty? || chunk_text == '[DONE]'
188
+
189
+ chunk = Json.parse(chunk_text)
190
+ Praxo.error('MODEL_STREAM', "gemini: #{chunk.dig('error', 'message') || 'stream error'}") if chunk['error']
191
+
192
+ usage = chunk['usageMetadata'] || {}
193
+ input_tokens = usage['promptTokenCount'] if usage['promptTokenCount']
194
+ output_tokens = usage['candidatesTokenCount'] if usage['candidatesTokenCount']
195
+ cached_tokens = usage['cachedContentTokenCount'] if usage['cachedContentTokenCount']
196
+
197
+ candidate = Array(chunk['candidates']).first
198
+ next unless candidate
199
+
200
+ finish_reason = candidate['finishReason'] if candidate['finishReason']
201
+ Array((candidate['content'] || {})['parts']).each do |part|
202
+ piece = part['text'].to_s
203
+ if !piece.empty?
204
+ content << piece
205
+ on_delta.call(piece)
206
+ end
207
+ call = part['functionCall']
208
+ next unless call
209
+
210
+ calls << Models.tool_call(
211
+ id: "call-#{calls.length + 1}",
212
+ name: call['name'] || '',
213
+ arguments: call['args'] || {}
214
+ )
215
+ end
216
+ end
217
+ Models.response(
218
+ message: Models.message(
219
+ role: Models::ASSISTANT,
220
+ content: content,
221
+ tool_calls: calls
222
+ ),
223
+ usage: Models.usage(
224
+ input_tokens: input_tokens.to_i,
225
+ output_tokens: output_tokens.to_i,
226
+ cached_tokens: cached_tokens.to_i
227
+ ),
228
+ finish_reason: finish_reason
229
+ )
230
+ end
231
+
232
+ def post_stream(path, payload)
233
+ uri = URI.join(@base_url + '/', path.sub(%r{^/}, ''))
234
+ request = Net::HTTP::Post.new(uri)
235
+ request['Content-Type'] = 'application/json'
236
+ request['Accept'] = 'text/event-stream'
237
+ request['x-goog-api-key'] = @api_key
238
+ request.body = Json.stringify(payload)
239
+ response = Net::HTTP.start(
240
+ uri.host,
241
+ uri.port,
242
+ use_ssl: uri.scheme == 'https',
243
+ read_timeout: @timeout
244
+ ) { |http| http.request(request) }
245
+ body = response.body.to_s
246
+ unless response.is_a?(Net::HTTPSuccess)
247
+ Praxo.error('PROVIDER_HTTP', "provider returned HTTP #{response.code}: #{body}")
248
+ end
249
+ body
250
+ end
251
+
159
252
  def post(path, payload)
160
253
  uri = URI.join(@base_url + '/', path.sub(%r{^/}, ''))
161
254
  request = Net::HTTP::Post.new(uri)
@@ -3,6 +3,7 @@ require 'uri'
3
3
  require_relative '../models'
4
4
  require_relative '../json'
5
5
  require_relative '../errors'
6
+ require_relative '../sse'
6
7
 
7
8
  module Praxo
8
9
  module Adapters
@@ -11,11 +12,13 @@ module Praxo
11
12
  # transport is injectable for deterministic tests:
12
13
  # ->(path, payload) { parsed_response_hash }
13
14
  class OpenAICompatible
14
- def initialize(base_url:, model:, api_key: nil, transport: nil, timeout: 60)
15
+ def initialize(base_url:, model:, api_key: nil, transport: nil,
16
+ stream_transport: nil, timeout: 60)
15
17
  @base_url = base_url.to_s.sub(%r{/$}, '')
16
18
  @model = model
17
19
  @api_key = api_key
18
20
  @transport = transport
21
+ @stream_transport = stream_transport
19
22
  @timeout = timeout
20
23
  end
21
24
 
@@ -25,6 +28,12 @@ module Praxo
25
28
  parse_response(data)
26
29
  end
27
30
 
31
+ def generate_stream(request, on_delta)
32
+ payload = build_payload(request).merge(stream: true)
33
+ text = @stream_transport ? @stream_transport.call('/chat/completions', payload) : post_stream('/chat/completions', payload)
34
+ SSE.parse_response(text, on_delta)
35
+ end
36
+
28
37
  private
29
38
 
30
39
  def build_payload(request)
@@ -116,6 +125,26 @@ module Praxo
116
125
  end
117
126
  Json.parse(body)
118
127
  end
128
+
129
+ def post_stream(path, payload)
130
+ uri = URI.join(@base_url + '/', path.sub(%r{^/}, ''))
131
+ request = Net::HTTP::Post.new(uri)
132
+ request['Content-Type'] = 'application/json'
133
+ request['Accept'] = 'text/event-stream'
134
+ request['Authorization'] = "Bearer #{@api_key}" if @api_key
135
+ request.body = Json.stringify(payload)
136
+ response = Net::HTTP.start(
137
+ uri.host,
138
+ uri.port,
139
+ use_ssl: uri.scheme == 'https',
140
+ read_timeout: @timeout
141
+ ) { |http| http.request(request) }
142
+ body = response.body.to_s
143
+ unless response.is_a?(Net::HTTPSuccess)
144
+ Praxo.error('PROVIDER_HTTP', "provider returned HTTP #{response.code}: #{body}")
145
+ end
146
+ body
147
+ end
119
148
  end
120
149
  end
121
150
  end
data/lib/praxo/agent.rb CHANGED
@@ -74,7 +74,7 @@ module Praxo
74
74
  class AgentOptions
75
75
  attr_accessor :model, :tools, :events, :policy, :system_prompt, :context,
76
76
  :max_steps, :max_tokens, :tool_choice, :middleware,
77
- :allowed_tools, :cancellation, :on_stream,
77
+ :allowed_tools, :cancellation, :on_delta, :on_stream,
78
78
  :max_parallel_tools, :interrupt_on, :on_interrupt_decision,
79
79
  :on_interrupt, :require_policy, :require_tool_scope
80
80
 
@@ -91,6 +91,7 @@ module Praxo
91
91
  @middleware = []
92
92
  @allowed_tools = []
93
93
  @cancellation = nil
94
+ @on_delta = nil
94
95
  @on_stream = nil
95
96
  @max_parallel_tools = 1
96
97
  @interrupt_on = []
@@ -151,7 +152,11 @@ module Praxo
151
152
  tools: options.tools ? options.tools.specs : [],
152
153
  tool_choice: options.tool_choice
153
154
  )
154
- response = options.model.generate(request)
155
+ response = if options.on_delta && options.model.respond_to?(:generate_stream)
156
+ options.model.generate_stream(request, options.on_delta)
157
+ else
158
+ options.model.generate(request)
159
+ end
155
160
  check_cancelled(options)
156
161
  usage = usage.plus(response.usage || Models.usage)
157
162
  total = usage.input_tokens.to_i + usage.output_tokens.to_i
@@ -0,0 +1,219 @@
1
+ require 'json'
2
+ require 'open3'
3
+ require 'securerandom'
4
+ require 'timeout'
5
+
6
+ require_relative 'errors'
7
+
8
+ module Praxo
9
+ class PluginCallError < StandardError
10
+ CODES = %w[
11
+ CAPABILITY_DENIED NOT_ACTIVE NOT_FOUND INVALID_REQUEST TIMEOUT INTERNAL CANCELED
12
+ ].freeze
13
+
14
+ attr_reader :code
15
+
16
+ def initialize(code, message = '')
17
+ @code = CODES.include?(code) ? code : 'INTERNAL'
18
+ super(message.empty? ? code : message)
19
+ end
20
+ end
21
+
22
+ class PluginProcessConfig
23
+ attr_accessor :plugin_id, :path, :args, :dir, :env, :token, :token_env_var,
24
+ :start_timeout, :invoke_timeout, :grace_period, :max_frame
25
+
26
+ def initialize(plugin_id:, path:, args: [], dir: nil, env: nil, token: '',
27
+ token_env_var: 'PRAXOVELA_PLUGIN_TOKEN',
28
+ start_timeout: 10.0, invoke_timeout: 30.0, grace_period: 5.0,
29
+ max_frame: 8 << 20)
30
+ @plugin_id = plugin_id
31
+ @path = path
32
+ @args = args
33
+ @dir = dir
34
+ @env = env
35
+ @token = token
36
+ @token_env_var = token_env_var
37
+ @start_timeout = start_timeout
38
+ @invoke_timeout = invoke_timeout
39
+ @grace_period = grace_period
40
+ @max_frame = max_frame
41
+ end
42
+ end
43
+
44
+ class PluginProcessHost
45
+ PROTOCOL_VERSION = 1
46
+ CONTROL_SERVICE = 'host.control'
47
+ HEALTH_METHOD = 'health'
48
+ SHUTDOWN_METHOD = 'shutdown'
49
+ CANCEL_METHOD = 'cancel'
50
+
51
+ attr_reader :config, :plugin_id
52
+
53
+ def initialize(config)
54
+ raise ArgumentError, 'plugin: PluginID is required' if config.plugin_id.to_s.empty?
55
+ raise ArgumentError, 'plugin: path is required' if config.path.to_s.empty?
56
+
57
+ @config = config
58
+ @plugin_id = config.plugin_id
59
+ @token = config.token.to_s.empty? ? SecureRandom.hex(32) : config.token
60
+ @seq = 0
61
+ @active = false
62
+ @stderr = +''
63
+ @responses = Queue.new
64
+ end
65
+
66
+ def active?
67
+ @active
68
+ end
69
+
70
+ def stderr_text
71
+ @stderr.dup
72
+ end
73
+
74
+ def start
75
+ raise 'plugin: host already started' if @process
76
+
77
+ environment = (config.env || ENV.to_h).merge(config.token_env_var => @token)
78
+ options = {}
79
+ options[:chdir] = config.dir if config.dir
80
+ @stdin, @stdout, @stderr_io, @wait = Open3.popen3(
81
+ environment, config.path, *config.args, **options
82
+ )
83
+ @process = @wait
84
+ @reader = Thread.new do
85
+ begin
86
+ @stdout.each_line do |line|
87
+ @responses << line.strip
88
+ end
89
+ rescue IOError
90
+ nil
91
+ ensure
92
+ @responses << nil
93
+ end
94
+ end
95
+ @stderr_reader = Thread.new do
96
+ begin
97
+ @stderr_io.each_line do |line|
98
+ @stderr << line if @stderr.length < (16 << 10)
99
+ end
100
+ rescue IOError
101
+ nil
102
+ end
103
+ end
104
+ call(CONTROL_SERVICE, HEALTH_METHOD, '', config.start_timeout)
105
+ @active = true
106
+ rescue StandardError
107
+ terminate
108
+ raise
109
+ end
110
+
111
+ def invoke(service, method, payload = '', timeout = nil)
112
+ raise PluginCallError.new('NOT_ACTIVE', 'plugin: host is not active') unless @active
113
+
114
+ call(service, method, payload, timeout || config.invoke_timeout)
115
+ end
116
+
117
+ def stop
118
+ return unless @process
119
+
120
+ begin
121
+ call(CONTROL_SERVICE, SHUTDOWN_METHOD, '', config.grace_period) if @active
122
+ rescue StandardError
123
+ nil
124
+ end
125
+ @active = false
126
+ begin
127
+ Timeout.timeout(config.grace_period) { @wait.value }
128
+ rescue Timeout::Error
129
+ terminate
130
+ end
131
+ @process = nil
132
+ @stdin = @stdout = @stderr_io = @wait = nil
133
+ @reader&.kill
134
+ @stderr_reader&.kill
135
+ end
136
+
137
+ private
138
+
139
+ def call(service, method, payload, timeout)
140
+ @seq += 1
141
+ id = "req-#{@seq}"
142
+ frame = {
143
+ 'id' => id,
144
+ 'version' => PROTOCOL_VERSION,
145
+ 'plugin_id' => config.plugin_id,
146
+ 'service' => service,
147
+ 'method' => method,
148
+ 'token' => @token,
149
+ 'payload' => [payload.to_s].pack('m0')
150
+ }
151
+ encoded = "#{JSON.generate(frame)}\n"
152
+ raise PluginCallError.new('INVALID_REQUEST', 'plugin: request frame too large') if encoded.bytesize > config.max_frame
153
+
154
+ @stdin.write(encoded)
155
+ @stdin.flush
156
+ deadline = Process.clock_gettime(Process::CLOCK_MONOTONIC) + timeout
157
+ loop do
158
+ remaining = deadline - Process.clock_gettime(Process::CLOCK_MONOTONIC)
159
+ if remaining <= 0
160
+ send_cancel(id)
161
+ terminate
162
+ raise PluginCallError.new('TIMEOUT', 'plugin: invocation timed out')
163
+ end
164
+ begin
165
+ line = Timeout.timeout(remaining) { @responses.pop }
166
+ rescue Timeout::Error
167
+ send_cancel(id)
168
+ terminate
169
+ raise PluginCallError.new('TIMEOUT', 'plugin: invocation timed out')
170
+ end
171
+ if line.nil?
172
+ detail = stderr_text
173
+ terminate
174
+ raise PluginCallError.new('INTERNAL', detail.empty? ? 'plugin: process exited' : detail[0, 512])
175
+ end
176
+ response = begin
177
+ JSON.parse(line)
178
+ rescue JSON::ParserError
179
+ next
180
+ end
181
+ next unless response['id'] == id
182
+
183
+ unless response['ok'] == true
184
+ raise PluginCallError.new(response['code'] || 'INTERNAL', response['message'] || '')
185
+ end
186
+ begin
187
+ return (response['payload'] || '').unpack1('m0')
188
+ rescue ArgumentError
189
+ raise PluginCallError.new('INTERNAL', 'plugin: invalid payload')
190
+ end
191
+ end
192
+ end
193
+
194
+ def send_cancel(id)
195
+ frame = {
196
+ 'id' => id,
197
+ 'version' => PROTOCOL_VERSION,
198
+ 'plugin_id' => config.plugin_id,
199
+ 'service' => CONTROL_SERVICE,
200
+ 'method' => CANCEL_METHOD,
201
+ 'token' => @token
202
+ }
203
+ @stdin&.write("#{JSON.generate(frame)}\n")
204
+ @stdin&.flush
205
+ rescue StandardError
206
+ nil
207
+ end
208
+
209
+ def terminate
210
+ @active = false
211
+ begin
212
+ Process.kill('KILL', @wait.pid) if @wait
213
+ rescue StandardError
214
+ nil
215
+ end
216
+ [@stdin, @stdout, @stderr_io].each { |io| io&.close rescue nil }
217
+ end
218
+ end
219
+ end
data/lib/praxo/sse.rb CHANGED
@@ -5,6 +5,81 @@ module Praxo
5
5
  module SSE
6
6
  module_function
7
7
 
8
+ def parse_response(text, on_delta)
9
+ content = +''
10
+ done = false
11
+ finish = nil
12
+ input_tokens = 0
13
+ output_tokens = 0
14
+ calls = {}
15
+ text.to_s.each_line do |raw|
16
+ line = raw.strip
17
+ next unless line.start_with?('data:')
18
+ chunk = line[5..].to_s.strip
19
+ next if chunk.empty?
20
+ if chunk == '[DONE]'
21
+ done = true
22
+ break
23
+ end
24
+ begin
25
+ event = Json.parse(chunk)
26
+ rescue StandardError
27
+ Praxo.error('MODEL_STREAM', 'invalid SSE packet')
28
+ end
29
+ next unless event.is_a?(Hash)
30
+ usage = event['usage']
31
+ if usage.is_a?(Hash)
32
+ input_tokens = usage['prompt_tokens'].to_i
33
+ output_tokens = usage['completion_tokens'].to_i
34
+ end
35
+ (event['choices'] || []).each do |choice|
36
+ finish = choice['finish_reason'] if choice.key?('finish_reason') && !choice['finish_reason'].nil?
37
+ delta = choice['delta'] || {}
38
+ piece = delta['content']
39
+ if piece && !piece.empty?
40
+ content << piece
41
+ on_delta.call(piece)
42
+ end
43
+ Array(delta['tool_calls']).each do |item|
44
+ index = item['index'] || calls.size
45
+ slot = calls[index] ||= { id: +'', name: +'', arguments: +'' }
46
+ slot[:id] << item['id'].to_s if item['id']
47
+ function = item['function'] || {}
48
+ slot[:name] << function['name'].to_s if function['name']
49
+ slot[:arguments] << function['arguments'].to_s if function['arguments']
50
+ end
51
+ end
52
+ done = true if finish
53
+ end
54
+ Praxo.error('MODEL_STREAM', 'stream ended before completion') unless done
55
+ tool_calls = calls.keys.sort.filter_map do |key|
56
+ call = calls[key]
57
+ next if call[:name].empty?
58
+
59
+ arguments = {}
60
+ unless call[:arguments].empty?
61
+ begin
62
+ arguments = Json.parse(call[:arguments])
63
+ rescue StandardError
64
+ Praxo.error('PROVIDER_JSON', 'provider returned invalid tool arguments')
65
+ end
66
+ unless arguments.is_a?(Hash)
67
+ Praxo.error('PROVIDER_JSON', 'provider returned invalid tool arguments')
68
+ end
69
+ end
70
+ Models.tool_call(id: call[:id], name: call[:name], arguments: arguments)
71
+ end
72
+ Models.response(
73
+ message: Models.message(
74
+ role: Models::ASSISTANT,
75
+ content: content,
76
+ tool_calls: tool_calls
77
+ ),
78
+ usage: Models.usage(input_tokens: input_tokens, output_tokens: output_tokens),
79
+ finish_reason: finish
80
+ )
81
+ end
82
+
8
83
  def parse(text)
9
84
  content = +''
10
85
  done = false
data/lib/praxo.rb CHANGED
@@ -4,6 +4,7 @@ require_relative 'praxo/models'
4
4
  require_relative 'praxo/toolcall'
5
5
  require_relative 'praxo/jsonschema'
6
6
  require_relative 'praxo/plugin'
7
+ require_relative 'praxo/plugin_process'
7
8
  require_relative 'praxo/runtime'
8
9
  require_relative 'praxo/sse'
9
10
  require_relative 'praxo/middleware'
data/llms.md CHANGED
@@ -7,21 +7,21 @@
7
7
  ## Package
8
8
 
9
9
  - package: `praxo-core`
10
- - registry: [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.8.1)
11
- - source_version: `0.8.2`
12
- - published_version: `0.8.1`
10
+ - registry: [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.9.0)
11
+ - source_version: `0.9.1`
12
+ - published_version: `0.9.0`
13
13
  - install_published: `gem install praxo-core`
14
14
  - install_source: `gem install praxo-core`
15
- - source_tag: `ruby/v0.8.2`
15
+ - source_tag: `ruby/v0.9.1`
16
16
  - tier: Core
17
17
  - contract: `SPEC_VERSION` `0.2.0`
18
18
  - documentation: https://axisvela.github.io/praxo-core/languages/ruby/
19
19
 
20
20
  ## Capabilities and Status
21
21
 
22
- - OpenAI-compatible model: native (`Praxo::Adapters::OpenAICompatible`)
23
- - Anthropic model: native (`Praxo::Adapters::Anthropic`; injectable transport)
24
- - Gemini model: native (`Praxo::Adapters::Gemini`; injectable transport)
22
+ - OpenAI-compatible model: native (`Praxo::Adapters::OpenAICompatible`; `generate_stream` reassembles SSE content, tool calls, usage, and finish reason)
23
+ - Anthropic model: native (`Praxo::Adapters::Anthropic`; injectable transport; `generate_stream` reassembles Anthropic SSE)
24
+ - Gemini model: native (`Praxo::Adapters::Gemini`; injectable transport; `generate_stream` reassembles Gemini SSE)
25
25
  - MCP client: native (`Praxo::Adapters::MCPClient`; stdio, plus `HttpMCPTransport` for Streamable HTTP 2025-03-26)
26
26
  - Harmovela sink: native (`Praxo::Adapters::HarmovelaSink`)
27
27
  - OpenTelemetry sink: native (transport seam) (`OtelSink`; caller supplies OTLP/HTTP transport)
@@ -44,8 +44,8 @@
44
44
 
45
45
  ## Boundaries
46
46
 
47
- - In-process framework; not an HTTP user agent, crawler, model provider, hosted
48
- service, workflow engine, identity provider, or safety controller.
47
+ - In-process framework; not a model provider, hosted service, workflow engine,
48
+ identity provider, or safety controller.
49
49
  - No exactly-once, sandbox-isolation, production-security, real-time, or
50
50
  physical-safety claim.
51
51
  - Registry pages are release snapshots. Verify the published version and read the
data/llms.txt CHANGED
@@ -7,21 +7,21 @@
7
7
  # Package
8
8
 
9
9
  - package: `praxo-core`
10
- - registry: [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.8.1)
11
- - source_version: `0.8.2`
12
- - published_version: `0.8.1`
10
+ - registry: [RubyGems](https://rubygems.org/gems/praxo-core/versions/0.9.0)
11
+ - source_version: `0.9.1`
12
+ - published_version: `0.9.0`
13
13
  - install_published: `gem install praxo-core`
14
14
  - install_source: `gem install praxo-core`
15
- - source_tag: `ruby/v0.8.2`
15
+ - source_tag: `ruby/v0.9.1`
16
16
  - tier: Core
17
17
  - contract: `SPEC_VERSION` `0.2.0`
18
18
  - documentation: https://axisvela.github.io/praxo-core/languages/ruby/
19
19
 
20
20
  # Capabilities and Status
21
21
 
22
- - OpenAI-compatible model: native (`Praxo::Adapters::OpenAICompatible`)
23
- - Anthropic model: native (`Praxo::Adapters::Anthropic`; injectable transport)
24
- - Gemini model: native (`Praxo::Adapters::Gemini`; injectable transport)
22
+ - OpenAI-compatible model: native (`Praxo::Adapters::OpenAICompatible`; `generate_stream` reassembles SSE content, tool calls, usage, and finish reason)
23
+ - Anthropic model: native (`Praxo::Adapters::Anthropic`; injectable transport; `generate_stream` reassembles Anthropic SSE)
24
+ - Gemini model: native (`Praxo::Adapters::Gemini`; injectable transport; `generate_stream` reassembles Gemini SSE)
25
25
  - MCP client: native (`Praxo::Adapters::MCPClient`; stdio, plus `HttpMCPTransport` for Streamable HTTP 2025-03-26)
26
26
  - Harmovela sink: native (`Praxo::Adapters::HarmovelaSink`)
27
27
  - OpenTelemetry sink: native (transport seam) (`OtelSink`; caller supplies OTLP/HTTP transport)
@@ -44,8 +44,8 @@
44
44
 
45
45
  # Boundaries
46
46
 
47
- - In-process framework; not an HTTP user agent, crawler, model provider, hosted
48
- service, workflow engine, identity provider, or safety controller.
47
+ - In-process framework; not a model provider, hosted service, workflow engine,
48
+ identity provider, or safety controller.
49
49
  - No exactly-once, sandbox-isolation, production-security, real-time, or
50
50
  physical-safety claim.
51
51
  - Registry pages are release snapshots. Verify the published version and read the
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.8.2
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - AxisVela
@@ -31,6 +31,8 @@ files:
31
31
  - api/0.8.0.txt
32
32
  - api/0.8.1.txt
33
33
  - api/0.8.2.txt
34
+ - api/0.9.0.txt
35
+ - api/0.9.1.txt
34
36
  - lib/praxo.rb
35
37
  - lib/praxo/adapters/anthropic.rb
36
38
  - lib/praxo/adapters/gemini.rb
@@ -47,6 +49,7 @@ files:
47
49
  - lib/praxo/middleware.rb
48
50
  - lib/praxo/models.rb
49
51
  - lib/praxo/plugin.rb
52
+ - lib/praxo/plugin_process.rb
50
53
  - lib/praxo/retriever.rb
51
54
  - lib/praxo/runtime.rb
52
55
  - lib/praxo/sse.rb