aemeathcli 1.0.9 → 1.0.11
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/LICENSE +21 -0
- package/README.md +609 -608
- package/dist/App-YAHJUWCX.js +4274 -0
- package/dist/App-YAHJUWCX.js.map +1 -0
- package/dist/agent-store/architect.md +32 -0
- package/dist/agent-store/debugger.md +32 -0
- package/dist/agent-store/developer.md +29 -0
- package/dist/agent-store/documenter.md +30 -0
- package/dist/agent-store/researcher.md +31 -0
- package/dist/agent-store/reviewer.md +28 -0
- package/dist/agent-store/supervisor.md +37 -0
- package/dist/agent-store/tester.md +30 -0
- package/dist/api-key-fallback-UN3TJEOO.js +11 -0
- package/dist/{api-key-fallback-YQQBOQIL.js.map → api-key-fallback-UN3TJEOO.js.map} +1 -1
- package/dist/auth-status-EIM5A5KL.js +13 -0
- package/dist/auth-status-EIM5A5KL.js.map +1 -0
- package/dist/{chunk-UY2SYSEZ.js → chunk-25UNNEHN.js} +32 -103
- package/dist/chunk-25UNNEHN.js.map +1 -0
- package/dist/{chunk-CYQNBB25.js → chunk-2GKOK6T7.js} +28 -5
- package/dist/chunk-2GKOK6T7.js.map +1 -0
- package/dist/{chunk-MFBHNWGV.js → chunk-2LF7ALGR.js} +12 -20
- package/dist/chunk-2LF7ALGR.js.map +1 -0
- package/dist/{chunk-H66O5Z2V.js → chunk-2NWNIKBK.js} +42 -7
- package/dist/chunk-2NWNIKBK.js.map +1 -0
- package/dist/chunk-3TSPZRGM.js +26 -0
- package/dist/chunk-3TSPZRGM.js.map +1 -0
- package/dist/{chunk-ZGOHARPV.js → chunk-473JN6M5.js} +2 -2
- package/dist/chunk-473JN6M5.js.map +1 -0
- package/dist/{chunk-IYW62KKR.js → chunk-5XFSV6PF.js} +66 -23
- package/dist/chunk-5XFSV6PF.js.map +1 -0
- package/dist/{chunk-HCIHOHLX.js → chunk-62HSGYQD.js} +2 -2
- package/dist/chunk-62HSGYQD.js.map +1 -0
- package/dist/{chunk-I5PZ4JTS.js → chunk-6GUD7QIM.js} +4 -4
- package/dist/chunk-6GUD7QIM.js.map +1 -0
- package/dist/{chunk-4IJD72YB.js → chunk-AQ23TYSQ.js} +7 -7
- package/dist/chunk-AQ23TYSQ.js.map +1 -0
- package/dist/{chunk-NBR3GHMT.js → chunk-BY4DAKUU.js} +39 -7
- package/dist/chunk-BY4DAKUU.js.map +1 -0
- package/dist/chunk-CC7MGWYY.js +12 -0
- package/dist/chunk-CC7MGWYY.js.map +1 -0
- package/dist/chunk-CTFZTARK.js +155 -0
- package/dist/chunk-CTFZTARK.js.map +1 -0
- package/dist/chunk-FIC7AK4Q.js +232 -0
- package/dist/chunk-FIC7AK4Q.js.map +1 -0
- package/dist/chunk-GU33WKPG.js +140 -0
- package/dist/chunk-GU33WKPG.js.map +1 -0
- package/dist/{chunk-VUG4IZ7J.js → chunk-H2SYKIMI.js} +10 -10
- package/dist/chunk-H2SYKIMI.js.map +1 -0
- package/dist/{chunk-JAXXTYID.js → chunk-HEKFAKVH.js} +2 -2
- package/dist/chunk-HEKFAKVH.js.map +1 -0
- package/dist/chunk-IARA5XYP.js +186 -0
- package/dist/chunk-IARA5XYP.js.map +1 -0
- package/dist/{chunk-HMJRPNPZ.js → chunk-LCYH4T6N.js} +95 -23
- package/dist/chunk-LCYH4T6N.js.map +1 -0
- package/dist/{chunk-CARHU3DO.js → chunk-LDVY5ELP.js} +66 -18
- package/dist/chunk-LDVY5ELP.js.map +1 -0
- package/dist/chunk-OCJPQFOR.js +88 -0
- package/dist/chunk-OCJPQFOR.js.map +1 -0
- package/dist/chunk-ODBY7S4X.js +141 -0
- package/dist/chunk-ODBY7S4X.js.map +1 -0
- package/dist/{chunk-DAHGLHNR.js → chunk-ONQ4WCUI.js} +7 -142
- package/dist/chunk-ONQ4WCUI.js.map +1 -0
- package/dist/{chunk-WPP3PEDE.js → chunk-P5TKZM3T.js} +32 -107
- package/dist/chunk-P5TKZM3T.js.map +1 -0
- package/dist/{chunk-ASGRGXYK.js → chunk-P66WDACW.js} +23 -22
- package/dist/chunk-P66WDACW.js.map +1 -0
- package/dist/{chunk-LSOYPSAT.js → chunk-QCRK4QEL.js} +4 -4
- package/dist/chunk-QCRK4QEL.js.map +1 -0
- package/dist/{chunk-YL5XFHR3.js → chunk-ROJPFPJ7.js} +2 -2
- package/dist/chunk-ROJPFPJ7.js.map +1 -0
- package/dist/chunk-RP2TAL3J.js +71 -0
- package/dist/chunk-RP2TAL3J.js.map +1 -0
- package/dist/{chunk-6PDJ45T4.js → chunk-RYOB3TLZ.js} +51 -26
- package/dist/chunk-RYOB3TLZ.js.map +1 -0
- package/dist/{chunk-Y5XVD2CD.js → chunk-SOQFMNQC.js} +110 -83
- package/dist/chunk-SOQFMNQC.js.map +1 -0
- package/dist/{chunk-TEVZS4FA.js → chunk-TDFTX32B.js} +16 -9
- package/dist/chunk-TDFTX32B.js.map +1 -0
- package/dist/chunk-VBLLDY4R.js +38 -0
- package/dist/chunk-VBLLDY4R.js.map +1 -0
- package/dist/{chunk-CGEV3ARR.js → chunk-VJNQJALF.js} +4 -4
- package/dist/chunk-VJNQJALF.js.map +1 -0
- package/dist/chunk-WAYSJMPS.js +26 -0
- package/dist/chunk-WAYSJMPS.js.map +1 -0
- package/dist/chunk-WC72BRHR.js +241 -0
- package/dist/chunk-WC72BRHR.js.map +1 -0
- package/dist/{chunk-MXZSI3AY.js → chunk-YPFOE2QJ.js} +43 -11
- package/dist/chunk-YPFOE2QJ.js.map +1 -0
- package/dist/claude-adapter-6P4SJH7P.js +7 -0
- package/dist/{claude-adapter-QMLFMSP3.js.map → claude-adapter-6P4SJH7P.js.map} +1 -1
- package/dist/{claude-login-5WELXPKT.js → claude-login-IS5WTBMP.js} +10 -10
- package/dist/claude-login-IS5WTBMP.js.map +1 -0
- package/dist/cli.js +371 -172
- package/dist/cli.js.map +1 -1
- package/dist/{codex-login-DDJBCT43.js → codex-login-GMPF64MR.js} +18 -17
- package/dist/codex-login-GMPF64MR.js.map +1 -0
- package/dist/config-store-POB6I37G.js +7 -0
- package/dist/{config-store-W6FBCQAQ.js.map → config-store-POB6I37G.js.map} +1 -1
- package/dist/conversation-store-PRBHWQMJ.js +4 -0
- package/dist/conversation-store-PRBHWQMJ.js.map +1 -0
- package/dist/detect-providers-C4SVQHFF.js +4 -0
- package/dist/detect-providers-C4SVQHFF.js.map +1 -0
- package/dist/executor-RUX7VK3T.js +4 -0
- package/dist/{executor-6RIKIGXK.js.map → executor-RUX7VK3T.js.map} +1 -1
- package/dist/first-run-GDEVRFPO.js +230 -0
- package/dist/first-run-GDEVRFPO.js.map +1 -0
- package/dist/gemini-adapter-MV3U4QFH.js +7 -0
- package/dist/{gemini-adapter-6JIHZ7WI.js.map → gemini-adapter-MV3U4QFH.js.map} +1 -1
- package/dist/{gemini-login-YEPK6GGW.js → gemini-login-KE224MSW.js} +13 -14
- package/dist/gemini-login-KE224MSW.js.map +1 -0
- package/dist/index.d.ts +47 -17
- package/dist/index.js +86 -471
- package/dist/index.js.map +1 -1
- package/dist/input-history-MIOO3FIW.js +57 -0
- package/dist/input-history-MIOO3FIW.js.map +1 -0
- package/dist/kimi-adapter-UODMNX6K.js +6 -0
- package/dist/{kimi-adapter-JN4HFFHU.js.map → kimi-adapter-UODMNX6K.js.map} +1 -1
- package/dist/{kimi-login-ZR74MIY4.js → kimi-login-DNT5YBKX.js} +18 -17
- package/dist/kimi-login-DNT5YBKX.js.map +1 -0
- package/dist/logger-PLPDWACQ.js +3 -0
- package/dist/logger-PLPDWACQ.js.map +1 -0
- package/dist/model-discovery-O64ZWPX5.js +6 -0
- package/dist/model-discovery-O64ZWPX5.js.map +1 -0
- package/dist/native-cli-adapters-JMZX2C2C.js +8 -0
- package/dist/{native-cli-adapters-OLW3XX57.js.map → native-cli-adapters-JMZX2C2C.js.map} +1 -1
- package/dist/ollama-adapter-GE67BNSS.js +5 -0
- package/dist/{ollama-adapter-OJQ3FKWK.js.map → ollama-adapter-GE67BNSS.js.map} +1 -1
- package/dist/openai-adapter-SHPLK77L.js +7 -0
- package/dist/{openai-adapter-XU46EN7B.js.map → openai-adapter-SHPLK77L.js.map} +1 -1
- package/dist/pathResolver-A6IXQQFE.js +3 -0
- package/dist/pathResolver-A6IXQQFE.js.map +1 -0
- package/dist/profile-loader-TNAXBLDX.js +162 -0
- package/dist/profile-loader-TNAXBLDX.js.map +1 -0
- package/dist/registry-3NHVCXCZ.js +6 -0
- package/dist/{registry-H7B3AHPQ.js.map → registry-3NHVCXCZ.js.map} +1 -1
- package/dist/registry-7CQ3NCAD.js +5 -0
- package/dist/{registry-OYWYT7WL.js.map → registry-7CQ3NCAD.js.map} +1 -1
- package/dist/server-manager-DES23IBQ.js +5 -0
- package/dist/{server-manager-PTGBHCLS.js.map → server-manager-DES23IBQ.js.map} +1 -1
- package/dist/session-manager-EHD7GWM2.js +12 -0
- package/dist/{session-manager-NYB2RKMS.js.map → session-manager-EHD7GWM2.js.map} +1 -1
- package/dist/skills/built-in/code-review/SKILL.md +85 -0
- package/dist/skills/built-in/commit/SKILL.md +83 -0
- package/dist/skills/built-in/debug/SKILL.md +119 -0
- package/dist/skills/built-in/plan/SKILL.md +123 -0
- package/dist/skills/built-in/refactor/SKILL.md +132 -0
- package/dist/skills/built-in/test/SKILL.md +128 -0
- package/dist/sqlite-store-7ZIVOUNI.js +5 -0
- package/dist/sqlite-store-7ZIVOUNI.js.map +1 -0
- package/dist/team-manager-6DCNLGTC.js +11 -0
- package/dist/{team-manager-HC4XGCFY.js.map → team-manager-6DCNLGTC.js.map} +1 -1
- package/dist/team-state-R2D7DT5M.js +3 -0
- package/dist/team-state-R2D7DT5M.js.map +1 -0
- package/dist/tmux-manager-WBKHUHDT.js +6 -0
- package/dist/{tmux-manager-GPYZ3WQH.js.map → tmux-manager-WBKHUHDT.js.map} +1 -1
- package/dist/tools-I6XCTEZY.js +6 -0
- package/dist/{tools-TSMXMHIF.js.map → tools-I6XCTEZY.js.map} +1 -1
- package/package.json +93 -89
- package/dist/App-TE3JJKOW.js +0 -2789
- package/dist/App-TE3JJKOW.js.map +0 -1
- package/dist/api-key-fallback-YQQBOQIL.js +0 -11
- package/dist/chunk-4IJD72YB.js.map +0 -1
- package/dist/chunk-6PDJ45T4.js.map +0 -1
- package/dist/chunk-ASGRGXYK.js.map +0 -1
- package/dist/chunk-CARHU3DO.js.map +0 -1
- package/dist/chunk-CGEV3ARR.js.map +0 -1
- package/dist/chunk-CS5X3BWX.js +0 -27
- package/dist/chunk-CS5X3BWX.js.map +0 -1
- package/dist/chunk-CYQNBB25.js.map +0 -1
- package/dist/chunk-DAHGLHNR.js.map +0 -1
- package/dist/chunk-H66O5Z2V.js.map +0 -1
- package/dist/chunk-HCIHOHLX.js.map +0 -1
- package/dist/chunk-HMJRPNPZ.js.map +0 -1
- package/dist/chunk-I5PZ4JTS.js.map +0 -1
- package/dist/chunk-IYW62KKR.js.map +0 -1
- package/dist/chunk-JAXXTYID.js.map +0 -1
- package/dist/chunk-LSOYPSAT.js.map +0 -1
- package/dist/chunk-MFBHNWGV.js.map +0 -1
- package/dist/chunk-MXZSI3AY.js.map +0 -1
- package/dist/chunk-NBR3GHMT.js.map +0 -1
- package/dist/chunk-TEVZS4FA.js.map +0 -1
- package/dist/chunk-UY2SYSEZ.js.map +0 -1
- package/dist/chunk-VUG4IZ7J.js.map +0 -1
- package/dist/chunk-WAHVZH7V.js +0 -260
- package/dist/chunk-WAHVZH7V.js.map +0 -1
- package/dist/chunk-WPP3PEDE.js.map +0 -1
- package/dist/chunk-Y5XVD2CD.js.map +0 -1
- package/dist/chunk-YL5XFHR3.js.map +0 -1
- package/dist/chunk-ZGOHARPV.js.map +0 -1
- package/dist/claude-adapter-QMLFMSP3.js +0 -6
- package/dist/claude-login-5WELXPKT.js.map +0 -1
- package/dist/codex-login-DDJBCT43.js.map +0 -1
- package/dist/config-store-W6FBCQAQ.js +0 -6
- package/dist/executor-6RIKIGXK.js +0 -4
- package/dist/gemini-adapter-6JIHZ7WI.js +0 -6
- package/dist/gemini-login-YEPK6GGW.js.map +0 -1
- package/dist/kimi-adapter-JN4HFFHU.js +0 -6
- package/dist/kimi-login-ZR74MIY4.js.map +0 -1
- package/dist/native-cli-adapters-OLW3XX57.js +0 -6
- package/dist/ollama-adapter-OJQ3FKWK.js +0 -6
- package/dist/openai-adapter-XU46EN7B.js +0 -6
- package/dist/registry-H7B3AHPQ.js +0 -5
- package/dist/registry-OYWYT7WL.js +0 -6
- package/dist/server-manager-PTGBHCLS.js +0 -5
- package/dist/session-manager-NYB2RKMS.js +0 -12
- package/dist/team-manager-HC4XGCFY.js +0 -11
- package/dist/tmux-manager-GPYZ3WQH.js +0 -6
- package/dist/tools-TSMXMHIF.js +0 -6
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architect
|
|
3
|
+
description: System design, architecture decisions, and technical planning
|
|
4
|
+
provider: claude-code
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Architect Agent
|
|
8
|
+
|
|
9
|
+
You are a senior software architect. Your responsibilities:
|
|
10
|
+
|
|
11
|
+
1. Design scalable, maintainable system architectures
|
|
12
|
+
2. Make informed technology decisions
|
|
13
|
+
3. Identify and manage technical debt
|
|
14
|
+
4. Define module boundaries and interfaces
|
|
15
|
+
5. Plan migration strategies
|
|
16
|
+
|
|
17
|
+
## Architecture Principles
|
|
18
|
+
|
|
19
|
+
- Separation of concerns
|
|
20
|
+
- Single responsibility
|
|
21
|
+
- Dependency inversion
|
|
22
|
+
- Composition over inheritance
|
|
23
|
+
- Design for testability
|
|
24
|
+
|
|
25
|
+
## Decision Framework
|
|
26
|
+
|
|
27
|
+
When making architecture decisions:
|
|
28
|
+
1. Define the problem and constraints
|
|
29
|
+
2. Identify viable alternatives
|
|
30
|
+
3. Evaluate trade-offs (complexity, performance, maintainability)
|
|
31
|
+
4. Choose the simplest solution that meets requirements
|
|
32
|
+
5. Document the decision and rationale
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debugger
|
|
3
|
+
description: Bug diagnosis, error analysis, and systematic debugging
|
|
4
|
+
provider: claude-code
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Debugger Agent
|
|
8
|
+
|
|
9
|
+
You are an expert debugger. Your responsibilities:
|
|
10
|
+
|
|
11
|
+
1. Systematically diagnose bugs and errors
|
|
12
|
+
2. Identify root causes, not just symptoms
|
|
13
|
+
3. Propose minimal, targeted fixes
|
|
14
|
+
4. Verify fixes don't introduce regressions
|
|
15
|
+
5. Document the debugging process
|
|
16
|
+
|
|
17
|
+
## Debugging Process
|
|
18
|
+
|
|
19
|
+
1. **Reproduce**: Understand the exact failure mode
|
|
20
|
+
2. **Isolate**: Narrow down the problem location
|
|
21
|
+
3. **Analyze**: Read the relevant code carefully
|
|
22
|
+
4. **Hypothesize**: Form theories about the root cause
|
|
23
|
+
5. **Test**: Verify each hypothesis
|
|
24
|
+
6. **Fix**: Apply the minimal correct fix
|
|
25
|
+
7. **Verify**: Confirm the fix resolves the issue
|
|
26
|
+
|
|
27
|
+
## Common Patterns
|
|
28
|
+
|
|
29
|
+
- Check error messages and stack traces first
|
|
30
|
+
- Look for off-by-one errors, null/undefined access, race conditions
|
|
31
|
+
- Verify assumptions about data types and shapes
|
|
32
|
+
- Check recent changes that might have introduced the bug
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: developer
|
|
3
|
+
description: Code implementation, feature development, and refactoring
|
|
4
|
+
provider: codex
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Developer Agent
|
|
8
|
+
|
|
9
|
+
You are a senior software developer. Your responsibilities:
|
|
10
|
+
|
|
11
|
+
1. Write clean, well-structured, production-ready code
|
|
12
|
+
2. Follow existing project conventions and patterns
|
|
13
|
+
3. Handle edge cases and error conditions
|
|
14
|
+
4. Add appropriate comments for complex logic only
|
|
15
|
+
5. Ensure type safety in TypeScript projects
|
|
16
|
+
|
|
17
|
+
## Working Style
|
|
18
|
+
|
|
19
|
+
- Read existing code before making changes
|
|
20
|
+
- Make minimal, focused changes
|
|
21
|
+
- Test your changes if test infrastructure exists
|
|
22
|
+
- Commit logical units of work
|
|
23
|
+
|
|
24
|
+
## Code Quality
|
|
25
|
+
|
|
26
|
+
- No placeholder or TODO code
|
|
27
|
+
- No unnecessary dependencies
|
|
28
|
+
- Proper error handling at system boundaries
|
|
29
|
+
- Consistent naming conventions
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: documenter
|
|
3
|
+
description: Technical documentation, README, and API docs
|
|
4
|
+
provider: gemini-cli
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Documentation Agent
|
|
8
|
+
|
|
9
|
+
You are a technical writer. Your responsibilities:
|
|
10
|
+
|
|
11
|
+
1. Write clear, accurate technical documentation
|
|
12
|
+
2. Create comprehensive README files
|
|
13
|
+
3. Document API endpoints and interfaces
|
|
14
|
+
4. Write setup and installation guides
|
|
15
|
+
5. Maintain documentation consistency
|
|
16
|
+
|
|
17
|
+
## Documentation Standards
|
|
18
|
+
|
|
19
|
+
- Use clear, concise language
|
|
20
|
+
- Include practical examples
|
|
21
|
+
- Keep documentation close to the code it describes
|
|
22
|
+
- Update docs when code changes
|
|
23
|
+
- Use consistent formatting and structure
|
|
24
|
+
|
|
25
|
+
## Document Types
|
|
26
|
+
|
|
27
|
+
- **README**: Project overview, setup, usage
|
|
28
|
+
- **API Docs**: Endpoint specifications, parameters, responses
|
|
29
|
+
- **Guides**: Step-by-step tutorials
|
|
30
|
+
- **Architecture**: System design decisions and rationale
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: researcher
|
|
3
|
+
description: Technical research, analysis, and documentation investigation
|
|
4
|
+
provider: gemini-cli
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Research Agent
|
|
8
|
+
|
|
9
|
+
You are a technical researcher. Your responsibilities:
|
|
10
|
+
|
|
11
|
+
1. Investigate technical questions thoroughly
|
|
12
|
+
2. Analyze codebases to understand architecture and patterns
|
|
13
|
+
3. Research best practices and alternatives
|
|
14
|
+
4. Provide evidence-based recommendations
|
|
15
|
+
5. Summarize findings clearly
|
|
16
|
+
|
|
17
|
+
## Research Process
|
|
18
|
+
|
|
19
|
+
1. Define the research question clearly
|
|
20
|
+
2. Gather evidence from code, docs, and available resources
|
|
21
|
+
3. Analyze findings objectively
|
|
22
|
+
4. Present conclusions with supporting evidence
|
|
23
|
+
5. Recommend concrete next steps
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
Structure your findings with:
|
|
28
|
+
- **Question**: What was investigated
|
|
29
|
+
- **Findings**: Key discoveries
|
|
30
|
+
- **Analysis**: Interpretation of findings
|
|
31
|
+
- **Recommendation**: Suggested action
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reviewer
|
|
3
|
+
description: Code review, security analysis, and quality assessment
|
|
4
|
+
provider: claude-code
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Code Reviewer Agent
|
|
8
|
+
|
|
9
|
+
You are an expert code reviewer focused on quality and security. Your responsibilities:
|
|
10
|
+
|
|
11
|
+
1. Review code for correctness, clarity, and maintainability
|
|
12
|
+
2. Identify security vulnerabilities (OWASP Top 10)
|
|
13
|
+
3. Check for performance issues and anti-patterns
|
|
14
|
+
4. Verify proper error handling and edge case coverage
|
|
15
|
+
5. Ensure adherence to project conventions
|
|
16
|
+
|
|
17
|
+
## Review Checklist
|
|
18
|
+
|
|
19
|
+
- [ ] Type safety (no implicit any, proper null checks)
|
|
20
|
+
- [ ] Error handling (try/catch, proper propagation)
|
|
21
|
+
- [ ] Security (input validation, injection prevention)
|
|
22
|
+
- [ ] Performance (unnecessary allocations, N+1 queries)
|
|
23
|
+
- [ ] Testing (adequate coverage, meaningful assertions)
|
|
24
|
+
- [ ] Documentation (public API docs, complex logic comments)
|
|
25
|
+
|
|
26
|
+
## Output Format
|
|
27
|
+
|
|
28
|
+
Provide findings as a structured list with severity levels: CRITICAL, WARNING, INFO.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: supervisor
|
|
3
|
+
description: Decomposes complex tasks, delegates to specialized agents, and synthesizes results
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Supervisor Agent
|
|
7
|
+
|
|
8
|
+
You are a supervisor agent responsible for orchestrating complex development tasks. Your role is to:
|
|
9
|
+
|
|
10
|
+
1. **Analyze** the task requirements thoroughly
|
|
11
|
+
2. **Decompose** complex tasks into well-defined subtasks
|
|
12
|
+
3. **Delegate** each subtask to the most appropriate specialized agent
|
|
13
|
+
4. **Coordinate** parallel work when tasks are independent
|
|
14
|
+
5. **Synthesize** results from multiple agents into a cohesive outcome
|
|
15
|
+
|
|
16
|
+
## Decision Framework
|
|
17
|
+
|
|
18
|
+
- Use `handoff()` for sequential tasks where you need the result before proceeding
|
|
19
|
+
- Use `assign()` + `collect_results()` for independent parallel tasks
|
|
20
|
+
- Use `send_message()` to provide additional context to running workers
|
|
21
|
+
|
|
22
|
+
## Agent Selection
|
|
23
|
+
|
|
24
|
+
- **developer**: Code implementation, feature development, refactoring
|
|
25
|
+
- **reviewer**: Code review, security analysis, quality checks
|
|
26
|
+
- **tester**: Test writing, test execution, coverage analysis
|
|
27
|
+
- **researcher**: Analysis, documentation research, technical investigation
|
|
28
|
+
- **debugger**: Bug diagnosis, error analysis, fixing
|
|
29
|
+
- **documenter**: README, API docs, inline documentation
|
|
30
|
+
- **architect**: System design, architecture decisions
|
|
31
|
+
|
|
32
|
+
## Guidelines
|
|
33
|
+
|
|
34
|
+
- Always explain your delegation strategy before executing
|
|
35
|
+
- Check results from workers before moving to the next step
|
|
36
|
+
- If a worker fails, analyze the error and retry with better instructions
|
|
37
|
+
- Keep track of the overall progress toward the original goal
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tester
|
|
3
|
+
description: Test writing, execution, and coverage analysis
|
|
4
|
+
provider: gemini-cli
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Tester Agent
|
|
8
|
+
|
|
9
|
+
You are a testing specialist. Your responsibilities:
|
|
10
|
+
|
|
11
|
+
1. Write comprehensive unit tests
|
|
12
|
+
2. Write integration tests for critical paths
|
|
13
|
+
3. Achieve high code coverage on new and modified code
|
|
14
|
+
4. Use proper mocking strategies
|
|
15
|
+
5. Write clear test descriptions
|
|
16
|
+
|
|
17
|
+
## Testing Strategy
|
|
18
|
+
|
|
19
|
+
- Use the project's existing test framework (Vitest, Jest, etc.)
|
|
20
|
+
- Follow Arrange-Act-Assert pattern
|
|
21
|
+
- Test happy paths, edge cases, and error conditions
|
|
22
|
+
- Mock external dependencies, not internal logic
|
|
23
|
+
- Use descriptive test names that explain the expected behavior
|
|
24
|
+
|
|
25
|
+
## Test Quality
|
|
26
|
+
|
|
27
|
+
- No flaky tests
|
|
28
|
+
- No tests that depend on execution order
|
|
29
|
+
- Fast unit tests (< 100ms each)
|
|
30
|
+
- Proper cleanup in afterEach/afterAll
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { ApiKeyFallback, getEnvKeyName, resolveProviderName } from './chunk-6GUD7QIM.js';
|
|
2
|
+
import './chunk-AQ23TYSQ.js';
|
|
3
|
+
import './chunk-VJNQJALF.js';
|
|
4
|
+
import './chunk-VBLLDY4R.js';
|
|
5
|
+
import './chunk-2GKOK6T7.js';
|
|
6
|
+
import './chunk-473JN6M5.js';
|
|
7
|
+
import './chunk-62HSGYQD.js';
|
|
8
|
+
import './chunk-HEKFAKVH.js';
|
|
9
|
+
import './chunk-BY4DAKUU.js';
|
|
10
|
+
//# sourceMappingURL=api-key-fallback-UN3TJEOO.js.map
|
|
11
|
+
//# sourceMappingURL=api-key-fallback-UN3TJEOO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"api-key-fallback-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"api-key-fallback-UN3TJEOO.js"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { LOGIN_PROVIDERS, formatCompactAuthStatusLine, formatDetailedAuthStatusLine, getAuthStatusRecord, getAuthStatusRecords } from './chunk-OCJPQFOR.js';
|
|
2
|
+
import './chunk-H2SYKIMI.js';
|
|
3
|
+
import './chunk-6GUD7QIM.js';
|
|
4
|
+
import './chunk-AQ23TYSQ.js';
|
|
5
|
+
import './chunk-VJNQJALF.js';
|
|
6
|
+
import './chunk-VBLLDY4R.js';
|
|
7
|
+
import './chunk-2GKOK6T7.js';
|
|
8
|
+
import './chunk-473JN6M5.js';
|
|
9
|
+
import './chunk-62HSGYQD.js';
|
|
10
|
+
import './chunk-HEKFAKVH.js';
|
|
11
|
+
import './chunk-BY4DAKUU.js';
|
|
12
|
+
//# sourceMappingURL=auth-status-EIM5A5KL.js.map
|
|
13
|
+
//# sourceMappingURL=auth-status-EIM5A5KL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"auth-status-EIM5A5KL.js"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ModelNotFoundError, AuthenticationError, RateLimitError } from './chunk-
|
|
3
|
-
import {
|
|
1
|
+
import { buildModelMessages, buildAiSdkTools, extractAiSdkToolCalls, buildTokenUsage, mapAiSdkFinishReason } from './chunk-ODBY7S4X.js';
|
|
2
|
+
import { ModelNotFoundError, AuthenticationError, RateLimitError } from './chunk-473JN6M5.js';
|
|
3
|
+
import { SUPPORTED_MODELS } from './chunk-62HSGYQD.js';
|
|
4
|
+
import { logger } from './chunk-HEKFAKVH.js';
|
|
4
5
|
import { generateText, streamText } from 'ai';
|
|
5
6
|
import { createGoogleGenerativeAI } from '@ai-sdk/google';
|
|
6
7
|
|
|
@@ -13,46 +14,6 @@ var GEMINI_MODELS = [
|
|
|
13
14
|
"gemini-2.5-flash-lite"
|
|
14
15
|
];
|
|
15
16
|
var CHARS_PER_TOKEN_ESTIMATE = 4;
|
|
16
|
-
function convertTools(tools) {
|
|
17
|
-
if (tools === void 0 || tools.length === 0) {
|
|
18
|
-
return void 0;
|
|
19
|
-
}
|
|
20
|
-
const result = {};
|
|
21
|
-
for (const tool of tools) {
|
|
22
|
-
const properties = {};
|
|
23
|
-
const required = [];
|
|
24
|
-
for (const param of tool.parameters) {
|
|
25
|
-
const prop = {
|
|
26
|
-
type: param.type,
|
|
27
|
-
description: param.description
|
|
28
|
-
};
|
|
29
|
-
if (param.enum !== void 0) {
|
|
30
|
-
prop["enum"] = param.enum;
|
|
31
|
-
}
|
|
32
|
-
if (param.default !== void 0) {
|
|
33
|
-
prop["default"] = param.default;
|
|
34
|
-
}
|
|
35
|
-
properties[param.name] = prop;
|
|
36
|
-
if (param.required) {
|
|
37
|
-
required.push(param.name);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
result[tool.name] = {
|
|
41
|
-
description: tool.description,
|
|
42
|
-
parameters: { type: "object", properties, required }
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
return result;
|
|
46
|
-
}
|
|
47
|
-
function buildMessages(messages) {
|
|
48
|
-
return messages.map((msg) => ({
|
|
49
|
-
role: msg.role,
|
|
50
|
-
content: msg.content
|
|
51
|
-
}));
|
|
52
|
-
}
|
|
53
|
-
function computeCost(modelInfo, inputTokens, outputTokens) {
|
|
54
|
-
return inputTokens / 1e6 * modelInfo.inputPricePerMToken + outputTokens / 1e6 * modelInfo.outputPricePerMToken;
|
|
55
|
-
}
|
|
56
17
|
function classifyError(error, model) {
|
|
57
18
|
const message = error instanceof Error ? error.message : String(error);
|
|
58
19
|
const lower = message.toLowerCase();
|
|
@@ -72,6 +33,7 @@ function classifyError(error, model) {
|
|
|
72
33
|
var GeminiAdapter = class {
|
|
73
34
|
name = PROVIDER_NAME;
|
|
74
35
|
supportedModels = GEMINI_MODELS;
|
|
36
|
+
supportsToolCalling = true;
|
|
75
37
|
google;
|
|
76
38
|
constructor(options) {
|
|
77
39
|
const apiKey = options?.apiKey ?? process.env["GOOGLE_API_KEY"];
|
|
@@ -82,28 +44,21 @@ var GeminiAdapter = class {
|
|
|
82
44
|
}
|
|
83
45
|
async chat(request) {
|
|
84
46
|
const modelInfo = this.getModelInfo(request.model);
|
|
85
|
-
const messages =
|
|
86
|
-
const tools =
|
|
47
|
+
const messages = buildModelMessages(request.messages);
|
|
48
|
+
const tools = buildAiSdkTools(request.tools);
|
|
87
49
|
try {
|
|
88
50
|
const result = await generateText({
|
|
89
51
|
model: this.google(request.model),
|
|
90
52
|
messages,
|
|
91
53
|
...request.system !== void 0 ? { system: request.system } : {},
|
|
92
|
-
tools,
|
|
93
|
-
|
|
54
|
+
...tools !== void 0 ? { tools } : {},
|
|
55
|
+
maxOutputTokens: request.maxTokens ?? modelInfo.maxOutputTokens,
|
|
94
56
|
...request.temperature !== void 0 ? { temperature: request.temperature } : {}
|
|
95
57
|
});
|
|
96
|
-
const toolCalls =
|
|
97
|
-
const
|
|
98
|
-
const outputTokens = result.usage?.completionTokens ?? 0;
|
|
99
|
-
const usage = {
|
|
100
|
-
inputTokens,
|
|
101
|
-
outputTokens,
|
|
102
|
-
totalTokens: inputTokens + outputTokens,
|
|
103
|
-
costUsd: computeCost(modelInfo, inputTokens, outputTokens)
|
|
104
|
-
};
|
|
58
|
+
const toolCalls = extractAiSdkToolCalls(result.toolCalls);
|
|
59
|
+
const usage = buildTokenUsage(modelInfo, result.usage);
|
|
105
60
|
const responseMessage = {
|
|
106
|
-
id: result.response
|
|
61
|
+
id: result.response.id,
|
|
107
62
|
role: "assistant",
|
|
108
63
|
content: result.text,
|
|
109
64
|
model: request.model,
|
|
@@ -113,12 +68,12 @@ var GeminiAdapter = class {
|
|
|
113
68
|
createdAt: /* @__PURE__ */ new Date()
|
|
114
69
|
};
|
|
115
70
|
return {
|
|
116
|
-
id: result.response
|
|
71
|
+
id: result.response.id,
|
|
117
72
|
model: request.model,
|
|
118
73
|
provider: PROVIDER_NAME,
|
|
119
74
|
message: responseMessage,
|
|
120
75
|
usage,
|
|
121
|
-
finishReason:
|
|
76
|
+
finishReason: mapAiSdkFinishReason(result.finishReason)
|
|
122
77
|
};
|
|
123
78
|
} catch (error) {
|
|
124
79
|
classifyError(error, request.model);
|
|
@@ -126,38 +81,34 @@ var GeminiAdapter = class {
|
|
|
126
81
|
}
|
|
127
82
|
async *stream(request) {
|
|
128
83
|
const modelInfo = this.getModelInfo(request.model);
|
|
129
|
-
const messages =
|
|
130
|
-
const tools =
|
|
84
|
+
const messages = buildModelMessages(request.messages);
|
|
85
|
+
const tools = buildAiSdkTools(request.tools);
|
|
131
86
|
try {
|
|
132
87
|
const result = streamText({
|
|
133
88
|
model: this.google(request.model),
|
|
134
89
|
messages,
|
|
135
90
|
...request.system !== void 0 ? { system: request.system } : {},
|
|
136
|
-
tools,
|
|
137
|
-
|
|
91
|
+
...tools !== void 0 ? { tools } : {},
|
|
92
|
+
maxOutputTokens: request.maxTokens ?? modelInfo.maxOutputTokens,
|
|
138
93
|
...request.temperature !== void 0 ? { temperature: request.temperature } : {}
|
|
139
94
|
});
|
|
140
95
|
for await (const part of result.fullStream) {
|
|
141
96
|
if (part.type === "text-delta") {
|
|
142
|
-
yield { type: "text", content: part.
|
|
97
|
+
yield { type: "text", content: part.text };
|
|
143
98
|
} else if (part.type === "tool-call") {
|
|
144
|
-
const toolCall = {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
};
|
|
99
|
+
const [toolCall] = extractAiSdkToolCalls([{
|
|
100
|
+
toolCallId: part.toolCallId,
|
|
101
|
+
toolName: part.toolName,
|
|
102
|
+
input: part.input
|
|
103
|
+
}]);
|
|
104
|
+
if (toolCall === void 0) {
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
149
107
|
yield { type: "tool_call", toolCall };
|
|
150
108
|
} else if (part.type === "finish") {
|
|
151
|
-
const inTok = part.usage?.promptTokens ?? 0;
|
|
152
|
-
const outTok = part.usage?.completionTokens ?? 0;
|
|
153
109
|
yield {
|
|
154
110
|
type: "usage",
|
|
155
|
-
usage:
|
|
156
|
-
inputTokens: inTok,
|
|
157
|
-
outputTokens: outTok,
|
|
158
|
-
totalTokens: inTok + outTok,
|
|
159
|
-
costUsd: computeCost(modelInfo, inTok, outTok)
|
|
160
|
-
}
|
|
111
|
+
usage: buildTokenUsage(modelInfo, part.totalUsage)
|
|
161
112
|
};
|
|
162
113
|
} else if (part.type === "error") {
|
|
163
114
|
const errMsg = part.error instanceof Error ? part.error.message : String(part.error);
|
|
@@ -172,8 +123,8 @@ var GeminiAdapter = class {
|
|
|
172
123
|
yield { type: "done" };
|
|
173
124
|
}
|
|
174
125
|
}
|
|
175
|
-
|
|
176
|
-
return Math.ceil(text.length / CHARS_PER_TOKEN_ESTIMATE);
|
|
126
|
+
countTokens(text, _model) {
|
|
127
|
+
return Promise.resolve(Math.ceil(text.length / CHARS_PER_TOKEN_ESTIMATE));
|
|
177
128
|
}
|
|
178
129
|
getModelInfo(model) {
|
|
179
130
|
const info = SUPPORTED_MODELS[model];
|
|
@@ -183,29 +134,7 @@ var GeminiAdapter = class {
|
|
|
183
134
|
return info;
|
|
184
135
|
}
|
|
185
136
|
};
|
|
186
|
-
function extractToolCalls(result) {
|
|
187
|
-
if (result.toolCalls === void 0 || result.toolCalls.length === 0) {
|
|
188
|
-
return [];
|
|
189
|
-
}
|
|
190
|
-
return result.toolCalls.map((tc) => ({
|
|
191
|
-
id: tc.toolCallId,
|
|
192
|
-
name: tc.toolName,
|
|
193
|
-
arguments: tc.args
|
|
194
|
-
}));
|
|
195
|
-
}
|
|
196
|
-
function mapFinishReason(reason) {
|
|
197
|
-
switch (reason) {
|
|
198
|
-
case "stop":
|
|
199
|
-
return "stop";
|
|
200
|
-
case "tool-calls":
|
|
201
|
-
return "tool_calls";
|
|
202
|
-
case "length":
|
|
203
|
-
return "max_tokens";
|
|
204
|
-
default:
|
|
205
|
-
return "stop";
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
137
|
|
|
209
138
|
export { GeminiAdapter };
|
|
210
|
-
//# sourceMappingURL=chunk-
|
|
211
|
-
//# sourceMappingURL=chunk-
|
|
139
|
+
//# sourceMappingURL=chunk-25UNNEHN.js.map
|
|
140
|
+
//# sourceMappingURL=chunk-25UNNEHN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/providers/gemini-adapter.ts"],"names":[],"mappings":";;;;;;;AA8BA,IAAM,aAAA,GAA8B,QAAA;AAEpC,IAAM,aAAA,GAAmC;AAAA,EACvC,sBAAA;AAAA,EACA,wBAAA;AAAA,EACA,gBAAA;AAAA,EACA,kBAAA;AAAA,EACA;AACF,CAAA;AAEA,IAAM,wBAAA,GAA2B,CAAA;AAEjC,SAAS,aAAA,CAAc,OAAgB,KAAA,EAAsB;AAC3D,EAAA,MAAM,UAAU,KAAA,YAAiB,KAAA,GAAQ,KAAA,CAAM,OAAA,GAAU,OAAO,KAAK,CAAA;AACrE,EAAA,MAAM,KAAA,GAAQ,QAAQ,WAAA,EAAY;AAClC,EAAA,IAAI,KAAA,CAAM,QAAA,CAAS,KAAK,CAAA,IAAK,MAAM,QAAA,CAAS,KAAK,CAAA,IAAK,KAAA,CAAM,SAAS,cAAc,CAAA,IAAK,KAAA,CAAM,QAAA,CAAS,iBAAiB,CAAA,EAAG;AACzH,IAAA,MAAM,IAAI,mBAAA,CAAoB,aAAA,EAAe,OAAO,CAAA;AAAA,EACtD;AACA,EAAA,IAAI,KAAA,CAAM,QAAA,CAAS,KAAK,CAAA,IAAK,KAAA,CAAM,QAAA,CAAS,YAAY,CAAA,IAAK,KAAA,CAAM,QAAA,CAAS,oBAAoB,CAAA,EAAG;AACjG,IAAA,MAAM,KAAA,GAAQ,YAAA,CAAa,IAAA,CAAK,OAAO,CAAA;AACvC,IAAA,MAAM,OAAA,GAAU,KAAA,GAAQ,CAAC,CAAA,KAAM,MAAA,GAAY,QAAA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AC1E;AAAA,EAEA,aAAa,KAAA,EAA2B;AACtC,IAAA,MAAM,IAAA,GAAO,iBAAiB,KAAK,CAAA;AACnC,IAAA,IAAI,IAAA,KAAS,MAAA,IAAa,IAAA,CAAK,QAAA,KAAa,aAAA,EAAe;AACzD,MAAA,MAAM,IAAI,mBAAmB,KAAK,CAAA;AAAA,IACpC;AACA,IAAA,OAAO,IAAA;AAAA,EACT;AACF","file":"chunk-25UNNEHN.js","sourcesContent":["/**\r\n * Gemini (Google) adapter via Vercel AI SDK per PRD section 7.1\r\n * Supports Gemini 2.5 Pro, Gemini 2.5 Flash\r\n */\r\n\r\nimport { generateText, streamText } from \"ai\";\r\nimport { createGoogleGenerativeAI } from \"@ai-sdk/google\";\r\nimport { logger } from \"../utils/logger.js\";\r\nimport {\r\n AuthenticationError,\r\n RateLimitError,\r\n ModelNotFoundError,\r\n} from \"../types/errors.js\";\r\nimport { SUPPORTED_MODELS } from \"../types/model.js\";\r\nimport type { IModelInfo, ProviderName } from \"../types/model.js\";\r\nimport type {\r\n IChatRequest,\r\n IChatResponse,\r\n IChatMessage,\r\n IStreamChunk,\r\n} from \"../types/message.js\";\r\nimport {\r\n buildAiSdkTools,\r\n buildModelMessages,\r\n buildTokenUsage,\r\n extractAiSdkToolCalls,\r\n mapAiSdkFinishReason,\r\n} from \"./ai-sdk-shared.js\";\r\nimport type { IModelProvider, IProviderOptions } from \"./types.js\";\r\n\r\nconst PROVIDER_NAME: ProviderName = \"google\";\r\n\r\nconst GEMINI_MODELS: readonly string[] = [\r\n \"gemini-3-pro-preview\",\r\n \"gemini-3-flash-preview\",\r\n \"gemini-2.5-pro\",\r\n \"gemini-2.5-flash\",\r\n \"gemini-2.5-flash-lite\",\r\n] as const;\r\n\r\nconst CHARS_PER_TOKEN_ESTIMATE = 4;\r\n\r\nfunction classifyError(error: unknown, model: string): never {\r\n const message = error instanceof Error ? error.message : String(error);\r\n const lower = message.toLowerCase();\r\n if (lower.includes(\"401\") || lower.includes(\"403\") || lower.includes(\"unauthorized\") || lower.includes(\"invalid api key\")) {\r\n throw new AuthenticationError(PROVIDER_NAME, message);\r\n }\r\n if (lower.includes(\"429\") || lower.includes(\"rate limit\") || lower.includes(\"resource exhausted\")) {\r\n const match = /(\\d+)\\s*s/i.exec(message);\r\n const retryMs = match?.[1] !== undefined ? parseInt(match[1], 10) * 1000 : 60_000;\r\n throw new RateLimitError(PROVIDER_NAME, retryMs);\r\n }\r\n if (lower.includes(\"model\") && lower.includes(\"not found\")) {\r\n throw new ModelNotFoundError(model);\r\n }\r\n throw error instanceof Error ? error : new Error(message);\r\n}\r\n\r\nexport class GeminiAdapter implements IModelProvider {\r\n readonly name = PROVIDER_NAME;\r\n readonly supportedModels = GEMINI_MODELS;\r\n readonly supportsToolCalling = true;\r\n private readonly google: ReturnType<typeof createGoogleGenerativeAI>;\r\n\r\n constructor(options?: IProviderOptions) {\r\n const apiKey = options?.apiKey ?? process.env[\"GOOGLE_API_KEY\"];\r\n this.google = createGoogleGenerativeAI({\r\n ...(apiKey !== undefined ? { apiKey } : {}),\r\n ...(options?.baseUrl !== undefined ? { baseURL: options.baseUrl } : {}),\r\n });\r\n }\r\n\r\n async chat(request: IChatRequest): Promise<IChatResponse> {\r\n const modelInfo = this.getModelInfo(request.model);\r\n const messages = buildModelMessages(request.messages);\r\n const tools = buildAiSdkTools(request.tools);\r\n try {\r\n const result = await generateText({\r\n model: this.google(request.model),\r\n messages,\r\n ...(request.system !== undefined ? { system: request.system } : {}),\r\n ...(tools !== undefined ? { tools } : {}),\r\n maxOutputTokens: request.maxTokens ?? modelInfo.maxOutputTokens,\r\n ...(request.temperature !== undefined ? { temperature: request.temperature } : {}),\r\n });\r\n const toolCalls = extractAiSdkToolCalls(result.toolCalls);\r\n const usage = buildTokenUsage(modelInfo, result.usage);\r\n const responseMessage: IChatMessage = {\r\n id: result.response.id,\r\n role: \"assistant\",\r\n content: result.text,\r\n model: request.model,\r\n provider: PROVIDER_NAME,\r\n toolCalls: toolCalls.length > 0 ? toolCalls : undefined,\r\n tokenUsage: usage,\r\n createdAt: new Date(),\r\n };\r\n return {\r\n id: result.response.id,\r\n model: request.model,\r\n provider: PROVIDER_NAME,\r\n message: responseMessage,\r\n usage,\r\n finishReason: mapAiSdkFinishReason(result.finishReason),\r\n };\r\n } catch (error: unknown) {\r\n classifyError(error, request.model);\r\n }\r\n }\r\n\r\n async *stream(request: IChatRequest): AsyncIterable<IStreamChunk> {\r\n const modelInfo = this.getModelInfo(request.model);\r\n const messages = buildModelMessages(request.messages);\r\n const tools = buildAiSdkTools(request.tools);\r\n try {\r\n const result = streamText({\r\n model: this.google(request.model),\r\n messages,\r\n ...(request.system !== undefined ? { system: request.system } : {}),\r\n ...(tools !== undefined ? { tools } : {}),\r\n maxOutputTokens: request.maxTokens ?? modelInfo.maxOutputTokens,\r\n ...(request.temperature !== undefined ? { temperature: request.temperature } : {}),\r\n });\r\n for await (const part of result.fullStream) {\r\n if (part.type === \"text-delta\") {\r\n yield { type: \"text\", content: part.text };\r\n } else if (part.type === \"tool-call\") {\r\n const [toolCall] = extractAiSdkToolCalls([{\r\n toolCallId: part.toolCallId,\r\n toolName: part.toolName,\r\n input: part.input,\r\n }]);\r\n if (toolCall === undefined) {\r\n continue;\r\n }\r\n yield { type: \"tool_call\", toolCall };\r\n } else if (part.type === \"finish\") {\r\n yield {\r\n type: \"usage\",\r\n usage: buildTokenUsage(modelInfo, part.totalUsage),\r\n };\r\n } else if (part.type === \"error\") {\r\n const errMsg = part.error instanceof Error ? part.error.message : String(part.error);\r\n yield { type: \"error\", error: errMsg };\r\n }\r\n }\r\n yield { type: \"done\" };\r\n } catch (error: unknown) {\r\n const errMsg = error instanceof Error ? error.message : String(error);\r\n logger.error({ error: errMsg, model: request.model }, \"Gemini stream error\");\r\n yield { type: \"error\", error: errMsg };\r\n yield { type: \"done\" };\r\n }\r\n }\r\n\r\n countTokens(text: string, _model: string): Promise<number> {\r\n return Promise.resolve(Math.ceil(text.length / CHARS_PER_TOKEN_ESTIMATE));\r\n }\r\n\r\n getModelInfo(model: string): IModelInfo {\r\n const info = SUPPORTED_MODELS[model];\r\n if (info === undefined || info.provider !== PROVIDER_NAME) {\r\n throw new ModelNotFoundError(model);\r\n }\r\n return info;\r\n }\r\n}\r\n"]}
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
+
import { readFileSync } from 'fs';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
3
|
+
|
|
4
|
+
// src/version.ts
|
|
5
|
+
var FALLBACK_VERSION = "0.0.0";
|
|
6
|
+
function loadPackageVersion() {
|
|
7
|
+
try {
|
|
8
|
+
const packageJsonPath = fileURLToPath(new URL("../package.json", import.meta.url));
|
|
9
|
+
const raw = readFileSync(packageJsonPath, "utf-8");
|
|
10
|
+
const parsed = JSON.parse(raw);
|
|
11
|
+
return parsed.version ?? FALLBACK_VERSION;
|
|
12
|
+
} catch {
|
|
13
|
+
return FALLBACK_VERSION;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
var PACKAGE_VERSION = loadPackageVersion();
|
|
17
|
+
|
|
1
18
|
// src/types/config.ts
|
|
2
19
|
var DEFAULT_CONFIG = {
|
|
3
|
-
version:
|
|
20
|
+
version: PACKAGE_VERSION,
|
|
4
21
|
defaultModel: "claude-sonnet-4-6",
|
|
5
22
|
roles: {
|
|
6
23
|
planning: { primary: "claude-opus-4-6", fallback: ["gpt-5.2", "gemini-2.5-pro"] },
|
|
@@ -25,9 +42,15 @@ var DEFAULT_CONFIG = {
|
|
|
25
42
|
splitPanel: {
|
|
26
43
|
enabled: true,
|
|
27
44
|
backend: "tmux",
|
|
28
|
-
defaultLayout: "
|
|
45
|
+
defaultLayout: "hub-spoke",
|
|
29
46
|
maxPanes: 6
|
|
30
47
|
},
|
|
48
|
+
swarm: {
|
|
49
|
+
onboardingComplete: false,
|
|
50
|
+
detectedProviders: [],
|
|
51
|
+
primaryMasterProvider: void 0,
|
|
52
|
+
fallbackMasterProviders: []
|
|
53
|
+
},
|
|
31
54
|
cost: {
|
|
32
55
|
budgetWarning: 5,
|
|
33
56
|
budgetHardStop: 20,
|
|
@@ -39,6 +62,6 @@ var DEFAULT_CONFIG = {
|
|
|
39
62
|
}
|
|
40
63
|
};
|
|
41
64
|
|
|
42
|
-
export { DEFAULT_CONFIG };
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
44
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
export { DEFAULT_CONFIG, PACKAGE_VERSION };
|
|
66
|
+
//# sourceMappingURL=chunk-2GKOK6T7.js.map
|
|
67
|
+
//# sourceMappingURL=chunk-2GKOK6T7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/version.ts","../src/types/config.ts"],"names":[],"mappings":";;;;AAOA,IAAM,gBAAA,GAAmB,OAAA;AAEzB,SAAS,kBAAA,GAA6B;AACpC,EAAA,IAAI;AACF,IAAA,MAAM,kBAAkB,aAAA,CAAc,IAAI,IAAI,iBAAA,EAAmB,MAAA,CAAA,IAAA,CAAY,GAAG,CAAC,CAAA;AACjF,IAAA,MAAM,GAAA,GAAM,YAAA,CAAa,eAAA,EAAiB,OAAO,CAAA;AACjD,IAAA,MAAM,MAAA,GAAS,IAAA,CAAK,KAAA,CAAM,GAAG,CAAA;AAC7B,IAAA,OAAO,OAAO,OAAA,IAAW,gBAAA;AAAA,EAC3B,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,gBAAA;AAAA,EACT;AACF;AAEO,IAAM,kBAAkB,kBAAA;;;ACwHxB,IAAM,cAAA,GAAgC;AAAA,EAC3C,OAAA,EAAS,eAAA;AAAA,EACT,YAAA,EAAc,mBAAA;AAAA,EACd,KAAA,EAAO;AAAA,IACL,QAAA,EAAU,EAAE,OAAA,EAAS,iBAAA,EAAmB,UAAU,CAAC,SAAA,EAAW,gBAAgB,CAAA,EAAE;AAAA,IAChF,MAAA,EAAQ,EAAE,OAAA,EAAS,mBAAA,EAAqB,UAAU,CAAC,SAAA,EAAW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AA,EAAU;AAAA,GACZ;AAAA,EACA,SAAA,EAAW;AAAA,IACT,OAAA,EAAS,KAAA;AAAA,IACT,UAAA,EAAY;AAAA;AAEhB","file":"chunk-2GKOK6T7.js","sourcesContent":["import { readFileSync } from \"node:fs\";\r\nimport { fileURLToPath } from \"node:url\";\r\n\r\ninterface PackageJsonShape {\r\n version?: string;\r\n}\r\n\r\nconst FALLBACK_VERSION = \"0.0.0\";\r\n\r\nfunction loadPackageVersion(): string {\r\n try {\r\n const packageJsonPath = fileURLToPath(new URL(\"../package.json\", import.meta.url));\r\n const raw = readFileSync(packageJsonPath, \"utf-8\");\r\n const parsed = JSON.parse(raw) as PackageJsonShape;\r\n return parsed.version ?? FALLBACK_VERSION;\r\n } catch {\r\n return FALLBACK_VERSION;\r\n }\r\n}\r\n\r\nexport const PACKAGE_VERSION = loadPackageVersion();\r\n","/**\r\n * Configuration types per PRD section 17.3\r\n */\r\n\r\nimport type { ProviderName, ModelRole, IRoleConfig } from \"./model.js\";\r\nimport type { PermissionMode } from \"./tool.js\";\r\nimport type { PaneLayout } from \"./team.js\";\r\nimport type { CliProviderType } from \"../orchestrator/constants.js\";\r\nimport { PACKAGE_VERSION } from \"../version.js\";\r\n\r\n// ── Provider Configuration ───────────────────────────────────────────────\r\n\r\nexport interface IProviderConfig {\r\n readonly enabled: boolean;\r\n readonly baseUrl?: string | undefined;\r\n}\r\n\r\n// ── Permission Configuration ─────────────────────────────────────────────\r\n\r\nexport interface IPermissionConfig {\r\n readonly mode: PermissionMode;\r\n readonly allowedPaths: readonly string[];\r\n readonly blockedCommands: readonly string[];\r\n}\r\n\r\n// ── Split Panel Configuration ────────────────────────────────────────────\r\n\r\nexport type PaneBackend = \"tmux\" | \"iterm2\";\r\n\r\nexport interface ISplitPanelConfig {\r\n readonly enabled: boolean;\r\n readonly backend: PaneBackend;\r\n readonly defaultLayout: PaneLayout;\r\n readonly maxPanes: number;\r\n}\r\n\r\n// ── Swarm / Orchestrator Preferences ────────────────────────────────────\r\n\r\nexport interface ISwarmConfig {\r\n readonly onboardingComplete: boolean;\r\n readonly detectedProviders: readonly CliProviderType[];\r\n readonly primaryMasterProvider?: CliProviderType | undefined;\r\n readonly fallbackMasterProviders: readonly CliProviderType[];\r\n}\r\n\r\n// ── Cost Configuration ───────────────────────────────────────────────────\r\n\r\nexport interface ICostConfig {\r\n readonly budgetWarning: number;\r\n readonly budgetHardStop: number;\r\n readonly currency: string;\r\n}\r\n\r\n// ── Telemetry Configuration ──────────────────────────────────────────────\r\n\r\nexport interface ITelemetryConfig {\r\n readonly enabled: boolean;\r\n readonly anonymized: boolean;\r\n}\r\n\r\n// ── OAuth Provider Configuration ─────────────────────────────────────────\r\n\r\nexport interface IOAuthProviderConfig {\r\n readonly clientId: string;\r\n readonly clientSecret?: string | undefined;\r\n readonly authorizeUrl?: string | undefined;\r\n readonly tokenUrl?: string | undefined;\r\n readonly scope?: string | undefined;\r\n}\r\n\r\nexport interface IOAuthConfig {\r\n readonly anthropic?: IOAuthProviderConfig | undefined;\r\n readonly openai?: IOAuthProviderConfig | undefined;\r\n readonly google?: IOAuthProviderConfig | undefined;\r\n readonly kimi?: IOAuthProviderConfig | undefined;\r\n}\r\n\r\n// ── Global Configuration (PRD section 17.3) ──────────────────────────────\r\n\r\nexport interface IGlobalConfig {\r\n readonly version: string;\r\n readonly defaultModel: string;\r\n readonly roles: Partial<Record<ModelRole, IRoleConfig>>;\r\n readonly providers: Partial<Record<ProviderName, IProviderConfig>>;\r\n readonly permissions: IPermissionConfig;\r\n readonly splitPanel: ISplitPanelConfig;\r\n readonly swarm: ISwarmConfig;\r\n readonly cost: ICostConfig;\r\n readonly telemetry: ITelemetryConfig;\r\n readonly oauth?: IOAuthConfig | undefined;\r\n}\r\n\r\n// ── MCP Server Configuration (PRD section 11.2) ─────────────────────────\r\n\r\nexport interface IMCPServerConfig {\r\n readonly command: string;\r\n readonly args: readonly string[];\r\n readonly env?: Readonly<Record<string, string>> | undefined;\r\n}\r\n\r\nexport interface IMCPConfig {\r\n readonly mcpServers: Readonly<Record<string, IMCPServerConfig>>;\r\n}\r\n\r\n// ── Skill Configuration (PRD section 10.2) ───────────────────────────────\r\n\r\nexport interface ISkillFrontmatter {\r\n readonly name: string;\r\n readonly description: string;\r\n readonly version: string;\r\n readonly \"allowed-tools\"?: readonly string[] | undefined;\r\n readonly triggers: readonly string[];\r\n readonly \"model-requirements\"?: {\r\n readonly \"preferred-role\"?: ModelRole | undefined;\r\n readonly \"min-context\"?: number | undefined;\r\n } | undefined;\r\n}\r\n\r\nexport interface ISkillDefinition {\r\n readonly frontmatter: ISkillFrontmatter;\r\n readonly body: string;\r\n readonly filePath: string;\r\n}\r\n\r\n// ── Auth Credential Types (PRD section 13) ───────────────────────────────\r\n\r\nexport type AuthMethod = \"native_login\" | \"api_key\" | \"env_variable\" | \"credential_helper\";\r\n\r\nexport interface ICredential {\r\n readonly provider: ProviderName;\r\n readonly method: AuthMethod;\r\n readonly token?: string | undefined;\r\n readonly refreshToken?: string | undefined;\r\n readonly expiresAt?: Date | undefined;\r\n readonly email?: string | undefined;\r\n readonly plan?: string | undefined;\r\n}\r\n\r\n// ── Default Configuration ────────────────────────────────────────────────\r\n\r\nexport const DEFAULT_CONFIG: IGlobalConfig = {\r\n version: PACKAGE_VERSION,\r\n defaultModel: \"claude-sonnet-4-6\",\r\n roles: {\r\n planning: { primary: \"claude-opus-4-6\", fallback: [\"gpt-5.2\", \"gemini-2.5-pro\"] },\r\n coding: { primary: \"claude-sonnet-4-6\", fallback: [\"gpt-5.2\", \"gemini-2.5-flash\"] },\r\n review: { primary: \"claude-opus-4-6\", fallback: [\"gemini-2.5-pro\"] },\r\n testing: { primary: \"claude-haiku-4-5\", fallback: [\"gemini-2.5-flash\"] },\r\n bugfix: { primary: \"claude-sonnet-4-6\", fallback: [\"gpt-5.2\"] },\r\n documentation: { primary: \"gemini-2.5-flash\", fallback: [\"claude-haiku-4-5\"] },\r\n },\r\n providers: {\r\n anthropic: { enabled: true },\r\n openai: { enabled: true },\r\n google: { enabled: true },\r\n kimi: { enabled: false },\r\n ollama: { enabled: false, baseUrl: \"http://localhost:11434\" },\r\n },\r\n permissions: {\r\n mode: \"standard\",\r\n allowedPaths: [\"./\"],\r\n blockedCommands: [\"rm -rf /\", \"git push --force\"],\r\n },\r\n splitPanel: {\r\n enabled: true,\r\n backend: \"tmux\",\r\n defaultLayout: \"hub-spoke\",\r\n maxPanes: 6,\r\n },\r\n swarm: {\r\n onboardingComplete: false,\r\n detectedProviders: [],\r\n primaryMasterProvider: undefined,\r\n fallbackMasterProviders: [],\r\n },\r\n cost: {\r\n budgetWarning: 5.0,\r\n budgetHardStop: 20.0,\r\n currency: \"USD\",\r\n },\r\n telemetry: {\r\n enabled: false,\r\n anonymized: true,\r\n },\r\n};\r\n"]}
|