mirror of
https://github.com/rait-09/obsidian-agent-client.git
synced 2026-07-22 06:43:37 +00:00
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.
51 lines
1.5 KiB
JSON
51 lines
1.5 KiB
JSON
{
|
|
"name": "obsidian-agent-client",
|
|
"version": "0.10.6",
|
|
"description": "Use AI coding agents via the Agent Client Protocol directly inside Obsidian",
|
|
"main": "main.js",
|
|
"scripts": {
|
|
"dev": "node esbuild.config.mjs",
|
|
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"version": "node version-bump.mjs && git add manifest.json versions.json",
|
|
"format": "prettier --write \"src/**/*.{ts,tsx}\" \"*.css\"",
|
|
"format:check": "prettier --check \"src/**/*.{ts,tsx}\" \"*.css\"",
|
|
"lint": "eslint .",
|
|
"lint:fix": "eslint . --fix",
|
|
"docs:dev": "vitepress dev docs",
|
|
"docs:build": "vitepress build docs",
|
|
"docs:preview": "vitepress preview docs"
|
|
},
|
|
"keywords": [],
|
|
"author": "",
|
|
"license": "Apache-2.0",
|
|
"devDependencies": {
|
|
"@types/node": "^16.11.6",
|
|
"@types/react": "18.3.29",
|
|
"@types/react-dom": "18.3.7",
|
|
"@types/semver": "^7.7.1",
|
|
"@typescript-eslint/parser": "^8.0.0",
|
|
"@typescript-eslint/utils": "^8.0.0",
|
|
"esbuild": "0.17.3",
|
|
"eslint": "^9.0.0",
|
|
"eslint-plugin-obsidianmd": "^0.1.9",
|
|
"obsidian": "latest",
|
|
"prettier": "^3.4.2",
|
|
"tslib": "2.4.0",
|
|
"typescript": "^5.9.3",
|
|
"typescript-eslint": "^8.0.0",
|
|
"vitepress": "^1.6.4",
|
|
"vitest": "^4.1.8"
|
|
},
|
|
"dependencies": {
|
|
"@agentclientprotocol/sdk": "^0.14.1",
|
|
"@codemirror/state": "6.5.0",
|
|
"@codemirror/view": "^6.35.0",
|
|
"@tanstack/react-virtual": "^3.13.23",
|
|
"diff": "^8.0.2",
|
|
"react": "18.3.1",
|
|
"react-dom": "18.3.1",
|
|
"semver": "^7.7.3"
|
|
}
|
|
}
|