pybao-cli 1.3.3 → 1.3.4

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 (132) hide show
  1. package/README.md +1 -440
  2. package/dist/REPL-DWIFIJDL.js +42 -0
  3. package/dist/{acp-75HO2LBV.js → acp-ZK4PEHBS.js} +26 -26
  4. package/dist/{agentsValidate-6Z57ARKC.js → agentsValidate-CNLZLCPF.js} +7 -7
  5. package/dist/{ask-NXXXCGY4.js → ask-NQBBFHNS.js} +25 -25
  6. package/dist/{autoUpdater-PJMGNPUG.js → autoUpdater-7SQ4X6WM.js} +3 -3
  7. package/dist/{chunk-XXFY63TM.js → chunk-2QWJPY3A.js} +1 -1
  8. package/dist/{chunk-3KNGJX7Q.js → chunk-66YCDEA2.js} +1 -1
  9. package/dist/{chunk-UUNVJZWA.js → chunk-6UHQEJU5.js} +2 -2
  10. package/dist/{chunk-3ZNSAB7B.js → chunk-7X3QUKZJ.js} +3 -3
  11. package/dist/{chunk-Q24ZGKIE.js → chunk-CY54GWA4.js} +1 -1
  12. package/dist/{chunk-6RZIUY5K.js → chunk-DS3EM3LE.js} +3 -3
  13. package/dist/{chunk-4SNFQYCY.js → chunk-EAXM67TE.js} +2 -2
  14. package/dist/{chunk-6WELHKDA.js → chunk-EMMXJ26S.js} +2 -2
  15. package/dist/{chunk-3PDD7M4T.js → chunk-EREH4M6C.js} +1 -1
  16. package/dist/{chunk-VTVTEE5N.js → chunk-FPLHZKHG.js} +11 -11
  17. package/dist/{chunk-SWYJOV5E.js → chunk-G2IOASOV.js} +1 -1
  18. package/dist/{chunk-ZJGXEWKF.js → chunk-H5WLCP2Q.js} +1 -1
  19. package/dist/{chunk-ICTEVBLN.js → chunk-HIP7XQSM.js} +2 -2
  20. package/dist/{chunk-JZDE77EH.js → chunk-JL3N5JHZ.js} +3 -3
  21. package/dist/{chunk-JKGOGSFT.js → chunk-LQH5OITU.js} +3 -3
  22. package/dist/{chunk-Z3HMXDXP.js → chunk-ONRCOGHT.js} +3 -3
  23. package/dist/{chunk-BQA2EOUU.js → chunk-QLP2QCPC.js} +1 -1
  24. package/dist/{chunk-QIHB5PYM.js → chunk-QM5NC7TO.js} +3 -3
  25. package/dist/{chunk-A6PUMROK.js → chunk-S74HKDFU.js} +1 -1
  26. package/dist/{chunk-A6PUMROK.js.map → chunk-S74HKDFU.js.map} +1 -1
  27. package/dist/{chunk-WPTPPOYN.js → chunk-T7WZHV42.js} +2 -2
  28. package/dist/{chunk-T7GPUZVK.js → chunk-TCCONYNZ.js} +2 -2
  29. package/dist/{chunk-HB2P6645.js → chunk-TM6EL75Y.js} +4 -4
  30. package/dist/{chunk-4XPNRLJG.js → chunk-UEANWPJI.js} +4 -4
  31. package/dist/{chunk-HIRIJ2LQ.js → chunk-UWYVKM6V.js} +3 -3
  32. package/dist/{chunk-TXFCNQDE.js → chunk-VVZQUQB5.js} +1 -1
  33. package/dist/{chunk-QBHEERCF.js → chunk-YPIUGZMS.js} +32 -32
  34. package/dist/{chunk-7AAE6EO2.js → chunk-Z7YDRXPH.js} +1 -1
  35. package/dist/{cli-RFYBXM7F.js → cli-ZJ7IBHJY.js} +77 -77
  36. package/dist/commands-26Q4GJ7U.js +46 -0
  37. package/dist/{config-5OPX3H2K.js → config-EUUK7YTG.js} +4 -4
  38. package/dist/{context-THRRBPFP.js → context-MQKNXW2P.js} +5 -5
  39. package/dist/{customCommands-4XOZH44N.js → customCommands-G6OTNNST.js} +4 -4
  40. package/dist/{env-EL4KBHMB.js → env-3A7JSF3L.js} +2 -2
  41. package/dist/index.js +3 -3
  42. package/dist/{kodeAgentSessionLoad-UMPV7MC3.js → kodeAgentSessionLoad-63BYTKTV.js} +4 -4
  43. package/dist/{kodeAgentSessionResume-YJS4FVQM.js → kodeAgentSessionResume-B74VONCU.js} +4 -4
  44. package/dist/{kodeAgentStreamJsonSession-BZS2VDCY.js → kodeAgentStreamJsonSession-E2WXNFYU.js} +1 -1
  45. package/dist/{kodeHooks-VUAWIY2D.js → kodeHooks-KEIFTKSA.js} +4 -4
  46. package/dist/{llm-A3BCM4Q2.js → llm-TFMCL3FJ.js} +26 -26
  47. package/dist/{llmLazy-ZJSRLZVD.js → llmLazy-JF4W3ECN.js} +1 -1
  48. package/dist/{loader-HZQBWO74.js → loader-E3DJWZ43.js} +4 -4
  49. package/dist/{mcp-XKOJ55B2.js → mcp-CLIGTX2Y.js} +7 -7
  50. package/dist/{mentionProcessor-ANYU5MLF.js → mentionProcessor-D44ZKAHF.js} +5 -5
  51. package/dist/{messages-75DL5XBP.js → messages-IFBBCPBX.js} +1 -1
  52. package/dist/{model-OPJGJZRC.js → model-KHNUZMSI.js} +5 -5
  53. package/dist/{openai-DT54BAFP.js → openai-4XFA4KMK.js} +5 -5
  54. package/dist/{outputStyles-TPFVI52O.js → outputStyles-NUAH4FME.js} +4 -4
  55. package/dist/{pluginRuntime-W74PYSZ4.js → pluginRuntime-KYFB3F2O.js} +6 -6
  56. package/dist/{pluginValidation-FALYRVI2.js → pluginValidation-TCIL3PVT.js} +6 -6
  57. package/dist/prompts-JD7BGHKJ.js +48 -0
  58. package/dist/query-J5JOOKFI.js +50 -0
  59. package/dist/{ripgrep-XJGSUBG7.js → ripgrep-BQTXXOCY.js} +3 -3
  60. package/dist/{skillMarketplace-AUGKNCPW.js → skillMarketplace-WPLPA36Z.js} +3 -3
  61. package/dist/{state-DQYRXKTG.js → state-6OLUFGTV.js} +2 -2
  62. package/dist/{theme-MS5HDUBJ.js → theme-FKIHHDYJ.js} +5 -5
  63. package/dist/{toolPermissionSettings-4MPZVYDR.js → toolPermissionSettings-2YSDIYCD.js} +6 -6
  64. package/dist/tools-S6P5P65H.js +47 -0
  65. package/dist/{userInput-F2PGBRFU.js → userInput-5HJRPHLY.js} +27 -27
  66. package/package.json +1 -1
  67. package/dist/REPL-WPV32MTF.js +0 -42
  68. package/dist/commands-YOXMODDO.js +0 -46
  69. package/dist/prompts-J4TPRMJ3.js +0 -48
  70. package/dist/query-K3QKBVDN.js +0 -50
  71. package/dist/tools-QW6SIJLJ.js +0 -47
  72. /package/dist/{REPL-WPV32MTF.js.map → REPL-DWIFIJDL.js.map} +0 -0
  73. /package/dist/{acp-75HO2LBV.js.map → acp-ZK4PEHBS.js.map} +0 -0
  74. /package/dist/{agentsValidate-6Z57ARKC.js.map → agentsValidate-CNLZLCPF.js.map} +0 -0
  75. /package/dist/{ask-NXXXCGY4.js.map → ask-NQBBFHNS.js.map} +0 -0
  76. /package/dist/{autoUpdater-PJMGNPUG.js.map → autoUpdater-7SQ4X6WM.js.map} +0 -0
  77. /package/dist/{chunk-XXFY63TM.js.map → chunk-2QWJPY3A.js.map} +0 -0
  78. /package/dist/{chunk-3KNGJX7Q.js.map → chunk-66YCDEA2.js.map} +0 -0
  79. /package/dist/{chunk-UUNVJZWA.js.map → chunk-6UHQEJU5.js.map} +0 -0
  80. /package/dist/{chunk-3ZNSAB7B.js.map → chunk-7X3QUKZJ.js.map} +0 -0
  81. /package/dist/{chunk-Q24ZGKIE.js.map → chunk-CY54GWA4.js.map} +0 -0
  82. /package/dist/{chunk-6RZIUY5K.js.map → chunk-DS3EM3LE.js.map} +0 -0
  83. /package/dist/{chunk-4SNFQYCY.js.map → chunk-EAXM67TE.js.map} +0 -0
  84. /package/dist/{chunk-6WELHKDA.js.map → chunk-EMMXJ26S.js.map} +0 -0
  85. /package/dist/{chunk-3PDD7M4T.js.map → chunk-EREH4M6C.js.map} +0 -0
  86. /package/dist/{chunk-VTVTEE5N.js.map → chunk-FPLHZKHG.js.map} +0 -0
  87. /package/dist/{chunk-SWYJOV5E.js.map → chunk-G2IOASOV.js.map} +0 -0
  88. /package/dist/{chunk-ZJGXEWKF.js.map → chunk-H5WLCP2Q.js.map} +0 -0
  89. /package/dist/{chunk-ICTEVBLN.js.map → chunk-HIP7XQSM.js.map} +0 -0
  90. /package/dist/{chunk-JZDE77EH.js.map → chunk-JL3N5JHZ.js.map} +0 -0
  91. /package/dist/{chunk-JKGOGSFT.js.map → chunk-LQH5OITU.js.map} +0 -0
  92. /package/dist/{chunk-Z3HMXDXP.js.map → chunk-ONRCOGHT.js.map} +0 -0
  93. /package/dist/{chunk-BQA2EOUU.js.map → chunk-QLP2QCPC.js.map} +0 -0
  94. /package/dist/{chunk-QIHB5PYM.js.map → chunk-QM5NC7TO.js.map} +0 -0
  95. /package/dist/{chunk-WPTPPOYN.js.map → chunk-T7WZHV42.js.map} +0 -0
  96. /package/dist/{chunk-T7GPUZVK.js.map → chunk-TCCONYNZ.js.map} +0 -0
  97. /package/dist/{chunk-HB2P6645.js.map → chunk-TM6EL75Y.js.map} +0 -0
  98. /package/dist/{chunk-4XPNRLJG.js.map → chunk-UEANWPJI.js.map} +0 -0
  99. /package/dist/{chunk-HIRIJ2LQ.js.map → chunk-UWYVKM6V.js.map} +0 -0
  100. /package/dist/{chunk-TXFCNQDE.js.map → chunk-VVZQUQB5.js.map} +0 -0
  101. /package/dist/{chunk-QBHEERCF.js.map → chunk-YPIUGZMS.js.map} +0 -0
  102. /package/dist/{chunk-7AAE6EO2.js.map → chunk-Z7YDRXPH.js.map} +0 -0
  103. /package/dist/{cli-RFYBXM7F.js.map → cli-ZJ7IBHJY.js.map} +0 -0
  104. /package/dist/{commands-YOXMODDO.js.map → commands-26Q4GJ7U.js.map} +0 -0
  105. /package/dist/{config-5OPX3H2K.js.map → config-EUUK7YTG.js.map} +0 -0
  106. /package/dist/{context-THRRBPFP.js.map → context-MQKNXW2P.js.map} +0 -0
  107. /package/dist/{customCommands-4XOZH44N.js.map → customCommands-G6OTNNST.js.map} +0 -0
  108. /package/dist/{env-EL4KBHMB.js.map → env-3A7JSF3L.js.map} +0 -0
  109. /package/dist/{kodeAgentSessionLoad-UMPV7MC3.js.map → kodeAgentSessionLoad-63BYTKTV.js.map} +0 -0
  110. /package/dist/{kodeAgentSessionResume-YJS4FVQM.js.map → kodeAgentSessionResume-B74VONCU.js.map} +0 -0
  111. /package/dist/{kodeAgentStreamJsonSession-BZS2VDCY.js.map → kodeAgentStreamJsonSession-E2WXNFYU.js.map} +0 -0
  112. /package/dist/{kodeHooks-VUAWIY2D.js.map → kodeHooks-KEIFTKSA.js.map} +0 -0
  113. /package/dist/{llm-A3BCM4Q2.js.map → llm-TFMCL3FJ.js.map} +0 -0
  114. /package/dist/{llmLazy-ZJSRLZVD.js.map → llmLazy-JF4W3ECN.js.map} +0 -0
  115. /package/dist/{loader-HZQBWO74.js.map → loader-E3DJWZ43.js.map} +0 -0
  116. /package/dist/{mcp-XKOJ55B2.js.map → mcp-CLIGTX2Y.js.map} +0 -0
  117. /package/dist/{mentionProcessor-ANYU5MLF.js.map → mentionProcessor-D44ZKAHF.js.map} +0 -0
  118. /package/dist/{messages-75DL5XBP.js.map → messages-IFBBCPBX.js.map} +0 -0
  119. /package/dist/{model-OPJGJZRC.js.map → model-KHNUZMSI.js.map} +0 -0
  120. /package/dist/{openai-DT54BAFP.js.map → openai-4XFA4KMK.js.map} +0 -0
  121. /package/dist/{outputStyles-TPFVI52O.js.map → outputStyles-NUAH4FME.js.map} +0 -0
  122. /package/dist/{pluginRuntime-W74PYSZ4.js.map → pluginRuntime-KYFB3F2O.js.map} +0 -0
  123. /package/dist/{pluginValidation-FALYRVI2.js.map → pluginValidation-TCIL3PVT.js.map} +0 -0
  124. /package/dist/{prompts-J4TPRMJ3.js.map → prompts-JD7BGHKJ.js.map} +0 -0
  125. /package/dist/{query-K3QKBVDN.js.map → query-J5JOOKFI.js.map} +0 -0
  126. /package/dist/{ripgrep-XJGSUBG7.js.map → ripgrep-BQTXXOCY.js.map} +0 -0
  127. /package/dist/{skillMarketplace-AUGKNCPW.js.map → skillMarketplace-WPLPA36Z.js.map} +0 -0
  128. /package/dist/{state-DQYRXKTG.js.map → state-6OLUFGTV.js.map} +0 -0
  129. /package/dist/{theme-MS5HDUBJ.js.map → theme-FKIHHDYJ.js.map} +0 -0
  130. /package/dist/{toolPermissionSettings-4MPZVYDR.js.map → toolPermissionSettings-2YSDIYCD.js.map} +0 -0
  131. /package/dist/{tools-QW6SIJLJ.js.map → tools-S6P5P65H.js.map} +0 -0
  132. /package/dist/{userInput-F2PGBRFU.js.map → userInput-5HJRPHLY.js.map} +0 -0
