mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-07 10:45:59 -10:00
One structural rule (secrets.RedactEndpoint / CredentialKey / RedactArgs) replaces mcpsetup.RedactURL's query-only masking. Userinfo and fragments are dropped or masked, query and fragment keys are decoded before classification, unparseable endpoints render as <redacted>, and transport diagnostics keep error identity while omitting peer-supplied prose. Operational values (install, approval fingerprints, persistence) are untouched; preview and plan responses add separate display fields that the desktop mirror and confirmation UI render. Rebased onto the launcher-aware NameFromArgv: names derive from the original argv but never from a value the display projection masked, so build-flag values such as `go run -exec` still resolve. Install classification reads the typed HTTP status instead of sniffing the server name out of the message. Fixes #11785
19 lines
400 B
Go
19 lines
400 B
Go
package plugin
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
)
|
|
|
|
type rpcError struct {
|
|
Code int `json:"code"`
|
|
Message string `json:"message"`
|
|
Data json.RawMessage `json:"data,omitempty"`
|
|
}
|
|
|
|
func (e *rpcError) Error() string {
|
|
return fmt.Sprintf("rpc error %d (message omitted; %d bytes)", e.Code, len(e.Message))
|
|
}
|
|
|
|
func (e *rpcError) DiagnosticFacts() string { return e.Error() }
|