@pxlabz/tasq-mcp 0.1.10 → 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.
Files changed (2) hide show
  1. package/dist/tasq-mcp.js +34 -17
  2. package/package.json +2 -2
package/dist/tasq-mcp.js CHANGED
@@ -30635,7 +30635,7 @@ var EMPTY_COMPLETION_RESULT = {
30635
30635
  // package.json
30636
30636
  var package_default = {
30637
30637
  name: "@pxlabz/tasq-mcp",
30638
- version: "0.1.10",
30638
+ version: "0.1.11",
30639
30639
  description: "MCP stdio server for Tasq: tasks, threads, comments and mentions for MCP-capable agents",
30640
30640
  keywords: [
30641
30641
  "tasq",
@@ -30819,10 +30819,13 @@ function threadLine(outcomes) {
30819
30819
  const why = phrases.length === 0 ? "" : ` (${phrases.join("; ")})`;
30820
30820
  return `thread: delivered to ${agentCount(delivered)}, ${suppressed} suppressed${why}`;
30821
30821
  }
30822
- function deliveryLines(outcomes, nameByAgentId) {
30822
+ function deliveryLines(outcomes, nameByAgentId, nameByMemberId = /* @__PURE__ */ new Map()) {
30823
30823
  const lines = (outcomes.mentions ?? []).map(
30824
30824
  (mention) => mentionLine(mention, nameByAgentId.get(mention.agentId))
30825
30825
  );
30826
+ for (const memberId of outcomes.memberMentions ?? []) {
30827
+ lines.push(`mentioned ${nameByMemberId.get(memberId) ?? "a person"}`);
30828
+ }
30826
30829
  const threadMessages = outcomes.threadMessages ?? [];
30827
30830
  if (threadMessages.length > 0) lines.push(threadLine(threadMessages));
30828
30831
  return lines;
@@ -30980,27 +30983,35 @@ async function resolveProjectId(client, slug, ref) {
30980
30983
  }
30981
30984
  return matched[0]?.id ?? "";
30982
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
+ }
30983
30990
  function resolveMentions(members, names) {
30984
- const agents = members.filter(
30985
- (member) => member.type === "agent" && member.agentId !== null
30986
- );
30987
- return names.map((name) => {
30991
+ const resolved = { agentIds: [], memberIds: [] };
30992
+ for (const name of names) {
30988
30993
  const wanted = name.trim().toLowerCase();
30989
- const matched = agents.filter(
30990
- (agent) => (agent.name ?? "").toLowerCase() === wanted
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
30991
30996
  );
30992
- if (matched.length === 0) {
30997
+ const [only] = matched;
30998
+ if (only === void 0) {
30993
30999
  throw new UsageError(
30994
- `No agent named "${name}" in this workspace.`
31000
+ `No person or agent named "${name}" in this workspace.`
30995
31001
  );
30996
31002
  }
30997
31003
  if (matched.length > 1) {
30998
31004
  throw new UsageError(
30999
- `"${name}" matches ${matched.length} agents. Rename one, or pass the agent id.`
31005
+ `"${name}" is ambiguous: it matches ${matched.map(mentionCandidate).join(", ")}. Mention a person by email, or rename one.`
31000
31006
  );
31001
31007
  }
31002
- return matched[0]?.agentId ?? "";
31003
- });
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;
31004
31015
  }
31005
31016
  async function resolveApproverId(client, slug, ref) {
31006
31017
  const trimmed = ref.trim();
@@ -31347,7 +31358,7 @@ var definitions = [
31347
31358
  }),
31348
31359
  define({
31349
31360
  name: "comment_add",
31350
- 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.",
31351
31362
  schema: external_exports.object({
31352
31363
  ...workspaceFields,
31353
31364
  body: external_exports.string().describe("Comment body."),
@@ -31355,7 +31366,7 @@ var definitions = [
31355
31366
  project: external_exports.string().optional().describe("Project id or name, instead of a task."),
31356
31367
  replyTo: external_exports.string().optional().describe("Comment id to reply to."),
31357
31368
  thread: external_exports.string().optional().describe("Thread root id; an alias for replyTo."),
31358
- mentions: external_exports.array(external_exports.string()).optional().describe("Agent names to mention.")
31369
+ mentions: external_exports.array(external_exports.string()).optional().describe("Names of people or agents to mention.")
31359
31370
  }),
31360
31371
  run: async ({ client, config: config2 }, input) => {
31361
31372
  const slug = requireWorkspace(config2, input);
@@ -31375,16 +31386,22 @@ var definitions = [
31375
31386
  parent
31376
31387
  );
31377
31388
  }
31378
- 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
+ }
31379
31393
  const added = await client.dispatch("comment.add", slug, action);
31380
31394
  const nameByAgentId = new Map(
31381
31395
  members.map((member) => [member.agentId, member.name])
31382
31396
  );
31397
+ const nameByMemberId = new Map(
31398
+ members.map((member) => [member.id, member.name])
31399
+ );
31383
31400
  return {
31384
31401
  data: added.result,
31385
31402
  lines: [
31386
31403
  `Comment added to ${target.label}.`,
31387
- ...deliveryLines(added.result, nameByAgentId)
31404
+ ...deliveryLines(added.result, nameByAgentId, nameByMemberId)
31388
31405
  ]
31389
31406
  };
31390
31407
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pxlabz/tasq-mcp",
3
- "version": "0.1.10",
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.13",
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"