Skip to content

fix(qoder): upgrade agent SDK for qodercli 1.1.81 - #96

Merged
luoxuanzao merged 5 commits into
mainfrom
feat/sdk-1.0.58
Oct 30, 2026
Merged

luoxuanzao merged 5 commits into
mainfrom
feat/sdk-1.0.58

Conversation

@luoxuanzao

Copy link
Copy Markdown
Member

Summary

  • Upgrade @qoder-ai/qoder-agent-sdk 1.0.45 → 1.0.58, the release paired with qodercli 1.1.81. CLI 1.1.81 rejects SDK worker sessions (sdk_worker_removed), so the old SDK can no longer start a session.
  • Adopt the SDK's process-wide daemon: pin ProcessTransport.default so the daemon launches the user's installed CLI, pass the SDK runtime env opt-ins through options.env, and stop/restart the daemon on CLI path or edition changes, after login, and on plugin unload.
  • Fix daemon integration regressions found in real-app testing: renderer timers lack .unref, user messages must not carry a stale session_id, and the first turn of a restored session could restart a query whose daemon session was still opening.

Also syncs the lockfile and adds an Unreleased changelog entry.

Verification

  • npm run typecheck
  • npm run lint
  • npm run test (3616)
  • npm run build
  • npm run release:check
  • npm run audit:prod — reports 10 advisories, identical on origin/main (qs/zod via @modelcontextprotocol/sdk). Not introduced by this PR; CI will stay red until those deps are refreshed separately.
  • Tested affected qodercli behavior against a real CLI
    • qodercli 1.1.81 in Obsidian: catalog (71 commands, 16 models), multi-turn, two concurrent sessions, credits panel, interrupt, steer, queue pause/resume, restart-resume, plugin disable/enable
    • qodercli 1.1.58: catalog sanity check

Safety

  • No credentials, private vault content, internal URLs, or personal paths are included
  • User-visible changes are documented in CHANGELOG.md

luoxuanzao and others added 5 commits October 30, 2026 17:18
qodercli 1.1.81 rejects SDK worker sessions with sdk_worker_removed, so SDK
1.0.45 can no longer start a session. SDK 1.0.58 pairs with 1.1.81, but it
moves every query onto a process-wide daemon: the daemon ignores
spawnQoderCLIProcess and defaults to its bundled worker runtime, which the
plugin does not ship.

Pin ProcessTransport.default so the daemon launches the user's CLI, pass the
SDK runtime env opt-ins through options.env (the spawn hook no longer sees the
daemon launch), and stop the daemon when the CLI path or edition changes,
after login, and on plugin unload so new configuration and credentials take
effect.

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
Obsidian plugins run in a renderer process where setInterval returns a numeric
id, so the SDK's heartbeat watchdog threw
"this.heartbeatWatchdog.unref is not a function" on the first query. Extend
the existing renderer unref build patch to rewrite that site to unref?.() and
teach the unsafe-site guard to spot the assignment-plus-unref shape.

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
SDK 1.0.58 validates a user message's session_id against the daemon session
and rejects a stale value, which broke every send with
"Query message session_id must match daemon Session". Drop the field from
user messages so the SDK stamps the live session id itself.

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
Daemon sessions are claimed client-side while opening, so restarting a query
inside that window leaves the slot stuck and the next resume fails with
SESSION_ALREADY_OPEN. The first turn of a restored session could trigger that
restart because the query started without the turn's external context and
applyDynamicUpdates immediately restarted it. Pass the paths when starting the
query so the launch config already matches.

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
@luoxuanzao
luoxuanzao merged commit ec4ddfc into main Oct 30, 2026
9 of 10 checks passed
@luoxuanzao
luoxuanzao deleted the feat/sdk-1.0.58 branch October 30, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant