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