Skip to content

Expose principal-keyed gateway trust in the tool action surface - #194

Merged
Mearman merged 3 commits into
mainfrom
feat/gateway-trust-principal-tool-actions
Sep 18, 2026
Merged

Mearman merged 3 commits into
mainfrom
feat/gateway-trust-principal-tool-actions

Conversation

@Mearman

@Mearman Mearman commented Sep 18, 2026

Copy link
Copy Markdown
Member

Closes #193

Extends the existing gateway_trust/gateway_untrust MCP tool actions with an optional principal field: when true, the given device-id is trusted/untrusted as a user principal (GatewayTrust.addPrincipal/removePrincipal, agent-comms#187) instead of a bare remote device. gateway_list_trusted now reports both the trusted devices and the trusted principals together, since listing isn't mutually exclusive the way trusting/untrusting is.

Extended the existing three actions rather than adding new ones, matching the issue's own suggested naming convention.

Split gatewayTrust/gatewayUntrust/gatewayListTrusted out of tool.ts into their own module (gateway-trust-actions.ts) as a separate, behaviour-preserving refactor commit first, since the added lines pushed tool.ts over the repo's max-lines cap.

Moves gatewayTrust/gatewayUntrust/gatewayListTrusted into their own
module as free functions over a narrow GatewayTrustStore slice,
matching the same split-a-collaborator-out convention already used for
agent-registry.ts, delivery-engine.ts, and friends. Pure move, no
behavioural change: keeps tool.ts under the repo's max-lines cap ahead
of extending these three actions with a principal flag.
Adds an optional principal field to the gateway_trust/gateway_untrust
action schema and MCP tool params, and the matching
addTrustedGatewayPrincipal/removeTrustedGatewayPrincipal/listTrustedGatewayPrincipals
methods to MeshOnlyFeatures and MeshStore, wrapping
GatewayTrust.addPrincipal/removePrincipal/listPrincipals (agent-comms#187).
Nothing reads the flag yet; the action handlers are wired up next.
gatewayTrust/gatewayUntrust now check action.principal: when true,
they call the principal-keyed store methods (addTrustedGatewayPrincipal/
removeTrustedGatewayPrincipal) instead of the bare-device ones, so the
MCP tool layer can finally reach GatewayTrust's principal allowlist
(agent-comms#187) alongside the original bare-device path. gatewayListTrusted
now reports both the trusted devices and the trusted principals together,
since listing isn't mutually exclusive the way trusting/untrusting is.

Closes #193
@Mearman
Mearman force-pushed the feat/gateway-trust-principal-tool-actions branch from ff052c7 to 7406c3e Compare September 18, 2026 08:55
@Mearman
Mearman marked this pull request as ready for review September 18, 2026 08:58
@Mearman
Mearman merged commit 4fe7469 into main Sep 18, 2026
6 checks passed
@Mearman
Mearman deleted the feat/gateway-trust-principal-tool-actions branch September 18, 2026 08:58
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-18T09:05:10.553734Z 7406c3e Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 3.17.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose principal-keyed gateway trust in the tool action surface

1 participant