@arii/boomtick-mcp 0.6.2 → 0.7.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 (93) hide show
  1. package/.mcp/schemas/boomtick.health.json +22 -3
  2. package/.mcp/schemas/boomtick_health.json +22 -3
  3. package/.mcp/schemas/github.checkout_branch.json +16 -3
  4. package/.mcp/schemas/github.comment_triage_summary.json +16 -3
  5. package/.mcp/schemas/github.create_pull_request.json +16 -3
  6. package/.mcp/schemas/github.get_pr.json +12 -3
  7. package/.mcp/schemas/github.get_pr_commits.json +12 -3
  8. package/.mcp/schemas/github.get_pr_reviews.json +24 -3
  9. package/.mcp/schemas/github.issue_comment.json +19 -3
  10. package/.mcp/schemas/github.issue_view.json +17 -3
  11. package/.mcp/schemas/github.open_replacement_pr.json +16 -3
  12. package/.mcp/schemas/github_checkout_branch.json +16 -3
  13. package/.mcp/schemas/github_comment_triage_summary.json +16 -3
  14. package/.mcp/schemas/github_create_pull_request.json +16 -3
  15. package/.mcp/schemas/github_get_pr.json +12 -3
  16. package/.mcp/schemas/github_get_pr_commits.json +12 -3
  17. package/.mcp/schemas/github_get_pr_reviews.json +24 -3
  18. package/.mcp/schemas/github_issue_comment.json +19 -3
  19. package/.mcp/schemas/github_issue_view.json +17 -3
  20. package/.mcp/schemas/github_open_replacement_pr.json +16 -3
  21. package/.mcp/schemas/jules.cancel_session.json +38 -3
  22. package/.mcp/schemas/jules.create_session.json +52 -3
  23. package/.mcp/schemas/jules.get_messages.json +19 -3
  24. package/.mcp/schemas/jules.get_pr.json +23 -3
  25. package/.mcp/schemas/jules.get_session.json +38 -3
  26. package/.mcp/schemas/jules.list_sessions.json +53 -3
  27. package/.mcp/schemas/jules.send_message.json +31 -3
  28. package/.mcp/schemas/jules.trigger_feedback.json +28 -3
  29. package/.mcp/schemas/jules_cancel_session.json +38 -3
  30. package/.mcp/schemas/jules_create_session.json +52 -3
  31. package/.mcp/schemas/jules_get_messages.json +19 -3
  32. package/.mcp/schemas/jules_get_pr.json +23 -3
  33. package/.mcp/schemas/jules_get_session.json +38 -3
  34. package/.mcp/schemas/jules_list_sessions.json +53 -3
  35. package/.mcp/schemas/jules_send_message.json +31 -3
  36. package/.mcp/schemas/jules_trigger_feedback.json +28 -3
  37. package/.mcp/schemas/repo.check_jules_status.json +93 -3
  38. package/.mcp/schemas/repo.commit_patch.json +23 -3
  39. package/.mcp/schemas/repo.create_branch.json +28 -3
  40. package/.mcp/schemas/repo.create_repair_branch.json +31 -3
  41. package/.mcp/schemas/repo.get_changed_files.json +11 -3
  42. package/.mcp/schemas/repo.get_command_schema.json +29 -3
  43. package/.mcp/schemas/repo.get_package_scripts.json +11 -3
  44. package/.mcp/schemas/repo.get_workflow_runs.json +12 -3
  45. package/.mcp/schemas/repo.logs.json +14 -3
  46. package/.mcp/schemas/repo.multi_exec.json +89 -0
  47. package/.mcp/schemas/repo.read_agent_context.json +117 -5
  48. package/.mcp/schemas/repo.read_ci_logs.json +46 -3
  49. package/.mcp/schemas/repo_check_jules_status.json +93 -3
  50. package/.mcp/schemas/repo_commit_patch.json +23 -3
  51. package/.mcp/schemas/repo_create_branch.json +28 -3
  52. package/.mcp/schemas/repo_create_repair_branch.json +31 -3
  53. package/.mcp/schemas/repo_get_changed_files.json +11 -3
  54. package/.mcp/schemas/repo_get_command_schema.json +29 -3
  55. package/.mcp/schemas/repo_get_package_scripts.json +11 -3
  56. package/.mcp/schemas/repo_get_workflow_runs.json +12 -3
  57. package/.mcp/schemas/repo_logs.json +14 -3
  58. package/.mcp/schemas/repo_multi_exec.json +89 -0
  59. package/.mcp/schemas/repo_read_agent_context.json +117 -5
  60. package/.mcp/schemas/repo_read_ci_logs.json +46 -3
  61. package/CHANGELOG.md +14 -0
  62. package/README.md +7 -5
  63. package/dist/config/dynamic.js +3 -2
  64. package/dist/config/repo.js +5 -5
  65. package/dist/config.test.js +10 -3
  66. package/dist/mcp/definitions.js +49 -36
  67. package/dist/mcp/http.js +15 -0
  68. package/dist/mcp/http.test.js +8 -0
  69. package/dist/mcp/server.js +34 -0
  70. package/dist/mcp/server.test.js +31 -0
  71. package/dist/tools/contract.js +960 -3
  72. package/dist/tools/jules/create-session.js +12 -2
  73. package/dist/tools/jules/create-session.test.js +7 -0
  74. package/dist/tools/repo.multi_exec.js +21 -0
  75. package/dist/tools/repo.multi_exec.test.js +13 -0
  76. package/dist/tools/repo.read_agent_context.js +65 -3
  77. package/dist/tools/repo.read_agent_context.test.js +30 -1
  78. package/package.json +1 -1
  79. package/src/config/dynamic.ts +3 -2
  80. package/src/config/repo.ts +6 -6
  81. package/src/config.test.ts +11 -3
  82. package/src/mcp/definitions.ts +77 -36
  83. package/src/mcp/http.test.ts +10 -0
  84. package/src/mcp/http.ts +20 -0
  85. package/src/mcp/server.test.ts +38 -0
  86. package/src/mcp/server.ts +36 -0
  87. package/src/tools/contract.ts +1089 -16
  88. package/src/tools/jules/create-session.test.ts +9 -0
  89. package/src/tools/jules/create-session.ts +13 -2
  90. package/src/tools/repo.multi_exec.test.ts +15 -0
  91. package/src/tools/repo.multi_exec.ts +23 -0
  92. package/src/tools/repo.read_agent_context.test.ts +35 -1
  93. package/src/tools/repo.read_agent_context.ts +68 -3
