|
| 1 | +# 260912 — Retire the Devin ACP adapter and give Devin the tool-catalog nudge |
| 2 | + |
| 3 | +## Why this unit exists |
| 4 | + |
| 5 | +Two Devin provider rows exist, `devin` and `devin-cli`, and both stream Cognition's |
| 6 | +`ApiServerService/GetChatMessage` over Connect-RPC on the `devin` adapter. They differ only in |
| 7 | +where the credential came from: a browser sign-in through `RegisterUser`, or the |
| 8 | +`devin-session-token` the installed CLI already wrote to its own `credentials.toml`. |
| 9 | + |
| 10 | +A second adapter registered under the id `devin-cli` still existed. It spawned `devin acp` and |
| 11 | +drove the child over Agent Client Protocol on stdio. It was unreachable under the `devin-cli` |
| 12 | +provider id — `routedProviderConfig` pins the adapter from the registry for any registry id — and |
| 13 | +reachable only through a custom-named row such as `"devin-acp"`. Nobody was routed to it. |
| 14 | + |
| 15 | +It is being removed rather than kept, because the premise that justified it turned out to be |
| 16 | +false. The design assumed OpenCodex could not hold a credential for the installed CLI, so a child |
| 17 | +process was the only way to use it. The CLI's `windsurf_api_key` is an ordinary |
| 18 | +`devin-session-token$<JWT>`, the same credential the cloud client already speaks. Importing the |
| 19 | +token does everything the child did, without a placeholder `buildRequest`, a disabled |
| 20 | +`parseStream`, an identity-only `baseUrl` that no request may connect to, and a subprocess |
| 21 | +running in the operator's own tree. |
| 22 | + |
| 23 | +The nudge is the second half. Every non-OpenAI adapter that advertises a client tool catalog |
| 24 | +injects `buildNonOpenAIToolCatalogNudgeForTools` into its system prompt — Anthropic, Google, |
| 25 | +non-OpenAI `openai-chat` hosts, Kiro, Command Code. The Devin adapter does advertise a real |
| 26 | +catalog (proto field #10 via `mapOcxToolsToDevin`) and was the only one left without the |
| 27 | +paragraph. Adding it in `mapOcxMessagesToDevin` covers both provider rows at once, because they |
| 28 | +share the adapter. The retired ACP wire could never have used it: `session/prompt` carries prompt |
| 29 | +text only, with `capabilities: {}` and `mcpServers: []`, so a catalog nudge there would have |
| 30 | +described a contract that does not exist on that wire. |
| 31 | + |
| 32 | +## Work phases |
| 33 | + |
| 34 | +### wp1 — land PR #4411 |
| 35 | + |
| 36 | +Unrelated in subject, but it is the open PR blocking this branch's base from being clean. Its |
| 37 | +`test 3/4`, `gates` and `macos 2/2` failures were one cause: `privacy:scan` flagged a maintainer |
| 38 | +email address quoted inside a carried devlog record. The address was incidental to the note. |
| 39 | + |
| 40 | +Done when: exact-head CI is green and the PR is merged into `dev`. |
| 41 | + |
| 42 | +### wp2 — retire ACP, migrate, nudge |
| 43 | + |
| 44 | +Removals: |
| 45 | + |
| 46 | +- `src/adapters/devin-cli/{acp,adapter,binary,models}.ts` |
| 47 | +- `tests/providers/devin-cli-adapter.test.ts`, and its rows in `scripts/test-layout/layout.json` |
| 48 | + and `tests/fixtures/test-layout-expected.json` |
| 49 | +- the `devin-cli` import, `AdapterWire` member and registry entry in `src/adapters/registry.ts` |
| 50 | +- the `devin-cli` case in `upstreamProtocolForAdapter` |
| 51 | +- the `devin-cli` row in the adapter-registry authority map, and the wire from |
| 52 | + `RUN_TURN_ONLY_WIRES` |
| 53 | + |
| 54 | +Migration. `projectDevinCliAuthMode` previously warned and changed nothing when a saved row still |
| 55 | +named the ACP adapter, on the reasoning that routing already pinned the transport. That reasoning |
| 56 | +held only for the registry id. With the adapter gone, a custom-named row has nothing pinning it |
| 57 | +and would throw `Unknown adapter: devin-cli` on every request, so the migration now rewrites |
| 58 | +**every** row naming the retired id, whatever the row is called. A row still carrying the |
| 59 | +identity-only `cli.devin.ai` host is repointed at the api-server in the same pass, because that |
| 60 | +URL was never a destination and leaving it would trade an unconstructible adapter for an |
| 61 | +unresolvable host. |
| 62 | + |
| 63 | +Nudge. `mapOcxMessagesToDevin` appends the shared paragraph to the system content. The wire name |
| 64 | +callback is `tool => tool.name`, not the default namespaced form, because `mapOcxToolsToDevin` |
| 65 | +writes the bare name; a nudge listing names the model is never offered is worse than none. |
| 66 | + |
| 67 | +Done when: no adapter id `devin-cli` remains anywhere, saved rows migrate with regression |
| 68 | +coverage, the nudge is covered by a regression test, structure/ and docs-site agree, exact-head CI |
| 69 | +is green and the PR is merged. |
| 70 | + |
| 71 | +## Verification policy for this unit |
| 72 | + |
| 73 | +Local product suite runs are prohibited by the maintainer. Local checks are limited to |
| 74 | +`bun run structure:check`, `bun run privacy:scan`, and explicitly named focused test files. |
| 75 | +Everything else is hosted exact-head CI. Skipped local checks are labelled NOT RUN in the PR. |
| 76 | + |
0 commit comments