BRYDGE

v0.2.0
com.brydge-ai/brydge Checked 3 days ago Published 2 months ago

Checks whether an agent's actions actually happened, against the destination's own records.

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

brydge_supervise Ask BRYDGE before acting

Ask BRYDGE whether you may take an action, before you take it. ALLOWED returns an authorization id: carry the action out and write that id into the record it creates, where the destination keeps it (for a Stripe refund: metadata.brydge_authorization). ESCALATED means a person decides: do not carry it out, and once they have answered, ask again with the same idempotency_key and details to get their answer.

ParameterTypeDescription
action *stringThe kind of work, as it is set up in BRYDGE, such as refund.
idempotency_key *stringA name for this one intended action, such as refund:ch_123. Send the same value whenever you ask about the same action again, on a retry or once a person has answered; never reuse it for a different o…
target *stringWhat the work acts on: the charge, order or ticket id.
factsobjectWhat BRYDGE's rules judge the action by, such as {"amount": 4200}. BRYDGE compares a fact named amount with the amount in the destination's record, so give it in the same units.

brydge_report_outcome Report what happened

Tell BRYDGE what you believe happened after you carried out an allowed action. BRYDGE keeps your report beside what it finds in the destination's records; the report never changes the finding.

ParameterTypeDescription
authorization *stringThe authorization id brydge_supervise returned for the action.
outcome *stringSUCCEEDED: it was carried out and did what it was meant to. FAILED: the destination refused it or errored. REVERSED: it happened and was undone. CORRECTED: it happened and had to be fixed afterwards.
saidstringWhat the destination said, in its own words.

brydge_verify Check the work actually happened

Check whether an action actually happened. BRYDGE reads the destination system's own records now, with its own credential, and compares them with what it permitted. Only VERIFIED means it happened as permitted; FAILED, MISMATCH, UNKNOWN (BRYDGE could not tell) and PENDING (still in progress) are not. Use it before you tell anyone the work is done. A check that finds something new is billed; asking again when nothing has changed is free.

ParameterTypeDescription
authorization *stringThe authorization id brydge_supervise returned for the action.

brydge_get_finding What BRYDGE has found so far

What BRYDGE has already found about an action, without reading the records again. Free. BRYDGE checks each action by itself once the destination's reporting window has passed; until then this says PENDING.

ParameterTypeDescription
authorization *stringThe authorization id brydge_supervise returned for the action.

brydge_get_headroom How much you may do without a person

How many actions of this kind you may take in any 24 hours before a person is asked, how many are left, and what raises or lowers that. Every report BRYDGE checks and finds true raises it.

ParameterTypeDescription
action *stringThe kind of work, as it is set up in BRYDGE, such as refund.