sophhub 0.4.58 → 0.4.60
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.4",
|
|
3
3
|
"agent_id": "ai-dept-admin",
|
|
4
4
|
"description": "部门管理主 Agent:部门知识库、人员档案与绩效、会议(单次/周期/查询)、待办与复盘记录",
|
|
5
5
|
"bot_api_enabled": false,
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"auto_install": true
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
|
-
"llm": "
|
|
36
|
+
"llm": "DeepSeek-V4-Pro"
|
|
37
37
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-install",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
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
|
+
"修复 update_openclaw.py 新建实例时覆盖原实例的严重 BUG:改为按目标 openclaw_id 定位条目,新建时追加、不覆盖同源原实例"
|
|
13
|
+
],
|
|
14
|
+
"date": "2026-07-09",
|
|
15
|
+
"version": "0.1.15"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"changes": [
|
|
19
|
+
"安装汇总以 openclaw_id(实例标识)为主,不再展示源 agent_id,避免与实例标识混淆"
|
|
20
|
+
],
|
|
21
|
+
"date": "2026-07-09",
|
|
22
|
+
"version": "0.1.14"
|
|
23
|
+
},
|
|
10
24
|
{
|
|
11
25
|
"changes": [
|
|
12
26
|
"新增 resolve_new_instance.py:新建实例时确定生成下一个可用的 openclaw_id 和 workspace,不再依赖 LLM 手动生成"
|
|
@@ -164,7 +164,7 @@ uv run {baseDir}/scripts/update_openclaw.py \
|
|
|
164
164
|
|
|
165
165
|
脚本自动处理 `auto_generate_image_description`、`heartbeat`(仅当 `.config.json` 显式配置时写入)、`bot-api` 账号等,输出中包含对应字段便于核对。
|
|
166
166
|
|
|
167
|
-
|
|
167
|
+
完成后汇总(以实例标识 `openclaw_id` 为主,不展示源 `agent_id` 以免与实例标识混淆):openclaw_id、结果(新装/升级/重置/新建实例)、workspace、显示名称、备份目录、skill 列表、bot-api(密钥走安全渠道)。
|
|
168
168
|
|
|
169
169
|
---
|
|
170
170
|
|
|
@@ -14,6 +14,7 @@ from common import (
|
|
|
14
14
|
deep_merge_dict,
|
|
15
15
|
default_openclaw_config_path,
|
|
16
16
|
dump_json,
|
|
17
|
+
entry_matches_source_agent,
|
|
17
18
|
find_agent_entry,
|
|
18
19
|
find_bot_api_accounts_by_agent_id,
|
|
19
20
|
find_agent_by_workspace,
|
|
@@ -165,15 +166,18 @@ def update_openclaw(
|
|
|
165
166
|
config = load_openclaw_config(config_path)
|
|
166
167
|
main_migration = _ensure_main_agent_in_list(config, config_path)
|
|
167
168
|
desired_workspace = resolved_workspace or agent_def.get("install", {}).get("workspace") or agent_def.get("workspace")
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
target_agent_id = previous.get("id") if previous.get("id") else agent_id
|
|
169
|
+
# 确定目标实例 id:显式传入的 openclaw_id 优先(支持新建/指定实例更新)
|
|
170
|
+
resolved_previous = resolve_existing_agent_entry(config_path, config, agent_id, desired_workspace)
|
|
171
|
+
if resolved_openclaw_id:
|
|
172
|
+
target_agent_id = resolved_openclaw_id
|
|
173
|
+
elif resolved_previous is not None:
|
|
174
|
+
target_agent_id = resolved_previous.get("id") or agent_id
|
|
175
175
|
else:
|
|
176
|
-
target_agent_id =
|
|
176
|
+
target_agent_id = agent_id
|
|
177
|
+
# previous = 目标 id 对应的已有条目(更新场景);校验若已被不同源 agent 占用则报错
|
|
178
|
+
previous = find_agent_entry(config, target_agent_id)
|
|
179
|
+
if previous is not None and not entry_matches_source_agent(config_path, previous, agent_id):
|
|
180
|
+
raise ValueError(f"目标 openclaw id 已存在且不属于当前 Agent: {target_agent_id}")
|
|
177
181
|
|
|
178
182
|
entry = build_agent_entry(
|
|
179
183
|
agent_def,
|