@tencent-ai/agent-sdk 0.1.0-next.989 → 0.1.0

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 (91) hide show
  1. package/README.md +73 -2
  2. package/cli/CHANGELOG.md +2418 -0
  3. package/cli/LICENSE.txt +19 -0
  4. package/cli/README.md +26 -0
  5. package/cli/bin/codebuddy +39 -0
  6. package/cli/dist/codebuddy.js +20 -0
  7. package/cli/package.json +44 -0
  8. package/cli/product.cloudhosted.json +242 -0
  9. package/cli/product.internal.json +244 -0
  10. package/cli/product.ioa.json +467 -0
  11. package/cli/product.json +948 -0
  12. package/cli/product.selfhosted.json +196 -0
  13. package/cli/vendor/ripgrep/COPYING +3 -0
  14. package/cli/vendor/ripgrep/arm64-darwin/rg +0 -0
  15. package/cli/vendor/ripgrep/arm64-darwin/ripgrep.node +0 -0
  16. package/cli/vendor/ripgrep/arm64-linux/rg +0 -0
  17. package/cli/vendor/ripgrep/arm64-linux/ripgrep.node +0 -0
  18. package/cli/vendor/ripgrep/x64-darwin/rg +0 -0
  19. package/cli/vendor/ripgrep/x64-darwin/ripgrep.node +0 -0
  20. package/cli/vendor/ripgrep/x64-linux/rg +0 -0
  21. package/cli/vendor/ripgrep/x64-linux/ripgrep.node +0 -0
  22. package/cli/vendor/ripgrep/x64-win32/rg.exe +0 -0
  23. package/cli/vendor/ripgrep/x64-win32/ripgrep.node +0 -0
  24. package/lib/errors.d.ts +10 -0
  25. package/lib/errors.d.ts.map +1 -0
  26. package/lib/errors.js +17 -0
  27. package/lib/errors.js.map +1 -0
  28. package/lib/index.d.ts +36 -0
  29. package/lib/index.d.ts.map +1 -0
  30. package/lib/index.js +40 -0
  31. package/lib/index.js.map +1 -0
  32. package/lib/package.spec.js +3 -2
  33. package/lib/package.spec.js.map +1 -1
  34. package/lib/query.d.ts +46 -0
  35. package/lib/query.d.ts.map +1 -0
  36. package/lib/query.js +270 -0
  37. package/lib/query.js.map +1 -0
  38. package/lib/session.d.ts +53 -0
  39. package/lib/session.d.ts.map +1 -0
  40. package/lib/session.js +163 -0
  41. package/lib/session.js.map +1 -0
  42. package/lib/transport/index.d.ts +104 -0
  43. package/lib/transport/index.d.ts.map +1 -0
  44. package/lib/transport/index.js +20 -0
  45. package/lib/transport/index.js.map +1 -0
  46. package/lib/transport/process-transport.d.ts +65 -0
  47. package/lib/transport/process-transport.d.ts.map +1 -0
  48. package/lib/transport/process-transport.js +380 -0
  49. package/lib/transport/process-transport.js.map +1 -0
  50. package/lib/types.d.ts +603 -0
  51. package/lib/types.d.ts.map +1 -0
  52. package/lib/types.js +58 -0
  53. package/lib/types.js.map +1 -0
  54. package/lib/utils/cli-resolver.d.ts +36 -0
  55. package/lib/utils/cli-resolver.d.ts.map +1 -0
  56. package/lib/utils/cli-resolver.js +123 -0
  57. package/lib/utils/cli-resolver.js.map +1 -0
  58. package/lib/utils/env-utils.d.ts +9 -0
  59. package/lib/utils/env-utils.d.ts.map +1 -0
  60. package/lib/utils/env-utils.js +19 -0
  61. package/lib/utils/env-utils.js.map +1 -0
  62. package/lib/utils/index.d.ts +8 -0
  63. package/lib/utils/index.d.ts.map +1 -0
  64. package/lib/utils/index.js +17 -0
  65. package/lib/utils/index.js.map +1 -0
  66. package/lib/utils/process.d.ts +8 -0
  67. package/lib/utils/process.d.ts.map +1 -0
  68. package/lib/utils/process.js +16 -0
  69. package/lib/utils/process.js.map +1 -0
  70. package/lib/utils/stream.d.ts +24 -0
  71. package/lib/utils/stream.d.ts.map +1 -0
  72. package/lib/utils/stream.js +85 -0
  73. package/lib/utils/stream.js.map +1 -0
  74. package/package.json +21 -14
  75. package/dist/agent-sdk.js +0 -1
  76. package/lib/common/application-utils.d.ts +0 -5
  77. package/lib/common/application-utils.d.ts.map +0 -1
  78. package/lib/common/application-utils.js +0 -18
  79. package/lib/common/application-utils.js.map +0 -1
  80. package/lib/common/component-registry.d.ts +0 -10
  81. package/lib/common/component-registry.d.ts.map +0 -1
  82. package/lib/common/component-registry.js +0 -50
  83. package/lib/common/component-registry.js.map +0 -1
  84. package/lib/common/index.d.ts +0 -4
  85. package/lib/common/index.d.ts.map +0 -1
  86. package/lib/common/index.js +0 -20
  87. package/lib/common/index.js.map +0 -1
  88. package/lib/common/services.d.ts +0 -8
  89. package/lib/common/services.d.ts.map +0 -1
  90. package/lib/common/services.js +0 -21
  91. package/lib/common/services.js.map +0 -1
