Repository navigation
Expand file tree
/
Copy pathregistry.json
More file actions
531 lines (531 loc) · 27.5 KB
/
Copy pathregistry.json
File metadata and controls
531 lines (531 loc) · 27.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
{
"version": 1,
"doc": "模型网关插件登记清单。安装/开发插件时,必须在 plugins 里追加一项,如实记录动了哪些文件、哪些接线点、建了哪些表、引入了哪些依赖。卸载插件时按此清单逐项回滚即可快速、完整地删除。",
"plugins": {
"proxypool": {
"name": "代理池",
"version": "1",
"status": "installed",
"kind": "builtin-plugin",
"summary": "独立出口代理池管理:CRUD、批量添加、文件/订阅导入、批量测试探活、一键解封;可被其他插件或网关端点复用。",
"backendDirs": [
"backend-go/internal/proxypool/"
],
"manifest": {
"file": "backend-go/internal/manifest/manifest.go",
"lines": [
"\t\t{Prefix: \"/api/proxypool\", Module: \"proxypool\", Owner: OwnerGo, Auth: AuthSession, ResponseMode: ResponseJSON, Description: \"独立出口代理池管理(端点与插件可复用)\"},"
]
},
"serverWiring": {
"file": "backend-go/internal/server/server.go",
"imports": [
"\"github.com/iwvw/api-monitor/backend-go/internal/proxypool\""
],
"structField": "proxypool *proxypool.Service",
"constructor": "proxypool: proxypool.New(cfg),",
"injections": [
"server.modelhub.SetProxyPoolSelector(server.proxypool)"
],
"serveCases": [
"case \"/api/proxypool\":"
]
},
"dbTables": [
"proxy_pools",
"proxypool_state"
],
"dbColumnAdds": [],
"frontend": {
"files": [
"src/js/pages/modelhub/plugins/ProxyPoolPlugin.jsx"
],
"registrations": [
{
"file": "src/js/pages/modelhub/ModelHubPluginsPanel.jsx",
"kind": "PLUGINS registry entry",
"id": "proxypool"
}
],
"hostIntegration": "ModelHubPage.jsx 端点表单「使用独立代理池」下拉(proxyPoolId),属模型网关主模块接入,卸载时保留列、仅清空端点引用"
},
"goDeps": [],
"systemContracts": [],
"docs": [
"docs/standards/模型网关插件开发指南.md"
],
"uninstallSteps": [
"rm backend-go/internal/proxypool/",
"manifest.go:删除 /api/proxypool 前缀行",
"server.go:删除 import、proxypool 字段、proxypool.New(cfg)、SetProxyPoolSelector 注入、/api/proxypool case",
"go mod tidy(如引入过依赖)",
"DB:DROP TABLE proxypool_state; DROP TABLE proxy_pools;(并清空 modelhub_endpoints.proxy_pool_id 引用)",
"删除 src/js/pages/modelhub/plugins/ProxyPoolPlugin.jsx",
"OpenAIPluginsPanel.jsx:移除 proxypool 注册条目"
]
},
"antigravity": {
"name": "Antigravity",
"version": "2",
"status": "installed",
"kind": "engine-plugin",
"summary": "Claude 订阅账号(Google OAuth)转 Anthropic 兼容 API:OAuth 授权、token 管理、Claude→Gemini→v1internal 协议转换、SSE 回转。多账号选号策略(固定首个 / 轮询 / 按剩余额度,默认固定首个),带账号失败冷却、失效过滤与换号重试(最多 3 个账号),额度快照带 2 小时 TTL 与后台刷新;选号原语复用 internal/accountpick。设置面 GET 已脱敏,不再下发 token。客户端指纹对齐 CLIProxyAPI:Hub 版本由后台从官方 auto-updater manifest 动态刷新(兜底 2.24.0,含 release changelist,Cloud Code 拒绝 2.23.0 以下客户端);生成/项目发现/模型列表统一走 daily 端点;工具调用 ID 按 Claude 上游规则清洗并去重;contents 首尾按上游要求归一化(丢弃尾部纯 thought turn、Gemini 补空 user turn)。",
"backendDirs": [
"backend-go/internal/antigravity/"
],
"manifest": {
"file": "backend-go/internal/manifest/manifest.go",
"lines": [
"\t\t{Prefix: \"/api/antigravity\", Module: \"antigravity\", Owner: OwnerGo, Auth: AuthSession, ResponseMode: ResponseJSON, Description: \"Antigravity 插件(Claude 订阅转 API)管理\"},",
"\t\t{Prefix: \"/api/antigravity/v1\", Module: \"antigravity-compatible\", Owner: OwnerGo, Auth: AuthInternal, ResponseMode: ResponseStream, Description: \"Antigravity 插件 Anthropic 兼容中继(仅本机内部网关调用)\"},"
]
},
"serverWiring": {
"file": "backend-go/internal/server/server.go",
"imports": [
"\"github.com/iwvw/api-monitor/backend-go/internal/antigravity\""
],
"structField": "antigravity *antigravity.Service",
"constructor": "antigravity: antigravity.New(cfg),",
"injections": [
"server.antigravity.SetProxyPoolSelector(server.proxypool)"
],
"serveCases": [
"case \"/api/antigravity\", \"/api/antigravity/v1\":"
],
"authModules": [
"antigravity-compatible"
]
},
"dbTables": [
"antigravity_settings",
"antigravity_call_stats",
"antigravity_usage_daily"
],
"dbColumnAdds": [],
"frontend": {
"files": [
"src/js/pages/modelhub/plugins/AntigravityPlugin.jsx"
],
"registrations": [
{
"file": "src/js/pages/modelhub/ModelHubPluginsPanel.jsx",
"kind": "PLUGINS registry entry",
"id": "antigravity"
}
],
"hostIntegration": ""
},
"goDeps": [],
"systemContracts": [],
"docs": [
"docs/standards/模型网关插件开发指南.md",
"docs/standards/模型网关插件-antigravity方案.md"
],
"uninstallSteps": [
"rm backend-go/internal/antigravity/",
"manifest.go:删除 /api/antigravity 与 /api/antigravity/v1 前缀行",
"server.go:删除 import、antigravity 字段、antigravity.New(cfg)、SetProxyPoolSelector 注入、StartVersionDiscovery 调用、/api/antigravity case、antigravity-compatible 鉴权分支",
"go mod tidy",
"DB:DROP TABLE antigravity_usage_daily; DROP TABLE antigravity_call_stats; DROP TABLE antigravity_settings;",
"删除 src/js/pages/modelhub/plugins/AntigravityPlugin.jsx",
"OpenAIPluginsPanel.jsx:移除 antigravity 注册条目",
"删除 docs/standards/模型网关插件-antigravity方案.md"
]
},
"workbuddy": {
"name": "WorkBuddy",
"version": "1",
"status": "installed",
"kind": "engine-plugin",
"summary": "腾讯 CodeBuddy(copilot.tencent.com)扫码登录转 OpenAI 兼容 API:扫码登录 + token 自动刷新、上游动态模型目录(/v3/config)、对话转发(强制流式)、网关端点一键接入,以及国内版账号的每日自动签到(含连登档位兑换与抽奖)与对话活跃上报。多账号选号策略(按今日消耗(默认)/ 固定首个 / 轮询),默认「站点时区今天已消耗 credit 最少」;轮询游标复用 internal/accountpick 的原始下标锚定实现。参照 CLIProxyAPI 插件 workbuddy-cliproxy 原生实现。",
"backendDirs": [
"backend-go/internal/workbuddy/"
],
"manifest": {
"file": "backend-go/internal/manifest/manifest.go",
"lines": [
"\t\t{Prefix: \"/api/workbuddy\", Module: \"workbuddy\", Owner: OwnerGo, Auth: AuthSession, ResponseMode: ResponseJSON, Description: \"WorkBuddy 插件(腾讯 CodeBuddy 转 OpenAI 兼容 API)管理\"},",
"\t\t{Prefix: \"/api/workbuddy/v1\", Module: \"workbuddy-compatible\", Owner: OwnerGo, Auth: AuthInternal, ResponseMode: ResponseStream, Description: \"WorkBuddy 插件 OpenAI 兼容中继(仅本机内部网关调用)\"},"
]
},
"serverWiring": {
"file": "backend-go/internal/server/server.go",
"imports": [
"\"github.com/iwvw/api-monitor/backend-go/internal/workbuddy\""
],
"structField": "workbuddy *workbuddy.Service",
"constructor": "workbuddy: workbuddy.New(cfg),",
"injections": [
"server.workbuddy.SetProxyPoolSelector(server.proxypool)",
"server.workbuddy.StartCallStatsFlush(warmupCtx)",
"server.workbuddy.StartAutoRefresh(warmupCtx)",
"server.workbuddy.StartCheckinScheduler(warmupCtx)"
],
"serveCases": [
"case \"/api/workbuddy\", \"/api/workbuddy/v1\":"
],
"authModules": [
"workbuddy-compatible"
]
},
"dbTables": [
"workbuddy_settings",
"workbuddy_call_stats",
"workbuddy_usage_daily",
"workbuddy_diagnostics"
],
"dbColumnAdds": [],
"frontend": {
"files": [
"src/js/pages/modelhub/plugins/WorkBuddyPlugin.jsx"
],
"registrations": [
{
"file": "src/js/pages/modelhub/ModelHubPluginsPanel.jsx",
"kind": "PLUGINS registry entry",
"id": "workbuddy"
}
],
"hostIntegration": ""
},
"goDeps": [],
"systemContracts": [
"上游协议事实见 docs/standards/模型网关插件-workbuddy方案.md 第 3 节;协议层集中在 backend-go/internal/workbuddy/upstream.go",
"签到/活跃/连登协议见 docs/standards/模型网关插件-workbuddy方案.md 第 9 节;实现在 backend-go/internal/workbuddy/checkin.go,调度在 scheduler.go(站点时区 cron + TZ watcher,见 CONTEXT.md 时区硬规则)",
"签到与连登类上游调用只对国内版(cn)账号发起:国际版同接口返回 code 10001「签到活动未开启或已过期」且连登接口 500,见 checkinSupported"
],
"docs": [
"docs/standards/模型网关插件-workbuddy方案.md",
"docs/standards/模型网关插件开发指南.md"
],
"uninstallSteps": [
"rm backend-go/internal/workbuddy/",
"manifest.go:删除 /api/workbuddy 与 /api/workbuddy/v1 前缀行",
"server.go:删除 import、workbuddy 字段、workbuddy.New(cfg)、SetProxyPoolSelector 注入、StartCallStatsFlush、StartAutoRefresh、StartCheckinScheduler、/api/workbuddy case、workbuddy-compatible 鉴权分支",
"DB:DROP TABLE workbuddy_diagnostics; DROP TABLE workbuddy_usage_daily; DROP TABLE workbuddy_call_stats; DROP TABLE workbuddy_settings;",
"DB:DELETE FROM modelhub_endpoints WHERE id = 'workbuddy-internal';",
"删除 src/js/pages/modelhub/plugins/WorkBuddyPlugin.jsx",
"OpenAIPluginsPanel.jsx:移除 workbuddy 注册条目(含 CodeBuddyBrand 图标 import 与组件 import)",
"删除 docs/standards/模型网关插件-workbuddy方案.md"
]
},
"lobsterai": {
"name": "LobsterAI",
"version": "1",
"status": "installed",
"kind": "engine-plugin",
"summary": "网易有道 LobsterAI(龙虾)转 OpenAI 兼容 API:OAuth 本地回环/粘贴回调登录、token 自动刷新、动态模型目录(/api/models/available)、强制流式对话转发(/api/proxy/v1/chat/completions)、额度批次与到期明细(/api/user/profile-summary)、每日自动签到(/api/client-activities,+100 积分/号/天)、账号失败冷却与多账号选号策略(固定首个(默认)/ 轮询 / 按剩余额度,额度取 Account.Credits)、用量统计、网关端点一键接入。least-used 额度快照带 2 小时 TTL、转发后节流刷新与后台周期刷新;选号原语复用 internal/accountpick。协议参考开源反代 lobsterai2api 原生实现。",
"backendDirs": [
"backend-go/internal/lobsterai/"
],
"manifest": {
"file": "backend-go/internal/manifest/manifest.go",
"lines": [
"\t\t{Prefix: \"/api/lobsterai\", Module: \"lobsterai\", Owner: OwnerGo, Auth: AuthSession, ResponseMode: ResponseJSON, Description: \"LobsterAI 插件(网易有道龙虾转 OpenAI 兼容 API)管理\"},",
"\t\t{Prefix: \"/api/lobsterai/v1\", Module: \"lobsterai-compatible\", Owner: OwnerGo, Auth: AuthInternal, ResponseMode: ResponseStream, Description: \"LobsterAI 插件 OpenAI 兼容中继(仅本机内部网关调用)\"},"
]
},
"serverWiring": {
"file": "backend-go/internal/server/server.go",
"imports": [
"\"github.com/iwvw/api-monitor/backend-go/internal/lobsterai\""
],
"structField": "lobsterai *lobsterai.Service",
"constructor": "lobsterai: lobsterai.New(cfg),",
"injections": [
"server.lobsterai.SetProxyPoolSelector(server.proxypool)",
"server.lobsterai.StartCallStatsFlush(warmupCtx)",
"server.lobsterai.StartCheckinScheduler(warmupCtx)"
],
"serveCases": [
"case \"/api/lobsterai\", \"/api/lobsterai/v1\":"
],
"authModules": []
},
"dbTables": [
"lobsterai_settings",
"lobsterai_call_stats",
"lobsterai_usage_daily"
],
"dbColumnAdds": [],
"frontend": {
"files": [
"src/js/pages/modelhub/plugins/LobsterAIPlugin.jsx"
],
"registrations": [
{
"file": "src/js/pages/modelhub/ModelHubPluginsPanel.jsx",
"kind": "PLUGINS registry entry",
"id": "lobsterai"
}
],
"hostIntegration": ""
},
"goDeps": [
"github.com/robfig/cron/v3"
],
"systemContracts": [
"上游协议事实见 docs/standards/模型网关插件-lobsterai方案.md 第 3 节;协议层集中在 backend-go/internal/lobsterai/upstream.go"
],
"docs": [
"docs/standards/模型网关插件-lobsterai方案.md",
"docs/standards/模型网关插件开发指南.md"
],
"uninstallSteps": [
"rm backend-go/internal/lobsterai/",
"manifest.go:删除 /api/lobsterai 与 /api/lobsterai/v1 前缀行",
"server.go:删除 import、lobsterai 字段、lobsterai.New(cfg)、SetProxyPoolSelector 注入、StartCallStatsFlush、StartCheckinScheduler、/api/lobsterai case",
"go mod tidy(robfig/cron 若仍被其它模块使用则保留)",
"DB:DROP TABLE lobsterai_usage_daily; DROP TABLE lobsterai_call_stats; DROP TABLE lobsterai_settings;",
"DB:DELETE FROM modelhub_endpoints WHERE id = 'lobsterai-internal';",
"删除 src/js/pages/modelhub/plugins/LobsterAIPlugin.jsx",
"OpenAIPluginsPanel.jsx:移除 lobsterai 注册条目(含 LobsterAIBrand 图标 import 与组件 import)",
"删除 docs/standards/模型网关插件-lobsterai方案.md"
]
},
"qoder": {
"name": "Qoder",
"version": "1",
"status": "installed",
"kind": "engine-plugin",
"summary": "Qoder(qoder.cn / qoder.com)转 OpenAI 兼容 API:设备登录(nonce + PKCE 轮询换取 device token)、token 主动续期(/api/v1/deviceToken/refresh,剩余寿命 <3 天自动换新,支持单账号/全量手动续期与需重授权标记)、加密 SSE 对话转发(身份 AES-CBC + RSA 包裹 + MD5 签名,POST agent_chat_generation)、余额与专属资源包检测(/api/v2/quota/usage,SOTA 等专用额度单独成桶)、每日自动签到(/sash/api/v1/me/campaigns 领取 CLAIM_BENEFIT,国内版与国际版双区域:国内不发机器头、国际版必须携带真实设备指纹)、可配置签到时刻 + 账号错峰防风控 + 漏签重试、本地连签统计(按活动窗口日期记账)、账号失败冷却与多账号选号策略(固定首个(默认)/ 轮询,复用 internal/accountpick)、用量统计、网关端点一键接入。设备指纹(identity.go)同时决定推理协议版本:配置真实指纹后切 clienttype=10 / version=1.1.69 并解锁 Sonus/Cantus/Fast。协议参考开源反代 qoder2api(Zhengyuuuui/qoder2api)原生实现。",
"backendDirs": [
"backend-go/internal/qoder/"
],
"manifest": {
"file": "backend-go/internal/manifest/manifest.go",
"lines": [
"\t\t{Prefix: \"/api/qoder\", Module: \"qoder\", Owner: OwnerGo, Auth: AuthSession, ResponseMode: ResponseJSON, Description: \"Qoder 插件(qoder.com 转 OpenAI 兼容 API)管理\"},",
"\t\t{Prefix: \"/api/qoder/v1\", Module: \"qoder-compatible\", Owner: OwnerGo, Auth: AuthInternal, ResponseMode: ResponseStream, Description: \"Qoder 插件 OpenAI 兼容中继(仅本机内部网关调用)\"},"
]
},
"serverWiring": {
"file": "backend-go/internal/server/server.go",
"imports": [
"\"github.com/iwvw/api-monitor/backend-go/internal/qoder\""
],
"structField": "qoder *qoder.Service",
"constructor": "qoder: qoder.New(cfg),",
"injections": [
"server.qoder.SetProxyPoolSelector(server.proxypool)",
"server.qoder.StartCallStatsFlush(warmupCtx)",
"server.qoder.StartAutoRefresh(warmupCtx)",
"server.qoder.StartCheckinScheduler(warmupCtx)"
],
"serveCases": [
"case \"/api/qoder\", \"/api/qoder/v1\":"
],
"authModules": []
},
"dbTables": [
"qoder_settings",
"qoder_call_stats",
"qoder_usage_daily",
"qoder_checkin_history"
],
"dbColumnAdds": [],
"frontend": {
"files": [
"src/js/pages/modelhub/plugins/QoderPlugin.jsx",
"src/assets/brand-icons/qoder.png"
],
"registrations": [
{
"file": "src/js/pages/modelhub/ModelHubPluginsPanel.jsx",
"kind": "PLUGINS registry entry",
"id": "qoder"
},
{
"file": "src/js/components/Icons.jsx",
"kind": "brand icon export",
"id": "QoderBrand"
}
],
"hostIntegration": ""
},
"goDeps": [
"github.com/robfig/cron/v3"
],
"systemContracts": [
"上游协议事实见 docs/standards/模型网关插件-qoder方案.md;协议层集中在 backend-go/internal/qoder/upstream.go,签到与余额在 billing.go,设备身份在 identity.go",
"国际版签到指纹可用 tools/qoder-fingerprint.ps1 从本机 Qoder 客户端的 umid 组件(runtime-info.exe)直接提取,无需抓包"
],
"docs": [
"docs/standards/模型网关插件-qoder方案.md",
"docs/standards/模型网关插件开发指南.md"
],
"uninstallSteps": [
"rm backend-go/internal/qoder/",
"manifest.go:删除 /api/qoder 与 /api/qoder/v1 前缀行",
"server.go:删除 import、qoder 字段、qoder.New(cfg)、SetProxyPoolSelector 注入、StartCallStatsFlush、StartAutoRefresh、StartCheckinScheduler、/api/qoder case,以及 apiKeyRequiresSession 的 /api/qoder/accounts 前缀",
"go mod tidy(robfig/cron 若仍被其它模块使用则保留)",
"DB:DROP TABLE qoder_usage_daily; DROP TABLE qoder_call_stats; DROP TABLE qoder_checkin_history; DROP TABLE qoder_settings;",
"DB:DELETE FROM modelhub_endpoints WHERE id = 'qoder-internal';",
"删除 src/js/pages/modelhub/plugins/QoderPlugin.jsx",
"OpenAIPluginsPanel.jsx:移除 qoder 注册条目(含 QoderBrand 图标 import 与组件 import)",
"删除 docs/standards/模型网关插件-qoder方案.md"
]
},
"raccoon": {
"name": "小浣熊",
"version": "1",
"status": "installed",
"kind": "engine-plugin",
"summary": "商汤小浣熊(xiaohuanxiong.com)转 OpenAI 兼容 API:支持网页登录(官方授权页 + office-raccoon 回调授权码,POST /api/web/auth/v1/login_with_authorization_code 换凭证,state 一次性校验)或手动粘贴 token;账号 token(access_token ~2h + refresh_token ~30d,刷新会轮换)自动续期、标准 OpenAI 兼容对话转发(流式/非流式、多模态、function calling 原样透传,转发前剥离 reasoning_effort)、模型目录动态发现(GET /api/web/llm/v2/model_catalog,未知模型本地白名单拦截,避免上游静默回落默认模型)、积分余额查询(/api/web/points/v1/balance)、每日签到(/api/web/office/v3/setting_info 触发每日积分发放 + /api/web/points/v2/bills 核对今日入账,站点时区外按上游 UTC+8 自然日判定)、账号失败冷却与多账号选号策略(固定首个(默认)/ 轮询,复用 internal/accountpick)、用量统计、网关端点一键接入。协议参考开源反代 xhx2api(haoxinyu1/xiaohuanxiong2api)与 raccoon2api(xxhhlk/raccoon2api)。",
"backendDirs": [
"backend-go/internal/raccoon/"
],
"manifest": {
"file": "backend-go/internal/manifest/manifest.go",
"lines": [
"\t\t{Prefix: \"/api/raccoon\", Module: \"raccoon\", Owner: OwnerGo, Auth: AuthSession, ResponseMode: ResponseJSON, Description: \"小浣熊插件(商汤 xiaohuanxiong.com 转 OpenAI 兼容 API)管理\"},",
"\t\t{Prefix: \"/api/raccoon/v1\", Module: \"raccoon-compatible\", Owner: OwnerGo, Auth: AuthInternal, ResponseMode: ResponseStream, Description: \"小浣熊插件 OpenAI 兼容中继(仅本机内部网关调用)\"},"
]
},
"serverWiring": {
"file": "backend-go/internal/server/server.go",
"imports": [
"\"github.com/iwvw/api-monitor/backend-go/internal/raccoon\""
],
"structField": "raccoon *raccoon.Service",
"constructor": "raccoon: raccoon.New(cfg),",
"injections": [
"server.raccoon.SetProxyPoolSelector(server.proxypool)",
"server.raccoon.StartCallStatsFlush(warmupCtx)",
"server.raccoon.StartAutoRefresh(warmupCtx)",
"server.raccoon.StartModelRefresh(warmupCtx)",
"server.raccoon.ReconcileLinkedEndpoint(warmupCtx)",
"server.raccoon.StartCheckinScheduler(warmupCtx)"
],
"serveCases": [
"case \"/api/raccoon\", \"/api/raccoon/v1\":"
],
"authModules": [
"apiKeyRequiresSession: /api/raccoon/accounts/export, /api/raccoon/accounts/import"
]
},
"dbTables": [
"raccoon_settings",
"raccoon_call_stats",
"raccoon_usage_daily"
],
"dbColumnAdds": [],
"frontend": {
"files": [
"src/js/pages/modelhub/plugins/RaccoonPlugin.jsx",
"src/assets/brand-icons/raccoon.svg"
],
"registrations": [
{
"file": "src/js/pages/modelhub/ModelHubPluginsPanel.jsx",
"kind": "PLUGINS registry entry",
"id": "raccoon"
},
{
"file": "src/js/components/Icons.jsx",
"kind": "brand icon export",
"id": "RaccoonBrand"
}
],
"hostIntegration": ""
},
"goDeps": [],
"systemContracts": [
"上游协议事实见开源反代 xhx2api(haoxinyu1/xiaohuanxiong2api)与 raccoon2api(xxhhlk/raccoon2api);协议层集中在 backend-go/internal/raccoon/upstream.go,模型目录解析在 catalog.go,网页登录(授权页 + office-raccoon 回调换码)在 login.go"
],
"docs": [
"docs/standards/模型网关插件开发指南.md"
],
"uninstallSteps": [
"rm backend-go/internal/raccoon/",
"manifest.go:删除 /api/raccoon 与 /api/raccoon/v1 前缀行",
"route_handlers.go:删除 raccoon / raccoon-compatible 两行",
"server.go:删除 import、raccoon 字段、raccoon.New(cfg)、SetProxyPoolSelector / StartCallStatsFlush / StartAutoRefresh / StartModelRefresh / ReconcileLinkedEndpoint 注入,以及 apiKeyRequiresSession 的 /api/raccoon/accounts 前缀",
"DB:DROP TABLE raccoon_usage_daily; DROP TABLE raccoon_call_stats; DROP TABLE raccoon_settings;",
"DB:DELETE FROM modelhub_endpoints WHERE id = 'raccoon-internal';",
"删除 src/js/pages/modelhub/plugins/RaccoonPlugin.jsx 与 src/assets/brand-icons/raccoon.svg",
"OpenAIPluginsPanel.jsx:移除 raccoon 注册条目(含 RaccoonBrand 图标 import 与组件 import)",
"Icons.jsx:移除 raccoonIcon import 与 RaccoonBrand 导出"
]
},
"cline": {
"name": "Cline",
"version": "1",
"status": "installed",
"kind": "engine-plugin",
"summary": "Cline(cline.bot)转 OpenAI 兼容 API:WorkOS OAuth2 令牌接入(accessToken 含 workos: 前缀,去掉即 401)、refresh token 自动续期(/api/v1/auth/refresh,grantType 为 camelCase,返回不带前缀需补回)、模型目录动态发现(/ai/cline/recommended-models,按响应分组归池而非按 id 前缀猜)、免费池与 ClinePass 订阅池(cline-free/ 与 cline-pass/ 是计费通道选择器,转发必须原样带)、OpenAI 兼容对话转发(恒流式 + SSE model 改写)、用量统计、网关端点一键接入。设备授权登录(WorkOS RFC 8628)后端已实现。",
"backendDirs": [
"backend-go/internal/cline/"
],
"manifest": {
"file": "backend-go/internal/manifest/manifest.go",
"lines": [
"\t\t{Prefix: \"/api/cline\", Module: \"cline\", Owner: OwnerGo, Auth: AuthSession, ResponseMode: ResponseJSON, Description: \"Cline 插件(cline.bot 转 OpenAI 兼容 API)管理\"},",
"\t\t{Prefix: \"/api/cline/v1\", Module: \"cline-compatible\", Owner: OwnerGo, Auth: AuthInternal, ResponseMode: ResponseStream, Description: \"Cline 插件 OpenAI 兼容中继(仅本机内部网关调用)\"},"
]
},
"serverWiring": {
"file": "backend-go/internal/server/server.go",
"imports": [
"\"github.com/iwvw/api-monitor/backend-go/internal/cline\""
],
"structField": "cline *cline.Service",
"constructor": "cline: cline.New(cfg),",
"injections": [
"server.cline.SetProxyPoolSelector(server.proxypool)",
"server.cline.StartCallStatsFlush(warmupCtx)",
"server.cline.StartAutoRefresh(warmupCtx)",
"server.cline.StartModelRefresh(warmupCtx)",
"server.cline.StartLoginSweep(warmupCtx)",
"server.cline.ReconcileLinkedEndpoint(warmupCtx)"
],
"serveCases": [
"case \"/api/cline\", \"/api/cline/v1\":"
],
"authModules": [
"apiKeyRequiresSession: /api/cline/accounts/export, /api/cline/accounts/import"
]
},
"dbTables": [
"cline_settings",
"cline_call_stats",
"cline_usage_daily"
],
"dbColumnAdds": [],
"frontend": {
"files": [
"src/js/pages/modelhub/plugins/ClinePlugin.jsx",
"src/js/pages/modelhub/plugins/TokenPlugin.jsx"
],
"registrations": [
{
"file": "src/js/pages/modelhub/ModelHubPluginsPanel.jsx",
"kind": "PLUGINS registry entry",
"id": "cline"
},
{
"file": "src/js/components/Icons.jsx",
"kind": "brand icon export",
"id": "ClineBrand"
}
],
"hostIntegration": ""
},
"goDeps": [],
"systemContracts": [],
"docs": [
"docs/standards/模型网关插件开发指南.md"
],
"uninstallSteps": [
"rm -r backend-go/internal/cline/",
"manifest.go:删除 /api/cline 与 /api/cline/v1 前缀行",
"route_handlers.go:删除 cline / cline-compatible 两行",
"server.go:删除 import、字段、构造、注入与 apiKeyRequiresSession 前缀",
"DB:DROP TABLE cline_usage_daily; DROP TABLE cline_call_stats; DROP TABLE cline_settings;",
"DB:DELETE FROM modelhub_endpoints WHERE id = 'cline-internal';",
"删除前端插件文件与注册条目"
]
}
}
}