@shareai-lab/kode-sdk 1.0.0-beta.3 → 1.0.0-beta.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.
@@ -10,7 +10,8 @@ exports.builtin = {
10
10
  if (opts?.workDir) {
11
11
  return (0, fs_1.toolTune)(tool, {
12
12
  preToolUse(call, ctx) {
13
- if ('file' in call.args) {
13
+ // 确保 call.args 是对象
14
+ if (call.args && typeof call.args === 'object' && 'file' in call.args) {
14
15
  call.args.file = ctx.sandbox.fs.resolve(call.args.file);
15
16
  if (!ctx.sandbox.fs.isInside(call.args.file)) {
16
17
  return { decision: 'deny', reason: `Path outside sandbox: ${call.args.file}` };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shareai-lab/kode-sdk",
3
- "version": "1.0.0-beta.3",
3
+ "version": "1.0.0-beta.4",
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.2",
35
+ "@shareai-lab/kode-sdk": "^1.0.0-beta.3",
36
36
  "@types/node": "^20.0.0",
37
37
  "ts-node": "^10.9.0",
38
38
  "typescript": "^5.3.0"