@ycodium-ai/agent-opencode 0.2.3614 → 0.2.3671
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/dist/index.js +12 -3
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -34,6 +34,8 @@ var OPENCODE_CARD = {
|
|
|
34
34
|
defaultModel: "",
|
|
35
35
|
customModelIdExample: "openai/gpt-5",
|
|
36
36
|
modelSlugAliases: null,
|
|
37
|
+
// 型号全在用户自己的 OpenCode 配置里:目录外的型号这只手起不来。
|
|
38
|
+
modelCatalogAuthoritative: true,
|
|
37
39
|
mcpTransports: ["stdio", "http"],
|
|
38
40
|
pluginManaged: true,
|
|
39
41
|
// 会话 server 的配置里 `skills` 加上会话技能目录:OpenCode 2.0.26 实测 `GET /api/skill` 列得出只在那个
|
|
@@ -702,12 +704,17 @@ async function loadOpenCodeInventory(api, directory, signal) {
|
|
|
702
704
|
};
|
|
703
705
|
if (signal?.aborted) throw new Error("aborted");
|
|
704
706
|
const models = await listOpenCodeModelsWhenLoaded(api, directory, void 0, signal);
|
|
705
|
-
const
|
|
707
|
+
const agentsRead = await optional(async () => ({ known: true, agents: await api.listAgents(directory) }), {
|
|
708
|
+
known: false,
|
|
709
|
+
agents: []
|
|
710
|
+
});
|
|
711
|
+
const agents = agentsRead.agents;
|
|
706
712
|
const skills = await optional(() => api.listSkills(directory), []);
|
|
707
713
|
const defaultModel = await optional(() => api.defaultModel(directory), void 0);
|
|
708
714
|
return {
|
|
709
715
|
models,
|
|
710
716
|
agents,
|
|
717
|
+
agentsKnown: agentsRead.known,
|
|
711
718
|
skills,
|
|
712
719
|
...defaultModel === void 0 ? {} : { defaultModelSlug: `${defaultModel.providerId}/${defaultModel.id}` }
|
|
713
720
|
};
|
|
@@ -878,7 +885,9 @@ function openCodeProbeModels(inventory) {
|
|
|
878
885
|
name: model.name,
|
|
879
886
|
// 用户在 OpenCode 里配的默认型号:界面先选它,不按名字挑第一个。
|
|
880
887
|
...model.slug === inventory.defaultModelSlug ? { isDefault: true } : {},
|
|
881
|
-
|
|
888
|
+
// 型号表答过、没有变体就是明确的空档位;
|
|
889
|
+
// 只有附带的 agent 表没读到时,这一格说不出,能力整份报缺席,宿主沿用上一次的档位。
|
|
890
|
+
...inventory.agentsKnown === false ? {} : { capabilities: model.capabilities }
|
|
882
891
|
}));
|
|
883
892
|
}
|
|
884
893
|
function flattenOpenCodeSkills(skills) {
|
|
@@ -4848,7 +4857,7 @@ var executors = [
|
|
|
4848
4857
|
];
|
|
4849
4858
|
var index_default = definePlugin({
|
|
4850
4859
|
id: "agent-opencode",
|
|
4851
|
-
apiVersion:
|
|
4860
|
+
apiVersion: 51,
|
|
4852
4861
|
executors,
|
|
4853
4862
|
activate(ctx) {
|
|
4854
4863
|
capturedAttachments = ctx.attachments;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/agent-opencode",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3671",
|
|
4
4
|
"description": "OpenCode executor: OpenCode CLI (2.x) over its HTTP API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ycodium",
|
|
@@ -21,10 +21,10 @@
|
|
|
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.3671",
|
|
24
25
|
"ycodium-executor-testing": "0.0.0",
|
|
25
|
-
"ycodium-
|
|
26
|
-
"
|
|
27
|
-
"ycodium-sse-stream": "0.0.0"
|
|
26
|
+
"ycodium-sse-stream": "0.0.0",
|
|
27
|
+
"ycodium-fetch-ports": "0.0.0"
|
|
28
28
|
},
|
|
29
29
|
"ycodium": {
|
|
30
30
|
"plugin": "./dist/index.js",
|