@tencent-ai/agent-sdk 0.3.190 → 0.3.191
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/cli/CHANGELOG.md +37 -0
- package/cli/dist/codebuddy-headless.js +248 -213
- package/cli/dist/web-ui/docs/cn/cli/cli-reference.md +2 -0
- package/cli/dist/web-ui/docs/cn/cli/common-workflows.md +1 -2
- package/cli/dist/web-ui/docs/cn/cli/costs.md +1 -1
- package/cli/dist/web-ui/docs/cn/cli/hooks.md +32 -0
- package/cli/dist/web-ui/docs/cn/cli/installation.md +7 -1
- package/cli/dist/web-ui/docs/cn/cli/interactive-mode.md +16 -8
- package/cli/dist/web-ui/docs/cn/cli/keybindings.md +2 -2
- package/cli/dist/web-ui/docs/cn/cli/permission-modes.md +2 -1
- package/cli/dist/web-ui/docs/cn/cli/quickstart.md +3 -4
- package/cli/dist/web-ui/docs/cn/cli/release-notes/README.md +4 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.109.1.md +21 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.109.2.md +21 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.109.3.md +23 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.110.0.md +39 -0
- package/cli/dist/web-ui/docs/cn/cli/slash-commands.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/troubleshooting.md +93 -0
- package/cli/dist/web-ui/docs/en/cli/cli-reference.md +2 -0
- package/cli/dist/web-ui/docs/en/cli/common-workflows.md +1 -2
- package/cli/dist/web-ui/docs/en/cli/costs.md +2 -2
- package/cli/dist/web-ui/docs/en/cli/hooks.md +35 -3
- package/cli/dist/web-ui/docs/en/cli/installation.md +6 -0
- package/cli/dist/web-ui/docs/en/cli/interactive-mode.md +17 -9
- package/cli/dist/web-ui/docs/en/cli/keybindings.md +2 -2
- package/cli/dist/web-ui/docs/en/cli/permission-modes.md +2 -1
- package/cli/dist/web-ui/docs/en/cli/quickstart.md +3 -4
- package/cli/dist/web-ui/docs/en/cli/release-notes/README.md +9 -5
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.109.1.md +21 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.109.2.md +21 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.109.3.md +23 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.110.0.md +39 -0
- package/cli/dist/web-ui/docs/en/cli/slash-commands.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/troubleshooting.md +93 -0
- package/cli/dist/web-ui/docs/search-index-en.json +1 -1
- package/cli/dist/web-ui/docs/search-index-zh.json +1 -1
- package/cli/dist/web-ui/docs/sidebar-en.json +1 -1
- package/cli/dist/web-ui/docs/sidebar-zh.json +1 -1
- package/cli/package.json +1 -1
- package/cli/product.cloudhosted.json +2 -2
- package/cli/product.internal.json +2 -2
- package/cli/product.ioa.json +2 -2
- package/cli/product.json +3 -3
- package/cli/product.selfhosted.json +2 -2
- package/cli/vendor/shim/genie-safe-delete.cjs +50 -7
- package/cli/vendor/shim/safe-bin/safe-delete-common.sh +30 -11
- package/cli/vendor/shim/sitecustomize.py +20 -6
- package/package.json +1 -1
|
@@ -277,7 +277,7 @@ if _SESSION_ID:
|
|
|
277
277
|
_report_path = os.environ.get("CODEBUDDY_SAFE_DELETE_REPORT_PATH")
|
|
278
278
|
|
|
279
279
|
def _path_for_compare(path):
|
|
280
|
-
return os.path.normcase(os.path.abspath(path))
|
|
280
|
+
return os.path.normcase(os.path.realpath(os.path.abspath(path)))
|
|
281
281
|
|
|
282
282
|
def _is_usable_temp_root(path):
|
|
283
283
|
try:
|
|
@@ -475,6 +475,20 @@ if _SESSION_ID:
|
|
|
475
475
|
return True
|
|
476
476
|
return False
|
|
477
477
|
|
|
478
|
+
def _is_pip_site_packages_backup_dir(abs_path):
|
|
479
|
+
try:
|
|
480
|
+
target = _path_for_compare(os.fsdecode(abs_path))
|
|
481
|
+
except (TypeError, UnicodeError):
|
|
482
|
+
return False
|
|
483
|
+
parts = target.split(os.sep)
|
|
484
|
+
for index, part in enumerate(parts[:-1]):
|
|
485
|
+
if part not in ("site-packages", "dist-packages"):
|
|
486
|
+
continue
|
|
487
|
+
backup_root = parts[index + 1]
|
|
488
|
+
if backup_root.startswith("~"):
|
|
489
|
+
return True
|
|
490
|
+
return False
|
|
491
|
+
|
|
478
492
|
# -----------------------------------------------------------------------
|
|
479
493
|
# 包装:os.remove / os.unlink (文件,不能是目录)
|
|
480
494
|
# -----------------------------------------------------------------------
|
|
@@ -484,7 +498,7 @@ if _SESSION_ID:
|
|
|
484
498
|
if dir_fd is not None:
|
|
485
499
|
return _orig_remove(path, dir_fd=dir_fd)
|
|
486
500
|
abs_path = os.path.abspath(os.fspath(path))
|
|
487
|
-
if _is_under_os_tmp_dir(abs_path):
|
|
501
|
+
if _is_under_os_tmp_dir(abs_path) or _is_pip_site_packages_backup_dir(abs_path):
|
|
488
502
|
return _orig_remove(path)
|
|
489
503
|
st = _safe_lstat(abs_path)
|
|
490
504
|
if not st:
|
|
@@ -501,7 +515,7 @@ if _SESSION_ID:
|
|
|
501
515
|
if dir_fd is not None:
|
|
502
516
|
return _orig_rmdir(path, dir_fd=dir_fd)
|
|
503
517
|
abs_path = os.path.abspath(os.fspath(path))
|
|
504
|
-
if _is_under_os_tmp_dir(abs_path):
|
|
518
|
+
if _is_under_os_tmp_dir(abs_path) or _is_pip_site_packages_backup_dir(abs_path):
|
|
505
519
|
return _orig_rmdir(path)
|
|
506
520
|
st = _safe_lstat(abs_path)
|
|
507
521
|
if not st:
|
|
@@ -525,7 +539,7 @@ if _SESSION_ID:
|
|
|
525
539
|
path, ignore_errors=ignore_errors, onerror=onerror, **kwargs
|
|
526
540
|
)
|
|
527
541
|
|
|
528
|
-
if _is_under_os_tmp_dir(abs_path):
|
|
542
|
+
if _is_under_os_tmp_dir(abs_path) or _is_pip_site_packages_backup_dir(abs_path):
|
|
529
543
|
return _orig_shutil_rmtree(
|
|
530
544
|
path, ignore_errors=ignore_errors, onerror=onerror, **kwargs
|
|
531
545
|
)
|
|
@@ -557,7 +571,7 @@ if _SESSION_ID:
|
|
|
557
571
|
|
|
558
572
|
def _safe_path_unlink(self, missing_ok=False):
|
|
559
573
|
abs_path = os.path.abspath(str(self))
|
|
560
|
-
if _is_under_os_tmp_dir(abs_path):
|
|
574
|
+
if _is_under_os_tmp_dir(abs_path) or _is_pip_site_packages_backup_dir(abs_path):
|
|
561
575
|
return _orig_path_unlink(self, missing_ok=missing_ok)
|
|
562
576
|
st = _safe_lstat(abs_path)
|
|
563
577
|
if not st:
|
|
@@ -570,7 +584,7 @@ if _SESSION_ID:
|
|
|
570
584
|
|
|
571
585
|
def _safe_path_rmdir(self):
|
|
572
586
|
abs_path = os.path.abspath(str(self))
|
|
573
|
-
if _is_under_os_tmp_dir(abs_path):
|
|
587
|
+
if _is_under_os_tmp_dir(abs_path) or _is_pip_site_packages_backup_dir(abs_path):
|
|
574
588
|
return _orig_path_rmdir(self)
|
|
575
589
|
st = _safe_lstat(abs_path)
|
|
576
590
|
if not st:
|