@gethelio/proxy 0.10.0 → 0.11.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.
package/README.md CHANGED
@@ -113,6 +113,22 @@ policies:
113
113
  currency: 'GBP'
114
114
  window: 24h
115
115
 
116
+ budgets:
117
+ # One depleting pot shared by every tool that spends.
118
+ - name: agent-payments
119
+ limit: 50
120
+ currency: USD
121
+ window: session
122
+ key: session
123
+ on_exceed: deny # or require_approval for a break-glass ticket
124
+ contributors:
125
+ - match:
126
+ tool: 'stripe_*'
127
+ field: '$.amount'
128
+ - match:
129
+ tool: 'paypal_*'
130
+ field: '$.total'
131
+
116
132
  audit:
117
133
  storage: sqlite
118
134
  retention: 90d
@@ -166,15 +182,37 @@ That's it. Every tool call now passes through Helio. This includes full audit tr
166
182
 
167
183
  ### Policy Engine
168
184
 
169
- Declarative YAML rules that match on tool name, annotations, input parameters, environment, and cumulative state. Policies hot-reload without restart.
185
+ Declarative YAML rules that match on tool name, annotations, input parameters, environment, and cumulative state. Irreversible actions are flagged, and dry-run mode runs the full pipeline without forwarding to the MCP server. Policies hot-reload without restart.
186
+
187
+ ```yaml
188
+ policies:
189
+ rules:
190
+ - match:
191
+ tool: 'create_payment'
192
+ input:
193
+ '$.amount': { gt: 1000 }
194
+ action: require_approval
195
+ ```
196
+
197
+ ### Cross-Tool Spend Budgets
198
+
199
+ Cumulative cross-tool spend enforcement: one depleting pot aggregates spend across every tool that feeds it — Stripe and PayPal into one cap, each exposing the amount under its own argument field. Deterministic at the MCP gate, persistent across restarts via a durable spend ledger, with break-glass approvals for overages and a live dashboard view.
170
200
 
171
201
  ```yaml
172
- rules:
173
- - match:
174
- tool: 'create_payment'
175
- input:
176
- '$.amount': { gt: 1000 }
177
- action: require_approval
202
+ budgets:
203
+ - name: agent-payments
204
+ limit: 50
205
+ currency: USD
206
+ window: session
207
+ key: session
208
+ on_exceed: require_approval # or: deny
209
+ contributors:
210
+ - match:
211
+ tool: 'stripe_*'
212
+ field: '$.amount'
213
+ - match:
214
+ tool: 'paypal_*'
215
+ field: '$.total'
178
216
  ```
179
217
 
180
218
  ### Evidence Grounding
@@ -182,12 +220,13 @@ rules:
182
220
  Require proof before high-stakes actions. A refund requires a prior order lookup. A deployment requires a passing test run. The optional SDK marks tool outputs as evidence; the proxy enforces evidence requirements.
183
221
 
184
222
  ```yaml
185
- rules:
186
- - match:
187
- tool: 'process_refund'
188
- action: deny
189
- evidence:
190
- requires: ['orders.lookup']
223
+ policies:
224
+ rules:
225
+ - match:
226
+ tool: 'process_refund'
227
+ action: deny
228
+ evidence:
229
+ requires: ['orders.lookup']
191
230
  ```
192
231
 
193
232
  ```python
@@ -228,10 +267,12 @@ When Helio blocks an action, it returns structured feedback explaining what fail
228
267
  Declare prerequisite actions in policy. The proxy tracks completed actions per session and blocks anything where prerequisites aren't met.
229
268
 
230
269
  ```yaml
231
- rules:
232
- - match:
233
- tool: 'process_refund'
234
- requires: ['orders.lookup', 'customer.verify']
270
+ policies:
271
+ rules:
272
+ - match:
273
+ tool: 'process_refund'
274
+ action: allow
275
+ requires: ['orders.lookup', 'customer.verify']
235
276
  ```
236
277
 
237
278
  ### Approval Workflows
@@ -239,9 +280,9 @@ rules:
239
280
  Route sensitive actions to Slack, webhook, or the Helio dashboard. Configurable timeout and escalation, plus a dashboard-only break-glass override (REST API and dashboard UI; not exposed as a Slack button).
240
281
  If a channel delivery fails, Helio logs an operational warning and emits an `approval_notification_failed` dashboard event so operators can investigate without losing the underlying pending ticket.
241
282
 
242
- ### Transaction Controls
283
+ ### Rate & Spend Limits
243
284
 
244
- Rate limits per tool and per session. Spend limits with cumulative tracking. Irreversible action detection. Dry-run mode that executes the full pipeline without forwarding to the MCP server.
285
+ Rate limits per tool and per session. Per-rule spend limits that block a matched tool at its own cap - for a cumulative cap that spans tools, see [Cross-Tool Spend Budgets](#cross-tool-spend-budgets).
245
286
 
246
287
  ### Audit Trail
247
288