@luchenglong/cli-bridge 0.0.0-stage → 0.2.3
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 +191 -0
- package/LICENSE +21 -0
- package/MCP-POLICY.md +53 -0
- package/PROVIDER-CONTRACT.md +235 -0
- package/README.en.md +98 -0
- package/README.md +151 -2
- package/assets/indicator-states.svg +62 -0
- package/bin/agy-quota.mjs +223 -0
- package/core/bridge-kit.mjs +549 -0
- package/core/scheduling.mjs +149 -0
- package/docs/ARCHITECTURE.md +117 -0
- package/docs/FALLBACK-AND-INDICATOR.md +93 -0
- package/docs/HANDOVER.md +226 -0
- package/docs/INSTALL.md +118 -0
- package/docs/MCP-POLICY.zh.md +49 -0
- package/docs/MIGRATION.md +43 -0
- package/docs/RELEASE-SOP.md +80 -0
- package/docs/history/agy/CHANGELOG.md +326 -0
- package/docs/history/codebuddy/CHANGELOG.md +668 -0
- package/docs/history/mimo/CHANGELOG.md +346 -0
- package/dynamic/agy.host.js +1237 -0
- package/dynamic/agy.host.template.mjs +140 -0
- package/dynamic/codebuddy.host.js +1787 -0
- package/dynamic/codebuddy.host.template.mjs +162 -0
- package/dynamic/mimo.host.js +1732 -0
- package/dynamic/mimo.host.template.mjs +169 -0
- package/dynamic/opencode.host.js +1443 -0
- package/dynamic/opencode.host.template.mjs +125 -0
- package/home-plugin/cli-bridge-indicator/cordis.patch.yml +31 -0
- package/home-plugin/cli-bridge-indicator/lib/client.js +606 -0
- package/home-plugin/cli-bridge-indicator/lib/index.mjs +420 -0
- package/home-plugin/cli-bridge-indicator/lib/preset-declarations.mjs +137 -0
- package/home-plugin/cli-bridge-indicator/lib/settings.mjs +300 -0
- package/mcp/agy-mcp-server.mjs +6 -0
- package/mcp/cli-bridge-mcp.mjs +185 -0
- package/mcp/codebuddy-mcp-server.mjs +6 -0
- package/mcp/mimo-mcp-server.mjs +6 -0
- package/mcp/providers/agy.mjs +254 -0
- package/mcp/providers/codebuddy.mjs +397 -0
- package/mcp/providers/mimo.mjs +290 -0
- package/mcp/providers/opencode.mjs +236 -0
- package/package.json +89 -4
- package/preset/agy-first/agent.cordis.yml +141 -0
- package/preset/agy-first/cli-bridge.mjs +169 -0
- package/preset/agy-first/plugin-list.mjs +26 -0
- package/preset/agy-first/preset.yml +3 -0
- package/preset/codebuddy-first/agent.cordis.yml +141 -0
- package/preset/codebuddy-first/cli-bridge.mjs +188 -0
- package/preset/codebuddy-first/plugin-list.mjs +20 -0
- package/preset/codebuddy-first/preset.yml +3 -0
- package/preset/mimo-first/agent.cordis.yml +143 -0
- package/preset/mimo-first/cli-bridge.mjs +236 -0
- package/preset/mimo-first/plugin-list.mjs +39 -0
- package/preset/mimo-first/preset.yml +3 -0
- package/preset/opencode-first/agent.cordis.yml +141 -0
- package/preset/opencode-first/cli-bridge.mjs +147 -0
- package/preset/opencode-first/plugin-list.mjs +26 -0
- package/preset/opencode-first/preset.yml +3 -0
- package/preset/standard-base.mjs +102 -0
- package/providers/agy.mjs +398 -0
- package/providers/codebuddy.mjs +926 -0
- package/providers/mimo.mjs +864 -0
- package/providers/opencode.mjs +619 -0
- package/providers/registry.mjs +39 -0
- package/scripts/build.mjs +235 -0
- package/scripts/deploy.mjs +61 -0
- package/scripts/verify.mjs +148 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// preset/opencode-first/cli-bridge.mjs — opencode-first preset 的桥接插件(preset 宿主形态)。
|
|
2
|
+
//
|
|
3
|
+
// PROVIDER-CONTRACT.md §5:本模块只做「宿主接线」——构造描述符、attach、注册三工具、
|
|
4
|
+
// 心跳/事件发布、opencode:policy 提示词段。全部执行/状态语义在
|
|
5
|
+
// providers/opencode.mjs + core/bridge-kit.mjs。
|
|
6
|
+
//
|
|
7
|
+
// preset id 'opencode-first' 由 plugin-list.mjs 单源声明。
|
|
8
|
+
//
|
|
9
|
+
// 本模块是宿主进程内真 ESM:可 import node: 内建与包内相对路径;禁止 import
|
|
10
|
+
// @deepseek-ai/*(解析根够不到 harness 包,历史论证 —— 契约 §8)。
|
|
11
|
+
import { existsSync } from 'node:fs'
|
|
12
|
+
|
|
13
|
+
import defineProvider, { resolveExePrefix } from '../../providers/opencode.mjs'
|
|
14
|
+
import { renderResult, renderStatus } from '../../core/bridge-kit.mjs'
|
|
15
|
+
import { isBridgeEnabled } from '../../core/scheduling.mjs'
|
|
16
|
+
import { PROVIDER_IDS } from '../../providers/registry.mjs'
|
|
17
|
+
|
|
18
|
+
export const name = 'cli-bridge-opencode'
|
|
19
|
+
export const inject = ['tools', 'subprocess', 'systemPrompt', 'timer']
|
|
20
|
+
|
|
21
|
+
const OUTPUT_SCHEMA = { type: 'object', additionalProperties: true }
|
|
22
|
+
|
|
23
|
+
export function apply(ctx) {
|
|
24
|
+
// 调度门禁(0.2.0):用户在设置面板关掉 opencode → 本形态不注册任何工具/政策段/心跳。
|
|
25
|
+
// 每次会话装配时现读文件(改设置下次会话即生效,无需重启宿主);fail-open。
|
|
26
|
+
if (!isBridgeEnabled('opencode', PROVIDER_IDS)) return
|
|
27
|
+
const subprocess = ctx.subprocess
|
|
28
|
+
const sandboxPolicy = ctx.get('sandboxPolicy')
|
|
29
|
+
|
|
30
|
+
const provider = defineProvider({ process, env: process.env })
|
|
31
|
+
|
|
32
|
+
// 状态快照 → 家级灯(keystone 听 'opencode/status',事件是 app 级广播)。
|
|
33
|
+
function publish(snapshot) {
|
|
34
|
+
try { ctx.emit('opencode/status', { snapshot }) } catch (e) { /* ignore */ }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// cwd 兜底:显式 cwd 参数 > env OPENCODE_MCP_CWD > 沙箱 workspaceRoot > process.cwd()。
|
|
38
|
+
function getCwdFallback() {
|
|
39
|
+
if (process.env.OPENCODE_MCP_CWD) return String(process.env.OPENCODE_MCP_CWD)
|
|
40
|
+
if (sandboxPolicy && typeof sandboxPolicy.workspaceRoot === 'string' && sandboxPolicy.workspaceRoot) return sandboxPolicy.workspaceRoot
|
|
41
|
+
return process.cwd()
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// exe 解析优先级(与描述符 resolveExePrefix 同一套):
|
|
45
|
+
// 面板 binPath(getSettings)> env OPENCODE_BIN/OPENCODE_CLI > 桌面版 V2 探测 > PATH。
|
|
46
|
+
// 二进制名 opencode-cli(V2 桌面版),不做 opencode.exe 兜底(V1/V2 不能并存)。
|
|
47
|
+
// .js/.mjs 目标经 process.execPath 包装(返回数组前缀,buildArgv 接受)。
|
|
48
|
+
const binPathSetting = (() => {
|
|
49
|
+
try {
|
|
50
|
+
const s = ctx.get && ctx.get('cliBridgeSettings')
|
|
51
|
+
const v = s && s.opencode ? s.opencode.binPath : ''
|
|
52
|
+
return typeof v === 'string' ? v : ''
|
|
53
|
+
} catch (e) { return '' }
|
|
54
|
+
})()
|
|
55
|
+
const candidates = resolveExePrefix(process.env, binPathSetting)
|
|
56
|
+
|
|
57
|
+
async function resolveExe(backend, signal) {
|
|
58
|
+
for (const c of candidates) {
|
|
59
|
+
if (/\.(mjs|cjs|js)$/i.test(c)) return [process.execPath, c]
|
|
60
|
+
// 绝对路径/已存在的文件直接用(桌面版探测结果)。
|
|
61
|
+
try { if (existsSync(c)) return c } catch (e) { }
|
|
62
|
+
}
|
|
63
|
+
return await subprocess.resolveExecutable('opencode-cli', undefined, signal)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
provider.attach({ ctx, subprocess, resolveExe, getCwdFallback, publish })
|
|
67
|
+
|
|
68
|
+
// 宣告 opencode 优先模式:家级灯据此决定常驻显示(presetActive)。挂载即宣告 +
|
|
69
|
+
// 每 30s 心跳续租(TTL 75s,契约 §2)。
|
|
70
|
+
function announceMode() {
|
|
71
|
+
try {
|
|
72
|
+
const sid = (ctx.session && ctx.session.id) || ctx.sessionId || null
|
|
73
|
+
ctx.emit('opencode/mode', sid ? { active: true, sessionId: sid } : { active: true })
|
|
74
|
+
} catch (e) { /* ignore */ }
|
|
75
|
+
}
|
|
76
|
+
announceMode()
|
|
77
|
+
try { const t = ctx.setInterval ? ctx.setInterval(announceMode, 30000) : null; if (t && ctx.effect) ctx.effect(() => () => { try { t() } catch (e) {} }) } catch (e) {}
|
|
78
|
+
|
|
79
|
+
// ── 工具注册(执行进描述符三逻辑)────────────────────────────────────────────
|
|
80
|
+
ctx.effect(() => ctx.tools.register({
|
|
81
|
+
name: provider.tools.run.name,
|
|
82
|
+
description: provider.tools.run.description,
|
|
83
|
+
parameters: provider.tools.run.inputSchema,
|
|
84
|
+
output: { schema: OUTPUT_SCHEMA, render: (args, value) => renderResult(value, provider) },
|
|
85
|
+
execute: (args, exec) => provider.runToolLogic(args, exec)
|
|
86
|
+
}))
|
|
87
|
+
ctx.effect(() => ctx.tools.register({
|
|
88
|
+
name: provider.tools.continue.name,
|
|
89
|
+
description: provider.tools.continue.description,
|
|
90
|
+
parameters: provider.tools.continue.inputSchema,
|
|
91
|
+
output: { schema: OUTPUT_SCHEMA, render: (args, value) => renderResult(value, provider) },
|
|
92
|
+
execute: (args, exec) => provider.continueToolLogic(args, exec)
|
|
93
|
+
}))
|
|
94
|
+
ctx.effect(() => ctx.tools.register({
|
|
95
|
+
name: provider.tools.status.name,
|
|
96
|
+
description: provider.tools.status.description,
|
|
97
|
+
parameters: provider.tools.status.inputSchema,
|
|
98
|
+
output: { schema: OUTPUT_SCHEMA, render: (args, value) => renderStatus(value, provider) },
|
|
99
|
+
execute: (args) => provider.statusToolLogic(args)
|
|
100
|
+
}))
|
|
101
|
+
for (const et of provider.extraTools || []) {
|
|
102
|
+
ctx.effect(() => ctx.tools.register({
|
|
103
|
+
name: et.name,
|
|
104
|
+
description: et.description,
|
|
105
|
+
parameters: et.inputSchema,
|
|
106
|
+
output: { schema: OUTPUT_SCHEMA, render: et.render || ((args, value) => renderResult(value, provider)) },
|
|
107
|
+
execute: (args, exec) => et.logic(args, exec)
|
|
108
|
+
}))
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// policy 段(新 provider 无旧文案可 verbatim 继承;按实测 CLI 能力撰写)。
|
|
112
|
+
const policyText = [
|
|
113
|
+
'opencode-first execution policy (local opencode CLI bridge).',
|
|
114
|
+
'',
|
|
115
|
+
'Local agent CLI "opencode" handles coding tasks under full DSH control (permissions auto-approved, never blocks on a prompt). By default, opencode runs in the background and returns a jobId immediately; collect results via job_output and watch live progress via opencode_status anytime.',
|
|
116
|
+
'',
|
|
117
|
+
'Decision table for tool selection:',
|
|
118
|
+
'- Single read/glob/grep or short (<30s) command -> Native tools.',
|
|
119
|
+
'- Implementing, editing, refactoring, debugging, builds, multi-file investigation -> opencode_run.',
|
|
120
|
+
'- Follow-ups on the same topic -> opencode_continue (with latest=true or sessionId; opencode preserves session context).',
|
|
121
|
+
'- Final build/test verification of opencode output -> Native tools.',
|
|
122
|
+
'',
|
|
123
|
+
'Context protocol (one topic = one opencode session):',
|
|
124
|
+
'- First dispatch on a topic: provide the task with a compact CONTEXT preamble (point to paths, do not paste file contents):',
|
|
125
|
+
' CONTEXT: 2-6 lines — goal; repo root; key paths; decisions/constraints; current state.',
|
|
126
|
+
' TASK: the complete instruction.',
|
|
127
|
+
'- Follow-ups: call opencode_continue and state only what is new.',
|
|
128
|
+
'',
|
|
129
|
+
'Execution & Fallback protocol:',
|
|
130
|
+
'- Dispatch defaults to background=true (set background=false only to block). Collect via job_output.',
|
|
131
|
+
'- On rate-limit or network failure, a confirmation dialog opens in BOTH foreground and background while in flight.',
|
|
132
|
+
'- If result has fallback=true (status FALLBACK_TO_DSH), the user chose DSH-local: finish with native tools and NEVER call opencode again for this task.',
|
|
133
|
+
'- Never loop opencode calls; never ask opencode to call back into DSH.',
|
|
134
|
+
'',
|
|
135
|
+
'Model & credentials:',
|
|
136
|
+
'- Prefer a free model for routine work: call opencode_models (or pass a model id ending in -free, e.g. "opencode/nemotron-3-ultra-free") unless this task genuinely needs a frontier model. Free models are listed first by opencode_models.',
|
|
137
|
+
'- Omit the model unless you have a reason: opencode then uses its own configured default (or the one chosen in CLI Bridge settings). Pass model in provider/model form to override.',
|
|
138
|
+
'- Credentials are owned by opencode, not by this bridge: if a run fails for auth/API-key reasons, tell the user to run `opencode auth login`. Do not retry in a loop.',
|
|
139
|
+
'- An unknown provider/model surfaces as a run failure, not a silent fallback — use opencode_models to check availability first.'
|
|
140
|
+
].join('\n')
|
|
141
|
+
|
|
142
|
+
ctx.effect(() => ctx.systemPrompt.section({
|
|
143
|
+
name: 'opencode:policy',
|
|
144
|
+
order: (typeof ctx.systemPrompt.getSectionOrder === 'function' ? ctx.systemPrompt.getSectionOrder('TOOL_SUBAGENT') : 2800) + 10,
|
|
145
|
+
text: policyText
|
|
146
|
+
}))
|
|
147
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// preset/opencode-first/plugin-list.mjs — opencode-first 预设的单源插件清单(PROVIDER-CONTRACT §5)。
|
|
2
|
+
//
|
|
3
|
+
// = 官方 standard 基线(standard-base.mjs)+ opencode 桥接行 + persona 差异。
|
|
4
|
+
// preset id 'opencode-first':本包新增的第四家 CLI,无旧包兼容包袱,故 id 直接用
|
|
5
|
+
// provider id + '-first'(与 codebuddy-first 同构;agy/mimo 的 cordis-* 前缀是旧包
|
|
6
|
+
// 历史遗留,不可套用到新 provider 上)。
|
|
7
|
+
import { standardPluginRows, bridgeRow } from '../standard-base.mjs'
|
|
8
|
+
|
|
9
|
+
export const meta = {
|
|
10
|
+
id: 'opencode-first',
|
|
11
|
+
name: 'OpenCode 执行代理',
|
|
12
|
+
description: '完整编码 Agent(standard 全部能力),额外提供 opencode_run/opencode_continue 工具并注入"opencode 优先"策略:各种模式下先把实现、编辑、调试、构建、跨文件排查派给本机 opencode CLI(DSH 完全控制、opencode 无提示改文件、默认后台执行),原生工具仅用于只读查询与最终验证。',
|
|
13
|
+
order: 40
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function buildPlugins(deps) {
|
|
17
|
+
const rows = standardPluginRows()
|
|
18
|
+
// persona 段:与三家旧 preset 同构(dsh-persona 要求 prefix 必填 + suffix 可选)。
|
|
19
|
+
const persona = rows.find((r) => r.id === 'persona')
|
|
20
|
+
if (persona && persona.config) {
|
|
21
|
+
persona.config.prefix = 'You are a coding agent powered by the {{model}} model.'
|
|
22
|
+
persona.config.suffix = 'Your working directory is {{cwd}}.'
|
|
23
|
+
}
|
|
24
|
+
rows.push(bridgeRow('opencode', deps && deps.bridgeName))
|
|
25
|
+
return rows
|
|
26
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// preset/standard-base.mjs — 官方 standard preset 的忠实移植基线(keystone 单源)。
|
|
2
|
+
//
|
|
3
|
+
// 三个 cli-bridge preset(cordis-agy / codebuddy-first / cordis-mimo)都 = 本基线 +
|
|
4
|
+
// 各自桥接行 + 各自的 persona/门禁差异。基线内容对齐官方 dsh-web-app
|
|
5
|
+
// presets/standard.patch.yml(0.1.7-rc.1):行序、id、config 逐项一致(上游改版后由
|
|
6
|
+
// test/preset-declaration.test.mjs 与已安装 standard.patch.yml 逐行比对防漂移)。
|
|
7
|
+
//
|
|
8
|
+
// `!!js` 表达式的 JS 字面量等价物是 { __jsExpr: "…" } —— 这是 loader interpolate 的
|
|
9
|
+
// 原生输入形态(agentPresets.register 直接接受,见 codebuddy-first v1.2.0 实测),
|
|
10
|
+
// **不要**把它编译成真函数。
|
|
11
|
+
|
|
12
|
+
/** YAML `!!js expr` 的 JS 字面量等价物(loader interpolate 的原生输入形态)。 */
|
|
13
|
+
export function jsExpr(expr) {
|
|
14
|
+
return { __jsExpr: String(expr) }
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// 官方 standard preset 的 plan-mode 段全文(0.1.7-rc.1,块标量内容,段间双换行)。
|
|
18
|
+
export const PLAN_MODE_SECTION = [
|
|
19
|
+
'You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user\'s conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.',
|
|
20
|
+
'Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.',
|
|
21
|
+
'The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.',
|
|
22
|
+
'Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.',
|
|
23
|
+
'Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.',
|
|
24
|
+
'When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.',
|
|
25
|
+
].join('\n\n') + '\n'
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 官方 standard preset 的插件行表(不含 persona 差异与桥接行)。
|
|
29
|
+
* persona 行返回【副本】供 provider 修改 prefix/suffix;其余行按原样返回。
|
|
30
|
+
* @returns {object[]}
|
|
31
|
+
*/
|
|
32
|
+
export function standardPluginRows() {
|
|
33
|
+
return [
|
|
34
|
+
{ id: 'persona', name: '@deepseek-ai/dsh-persona', config: {
|
|
35
|
+
suffix: 'Your working directory is {{cwd}}.',
|
|
36
|
+
prefix: 'You are a coding agent powered by the {{model}} model.',
|
|
37
|
+
} },
|
|
38
|
+
{ id: 'agent-instructions', name: '@deepseek-ai/dsh-agent-instructions', config: { maxBytes: 65536 } },
|
|
39
|
+
{ id: 'tool-bash', name: '@deepseek-ai/dsh-tool-bash', disabled: jsExpr("process.platform === 'win32'") },
|
|
40
|
+
{ id: 'tool-pwsh', name: '@deepseek-ai/dsh-tool-pwsh', disabled: jsExpr("process.platform !== 'win32'") },
|
|
41
|
+
{ id: 'tool-fs', name: '@deepseek-ai/dsh-tool-fs' },
|
|
42
|
+
{ id: 'tool-fs-search', name: '@deepseek-ai/dsh-tool-fs-search', config: { sampleOverCapGlobResults: false } },
|
|
43
|
+
{ id: 'tool-jobs', name: '@deepseek-ai/dsh-tool-jobs' },
|
|
44
|
+
{ id: 'skill-filesystem', name: '@deepseek-ai/dsh-skill-filesystem' },
|
|
45
|
+
{ id: 'tool-skill', name: '@deepseek-ai/dsh-tool-skill' },
|
|
46
|
+
{ id: 'command-goal', name: '@deepseek-ai/dsh-command-goal' },
|
|
47
|
+
{ id: 'tool-goal', name: '@deepseek-ai/dsh-tool-goal' },
|
|
48
|
+
{
|
|
49
|
+
id: 'planning', name: 'cordis:group', group: true,
|
|
50
|
+
isolate: { planMode: true },
|
|
51
|
+
config: [
|
|
52
|
+
{ id: 'plan-mode', name: '@deepseek-ai/dsh-plan-mode', config: { section: PLAN_MODE_SECTION } },
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 'compaction', name: 'cordis:group', group: true,
|
|
57
|
+
isolate: { compaction: true, toolResultPruner: true },
|
|
58
|
+
config: [
|
|
59
|
+
{ id: 'compaction-basic', name: '@deepseek-ai/dsh-compaction-basic' },
|
|
60
|
+
{ id: 'command-compact', name: '@deepseek-ai/dsh-command-compact' },
|
|
61
|
+
{ id: 'tool-result-pruner', name: '@deepseek-ai/dsh-compaction-tool-result-pruner', config: {
|
|
62
|
+
thresholdChars: 8192, headChars: 4096, tailChars: 1024,
|
|
63
|
+
} },
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: 'delegation', name: 'cordis:group', group: true,
|
|
68
|
+
isolate: { workflowEngine: true },
|
|
69
|
+
config: [
|
|
70
|
+
{ id: 'tool-subagent-control', name: '@deepseek-ai/dsh-tool-subagent-control' },
|
|
71
|
+
{ id: 'tool-subagent-list-agents', name: '@deepseek-ai/dsh-tool-subagent-control/list-agents' },
|
|
72
|
+
{ id: 'tool-subagent', name: '@deepseek-ai/dsh-tool-subagent', config: {
|
|
73
|
+
provider: 'spawn', toolName: 'subagent', modelSelectionSettings: true, backgroundMode: 'continuable',
|
|
74
|
+
} },
|
|
75
|
+
{ id: 'tool-subagent-fork', name: '@deepseek-ai/dsh-tool-subagent', config: {
|
|
76
|
+
provider: 'fork', toolName: 'subagent_fork', backgroundMode: 'continuable',
|
|
77
|
+
} },
|
|
78
|
+
{ id: 'tool-subagent-codex', name: '@deepseek-ai/dsh-tool-subagent', disabled: true, config: {
|
|
79
|
+
provider: 'codex', toolName: 'subagent_codex', backgroundMode: 'one-shot', maxDepth: 'provider-managed',
|
|
80
|
+
} },
|
|
81
|
+
{ id: 'tool-subagent-claude-code', name: '@deepseek-ai/dsh-tool-subagent', disabled: true, config: {
|
|
82
|
+
provider: 'claude-code', toolName: 'subagent_claude_code', backgroundMode: 'one-shot', maxDepth: 'provider-managed',
|
|
83
|
+
} },
|
|
84
|
+
{ id: 'workflow-ptc', name: '@deepseek-ai/dsh-workflow-ptc', config: { provider: 'spawn' } },
|
|
85
|
+
{ id: 'tool-workflow', name: '@deepseek-ai/dsh-tool-workflow' },
|
|
86
|
+
{ id: 'tool-ralph', name: '@deepseek-ai/dsh-tool-ralph', disabled: true, config: {
|
|
87
|
+
subagentProvider: 'spawn', maxRounds: 64,
|
|
88
|
+
} },
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
{ id: 'tool-ask-user', name: '@deepseek-ai/dsh-tool-ask-user' },
|
|
92
|
+
{ id: 'tool-todo', name: '@deepseek-ai/dsh-tool-todo', config: { allowParallelInProgress: true } },
|
|
93
|
+
{ id: 'tool-web', name: '@deepseek-ai/dsh-tool-web', config: { fetch: true, searchTimeoutMs: 60000 } },
|
|
94
|
+
{ id: 'present', name: '@deepseek-ai/dsh-tool-present' },
|
|
95
|
+
{ id: 'tool-plugin-manager', name: '@deepseek-ai/dsh-plugin-manager/tools', disabled: true },
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** 桥接行(每个 preset 的唯一增量)。deps.bridgeName 必须等于 package.json 的 exports 子路径。 */
|
|
100
|
+
export function bridgeRow(id, bridgeName) {
|
|
101
|
+
return { id: 'cli-bridge-' + id, name: bridgeName || ('@luchenglong/cli-bridge/preset-' + id) }
|
|
102
|
+
}
|