@@ -49,6 +49,15 @@ describe("createJulesSessionHandler", () => {
49
49
  ]);
50
50
  });
51
51
 
52
+ it("should create a session with repo parameter", async () => {
53
+ const result = await createJulesSessionHandler({ task: "do work", branch: "main", repo: "arii/portfolio" });
54
+ expect(result.id).toBe("1234567890");
55
+
56
+ expect(shell.runCommand).toHaveBeenCalledWith("td", [
57
+ "agent", "dispatch", "--repo", "arii/portfolio", "main", "do work"
58
+ ]);
59
+ });
60
+
52
61
  it("should create a session with PR number", async () => {
53
62
  vi.mocked(shell.runCommand).mockImplementation(async (cmd, args) => {
54
63
  if (args[1] === "view") {
@@ -5,12 +5,17 @@ export const CreateJulesSessionInputSchema = z.object({
5
5
  task: z.string(),
6
6
  branch: z.string().optional(),
7
7
  pr: z.number().optional(),
8
+ repo: z.string().optional(),
8
9
  });
9
10
 
10
11
  export async function createJulesSessionHandler(input: z.infer<typeof CreateJulesSessionInputSchema>) {
11
12
  let branch = input.branch;
12
13
  if (!branch && input.pr) {
13
- const prData = await runTDCli(["gh", "view", input.pr.toString()]);
14
+ const ghArgs = ["gh", "view", input.pr.toString()];
15
+ if (input.repo) {
16
+ ghArgs.push("--repo", input.repo);
17
+ }
18
+ const prData = await runTDCli(ghArgs);
14
19
  branch = prData.pr.headRefName;
15
20
  }
16
21
 
@@ -18,6 +23,12 @@ export async function createJulesSessionHandler(input: z.infer<typeof CreateJule
18
23
  branch = process.env.DEFAULT_BASE_BRANCH || "main";
19
24
  }
20
25
 
21
- const output = await runTDCli(["agent", "dispatch", branch, input.task]);
26
+ const dispatchArgs = ["agent", "dispatch"];
27
+ if (input.repo) {
28
+ dispatchArgs.push("--repo", input.repo);
29
+ }
30
+ dispatchArgs.push(branch, input.task);
31
+
32
+ const output = await runTDCli(dispatchArgs);
22
33
  return parseJulesSession(output.session || output);
23
34
  }
@@ -0,0 +1,15 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { multiExecHandler } from "./repo.multi_exec.js";
3
+
4
+ describe("MultiExec Tool", () => {
5
+ it("should execute a command sequentially across repositories", async () => {
6
+ const res = await multiExecHandler({
7
+ command: "echo test-vitest-exec",
8
+ repos: ["arii/boomtick"],
9
+ });
10
+
11
+ expect(res.status).toBe("success");
12
+ expect(res.total_repos).toBe(1);
13
+ expect(res.results[0].stdout).toContain("test-vitest-exec");
14
+ });
15
+ });
@@ -0,0 +1,23 @@
1
+ import { z } from "zod";
2
+ import { runTDCli } from "./jules/shared.js";
3
+
4
+ export const MultiExecInputSchema = z.object({
5
+ command: z.string().describe("Shell command to execute sequentially across repositories"),
6
+ repos: z.array(z.string()).optional().describe("Optional list of repository names to target"),
7
+ continueOnError: z.boolean().optional().default(true).describe("Whether to continue execution if a repo command fails"),
8
+ });
9
+
10
+ export async function multiExecHandler(input: z.input<typeof MultiExecInputSchema>) {
11
+ const args = MultiExecInputSchema.parse(input);
12
+ const cliArgs = ["multi-repo", "exec", args.command];
13
+ if (args.repos) {
14
+ for (const r of args.repos) {
15
+ cliArgs.push("-r", r);
16
+ }
17
+ }
18
+ if (args.continueOnError === false) {
19
+ cliArgs.push("--fail-fast");
20
+ }
21
+ const output = await runTDCli(cliArgs, "execute command across ecosystem repositories");
22
+ return output;
23
+ }
@@ -1,5 +1,5 @@
1
1
  import { describe, expect, it } from "vitest";
2
- import { loadStandaloneAgentContext } from "./repo.read_agent_context.js";
2
+ import { loadStandaloneAgentContext, readAgentContextHandler } from "./repo.read_agent_context.js";
3
3
 
4
4
  describe("Standalone Agent Context Loader", () => {
5
5
  it("should load agent context without submodule references", () => {
@@ -8,4 +8,38 @@ describe("Standalone Agent Context Loader", () => {
8
8
  expect(context).toHaveProperty("gitCommit");
9
9
  expect(context).not.toHaveProperty("submodules");
10
10
  });
11
+
12
+ it("should handle readAgentContextHandler with default workspace", async () => {
13
+ const res = await readAgentContextHandler({});
14
+ expect(res.status).toBe("success");
15
+ expect(res).toHaveProperty("packageName");
16
+ expect(res).toHaveProperty("gitCommit");
17
+ });
18
+
19
+ it("readAgentContextHandler should accept optional repoPath argument", async () => {
20
+ const res = await readAgentContextHandler({ repoPath: process.cwd() });
21
+ expect(res).toHaveProperty("status", "success");
22
+ expect(res).toHaveProperty("packageName");
23
+ expect(res).toHaveProperty("gitCommit");
24
+ });
25
+
26
+ it("readAgentContextHandler should accept path argument", async () => {
27
+ const res = await readAgentContextHandler({ path: process.cwd() });
28
+ expect(res).toHaveProperty("status", "success");
29
+ expect(res).toHaveProperty("packageName");
30
+ });
31
+
32
+ it("readAgentContextHandler should accept repo argument", async () => {
33
+ const res = await readAgentContextHandler({ repo: "arii/tech-dancer" });
34
+ expect(res).toHaveProperty("status", "success");
35
+ expect(res).toHaveProperty("repo", "arii/tech-dancer");
36
+ });
37
+
38
+ it("should handle multi-repo context querying when all: true is passed", async () => {
39
+ const res = await readAgentContextHandler({ all: true });
40
+ expect(res.status).toBe("success");
41
+ expect(res.ecosystem).toBe(true);
42
+ expect(Array.isArray(res.repos)).toBe(true);
43
+ expect(res.repos.length).toBeGreaterThan(0);
44
+ });
11
45
  });
@@ -3,6 +3,7 @@ import { config } from "../config.js";
3
3
  import { execSync } from "child_process";
4
4
  import * as fs from "fs";
5
5
  import * as path from "path";
6
+ import { runTDCli } from "./jules/shared.js";
6
7
 
7
8
  export interface AgentContext {
8
9
  packageName: string;
@@ -36,14 +37,78 @@ export const loadStandaloneAgentContext = (repoRoot: string = process.cwd()): Ag
36
37
  };
37
38
  };
38
39
 
39
- export const ReadAgentContextInputSchema = z.object({});
40
+ export const ReadAgentContextInputSchema = z.object({
41
+ path: z.string().optional().describe("Local filesystem path to target repository root"),
42
+ repoPath: z.string().optional().describe("Alias for path to target repository root"),
43
+ repo: z.string().optional().describe("Repository name override (e.g. arii/portfolio or portfolio)"),
44
+ repos: z.array(z.string()).optional().describe("List of repository names to fetch context for"),
45
+ all: z.boolean().optional().describe("Whether to fetch context across all discovered ecosystem repositories"),
46
+ });
40
47
 
41
- export async function readAgentContextHandler(_args: z.infer<typeof ReadAgentContextInputSchema>) {
42
- const context = loadStandaloneAgentContext(config.repoPath);
48
+ export async function readAgentContextHandler(args: z.infer<typeof ReadAgentContextInputSchema>) {
49
+ // 1. Ecosystem / Multi-repo request
50
+ if (args.all || (args.repos && args.repos.length > 0)) {
51
+ const cliArgs = ["multi-repo", "status"];
52
+ if (args.repos) {
53
+ for (const r of args.repos) {
54
+ cliArgs.push("-r", r);
55
+ }
56
+ }
57
+ const output = await runTDCli(cliArgs, "fetch multi-repo context");
58
+ return {
59
+ status: "success",
60
+ ecosystem: true,
61
+ repos: output.repos ?? [],
62
+ total: output.total ?? (output.repos?.length ?? 0)
63
+ };
64
+ }
65
+
66
+ // 2. Specific repository name override
67
+ if (args.repo) {
68
+ let matchedPath: string | undefined;
69
+ try {
70
+ const output = await runTDCli(["multi-repo", "status", "-r", args.repo], "find target repository");
71
+ const matched = output.repos?.[0];
72
+ if (matched?.path) {
73
+ matchedPath = matched.path;
74
+ }
75
+ } catch {
76
+ // Fallback to directory inspection if CLI is unavailable or not in TD workspace
77
+ }
78
+
79
+ if (!matchedPath) {
80
+ const repoName = args.repo.includes("/") ? args.repo.split("/")[1] : args.repo;
81
+ const cwdParent = path.resolve(process.cwd(), "..", repoName);
82
+ const configParent = path.resolve(config.repoPath, "..", repoName);
83
+
84
+ if (fs.existsSync(cwdParent)) {
85
+ matchedPath = cwdParent;
86
+ } else if (fs.existsSync(configParent)) {
87
+ matchedPath = configParent;
88
+ }
89
+ }
90
+
91
+ if (matchedPath) {
92
+ const context = loadStandaloneAgentContext(matchedPath);
93
+ return {
94
+ status: "success",
95
+ repo: args.repo,
96
+ path: matchedPath,
97
+ ...context
98
+ };
99
+ }
100
+ }
101
+
102
+ // 3. Specific filesystem path
103
+ const targetPath = (args.path || args.repoPath) ? path.resolve(args.path || args.repoPath!) : config.repoPath;
104
+ const context = loadStandaloneAgentContext(targetPath);
43
105
  const result: any = {
44
106
  status: "success",
45
107
  ...context
46
108
  };
109
+ if (args?.repo) {
110
+ result.repo = args.repo;
111
+ }
47
112
  delete result.submodules;
48
113
  if (result.config) {
49
114
  delete result.config.submodules;