Repository navigation
[AI-3669] HTTP connectors: the router runs connectors/http files - #2312
Conversation
Targets the feature branch `feature/ai-3669-http-connectors` (epic AI-3669), not `main`. Leaf 1 of 4 in the router: [AI-3673](https://linear.app/stream/issue/AI-3673). ## Why Core cannot describe an http connector: `SourceKindMCP` is the only source kind, `SourceRule` has no tool list, and `AsCustom` refuses every manifest that is not MCP-shaped (`core/custom.go:75` on the base). Leaves 2-4 (the `sources/http` ToolSource, call-time safety, the API) need a manifest model to build on. This PR adds only the model and its rules. No source runs http tools yet, and no API or CLI changes. ## How it works The new manifest shape (JSON as stored, `http_tools` omitempty, so no migration): ``` Manifest ├─ endpoints │ └─ http: https://api.weather.example/v1 <- custom base_url (role "http") └─ sources[] └─ kind: http, endpoint: http └─ http_tools[] <- new, only on kind http ├─ name ^[A-Za-z0-9_-]{1,63}$, unique ├─ description <= 1000 bytes ├─ method GET HEAD POST PUT PATCH DELETE ├─ path /..., not // or \, no ? # . .. or stray brace, <= 2048 │ every {p} is a declared, required parameter ├─ parameters <= 64, {name: {type, description, required}} │ name: RFC 3986 unreserved, <= 64 bytes │ type: string | number | integer | boolean └─ read_only only with GET or HEAD ``` What Validate now refuses on an http source, and what it leaves alone: ``` source.kind == "http"? ├─ yes -> checkHTTPSource (http_tools.go) │ ├─ read_only_tools set -> refused (say read_only per tool) │ ├─ outbound: false -> refused (same) │ ├─ header or parameter named -> refused │ │ x-http-method-override, x-http-method, │ │ x-method-override, _method (any case) │ └─ the tool rules in the tree above └─ no -> http_tools set? -> refused; else exactly as on the base ``` `read_only: true` joins `read_only_tools` where they are read: `SourceRule.SendsOutTool` (manifest.go), which `listConnectionTools` and the sensitive-connector check already call. `connectionReads` clears it, as it clears `read_only_tools`, since both are read from the latest revision. | Change | Result | Test | | --- | --- | --- | | `CustomConnector.BaseURL` + `Tools` | `CustomManifest` builds one http source; MCP endpoint and base_url together, or base_url with no tool, are refused | `CustomSuite/TestAnHTTPConnector*` | | `AsCustom` reads the http source back | the data move (`store/datamove.go:1656`) imports an http custom definition, and refuses one that breaks a rule | `DataMoveSuite/TestAnImportedHTTPDefinition*` | | Schemes as for custom MCP | `oauth2_client_credentials` and an operator client still refused; `oauth2_code` refused for http in v1 (discovery needs an issuer or endpoints a custom connector cannot set) | `CustomSuite/TestAnHTTPConnectorTakesTheSchemesAnMCPOneTakes` | | Every rule above | one table row per rule and input shape, accept and refuse | `HTTPSourceSuite/TestAValidHTTPSourceIsAccepted`, `.../TestAnHTTPSourceBreakingARuleIsRefused` | Each cap names its source in `http_tools.go`: 128 tools = the binding's `tools` cap (configs.go); 63-char names so `<alias>__<name>` fits Anthropic's 128 (`^[a-zA-Z0-9_-]{1,128}$`, platform.claude.com define-tools; OpenAI's 64 does not hold a longest alias and name, as for MCP today); 64-byte parameter names = OpenAI's function-name cap; 1000 and 2048 = the custom connector's description and endpoint caps (connectors.go); 64 parameters = the config's binding cap. The override names are the three headers the sandbox egress proxy refuses (`methodOverrides`, sandbox/egress/proxy.go:576) plus `_method`. ## No change for MCP - A probe run on the base (8af123d) and on head over every built-in provider manifest, every stress-test fixture, and a table of `CustomManifest`/`AsCustom` inputs: same Validate answer, same JSON hash, same custom JSON. Two differences only: the `AsCustom` refusal sentence now names "an MCP endpoint or an http base_url and tools", and an http-shaped manifest is no longer refused. - The stress-test fixtures (`testdata/manifests/*.yaml`) already have `kind: http` sources with no tools; an http source may stay empty, so they still parse. - `CustomSuite/TestAnMCPConnectorIsStoredAsBeforeHTTPConnectors` and `.../TestAnMCPConnectorIsRefusedAsBeforeHTTPConnectors` hold the base's JSON and refusals as literals; both were run on the base sha and pass there. ## Validation - `go test ./internal/connectors/... ./internal/store/...` pass; `go test -tags integration -run TestDataMoveSuite ./internal/store/` pass on a database of its own; both new data-move tests fail on the base. - `go vet ./...` and `go vet -tags integration ./...` clean. - Mutation: 70 mutants over every added condition, constant and list entry, 70 killed, and round 1 adds five more (`//`, backslash, rune-vs-byte description, no-tool source, oauth2_code), each killed; one more (the early returns in `checkHTTPPath`) survived and the returns were removed. ## Open questions - The custom http endpoint role is `http`, not `api_base`, so a custom http connector takes no direct call through `/v1/agents/connections/{id}/proxy/` (proxyBase, connection_proxy.go:35), as a custom MCP one takes none. Switching to `api_base` would open the proxy for them. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Leaf 2 of 4 of AI-3669 (router runs http connectors). **Targets `feature/ai-3669-http-connectors`, not main.** No connector of kind `http` can be stored until the API leaf (AI-3676): the API takes none yet, and `POST /v1/data/import` now refuses one too (`importableDefinition`, `store/datamove.go`, until AI-3676 lifts it), so nothing changes for users yet. ## Why AI-3673 (#2303) taught core to describe an http connector: a `base_url` and tools, each with a method, a path, scalar parameters and `read_only`. Nothing could list or call those tools yet. Only `mcp` is in `Registry.ToolSources` (`cmd/router/main.go:556`). This PR adds the `http` tool source. Validate and the session already find each source by its kind (`sourceKinds`, `internal/api/connection_tools.go:785`, `internal/session/connector_tools.go:687`). ## How it works ``` Discover(binding) sends nothing: the manifest is the list for each sources[kind=http].http_tools[] input schema {type: object, properties: {p: {type, description}}, required: [...]} digest sha256(name, description, schema, method, path, read_only) Open(binding, grants) keep a tool granted by name AND digest unchanged offer as <alias>__<name> client copy of binding.HTTP, Timeout >= 35 s (as mcp) Call(name, arguments) ├─ unknown name / schema refuses -> error, nothing sent ├─ URL = base_url (one trailing / dropped) + path (text join) ├─ {p} -> url.PathEscape(value): one segment ├─ others ├─ GET, HEAD, DELETE -> query │ └─ POST, PUT, PATCH -> JSON object body ({} when none) │ only declared parameters; numbers as the model wrote them ├─ send through binding.HTTP (credential, 401 renewal, egress) └─ answer (read up to 4 MiB) ├─ 2xx -> text (non-UTF-8 -> "not text"), cut at 32 KiB └─ otherwise -> core.ToolError "The API answered <status>[: body]" ``` | AI-3673 review requirement | Done here | Test | | --- | --- | --- | | R1.3: the pinned revision decides read_only | The digest covers method, path and read_only. A grant made for revision 2's read-only GET `x` never opens revision 1's POST `x`, and the reverse. | `TestSourceSuite/TestAGrantForAnotherRevisionOfAToolIsNeverOpened`, `TestTheDigestCoversEveryFieldOfTheTool` | | R1.4: parameter names that model APIs take | `~` is no longer allowed in a parameter name. The rule is now `^[A-Za-z0-9_.-]{1,64}$`, Anthropic's input_schema property-key pattern as its 400s quote it. A live probe was not possible: the provider keys we hold were refused. | `TestHTTPSourceSuite/TestAnHTTPSourceBreakingARuleIsRefused` ("a tilde") | ## Changes - New `internal/connectors/sources/http` (`source.go`, `toolset.go`, `AGENTS.md`, `CLAUDE.md`), modelled on `sources/mcp`. - `cmd/router/main.go` registers it beside mcp. - `core/http_tools.go`: the parameter-name rule as above, and a new rule: `sources[].tools` (the `needs_scopes` rules) is refused on an http source, which reads none (`leftOutGrant` reads only the mcp source). Left for AI-3675 (call-time safety), as `sources/http/AGENTS.md` lists: refusing an undeclared argument before sending (it is dropped today), refusing a `.` or `..` path value, override names at Open, redirect rules beyond egress's, and redacting arguments from log lines. ## Validation | Change | Test that fails without it | | --- | --- | | Source contract (digest, grants, schema check, 32 KiB cut, tool error) | `TestHTTPSourceContract` (`core/contracttest.SourceContract`) | | GET: path parameter in the path (escaped), the others in the query, a left-out one not sent, source header and bearer on it | `TestAGETSendsItsPathParameterInThePathAndTheOthersInTheQuery` | | POST: JSON body, 2^53+1 kept exact | `TestAPOSTSendsItsOtherParametersAsAJSONBody` | | Where each of the six methods sends a parameter; `{}` when none | `TestEachMethodSendsItsParametersWhereTheRuleSays` | | Text join, not `ResolveReference`; no doubled `/`; no empty `?` | `TestTheEndpointsOwnPathIsKeptAndItsTrailingSlashNotDoubled`, `TestNoArgumentsAtAllAreAnEmptyObject` | | 2xx bounds (299 ok, 300 error), status and body in the tool error, error cut | `TestAnAnswerThatIsNotA2xxIsAToolErrorNamingItsStatus`, `TestAToolErrorOverTheCapIsCutWithTheMarker` | | 4 MiB read cap, binary body, a body cut short | `TestABodyIsReadOnlyUpToTheCap`, `TestABodyThatIsNotTextReadsAsNotText`, `TestABodyCutShortIsAnErrorNotAnAnswer` | | Timeouts: toolset client >= 35 s, a longer one kept, `Binding.Timeout` bounds a call | `TestAnOpenedToolsetWaitsPastTheConnectionsClientTimeout`, `TestAClientWaitingLongerThanCallTimeoutKeepsItsTimeout`, `TestTheBindingsTimeoutBoundsACall` | | Registered by kind | `cmd/router` `TestConnectorRegistrySuite/TestWithConnectorsOnBothToolSourcesAreRegisteredByKind` | The tests ran on the branch at the feature-branch head 7d1d6b7: `go test ./internal/connectors/... ./cmd/router/ ./internal/store/`, `go test -race ./internal/connectors/sources/http`, `go vet ./...` and `go vet -tags integration ./...`. One batched script applied 46 mutants, one per added guard, constant and digest field, and all 46 were killed. The guards no input can reach (marshal and compile errors of values the source builds itself, and a 1xx final status) are listed in the review notes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Leaf 3 of AI-3669 (router: run HTTP connectors). Targets `feature/ai-3669-http-connectors`, not `main`. No API change; that is leaf 4 (AI-3676). ## Why Values the model picks go into the URL and the body of an http tool's request (`sources/http`, #2316). Before leaf 4 lets anyone store an http connector, these cases must be impossible: a write through a read_only tool, a method override, a path that names another resource, a credential echoed into the conversation, and a write resent by a redirect. The checklist comes from the AI-3673 and AI-3674 reviews: Q1 stale pin, R1.6, S1.2, S1.3 and R2.1. ## How it works ``` Toolset.Call(call) sources/http/toolset.go ├─ an argument the tool does not declare -> refused, nothing sent (AC-6) ├─ arguments vs input schema -> refused, nothing sent ├─ path built segment by segment (builtPath) │ a segment with a {name} that is "", "." or ".." -> refused (S1.3) │ "../admin" -> "..%2Fadmin" "..%2F" -> "..%252F" (one segment) ├─ send through binding.HTTP (credential + egress) │ redirect: GET/HEAD follow (same origin, egress policy) │ POST/PUT/PATCH/DELETE -> the 3xx is the answer (R1.6) ├─ write's 301/302/303 -> result "The API answered 303 See Other; the request may have run." ├─ non-2xx -> ToolError "The API answered <status>: <body>" │ body -> Exchange.Redact (credential, path, query) -> cut 32 KiB └─ 2xx -> body -> Exchange.RedactCredential (credential values only) -> cut 32 KiB <status> = code + http.StatusText, never the API's reason phrase Source.Open sources/http/source.go └─ core.CheckHTTPSource(rule): Validate's http rules again (override names, read_only only on GET/HEAD, a description, ...) -> error, nothing offered ``` Stale pin (AI-3674 Q1). A session opens an http tool only at the digest its grant pins, and the digest covers method, path and read_only. So `internal/api` now judges an http tool read-only only when the grant pins the latest revision's read-only digest (`grantSendsOut`): ``` revision 1: x = POST /x revision 2: x = GET /x, read_only fixed connection stays on revision 1, lists x at digest D1 before after GET .../connections/{id}/tools x read_only: true false config beside nessy, x@D1 201 (POST runs) 400 "api" x config beside nessy, x by name 201 400 config beside nessy, x@D2 201 201 (rev 1 never opens D2) ``` An MCP tool stays judged on the latest revision's `read_only_tools`. `TestReadOnlyIsTheConnectorsLatestRevisionsAsAConfigSaveChecks` pins that, and it is unchanged. ## Changes - `sources/http`: refuse undeclared arguments; judge the built path; follow redirects only for GET and HEAD (with net/http's limit of 10 when a client has no policy); redact tool errors with the call's Exchange (`core.Observed`: the dispatcher's, or one of the call's own); recheck the source at `Open`. - `core`: `CheckHTTPSource` (the http rules of `Validate`, exported for `Open`) and `Observed`. - `core`: `Exchange.RedactCredential`, the credential's secret values alone, for a 2xx answer. A scheme whose secret also holds a name says which strings are values (`core.SecretValuer`; api_key: the key, not its header name). Redaction takes the longest string out first, so a key that holds its header name goes out whole. - `core`: an http tool with no description is refused by `Validate` and at `Open`: a session refuses such a tool (`harness.Tools.Validate`), so the sync says so first. - `api`: `grantSendsOut` in `bindingSendsOut` (config check) and in `listConnectionTools` (the same class). - `fakeprovider`: an HTTP API at `/rest` (api_key header, `/bytes/<n>?then=<m>`, `/echo-credential` with `?status=200`, request log), for AC-6 and AC-9. - Docs: `sources/http/AGENTS.md`, `core/AGENTS.md`, `fakeprovider/AGENTS.md`, `.claude/skills/connectors/SKILL.md`. Decisions: | Case | Decision | Reason | | --- | --- | --- | | empty path value (`DELETE /items/`) | refused | it names the collection | | `{a}{b}` = `.` + `.` | refused | it is judged as built, so it is `..` | | `../admin` | sent as `..%2Fadmin` | AC-6 of AI-3669 | | `..%2F` | sent as `..%252F` | the `%` is escaped, so it is no dot segment | | 307/308 on a POST, PUT or PATCH | not followed, the 3xx is the answer | net/http would resend the body to a path the manifest does not name | | 3xx on a DELETE | not followed | a write's path is the manifest's | | 301/302/303 on a POST, PUT, PATCH or DELETE | a result: "The API answered <code> <text>; the request may have run." | only a 307 or 308 asks for the request again; after the others the write may have run, so the model must not read a failure and retry (R1.2) | | status the model reads | code + `http.StatusText` | the API's reason phrase is its own text and may echo the credential (S1.1) | | http tool with no description | refused at validation | a session refuses it anyway (Q0.3) | | GET/HEAD redirect | followed, same origin only | the egress policy, unchanged | | 2xx body | the credential's secret values redacted; path, query and api_key's header name kept | an API that echoes the key in a 200 must not put it in the conversation; an answer names its resource by its path (Q1) and may name its own header (R1.1) | | `/` in a path value (`../admin`) | stays escaped as one segment (`..%2Fadmin`) | AC-6 of AI-3669; an API that decodes `%2F` before routing is out of the router's control, and the docs leaf says so (Q2) | | stale pin | an http tool reads only when the grant pins the latest revision's read-only digest | side effect, accepted as fail-closed: an http read-only tool granted by name beside a sensitive connector is refused; the docs leaf says so (Q3) | ## Validation | Rule | Test | Mutations killed | | --- | --- | --- | | undeclared argument refused | `TestSourceSuite/TestAnArgumentTheToolDoesNotDeclareIsRefusedBeforeSending` (7 shapes x GET/POST), `TestAcceptanceSuite/TestAnOverrideIsRefusedBeforeSendingAndAValidCallIsOneGET` (AC-6) | T1, T2 | | built path | `TestSourceSuite/TestAPathValueThatNamesAnotherResourceIsRefusedBeforeSending` (18 rows) | T3, T6-T12 | | Open recheck | `TestSourceSuite/TestOpenRefusesASourceThatBreaksARuleOfValidation` | S1, C1 | | redirects | `TestSourceSuite/TestOnlyAReadFollowsARedirect` (a write's 301/302/303 is a result, a read's 302 with no Location stays an error), `TestARedirectToAnotherOriginNeverCarriesTheCredential`, `TestAClientWithNoRedirectPolicyStopsAfterTenRedirects` | S2-S9; R1.2: rule off, rule for reads too, 307 added, 302 dropped | | status text | `TestSourceSuite/TestAnEmpty2xxIsItsStatus` (reason phrase echoing the token), `TestAnAnswerThatIsNotA2xxIsAToolErrorNamingItsStatus` (own phrase, unknown code) | each `response.Status` put back | | description required | `TestHTTPSourceSuite/TestAnHTTPSourceBreakingARuleIsRefused` row "no description" | check off | | key holding its header name | `TestLoggedDescriptionSuite/TestASecretHoldingAnotherIsTakenOutWhole` | sort removed | | header name kept in a 2xx | `TestAcceptanceSuite/TestA2xxKeepsTheKeysHeaderName` (a 403 still redacts it) | transport back to every string, api_key values with the header, api_key values nil, `SecretValuer` ignored | | redaction | `TestSourceSuite/TestAToolErrorEchoingTheCredentialIsRedacted` (also a token the 32 KiB cut falls in), `TestAToolErrorIsRedactedWithNoExchangeOfTheCallers`, `TestAcceptanceSuite/TestA403EchoingTheKeyIsRedacted` | T4, T5, C2, C3 | | logs | `TestAcceptanceSuite/TestALogLineHoldsNoArgumentAndNoCredential` | (KeepHosts is the base's) | | AC-9 | `TestAcceptanceSuite/TestAnAnswerIsReadUpTo4MiBAndReadAsAtMost32KiB` | F5 | | stale pin | `TestConfigsSuite/TestAnHTTPToolReadsOnlyAtTheDigestItsGrantPins`. It fails with `grantSendsOut` reverted: listing true, config 201 | A1-A7 | | stale pin, in a session | `TestSessionConnectorsSuite/TestAStalePinNeverRunsAWriteAsARead`: a fixed connection on revision 1 (echo POST); beside nessy, echo at revision 1's digest is refused, at revision 2's (read-only GET) accepted and the session leaves crm out, nothing reaches the API; without nessy the session runs the POST | grantSendsOut reverted (config 201), Source.Open digest pin reverted (crm offered) | | 2xx redaction | `TestSourceSuite/TestA2xxEchoingTheCredentialIsRedactedAndKeepsItsPath` (bearer, Authorization), `TestAcceptanceSuite/TestA200EchoingTheKeyIsRedacted` (api_key header) | no RedactCredential, Redact in its place (path lost), identity redaction, no secret | | R2.1 | `TestLoggedMessageSuite/TestAnUnreachedErrorWithNoCauseIsItsMessage` | C4 | | fake API | `TestFakeProviderSuite/TestTheHTTPAPITakesItsKeyRecordsEachRequestAndAnswersByPath` | F1-F6 | The mutation script applies, tests and restores each of 38 mutants. All 38 were killed. The author's notes keep the list. Round 1 fixes (Q0.3, S1.1, S1.2, R1.1, R1.2) ran: `go vet` with and without the `integration` tag; unit `./internal/connectors/... ./internal/api ./internal/session ./internal/store ./internal/harness ./cmd/router`; `-race` on `sources/http`, `core`, `schemes`; integration `TestConfigsSuite|TestConnectionToolsSuite|TestSessionConnectorsSuite|TestSessionToolsSuite` in `./internal/api` (455 passed) and `TestDataMoveSuite` in `./internal/store`. The author ran: - `go test ./internal/connectors/... ./cmd/router ./internal/api ./internal/session` (unit) - `go test -race ./internal/connectors/sources/http ./internal/connectors/fakeprovider` - `go test -tags integration -run 'TestConfigsSuite|TestConnectionToolsSuite|TestSyncSuite|TestSessionConnectorsSuite|TestSessionToolsSuite' ./internal/api` on its own database (539 tests) - `go vet` with and without the `integration` tag All passed. The full integration run is not done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Targets the feature branch `feature/ai-3669-http-connectors`, not `main`. Leaf 4 of 4 in the router for AI-3669 (the keystone): until it merges, no API stores an http connector. ## Why The CLI writes `connectors/http/<name>.yaml` (base_url + tools), and the router can run such tools since leaves 1-3 (#2316 manifest, #2324 call-time safety). `POST /v1/agents/connectors` took only an MCP `endpoint`, and AI-3674 made `POST /v1/data/import` refuse an http connector until this leaf. The AI-3674 reviews asked for two things: `base_url` is checked with `egress.ValidatePublicHTTPSURL` on create and on every new revision (S1.5), and import and create open at the same time with the same checks (R1.1). ## How it works ``` POST /v1/agents/connectors (CustomConnectorRequest) ├─ endpoint set == http set (both, or neither) -> 400 "exactly one of them" ├─ scheme not on this deployment -> 400 (as before) ├─ http set │ ├─ core.CheckBaseURL(base_url) fails: over 2048, not https://, │ │ a {name}, or egress.ValidatePublicHTTPSURL refuses │ │ -> 400 "base_url must be a public https URL │ │ without userinfo, query or fragment" (AC-7, one answer) │ ├─ core.CustomManifest(base_url, tools) refuses │ │ -> 400 core's reason, naming the tool (AC-5) │ └─ ok -> store revision (the same path as MCP) └─ endpoint set: exactly as before (control test) POST /v1/data/import (importableDefinition) ├─ http source -> core.CheckBaseURL before AsCustom, the same message │ (AI-3674's refusal is gone) └─ a change set: every definition checked before applyChanges' transaction opens, so no DNS lookup runs inside it GET /v1/agents/connectors[/{id}] (connectorOf, unchanged) └─ copies fields by name: no base_url, no tools (AC-1) ``` The request shape: ``` CustomConnectorRequest ├─ endpoint string, now optional MCP server └─ http CustomHTTPAPI, new HTTP API ├─ base_url string <= 2048 └─ tools[] CustomHTTPTool, 1 to 128 ├─ name ^[A-Za-z0-9_-]{1,63}$, description <= 1000, path <= 2048 ├─ method GET|HEAD|POST|PUT|PATCH|DELETE ├─ read_only only with GET or HEAD └─ parameters {name: CustomHTTPParameter}, up to 64 type string|number|integer|boolean description <= 1000, required ``` The base_url is checked before the manifest's rules, so `http://...`, a `{name}` in it or one over 2048 gets the fixed message too (core would answer it in its own words), on create and on import alike. The schema carries core's caps and tool name pattern, and core holds them as well (a parameter's description and the base_url included), so an import, which has no request schema, stores nothing the API would refuse. Egress's own error never reaches the caller on create or import: it tells a name that does not resolve from a private one. ## Changes - `internal/api/connectors.go`: `http` beside `endpoint` on `CustomConnectorRequest` (new `CustomHTTPAPI`, `CustomHTTPTool`, `CustomHTTPParameter`, each refusing unknown fields); `customManifest` checks exactly-one and the base_url, then builds through `core.CustomManifest`. `createConnector` is untouched, so #2302 (`ReviseSynced`) merges beside it. - `internal/connectors/core`: `CheckBaseURL`, the one base_url check create and import share; `Manifest.Validate` caps a parameter's description (1000) and the http endpoint (2048). - `internal/store/datamove.go`: `importableDefinition` takes `ctx` and checks an http connector's base_url in place of AI-3674's refusal; `importableRow` checks a definition before `importRow`, and `applyChanges` runs it for the whole change set before its transaction. - The new enums name their constants (`x-enum-varnames`), so the Go SDK keeps `Array`, `Boolean`, `Null`, `Number`, `Object` and `String`; `sdks/go/acceleration/enums_test.go` pins them. - `api/openapi.yaml` and the Go, JS, Python, .NET, Ruby, Rust and PHP clients regenerated; Kotlin, Swift and Dart generate nothing new (`createConnector` is not client-accessible). - SDK note `.claude/skills/sdk/notes/2026-11-24-ai-3676.md`; `connectors` and `add-connector` skills name `http`; `sources/http/AGENTS.md` says who stores an http connector now. ## Validation | Rule | Test | | --- | --- | | AC-1: stored at revision 1 as the source's manifest; no answer shows base_url or tools | `ConnectorsSuite/TestACustomHTTPConnectorIsStoredAndItsAPIIsNeverShown` | | AC-2: a none connection validates connected; tools list says read_only | `ConnectorsSuite/TestAConnectionToAnHTTPConnectorListsItsReadOnlyTool` | | AC-5: read_only POST / DELETE -> 400 naming the tool, nothing stored | `ConnectorsSuite/TestAReadOnlyToolThatWritesIsRefusedNamingIt` | | AC-7 + S1.5: 127.0.0.1, 10.0.0.1, 169.254.169.254, http://, ::1, .invalid, query, userinfo, fragment -> one message, nothing stored | `ConnectorsSuite/TestAnHTTPConnectorWhoseAPIIsNotPublicHTTPSIsRefused` | | A new revision is checked again; a refused one leaves revision 1 | `ConnectorsSuite/TestANewRevisionOfAnHTTPConnectorIsCheckedAgain` | | Both / neither / empty endpoint -> 400 | `ConnectorsSuite/TestAConnectorWithBothOrNeitherOfEndpointAndHTTPIsRefused` | | Schema edges (method/type enums, lowercase method, unknown fields, base_url > 2048, null tools, no base_url, no type, no tool, 129 tools, bad name, description / path / parameter description over cap, 65 parameters) -> `validation_failed` | `ConnectorsSuite/TestAnHTTPToolTheSchemaRefusesIsAValidationFailure` | | Core's reasons through the API (oauth2_code, `_method`) | `ConnectorsSuite/TestAnHTTPConnectorTheManifestRefusesIsRefusedWithItsReason` | | Control: MCP create and its refusals answer as on 5a798ad (keys, values, messages from a probe run there) | `ConnectorsSuite/TestAnMCPConnectorIsAnsweredAsBefore` (passes on base and head) | | Core caps: a parameter description over 1000, a base_url over 2048 | `HTTPSourceSuite/TestAnHTTPSourceBreakingARuleIsRefused`, `ImportableDefinitionSuite/TestAnOversizedHTTPConnectorIsRefused` | | A change set's definitions are checked before its transaction opens | `store DataMoveSuite/TestAChangesDefinitionsAreCheckedBeforeItsTransactionOpens` | | Go SDK constant names kept | `sdks/go/acceleration` `TestInvocationArgumentTypeKeepsItsConstantNames`, `TestCustomHTTPToolMethodNamesItsConstants` | | Import: http kept, MCP kept; private / .invalid / http:// / {name} base_url refused with the fixed message | `ImportableDefinitionSuite`, `store DataMoveSuite/TestAnImportedHTTP*`, `api DataMoveSuite/TestAnImportedHTTPConnectorIsCheckedAsTheAPIChecksIt` | The AC tests fail on the base (run there with this branch's test file), except the schema test, which the base also passes by refusing `http` as an unknown field. Each changed condition, field copy and schema tag was mutated; the list is in the author log. ## Open points - An imported MCP definition's endpoint gets no public-address check (as on the base); the MCP source's egress client still checks each address it dials. - Breaking for SDK callers (CHANGELOG Breaking Changes): Go `CustomConnectorRequest.Endpoint` is `*string`, Rust's `endpoint` is `Option<String>`, and PHP's and Python's constructors take `endpoint` after `schemes`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts: add-connector/SKILL.md and connectors/core/AGENTS.md kept both sides' lines (main's mtls wording, its sync_hash bullet; the feature's http bullet and Exchange paragraph). The three generated files (custom_connector_request.py, CustomConnectorRequest.php, spec.rb) were regenerated from the merged spec, not hand-merged. Semantic break: main's #2346 renamed appPolicy to DataChange.Skipped (its negation). The feature's pre-transaction definition check in applyChanges now reads `change.Op == ChangeDelete || change.Skipped()`, the same rule as before and as main's in-transaction loop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Targets the feature branch `feature/ai-3669-http-connectors`, not
`main`. Fix leaf of AI-3669 (umbrella AI-3870).
## Why
With http connectors stored, `GET /v1/agents/connectors[/{id}]` answered
a `Connector` with no source kind, so the CLI could not tell an http
custom connector from an MCP one. The cli#128 review showed it: `agents
mcp list` lists http connectors as MCP servers, and `agents mcp update
<http one> <mcp url>` with no local file turned an http connector into
an MCP one. The CLI already decodes `sources: [{kind}]` (GetStream/cli
`internal/agents/connectors.go:21`); this makes the router answer it.
## How it works
```
Connector (GET /v1/agents/connectors, /{id}, the create's answer)
└─ sources: one entry per manifest source, in order, kind only
├─ custom, made from `endpoint` -> [{"kind":"mcp"}]
├─ custom, made from `http` -> [{"kind":"http"}]
├─ built-in -> its own kinds (slack: [{"kind":"mcp"}])
└─ never a URL, base_url, path, headers or tool
```
`kind` is the named enum `ConnectorSourceKind` (`mcp` | `http`), with
`x-enum-varnames` so the Go SDK gets `ConnectorSourceKindMCP` and
`ConnectorSourceKindHTTP` and a later enum holding `mcp` or `http`
renames nothing (as #2344 did for `CustomHTTPToolMethod`). `sources` is
always an array, `nullable: false`.
## Changes
| Change | Test that proves it |
| --- | --- |
| `Connector.sources` built from `manifest.Sources` by kind
(`connectors.go` `connectorOf`) | `TestConnectorSourcesSuite` (order,
empty list is `[]`, nothing but kind);
`TestAConnectorShowsItsSourceKindAndNoAddress` (create, read, list of an
http and an MCP custom connector, and slack; no `base_url`, `endpoint`,
address, path or tool name in the answer) |
| Two controls that listed the keys of a connector answer gain `sources`
| `TestAnMCPConnectorIsAnsweredAsBefore`,
`TestABuiltInReadsAsBeforeOnARouterWithoutAPublicURL`;
`TestWhatTheRouterReadsToConnectIsNeverShown` no longer withholds
`sources` but asserts it is `[{kind: mcp}]` |
| `openapi.yaml` and the clients regenerated | Go, JS, Python
(`plugins/stream`), .NET, Ruby, Rust and PHP changed; Kotlin, Swift and
Dart checked, unchanged (`Connector` is not client-accessible) |
| Go constant names pinned | `TestConnectorSourceKindNamesItsConstants`
(`sdks/go/acceleration/enums_test.go`) |
| SDK note appended | `.claude/skills/sdk/notes/2026-11-24-ai-3676.md` |
## Validation
- `go test ./internal/api/` (unit) and, on my own test DB, `go test
-tags integration -run
'TestConnectorsSuite|TestAuthorizationsSuite|TestConnectionsSuite|TestConnectionProxySuite|TestConnectorProviderAppsSuite|TestConnectorEventsSuite|TestDataMoveSuite|TestOAuthClientsSuite|TestConfigsSuite'
./internal/api/` pass; `go vet` with and without `-tags integration`
clean; `go test ./acceleration/` in `sdks/go` passes.
- Mutations: loop body dropped, kind hardcoded, nil instead of empty
list, endpoint appended to the kind, reversed order (each killed by
`TestConnectorSourcesSuite`); enum value dropped, varnames dropped,
`nullable:"false"` dropped (each killed by `TestPostureSuite`, the spec
check; the varnames one also fails `enums_test.go` after `go generate`).
- Not run here: the full integration run, Swift/Kotlin/Dart tests, the
CLI side (cli#128).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
…69-http-connectors Conflicts: - internal/api/configs.go: main moved the sensitive-connector rule into internal/connectors/sensitive (#2432); the feature's digest-aware grant check (grantSendsOut, #2324) moves there as sensitive.GrantSendsOut, used by bindingSendsOut, so ConfigComplaint and GraphComplaint both judge an http tool at the digest its grant pins. - internal/api/connection_tools.go: listConnectionTools calls sensitive.GrantSendsOut; comment names both. - internal/connectors/core/manifest.go, .claude/skills/connectors/SKILL.md: comments/doc keep both sides. - internal/store/datamove.go: applyChanges keeps the feature's importableRow pass before the transaction and main's lockNumbers / NumbersLeftOutError (#2412); ImportRow drops main's `var err error` that redeclared the feature's err. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…871 (#2480) Targets `feature/ai-3669-http-connectors`, not main. Two small leftovers of AI-3669; tests and docs only, no router code changes. ``` acceleration/internal/api/child_agents_sensitive_test.go +TestADelegationJudgesAnHTTPToolReadOnlyOnlyAtTheDigestItsGrantPins .claude/skills/sdk/notes/2026-11-24-ai-3676.md Connector sentence true again .claude/skills/sdk/notes/2026-11-25-ai-3871.md new: the AI-3871 `sources` note, moved here ``` ## 1. Delegation judges an http tool by its pinned digest `bindingSendsOut` (`sensitive.go`) calls `GrantSendsOut`, which judges an http tool at the digest its grant pins. Replacing that call with `manifest.SendsOutTool(tool.Name)` passed every ChildAgentsSuite test. The new test wires, past the API, a parent and a child with nessy (sensitive) and an http connector whose latest revision has `get`, a read-only GET: | grant | sensitive parent, http child | sensitive child, http parent | |---|---|---| | pins the digest | runs | runs | | pins none | refused | refused | | pins another digest | refused | refused | Mutants (one script, `mutate.sh`): `bindingSendsOut` -> `SendsOutTool`, `digest != grant.SchemaDigest` -> `digest == ""` and `-> digest == grant.SchemaDigest` each fail the test; the head passes. ## 2. SDK notes #2464 appended the AI-3871 part to the AI-3676 note; `notes/README.md` asks one file per change, and the AI-3676 note said the `Connector` is unchanged. The AI-3871 paragraph is now `2026-11-25-ai-3871.md` unchanged; the AI-3676 note is back as #2344 wrote it, except that its `Connector` sentence says "unchanged by this change" and points to the new note. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Conflicts: - internal/api/connectors.go: main's #2430 moved CustomConnectorRequest's limits into TransformSchema (core.Custom* constants); kept that, with the feature's optional endpoint and http field. - internal/store/datamove.go: the feature checks a definition in importableRow, before importRow and outside applyChanges' transaction; main's #2430 SkippedRow (a client-credentials definition is left out) now passes such a row unchecked there and importRow leaves it out. ImportRow's err from importableRow is reused by main's #2446 detachedWrite. - internal/api/datamove_test.go, core/custom_test.go, store/datamove_unit_test.go: both sides' tests kept; main's importableDefinition calls take the feature's ctx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- An http tool's description and path caps are core's CustomDescriptionMaxLength and CustomEndpointMaxLength, which #2430 made the one home of those values, rather than 1000 and 2048 written again. - The feature's import tests name their definitions custom_a + a hex id: #2430 holds an imported id to the API's pattern, a letter after custom_, which a hex id need not start with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…runs as its own subtest (#2480 R1.1) A failure now names its case, the refused ones too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
kanat
left a comment
There was a problem hiding this comment.
VERDICT: NO-GO
Joint review of the feature branch at 6b221728d, merged onto the current main (41bce36fd, clean merge). Scope: the calls between the merged pieces (#2303, #2316, #2324, #2344, #2464, #2480), not a re-review of each piece.
[Should fix] R1.1 PR description: it is stale and its merge gates are incomplete. The pieces table stops at AI-3676 as "next". It does not list #2344's merge, #2464, #2480 or the main syncs. It still says "Do not merge: ship-feature in progress", and the gates say "none known yet". The gates to list:
- (a)
mainmust take #2481 first. Onmain41bce36fd,go vet -tags integration ./internal/api/fails atscheduled_unpaid_test.go:814(undefined: scheduledOwnerContext). That is #2278 meeting #2404, and this feature is not the cause. Until #2481 lands, this PR'sIntegration (router)run on the merge ref fails to compile. - (b) CI must pass after
gh pr ready. The PR is a draft, so it has run no go or integration job yet. - (c) cli#128 merges after this deploys, and docs AI-3678 after that.
- (d) Release the SDKs that carry
Connector.sourcesonly after a router with the field is deployed. Python reads it withd.pop("sources")and Rust has aVecwith no serde default, so both fail to parse a connector from an older router. - (e) No migration and no flag. Rollback fails closed: the previous release finds no tool source for an
httpbinding, so the binding is unavailable (session/connector_tools.go, the!foundbranch). It also counts every http tool as sending out.
[Nit] R1.3 .claude/skills/sdk/SKILL.md:485 still calls the createConnector body "a CustomConnectorRequest for a custom MCP server". The new note 2026-11-24-ai-3676.md supersedes that line. Ticket.
Checked and sound:
- Wiring.
cmd/routerregistersmcpandhttpbyKind(). The session andconnection_tools.golook sources up by kind. - One rule set for every way in. A definition created through the API, imported with
ImportRow, or applied from a change set (before the transaction) passesCheckBaseURL, with one answer for every refusal. It then passesCustomManifest: the #2430checkLimits, the http caps, read_only only on GET or HEAD, the method-override names, and the JSON equality inAsCustom.importRowhas no other caller, and only the API writes revisions. connectorOfshows onlysources[].kind. The tests assert that get and list answers carry no base URL, host, path or tool name.sensitive.GrantSendsOutserves the config save, the child-agent delegation (GraphComplaint) andlistConnectionTools.- CHANGELOG Breaking Changes is under
# Unreleased, and each line is true: GoEndpoint *string, RustOption<String>, PHP$endpointafter$schemes, Pythonendpointafterschemes. The .NET (string?) and Ruby changes break nothing. - Generated files:
openapi.yamland the JS types are in step, andgo generateinsdks/gogives no diff. The SDK notes match the final API. - Build and vet pass on the head. On the merged tree with #2481's diff applied, build, vet and vet with the integration tag pass. Unit tests pass for connectors, cmd/router, store and api. Integration suites pass: store
DataMoveSuite; connectors core, resolver and sources; apiConnectors,ConnectorSources,SessionConnectors,DataMove,ConfigsandChildAgents; sessionAttachConnectors,ConnectorApproval,CallLogandConnectorLogin. - Mutations: 11 checked, 0 survived. They covered registry registration, the API and import
CheckBaseURL, the change-set pre-check,AsCustomtools, the exactly-one check, the source kind inconnectorOf, andGrantSendsOutat its three call sites.
Verdict: NO-GO, for R1.1 only. The code joints are sound. Refresh the description and its gates, and this is a GO.
| status = http.StatusOK | ||
| } | ||
| w.WriteHeader(status) | ||
| _, _ = io.WriteString(w, `{"error":"key `+r.Header.Get(APIKeyHeader)+` and `+r.Header.Get("Authorization")+` may not read this"}`) |
There was a problem hiding this comment.
[Nit] R1.2 CodeQL alert 175 (reflected XSS, severity error) is still open on this test fake's /echo-credential body. The fake is not in the router binary: go list -deps ./cmd/router lists no fakeprovider. Set Content-Type: application/json before WriteHeader, or dismiss the alert as test code. Ticket.
…connectors (#2483) Targets the feature branch `feature/ai-3669-http-connectors` (not main). Two Nits (R1.2, R1.3) from the joint review of #2312. ``` fakeprovider/api.go /rest/echo-credential 403 or 200 body: Content-Type application/json (was none: CodeQL alert 175) .claude/skills/sdk/SKILL.md:485 createConnector: "a custom connector, an MCP endpoint or an http API" -> notes/2026-11-24-ai-3676.md ``` - The fake is test code: `go list -deps ./cmd/router` has no fakeprovider. Behaviour is otherwise the same; no other handler in the package echoes request input (channel.go:170 is a static body). - Test: `TestFakeProviderSuite` now asserts `Content-Type: application/json` on both echo answers. Mutation: removing the `Set` line fails it. - Ran: `go test ./internal/connectors/fakeprovider/ ./internal/connectors/sources/http/`; `go test -tags integration -run TestSessionConnectorsSuite ./internal/api/` (the users of the fake API); both vets. CodeQL not run locally (no CLI): the PR's CodeQL check will tell. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
kanat
left a comment
There was a problem hiding this comment.
VERDICT: GO
Joint delta review of head 469960b (old reviewed head 6b22172), merged onto main aa4c2d4 without conflicts.
Prior findings
- R1.1 (Should fix, stale body): fixed. The body now has the 7 pieces with their merge commits, the 6 main merges (last c4119ba with #2430), the AC table (equal to the frozen results row by row), the CHANGELOG quote (verbatim CHANGELOG.md:713-720) and gates (a)-(e).
- R1.2 (Nit, CodeQL 175): fixed. The fake sets Content-Type application/json before WriteHeader. Mutation: delete that line and the extended TestTheHTTPAPITakesItsKeyRecordsEachRequestAndAnswersByPath fails ("text/plain; charset=utf-8"); restored, it passes. The alert closes on the first CodeQL run after ready (a draft runs none): unverified.
- R1.3 (Nit, SKILL.md:485): fixed.
Delta: 3 files, one commit (#2483): fakeprovider/api.go, its test, SKILL.md:485. No other code changed since 6b22172.
Body corrections I made (the rest is kept)
- The safety table said every rule is checked "again at each call". It is not true for read_only: core/http_tools.go:162 refuses a read_only POST at save only; at a call, a changed definition is kept off by the grant's digest (sources/http/source.go:116-120). The table now has a Checked column.
- "Egress limits: the same limits as the MCP source" now says what holds: the same egress client (core/transport.go:99-102, ResolvedBinding.HTTP) and the same 4 MiB read cap (http/toolset.go:31 = mcp/source.go:55). The two differ past the cap (MCP errors, http cuts) and on redirects (http follows them for GET and HEAD only).
- Gate (a): #2481 merged at 2026-11-25T19:23Z (96d535d), so it is marked done.
go build ./...andgo vet -tags integration ./...are clean on the head and on the head merged onto main aa4c2d4. - Added one sentence for the three commits made on the branch after the last main sync (5ebafd4, 74b3431, 6b22172), which are in no piece.
The body holds no amounts, account or app ids, or credentials. CI: all jobs skipping (draft); GitGuardian passes. Gates (b) full CI after ready, (c) cli#128 and docs after deploy, (d) SDK releases after deploy, (e) no migration, fail-closed rollback: present. Unverified: that the previous build loads a stored manifest holding http_tools without error (its fail-closed paths at session/connector_tools.go:379-383 are checked).
Conflicts: - add-connector SKILL.md: the request field list names both http and check_changes. - api/configs_test.go: both imports (httpsource, shardmap). - store/datamove.go ImportRow: the feature's importableRow pre-pass and main's refuseImportedConfigs inside detachedWrite. - ruby generated spec.rb: main's side, regenerated in the next commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e at its tools' digests #2485 holds imported agent configs and connector definitions to the sensitive-connector rule; this pins that an http connector's tools are judged there by sensitive.GrantSendsOut: a POST and a read-only GET granted by name send data out, a read-only GET at its digest does not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kanat
left a comment
There was a problem hiding this comment.
VERDICT: GO
Delta review of 6940736..8e36d34: the merge of main 8232d25 (4 conflicts), the Ruby regeneration and one new test. Also merged clean onto current main 85c03bf.
Resolutions (git show --remerge-diff cde9f6479): add-connector/SKILL.md keeps both http and check_changes. configs_test.go keeps both imports. store/datamove.go ImportRow keeps the feature's importableRow pre-pass before any transaction and main's detachedWrite with refuseImportedConfigs (err =, not :=). The Ruby spec.rb was taken from main and regenerated. No conflict marker is left.
No main change reverted: git diff 8232d25af 8e36d3426 has the feature's own files plus the new datamove_sensitive_test.go. With @@ lines stripped, the hunks equal the feature's own diff, apart from the new test and the Ruby check_changes property (main's field on the feature's http schema).
Generated: generated.sh is in step. Ruby script/generate --check in Docker reports "generated spec is up to date (306 operations)".
Joint (a), #2485 on http connectors: the import rule reaches sensitive.GrantSendsOut. TestAnImportedHTTPConnectorAnAgentBindsBesideASensitiveOneIsWeighedByItsTools passes on the head. Three mutations each make it fail:
GrantSendsOutreplaced bymanifest.SendsOutToolatsensitive.go:145: fails on "a read-only GET by name".refuseImportedDefinitionsdropped from ImportRow: fails on "a POST" and "a read-only GET by name".refuseImportedConfigsdropped from ImportRow (my own): fails 7 DataMoveSuite tests, so main's rule survived the resolution.
Joint (b), #2434 check_changes: MCP and http share one path. createConnector calls ReviseSynced(..., CheckChanges) (connectors.go:447-448) and saveRevision refuses at connector_definition.go:340. Passing false there fails the existing MCP tests, so the wiring is covered. One http-specific gap remains: a mutant that drops Sources from sameManifest survives every existing test.
Tests (own DB, never committed): build and both vets are clean. api Configs, Connectors, RouterConfigs, DataMove and Sync pass. store DataMove, ImportableDefinition and ConnectorDefinition pass, and connectors/... passes, on the head merged onto main 85c03bf.
TestEveryHotTableIsReadByIndex: local-only. It fails 5 subtests locally on a PostgreSQL 16.15 test server. CI uses postgres:19-alpine, and main's push run 45737632817 (85c03bf, which includes 8232d25) has integration (store) success, ok .../internal/store 867.810s. The run for 8232d25 itself was cancelled (superseded), not failed. Not fixed here.
CI on this head (not waited for): the finished checks pass. integration store, router and api, go and swift were pending when read.
Findings
- R8.1 [Nit]
acceleration/internal/api/connectors_test.go: nocheck_changestest uses an http connector, so the "ignore Sources in sameManifest" mutant survives. It is unchanged main code that compares the full manifest, so this does not block. Optional row, which passes on the head and fails under that mutant and under thefalsemutant:
// AI-3831 for an http connector: a checked sync is refused over a newest revision no sync wrote
// that says something else (here a tool's path), and goes through over one that says the same.
func (s *ConnectorsSuite) TestACheckedSyncOfAnHTTPConnectorIsRefusedOnlyOverAnEditNoSyncWrote() {
id := s.customID()
s.create(s.httpConnector(id))
synced := s.create(s.checked(s.httpConnector(id), "hash-one"))
s.Equal(1, synced.Revision, "what the newest revision already says is no change")
s.Equal("hash-one", s.get(id).SyncHash)
edited := s.httpConnector(id)
edited["http"].(map[string]any)["tools"].([]map[string]any)[0]["path"] = "/v2/forecast"
s.create(edited)
stored := s.get(id)
s.Equal(2, stored.Revision)
s.assertRefusedAsUnsynced(s.serverClient, http.MethodPost, "/v1/agents/connectors",
s.checked(s.httpConnector(id), "hash-two"))
s.Equal(stored, s.get(id), "a refused sync writes nothing")
}Unverified: Dart client regeneration (not run), the cmd/router replicate_sensitive integration test (not run).
…nc wrote Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
R8.1 fixed in 0caa225: |
kanat
left a comment
There was a problem hiding this comment.
VERDICT: GO
REVIEWED: 0caa225 (delta over 8e36d34). The delta is +21 lines in acceleration/internal/api/connectors_test.go only, and matches the R8.1 row. It is test-only.
PRIOR:
- R8.1 [Nit] (new test for an http connector under check_changes): fixed. The new test passes on head and on head merged onto origin/main 85c03bf.
- Mutation (a), sameManifest ignores Sources: the new test FAILS on head and on the merged tree. Reverted.
- Mutation (b),
falsein place of request.Body.CheckChanges at connectors.go:448: the new test FAILS on head and on the merged tree. Reverted. - No other open findings from earlier rounds.
NEW FINDINGS: none.
SUITES: go test -tags integration ./internal/api -run TestConnectorsSuite is ok on head merged onto main (all subtests pass, no FAIL). The new test is stable over -count=3. gofmt is clean.
CI: not waited for. At review time the integration (api, store, router, routers, rest, agent), go, swift, dart, sdks and unit (not integration) jobs were pending. Lint, kotlin, labeler, changes and Analyze were passing.
UNVERIFIED: the other integration suites were not rerun this round, since the delta is test-only. The earlier GO's checks cover the code.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Feature branch for AI-3669: the router gets an
httptool source. A fileconnectors/http/<name>.yamlnames a public https base URL and read-only tools. Once synced, an agent calls those tools with a user's credential.What it does
Safety rules. Each is checked when the connector is saved, at each call, or both:
base_urlgoes through the egress check; private and plain-http hosts are refusedCheckBaseURL), and every call, as the connection's client is the egress clientread_onlyGET and HEADread_onlytoolsread_only)..%2Fadminstays one segmentPieces
All merged into this branch, each reviewed on its own PR. Three commits on the branch itself follow the last main sync: the feature's caps become core's after #2430, a subtest split of #2480's test, and a test that an http custom connector meets an MCP one's limits.
sources/httptool sourceMain was merged into the branch 9 times; the last is main
f58ff6eb3. An earlier one, mainc4119ba23, carries #2430's import limits. Imported http connectors are held to the same limits.The merge of main
8232d25afbrings in two changes that touch http connectors:TestAnImportedHTTPConnectorAnAgentBindsBesideASensitiveOneIsWeighedByItsTools).check_changesto a custom connector create. An http connector takes the same path as an MCP one, and a test covers the http case (TestACheckedSyncOfAnHTTPConnectorIsRefusedOnlyOverAnEditNoSyncWrote).Acceptance
AC-1..AC-9 are frozen in the epic. The staging window was opened twice on the branch build, then staging was restored.
application/jsonRulings by Kanat (2026-11-25):
not_connectedand its tool is not offered, as before.read_onlyPOST or DELETE locally, before any request. The router refuses the same with a 400 on a direct POST.Gates for the merge into main
96d535d9d), which fixed main's integration build atscheduled_unpaid_test.go:814. This branch builds and vets with the integration tag merged onto mainaa4c2d4d9Connector.sourcesgo out only after the router deploy: the generated Python and Rust clients cannot parse a connector from an older routerBreaking change
From
CHANGELOG.mdon the branch, under Unreleased, Breaking Changes:CustomConnectorRequest's endpoint is optional in the Go, Rust, PHP and Python SDKsCustomConnectorRequest.Endpointis now*string. Set it with a pointer (for exampleEndpoint: &url); a caller that set a plain string no longer compiles.CustomConnectorRequest.endpointis nowOption<String>. Set it withSome(url); a struct literal with a plainString, or a read of one, no longer compiles.CustomConnectorRequestconstructor takes$endpointafter$schemes, not first. A positional call no longer matches; named arguments work as before.plugins/stream): the generatedCustomConnectorRequesttakesendpointafterschemes, not first. A positional call no longer matches; keyword arguments work as before.Rollout
🤖 Generated with Claude Code