pybao-cli 1.3.3

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 (185) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +440 -0
  3. package/README.zh-CN.md +338 -0
  4. package/cli-acp.js +82 -0
  5. package/cli.js +105 -0
  6. package/dist/REPL-WPV32MTF.js +42 -0
  7. package/dist/REPL-WPV32MTF.js.map +7 -0
  8. package/dist/acp-75HO2LBV.js +1357 -0
  9. package/dist/acp-75HO2LBV.js.map +7 -0
  10. package/dist/agentsValidate-6Z57ARKC.js +373 -0
  11. package/dist/agentsValidate-6Z57ARKC.js.map +7 -0
  12. package/dist/ask-NXXXCGY4.js +125 -0
  13. package/dist/ask-NXXXCGY4.js.map +7 -0
  14. package/dist/autoUpdater-PJMGNPUG.js +17 -0
  15. package/dist/autoUpdater-PJMGNPUG.js.map +7 -0
  16. package/dist/chunk-27GYWUY2.js +72 -0
  17. package/dist/chunk-27GYWUY2.js.map +7 -0
  18. package/dist/chunk-3DFBSQIT.js +23 -0
  19. package/dist/chunk-3DFBSQIT.js.map +7 -0
  20. package/dist/chunk-3KNGJX7Q.js +794 -0
  21. package/dist/chunk-3KNGJX7Q.js.map +7 -0
  22. package/dist/chunk-3PDD7M4T.js +164 -0
  23. package/dist/chunk-3PDD7M4T.js.map +7 -0
  24. package/dist/chunk-3ZNSAB7B.js +515 -0
  25. package/dist/chunk-3ZNSAB7B.js.map +7 -0
  26. package/dist/chunk-4SNFQYCY.js +511 -0
  27. package/dist/chunk-4SNFQYCY.js.map +7 -0
  28. package/dist/chunk-4XPNRLJG.js +1609 -0
  29. package/dist/chunk-4XPNRLJG.js.map +7 -0
  30. package/dist/chunk-5P7HBXTD.js +12 -0
  31. package/dist/chunk-5P7HBXTD.js.map +7 -0
  32. package/dist/chunk-6RZIUY5K.js +191 -0
  33. package/dist/chunk-6RZIUY5K.js.map +7 -0
  34. package/dist/chunk-6WELHKDA.js +240 -0
  35. package/dist/chunk-6WELHKDA.js.map +7 -0
  36. package/dist/chunk-7AAE6EO2.js +145 -0
  37. package/dist/chunk-7AAE6EO2.js.map +7 -0
  38. package/dist/chunk-A3BVXXA3.js +47 -0
  39. package/dist/chunk-A3BVXXA3.js.map +7 -0
  40. package/dist/chunk-A6PUMROK.js +152 -0
  41. package/dist/chunk-A6PUMROK.js.map +7 -0
  42. package/dist/chunk-BH3Y62E3.js +11 -0
  43. package/dist/chunk-BH3Y62E3.js.map +7 -0
  44. package/dist/chunk-BJSWTHRM.js +16 -0
  45. package/dist/chunk-BJSWTHRM.js.map +7 -0
  46. package/dist/chunk-BQA2EOUU.js +124 -0
  47. package/dist/chunk-BQA2EOUU.js.map +7 -0
  48. package/dist/chunk-CZZKRPE2.js +19 -0
  49. package/dist/chunk-CZZKRPE2.js.map +7 -0
  50. package/dist/chunk-ERMQRV55.js +24 -0
  51. package/dist/chunk-ERMQRV55.js.map +7 -0
  52. package/dist/chunk-HB2P6645.js +34 -0
  53. package/dist/chunk-HB2P6645.js.map +7 -0
  54. package/dist/chunk-HIRIJ2LQ.js +1256 -0
  55. package/dist/chunk-HIRIJ2LQ.js.map +7 -0
  56. package/dist/chunk-ICTEVBLN.js +735 -0
  57. package/dist/chunk-ICTEVBLN.js.map +7 -0
  58. package/dist/chunk-JKGOGSFT.js +128 -0
  59. package/dist/chunk-JKGOGSFT.js.map +7 -0
  60. package/dist/chunk-JZDE77EH.js +836 -0
  61. package/dist/chunk-JZDE77EH.js.map +7 -0
  62. package/dist/chunk-M624LT6O.js +17 -0
  63. package/dist/chunk-M624LT6O.js.map +7 -0
  64. package/dist/chunk-OMELVAJD.js +96 -0
  65. package/dist/chunk-OMELVAJD.js.map +7 -0
  66. package/dist/chunk-OUXHGDLH.js +95 -0
  67. package/dist/chunk-OUXHGDLH.js.map +7 -0
  68. package/dist/chunk-PCXUZ6AT.js +249 -0
  69. package/dist/chunk-PCXUZ6AT.js.map +7 -0
  70. package/dist/chunk-Q24ZGKIE.js +1097 -0
  71. package/dist/chunk-Q24ZGKIE.js.map +7 -0
  72. package/dist/chunk-QBHEERCF.js +30254 -0
  73. package/dist/chunk-QBHEERCF.js.map +7 -0
  74. package/dist/chunk-QIHB5PYM.js +472 -0
  75. package/dist/chunk-QIHB5PYM.js.map +7 -0
  76. package/dist/chunk-RQVLBMP7.js +24 -0
  77. package/dist/chunk-RQVLBMP7.js.map +7 -0
  78. package/dist/chunk-SWYJOV5E.js +490 -0
  79. package/dist/chunk-SWYJOV5E.js.map +7 -0
  80. package/dist/chunk-T6GVXTNQ.js +21 -0
  81. package/dist/chunk-T6GVXTNQ.js.map +7 -0
  82. package/dist/chunk-T7GPUZVK.js +766 -0
  83. package/dist/chunk-T7GPUZVK.js.map +7 -0
  84. package/dist/chunk-TXFCNQDE.js +2934 -0
  85. package/dist/chunk-TXFCNQDE.js.map +7 -0
  86. package/dist/chunk-UNNVICVU.js +95 -0
  87. package/dist/chunk-UNNVICVU.js.map +7 -0
  88. package/dist/chunk-UUNVJZWA.js +515 -0
  89. package/dist/chunk-UUNVJZWA.js.map +7 -0
  90. package/dist/chunk-VRGR4ZTQ.js +49 -0
  91. package/dist/chunk-VRGR4ZTQ.js.map +7 -0
  92. package/dist/chunk-VTVTEE5N.js +2613 -0
  93. package/dist/chunk-VTVTEE5N.js.map +7 -0
  94. package/dist/chunk-WPTPPOYN.js +936 -0
  95. package/dist/chunk-WPTPPOYN.js.map +7 -0
  96. package/dist/chunk-XXFY63TM.js +196 -0
  97. package/dist/chunk-XXFY63TM.js.map +7 -0
  98. package/dist/chunk-Z3HMXDXP.js +654 -0
  99. package/dist/chunk-Z3HMXDXP.js.map +7 -0
  100. package/dist/chunk-ZJGXEWKF.js +138 -0
  101. package/dist/chunk-ZJGXEWKF.js.map +7 -0
  102. package/dist/cli-RFYBXM7F.js +3917 -0
  103. package/dist/cli-RFYBXM7F.js.map +7 -0
  104. package/dist/commands-YOXMODDO.js +46 -0
  105. package/dist/commands-YOXMODDO.js.map +7 -0
  106. package/dist/config-5OPX3H2K.js +81 -0
  107. package/dist/config-5OPX3H2K.js.map +7 -0
  108. package/dist/context-THRRBPFP.js +30 -0
  109. package/dist/context-THRRBPFP.js.map +7 -0
  110. package/dist/costTracker-ELNBZ2DN.js +19 -0
  111. package/dist/costTracker-ELNBZ2DN.js.map +7 -0
  112. package/dist/customCommands-4XOZH44N.js +25 -0
  113. package/dist/customCommands-4XOZH44N.js.map +7 -0
  114. package/dist/env-EL4KBHMB.js +22 -0
  115. package/dist/env-EL4KBHMB.js.map +7 -0
  116. package/dist/index.js +34 -0
  117. package/dist/index.js.map +7 -0
  118. package/dist/kodeAgentSessionId-PROTVRBR.js +13 -0
  119. package/dist/kodeAgentSessionId-PROTVRBR.js.map +7 -0
  120. package/dist/kodeAgentSessionLoad-UMPV7MC3.js +18 -0
  121. package/dist/kodeAgentSessionLoad-UMPV7MC3.js.map +7 -0
  122. package/dist/kodeAgentSessionResume-YJS4FVQM.js +16 -0
  123. package/dist/kodeAgentSessionResume-YJS4FVQM.js.map +7 -0
  124. package/dist/kodeAgentStreamJson-3T26CHCP.js +13 -0
  125. package/dist/kodeAgentStreamJson-3T26CHCP.js.map +7 -0
  126. package/dist/kodeAgentStreamJsonSession-BZS2VDCY.js +131 -0
  127. package/dist/kodeAgentStreamJsonSession-BZS2VDCY.js.map +7 -0
  128. package/dist/kodeAgentStructuredStdio-TNB6U6SP.js +10 -0
  129. package/dist/kodeAgentStructuredStdio-TNB6U6SP.js.map +7 -0
  130. package/dist/kodeHooks-VUAWIY2D.js +36 -0
  131. package/dist/kodeHooks-VUAWIY2D.js.map +7 -0
  132. package/dist/llm-A3BCM4Q2.js +3118 -0
  133. package/dist/llm-A3BCM4Q2.js.map +7 -0
  134. package/dist/llmLazy-ZJSRLZVD.js +15 -0
  135. package/dist/llmLazy-ZJSRLZVD.js.map +7 -0
  136. package/dist/loader-HZQBWO74.js +28 -0
  137. package/dist/loader-HZQBWO74.js.map +7 -0
  138. package/dist/mcp-XKOJ55B2.js +49 -0
  139. package/dist/mcp-XKOJ55B2.js.map +7 -0
  140. package/dist/mentionProcessor-ANYU5MLF.js +211 -0
  141. package/dist/mentionProcessor-ANYU5MLF.js.map +7 -0
  142. package/dist/messages-75DL5XBP.js +63 -0
  143. package/dist/messages-75DL5XBP.js.map +7 -0
  144. package/dist/model-OPJGJZRC.js +30 -0
  145. package/dist/model-OPJGJZRC.js.map +7 -0
  146. package/dist/openai-DT54BAFP.js +29 -0
  147. package/dist/openai-DT54BAFP.js.map +7 -0
  148. package/dist/outputStyles-TPFVI52O.js +28 -0
  149. package/dist/outputStyles-TPFVI52O.js.map +7 -0
  150. package/dist/package.json +4 -0
  151. package/dist/pluginRuntime-W74PYSZ4.js +218 -0
  152. package/dist/pluginRuntime-W74PYSZ4.js.map +7 -0
  153. package/dist/pluginValidation-FALYRVI2.js +17 -0
  154. package/dist/pluginValidation-FALYRVI2.js.map +7 -0
  155. package/dist/prompts-J4TPRMJ3.js +48 -0
  156. package/dist/prompts-J4TPRMJ3.js.map +7 -0
  157. package/dist/query-K3QKBVDN.js +50 -0
  158. package/dist/query-K3QKBVDN.js.map +7 -0
  159. package/dist/responsesStreaming-HMB74TRD.js +10 -0
  160. package/dist/responsesStreaming-HMB74TRD.js.map +7 -0
  161. package/dist/ripgrep-XJGSUBG7.js +17 -0
  162. package/dist/ripgrep-XJGSUBG7.js.map +7 -0
  163. package/dist/skillMarketplace-AUGKNCPW.js +37 -0
  164. package/dist/skillMarketplace-AUGKNCPW.js.map +7 -0
  165. package/dist/state-DQYRXKTG.js +16 -0
  166. package/dist/state-DQYRXKTG.js.map +7 -0
  167. package/dist/theme-MS5HDUBJ.js +14 -0
  168. package/dist/theme-MS5HDUBJ.js.map +7 -0
  169. package/dist/toolPermissionContext-GYD5LYFK.js +17 -0
  170. package/dist/toolPermissionContext-GYD5LYFK.js.map +7 -0
  171. package/dist/toolPermissionSettings-4MPZVYDR.js +18 -0
  172. package/dist/toolPermissionSettings-4MPZVYDR.js.map +7 -0
  173. package/dist/tools-QW6SIJLJ.js +47 -0
  174. package/dist/tools-QW6SIJLJ.js.map +7 -0
  175. package/dist/userInput-F2PGBRFU.js +311 -0
  176. package/dist/userInput-F2PGBRFU.js.map +7 -0
  177. package/dist/uuid-GYYCQ6QK.js +9 -0
  178. package/dist/uuid-GYYCQ6QK.js.map +7 -0
  179. package/dist/yoga.wasm +0 -0
  180. package/package.json +136 -0
  181. package/scripts/binary-utils.cjs +62 -0
  182. package/scripts/cli-acp-wrapper.cjs +82 -0
  183. package/scripts/cli-wrapper.cjs +105 -0
  184. package/scripts/postinstall.js +144 -0
  185. package/yoga.wasm +0 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2024 ShareAI Lab
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,440 @@
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)