{"record":{"id":"56a806ff1522605f","repo":"larksuite/cli","slug":"exec-provider-protocolversion-must-be-1-got-d","errorCode":null,"errorMessage":"exec provider protocolVersion must be 1, got %d","messagePattern":"exec provider protocolVersion must be 1, got (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/binding/secret_resolve_exec.go","lineNumber":211,"sourceCode":"\t}\n\treturn trimmed, nil\n}\n\n// extractExecSecret parses stdout as a JSON execResponse and returns the\n// string value at refID. When jsonOnly is false and the response is not valid\n// JSON (or the value is not a string), it falls back to the raw stdout or the\n// JSON encoding of the value respectively — mirroring OpenClaw's resolve.ts.\nfunc extractExecSecret(stdout []byte, refID string, jsonOnly bool) (string, error) {\n\tvar resp execResponse\n\tif err := json.Unmarshal(stdout, &resp); err != nil {\n\t\tif !jsonOnly {\n\t\t\treturn string(stdout), nil\n\t\t}\n\t\treturn \"\", fmt.Errorf(\"exec provider returned invalid JSON: %w\", err)\n\t}\n\n\tif resp.ProtocolVersion != 1 {\n\t\treturn \"\", fmt.Errorf(\"exec provider protocolVersion must be 1, got %d\", resp.ProtocolVersion)\n\t}\n\n\tif refErr, ok := resp.Errors[refID]; ok {\n\t\tmsg := refErr.Message\n\t\tif msg == \"\" {\n\t\t\tmsg = \"unknown error\"\n\t\t}\n\t\treturn \"\", fmt.Errorf(\"exec provider failed for id %q: %s\", refID, msg)\n\t}\n\n\tif resp.Values == nil {\n\t\treturn \"\", fmt.Errorf(\"exec provider response missing 'values'\")\n\t}\n\tvalue, ok := resp.Values[refID]\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"exec provider response missing id %q\", refID)\n\t}\n","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/internal/binding/secret_resolve_exec.go#L193-L229","documentation":"Rejects an exec provider JSON response whose protocolVersion field is not 1. The exec secret protocol only supports version 1; a different value means the provider implements an incompatible protocol revision.","triggerScenarios":"Thrown at internal/binding/secret_resolve_exec.go:211 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set protocolVersion to 1 in the provider's JSON response"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}