package/README.md CHANGED
@@ -1,440 +1 @@
1
- # PYB-ts
2
-
3
- A small AI agent implementation that delivers complex problem-solving capabilities with the least amount of code.
4
-
5
- ## Project Overview
6
-
7
- PYB-CLI is an AI agent implementation that follows the minimalist agent philosophy, embodying the core concept of "letting LLMs do what they do best." This implementation achieves core functionality with minimal code, fully leveraging LLMs as general problem-solving engines.
8
-
9
- <img width="991" height="479" alt="image" src="https://github.com/user-attachments/assets/c1751e92-94dc-4e4a-9558-8cd2d058c1a1" /> <br>
10
- [![npm version](https://badge.fury.io/js/pyb-ts.svg)](https://www.npmjs.com/package/pyb-ts)
11
- [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
12
-
13
- [中文文档](README.zh-CN.md) | [Contributing](CONTRIBUTING.md) | [Documentation](docs/)
14
-
15
- <img width="90%" alt="image" src="https://github.com/user-attachments/assets/fdce7017-8095-429d-b74e-07f43a6919e1" />
16
-
17
- <img width="90%" alt="2c0ad8540f2872d197c7b17ae23d74f5" src="https://github.com/user-attachments/assets/f220cc27-084d-468e-a3f4-d5bc44d84fac" />
18
-
19
- <img width="90%" alt="f266d316d90ddd0db5a3d640c1126930" src="https://github.com/user-attachments/assets/90ec7399-1349-4607-b689-96613b3dc3e2" />
20
-
21
-
22
- <img width="90%" alt="image" src="https://github.com/user-attachments/assets/b30696ce-5ab1-40a0-b741-c7ef3945dba0" />
23
-
24
-
25
- ## 📢 Update Log
26
-
27
- **2025-08-29**: We've added Windows support! All Windows users can now run PYB-ts using Git Bash, Unix subsystems, or WSL (Windows Subsystem for Linux) on their computers.
28
-
29
- **2025-12-30**: Windows now works out of the box with native cmd.exe support. Git Bash and WSL are optional but recommended for the best experience.
30
-
31
-
32
- ## 🤝 AGENTS.md Standard Support
33
-
34
- **PYB-ts proudly supports the [AGENTS.md standard protocol](https://agents.md) initiated by OpenAI** - a simple, open format for guiding programming agents that's used by 20k+ open source projects.
35
-
36
- ### Full Compatibility with Multiple Standards
37
-
38
- - ✅ **AGENTS.md** - Native support for the OpenAI-initiated standard format
39
- - ✅ **CLAUDE.md** - Full backward compatibility with Claude Code `.claude` configurations
40
- - ✅ **Subagent System** - Advanced agent delegation and task orchestration
41
- - ✅ **Cross-platform** - Works with 20+ AI models and providers
42
-
43
- Use `# Your documentation request` to generate and maintain your AGENTS.md file automatically, while preserving compatibility with existing `.claude` workflows.
44
-
45
- ## Overview
46
-
47
- Kode is a powerful AI assistant that lives in your terminal. It can understand your codebase, edit files, run commands, and handle entire workflows for you.
48
-
49
- > **⚠️ Security Notice**: Kode runs in YOLO mode by default (equivalent to Claude Code's `--dangerously-skip-permissions` flag), bypassing all permission checks for maximum productivity. YOLO mode is recommended only for trusted, secure environments when working on non-critical projects. If you're working with important files or using models of questionable capability, we strongly recommend using `kode --safe` to enable permission checks and manual approval for all operations.
50
- >
51
- > **📊 Model Performance**: For optimal performance, we recommend using newer, more capable models designed for autonomous task completion. Avoid older Q&A-focused models like GPT-4o or Gemini 2.5 Pro, which are optimized for answering questions rather than sustained independent task execution. Choose models specifically trained for agentic workflows and extended reasoning capabilities.
52
-
53
- <img width="600" height="577" alt="image" src="https://github.com/user-attachments/assets/8b46a39d-1ab6-4669-9391-14ccc6c5234c" />
54
-
55
- ## Features
56
-
57
- ### Core Capabilities
58
- - 🤖 **AI-Powered Assistance** - Uses advanced AI models to understand and respond to your requests
59
- - 🔄 **Multi-Model Collaboration** - Flexibly switch and combine multiple AI models to leverage their unique strengths
60
- - 🦜 **Expert Model Consultation** - Use `@ask-model-name` to consult specific AI models for specialized analysis
61
- - 👤 **Intelligent Agent System** - Use `@run-agent-name` to delegate tasks to specialized subagents
62
- - 📝 **Code Editing** - Directly edit files with intelligent suggestions and improvements
63
- - 🔍 **Codebase Understanding** - Analyzes your project structure and code relationships
64
- - 🚀 **Command Execution** - Run shell commands and see results in real-time
65
- - 🛠️ **Workflow Automation** - Handle complex development tasks with simple prompts
66
-
67
- ### Authoring Comfort
68
- - `Ctrl+G` opens your message in your preferred editor (respects `$EDITOR`/`$VISUAL`; falls back to code/nano/vim/notepad) and returns the text to the prompt when you close it.
69
- - `Shift+Enter` inserts a newline inside the prompt without sending; plain Enter submits. `Ctrl+M` switches the active model.
70
-
71
- ### 🎯 Advanced Intelligent Completion System
72
- Our state-of-the-art completion system provides unparalleled coding assistance:
73
-
74
- #### Smart Fuzzy Matching
75
- - **Hyphen-Aware Matching** - Type `dao` to match `run-agent-dao-qi-harmony-designer`
76
- - **Abbreviation Support** - `dq` matches `dao-qi`, `nde` matches `node`
77
- - **Numeric Suffix Handling** - `py3` intelligently matches `python3`
78
- - **Multi-Algorithm Fusion** - Combines 7+ matching algorithms for best results
79
-
80
- #### Intelligent Context Detection
81
- - **No @ Required** - Type `gp5` directly to match `@ask-gpt-5`
82
- - **Auto-Prefix Addition** - Tab/Enter automatically adds `@` for agents and models
83
- - **Mixed Completion** - Seamlessly switch between commands, files, agents, and models
84
- - **Smart Prioritization** - Results ranked by relevance and usage frequency
85
-
86
- #### Unix Command Optimization
87
- - **500+ Common Commands** - Curated database of frequently used Unix/Linux commands
88
- - **System Intersection** - Only shows commands that actually exist on your system
89
- - **Priority Scoring** - Common commands appear first (git, npm, docker, etc.)
90
- - **Real-time Loading** - Dynamic command discovery from system PATH
91
-
92
- ### User Experience
93
- - 🎨 **Interactive UI** - Beautiful terminal interface with syntax highlighting
94
- - 🔌 **Tool System** - Extensible architecture with specialized tools for different tasks
95
- - 💾 **Context Management** - Smart context handling to maintain conversation continuity
96
- - 📋 **AGENTS.md Integration** - Use `# documentation requests` to auto-generate and maintain project documentation
97
-
98
- ## Installation
99
-
100
- ```bash
101
- npm install -g @shareai-lab/kode
102
- ```
103
-
104
- After installation, you can use any of these commands:
105
- - `kode` - Primary command
106
- - `kwa` - Kode With Agent (alternative)
107
- - `kd` - Ultra-short alias
108
-
109
- ### Windows Notes
110
-
111
- - **Git Bash is optional**: Kode now works natively with Windows cmd.exe and PowerShell.
112
- - Kode automatically prefers Git Bash/MSYS or WSL Bash when available for better Unix compatibility.
113
- - If neither is available, it uses cmd.exe which works out of the box.
114
- - For best experience, consider using VS Code's integrated terminal:
115
- - Better font rendering and icon support.
116
- - Fewer path and encoding quirks compared to legacy Command Prompt.
117
- - Optional: Install Git for Windows for enhanced Unix-like functionality: https://git-scm.com/download/win
118
- - If you install globally via npm, avoid spaces in the global prefix path to prevent shim issues.
119
- - Example: `npm config set prefix "C:\\npm"` and reinstall global packages.
120
-
121
- ## Usage
122
-
123
- ### Interactive Mode
124
- Start an interactive session:
125
- ```bash
126
- kode
127
- # or
128
- kwa
129
- # or
130
- kd
131
- ```
132
-
133
- ### Non-Interactive Mode
134
- Get a quick response:
135
- ```bash
136
- kode -p "explain this function" path/to/file.js
137
- # or
138
- kwa -p "explain this function" path/to/file.js
139
- ```
140
-
141
- ### Using the @ Mention System
142
-
143
- Kode supports a powerful @ mention system for intelligent completions:
144
-
145
- #### 🦜 Expert Model Consultation
146
- ```bash
147
- # Consult specific AI models for expert opinions
148
- @ask-claude-sonnet-4 How should I optimize this React component for performance?
149
- @ask-gpt-5 What are the security implications of this authentication method?
150
- @ask-o1-preview Analyze the complexity of this algorithm
151
- ```
152
-
153
- #### 👤 Specialized Agent Delegation
154
- ```bash
155
- # Delegate tasks to specialized subagents
156
- @run-agent-simplicity-auditor Review this code for over-engineering
157
- @run-agent-architect Design a microservices architecture for this system
158
- @run-agent-test-writer Create comprehensive tests for these modules
159
- ```
160
-
161
- #### 📁 Smart File References
162
- ```bash
163
- # Reference files and directories with auto-completion
164
- @src/components/Button.tsx
165
- @docs/api-reference.md
166
- @.env.example
167
- ```
168
-
169
- The @ mention system provides intelligent completions as you type, showing available models, agents, and files.
170
-
171
- ### AGENTS.md Documentation Mode
172
-
173
- Use the `#` prefix to generate and maintain your AGENTS.md documentation:
174
-
175
- ```bash
176
- # Generate setup instructions
177
- # How do I set up the development environment?
178
-
179
- # Create testing documentation
180
- # What are the testing procedures for this project?
181
-
182
- # Document deployment process
183
- # Explain the deployment pipeline and requirements
184
- ```
185
-
186
- This mode automatically formats responses as structured documentation and appends them to your AGENTS.md file.
187
-
188
- ### Docker Usage
189
-
190
- #### Alternative: Build from local source
191
-
192
- ```bash
193
- # Clone the repository
194
- git clone https://github.com/shareAI-lab/Kode.git
195
- cd Kode
196
-
197
- # Build the image locally
198
- docker build --no-cache -t kode .
199
-
200
- # Run in your project directory
201
- cd your-project
202
- docker run -it --rm \
203
- -v $(pwd):/workspace \
204
- -v ~/.kode:/root/.kode \
205
- -v ~/.kode.json:/root/.kode.json \
206
- -w /workspace \
207
- kode
208
- ```
209
-
210
- #### Docker Configuration Details
211
-
212
- The Docker setup includes:
213
-
214
- - **Volume Mounts**:
215
- - `$(pwd):/workspace` - Mounts your current project directory
216
- - `~/.kode:/root/.kode` - Preserves your kode configuration directory between runs
217
- - `~/.kode.json:/root/.kode.json` - Preserves your kode global configuration file between runs
218
-
219
- - **Working Directory**: Set to `/workspace` inside the container
220
-
221
- - **Interactive Mode**: Uses `-it` flags for interactive terminal access
222
-
223
- - **Cleanup**: `--rm` flag removes the container after exit
224
-
225
- **Note**: Kode uses both `~/.kode` directory for additional data (like memory files) and `~/.kode.json` file for global configuration.
226
-
227
- The first time you run the Docker command, it will build the image. Subsequent runs will use the cached image for faster startup.
228
-
229
- You can use the onboarding to set up the model, or `/model`.
230
- If you don't see the models you want on the list, you can manually set them in `/config`
231
- As long as you have an openai-like endpoint, it should work.
232
-
233
- ### Commands
234
-
235
- - `/help` - Show available commands
236
- - `/model` - Change AI model settings
237
- - `/config` - Open configuration panel
238
- - `/cost` - Show token usage and costs
239
- - `/clear` - Clear conversation history
240
- - `/compact-threshold` - View or set auto-compact threshold ratio (e.g. `/compact-threshold 0.85` or `/compact-threshold 85%`)
241
-
242
- | Value | Effect | Use Case |
243
- |-------|--------|----------|
244
- | 0.80 | Compress earlier, more conservative | Small context models (e.g. deepseek 131k) |
245
- | 0.85 | Balanced | Medium context models |
246
- | 0.90 | Default | Large context models (e.g. Claude 200k) |
247
-
248
- - `/init` - Initialize project context
249
-
250
- ## Multi-Model Intelligent Collaboration
251
-
252
- Unlike official Claude which supports only a single model, Kode implements **true multi-model collaboration**, allowing you to fully leverage the unique strengths of different AI models.
253
-
254
- ### 🏗️ Core Technical Architecture
255
-
256
- #### 1. **ModelManager Multi-Model Manager**
257
- We designed a unified `ModelManager` system that supports:
258
- - **Model Profiles**: Each model has an independent configuration file containing API endpoints, authentication, context window size, cost parameters, etc.
259
- - **Model Pointers**: Users can configure default models for different purposes in the `/model` command:
260
- - `main`: Default model for main Agent
261
- - `task`: Default model for SubAgent
262
- - `reasoning`: Reserved for future ThinkTool usage
263
- - `quick`: Fast model for simple NLP tasks (security identification, title generation, etc.)
264
- - **Dynamic Model Switching**: Support runtime model switching without restarting sessions, maintaining context continuity
265
-
266
- #### 2. **TaskTool Intelligent Task Distribution**
267
- Our specially designed `TaskTool` (Architect tool) implements:
268
- - **Subagent Mechanism**: Can launch multiple sub-agents to process tasks in parallel
269
- - **Model Parameter Passing**: Users can specify which model SubAgents should use in their requests
270
- - **Default Model Configuration**: SubAgents use the model configured by the `task` pointer by default
271
-
272
- #### 3. **AskExpertModel Expert Consultation Tool**
273
- We specially designed the `AskExpertModel` tool:
274
- - **Expert Model Invocation**: Allows temporarily calling specific expert models to solve difficult problems during conversations
275
- - **Model Isolation Execution**: Expert model responses are processed independently without affecting the main conversation flow
276
- - **Knowledge Integration**: Integrates expert model insights into the current task
277
-
278
- #### 🎯 Flexible Model Switching
279
- - **Tab Key Quick Switch**: Press Tab in the input box to quickly switch the model for the current conversation
280
- - **`/model` Command**: Use `/model` command to configure and manage multiple model profiles, set default models for different purposes
281
- - **User Control**: Users can specify specific models for task processing at any time
282
-
283
- #### 🔄 Intelligent Work Allocation Strategy
284
-
285
- **Architecture Design Phase**
286
- - Use **o3 model** or **GPT-5 model** to explore system architecture and formulate sharp and clear technical solutions
287
- - These models excel in abstract thinking and system design
288
-
289
- **Solution Refinement Phase**
290
- - Use **gemini model** to deeply explore production environment design details
291
- - Leverage its deep accumulation in practical engineering and balanced reasoning capabilities
292
-
293
- **Code Implementation Phase**
294
- - Use **Qwen Coder model**, **Kimi k2 model**, **GLM-4.5 model**, or **Claude Sonnet 4 model** for specific code writing
295
- - These models have strong performance in code generation, file editing, and engineering implementation
296
- - Support parallel processing of multiple coding tasks through subagents
297
-
298
- **Problem Solving**
299
- - When encountering complex problems, consult expert models like **o3 model**, **Claude Opus 4.1 model**, or **Grok 4 model**
300
- - Obtain deep technical insights and innovative solutions
301
-
302
- #### 💡 Practical Application Scenarios
303
-
304
- ```bash
305
- # Example 1: Architecture Design
306
- "Use o3 model to help me design a high-concurrency message queue system architecture"
307
-
308
- # Example 2: Multi-Model Collaboration
309
- "First use GPT-5 model to analyze the root cause of this performance issue, then use Claude Sonnet 4 model to write optimization code"
310
-
311
- # Example 3: Parallel Task Processing
312
- "Use Qwen Coder model as subagent to refactor these three modules simultaneously"
313
-
314
- # Example 4: Expert Consultation
315
- "This memory leak issue is tricky, ask Claude Opus 4.1 model separately for solutions"
316
-
317
- # Example 5: Code Review
318
- "Have Kimi k2 model review the code quality of this PR"
319
-
320
- # Example 6: Complex Reasoning
321
- "Use Grok 4 model to help me derive the time complexity of this algorithm"
322
-
323
- # Example 7: Solution Design
324
- "Have GLM-4.5 model design a microservice decomposition plan"
325
- ```
326
-
327
- ### 🛠️ Key Implementation Mechanisms
328
-
329
- #### **Configuration System**
330
- ```typescript
331
- // Example of multi-model configuration support
332
- {
333
- "modelProfiles": {
334
- "o3": { "provider": "openai", "model": "o3", "apiKey": "..." },
335
- "claude4": { "provider": "anthropic", "model": "claude-sonnet-4", "apiKey": "..." },
336
- "qwen": { "provider": "alibaba", "model": "qwen-coder", "apiKey": "..." }
337
- },
338
- "modelPointers": {
339
- "main": "claude4", // Main conversation model
340
- "task": "qwen", // Task execution model
341
- "reasoning": "o3", // Reasoning model
342
- "quick": "glm-4.5" // Quick response model
343
- }
344
- }
345
- ```
346
-
347
- #### **Cost Tracking System**
348
- - **Usage Statistics**: Use `/cost` command to view token usage and costs for each model
349
- - **Multi-Model Cost Comparison**: Track usage costs of different models in real-time
350
- - **History Records**: Save cost data for each session
351
-
352
- #### **Context Manager**
353
- - **Context Inheritance**: Maintain conversation continuity when switching models
354
- - **Context Window Adaptation**: Automatically adjust based on different models' context window sizes
355
- - **Session State Preservation**: Ensure information consistency during multi-model collaboration
356
-
357
- ### 🚀 Advantages of Multi-Model Collaboration
358
-
359
- 1. **Maximized Efficiency**: Each task is handled by the most suitable model
360
- 2. **Cost Optimization**: Use lightweight models for simple tasks, powerful models for complex tasks
361
- 3. **Parallel Processing**: Multiple models can work on different subtasks simultaneously
362
- 4. **Flexible Switching**: Switch models based on task requirements without restarting sessions
363
- 5. **Leveraging Strengths**: Combine advantages of different models for optimal overall results
364
-
365
- ### 📊 Comparison with Official Implementation
366
-
367
- | Feature | Kode | Official Claude |
368
- |---------|------|-----------------|
369
- | Number of Supported Models | Unlimited, configurable for any model | Only supports single Claude model |
370
- | Model Switching | ✅ Tab key quick switch | ❌ Requires session restart |
371
- | Parallel Processing | ✅ Multiple SubAgents work in parallel | ❌ Single-threaded processing |
372
- | Cost Tracking | ✅ Separate statistics for multiple models | ❌ Single model cost |
373
- | Task Model Configuration | ✅ Different default models for different purposes | ❌ Same model for all tasks |
374
- | Expert Consultation | ✅ AskExpertModel tool | ❌ Not supported |
375
-
376
- This multi-model collaboration capability makes Kode a true **AI Development Workbench**, not just a single AI assistant.
377
-
378
- ## Development
379
-
380
- Kode is built with modern tools and requires [Bun](https://bun.sh) for development.
381
-
382
- ### Install Bun
383
-
384
- ```bash
385
- # macOS/Linux
386
- curl -fsSL https://bun.sh/install | bash
387
-
388
- # Windows
389
- powershell -c "irm bun.sh/install.ps1 | iex"
390
- ```
391
-
392
- ### Setup Development Environment
393
-
394
- ```bash
395
- # Clone the repository
396
- git clone https://github.com/shareAI-lab/kode.git
397
- cd kode
398
-
399
- # Install dependencies
400
- bun install
401
-
402
- # Run in development mode
403
- bun run dev
404
- ```
405
-
406
- ### Build
407
-
408
- ```bash
409
- bun run build
410
- ```
411
-
412
- ### Testing
413
-
414
- ```bash
415
- # Run tests
416
- bun test
417
-
418
- # Test the CLI
419
- ./cli.js --help
420
- ```
421
-
422
- ## Contributing
423
-
424
- We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
425
-
426
- ## License
427
-
428
- Apache 2.0 License - see [LICENSE](LICENSE) for details.
429
-
430
- ## Thanks
431
-
432
- - Some code from @dnakov's anonkode
433
- - Some UI learned from gemini-cli
434
- - Some system design learned from claude code
435
-
436
- ## Support
437
-
438
- - 📚 [Documentation](docs/)
439
- - 🐛 [Report Issues](https://github.com/shareAI-lab/kode/issues)
440
- - 💬 [Discussions](https://github.com/shareAI-lab/kode/discussions)
1
+ PYB-CLI is an AI agent implementation that follows the minimalist agent philosophy, embodying the core concept of "letting LLMs do what they do best." This implementation achieves core functionality with minimal code, fully leveraging LLMs as general problem-solving engines.
@@ -0,0 +1,42 @@
1
+ import { createRequire as __pybCreateRequire } from "node:module";
2
+ const require = __pybCreateRequire(import.meta.url);
3
+ import {
4
+ REPL
5
+ } from "./chunk-YPIUGZMS.js";
6
+ import "./chunk-2QWJPY3A.js";
7
+ import "./chunk-UEANWPJI.js";
8
+ import "./chunk-QM5NC7TO.js";
9
+ import "./chunk-CY54GWA4.js";
10
+ import "./chunk-H5WLCP2Q.js";
11
+ import "./chunk-EMMXJ26S.js";
12
+ import "./chunk-5P7HBXTD.js";
13
+ import "./chunk-3DFBSQIT.js";
14
+ import "./chunk-UWYVKM6V.js";
15
+ import "./chunk-T6GVXTNQ.js";
16
+ import "./chunk-EAXM67TE.js";
17
+ import "./chunk-T7WZHV42.js";
18
+ import "./chunk-TM6EL75Y.js";
19
+ import "./chunk-EREH4M6C.js";
20
+ import "./chunk-TCCONYNZ.js";
21
+ import "./chunk-DS3EM3LE.js";
22
+ import "./chunk-Z7YDRXPH.js";
23
+ import "./chunk-UNNVICVU.js";
24
+ import "./chunk-6UHQEJU5.js";
25
+ import "./chunk-ERMQRV55.js";
26
+ import "./chunk-HIP7XQSM.js";
27
+ import "./chunk-A3BVXXA3.js";
28
+ import "./chunk-BJSWTHRM.js";
29
+ import "./chunk-G2IOASOV.js";
30
+ import "./chunk-ONRCOGHT.js";
31
+ import "./chunk-7X3QUKZJ.js";
32
+ import "./chunk-QLP2QCPC.js";
33
+ import "./chunk-JL3N5JHZ.js";
34
+ import "./chunk-RQVLBMP7.js";
35
+ import "./chunk-66YCDEA2.js";
36
+ import "./chunk-VVZQUQB5.js";
37
+ import "./chunk-S74HKDFU.js";
38
+ import "./chunk-OUXHGDLH.js";
39
+ import "./chunk-BH3Y62E3.js";
40
+ export {
41
+ REPL
42
+ };
@@ -6,60 +6,60 @@ import {
6
6
  } from "./chunk-VRGR4ZTQ.js";
7
7
  import {
8
8
  getTools
9
- } from "./chunk-VTVTEE5N.js";
9
+ } from "./chunk-FPLHZKHG.js";
10
10
  import {
11
11
  getCommands,
12
12
  getSystemPrompt,
13
13
  grantReadPermissionForOriginalDir,
14
14
  hasPermissionsToUseTool,
15
15
  query
16
- } from "./chunk-QBHEERCF.js";
17
- import "./chunk-XXFY63TM.js";
16
+ } from "./chunk-YPIUGZMS.js";
17
+ import "./chunk-2QWJPY3A.js";
18
18
  import {
19
19
  getClients
20
- } from "./chunk-4XPNRLJG.js";
21
- import "./chunk-QIHB5PYM.js";
22
- import "./chunk-Q24ZGKIE.js";
23
- import "./chunk-ZJGXEWKF.js";
24
- import "./chunk-6WELHKDA.js";
20
+ } from "./chunk-UEANWPJI.js";
21
+ import "./chunk-QM5NC7TO.js";
22
+ import "./chunk-CY54GWA4.js";
23
+ import "./chunk-H5WLCP2Q.js";
24
+ import "./chunk-EMMXJ26S.js";
25
25
  import "./chunk-5P7HBXTD.js";
26
26
  import "./chunk-3DFBSQIT.js";
27
- import "./chunk-HIRIJ2LQ.js";
27
+ import "./chunk-UWYVKM6V.js";
28
28
  import "./chunk-T6GVXTNQ.js";
29
- import "./chunk-4SNFQYCY.js";
30
- import "./chunk-WPTPPOYN.js";
31
- import "./chunk-HB2P6645.js";
32
- import "./chunk-3PDD7M4T.js";
33
- import "./chunk-T7GPUZVK.js";
29
+ import "./chunk-EAXM67TE.js";
30
+ import "./chunk-T7WZHV42.js";
31
+ import "./chunk-TM6EL75Y.js";
32
+ import "./chunk-EREH4M6C.js";
33
+ import "./chunk-TCCONYNZ.js";
34
34
  import {
35
35
  loadToolPermissionContextFromDisk,
36
36
  persistToolPermissionUpdateToDisk
37
- } from "./chunk-6RZIUY5K.js";
38
- import "./chunk-7AAE6EO2.js";
37
+ } from "./chunk-DS3EM3LE.js";
38
+ import "./chunk-Z7YDRXPH.js";
39
39
  import {
40
40
  applyToolPermissionContextUpdates
41
41
  } from "./chunk-UNNVICVU.js";
42
- import "./chunk-UUNVJZWA.js";
42
+ import "./chunk-6UHQEJU5.js";
43
43
  import "./chunk-ERMQRV55.js";
44
- import "./chunk-ICTEVBLN.js";
44
+ import "./chunk-HIP7XQSM.js";
45
45
  import "./chunk-A3BVXXA3.js";
46
46
  import "./chunk-BJSWTHRM.js";
47
47
  import {
48
48
  createAssistantMessage,
49
49
  createUserMessage
50
- } from "./chunk-SWYJOV5E.js";
51
- import "./chunk-Z3HMXDXP.js";
50
+ } from "./chunk-G2IOASOV.js";
51
+ import "./chunk-ONRCOGHT.js";
52
52
  import {
53
53
  getContext
54
- } from "./chunk-3ZNSAB7B.js";
55
- import "./chunk-BQA2EOUU.js";
54
+ } from "./chunk-7X3QUKZJ.js";
55
+ import "./chunk-QLP2QCPC.js";
56
56
  import {
57
57
  enableConfigs
58
- } from "./chunk-JZDE77EH.js";
58
+ } from "./chunk-JL3N5JHZ.js";
59
59
  import "./chunk-RQVLBMP7.js";
60
60
  import {
61
61
  initDebugLogger
62
- } from "./chunk-3KNGJX7Q.js";
62
+ } from "./chunk-66YCDEA2.js";
63
63
  import {
64
64
  PRODUCT_COMMAND,
65
65
  getKodeBaseDir,
@@ -67,10 +67,10 @@ import {
67
67
  logError,
68
68
  setCwd,
69
69
  setOriginalCwd
70
- } from "./chunk-TXFCNQDE.js";
70
+ } from "./chunk-VVZQUQB5.js";
71
71
  import {
72
72
  MACRO
73
- } from "./chunk-A6PUMROK.js";
73
+ } from "./chunk-S74HKDFU.js";
74
74
  import "./chunk-OUXHGDLH.js";
75
75
  import "./chunk-BH3Y62E3.js";
76
76
 
@@ -2,12 +2,12 @@ import { createRequire as __pybCreateRequire } from "node:module";
2
2
  const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  getModelManager
5
- } from "./chunk-Z3HMXDXP.js";
6
- import "./chunk-JZDE77EH.js";
5
+ } from "./chunk-ONRCOGHT.js";
6
+ import "./chunk-JL3N5JHZ.js";
7
7
  import "./chunk-RQVLBMP7.js";
8
- import "./chunk-3KNGJX7Q.js";
9
- import "./chunk-TXFCNQDE.js";
10
- import "./chunk-A6PUMROK.js";
8
+ import "./chunk-66YCDEA2.js";
9
+ import "./chunk-VVZQUQB5.js";
10
+ import "./chunk-S74HKDFU.js";
11
11
  import "./chunk-BH3Y62E3.js";
12
12
 
13
13
  // src/entrypoints/cli/agentsValidate.ts
@@ -344,8 +344,8 @@ async function validateAgentTemplates(args) {
344
344
  let knownToolNames;
345
345
  if (args.checkTools) {
346
346
  try {
347
- const { getTools } = await import("./tools-QW6SIJLJ.js");
348
- const { getCurrentProjectConfig } = await import("./config-5OPX3H2K.js");
347
+ const { getTools } = await import("./tools-S6P5P65H.js");
348
+ const { getCurrentProjectConfig } = await import("./config-EUUK7YTG.js");
349
349
  const allTools = await getTools(getCurrentProjectConfig().enableArchitectTool);
350
350
  knownToolNames = new Set(allTools.map((t) => t.name));
351
351
  } catch {