pybao-cli 1.5.36 → 1.5.38
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.
- package/dist/REPL-EOGX5USK.js +51 -0
- package/dist/{acp-QRIZ5IYO.js → acp-JTVVQGX6.js} +30 -30
- package/dist/{agentsValidate-P2QSA4XL.js → agentsValidate-T552HEU3.js} +7 -7
- package/dist/{ask-WIQYOQEG.js → ask-JT2UVHOU.js} +30 -30
- package/dist/{autoUpdater-MEUBMTCZ.js → autoUpdater-ZBN46KEI.js} +3 -3
- package/dist/{chunk-TLP5DVEM.js → chunk-2P4E3ZNA.js} +3 -3
- package/dist/{chunk-JJ5HRVLG.js → chunk-34KB4DEZ.js} +4 -4
- package/dist/{chunk-7KPPJFGR.js → chunk-3L5QLWHQ.js} +1 -1
- package/dist/{chunk-QA3HDYQZ.js → chunk-45CYYYU7.js} +2 -2
- package/dist/{chunk-44H5ROEF.js → chunk-5AM65D7G.js} +1 -1
- package/dist/{chunk-542JZAJQ.js → chunk-A33Z7A54.js} +5 -5
- package/dist/{chunk-542JZAJQ.js.map → chunk-A33Z7A54.js.map} +1 -1
- package/dist/chunk-BKCAVW2G.js.map +7 -0
- package/dist/{chunk-DDJPFVCD.js → chunk-DXS27TBK.js} +3 -3
- package/dist/{chunk-EN7KOPIA.js → chunk-FGAQGENO.js} +3 -3
- package/dist/chunk-FGAQGENO.js.map +7 -0
- package/dist/{chunk-XHLFDFPQ.js → chunk-GLNNII3K.js} +3 -3
- package/dist/{chunk-7HMF5J3F.js → chunk-HKDUNAZU.js} +1 -1
- package/dist/{chunk-3KHMRGJJ.js → chunk-HPHRVBGM.js} +3 -3
- package/dist/{chunk-MJT2BJLD.js → chunk-JQW3XPSA.js} +1 -1
- package/dist/{chunk-AI7TZGEO.js → chunk-JQXGDP2G.js} +2 -2
- package/dist/{chunk-YWK2UVTO.js → chunk-LGWP73N3.js} +1 -1
- package/dist/{chunk-D3FZBDVS.js → chunk-M3XZZUER.js} +2 -2
- package/dist/{chunk-7POF6LG4.js → chunk-MPW3OMAB.js} +4 -4
- package/dist/{chunk-DWHXB72J.js → chunk-MQ56NHZY.js} +3 -3
- package/dist/{chunk-EAPNJV2Z.js → chunk-ODHAKZLW.js} +3 -3
- package/dist/{chunk-SEJZHZ5F.js → chunk-OONY2XEJ.js} +3 -18
- package/dist/chunk-OONY2XEJ.js.map +7 -0
- package/dist/{chunk-45XR2OAY.js → chunk-OQ7GMNEA.js} +1 -1
- package/dist/{chunk-PRDPN4QZ.js → chunk-PPTR7ECF.js} +1 -1
- package/dist/{chunk-DDN6NKCL.js → chunk-QLLHQ4NC.js} +1 -1
- package/dist/{chunk-X5IT55SG.js → chunk-R357FMHE.js} +1 -1
- package/dist/{chunk-U7MKXQK6.js → chunk-REIICUCF.js} +6 -6
- package/dist/{chunk-U7MKXQK6.js.map → chunk-REIICUCF.js.map} +1 -1
- package/dist/{chunk-5ZNLZ4TP.js → chunk-RKTBVJGG.js} +2 -2
- package/dist/{chunk-MUBRIEFY.js → chunk-T4YXQTDG.js} +3 -3
- package/dist/{chunk-YZBVDQNG.js → chunk-TW7VYZCV.js} +3 -3
- package/dist/{chunk-OUREC4BI.js → chunk-TYK67RSX.js} +4 -4
- package/dist/{chunk-6QEIHAGS.js → chunk-USNKNXS4.js} +1 -1
- package/dist/{chunk-MV747DN6.js → chunk-X7II6NLY.js} +3 -3
- package/dist/{chunk-MV747DN6.js.map → chunk-X7II6NLY.js.map} +1 -1
- package/dist/{chunk-DGLIAB7C.js → chunk-XGFLQLPP.js} +436 -410
- package/dist/chunk-XGFLQLPP.js.map +7 -0
- package/dist/{cli-NLMPMQ2E.js → cli-GW2RLZKS.js} +91 -91
- package/dist/commands-OMEB6ZPR.js +55 -0
- package/dist/{config-D5UJFGPG.js → config-7YD4R22V.js} +4 -4
- package/dist/{context-5K45JNRQ.js → context-4EG6BLW4.js} +6 -6
- package/dist/{conversationPersistence-ZQQCB6BK.js → conversationPersistence-XSJ7MFZQ.js} +3 -3
- package/dist/{conversationTracker-PUTHQLXK.js → conversationTracker-VXYBDUQD.js} +4 -4
- package/dist/{customCommands-46VIFQ34.js → customCommands-CEGHI3EI.js} +4 -4
- package/dist/{env-6IPMBPS4.js → env-SFBXDZAW.js} +2 -2
- package/dist/{file-MSKCELHV.js → file-TKPF7WPK.js} +4 -4
- package/dist/index.js +3 -3
- package/dist/{llm-FH3V2XTE.js → llm-UPZIAGPI.js} +32 -32
- package/dist/{llmLazy-URJDLFSZ.js → llmLazy-AH4Z4W4G.js} +1 -1
- package/dist/{loader-A62HAK4O.js → loader-KR2G4MZH.js} +4 -4
- package/dist/{lsp-HMODWV7I.js → lsp-4BXZN54S.js} +6 -6
- package/dist/{lspAnchor-ZC7I7COT.js → lspAnchor-J7X23CTJ.js} +6 -6
- package/dist/{mcp-7LRQSBP6.js → mcp-PQ7E5V6N.js} +7 -7
- package/dist/{mentionProcessor-ZMRROWKA.js → mentionProcessor-OBZEHVOK.js} +5 -5
- package/dist/{messages-LXUVZTLH.js → messages-Y45VMQJM.js} +1 -1
- package/dist/{model-QV7OOHHG.js → model-PLE3KNNX.js} +5 -5
- package/dist/{openai-YUTDZOKP.js → openai-2R2NDBUU.js} +5 -5
- package/dist/{outputStyles-TBOL576J.js → outputStyles-XXPDKDY2.js} +4 -4
- package/dist/{pluginRuntime-IB7YAUZR.js → pluginRuntime-SROFDMKU.js} +6 -6
- package/dist/{pluginValidation-5JVF2CA3.js → pluginValidation-WRO2DZTR.js} +6 -6
- package/dist/prompts-5Q6CSNXC.js +57 -0
- package/dist/{pybAgentSessionLoad-YOZUCXGF.js → pybAgentSessionLoad-FQQRBPKP.js} +4 -4
- package/dist/{pybAgentSessionResume-KBCPZ5M7.js → pybAgentSessionResume-P3UHSOY6.js} +4 -4
- package/dist/{pybAgentStreamJsonSession-A7CQ6PEZ.js → pybAgentStreamJsonSession-SIHHDMP6.js} +1 -1
- package/dist/{pybHooks-ZXVD4ACH.js → pybHooks-J6EDF4HT.js} +4 -4
- package/dist/query-CADGN75M.js +55 -0
- package/dist/{registry-WYGTZAW4.js → registry-FWP3Q2GA.js} +5 -5
- package/dist/{ripgrep-V2OK4EJP.js → ripgrep-MRW3JRSV.js} +3 -3
- package/dist/{skillMarketplace-D3MIES5B.js → skillMarketplace-I6WS3AB4.js} +3 -3
- package/dist/{state-L4B23VCD.js → state-FFCKZLBN.js} +2 -2
- package/dist/{theme-DH6QMGKW.js → theme-ALYM3CFD.js} +5 -5
- package/dist/{toolPermissionSettings-QPTI6L6H.js → toolPermissionSettings-6TUFSTN3.js} +6 -6
- package/dist/tools-IEYQ4SAS.js +55 -0
- package/dist/{userInput-7XK4U2ZK.js → userInput-4MUAKMGX.js} +32 -32
- package/package.json +3 -18
- package/resources/output-styles/accessibility-champion.md +66 -0
- package/resources/output-styles/api-designer.md +88 -0
- package/resources/output-styles/concise-engineer.md +32 -0
- package/resources/output-styles/critical-code-reviewer.md +36 -0
- package/resources/output-styles/data-engineer.md +104 -0
- package/resources/output-styles/defensive-programmer.md +81 -0
- package/resources/output-styles/devil-advocate.md +43 -0
- package/resources/output-styles/devops-automator.md +118 -0
- package/resources/output-styles/distributed-systems-architect.md +77 -0
- package/resources/output-styles/documentation-writer.md +47 -0
- package/resources/output-styles/evan-king-system-design-reviewer.md +45 -0
- package/resources/output-styles/functional-purist.md +84 -0
- package/resources/output-styles/performance-optimizer.md +49 -0
- package/resources/output-styles/refactoring-expert.md +118 -0
- package/resources/output-styles/security-auditor.md +49 -0
- package/resources/output-styles/startup-pragmatist.md +58 -0
- package/resources/output-styles/test-driven-developer.md +48 -0
- package/dist/REPL-BECQEFPJ.js +0 -51
- package/dist/chunk-2DKSGO53.js.map +0 -7
- package/dist/chunk-DGLIAB7C.js.map +0 -7
- package/dist/chunk-EN7KOPIA.js.map +0 -7
- package/dist/chunk-SEJZHZ5F.js.map +0 -7
- package/dist/commands-QMNEULJC.js +0 -55
- package/dist/prompts-6JCRUF2G.js +0 -57
- package/dist/query-LAHU5G7G.js +0 -55
- package/dist/tools-SG2ZUUUH.js +0 -55
- /package/dist/{REPL-BECQEFPJ.js.map → REPL-EOGX5USK.js.map} +0 -0
- /package/dist/{acp-QRIZ5IYO.js.map → acp-JTVVQGX6.js.map} +0 -0
- /package/dist/{agentsValidate-P2QSA4XL.js.map → agentsValidate-T552HEU3.js.map} +0 -0
- /package/dist/{ask-WIQYOQEG.js.map → ask-JT2UVHOU.js.map} +0 -0
- /package/dist/{autoUpdater-MEUBMTCZ.js.map → autoUpdater-ZBN46KEI.js.map} +0 -0
- /package/dist/{chunk-TLP5DVEM.js.map → chunk-2P4E3ZNA.js.map} +0 -0
- /package/dist/{chunk-JJ5HRVLG.js.map → chunk-34KB4DEZ.js.map} +0 -0
- /package/dist/{chunk-7KPPJFGR.js.map → chunk-3L5QLWHQ.js.map} +0 -0
- /package/dist/{chunk-QA3HDYQZ.js.map → chunk-45CYYYU7.js.map} +0 -0
- /package/dist/{chunk-44H5ROEF.js.map → chunk-5AM65D7G.js.map} +0 -0
- /package/dist/{chunk-2DKSGO53.js → chunk-BKCAVW2G.js} +0 -0
- /package/dist/{chunk-DDJPFVCD.js.map → chunk-DXS27TBK.js.map} +0 -0
- /package/dist/{chunk-XHLFDFPQ.js.map → chunk-GLNNII3K.js.map} +0 -0
- /package/dist/{chunk-7HMF5J3F.js.map → chunk-HKDUNAZU.js.map} +0 -0
- /package/dist/{chunk-3KHMRGJJ.js.map → chunk-HPHRVBGM.js.map} +0 -0
- /package/dist/{chunk-MJT2BJLD.js.map → chunk-JQW3XPSA.js.map} +0 -0
- /package/dist/{chunk-AI7TZGEO.js.map → chunk-JQXGDP2G.js.map} +0 -0
- /package/dist/{chunk-YWK2UVTO.js.map → chunk-LGWP73N3.js.map} +0 -0
- /package/dist/{chunk-D3FZBDVS.js.map → chunk-M3XZZUER.js.map} +0 -0
- /package/dist/{chunk-7POF6LG4.js.map → chunk-MPW3OMAB.js.map} +0 -0
- /package/dist/{chunk-DWHXB72J.js.map → chunk-MQ56NHZY.js.map} +0 -0
- /package/dist/{chunk-EAPNJV2Z.js.map → chunk-ODHAKZLW.js.map} +0 -0
- /package/dist/{chunk-45XR2OAY.js.map → chunk-OQ7GMNEA.js.map} +0 -0
- /package/dist/{chunk-PRDPN4QZ.js.map → chunk-PPTR7ECF.js.map} +0 -0
- /package/dist/{chunk-DDN6NKCL.js.map → chunk-QLLHQ4NC.js.map} +0 -0
- /package/dist/{chunk-X5IT55SG.js.map → chunk-R357FMHE.js.map} +0 -0
- /package/dist/{chunk-5ZNLZ4TP.js.map → chunk-RKTBVJGG.js.map} +0 -0
- /package/dist/{chunk-MUBRIEFY.js.map → chunk-T4YXQTDG.js.map} +0 -0
- /package/dist/{chunk-YZBVDQNG.js.map → chunk-TW7VYZCV.js.map} +0 -0
- /package/dist/{chunk-OUREC4BI.js.map → chunk-TYK67RSX.js.map} +0 -0
- /package/dist/{chunk-6QEIHAGS.js.map → chunk-USNKNXS4.js.map} +0 -0
- /package/dist/{cli-NLMPMQ2E.js.map → cli-GW2RLZKS.js.map} +0 -0
- /package/dist/{commands-QMNEULJC.js.map → commands-OMEB6ZPR.js.map} +0 -0
- /package/dist/{config-D5UJFGPG.js.map → config-7YD4R22V.js.map} +0 -0
- /package/dist/{context-5K45JNRQ.js.map → context-4EG6BLW4.js.map} +0 -0
- /package/dist/{conversationPersistence-ZQQCB6BK.js.map → conversationPersistence-XSJ7MFZQ.js.map} +0 -0
- /package/dist/{conversationTracker-PUTHQLXK.js.map → conversationTracker-VXYBDUQD.js.map} +0 -0
- /package/dist/{customCommands-46VIFQ34.js.map → customCommands-CEGHI3EI.js.map} +0 -0
- /package/dist/{env-6IPMBPS4.js.map → env-SFBXDZAW.js.map} +0 -0
- /package/dist/{file-MSKCELHV.js.map → file-TKPF7WPK.js.map} +0 -0
- /package/dist/{llm-FH3V2XTE.js.map → llm-UPZIAGPI.js.map} +0 -0
- /package/dist/{llmLazy-URJDLFSZ.js.map → llmLazy-AH4Z4W4G.js.map} +0 -0
- /package/dist/{loader-A62HAK4O.js.map → loader-KR2G4MZH.js.map} +0 -0
- /package/dist/{lsp-HMODWV7I.js.map → lsp-4BXZN54S.js.map} +0 -0
- /package/dist/{lspAnchor-ZC7I7COT.js.map → lspAnchor-J7X23CTJ.js.map} +0 -0
- /package/dist/{mcp-7LRQSBP6.js.map → mcp-PQ7E5V6N.js.map} +0 -0
- /package/dist/{mentionProcessor-ZMRROWKA.js.map → mentionProcessor-OBZEHVOK.js.map} +0 -0
- /package/dist/{messages-LXUVZTLH.js.map → messages-Y45VMQJM.js.map} +0 -0
- /package/dist/{model-QV7OOHHG.js.map → model-PLE3KNNX.js.map} +0 -0
- /package/dist/{openai-YUTDZOKP.js.map → openai-2R2NDBUU.js.map} +0 -0
- /package/dist/{outputStyles-TBOL576J.js.map → outputStyles-XXPDKDY2.js.map} +0 -0
- /package/dist/{pluginRuntime-IB7YAUZR.js.map → pluginRuntime-SROFDMKU.js.map} +0 -0
- /package/dist/{pluginValidation-5JVF2CA3.js.map → pluginValidation-WRO2DZTR.js.map} +0 -0
- /package/dist/{prompts-6JCRUF2G.js.map → prompts-5Q6CSNXC.js.map} +0 -0
- /package/dist/{pybAgentSessionLoad-YOZUCXGF.js.map → pybAgentSessionLoad-FQQRBPKP.js.map} +0 -0
- /package/dist/{pybAgentSessionResume-KBCPZ5M7.js.map → pybAgentSessionResume-P3UHSOY6.js.map} +0 -0
- /package/dist/{pybAgentStreamJsonSession-A7CQ6PEZ.js.map → pybAgentStreamJsonSession-SIHHDMP6.js.map} +0 -0
- /package/dist/{pybHooks-ZXVD4ACH.js.map → pybHooks-J6EDF4HT.js.map} +0 -0
- /package/dist/{query-LAHU5G7G.js.map → query-CADGN75M.js.map} +0 -0
- /package/dist/{registry-WYGTZAW4.js.map → registry-FWP3Q2GA.js.map} +0 -0
- /package/dist/{ripgrep-V2OK4EJP.js.map → ripgrep-MRW3JRSV.js.map} +0 -0
- /package/dist/{skillMarketplace-D3MIES5B.js.map → skillMarketplace-I6WS3AB4.js.map} +0 -0
- /package/dist/{state-L4B23VCD.js.map → state-FFCKZLBN.js.map} +0 -0
- /package/dist/{theme-DH6QMGKW.js.map → theme-ALYM3CFD.js.map} +0 -0
- /package/dist/{toolPermissionSettings-QPTI6L6H.js.map → toolPermissionSettings-6TUFSTN3.js.map} +0 -0
- /package/dist/{tools-SG2ZUUUH.js.map → tools-IEYQ4SAS.js.map} +0 -0
- /package/dist/{userInput-7XK4U2ZK.js.map → userInput-4MUAKMGX.js.map} +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-auditor
|
|
3
|
+
description: Paranoid security expert who finds vulnerabilities and enforces defensive coding practices
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are a security-focused engineer who assumes everything is a potential vulnerability until proven otherwise.
|
|
7
|
+
|
|
8
|
+
## Security Mindset
|
|
9
|
+
- **Trust nothing**: All input is malicious until validated
|
|
10
|
+
- **Defense in depth**: Multiple layers of security
|
|
11
|
+
- **Principle of least privilege**: Minimal permissions always
|
|
12
|
+
- **Assume breach**: Plan for when (not if) security fails
|
|
13
|
+
|
|
14
|
+
## Key Focus Areas
|
|
15
|
+
- Input validation and sanitization
|
|
16
|
+
- Authentication and authorization flaws
|
|
17
|
+
- SQL injection and XSS vulnerabilities
|
|
18
|
+
- Sensitive data exposure
|
|
19
|
+
- Cryptographic weaknesses
|
|
20
|
+
- OWASP Top 10 risks
|
|
21
|
+
- Supply chain vulnerabilities
|
|
22
|
+
- Rate limiting and DoS protection
|
|
23
|
+
|
|
24
|
+
## Code Review Priorities
|
|
25
|
+
- Identify unsafe operations and functions
|
|
26
|
+
- Check for proper error handling that doesn't leak info
|
|
27
|
+
- Verify all user input is validated
|
|
28
|
+
- Ensure secrets are never hardcoded or logged
|
|
29
|
+
- Review dependency vulnerabilities
|
|
30
|
+
- Check for timing attacks and race conditions
|
|
31
|
+
- Validate CORS and CSP policies
|
|
32
|
+
|
|
33
|
+
## Communication Style
|
|
34
|
+
- "This is vulnerable to..."
|
|
35
|
+
- "An attacker could..."
|
|
36
|
+
- "Never trust..."
|
|
37
|
+
- "Always validate..."
|
|
38
|
+
- "Consider the security implications of..."
|
|
39
|
+
|
|
40
|
+
## Security Best Practices
|
|
41
|
+
- Use parameterized queries always
|
|
42
|
+
- Implement proper session management
|
|
43
|
+
- Hash passwords with bcrypt/scrypt/argon2
|
|
44
|
+
- Use HTTPS everywhere
|
|
45
|
+
- Implement security headers
|
|
46
|
+
- Regular dependency updates
|
|
47
|
+
- Audit logging for security events
|
|
48
|
+
|
|
49
|
+
Remember: Security is not a feature, it's a requirement. Every line of code is a potential attack vector.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: startup-pragmatist
|
|
3
|
+
description: Ship fast, iterate faster - focused on rapid delivery while managing technical debt strategically
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are a startup engineer who balances speed of delivery with sustainable engineering practices, knowing when to cut corners and when not to.
|
|
7
|
+
|
|
8
|
+
## Core Mindset
|
|
9
|
+
- **Ship to learn**: Real user feedback beats perfect code
|
|
10
|
+
- **Strategic technical debt**: Know what debt to take and when to pay it back
|
|
11
|
+
- **MVP thinking**: What's the smallest thing that could work?
|
|
12
|
+
- **Iterate relentlessly**: Version 2 is where the magic happens
|
|
13
|
+
|
|
14
|
+
## Evaluation Criteria
|
|
15
|
+
- Time to market impact
|
|
16
|
+
- Customer value delivered
|
|
17
|
+
- Technical debt trade-offs
|
|
18
|
+
- Scalability breakpoints (will this work for 10x users?)
|
|
19
|
+
- Build vs buy decisions
|
|
20
|
+
- Resource constraints (team size, runway)
|
|
21
|
+
- Market timing considerations
|
|
22
|
+
|
|
23
|
+
## Pragmatic Choices
|
|
24
|
+
- Monolith first, microservices later
|
|
25
|
+
- Boring technology that works
|
|
26
|
+
- Third-party services for non-core features
|
|
27
|
+
- Quick prototypes to validate assumptions
|
|
28
|
+
- Feature flags over complex branching
|
|
29
|
+
- Manual processes before automation
|
|
30
|
+
- Good enough error handling
|
|
31
|
+
|
|
32
|
+
## Red Flags to Catch
|
|
33
|
+
- Over-engineering for scale you don't have
|
|
34
|
+
- Premature optimization
|
|
35
|
+
- Building custom solutions for solved problems
|
|
36
|
+
- Perfect being the enemy of shipped
|
|
37
|
+
- Ignoring critical security or data issues
|
|
38
|
+
- Taking on debt you can't pay back
|
|
39
|
+
- Not instrumenting for learning
|
|
40
|
+
|
|
41
|
+
## Communication Style
|
|
42
|
+
- "Can we ship this in 2 days instead of 2 weeks?"
|
|
43
|
+
- "What's the 80/20 solution here?"
|
|
44
|
+
- "Let's validate this assumption first"
|
|
45
|
+
- "We'll need to revisit this at 1000 users"
|
|
46
|
+
- "This technical debt is acceptable because..."
|
|
47
|
+
- "What can we cut from v1?"
|
|
48
|
+
- "How does this help us find product-market fit?"
|
|
49
|
+
|
|
50
|
+
## Pragmatic Principles
|
|
51
|
+
- Done is better than perfect
|
|
52
|
+
- Optimize for learning speed
|
|
53
|
+
- Your first architecture won't be your last
|
|
54
|
+
- Most code gets thrown away
|
|
55
|
+
- Speed is a feature
|
|
56
|
+
- The best code is code you didn't write
|
|
57
|
+
|
|
58
|
+
Remember: Facebook's motto was "Move fast and break things" until they had something worth not breaking. Know what stage you're at.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-driven-developer
|
|
3
|
+
description: TDD advocate who writes tests first and ensures comprehensive test coverage
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are a test-driven development practitioner who believes that good tests are the foundation of reliable software.
|
|
7
|
+
|
|
8
|
+
## TDD Philosophy
|
|
9
|
+
- **Red-Green-Refactor**: Write failing tests, make them pass, then improve
|
|
10
|
+
- **Tests as documentation**: Tests should clearly show how code is meant to be used
|
|
11
|
+
- **Coverage matters**: Aim for high test coverage, including edge cases
|
|
12
|
+
- **Fast feedback**: Tests should run quickly and provide clear results
|
|
13
|
+
|
|
14
|
+
## Testing Approach
|
|
15
|
+
- Write tests before implementation
|
|
16
|
+
- Start with the simplest test case
|
|
17
|
+
- Test one thing at a time
|
|
18
|
+
- Use descriptive test names that explain what and why
|
|
19
|
+
- Include both happy path and error scenarios
|
|
20
|
+
|
|
21
|
+
## Test Structure
|
|
22
|
+
- Arrange: Set up test data and conditions
|
|
23
|
+
- Act: Execute the code being tested
|
|
24
|
+
- Assert: Verify the expected outcome
|
|
25
|
+
- Cleanup: Reset state if needed
|
|
26
|
+
|
|
27
|
+
## Types of Tests to Write
|
|
28
|
+
- Unit tests for individual functions
|
|
29
|
+
- Integration tests for component interactions
|
|
30
|
+
- Edge case tests for boundary conditions
|
|
31
|
+
- Error handling tests
|
|
32
|
+
- Performance tests when relevant
|
|
33
|
+
|
|
34
|
+
## Code Quality Standards
|
|
35
|
+
- Keep tests simple and readable
|
|
36
|
+
- Avoid test interdependencies
|
|
37
|
+
- Use appropriate assertions
|
|
38
|
+
- Mock external dependencies
|
|
39
|
+
- Maintain test code like production code
|
|
40
|
+
|
|
41
|
+
## Red Flags to Catch
|
|
42
|
+
- Untested code paths
|
|
43
|
+
- Complex setup indicating design issues
|
|
44
|
+
- Flaky or slow tests
|
|
45
|
+
- Missing error scenarios
|
|
46
|
+
- Insufficient edge case coverage
|
|
47
|
+
|
|
48
|
+
Remember: Untested code is broken code. If it's not tested, it doesn't work.
|
package/dist/REPL-BECQEFPJ.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { createRequire as __pybCreateRequire } from "node:module";
|
|
2
|
-
const require = __pybCreateRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
REPL
|
|
5
|
-
} from "./chunk-DGLIAB7C.js";
|
|
6
|
-
import "./chunk-7HMF5J3F.js";
|
|
7
|
-
import "./chunk-DWHXB72J.js";
|
|
8
|
-
import "./chunk-7KPPJFGR.js";
|
|
9
|
-
import "./chunk-5P7HBXTD.js";
|
|
10
|
-
import "./chunk-YZBVDQNG.js";
|
|
11
|
-
import "./chunk-PRDPN4QZ.js";
|
|
12
|
-
import "./chunk-44H5ROEF.js";
|
|
13
|
-
import "./chunk-F4AXICO7.js";
|
|
14
|
-
import "./chunk-3KHMRGJJ.js";
|
|
15
|
-
import "./chunk-EN7KOPIA.js";
|
|
16
|
-
import "./chunk-AI7TZGEO.js";
|
|
17
|
-
import "./chunk-XKYHFZEC.js";
|
|
18
|
-
import "./chunk-JJ5HRVLG.js";
|
|
19
|
-
import "./chunk-OUREC4BI.js";
|
|
20
|
-
import "./chunk-DDN6NKCL.js";
|
|
21
|
-
import "./chunk-DDJPFVCD.js";
|
|
22
|
-
import "./chunk-UNNVICVU.js";
|
|
23
|
-
import "./chunk-D3FZBDVS.js";
|
|
24
|
-
import "./chunk-U7MKXQK6.js";
|
|
25
|
-
import "./chunk-A3BVXXA3.js";
|
|
26
|
-
import "./chunk-45XR2OAY.js";
|
|
27
|
-
import "./chunk-3DFBSQIT.js";
|
|
28
|
-
import "./chunk-B6IMQJZM.js";
|
|
29
|
-
import "./chunk-OUXHGDLH.js";
|
|
30
|
-
import "./chunk-QA3HDYQZ.js";
|
|
31
|
-
import "./chunk-QWIBSCDN.js";
|
|
32
|
-
import "./chunk-7POF6LG4.js";
|
|
33
|
-
import "./chunk-MUBRIEFY.js";
|
|
34
|
-
import "./chunk-MJT2BJLD.js";
|
|
35
|
-
import "./chunk-UZ34JEUK.js";
|
|
36
|
-
import "./chunk-5ZNLZ4TP.js";
|
|
37
|
-
import "./chunk-BJSWTHRM.js";
|
|
38
|
-
import "./chunk-XHLFDFPQ.js";
|
|
39
|
-
import "./chunk-542JZAJQ.js";
|
|
40
|
-
import "./chunk-KFEHHKZ2.js";
|
|
41
|
-
import "./chunk-YWK2UVTO.js";
|
|
42
|
-
import "./chunk-X5IT55SG.js";
|
|
43
|
-
import "./chunk-TLP5DVEM.js";
|
|
44
|
-
import "./chunk-RQVLBMP7.js";
|
|
45
|
-
import "./chunk-6QEIHAGS.js";
|
|
46
|
-
import "./chunk-MV747DN6.js";
|
|
47
|
-
import "./chunk-SEJZHZ5F.js";
|
|
48
|
-
import "./chunk-I3J4JYES.js";
|
|
49
|
-
export {
|
|
50
|
-
REPL
|
|
51
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/core/tools/tool.ts"],
|
|
4
|
-
"sourcesContent": ["import { z } from 'zod'\nimport type * as React from 'react'\nimport type { PermissionMode } from '@pyb-types/permissionMode'\nimport type { ToolPermissionContext } from '@pyb-types/toolPermissionContext'\n\nexport type SetToolJSXFn = (\n jsx: {\n jsx: React.ReactNode | null\n shouldHidePromptInput: boolean\n } | null,\n) => void\n\nexport interface ToolUseContext {\n messageId: string | undefined\n toolUseId?: string\n sessionId?: string\n parentSessionId?: string\n childSessionId?: string\n agentId?: string\n agentType?: string\n safeMode?: boolean\n abortController: AbortController\n readFileTimestamps: { [filePath: string]: number }\n options?: {\n commands?: any[]\n tools?: any[]\n verbose?: boolean\n slowAndCapableModel?: string\n safeMode?: boolean\n permissionMode?: PermissionMode\n toolPermissionContext?: ToolPermissionContext\n lastUserPrompt?: string\n forkNumber?: number\n messageLogName?: string\n maxThinkingTokens?: any\n model?: string\n commandAllowedTools?: string[]\n isPybRequest?: boolean\n pybContext?: string\n isCustomCommand?: boolean\n contentInputPath?: 'blocks' | 'string_adapted'\n mcpClients?: any[]\n disableSlashCommands?: boolean\n persistSession?: boolean\n shouldAvoidPermissionPrompts?: boolean\n }\n responseState?: {\n previousResponseId?: string\n conversationId?: string\n responseChainDepth?: number\n }\n}\n\nexport interface ExtendedToolUseContext extends ToolUseContext {\n setToolJSX: SetToolJSXFn\n}\n\nexport interface ValidationResult {\n result: boolean\n message?: string\n errorCode?: number\n meta?: any\n}\n\nexport interface Tool<\n TInput extends z.ZodTypeAny = z.ZodTypeAny,\n TOutput = any,\n> {\n name: string\n category?:\n | 'filesystem'\n | 'network'\n | 'system'\n | 'agent'\n | 'interaction'\n dangerousLevel?: 'safe' | 'moderate' | 'dangerous'\n requiresConfirmation?: boolean\n description?: string | ((input?: z.infer<TInput>) => Promise<string>)\n inputSchema: TInput\n inputJSONSchema?: Record<string, unknown>\n prompt: (options?: { safeMode?: boolean }) => Promise<string>\n userFacingName?: (input?: z.infer<TInput>) => string\n cachedDescription?: string\n isEnabled: () => Promise<boolean>\n isReadOnly: (input?: z.infer<TInput>) => boolean\n isConcurrencySafe: (input?: z.infer<TInput>) => boolean\n needsPermissions: (input?: z.infer<TInput>) => boolean\n requiresUserInteraction?: (input?: z.infer<TInput>) => boolean\n validateInput?: (\n input: z.infer<TInput>,\n context?: ToolUseContext,\n ) => Promise<ValidationResult>\n renderResultForAssistant: (output: TOutput) => string | any[]\n renderToolUseMessage: (\n input: z.infer<TInput>,\n options: { verbose: boolean },\n ) => string | React.ReactElement | null\n renderToolUseRejectedMessage?: (...args: any[]) => React.ReactElement\n renderToolResultMessage?: (\n output: TOutput,\n options: { verbose: boolean },\n ) => React.ReactNode\n call: (\n input: z.infer<TInput>,\n context: ToolUseContext,\n ) => AsyncGenerator<\n | {\n type: 'result'\n data: TOutput\n resultForAssistant?: string | any[]\n newMessages?: unknown[]\n contextModifier?: {\n modifyContext: (ctx: ToolUseContext) => ToolUseContext\n }\n }\n | {\n type: 'progress'\n content: any\n normalizedMessages?: any[]\n tools?: any[]\n },\n void,\n unknown\n >\n}\n\nexport function getToolDescription(tool: Tool): string {\n if (tool.cachedDescription) {\n return tool.cachedDescription\n }\n\n if (typeof tool.description === 'string') {\n return tool.description\n }\n\n return `Tool: ${tool.name}`\n}\n"],
|
|
5
|
-
"mappings": ";;;;AA8HO,SAAS,mBAAmB,MAAoB;AACrD,MAAI,KAAK,mBAAmB;AAC1B,WAAO,KAAK;AAAA,EACd;AAEA,MAAI,OAAO,KAAK,gBAAgB,UAAU;AACxC,WAAO,KAAK;AAAA,EACd;AAEA,SAAO,SAAS,KAAK,IAAI;AAC3B;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|