Repository navigation
feat(tools): builtin GitHub tool Installable in the catalogue; mint derives brokerId - #1670
Merged
Merged
Conversation
…erives brokerId Piece 2 follow-up (tools plan §2, §6). The catalogue returned only channel providers, so the Tools page had no not-yet row, no allow-list and no broker to mint against (lily-shen 67719). - seed-builtin-tools.ts upserts the builtin GitHub Installable at boot with one mcp-server component named for the broker (commonly-grant-broker) and enabledTools projected from TOOL_DEFINITIONS, never hand-written. - GET /api/installables is one response, two lists: every entry carries list: 'channels' | 'tools'. A tool entry adds broker, tools (name, tier, irreversible) and the caller's own connected GitHub App connections (connectionId, owner, repo). No credential or Connection _id leaves the route. - POST /api/grants reads brokerId from the seeded row and ignores the body's; a tool outside enabledTools is 400 invalid_tools, no seed row is 503 broker_unavailable. - V2ConnectorsPage filters list: 'tools' out of its rows. Named tests: the builtin GitHub Installable enables exactly the broker's GitHub tools; brokerId comes from the tool Installable, never the body; the mint refuses a tool the Installable does not enable; the catalogue returns the GitHub tool Installable with its tools, broker and the caller's connections, on the tools list; a tool Installable in the catalogue never renders as a channel row. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Vera 67728: the field naming who holds the credential must not be caller-written. A body carrying brokerId is now 400 invalid_broker; the server still sets it from the seeded tool Installable. Named test: a client-supplied brokerId is refused. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ays free of GitHub crypto After the rebase onto #1668, grants.read.test.js mounted routes/grants.ts unmocked and the new resolveBrokerFor import pulled toolBrokerService → githubAppService → jsonwebtoken at load, which throws on Node 26 (SlowBuffer is gone). The broker definitions are only needed when seeding or projecting tools, so require them on first use. Co-Authored-By: Claude Fable 5.1 <[email protected]>
samxu01
force-pushed
the
wren/piece2-github-tool-installable
branch
from
September 11, 2026 20:12
43f59ad to
98820d5
Compare
samxu01
pushed a commit
that referenced
this pull request
Sep 11, 2026
… from the catalogue (#1670), with direction-A marks The seam closes on Wren's catalogue: GET /api/installables now lists the GitHub tool Installable (list: 'tools') with its projected allow-list and the caller's Connections, so the page draws what the server enforces: - not-yet row per tool Installable with no live grant — dashed dot, muted name, what it does, `read, or read and write`, `not granted`, Add (ink); without a Connection or on an unconfigured instance the row says so and offers no Add. - Add opens in the aside: room, connection (when more than one), a writeMode segment, the allow-list the mode admits (read → read tools; write modes → all), what asks first (the catalogue's irreversible tools under `write`), every non-internal seat in the room checked, expiry 7/30/90 days, Grant (ink). The mint body is the server's: connectionId, installationId, target, tools, writeMode, audience, expiresAt — never a brokerId (Vera 67728). - Change access pre-fills from the grant (effectiveAudience, not the raw snapshot — Vera 67568) and is a new grant plus a revoke of the old one; Grant again on an expired/revoked row only mints. - "what asks first" under `write` lists the catalogue's irreversible tools. - direction A (Sam 2026-09-11): the grant's mode and a trail line's outcome carry a 14px mark with the word in `title`; the granted row no longer repeats the tool's description sentence. glyphs.tsx is the same file #1671 adds (identical content, merges clean). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5
lilyshen0722
added a commit
that referenced
this pull request
Sep 12, 2026
…tallationId from the connection (#1677) Piece-2 follow-up owed to Vera (67821), after #1670 merged. Seed: the upsert is keyed on { installableId, source: 'builtin' } instead of the id alone, and the seed first checks who holds the id — a row another source published under 'github' is left untouched with a warning rather than overwritten or tripped over (installableId is unique). Mint: the grant's installationId is copied from the loaded connection (top-level installationId, falling back to config.installationId); a connection without one is connection_mismatch, and a body that carries installationId is refused 400 invalid_installation, the same way brokerId is. A grant on connection A can no longer name installation B. Tests: `the seed never claims a non-builtin row`, `the seed creates the builtin row once and updates it in place` (real memory Mongo, unique index in play); `installationId comes from the connection, never the body`, `a client-supplied installationId is refused`, `a connection without an installation is a mismatch`. Plan §3 notes the derived field. Co-authored-by: Claude Fable 5.1 <[email protected]>
samxu01
pushed a commit
that referenced
this pull request
Sep 12, 2026
… from the catalogue (#1670), with direction-A marks The seam closes on Wren's catalogue: GET /api/installables now lists the GitHub tool Installable (list: 'tools') with its projected allow-list and the caller's Connections, so the page draws what the server enforces: - not-yet row per tool Installable with no live grant — dashed dot, muted name, what it does, `read, or read and write`, `not granted`, Add (ink); without a Connection or on an unconfigured instance the row says so and offers no Add. - Add opens in the aside: room, connection (when more than one), a writeMode segment, the allow-list the mode admits (read → read tools; write modes → all), what asks first (the catalogue's irreversible tools under `write`), every non-internal seat in the room checked, expiry 7/30/90 days, Grant (ink). The mint body is the server's: connectionId, installationId, target, tools, writeMode, audience, expiresAt — never a brokerId (Vera 67728). - Change access pre-fills from the grant (effectiveAudience, not the raw snapshot — Vera 67568) and is a new grant plus a revoke of the old one; Grant again on an expired/revoked row only mints. - "what asks first" under `write` lists the catalogue's irreversible tools. - direction A (Sam 2026-09-11): the grant's mode and a trail line's outcome carry a 14px mark with the word in `title`; the granted row no longer repeats the tool's description sentence. glyphs.tsx is the same file #1671 adds (identical content, merges clean). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5
lilyshen0722
added a commit
that referenced
this pull request
Sep 12, 2026
…ption A) (#1669) * feat(v2): Tools on the Connectors page — the granted half (piece 4, option A) Tools plan §6: a second list under the channels in the same row grammar, one row per RoomGrant the person can see (live · pulsing when used in the last 10 min · hollow when revoked or expired), the aside from the projected grant (who granted it and when it ends, the agents allowed, the allow-list under its write mode, what asks a person first, budget, two-click Revoke) and the trail from the broker's rows — one muted mono line per ToolCall with the three COUNT(*) numbers in display 22 / mono 11. Heading with the mono count, a search field and a segment on the same line. 390 as the channels list. SEAM (Wren 67724/67725): the not-yet row, the Add form and Change access wait on the builtin GitHub Installable landing in GET /api/installables with its McpServer.enabledTools; the server derives brokerId. Until then `catalog` is empty and those controls do not render — nothing pretends to grant. Reads only /api/pods/:podId/grants, /api/grants/:id/calls, /api/registry/pods/:podId/agents (#1668). GitHub glyph added to the platform set. Layout invariants: trail line is muted mono with no semantic colour; counts are 22/11; the display titles reset under :lang(zh). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5 * feat(v2): Tools — the not-yet row, Add, Change access and Grant again from the catalogue (#1670), with direction-A marks The seam closes on Wren's catalogue: GET /api/installables now lists the GitHub tool Installable (list: 'tools') with its projected allow-list and the caller's Connections, so the page draws what the server enforces: - not-yet row per tool Installable with no live grant — dashed dot, muted name, what it does, `read, or read and write`, `not granted`, Add (ink); without a Connection or on an unconfigured instance the row says so and offers no Add. - Add opens in the aside: room, connection (when more than one), a writeMode segment, the allow-list the mode admits (read → read tools; write modes → all), what asks first (the catalogue's irreversible tools under `write`), every non-internal seat in the room checked, expiry 7/30/90 days, Grant (ink). The mint body is the server's: connectionId, installationId, target, tools, writeMode, audience, expiresAt — never a brokerId (Vera 67728). - Change access pre-fills from the grant (effectiveAudience, not the raw snapshot — Vera 67568) and is a new grant plus a revoke of the old one; Grant again on an expired/revoked row only mints. - "what asks first" under `write` lists the catalogue's irreversible tools. - direction A (Sam 2026-09-11): the grant's mode and a trail line's outcome carry a 14px mark with the word in `title`; the granted row no longer repeats the tool's description sentence. glyphs.tsx is the same file #1671 adds (identical content, merges clean). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5 * fix(v2): the Add form sends no installationId — the mint takes it from the Connection (#1677) Vera 67821 via #1677: a grant on connection A must not be able to name installation B, so the mint derives installationId from the Connection and refuses a client-supplied one. The body is now exactly the six keys the route takes — audience, connectionId, expiresAt, target, tools, writeMode — pinned by key list, with brokerId and installationId both asserted absent. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5 * fix(v2): Tools — Revoke and Change access are the granter's; a failed revoke after Change access is retried alone; the trail says "awaiting a person" Vera 67912 / Wren 67913 on 0368992: - Revoke and Change access render only when grant.grantedBy is the viewer — the route 403s anyone else, so the page never draws a control the server would refuse. A member still reads the grant and its trail. - Change access keeps the minted grant whatever happens next. If the revoke of the old grant fails, the aside says the old one is still live and offers "Revoke the old grant", which retries only the revoke — never a third mint. - A trail line's outcome reads like the count: pending_approval → "awaiting a person" (the mark's title too). Tests: "Revoke renders only for the granter"; the failed-revoke retry pins the three POSTs as mint, revoke, revoke. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5 --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Piece 2 follow-up on the tools plan (§2, §6). lily-shen found (67719) that
GET /api/installablesreturned only channel providers: no tool Installable, nomcp-servercomponent, no tool list, and the mint took abrokerIdthe client had no source for. Wren's ruling (67724): the builtin GitHub Installable lands in the same catalogue, tagged by list, and the mint derives the broker server-side.backend/scripts/seed-builtin-tools.tsupserts the builtin GitHub Installable at boot: onemcp-servercomponent named for the broker (commonly-grant-broker, the MCP server nameroutes/mcpGrants.tsdeclares),transport: 'http', andenabledToolsprojected fromTOOL_DEFINITIONS, never hand-written, so catalogue, mint and broker read one list. Separate from the connector seeder so the connector tests never import the broker.GET /api/installablesis one response, two lists (Sam's option A, 67407). Every entry carrieslist: 'channels' | 'tools'. A tool entry addsbroker: { id },tools: [{ name, description, requiredWriteMode, irreversible }], andconnections: [{ connectionId, owner, repo }](the caller's own connected, unrevoked GitHub App rows, the Add form's mint source). No credential and no Connection_idleaves the route.Integration.findruns only when a tool row exists.POST /api/grantsreadsbrokerIdfrom the seeded row's component and ignores the body's. A tool outsideenabledToolsis400 invalid_tools; no seed row is503 broker_unavailable.V2ConnectorsPagefilterslist: 'tools'out of its rows.args_digest, never args.Named tests
the builtin GitHub Installable enables exactly the broker's GitHub tools(+projectToolsnarrowing,resolveBrokerForrefusal) inbackend/__tests__/unit/services/toolInstallables.test.jsbrokerId comes from the tool Installable, never the body;the mint refuses a tool the Installable does not enable;the mint refuses with broker_unavailable when no tool Installable is seededinbackend/__tests__/unit/routes/grants.mint.test.jsthe catalogue returns the GitHub tool Installable with its tools, broker and the caller's connections, on the tools listininstallableCatalogService.test.js(also assertslist: 'channels'on existing rows and that no key material leaks)a tool Installable in the catalogue never renders as a channel rowinV2ConnectorsPage.test.tsxVerification
roomGrantServiceandinstallablesroute suites pass locally (34 tests).tsc --noEmitclean on every touched file.frontend/node_modulesis missingjest-environment-jsdomand@babel/preset-env, so the connectors page suite could not run locally. CI is the check for that one.Out of scope
installationIdon the mint still comes from the body (pre-existing). The Tools page (wave/piece4-tools-page) reads these entries; #1668's read routes are unchanged.🤖 Generated with Claude Code