Repository navigation
Add setup and configuration clients over the hosted MCP tools - #126
Open
bryanwahyu wants to merge 1 commit into
Open
bryanwahyu wants to merge 1 commit into
bryanwahyu wants to merge 1 commit into
Conversation
Expose get_setup_status, list_setup_candidates, get_configuration, list_operations, describe_operation, propose_change and apply_change as client.setup and client.config on both sync and async clients, matching the arguments the CLI's setup and config commands send. propose_change sends a fresh UUIDv7 request_id unless the caller passes one, so an identical call can be retried safely after an uncertain result. Like the other MCP helpers, nothing retries automatically.
bryanwahyu
force-pushed
the
add-configuration-and-setup-clients
branch
from
November 27, 2026 12:13
2343867 to
8853291
Compare
This branch has not been deployed
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.
Who it helps
Teams that onboard repositories or keep Proofline settings in code, from a Python service, an internal platform tool, or a coding agent written in Python. Today
proofline setup status|candidatesandproofline config get|operations|describe|propose|applyexist only in the CLI. From Python, the only option is shelling out to the binary or hand-writing the MCP handshake. This PR adds the same seven hosted tools to both clients:Decisions
knowledgeandfixes.client.setupandclient.config(sync and async) subclass the existingMcpTools/AsyncMcpTools, so they inherit the handshake, the 8 KiB request bound, the no-retry rule, theProoflineErrormapping for protocol and HTTP errors, and per-callorganization_id. Results stayKnowledgeResult, and refusals come back withisErrorset, just like the other MCP helpers. The new methods wrap no structured data in types of their own, because that data is the hosted tool's contract and nothing in this repo pins it.src/config.rs,src/setup.rsand the CLI's HTTP tests and send the same argument objects. Only the selectors you pass are sent, anddescribe_operationalways sendsparameters(empty when none are given), as the CLI does.request_idis an idempotency key, so the SDK makes it controllable. The CLI's setup guide says to send a new random UUID on each proposal and to reuse it only for a retry of the identical call.propose_changegenerates a fresh UUID version 7 whenrequest_idis omitted (Python 3.11 has nouuid.uuid7, sonew_request_id()builds one per RFC 9562 and is exported). Callers that want to retry safely after an uncertain result pass their own value. The SDK never retries on its own.propose_changereturns the server's diff andchange_id, or theapproval_urlfor a sensitive change.apply_changereturns a held sensitive change (applied: false) unchanged, and never follows the approval link.proofline/_generated/,openapi.public.jsonor the workflows changes.How I verified it
python3 scripts/check.pypasses. It regenerates the client, runs ruff, ruff format, mypy and the contract checks, runs the full suite (225 passed, including 7 new tests), and smoke-tests the built wheel and sdist.tests/test_configuration.pyuses the existing loopback HTTP server in both sync and async modes:organization_id, sends exactly the expected tool name and arguments, in one handshake plus one call;propose_changesends a fresh version 7request_idon each call, keeps a caller-supplied one, and omitsinputwhen none is given;apply_changeare returned unchanged, and a 503 raisesProoflineErrorwith no retry;new_request_id()produces unique RFC 9562 version 7 UUIDs carrying the current millisecond timestamp.test_mcp_public_types_accept_legacy_and_targeted_callsnow also type-checks every new method, legacy and targeted, through the public entry point with the repo's mypy config.setup:write/org:configuretokens. Wire compatibility rests on matching the CLI's arguments and its tests.