@openclaw/opencode-provider 2026.8.1-beta.3 → 2026.8.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.
@@ -1,4 +1,4 @@
1
- import { buildStaticOpencodeZenProviderConfig } from "./provider-catalog.js";
1
+ import { n as buildStaticOpencodeZenProviderConfig } from "./provider-catalog-BkM-r0IZ.js";
2
2
  //#region extensions/opencode/provider-discovery.ts
3
3
  const opencodeProviderDiscovery = {
4
4
  id: "opencode",
@@ -1,4 +1,4 @@
1
- import { resolveClaudeThinkingProfile } from "openclaw/plugin-sdk/provider-model-shared";
1
+ import { resolveClaudeThinkingProfile } from "openclaw/plugin-sdk/claude-model-runtime";
2
2
  //#region extensions/opencode/provider-policy-api.ts
3
3
  const FIXED_REASONING_PROFILE = {
4
4
  levels: [{
@@ -6,7 +6,7 @@ import { accessSync, constants, statSync } from "node:fs";
6
6
  import path from "node:path";
7
7
  import process from "node:process";
8
8
  import { resolveAcpSessionAvailability } from "openclaw/plugin-sdk/acp-runtime";
9
- import { resolveSessionAgentIds } from "openclaw/plugin-sdk/agent-runtime";
9
+ import { resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
10
10
  import { resolveNodeHostExecutable } from "openclaw/plugin-sdk/node-host";
11
11
  import { createSessionCatalogFamily, createSessionCatalogNodeHostBindings, importSessionCatalogHistory, listAdoptedSessionCatalogSessions, sessionCatalogAdoptedSessionKey } from "openclaw/plugin-sdk/session-catalog";
12
12
  //#region extensions/opencode/session-catalog-plugin.ts
@@ -91,7 +91,7 @@ async function createAdoptedOpenCodeSession(params) {
91
91
  key: sessionCatalogAdoptedSessionKey(OPENCODE_ADOPTED_SESSION_KEY_PREFIX, params.threadId),
92
92
  agentId: params.agentId,
93
93
  recoverMatchingInitialEntry: true,
94
- ...params.session.name ? { label: params.session.name } : {},
94
+ ...params.session.name ? { displayName: params.session.name } : {},
95
95
  ...params.session.cwd ? { spawnedCwd: params.session.cwd } : {},
96
96
  initialEntry: {
97
97
  acpBackendId: ACPX_BACKEND_ID,
@@ -206,7 +206,7 @@ function registerOpenCodeSessionCatalog(api) {
206
206
  sessionUnavailable: "OpenCode session is unavailable"
207
207
  },
208
208
  continuation: {
209
- resolveAgentId: (agentId) => resolveSessionAgentIds({
209
+ resolveAgentId: (agentId) => resolveSessionAgentIdsStrict({
210
210
  config: api.config,
211
211
  agentId
212
212
  }).sessionAgentId,
@@ -2,23 +2,11 @@ import { OPENCODE_SESSION_ID_PATTERN } from "./session-catalog-shared.js";
2
2
  import { exportOpenCodeSession, queryOpenCodeDatabase } from "./session-catalog.js";
3
3
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { isExternalUserText, normalizeUserText } from "openclaw/plugin-sdk/session-catalog";
5
+ import { runTasksWithConcurrency } from "openclaw/plugin-sdk/concurrency-runtime";
5
6
  //#region extensions/opencode/session-upstream-activity.ts
6
7
  const OPENCODE_EXPORT_CONCURRENCY = 4;
7
8
  const OPENCODE_REPLAY_LOOKBACK_USER_MESSAGES = 50;
8
9
  const OPENCODE_SHELL_SENTINEL = "The following tool was executed by the user";
9
- async function mapConcurrent(values, limit, mapper) {
10
- const results = [];
11
- results.length = values.length;
12
- let nextIndex = 0;
13
- const workers = Array.from({ length: Math.min(limit, values.length) }, async () => {
14
- while (nextIndex < values.length) {
15
- const index = nextIndex++;
16
- results[index] = await mapper(values[index]);
17
- }
18
- });
19
- await Promise.all(workers);
20
- return results;
21
- }
22
10
  function sqlString(value) {
23
11
  return `'${value.replaceAll("'", "''")}'`;
24
12
  }
@@ -215,18 +203,23 @@ async function checkOpenCodeUpstreamActivity(probes) {
215
203
  } catch {
216
204
  return [];
217
205
  }
218
- return (await mapConcurrent(eligible, OPENCODE_EXPORT_CONCURRENCY, async (probe) => {
219
- const indicator = indicators.get(probe.threadId);
220
- if (!indicator) return {
221
- kind: "missing",
222
- sessionKey: probe.sessionKey
223
- };
224
- try {
225
- return await classifyChangedProbe(probe, indicator);
226
- } catch {
227
- return;
228
- }
229
- })).filter((outcome) => outcome !== void 0);
206
+ const { results: outcomes } = await runTasksWithConcurrency({
207
+ tasks: eligible.map((probe) => async () => {
208
+ const indicator = indicators.get(probe.threadId);
209
+ if (!indicator) return {
210
+ kind: "missing",
211
+ sessionKey: probe.sessionKey
212
+ };
213
+ try {
214
+ return await classifyChangedProbe(probe, indicator);
215
+ } catch {
216
+ return;
217
+ }
218
+ }),
219
+ limit: OPENCODE_EXPORT_CONCURRENCY,
220
+ throwOnError: true
221
+ });
222
+ return outcomes.filter((outcome) => outcome !== void 0);
230
223
  }
231
224
  //#endregion
232
225
  export { checkOpenCodeUpstreamActivity, linkContinuedOpenCodeSession };