agentsw 0.5.3 → 0.5.4
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/dist/apps.js +15 -14
- package/package.json +1 -1
package/dist/apps.js
CHANGED
|
@@ -79,8 +79,9 @@ export const appPackages = [
|
|
|
79
79
|
{
|
|
80
80
|
id: "dsh",
|
|
81
81
|
name: "DeepSeek Harness",
|
|
82
|
-
|
|
83
|
-
//
|
|
82
|
+
binary: "dsh",
|
|
83
|
+
// dsh may be globally installed (binary in PATH) or used via npx only.
|
|
84
|
+
// installedVersion() probes the binary first; localVersion() covers npx-only users.
|
|
84
85
|
latest: { kind: "npm", name: "@deepseek-ai/dsh" },
|
|
85
86
|
installCmd: "npm install -g @deepseek-ai/dsh@latest",
|
|
86
87
|
upgradeCmd: "npm install -g @deepseek-ai/dsh@latest",
|
|
@@ -96,7 +97,18 @@ function dshHome() {
|
|
|
96
97
|
}
|
|
97
98
|
/** dsh version: search npx cache for @deepseek-ai/dsh, fall back to "?" if config dir exists. */
|
|
98
99
|
function dshLocalVersion() {
|
|
99
|
-
// 1.
|
|
100
|
+
// 1. Fast path: check global node_modules directly (no subprocess)
|
|
101
|
+
try {
|
|
102
|
+
const globalRoot = execSync("npm root -g", {
|
|
103
|
+
encoding: "utf8", timeout: 5000, stdio: ["ignore", "pipe", "pipe"],
|
|
104
|
+
}).trim();
|
|
105
|
+
const pkg = path.join(globalRoot, "@deepseek-ai", "dsh", "package.json");
|
|
106
|
+
if (fs.existsSync(pkg)) {
|
|
107
|
+
return JSON.parse(fs.readFileSync(pkg, "utf8")).version;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
catch { /* npm not available */ }
|
|
111
|
+
// 2. Check npx cache (~/.npm/_npx/*/node_modules/@deepseek-ai/dsh/package.json)
|
|
100
112
|
const npxCache = path.join(home, ".npm", "_npx");
|
|
101
113
|
if (fs.existsSync(npxCache)) {
|
|
102
114
|
for (const dir of fs.readdirSync(npxCache)) {
|
|
@@ -111,17 +123,6 @@ function dshLocalVersion() {
|
|
|
111
123
|
}
|
|
112
124
|
}
|
|
113
125
|
}
|
|
114
|
-
// 2. Check global npm install
|
|
115
|
-
try {
|
|
116
|
-
const out = execSync("npm ls -g @deepseek-ai/dsh --json --depth=0", {
|
|
117
|
-
encoding: "utf8", timeout: 10000, stdio: ["ignore", "pipe", "pipe"],
|
|
118
|
-
});
|
|
119
|
-
const parsed = JSON.parse(out);
|
|
120
|
-
const v = parsed?.dependencies?.["@deepseek-ai/dsh"]?.version;
|
|
121
|
-
if (v)
|
|
122
|
-
return v;
|
|
123
|
-
}
|
|
124
|
-
catch { /* not installed globally */ }
|
|
125
126
|
// 3. Config dir exists -> used via npx, version unknown
|
|
126
127
|
if (fs.existsSync(dshHome()))
|
|
127
128
|
return "?";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentsw",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "CLI provider switcher for coding agents: manage OpenAI/Anthropic-protocol providers in one place and sync them, with models.dev metadata, into Claude Code, Codex, omp, pi, prime-agent, opencode, Hermes, WorkBuddy and DeepSeek Harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|