Metadata-Version: 2.4
Name: tool-result-context-binding-verdict
Version: 1.1.0
Summary: Verifier SDK for tool-result context-binding verdicts: seal a tool result with its production context, verify BOUND / STALE / CONTEXT-MISMATCHED / UNBOUND before consumption.
Author: TextForAgents LLC
License: MIT License
        
        Copyright (c) 2026 TextForAgents LLC
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Tool-result context-binding verdict — verifier SDK

Before your agent acts on a cached or replayed tool result, verdict whether
it is still bound to this task — **BOUND, STALE, CONTEXT-MISMATCHED, or
UNBOUND** — with the drift you permit graded as a signed warning, never
passed silently.

Stated plainly: the lab's 7/7 accuracy was on labelled simulated scenarios —
the natural misbinding rate in a real runtime cache is unmeasured; the
ReplayBench 0.649 figure is the study's reported result
(write-up-corroborated; the arXiv primary-text check is still open); a BOUND
verdict grades context match, not result correctness; willingness to pay is
unmeasured.

## Quickstart

```python
from trcb_verdict import seal, verify

KEY = b"your-operator-sealing-key"  # your own key for local sealing
ctx = {"task_id": "task-A", "run_id": "r1", "tool": "search",
       "args": {"q": "rates"},
       "env": {"workspace_hash": "ws1", "tool_version": "1.0",
               "config_hash": "cfg1"}}
result = {"hits": ["a", "b"]}

envelope = seal(result, ctx, KEY)
print(verify(envelope, result, ctx, KEY)["verdict"])          # BOUND
replay = dict(ctx, task_id="task-B")
print(verify(envelope, result, replay, KEY)["verdict"])       # CONTEXT-MISMATCHED
```

Pricing: SDK $19.99/runtime/mo (local sealing + verification, no per-call
fee); hosted verdict API $0.01/verdict; Runtime pass $49.99/mo incl.
exactly 10,000 hosted verdicts; Organisation pass $99.99/mo incl. exactly
25,000. One free bundle of exactly 100 hosted verdicts per registered
identity group (declared operator name and payer wallet; names and wallets
are self-declared until a payment attests the wallet).

Receipts: `verify()` returns a signed receipt whose `subject` names exactly
what was graded (envelope signature, result hash, consuming task_id, run_id,
tool, args digest, environment fingerprint, account - null here). The hosted
`POST /receipt/verify` is authoritative for hosted receipts; this 1.1.0 core
matches it. The published 1.0.0 verifies envelopes only: its receipts are not
accepted by the hosted verifier and it cannot check hosted receipts.
Support: support@textforagents.com
