@pxlabz/tasq-cli 0.1.7 → 0.1.9

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/.tasq-skill.md CHANGED
@@ -43,9 +43,12 @@ tasq task list [--team <identifier>] [--status <name>] [--assignee <id>]
43
43
  tasq task view <ref>
44
44
  tasq task create <title> [--team <identifier>] [--description <markdown>]
45
45
  [--priority <priority>] [--project <id>]
46
- [--labels <a,b,c>]
46
+ [--labels <a,b,c>] [--due <YYYY-MM-DD>]
47
+ [--start <YYYY-MM-DD>] [--parent <ref>]
47
48
  tasq task update <ref> [--title <title>] [--description <markdown>]
48
49
  [--priority <priority>] [--status <name>]
50
+ [--due <YYYY-MM-DD|none>] [--start <YYYY-MM-DD|none>]
51
+ [--parent <ref> | --no-parent]
49
52
 
50
53
  tasq comment add <ref> <body> [--reply-to <commentRef>] [--thread <threadId>]
51
54
  [--mention <agentName>]…
@@ -73,6 +76,8 @@ tasq auth logout
73
76
  tasq auth whoami
74
77
  ```
75
78
 
79
+ `--parent <ref>` makes the task a subtask of another task on the same team (one level only: a subtask cannot take subtasks, and an archived task cannot be a parent). A subtask's project and phase follow its parent, so `task create` refuses `--parent` together with `--project`; move the parent instead. `--no-parent` on `task update` detaches it and leaves its placement alone. `task view` prints `Parent: <key>` on a subtask and `Subtasks: <done>/<total> done` on a parent.
80
+
76
81
  `--mention` is repeatable and matches an agent name exactly, ignoring case.
77
82
 
78
83
  `task view` and `thread view` print every message with its id on the header line, as ` <createdAt> <author> #<id>` with the body indented beneath it. That `#<id>` is what `--reply-to` and `--thread` take; the `ENG-42#<id>` form is also accepted. The parent must be a message on the same task or project.
