From 8d9c009a5ef93baa73e637c1bc18fd06fa0264b8 Mon Sep 17 00:00:00 2001 From: zayJu Date: Thu, 12 Nov 2026 10:11:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(engine):=20=E8=A1=A5=E4=B8=8A=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E6=96=B0=E5=A2=9E=E5=86=85=E5=AE=B9=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E7=9A=84=20minor=20=E7=89=88=E6=9C=AC=E6=8F=90=E5=8D=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2.0.0 之后新增了 groups.code 方法与 GroupsKillParams.ExpectRuns 字段,都属于 types.go 规则里的 additive change,但 ProtocolVersion 一直停在 2.0.0,导致 握手双方都自称 2.0.0 而能力并不相同。提升到 2.1.0 并重生成 schema。 Co-Authored-By: Claude Code --- engine/docs/schema/protocol.schema.json | 2 +- engine/internal/daemon/rpc/types.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/engine/docs/schema/protocol.schema.json b/engine/docs/schema/protocol.schema.json index 1baa04b0..25b307b3 100644 --- a/engine/docs/schema/protocol.schema.json +++ b/engine/docs/schema/protocol.schema.json @@ -3,7 +3,7 @@ "$id": "https://github.com/sheathedsharp/option-berth/engine/docs/schema/protocol.schema.json", "title": "option-berth daemon protocol", "description": "Generated from the Go types in internal/state and internal/daemon/rpc. Do not edit by hand; run `go generate ./...`.", - "protocol_version": "2.0.0", + "protocol_version": "2.1.0", "definitions": { "ChangeGroup": { "properties": { diff --git a/engine/internal/daemon/rpc/types.go b/engine/internal/daemon/rpc/types.go index 2ad69129..91fa08b6 100644 --- a/engine/internal/daemon/rpc/types.go +++ b/engine/internal/daemon/rpc/types.go @@ -17,7 +17,11 @@ const Version = "2.0" // // 2.0.0 removed two fields no handler read: Selector.Key and the host envelope // that every params type used to embed. -const ProtocolVersion = "2.0.0" +// +// 2.1.0 added the groups.code method and GroupsKillParams.ExpectRuns. Both are +// additive, so a client must gate them on the daemon's advertised capabilities +// (CapabilityKillExpectRuns) rather than on this version. +const ProtocolVersion = "2.1.0" // Request is a client call. ID is raw so a client can use numbers or strings. type Request struct {