ACP: let the client choose deferred for each MCP server (_meta)

Offen Anfängerfreundlich
#6,000 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
85/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript

Rechercherichtung

Beginne mit packages/acp-server/src/convert.ts und untersuche acpMcpServersToConfigRecord, insbesondere die stdio- und http/sse-Zweige. Lies anschließend test/convert.test.ts und prüfe, wie jeder Zweig Servermetadaten konvertiert. Das Ziel ist erreicht, wenn ein boolescher Wert kimi-code/deferred für jeden Server übernommen wird, während fehlende oder nicht boolesche Werte das Standardverhalten beibehalten, und ein Test die Konvertierung abdeckt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

What feature would you like to see?

Let an ACP client choose deferred for each MCP server that it sends in session/new, session/load and session/resume.

Today acpMcpServersToConfigRecord (packages/acp-server/src/convert.ts) builds the config record without deferred, so every ACP server uses [mcp] default_deferred (default true). The config schema and the connection manager already support deferred for each server, but an ACP client cannot set it. In 2.9.0 I found no other way: the --mcp-config flags are gone, there is no environment variable for default_deferred, and tool _meta is not read.

Proposal: read an optional key from the ACP _meta of each server:

{ "name": "core", "command": "core-mcp", "args": [], "env": [], "_meta": { "kimi-code/deferred": false } }
  • false: the tools of this server stay inline.
  • true: the tools of this server are deferred.
  • missing or not a boolean: no change (default_deferred applies).

The ACP schema allows _meta on each MCP server, and clients other than Kimi Code ignore the key.

Additional information

My use case: I maintain OpenBot, which runs Kimi Code as an ACP agent. Each session gets a few MCP servers from OpenBot that the agent needs on each turn (chat, team and task tools), and also MCP servers that the user adds. I want the user's servers deferred, which saves prompt tokens, and OpenBot's own servers inline, so the agent does not need a search step before each core action. Today the only choice is one global setting for all servers.

I have a small change ready (a deferredFromMeta helper used by the stdio and http/sse branches, about 10 lines, and one test in test/convert.test.ts). I can send it as a PR if you invite me, or you can implement it in a different way.

Vorherrschende Sprache
TypeScript
Sterne
8.3k
Forks
1.4k
Ø Merge
15 Std. 9 Min.
Gemergte PRs (30 T.)
751

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus MoonshotAI/kimi-code

Alle Issues in MoonshotAI/kimi-code

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.