@pxlabz/tasq-mcp 0.1.7 → 0.1.8
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 +5 -1
- package/dist/tasq-mcp.js +147 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,7 +56,8 @@ moves together.
|
|
|
56
56
|
|
|
57
57
|
## Tools
|
|
58
58
|
|
|
59
|
-
|
|
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
|
/**
|
|
@@ -22577,6 +22627,11 @@ var TasqClient = class _TasqClient {
|
|
|
22577
22627
|
};
|
|
22578
22628
|
|
|
22579
22629
|
// ../sdk/src/types.ts
|
|
22630
|
+
var PROJECT_HEALTH_VALUES = [
|
|
22631
|
+
"on_track",
|
|
22632
|
+
"at_risk",
|
|
22633
|
+
"off_track"
|
|
22634
|
+
];
|
|
22580
22635
|
var MAX_AGENT_WAKES_PER_MESSAGE = 10;
|
|
22581
22636
|
var MAX_CONSECUTIVE_AGENT_MESSAGES = 5;
|
|
22582
22637
|
|
|
@@ -30544,7 +30599,7 @@ var EMPTY_COMPLETION_RESULT = {
|
|
|
30544
30599
|
// package.json
|
|
30545
30600
|
var package_default = {
|
|
30546
30601
|
name: "@pxlabz/tasq-mcp",
|
|
30547
|
-
version: "0.1.
|
|
30602
|
+
version: "0.1.8",
|
|
30548
30603
|
description: "MCP stdio server for Tasq: tasks, threads, comments and mentions for MCP-capable agents",
|
|
30549
30604
|
keywords: [
|
|
30550
30605
|
"tasq",
|
|
@@ -30911,6 +30966,26 @@ function resolveMentions(members, names) {
|
|
|
30911
30966
|
return matched[0]?.agentId ?? "";
|
|
30912
30967
|
});
|
|
30913
30968
|
}
|
|
30969
|
+
async function resolveApproverId(client, slug, ref) {
|
|
30970
|
+
const trimmed = ref.trim();
|
|
30971
|
+
if (UUID_PATTERN.test(trimmed)) return trimmed;
|
|
30972
|
+
const wanted = trimmed.toLowerCase();
|
|
30973
|
+
const members = await client.members.list(slug);
|
|
30974
|
+
const matched = members.filter(
|
|
30975
|
+
(member) => member.type === "user" && ((member.name ?? "").toLowerCase() === wanted || (member.email ?? "").toLowerCase() === wanted)
|
|
30976
|
+
);
|
|
30977
|
+
if (matched.length === 0) {
|
|
30978
|
+
throw new UsageError(
|
|
30979
|
+
`No person named "${ref}" in this workspace. Agents cannot approve.`
|
|
30980
|
+
);
|
|
30981
|
+
}
|
|
30982
|
+
if (matched.length > 1) {
|
|
30983
|
+
throw new UsageError(
|
|
30984
|
+
`"${ref}" matches ${matched.length} people. Pass their email or member id.`
|
|
30985
|
+
);
|
|
30986
|
+
}
|
|
30987
|
+
return matched[0]?.id ?? "";
|
|
30988
|
+
}
|
|
30914
30989
|
function commentIdOf(ref) {
|
|
30915
30990
|
const hash2 = ref.lastIndexOf("#");
|
|
30916
30991
|
return hash2 === -1 ? ref.trim() : ref.slice(hash2 + 1).trim();
|
|
@@ -30918,6 +30993,7 @@ function commentIdOf(ref) {
|
|
|
30918
30993
|
|
|
30919
30994
|
// src/tools.ts
|
|
30920
30995
|
var PRIORITY_INPUT = external_exports.enum(["urgent", "high", "medium", "low", "none"]);
|
|
30996
|
+
var HEALTH_INPUT = external_exports.enum(PROJECT_HEALTH_VALUES);
|
|
30921
30997
|
var DATE_INPUT = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Use YYYY-MM-DD");
|
|
30922
30998
|
var DATE_OR_NONE = external_exports.union([DATE_INPUT, external_exports.literal("none")]);
|
|
30923
30999
|
function datesInput(taskId, input) {
|
|
@@ -31213,6 +31289,26 @@ var definitions = [
|
|
|
31213
31289
|
return { data: await client.tasks.get(slug, task.id) };
|
|
31214
31290
|
}
|
|
31215
31291
|
}),
|
|
31292
|
+
define({
|
|
31293
|
+
name: "task_request_approval",
|
|
31294
|
+
description: "Ask a person in the workspace to approve a task, replacing any approver already asked.",
|
|
31295
|
+
schema: external_exports.object({
|
|
31296
|
+
...workspaceFields,
|
|
31297
|
+
id: external_exports.string().describe("Task key such as ENG-42, or a task id."),
|
|
31298
|
+
approver: external_exports.string().describe("The person's name, email or member id; agents cannot approve.")
|
|
31299
|
+
}),
|
|
31300
|
+
run: async ({ client, config: config2 }, input) => {
|
|
31301
|
+
const slug = requireWorkspace(config2, input);
|
|
31302
|
+
const approverId = await resolveApproverId(client, slug, input.approver);
|
|
31303
|
+
const taskId = await resolveTaskId(client, slug, input.id);
|
|
31304
|
+
const response = await client.tasks.requestApproval(
|
|
31305
|
+
slug,
|
|
31306
|
+
taskId,
|
|
31307
|
+
approverId
|
|
31308
|
+
);
|
|
31309
|
+
return { data: response.result };
|
|
31310
|
+
}
|
|
31311
|
+
}),
|
|
31216
31312
|
define({
|
|
31217
31313
|
name: "comment_add",
|
|
31218
31314
|
description: "Comment on a task or a project, optionally replying and mentioning agents.",
|
|
@@ -31294,6 +31390,54 @@ var definitions = [
|
|
|
31294
31390
|
data: await client.projects.list(requireWorkspace(config2, input))
|
|
31295
31391
|
})
|
|
31296
31392
|
}),
|
|
31393
|
+
define({
|
|
31394
|
+
name: "initiative_list",
|
|
31395
|
+
description: "List the workspace's initiatives, the groups of projects, with their project ids.",
|
|
31396
|
+
schema: external_exports.object({ ...workspaceFields }),
|
|
31397
|
+
run: async ({ client, config: config2 }, input) => ({
|
|
31398
|
+
data: await client.initiatives.list(requireWorkspace(config2, input))
|
|
31399
|
+
})
|
|
31400
|
+
}),
|
|
31401
|
+
define({
|
|
31402
|
+
name: "project_update_list",
|
|
31403
|
+
description: "List a project's updates, drafts included, newest first.",
|
|
31404
|
+
schema: external_exports.object({
|
|
31405
|
+
...workspaceFields,
|
|
31406
|
+
project: external_exports.string().describe("Project id or name.")
|
|
31407
|
+
}),
|
|
31408
|
+
run: async ({ client, config: config2 }, input) => {
|
|
31409
|
+
const slug = requireWorkspace(config2, input);
|
|
31410
|
+
const projectId = await resolveProjectId(client, slug, input.project);
|
|
31411
|
+
return { data: await client.projectUpdates.list(slug, projectId) };
|
|
31412
|
+
}
|
|
31413
|
+
}),
|
|
31414
|
+
// Drafting is the whole agent surface: there is no send tool, because
|
|
31415
|
+
// nothing an agent drafts goes to a client without a person approving it.
|
|
31416
|
+
define({
|
|
31417
|
+
name: "project_update_draft",
|
|
31418
|
+
description: "Draft a project update with a health call for a person to review and send.",
|
|
31419
|
+
schema: external_exports.object({
|
|
31420
|
+
...workspaceFields,
|
|
31421
|
+
project: external_exports.string().describe("Project id or name."),
|
|
31422
|
+
health: HEALTH_INPUT.describe("on_track, at_risk or off_track."),
|
|
31423
|
+
body: external_exports.string().describe("The update, in Markdown.")
|
|
31424
|
+
}),
|
|
31425
|
+
run: async ({ client, config: config2 }, input) => {
|
|
31426
|
+
const slug = requireWorkspace(config2, input);
|
|
31427
|
+
const projectId = await resolveProjectId(client, slug, input.project);
|
|
31428
|
+
const drafted = await client.projectUpdates.draft(slug, {
|
|
31429
|
+
projectId,
|
|
31430
|
+
health: input.health,
|
|
31431
|
+
body: input.body
|
|
31432
|
+
});
|
|
31433
|
+
return {
|
|
31434
|
+
data: drafted.result,
|
|
31435
|
+
lines: [
|
|
31436
|
+
`Drafted update ${drafted.result.update.id}; a person reviews and sends it.`
|
|
31437
|
+
]
|
|
31438
|
+
};
|
|
31439
|
+
}
|
|
31440
|
+
}),
|
|
31297
31441
|
define({
|
|
31298
31442
|
name: "cycle_current",
|
|
31299
31443
|
description: "Show the active cycle and its tasks.",
|