@openclaw/opencode-provider 2026.10.5-beta.3 → 2026.10.10-beta.1
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/.setup/{provider-catalog-pNTuuSYH.mjs → provider-catalog-XEhgAiH9.mjs} +31 -38
- package/dist/index.js +3 -12
- package/dist/media-understanding-provider.js +1 -1
- package/dist/provider-catalog.js +1 -2
- package/dist/provider-discovery.js +1 -1
- package/dist/session-catalog-plugin.js +22 -77
- package/dist/session-catalog.js +3 -11
- package/dist/stream.js +4 -1
- package/openclaw.plugin.json +4 -36
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createUpstreamProviderCatalog, listProviderCatalogSnapshotEntries } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
|
|
1
|
+
import { buildOpenAICompatibleLiveModels, createUpstreamProviderCatalog, listProviderCatalogSnapshotEntries, projectProviderCatalogSnapshotRows } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
|
|
2
2
|
import { normalizeModelCompat } from "openclaw/plugin-sdk/provider-model-shared";
|
|
3
3
|
import { normalizeBaseUrl } from "openclaw/plugin-sdk/provider-http";
|
|
4
4
|
//#region extensions/opencode/openclaw.plugin.json
|
|
@@ -94,36 +94,6 @@ var openclaw_plugin_default = {
|
|
|
94
94
|
"codeMode": "capable"
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
|
-
{
|
|
98
|
-
"id": "gpt-5-nano",
|
|
99
|
-
"name": "GPT-5 Nano",
|
|
100
|
-
"api": "openai-responses",
|
|
101
|
-
"provider": "opencode",
|
|
102
|
-
"baseUrl": "https://opencode.ai/zen/v1",
|
|
103
|
-
"reasoning": true,
|
|
104
|
-
"input": ["text", "image"],
|
|
105
|
-
"cost": {
|
|
106
|
-
"input": .05,
|
|
107
|
-
"output": .4,
|
|
108
|
-
"cacheRead": .005,
|
|
109
|
-
"cacheWrite": 0
|
|
110
|
-
},
|
|
111
|
-
"contextWindow": 4e5,
|
|
112
|
-
"contextTokens": 272e3,
|
|
113
|
-
"maxTokens": 128e3,
|
|
114
|
-
"thinkingLevelMap": { "off": null },
|
|
115
|
-
"compat": {
|
|
116
|
-
"supportsUsageInStreaming": true,
|
|
117
|
-
"supportsReasoningEffort": true,
|
|
118
|
-
"supportedReasoningEfforts": [
|
|
119
|
-
"minimal",
|
|
120
|
-
"low",
|
|
121
|
-
"medium",
|
|
122
|
-
"high"
|
|
123
|
-
],
|
|
124
|
-
"maxTokensField": "max_tokens"
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
97
|
{
|
|
128
98
|
"id": "gemini-3.6-flash",
|
|
129
99
|
"name": "Gemini 3.6 Flash",
|
|
@@ -195,7 +165,12 @@ var openclaw_plugin_default = {
|
|
|
195
165
|
"compat": {
|
|
196
166
|
"supportsUsageInStreaming": true,
|
|
197
167
|
"supportsReasoningEffort": true,
|
|
198
|
-
"supportedReasoningEfforts": [
|
|
168
|
+
"supportedReasoningEfforts": [
|
|
169
|
+
"none",
|
|
170
|
+
"low",
|
|
171
|
+
"high",
|
|
172
|
+
"max"
|
|
173
|
+
],
|
|
199
174
|
"maxTokensField": "max_tokens",
|
|
200
175
|
"supportsDeveloperRole": false,
|
|
201
176
|
"supportsStrictMode": false,
|
|
@@ -252,7 +227,7 @@ var openclaw_plugin_default = {
|
|
|
252
227
|
contracts: { "mediaUnderstandingProviders": ["opencode"] },
|
|
253
228
|
mediaUnderstandingProviderMetadata: { "opencode": {
|
|
254
229
|
"capabilities": ["image"],
|
|
255
|
-
"defaultModels": { "image": "
|
|
230
|
+
"defaultModels": { "image": "minimax-m3" }
|
|
256
231
|
} },
|
|
257
232
|
configGroups: [{
|
|
258
233
|
"id": "native-sessions",
|
|
@@ -300,14 +275,25 @@ const OPENCODE_ZEN_SEED_CATALOG = new Map(OPENCODE_ZEN_MANIFEST_PROVIDER.models.
|
|
|
300
275
|
..."replacedBy" in row && typeof row.replacedBy === "string" ? { replacedBy: row.replacedBy } : {}
|
|
301
276
|
}];
|
|
302
277
|
}));
|
|
278
|
+
const OPENCODE_ZEN_PROVIDER_ROUTE = {
|
|
279
|
+
api: "openai-completions",
|
|
280
|
+
baseUrl: OPENCODE_ZEN_OPENAI_BASE_URL
|
|
281
|
+
};
|
|
303
282
|
const opencodeZenCatalog = createUpstreamProviderCatalog({
|
|
304
283
|
providerId: PROVIDER_ID,
|
|
305
284
|
seed: OPENCODE_ZEN_SEED_CATALOG,
|
|
306
285
|
upstreamSeed: new Map(Array.from(OPENCODE_ZEN_SEED_CATALOG, ([id, { model }]) => [id, { model }])),
|
|
307
|
-
providerConfig:
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
286
|
+
providerConfig: OPENCODE_ZEN_PROVIDER_ROUTE,
|
|
287
|
+
projectRows: (rows, snapshot) => [...projectProviderCatalogSnapshotRows(rows, snapshot), ...buildOpenAICompatibleLiveModels(rows, {
|
|
288
|
+
...OPENCODE_ZEN_PROVIDER_ROUTE,
|
|
289
|
+
models: []
|
|
290
|
+
}).filter((model) => !snapshot.has(model.id.toLowerCase())).map((model) => {
|
|
291
|
+
const input = model.input.includes("image") ? ["text", "image"] : ["text"];
|
|
292
|
+
return Object.assign(model, OPENCODE_ZEN_PROVIDER_ROUTE, {
|
|
293
|
+
provider: PROVIDER_ID,
|
|
294
|
+
input
|
|
295
|
+
});
|
|
296
|
+
})],
|
|
311
297
|
metadataEndpoint: OPENCODE_UPSTREAM_CATALOG_ENDPOINT,
|
|
312
298
|
modelsEndpoint: OPENCODE_ZEN_MODELS_ENDPOINT,
|
|
313
299
|
anthropicBaseUrl: OPENCODE_ZEN_ANTHROPIC_BASE_URL,
|
|
@@ -315,7 +301,14 @@ const opencodeZenCatalog = createUpstreamProviderCatalog({
|
|
|
315
301
|
ttlMs: OPENCODE_ZEN_MODELS_CACHE_TTL_MS,
|
|
316
302
|
auditContext: "opencode-zen-model-discovery",
|
|
317
303
|
starterModelAuditContext: "opencode-zen-onboarding-model-discovery",
|
|
318
|
-
isStaticEntryActive: (entry) => entry?.status !== "deprecated"
|
|
304
|
+
isStaticEntryActive: (entry) => entry?.status !== "deprecated",
|
|
305
|
+
decorateModel: (model) => model.id === "kimi-k3" ? {
|
|
306
|
+
...model,
|
|
307
|
+
compat: {
|
|
308
|
+
...model.compat,
|
|
309
|
+
supportedReasoningEfforts: OPENCODE_ZEN_SEED_CATALOG.get(model.id)?.model.compat?.supportedReasoningEfforts
|
|
310
|
+
}
|
|
311
|
+
} : model
|
|
319
312
|
});
|
|
320
313
|
async function prepareOpencodeZenModel(params) {
|
|
321
314
|
return (await opencodeZenCatalog.refreshMetadata(params))?.get(params.modelId.trim().toLowerCase())?.model;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { opencodeMediaUnderstandingProvider } from "./media-understanding-provider.js";
|
|
2
2
|
import { OPENCODE_ZEN_DEFAULT_MODEL_REF, applyOpencodeZenProviderConfig } from "./onboard.js";
|
|
3
|
-
import { a as prepareOpencodeZenModel, c as openclaw_plugin_default, i as normalizeOpencodeZenBaseUrl, n as buildStaticOpencodeZenProviderConfig, o as resolveOpencodeZenModel, r as listOpencodeZenModelCatalogEntries, s as resolveOpencodeZenStarterModel, t as buildOpencodeZenLiveProviderConfig } from "./.setup/provider-catalog-
|
|
3
|
+
import { a as prepareOpencodeZenModel, c as openclaw_plugin_default, i as normalizeOpencodeZenBaseUrl, n as buildStaticOpencodeZenProviderConfig, o as resolveOpencodeZenModel, r as listOpencodeZenModelCatalogEntries, s as resolveOpencodeZenStarterModel, t as buildOpencodeZenLiveProviderConfig } from "./.setup/provider-catalog-XEhgAiH9.mjs";
|
|
4
4
|
import { resolveThinkingProfile } from "./provider-policy-api.js";
|
|
5
5
|
import { registerOpenCodeSessionCatalog } from "./session-catalog-plugin.js";
|
|
6
6
|
import { wrapOpencodeProviderStream } from "./stream.js";
|
|
@@ -8,7 +8,6 @@ import { runLiveProviderCatalog } from "openclaw/plugin-sdk/provider-catalog-liv
|
|
|
8
8
|
import { resolveFirstProviderCatalogAuth } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
9
9
|
import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
|
|
10
10
|
import { buildProviderReplayFamilyHooks, matchesExactOrPrefix } from "openclaw/plugin-sdk/provider-model-shared";
|
|
11
|
-
import { createOpenAICompatibleCompletionsThinkingOffWrapper } from "openclaw/plugin-sdk/provider-stream-shared";
|
|
12
11
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
13
12
|
//#region extensions/opencode/index.ts
|
|
14
13
|
const PROVIDER_ID = "opencode";
|
|
@@ -105,16 +104,8 @@ var opencode_default = defineSingleProviderPluginEntry({
|
|
|
105
104
|
...buildProviderReplayFamilyHooks({ family: "passthrough-gemini" }),
|
|
106
105
|
isModernModelRef: ({ modelId }) => isModernOpencodeModel(modelId),
|
|
107
106
|
resolveThinkingProfile,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const baseStreamFn = ctx.streamFn;
|
|
111
|
-
const thinkingOff = createOpenAICompatibleCompletionsThinkingOffWrapper(baseStreamFn, ctx.thinkingLevel);
|
|
112
|
-
const thinkingStreamFn = (model, context, options) => model.provider === PROVIDER_ID && model.id === "kimi-k3" ? thinkingOff(model, context, options) : baseStreamFn(model, context, options);
|
|
113
|
-
return wrapOpencodeProviderStream({
|
|
114
|
-
...ctx,
|
|
115
|
-
streamFn: thinkingStreamFn
|
|
116
|
-
});
|
|
117
|
-
}
|
|
107
|
+
classifyFailoverReason: ({ status, errorType, code, errorMessage }) => status === 403 && (errorType === "FreeTierError" || code === "FreeTierError" || /\bFreeTierError\b|OpenCode's free tier can only be used from within OpenCode/.test(errorMessage)) ? "model_not_found" : void 0,
|
|
108
|
+
wrapStreamFn: wrapOpencodeProviderStream
|
|
118
109
|
},
|
|
119
110
|
register(api) {
|
|
120
111
|
api.registerMediaUnderstandingProvider(opencodeMediaUnderstandingProvider);
|
|
@@ -9,7 +9,7 @@ const stripDisabledResponsesReasoning = (payload) => {
|
|
|
9
9
|
const opencodeMediaUnderstandingProvider = {
|
|
10
10
|
id: "opencode",
|
|
11
11
|
capabilities: ["image"],
|
|
12
|
-
defaultModels: { image: "
|
|
12
|
+
defaultModels: { image: "minimax-m3" },
|
|
13
13
|
describeImage: (request) => describeImageWithModelPayloadTransform(request, stripDisabledResponsesReasoning),
|
|
14
14
|
describeImages: (request) => describeImagesWithModelPayloadTransform(request, stripDisabledResponsesReasoning)
|
|
15
15
|
};
|
package/dist/provider-catalog.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { buildOpencodeZenLiveProviderConfig, buildStaticOpencodeZenProviderConfig, listOpencodeZenModelCatalogEntries, normalizeOpencodeZenBaseUrl, prepareOpencodeZenModel, resolveOpencodeZenModel, resolveOpencodeZenStarterModel };
|
|
1
|
+
export { t as buildOpencodeZenLiveProviderConfig, n as buildStaticOpencodeZenProviderConfig, r as listOpencodeZenModelCatalogEntries, i as normalizeOpencodeZenBaseUrl, a as prepareOpencodeZenModel, o as resolveOpencodeZenModel, s as resolveOpencodeZenStarterModel } from "./.setup/provider-catalog-XEhgAiH9.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as buildStaticOpencodeZenProviderConfig } from "./.setup/provider-catalog-
|
|
1
|
+
import { n as buildStaticOpencodeZenProviderConfig } from "./.setup/provider-catalog-XEhgAiH9.mjs";
|
|
2
2
|
//#region extensions/opencode/provider-discovery.ts
|
|
3
3
|
const opencodeProviderDiscovery = {
|
|
4
4
|
id: "opencode",
|
|
@@ -2,33 +2,18 @@ import { OPENCODE_LOCAL_SESSION_HOST_ID, OPENCODE_NODE_INVOKE_TIMEOUT_MS, OPENCO
|
|
|
2
2
|
import { isExactOpenCodeSessionCursor, listLocalOpenCodeSessionPage, readLocalOpenCodeTranscriptPage, requireLocalOpenCodeSession } from "./session-catalog.js";
|
|
3
3
|
import { checkOpenCodeUpstreamActivity, linkContinuedOpenCodeSession } from "./session-upstream-activity.js";
|
|
4
4
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
|
-
import { accessSync, constants, statSync } from "node:fs";
|
|
6
5
|
import path from "node:path";
|
|
7
6
|
import process from "node:process";
|
|
8
7
|
import { resolveAcpSessionAvailability } from "openclaw/plugin-sdk/acp-runtime";
|
|
9
8
|
import { resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
10
9
|
import { resolveNodeHostExecutable } from "openclaw/plugin-sdk/node-host";
|
|
11
|
-
import { createSessionCatalogFamily, createSessionCatalogNodeHostBindings
|
|
10
|
+
import { createSessionCatalogFamily, createSessionCatalogNodeHostBindings } from "openclaw/plugin-sdk/session-catalog";
|
|
11
|
+
import { createAcpSessionCatalogAdoption } from "openclaw/plugin-sdk/session-catalog-runtime";
|
|
12
12
|
//#region extensions/opencode/session-catalog-plugin.ts
|
|
13
13
|
const MAX_HOSTS = 100;
|
|
14
14
|
const ACPX_BACKEND_ID = "acpx";
|
|
15
15
|
const OPENCODE_ACP_AGENT_ID = "opencode";
|
|
16
16
|
const OPENCODE_ADOPTED_SESSION_KEY_PREFIX = "plugin:opencode:catalog-adopt:";
|
|
17
|
-
function executableOnPath(command, env) {
|
|
18
|
-
const pathValue = env.PATH ?? env.Path ?? "";
|
|
19
|
-
const delimiter = process.platform === "win32" ? ";" : path.delimiter;
|
|
20
|
-
const extensions = process.platform === "win32" ? (env.PATHEXT ?? ".EXE;.CMD;.BAT;.COM").split(";") : [""];
|
|
21
|
-
for (const directory of pathValue.split(delimiter)) for (const extension of extensions) {
|
|
22
|
-
if (!directory.trim()) continue;
|
|
23
|
-
const candidate = path.join(directory, `${command}${extension}`);
|
|
24
|
-
try {
|
|
25
|
-
if (!statSync(candidate).isFile()) continue;
|
|
26
|
-
if (process.platform !== "win32") accessSync(candidate, constants.X_OK);
|
|
27
|
-
return true;
|
|
28
|
-
} catch {}
|
|
29
|
-
}
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
17
|
function parseNodeParams(paramsJSON) {
|
|
33
18
|
if (!paramsJSON) return;
|
|
34
19
|
try {
|
|
@@ -55,23 +40,6 @@ function assertOpenCodeLocalAccess(hostId, allowProcessHomeFallback) {
|
|
|
55
40
|
function currentOpenCodeCatalogConfig(api) {
|
|
56
41
|
return api.runtime.config?.current?.() ?? api.config ?? {};
|
|
57
42
|
}
|
|
58
|
-
function listAdoptedOpenCodeSessions(api, agentId, sessionEntries) {
|
|
59
|
-
return listAdoptedSessionCatalogSessions({
|
|
60
|
-
...agentId ? { agentId } : {},
|
|
61
|
-
config: currentOpenCodeCatalogConfig(api),
|
|
62
|
-
pluginId: api.id,
|
|
63
|
-
runtime: api.runtime,
|
|
64
|
-
sessionEntries,
|
|
65
|
-
sourceFromEntry: (entry) => {
|
|
66
|
-
const opencode = isRecord(entry.pluginExtensions?.opencode) ? entry.pluginExtensions.opencode : void 0;
|
|
67
|
-
const marker = opencode && isRecord(opencode.sessionCatalog) ? opencode.sessionCatalog : void 0;
|
|
68
|
-
return marker && typeof marker.sourceThreadId === "string" ? {
|
|
69
|
-
hostId: OPENCODE_LOCAL_SESSION_HOST_ID,
|
|
70
|
-
threadId: marker.sourceThreadId
|
|
71
|
-
} : void 0;
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
43
|
async function loadContinuableOpenCodeSession(api, threadId) {
|
|
76
44
|
const session = (await listLocalOpenCodeSessionPage({
|
|
77
45
|
searchTerm: threadId,
|
|
@@ -83,45 +51,15 @@ async function loadContinuableOpenCodeSession(api, threadId) {
|
|
|
83
51
|
if (!session) throw new Error("OpenCode session is unavailable");
|
|
84
52
|
return session;
|
|
85
53
|
}
|
|
86
|
-
async function createAdoptedOpenCodeSession(params) {
|
|
87
|
-
const config = currentOpenCodeCatalogConfig(params.api);
|
|
88
|
-
const marker = { sourceThreadId: params.threadId };
|
|
89
|
-
return { sessionKey: (await params.api.runtime.agent.session.createSessionEntry({
|
|
90
|
-
cfg: config,
|
|
91
|
-
key: sessionCatalogAdoptedSessionKey(OPENCODE_ADOPTED_SESSION_KEY_PREFIX, params.threadId),
|
|
92
|
-
agentId: params.agentId,
|
|
93
|
-
recoverMatchingInitialEntry: true,
|
|
94
|
-
...params.session.name ? { displayName: params.session.name } : {},
|
|
95
|
-
...params.session.cwd ? { spawnedCwd: params.session.cwd } : {},
|
|
96
|
-
initialEntry: {
|
|
97
|
-
acpBackendId: ACPX_BACKEND_ID,
|
|
98
|
-
acpSessionBinding: {
|
|
99
|
-
acpAgentId: OPENCODE_ACP_AGENT_ID,
|
|
100
|
-
agentSessionId: params.threadId
|
|
101
|
-
},
|
|
102
|
-
pluginExtensions: { opencode: { sessionCatalog: marker } }
|
|
103
|
-
},
|
|
104
|
-
afterCreate: async (entry) => {
|
|
105
|
-
await importSessionCatalogHistory({
|
|
106
|
-
catalogId: "opencode",
|
|
107
|
-
threadId: params.threadId,
|
|
108
|
-
read: ({ cursor, limit }) => readLocalOpenCodeTranscriptPage({
|
|
109
|
-
threadId: params.threadId,
|
|
110
|
-
limit,
|
|
111
|
-
...cursor ? { cursor } : {}
|
|
112
|
-
}),
|
|
113
|
-
sessionId: entry.sessionId,
|
|
114
|
-
sessionKey: entry.key,
|
|
115
|
-
agentId: entry.agentId,
|
|
116
|
-
...params.session.cwd ? { cwd: params.session.cwd } : {},
|
|
117
|
-
config
|
|
118
|
-
});
|
|
119
|
-
return { pluginExtensions: { opencode: { sessionCatalog: marker } } };
|
|
120
|
-
}
|
|
121
|
-
})).key };
|
|
122
|
-
}
|
|
123
54
|
function createOpenCodeNodeHostBindings(api) {
|
|
124
|
-
const available = ({ config, env }) => fullConfigCatalogEnabled(config) &&
|
|
55
|
+
const available = ({ config, env }) => fullConfigCatalogEnabled(config) && Boolean(resolveNodeHostExecutable("opencode", {
|
|
56
|
+
env: {
|
|
57
|
+
...env,
|
|
58
|
+
PATHEXT: env.PATHEXT ?? ".EXE;.CMD;.BAT;.COM"
|
|
59
|
+
},
|
|
60
|
+
includeExtensionless: env.PATHEXT?.split(";").includes("") ?? false,
|
|
61
|
+
strategy: "direct"
|
|
62
|
+
}));
|
|
125
63
|
return createSessionCatalogNodeHostBindings({
|
|
126
64
|
capability: OPENCODE_SESSIONS_CAPABILITY,
|
|
127
65
|
listCommand: OPENCODE_SESSIONS_LIST_COMMAND,
|
|
@@ -144,6 +82,16 @@ function createOpenCodeNodeHostBindings(api) {
|
|
|
144
82
|
}
|
|
145
83
|
function registerOpenCodeSessionCatalog(api) {
|
|
146
84
|
if (!isOpenCodeSessionCatalogEnabled(api.pluginConfig)) return;
|
|
85
|
+
const adoption = createAcpSessionCatalogAdoption({
|
|
86
|
+
api,
|
|
87
|
+
config: () => currentOpenCodeCatalogConfig(api),
|
|
88
|
+
catalogId: OPENCODE_ACP_AGENT_ID,
|
|
89
|
+
hostId: OPENCODE_LOCAL_SESSION_HOST_ID,
|
|
90
|
+
keyPrefix: OPENCODE_ADOPTED_SESSION_KEY_PREFIX,
|
|
91
|
+
markerPluginId: "opencode",
|
|
92
|
+
markerKey: "sessionCatalog",
|
|
93
|
+
read: readLocalOpenCodeTranscriptPage
|
|
94
|
+
});
|
|
147
95
|
const provider = createSessionCatalogFamily({
|
|
148
96
|
runtime: api.runtime,
|
|
149
97
|
local: {
|
|
@@ -216,13 +164,10 @@ function registerOpenCodeSessionCatalog(api) {
|
|
|
216
164
|
backendId: ACPX_BACKEND_ID,
|
|
217
165
|
agentId: OPENCODE_ACP_AGENT_ID
|
|
218
166
|
}),
|
|
219
|
-
listAdopted: (agentId, sessionEntries) =>
|
|
167
|
+
listAdopted: (agentId, sessionEntries) => adoption.listAdopted(agentId, sessionEntries),
|
|
220
168
|
loadSession: (threadId) => loadContinuableOpenCodeSession(api, threadId),
|
|
221
169
|
validateSession: () => void 0,
|
|
222
|
-
create: (params) =>
|
|
223
|
-
api,
|
|
224
|
-
...params
|
|
225
|
-
}),
|
|
170
|
+
create: (params) => adoption.create(params),
|
|
226
171
|
complete: (continued, threadId) => linkContinuedOpenCodeSession(continued.sessionKey, threadId),
|
|
227
172
|
nodeReadOnlyMessage: "paired-node OpenCode session rows are view-only"
|
|
228
173
|
},
|
package/dist/session-catalog.js
CHANGED
|
@@ -40,9 +40,7 @@ const SAFE_ENV_KEYS = [
|
|
|
40
40
|
"XDG_DATA_HOME",
|
|
41
41
|
"XDG_STATE_HOME"
|
|
42
42
|
];
|
|
43
|
-
const openCodeConfigIdentities = /* @__PURE__ */ new WeakMap();
|
|
44
43
|
const openCodeQueryCache = /* @__PURE__ */ new Map();
|
|
45
|
-
let nextOpenCodeConfigIdentity = 1;
|
|
46
44
|
const log = createSubsystemLogger("opencode/session-catalog");
|
|
47
45
|
let cliVersion;
|
|
48
46
|
async function isOpenCodeV2() {
|
|
@@ -64,14 +62,8 @@ async function isOpenCodeV2() {
|
|
|
64
62
|
}
|
|
65
63
|
return cliVersion.result;
|
|
66
64
|
}
|
|
67
|
-
function openCodeQueryCacheKey(query
|
|
68
|
-
|
|
69
|
-
if (identity === void 0) {
|
|
70
|
-
identity = nextOpenCodeConfigIdentity++;
|
|
71
|
-
openCodeConfigIdentities.set(configIdentity, identity);
|
|
72
|
-
}
|
|
73
|
-
const environment = SAFE_ENV_KEYS.map((key) => `${key}=${process.env[key] ?? ""}`).join("\0");
|
|
74
|
-
return `${String(identity)}\0${environment}\0${query}`;
|
|
65
|
+
function openCodeQueryCacheKey(query) {
|
|
66
|
+
return `${SAFE_ENV_KEYS.map((key) => `${key}=${process.env[key] ?? ""}`).join("\0")}\0${query}`;
|
|
75
67
|
}
|
|
76
68
|
const isExactOpenCodeSessionCursor = sessionCatalogPaging.isExactCursor;
|
|
77
69
|
const OPENCODE_PARAMETER_MESSAGES = {
|
|
@@ -183,7 +175,7 @@ async function queryOpenCodeSessions(query, count) {
|
|
|
183
175
|
return sessions;
|
|
184
176
|
}
|
|
185
177
|
async function queryCachedOpenCodeSessions(query, count, options) {
|
|
186
|
-
const key = openCodeQueryCacheKey(query
|
|
178
|
+
const key = openCodeQueryCacheKey(query);
|
|
187
179
|
const cached = openCodeQueryCache.get(key);
|
|
188
180
|
if (options.forceRefresh !== true && cached && cached.expiresAt > Date.now()) {
|
|
189
181
|
openCodeQueryCache.delete(key);
|
package/dist/stream.js
CHANGED
|
@@ -120,7 +120,10 @@ function restoreEvent(event, state) {
|
|
|
120
120
|
if ("partial" in restored && restored.partial) restored.partial = restoreMessage(restored.partial, state);
|
|
121
121
|
if (restored.type === "toolcall_delta") {
|
|
122
122
|
const call = restored.partial.content[restored.contentIndex];
|
|
123
|
-
if (call?.type === "toolCall" && (state.fields.get(call.name)?.length ?? 0) > 0)
|
|
123
|
+
if (call?.type === "toolCall" && (state.fields.get(call.name)?.length ?? 0) > 0) {
|
|
124
|
+
restored.delta = "";
|
|
125
|
+
delete call.partialJson;
|
|
126
|
+
}
|
|
124
127
|
} else if (restored.type === "toolcall_end") {
|
|
125
128
|
restored.toolCall = { ...restored.toolCall };
|
|
126
129
|
transformCall(restored.toolCall, state, false);
|
package/openclaw.plugin.json
CHANGED
|
@@ -122,41 +122,6 @@
|
|
|
122
122
|
"codeMode": "capable"
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
|
-
{
|
|
126
|
-
"id": "gpt-5-nano",
|
|
127
|
-
"name": "GPT-5 Nano",
|
|
128
|
-
"api": "openai-responses",
|
|
129
|
-
"provider": "opencode",
|
|
130
|
-
"baseUrl": "https://opencode.ai/zen/v1",
|
|
131
|
-
"reasoning": true,
|
|
132
|
-
"input": [
|
|
133
|
-
"text",
|
|
134
|
-
"image"
|
|
135
|
-
],
|
|
136
|
-
"cost": {
|
|
137
|
-
"input": 0.05,
|
|
138
|
-
"output": 0.4,
|
|
139
|
-
"cacheRead": 0.005,
|
|
140
|
-
"cacheWrite": 0
|
|
141
|
-
},
|
|
142
|
-
"contextWindow": 400000,
|
|
143
|
-
"contextTokens": 272000,
|
|
144
|
-
"maxTokens": 128000,
|
|
145
|
-
"thinkingLevelMap": {
|
|
146
|
-
"off": null
|
|
147
|
-
},
|
|
148
|
-
"compat": {
|
|
149
|
-
"supportsUsageInStreaming": true,
|
|
150
|
-
"supportsReasoningEffort": true,
|
|
151
|
-
"supportedReasoningEfforts": [
|
|
152
|
-
"minimal",
|
|
153
|
-
"low",
|
|
154
|
-
"medium",
|
|
155
|
-
"high"
|
|
156
|
-
],
|
|
157
|
-
"maxTokensField": "max_tokens"
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
125
|
{
|
|
161
126
|
"id": "gemini-3.6-flash",
|
|
162
127
|
"name": "Gemini 3.6 Flash",
|
|
@@ -238,6 +203,9 @@
|
|
|
238
203
|
"supportsUsageInStreaming": true,
|
|
239
204
|
"supportsReasoningEffort": true,
|
|
240
205
|
"supportedReasoningEfforts": [
|
|
206
|
+
"none",
|
|
207
|
+
"low",
|
|
208
|
+
"high",
|
|
241
209
|
"max"
|
|
242
210
|
],
|
|
243
211
|
"maxTokensField": "max_tokens",
|
|
@@ -326,7 +294,7 @@
|
|
|
326
294
|
"image"
|
|
327
295
|
],
|
|
328
296
|
"defaultModels": {
|
|
329
|
-
"image": "
|
|
297
|
+
"image": "minimax-m3"
|
|
330
298
|
}
|
|
331
299
|
}
|
|
332
300
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/opencode-provider",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.10-beta.1",
|
|
4
4
|
"description": "OpenClaw OpenCode Zen provider plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"minHostVersion": ">=2026.7.2"
|
|
19
19
|
},
|
|
20
20
|
"compat": {
|
|
21
|
-
"pluginApi": ">=2026.10.
|
|
21
|
+
"pluginApi": ">=2026.10.10-beta.1"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.10.
|
|
24
|
+
"openclawVersion": "2026.10.10-beta.1",
|
|
25
25
|
"bundledDist": false
|
|
26
26
|
},
|
|
27
27
|
"release": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"assets/activity.svg"
|
|
41
41
|
],
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"openclaw": ">=2026.10.
|
|
43
|
+
"openclaw": ">=2026.10.10-beta.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependenciesMeta": {
|
|
46
46
|
"openclaw": {
|