@intutic/proxy 2.4.0 → 2.5.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.
Files changed (2) hide show
  1. package/README.md +30 -28
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -17,47 +17,49 @@ intutic-proxy is a high-performance AI agent proxy written in Rust (edition 2021
17
17
  - **No verdict refuses**: a rule stopped by either limit, or one that traps or returns something that is not a verdict, refuses the request with `GOVERNANCE_UNAVAILABLE`, whatever the fail setting
18
18
  - **Isolation**: Each plugin runs in a dedicated WASM store
19
19
 
20
- ### Plugin Chain
20
+ ### Governance Steps
21
21
 
22
- The proxy processes every request through an ordered plugin chain:
22
+ There is no plugin chain. Each step is called directly where it applies on the
23
+ request or response path:
23
24
 
24
- | Plugin | Purpose |
25
- |--------|---------|
26
- | Budget Gate | Enforce per-ticket and per-team token budgets |
27
- | DLP Gate | Block or redact sensitive data (secrets, PII, credentials) |
28
- | PCAS Gate | Prior Consent and Autonomy Scope enforcement |
29
- | Response Cache | Replay the answer to an identical request (exact match, Valkey), or to a reworded plain-text question in the same context (semantic match, TurboVec) |
30
- | SOP Prompt Injector | Inject workspace governance SOPs into system prompts |
25
+ | Step | Where | Purpose |
26
+ |------|-------|---------|
27
+ | Budget Gate | `plugins/budget_gate.rs`, called from `proxy.rs` | Refuse a request that would pass this machine's daily spend cap (standalone); workspace, key and member budgets are checked beside it in `proxy.rs` |
28
+ | DLP | `dlp::scan`, inline on the request path | Block or redact sensitive data (secrets, PII, credentials); findings reach `DlpEscalationDetector` |
29
+ | Tool authorisation | `UnauthorizedToolDetector` and `plugins/response_gate.rs` | Refuse tools an SOP's `deny_tools` names, on the request and before a response's tool call reaches the client |
30
+ | Response Cache | `plugins/semantic_cache.rs` | Replay the answer to an identical request (exact match, Valkey), or to a reworded plain-text question in the same context (semantic match, TurboVec) |
31
+ | SOP injection | `sops.rs` | Resolve SOPs by role and inject their content into system prompts |
31
32
 
32
33
  ### Model Selection
33
34
 
34
35
  - **Thompson Sampling bandit**: selects a model per task cell from observed
35
- **availability and latency**.
36
-
37
- Two corrections to what this said before. It claimed selection was based on
38
- "historical cost, latency, and quality signals". `RewardSignals`
39
- (`src/routing/reward.rs:32`) carries `upstream_ok`, `latency_ms`,
40
- `token_anomaly`, `raw_cost_usd` and `actual_cost_usd` — and the cost pair does
41
- not move the reward: `cheaper_routed_model_earns_no_bonus` asserts a cheaper
42
- route earns nothing, deliberately. There is **no quality signal at all**: a
43
- cheap model returning a confidently wrong answer, quickly, scores a perfect
44
- 1.0.
45
-
46
- So the router today optimises for *responding*, not for responding *well* or
47
- *cheaply*. Do not describe it as saving money or preserving quality until
48
- there is a measurement behind either word.
36
+ **availability, latency, cost and response integrity**.
37
+
38
+ `RewardSignals` (`src/routing/reward.rs:32`) carries `upstream_ok`,
39
+ `latency_ms`, `token_anomaly`, `raw_cost_usd`, `actual_cost_usd` and
40
+ `response_integrity`. The cost term is two-sided: a cheaper route earns more
41
+ than an equal-cost one (`cheaper_routed_model_earns_a_bonus`), and a costlier
42
+ one less. `response_integrity` is the only signal about the answer itself: it
43
+ catches malformed, truncated and unusable responses, and a faulted response
44
+ loses more than any price advantage can return
45
+ (`quality_fault_outweighs_any_price_advantage`). It does **not** catch a
46
+ wrong but well-formed answer.
47
+
48
+ So the router optimises for responding *usably* and *cheaply*, not for
49
+ responding *well*. Do not describe it as preserving quality until there is a
50
+ measurement behind the word.
49
51
 
50
52
  ### Network Enforcement
51
53
 
52
54
  - **TLS MITM**: Transparent interception for Windsurf and other harnesses
53
- - **OS-level firewall rules**: Generates platform-native rules to redirect agent traffic through the proxy
54
- - macOS: `pf` (Packet Filter)
55
- - Linux: `iptables` / `nftables`
56
- - Windows: `netsh`
55
+ - **OS-level firewall rules**: Generates platform-native default-deny egress rules, so traffic leaves the machine only through the proxy (`intutic-proxy enforce`, `intutic enforce`)
56
+ - macOS: `pf` (Packet Filter) anchor
57
+ - Linux: `nftables`, or `iptables` when `nft` is absent
58
+ - Windows: not implemented (`generate` says so, `apply` refuses)
57
59
 
58
60
  ### Security & Observability
59
61
 
60
- - **DLP scanner**: Pattern-based and entropy-based secret detection, plus validated PII detectors for payment cards (Luhn), IBANs (mod 97) and US Social Security numbers (issued ranges), on by default, and email addresses and phone numbers, off by default. `dlp.detectors` in the proxy config sets each detector's action, and a connected workspace's `piiDetectors` setting sets a baseline the local config may only make stricter. See [PII detectors](https://docs.intutic.ai/guide/policies#pii-detectors)
62
+ - **DLP scanner**: Prefix-anchored secret patterns (no entropy-based matching), plus validated PII detectors for payment cards (Luhn), IBANs (mod 97) and US Social Security numbers (issued ranges), on by default, and email addresses and phone numbers, off by default. `intutic_settings.dlp.detectors` in this machine's config sets each detector's action, and a connected workspace's `piiDetectors` setting sets a baseline the local config may only make stricter. See [PII detectors](https://docs.intutic.ai/guide/policies#pii-detectors)
61
63
  - **Code skeleton extraction**: Uses `tree-sitter` and `syn` for AST-level code analysis
62
64
  - **Token counting**: Accurate pre-flight token estimation via `tiktoken-rs`
63
65
  - **Telemetry**: OpenTelemetry OTLP export for traces and metrics — a `SpanExporter` and `SdkMeterProvider` ship in `src/main.rs`, with the exported instrument set declared in `src/metrics.rs` (snip compaction histograms, egress counters, policy refusals). No logs pipeline
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intutic/proxy",
3
- "version": "2.4.0",
3
+ "version": "2.5.1",
4
4
  "description": "Native high-performance AI agent governance proxy binary",
5
5
  "type": "module",
6
6
  "main": "bin/proxy.js",