Remove unused Codex protocol registries and session APIs

This commit is contained in:
Ian Gulliver
2026-10-22 10:38:02 -07:00
parent 406f67a1a0
commit 8fb27f98a2
3 changed files with 110 additions and 223 deletions
+4 -17
View File
@@ -19,8 +19,6 @@ var clientMethods = []string{
"thread/start",
"thread/resume",
"thread/fork",
"thread/read",
"thread/compact/start",
"turn/start",
"turn/steer",
"turn/interrupt",
@@ -269,22 +267,11 @@ func (g *gen) generate(version string) []byte {
}
h.WriteString(")\n\n")
writeTable := func(name string, ms []method, field func(method) string) {
fmt.Fprintf(&h, "var %s = map[string]func() any{\n", name)
for _, m := range ms {
t := field(m)
if t == "" {
fmt.Fprintf(&h, "Method%s: nil,\n", pascal(m.name))
continue
}
fmt.Fprintf(&h, "Method%s: func() any { return &%s{} },\n", pascal(m.name), t)
}
h.WriteString("}\n\n")
h.WriteString("var notificationMethods = map[string]struct{}{\n")
for _, m := range notifications {
fmt.Fprintf(&h, "Method%s: {},\n", pascal(m.name))
}
writeTable("clientResults", client, func(m method) string { return m.response })
writeTable("notificationParams", notifications, func(m method) string { return m.params })
writeTable("serverRequestParams", requests, func(m method) string { return m.params })
writeTable("serverRequestResponses", requests, func(m method) string { return m.response })
h.WriteString("}\n\n")
h.Write(g.consts.Bytes())
h.Write(g.out.Bytes())