@kadaliao/dsh-bots 0.10.1 → 0.11.0
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/LICENSE +21 -0
- package/README.md +83 -48
- package/README.zh-CN.md +62 -34
- package/client.js +441 -100
- package/index.js +323 -50
- package/lib/channels/discord.mjs +1 -1
- package/lib/memory.mjs +39 -5
- package/lib/needs.mjs +400 -0
- package/lib/prompt.mjs +28 -8
- package/lib/settings.mjs +8 -5
- package/lib/watchdog.mjs +13 -0
- package/package.json +4 -4
package/lib/watchdog.mjs
CHANGED
|
@@ -70,6 +70,19 @@ function textVerdict(text) {
|
|
|
70
70
|
return TRANSIENT_TEXT.test(text) ? true : undefined;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Did the model answer with nothing at all (Harness's `EMPTY_RESPONSE`, which it already retried)?
|
|
75
|
+
* Then the bot had nothing to say and its turn ended quietly; that is no failure of the work.
|
|
76
|
+
* Accepts `{code}`, an `LlmError`'s `{failure: {code}}`, and `{error: …}` / `cause` wrappers.
|
|
77
|
+
* @param {unknown} error
|
|
78
|
+
* @returns {boolean}
|
|
79
|
+
*/
|
|
80
|
+
export function isEmptyResponse(error, depth = 0) {
|
|
81
|
+
if (!error || typeof error !== 'object' || depth > 4) return false;
|
|
82
|
+
if (error.code === 'EMPTY_RESPONSE') return true;
|
|
83
|
+
return [error.failure, error.error, error.cause].some((e) => isEmptyResponse(e, depth + 1));
|
|
84
|
+
}
|
|
85
|
+
|
|
73
86
|
/**
|
|
74
87
|
* Is an error worth retrying: HTTP 408, 429 or 5xx, or a refused, reset or
|
|
75
88
|
* timed-out connection? Accepts Error objects (their `cause` too), `{status}`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kadaliao/dsh-bots",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Grok-style bots for DeepSeek Harness: create bots with their own avatar, persona, model, skills, apps, scheduled tasks and memory; they message each other, a dispatcher bot hands out the work, and a usage view counts tokens by bot, task and day.",
|
|
6
6
|
"exports": {
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
},
|
|
45
45
|
"repository": {
|
|
46
46
|
"type": "git",
|
|
47
|
-
"url": "git+https://github.com/kadaliao/dsh-
|
|
48
|
-
"directory": "plugins/bots"
|
|
47
|
+
"url": "git+https://github.com/kadaliao/dsh-bots.git"
|
|
49
48
|
},
|
|
50
|
-
"homepage": "https://github.com/kadaliao/dsh-
|
|
49
|
+
"homepage": "https://github.com/kadaliao/dsh-bots#readme",
|
|
50
|
+
"bugs": "https://github.com/kadaliao/dsh-bots/issues",
|
|
51
51
|
"license": "MIT",
|
|
52
52
|
"keywords": ["dsh", "deepseek-harness", "dsh-plugin", "bots", "agents", "multi-agent", "persona", "schedule", "mcp", "computer-use", "memory", "usage"]
|
|
53
53
|
}
|