@inteeka/task-cli 0.1.8 → 0.1.10
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 +31 -4
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1610,10 +1610,10 @@ async function runWork(ticketId, opts) {
|
|
|
1610
1610
|
"GET",
|
|
1611
1611
|
`/api/v1/cli/me/tickets/${targetId}`
|
|
1612
1612
|
);
|
|
1613
|
-
if (detail.ai_fix_status !== "approved") {
|
|
1613
|
+
if (detail.ai_fix_status !== "approved" && detail.ai_fix_status !== "building") {
|
|
1614
1614
|
throw new CliError(
|
|
1615
1615
|
CLI_EXIT_CODES.GENERIC_ERROR,
|
|
1616
|
-
`Ticket #${detail.sequence_number} is in ai_fix_status='${detail.ai_fix_status}', expected 'approved'`,
|
|
1616
|
+
`Ticket #${detail.sequence_number} is in ai_fix_status='${detail.ai_fix_status}', expected 'approved' or 'building'`,
|
|
1617
1617
|
"Ask an admin to re-approve, or run task work again to pick a different ticket."
|
|
1618
1618
|
);
|
|
1619
1619
|
}
|
|
@@ -1660,6 +1660,28 @@ ${c.bold(`#${detail.sequence_number}: ${detail.title}`)}
|
|
|
1660
1660
|
output_excerpt: branchName
|
|
1661
1661
|
}
|
|
1662
1662
|
});
|
|
1663
|
+
try {
|
|
1664
|
+
await apiCallOrThrow(
|
|
1665
|
+
"POST",
|
|
1666
|
+
`/api/v1/cli/me/tickets/${detail.id}/claim`
|
|
1667
|
+
);
|
|
1668
|
+
} catch (err) {
|
|
1669
|
+
try {
|
|
1670
|
+
checkoutBranch(cwd, baseBranch);
|
|
1671
|
+
} catch {
|
|
1672
|
+
}
|
|
1673
|
+
deleteLocalBranch(cwd, branchName);
|
|
1674
|
+
await apiCall("POST", "/api/v1/cli/me/runs", {
|
|
1675
|
+
body: {
|
|
1676
|
+
ticket_id: detail.id,
|
|
1677
|
+
schedule_id: opts.scheduleId,
|
|
1678
|
+
event: "branch_check_failed",
|
|
1679
|
+
claude_session_id: runId,
|
|
1680
|
+
output_excerpt: err.message.slice(0, 4e3)
|
|
1681
|
+
}
|
|
1682
|
+
});
|
|
1683
|
+
throw err;
|
|
1684
|
+
}
|
|
1663
1685
|
const approvedFix = detail.ai_fix_structured;
|
|
1664
1686
|
const ticketBlock = [
|
|
1665
1687
|
`# Ticket #${detail.sequence_number}: ${detail.title}`,
|
|
@@ -2186,7 +2208,12 @@ var FIX_PROMPT_JSON_SCHEMA = {
|
|
|
2186
2208
|
}
|
|
2187
2209
|
},
|
|
2188
2210
|
risk_notes: { type: "string", maxLength: 2e3 },
|
|
2189
|
-
confidence: { type: "string", enum: ["low", "medium", "high"] }
|
|
2211
|
+
confidence: { type: "string", enum: ["low", "medium", "high"] },
|
|
2212
|
+
// Phase 3 — explicit reasoning for the confidence rating. Required at
|
|
2213
|
+
// ≥20 chars for low/medium ratings; the dashboard's Zod refine() rejects
|
|
2214
|
+
// anything shorter on `/submit`. Optional on `high` so the model can
|
|
2215
|
+
// omit it when the evidence is overwhelming.
|
|
2216
|
+
confidence_reason: { type: "string", maxLength: 1500 }
|
|
2190
2217
|
}
|
|
2191
2218
|
};
|
|
2192
2219
|
var LlmGenerationError = class extends Error {
|
|
@@ -3740,7 +3767,7 @@ function checkBinary(name, command) {
|
|
|
3740
3767
|
}
|
|
3741
3768
|
|
|
3742
3769
|
// src/commands/version.ts
|
|
3743
|
-
var CLI_VERSION = true ? "0.1.
|
|
3770
|
+
var CLI_VERSION = true ? "0.1.10" : "0.0.0-dev";
|
|
3744
3771
|
function registerVersion(program2) {
|
|
3745
3772
|
program2.command("version").description("Print the CLI version").action(() => {
|
|
3746
3773
|
process.stdout.write(CLI_VERSION + "\n");
|