package/dist/tasq.js CHANGED
@@ -6845,7 +6845,7 @@ function reportError(error, io2) {
6845
6845
  // package.json
6846
6846
  var package_default = {
6847
6847
  name: "@pxlabz/tasq-cli",
6848
- version: "0.1.7",
6848
+ version: "0.1.9",
6849
6849
  description: "Command-line client for Tasq, for humans and agents alike",
6850
6850
  keywords: [
6851
6851
  "tasq",
@@ -7766,6 +7766,14 @@ async function taskView(ctx, taskRef) {
7766
7766
  `Start: ${task.startDate ?? "\u2014"} Due: ${task.dueDate ?? "\u2014"}`
7767
7767
  );
7768
7768
  }
7769
+ if (task.parent) {
7770
+ ctx.io.out(`Parent: ${task.parent.identifier} ${task.parent.title}`);
7771
+ }
7772
+ if (task.subtaskProgress && task.subtaskProgress.total > 0) {
7773
+ ctx.io.out(
7774
+ `Subtasks: ${task.subtaskProgress.completed}/${task.subtaskProgress.total} done`
7775
+ );
7776
+ }
7769
7777
  if (task.descriptionMarkdown !== null && task.descriptionMarkdown !== "") {
7770
7778
  ctx.io.out("");
7771
7779
  ctx.io.out(task.descriptionMarkdown);
@@ -7809,6 +7817,12 @@ async function resolveLabelIds(ctx, slug, names) {
7809
7817
  }
7810
7818
  async function taskCreate(ctx, title, options) {
7811
7819
  const slug = requireWorkspace(ctx.config);
7820
+ if (options.parent !== void 0 && options.project !== void 0) {
7821
+ throw new UsageError(
7822
+ "--parent and --project cannot be combined: a subtask takes its parent's project."
7823
+ );
7824
+ }
7825
+ const parentTaskId = options.parent === void 0 ? void 0 : await resolveTaskId(ctx.client, slug, options.parent);
7812
7826
  const teamIdentifier = await resolveTeamIdentifier(ctx, slug, options.team);
7813
7827
  const labelNames = options.labels === void 0 || options.labels === "" ? [] : options.labels.split(",").map((name) => name.trim());
7814
7828
  const labelIds = labelNames.length === 0 ? [] : await resolveLabelIds(ctx, slug, labelNames);
@@ -7821,6 +7835,7 @@ async function taskCreate(ctx, title, options) {
7821
7835
  input.priority = priority(options.priority);
7822
7836
  }
7823
7837
  if (options.project !== void 0) input.projectId = options.project;
7838
+ if (parentTaskId !== void 0) input.parentTaskId = parentTaskId;
7824
7839
  const steps = new StepRunner();
7825
7840
  const created = await steps.run(
7826
7841
  "create",
@@ -7866,10 +7881,11 @@ async function taskUpdate(ctx, taskRef, options) {
7866
7881
  const changed = Object.values(options).some((value) => value !== void 0);
7867
7882
  if (!changed) {
7868
7883
  throw new UsageError(
7869
- "Nothing to update. Pass at least one of --title, --description, --priority, --status, --due, --start."
7884
+ "Nothing to update. Pass at least one of --title, --description, --priority, --status, --due, --start, --parent, --no-parent."
7870
7885
  );
7871
7886
  }
7872
7887
  const edits = dateEdits(options);
7888
+ const parentTaskId = options.parent === void 0 ? void 0 : options.parent === false ? null : await resolveTaskId(ctx.client, slug, options.parent);
7873
7889
  const taskId = await resolveTaskId(ctx.client, slug, taskRef);
7874
7890
  const task = await ctx.client.tasks.get(slug, taskId);
7875
7891
  const steps = new StepRunner();
@@ -7904,6 +7920,15 @@ async function taskUpdate(ctx, taskRef, options) {
7904
7920
  })
7905
7921
  );
7906
7922
  }
7923
+ if (parentTaskId !== void 0) {
7924
+ await steps.run(
7925
+ "parent",
7926
+ () => ctx.client.dispatch("task.setParent", slug, {
7927
+ taskId: task.id,
7928
+ parentTaskId
7929
+ })
7930
+ );
7931
+ }
7907
7932
  if (options.status !== void 0) {
7908
7933
  const statusId = await resolveStatusId(
7909
7934
  ctx,
@@ -7979,7 +8004,7 @@ function buildProgram(io2) {
7979
8004
  task.command("view").argument("<id>", "task identifier or id").description("Show a task with its comments and activity").action(async (id) => {
7980
8005
  await taskView(contextFor(program2, io2), id);
7981
8006
  });
7982
- task.command("create").argument("<title>", "task title").description("Create a task").option("--team <identifier>", "team identifier").option("--description <markdown>", "description in Markdown").option("--priority <priority>", "urgent | high | medium | low | none").option("--project <id>", "project id").option("--labels <names>", "comma-separated label names").option("--due <date>", "due date, YYYY-MM-DD").option("--start <date>", "start date, YYYY-MM-DD").action(
8007
+ task.command("create").argument("<title>", "task title").description("Create a task").option("--team <identifier>", "team identifier").option("--description <markdown>", "description in Markdown").option("--priority <priority>", "urgent | high | medium | low | none").option("--project <id>", "project id").option("--labels <names>", "comma-separated label names").option("--due <date>", "due date, YYYY-MM-DD").option("--start <date>", "start date, YYYY-MM-DD").option("--parent <id>", "parent task identifier or id, making this a subtask").action(
7983
8008
  async (title, options) => {
7984
8009
  await taskCreate(contextFor(program2, io2), title, {
7985
8010
  team: options.team,
@@ -7988,18 +8013,20 @@ function buildProgram(io2) {
7988
8013
  project: options.project,
7989
8014
  labels: options.labels,
7990
8015
  due: options.due,
7991
- start: options.start
8016
+ start: options.start,
8017
+ parent: options.parent
7992
8018
  });
7993
8019
  }
7994
8020
  );
7995
- task.command("update").argument("<id>", "task identifier or id").description("Update a task").option("--title <title>", "new title").option("--description <markdown>", "new description in Markdown").option("--priority <priority>", "urgent | high | medium | low | none").option("--status <name>", "status name on the task's team").option("--due <date>", 'due date, YYYY-MM-DD, or "none" to clear').option("--start <date>", 'start date, YYYY-MM-DD, or "none" to clear').action(async (id, options) => {
8021
+ task.command("update").argument("<id>", "task identifier or id").description("Update a task").option("--title <title>", "new title").option("--description <markdown>", "new description in Markdown").option("--priority <priority>", "urgent | high | medium | low | none").option("--status <name>", "status name on the task's team").option("--due <date>", 'due date, YYYY-MM-DD, or "none" to clear').option("--start <date>", 'start date, YYYY-MM-DD, or "none" to clear').option("--parent <id>", "parent task identifier or id, making this a subtask").option("--no-parent", "detach from its parent task").action(async (id, options) => {
7996
8022
  await taskUpdate(contextFor(program2, io2), id, {
7997
8023
  title: options.title,
7998
8024
  description: options.description,
7999
8025
  priority: options.priority,
8000
8026
  status: options.status,
8001
8027
  due: options.due,
8002
- start: options.start
8028
+ start: options.start,
8029
+ parent: options.parent
8003
8030
  });
8004
8031
  });
8005
8032
  const comment = program2.command("comment").description("Task and project comments");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pxlabz/tasq-cli",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Command-line client for Tasq, for humans and agents alike",
5
5
  "keywords": [
6
6
  "tasq",