@selfagency/beans-mcp 0.1.1 → 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 (29) hide show
  1. package/.github/dependabot.yml +11 -0
  2. package/.github/workflows/test.yml +4 -0
  3. package/CHANGELOG.md +20 -0
  4. package/codeql/codeql-custom-queries-actions/README.md +14 -0
  5. package/codeql/codeql-custom-queries-actions/codeql-pack.lock.yml +32 -0
  6. package/codeql/codeql-custom-queries-actions/codeql-pack.yml +7 -0
  7. package/codeql/codeql-custom-queries-actions/qlpack.yml +6 -0
  8. package/codeql/codeql-custom-queries-actions/queries/github-script-without-tojson.ql +18 -0
  9. package/codeql/codeql-custom-queries-actions/queries/strict-external-action-pinning.ql +18 -0
  10. package/codeql/codeql-custom-queries-javascript/README.md +14 -0
  11. package/codeql/codeql-custom-queries-javascript/codeql-pack.lock.yml +30 -0
  12. package/codeql/codeql-custom-queries-javascript/codeql-pack.yml +7 -0
  13. package/codeql/codeql-custom-queries-javascript/qlpack.yml +6 -0
  14. package/codeql/codeql-custom-queries-javascript/queries/child-process-shell-apis.ql +26 -0
  15. package/codeql/codeql-custom-queries-javascript/queries/innerhtml-assignment.ql +24 -0
  16. package/dist/beans-mcp-server.cjs +105 -4
  17. package/dist/beans-mcp-server.cjs.map +1 -1
  18. package/dist/index.cjs +105 -4
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.ts +2 -1
  21. package/dist/index.js +105 -4
  22. package/dist/index.js.map +1 -1
  23. package/dist/package.json +2 -2
  24. package/package.json +3 -3
  25. package/src/server/BeansMcpServer.ts +23 -0
  26. package/src/server/backend.ts +6 -0
  27. package/src/test/handlers.unit.test.ts +27 -10
  28. package/src/test/utils.test.ts +44 -43
  29. package/src/utils.ts +1 -1
package/dist/index.cjs CHANGED
@@ -22735,8 +22735,7 @@ function isPathWithinRoot(root, target) {
22735
22735
  }
22736
22736
  function makeTextAndStructured(value) {
22737
22737
  return {
22738
- content: [{ type: "text", text: JSON.stringify(value, null, 2) }],
22739
- structuredContent: value
22738
+ content: [{ type: "text", text: JSON.stringify(value, null, 2) }]
22740
22739
  };
22741
22740
  }
22742
22741
  var import_node_path;
@@ -22920,6 +22919,9 @@ Output: ${stdout.slice(0, 1e3)}`
22920
22919
  if (updates.blockedBy) {
22921
22920
  updateInput.addBlockedBy = updates.blockedBy;
22922
22921
  }
22922
+ if (updates.body !== void 0) {
22923
+ updateInput.body = updates.body;
22924
+ }
22923
22925
  const { data, errors } = await this.executeGraphQL(UPDATE_BEAN_MUTATION, {
22924
22926
  id: beanId,
22925
22927
  input: updateInput
@@ -31214,6 +31216,91 @@ var MAX_PATH_LENGTH = 1024;
31214
31216
 
31215
31217
  // src/server/BeansMcpServer.ts
31216
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
31217
31304
  async function getBeanById(backend, beanId) {
31218
31305
  try {
31219
31306
  const beans = await backend.list();
@@ -31268,7 +31355,8 @@ function updateHandler(backend) {
31268
31355
  parent: input.parent,
31269
31356
  clearParent: input.clearParent,
31270
31357
  blocking: input.blocking,
31271
- blockedBy: input.blockedBy
31358
+ blockedBy: input.blockedBy,
31359
+ body: input.body
31272
31360
  })
31273
31361
  });
31274
31362
  }
@@ -31427,7 +31515,8 @@ function registerTools(server, backend) {
31427
31515
  parent: external_exports3.string().max(MAX_ID_LENGTH).optional(),
31428
31516
  clearParent: external_exports3.boolean().optional(),
31429
31517
  blocking: external_exports3.array(external_exports3.string().max(MAX_ID_LENGTH)).optional(),
31430
- blockedBy: external_exports3.array(external_exports3.string().max(MAX_ID_LENGTH)).optional()
31518
+ blockedBy: external_exports3.array(external_exports3.string().max(MAX_ID_LENGTH)).optional(),
31519
+ body: external_exports3.string().max(MAX_DESCRIPTION_LENGTH).optional()
31431
31520
  }),
31432
31521
  annotations: {
31433
31522
  readOnlyHint: false,
@@ -31659,6 +31748,14 @@ async function startBeansMcpServer(argv, _resolveRoots) {
31659
31748
  const { workspaceRoot, workspaceExplicit, cliPath, port, logDir } = parseCliArgs(argv);
31660
31749
  process.env.BEANS_VSCODE_MCP_PORT = String(port);
31661
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
+ }
31662
31759
  const mutable = new MutableBackend(new BeansCliBackend2(workspaceRoot, cliPath, logDir));
31663
31760
  const { server } = await createBeansMcpServer({
31664
31761
  workspaceRoot,
@@ -31673,6 +31770,10 @@ async function startBeansMcpServer(argv, _resolveRoots) {
31673
31770
  const rootPath = await resolver(server);
31674
31771
  if (rootPath) {
31675
31772
  mutable.setInner(new BeansCliBackend2(rootPath, cliPath));
31773
+ try {
31774
+ console.error(`[beans-mcp] workspace resolved from roots: ${rootPath}`);
31775
+ } catch {
31776
+ }
31676
31777
  }
31677
31778
  }
31678
31779
  }