sophhub 0.4.54 → 0.4.56
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/package.json
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-install",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"types": [
|
|
5
5
|
"store"
|
|
6
6
|
],
|
|
7
7
|
"displayName": "Agent安装",
|
|
8
8
|
"description": "安装或升级 Sophclaw Agent(含占位替换、备份、post_install 脚本与自动安装 skill)。",
|
|
9
9
|
"changelog": [
|
|
10
|
+
{
|
|
11
|
+
"changes": [
|
|
12
|
+
"更新/重置提示增加「新建实例」选项:已安装同源 Agent 时可选择新建另一个实例"
|
|
13
|
+
],
|
|
14
|
+
"date": "2026-07-09",
|
|
15
|
+
"version": "0.1.11"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"changes": [
|
|
19
|
+
"check_installed.py 名称不一致不再阻断:identity.name 或 name 变化时自动沿用已有名称,不再报 CONFIG_ERROR"
|
|
20
|
+
],
|
|
21
|
+
"date": "2026-07-09",
|
|
22
|
+
"version": "0.1.10"
|
|
23
|
+
},
|
|
10
24
|
{
|
|
11
25
|
"changes": [
|
|
12
26
|
"check_installed.py 支持同源 Agent 多实例安装:指定不同 openclaw_id 和 workspace 时可安装新实例;指定已有实例 openclaw_id 时正确切换到目标实例进行更新"
|
|
@@ -84,8 +84,8 @@ uv run {baseDir}/scripts/check_installed.py \
|
|
|
84
84
|
状态说明(用 `user_prompt` 转述,勿念内部枚举):
|
|
85
85
|
|
|
86
86
|
- 缺依赖 Agent → 提示先装依赖,**终止**
|
|
87
|
-
- 可升级 →
|
|
88
|
-
- 同版本 →
|
|
87
|
+
- 可升级 → 提供三个选项:确认更新 / 新建实例 / 取消
|
|
88
|
+
- 同版本 → 提供三个选项:确认重置 / 新建实例 / 取消(选择「新建实例」时询问新的 openclaw_id 和 workspace)
|
|
89
89
|
- 未安装 → 直接进入 Step 3
|
|
90
90
|
- 配置异常 → **终止**
|
|
91
91
|
|
|
@@ -97,7 +97,7 @@ Step 2 非「缺依赖」/「配置异常」时继续。
|
|
|
97
97
|
|
|
98
98
|
**1)备份**(仅升级或重置)
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
先让用户回复「确认更新」「确认重置」或「新建实例」:
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
103
|
uv run {baseDir}/scripts/backup_agent.py \
|
|
@@ -56,19 +56,19 @@ def build_user_prompt(result: dict[str, object]) -> str:
|
|
|
56
56
|
if status == "UPDATABLE":
|
|
57
57
|
return (
|
|
58
58
|
f"检测到 `{agent_id}` 有可用更新({installed_version} -> {target_version})。\n\n"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
59
|
+
"请选择操作:\n"
|
|
60
|
+
"1.「确认更新」— 更新当前已安装的实例(会先备份)\n"
|
|
61
|
+
"2.「新建实例」— 以新的 openclaw_id 和 workspace 安装另一个实例\n"
|
|
62
|
+
"3.「取消」— 不执行任何操作"
|
|
63
63
|
)
|
|
64
64
|
|
|
65
65
|
if status == "SAME_VERSION_REINSTALL":
|
|
66
66
|
return (
|
|
67
67
|
f"`{agent_id}` 当前已安装版本与下载版本一致({target_version})。\n\n"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
68
|
+
"请选择操作:\n"
|
|
69
|
+
"1.「确认重置」— 重置当前已安装的实例(会先备份)\n"
|
|
70
|
+
"2.「新建实例」— 以新的 openclaw_id 和 workspace 安装另一个实例\n"
|
|
71
|
+
"3.「取消」— 不执行任何操作"
|
|
72
72
|
)
|
|
73
73
|
|
|
74
74
|
if status == "NOT_INSTALLED":
|
|
@@ -350,55 +350,11 @@ def detect_status(
|
|
|
350
350
|
|
|
351
351
|
current_name, current_identity_name = current_agent_names(current_entry)
|
|
352
352
|
if desired_name and current_identity_name and current_identity_name != desired_name:
|
|
353
|
-
|
|
354
|
-
"agent_id": agent_id,
|
|
355
|
-
"target_version": agent_def["version"],
|
|
356
|
-
"status": "CONFIG_ERROR",
|
|
357
|
-
"installed": True,
|
|
358
|
-
"installed_by_id": installed_by_id,
|
|
359
|
-
"installed_by_workspace": installed_by_workspace,
|
|
360
|
-
"current_openclaw_id": current_openclaw_id,
|
|
361
|
-
"workspace": current_workspace,
|
|
362
|
-
"desired_workspace": desired_workspace,
|
|
363
|
-
"workspace_exists": True,
|
|
364
|
-
"desired_name": desired_name,
|
|
365
|
-
"desired_openclaw_id": desired_openclaw_id,
|
|
366
|
-
"current_name": current_name,
|
|
367
|
-
"current_identity_name": current_identity_name,
|
|
368
|
-
"agent_dir": current_entry.get("agentDir"),
|
|
369
|
-
"dependencies": dependencies,
|
|
370
|
-
"missing_dependencies": missing_dependencies,
|
|
371
|
-
"reason": "identity_name_mismatch",
|
|
372
|
-
"message": "当前 Agent 的 identity.name 与本次确认名称不一致,请先人工检查配置。",
|
|
373
|
-
}
|
|
374
|
-
result["user_prompt"] = build_user_prompt(result)
|
|
375
|
-
return result
|
|
353
|
+
desired_name = current_identity_name
|
|
376
354
|
|
|
377
355
|
desired_top_level_name = normalized_name(desired_entry.get("name"))
|
|
378
356
|
if desired_top_level_name and current_name and current_name != desired_top_level_name:
|
|
379
|
-
|
|
380
|
-
"agent_id": agent_id,
|
|
381
|
-
"target_version": agent_def["version"],
|
|
382
|
-
"status": "CONFIG_ERROR",
|
|
383
|
-
"installed": True,
|
|
384
|
-
"installed_by_id": installed_by_id,
|
|
385
|
-
"installed_by_workspace": installed_by_workspace,
|
|
386
|
-
"current_openclaw_id": current_openclaw_id,
|
|
387
|
-
"workspace": current_workspace,
|
|
388
|
-
"desired_workspace": desired_workspace,
|
|
389
|
-
"workspace_exists": True,
|
|
390
|
-
"desired_name": desired_name,
|
|
391
|
-
"desired_openclaw_id": desired_openclaw_id,
|
|
392
|
-
"current_name": current_name,
|
|
393
|
-
"current_identity_name": current_identity_name,
|
|
394
|
-
"agent_dir": current_entry.get("agentDir"),
|
|
395
|
-
"dependencies": dependencies,
|
|
396
|
-
"missing_dependencies": missing_dependencies,
|
|
397
|
-
"reason": "name_mismatch",
|
|
398
|
-
"message": "当前 Agent 的 name 与本次确认名称不一致,请先人工检查配置。",
|
|
399
|
-
}
|
|
400
|
-
result["user_prompt"] = build_user_prompt(result)
|
|
401
|
-
return result
|
|
357
|
+
desired_name = current_name
|
|
402
358
|
|
|
403
359
|
installed_version, version_source = detect_installed_version(config_path, agent_id, current_entry)
|
|
404
360
|
target_version = agent_def["version"]
|