@selfagency/beans-mcp 0.1.2 → 0.1.3
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/.beans.yml +6 -0
- package/.claude/settings.local.json +18 -0
- package/.editorconfig +13 -0
- package/.github/dependabot.yml +11 -0
- package/.github/workflows/release.yml +235 -0
- package/.github/workflows/test.yml +84 -0
- package/.husky/pre-commit +1 -0
- package/.nvmrc +1 -0
- package/.oxfmtrc.json +11 -0
- package/.oxlintrc.json +37 -0
- package/.vscode/settings.json +3 -0
- package/CHANGELOG.md +160 -0
- package/CONTRIBUTING.md +139 -0
- package/codeql/codeql-custom-queries-actions/README.md +14 -0
- package/codeql/codeql-custom-queries-actions/codeql-pack.lock.yml +32 -0
- package/codeql/codeql-custom-queries-actions/codeql-pack.yml +7 -0
- package/codeql/codeql-custom-queries-actions/qlpack.yml +6 -0
- package/codeql/codeql-custom-queries-actions/queries/github-script-without-tojson.ql +18 -0
- package/codeql/codeql-custom-queries-actions/queries/strict-external-action-pinning.ql +18 -0
- package/codeql/codeql-custom-queries-javascript/README.md +14 -0
- package/codeql/codeql-custom-queries-javascript/codeql-pack.lock.yml +30 -0
- package/codeql/codeql-custom-queries-javascript/codeql-pack.yml +7 -0
- package/codeql/codeql-custom-queries-javascript/qlpack.yml +6 -0
- package/codeql/codeql-custom-queries-javascript/queries/child-process-shell-apis.ql +26 -0
- package/codeql/codeql-custom-queries-javascript/queries/innerhtml-assignment.ql +24 -0
- package/dist/README.md +307 -0
- package/{beans-mcp-server.cjs → dist/beans-mcp-server.cjs} +97 -0
- package/dist/beans-mcp-server.cjs.map +1 -0
- package/{index.cjs → dist/index.cjs} +97 -0
- package/dist/index.cjs.map +1 -0
- package/{index.js → dist/index.js} +97 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +43 -0
- package/package.json +63 -26
- package/pnpm-workspace.yaml +2 -0
- package/scripts/release.js +433 -0
- package/scripts/write-dist-package.js +53 -0
- package/src/cli.ts +14 -0
- package/src/index.ts +21 -0
- package/src/internal/graphql.ts +33 -0
- package/src/internal/queryHelpers.ts +157 -0
- package/src/server/BeansMcpServer.ts +623 -0
- package/src/server/backend.ts +364 -0
- package/src/test/BeansMcpServer.test.ts +514 -0
- package/src/test/handlers.unit.test.ts +201 -0
- package/src/test/parseCliArgs.test.ts +69 -0
- package/src/test/protocol.e2e.test.ts +884 -0
- package/src/test/queryHelpers.test.ts +524 -0
- package/src/test/startBeansMcpServer.test.ts +146 -0
- package/src/test/tools-integration.test.ts +912 -0
- package/src/test/utils.test.ts +81 -0
- package/src/types.ts +46 -0
- package/src/utils.ts +20 -0
- package/tsconfig.json +24 -0
- package/tsup.config.ts +42 -0
- package/vitest.config.ts +18 -0
- /package/{index.d.ts → dist/index.d.ts} +0 -0
|
@@ -31199,6 +31199,91 @@ var MAX_PATH_LENGTH = 1024;
|
|
|
31199
31199
|
|
|
31200
31200
|
// src/server/BeansMcpServer.ts
|
|
31201
31201
|
init_utils();
|
|
31202
|
+
|
|
31203
|
+
// package.json
|
|
31204
|
+
var package_default = {
|
|
31205
|
+
name: "@selfagency/beans-mcp",
|
|
31206
|
+
version: "0.1.3",
|
|
31207
|
+
private: false,
|
|
31208
|
+
description: "MCP (Model Context Protocol) server for Beans issue tracker",
|
|
31209
|
+
author: {
|
|
31210
|
+
name: "Daniel Sieradski",
|
|
31211
|
+
email: "daniel@self.agency",
|
|
31212
|
+
url: "https://self.agency"
|
|
31213
|
+
},
|
|
31214
|
+
homepage: "https://github.com/hmans/beans",
|
|
31215
|
+
bugs: {
|
|
31216
|
+
url: "https://github.com/selfagency/beans-mcp/issues"
|
|
31217
|
+
},
|
|
31218
|
+
repository: {
|
|
31219
|
+
type: "git",
|
|
31220
|
+
url: "git+https://github.com/selfagency/beans-mcp.git"
|
|
31221
|
+
},
|
|
31222
|
+
keywords: [
|
|
31223
|
+
"beans",
|
|
31224
|
+
"mcp",
|
|
31225
|
+
"model-context-protocol",
|
|
31226
|
+
"issue-tracker",
|
|
31227
|
+
"ai"
|
|
31228
|
+
],
|
|
31229
|
+
license: "MIT",
|
|
31230
|
+
type: "module",
|
|
31231
|
+
exports: {
|
|
31232
|
+
".": {
|
|
31233
|
+
types: "./dist/index.d.ts",
|
|
31234
|
+
import: "./dist/index.js",
|
|
31235
|
+
require: "./dist/index.cjs"
|
|
31236
|
+
}
|
|
31237
|
+
},
|
|
31238
|
+
main: "./dist/index.cjs",
|
|
31239
|
+
module: "./dist/index.js",
|
|
31240
|
+
types: "./dist/index.d.ts",
|
|
31241
|
+
bin: {
|
|
31242
|
+
"beans-mcp": "dist/beans-mcp-server.cjs"
|
|
31243
|
+
},
|
|
31244
|
+
scripts: {
|
|
31245
|
+
build: "tsup",
|
|
31246
|
+
format: "oxfmt",
|
|
31247
|
+
"lint:fix": "oxlint --fix",
|
|
31248
|
+
lint: "oxlint",
|
|
31249
|
+
postbuild: "node ./scripts/write-dist-package.js",
|
|
31250
|
+
prepare: "husky",
|
|
31251
|
+
release: "zx ./scripts/release.js",
|
|
31252
|
+
"test:coverage": "vitest run --coverage",
|
|
31253
|
+
"test:watch": "vitest",
|
|
31254
|
+
test: "vitest run",
|
|
31255
|
+
"type-check": "tsc --noEmit"
|
|
31256
|
+
},
|
|
31257
|
+
devDependencies: {
|
|
31258
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
31259
|
+
"@octokit/rest": "^22.0.1",
|
|
31260
|
+
"@types/node": "^20.19.0",
|
|
31261
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
31262
|
+
"@vitest/ui": "4.0.18",
|
|
31263
|
+
husky: "^9.1.7",
|
|
31264
|
+
"lint-staged": "^16.2.7",
|
|
31265
|
+
ora: "^9.3.0",
|
|
31266
|
+
oxfmt: "^0.35.0",
|
|
31267
|
+
oxlint: "^1.50.0",
|
|
31268
|
+
"oxlint-tsgolint": "^0.15.0",
|
|
31269
|
+
tsup: "8.5.1",
|
|
31270
|
+
typescript: "^5.9.3",
|
|
31271
|
+
vitest: "4.0.18",
|
|
31272
|
+
zod: "4.3.6",
|
|
31273
|
+
zx: "^8.8.5"
|
|
31274
|
+
},
|
|
31275
|
+
engines: {
|
|
31276
|
+
node: ">=18"
|
|
31277
|
+
},
|
|
31278
|
+
"lint-staged": {
|
|
31279
|
+
"src/**/*.ts": [
|
|
31280
|
+
"pnpm run lint:fix",
|
|
31281
|
+
"pnpm run format"
|
|
31282
|
+
]
|
|
31283
|
+
}
|
|
31284
|
+
};
|
|
31285
|
+
|
|
31286
|
+
// src/server/BeansMcpServer.ts
|
|
31202
31287
|
async function getBeanById(backend, beanId) {
|
|
31203
31288
|
try {
|
|
31204
31289
|
const beans = await backend.list();
|
|
@@ -31646,6 +31731,14 @@ async function startBeansMcpServer(argv, _resolveRoots) {
|
|
|
31646
31731
|
const { workspaceRoot, workspaceExplicit, cliPath, port, logDir } = parseCliArgs(argv);
|
|
31647
31732
|
process.env.BEANS_VSCODE_MCP_PORT = String(port);
|
|
31648
31733
|
process.env.BEANS_MCP_PORT = String(port);
|
|
31734
|
+
try {
|
|
31735
|
+
const version2 = package_default.version ?? "0.0.0-dev";
|
|
31736
|
+
const workspaceLabel = workspaceExplicit ? workspaceRoot : "(auto from roots)";
|
|
31737
|
+
console.error(
|
|
31738
|
+
`[beans-mcp] v${version2} starting (port=${port}, workspace=${workspaceLabel}, cli=${cliPath}, logDir=${logDir})`
|
|
31739
|
+
);
|
|
31740
|
+
} catch {
|
|
31741
|
+
}
|
|
31649
31742
|
const mutable = new MutableBackend(new BeansCliBackend2(workspaceRoot, cliPath, logDir));
|
|
31650
31743
|
const { server } = await createBeansMcpServer({
|
|
31651
31744
|
workspaceRoot,
|
|
@@ -31660,6 +31753,10 @@ async function startBeansMcpServer(argv, _resolveRoots) {
|
|
|
31660
31753
|
const rootPath = await resolver(server);
|
|
31661
31754
|
if (rootPath) {
|
|
31662
31755
|
mutable.setInner(new BeansCliBackend2(rootPath, cliPath));
|
|
31756
|
+
try {
|
|
31757
|
+
console.error(`[beans-mcp] workspace resolved from roots: ${rootPath}`);
|
|
31758
|
+
} catch {
|
|
31759
|
+
}
|
|
31663
31760
|
}
|
|
31664
31761
|
}
|
|
31665
31762
|
}
|