opencode-idea 0.0.12 → 0.0.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-idea",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "OpenCode plugin that connects to JetBrains IDE MCP servers and prefers IDE tools when the current project is open in the IDE",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -61,15 +61,16 @@ export function buildIdeGuidance(projectPath) {
61
61
  `- \`idea_execute_run_configuration\`:跑已有配置;Shell Script 要 \`EXECUTE_IN_TERMINAL: false\`;覆盖参数(\`programArguments\` / \`workingDirectory\` / \`envs\`)需配置支持 \`supportsDynamicLaunchOverrides\`。`,
62
62
  ``,
63
63
  `### 终端`,
64
- `- \`idea_execute_terminal_command\`:**项目内的一切命令执行都用它**,不要用原生 \`shell\`。`,
65
- ` 判据是"命令是否依赖项目的工具链 / 运行时 / 依赖环境",不是语言或工具名 —— Java、Python、Node、Go 之外,`,
66
- ` Maven / Gradle、uv / pip / poetry、cargo、bundler、make / cmake、包管理器与构建、测试、代码生成等,全都算。`,
67
- ` 例外:纯操作系统级的通用命令(\`ls\` / \`cat\` / \`cp\` / \`mkdir\` / \`git\` 等)用原生 \`shell\` 即可。`,
68
- ` 记不清就不确定时:只要命令会调用项目的工具链,就用它,不要退回原生 \`shell\`。`,
69
- ` - 必须 \`executeInShell: true\`:在用户真实 shell 里执行,**天然继承 IDE 里配好的运行时环境**(JDK / Node / Python / Go / Maven / uv 等及各版本管理器);原生 shell 可能用错版本。`,
64
+ `- \`idea_execute_terminal_command\` 用于项目的开发语言与开发工具链;原生 \`shell\` 用于操作系统级的杂活。`,
65
+ ` - 走 IDE 终端:执行本项目开发语言的运行时与开发工具,语言按项目类型认定 ——`,
66
+ ` \`pom.xml\` / \`build.gradle\` → \`java\` / \`mvn\` / \`gradle\`;\`package.json\` → \`node\` / \`npm\` / \`pnpm\` / \`yarn\` / \`npx\`;`,
67
+ ` \`pyproject.toml\` / \`requirements.txt\` → \`python\` / \`pip\` / \`uv\` / \`poetry\` / \`pytest\`;\`go.mod\` → \`go\`;\`Cargo.toml\` → \`cargo\`;\`composer.json\` → \`php\` / \`composer\`;`,
68
+ ` 前端项目 → \`vite\` / \`webpack\` / \`esbuild\` / \`tsc\` 等构建与测试命令。`,
69
+ ` - 走原生 \`shell\`:\`ls\` / \`cd\` / \`cp\` / \`rm\` / \`git\` / \`grep\` / \`jq\` / \`ps\` / \`curl\` / \`wc\` 等操作系统级通用命令;`,
70
+ ` 以及把语言当一次性脚本干非开发任务的杂活(如 \`python3 -c\` 改一个文件、\`node -e\` 打印一段内容)。`,
71
+ ` - \`executeInShell: true\`:在用户真实 shell 里执行,继承 IDE 配好的运行时环境;原生 shell 可能用错版本。`,
70
72
  ` - 按预期耗时传 \`timeout\`(毫秒),长任务给足;必要时传 \`maxLinesCount\` 控制返回行数。`,
71
- ` - 连续命令传 \`reuseExistingTerminalWindow: true\`,复用同一个 IDE 终端窗口。`,
72
- ` - 结果带 \`command_exit_code\` 与 \`command_output\`;\`cd\` 不跨调用保留,多步时在一条命令里用 \`&&\`。`,
73
+ ` - 连续命令传 \`reuseExistingTerminalWindow: true\`;结果带 \`command_exit_code\` 与 \`command_output\`,\`cd\` 不跨调用保留,多步用 \`&&\`。`,
73
74
  ``,
74
75
  `### 数据库 (数据源由用户在 IDE 里配置:不要自己建/改,不要向用户索取数据库凭据)`,
75
76
  `- \`idea_list_database_connections\`:先看有没有现成数据源;每条给 \`id\` / \`dbms\` / \`jdbcUrl\` / \`readOnly\` / \`isDDL\`。`,
package/src/mcp/idea.js CHANGED
@@ -146,7 +146,7 @@ export async function probePort(port, options = {}) {
146
146
  params: {
147
147
  protocolVersion: PROTOCOL_VERSION,
148
148
  capabilities: {},
149
- clientInfo: { name: 'opencode-idea', version: '0.0.12' },
149
+ clientInfo: { name: 'opencode-idea', version: '0.0.13' },
150
150
  },
151
151
  }),
152
152
  signal: controller.signal,
@@ -217,7 +217,7 @@ export async function callTool(port, projectPath, name, args = {}, options = {})
217
217
  params: {
218
218
  protocolVersion: PROTOCOL_VERSION,
219
219
  capabilities: {},
220
- clientInfo: { name: 'opencode-idea', version: '0.0.12' },
220
+ clientInfo: { name: 'opencode-idea', version: '0.0.13' },
221
221
  },
222
222
  });
223
223
  // The IDE's Streamable-HTTP endpoint binds follow-up requests to the session