sophhub 0.4.41 → 0.4.43
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 +1 -1
- package/skills/bot-api-status/skill.json +9 -2
- package/skills/bot-api-status/src/SKILL.md +8 -0
- package/skills/bot-api-status/src/pyproject.toml +1 -1
- package/skills/image-description/skill.json +9 -2
- package/skills/image-description/src/pyproject.toml +1 -1
- package/skills/image-description/src/scripts/ana_image.py +30 -4
package/package.json
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bot-api-status",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"types": [
|
|
5
5
|
"store"
|
|
6
6
|
],
|
|
7
7
|
"displayName": "BOT-API",
|
|
8
8
|
"description": "查看当前 Agent 的 bot api 状态,同时也支持开启、关闭、重置密钥",
|
|
9
9
|
"changelog": [
|
|
10
|
+
{
|
|
11
|
+
"changes": [
|
|
12
|
+
"SKILL 新增「密钥展示」:Agent 须原样输出 api_secret,禁止掩码"
|
|
13
|
+
],
|
|
14
|
+
"date": "2026-06-16",
|
|
15
|
+
"version": "1.0.4"
|
|
16
|
+
},
|
|
10
17
|
{
|
|
11
18
|
"changes": [
|
|
12
19
|
"非 --json 输出补充 Agent 名字与 source_agent_id,与 SKILL 输出模板一致",
|
|
@@ -40,5 +47,5 @@
|
|
|
40
47
|
}
|
|
41
48
|
],
|
|
42
49
|
"createdAt": "2026-04-22",
|
|
43
|
-
"updatedAt": "2026-
|
|
50
|
+
"updatedAt": "2026-06-16"
|
|
44
51
|
}
|
|
@@ -97,3 +97,11 @@ uv run {baseDir}/scripts/secret.py reset --json
|
|
|
97
97
|
⚠️ 获取BASEURL失败,刷新页面或者重新登录后重试。
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
+
## 密钥展示
|
|
101
|
+
|
|
102
|
+
用户查询 bot-api 密钥(含 status / create / reset 输出中的 `api_secret`、`new_secret`)时:
|
|
103
|
+
|
|
104
|
+
- **必须**将脚本 `--json` 返回的密钥字段**完整原样**写入回复(与脚本 stdout 一致)。
|
|
105
|
+
- **禁止**截断、掩码(如 `abc***xyz`、`sk-****`)或仅展示前后几位。
|
|
106
|
+
- 用户主动查询或管理自己的 bot-api 密钥是预期场景;展示完整值后再附保管提醒即可(create/reset 模板中的 🔒 行)。
|
|
107
|
+
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "image-description",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"types": [
|
|
5
5
|
"store"
|
|
6
6
|
],
|
|
7
7
|
"displayName": "图片描述",
|
|
8
8
|
"description": "生成图片描述",
|
|
9
9
|
"changelog": [
|
|
10
|
+
{
|
|
11
|
+
"changes": [
|
|
12
|
+
"ana_image.py:HTTP 200 但无法提取非空 content 时 stderr 报错并 exit 1,移除 json.dumps fallback"
|
|
13
|
+
],
|
|
14
|
+
"date": "2026-06-10",
|
|
15
|
+
"version": "1.0.3"
|
|
16
|
+
},
|
|
10
17
|
{
|
|
11
18
|
"changes": [
|
|
12
19
|
"SKILL:补充何时使用、输出契约与注意事项;脚本:异常输出至 stderr、非零退出,错误文案补充 data URL"
|
|
@@ -30,5 +37,5 @@
|
|
|
30
37
|
}
|
|
31
38
|
],
|
|
32
39
|
"createdAt": "2026-04-21",
|
|
33
|
-
"updatedAt": "2026-
|
|
40
|
+
"updatedAt": "2026-06-10"
|
|
34
41
|
}
|
|
@@ -88,10 +88,36 @@ def call_vlm(image_input: str) -> str:
|
|
|
88
88
|
except urllib.error.URLError as exc:
|
|
89
89
|
raise RuntimeError(f"URLError: {exc.reason}") from exc
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
return _extract_description(data)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def _extract_description(data: dict) -> str:
|
|
95
|
+
error = data.get("error")
|
|
96
|
+
if isinstance(error, dict):
|
|
97
|
+
message = error.get("message")
|
|
98
|
+
if isinstance(message, str) and message.strip():
|
|
99
|
+
raise RuntimeError(f"图片描述失败:API 返回错误:{message.strip()}")
|
|
100
|
+
raise RuntimeError(
|
|
101
|
+
f"图片描述失败:API 返回错误:{json.dumps(error, ensure_ascii=False)}"
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
choices = data.get("choices")
|
|
105
|
+
if not isinstance(choices, list) or not choices:
|
|
106
|
+
raise RuntimeError("图片描述失败:模型未返回 choices")
|
|
107
|
+
|
|
108
|
+
first = choices[0]
|
|
109
|
+
if not isinstance(first, dict):
|
|
110
|
+
raise RuntimeError("图片描述失败:choices[0] 格式异常")
|
|
111
|
+
|
|
112
|
+
message = first.get("message")
|
|
113
|
+
if not isinstance(message, dict):
|
|
114
|
+
raise RuntimeError("图片描述失败:响应中缺少 message")
|
|
115
|
+
|
|
116
|
+
content = message.get("content")
|
|
117
|
+
if not isinstance(content, str) or not content.strip():
|
|
118
|
+
raise RuntimeError("图片描述失败:模型返回空描述")
|
|
119
|
+
|
|
120
|
+
return content.strip()
|
|
95
121
|
|
|
96
122
|
|
|
97
123
|
def build_parser():
|