@denvermullets/jait 1.0.1 → 1.2.0

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
@@ -17,9 +17,15 @@ This writes the token to `~/.config/jait/config.json` (mode `0600`) so it doesn'
17
17
  **Claude Code (recommended):**
18
18
 
19
19
  ```bash
20
+ # just in 1 project
20
21
  claude mcp add jait -- npx -y @denvermullets/jait
21
22
  ```
22
23
 
24
+ ```bash
25
+ # globally
26
+ claude mcp add -s user jait -- npx -y @denvermullets/jait
27
+ ```
28
+
23
29
  **Claude Desktop / Cursor / other clients:**
24
30
 
25
31
  ```json
@@ -70,3 +76,29 @@ just have to remember to put
70
76
  }
71
77
  }
72
78
  ```
79
+
80
+ ---
81
+
82
+ ## Release / publish notes (for maintainer)
83
+
84
+ Publishing a new version to npm. `npm version <type>` bumps `package.json`, commits, and tags in one shot — use it after merging to `main` so the tag points at the merge commit.
85
+
86
+ ```bash
87
+ # from main, after your PR is merged
88
+ git checkout main && git pull
89
+
90
+ npm version patch # 1.0.1 → 1.0.2 (bug fixes)
91
+ npm version minor # 1.0.1 → 1.1.0 (new features, backwards compatible)
92
+ npm version major # 1.0.1 → 2.0.0 (breaking changes)
93
+
94
+ git push && git push --tags
95
+ npm publish
96
+ ```
97
+
98
+ If you hand-tagged already (`git tag v1.0.1`) and then `npm publish` fails with "cannot publish over previously published versions", it means you forgot to bump `package.json`. Either edit the version manually and commit, or drop the tag and use `npm version` as above.
99
+
100
+ Verify after publish:
101
+ ```bash
102
+ npm view @denvermullets/jait
103
+ npx -y @denvermullets/jait@latest --help # sanity check the bin still works
104
+ ```
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ import { registerMemberTools } from "./tools/members.js";
8
8
  import { registerLabelTools } from "./tools/labels.js";
9
9
  import { registerProjectTools } from "./tools/projects.js";
10
10
  import { registerIssueDependencyTools } from "./tools/issue-dependencies.js";
11
+ import { registerCommentTools } from "./tools/comments.js";
11
12
  import { writeToken, clearToken } from "./config-store.js";
12
13
  const [, , cmd, arg] = process.argv;
