@host0/cli 0.1.0 → 0.1.1
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/host0.mjs +3 -3
- package/package.json +1 -1
package/dist/host0.mjs
CHANGED
|
@@ -281,7 +281,7 @@ async function apiProbe(ctx, path) {
|
|
|
281
281
|
import { statSync } from "node:fs";
|
|
282
282
|
|
|
283
283
|
// src/version.ts
|
|
284
|
-
var VERSION = "0.1.
|
|
284
|
+
var VERSION = "0.1.1";
|
|
285
285
|
|
|
286
286
|
// src/agent.ts
|
|
287
287
|
function isDir(path) {
|
|
@@ -292,7 +292,7 @@ function isDir(path) {
|
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
function detectAgent(env = process.env, devinDir = "/opt/.devin") {
|
|
295
|
-
if (env.AI_AGENT) return env.AI_AGENT;
|
|
295
|
+
if (env.AI_AGENT) return env.AI_AGENT.replace(/^([^_]+)_[0-9][0-9.-]*_agent$/, "$1");
|
|
296
296
|
if (env.CLAUDECODE || env.CLAUDE_CODE) return env.CLAUDE_CODE_IS_COWORK ? "claude-cowork" : "claude-code";
|
|
297
297
|
if (env.CODEX_SANDBOX || env.CODEX_CI || env.CODEX_THREAD_ID) return "codex";
|
|
298
298
|
if (env.GEMINI_CLI) return "gemini-cli";
|
|
@@ -1317,7 +1317,7 @@ import { dirname as dirname4, join as join4, resolve as resolve2 } from "node:pa
|
|
|
1317
1317
|
var str2 = (v) => v === void 0 || v === null ? "" : jqRaw(v);
|
|
1318
1318
|
function isSafeRelativePath(path) {
|
|
1319
1319
|
const parts = `/${path}/`.split(/[\\/]/).slice(1, -1);
|
|
1320
|
-
return path !== "" && parts[0] !== ".host0" && !parts.some((p) => p === "" || p === "." || p === "..");
|
|
1320
|
+
return path !== "" && parts[0].toLowerCase() !== ".host0" && !parts.some((p) => p === "" || p === "." || p === "..");
|
|
1321
1321
|
}
|
|
1322
1322
|
function isSymlink(path) {
|
|
1323
1323
|
try {
|