@hasna/todos 0.9.1 → 0.9.3
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 +18 -3
- package/dist/index.js +9 -0
- package/dist/mcp/index.js +9 -0
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -2145,6 +2145,15 @@ function runMigrations(db) {
|
|
|
2145
2145
|
db.exec(migration);
|
|
2146
2146
|
}
|
|
2147
2147
|
}
|
|
2148
|
+
ensureTableMigrations(db);
|
|
2149
|
+
}
|
|
2150
|
+
function ensureTableMigrations(db) {
|
|
2151
|
+
try {
|
|
2152
|
+
const hasAgents = db.query("SELECT name FROM sqlite_master WHERE type='table' AND name='agents'").get();
|
|
2153
|
+
if (!hasAgents) {
|
|
2154
|
+
db.exec(MIGRATIONS[4]);
|
|
2155
|
+
}
|
|
2156
|
+
} catch {}
|
|
2148
2157
|
}
|
|
2149
2158
|
function backfillTaskTags(db) {
|
|
2150
2159
|
try {
|
|
@@ -9556,9 +9565,11 @@ function formatTaskLine(t) {
|
|
|
9556
9565
|
return `${chalk.dim(t.id.slice(0, 8))} ${statusFn(t.status.padEnd(11))} ${priorityFn(t.priority.padEnd(8))} ${t.title}${assigned}${lock}${tags}${plan}`;
|
|
9557
9566
|
}
|
|
9558
9567
|
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");
|
|
9559
|
-
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("--tags <tags>", "Comma-separated 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").action((title, opts) => {
|
|
9568
|
+
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)").action((title, opts) => {
|
|
9560
9569
|
const globalOpts = program2.opts();
|
|
9561
9570
|
const projectId = autoProject(globalOpts);
|
|
9571
|
+
opts.tags = opts.tags || opts.tag;
|
|
9572
|
+
opts.list = opts.list || opts.taskList;
|
|
9562
9573
|
const taskListId = opts.list ? (() => {
|
|
9563
9574
|
const db = getDatabase();
|
|
9564
9575
|
const id = resolvePartialId(db, "task_lists", opts.list);
|
|
@@ -9598,8 +9609,10 @@ program2.command("add <title>").description("Create a new task").option("-d, --d
|
|
|
9598
9609
|
console.log(formatTaskLine(task));
|
|
9599
9610
|
}
|
|
9600
9611
|
});
|
|
9601
|
-
program2.command("list").description("List tasks").option("-s, --status <status>", "Filter by status").option("-p, --priority <priority>", "Filter by priority").option("--assigned <agent>", "Filter by assigned agent").option("--tags <tags>", "Filter by tags (comma-separated)").option("-a, --all", "Show all tasks (including completed/cancelled)").option("--list <id>", "Filter by task list ID").action((opts) => {
|
|
9612
|
+
program2.command("list").description("List tasks").option("-s, --status <status>", "Filter by status").option("-p, --priority <priority>", "Filter by priority").option("--assigned <agent>", "Filter by assigned agent").option("--tags <tags>", "Filter by tags (comma-separated)").option("--tag <tags>", "Filter by tags (alias for --tags)").option("-a, --all", "Show all tasks (including completed/cancelled)").option("--list <id>", "Filter by task list ID").option("--task-list <id>", "Filter by task list ID (alias for --list)").action((opts) => {
|
|
9602
9613
|
const globalOpts = program2.opts();
|
|
9614
|
+
opts.tags = opts.tags || opts.tag;
|
|
9615
|
+
opts.list = opts.list || opts.taskList;
|
|
9603
9616
|
const projectId = autoProject(globalOpts);
|
|
9604
9617
|
const filter = {};
|
|
9605
9618
|
if (projectId)
|
|
@@ -9711,8 +9724,10 @@ program2.command("show <id>").description("Show full task details").action((id)
|
|
|
9711
9724
|
}
|
|
9712
9725
|
}
|
|
9713
9726
|
});
|
|
9714
|
-
program2.command("update <id>").description("Update a task").option("--title <text>", "New title").option("-d, --description <text>", "New description").option("-s, --status <status>", "New status").option("-p, --priority <priority>", "New priority").option("--assign <agent>", "Assign to agent").option("--tags <tags>", "New tags (comma-separated)").option("--list <id>", "Move to a task list").action((id, opts) => {
|
|
9727
|
+
program2.command("update <id>").description("Update a task").option("--title <text>", "New title").option("-d, --description <text>", "New description").option("-s, --status <status>", "New status").option("-p, --priority <priority>", "New priority").option("--assign <agent>", "Assign to agent").option("--tags <tags>", "New tags (comma-separated)").option("--tag <tags>", "New tags (alias for --tags)").option("--list <id>", "Move to a task list").option("--task-list <id>", "Move to a task list (alias for --list)").action((id, opts) => {
|
|
9715
9728
|
const globalOpts = program2.opts();
|
|
9729
|
+
opts.tags = opts.tags || opts.tag;
|
|
9730
|
+
opts.list = opts.list || opts.taskList;
|
|
9716
9731
|
const resolvedId = resolveTaskId(id);
|
|
9717
9732
|
const current = getTask(resolvedId);
|
|
9718
9733
|
if (!current) {
|
package/dist/index.js
CHANGED
|
@@ -222,6 +222,15 @@ function runMigrations(db) {
|
|
|
222
222
|
db.exec(migration);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
+
ensureTableMigrations(db);
|
|
226
|
+
}
|
|
227
|
+
function ensureTableMigrations(db) {
|
|
228
|
+
try {
|
|
229
|
+
const hasAgents = db.query("SELECT name FROM sqlite_master WHERE type='table' AND name='agents'").get();
|
|
230
|
+
if (!hasAgents) {
|
|
231
|
+
db.exec(MIGRATIONS[4]);
|
|
232
|
+
}
|
|
233
|
+
} catch {}
|
|
225
234
|
}
|
|
226
235
|
function backfillTaskTags(db) {
|
|
227
236
|
try {
|
package/dist/mcp/index.js
CHANGED
|
@@ -4272,6 +4272,15 @@ function runMigrations(db) {
|
|
|
4272
4272
|
db.exec(migration);
|
|
4273
4273
|
}
|
|
4274
4274
|
}
|
|
4275
|
+
ensureTableMigrations(db);
|
|
4276
|
+
}
|
|
4277
|
+
function ensureTableMigrations(db) {
|
|
4278
|
+
try {
|
|
4279
|
+
const hasAgents = db.query("SELECT name FROM sqlite_master WHERE type='table' AND name='agents'").get();
|
|
4280
|
+
if (!hasAgents) {
|
|
4281
|
+
db.exec(MIGRATIONS[4]);
|
|
4282
|
+
}
|
|
4283
|
+
} catch {}
|
|
4275
4284
|
}
|
|
4276
4285
|
function backfillTaskTags(db) {
|
|
4277
4286
|
try {
|