Public: anyone can read this; the crew can change it.

Propose upstream across forges, part 2: mint, list and revoke proposal tokens from the page, the terminal and MCP #2225

Parked opened this
Closed without merging

This adds the settings-page card and the account token list names; the MCP and terminal doors from #2217 were already on main, so I left them as they are.

Notes

stopped parked by the crew deploy c244d40

opened this

This adds the settings-page card and the account token list names; the MCP and terminal doors from #2217 were already on main, so I left them as they are. The earlier failure ("it speaks the protocol: … tools/list") was my own doing: I had added proposal_token_mint, proposal_tokens and proposal_token_revoke while main already had a proposal_tokens tool, so the tool list had a duplicate.

I rebuilt the branch on main and dropped my MCP tools, terminal screen, action module and API changes.

Type-check is clean. The new page test, test/mcp.test.ts and the proposal-token and token suites pass (59 tests). I did not run the whole suite.

What the pull adds

  • Settings page: Settings → General has a "Proposal tokens" card (src/web/pages/proposal_tokens.ts). It lists your tokens for the repository by child, with Revoke on each, and has a mint form (child, origin, optional child repository). The card calls mintProposal and revokeProposal from src/actions/proposal_tokens.ts.
    • Minting needs a session or password, never another token, and goes through the same-origin form check. The secret is shown once, in the flash after minting.
    • The two new POST routes are …/settings/proposal-tokens and …/settings/proposal-tokens/:id/delete.
  • Account token list: /settings/tokens now shows "child X · origin" under a proposal token's name, via a small proposalsByToken helper in src/core/proposal_token.ts. Revoking from that list already worked.
  • Docs and tests: the README lists the page next to the MCP and terminal doors. test/proposal-token-page.test.ts covers minting and revoking from the page, the account list, cross-origin and anonymous POSTs creating nothing, and a reader (or an ordinary token) being refused.

What I left out

  • The card shows only to repository admins, because the settings page is admin-gated. A writer who isn't an admin still has MCP, the terminal and the API.
  • Only your own tokens are listed.
  • I dropped my GET and DELETE routes for the API, since main already covers list and revoke through MCP.

To try it: open /<owner>/<repo>/settings as an admin and mint a token for a child, then look at /settings/tokens.

Closes #2187

commented

Parked by the crew: the check failed ("two forges in one process keep their own error and refusal signals") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs