@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.d.ts CHANGED
@@ -68,6 +68,7 @@ interface BackendInterface {
68
68
  clearParent?: boolean;
69
69
  blocking?: string[];
70
70
  blockedBy?: string[];
71
+ body?: string;
71
72
  }): Promise<BeanRecord>;
72
73
  delete(beanId: string): Promise<Record<string, unknown>>;
73
74
  openConfig(): Promise<{
@@ -144,6 +145,7 @@ declare class BeansCliBackend implements BackendInterface {
144
145
  clearParent?: boolean;
145
146
  blocking?: string[];
146
147
  blockedBy?: string[];
148
+ body?: string;
147
149
  }): Promise<BeanRecord>;
148
150
  delete(beanId: string): Promise<Record<string, unknown>>;
149
151
  openConfig(): Promise<{
@@ -213,7 +215,6 @@ declare function makeTextAndStructured<T extends Record<string, unknown>>(value:
213
215
  type: "text";
214
216
  text: string;
215
217
  }[];
216
- structuredContent: T;
217
218
  };
218
219
 
219
220
  export { type BackendInterface, type BeanRecord, BeansCliBackend, DEFAULT_MCP_PORT, type GraphQLError, MAX_ID_LENGTH, MAX_METADATA_LENGTH, MAX_TITLE_LENGTH, type SortMode, createBeansMcpServer, isPathWithinRoot, makeTextAndStructured, parseCliArgs, sortBeansInternal as sortBeans, startBeansMcpServer };
package/dist/index.js CHANGED
@@ -22734,8 +22734,7 @@ function isPathWithinRoot(root, target) {
22734
22734
  }
22735
22735
  function makeTextAndStructured(value) {
22736
22736
  return {
22737
- content: [{ type: "text", text: JSON.stringify(value, null, 2) }],
22738
- structuredContent: value
22737
+ content: [{ type: "text", text: JSON.stringify(value, null, 2) }]
22739
22738
  };
22740
22739
  }
22741
22740
  var init_utils = __esm({
@@ -22917,6 +22916,9 @@ Output: ${stdout.slice(0, 1e3)}`
22917
22916
  if (updates.blockedBy) {
22918
22917
  updateInput.addBlockedBy = updates.blockedBy;
22919
22918
  }
22919
+ if (updates.body !== void 0) {
22920
+ updateInput.body = updates.body;
22921
+ }
22920
22922
  const { data, errors } = await this.executeGraphQL(UPDATE_BEAN_MUTATION, {
22921
22923
  id: beanId,
22922
22924
  input: updateInput
@@ -31194,6 +31196,91 @@ var MAX_PATH_LENGTH = 1024;
31194
31196
 
31195
31197
  // src/server/BeansMcpServer.ts
31196
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
31197
31284
  async function getBeanById(backend, beanId) {
31198
31285
  try {
31199
31286
  const beans = await backend.list();
@@ -31248,7 +31335,8 @@ function updateHandler(backend) {
31248
31335
  parent: input.parent,
31249
31336
  clearParent: input.clearParent,
31250
31337
  blocking: input.blocking,
31251
- blockedBy: input.blockedBy
31338
+ blockedBy: input.blockedBy,
31339
+ body: input.body
31252
31340
  })
31253
31341
  });
31254
31342
  }
@@ -31407,7 +31495,8 @@ function registerTools(server, backend) {
31407
31495
  parent: external_exports3.string().max(MAX_ID_LENGTH).optional(),
31408
31496
  clearParent: external_exports3.boolean().optional(),
31409
31497
  blocking: external_exports3.array(external_exports3.string().max(MAX_ID_LENGTH)).optional(),
31410
- blockedBy: external_exports3.array(external_exports3.string().max(MAX_ID_LENGTH)).optional()
31498
+ blockedBy: external_exports3.array(external_exports3.string().max(MAX_ID_LENGTH)).optional(),
31499
+ body: external_exports3.string().max(MAX_DESCRIPTION_LENGTH).optional()
31411
31500
  }),
31412
31501
  annotations: {
31413
31502
  readOnlyHint: false,
@@ -31639,6 +31728,14 @@ async function startBeansMcpServer(argv, _resolveRoots) {
31639
31728
  const { workspaceRoot, workspaceExplicit, cliPath, port, logDir } = parseCliArgs(argv);
31640
31729
  process.env.BEANS_VSCODE_MCP_PORT = String(port);
31641
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
+ }
31642
31739
  const mutable = new MutableBackend(new BeansCliBackend2(workspaceRoot, cliPath, logDir));
31643
31740
  const { server } = await createBeansMcpServer({
31644
31741
  workspaceRoot,
@@ -31653,6 +31750,10 @@ async function startBeansMcpServer(argv, _resolveRoots) {
31653
31750
  const rootPath = await resolver(server);
31654
31751
  if (rootPath) {
31655
31752
  mutable.setInner(new BeansCliBackend2(rootPath, cliPath));
31753
+ try {
31754
+ console.error(`[beans-mcp] workspace resolved from roots: ${rootPath}`);
31755
+ } catch {
31756
+ }
31656
31757
  }
31657
31758
  }
31658
31759
  }