Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/skills/sdk/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ SDK with a router has moved: `client.Router` (Go, .NET), `client.router` (Python
Python, where `Router(...)` stays for the `url`/`customer_id` case. JavaScript has no router yet; when it
gets one, start from `client.router(name)`.

Connector definitions can be listed, read and added. `listConnectors` (`GET /v1/agents/connectors`, with `q`, `limit` and `cursor`, answering a `ConnectorPage`), `getConnector` (`GET /v1/agents/connectors/{id}`) and `createConnector` (`POST /v1/agents/connectors`, a `CustomConnectorRequest` for a custom MCP server whose id starts with `custom_`) are all server-side only. A `Connector` shows the schemes, inputs, scopes and `client.registration` (where the OAuth client may come from, a list of `ConnectorClientRegistrationMethod`), never endpoints or the operator's client variables. Name them `connectors.list/get/create`, spelled the way the language spells them, with `list` following the cursor like `Items.Unwind`. Go has the regenerated client (`ListConnectors`, `GetConnector`, `CreateConnector`) and no resource methods yet. JavaScript, Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and the three methods added. Swift, Kotlin and Dart need nothing, since none of the three is client-accessible. The schemas were named `ConnectorDefinition` and `ConnectorDefinitionPage` until October 5; they are `Connector` and `ConnectorPage` now, while the store keeps `ConnectorDefinition` for one stored revision. JavaScript and Python have the renamed generated types; .NET, Ruby, Rust and PHP pick the rename up when they regenerate.
Connector definitions can be listed, read and added. `listConnectors` (`GET /v1/agents/connectors`, with `q`, `limit` and `cursor`, answering a `ConnectorPage`), `getConnector` (`GET /v1/agents/connectors/{id}`) and `createConnector` (`POST /v1/agents/connectors`, a `CustomConnectorRequest` for a custom connector, an MCP endpoint or an http API (`.claude/skills/sdk/notes/2026-11-24-ai-3676.md`), whose id starts with `custom_`) are all server-side only. A `Connector` shows the schemes, inputs, scopes and `client.registration` (where the OAuth client may come from, a list of `ConnectorClientRegistrationMethod`), never endpoints or the operator's client variables. Name them `connectors.list/get/create`, spelled the way the language spells them, with `list` following the cursor like `Items.Unwind`. Go has the regenerated client (`ListConnectors`, `GetConnector`, `CreateConnector`) and no resource methods yet. JavaScript, Python (`plugins/stream`), .NET, Ruby, Rust and PHP need their generated clients regenerated and the three methods added. Swift, Kotlin and Dart need nothing, since none of the three is client-accessible. The schemas were named `ConnectorDefinition` and `ConnectorDefinitionPage` until October 5; they are `Connector` and `ConnectorPage` now, while the store keeps `ConnectorDefinition` for one stored revision. JavaScript and Python have the renamed generated types; .NET, Ruby, Rust and PHP pick the rename up when they regenerate.

Plugins, `plugin_events` and `mcp_servers` are removed (AI-1757): catalog plugins, their logins, options, events and logos, and MCP servers named by URL, were replaced by connectors (a built-in connector, or a custom one for a server's URL). The notes that described them are gone; what is left is the refusal: agent.yaml refuses the keys (AI-1784, AI-2531), the router answers a non-empty list with a 400 (AI-2538), and the generated clients no longer carry their types (AI-2772).

Expand Down
4 changes: 3 additions & 1 deletion acceleration/internal/connectors/fakeprovider/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ func (s *Server) APIRequests() []APIRequest {
// /rest/echo-credential 403 whose body says the APIKeyHeader and Authorization it got, as an
// API that echoes the request's credential in its error does; with
// ?status=200, the same body as a 200, as one that echoes it in an
// answer does
// answer does; both are application/json, so a browser never reads the
// echoed request as HTML
// anything else 200 "ok"
func (s *Server) api(w http.ResponseWriter, r *http.Request) {
body, _ := io.ReadAll(r.Body)
Expand Down Expand Up @@ -71,6 +72,7 @@ func (s *Server) api(w http.ResponseWriter, r *http.Request) {
if r.URL.Query().Get("status") == "200" {
status = http.StatusOK
}
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(status)
_, _ = io.WriteString(w, `{"error":"key `+r.Header.Get(APIKeyHeader)+` and `+r.Header.Get("Authorization")+` may not read this"}`)
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,7 @@ func (s *FakeProviderSuite) slack(srv *fakeprovider.Server, method, token string
// and echoes the credential in /echo-credential's 403, or in its 200 with ?status=200.
func (s *FakeProviderSuite) TestTheHTTPAPITakesItsKeyRecordsEachRequestAndAnswersByPath() {
srv := fakeprovider.New(s.T())
var contentType string
send := func(method, path, key string) (int, string) {
request, err := http.NewRequest(method, srv.URL+fakeprovider.PathAPI+path, strings.NewReader("sent"))
s.Require().NoError(err)
Expand All @@ -1184,6 +1185,7 @@ func (s *FakeProviderSuite) TestTheHTTPAPITakesItsKeyRecordsEachRequestAndAnswer
defer response.Body.Close()
body, err := io.ReadAll(response.Body)
s.Require().NoError(err)
contentType = response.Header.Get("Content-Type")
return response.StatusCode, string(body)
}

Expand All @@ -1205,9 +1207,11 @@ func (s *FakeProviderSuite) TestTheHTTPAPITakesItsKeyRecordsEachRequestAndAnswer
status, body = send(http.MethodPost, "/echo-credential", srv.APIKey)
s.Equal(http.StatusForbidden, status)
s.Contains(body, srv.APIKey)
s.Equal("application/json", contentType, "the echoed request is not sniffed as HTML")
status, body = send(http.MethodGet, "/echo-credential?status=200", srv.APIKey)
s.Equal(http.StatusOK, status)
s.Contains(body, srv.APIKey)
s.Equal("application/json", contentType)

requests := srv.APIRequests()
s.Require().Len(requests, 10, "the refused ones too")
Expand Down
Loading