Receipt Gate

v0.2.0
io.github.adekvatologiy/receipt-gate Checked 4 days ago Published 13 days ago

Holds an agent's claim of completion until an independent adapter observes the promised state.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

open_promise Open a promise

Record one observable future state, the authority needed for it, what may not change while acting, and the adapter that will check it. The adapter's own parameters are fixed here and written to the ledger, so the reading cannot be redirected afterwards. A promise no adapter can answer is refused at this point.

ParameterTypeDescription
authority *arrayverb:what — the actions required, and no others.
deal_id *string
holder *string
promise_id *string
promised_state *stringOne observable future state.
receipt_adapter *string
adapter_configobjectmanifest+sha256: manifest_path, sources[]. command+exit_code: argv[], cwd, expect_exit, expect_in_output, timeout. owner_acceptance: record_path, owner, version_sha256.
damage_ceilingarrayverb:glob — what may not change while acting.
expires_atnumber
ownerstring

request_capability Request one capability

Ask for one action inside the promise. Granted for a single call, or refused with the exact boundary that refused it — the authority it falls outside, or the damage-ceiling rule it would cross.

ParameterTypeDescription
action *string
promise_id *string
targetstring

record_action Spend a capability

Record that a granted action was taken. A token is good for one call; a second use is refused against the ledger.

ParameterTypeDescription
token *string
resultstring

claim_done Claim completion

Say the promise is finished. Held every time: a tool call by the holder is a report by the holder. The reply names the adapter that can answer instead. Call settle to have it read.

ParameterTypeDescription
promise_id *string

settle Settle against a receipt

Run the adapter the promise named and put what it saw beside what was promised. A match settles the promise and returns the escrowed rights. Anything else is kept as a remainder: the exact gap, what can no longer be treated as done, the authority still available, and who may accept, cancel, hand over or change it.

ParameterTypeDescription
promise_id *string

cancel_by_owner Release a promise as its owner

The result owner releases the promise, naming a version. This is a terminal state of its own and stands apart from a failed fulfilment.

ParameterTypeDescription
owner *string
promise_id *string
versionstring

impossible_in_scope Record impossibility and keep the boundary

Keep a receipt of impossibility together with the authority boundary that made it impossible. A terminal state of its own, standing apart from a false success.

ParameterTypeDescription
boundary *string
promise_id *string

hand_over Hand a remainder to a new holder

Pass the remainder on under a new promise linked to the earlier imprint. Taking a remainder makes nobody the author of the earlier promise, and handed over is not fulfilled.

ParameterTypeDescription
new_holder *string
new_promise_id *string
promise_id *string
authorityarray
promised_statestring

open_debts List open promises

The promises a deal still holds, read from the ledger.

ParameterTypeDescription
deal_idstring

verify_ledger Verify the ledger chain

Walk the hash chain and report whether it is intact. A break names which of the three it is: a gap in the sequence, a broken link, or an edited record.