lody 0.70.1 → 0.70.2
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/index.js +93 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -4190,7 +4190,7 @@ let __tla = Promise.all([
|
|
|
4190
4190
|
}
|
|
4191
4191
|
}
|
|
4192
4192
|
const name$1 = "lody";
|
|
4193
|
-
const version$6 = "0.70.
|
|
4193
|
+
const version$6 = "0.70.2";
|
|
4194
4194
|
const description$1 = "Lody Agent CLI tool for managing remote command execution";
|
|
4195
4195
|
const type$2 = "module";
|
|
4196
4196
|
const main$4 = "dist/index.js";
|
|
@@ -45282,10 +45282,29 @@ ${fromBody}`;
|
|
|
45282
45282
|
return !validation2.valid && validation2.reason !== "invalid";
|
|
45283
45283
|
}
|
|
45284
45284
|
function formatUnknownError$3(error2) {
|
|
45285
|
-
if (error2 instanceof Error) {
|
|
45286
|
-
return
|
|
45285
|
+
if (!(error2 instanceof Error)) {
|
|
45286
|
+
return String(error2);
|
|
45287
45287
|
}
|
|
45288
|
-
|
|
45288
|
+
const parts2 = [
|
|
45289
|
+
`${error2.name}: ${error2.message}`
|
|
45290
|
+
];
|
|
45291
|
+
let cause = error2.cause;
|
|
45292
|
+
for (let depth = 0; cause !== void 0 && cause !== null && depth < 3; depth += 1) {
|
|
45293
|
+
if (cause instanceof AggregateError && cause.errors.length > 0) {
|
|
45294
|
+
const nested = cause.errors.slice(0, 3).map((entry) => formatUnknownError$3(entry)).join("; ");
|
|
45295
|
+
parts2.push(`caused by ${cause.name}: ${cause.message || "multiple errors"} [${nested}]`);
|
|
45296
|
+
break;
|
|
45297
|
+
}
|
|
45298
|
+
if (cause instanceof Error) {
|
|
45299
|
+
const code2 = cause.code;
|
|
45300
|
+
parts2.push(`caused by ${cause.name}${code2 ? ` (${code2})` : ""}: ${cause.message}`);
|
|
45301
|
+
cause = cause.cause;
|
|
45302
|
+
} else {
|
|
45303
|
+
parts2.push(`caused by ${String(cause)}`);
|
|
45304
|
+
break;
|
|
45305
|
+
}
|
|
45306
|
+
}
|
|
45307
|
+
return parts2.join(" \u2014 ");
|
|
45289
45308
|
}
|
|
45290
45309
|
function isRetryableTokenValidationStatus(status) {
|
|
45291
45310
|
return status === 408 || status === 429 || status >= 500;
|
|
@@ -45755,7 +45774,7 @@ ${fromBody}`;
|
|
|
45755
45774
|
}
|
|
45756
45775
|
};
|
|
45757
45776
|
} catch (error2) {
|
|
45758
|
-
getLogger("auth").error(`Token validation failed: ${error2}`);
|
|
45777
|
+
getLogger("auth").error(`Token validation failed: ${formatUnknownError$3(error2)}`);
|
|
45759
45778
|
return {
|
|
45760
45779
|
valid: false,
|
|
45761
45780
|
retryable: true,
|
|
@@ -207512,6 +207531,72 @@ ${lines2.join("\n")}` : ""}${suffix}`);
|
|
|
207512
207531
|
return main.exports;
|
|
207513
207532
|
}
|
|
207514
207533
|
var mainExports = requireMain();
|
|
207534
|
+
const VALID_ORDERS = /* @__PURE__ */ new Set([
|
|
207535
|
+
"ipv4first",
|
|
207536
|
+
"ipv6first",
|
|
207537
|
+
"verbatim"
|
|
207538
|
+
]);
|
|
207539
|
+
const RUNTIME_DEFAULT_VALUES = /* @__PURE__ */ new Set([
|
|
207540
|
+
"node",
|
|
207541
|
+
"native",
|
|
207542
|
+
"default",
|
|
207543
|
+
"verbatim"
|
|
207544
|
+
]);
|
|
207545
|
+
const DNS_RESULT_ORDER_FLAG = "--dns-result-order";
|
|
207546
|
+
function hasExplicitNodeFlag(execArgv, nodeOptions) {
|
|
207547
|
+
if (execArgv.some((arg) => arg === DNS_RESULT_ORDER_FLAG || arg.startsWith(`${DNS_RESULT_ORDER_FLAG}=`))) {
|
|
207548
|
+
return true;
|
|
207549
|
+
}
|
|
207550
|
+
return typeof nodeOptions === "string" && nodeOptions.includes(DNS_RESULT_ORDER_FLAG);
|
|
207551
|
+
}
|
|
207552
|
+
function resolveDnsResultOrder(env2 = process.env, execArgv = process.execArgv) {
|
|
207553
|
+
if (hasExplicitNodeFlag(execArgv, env2.NODE_OPTIONS)) {
|
|
207554
|
+
return {
|
|
207555
|
+
order: null,
|
|
207556
|
+
reason: "explicit-node-flag"
|
|
207557
|
+
};
|
|
207558
|
+
}
|
|
207559
|
+
const configured = env2.LODY_DNS_RESULT_ORDER?.trim().toLowerCase();
|
|
207560
|
+
if (configured) {
|
|
207561
|
+
if (RUNTIME_DEFAULT_VALUES.has(configured)) {
|
|
207562
|
+
return {
|
|
207563
|
+
order: null,
|
|
207564
|
+
reason: "env-runtime-default"
|
|
207565
|
+
};
|
|
207566
|
+
}
|
|
207567
|
+
if (VALID_ORDERS.has(configured)) {
|
|
207568
|
+
return {
|
|
207569
|
+
order: configured,
|
|
207570
|
+
reason: "env"
|
|
207571
|
+
};
|
|
207572
|
+
}
|
|
207573
|
+
return {
|
|
207574
|
+
order: "ipv4first",
|
|
207575
|
+
reason: "env-invalid"
|
|
207576
|
+
};
|
|
207577
|
+
}
|
|
207578
|
+
return {
|
|
207579
|
+
order: "ipv4first",
|
|
207580
|
+
reason: "default"
|
|
207581
|
+
};
|
|
207582
|
+
}
|
|
207583
|
+
function applyDefaultDnsResultOrder(options = {}) {
|
|
207584
|
+
const logger2 = options.logger ?? getLogger("dns");
|
|
207585
|
+
const resolution = resolveDnsResultOrder(options.env);
|
|
207586
|
+
if (resolution.order === null) {
|
|
207587
|
+
logger2.debug(`[dns] keeping runtime DNS result order (${resolution.reason})`);
|
|
207588
|
+
return;
|
|
207589
|
+
}
|
|
207590
|
+
if (resolution.reason === "env-invalid") {
|
|
207591
|
+
logger2.warn(`[dns] invalid LODY_DNS_RESULT_ORDER value; expected ipv4first|ipv6first|verbatim|node \u2014 falling back to ipv4first`);
|
|
207592
|
+
}
|
|
207593
|
+
try {
|
|
207594
|
+
require$$1$9.setDefaultResultOrder(resolution.order);
|
|
207595
|
+
logger2.debug(`[dns] default DNS result order set to ${resolution.order} (${resolution.reason})`);
|
|
207596
|
+
} catch (error2) {
|
|
207597
|
+
logger2.debug(`[dns] failed to set DNS result order: ${error2 instanceof Error ? error2.message : String(error2)}`);
|
|
207598
|
+
}
|
|
207599
|
+
}
|
|
207515
207600
|
const cliLogger = getLogger("cli");
|
|
207516
207601
|
function loadEnvironmentVariables() {
|
|
207517
207602
|
const runtimeEnv2 = getRuntimeEnv();
|
|
@@ -207526,6 +207611,9 @@ ${lines2.join("\n")}` : ""}${suffix}`);
|
|
|
207526
207611
|
loadEnv();
|
|
207527
207612
|
}
|
|
207528
207613
|
loadEnvironmentVariables();
|
|
207614
|
+
applyDefaultDnsResultOrder({
|
|
207615
|
+
logger: getLogger("dns")
|
|
207616
|
+
});
|
|
207529
207617
|
installCliHttpGlobalDispatcher({
|
|
207530
207618
|
logger: getLogger("http-transport")
|
|
207531
207619
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lody",
|
|
3
|
-
"version": "0.70.
|
|
3
|
+
"version": "0.70.2",
|
|
4
4
|
"description": "Lody Agent CLI tool for managing remote command execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -81,9 +81,9 @@
|
|
|
81
81
|
"@lody/loro-streams-rpc": "0.0.1",
|
|
82
82
|
"@lody/shared": "0.0.1",
|
|
83
83
|
"acp-extension-claude": "0.58.0",
|
|
84
|
+
"acp-extension-codex": "1.2.1",
|
|
84
85
|
"acp-extension-core": "0.0.5",
|
|
85
|
-
"lody-code-review-viewer": "0.70.1"
|
|
86
|
-
"acp-extension-codex": "1.2.1"
|
|
86
|
+
"lody-code-review-viewer": "0.70.1"
|
|
87
87
|
},
|
|
88
88
|
"files": [
|
|
89
89
|
"dist",
|