@@ -0,0 +1,19 @@
1
+ Copyright Copyright 2023 Tencent Cloud
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
package/cli/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # CodeBuddy Code
2
+
3
+ > CodeBuddy Code 是腾讯云官方智能编码工具,支持在终端、IDE 及 GitHub 上通过自然语言高效协作与开发。
4
+
5
+ ## 快速开始
6
+
7
+ 1. 安装 CodeBuddy Code:
8
+ ```bash
9
+ npm install -g @tencent-ai/codebuddy-code
10
+ ```
11
+ 2. 在项目目录下运行:
12
+ ```bash
13
+ codebuddy
14
+ ```
15
+
16
+ ## 反馈问题
17
+ - 在 [Issues 页面](https://cnb.cool/codebuddy/codebuddy-code/-/issues) 中提交详细问题报告
18
+ - 通过官方渠道联系技术支持(codebuddy@tencent.com)
19
+
20
+ ## 隐私与数据收集
21
+ - 用户反馈仅用于产品改进,不用于模型训练
22
+ - 反馈数据保存 30 天,隐私有保障
23
+
24
+ ## 相关链接
25
+ - [官方文档](https://cnb.cool/codebuddy/codebuddy-code/-/blob/main/docs)
26
+ - [产品主页](https://cnb.cool/codebuddy/codebuddy-code)
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+
3
+ // Exit early if on an older version of Node.js (< 18.20.8)
4
+ const PRODUCT_CLI_NAME = 'CodeBuddy Code';
5
+ const minNode = '18.20.8';
6
+
7
+ function compareVersions(current, required) {
8
+ // Extract numeric version parts, ignoring pre-release identifiers (e.g., '14.19.0-rc.0' -> '14.19.0')
9
+ const currentVersion = current.split('-')[0];
10
+ const currentParts = currentVersion.split('.').map(Number);
11
+ const requiredParts = required.split('.').map(Number);
12
+
13
+ // If version format is invalid (e.g., less than 3 parts or contains NaN), skip check
14
+ if (currentParts.length < 3 || currentParts.some(isNaN)) {
15
+ return 0; // Treat as passing the check
16
+ }
17
+
18
+ for (let i = 0; i < 3; i++) {
19
+ const curr = currentParts[i] || 0;
20
+ const req = requiredParts[i] || 0;
21
+ if (curr < req) return -1;
22
+ if (curr > req) return 1;
23
+ }
24
+ return 0;
25
+ }
26
+
27
+ if (compareVersions(process.versions.node, minNode) < 0) {
28
+ // eslint-disable-next-line no-console
29
+ console.error(
30
+ '\n' +
31
+ `${PRODUCT_CLI_NAME} requires Node.js v${minNode} or newer.\n` +
32
+ `You are running Node.js v${process.versions.node}.\n` +
33
+ 'Please upgrade Node.js: https://nodejs.org/en/download/\n',
34
+ );
35
+ process.exit(1);
36
+ }
37
+
38
+ require('events').EventEmitter.defaultMaxListeners = 50;
39
+ require('../dist/codebuddy');