@luchenglong/cli-bridge 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -0
- package/docs/HANDOVER.md +201 -51
- package/dynamic/agy.host.js +1 -1
- package/dynamic/codebuddy.host.js +1063 -925
- package/dynamic/codebuddy.host.template.mjs +1 -0
- package/dynamic/mimo.host.js +314 -548
- package/dynamic/mimo.host.template.mjs +43 -30
- package/dynamic/opencode.host.js +32 -22
- package/home-plugin/cli-bridge-indicator/lib/index.mjs +20 -1
- package/home-plugin/cli-bridge-indicator/lib/preset-declarations.mjs +11 -14
- package/mcp/cli-bridge-mcp.mjs +1 -1
- package/mcp/providers/agy.mjs +2 -1
- package/mcp/providers/codebuddy.mjs +427 -397
- package/mcp/providers/mimo.mjs +39 -69
- package/mcp/providers/opencode.mjs +30 -2
- package/mcp/version.mjs +26 -0
- package/package.json +3 -1
- package/preset/codebuddy-first/cli-bridge.mjs +12 -0
- package/preset/mimo-first/cli-bridge.mjs +32 -50
- package/providers/codebuddy-catalog.mjs +432 -0
- package/providers/codebuddy.mjs +641 -926
- package/providers/mimo.mjs +271 -517
- package/providers/opencode.mjs +31 -21
- package/scripts/build.mjs +23 -5
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// 构建(node scripts/build.mjs --only=mimo)把 core/bridge-kit.mjs 与
|
|
4
4
|
// providers/mimo.mjs 分别内联进下方两个占位标记行(各占一行、行内仅此标记),
|
|
5
5
|
// 生成 dynamic/mimo.host.js。注意:标记字面量绝不能出现在本注释里 —— 构建做全局
|
|
6
|
-
//
|
|
6
|
+
// 替换,注释中出现同样也会被替换成正文代码而炸掉语法。
|
|
7
7
|
// 沙箱纪律(旧仓 dynamic/host.js 头注 verbatim 精神):
|
|
8
8
|
// - 禁 import/require、无 TypeScript;无 AbortController/process 裸引用/Buffer/原生
|
|
9
9
|
// 定时器 —— process 只经 typeof 守卫探测;宿主能力全部来自注入的 harness.*/ctx。
|
|
@@ -12,14 +12,9 @@
|
|
|
12
12
|
// - 无 ctx.emit:状态经 ctx.get('cliBridgeCollector').mergeSnapshot('mimo', snap)
|
|
13
13
|
// 推给家级灯(旧 mimoCollector 服务名在 keystone 里保留别名);动态形态不宣告
|
|
14
14
|
// mode(旧语义:普通模式灯仅在调用 mimo 时临时显示)。
|
|
15
|
-
// - mimo-desktop 在沙箱的形态(契约 §9):无 fs 发现 desktop-api.json,且多数沙箱
|
|
16
|
-
// 无 fetch —— 描述符 preflight 直接 abort 为 DESKTOP_UNREACHABLE 并提示改用
|
|
17
|
-
// backend=mimocode(旧仓返回 DESKTOP_UNSUPPORTED 的替代;语义升级,Lead 定案)。
|
|
18
|
-
// 宿主若注入了 globalThis.fetch 且给出 MIMO_DESKTOP_PORT/MIMO_DESKTOP_TOKEN env,
|
|
19
|
-
// 委托 execute 仍可走通(fetch 路径全部 typeof 守卫)。
|
|
20
15
|
// - mimo_settings 在沙箱不持久化(无 nodeFs → 描述符回显语义;旧 dynamic echo 形态)。
|
|
21
|
-
// -
|
|
22
|
-
//
|
|
16
|
+
// - 单后端(本地 mimo CLI / MiMoCode):exe 解析走 agy 模板同款链路 ——
|
|
17
|
+
// MIMO_BIN/MIMO_CLI env > 已知安装位置 > subprocess.resolveExecutable(PATH)。
|
|
23
18
|
/*__KIT__*/
|
|
24
19
|
/*__PROVIDER__*/
|
|
25
20
|
/*__SCHED__*/
|
|
@@ -48,14 +43,16 @@ return {
|
|
|
48
43
|
} catch (e) { /* 灯数据尽力而为 */ }
|
|
49
44
|
}
|
|
50
45
|
|
|
51
|
-
// exe:MIMO_BIN/MIMO_CLI env > PATH 查找 mimo
|
|
52
|
-
//
|
|
46
|
+
// exe:MIMO_BIN/MIMO_CLI env > 已知安装位置 > PATH 查找 mimo
|
|
47
|
+
// (subprocess.resolveExecutable)。与 descriptor 的 resolveMimoExePrefix 同一套
|
|
48
|
+
// 优先级;.js/.mjs 目标经 process.execPath 包装(供测试 fixture 使用)。
|
|
53
49
|
async function resolveExe(backend, signal) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
if (
|
|
58
|
-
return
|
|
50
|
+
const prefix = resolveMimoExePrefix(env)
|
|
51
|
+
if (prefix.length && prefix[0]) {
|
|
52
|
+
const head = String(prefix[0])
|
|
53
|
+
if (prefix.length > 1) return prefix
|
|
54
|
+
if (/\.(mjs|cjs|js)$/i.test(head) && typeof process !== 'undefined' && process.execPath) return [process.execPath, head]
|
|
55
|
+
return head
|
|
59
56
|
}
|
|
60
57
|
return await subprocess.resolveExecutable('mimo', undefined, signal)
|
|
61
58
|
}
|
|
@@ -70,9 +67,22 @@ return {
|
|
|
70
67
|
return '.'
|
|
71
68
|
}
|
|
72
69
|
|
|
73
|
-
//
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
// 设置分区(descriptor 的 host.getSettings('mimo') 契约:直接返回分区对象
|
|
71
|
+
// { defaultModel } 或空对象)。每次调用重读统一设置文件 —— 面板改默认模型后
|
|
72
|
+
// 无需重启即生效;读不到(沙箱无 fs / 文件缺失)回落 {} = 不传 --model。
|
|
73
|
+
function getSettings() {
|
|
74
|
+
try {
|
|
75
|
+
const proc = (typeof process !== 'undefined') ? process : null
|
|
76
|
+
const nodeFs = (proc && typeof proc.getBuiltinModule === 'function') ? proc.getBuiltinModule('node:fs') : null
|
|
77
|
+
if (!nodeFs || typeof nodeFs.readFileSync !== 'function') return {}
|
|
78
|
+
const nodePath = (proc && typeof proc.getBuiltinModule === 'function') ? proc.getBuiltinModule('node:path') : null
|
|
79
|
+
const join = nodePath ? nodePath.join.bind(nodePath) : ((...p) => p.join('/'))
|
|
80
|
+
const file = env.CLI_BRIDGE_SETTINGS_FILE || (env.DSH_HOME ? join(env.DSH_HOME, 'cli-bridge-settings.json') : null)
|
|
81
|
+
if (!file) return {}
|
|
82
|
+
const all = JSON.parse(nodeFs.readFileSync(file, 'utf8'))
|
|
83
|
+
if (all && typeof all === 'object' && all.mimo && typeof all.mimo === 'object') return all.mimo
|
|
84
|
+
} catch (e) { /* 读不到:回落空分区(默认模型为空 → 不传 --model) */ }
|
|
85
|
+
return {}
|
|
76
86
|
}
|
|
77
87
|
|
|
78
88
|
function planActiveFor(exec) {
|
|
@@ -85,7 +95,7 @@ return {
|
|
|
85
95
|
return false
|
|
86
96
|
}
|
|
87
97
|
|
|
88
|
-
provider.attach({ ctx, subprocess, resolveExe, getCwdFallback,
|
|
98
|
+
provider.attach({ ctx, subprocess, resolveExe, getCwdFallback, getSettings, planActiveFor, publish })
|
|
89
99
|
|
|
90
100
|
const OUTPUT_SCHEMA = { type: 'object', additionalProperties: true }
|
|
91
101
|
|
|
@@ -126,13 +136,22 @@ return {
|
|
|
126
136
|
// 浏览器指示灯轮询的 RPC 面(旧 dynamic/handle('mimo_status') 语义)。
|
|
127
137
|
harness.handle('mimo_status', function () { return provider.statusToolLogic({}) })
|
|
128
138
|
|
|
129
|
-
//
|
|
139
|
+
// 提示词连续性(契约 §8):决策表 / 上下文协议 / 回退协议三段保留旧语义;后端段与
|
|
140
|
+
// 模型段随「去 desktop 化 + 模型手动指定」重写(免费 API 已终止 + mimo auth login)。
|
|
141
|
+
// 与 preset/mimo-first/cli-bridge.mjs 的 policy 段保持同文。
|
|
130
142
|
const policyText = [
|
|
131
|
-
'mimo-first execution policy (Xiaomi MiMo: MiMoCode CLI
|
|
143
|
+
'mimo-first execution policy (Xiaomi MiMo: MiMoCode CLI).',
|
|
144
|
+
'',
|
|
145
|
+
'Local `mimo` CLI (MiMoCode) handles coding tasks under full DSH control (--dangerously-skip-permissions, never prompts).',
|
|
132
146
|
'',
|
|
133
|
-
'
|
|
134
|
-
'-
|
|
135
|
-
'-
|
|
147
|
+
'Model:',
|
|
148
|
+
'- The model is chosen in the CLI Bridge settings panel (provider/model form, e.g. xiaomi/mimo-v2.6-flash) — this bridge does not pick one.',
|
|
149
|
+
'- Leave the setting empty to pass no --model, letting the mimo CLI use its own default. A per-call `model` argument overrides the setting for that call only.',
|
|
150
|
+
'- List available models with `mimo models` on this machine.',
|
|
151
|
+
'',
|
|
152
|
+
'Credentials:',
|
|
153
|
+
"- Xiaomi MiMo's free API service has ENDED. The user must run `mimo auth login` (or configure a third-party API) on this machine before dispatch works.",
|
|
154
|
+
'- If a run fails with sign-in / free-API-ended errors, tell the user to log in. Do not retry in a loop.',
|
|
136
155
|
'',
|
|
137
156
|
'By default, dispatch runs in the background and returns a jobId immediately; collect via job_output and watch live progress via mimo_status.',
|
|
138
157
|
'',
|
|
@@ -142,12 +161,6 @@ return {
|
|
|
142
161
|
'- Follow-ups on the same topic -> mimo_continue (with latest=true or sessionId; context is preserved).',
|
|
143
162
|
'- Final build/test verification of mimo output -> Native tools.',
|
|
144
163
|
'- Plan / read-only analysis -> mimo_run with mode=plan.',
|
|
145
|
-
'- Desktop-native work (Desktop session UI, shared Desktop login/model) -> prefer backend=mimo-desktop (or preselect it in settings).',
|
|
146
|
-
'',
|
|
147
|
-
'Backend preselection (settings):',
|
|
148
|
-
'- Default backend is configured OUT-OF-BAND (plugin config.backend / env MIMO_BRIDGE_BACKEND / settings file).',
|
|
149
|
-
'- Per-call `backend` argument overrides the default only when necessary.',
|
|
150
|
-
'- Do NOT invent a backend every call — use the preselected default.',
|
|
151
164
|
'',
|
|
152
165
|
'Context protocol (one topic = one mimo session):',
|
|
153
166
|
'- First dispatch on a topic: compact CONTEXT preamble (point to paths, do not paste file contents).',
|
package/dynamic/opencode.host.js
CHANGED
|
@@ -561,31 +561,22 @@ function createRunner(o) {
|
|
|
561
561
|
return { coreExecute, runSync, askFallback }
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
-
// providers/opencode.mjs — opencode provider descriptor(第四家 CLI
|
|
564
|
+
// providers/opencode.mjs — opencode provider descriptor(第四家 CLI,无旧包可迁)。
|
|
565
565
|
//
|
|
566
|
-
//
|
|
567
|
-
//
|
|
568
|
-
//
|
|
569
|
-
//
|
|
570
|
-
//
|
|
571
|
-
//
|
|
572
|
-
//
|
|
573
|
-
//
|
|
574
|
-
// -m, --model provider/model V2 支持 provider/model#variant
|
|
575
|
-
// --session <id> / --continue 会话续接(无 `opencode continue` 子命令)
|
|
576
|
-
// --agent / --title / --file / --thinking / --standalone
|
|
577
|
-
// ⚠️ V2 无 --dir(V1 有)→ cwd 只能靠 spawn 的工作目录
|
|
578
|
-
// ⚠️ V2 无 --variant(V1 有)→ variant 并入 --model 的 # 后缀
|
|
579
|
-
// 退出码:0 成功 / 1 错误 / 130 SIGINT(退出码才是成败判据)
|
|
580
|
-
// 事件 type(源码全集):step_start / text / reasoning / tool_use / step_finish / error
|
|
581
|
-
// ⚠️ 不存在 result/complete/init 事件
|
|
582
|
-
// ⚠️ 文本在 part.text;统计在 step_finish.part(cost/tokens)——两者是不同事件
|
|
566
|
+
// 基线 = 本机实测 OpenCode V2 CLI v2.0.29(桌面版自带 opencode-cli.exe)+ 源码 emit 全集。
|
|
567
|
+
// 完整 CLI 事实表见 docs/HANDOVER.md §13;这里只留写代码时最容易踩的几条:
|
|
568
|
+
// • 非交互 = `opencode run "<prompt>"`,prompt 是【位置参数】(run 子命令无 --prompt;
|
|
569
|
+
// `-p` 是 --password)。`--format json` → NDJSON。`--auto` = 自动批准权限。
|
|
570
|
+
// • ⚠️ V2 无 --dir(cwd 靠 spawn)、无 --variant(并入 --model#variant)。
|
|
571
|
+
// • 退出码才是成败判据:0 成功 / 1 错误 / 130 SIGINT。
|
|
572
|
+
// • ⚠️ 无 result/complete/init 事件;type 全集 = step_start/text/reasoning/tool_use/
|
|
573
|
+
// step_finish/error。文本在 part.text,统计在 step_finish.part —— 两者是不同事件。
|
|
583
574
|
//
|
|
584
575
|
// 红线(PROVIDER-CONTRACT.md §8 + §1):
|
|
585
576
|
// - 本文件会被 build 内联进 dynamic 沙箱(new Function):绝不出现 import.meta 字面量;
|
|
586
577
|
// process 只经 deps 注入或 typeof 守卫读取;宿主能力全部走 deps/attach(hostOpts)。
|
|
587
578
|
// - 只允许 import '../core/bridge-kit.mjs'。
|
|
588
|
-
|
|
579
|
+
// import { createStatusEngine, createRunner, clampInt, isLimited } from '../core/bridge-kit.mjs'
|
|
589
580
|
function nowIso() { return new Date().toISOString() }
|
|
590
581
|
|
|
591
582
|
// ── 可执行文件解析(env > 桌面版已知路径 > PATH)───────────────────────────────
|
|
@@ -771,16 +762,35 @@ function defineProvider (deps = {}) {
|
|
|
771
762
|
let settingsRef = { binPath: '', defaultModel: '', defaultAgent: '' }
|
|
772
763
|
|
|
773
764
|
/**
|
|
774
|
-
*
|
|
765
|
+
* 取当前生效的偏好设置。三条来源按优先级合并,每次 buildArgv 都重新读 ——
|
|
766
|
+
* 面板改默认模型后无需重启即生效:
|
|
767
|
+
* 1) `host.getSettings('opencode')` —— preset/dynamic 形态(attach 时由宿主注入);
|
|
768
|
+
* 2) `deps.readSettings()` —— MCP 形态(真 Node 进程,每次现读设置文件);
|
|
769
|
+
* 3) `settingsRef` —— attach 时固化的一次性快照 / 缺省值。
|
|
770
|
+
* 三条都拿不到 → 缺省空值(= 不传 --model,交给 opencode 自身配置决定)。
|
|
771
|
+
*
|
|
772
|
+
* 历史坑:MCP 形态不 attach(自建 engine),只认 host.getSettings 会让面板设置的
|
|
773
|
+
* defaultModel 在 MCP 面对 opencode_run 完全失效 —— 只有 args.model 才落地。
|
|
774
|
+
* 三个形态行为不一致是缺陷,故此处统一把 readSettings 纳入(与 mimo 同构)。
|
|
775
775
|
*/
|
|
776
776
|
function currentSettings() {
|
|
777
|
+
const out = Object.assign({}, settingsRef)
|
|
778
|
+
try {
|
|
779
|
+
if (typeof deps.readSettings === 'function') {
|
|
780
|
+
const r = deps.readSettings()
|
|
781
|
+
if (r && typeof r === 'object') {
|
|
782
|
+
const part = ('partition' in r || 'path' in r || 'home' in r) ? r.partition : r
|
|
783
|
+
if (part && typeof part === 'object') Object.assign(out, part)
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
} catch (e) { }
|
|
777
787
|
try {
|
|
778
788
|
if (host && typeof host.getSettings === 'function') {
|
|
779
789
|
const s = host.getSettings('opencode')
|
|
780
|
-
if (s && typeof s === 'object')
|
|
790
|
+
if (s && typeof s === 'object') Object.assign(out, s)
|
|
781
791
|
}
|
|
782
792
|
} catch (e) { }
|
|
783
|
-
return
|
|
793
|
+
return out
|
|
784
794
|
}
|
|
785
795
|
|
|
786
796
|
const descriptor = {
|
|
@@ -30,7 +30,17 @@ import { settingsView, parseSettingsBody, readSettingsFile, writeSettingsFile, S
|
|
|
30
30
|
import { declareBridgePresets } from './preset-declarations.mjs'
|
|
31
31
|
|
|
32
32
|
export const PRESET_TTL_MS = 75000
|
|
33
|
+
/** 运行中/仍在活动的项目的新鲜期(防抖:短暂停顿不该让灯闪)。 */
|
|
33
34
|
export const PROJECT_TTL_MS = 10 * 60 * 1000
|
|
35
|
+
/**
|
|
36
|
+
* 已完成(running=0 且已有 lastStatus)项目的新鲜期。
|
|
37
|
+
*
|
|
38
|
+
* 0.2.1 用单一 10 分钟 TTL 修「一次失败后灯永久挂着」—— 但 10 分钟对于「刚跑完、
|
|
39
|
+
* 想看到灯灭」来说太长:任务结束后灯要挂满 10 分钟才消失,用户感知是「灯不灭」。
|
|
40
|
+
* 区分两态:运行中(含短暂间隔)保持长 TTL 防抖;已收口的项目走短 TTL 快速淡出。
|
|
41
|
+
* 淡出只影响 pill 渲染(stale 项目仍在弹窗里作历史),不丢数据。
|
|
42
|
+
*/
|
|
43
|
+
export const PROJECT_DONE_TTL_MS = 60 * 1000
|
|
34
44
|
export const MAX_PROJECTS = 24
|
|
35
45
|
export const MAX_SESSIONS = 64
|
|
36
46
|
|
|
@@ -50,6 +60,11 @@ export function createIndicatorState(opts) {
|
|
|
50
60
|
const now = typeof o.now === 'function' ? o.now : Date.now
|
|
51
61
|
const ttlMs = o.ttlMs != null ? o.ttlMs : PRESET_TTL_MS
|
|
52
62
|
const projectTtlMs = o.projectTtlMs != null ? o.projectTtlMs : PROJECT_TTL_MS
|
|
63
|
+
// doneTtlMs 缺省跟随 projectTtlMs(显式传 projectTtlMs 的测试/调用方同时支配两态,
|
|
64
|
+
// 否则「传短 TTL 却不生效」会静默坑人);只有走生产默认值时才取更短的
|
|
65
|
+
// PROJECT_DONE_TTL_MS(已完成项目快速淡出)。
|
|
66
|
+
const doneTtlMs = o.doneTtlMs != null ? o.doneTtlMs
|
|
67
|
+
: (o.projectTtlMs != null ? projectTtlMs : PROJECT_DONE_TTL_MS)
|
|
53
68
|
const staleMs = o.staleMs != null ? o.staleMs : MCP_BRIDGE_STALE_MS
|
|
54
69
|
const ids = Array.isArray(o.ids) && o.ids.length ? o.ids.slice() : PROVIDER_IDS.slice()
|
|
55
70
|
const listPresetSessions = typeof o.listPresetSessions === 'function' ? o.listPresetSessions : null
|
|
@@ -183,7 +198,11 @@ export function createIndicatorState(opts) {
|
|
|
183
198
|
const isStale = (p) => {
|
|
184
199
|
if (p.running > 0) return false
|
|
185
200
|
const at = Number(p.updatedAt) || Number(p.lastAt) || 0
|
|
186
|
-
|
|
201
|
+
if (!at) return false
|
|
202
|
+
// 已收口(有终态)的项目走短 TTL → 完成后快速淡出;
|
|
203
|
+
// 仍无终态的(长时间运行中的间隔、或从未跑完)保持长 TTL 防抖。
|
|
204
|
+
const ttl = p.lastStatus ? doneTtlMs : projectTtlMs
|
|
205
|
+
return (t - at) > ttl
|
|
187
206
|
}
|
|
188
207
|
// 顶层聚合只看新鲜(未 stale)项目:陈旧历史不再决定灯色(0.2.1 修复「指示灯长期
|
|
189
208
|
// 存在」的服务端半边 —— 客户端半边在 pill 过滤;无新鲜项目时顶层回落 idle)。
|
|
@@ -67,28 +67,25 @@ export async function buildPresetDefinition(id) {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
|
-
* 在 indicator 的 ctx 上挂「agentPresets 就绪 →
|
|
70
|
+
* 在 indicator 的 ctx 上挂「agentPresets 就绪 → 注册启用面的 preset」等待器。
|
|
71
71
|
* 返回每个 provider 的注册状态数组(诊断用);任何异常都不外抛。
|
|
72
72
|
*
|
|
73
|
-
* 调度语义(0.2.
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
73
|
+
* 调度语义(0.2.5 起按 enabled 过滤注册,用户定案):
|
|
74
|
+
* 只注册**启用面**的 preset —— 未启用的 provider 不出现在预设目录里。
|
|
75
|
+
* 0.2.0 曾是「恒常注册、禁用只影响 apply()」,但用户明确要求:停用的 CLI 不该在
|
|
76
|
+
* 预设列表里占位(选中它等于立刻撞到一个零注册的桥,纯噪音)。
|
|
77
|
+
* 代价:停用后旧会话头若仍指向该 preset,进入该会话会找不到预设 —— 这是停用的
|
|
78
|
+
* 应有语义;重新启用即恢复(注册表在宿主启动时重建)。
|
|
79
|
+
* opts.ids 显式传入时跳过调度过滤与排序(测试/手工可控)。
|
|
77
80
|
*/
|
|
78
81
|
export function declareBridgePresets(ctx, opts) {
|
|
79
82
|
let ids = (opts && opts.ids) || PROVIDER_IDS_FALLBACK
|
|
80
83
|
if (!opts || !opts.ids) {
|
|
81
84
|
try {
|
|
82
85
|
const sched = resolveScheduling(PROVIDER_IDS_FALLBACK, opts && opts.io)
|
|
83
|
-
//
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const tail = sched.priority.filter((x) => sched.order.indexOf(x) < 0)
|
|
87
|
-
const ordered = sched.order.slice()
|
|
88
|
-
for (const id of tail) ordered.push(id)
|
|
89
|
-
for (const id of PROVIDER_IDS_FALLBACK) if (ordered.indexOf(id) < 0) ordered.push(id)
|
|
90
|
-
ids = ordered
|
|
91
|
-
} catch (e) { /* 调度不可得 = 缺省顺序,注册不受影响 */ }
|
|
86
|
+
// 只取 order(= priority ∩ enabled),不再补禁用项到尾部。
|
|
87
|
+
ids = sched.order.slice()
|
|
88
|
+
} catch (e) { /* 调度不可得 = 缺省全量注册,绝不因读不到配置而清空预设 */ }
|
|
92
89
|
}
|
|
93
90
|
const out = []
|
|
94
91
|
if (typeof ctx.inject !== 'function') return out
|
package/mcp/cli-bridge-mcp.mjs
CHANGED
|
@@ -31,7 +31,7 @@ import * as mimoMcp from './providers/mimo.mjs'
|
|
|
31
31
|
import * as opencodeMcp from './providers/opencode.mjs'
|
|
32
32
|
|
|
33
33
|
const SERVER_NAME = 'cli-bridge-mcp'
|
|
34
|
-
const SERVER_VERSION = '0.2.
|
|
34
|
+
const SERVER_VERSION = '0.2.5'
|
|
35
35
|
const PROTOCOL = '2024-11-05'
|
|
36
36
|
|
|
37
37
|
const PROVIDERS = [agyMcp, codebuddyMcp, mimoMcp, opencodeMcp]
|
package/mcp/providers/agy.mjs
CHANGED
|
@@ -18,8 +18,9 @@ import { fileURLToPath } from 'node:url'
|
|
|
18
18
|
|
|
19
19
|
import defineProvider from '../../providers/agy.mjs'
|
|
20
20
|
import { createStatusEngine, createLineStream, buildMcpBridgePayload, isLimited, renderStatus } from '../../core/bridge-kit.mjs'
|
|
21
|
+
import { packageVersion } from '../version.mjs'
|
|
21
22
|
|
|
22
|
-
export const meta = { id: 'agy', label: 'AGY', version:
|
|
23
|
+
export const meta = { id: 'agy', label: 'AGY', version: packageVersion() }
|
|
23
24
|
|
|
24
25
|
const QUOTA_SCRIPT_DEFAULT = fileURLToPath(new URL('../../bin/agy-quota.mjs', import.meta.url))
|
|
25
26
|
|