@ycodium-ai/agent-opencode 0.2.4486 → 0.2.4688

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ const require = __ycodiumCreateRequire(import.meta.url);
5
5
  import { definePlugin } from "@ycodium-ai/plugin-api";
6
6
 
7
7
  // ../../packages/plugin-api/src/version.ts
8
- var PLUGIN_API_VERSION = 119;
8
+ var PLUGIN_API_VERSION = 128;
9
9
 
10
10
  // src/card.ts
11
11
  var OPENCODE_DRIVER_KIND = "opencode";
@@ -39,6 +39,7 @@ var OPENCODE_CARD = {
39
39
  modelSlugAliases: null,
40
40
  // 型号全在用户自己的 OpenCode 配置里:目录外的型号这只手起不来。
41
41
  modelCatalogAuthoritative: true,
42
+ mcpToolCallCeilingSeconds: 300,
42
43
  mcpTransports: ["stdio", "http"],
43
44
  pluginManaged: true,
44
45
  // 会话 server 的配置里 `skills` 加上会话技能目录:OpenCode 2.0.26 实测 `GET /api/skill` 列得出只在那个
@@ -107,6 +108,7 @@ var OPENCODE_CARD = {
107
108
  type: "string",
108
109
  "x-ycodium-form": {
109
110
  titleKey: "form.homePath.title",
111
+ machineLocal: true,
110
112
  descriptionKey: "form.homePath.description",
111
113
  placeholderKey: "form.homePath.placeholder"
112
114
  }
@@ -2039,15 +2041,18 @@ function createOpenCodeApi(server) {
2039
2041
  // src/mcpServers.ts
2040
2042
  function toOpenCodeMcpConfig(server) {
2041
2043
  const transport = server.transport;
2044
+ const timeout = server.toolTimeoutSeconds === void 0 ? {} : { timeout: { execution: server.toolTimeoutSeconds * 1e3 } };
2042
2045
  if (transport.type === "stdio") {
2043
2046
  return {
2044
2047
  type: "local",
2048
+ ...timeout,
2045
2049
  command: [transport.command, ...transport.args ?? []],
2046
2050
  ...transport.env ? { environment: { ...transport.env } } : {}
2047
2051
  };
2048
2052
  }
2049
2053
  return {
2050
2054
  type: "remote",
2055
+ ...timeout,
2051
2056
  url: transport.url,
2052
2057
  ...transport.headers ? { headers: { ...transport.headers } } : {},
2053
2058
  // 带着宿主给的凭据,别让 OpenCode 碰到 401 就去走 OAuth 发现。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-opencode",
3
- "version": "0.2.4486",
3
+ "version": "0.2.4688",
4
4
  "description": "OpenCode executor: OpenCode CLI (2.x) over its HTTP API.",
5
5
  "keywords": [
6
6
  "ycodium",
@@ -21,9 +21,9 @@
21
21
  "@types/node": "24.12.4",
22
22
  "esbuild": "0.28.1",
23
23
  "vite-plus": "0.2.2",
24
- "@ycodium-ai/plugin-api": "0.2.4486",
25
- "ycodium-executor-testing": "0.0.0",
24
+ "@ycodium-ai/plugin-api": "0.2.4688",
26
25
  "ycodium-fetch-ports": "0.0.0",
26
+ "ycodium-executor-testing": "0.0.0",
27
27
  "ycodium-sse-stream": "0.0.0"
28
28
  },
29
29
  "ycodium": {