@arii/boomtick-mcp 0.6.1 → 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.
- package/.mcp/schemas/boomtick.health.json +22 -3
- package/.mcp/schemas/boomtick_health.json +22 -3
- package/.mcp/schemas/github.checkout_branch.json +16 -3
- package/.mcp/schemas/github.comment_triage_summary.json +16 -3
- package/.mcp/schemas/github.create_issue.json +72 -3
- package/.mcp/schemas/github.create_pull_request.json +16 -3
- package/.mcp/schemas/github.get_merge_conflict_files.json +40 -3
- package/.mcp/schemas/github.get_pr.json +12 -3
- package/.mcp/schemas/github.get_pr_commits.json +12 -3
- package/.mcp/schemas/github.get_pr_diff.json +30 -3
- package/.mcp/schemas/github.get_pr_reviews.json +24 -3
- package/.mcp/schemas/github.issue_comment.json +19 -3
- package/.mcp/schemas/github.issue_update.json +72 -3
- package/.mcp/schemas/github.issue_view.json +17 -3
- package/.mcp/schemas/github.open_replacement_pr.json +16 -3
- package/.mcp/schemas/github.search_open_prs.json +130 -3
- package/.mcp/schemas/github_checkout_branch.json +16 -3
- package/.mcp/schemas/github_comment_triage_summary.json +16 -3
- package/.mcp/schemas/github_create_issue.json +72 -3
- package/.mcp/schemas/github_create_pull_request.json +16 -3
- package/.mcp/schemas/github_get_merge_conflict_files.json +40 -3
- package/.mcp/schemas/github_get_pr.json +12 -3
- package/.mcp/schemas/github_get_pr_commits.json +12 -3
- package/.mcp/schemas/github_get_pr_diff.json +30 -3
- package/.mcp/schemas/github_get_pr_reviews.json +24 -3
- package/.mcp/schemas/github_issue_comment.json +19 -3
- package/.mcp/schemas/github_issue_update.json +72 -3
- package/.mcp/schemas/github_issue_view.json +17 -3
- package/.mcp/schemas/github_open_replacement_pr.json +16 -3
- package/.mcp/schemas/github_search_open_prs.json +130 -3
- package/.mcp/schemas/jules.cancel_session.json +38 -3
- package/.mcp/schemas/jules.create_session.json +52 -3
- package/.mcp/schemas/jules.get_messages.json +19 -3
- package/.mcp/schemas/jules.get_pr.json +23 -3
- package/.mcp/schemas/jules.get_session.json +38 -3
- package/.mcp/schemas/jules.list_sessions.json +53 -3
- package/.mcp/schemas/jules.send_message.json +31 -3
- package/.mcp/schemas/jules.trigger_feedback.json +28 -3
- package/.mcp/schemas/jules_cancel_session.json +38 -3
- package/.mcp/schemas/jules_create_session.json +52 -3
- package/.mcp/schemas/jules_get_messages.json +19 -3
- package/.mcp/schemas/jules_get_pr.json +23 -3
- package/.mcp/schemas/jules_get_session.json +38 -3
- package/.mcp/schemas/jules_list_sessions.json +53 -3
- package/.mcp/schemas/jules_send_message.json +31 -3
- package/.mcp/schemas/jules_trigger_feedback.json +28 -3
- package/.mcp/schemas/repo.check_jules_status.json +128 -0
- package/.mcp/schemas/repo.commit_patch.json +23 -3
- package/.mcp/schemas/repo.create_branch.json +28 -3
- package/.mcp/schemas/repo.create_repair_branch.json +31 -3
- package/.mcp/schemas/repo.get_changed_files.json +11 -3
- package/.mcp/schemas/repo.get_command_schema.json +29 -3
- package/.mcp/schemas/repo.get_package_scripts.json +11 -3
- package/.mcp/schemas/repo.get_workflow_runs.json +12 -3
- package/.mcp/schemas/repo.logs.json +14 -3
- package/.mcp/schemas/repo.multi_exec.json +89 -0
- package/.mcp/schemas/repo.read_agent_context.json +117 -5
- package/.mcp/schemas/repo.read_ci_logs.json +46 -3
- package/.mcp/schemas/repo.run_tests.json +31 -3
- package/.mcp/schemas/repo_check_jules_status.json +128 -0
- package/.mcp/schemas/repo_commit_patch.json +23 -3
- package/.mcp/schemas/repo_create_branch.json +28 -3
- package/.mcp/schemas/repo_create_repair_branch.json +31 -3
- package/.mcp/schemas/repo_get_changed_files.json +11 -3
- package/.mcp/schemas/repo_get_command_schema.json +29 -3
- package/.mcp/schemas/repo_get_package_scripts.json +11 -3
- package/.mcp/schemas/repo_get_workflow_runs.json +12 -3
- package/.mcp/schemas/repo_logs.json +14 -3
- package/.mcp/schemas/repo_multi_exec.json +89 -0
- package/.mcp/schemas/repo_read_agent_context.json +117 -5
- package/.mcp/schemas/repo_read_ci_logs.json +46 -3
- package/.mcp/schemas/repo_run_tests.json +31 -3
- package/CHANGELOG.md +22 -0
- package/README.md +29 -6
- package/actions/run-project-gate/action.yml +1 -1
- package/dist/config/dynamic.js +34 -0
- package/dist/config/github.js +16 -0
- package/dist/config/repo.js +28 -0
- package/dist/config.js +16 -81
- package/dist/config.test.js +10 -3
- package/dist/http.js +10 -0
- package/dist/mcp/definitions.js +76 -41
- package/dist/mcp/http.js +32 -9
- package/dist/mcp/http.test.js +62 -4
- package/dist/mcp/server.js +69 -10
- package/dist/mcp/server.test.js +59 -1
- package/dist/tools/contract.js +1079 -45
- package/dist/tools/github.comment_triage_summary.js +3 -10
- package/dist/tools/github.get_merge_conflict_files.js +4 -2
- package/dist/tools/github.get_pr_diff.js +3 -11
- package/dist/tools/jules/cancel-session.js +2 -9
- package/dist/tools/jules/cli.js +31 -0
- package/dist/tools/jules/create-session.js +12 -2
- package/dist/tools/jules/create-session.test.js +7 -0
- package/dist/tools/jules/get-messages.js +2 -9
- package/dist/tools/jules/list-sessions.js +4 -35
- package/dist/tools/jules/send-message.js +2 -9
- package/dist/tools/jules/session.js +26 -0
- package/dist/tools/jules/shared.js +2 -50
- package/dist/tools/jules/trigger-feedback.js +2 -10
- package/dist/tools/repo.check_jules_status.js +148 -0
- package/dist/tools/repo.check_jules_status.test.js +47 -0
- package/dist/tools/repo.multi_exec.js +21 -0
- package/dist/tools/repo.multi_exec.test.js +13 -0
- package/dist/tools/repo.read_agent_context.js +65 -3
- package/dist/tools/repo.read_agent_context.test.js +30 -1
- package/dist/tools/repo.run_tests.js +13 -1
- package/package.json +3 -2
- package/scripts/sync-contracts.ts +11 -2
- package/src/config/dynamic.ts +37 -0
- package/src/config/github.ts +16 -0
- package/src/config/repo.ts +36 -0
- package/src/config.test.ts +11 -3
- package/src/config.ts +16 -89
- package/src/http.ts +13 -0
- package/src/mcp/definitions.ts +110 -41
- package/src/mcp/http.test.ts +75 -5
- package/src/mcp/http.ts +40 -14
- package/src/mcp/server.test.ts +72 -1
- package/src/mcp/server.ts +72 -11
- package/src/tools/contract.ts +1194 -36
- package/src/tools/github.comment_triage_summary.ts +3 -12
- package/src/tools/github.get_merge_conflict_files.ts +5 -2
- package/src/tools/github.get_pr_diff.ts +3 -13
- package/src/tools/jules/cancel-session.ts +2 -11
- package/src/tools/jules/cli.ts +42 -0
- package/src/tools/jules/create-session.test.ts +9 -0
- package/src/tools/jules/create-session.ts +13 -2
- package/src/tools/jules/get-messages.ts +2 -11
- package/src/tools/jules/list-sessions.ts +5 -39
- package/src/tools/jules/send-message.ts +2 -11
- package/src/tools/jules/session.ts +28 -0
- package/src/tools/jules/shared.ts +2 -63
- package/src/tools/jules/trigger-feedback.ts +2 -13
- package/src/tools/repo.check_jules_status.test.ts +55 -0
- package/src/tools/repo.check_jules_status.ts +176 -0
- package/src/tools/repo.multi_exec.test.ts +15 -0
- package/src/tools/repo.multi_exec.ts +23 -0
- package/src/tools/repo.read_agent_context.test.ts +35 -1
- package/src/tools/repo.read_agent_context.ts +68 -3
- package/src/tools/repo.run_tests.ts +14 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.0](https://github.com/arii/boomtick/compare/mcp-v0.6.2...mcp-v0.7.0) (2026-10-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **aggregate:** agent onboarding, multi-repo context, and sequential orchestration ([#1001](https://github.com/arii/boomtick/issues/1001)) ([7060777](https://github.com/arii/boomtick/commit/7060777195a84d391b5098226ce06a04ddefcd9a))
|
|
9
|
+
* **aggregate:** pure-node container, review runner hardening, mcp modernization, and offline dag engine ([#1002](https://github.com/arii/boomtick/issues/1002)) ([056503c](https://github.com/arii/boomtick/commit/056503c8c21b5bd99f3b9d874ee7fac25972362a))
|
|
10
|
+
* **mcp:** modernize boomtick-mcp with typed outputSchema, resources interface, and streamable HTTP transport ([26401df](https://github.com/arii/boomtick/commit/26401df06774e9de7756a375e0080810cc35926e))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **mcp:** resolve active repository dynamically across workspaces ([#981](https://github.com/arii/boomtick/issues/981)) ([9a757ea](https://github.com/arii/boomtick/commit/9a757ea5d1a878861e69bee4e36201849f7a03e4))
|
|
16
|
+
|
|
17
|
+
## [0.6.2](https://github.com/arii/boomtick/compare/mcp-v0.6.1...mcp-v0.6.2) (2026-10-28)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **ci:** fix release pipeline schema generation and issue quality check on automated alerts [skip-scope-check] ([#956](https://github.com/arii/boomtick/issues/956)) ([a0e6114](https://github.com/arii/boomtick/commit/a0e6114e33dac799313f36f363de6008477cebfe))
|
|
23
|
+
* **cli:** Eliminate runtime sys.path mutations in schema_gen.py ([#967](https://github.com/arii/boomtick/issues/967)) ([e1654de](https://github.com/arii/boomtick/commit/e1654dec8cf4af0da08d0808ee815e39cb9ab634))
|
|
24
|
+
|
|
3
25
|
## [0.6.1](https://github.com/arii/boomtick/compare/mcp-v0.6.0...mcp-v0.6.1) (2026-10-23)
|
|
4
26
|
|
|
5
27
|
|
package/README.md
CHANGED
|
@@ -41,19 +41,21 @@ A Model Context Protocol (MCP) server designed to empower AI agents with structu
|
|
|
41
41
|
|
|
42
42
|
### Installation
|
|
43
43
|
```bash
|
|
44
|
-
|
|
45
|
-
pnpm
|
|
46
|
-
|
|
44
|
+
# From repository root
|
|
45
|
+
pnpm --filter @arii/boomtick-mcp run build
|
|
46
|
+
|
|
47
|
+
# Register boomtick-mcp across installed agent hosts automatically
|
|
48
|
+
td mcp install --execute
|
|
47
49
|
```
|
|
48
50
|
|
|
49
|
-
###
|
|
51
|
+
### Manual Configuration via MCP Client (e.g. Claude Desktop, Cursor)
|
|
50
52
|
Add the following to your MCP client configuration (e.g. `claude_desktop_config.json`):
|
|
51
53
|
```json
|
|
52
54
|
{
|
|
53
55
|
"mcpServers": {
|
|
54
56
|
"boomtick": {
|
|
55
57
|
"command": "node",
|
|
56
|
-
"args": ["/absolute/path/to/
|
|
58
|
+
"args": ["/absolute/path/to/mcp/dist/index.js"],
|
|
57
59
|
"env": {
|
|
58
60
|
"GITHUB_TOKEN": "your_pat",
|
|
59
61
|
"GITHUB_OWNER": "your_org",
|
|
@@ -75,11 +77,32 @@ BOOMTICK_REPO_PATH=/path/to/repo
|
|
|
75
77
|
```
|
|
76
78
|
|
|
77
79
|
## Usage
|
|
78
|
-
|
|
80
|
+
|
|
81
|
+
### Stdio Transport
|
|
82
|
+
Run the server via stdio (ideal for local CLI workflows and Docker container actions):
|
|
79
83
|
```bash
|
|
80
84
|
node dist/index.js
|
|
81
85
|
```
|
|
82
86
|
|
|
87
|
+
### Streamable HTTP Transport & Remote Networked Access
|
|
88
|
+
For hosted agent harnesses (e.g. Google Gemini Agent endpoints, remote DevAI dashboards) requiring network transport with Bearer token / OAuth 2.1 authentication and RFC 9728 metadata discovery:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Run HTTP entrypoint directly
|
|
92
|
+
node dist/http.js --port 3000 --bearer-token secret123
|
|
93
|
+
|
|
94
|
+
# Or via CLI binary entrypoint
|
|
95
|
+
boomtick-mcp-http --port 3000 --bearer-token secret123
|
|
96
|
+
|
|
97
|
+
# Or using environment variables
|
|
98
|
+
MCP_TRANSPORT=http PORT=3000 BOOMTICK_MCP_BEARER_TOKEN=secret123 node dist/index.js
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
#### Network Endpoints & RFC 9728 Discovery
|
|
102
|
+
- `GET /.well-known/oauth-protected-resource`: OAuth 2.0 / 2.1 Protected Resource Metadata discovery endpoint (RFC 9728).
|
|
103
|
+
- `GET /sse`: Server-Sent Events (SSE) stream endpoint for MCP connections (Protected via Bearer token).
|
|
104
|
+
- `POST /messages?sessionId=...`: MCP client JSON-RPC message posting endpoint (Protected via Bearer token).
|
|
105
|
+
|
|
83
106
|
## Release Process
|
|
84
107
|
1. Run tests: `pnpm test`
|
|
85
108
|
2. Run evals: `pnpm run run-evals`
|
|
@@ -94,7 +94,7 @@ runs:
|
|
|
94
94
|
if command -v td >/dev/null 2>&1; then
|
|
95
95
|
PYTHONPATH="$CLI_PATH" td schema --generate
|
|
96
96
|
else
|
|
97
|
-
PYTHONPATH="$CLI_PATH" python3
|
|
97
|
+
PYTHONPATH="$CLI_PATH" python3 -m dev_tools.schema_gen
|
|
98
98
|
fi
|
|
99
99
|
npx tsx "$FILTER_PATH/scripts/sync-contracts.ts"
|
|
100
100
|
pnpm --filter "$FILTER_PATH" run sync:mcp-schemas
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { execSync } from "child_process";
|
|
2
|
+
import { findRepoRoot } from "./repo.js";
|
|
3
|
+
let cachedDynamicConfig = null;
|
|
4
|
+
export function initializeConfig(targetCwd) {
|
|
5
|
+
if (cachedDynamicConfig !== null) {
|
|
6
|
+
return cachedDynamicConfig;
|
|
7
|
+
}
|
|
8
|
+
try {
|
|
9
|
+
const cwd = findRepoRoot(targetCwd);
|
|
10
|
+
const cmd = `td config view`;
|
|
11
|
+
const output = execSync(cmd, {
|
|
12
|
+
cwd,
|
|
13
|
+
encoding: "utf-8",
|
|
14
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
15
|
+
});
|
|
16
|
+
cachedDynamicConfig = JSON.parse(output);
|
|
17
|
+
return cachedDynamicConfig;
|
|
18
|
+
}
|
|
19
|
+
catch (e) {
|
|
20
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
21
|
+
const errorPrefix = `CRITICAL: Failed to load dynamic config from Python CLI. Ensure Python 3 is installed and cli is in your PYTHONPATH. Details: ${message}`;
|
|
22
|
+
if (process.env.NODE_ENV === "development" || process.env.CI === "true") {
|
|
23
|
+
throw new Error(errorPrefix);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
console.warn(errorPrefix);
|
|
27
|
+
}
|
|
28
|
+
cachedDynamicConfig = {};
|
|
29
|
+
}
|
|
30
|
+
return cachedDynamicConfig;
|
|
31
|
+
}
|
|
32
|
+
export function getCachedDynamicConfig() {
|
|
33
|
+
return cachedDynamicConfig;
|
|
34
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { execSync } from "child_process";
|
|
2
|
+
export function getGithubToken() {
|
|
3
|
+
if (process.env.GITHUB_TOKEN) {
|
|
4
|
+
return process.env.GITHUB_TOKEN;
|
|
5
|
+
}
|
|
6
|
+
try {
|
|
7
|
+
const token = execSync("gh auth token", { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim();
|
|
8
|
+
if (token) {
|
|
9
|
+
return token;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
/* ignore to allow fallback */
|
|
14
|
+
}
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import path from "path";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
5
|
+
export function findRepoRoot(startDir) {
|
|
6
|
+
let current = startDir || process.cwd();
|
|
7
|
+
while (current !== path.parse(current).root) {
|
|
8
|
+
if (fs.existsSync(path.join(current, "project_config.json")) ||
|
|
9
|
+
fs.existsSync(path.join(current, "workspace.json")) ||
|
|
10
|
+
fs.existsSync(path.join(current, ".git"))) {
|
|
11
|
+
return current;
|
|
12
|
+
}
|
|
13
|
+
current = path.dirname(current);
|
|
14
|
+
}
|
|
15
|
+
if (process.env.BOOMTICK_REPO_PATH) {
|
|
16
|
+
return process.env.BOOMTICK_REPO_PATH;
|
|
17
|
+
}
|
|
18
|
+
current = __dirname;
|
|
19
|
+
while (current !== path.parse(current).root) {
|
|
20
|
+
if (fs.existsSync(path.join(current, "project_config.json")) ||
|
|
21
|
+
fs.existsSync(path.join(current, "workspace.json")) ||
|
|
22
|
+
fs.existsSync(path.join(current, ".git"))) {
|
|
23
|
+
return current;
|
|
24
|
+
}
|
|
25
|
+
current = path.dirname(current);
|
|
26
|
+
}
|
|
27
|
+
return path.resolve(__dirname, "../../../../");
|
|
28
|
+
}
|
package/dist/config.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import { fileURLToPath } from "url";
|
|
4
|
-
import {
|
|
4
|
+
import { findRepoRoot } from "./config/repo.js";
|
|
5
|
+
import { getGithubToken } from "./config/github.js";
|
|
6
|
+
import { initializeConfig, getCachedDynamicConfig } from "./config/dynamic.js";
|
|
5
7
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
6
8
|
const envPath = path.resolve(__dirname, "../.env");
|
|
7
9
|
if (fs.existsSync(envPath) && typeof process.loadEnvFile === "function") {
|
|
@@ -12,84 +14,13 @@ if (fs.existsSync(envPath) && typeof process.loadEnvFile === "function") {
|
|
|
12
14
|
// Ignore if already loaded or invalid
|
|
13
15
|
}
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
if (process.env.GITHUB_TOKEN) {
|
|
17
|
-
return process.env.GITHUB_TOKEN;
|
|
18
|
-
}
|
|
19
|
-
try {
|
|
20
|
-
const token = execSync("gh auth token", { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim();
|
|
21
|
-
if (token) {
|
|
22
|
-
return token;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
catch (e) { /* ignore to allow fallback */ }
|
|
26
|
-
return undefined;
|
|
27
|
-
}
|
|
28
|
-
let cachedDynamicConfig = null;
|
|
29
|
-
/**
|
|
30
|
-
* Explicitly initializes dynamic configuration from the Python CLI.
|
|
31
|
-
* Should be called once during server startup.
|
|
32
|
-
*/
|
|
33
|
-
export function initializeConfig() {
|
|
34
|
-
if (cachedDynamicConfig !== null) {
|
|
35
|
-
return cachedDynamicConfig;
|
|
36
|
-
}
|
|
37
|
-
try {
|
|
38
|
-
// Attempt to load core properties from the Python CLI in the active workspace
|
|
39
|
-
const cwd = process.env.BOOMTICK_REPO_PATH || process.cwd();
|
|
40
|
-
const cmd = `td config view`;
|
|
41
|
-
const output = execSync(cmd, {
|
|
42
|
-
cwd,
|
|
43
|
-
encoding: "utf-8",
|
|
44
|
-
stdio: ["ignore", "pipe", "ignore"]
|
|
45
|
-
});
|
|
46
|
-
cachedDynamicConfig = JSON.parse(output);
|
|
47
|
-
return cachedDynamicConfig;
|
|
48
|
-
}
|
|
49
|
-
catch (e) {
|
|
50
|
-
const message = e instanceof Error ? e.message : String(e);
|
|
51
|
-
const errorPrefix = `CRITICAL: Failed to load dynamic config from Python CLI. Ensure Python 3 is installed and cli is in your PYTHONPATH. Details: ${message}`;
|
|
52
|
-
if (process.env.NODE_ENV === "development" || process.env.CI === "true") {
|
|
53
|
-
throw new Error(errorPrefix);
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
console.warn(errorPrefix);
|
|
57
|
-
}
|
|
58
|
-
// Set an empty object to prevent repeated attempts if initialization fails in non-blocking mode
|
|
59
|
-
cachedDynamicConfig = {};
|
|
60
|
-
}
|
|
61
|
-
return cachedDynamicConfig;
|
|
62
|
-
}
|
|
63
|
-
function findRepoRoot() {
|
|
64
|
-
if (process.env.BOOMTICK_REPO_PATH) {
|
|
65
|
-
return process.env.BOOMTICK_REPO_PATH;
|
|
66
|
-
}
|
|
67
|
-
// Traverse up from process.cwd() to find project_config.json, workspace.json, or .git
|
|
68
|
-
let current = process.cwd();
|
|
69
|
-
while (current !== path.parse(current).root) {
|
|
70
|
-
if (fs.existsSync(path.join(current, "project_config.json")) ||
|
|
71
|
-
fs.existsSync(path.join(current, "workspace.json")) ||
|
|
72
|
-
fs.existsSync(path.join(current, ".git"))) {
|
|
73
|
-
return current;
|
|
74
|
-
}
|
|
75
|
-
current = path.dirname(current);
|
|
76
|
-
}
|
|
77
|
-
// Fallback to __dirname search if discovery from cwd fails
|
|
78
|
-
current = __dirname;
|
|
79
|
-
while (current !== path.parse(current).root) {
|
|
80
|
-
if (fs.existsSync(path.join(current, "project_config.json")) ||
|
|
81
|
-
fs.existsSync(path.join(current, "workspace.json")) ||
|
|
82
|
-
fs.existsSync(path.join(current, ".git"))) {
|
|
83
|
-
return current;
|
|
84
|
-
}
|
|
85
|
-
current = path.dirname(current);
|
|
86
|
-
}
|
|
87
|
-
// Fallback to the monolithic relative path if discovery fails
|
|
88
|
-
return path.resolve(__dirname, "../../../");
|
|
89
|
-
}
|
|
17
|
+
export { initializeConfig };
|
|
90
18
|
export const config = {
|
|
91
|
-
get githubToken() {
|
|
19
|
+
get githubToken() {
|
|
20
|
+
return getGithubToken();
|
|
21
|
+
},
|
|
92
22
|
get githubOwner() {
|
|
23
|
+
const cachedDynamicConfig = getCachedDynamicConfig();
|
|
93
24
|
const repoString = cachedDynamicConfig?.github_repo;
|
|
94
25
|
if (typeof repoString === "string" && repoString.includes("/")) {
|
|
95
26
|
return repoString.split("/")[0];
|
|
@@ -103,6 +34,7 @@ export const config = {
|
|
|
103
34
|
throw new Error("GITHUB_OWNER must be set via environment variable or project_config.json");
|
|
104
35
|
},
|
|
105
36
|
get githubRepo() {
|
|
37
|
+
const cachedDynamicConfig = getCachedDynamicConfig();
|
|
106
38
|
const repoString = cachedDynamicConfig?.github_repo;
|
|
107
39
|
if (typeof repoString === "string" && repoString.includes("/")) {
|
|
108
40
|
return repoString.split("/")[1];
|
|
@@ -119,16 +51,19 @@ export const config = {
|
|
|
119
51
|
return findRepoRoot();
|
|
120
52
|
},
|
|
121
53
|
get defaultBaseBranch() {
|
|
54
|
+
const cachedDynamicConfig = getCachedDynamicConfig();
|
|
122
55
|
return process.env.DEFAULT_BASE_BRANCH || cachedDynamicConfig?.base_branch?.split("/").pop() || "main";
|
|
123
56
|
},
|
|
124
57
|
get viteBasePath() {
|
|
125
|
-
const
|
|
126
|
-
|
|
58
|
+
const cachedDynamicConfig = getCachedDynamicConfig();
|
|
59
|
+
const pathValue = process.env.VITE_BASE_PATH || cachedDynamicConfig?.vite_base_path;
|
|
60
|
+
if (!pathValue) {
|
|
127
61
|
throw new Error("VITE_BASE_PATH must be set via environment variable or project_config.json");
|
|
128
62
|
}
|
|
129
|
-
return
|
|
63
|
+
return pathValue;
|
|
130
64
|
},
|
|
131
65
|
get ghPath() {
|
|
66
|
+
const cachedDynamicConfig = getCachedDynamicConfig();
|
|
132
67
|
return process.env.GH_PATH || cachedDynamicConfig?.gh_path || "gh";
|
|
133
|
-
}
|
|
68
|
+
},
|
|
134
69
|
};
|
package/dist/config.test.js
CHANGED
|
@@ -19,9 +19,10 @@ describe("config", () => {
|
|
|
19
19
|
const mockConfig = { github_repo: "owner/repo", base_branch: "origin/main", vite_base_path: "/app/" };
|
|
20
20
|
vi.mocked(execSync).mockReturnValue(JSON.stringify(mockConfig));
|
|
21
21
|
const { initializeConfig } = await import("./config.js");
|
|
22
|
+
const { findRepoRoot } = await import("./config/repo.js");
|
|
22
23
|
const result = initializeConfig();
|
|
23
24
|
expect(execSync).toHaveBeenCalledWith("td config view", expect.objectContaining({
|
|
24
|
-
cwd:
|
|
25
|
+
cwd: findRepoRoot()
|
|
25
26
|
}));
|
|
26
27
|
expect(result).toEqual(mockConfig);
|
|
27
28
|
});
|
|
@@ -103,10 +104,16 @@ describe("config", () => {
|
|
|
103
104
|
expect(() => config.githubOwner).toThrow("GITHUB_OWNER must be set via environment variable or project_config.json");
|
|
104
105
|
expect(() => config.githubRepo).toThrow("GITHUB_REPO must be set via environment variable or project_config.json");
|
|
105
106
|
});
|
|
106
|
-
it("should resolve
|
|
107
|
+
it("should resolve active workspace from process.cwd() over BOOMTICK_REPO_PATH when inside a repo", async () => {
|
|
107
108
|
process.env.BOOMTICK_REPO_PATH = "/custom/repo/path";
|
|
108
109
|
const { config } = await import("./config.js");
|
|
109
|
-
expect(config.repoPath).toBe("
|
|
110
|
+
expect(config.repoPath).toBe(process.cwd().replace(/\/mcp$/, ""));
|
|
111
|
+
});
|
|
112
|
+
it("should fallback to BOOMTICK_REPO_PATH when process.cwd() is outside any repo", async () => {
|
|
113
|
+
process.env.BOOMTICK_REPO_PATH = "/custom/repo/path";
|
|
114
|
+
const { findRepoRoot } = await import("./config/repo.js");
|
|
115
|
+
const rootDir = process.platform === "win32" ? "C:\\" : "/";
|
|
116
|
+
expect(findRepoRoot(rootDir)).toBe("/custom/repo/path");
|
|
110
117
|
});
|
|
111
118
|
it("should resolve defaultBaseBranch, viteBasePath, and ghPath", async () => {
|
|
112
119
|
process.env.DEFAULT_BASE_BRANCH = "develop";
|
package/dist/http.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { BoomtickMCPServer } from "./mcp/server.js";
|
|
3
|
+
import { initializeConfig } from "./config.js";
|
|
4
|
+
initializeConfig();
|
|
5
|
+
process.env.MCP_TRANSPORT = "http";
|
|
6
|
+
const server = new BoomtickMCPServer();
|
|
7
|
+
server.run().catch((error) => {
|
|
8
|
+
console.error("Fatal error running HTTP server:", error);
|
|
9
|
+
process.exit(1);
|
|
10
|
+
});
|