@arii/boomtick-mcp 0.5.0 → 0.6.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.
Files changed (156) hide show
  1. package/.mcp/schemas/boomtick.health.json +5 -0
  2. package/.mcp/schemas/boomtick_health.json +5 -0
  3. package/.mcp/schemas/github.checkout_branch.json +5 -0
  4. package/.mcp/schemas/github.comment_triage_summary.json +5 -0
  5. package/.mcp/schemas/github.create_issue.json +5 -0
  6. package/.mcp/schemas/github.create_pull_request.json +5 -0
  7. package/.mcp/schemas/github.get_merge_conflict_files.json +5 -0
  8. package/.mcp/schemas/github.get_pr.json +5 -0
  9. package/.mcp/schemas/github.get_pr_commits.json +5 -0
  10. package/.mcp/schemas/github.get_pr_diff.json +5 -0
  11. package/.mcp/schemas/github.get_pr_reviews.json +5 -0
  12. package/.mcp/schemas/github.issue_comment.json +5 -0
  13. package/.mcp/schemas/github.issue_update.json +5 -0
  14. package/.mcp/schemas/github.issue_view.json +5 -0
  15. package/.mcp/schemas/github.open_replacement_pr.json +5 -0
  16. package/.mcp/schemas/github.search_open_prs.json +5 -0
  17. package/.mcp/schemas/github_checkout_branch.json +5 -0
  18. package/.mcp/schemas/github_comment_triage_summary.json +5 -0
  19. package/.mcp/schemas/github_create_issue.json +5 -0
  20. package/.mcp/schemas/github_create_pull_request.json +5 -0
  21. package/.mcp/schemas/github_get_merge_conflict_files.json +5 -0
  22. package/.mcp/schemas/github_get_pr.json +5 -0
  23. package/.mcp/schemas/github_get_pr_commits.json +5 -0
  24. package/.mcp/schemas/github_get_pr_diff.json +5 -0
  25. package/.mcp/schemas/github_get_pr_reviews.json +5 -0
  26. package/.mcp/schemas/github_issue_comment.json +5 -0
  27. package/.mcp/schemas/github_issue_update.json +5 -0
  28. package/.mcp/schemas/github_issue_view.json +5 -0
  29. package/.mcp/schemas/github_open_replacement_pr.json +5 -0
  30. package/.mcp/schemas/github_search_open_prs.json +5 -0
  31. package/.mcp/schemas/jules.cancel_session.json +5 -0
  32. package/.mcp/schemas/jules.create_session.json +5 -0
  33. package/.mcp/schemas/jules.get_messages.json +5 -0
  34. package/.mcp/schemas/jules.get_pr.json +5 -0
  35. package/.mcp/schemas/jules.get_session.json +5 -0
  36. package/.mcp/schemas/jules.list_sessions.json +5 -0
  37. package/.mcp/schemas/jules.send_message.json +5 -0
  38. package/.mcp/schemas/jules.trigger_feedback.json +5 -0
  39. package/.mcp/schemas/jules_cancel_session.json +5 -0
  40. package/.mcp/schemas/jules_create_session.json +5 -0
  41. package/.mcp/schemas/jules_get_messages.json +5 -0
  42. package/.mcp/schemas/jules_get_pr.json +5 -0
  43. package/.mcp/schemas/jules_get_session.json +5 -0
  44. package/.mcp/schemas/jules_list_sessions.json +5 -0
  45. package/.mcp/schemas/jules_send_message.json +5 -0
  46. package/.mcp/schemas/jules_trigger_feedback.json +5 -0
  47. package/.mcp/schemas/repo.commit_patch.json +5 -0
  48. package/.mcp/schemas/repo.create_branch.json +5 -0
  49. package/.mcp/schemas/repo.create_repair_branch.json +5 -0
  50. package/.mcp/schemas/repo.get_changed_files.json +5 -0
  51. package/.mcp/schemas/repo.get_command_schema.json +6 -1
  52. package/.mcp/schemas/repo.get_package_scripts.json +5 -0
  53. package/.mcp/schemas/repo.get_workflow_runs.json +5 -0
  54. package/.mcp/schemas/repo.logs.json +5 -0
  55. package/.mcp/schemas/repo.read_agent_context.json +5 -0
  56. package/.mcp/schemas/repo.read_ci_logs.json +5 -0
  57. package/.mcp/schemas/repo.run_tests.json +5 -0
  58. package/.mcp/schemas/repo_commit_patch.json +5 -0
  59. package/.mcp/schemas/repo_create_branch.json +5 -0
  60. package/.mcp/schemas/repo_create_repair_branch.json +5 -0
  61. package/.mcp/schemas/repo_get_changed_files.json +5 -0
  62. package/.mcp/schemas/repo_get_command_schema.json +6 -1
  63. package/.mcp/schemas/repo_get_package_scripts.json +5 -0
  64. package/.mcp/schemas/repo_get_workflow_runs.json +5 -0
  65. package/.mcp/schemas/repo_logs.json +5 -0
  66. package/.mcp/schemas/repo_read_agent_context.json +5 -0
  67. package/.mcp/schemas/repo_read_ci_logs.json +5 -0
  68. package/.mcp/schemas/repo_run_tests.json +5 -0
  69. package/CHANGELOG.md +7 -0
  70. package/actions/ai-review/action.yml +2 -2
  71. package/actions/audit/action.yml +1 -1
  72. package/actions/ci-validate/action.yml +2 -2
  73. package/actions/impact-analysis/action.yml +3 -3
  74. package/actions/run-project-gate/action.yml +5 -5
  75. package/actions/setup/action.yml +1 -1
  76. package/actions/test-build/action.yml +1 -1
  77. package/dist/config.js +1 -1
  78. package/dist/config.test.js +3 -3
  79. package/dist/lib/result.js +4 -0
  80. package/dist/lib/result.test.js +4 -2
  81. package/dist/lib/shell.js +6 -6
  82. package/dist/mcp/definitions.js +73 -2
  83. package/dist/mcp/http.js +91 -0
  84. package/dist/mcp/http.test.js +58 -0
  85. package/dist/mcp/server.js +53 -13
  86. package/dist/mcp/server.test.js +20 -0
  87. package/dist/tools/contract.js +109 -1
  88. package/dist/tools/github.checkout_branch.js +1 -1
  89. package/dist/tools/github.comment_triage_summary.js +1 -1
  90. package/dist/tools/github.create_issue.js +1 -1
  91. package/dist/tools/github.create_issue.test.js +6 -6
  92. package/dist/tools/github.create_pull_request.js +1 -1
  93. package/dist/tools/github.create_pull_request.test.js +4 -4
  94. package/dist/tools/github.get_pr.js +1 -1
  95. package/dist/tools/github.get_pr_commits.js +1 -1
  96. package/dist/tools/github.get_pr_diff.js +1 -1
  97. package/dist/tools/github.get_pr_reviews.js +1 -1
  98. package/dist/tools/github.get_pr_reviews.test.js +9 -9
  99. package/dist/tools/github.issue_comment.js +1 -1
  100. package/dist/tools/github.issue_update.js +1 -1
  101. package/dist/tools/github.issue_view.js +1 -1
  102. package/dist/tools/github.search_open_prs.js +1 -1
  103. package/dist/tools/jules/cancel-session.js +1 -1
  104. package/dist/tools/jules/create-session.test.js +11 -11
  105. package/dist/tools/jules/get-messages.js +1 -1
  106. package/dist/tools/jules/get-messages.test.js +3 -3
  107. package/dist/tools/jules/get-pr.test.js +3 -3
  108. package/dist/tools/jules/list-sessions.js +1 -1
  109. package/dist/tools/jules/send-message.js +1 -1
  110. package/dist/tools/jules/send-message.test.js +5 -5
  111. package/dist/tools/jules/shared.js +4 -4
  112. package/dist/tools/jules/trigger-feedback.js +1 -1
  113. package/dist/tools/jules/trigger-feedback.test.js +5 -5
  114. package/dist/tools/repo.get_command_schema.js +2 -2
  115. package/dist/tools/repo.get_workflow_runs.js +1 -1
  116. package/package.json +1 -1
  117. package/scripts/sync-mcp-schemas.ts +2 -0
  118. package/src/config.test.ts +3 -3
  119. package/src/config.ts +1 -1
  120. package/src/lib/result.test.ts +4 -2
  121. package/src/lib/result.ts +6 -0
  122. package/src/lib/shell.ts +6 -6
  123. package/src/mcp/definitions.ts +76 -3
  124. package/src/mcp/http.test.ts +72 -0
  125. package/src/mcp/http.ts +118 -0
  126. package/src/mcp/server.test.ts +24 -0
  127. package/src/mcp/server.ts +63 -12
  128. package/src/tools/contract.ts +109 -1
  129. package/src/tools/github.checkout_branch.ts +1 -1
  130. package/src/tools/github.comment_triage_summary.ts +1 -1
  131. package/src/tools/github.create_issue.test.ts +6 -6
  132. package/src/tools/github.create_issue.ts +1 -1
  133. package/src/tools/github.create_pull_request.test.ts +4 -4
  134. package/src/tools/github.create_pull_request.ts +1 -1
  135. package/src/tools/github.get_pr.ts +1 -1
  136. package/src/tools/github.get_pr_commits.ts +1 -1
  137. package/src/tools/github.get_pr_diff.ts +1 -1
  138. package/src/tools/github.get_pr_reviews.test.ts +9 -9
  139. package/src/tools/github.get_pr_reviews.ts +1 -1
  140. package/src/tools/github.issue_comment.ts +1 -1
  141. package/src/tools/github.issue_update.ts +1 -1
  142. package/src/tools/github.issue_view.ts +1 -1
  143. package/src/tools/github.search_open_prs.ts +1 -1
  144. package/src/tools/jules/cancel-session.ts +1 -1
  145. package/src/tools/jules/create-session.test.ts +11 -11
  146. package/src/tools/jules/get-messages.test.ts +3 -3
  147. package/src/tools/jules/get-messages.ts +1 -1
  148. package/src/tools/jules/get-pr.test.ts +3 -3
  149. package/src/tools/jules/list-sessions.ts +1 -1
  150. package/src/tools/jules/send-message.test.ts +5 -5
  151. package/src/tools/jules/send-message.ts +1 -1
  152. package/src/tools/jules/shared.ts +4 -4
  153. package/src/tools/jules/trigger-feedback.test.ts +5 -5
  154. package/src/tools/jules/trigger-feedback.ts +1 -1
  155. package/src/tools/repo.get_command_schema.ts +2 -2
  156. package/src/tools/repo.get_workflow_runs.ts +1 -1
