@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
|
@@ -31216,6 +31216,91 @@ var MAX_PATH_LENGTH = 1024;
|
|
|
31216
31216
|
|
|
31217
31217
|
// src/server/BeansMcpServer.ts
|
|
31218
31218
|
init_utils();
|
|
31219
|
+
|
|
31220
|
+
// package.json
|
|
31221
|
+
var package_default = {
|
|
31222
|
+
name: "@selfagency/beans-mcp",
|
|
31223
|
+
version: "0.1.3",
|
|
31224
|
+
private: false,
|
|
31225
|
+
description: "MCP (Model Context Protocol) server for Beans issue tracker",
|
|
31226
|
+
author: {
|
|
31227
|
+
name: "Daniel Sieradski",
|
|
31228
|
+
email: "daniel@self.agency",
|
|
31229
|
+
url: "https://self.agency"
|
|
31230
|
+
},
|
|
31231
|
+
homepage: "https://github.com/hmans/beans",
|
|
31232
|
+
bugs: {
|
|
31233
|
+
url: "https://github.com/selfagency/beans-mcp/issues"
|
|
31234
|
+
},
|
|
31235
|
+
repository: {
|
|
31236
|
+
type: "git",
|
|
31237
|
+
url: "git+https://github.com/selfagency/beans-mcp.git"
|
|
31238
|
+
},
|
|
31239
|
+
keywords: [
|
|
31240
|
+
"beans",
|
|
31241
|
+
"mcp",
|
|
31242
|
+
"model-context-protocol",
|
|
31243
|
+
"issue-tracker",
|
|
31244
|
+
"ai"
|
|
31245
|
+
],
|
|
31246
|
+
license: "MIT",
|
|
31247
|
+
type: "module",
|
|
31248
|
+
exports: {
|
|
31249
|
+
".": {
|
|
31250
|
+
types: "./dist/index.d.ts",
|
|
31251
|
+
import: "./dist/index.js",
|
|
31252
|
+
require: "./dist/index.cjs"
|
|
31253
|
+
}
|
|
31254
|
+
},
|
|
31255
|
+
main: "./dist/index.cjs",
|
|
31256
|
+
module: "./dist/index.js",
|
|
31257
|
+
types: "./dist/index.d.ts",
|
|
31258
|
+
bin: {
|
|
31259
|
+
"beans-mcp": "dist/beans-mcp-server.cjs"
|
|
31260
|
+
},
|
|
31261
|
+
scripts: {
|
|
31262
|
+
build: "tsup",
|
|
31263
|
+
format: "oxfmt",
|
|
31264
|
+
"lint:fix": "oxlint --fix",
|
|
31265
|
+
lint: "oxlint",
|
|
31266
|
+
postbuild: "node ./scripts/write-dist-package.js",
|
|
31267
|
+
prepare: "husky",
|
|
31268
|
+
release: "zx ./scripts/release.js",
|
|
31269
|
+
"test:coverage": "vitest run --coverage",
|
|
31270
|
+
"test:watch": "vitest",
|
|
31271
|
+
test: "vitest run",
|
|
31272
|
+
"type-check": "tsc --noEmit"
|
|
31273
|
+
},
|
|
31274
|
+
devDependencies: {
|
|
31275
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
31276
|
+
"@octokit/rest": "^22.0.1",
|
|
31277
|
+
"@types/node": "^20.19.0",
|
|
31278
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
31279
|
+
"@vitest/ui": "4.0.18",
|
|
31280
|
+
husky: "^9.1.7",
|
|
31281
|
+
"lint-staged": "^16.2.7",
|
|
31282
|
+
ora: "^9.3.0",
|
|
31283
|
+
oxfmt: "^0.35.0",
|
|
31284
|
+
oxlint: "^1.50.0",
|
|
31285
|
+
"oxlint-tsgolint": "^0.15.0",
|
|
31286
|
+
tsup: "8.5.1",
|
|
31287
|
+
typescript: "^5.9.3",
|
|
31288
|
+
vitest: "4.0.18",
|
|
31289
|
+
zod: "4.3.6",
|
|
31290
|
+
zx: "^8.8.5"
|
|
31291
|
+
},
|
|
31292
|
+
engines: {
|
|
31293
|
+
node: ">=18"
|
|
31294
|
+
},
|
|
31295
|
+
"lint-staged": {
|
|
31296
|
+
"src/**/*.ts": [
|
|
31297
|
+
"pnpm run lint:fix",
|
|
31298
|
+
"pnpm run format"
|
|
31299
|
+
]
|
|
31300
|
+
}
|
|
31301
|
+
};
|
|
31302
|
+
|
|
31303
|
+
// src/server/BeansMcpServer.ts
|
|
31219
31304
|
async function getBeanById(backend, beanId) {
|
|
31220
31305
|
try {
|
|
31221
31306
|
const beans = await backend.list();
|
|
@@ -31663,6 +31748,14 @@ async function startBeansMcpServer(argv, _resolveRoots) {
|
|
|
31663
31748
|
const { workspaceRoot, workspaceExplicit, cliPath, port, logDir } = parseCliArgs(argv);
|
|
31664
31749
|
process.env.BEANS_VSCODE_MCP_PORT = String(port);
|
|
31665
31750
|
process.env.BEANS_MCP_PORT = String(port);
|
|
31751
|
+
try {
|
|
31752
|
+
const version2 = package_default.version ?? "0.0.0-dev";
|
|
31753
|
+
const workspaceLabel = workspaceExplicit ? workspaceRoot : "(auto from roots)";
|
|
31754
|
+
console.error(
|
|
31755
|
+
`[beans-mcp] v${version2} starting (port=${port}, workspace=${workspaceLabel}, cli=${cliPath}, logDir=${logDir})`
|
|
31756
|
+
);
|
|
31757
|
+
} catch {
|
|
31758
|
+
}
|
|
31666
31759
|
const mutable = new MutableBackend(new BeansCliBackend2(workspaceRoot, cliPath, logDir));
|
|
31667
31760
|
const { server } = await createBeansMcpServer({
|
|
31668
31761
|
workspaceRoot,
|
|
@@ -31677,6 +31770,10 @@ async function startBeansMcpServer(argv, _resolveRoots) {
|
|
|
31677
31770
|
const rootPath = await resolver(server);
|
|
31678
31771
|
if (rootPath) {
|
|
31679
31772
|
mutable.setInner(new BeansCliBackend2(rootPath, cliPath));
|
|
31773
|
+
try {
|
|
31774
|
+
console.error(`[beans-mcp] workspace resolved from roots: ${rootPath}`);
|
|
31775
|
+
} catch {
|
|
31776
|
+
}
|
|
31680
31777
|
}
|
|
31681
31778
|
}
|
|
31682
31779
|
}
|