Repository navigation
fix(qoder): upgrade agent SDK for qodercli 1.1.81 - #96
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@qoder-ai/qoder-agent-sdk1.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.ProcessTransport.defaultso the daemon launches the user's installed CLI, pass the SDK runtime env opt-ins throughoptions.env, and stop/restart the daemon on CLI path or edition changes, after login, and on plugin unload..unref, user messages must not carry a stalesession_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 typechecknpm run lintnpm run test(3616)npm run buildnpm run release:checknpm run audit:prod— reports 10 advisories, identical onorigin/main(qs/zod via@modelcontextprotocol/sdk). Not introduced by this PR; CI will stay red until those deps are refreshed separately.Safety
CHANGELOG.md