@acedatacloud/skills 2026.628.0 → 2026.628.1
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acedatacloud/skills",
|
|
3
|
-
"version": "2026.628.
|
|
3
|
+
"version": "2026.628.1",
|
|
4
4
|
"description": "Agent Skills for AceDataCloud AI services — music, image, video generation, LLM chat, web search. Compatible with Claude Code, GitHub Copilot, Gemini CLI, OpenAI Codex, and 30+ AI coding agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-skills",
|
|
@@ -27,7 +27,9 @@ Credentials are injected by the `personalwechat` BYOC connector:
|
|
|
27
27
|
- `PERSONALWECHAT_API_TOKEN` — Wisdom `API_TOKEN`. Secret — never echo, print, or log it.
|
|
28
28
|
|
|
29
29
|
The helper sends the token as `Authorization: Bearer ...`; it never puts the
|
|
30
|
-
token in the URL.
|
|
30
|
+
token in the URL. For queued UI operations such as search and send, the helper
|
|
31
|
+
submits the task and waits for `/api/tasks/{id}` before printing the final
|
|
32
|
+
result.
|
|
31
33
|
|
|
32
34
|
This is the user's **real personal WeChat account**. Read operations can run
|
|
33
35
|
directly. Sending messages or files must be dry-run first, then performed only
|
|
@@ -93,6 +93,28 @@ def request(method: str, path: str, *, params: dict | None = None, body: dict |
|
|
|
93
93
|
_die(f"Cannot reach Wisdom at {BASE_URL}: {reason}", code=3)
|
|
94
94
|
|
|
95
95
|
|
|
96
|
+
def wait_task(task_id: str, *, timeout: float = 600.0):
|
|
97
|
+
deadline = time.monotonic() + timeout
|
|
98
|
+
while time.monotonic() < deadline:
|
|
99
|
+
task = request("GET", f"/api/tasks/{task_id}")
|
|
100
|
+
status = task.get("status")
|
|
101
|
+
if status == "succeeded":
|
|
102
|
+
return task.get("result")
|
|
103
|
+
if status == "failed":
|
|
104
|
+
error = task.get("error") or {}
|
|
105
|
+
_die(f"Task failed: {error.get('message') or error}", code=2)
|
|
106
|
+
time.sleep(0.35)
|
|
107
|
+
_die(f"Task {task_id} did not finish within {timeout:g}s", code=2)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def request_task(method: str, path: str, *, params: dict | None = None, body: dict | None = None, timeout: float = 600.0):
|
|
111
|
+
task = request(method, path, params=params, body=body)
|
|
112
|
+
task_id = task.get("id")
|
|
113
|
+
if not task_id:
|
|
114
|
+
return task
|
|
115
|
+
return wait_task(task_id, timeout=timeout)
|
|
116
|
+
|
|
117
|
+
|
|
96
118
|
def compact_conversation(item: dict) -> dict:
|
|
97
119
|
return {
|
|
98
120
|
"id": item.get("id") or item.get("strUsrName"),
|
|
@@ -195,7 +217,7 @@ def main() -> None:
|
|
|
195
217
|
data = request("POST", "/api/messages/history/query", body={"db": args.db, "sql": args.sql})
|
|
196
218
|
_json(data)
|
|
197
219
|
elif args.cmd == "search":
|
|
198
|
-
_json(
|
|
220
|
+
_json(request_task("POST", "/api/search", body={"query": args.query}, timeout=120))
|
|
199
221
|
elif args.cmd == "send":
|
|
200
222
|
if args.unattended_confirm:
|
|
201
223
|
allowed, reason = unattended_confirm_allowed()
|
|
@@ -205,7 +227,7 @@ def main() -> None:
|
|
|
205
227
|
elif not args.confirm:
|
|
206
228
|
_json({"dry_run": True, "target": args.target, "text": args.text, "note": "Re-run with --confirm after explicit user approval, or --unattended-confirm when this Skill is pre-authorized for an AceDataCloud scheduled task."})
|
|
207
229
|
return
|
|
208
|
-
_json(
|
|
230
|
+
_json(request_task("POST", "/api/messages/send", body={"target": args.target, "type": "text", "text": args.text}))
|
|
209
231
|
elif args.cmd == "refresh-history":
|
|
210
232
|
_json(request("POST", "/api/messages/history/refresh"))
|
|
211
233
|
|