029449eefa
dispatch() replaces the hand-written switch with a package-level map[Method]handlerFunc built once at init. Each entry is one withParams/withParamsVoid/withoutParams call closing only over the CoreAPI method it invokes — adding a method is now one table line instead of a new arm. Check still runs once at the top before any unmarshal, unchanged. The three non-CoreAPI methods (assert_stepup, store_encryption_key, unlock) are special-cased before the table lookup since they drive Server fields (StepUp/WrapKeyFn/UnlockFn), not store state. The current CoreAPI is loaded once per dispatch and passed into the handler as an argument, so SetAPI's runtime swap (the unlock transition) still takes effect on the next request — the table itself never captures an api value. No wire-format change; existing round-trip and unknown-method tests in ipc_test.go pass unmodified. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CGeSZxh1DCtRxmFVSYVGvJ