warelik 2c650b3765 fix(backend): cover cursor-agent CLI local-mode endpoint surface
Desktop Cursor works through the local proxy because it drives the agent
over BidiAppend/RunSSE plus the already-mocked unary endpoints. The
cursor-agent CLI speaks the same agent protocol but calls additional
unary endpoints that had no local handlers, so every request fell into a
wildcard route and came back as HTTP 404, which the Connect client maps
to '[unimplemented] HTTP 404'.

Three independent breaks, one visible symptom:

1. Startup: ServerConfigService/GetServerConfig (only the AiService
   variant was mocked), DashboardService/GetTeamAdminSettingsOrEmptyIfNotInTeam
   and DashboardService/ListMarketplaces were missing, so the CLI aborted
   during session init.

2. Git workspaces: the CLI resolves the repo path-encryption key from
   indexingConfig.default{User,Team}PathEncryptionKey in GetServerConfig
   when no IDE-stored repo keys exist. The mock returned no indexingConfig,
   so repository identity init failed with 'No encryption key found'.

3. Tool execution: every fs tool executor (Ls/Grep/Glob/Shell) consults
   the ignore service, which calls getRepoBlockExcludeGlobs() ->
   DashboardService/GetTeamReposOrEmptyIfNotInTeam. The 404 propagated as
   the tool result error, so model answers arrived but every tool call
   returned '[unimplemented] HTTP 404'. Non-git workspaces skip the
   repo-block path, which is why tools only failed inside git repos.

Also close the remaining tolerated 404 noise so a CLI session produces
zero unimplemented responses: model listing (GetUsableModels,
GetDefaultModelForCli, GetDefaultModel), dashboard/plugin housekeeping
(GetGlobalCommands, GetEffectiveUserPlugins, RegisterMarketplaceAndPlugins,
GetCliDownloadUrl) and telemetry (AnalyticsService/SubmitLogs,
AnalyticsService/TrackEvents, OTLP /v1/traces).

Additional logging: PolicyMiddleware now includes the request path in the
per-request log line, which is what made this diagnosable from app.log.
2026-08-01 10:58:19 +03:00
2026-07-27 00:55:02 +08:00
2026-07-27 21:57:51 +08:00
2026-06-30 10:38:52 +08:00
2026-07-27 00:55:02 +08:00
2026-07-10 11:38:45 +08:00
2026-06-30 10:38:52 +08:00
2026-06-30 10:38:52 +08:00
2026-06-30 10:38:52 +08:00
2026-06-30 10:38:52 +08:00
2026-06-30 10:38:52 +08:00
2026-06-30 10:46:26 +08:00
2026-06-30 10:38:52 +08:00
2026-06-30 10:49:26 +08:00
2026-07-27 21:57:51 +08:00
2026-06-30 10:38:52 +08:00

image image image

为什么做这个项目

公司喜欢把 Agent 服务与模型绑定在一起,让用户只能在指定模型、指定订阅和指定计费方式下使用工具。

我希望打破这种绑定关系:模型应该可以自由选择。开发者应该能够把自己的模型 API 接入到任何 IDE、Chat、Agent 或开发工具中,也可以自托管整套服务,避免被单一平台锁定。

这个项目的目标,是让模型选择权重新回到用户手里。

路线图

正式版路线图 详细使用教程

后续

后续会继续扩展更多工具和使用场景,包括但不限于:

  • 支持更多 IDE 接入
  • 支持更多 Chat 类应用
  • 支持更多 Agent 工具和工作流
  • 提供更完善的自托管部署方式
  • 持续优化不同模型 API 的兼容性
  • 降低接入成本,让已有模型额度可以被更充分地利用

最终希望做到:让你的模型 API 可以自由接入到你想使用的任何工具中。

Star History

Star History Chart
S
Description
No description provided
Readme MIT
19 MiB
Languages
Go 86.4%
Vue 6.3%
JavaScript 4.8%
CSS 1%
NSIS 0.6%
Other 0.8%