Repository navigation
Phase 5: assistant tools over MCP, guide and hardware checklist - #11
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
list_machines, propose_reset, propose_force_off, get_recovery, withdraw_recovery and get_events, listed only by a hub. They share the REST routes' code and rules; there is no confirm tool. GET /v2/machines, the event stream and webhooks no longer show proposerKey to other keys. Co-Authored-By: Claude Opus 5.5 <[email protected]>
docs/integrating-an-assistant.md: keys, MCP, REST with a pinned certificate, the event stream and webhooks, a recovery step by step, what to do with each result and refusal, rules for an assistant, and running your own copy. Its marked examples run against a test hub (guide_test.go), in order, so they stay true. docs/hardware-test.md: the owner's checklist for a real NanoKVM. powerdeck-helper webhook add|list|test|rm, since a webhook could only be added through the API. Hub tools are listed only with a KVM linked. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[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.
Phase 5 of the recovery layer plan: everything an assistant needs, over MCP, with a guide and a hardware checklist.
MCP tools on the hub
list_machines,get_events,propose_reset,propose_force_off,get_recoveryandwithdraw_recovery. Each runs the same code as its REST route (propose,findRecovery,declineandmachinesForwere pulled out of the handlers), so the rules are the same. There's no tool to confirm. A refusal is a tool error with the REST reply's fields (retryAt). They're listed, and theinitializeinstructions describe them, only on a helper with a KVM linked. Every 2.5 helper has a hub object, so gating on that would have listed them on every PC.Fix:
proposerKeyreached other keysThe recovery routes hid it, but
GET /v2/machines(a machine'srecovery), the event stream's snapshot, and itsrecoveryevents sent it to every watcher. All of them, andget_events, now go throughviewMachine/viewEvent. Webhooks never carry it.powerdeck-helper webhook add|list|test|rmFound while writing the guide: a webhook could only be added through the API from an owner device.
Docs
docs/integrating-an-assistant.md: keys, MCP, REST with a pinned certificate (openssl and stdlib Python), the event stream and webhooks, a recovery step by step, what to do with each result and refusal, rules for an assistant, and running your own copy.docs/hardware-test.md: the owner's checklist for a real NanoKVM and computer, covering the power light, sleep, wake by KVM and by Wake-on-LAN, a memory test in a VM, a real freeze, a reset lead pulled out, and the agent path.Tests
TestMCPHubcovers each hub tool, created vs open proposals,withdraw_recoveryby another key (refused), and get_events withafterand with an ID that's gone (missed). It also checks the refusalsbad_request,scope,device,agents_off,owner_only,not_foundandtoo_soonwithretryAt, and that no confirm tool exists.TestMCPNoHub: without a KVM linked, only the 5 device tools are listed.TestRecoveryEventsand the webhook test: another key's stream, and webhooks, never carryproposerKey.GET /v2/machinesis checked inTestMCPHub.TestAssistantGuideruns the guide's 9 marked examples, in order, against a test hub whose watch really sees the machine freeze:unknown, thenhungafter 3 minutes, the hub's own proposal, confirm, thenbackandrecovered. Changing a state, a step, a status or a proposer in the guide fails it (all four tried).Last-Event-IDreplay worked.webhook add|list|test|rmran against a real helper process, isolated in a network namespace. The receiver verified the delivery with protocol.md'sverify().Go tests pass,
go vetis clean on Linux and Windows, and gofmt is clean.🤖 Generated with Claude Code