@pebblehouse/odin-cli 0.20.0 → 0.21.0
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/README.md +2 -0
- package/dist/index.js +31 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,6 +71,8 @@ odin search "RLS policies" --pebble odin # Scoped
|
|
|
71
71
|
odin tickets resolve ODIN-12 # Resolve a ticket key to its bet or task
|
|
72
72
|
odin tasks promote <slug> <task-id> --file ./bet.md # Promote a task to a bet (keeps its ticket ID)
|
|
73
73
|
odin tasks create <slug> "Fix" --follow-up-of ODIN-12 # Allocate ODIN-12A as a follow-up
|
|
74
|
+
odin tasks update <slug> ODIN-12 --roadmap <roadmap-id> # Attach a task to a leaf roadmap ('none' detaches; --roadmap-order <n|none>)
|
|
75
|
+
odin tasks list <slug> --roadmap <roadmap-id> # Tasks attached to a roadmap
|
|
74
76
|
```
|
|
75
77
|
|
|
76
78
|
### Roadmaps
|
package/dist/index.js
CHANGED
|
@@ -1397,7 +1397,7 @@ import { Command as Command18 } from "commander";
|
|
|
1397
1397
|
import { readFileSync as readFileSync12 } from "fs";
|
|
1398
1398
|
var tasksCmd = new Command18("tasks").description("Manage tasks");
|
|
1399
1399
|
withListFlags(
|
|
1400
|
-
tasksCmd.command("list <slug>").description("List tasks for a pebble").option("--status <status>", "Filter by status").option("--bet <bet-id>", "Filter by bet ID")
|
|
1400
|
+
tasksCmd.command("list <slug>").description("List tasks for a pebble").option("--status <status>", "Filter by status").option("--bet <bet-id>", "Filter by bet ID").option("--roadmap <roadmap-id>", "Filter to tasks attached to this roadmap")
|
|
1401
1401
|
).action(async (slug, opts) => {
|
|
1402
1402
|
const resolved = resolveListParams(opts);
|
|
1403
1403
|
if (resolved.fatal) {
|
|
@@ -1408,6 +1408,7 @@ withListFlags(
|
|
|
1408
1408
|
const params = { ...resolved.params };
|
|
1409
1409
|
if (opts.status) params.status = opts.status;
|
|
1410
1410
|
if (opts.bet) params.bet_id = opts.bet;
|
|
1411
|
+
if (opts.roadmap) params.roadmap_id = opts.roadmap;
|
|
1411
1412
|
const res = await apiRequest(`/pebbles/${slug}/tasks`, { params });
|
|
1412
1413
|
emitListResult(res, "tasks", resolved);
|
|
1413
1414
|
});
|
|
@@ -1416,21 +1417,47 @@ tasksCmd.command("get <slug> <id>").description("Get a task by ID").action(async
|
|
|
1416
1417
|
process.stdout.write(JSON.stringify(res) + "\n");
|
|
1417
1418
|
if (res.error) process.exit(1);
|
|
1418
1419
|
});
|
|
1419
|
-
tasksCmd.command("create <slug> <title>").description("Create a task").option("--source <source>", "Source agent", "claude-code").option("--description <description>", "Task description").option("--bet <bet-id>", "Parent bet ID").option("--status <status>", "Task status").option("--priority <priority>", "Task priority").option("--follow-up-of <key-or-uuid>", "Allocate a suffixed follow-up ticket in this ticket's family (e.g. ODIN-12 \u2192 ODIN-12A)").action(async (slug, title, opts) => {
|
|
1420
|
+
tasksCmd.command("create <slug> <title>").description("Create a task").option("--source <source>", "Source agent", "claude-code").option("--description <description>", "Task description").option("--bet <bet-id>", "Parent bet ID").option("--status <status>", "Task status").option("--priority <priority>", "Task priority").option("--follow-up-of <key-or-uuid>", "Allocate a suffixed follow-up ticket in this ticket's family (e.g. ODIN-12 \u2192 ODIN-12A)").option("--roadmap <roadmap-id>", "Attach to a leaf roadmap").option("--roadmap-order <n>", "Ordering among tasks on the roadmap").action(async (slug, title, opts) => {
|
|
1421
|
+
const roadmapOrder = opts.roadmapOrder !== void 0 ? Number(opts.roadmapOrder) : void 0;
|
|
1422
|
+
if (roadmapOrder !== void 0 && !Number.isInteger(roadmapOrder)) {
|
|
1423
|
+
process.stderr.write("--roadmap-order must be an integer or 'none'\n");
|
|
1424
|
+
process.exit(1);
|
|
1425
|
+
return;
|
|
1426
|
+
}
|
|
1420
1427
|
const res = await apiRequest(`/pebbles/${slug}/tasks`, {
|
|
1421
1428
|
method: "POST",
|
|
1422
|
-
body: {
|
|
1429
|
+
body: {
|
|
1430
|
+
title,
|
|
1431
|
+
source: opts.source,
|
|
1432
|
+
description: opts.description,
|
|
1433
|
+
bet_id: opts.bet,
|
|
1434
|
+
status: opts.status,
|
|
1435
|
+
priority: opts.priority,
|
|
1436
|
+
follow_up_of: opts.followUpOf,
|
|
1437
|
+
roadmap_id: opts.roadmap,
|
|
1438
|
+
roadmap_order: roadmapOrder
|
|
1439
|
+
}
|
|
1423
1440
|
});
|
|
1424
1441
|
process.stdout.write(JSON.stringify(res) + "\n");
|
|
1425
1442
|
if (res.error) process.exit(1);
|
|
1426
1443
|
});
|
|
1427
|
-
tasksCmd.command("update <slug> <id>").description("Update a task").option("--title <title>", "New title").option("--description <description>", "New description").option("--status <status>", "New status").option("--priority <priority>", "New priority").option("--bet <bet-id>", "New parent bet ID").action(async (slug, id, opts) => {
|
|
1444
|
+
tasksCmd.command("update <slug> <id>").description("Update a task").option("--title <title>", "New title").option("--description <description>", "New description").option("--status <status>", "New status").option("--priority <priority>", "New priority").option("--bet <bet-id>", "New parent bet ID").option("--roadmap <roadmap-id|none>", "Attach to a leaf roadmap; 'none' detaches").option("--roadmap-order <n|none>", "Ordering among tasks on the roadmap; 'none' clears").action(async (slug, id, opts) => {
|
|
1428
1445
|
const body = {};
|
|
1429
1446
|
if (opts.title) body.title = opts.title;
|
|
1430
1447
|
if (opts.description) body.description = opts.description;
|
|
1431
1448
|
if (opts.status) body.status = opts.status;
|
|
1432
1449
|
if (opts.priority) body.priority = opts.priority;
|
|
1433
1450
|
if (opts.bet) body.bet_id = opts.bet;
|
|
1451
|
+
if (opts.roadmap !== void 0) body.roadmap_id = opts.roadmap === "none" ? null : opts.roadmap;
|
|
1452
|
+
if (opts.roadmapOrder !== void 0) {
|
|
1453
|
+
const order = opts.roadmapOrder === "none" ? null : Number(opts.roadmapOrder);
|
|
1454
|
+
if (order !== null && !Number.isInteger(order)) {
|
|
1455
|
+
process.stderr.write("--roadmap-order must be an integer or 'none'\n");
|
|
1456
|
+
process.exit(1);
|
|
1457
|
+
return;
|
|
1458
|
+
}
|
|
1459
|
+
body.roadmap_order = order;
|
|
1460
|
+
}
|
|
1434
1461
|
const res = await apiRequest(`/pebbles/${slug}/tasks/${id}`, {
|
|
1435
1462
|
method: "PUT",
|
|
1436
1463
|
body
|