@inteeka/task-cli 0.1.3 → 0.1.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/cli.js +26 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1772,7 +1772,6 @@ async function generateFixPromptJson(args) {
|
|
|
1772
1772
|
].join("\n");
|
|
1773
1773
|
const cliArgs = [
|
|
1774
1774
|
"--print",
|
|
1775
|
-
"--bare",
|
|
1776
1775
|
"--output-format",
|
|
1777
1776
|
"json",
|
|
1778
1777
|
"--tools",
|
|
@@ -1812,6 +1811,18 @@ async function generateFixPromptJson(args) {
|
|
|
1812
1811
|
reject(new LlmGenerationError("aborted", "claude was aborted"));
|
|
1813
1812
|
return;
|
|
1814
1813
|
}
|
|
1814
|
+
const authFailure = detectAuthFailure(stdoutBuf);
|
|
1815
|
+
if (authFailure) {
|
|
1816
|
+
const dump = await maybeDumpDebug(args.ticketId, stdoutBuf, stderrBuf);
|
|
1817
|
+
reject(
|
|
1818
|
+
new LlmGenerationError(
|
|
1819
|
+
"non_zero_exit",
|
|
1820
|
+
`Claude is not logged in. Run \`claude /login\` once on this machine, then re-run \`task scan\`.${dump ? ` (raw output: ${dump})` : ""}`,
|
|
1821
|
+
dump ?? void 0
|
|
1822
|
+
)
|
|
1823
|
+
);
|
|
1824
|
+
return;
|
|
1825
|
+
}
|
|
1815
1826
|
if (code !== 0) {
|
|
1816
1827
|
const dump = await maybeDumpDebug(args.ticketId, stdoutBuf, stderrBuf);
|
|
1817
1828
|
reject(
|
|
@@ -1848,6 +1859,19 @@ async function generateFixPromptJson(args) {
|
|
|
1848
1859
|
child.stdin?.end();
|
|
1849
1860
|
});
|
|
1850
1861
|
}
|
|
1862
|
+
function detectAuthFailure(raw) {
|
|
1863
|
+
const trimmed = raw.trim();
|
|
1864
|
+
if (!trimmed) return false;
|
|
1865
|
+
try {
|
|
1866
|
+
const env = JSON.parse(trimmed);
|
|
1867
|
+
if (env.is_error === true && typeof env.result === "string") {
|
|
1868
|
+
const msg = env.result.toLowerCase();
|
|
1869
|
+
return msg.includes("not logged in") || msg.includes("please run /login") || msg.includes("please log in");
|
|
1870
|
+
}
|
|
1871
|
+
} catch {
|
|
1872
|
+
}
|
|
1873
|
+
return false;
|
|
1874
|
+
}
|
|
1851
1875
|
function extractEnvelopeText(raw) {
|
|
1852
1876
|
const trimmed = raw.trim();
|
|
1853
1877
|
if (!trimmed) return raw;
|
|
@@ -3227,7 +3251,7 @@ function checkBinary(name, command) {
|
|
|
3227
3251
|
}
|
|
3228
3252
|
|
|
3229
3253
|
// src/commands/version.ts
|
|
3230
|
-
var CLI_VERSION = true ? "0.1.
|
|
3254
|
+
var CLI_VERSION = true ? "0.1.4" : "0.0.0-dev";
|
|
3231
3255
|
function registerVersion(program2) {
|
|
3232
3256
|
program2.command("version").description("Print the CLI version").action(() => {
|
|
3233
3257
|
process.stdout.write(CLI_VERSION + "\n");
|