dsh-daruma 0.1.4 → 0.1.6
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/README.md +58 -13
- package/lib/event-sink.d.ts +16 -0
- package/lib/event-sink.js +13 -0
- package/lib/event-sink.js.map +1 -0
- package/lib/host-capabilities.d.ts +8 -0
- package/lib/host-capabilities.js +17 -0
- package/lib/host-capabilities.js.map +1 -0
- package/lib/index.js +7 -2
- package/lib/index.js.map +1 -1
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -13,9 +13,17 @@ daruma. daruma then:
|
|
|
13
13
|
1. records the failure against the current channel's circuit-breaker state;
|
|
14
14
|
2. when the channel trips (`failureBudget` consecutive failures, or a terminal
|
|
15
15
|
code like `QUOTA` / `INVALID_CREDENTIAL` / `CONTEXT_WINDOW_EXCEEDED`), it
|
|
16
|
-
arms the next routable channel
|
|
16
|
+
arms the next routable channel (the user-chosen backup first, then the
|
|
17
|
+
configured chain) and returns `{ kind: 'retry' }`;
|
|
17
18
|
3. on the retry turn, the `agent/request` waterfall swaps the request config
|
|
18
|
-
onto the armed channel
|
|
19
|
+
onto the armed channel;
|
|
20
|
+
4. appends one JSON line per decision to the audit log (see below).
|
|
21
|
+
|
|
22
|
+
**Self-healing:** the host exposes no request-success event, so success is
|
|
23
|
+
inferred — an agent whose previous model request never tripped
|
|
24
|
+
`agent/request-error` earns its channel a success record at the next
|
|
25
|
+
`agent/pre-step` or `agent/turn-stopping`. The circuit closes and the failure
|
|
26
|
+
counter resets; tripped channels never linger as zombie `COOLDOWN` entries.
|
|
19
27
|
|
|
20
28
|
Channel health persists to `~/.dsh/daruma/channel-health.json`, so a tripped
|
|
21
29
|
channel stays cooled-down across restarts.
|
|
@@ -25,14 +33,33 @@ channel stays cooled-down across restarts.
|
|
|
25
33
|
When a channel switch happens mid-turn, the web client renders a small
|
|
26
34
|
`daruma` row **inside the conversation flow** (anchored at the failover event,
|
|
27
35
|
right where it occurred): `mt::glm-5.3 failed (RATE_LIMIT) → trying
|
|
28
|
-
|
|
29
|
-
(`failover 2/3 · turn 3 step 1`) on hover.
|
|
36
|
+
mt::deepseek-v4-flash`, with the budget usage
|
|
37
|
+
(`failover 2/3 · turn 3 step 1`) on hover. When recovery is exhausted, a
|
|
38
|
+
red-dotted **give-up row** (`mt::glm-5.3 failed (RATE_LIMIT) → recovery
|
|
39
|
+
budget exhausted, giving up`) renders instead of failing silently.
|
|
30
40
|
|
|
31
41
|
This works through the host's plugin-extensible conversation engine: the
|
|
32
|
-
client registers
|
|
33
|
-
keyed renderer for its node kind, mirroring how
|
|
34
|
-
|
|
35
|
-
the harness, so rows do not survive a page
|
|
42
|
+
client registers definitions claiming `daruma/failover` / `daruma/give-up`
|
|
43
|
+
session events plus a keyed renderer for its node kind, mirroring how
|
|
44
|
+
in-repo retries render. The notices are **live-only** — out-of-repo session
|
|
45
|
+
events are not yet persisted by the harness, so rows do not survive a page
|
|
46
|
+
reload or a resumed session.
|
|
47
|
+
|
|
48
|
+
## Audit log
|
|
49
|
+
|
|
50
|
+
Every failover / give-up / boot decision is appended to
|
|
51
|
+
`~/.dsh/daruma/failover-log.jsonl` (rotates at 2 MiB to one `.1` generation;
|
|
52
|
+
write failures are swallowed — a lost line never breaks recovery):
|
|
53
|
+
|
|
54
|
+
```jsonl
|
|
55
|
+
{"kind":"boot","t":1788860215489,"pid":38660,"channels":["mt::glm-5.3","mt::deepseek-v4-flash","mt-cc::claude-3-5-haiku-latest"],"failureBudget":3,"cooldownMs":30000,"giveUpBudget":8}
|
|
56
|
+
{"kind":"failover","t":1788850743199,"agentId":"session-2c50…","from":"mt::glm-5.3","to":"mt::deepseek-v4-flash","reason":"RATE_LIMIT","turn":1,"step":1,"failoverCount":1,"giveUpBudget":8}
|
|
57
|
+
{"kind":"give-up","t":1788850876140,"agentId":"session-295a…","from":"mt::deepseek-v4-flash","reason":"no-routable-fallback","turn":1,"step":1,"failoverCount":1,"giveUpBudget":8}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`reason` is the failure code for failovers (`RATE_LIMIT`, `QUOTA`, …) or the
|
|
61
|
+
give-up cause (`give-up-budget-exhausted` / `no-routable-fallback`);
|
|
62
|
+
`failoverCount` / `giveUpBudget` capture the budget state at the decision.
|
|
36
63
|
|
|
37
64
|
## Install
|
|
38
65
|
|
|
@@ -53,20 +80,38 @@ bundle defaults) with an ordered failover chain:
|
|
|
53
80
|
config:
|
|
54
81
|
channels:
|
|
55
82
|
- provider: mt
|
|
56
|
-
model:
|
|
83
|
+
model: glm-5.3
|
|
57
84
|
- provider: mt
|
|
58
|
-
model:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
85
|
+
model: deepseek-v4-flash
|
|
86
|
+
- provider: mt-cc
|
|
87
|
+
model: claude-3-5-haiku-latest
|
|
88
|
+
failureBudget: 3 # consecutive failures before a channel trips
|
|
89
|
+
cooldownMs: 30000 # how long a tripped channel stays unroutable
|
|
90
|
+
giveUpBudget: 8 # per-agent failover budget before giving up
|
|
91
|
+
# stateFile: /path/to/isolated/health.json # REQUIRED for test profiles
|
|
92
|
+
# logFile: /path/to/isolated/failover-log.jsonl
|
|
62
93
|
```
|
|
63
94
|
|
|
64
95
|
Each channel is a `{ provider, model }` pair reachable by the LLM adapter
|
|
65
96
|
registry (same names you use in the settings model selector).
|
|
66
97
|
|
|
98
|
+
> ⚠️ Every chain channel must exist in your `settings.yaml` providers — a
|
|
99
|
+
> channel whose provider is missing gets armed on failover, burns one budget
|
|
100
|
+
> slot, and fails again. And test/mock profiles must isolate `stateFile`, or
|
|
101
|
+
> mock channels pollute the production health records.
|
|
102
|
+
|
|
67
103
|
## Development
|
|
68
104
|
|
|
69
105
|
```bash
|
|
70
106
|
pnpm --filter dsh-daruma build
|
|
71
107
|
pnpm --filter dsh-daruma test
|
|
72
108
|
```
|
|
109
|
+
|
|
110
|
+
## Host compatibility boundary
|
|
111
|
+
|
|
112
|
+
The recovery engine is independent of DSH runtime objects. Host-facing session
|
|
113
|
+
writes go through `src/event-sink.ts`; a Session API change or an unavailable
|
|
114
|
+
custom event surface is logged and degraded without interrupting failover.
|
|
115
|
+
`src/host-capabilities.ts` records optional host surfaces (RPC and conversation
|
|
116
|
+
event registry) so client integrations can remain capability-driven as DSH
|
|
117
|
+
releases evolve.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Agent } from '@deepseek-ai/dsh-agent';
|
|
2
|
+
import type { DarumaFailoverEvent, DarumaGiveUpEvent } from './failover-events.ts';
|
|
3
|
+
export type DarumaEvent = {
|
|
4
|
+
type: 'daruma/failover';
|
|
5
|
+
value: DarumaFailoverEvent;
|
|
6
|
+
} | {
|
|
7
|
+
type: 'daruma/give-up';
|
|
8
|
+
value: DarumaGiveUpEvent;
|
|
9
|
+
};
|
|
10
|
+
/** Host boundary for session events. Session failures never break recovery. */
|
|
11
|
+
export interface EventSink {
|
|
12
|
+
append(agent: Agent, event: DarumaEvent): void;
|
|
13
|
+
}
|
|
14
|
+
export declare function createEventSink(logger: {
|
|
15
|
+
warn(message: string): void;
|
|
16
|
+
}): EventSink;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function createEventSink(logger) {
|
|
2
|
+
return {
|
|
3
|
+
append(agent, event) {
|
|
4
|
+
try {
|
|
5
|
+
agent.session.append(event.type, event.value);
|
|
6
|
+
}
|
|
7
|
+
catch (error) {
|
|
8
|
+
logger.warn(`dsh-daruma: session event append unavailable: ${String(error)}`);
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=event-sink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-sink.js","sourceRoot":"","sources":["../src/event-sink.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,eAAe,CAAC,MAAuC;IACrE,OAAO;QACL,MAAM,CAAC,KAAK,EAAE,KAAK;YACjB,IAAI,CAAC;gBACH,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;YAC/C,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,CAAC,IAAI,CAAC,iDAAiD,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;YAC/E,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Runtime feature detection for DSH host API generations. */
|
|
2
|
+
export interface HostCapabilities {
|
|
3
|
+
readonly conversationEvents: boolean;
|
|
4
|
+
readonly rpc: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function detectHostCapabilities(ctx: {
|
|
7
|
+
get(service: string): unknown;
|
|
8
|
+
}): HostCapabilities;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function detectHostCapabilities(ctx) {
|
|
2
|
+
let connection;
|
|
3
|
+
let conversationEvents;
|
|
4
|
+
try {
|
|
5
|
+
connection = ctx.get('connection');
|
|
6
|
+
}
|
|
7
|
+
catch { /* optional */ }
|
|
8
|
+
try {
|
|
9
|
+
conversationEvents = ctx.get('conversationEvents');
|
|
10
|
+
}
|
|
11
|
+
catch { /* optional */ }
|
|
12
|
+
return {
|
|
13
|
+
conversationEvents: conversationEvents !== undefined,
|
|
14
|
+
rpc: connection?.rpc !== undefined,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=host-capabilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-capabilities.js","sourceRoot":"","sources":["../src/host-capabilities.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,sBAAsB,CAAC,GAAsC;IAC3E,IAAI,UAAyC,CAAA;IAC7C,IAAI,kBAA2B,CAAA;IAC/B,IAAI,CAAC;QAAC,UAAU,GAAG,GAAG,CAAC,GAAG,CAAC,YAAY,CAAkC,CAAA;IAAC,CAAC;IAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC;IACpG,IAAI,CAAC;QAAC,kBAAkB,GAAG,GAAG,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;IAAC,CAAC;IAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC;IACnF,OAAO;QACL,kBAAkB,EAAE,kBAAkB,KAAK,SAAS;QACpD,GAAG,EAAE,UAAU,EAAE,GAAG,KAAK,SAAS;KACnC,CAAA;AACH,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -25,6 +25,8 @@ import { buildDarumaFailoverEvent, buildDarumaGiveUpEvent } from "./failover-eve
|
|
|
25
25
|
import { mountStatus } from "./status.js";
|
|
26
26
|
import { mountRpc } from "./rpc.js";
|
|
27
27
|
import { modelId } from 'daruma-core';
|
|
28
|
+
import { createEventSink } from "./event-sink.js";
|
|
29
|
+
import { detectHostCapabilities } from "./host-capabilities.js";
|
|
28
30
|
export const name = 'dsh-daruma';
|
|
29
31
|
export const inject = ['agents', 'settings', 'llm'];
|
|
30
32
|
export function apply(ctx, rawConfig = {}) {
|
|
@@ -33,6 +35,9 @@ export function apply(ctx, rawConfig = {}) {
|
|
|
33
35
|
const engine = new RecoveryEngine(config, store);
|
|
34
36
|
const failoverLog = new JsonlFailoverLogStore(config.logFile);
|
|
35
37
|
const status = mountStatus(ctx);
|
|
38
|
+
const eventSink = createEventSink(ctx.logger);
|
|
39
|
+
const capabilities = detectHostCapabilities(ctx);
|
|
40
|
+
ctx.logger.info(`dsh-daruma: host capabilities ${JSON.stringify(capabilities)}`);
|
|
36
41
|
// Boot record: one line per plugin start, so audits can align restart
|
|
37
42
|
// boundaries with the failover/give-up lines that follow.
|
|
38
43
|
failoverLog.append({
|
|
@@ -93,7 +98,7 @@ export function apply(ctx, rawConfig = {}) {
|
|
|
93
98
|
failoverCount: plan.failoverCount,
|
|
94
99
|
giveUpBudget: engine.giveUpBudget,
|
|
95
100
|
});
|
|
96
|
-
payload.agent
|
|
101
|
+
eventSink.append(payload.agent, { type: 'daruma/failover', value: event });
|
|
97
102
|
failoverLog.append({
|
|
98
103
|
kind: 'failover',
|
|
99
104
|
t: event.at,
|
|
@@ -121,7 +126,7 @@ export function apply(ctx, rawConfig = {}) {
|
|
|
121
126
|
failoverCount: plan.failoverCount,
|
|
122
127
|
giveUpBudget: engine.giveUpBudget,
|
|
123
128
|
});
|
|
124
|
-
payload.agent
|
|
129
|
+
eventSink.append(payload.agent, { type: 'daruma/give-up', value: giveUpEvent });
|
|
125
130
|
failoverLog.append({
|
|
126
131
|
kind: 'give-up',
|
|
127
132
|
t: giveUpEvent.at,
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC5F,OAAO,EAAE,aAAa,EAAqB,MAAM,aAAa,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAA;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AACzD,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAoD,MAAM,sBAAsB,CAAA;AACzI,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,OAAO,EAAgC,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC5F,OAAO,EAAE,aAAa,E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AAE;QAC1C,IAAI,CAAC;YACH,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,yCAAyC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QAC3E,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,GAAG,CAAC,EAAE,CAAC,gBAAgB,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QACrC,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QAC/B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QACxB,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QACnC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IAC7B,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAA;AAC3G,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
{
|
|
2
2
|
"name": "dsh-daruma",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Daruma resilience plugin for DeepSeek Harness
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"description": "Daruma resilience plugin for DeepSeek Harness — detects model-request failures and fails over to another channel to keep long tasks alive.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "SISCHOI",
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "tsc -p tsconfig.build.json && tsdown",
|
|
43
43
|
"typecheck": "tsc --noEmit",
|
|
44
|
-
"test": "vitest run --passWithNoTests"
|
|
44
|
+
"test": "vitest run --passWithNoTests",
|
|
45
|
+
"prepublishOnly": "node ../../scripts/check-no-bom.cjs"
|
|
45
46
|
},
|
|
46
47
|
"keywords": [
|
|
47
48
|
"deepseek-harness",
|
|
@@ -62,10 +63,10 @@
|
|
|
62
63
|
},
|
|
63
64
|
"peerDependencies": {
|
|
64
65
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
65
|
-
"@deepseek-ai/dsh-agent": "
|
|
66
|
-
"@deepseek-ai/dsh-llm": "
|
|
67
|
-
"@deepseek-ai/dsh-session": "
|
|
68
|
-
"@deepseek-ai/dsh-settings": "
|
|
66
|
+
"@deepseek-ai/dsh-agent": ">=0.1.0-rc.7 <0.1.6",
|
|
67
|
+
"@deepseek-ai/dsh-llm": ">=0.1.0-rc.7 <0.1.6",
|
|
68
|
+
"@deepseek-ai/dsh-session": ">=0.1.0-rc.7 <0.1.6",
|
|
69
|
+
"@deepseek-ai/dsh-settings": ">=0.1.0-rc.7 <0.1.6",
|
|
69
70
|
"@deepseek-ai/schemastery": "^3.18.1"
|
|
70
71
|
},
|
|
71
72
|
"dependencies": {
|