@pxlabz/tasq-mcp 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/README.md CHANGED
@@ -56,7 +56,8 @@ moves together.
56
56
 
57
57
  ## Tools
58
58
 
59
- Twelve tools, stdio transport only. No resources, no prompts.
59
+ Fifteen tools, stdio transport only. No resources, no prompts. There is no
60
+ tool that sends a project update: an agent drafts, and a person sends.
60
61
 
61
62
  | Tool | Mirrors | Inputs |
62
63
  | ---------------- | ---------------------- | ---------------------------------------------------------------------------- |
@@ -68,6 +69,9 @@ Twelve tools, stdio transport only. No resources, no prompts.
68
69
  | `thread_view` | `tasq thread view` | `workspace`, `threadId` |
69
70
  | `thread_context` | `tasq thread context` | `workspace`, `threadId`, `format` (`markdown` by default) |
70
71
  | `project_list` | `tasq project list` | `workspace` |
72
+ | `initiative_list` | `tasq initiative list` | `workspace` |
73
+ | `project_update_list` | `tasq update list` | `workspace`, `project` |
74
+ | `project_update_draft` | `tasq update draft` | `workspace`, `project`, `health`, `body` |
71
75
  | `cycle_current` | `tasq cycle current` | `workspace`, `team` |
72
76
  | `events_listen` | `tasq events listen` | `workspace`, `wait` (seconds, 0–25) |
73
77
  | `events_ack` | `tasq events ack` | `workspace`, `ids` |
package/dist/tasq-mcp.js CHANGED
@@ -22422,7 +22422,18 @@ var TasqClient = class _TasqClient {
22422
22422
  )).tasks,
22423
22423
  get: async (slug, taskId) => (await this.#get(
22424
22424
  `/workspaces/${encodeURIComponent(slug)}/tasks/${encodeURIComponent(taskId)}`
22425
- )).task
22425
+ )).task,
22426
+ /**
22427
+ * Ask a person to sign off on a task (6.3). Asking again while a
22428
+ * request stands replaces the approver. The approver cannot be an agent.
22429
+ */
22430
+ requestApproval: (slug, taskId, approverId) => this.dispatch("task.requestApproval", slug, { taskId, approverId }),
22431
+ /**
22432
+ * The approver's answer (6.3). `approve` also moves the task to the next
22433
+ * status in its team's category order. Person credentials only: no
22434
+ * agent policy can include it.
22435
+ */
22436
+ decide: (slug, taskId, decision) => this.dispatch("task.decide", slug, { taskId, decision })
22426
22437
  };
22427
22438
  projects = {
22428
22439
  list: async (slug) => (await this.#get(
@@ -22430,7 +22441,46 @@ var TasqClient = class _TasqClient {
22430
22441
  )).projects,
22431
22442
  get: async (slug, projectId) => (await this.#get(
22432
22443
  `/workspaces/${encodeURIComponent(slug)}/projects/${encodeURIComponent(projectId)}`
22433
- )).project
22444
+ )).project,
22445
+ /**
22446
+ * Pin a project to the caller's own sidebar. People only: an agent
22447
+ * key is refused by policy whatever its preset.
22448
+ */
22449
+ star: (slug, input) => this.dispatch("project.star", slug, input),
22450
+ unstar: (slug, input) => this.dispatch("project.unstar", slug, input)
22451
+ };
22452
+ /**
22453
+ * Initiatives group projects across teams. Any member reads them; every
22454
+ * write is admin-level, so an agent key (always a member) cannot make one.
22455
+ */
22456
+ initiatives = {
22457
+ list: async (slug) => (await this.#get(
22458
+ `/workspaces/${encodeURIComponent(slug)}/initiatives`
22459
+ )).initiatives,
22460
+ create: (slug, input) => this.dispatch("initiative.create", slug, input),
22461
+ update: (slug, input) => this.dispatch("initiative.update", slug, input),
22462
+ delete: (slug, input) => this.dispatch("initiative.delete", slug, input),
22463
+ linkProject: (slug, input) => this.dispatch("initiative.linkProject", slug, input),
22464
+ unlinkProject: (slug, input) => this.dispatch("initiative.unlinkProject", slug, input)
22465
+ };
22466
+ /**
22467
+ * Project updates: a health call and a body for the project's client (7.5).
22468
+ *
22469
+ * `draft` is what an agent calls; an agent's update is always a draft
22470
+ * whatever it passes. `send` is people only: no agent policy can grant it,
22471
+ * because nothing an agent drafts goes to a client without a person
22472
+ * approving it.
22473
+ */
22474
+ projectUpdates = {
22475
+ /** Every update on the project, drafts included, newest first. */
22476
+ list: async (slug, projectId) => (await this.#get(
22477
+ `/workspaces/${encodeURIComponent(slug)}/projects/${encodeURIComponent(projectId)}/updates`
22478
+ )).updates,
22479
+ draft: (slug, input) => this.dispatch("projectUpdate.create", slug, input),
22480
+ create: (slug, input) => this.dispatch("projectUpdate.create", slug, input),
22481
+ update: (slug, input) => this.dispatch("projectUpdate.update", slug, input),
22482
+ send: (slug, input) => this.dispatch("projectUpdate.send", slug, input),
22483
+ delete: (slug, input) => this.dispatch("projectUpdate.delete", slug, input)
22434
22484
  };
