@selfagency/beans-mcp 0.1.1 → 0.1.2

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 (44) hide show
  1. package/{dist/beans-mcp-server.cjs → beans-mcp-server.cjs} +8 -4
  2. package/{dist/index.cjs → index.cjs} +8 -4
  3. package/{dist/index.d.ts → index.d.ts} +2 -1
  4. package/{dist/index.js → index.js} +8 -4
  5. package/package.json +27 -64
  6. package/.beans.yml +0 -6
  7. package/.claude/settings.local.json +0 -18
  8. package/.editorconfig +0 -13
  9. package/.github/workflows/release.yml +0 -235
  10. package/.github/workflows/test.yml +0 -80
  11. package/.husky/pre-commit +0 -1
  12. package/.nvmrc +0 -1
  13. package/.oxfmtrc.json +0 -11
  14. package/.oxlintrc.json +0 -37
  15. package/.vscode/settings.json +0 -3
  16. package/CHANGELOG.md +0 -140
  17. package/CONTRIBUTING.md +0 -139
  18. package/dist/README.md +0 -307
  19. package/dist/beans-mcp-server.cjs.map +0 -1
  20. package/dist/index.cjs.map +0 -1
  21. package/dist/index.js.map +0 -1
  22. package/dist/package.json +0 -43
  23. package/pnpm-workspace.yaml +0 -2
  24. package/scripts/release.js +0 -433
  25. package/scripts/write-dist-package.js +0 -53
  26. package/src/cli.ts +0 -14
  27. package/src/index.ts +0 -21
  28. package/src/internal/graphql.ts +0 -33
  29. package/src/internal/queryHelpers.ts +0 -157
  30. package/src/server/BeansMcpServer.ts +0 -600
  31. package/src/server/backend.ts +0 -358
  32. package/src/test/BeansMcpServer.test.ts +0 -514
  33. package/src/test/handlers.unit.test.ts +0 -184
  34. package/src/test/parseCliArgs.test.ts +0 -69
  35. package/src/test/protocol.e2e.test.ts +0 -884
  36. package/src/test/queryHelpers.test.ts +0 -524
  37. package/src/test/startBeansMcpServer.test.ts +0 -146
  38. package/src/test/tools-integration.test.ts +0 -912
  39. package/src/test/utils.test.ts +0 -80
  40. package/src/types.ts +0 -46
  41. package/src/utils.ts +0 -20
  42. package/tsconfig.json +0 -24
  43. package/tsup.config.ts +0 -42
  44. package/vitest.config.ts +0 -18
@@ -1,69 +0,0 @@
1
- import { afterEach, describe, expect, it, vi } from 'vitest';
2
- import { parseCliArgs } from '../server/BeansMcpServer';
3
-
4
- describe('parseCliArgs', () => {
5
- it('should parse workspace root positional argument', () => {
6
- const result = parseCliArgs(['/workspace']);
7
- expect(result.workspaceRoot).toBe('/workspace');
8
- expect(result.cliPath).toBe('beans');
9
- expect(result.workspaceExplicit).toBe(true);
10
- });
11
-
12
- it('should parse --workspace-root flag', () => {
13
- const result = parseCliArgs(['--workspace-root', '/workspace']);
14
- expect(result.workspaceRoot).toBe('/workspace');
15
- expect(result.workspaceExplicit).toBe(true);
16
- });
17
-
18
- it('should mark workspaceExplicit false when no workspace arg given', () => {
19
- const result = parseCliArgs([]);
20
- expect(result.workspaceExplicit).toBe(false);
21
- });
22
-
23
- it('should parse --cli-path flag', () => {
24
- const result = parseCliArgs(['--cli-path', '/usr/local/bin/beans']);
25
- expect(result.cliPath).toBe('/usr/local/bin/beans');
26
- });
27
-
28
- it('should parse --port flag', () => {
29
- const result = parseCliArgs(['--port', '8080']);
30
- expect(result.port).toBe(8080);
31
- });
32
-
33
- it('should parse --log-dir flag', () => {
34
- const result = parseCliArgs(['--log-dir', '/tmp/logs']);
35
- expect(result.logDir).toBe('/tmp/logs');
36
- });
37
-
38
- it('should reject suspicious CLI paths', () => {
39
- expect(() => {
40
- parseCliArgs(['--cli-path', 'beans; rm -rf /']);
41
- }).toThrow('Invalid CLI path');
42
- });
43
-
44
- describe('--help / -h', () => {
45
- afterEach(() => {
46
- vi.restoreAllMocks();
47
- });
48
-
49
- it('--help writes help text to stdout and exits with 0', () => {
50
- const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
51
- const exitSpy = vi.spyOn(process, 'exit').mockImplementation((() => {}) as (code?: number) => never);
52
-
53
- parseCliArgs(['--help']);
54
-
55
- expect(writeSpy).toHaveBeenCalledWith(expect.stringContaining('Usage'));
56
- expect(exitSpy).toHaveBeenCalledWith(0);
57
- });
58
-
59
- it('-h writes help text to stdout and exits with 0', () => {
60
- const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
61
- const exitSpy = vi.spyOn(process, 'exit').mockImplementation((() => {}) as (code?: number) => never);
62
-
63
- parseCliArgs(['-h']);
64
-
65
- expect(writeSpy).toHaveBeenCalledWith(expect.stringContaining('Usage'));
66
- expect(exitSpy).toHaveBeenCalledWith(0);
67
- });
68
- });
69
- });