@pxlabz/tasq-cli 0.1.15 → 0.1.16
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 +4 -4
- package/README.md +3 -3
- package/dist/tasq.js +30 -15
- package/package.json +2 -2
package/.tasq-skill.md
CHANGED
|
@@ -51,9 +51,9 @@ tasq task update <ref> [--title <title>] [--description <markdown>]
|
|
|
51
51
|
[--parent <ref> | --no-parent]
|
|
52
52
|
|
|
53
53
|
tasq comment add <ref> <body> [--reply-to <commentRef>] [--thread <threadId>]
|
|
54
|
-
[--mention <
|
|
54
|
+
[--mention <name>]…
|
|
55
55
|
tasq comment add --project <id|name> <body> [--reply-to <commentRef>]
|
|
56
|
-
[--thread <threadId>] [--mention <
|
|
56
|
+
[--thread <threadId>] [--mention <name>]…
|
|
57
57
|
|
|
58
58
|
tasq thread view <threadId>
|
|
59
59
|
tasq thread context <threadId> [--markdown]
|
|
@@ -83,7 +83,7 @@ tasq auth whoami
|
|
|
83
83
|
|
|
84
84
|
`--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.
|
|
85
85
|
|
|
86
|
-
`--mention` is repeatable and matches
|
|
86
|
+
`--mention` is repeatable and matches a person or agent name exactly, ignoring case; a person also matches by email. A name that matches more than one member (two people, or a person and an agent) is a usage error that lists the candidates. Agents are woken; people get a `mentioned` notification, and the output prints `mentioned <name>` for each.
|
|
87
87
|
|
|
88
88
|
`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.
|
|
89
89
|
|
|
@@ -171,7 +171,7 @@ You draft; a person sends. `tasq update draft` always writes a draft, and nothin
|
|
|
171
171
|
| --- | --- |
|
|
172
172
|
| 0 | Success |
|
|
173
173
|
| 1 | Error; details on stderr |
|
|
174
|
-
| 2 | Usage error — a bad flag, or a `--mention` name matching no
|
|
174
|
+
| 2 | Usage error — a bad flag, or a `--mention` name matching no one or more than one member |
|
|
175
175
|
| 3 | Rate limited; the message says when to retry. `events listen` never exits here — it waits and continues |
|
|
176
176
|
| 4 | Your policy denied the action, or it is one only a person may run (`update send`). Do not retry it; say what was refused |
|
|
177
177
|
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ TASQ_API_KEY=tq_ag_… TASQ_WORKSPACE=acme tasq task list
|
|
|
27
27
|
```
|
|
28
28
|
tasq workspace list | use <slug>
|
|
29
29
|
tasq task list | view <ref> | create | update <ref>
|
|
30
|
-
tasq comment add <ref> <body> [--reply-to <commentRef>] [--mention <
|
|
30
|
+
tasq comment add <ref> <body> [--reply-to <commentRef>] [--mention <name>]…
|
|
31
31
|
tasq events listen [--wait <seconds>] [--once]
|
|
32
32
|
tasq events ack <id>…
|
|
33
33
|
tasq project list | star <project> | unstar <project>
|
|
@@ -41,7 +41,7 @@ Every command takes `--json` for raw output and `-w, --workspace <slug>` to over
|
|
|
41
41
|
|
|
42
42
|
### Mentions and replies
|
|
43
43
|
|
|
44
|
-
`--mention <
|
|
44
|
+
`--mention <name>` is repeatable and matches a person's or an agent's name exactly, ignoring case; a person also matches by email. A name that matches more than one member — two people, two agents, or a person and an agent — is a usage error (exit 2) that lists the candidates rather than a guess. Each mentioned person gets a `mentioned` notification and a `mentioned <name>` line. After the comment is written, one line per mention says `delivered to <name>`, or `<name>: suppressed: agents are isolated` when one agent mentioned another — agents do not deliver mentions to each other in this release.
|
|
45
45
|
|
|
46
46
|
`--reply-to` takes a comment id, or the `ENG-42#<id>` form `task view` prints. The parent must be a comment on the same task.
|
|
47
47
|
|
|
@@ -89,7 +89,7 @@ Both are examples. Tasq stores and delivers the event; it never runs your agent.
|
|
|
89
89
|
| --- | --- |
|
|
90
90
|
| 0 | Success |
|
|
91
91
|
| 1 | Error (details on stderr) |
|
|
92
|
-
| 2 | Usage error — including an `--mention` name that matches no
|
|
92
|
+
| 2 | Usage error — including an `--mention` name that matches no one or more than one member |
|
|
93
93
|
| 3 | Rate limited; the message includes when to retry. `events listen` does not exit here: it sleeps for `Retry-After` and carries on |
|
|
94
94
|
| 4 | The agent's policy denied the action |
|
|
95
95
|
|
package/dist/tasq.js
CHANGED
|
@@ -6946,7 +6946,7 @@ function reportError(error, io2) {
|
|
|
6946
6946
|
// package.json
|
|
6947
6947
|
var package_default = {
|
|
6948
6948
|
name: "@pxlabz/tasq-cli",
|
|
6949
|
-
version: "0.1.
|
|
6949
|
+
version: "0.1.16",
|
|
6950
6950
|
description: "Command-line client for Tasq, for humans and agents alike",
|
|
6951
6951
|
keywords: [
|
|
6952
6952
|
"tasq",
|
|
@@ -7400,27 +7400,35 @@ function replyRef(options) {
|
|
|
7400
7400
|
}
|
|
7401
7401
|
return replyTo;
|
|
7402
7402
|
}
|
|
7403
|
+
function mentionCandidate(member) {
|
|
7404
|
+
const name = member.name ?? "(no name)";
|
|
7405
|
+
return member.type === "agent" ? `${name} (agent)` : `${name} <${member.email ?? "no email"}> (person)`;
|
|
7406
|
+
}
|
|
7403
7407
|
function resolveMentions(members, names) {
|
|
7404
|
-
const
|
|
7405
|
-
|
|
7406
|
-
);
|
|
7407
|
-
return names.map((name) => {
|
|
7408
|
+
const resolved = { agentIds: [], memberIds: [] };
|
|
7409
|
+
for (const name of names) {
|
|
7408
7410
|
const wanted = name.trim().toLowerCase();
|
|
7409
|
-
const matched =
|
|
7410
|
-
(
|
|
7411
|
+
const matched = members.filter(
|
|
7412
|
+
(member) => member.type === "agent" ? member.agentId !== null && (member.name ?? "").toLowerCase() === wanted : (member.name ?? "").toLowerCase() === wanted || (member.email ?? "").toLowerCase() === wanted
|
|
7411
7413
|
);
|
|
7412
|
-
|
|
7414
|
+
const [only] = matched;
|
|
7415
|
+
if (only === void 0) {
|
|
7413
7416
|
throw new UsageError(
|
|
7414
|
-
`No agent named "${name}" in this workspace. Run "tasq workspace members" to see the names.`
|
|
7417
|
+
`No person or agent named "${name}" in this workspace. Run "tasq workspace members" to see the names.`
|
|
7415
7418
|
);
|
|
7416
7419
|
}
|
|
7417
7420
|
if (matched.length > 1) {
|
|
7418
7421
|
throw new UsageError(
|
|
7419
|
-
`"${name}" matches ${matched.
|
|
7422
|
+
`"${name}" is ambiguous: it matches ${matched.map(mentionCandidate).join(", ")}. Mention a person by email, or rename one.`
|
|
7420
7423
|
);
|
|
7421
7424
|
}
|
|
7422
|
-
|
|
7423
|
-
|
|
7425
|
+
if (only.type === "agent" && only.agentId !== null) {
|
|
7426
|
+
resolved.agentIds.push(only.agentId);
|
|
7427
|
+
} else {
|
|
7428
|
+
resolved.memberIds.push(only.id);
|
|
7429
|
+
}
|
|
7430
|
+
}
|
|
7431
|
+
return resolved;
|
|
7424
7432
|
}
|
|
7425
7433
|
function reasonPhrase(reason) {
|
|
7426
7434
|
switch (reason) {
|
|
@@ -7529,7 +7537,8 @@ async function commentAdd(ctx, taskRef, body, options = {}) {
|
|
|
7529
7537
|
if (parent !== void 0) {
|
|
7530
7538
|
input.parentId = resolveParentId(target.comments, target.label, parent);
|
|
7531
7539
|
}
|
|
7532
|
-
if (mentions.length > 0) input.mentions = mentions;
|
|
7540
|
+
if (mentions.agentIds.length > 0) input.mentions = mentions.agentIds;
|
|
7541
|
+
if (mentions.memberIds.length > 0) input.memberMentions = mentions.memberIds;
|
|
7533
7542
|
const added = await ctx.client.dispatch("comment.add", slug, input);
|
|
7534
7543
|
if (ctx.config.json) {
|
|
7535
7544
|
ctx.io.out(jsonOutput(added.result));
|
|
@@ -7542,6 +7551,12 @@ async function commentAdd(ctx, taskRef, body, options = {}) {
|
|
|
7542
7551
|
for (const mention of added.result.mentions ?? []) {
|
|
7543
7552
|
ctx.io.out(mentionLine(mention, nameById.get(mention.agentId)));
|
|
7544
7553
|
}
|
|
7554
|
+
const nameByMemberId = new Map(
|
|
7555
|
+
members.map((member) => [member.id, member.name])
|
|
7556
|
+
);
|
|
7557
|
+
for (const memberId of added.result.memberMentions ?? []) {
|
|
7558
|
+
ctx.io.out(`mentioned ${nameByMemberId.get(memberId) ?? "a person"}`);
|
|
7559
|
+
}
|
|
7545
7560
|
const threadMessages = added.result.threadMessages ?? [];
|
|
7546
7561
|
if (threadMessages.length > 0) ctx.io.out(threadLine(threadMessages));
|
|
7547
7562
|
}
|
|
@@ -8555,8 +8570,8 @@ function buildProgram(io2) {
|
|
|
8555
8570
|
}
|
|
8556
8571
|
const comment = program2.command("comment").description("Task and project comments");
|
|
8557
8572
|
comment.command("add").argument("<taskRefOrBody>", "task identifier or id, or the body with --project").argument("[body]", "comment body, when a task was given").description("Add a comment to a task or a project").usage("[options] <taskRef> <body>\n tasq comment add [options] --project <projectRef> <body>").option("--project <projectRef>", "project id or name, instead of a task").option("--reply-to <commentRef>", "comment id, or ENG-42#<id>, to reply to").option("--thread <threadId>", "thread root id, an alias for --reply-to").option(
|
|
8558
|
-
"--mention <
|
|
8559
|
-
"agent to mention, repeatable",
|
|
8573
|
+
"--mention <name>",
|
|
8574
|
+
"person or agent to mention, by name (or a person's email), repeatable",
|
|
8560
8575
|
(value, previous) => [
|
|
8561
8576
|
...previous ?? [],
|
|
8562
8577
|
value
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pxlabz/tasq-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "Command-line client for Tasq, for humans and agents alike",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tasq",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"commander": "^14.0.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@pxlabz/tasq-sdk": "0.1.
|
|
52
|
+
"@pxlabz/tasq-sdk": "0.1.15",
|
|
53
53
|
"@types/bun": "^1.3.12",
|
|
54
54
|
"tsup": "^8.5.0",
|
|
55
55
|
"typescript": "^5.7.2"
|