Add vitest suites for parseAgentBlock and resolveImageSrc, including the
path-traversal guard that shipped without coverage: chat/button parsing,
the lenient boolean spellings (true/false/yes/no/on/off/1/0 and bare
numeric 1/0), height normalization, every viewType alias, structural
errors, the parse cache's reference identity, URL/data passthrough, and
rejection of vault-escaping image paths (.. / absolute / drive-letter /
~). Extend the obsidian test stub with parseYaml, FileSystemAdapter, and
a ..-preserving normalizePath, and promote yaml to an explicit
devDependency.
Add a usage page documenting the fence languages, all chat/button
options, the device-local persistence model and id auto-injection, and
the validation and warning behavior, with a sidebar entry.
Bump the ACP SDK from 0.14.1 to 0.28.1 (PROTOCOL_VERSION unchanged, so a
direct jump). Adapt the existing client to the SDK's breaking changes while
keeping existing features working; new 0.28 features (elicitation, NES,
providers, document lifecycle) are out of scope.
- Renames: unstable_listSessions->listSessions, unstable_resumeSession->
resumeSession (both stabilized); KillTerminalCommand{Request,Response}->
KillTerminal{Request,Response} (type-only).
- SessionConfigOption became a select|boolean union. The domain type now
carries boolean as data (UI renders/sets only select for now); the
converter and all consumers narrow on type === "select".
- The model API (unstable_setSessionModel, SessionModelState) was removed
from the SDK; model is now a config option. Remove the legacy model path
(setSessionModel, the model dropdown, SessionModel(State) domain types)
but KEEP lastUsedModels + the config-option model restore/save that back
model persistence. Mode keeps its legacy API (still in the SDK).
- zod is now a runtime (peer) dependency of the SDK for schema validation;
add it to dependencies so it bundles into main.js.
- Restore @eslint/json devDep (legacy-peer-deps had pruned this optional
peer that the lint config loads).
ClientSideConnection is deprecated in 0.28 (new: client() builder, scoped
connectWith) but kept for now with documented eslint-disables; migrating
the connection lifecycle is a separate follow-up.
WSL agent launch previously wrapped the command in a nested
`sh -c "<baked string>"` construction. In some environments (e.g. RHEL8)
this fails before ACP connects (the process exits 1), and command
paths/args with spaces broke because the command was interpolated
unescaped.
Launch agents instead with:
wsl.exe [--exec] /bin/sh -c '<constant launcher>' sh <pathDir> <cwd> <command> <args...>
This skips wsl's default-shell layer (--exec), runs under the user's
login shell so ~/.profile is sourced (environment preserved, unlike a
bare --exec), and passes command/args as argv (no quoting of user data).
Also forward configured env vars (API keys, custom agent env, tool env)
into WSL via WSLENV (buildWslEnv), so the plugin's API key field works in
WSL mode without requiring keys in ~/.profile. Defensive: skips empty
values and invalid names, merges existing WSLENV, never throws.
Add a vitest unit-test suite for the platform WSL helpers (39 cases,
incl. exact argv-ordering checks), with an obsidian stub alias and a
dedicated tsconfig for typed linting of tests.
Builds on #304 (direct WSL exec for absolute-path commands); this retains
the environment that a bare --exec would drop and also fixes paths/args
with spaces.
Terminal launch keeps the existing wrapper for now (env forwarding is
applied); a terminal-specific hybrid follows separately.