@openviking/opencode-plugin 2026.10.6 → 2026.10.8

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/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # OpenViking OpenCode Plugin
2
2
 
3
+ > **Working memory is now opt-in.** Update installed plugins separately from the OV server, then restart the host. Existing explicit settings still take precedence. See the [default-off upgrade guide](../../docs/en/guides/working-memory-default-off.md) for native history, re-enabling WM, and old-conversation handoffs.
4
+
3
5
  A unified OpenCode plugin for OpenViking repository retrieval and long-term memory.
4
6
 
5
7
  > **Requires an OpenViking server with `viking://~` home-alias support.** Recall targets the
@@ -296,14 +296,20 @@ export function createMemorySessionManager({ config, pluginRoot }) {
296
296
  const state = sessions.get(opencodeSessionId)
297
297
  if (!state) return false
298
298
 
299
- const added = await flushPendingMessages(opencodeSessionId, state)
300
- if (commit && isCaptureEnabled(config)) {
301
- await commitOvSession(state.ovSessionId, { force: true, reason })
302
- } else if (added > 0) {
303
- await maybeCommitByThreshold(state)
304
- }
305
- await enqueueSave()
306
- return true
299
+ // Overlapping flushes of one session (e.g. session.idle and dispose) must
300
+ // not send the same pending messages twice.
301
+ const run = (state.flushChain ?? Promise.resolve()).then(async () => {
302
+ const added = await flushPendingMessages(opencodeSessionId, state)
303
+ if (commit && isCaptureEnabled(config)) {
304
+ await commitOvSession(state.ovSessionId, { force: true, reason })
305
+ } else if (added > 0) {
306
+ await maybeCommitByThreshold(state)
307
+ }
308
+ await enqueueSave()
309
+ return true
310
+ })
311
+ state.flushChain = run.catch(() => {})
312
+ return run
307
313
  }
308
314
 
309
315
  async function commitSession(sessionId, opencodeSessionId, abortSignal) {
@@ -21,7 +21,9 @@ export function createSessionInject({ config, sessionManager }) {
21
21
  const profile = await buildProfileBlock(clientFetch, config.profileTokenBudget, actorPeerId, config)
22
22
  if (profile?.block) parts.push(profile.block)
23
23
 
24
- const archive = await fetchArchiveBlock(clientFetch, ovSessionId, config.resumeContextBudget)
24
+ const archive = config.resumeArchiveInject
25
+ ? await fetchArchiveBlock(clientFetch, ovSessionId, config.resumeContextBudget)
26
+ : ""
25
27
  if (archive) parts.push(archive)
26
28
 
27
29
  if (parts.length === 0) {
@@ -160,7 +160,7 @@ export const KNOBS = [
160
160
  { name: "noAutoInject", type: "bool", default: false, env: "OPENVIKING_NO_AUTO_INJECT", capability: "session" },
161
161
  { name: "profileTokenBudget", type: "int", default: 10000, min: 500, max: 50000, env: "OPENVIKING_PROFILE_TOKEN_BUDGET", aliases: ["profileBudget"], capability: "session" },
162
162
  { name: "resumeContextBudget", type: "int", default: 32000, min: 1024, max: 128000, env: "OPENVIKING_RESUME_CONTEXT_BUDGET", capability: "session" },
163
- { name: "resumeArchiveInject", type: "bool", default: true, env: "OPENVIKING_RESUME_ARCHIVE_INJECT", capability: "session" },
163
+ { name: "resumeArchiveInject", type: "bool", default: false, env: "OPENVIKING_RESUME_ARCHIVE_INJECT", capability: "session" },
164
164
  { name: "resumeArchiveTokenBudget", type: "int", default: 32000, min: 0, max: 128000, env: "OPENVIKING_RESUME_ARCHIVE_TOKEN_BUDGET", capability: "session" },
165
165
  { name: "resumeArchiveMaxChars", type: "int", default: 6000, min: 1000, max: 200000, env: "OPENVIKING_RESUME_ARCHIVE_MAX_CHARS", capability: "session" },
166
166
  { name: "skillExperience", type: "bool", default: false, env: "OPENVIKING_SKILL_EXPERIENCE", capability: "session" },
@@ -184,7 +184,7 @@ export const KNOBS = [
184
184
  { name: "repoContext", type: "bool", default: true, capability: "session" },
185
185
  { name: "repoContextCacheTtlMs", type: "int", default: 60000, min: 1000, max: 3600000, capability: "session" },
186
186
 
187
- { name: "takeoverEnabled", type: "bool", default: true, env: "OPENVIKING_TAKEOVER", capability: "session" },
187
+ { name: "takeoverEnabled", type: "bool", default: false, env: "OPENVIKING_TAKEOVER", capability: "session" },
188
188
  { name: "takeoverTokenThreshold", type: "int", default: 30000, min: 1, max: 1000000, capability: "session" },
189
189
  { name: "takeoverKeepRecentTurns", type: "int", default: 3, min: 0, max: 100, capability: "session" },
190
190
  { name: "takeoverOverviewBudget", type: "int", default: 3000, min: 100, max: 50000, capability: "session" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openviking/opencode-plugin",
3
- "version": "2026.10.6",
3
+ "version": "2026.10.8",
4
4
  "author": "@openviking",
5
5
  "description": "Unified OpenCode plugin for OpenViking repository retrieval and long-term memory",
6
6
  "type": "module",
@@ -46,5 +46,5 @@
46
46
  "code-search"
47
47
  ],
48
48
  "license": "Apache-2.0",
49
- "openvikingSourceCommit": "930173ac3c08e5f6d08159e62da33c1f439999a3"
49
+ "openvikingSourceCommit": "0df1630a3edc8c45f6b986b830d06888261dedf4"
50
50
  }