@pxlabz/tasq-mcp 0.1.9 → 0.1.11
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 +1 -1
- package/dist/tasq-mcp.js +73 -23
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -70,7 +70,7 @@ tool that sends a project update: an agent drafts, and a person sends.
|
|
|
70
70
|
| `thread_context` | `tasq thread context` | `workspace`, `threadId`, `format` (`markdown` by default) |
|
|
71
71
|
| `project_list` | `tasq project list` | `workspace` |
|
|
72
72
|
| `initiative_list` | `tasq initiative list` | `workspace` |
|
|
73
|
-
| `project_update_list` | `tasq update list` | `workspace`, `project`
|
|
73
|
+
| `project_update_list` | `tasq update list` | `workspace`, `project`, `limit` |
|
|
74
74
|
| `project_update_draft` | `tasq update draft` | `workspace`, `project`, `health`, `body` |
|
|
75
75
|
| `cycle_current` | `tasq cycle current` | `workspace`, `team` |
|
|
76
76
|
| `events_listen` | `tasq events listen` | `workspace`, `wait` (seconds, 0–25) |
|
package/dist/tasq-mcp.js
CHANGED
|
@@ -22299,6 +22299,7 @@ function toTasqError(status, body, retryAfterHeader) {
|
|
|
22299
22299
|
}
|
|
22300
22300
|
|
|
22301
22301
|
// ../sdk/src/client.ts
|
|
22302
|
+
var PROJECT_UPDATES_PAGE_MAX = 100;
|
|
22302
22303
|
function assertPrefix(token, prefix, label) {
|
|
22303
22304
|
if (!token.startsWith(prefix)) {
|
|
22304
22305
|
throw new Error(
|
|
@@ -22472,10 +22473,32 @@ var TasqClient = class _TasqClient {
|
|
|
22472
22473
|
* approving it.
|
|
22473
22474
|
*/
|
|
22474
22475
|
projectUpdates = {
|
|
22475
|
-
/**
|
|
22476
|
-
|
|
22477
|
-
|
|
22478
|
-
|
|
22476
|
+
/**
|
|
22477
|
+
* Every update on the project, drafts included, newest first. Follows
|
|
22478
|
+
* `nextCursor` until the last page; use `listPage` for one page.
|
|
22479
|
+
*/
|
|
22480
|
+
list: async (slug, projectId) => {
|
|
22481
|
+
const updates = [];
|
|
22482
|
+
let before;
|
|
22483
|
+
do {
|
|
22484
|
+
const page = await this.projectUpdates.listPage(slug, projectId, {
|
|
22485
|
+
limit: PROJECT_UPDATES_PAGE_MAX,
|
|
22486
|
+
before
|
|
22487
|
+
});
|
|
22488
|
+
updates.push(...page.updates);
|
|
22489
|
+
before = page.nextCursor ?? void 0;
|
|
22490
|
+
} while (before !== void 0);
|
|
22491
|
+
return updates;
|
|
22492
|
+
},
|
|
22493
|
+
/**
|
|
22494
|
+
* One page of the project's updates, drafts included, newest first; pass
|
|
22495
|
+
* `nextCursor` as `before` for the next. The API returns 20 by default,
|
|
22496
|
+
* at most 100.
|
|
22497
|
+
*/
|
|
22498
|
+
listPage: (slug, projectId, query = {}) => this.#get(
|
|
22499
|
+
`/workspaces/${encodeURIComponent(slug)}/projects/${encodeURIComponent(projectId)}/updates`,
|
|
22500
|
+
{ limit: query.limit, before: query.before }
|
|
22501
|
+
),
|
|
22479
22502
|
draft: (slug, input) => this.dispatch("projectUpdate.create", slug, input),
|
|
22480
22503
|
create: (slug, input) => this.dispatch("projectUpdate.create", slug, input),
|
|
22481
22504
|
update: (slug, input) => this.dispatch("projectUpdate.update", slug, input),
|
|
@@ -30612,7 +30635,7 @@ var EMPTY_COMPLETION_RESULT = {
|
|
|
30612
30635
|
// package.json
|
|
30613
30636
|
var package_default = {
|
|
30614
30637
|
name: "@pxlabz/tasq-mcp",
|
|
30615
|
-
version: "0.1.
|
|
30638
|
+
version: "0.1.11",
|
|
30616
30639
|
description: "MCP stdio server for Tasq: tasks, threads, comments and mentions for MCP-capable agents",
|
|
30617
30640
|
keywords: [
|
|
30618
30641
|
"tasq",
|
|
@@ -30796,10 +30819,13 @@ function threadLine(outcomes) {
|
|
|
30796
30819
|
const why = phrases.length === 0 ? "" : ` (${phrases.join("; ")})`;
|
|
30797
30820
|
return `thread: delivered to ${agentCount(delivered)}, ${suppressed} suppressed${why}`;
|
|
30798
30821
|
}
|
|
30799
|
-
function deliveryLines(outcomes, nameByAgentId) {
|
|
30822
|
+
function deliveryLines(outcomes, nameByAgentId, nameByMemberId = /* @__PURE__ */ new Map()) {
|
|
30800
30823
|
const lines = (outcomes.mentions ?? []).map(
|
|
30801
30824
|
(mention) => mentionLine(mention, nameByAgentId.get(mention.agentId))
|
|
30802
30825
|
);
|
|
30826
|
+
for (const memberId of outcomes.memberMentions ?? []) {
|
|
30827
|
+
lines.push(`mentioned ${nameByMemberId.get(memberId) ?? "a person"}`);
|
|
30828
|
+
}
|
|
30803
30829
|
const threadMessages = outcomes.threadMessages ?? [];
|
|
30804
30830
|
if (threadMessages.length > 0) lines.push(threadLine(threadMessages));
|
|
30805
30831
|
return lines;
|
|
@@ -30957,27 +30983,35 @@ async function resolveProjectId(client, slug, ref) {
|
|
|
30957
30983
|
}
|
|
30958
30984
|
return matched[0]?.id ?? "";
|
|
30959
30985
|
}
|
|
30986
|
+
function mentionCandidate(member) {
|
|
30987
|
+
const name = member.name ?? "(no name)";
|
|
30988
|
+
return member.type === "agent" ? `${name} (agent)` : `${name} <${member.email ?? "no email"}> (person)`;
|
|
30989
|
+
}
|
|
30960
30990
|
function resolveMentions(members, names) {
|
|
30961
|
-
const
|
|
30962
|
-
|
|
30963
|
-
);
|
|
30964
|
-
return names.map((name) => {
|
|
30991
|
+
const resolved = { agentIds: [], memberIds: [] };
|
|
30992
|
+
for (const name of names) {
|
|
30965
30993
|
const wanted = name.trim().toLowerCase();
|
|
30966
|
-
const matched =
|
|
30967
|
-
(
|
|
30994
|
+
const matched = members.filter(
|
|
30995
|
+
(member) => member.type === "agent" ? member.agentId !== null && (member.name ?? "").toLowerCase() === wanted : (member.name ?? "").toLowerCase() === wanted || (member.email ?? "").toLowerCase() === wanted
|
|
30968
30996
|
);
|
|
30969
|
-
|
|
30997
|
+
const [only] = matched;
|
|
30998
|
+
if (only === void 0) {
|
|
30970
30999
|
throw new UsageError(
|
|
30971
|
-
`No agent named "${name}" in this workspace.`
|
|
31000
|
+
`No person or agent named "${name}" in this workspace.`
|
|
30972
31001
|
);
|
|
30973
31002
|
}
|
|
30974
31003
|
if (matched.length > 1) {
|
|
30975
31004
|
throw new UsageError(
|
|
30976
|
-
`"${name}" matches ${matched.
|
|
31005
|
+
`"${name}" is ambiguous: it matches ${matched.map(mentionCandidate).join(", ")}. Mention a person by email, or rename one.`
|
|
30977
31006
|
);
|
|
30978
31007
|
}
|
|
30979
|
-
|
|
30980
|
-
|
|
31008
|
+
if (only.type === "agent" && only.agentId !== null) {
|
|
31009
|
+
resolved.agentIds.push(only.agentId);
|
|
31010
|
+
} else {
|
|
31011
|
+
resolved.memberIds.push(only.id);
|
|
31012
|
+
}
|
|
31013
|
+
}
|
|
31014
|
+
return resolved;
|
|
30981
31015
|
}
|
|
30982
31016
|
async function resolveApproverId(client, slug, ref) {
|
|
30983
31017
|
const trimmed = ref.trim();
|
|
@@ -31324,7 +31358,7 @@ var definitions = [
|
|
|
31324
31358
|
}),
|
|
31325
31359
|
define({
|
|
31326
31360
|
name: "comment_add",
|
|
31327
|
-
description: "Comment on a task or a project, optionally replying and mentioning agents.",
|
|
31361
|
+
description: "Comment on a task or a project, optionally replying and mentioning people or agents.",
|
|
31328
31362
|
schema: external_exports.object({
|
|
31329
31363
|
...workspaceFields,
|
|
31330
31364
|
body: external_exports.string().describe("Comment body."),
|
|
@@ -31332,7 +31366,7 @@ var definitions = [
|
|
|
31332
31366
|
project: external_exports.string().optional().describe("Project id or name, instead of a task."),
|
|
31333
31367
|
replyTo: external_exports.string().optional().describe("Comment id to reply to."),
|
|
31334
31368
|
thread: external_exports.string().optional().describe("Thread root id; an alias for replyTo."),
|
|
31335
|
-
mentions: external_exports.array(external_exports.string()).optional().describe("
|
|
31369
|
+
mentions: external_exports.array(external_exports.string()).optional().describe("Names of people or agents to mention.")
|
|
31336
31370
|
}),
|
|
31337
31371
|
run: async ({ client, config: config2 }, input) => {
|
|
31338
31372
|
const slug = requireWorkspace(config2, input);
|
|
@@ -31352,16 +31386,22 @@ var definitions = [
|
|
|
31352
31386
|
parent
|
|
31353
31387
|
);
|
|
31354
31388
|
}
|
|
31355
|
-
if (mentions.length > 0) action.mentions = mentions;
|
|
31389
|
+
if (mentions.agentIds.length > 0) action.mentions = mentions.agentIds;
|
|
31390
|
+
if (mentions.memberIds.length > 0) {
|
|
31391
|
+
action.memberMentions = mentions.memberIds;
|
|
31392
|
+
}
|
|
31356
31393
|
const added = await client.dispatch("comment.add", slug, action);
|
|
31357
31394
|
const nameByAgentId = new Map(
|
|
31358
31395
|
members.map((member) => [member.agentId, member.name])
|
|
31359
31396
|
);
|
|
31397
|
+
const nameByMemberId = new Map(
|
|
31398
|
+
members.map((member) => [member.id, member.name])
|
|
31399
|
+
);
|
|
31360
31400
|
return {
|
|
31361
31401
|
data: added.result,
|
|
31362
31402
|
lines: [
|
|
31363
31403
|
`Comment added to ${target.label}.`,
|
|
31364
|
-
...deliveryLines(added.result, nameByAgentId)
|
|
31404
|
+
...deliveryLines(added.result, nameByAgentId, nameByMemberId)
|
|
31365
31405
|
]
|
|
31366
31406
|
};
|
|
31367
31407
|
}
|
|
@@ -31429,12 +31469,22 @@ var definitions = [
|
|
|
31429
31469
|
description: "List a project's updates, drafts included, newest first.",
|
|
31430
31470
|
schema: external_exports.object({
|
|
31431
31471
|
...workspaceFields,
|
|
31432
|
-
project: external_exports.string().describe("Project id or name.")
|
|
31472
|
+
project: external_exports.string().describe("Project id or name."),
|
|
31473
|
+
limit: external_exports.number().int().min(1).max(100).optional().describe(
|
|
31474
|
+
"Only the latest n updates, 1-100, as one page with nextCursor; omit for all of them."
|
|
31475
|
+
)
|
|
31433
31476
|
}),
|
|
31434
31477
|
run: async ({ client, config: config2 }, input) => {
|
|
31435
31478
|
const slug = requireWorkspace(config2, input);
|
|
31436
31479
|
const projectId = await resolveProjectId(client, slug, input.project);
|
|
31437
|
-
|
|
31480
|
+
if (input.limit === void 0) {
|
|
31481
|
+
return { data: await client.projectUpdates.list(slug, projectId) };
|
|
31482
|
+
}
|
|
31483
|
+
return {
|
|
31484
|
+
data: await client.projectUpdates.listPage(slug, projectId, {
|
|
31485
|
+
limit: input.limit
|
|
31486
|
+
})
|
|
31487
|
+
};
|
|
31438
31488
|
}
|
|
31439
31489
|
}),
|
|
31440
31490
|
// Drafting is the whole agent surface: there is no send tool, because
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pxlabz/tasq-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "MCP stdio server for Tasq: tasks, threads, comments and mentions for MCP-capable agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tasq",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"zod": "4.3.6"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@pxlabz/tasq-sdk": "0.1.
|
|
51
|
+
"@pxlabz/tasq-sdk": "0.1.15",
|
|
52
52
|
"@types/bun": "^1.3.12",
|
|
53
53
|
"tsup": "^8.5.0",
|
|
54
54
|
"typescript": "^5.7.2"
|