@hasna/todos 0.11.26 → 0.11.28
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/index.js +60 -44
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -32779,7 +32779,7 @@ function formatTaskLine(t) {
|
|
|
32779
32779
|
const plan = t.plan_id ? chalk3.magenta(` [plan:${t.plan_id.slice(0, 8)}]`) : "";
|
|
32780
32780
|
return `${chalk3.dim(t.id.slice(0, 8))} ${statusFn(t.status.padEnd(11))} ${priorityFn(t.priority.padEnd(8))} ${t.title}${assigned}${lock}${tags}${plan}`;
|
|
32781
32781
|
}
|
|
32782
|
-
program2.name("todos").description("Universal task management for AI coding agents").version(getPackageVersion()).option("--project <path>", "Project path").option("--json", "Output as JSON").option("--agent <name>", "Agent name").option("--session <id>", "Session ID");
|
|
32782
|
+
program2.name("todos").description("Universal task management for AI coding agents").version(getPackageVersion()).option("--project <path>", "Project path").option("-j, --json", "Output as JSON").option("--agent <name>", "Agent name").option("--session <id>", "Session ID");
|
|
32783
32783
|
program2.command("add <title>").description("Create a new task").option("-d, --description <text>", "Task description").option("-p, --priority <level>", "Priority: low, medium, high, critical").option("--parent <id>", "Parent task ID").option("-t, --tags <tags>", "Comma-separated tags").option("--tag <tags>", "Comma-separated tags (alias for --tags)").option("--plan <id>", "Assign to a plan").option("--assign <agent>", "Assign to agent").option("--status <status>", "Initial status").option("--list <id>", "Task list ID").option("--task-list <id>", "Task list ID (alias for --list)").option("--estimated <minutes>", "Estimated time in minutes").option("--approval", "Require approval before completion").option("--recurrence <rule>", "Recurrence rule, e.g. 'every day', 'every weekday', 'every 2 weeks'").option("--due <date>", "Due date (ISO string or YYYY-MM-DD)").option("--reason <text>", "Why this task exists").action((title, opts) => {
|
|
32784
32784
|
const globalOpts = program2.opts();
|
|
32785
32785
|
const projectId = autoProject(globalOpts);
|
|
@@ -32836,6 +32836,16 @@ program2.command("list").description("List tasks").option("-s, --status <status>
|
|
|
32836
32836
|
const projectId = autoProject(globalOpts);
|
|
32837
32837
|
const hasAssignedFilter = Boolean(opts.assigned || opts.agentName);
|
|
32838
32838
|
const hasExplicitProjectFilter = Boolean(globalOpts.project || opts.projectName);
|
|
32839
|
+
const allowedSortFields = new Set(["updated", "created", "priority", "status"]);
|
|
32840
|
+
if (opts.sort && !allowedSortFields.has(opts.sort)) {
|
|
32841
|
+
console.error(chalk3.red(`Invalid --sort value: ${opts.sort}. Allowed values: updated, created, priority, status.`));
|
|
32842
|
+
process.exit(1);
|
|
32843
|
+
}
|
|
32844
|
+
const allowedFormats = new Set(["table", "compact", "csv", "json"]);
|
|
32845
|
+
if (opts.format && !allowedFormats.has(opts.format)) {
|
|
32846
|
+
console.error(chalk3.red(`Invalid --format value: ${opts.format}. Allowed values: table, compact, csv, json.`));
|
|
32847
|
+
process.exit(1);
|
|
32848
|
+
}
|
|
32839
32849
|
const filter = {};
|
|
32840
32850
|
if (projectId && !(hasAssignedFilter && !hasExplicitProjectFilter)) {
|
|
32841
32851
|
filter["project_id"] = projectId;
|
|
@@ -32875,8 +32885,14 @@ program2.command("list").description("List tasks").option("-s, --status <status>
|
|
|
32875
32885
|
}
|
|
32876
32886
|
if (opts.recurring)
|
|
32877
32887
|
filter["has_recurrence"] = true;
|
|
32878
|
-
if (opts.limit)
|
|
32879
|
-
|
|
32888
|
+
if (opts.limit !== undefined) {
|
|
32889
|
+
const parsedLimit = Number.parseInt(String(opts.limit), 10);
|
|
32890
|
+
if (!Number.isInteger(parsedLimit) || parsedLimit <= 0) {
|
|
32891
|
+
console.error(chalk3.red(`Invalid --limit value: ${opts.limit}. Must be a positive integer.`));
|
|
32892
|
+
process.exit(1);
|
|
32893
|
+
}
|
|
32894
|
+
filter["limit"] = parsedLimit;
|
|
32895
|
+
}
|
|
32880
32896
|
let tasks = listTasks(filter);
|
|
32881
32897
|
if (opts.dueToday) {
|
|
32882
32898
|
const todayEnd = new Date;
|
|
@@ -33877,7 +33893,7 @@ program2.command("projects").description("List and manage projects").option("--a
|
|
|
33877
33893
|
console.log(`${chalk3.dim(p.id.slice(0, 8))} ${chalk3.bold(p.name)} ${chalk3.dim(p.path)}${taskList}${p.description ? ` - ${p.description}` : ""}`);
|
|
33878
33894
|
}
|
|
33879
33895
|
});
|
|
33880
|
-
program2.command("project-rename <id-or-slug> <new-slug>").description("Rename a project slug. Cascades to matching task lists. Task prefixes (e.g. APP-00001) are unchanged.").option("--name <name>", "Also update the project display name").option("--json", "Output as JSON").action((idOrSlug, newSlug, opts) => {
|
|
33896
|
+
program2.command("project-rename <id-or-slug> <new-slug>").description("Rename a project slug. Cascades to matching task lists. Task prefixes (e.g. APP-00001) are unchanged.").option("--name <name>", "Also update the project display name").option("-j, --json", "Output as JSON").action((idOrSlug, newSlug, opts) => {
|
|
33881
33897
|
const globalOpts = program2.opts();
|
|
33882
33898
|
const useJson = opts.json || globalOpts.json;
|
|
33883
33899
|
try {
|
|
@@ -33907,7 +33923,7 @@ program2.command("project-rename <id-or-slug> <new-slug>").description("Rename a
|
|
|
33907
33923
|
}
|
|
33908
33924
|
});
|
|
33909
33925
|
var projectsPathCmd = program2.command("projects-path").description("Manage machine-local path overrides for projects");
|
|
33910
|
-
projectsPathCmd.command("set <project-id> <path>").description("Set the local path for a project on this machine").option("--json", "Output as JSON").action((projectId, projectPath, opts) => {
|
|
33926
|
+
projectsPathCmd.command("set <project-id> <path>").description("Set the local path for a project on this machine").option("-j, --json", "Output as JSON").action((projectId, projectPath, opts) => {
|
|
33911
33927
|
const globalOpts = program2.opts();
|
|
33912
33928
|
const useJson = opts.json || globalOpts.json;
|
|
33913
33929
|
try {
|
|
@@ -33929,7 +33945,7 @@ projectsPathCmd.command("set <project-id> <path>").description("Set the local pa
|
|
|
33929
33945
|
process.exit(1);
|
|
33930
33946
|
}
|
|
33931
33947
|
});
|
|
33932
|
-
projectsPathCmd.command("list <project-id>").description("List all machine path overrides for a project").option("--json", "Output as JSON").action((projectId, opts) => {
|
|
33948
|
+
projectsPathCmd.command("list <project-id>").description("List all machine path overrides for a project").option("-j, --json", "Output as JSON").action((projectId, opts) => {
|
|
33933
33949
|
const globalOpts = program2.opts();
|
|
33934
33950
|
const useJson = opts.json || globalOpts.json;
|
|
33935
33951
|
try {
|
|
@@ -34581,7 +34597,7 @@ program2.command("agent-update <name>").alias("agents-update").description("Upda
|
|
|
34581
34597
|
handleError(e);
|
|
34582
34598
|
}
|
|
34583
34599
|
});
|
|
34584
|
-
program2.command("agent <name>").description("Show all info about an agent: tasks, status, last seen, stats").option("--json", "Output as JSON").action((name, opts) => {
|
|
34600
|
+
program2.command("agent <name>").description("Show all info about an agent: tasks, status, last seen, stats").option("-j, --json", "Output as JSON").action((name, opts) => {
|
|
34585
34601
|
const globalOpts = program2.opts();
|
|
34586
34602
|
const { getAgentByName: findByName } = (init_agents(), __toCommonJS(exports_agents));
|
|
34587
34603
|
const agent = findByName(name);
|
|
@@ -35014,7 +35030,7 @@ program2.command("dashboard").description("Live-updating dashboard showing proje
|
|
|
35014
35030
|
const projectId = opts.project || autoProject(globalOpts) || undefined;
|
|
35015
35031
|
render2(React.createElement(Dashboard2, { projectId, refreshMs: parseInt(opts.refresh, 10) }));
|
|
35016
35032
|
});
|
|
35017
|
-
program2.command("next").description("Show the best pending task to work on next").option("--agent <id>", "Prefer tasks assigned to this agent").option("--project <id>", "Filter to project").option("--json", "Output as JSON").action(async (opts) => {
|
|
35033
|
+
program2.command("next").description("Show the best pending task to work on next").option("--agent <id>", "Prefer tasks assigned to this agent").option("--project <id>", "Filter to project").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
35018
35034
|
const globalOpts = program2.opts();
|
|
35019
35035
|
const db = getDatabase();
|
|
35020
35036
|
const filters = {};
|
|
@@ -35038,7 +35054,7 @@ program2.command("next").description("Show the best pending task to work on next
|
|
|
35038
35054
|
if (task.description)
|
|
35039
35055
|
console.log(chalk3.dim(` ${task.description.slice(0, 100)}`));
|
|
35040
35056
|
});
|
|
35041
|
-
program2.command("claim <agent>").description("Atomically claim the best pending task for an agent").option("--project <id>", "Filter to project").option("--json", "Output as JSON").action(async (agent, opts) => {
|
|
35057
|
+
program2.command("claim <agent>").description("Atomically claim the best pending task for an agent").option("--project <id>", "Filter to project").option("-j, --json", "Output as JSON").action(async (agent, opts) => {
|
|
35042
35058
|
const db = getDatabase();
|
|
35043
35059
|
const filters = {};
|
|
35044
35060
|
if (opts.project)
|
|
@@ -35068,7 +35084,7 @@ program2.command("steal <agent>").description("Work-stealing: take the highest-p
|
|
|
35068
35084
|
}
|
|
35069
35085
|
console.log(chalk3.green(`Stolen: ${task.short_id || task.id.slice(0, 8)} | ${task.priority} | ${task.title}`));
|
|
35070
35086
|
});
|
|
35071
|
-
program2.command("status").description("Show full project health snapshot").option("--agent <id>", "Include next task for this agent").option("--project <id>", "Filter to project").option("--json", "Output as JSON").action(async (opts) => {
|
|
35087
|
+
program2.command("status").description("Show full project health snapshot").option("--agent <id>", "Include next task for this agent").option("--project <id>", "Filter to project").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
35072
35088
|
const db = getDatabase();
|
|
35073
35089
|
const filters = {};
|
|
35074
35090
|
if (opts.project)
|
|
@@ -35212,7 +35228,7 @@ Blocked:`));
|
|
|
35212
35228
|
}
|
|
35213
35229
|
console.log();
|
|
35214
35230
|
});
|
|
35215
|
-
program2.command("fail <id>").description("Mark a task as failed with optional reason and retry").option("--reason <text>", "Why it failed").option("--agent <id>", "Agent reporting the failure").option("--retry", "Auto-create a retry copy").option("--json", "Output as JSON").action(async (id, opts) => {
|
|
35231
|
+
program2.command("fail <id>").description("Mark a task as failed with optional reason and retry").option("--reason <text>", "Why it failed").option("--agent <id>", "Agent reporting the failure").option("--retry", "Auto-create a retry copy").option("-j, --json", "Output as JSON").action(async (id, opts) => {
|
|
35216
35232
|
const db = getDatabase();
|
|
35217
35233
|
const resolvedId = resolvePartialId(db, "tasks", id);
|
|
35218
35234
|
if (!resolvedId) {
|
|
@@ -35230,7 +35246,7 @@ program2.command("fail <id>").description("Mark a task as failed with optional r
|
|
|
35230
35246
|
if (result.retryTask)
|
|
35231
35247
|
console.log(chalk3.yellow(`Retry created: ${result.retryTask.short_id || result.retryTask.id.slice(0, 8)} | ${result.retryTask.title}`));
|
|
35232
35248
|
});
|
|
35233
|
-
program2.command("active").description("Show all currently in-progress tasks").option("--project <id>", "Filter to project").option("--json", "Output as JSON").action(async (opts) => {
|
|
35249
|
+
program2.command("active").description("Show all currently in-progress tasks").option("--project <id>", "Filter to project").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
35234
35250
|
const db = getDatabase();
|
|
35235
35251
|
const filters = {};
|
|
35236
35252
|
if (opts.project)
|
|
@@ -35251,7 +35267,7 @@ program2.command("active").description("Show all currently in-progress tasks").o
|
|
|
35251
35267
|
console.log(` ${chalk3.cyan(id)} | ${chalk3.yellow(w.priority)} | ${agent.padEnd(12)} | ${w.title}`);
|
|
35252
35268
|
}
|
|
35253
35269
|
});
|
|
35254
|
-
program2.command("stale").description("Find tasks stuck in_progress with no recent activity").option("--minutes <n>", "Stale threshold in minutes", "30").option("--project <id>", "Filter to project").option("--json", "Output as JSON").action(async (opts) => {
|
|
35270
|
+
program2.command("stale").description("Find tasks stuck in_progress with no recent activity").option("--minutes <n>", "Stale threshold in minutes", "30").option("--project <id>", "Filter to project").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
35255
35271
|
const db = getDatabase();
|
|
35256
35272
|
const filters = {};
|
|
35257
35273
|
if (opts.project)
|
|
@@ -35272,7 +35288,7 @@ program2.command("stale").description("Find tasks stuck in_progress with no rece
|
|
|
35272
35288
|
console.log(` ${chalk3.cyan(id)} | ${t.locked_by || t.assigned_to || "?"} | ${t.title} ${chalk3.dim(`(${staleMin}min stale)`)}`);
|
|
35273
35289
|
}
|
|
35274
35290
|
});
|
|
35275
|
-
program2.command("redistribute <agent>").description("Release stale in-progress tasks and claim the best one (work-stealing)").option("--max-age <minutes>", "Stale threshold in minutes", "60").option("--project <id>", "Limit to a specific project").option("--limit <n>", "Max stale tasks to release").option("--json", "Output as JSON").action(async (agent, opts) => {
|
|
35291
|
+
program2.command("redistribute <agent>").description("Release stale in-progress tasks and claim the best one (work-stealing)").option("--max-age <minutes>", "Stale threshold in minutes", "60").option("--project <id>", "Limit to a specific project").option("--limit <n>", "Max stale tasks to release").option("-j, --json", "Output as JSON").action(async (agent, opts) => {
|
|
35276
35292
|
const globalOpts = program2.opts();
|
|
35277
35293
|
const db = getDatabase();
|
|
35278
35294
|
const projectId = opts.project ? resolveTaskId(opts.project) : autoProject(globalOpts) ?? undefined;
|
|
@@ -35299,7 +35315,7 @@ Claimed: ${chalk3.cyan(id)} ${result.claimed.title}`));
|
|
|
35299
35315
|
No task claimed (nothing available).`));
|
|
35300
35316
|
}
|
|
35301
35317
|
});
|
|
35302
|
-
program2.command("assign <id> <agent>").description("Assign a task to an agent").option("--json", "Output as JSON").action((id, agent, opts) => {
|
|
35318
|
+
program2.command("assign <id> <agent>").description("Assign a task to an agent").option("-j, --json", "Output as JSON").action((id, agent, opts) => {
|
|
35303
35319
|
const globalOpts = program2.opts();
|
|
35304
35320
|
const resolvedId = resolveTaskId(id);
|
|
35305
35321
|
const db = getDatabase();
|
|
@@ -35319,7 +35335,7 @@ program2.command("assign <id> <agent>").description("Assign a task to an agent")
|
|
|
35319
35335
|
handleError(new Error("Failed to assign"));
|
|
35320
35336
|
}
|
|
35321
35337
|
});
|
|
35322
|
-
program2.command("unassign <id>").description("Remove task assignment").option("--json", "Output as JSON").action((id, opts) => {
|
|
35338
|
+
program2.command("unassign <id>").description("Remove task assignment").option("-j, --json", "Output as JSON").action((id, opts) => {
|
|
35323
35339
|
const globalOpts = program2.opts();
|
|
35324
35340
|
const resolvedId = resolveTaskId(id);
|
|
35325
35341
|
const db = getDatabase();
|
|
@@ -35339,7 +35355,7 @@ program2.command("unassign <id>").description("Remove task assignment").option("
|
|
|
35339
35355
|
handleError(new Error("Failed to unassign"));
|
|
35340
35356
|
}
|
|
35341
35357
|
});
|
|
35342
|
-
program2.command("tag <id> <tag>").description("Add a tag to a task").option("--json", "Output as JSON").action((id, tag, opts) => {
|
|
35358
|
+
program2.command("tag <id> <tag>").description("Add a tag to a task").option("-j, --json", "Output as JSON").action((id, tag, opts) => {
|
|
35343
35359
|
const globalOpts = program2.opts();
|
|
35344
35360
|
const resolvedId = resolveTaskId(id);
|
|
35345
35361
|
const db = getDatabase();
|
|
@@ -35360,7 +35376,7 @@ program2.command("tag <id> <tag>").description("Add a tag to a task").option("--
|
|
|
35360
35376
|
handleError(new Error("Failed to tag"));
|
|
35361
35377
|
}
|
|
35362
35378
|
});
|
|
35363
|
-
program2.command("untag <id> <tag>").description("Remove a tag from a task").option("--json", "Output as JSON").action((id, tag, opts) => {
|
|
35379
|
+
program2.command("untag <id> <tag>").description("Remove a tag from a task").option("-j, --json", "Output as JSON").action((id, tag, opts) => {
|
|
35364
35380
|
const globalOpts = program2.opts();
|
|
35365
35381
|
const resolvedId = resolveTaskId(id);
|
|
35366
35382
|
const db = getDatabase();
|
|
@@ -35381,7 +35397,7 @@ program2.command("untag <id> <tag>").description("Remove a tag from a task").opt
|
|
|
35381
35397
|
handleError(new Error("Failed to untag"));
|
|
35382
35398
|
}
|
|
35383
35399
|
});
|
|
35384
|
-
program2.command("pin <id>").description("Escalate task to critical priority").option("--json", "Output as JSON").action((id, opts) => {
|
|
35400
|
+
program2.command("pin <id>").description("Escalate task to critical priority").option("-j, --json", "Output as JSON").action((id, opts) => {
|
|
35385
35401
|
const globalOpts = program2.opts();
|
|
35386
35402
|
const resolvedId = resolveTaskId(id);
|
|
35387
35403
|
const db = getDatabase();
|
|
@@ -35397,7 +35413,7 @@ program2.command("pin <id>").description("Escalate task to critical priority").o
|
|
|
35397
35413
|
handleError(new Error("Failed to pin"));
|
|
35398
35414
|
}
|
|
35399
35415
|
});
|
|
35400
|
-
program2.command("summary").description("Generate a markdown summary of recent task activity").option("--days <n>", "Days of history to include", "7").option("--project <id>", "Filter to project").option("--agent <id>", "Filter to agent").option("--json", "Output as JSON").action(async (opts) => {
|
|
35416
|
+
program2.command("summary").description("Generate a markdown summary of recent task activity").option("--days <n>", "Days of history to include", "7").option("--project <id>", "Filter to project").option("--agent <id>", "Filter to agent").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
35401
35417
|
const globalOpts = program2.opts();
|
|
35402
35418
|
const db = getDatabase();
|
|
35403
35419
|
const days = parseInt(opts.days, 10);
|
|
@@ -35452,7 +35468,7 @@ program2.command("summary").description("Generate a markdown summary of recent t
|
|
|
35452
35468
|
console.log(lines.join(`
|
|
35453
35469
|
`));
|
|
35454
35470
|
});
|
|
35455
|
-
program2.command("doctor").description("Diagnose common task data issues").option("--fix", "Auto-fix recoverable issues where possible").option("--json", "Output as JSON").action(async (opts) => {
|
|
35471
|
+
program2.command("doctor").description("Diagnose common task data issues").option("--fix", "Auto-fix recoverable issues where possible").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
35456
35472
|
const globalOpts = program2.opts();
|
|
35457
35473
|
const db = getDatabase();
|
|
35458
35474
|
const issues = [];
|
|
@@ -35494,7 +35510,7 @@ program2.command("doctor").description("Diagnose common task data issues").optio
|
|
|
35494
35510
|
console.log(chalk3[errors2 > 0 ? "red" : "yellow"](`
|
|
35495
35511
|
${errors2} error(s), ${warns} warning(s). Run with --fix to auto-resolve where possible.`));
|
|
35496
35512
|
});
|
|
35497
|
-
program2.command("health").description("Check todos system health \u2014 database, config, connectivity").option("--json", "Output as JSON").action(async (opts) => {
|
|
35513
|
+
program2.command("health").description("Check todos system health \u2014 database, config, connectivity").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
35498
35514
|
const globalOpts = program2.opts();
|
|
35499
35515
|
const checks = [];
|
|
35500
35516
|
try {
|
|
@@ -35549,7 +35565,7 @@ program2.command("health").description("Check todos system health \u2014 databas
|
|
|
35549
35565
|
console.log(`
|
|
35550
35566
|
${allOk ? chalk3.green("All checks passed.") : chalk3.yellow("Some checks need attention.")}`);
|
|
35551
35567
|
});
|
|
35552
|
-
program2.command("report").description("Analytics report: task activity, completion rates, agent breakdown").option("--days <n>", "Days to include in report", "7").option("--project <id>", "Filter to project").option("--markdown", "Output as markdown").option("--json", "Output as JSON").action(async (opts) => {
|
|
35568
|
+
program2.command("report").description("Analytics report: task activity, completion rates, agent breakdown").option("--days <n>", "Days to include in report", "7").option("--project <id>", "Filter to project").option("--markdown", "Output as markdown").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
35553
35569
|
const globalOpts = program2.opts();
|
|
35554
35570
|
const db = getDatabase();
|
|
35555
35571
|
const days = parseInt(opts.days, 10);
|
|
@@ -35614,7 +35630,7 @@ program2.command("report").description("Analytics report: task activity, complet
|
|
|
35614
35630
|
console.log(lines.join(`
|
|
35615
35631
|
`));
|
|
35616
35632
|
});
|
|
35617
|
-
program2.command("today").description("Show task activity from today").option("--json", "Output as JSON").action(async (opts) => {
|
|
35633
|
+
program2.command("today").description("Show task activity from today").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
35618
35634
|
const globalOpts = program2.opts();
|
|
35619
35635
|
const db = getDatabase();
|
|
35620
35636
|
const { getTasksChangedSince: getTasksChangedSince2 } = (init_tasks(), __toCommonJS(exports_tasks));
|
|
@@ -35644,7 +35660,7 @@ program2.command("today").description("Show task activity from today").option("-
|
|
|
35644
35660
|
if (completed.length === 0 && started.length === 0)
|
|
35645
35661
|
console.log(chalk3.dim(" No activity today."));
|
|
35646
35662
|
});
|
|
35647
|
-
program2.command("yesterday").description("Show task activity from yesterday").option("--json", "Output as JSON").action(async (opts) => {
|
|
35663
|
+
program2.command("yesterday").description("Show task activity from yesterday").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
35648
35664
|
const globalOpts = program2.opts();
|
|
35649
35665
|
const db = getDatabase();
|
|
35650
35666
|
const { getTasksChangedSince: getTasksChangedSince2 } = (init_tasks(), __toCommonJS(exports_tasks));
|
|
@@ -35677,11 +35693,11 @@ program2.command("yesterday").description("Show task activity from yesterday").o
|
|
|
35677
35693
|
if (completed.length === 0 && started.length === 0)
|
|
35678
35694
|
console.log(chalk3.dim(" No activity yesterday."));
|
|
35679
35695
|
});
|
|
35680
|
-
program2.command("mine").description("Show tasks assigned to you, grouped by status").argument("<agent>", "Agent name or ID").option("--json", "Output as JSON").action(async (agent, opts) => {
|
|
35696
|
+
program2.command("mine").description("Show tasks assigned to you, grouped by status").argument("<agent>", "Agent name or ID").option("-j, --json", "Output as JSON").action(async (agent, opts) => {
|
|
35681
35697
|
const globalOpts = program2.opts();
|
|
35682
35698
|
const db = getDatabase();
|
|
35683
35699
|
const { listTasks: listTasks2 } = (init_tasks(), __toCommonJS(exports_tasks));
|
|
35684
|
-
const projectId = autoProject(globalOpts) || undefined;
|
|
35700
|
+
const projectId = globalOpts.project ? autoProject(globalOpts) || undefined : undefined;
|
|
35685
35701
|
const filter = { assigned_to: agent };
|
|
35686
35702
|
if (projectId)
|
|
35687
35703
|
filter.project_id = projectId;
|
|
@@ -35728,7 +35744,7 @@ program2.command("mine").description("Show tasks assigned to you, grouped by sta
|
|
|
35728
35744
|
if (tasks.length === 0)
|
|
35729
35745
|
console.log(chalk3.dim(` No tasks assigned to ${agent}.`));
|
|
35730
35746
|
});
|
|
35731
|
-
program2.command("blocked").description("Show tasks blocked by incomplete dependencies").option("--json", "Output as JSON").option("--project <id>", "Filter to project").action(async (opts) => {
|
|
35747
|
+
program2.command("blocked").description("Show tasks blocked by incomplete dependencies").option("-j, --json", "Output as JSON").option("--project <id>", "Filter to project").action(async (opts) => {
|
|
35732
35748
|
const globalOpts = program2.opts();
|
|
35733
35749
|
const db = getDatabase();
|
|
35734
35750
|
const { listTasks: listTasks2, getBlockingDeps: getBlockingDeps2 } = (init_tasks(), __toCommonJS(exports_tasks));
|
|
@@ -35760,7 +35776,7 @@ program2.command("blocked").description("Show tasks blocked by incomplete depend
|
|
|
35760
35776
|
}
|
|
35761
35777
|
}
|
|
35762
35778
|
});
|
|
35763
|
-
program2.command("overdue").description("Show tasks past their due date").option("--json", "Output as JSON").option("--project <id>", "Filter to project").action(async (opts) => {
|
|
35779
|
+
program2.command("overdue").description("Show tasks past their due date").option("-j, --json", "Output as JSON").option("--project <id>", "Filter to project").action(async (opts) => {
|
|
35764
35780
|
const globalOpts = program2.opts();
|
|
35765
35781
|
const projectId = autoProject(globalOpts) || opts.project || undefined;
|
|
35766
35782
|
const { getOverdueTasks: getOverdueTasks2 } = (init_tasks(), __toCommonJS(exports_tasks));
|
|
@@ -35782,7 +35798,7 @@ program2.command("overdue").description("Show tasks past their due date").option
|
|
|
35782
35798
|
console.log(` ${urgency} ${chalk3.cyan(t.short_id || t.id.slice(0, 8))} ${t.title}${t.assigned_to ? chalk3.dim(` \u2014 ${t.assigned_to}`) : ""} ${chalk3.dim(`(due ${dueDate})`)}`);
|
|
35783
35799
|
}
|
|
35784
35800
|
});
|
|
35785
|
-
program2.command("week").description("Show task activity from the past 7 days").option("--json", "Output as JSON").action(async (opts) => {
|
|
35801
|
+
program2.command("week").description("Show task activity from the past 7 days").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
35786
35802
|
const globalOpts = program2.opts();
|
|
35787
35803
|
const db = getDatabase();
|
|
35788
35804
|
const { getTasksChangedSince: getTasksChangedSince2 } = (init_tasks(), __toCommonJS(exports_tasks));
|
|
@@ -35835,7 +35851,7 @@ program2.command("week").description("Show task activity from the past 7 days").
|
|
|
35835
35851
|
if (tasks.length === 0)
|
|
35836
35852
|
console.log(chalk3.dim(" No activity this week."));
|
|
35837
35853
|
});
|
|
35838
|
-
program2.command("burndown").description("Show task completion velocity over the past 7 days").option("--days <n>", "Number of days", "7").option("--json", "Output as JSON").action(async (opts) => {
|
|
35854
|
+
program2.command("burndown").description("Show task completion velocity over the past 7 days").option("--days <n>", "Number of days", "7").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
35839
35855
|
const globalOpts = program2.opts();
|
|
35840
35856
|
const db = getDatabase();
|
|
35841
35857
|
const { getRecentActivity: getRecentActivity2 } = (init_audit(), __toCommonJS(exports_audit));
|
|
@@ -35877,7 +35893,7 @@ program2.command("burndown").description("Show task completion velocity over the
|
|
|
35877
35893
|
console.log(chalk3.dim(`
|
|
35878
35894
|
Velocity: ${velocity}/day \xB7 ${totalCompleted} done \xB7 ${totalCreated} created`));
|
|
35879
35895
|
});
|
|
35880
|
-
program2.command("log").description("Show recent task activity log (git-log style)").option("--limit <n>", "Number of entries", "30").option("--json", "Output as JSON").action(async (opts) => {
|
|
35896
|
+
program2.command("log").description("Show recent task activity log (git-log style)").option("--limit <n>", "Number of entries", "30").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
35881
35897
|
const globalOpts = program2.opts();
|
|
35882
35898
|
const db = getDatabase();
|
|
35883
35899
|
const { getRecentActivity: getRecentActivity2 } = (init_audit(), __toCommonJS(exports_audit));
|
|
@@ -35921,7 +35937,7 @@ program2.command("log").description("Show recent task activity log (git-log styl
|
|
|
35921
35937
|
console.log(` ${chalk3.dim(time)} ${icon} ${e.action.padEnd(8)} ${taskRef}${detail}${agent}`);
|
|
35922
35938
|
}
|
|
35923
35939
|
});
|
|
35924
|
-
program2.command("ready").description("Show all tasks ready to be claimed (pending, unblocked, unlocked)").option("--json", "Output as JSON").option("--project <id>", "Filter to project").option("--limit <n>", "Max tasks to show", "20").action(async (opts) => {
|
|
35940
|
+
program2.command("ready").description("Show all tasks ready to be claimed (pending, unblocked, unlocked)").option("-j, --json", "Output as JSON").option("--project <id>", "Filter to project").option("--limit <n>", "Max tasks to show", "20").action(async (opts) => {
|
|
35925
35941
|
const globalOpts = program2.opts();
|
|
35926
35942
|
const db = getDatabase();
|
|
35927
35943
|
const { listTasks: listTasks2, getBlockingDeps: getBlockingDeps2 } = (init_tasks(), __toCommonJS(exports_tasks));
|
|
@@ -35954,7 +35970,7 @@ program2.command("ready").description("Show all tasks ready to be claimed (pendi
|
|
|
35954
35970
|
console.log(` ${chalk3.cyan(t.short_id || t.id.slice(0, 8))} ${t.title} ${pri}${due}`);
|
|
35955
35971
|
}
|
|
35956
35972
|
});
|
|
35957
|
-
program2.command("sprint").description("Sprint dashboard: in-progress, next up, blockers, and overdue").option("--json", "Output as JSON").option("--project <id>", "Filter to project").action(async (opts) => {
|
|
35973
|
+
program2.command("sprint").description("Sprint dashboard: in-progress, next up, blockers, and overdue").option("-j, --json", "Output as JSON").option("--project <id>", "Filter to project").action(async (opts) => {
|
|
35958
35974
|
const globalOpts = program2.opts();
|
|
35959
35975
|
const db = getDatabase();
|
|
35960
35976
|
const { listTasks: listTasks2, getBlockingDeps: getBlockingDeps2 } = (init_tasks(), __toCommonJS(exports_tasks));
|
|
@@ -36015,7 +36031,7 @@ program2.command("sprint").description("Sprint dashboard: in-progress, next up,
|
|
|
36015
36031
|
console.log(chalk3.dim(`
|
|
36016
36032
|
${inProgress.length} active \xB7 ${pending.length} pending \xB7 ${blocked.length} blocked \xB7 ${overdue.length} overdue`));
|
|
36017
36033
|
});
|
|
36018
|
-
program2.command("handoff").description("Create or view agent session handoffs").option("--create", "Create a new handoff").option("--agent <name>", "Agent name").option("--summary <text>", "Handoff summary").option("--completed <items>", "Comma-separated completed items").option("--in-progress <items>", "Comma-separated in-progress items").option("--blockers <items>", "Comma-separated blockers").option("--next <items>", "Comma-separated next steps").option("--json", "Output as JSON").option("--limit <n>", "Number of handoffs to show", "5").action(async (opts) => {
|
|
36034
|
+
program2.command("handoff").description("Create or view agent session handoffs").option("--create", "Create a new handoff").option("--agent <name>", "Agent name").option("--summary <text>", "Handoff summary").option("--completed <items>", "Comma-separated completed items").option("--in-progress <items>", "Comma-separated in-progress items").option("--blockers <items>", "Comma-separated blockers").option("--next <items>", "Comma-separated next steps").option("-j, --json", "Output as JSON").option("--limit <n>", "Number of handoffs to show", "5").action(async (opts) => {
|
|
36019
36035
|
const globalOpts = program2.opts();
|
|
36020
36036
|
const db = getDatabase();
|
|
36021
36037
|
const { createHandoff: createHandoff2, listHandoffs: listHandoffs2 } = (init_handoffs(), __toCommonJS(exports_handoffs));
|
|
@@ -36077,7 +36093,7 @@ program2.command("handoff").description("Create or view agent session handoffs")
|
|
|
36077
36093
|
}
|
|
36078
36094
|
}
|
|
36079
36095
|
});
|
|
36080
|
-
program2.command("priorities").description("Show task counts grouped by priority").option("--json", "Output as JSON").option("--project <id>", "Filter to project").action(async (opts) => {
|
|
36096
|
+
program2.command("priorities").description("Show task counts grouped by priority").option("-j, --json", "Output as JSON").option("--project <id>", "Filter to project").action(async (opts) => {
|
|
36081
36097
|
const globalOpts = program2.opts();
|
|
36082
36098
|
const db = getDatabase();
|
|
36083
36099
|
const { countTasks: countTasks2 } = (init_tasks(), __toCommonJS(exports_tasks));
|
|
@@ -36109,7 +36125,7 @@ program2.command("priorities").description("Show task counts grouped by priority
|
|
|
36109
36125
|
console.log(` ${color(p.padEnd(9))} ${String(c.total).padStart(4)} total ${chalk3.green(String(c.completed).padStart(3))} done ${chalk3.blue(String(c.in_progress).padStart(3))} active ${chalk3.dim(String(c.pending).padStart(3))} pending ${bar}`);
|
|
36110
36126
|
}
|
|
36111
36127
|
});
|
|
36112
|
-
program2.command("context").description("Session start context: status, latest handoff, next task, overdue").option("--agent <name>", "Agent name for handoff lookup").option("--json", "Output as JSON").action(async (opts) => {
|
|
36128
|
+
program2.command("context").description("Session start context: status, latest handoff, next task, overdue").option("--agent <name>", "Agent name for handoff lookup").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
36113
36129
|
const globalOpts = program2.opts();
|
|
36114
36130
|
const db = getDatabase();
|
|
36115
36131
|
const { getStatus: getStatus2 } = (init_tasks(), __toCommonJS(exports_tasks));
|
|
@@ -36151,7 +36167,7 @@ program2.command("context").description("Session start context: status, latest h
|
|
|
36151
36167
|
console.log(chalk3.dim(`
|
|
36152
36168
|
as_of: ${new Date().toISOString()}`));
|
|
36153
36169
|
});
|
|
36154
|
-
program2.command("report-failure").description("Create a task from a test/build/typecheck failure and auto-assign it").requiredOption("--error <message>", "Error message or summary").option("--type <type>", "Failure type: test, build, typecheck, runtime, other", "test").option("--file <path>", "File where failure occurred").option("--stack <trace>", "Stack trace or detailed output").option("--title <title>", "Custom task title (auto-generated if omitted)").option("--priority <p>", "Priority: low, medium, high, critical").option("--json", "Output as JSON").action(async (opts) => {
|
|
36170
|
+
program2.command("report-failure").description("Create a task from a test/build/typecheck failure and auto-assign it").requiredOption("--error <message>", "Error message or summary").option("--type <type>", "Failure type: test, build, typecheck, runtime, other", "test").option("--file <path>", "File where failure occurred").option("--stack <trace>", "Stack trace or detailed output").option("--title <title>", "Custom task title (auto-generated if omitted)").option("--priority <p>", "Priority: low, medium, high, critical").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
36155
36171
|
const globalOpts = program2.opts();
|
|
36156
36172
|
const { createTask: createTask2 } = (init_tasks(), __toCommonJS(exports_tasks));
|
|
36157
36173
|
const { autoAssignTask: autoAssignTask2 } = await Promise.resolve().then(() => (init_auto_assign(), exports_auto_assign));
|
|
@@ -36210,7 +36226,7 @@ program2.action(async () => {
|
|
|
36210
36226
|
});
|
|
36211
36227
|
program2.addCommand(makeBrainsCommand());
|
|
36212
36228
|
var dbCmd = program2.command("db").description("Database management commands");
|
|
36213
|
-
dbCmd.command("migrate-pg").description("Apply PostgreSQL migrations to the configured RDS instance").option("--connection-string <url>", "PostgreSQL connection string (overrides cloud config)").option("--json", "Output as JSON").action(async (opts) => {
|
|
36229
|
+
dbCmd.command("migrate-pg").description("Apply PostgreSQL migrations to the configured RDS instance").option("--connection-string <url>", "PostgreSQL connection string (overrides cloud config)").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
36214
36230
|
const globalOpts = program2.opts();
|
|
36215
36231
|
const useJson = opts.json || globalOpts.json;
|
|
36216
36232
|
let connStr;
|
|
@@ -36263,7 +36279,7 @@ dbCmd.command("migrate-pg").description("Apply PostgreSQL migrations to the conf
|
|
|
36263
36279
|
}
|
|
36264
36280
|
});
|
|
36265
36281
|
var cloudCmd = program2.command("cloud").description("Cloud sync commands");
|
|
36266
|
-
cloudCmd.command("status").description("Show cloud config, connection health, machine registry, and sync status").option("--json", "Output as JSON").action(async (opts) => {
|
|
36282
|
+
cloudCmd.command("status").description("Show cloud config, connection health, machine registry, and sync status").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
36267
36283
|
const globalOpts = program2.opts();
|
|
36268
36284
|
const useJson = opts.json || globalOpts.json;
|
|
36269
36285
|
try {
|
|
@@ -36354,7 +36370,7 @@ Conflicts`));
|
|
|
36354
36370
|
}
|
|
36355
36371
|
}
|
|
36356
36372
|
});
|
|
36357
|
-
cloudCmd.command("push").description("Push local data to cloud PostgreSQL").option("--tables <tables>", "Comma-separated table names (default: all)").option("--json", "Output as JSON").action(async (opts) => {
|
|
36373
|
+
cloudCmd.command("push").description("Push local data to cloud PostgreSQL").option("--tables <tables>", "Comma-separated table names (default: all)").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
36358
36374
|
const globalOpts = program2.opts();
|
|
36359
36375
|
const useJson = opts.json || globalOpts.json;
|
|
36360
36376
|
try {
|
|
@@ -36414,7 +36430,7 @@ cloudCmd.command("push").description("Push local data to cloud PostgreSQL").opti
|
|
|
36414
36430
|
process.exit(1);
|
|
36415
36431
|
}
|
|
36416
36432
|
});
|
|
36417
|
-
cloudCmd.command("pull").description("Pull cloud data to local \u2014 merges by primary key").option("--tables <tables>", "Comma-separated table names (default: all)").option("--json", "Output as JSON").action(async (opts) => {
|
|
36433
|
+
cloudCmd.command("pull").description("Pull cloud data to local \u2014 merges by primary key").option("--tables <tables>", "Comma-separated table names (default: all)").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
36418
36434
|
const globalOpts = program2.opts();
|
|
36419
36435
|
const useJson = opts.json || globalOpts.json;
|
|
36420
36436
|
try {
|
|
@@ -36472,7 +36488,7 @@ cloudCmd.command("pull").description("Pull cloud data to local \u2014 merges by
|
|
|
36472
36488
|
process.exit(1);
|
|
36473
36489
|
}
|
|
36474
36490
|
});
|
|
36475
|
-
cloudCmd.command("sync").description("Bidirectional sync \u2014 pull remote changes then push local changes").option("--tables <tables>", "Comma-separated table names (default: all)").option("--json", "Output as JSON").action(async (opts) => {
|
|
36491
|
+
cloudCmd.command("sync").description("Bidirectional sync \u2014 pull remote changes then push local changes").option("--tables <tables>", "Comma-separated table names (default: all)").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
36476
36492
|
const globalOpts = program2.opts();
|
|
36477
36493
|
const useJson = opts.json || globalOpts.json;
|
|
36478
36494
|
try {
|
|
@@ -36548,7 +36564,7 @@ cloudCmd.command("sync").description("Bidirectional sync \u2014 pull remote chan
|
|
|
36548
36564
|
process.exit(1);
|
|
36549
36565
|
}
|
|
36550
36566
|
});
|
|
36551
|
-
cloudCmd.command("conflicts").description("List sync conflicts detected during push/pull").option("--resolved", "Show resolved conflicts instead of unresolved").option("--table <table>", "Filter by table name").option("--limit <n>", "Max conflicts to show", "20").option("--json", "Output as JSON").action(async (opts) => {
|
|
36567
|
+
cloudCmd.command("conflicts").description("List sync conflicts detected during push/pull").option("--resolved", "Show resolved conflicts instead of unresolved").option("--table <table>", "Filter by table name").option("--limit <n>", "Max conflicts to show", "20").option("-j, --json", "Output as JSON").action(async (opts) => {
|
|
36552
36568
|
const globalOpts = program2.opts();
|
|
36553
36569
|
const useJson = opts.json || globalOpts.json;
|
|
36554
36570
|
try {
|