22435
22485
  threads = {
22436
22486
  /**
@@ -22545,6 +22595,19 @@ var TasqClient = class _TasqClient {
22545
22595
  { unread: query.unread === true ? 1 : void 0 }
22546
22596
  )
22547
22597
  };
22598
+ activity = {
22599
+ /** The workspace activity feed, newest first; page with `nextCursor`. */
22600
+ list: (slug, query = {}) => this.#get(
22601
+ `/workspaces/${encodeURIComponent(slug)}/activity`,
22602
+ { limit: query.limit, before: query.before }
22603
+ )
22604
+ };
22605
+ waiting = {
22606
+ /** Approvals and agent drafts waiting on the caller. People only. */
22607
+ get: (slug) => this.#get(
22608
+ `/workspaces/${encodeURIComponent(slug)}/waiting`
22609
+ )
22610
+ };
22548
22611
  auth = {
22549
22612
  /** The principal behind the current credential. */
22550
22613
  me: async () => (await this.#get("/auth/me")).user,
@@ -22577,6 +22640,11 @@ var TasqClient = class _TasqClient {
22577
22640
  };
22578
22641
 
22579
22642
  // ../sdk/src/types.ts
22643
+ var PROJECT_HEALTH_VALUES = [
22644
+ "on_track",
22645
+ "at_risk",
22646
+ "off_track"
22647
+ ];
22580
22648
  var MAX_AGENT_WAKES_PER_MESSAGE = 10;
22581
22649
  var MAX_CONSECUTIVE_AGENT_MESSAGES = 5;
22582
22650
 
@@ -30544,7 +30612,7 @@ var EMPTY_COMPLETION_RESULT = {
30544
30612
  // package.json
30545
30613
  var package_default = {
30546
30614
  name: "@pxlabz/tasq-mcp",
30547
- version: "0.1.7",
30615
+ version: "0.1.9",
30548
30616
  description: "MCP stdio server for Tasq: tasks, threads, comments and mentions for MCP-capable agents",
30549
30617
  keywords: [
30550
30618
  "tasq",
@@ -30911,6 +30979,26 @@ function resolveMentions(members, names) {
30911
30979
  return matched[0]?.agentId ?? "";
30912
30980
  });
30913
30981
  }
30982
+ async function resolveApproverId(client, slug, ref) {
30983
+ const trimmed = ref.trim();
30984
+ if (UUID_PATTERN.test(trimmed)) return trimmed;
30985
+ const wanted = trimmed.toLowerCase();
30986
+ const members = await client.members.list(slug);
30987
+ const matched = members.filter(
30988
+ (member) => member.type === "user" && ((member.name ?? "").toLowerCase() === wanted || (member.email ?? "").toLowerCase() === wanted)
30989
+ );
30990
+ if (matched.length === 0) {
30991
+ throw new UsageError(
30992
+ `No person named "${ref}" in this workspace. Agents cannot approve.`
30993
+ );
30994
+ }
30995
+ if (matched.length > 1) {
30996
+ throw new UsageError(
30997
+ `"${ref}" matches ${matched.length} people. Pass their email or member id.`
30998
+ );
30999
+ }
31000
+ return matched[0]?.id ?? "";
31001
+ }
30914
31002
  function commentIdOf(ref) {
30915
31003
  const hash2 = ref.lastIndexOf("#");
30916
31004
  return hash2 === -1 ? ref.trim() : ref.slice(hash2 + 1).trim();
@@ -30918,6 +31006,7 @@ function commentIdOf(ref) {
30918
31006
 
30919
31007
  // src/tools.ts
30920
31008
  var PRIORITY_INPUT = external_exports.enum(["urgent", "high", "medium", "low", "none"]);
31009
+ var HEALTH_INPUT = external_exports.enum(PROJECT_HEALTH_VALUES);
30921
31010
  var DATE_INPUT = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Use YYYY-MM-DD");
30922
31011
  var DATE_OR_NONE = external_exports.union([DATE_INPUT, external_exports.literal("none")]);
30923
31012
  function datesInput(taskId, input) {
@@ -31213,6 +31302,26 @@ var definitions = [
31213
31302
  return { data: await client.tasks.get(slug, task.id) };
31214
31303
  }
31215
31304
  }),
31305
+ define({
31306
+ name: "task_request_approval",
31307
+ description: "Ask a person in the workspace to approve a task, replacing any approver already asked.",
31308
+ schema: external_exports.object({
31309
+ ...workspaceFields,
31310
+ id: external_exports.string().describe("Task key such as ENG-42, or a task id."),
31311
+ approver: external_exports.string().describe("The person's name, email or member id; agents cannot approve.")
31312
+ }),
31313
+ run: async ({ client, config: config2 }, input) => {
31314
+ const slug = requireWorkspace(config2, input);
31315
+ const approverId = await resolveApproverId(client, slug, input.approver);
31316
+ const taskId = await resolveTaskId(client, slug, input.id);
31317
+ const response = await client.tasks.requestApproval(
31318
+ slug,
31319
+ taskId,
31320
+ approverId
31321
+ );
31322
+ return { data: response.result };
31323
+ }
31324
+ }),
31216
31325
  define({
31217
31326
  name: "comment_add",
31218
31327
  description: "Comment on a task or a project, optionally replying and mentioning agents.",
@@ -31294,6 +31403,67 @@ var definitions = [
31294
31403
  data: await client.projects.list(requireWorkspace(config2, input))
31295
31404
  })
31296
31405
  }),
31406
+ define({
31407
+ name: "initiative_list",
31408
+ description: "List the workspace's initiatives, the groups of projects, with their project ids.",
31409
+ schema: external_exports.object({ ...workspaceFields }),
31410
+ run: async ({ client, config: config2 }, input) => ({
31411
+ data: await client.initiatives.list(requireWorkspace(config2, input))
31412
+ })
31413
+ }),
31414
+ define({
31415
+ name: "activity_list",
31416
+ description: "List recent workspace activity, newest first, each row an actor, a summary and a subject.",
31417
+ schema: external_exports.object({
31418
+ ...workspaceFields,
31419
+ limit: external_exports.number().int().min(1).max(100).optional().describe("How many rows, 1-100; defaults to 30.")
31420
+ }),
31421
+ run: async ({ client, config: config2 }, input) => ({
31422
+ data: await client.activity.list(requireWorkspace(config2, input), {
31423
+ limit: input.limit
31424
+ })
31425
+ })
31426
+ }),
31427
+ define({
31428
+ name: "project_update_list",
31429
+ description: "List a project's updates, drafts included, newest first.",
31430
+ schema: external_exports.object({
31431
+ ...workspaceFields,
31432
+ project: external_exports.string().describe("Project id or name.")
31433
+ }),
31434
+ run: async ({ client, config: config2 }, input) => {
31435
+ const slug = requireWorkspace(config2, input);
31436
+ const projectId = await resolveProjectId(client, slug, input.project);
31437
+ return { data: await client.projectUpdates.list(slug, projectId) };
31438
+ }
31439
+ }),
31440
+ // Drafting is the whole agent surface: there is no send tool, because
31441
+ // nothing an agent drafts goes to a client without a person approving it.
31442
+ define({
31443
+ name: "project_update_draft",
31444
+ description: "Draft a project update with a health call for a person to review and send.",
31445
+ schema: external_exports.object({
31446
+ ...workspaceFields,
31447
+ project: external_exports.string().describe("Project id or name."),
31448
+ health: HEALTH_INPUT.describe("on_track, at_risk or off_track."),
31449
+ body: external_exports.string().describe("The update, in Markdown.")
31450
+ }),
31451
+ run: async ({ client, config: config2 }, input) => {
31452
+ const slug = requireWorkspace(config2, input);
31453
+ const projectId = await resolveProjectId(client, slug, input.project);
31454
+ const drafted = await client.projectUpdates.draft(slug, {
31455
+ projectId,
31456
+ health: input.health,
31457
+ body: input.body
31458
+ });
31459
+ return {
31460
+ data: drafted.result,
31461
+ lines: [
31462
+ `Drafted update ${drafted.result.update.id}; a person reviews and sends it.`
31463
+ ]
31464
+ };
31465
+ }
31466
+ }),
31297
31467
  define({
31298
31468
  name: "cycle_current",
31299
31469
  description: "Show the active cycle and its tasks.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pxlabz/tasq-mcp",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "MCP stdio server for Tasq: tasks, threads, comments and mentions for MCP-capable agents",
5
5
  "keywords": [
6
6
  "tasq",