@@ -14,7 +14,7 @@ describe("MCP GitHub tools", () => {
14
14
  });
15
15
 
16
16
  describe("getPrReviewsHandler", () => {
17
- it("should fetch PR reviews via td-cli gh read-pr-reviews", async () => {
17
+ it("should fetch PR reviews via td gh read-pr-reviews", async () => {
18
18
  vi.mocked(shell.runCommand).mockResolvedValueOnce({
19
19
  stdout: JSON.stringify({
20
20
  status: "success",
@@ -24,12 +24,12 @@ describe("MCP GitHub tools", () => {
24
24
  stderr: "",
25
25
  exitCode: 0,
26
26
  durationMs: 10,
27
- command: "td-cli gh read-pr-reviews",
27
+ command: "td gh read-pr-reviews",
28
28
  });
29
29
 
30
30
  const res = await getPrReviewsHandler({ prNumber: 819, repo: "arii/boomtick" });
31
31
 
32
- expect(shell.runCommand).toHaveBeenCalledWith("td-cli", [
32
+ expect(shell.runCommand).toHaveBeenCalledWith("td", [
33
33
  "gh",
34
34
  "read-pr-reviews",
35
35
  "--pr-number",
@@ -45,7 +45,7 @@ describe("MCP GitHub tools", () => {
45
45
  });
46
46
 
47
47
  describe("getPrCommitsHandler", () => {
48
- it("should list PR commits via td-cli gh list-pr-commits", async () => {
48
+ it("should list PR commits via td gh list-pr-commits", async () => {
49
49
  vi.mocked(shell.runCommand).mockResolvedValueOnce({
50
50
  stdout: JSON.stringify({
51
51
  status: "success",
@@ -54,12 +54,12 @@ describe("MCP GitHub tools", () => {
54
54
  stderr: "",
55
55
  exitCode: 0,
56
56
  durationMs: 10,
57
- command: "td-cli gh list-pr-commits",
57
+ command: "td gh list-pr-commits",
58
58
  });
59
59
 
60
60
  const res = await getPrCommitsHandler({ prNumber: 819, repo: "arii/boomtick" });
61
61
 
62
- expect(shell.runCommand).toHaveBeenCalledWith("td-cli", [
62
+ expect(shell.runCommand).toHaveBeenCalledWith("td", [
63
63
  "gh",
64
64
  "list-pr-commits",
65
65
  "--pr-number",
@@ -74,7 +74,7 @@ describe("MCP GitHub tools", () => {
74
74
  });
75
75
 
76
76
  describe("getWorkflowRunsHandler", () => {
77
- it("should fetch workflow runs via td-cli repo workflow-runs", async () => {
77
+ it("should fetch workflow runs via td repo workflow-runs", async () => {
78
78
  vi.mocked(shell.runCommand).mockResolvedValueOnce({
79
79
  stdout: JSON.stringify({
80
80
  status: "success",
@@ -83,7 +83,7 @@ describe("MCP GitHub tools", () => {
83
83
  stderr: "",
84
84
  exitCode: 0,
85
85
  durationMs: 10,
86
- command: "td-cli repo workflow-runs",
86
+ command: "td repo workflow-runs",
87
87
  });
88
88
 
89
89
  const res = await getWorkflowRunsHandler({
@@ -92,7 +92,7 @@ describe("MCP GitHub tools", () => {
92
92
  repo: "arii/boomtick",
93
93
  });
94
94
 
95
- expect(shell.runCommand).toHaveBeenCalledWith("td-cli", [
95
+ expect(shell.runCommand).toHaveBeenCalledWith("td", [
96
96
  "repo",
97
97
  "workflow-runs",
98
98
  "--repo",
@@ -12,7 +12,7 @@ export async function getPrReviewsHandler(args: z.infer<typeof GetPrReviewsInput
12
12
  const params = GetPrReviewsInputSchema.parse(args);
13
13
  const targetRepo = resolveRepo(params.repo);
14
14
 
15
- const result = await runCommand("td-cli", ["gh", "read-pr-reviews", "--pr-number", params.prNumber.toString(), "--repo", targetRepo]);
15
+ const result = await runCommand("td", ["gh", "read-pr-reviews", "--pr-number", params.prNumber.toString(), "--repo", targetRepo]);
16
16
 
17
17
  if (result.exitCode !== 0) {
18
18
  throw new Error(`Failed to read PR reviews: ${sanitizeError(result.stderr)}`);
@@ -19,7 +19,7 @@ export async function issueCommentHandler(args: z.infer<typeof IssueCommentInput
19
19
  const params = IssueCommentInputSchema.parse(args);
20
20
  const targetRepo = resolveRepo(params.repo);
21
21
 
22
- const result = await runCommand("td-cli", [
22
+ const result = await runCommand("td", [
23
23
  "gh", "issue-comment", params.issueNumber.toString(),
24
24
  "--body", params.body,
25
25
  "--repo", targetRepo
@@ -19,7 +19,7 @@ export async function issueUpdateHandler(args: z.infer<typeof IssueUpdateInputSc
19
19
  if (params.state) cmdArgs.push("--state", params.state);
20
20
  cmdArgs.push("--repo", targetRepo);
21
21
 
22
- const result = await runCommand("td-cli", cmdArgs);
22
+ const result = await runCommand("td", cmdArgs);
23
23
 
24
24
  if (result.exitCode !== 0) {
25
25
  throw new Error(`Failed to update issue: ${sanitizeError(result.stderr)}`);
@@ -23,7 +23,7 @@ export async function issueViewHandler(args: z.infer<typeof IssueViewInputSchema
23
23
  const params = IssueViewInputSchema.parse(args);
24
24
  const targetRepo = resolveRepo(params.repo);
25
25
 
26
- const result = await runCommand("td-cli", ["gh", "issue-view", params.issueNumber.toString(), "--repo", targetRepo]);
26
+ const result = await runCommand("td", ["gh", "issue-view", params.issueNumber.toString(), "--repo", targetRepo]);
27
27
 
28
28
  if (result.exitCode !== 0) {
29
29
  throw new Error(`Failed to view issue: ${sanitizeError(result.stderr)}`);
@@ -29,7 +29,7 @@ export async function searchOpenPrsHandler(args: z.infer<typeof SearchOpenPrsInp
29
29
  tdArgs.push("--labels", params.labels.join(","));
30
30
  }
31
31
 
32
- const result = await runCommand("td-cli", tdArgs);
32
+ const result = await runCommand("td", tdArgs);
33
33
 
34
34
  if (result.exitCode !== 0) {
35
35
  throw new Error(`Failed to list PRs: ${result.stderr}`);
@@ -7,7 +7,7 @@ export const CancelJulesSessionInputSchema = z.object({
7
7
  });
8
8
 
9
9
  export async function cancelJulesSessionHandler(input: z.infer<typeof CancelJulesSessionInputSchema>): Promise<JulesSession> {
10
- const result = await runCommand("td-cli", ["agent", "cancel", input.sessionId]);
10
+ const result = await runCommand("td", ["agent", "cancel", input.sessionId]);
11
11
 
12
12
  if (result.exitCode !== 0) {
13
13
  throw new Error(`Failed to cancel session: ${result.stderr}`);
@@ -20,7 +20,7 @@ describe("createJulesSessionHandler", () => {
20
20
  stderr: "",
21
21
  exitCode: 0,
22
22
  durationMs: 10,
23
- command: "td-cli agent dispatch"
23
+ command: "td agent dispatch"
24
24
  });
25
25
  });
26
26
 
@@ -35,7 +35,7 @@ describe("createJulesSessionHandler", () => {
35
35
  expect(result.status).toBe("IN_PROGRESS");
36
36
  expect(result.createdAt).toBeInstanceOf(Date);
37
37
 
38
- expect(shell.runCommand).toHaveBeenCalledWith("td-cli", [
38
+ expect(shell.runCommand).toHaveBeenCalledWith("td", [
39
39
  "agent", "dispatch", "main", "do work"
40
40
  ]);
41
41
  });
@@ -44,7 +44,7 @@ describe("createJulesSessionHandler", () => {
44
44
  const result = await createJulesSessionHandler({ task: "do work", branch: "feature-x" });
45
45
  expect(result.id).toBe("1234567890");
46
46
 
47
- expect(shell.runCommand).toHaveBeenCalledWith("td-cli", [
47
+ expect(shell.runCommand).toHaveBeenCalledWith("td", [
48
48
  "agent", "dispatch", "feature-x", "do work"
49
49
  ]);
50
50
  });
@@ -57,7 +57,7 @@ describe("createJulesSessionHandler", () => {
57
57
  stderr: "",
58
58
  exitCode: 0,
59
59
  durationMs: 10,
60
- command: "td-cli gh view"
60
+ command: "td gh view"
61
61
  };
62
62
  }
63
63
  return {
@@ -70,18 +70,18 @@ describe("createJulesSessionHandler", () => {
70
70
  stderr: "",
71
71
  exitCode: 0,
72
72
  durationMs: 10,
73
- command: "td-cli agent dispatch"
73
+ command: "td agent dispatch"
74
74
  };
75
75
  });
76
76
 
77
77
  const result = await createJulesSessionHandler({ task: "do work", pr: 42 });
78
78
  expect(result.id).toBe("1234567890");
79
79
 
80
- expect(shell.runCommand).toHaveBeenCalledWith("td-cli", [
80
+ expect(shell.runCommand).toHaveBeenCalledWith("td", [
81
81
  "gh", "view", "42"
82
82
  ]);
83
83
 
84
- expect(shell.runCommand).toHaveBeenCalledWith("td-cli", [
84
+ expect(shell.runCommand).toHaveBeenCalledWith("td", [
85
85
  "agent", "dispatch", "pr-branch", "do work"
86
86
  ]);
87
87
  });
@@ -92,11 +92,11 @@ describe("createJulesSessionHandler", () => {
92
92
  stderr: "Original error",
93
93
  exitCode: 1,
94
94
  durationMs: 10,
95
- command: "td-cli gh view"
95
+ command: "td gh view"
96
96
  });
97
97
 
98
98
  await expect(createJulesSessionHandler({ task: "do work", pr: 999 }))
99
- .rejects.toThrow("td-cli returned error: PR not found");
99
+ .rejects.toThrow("td returned error: PR not found");
100
100
  });
101
101
 
102
102
  it("should throw descriptive error if PR JSON is invalid", async () => {
@@ -105,10 +105,10 @@ describe("createJulesSessionHandler", () => {
105
105
  stderr: "",
106
106
  exitCode: 0,
107
107
  durationMs: 10,
108
- command: "td-cli gh view"
108
+ command: "td gh view"
109
109
  });
110
110
 
111
111
  await expect(createJulesSessionHandler({ task: "do work", pr: 42 }))
112
- .rejects.toThrow("td-cli returned non-JSON output with exit code 0: invalid json");
112
+ .rejects.toThrow("td returned non-JSON output with exit code 0: invalid json");
113
113
  });
114
114
  });
@@ -17,7 +17,7 @@ describe("getJulesMessagesHandler", () => {
17
17
  vi.clearAllMocks();
18
18
  });
19
19
 
20
- it("should return messages from td-cli", async () => {
20
+ it("should return messages from td", async () => {
21
21
  const mockMessages = [
22
22
  {
23
23
  role: "user",
@@ -36,7 +36,7 @@ describe("getJulesMessagesHandler", () => {
36
36
  stderr: "",
37
37
  exitCode: 0,
38
38
  durationMs: 0,
39
- command: "td-cli agent messages"
39
+ command: "td agent messages"
40
40
  });
41
41
 
42
42
  const result = await getJulesMessagesHandler({ sessionId: "123" });
@@ -45,7 +45,7 @@ describe("getJulesMessagesHandler", () => {
45
45
  expect(result.messages[0].role).toBe("user");
46
46
  expect(result.messages[0].content).toBe("Hello Jules");
47
47
 
48
- expect(shell.runCommand).toHaveBeenCalledWith("td-cli", [
48
+ expect(shell.runCommand).toHaveBeenCalledWith("td", [
49
49
  "agent", "messages", "123"
50
50
  ]);
51
51
  });
@@ -6,7 +6,7 @@ export const GetJulesMessagesInputSchema = z.object({
6
6
  });
7
7
 
8
8
  export async function getJulesMessagesHandler(input: z.infer<typeof GetJulesMessagesInputSchema>) {
9
- const result = await runCommand("td-cli", ["agent", "messages", input.sessionId]);
9
+ const result = await runCommand("td", ["agent", "messages", input.sessionId]);
10
10
 
11
11
  if (result.exitCode !== 0) {
12
12
  throw new Error(`Failed to get messages: ${result.stderr}`);
@@ -17,7 +17,7 @@ describe("getJulesPullRequestHandler", () => {
17
17
  vi.clearAllMocks();
18
18
  });
19
19
 
20
- it("should get PR from td-cli", async () => {
20
+ it("should get PR from td", async () => {
21
21
  vi.mocked(shell.runCommand).mockResolvedValue({
22
22
  stdout: JSON.stringify({
23
23
  status: "success",
@@ -29,14 +29,14 @@ describe("getJulesPullRequestHandler", () => {
29
29
  stderr: "",
30
30
  exitCode: 0,
31
31
  durationMs: 0,
32
- command: "td-cli agent get-session"
32
+ command: "td agent get-session"
33
33
  });
34
34
 
35
35
  const result = await getJulesPullRequestHandler({ sessionId: "123" });
36
36
  expect(result.id).toBe("123");
37
37
  expect(result.pullRequestUrl).toBe("https://github.com/pr/1");
38
38
 
39
- expect(shell.runCommand).toHaveBeenCalledWith("td-cli", [
39
+ expect(shell.runCommand).toHaveBeenCalledWith("td", [
40
40
  "agent", "get-session", "123"
41
41
  ]);
42
42
  });
@@ -8,7 +8,7 @@ export const ListJulesSessionsInputSchema = z.object({
8
8
  });
9
9
 
10
10
  export async function listJulesSessionsHandler(input: z.infer<typeof ListJulesSessionsInputSchema>): Promise<JulesSession[]> {
11
- const result = await runCommand("td-cli", ["agent", "sync"]);
11
+ const result = await runCommand("td", ["agent", "sync"]);
12
12
 
13
13
  if (result.exitCode !== 0) {
14
14
  throw new Error(`Failed to list sessions: ${result.stderr}`);
@@ -17,20 +17,20 @@ describe("sendJulesMessageHandler", () => {
17
17
  vi.clearAllMocks();
18
18
  });
19
19
 
20
- it("should send a message via td-cli", async () => {
20
+ it("should send a message via td", async () => {
21
21
  vi.mocked(shell.runCommand).mockResolvedValue({
22
22
  stdout: JSON.stringify({ status: "success", message: "Message sent successfully" }),
23
23
  stderr: "",
24
24
  exitCode: 0,
25
25
  durationMs: 0,
26
- command: "td-cli agent send"
26
+ command: "td agent send"
27
27
  });
28
28
 
29
29
  const result = await sendJulesMessageHandler({ sessionId: "123", message: "hi" });
30
30
  expect(result.id).toBe("123");
31
31
  expect(result.status).toBe("success");
32
32
 
33
- expect(shell.runCommand).toHaveBeenCalledWith("td-cli", [
33
+ expect(shell.runCommand).toHaveBeenCalledWith("td", [
34
34
  "agent", "send", "123", "hi"
35
35
  ]);
36
36
  });
@@ -48,7 +48,7 @@ describe("sendJulesMessageHandler", () => {
48
48
  stderr: "",
49
49
  exitCode: 0,
50
50
  durationMs: 0,
51
- command: "td-cli agent send"
51
+ command: "td agent send"
52
52
  });
53
53
 
54
54
  const result = await sendJulesMessageHandler({
@@ -59,7 +59,7 @@ describe("sendJulesMessageHandler", () => {
59
59
  expect(result.id).toEqual(["s1", "s2"]);
60
60
  expect(result.status).toBe("success");
61
61
 
62
- expect(shell.runCommand).toHaveBeenCalledWith("td-cli", [
62
+ expect(shell.runCommand).toHaveBeenCalledWith("td", [
63
63
  "agent", "send", "sessions/s1,sessions/s2", "hi batch"
64
64
  ]);
65
65
  });
@@ -8,7 +8,7 @@ export const SendJulesMessageInputSchema = z.object({
8
8
 
9
9
  export async function sendJulesMessageHandler(input: z.infer<typeof SendJulesMessageInputSchema>) {
10
10
  const sessionIds = Array.isArray(input.sessionId) ? input.sessionId.join(",") : input.sessionId;
11
- const result = await runCommand("td-cli", ["agent", "send", sessionIds, input.message]);
11
+ const result = await runCommand("td", ["agent", "send", sessionIds, input.message]);
12
12
 
13
13
  if (result.exitCode !== 0) {
14
14
  throw new Error(`Failed to send message: ${result.stderr}`);
@@ -16,20 +16,20 @@ function tryParseJson(text: string): TDCliResponse | null {
16
16
  }
17
17
 
18
18
  export async function runTDCli(args: string[]): Promise<TDCliResponse> {
19
- const result = await runCommand("td-cli", args);
19
+ const result = await runCommand("td", args);
20
20
  const stdout = result.stdout.trim();
21
21
  const output = stdout.startsWith("{") ? tryParseJson(stdout) : null;
22
22
 
23
23
  if (output?.status === "error") {
24
- throw new Error(`td-cli returned error: ${output.message ?? "Unknown error"}`);
24
+ throw new Error(`td returned error: ${output.message ?? "Unknown error"}`);
25
25
  }
26
26
 
27
27
  if (result.exitCode !== 0) {
28
- throw new Error(`td-cli command failed (${args.join(" ")}): ${result.stderr || stdout}`);
28
+ throw new Error(`td command failed (${args.join(" ")}): ${result.stderr || stdout}`);
29
29
  }
30
30
 
31
31
  if (!output) {
32
- throw new Error(`td-cli returned non-JSON output with exit code 0: ${stdout}`);
32
+ throw new Error(`td returned non-JSON output with exit code 0: ${stdout}`);
33
33
  }
34
34
 
35
35
  return output;
@@ -17,31 +17,31 @@ describe("triggerJulesFeedbackHandler", () => {
17
17
  vi.clearAllMocks();
18
18
  });
19
19
 
20
- it("should return success output from td-cli", async () => {
20
+ it("should return success output from td", async () => {
21
21
  vi.mocked(shell.runCommand).mockResolvedValue({
22
22
  stdout: JSON.stringify({ status: "success", feedback: "All checks passed successfully. You may proceed." }),
23
23
  stderr: "",
24
24
  exitCode: 0,
25
25
  durationMs: 0,
26
- command: "td-cli agent trigger-feedback"
26
+ command: "td agent trigger-feedback"
27
27
  });
28
28
 
29
29
  const result = await triggerJulesFeedbackHandler({ sessionId: "123" });
30
30
  expect(result.status).toBe("success");
31
31
  expect(result.feedback).toBe("All checks passed successfully. You may proceed.");
32
32
 
33
- expect(shell.runCommand).toHaveBeenCalledWith("td-cli", [
33
+ expect(shell.runCommand).toHaveBeenCalledWith("td", [
34
34
  "agent", "trigger-feedback", "123"
35
35
  ]);
36
36
  });
37
37
 
38
- it("should throw error if td-cli returns error", async () => {
38
+ it("should throw error if td returns error", async () => {
39
39
  vi.mocked(shell.runCommand).mockResolvedValue({
40
40
  stdout: JSON.stringify({ status: "error", message: "Session not found" }),
41
41
  stderr: "",
42
42
  exitCode: 0,
43
43
  durationMs: 0,
44
- command: "td-cli agent trigger-feedback"
44
+ command: "td agent trigger-feedback"
45
45
  });
46
46
 
47
47
  await expect(triggerJulesFeedbackHandler({ sessionId: "123" }))
@@ -6,7 +6,7 @@ export const TriggerJulesFeedbackInputSchema = z.object({
6
6
  });
7
7
 
8
8
  export async function triggerJulesFeedbackHandler(input: z.infer<typeof TriggerJulesFeedbackInputSchema>) {
9
- const result = await runCommand("td-cli", ["agent", "trigger-feedback", input.sessionId]);
9
+ const result = await runCommand("td", ["agent", "trigger-feedback", input.sessionId]);
10
10
 
11
11
  if (result.exitCode !== 0) {
12
12
  throw new Error(`Failed to trigger feedback: ${result.stderr}`);
@@ -8,12 +8,12 @@ export const GetCommandSchemaInputSchema = z.object({
8
8
  export async function getCommandSchemaHandler(args: z.infer<typeof GetCommandSchemaInputSchema>) {
9
9
  // Sanitize input to prevent command injection (allow only alphanumeric, spaces, hyphens, and underscores)
10
10
  const sanitizedPath = args.commandPath.replace(/[^a-zA-Z0-9-_ ]/g, "");
11
- const result = await runCommand("td-cli", ["schema", sanitizedPath]);
11
+ const result = await runCommand("td", ["schema", sanitizedPath]);
12
12
 
13
13
  if (result.exitCode !== 0) {
14
14
  // Log stderr for debugging but don't expose it to the user
15
15
  // Using comma-separated arguments to satisfy semgrep unsafe-formatstring
16
- console.error("td-cli schema failed for", sanitizedPath, ":", result.stderr);
16
+ console.error("td schema failed for", sanitizedPath, ":", result.stderr);
17
17
  throw new Error(`Failed to get command schema for '${sanitizedPath}'`);
18
18
  }
19
19
 
@@ -21,7 +21,7 @@ export async function getWorkflowRunsHandler(args: z.infer<typeof GetWorkflowRun
21
21
  cliArgs.push("--event", params.event);
22
22
  }
23
23
 
24
- const result = await runCommand("td-cli", cliArgs);
24
+ const result = await runCommand("td", cliArgs);
25
25
 
26
26
  if (result.exitCode !== 0) {
27
27
  throw new Error(`Failed to fetch workflow runs: ${sanitizeError(result.stderr)}`);