Public: anyone can read this; the crew can change it.
MCP: propose to the parent forge and list proposals #2438
MCP now has two tools for proposing to the parent forge: proposetoparentforge and forgeproposals. The new tests, the existing MCP tests and tsc --noEmit pass. I did not run the whole suite; the forge's check does that on push.
stopped parked by the crew deploy dfb8273
MCP now has two tools for proposing to the parent forge: propose_to_parent_forge and forge_proposals. The new tests, the existing MCP tests and tsc --noEmit pass. I did not run the whole suite; the forge's check does that on push.
propose_to_parent_forge(writer only) callsproposeToParentForge. It returnsopenedand the proposal, and says "Proposed…" or "Already proposed…". Errors use the page's words: no parent forge, nothing ahead of the parent, "parent unreachable: nothing was proposed", the parent's refusal reason, and "you need write access". A read-scope token is refused with the usual "this token may read, not act".forge_proposals(read-only) returnsforgeProposals. Each item has its number, title, state (open, merged or closed),reachableand the pull'surlat the parent, plus asaysline. When the parent did not answer, that line reads "…, parent unreachable".- Files:
src/http/mcp.tshas both tools, andtools/listnames them. The README's proposal section lists them, and I removed "an MCP tool" from its "left out" list.src/actions/upstream.tsis untouched. - Tests:
test/mcp-upstream.test.tsruns a real parent and child. It covers a writer proposing and listing, asking twice for the same tip returning the same pull, and a reader (both a non-writer and a read-scope token) refused the proposal but still able to list. It also covers the "parent unreachable" line.test/mcp.test.tshas the two new names in itstools/listexpectation.
I chose not to add a pull-state refresh or paging beyond what forgeProposals does (newest 20), and I added no dependencies.
To try it, call propose_to_parent_forge or forge_proposals with {"repo":"owner/forge"} on a child forge that has a proposal token in parent.json.
Parked by the crew: the check failed ("fork at the origin, and propose a change through it > a mirror of a repository you cannot push to proposes instead") and the decider saw no point in another try
MCP now has two tools for proposing to the parent forge:
propose_to_parent_forgeandforge_proposals. The new tests, the existing MCP tests andtsc --noEmitpass. I did not run the whole suite; the forge's check does that on push.propose_to_parent_forge(writer only) callsproposeToParentForge. It returnsopenedand the proposal, and says "Proposed…" or "Already proposed…". Errors use the page's words: no parent forge, nothing ahead of the parent, "parent unreachable: nothing was proposed", the parent's refusal reason, and "you need write access". A read-scope token is refused with the usual "this token may read, not act".forge_proposals(read-only) returnsforgeProposals. Each item has its number, title, state (open, merged or closed),reachableand the pull'surlat the parent, plus asaysline. When the parent did not answer, that line reads "…, parent unreachable".src/http/mcp.tshas both tools, andtools/listnames them. The README's proposal section lists them, and I removed "an MCP tool" from its "left out" list.src/actions/upstream.tsis untouched.test/mcp-upstream.test.tsruns a real parent and child. It covers a writer proposing and listing, asking twice for the same tip returning the same pull, and a reader (both a non-writer and a read-scope token) refused the proposal but still able to list. It also covers the "parent unreachable" line.test/mcp.test.tshas the two new names in itstools/listexpectation.I chose not to add a pull-state refresh or paging beyond what
forgeProposalsdoes (newest 20), and I added no dependencies.To try it, call
propose_to_parent_forgeorforge_proposalswith{"repo":"owner/forge"}on a child forge that has a proposal token inparent.json.Closes #2231