13
14
  if (cmd === "login") {
@@ -31,6 +32,7 @@ const server = new McpServer({
31
32
  registerTeamTools(server);
32
33
  registerIssueTools(server);
33
34
  registerIssueDependencyTools(server);
35
+ registerCommentTools(server);
34
36
  registerLaneTools(server);
35
37
  registerMemberTools(server);
36
38
  registerLabelTools(server);
@@ -0,0 +1,2 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerCommentTools(server: McpServer): void;
@@ -0,0 +1,50 @@
1
+ import { z } from "zod";
2
+ import { apiRequest } from "../api-client.js";
3
+ function formatComment(comment, indent = 0) {
4
+ const pad = " ".repeat(indent);
5
+ const author = comment.user ? comment.user.name : "Unknown";
6
+ const lines = [
7
+ `${pad}#${comment.id} by ${author} at ${comment.created_at}`,
8
+ `${pad} ${comment.body}`,
9
+ ];
10
+ if (comment.replies && comment.replies.length > 0) {
11
+ for (const reply of comment.replies) {
12
+ lines.push(formatComment(reply, indent + 1));
13
+ }
14
+ }
15
+ return lines.join("\n");
16
+ }
17
+ export function registerCommentTools(server) {
18
+ server.tool("list_comments", "List all comments on an issue, with replies nested under their parent.", {
19
+ team_id: z.number().describe("Team ID"),
20
+ issue_id: z.number().describe("Issue ID"),
21
+ }, async ({ team_id, issue_id }) => {
22
+ const comments = await apiRequest(`/api/v1/teams/${team_id}/issues/${issue_id}/comments`);
23
+ const text = comments.map((c) => formatComment(c)).join("\n\n");
24
+ return {
25
+ content: [{ type: "text", text: text || "No comments on this issue." }],
26
+ };
27
+ });
28
+ server.tool("create_comment", "Post a new comment on an issue. The author is derived from the API token. Pass parent_id to reply to an existing comment.", {
29
+ team_id: z.number().describe("Team ID"),
30
+ issue_id: z.number().describe("Issue ID"),
31
+ body: z.string().describe("Comment text"),
32
+ parent_id: z
33
+ .number()
34
+ .optional()
35
+ .describe("Parent comment ID to reply to"),
36
+ }, async ({ team_id, issue_id, body, parent_id }) => {
37
+ const comment = await apiRequest(`/api/v1/teams/${team_id}/issues/${issue_id}/comments`, {
38
+ method: "POST",
39
+ body: { comment: { body, parent_id } },
40
+ });
41
+ return {
42
+ content: [
43
+ {
44
+ type: "text",
45
+ text: `Comment posted:\n${formatComment(comment)}`,
46
+ },
47
+ ],
48
+ };
49
+ });
50
+ }
@@ -6,6 +6,9 @@ const projectStatusEnum = z
6
6
  const priorityEnum = z
7
7
  .enum(["urgent", "high", "medium", "low", "no_priority"])
8
8
  .describe("Priority level");
9
+ const roadmapCommitmentEnum = z
10
+ .enum(["now", "next", "later"])
11
+ .describe('Roadmap commitment lane: "now" (shipping in ~6 weeks), "next" (up after Now), "later" (on the radar). Omit to leave unchanged; pass null to remove from roadmap.');
9
12
  function formatProject(project, detailed = false) {
10
13
  const lines = [
11
14
  `**${project.name}** — ID: ${project.id}`,
@@ -19,6 +22,8 @@ function formatProject(project, detailed = false) {
19
22
  lines.push(` Start: ${project.start_date}`);
20
23
  if (project.due_date)
21
24
  lines.push(` Due: ${project.due_date}`);
25
+ if (project.roadmap_commitment)
26
+ lines.push(` Roadmap: ${project.roadmap_commitment}`);
22
27
  if (detailed) {
23
28
  if (project.milestone)
24
29
  lines.push(` Milestone: ${project.milestone.name}`);
@@ -65,7 +70,8 @@ export function registerProjectTools(server) {
65
70
  .optional()
66
71
  .describe("Due date in YYYY-MM-DD format"),
67
72
  label_ids: z.array(z.number()).optional().describe("Label IDs"),
68
- }, async ({ team_id, name, description, status, priority, lead_id, milestone_id, start_date, due_date, label_ids, }) => {
73
+ roadmap_commitment: roadmapCommitmentEnum.optional(),
74
+ }, async ({ team_id, name, description, status, priority, lead_id, milestone_id, start_date, due_date, label_ids, roadmap_commitment, }) => {
69
75
  const project = await apiRequest(`/api/v1/teams/${team_id}/projects`, {
70
76
  method: "POST",
71
77
  body: {
@@ -79,6 +85,7 @@ export function registerProjectTools(server) {
79
85
  start_date,
80
86
  due_date,
81
87
  label_ids,
88
+ roadmap_commitment,
82
89
  },
83
90
  },
84
91
  });
@@ -109,7 +116,8 @@ export function registerProjectTools(server) {
109
116
  .optional()
110
117
  .describe("Due date in YYYY-MM-DD format"),
111
118
  label_ids: z.array(z.number()).optional().describe("Set label IDs"),
112
- }, async ({ team_id, project_id, name, description, status, priority, lead_id, milestone_id, start_date, due_date, label_ids, }) => {
119
+ roadmap_commitment: roadmapCommitmentEnum.nullable().optional(),
120
+ }, async ({ team_id, project_id, name, description, status, priority, lead_id, milestone_id, start_date, due_date, label_ids, roadmap_commitment, }) => {
113
121
  const fields = {};
114
122
  if (name !== undefined)
115
123
  fields.name = name;
@@ -129,6 +137,8 @@ export function registerProjectTools(server) {
129
137
  fields.due_date = due_date;
130
138
  if (label_ids !== undefined)
131
139
  fields.label_ids = label_ids;
140
+ if (roadmap_commitment !== undefined)
141
+ fields.roadmap_commitment = roadmap_commitment;
132
142
  const project = await apiRequest(`/api/v1/teams/${team_id}/projects/${project_id}`, {
133
143
  method: "PATCH",
134
144
  body: { project: fields },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@denvermullets/jait",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
4
4
  "description": "MCP server for Just Another Issue Tracker",
5
5
  "type": "module",
6
6
  "bin": {