Skip to content

Fix/bindings credential broker - #223

Merged
sathish-mg merged 3 commits into
mainfrom
fix/bindings-credential-broker
Sep 9, 2026
Merged

sathish-mg merged 3 commits into
mainfrom
fix/bindings-credential-broker

Conversation

@gokul08-mg

Copy link
Copy Markdown
Contributor

A wasm32-areev-io tool's areev::fetch is answered by the credential
broker, and the broker was CLI-only: build_egress(flags) in the CLI,
no $AREEV_RUN_* spelling, no parameter in either binding. A service
driving runs through a binding could persist and pin a capability tool
and have nothing answer it.

  • One parser. areev_run::EgressSpec holds the five settings as the
    CLI's spec strings and builds the broker; the CLI's build_egress and
    the trigger path's connector credentials are thin calls onto it, so
    the surfaces cannot reach different verdicts.
  • Bindings. credentials, allow_hosts, tool_egress,
    credential_ttl_secs, resolver_env (camelCase in Node) on
    run_start, run_resume, trigger_run, trigger_deliver — appended
    after the existing parameters, so positional callers are unaffected.
    On the trigger surface credentials feeds the connector-poll broker
    too, as one --credential flag does. index.d.ts regenerated.
  • areev serve. $AREEV_RUN_CREDENTIAL, _ALLOW_HOST,
    _TOOL_EGRESS, _CREDENTIAL_TTL, _RESOLVER_ENV at server start,
    server-bound like $AREEV_RUN_TOOL_CMD. The CLI reads them as
    fallbacks too (flag wins), and the secret-registration choke point
    reads the variable spelling as well.
  • Blob door. serve_blobs is wired from the memory path on every
    surface (subject to areev::blob_get returns 501 on the Postgres tier, so an attachment-parsing capability tool cannot exist there #202 on Postgres).
  • Parity test. One fixture (a fake sandbox making five broker calls)
    driven from Node, Python, the CLI with flags, the CLI with variables,
    and the MCP server: same admitted call with the credential attached
    upstream and never visible to the module, same 403 + RUN-E022 for
    wrong host, wrong method, undeclared credential and an unpaired
    credential/host block, and the same four egress_refusal Observations
    in agent:harness. The CI node job now builds the binary so the CLI
    leg runs there.
  • Docs: docs/run.md (surface table + the binding spelling of "Running
    one"), docs/triggers.md, docs/mcp-reference.md, docs/cookbook.md,
    docs/security-model.md, the CLI help, and the changelog.

Verified: cargo test --workspace 2,680 passed; clippy clean; Node 73/73
(the parity test on both legs); Python 126 passed.

Closes #201.

The broker was built from CLI flags only, so a host driving runs through
Python or Node could pin a wasm32-areev-io tool and still have every
areev::fetch fail. The parser moves into areev-run as EgressSpec — the
one behind --credential/--allow-host/--tool-egress/--credential-ttl/
--resolver-env — and every surface calls it: the same-named parameters
on run_start/run_resume/trigger_run/trigger_deliver in both bindings, and
/_ALLOW_HOST/_TOOL_EGRESS/_CREDENTIAL_TTL/
_RESOLVER_ENV for areev serve (and as CLI fallbacks, like the rest of the
family). serve_blobs is wired from the memory path on every surface. A
parity test drives one capability tool from Node, Python, the CLI (flags
and variables) and the MCP server with one declaration and one set of
grants, asserting the same admitted call, the same four refusals, and
the same journaled Observations.
@gokul08-mg
gokul08-mg requested a review from a team as a code owner September 9, 2026 09:06
@sathish-mg
sathish-mg merged commit 31bb7ab into main Sep 9, 2026
20 checks passed
neoneye pushed a commit to agent-memory-atlas-archive/AreevAI--areev that referenced this pull request Sep 13, 2026
AreevAI#223 made `McpServer::runner` fallible — it now parses the egress spec,
which can fail — and updated every call site it could see. AreevAI#224 added one
it could not: the `areev_run_input` arm, written against the old
signature on a branch that predated the change.

Both were green on their own branches and git merged them without a
conflict, because they touch different lines of the same file. main did
not compile from the moment the second one landed.
@sathish-mg
sathish-mg deleted the fix/bindings-credential-broker branch October 22, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The credential broker is unreachable from the bindings, so no capability tool can run from Node or Python

2 participants