@inteeka/task-cli 0.1.6 → 0.1.7
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 +14 -2
- package/dist/cli.js.map +1 -1
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -1876,8 +1876,9 @@ async function generateFixPromptJson(args) {
|
|
|
1876
1876
|
);
|
|
1877
1877
|
return;
|
|
1878
1878
|
}
|
|
1879
|
+
const structuredFromEnvelope = extractStructuredOutput(stdoutBuf);
|
|
1879
1880
|
const innerText = extractEnvelopeText(stdoutBuf);
|
|
1880
|
-
const parsed = parseStructuredJson(innerText);
|
|
1881
|
+
const parsed = structuredFromEnvelope ?? parseStructuredJson(innerText);
|
|
1881
1882
|
if (!parsed) {
|
|
1882
1883
|
const dump = await maybeDumpDebug(args.ticketId, stdoutBuf, stderrBuf);
|
|
1883
1884
|
reject(
|
|
@@ -1914,6 +1915,17 @@ function detectAuthFailure(raw) {
|
|
|
1914
1915
|
}
|
|
1915
1916
|
return false;
|
|
1916
1917
|
}
|
|
1918
|
+
function extractStructuredOutput(raw) {
|
|
1919
|
+
const trimmed = raw.trim();
|
|
1920
|
+
if (!trimmed) return null;
|
|
1921
|
+
try {
|
|
1922
|
+
const env = JSON.parse(trimmed);
|
|
1923
|
+
const so = env.structured_output;
|
|
1924
|
+
if (so && typeof so === "object") return so;
|
|
1925
|
+
} catch {
|
|
1926
|
+
}
|
|
1927
|
+
return null;
|
|
1928
|
+
}
|
|
1917
1929
|
function extractEnvelopeText(raw) {
|
|
1918
1930
|
const trimmed = raw.trim();
|
|
1919
1931
|
if (!trimmed) return raw;
|
|
@@ -3333,7 +3345,7 @@ function checkBinary(name, command) {
|
|
|
3333
3345
|
}
|
|
3334
3346
|
|
|
3335
3347
|
// src/commands/version.ts
|
|
3336
|
-
var CLI_VERSION = true ? "0.1.
|
|
3348
|
+
var CLI_VERSION = true ? "0.1.7" : "0.0.0-dev";
|
|
3337
3349
|
function registerVersion(program2) {
|
|
3338
3350
|
program2.command("version").description("Print the CLI version").action(() => {
|
|
3339
3351
|
process.stdout.write(CLI_VERSION + "\n");
|