@shareai-lab/kode-sdk 1.0.0-beta.5 → 1.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/agent.js +5 -1
- package/dist/tools/fs.js +4 -1
- package/package.json +2 -2
package/dist/core/agent.js
CHANGED
|
@@ -501,7 +501,11 @@ class Agent {
|
|
|
501
501
|
const currentJson = JSON.stringify(block.input || {});
|
|
502
502
|
const prefix = currentJson === '{}' ? '' : currentJson.slice(0, -1);
|
|
503
503
|
try {
|
|
504
|
-
|
|
504
|
+
const parsed = JSON.parse(prefix + json);
|
|
505
|
+
// Only update if parsed result is an object
|
|
506
|
+
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
|
|
507
|
+
block.input = parsed;
|
|
508
|
+
}
|
|
505
509
|
}
|
|
506
510
|
catch {
|
|
507
511
|
// Partial JSON, will complete in next chunk
|
package/dist/tools/fs.js
CHANGED
|
@@ -86,7 +86,10 @@ class FsEdit {
|
|
|
86
86
|
exports.FsEdit = FsEdit;
|
|
87
87
|
function toolTune(tool, hooks) {
|
|
88
88
|
return {
|
|
89
|
-
|
|
89
|
+
name: tool.name,
|
|
90
|
+
description: tool.description,
|
|
91
|
+
input_schema: tool.input_schema,
|
|
92
|
+
exec: tool.exec.bind(tool),
|
|
90
93
|
hooks: {
|
|
91
94
|
...tool.hooks,
|
|
92
95
|
preToolUse: hooks.preToolUse,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shareai-lab/kode-sdk",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.6",
|
|
4
4
|
"description": "Event-driven Agent Model Client SDK for building long-running, collaborative AI agents",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"author": "",
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@shareai-lab/kode-sdk": "^1.0.0-beta.
|
|
35
|
+
"@shareai-lab/kode-sdk": "^1.0.0-beta.6",
|
|
36
36
|
"@types/node": "^20.0.0",
|
|
37
37
|
"ts-node": "^10.9.0",
|
|
38
38
|
"typescript": "^5.3.0"
|