aitasks 1.3.4 → 1.3.6
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 +83 -39
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1890,7 +1890,7 @@ var require_commander = __commonJS((exports) => {
|
|
|
1890
1890
|
var require_package = __commonJS((exports, module) => {
|
|
1891
1891
|
module.exports = {
|
|
1892
1892
|
name: "aitasks",
|
|
1893
|
-
version: "1.3.
|
|
1893
|
+
version: "1.3.6",
|
|
1894
1894
|
description: "CLI task management tool built for AI agents",
|
|
1895
1895
|
type: "module",
|
|
1896
1896
|
bin: {
|
|
@@ -29426,26 +29426,27 @@ ${reviewRequired ? `3. Submit for review \u2014 you CANNOT mark done directly:
|
|
|
29426
29426
|
\`\`\`bash
|
|
29427
29427
|
aitasks review TASK-001 --agent $AITASKS_AGENT_ID
|
|
29428
29428
|
\`\`\`
|
|
29429
|
-
**
|
|
29429
|
+
**Do not run \`aitasks done\` yourself.** The system will block self-approval.
|
|
29430
29430
|
|
|
29431
|
-
4. **
|
|
29432
|
-
|
|
29431
|
+
4. **IN THIS SAME SESSION**, immediately spawn a review sub-agent with a DIFFERENT agent ID.
|
|
29432
|
+
Do this NOW \u2014 before writing any summary, before moving to any other task, before anything else.
|
|
29433
29433
|
\`\`\`bash
|
|
29434
29434
|
# Review sub-agent registers itself
|
|
29435
|
-
aitasks heartbeat --agent
|
|
29435
|
+
aitasks heartbeat --agent review-task-001
|
|
29436
29436
|
|
|
29437
29437
|
# Approve (moves task to done):
|
|
29438
|
-
aitasks done TASK-001 --agent
|
|
29438
|
+
aitasks done TASK-001 --agent review-task-001
|
|
29439
29439
|
|
|
29440
29440
|
# OR reject (sends task back to in_progress with feedback):
|
|
29441
|
-
aitasks reject TASK-001 --reason "<specific feedback>" --agent
|
|
29441
|
+
aitasks reject TASK-001 --reason "<specific feedback>" --agent review-task-001
|
|
29442
29442
|
\`\`\`
|
|
29443
|
-
|
|
29444
|
-
|
|
29443
|
+
**Your session is NOT complete after submitting for review. You must remain active and drive the
|
|
29444
|
+
review to completion. The task is still incomplete until \`aitasks done\` succeeds.**
|
|
29445
29445
|
|
|
29446
29446
|
5. If rejected: address the feedback, re-check criteria, and repeat from step 3.
|
|
29447
29447
|
|
|
29448
|
-
> The task is only done when \`aitasks done\` completes successfully. \`review\` status means
|
|
29448
|
+
> The task is only done when \`aitasks done\` completes successfully. \`review\` status means
|
|
29449
|
+
> awaiting approval \u2014 it is NOT done. Do not write a final summary until all tasks are \`done\`.` : `3. Mark done (will FAIL if any criterion is unchecked):
|
|
29449
29450
|
\`\`\`bash
|
|
29450
29451
|
aitasks done TASK-001 --agent $AITASKS_AGENT_ID
|
|
29451
29452
|
\`\`\`
|
|
@@ -29490,9 +29491,28 @@ aitasks unclaim TASK-001 --agent $AITASKS_AGENT_ID --reason "Blocked on missing
|
|
|
29490
29491
|
6. If a task needs splitting, create subtasks BEFORE marking parent done.
|
|
29491
29492
|
7. Your evidence strings must be concrete and verifiable \u2014 not vague affirmations.
|
|
29492
29493
|
8. Always provide --desc, at least one --ac, and --agent when creating a task. All three are required.${reviewRequired ? `
|
|
29493
|
-
9. NEVER move a task to done directly. Always submit for review first with \`aitasks review\`, then IMMEDIATELY spawn a review sub-agent with a DIFFERENT agent ID. Do NOT call \`aitasks done\` yourself
|
|
29494
|
+
9. NEVER move a task to done directly. Always submit for review first with \`aitasks review\`, then IMMEDIATELY spawn a review sub-agent with a DIFFERENT agent ID in the SAME session. Do NOT call \`aitasks done\` yourself \u2014 the system blocks the implementing agent and the agent that submitted the review from self-approving.
|
|
29495
|
+
10. **Do not end your session or write a final summary until every task you worked on is in \`done\` status.** If any task is in \`review\`, you must spawn the review sub-agent NOW in this session. Submitting for review and stopping is an incomplete session.` : ""}
|
|
29494
29496
|
|
|
29495
|
-
|
|
29497
|
+
${reviewRequired ? `---
|
|
29498
|
+
|
|
29499
|
+
### Before Ending Your Session
|
|
29500
|
+
|
|
29501
|
+
**Run this check before writing any final summary or concluding your work:**
|
|
29502
|
+
|
|
29503
|
+
\`\`\`bash
|
|
29504
|
+
aitasks list --json # Check that ALL your tasks are in done status
|
|
29505
|
+
\`\`\`
|
|
29506
|
+
|
|
29507
|
+
- Any task in \`done\` \u2192 \u2713 complete
|
|
29508
|
+
- Any task in \`review\` \u2192 you MUST spawn a review sub-agent NOW in this session before stopping
|
|
29509
|
+
- Any task in \`in_progress\` \u2192 continue implementation
|
|
29510
|
+
|
|
29511
|
+
**You are NOT finished until \`aitasks list\` shows every task you worked on as \`done\`.**
|
|
29512
|
+
Submitting tasks for review and then stopping is an incomplete session. The review sub-agent
|
|
29513
|
+
must be spawned and must approve the task in this same session.
|
|
29514
|
+
|
|
29515
|
+
` : ""}---
|
|
29496
29516
|
|
|
29497
29517
|
### Quick Reference
|
|
29498
29518
|
|
|
@@ -30487,17 +30507,6 @@ function completeTask(taskId, agentId) {
|
|
|
30487
30507
|
` + ` A separate review sub-agent must run: aitasks done ${taskId} --agent <review-agent-id>`
|
|
30488
30508
|
};
|
|
30489
30509
|
}
|
|
30490
|
-
const reviewerRow = db.query(`SELECT first_seen FROM agents WHERE id = ?`).get(agentId);
|
|
30491
|
-
const reviewSubmittedAt = reviewEvent?.created_at ?? 0;
|
|
30492
|
-
if (!reviewerRow || reviewerRow.first_seen > reviewSubmittedAt) {
|
|
30493
|
-
return {
|
|
30494
|
-
task: null,
|
|
30495
|
-
error: `Review agent '${agentId}' was not active before this review was submitted.
|
|
30496
|
-
` + ` A real review sub-agent must be independently spawned \u2014 it cannot be registered
|
|
30497
|
-
` + ` moments before approving. The reviewer must have prior activity in the system
|
|
30498
|
-
` + ` before the review was submitted.`
|
|
30499
|
-
};
|
|
30500
|
-
}
|
|
30501
30510
|
}
|
|
30502
30511
|
const updated = updateTask(taskId, { status: "done", completed_at: Date.now() });
|
|
30503
30512
|
logEvent({ task_id: taskId, agent_id: agentId, event_type: "completed", payload: {} });
|
|
@@ -30517,7 +30526,8 @@ function completeTask(taskId, agentId) {
|
|
|
30517
30526
|
});
|
|
30518
30527
|
}
|
|
30519
30528
|
}
|
|
30520
|
-
|
|
30529
|
+
if (agentId)
|
|
30530
|
+
db.run(`UPDATE agents SET current_task = NULL WHERE id = ?`, [agentId]);
|
|
30521
30531
|
return { task: updated };
|
|
30522
30532
|
}
|
|
30523
30533
|
function blockTask(taskId, blockerIds, agentId) {
|
|
@@ -41236,7 +41246,7 @@ var checkCommand = new Command("check").description("Verify an acceptance criter
|
|
|
41236
41246
|
var doneCommand = new Command("done").description("Mark task(s) as complete (all acceptance criteria must be verified) - supports patterns").argument("<taskId...>", "Task ID(s) - can specify multiple or use patterns (e.g., TASK-00*)").option("--agent <agentId>", "Agent ID (or set AITASKS_AGENT_ID)").option("--json", "Output as JSON").action((taskIds, opts) => {
|
|
41237
41247
|
requireInitialized();
|
|
41238
41248
|
const json = isJsonMode(opts.json);
|
|
41239
|
-
const agent =
|
|
41249
|
+
const agent = opts.agent ?? process.env.AITASKS_AGENT_ID;
|
|
41240
41250
|
const allTaskIds = listTasks().map((t) => t.id);
|
|
41241
41251
|
const resolvedIds = resolveTaskIds(taskIds.map((id) => id.toUpperCase()), allTaskIds);
|
|
41242
41252
|
if (resolvedIds.length === 0) {
|
|
@@ -41391,7 +41401,7 @@ var reviewCommand = new Command("review").description("Request human review for
|
|
|
41391
41401
|
console.log(source_default.dim(` 3. Sub-agent examines implementation and verifies all acceptance criteria`));
|
|
41392
41402
|
console.log(source_default.dim(` 4. Approve: aitasks done ${task.id} --agent review-${task.id.toLowerCase()}`));
|
|
41393
41403
|
console.log(source_default.dim(` Reject: aitasks reject ${task.id} --reason "<feedback>" --agent review-${task.id.toLowerCase()}`));
|
|
41394
|
-
console.log(source_default.dim(` The system will reject approval from
|
|
41404
|
+
console.log(source_default.dim(` The system will reject approval from the implementing agent or the agent that submitted the review.`));
|
|
41395
41405
|
} else {
|
|
41396
41406
|
console.log(source_default.dim(` Approve: aitasks done ${task.id} --agent <review-agent-id>`));
|
|
41397
41407
|
console.log(source_default.dim(` Reject: aitasks reject ${task.id} --reason "<feedback>"`));
|
|
@@ -41953,6 +41963,7 @@ var TreeBoardComponent = ({ getTasks }) => {
|
|
|
41953
41963
|
const [scrollOffset, setScrollOffset] = import_react29.useState(0);
|
|
41954
41964
|
const [leftScrollOffset, setLeftScrollOffset] = import_react29.useState(0);
|
|
41955
41965
|
const [mode, setMode] = import_react29.useState("normal");
|
|
41966
|
+
const [moveError, setMoveError] = import_react29.useState(null);
|
|
41956
41967
|
const [searchQuery, setSearchQuery] = import_react29.useState("");
|
|
41957
41968
|
const { exit } = use_app_default();
|
|
41958
41969
|
const { stdout } = use_stdout_default();
|
|
@@ -42073,9 +42084,23 @@ var TreeBoardComponent = ({ getTasks }) => {
|
|
|
42073
42084
|
};
|
|
42074
42085
|
const newStatus = statusMap[input];
|
|
42075
42086
|
if (newStatus && selectedTask) {
|
|
42076
|
-
|
|
42077
|
-
|
|
42078
|
-
|
|
42087
|
+
if (newStatus === "done") {
|
|
42088
|
+
const { error } = completeTask(selectedTask.id);
|
|
42089
|
+
if (error) {
|
|
42090
|
+
setMoveError(error.split(`
|
|
42091
|
+
`)[0] ?? error);
|
|
42092
|
+
setMode("normal");
|
|
42093
|
+
} else {
|
|
42094
|
+
setMoveError(null);
|
|
42095
|
+
setTasks(getTasks());
|
|
42096
|
+
setMode("normal");
|
|
42097
|
+
}
|
|
42098
|
+
} else {
|
|
42099
|
+
setMoveError(null);
|
|
42100
|
+
updateTask(selectedTask.id, { status: newStatus });
|
|
42101
|
+
setTasks(getTasks());
|
|
42102
|
+
setMode("normal");
|
|
42103
|
+
}
|
|
42079
42104
|
}
|
|
42080
42105
|
return;
|
|
42081
42106
|
}
|
|
@@ -42085,10 +42110,14 @@ var TreeBoardComponent = ({ getTasks }) => {
|
|
|
42085
42110
|
searchQuery ? setSearchQuery("") : exit();
|
|
42086
42111
|
return;
|
|
42087
42112
|
}
|
|
42088
|
-
if (key.upArrow)
|
|
42113
|
+
if (key.upArrow) {
|
|
42114
|
+
setMoveError(null);
|
|
42089
42115
|
setSelectedIdx((i) => Math.max(0, i - 1));
|
|
42090
|
-
|
|
42116
|
+
}
|
|
42117
|
+
if (key.downArrow) {
|
|
42118
|
+
setMoveError(null);
|
|
42091
42119
|
setSelectedIdx((i) => Math.min(items.length - 1, i + 1));
|
|
42120
|
+
}
|
|
42092
42121
|
if (input === "s")
|
|
42093
42122
|
setMode("search");
|
|
42094
42123
|
if (input === "m" && selectedTask)
|
|
@@ -42442,13 +42471,28 @@ var TreeBoardComponent = ({ getTasks }) => {
|
|
|
42442
42471
|
borderColor: "gray",
|
|
42443
42472
|
children: mode === "move" && selectedTask ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(StatusPicker, {
|
|
42444
42473
|
task: selectedTask
|
|
42445
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(
|
|
42446
|
-
|
|
42447
|
-
|
|
42448
|
-
|
|
42449
|
-
|
|
42450
|
-
|
|
42451
|
-
|
|
42474
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
|
|
42475
|
+
children: [
|
|
42476
|
+
moveError && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
|
|
42477
|
+
paddingX: 1,
|
|
42478
|
+
paddingTop: 1,
|
|
42479
|
+
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
42480
|
+
color: "red",
|
|
42481
|
+
children: [
|
|
42482
|
+
"\u2717 ",
|
|
42483
|
+
moveError
|
|
42484
|
+
]
|
|
42485
|
+
}, undefined, true, undefined, this)
|
|
42486
|
+
}, undefined, false, undefined, this),
|
|
42487
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(RightPane, {
|
|
42488
|
+
task: selectedTask,
|
|
42489
|
+
width: rightInner,
|
|
42490
|
+
height: rightHeight,
|
|
42491
|
+
scrollOffset,
|
|
42492
|
+
metricsRef: rightMetricsRef
|
|
42493
|
+
}, undefined, false, undefined, this)
|
|
42494
|
+
]
|
|
42495
|
+
}, undefined, true, undefined, this)
|
|
42452
42496
|
}, undefined, false, undefined, this)
|
|
42453
42497
|
]
|
|
42454
42498
|
}, undefined, true, undefined, this)
|
|
@@ -43328,4 +43372,4 @@ program2.parseAsync(process.argv).catch((err) => {
|
|
|
43328
43372
|
process.exit(1);
|
|
43329
43373
|
});
|
|
43330
43374
|
|
|
43331
|
-
//# debugId=
|
|
43375
|
+
//# debugId=5791C0490824449C64756E2164756E21
|