@krischoichoi/channel-harness 0.6.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/README.md +110 -0
- package/lib/access/controller.d.ts +37 -0
- package/lib/access/controller.d.ts.map +1 -0
- package/lib/access/controller.js +51 -0
- package/lib/access/controller.js.map +1 -0
- package/lib/access/decision.d.ts +18 -0
- package/lib/access/decision.d.ts.map +1 -0
- package/lib/access/decision.js +2 -0
- package/lib/access/decision.js.map +1 -0
- package/lib/access/resolver.d.ts +41 -0
- package/lib/access/resolver.d.ts.map +1 -0
- package/lib/access/resolver.js +31 -0
- package/lib/access/resolver.js.map +1 -0
- package/lib/agent-manager.d.ts +314 -0
- package/lib/agent-manager.d.ts.map +1 -0
- package/lib/agent-manager.js +603 -0
- package/lib/agent-manager.js.map +1 -0
- package/lib/agent-router.d.ts +37 -0
- package/lib/agent-router.d.ts.map +1 -0
- package/lib/agent-router.js +33 -0
- package/lib/agent-router.js.map +1 -0
- package/lib/bind-support.d.ts +23 -0
- package/lib/bind-support.d.ts.map +1 -0
- package/lib/bind-support.js +63 -0
- package/lib/bind-support.js.map +1 -0
- package/lib/binding-store.d.ts +104 -0
- package/lib/binding-store.d.ts.map +1 -0
- package/lib/binding-store.js +354 -0
- package/lib/binding-store.js.map +1 -0
- package/lib/bridge.d.ts +248 -0
- package/lib/bridge.d.ts.map +1 -0
- package/lib/bridge.js +961 -0
- package/lib/bridge.js.map +1 -0
- package/lib/channel-label.d.ts +46 -0
- package/lib/channel-label.d.ts.map +1 -0
- package/lib/channel-label.js +89 -0
- package/lib/channel-label.js.map +1 -0
- package/lib/channel-session-factory.d.ts +76 -0
- package/lib/channel-session-factory.d.ts.map +1 -0
- package/lib/channel-session-factory.js +187 -0
- package/lib/channel-session-factory.js.map +1 -0
- package/lib/commands/bind.d.ts +21 -0
- package/lib/commands/bind.d.ts.map +1 -0
- package/lib/commands/bind.js +91 -0
- package/lib/commands/bind.js.map +1 -0
- package/lib/commands/help.d.ts +15 -0
- package/lib/commands/help.d.ts.map +1 -0
- package/lib/commands/help.js +89 -0
- package/lib/commands/help.js.map +1 -0
- package/lib/commands/index.d.ts +122 -0
- package/lib/commands/index.d.ts.map +1 -0
- package/lib/commands/index.js +63 -0
- package/lib/commands/index.js.map +1 -0
- package/lib/commands/locale.d.ts +9 -0
- package/lib/commands/locale.d.ts.map +1 -0
- package/lib/commands/locale.js +27 -0
- package/lib/commands/locale.js.map +1 -0
- package/lib/commands/mirror.d.ts +14 -0
- package/lib/commands/mirror.d.ts.map +1 -0
- package/lib/commands/mirror.js +44 -0
- package/lib/commands/mirror.js.map +1 -0
- package/lib/commands/model.d.ts +20 -0
- package/lib/commands/model.d.ts.map +1 -0
- package/lib/commands/model.js +106 -0
- package/lib/commands/model.js.map +1 -0
- package/lib/commands/models.d.ts +14 -0
- package/lib/commands/models.d.ts.map +1 -0
- package/lib/commands/models.js +67 -0
- package/lib/commands/models.js.map +1 -0
- package/lib/commands/new.d.ts +14 -0
- package/lib/commands/new.d.ts.map +1 -0
- package/lib/commands/new.js +37 -0
- package/lib/commands/new.js.map +1 -0
- package/lib/commands/status.d.ts +12 -0
- package/lib/commands/status.d.ts.map +1 -0
- package/lib/commands/status.js +30 -0
- package/lib/commands/status.js.map +1 -0
- package/lib/commands/stop.d.ts +16 -0
- package/lib/commands/stop.d.ts.map +1 -0
- package/lib/commands/stop.js +27 -0
- package/lib/commands/stop.js.map +1 -0
- package/lib/commands/version.d.ts +25 -0
- package/lib/commands/version.d.ts.map +1 -0
- package/lib/commands/version.js +57 -0
- package/lib/commands/version.js.map +1 -0
- package/lib/config.d.ts +119 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +60 -0
- package/lib/config.js.map +1 -0
- package/lib/debug-logger.d.ts +8 -0
- package/lib/debug-logger.d.ts.map +1 -0
- package/lib/debug-logger.js +32 -0
- package/lib/debug-logger.js.map +1 -0
- package/lib/dsh-home.d.ts +12 -0
- package/lib/dsh-home.d.ts.map +1 -0
- package/lib/dsh-home.js +31 -0
- package/lib/dsh-home.js.map +1 -0
- package/lib/failure-display.d.ts +10 -0
- package/lib/failure-display.d.ts.map +1 -0
- package/lib/failure-display.js +42 -0
- package/lib/failure-display.js.map +1 -0
- package/lib/file-provider.d.ts +96 -0
- package/lib/file-provider.d.ts.map +1 -0
- package/lib/file-provider.js +44 -0
- package/lib/file-provider.js.map +1 -0
- package/lib/index.d.ts +31 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +31 -0
- package/lib/index.js.map +1 -0
- package/lib/interactions/index.d.ts +13 -0
- package/lib/interactions/index.d.ts.map +1 -0
- package/lib/interactions/index.js +13 -0
- package/lib/interactions/index.js.map +1 -0
- package/lib/interactions/question-backend.d.ts +133 -0
- package/lib/interactions/question-backend.d.ts.map +1 -0
- package/lib/interactions/question-backend.js +37 -0
- package/lib/interactions/question-backend.js.map +1 -0
- package/lib/interactions/question-presenter.d.ts +68 -0
- package/lib/interactions/question-presenter.d.ts.map +1 -0
- package/lib/interactions/question-presenter.js +425 -0
- package/lib/interactions/question-presenter.js.map +1 -0
- package/lib/interactions/question-renderer.d.ts +37 -0
- package/lib/interactions/question-renderer.d.ts.map +1 -0
- package/lib/interactions/question-renderer.js +79 -0
- package/lib/interactions/question-renderer.js.map +1 -0
- package/lib/interactions/question-state.d.ts +106 -0
- package/lib/interactions/question-state.d.ts.map +1 -0
- package/lib/interactions/question-state.js +99 -0
- package/lib/interactions/question-state.js.map +1 -0
- package/lib/interactions/question-text-answer.d.ts +37 -0
- package/lib/interactions/question-text-answer.d.ts.map +1 -0
- package/lib/interactions/question-text-answer.js +70 -0
- package/lib/interactions/question-text-answer.js.map +1 -0
- package/lib/interactions/question-waterfall-backend.d.ts +42 -0
- package/lib/interactions/question-waterfall-backend.d.ts.map +1 -0
- package/lib/interactions/question-waterfall-backend.js +162 -0
- package/lib/interactions/question-waterfall-backend.js.map +1 -0
- package/lib/lifecycle.d.ts +36 -0
- package/lib/lifecycle.d.ts.map +1 -0
- package/lib/lifecycle.js +303 -0
- package/lib/lifecycle.js.map +1 -0
- package/lib/loggable-error.d.ts +10 -0
- package/lib/loggable-error.d.ts.map +1 -0
- package/lib/loggable-error.js +32 -0
- package/lib/loggable-error.js.map +1 -0
- package/lib/message-converter.d.ts +64 -0
- package/lib/message-converter.d.ts.map +1 -0
- package/lib/message-converter.js +191 -0
- package/lib/message-converter.js.map +1 -0
- package/lib/model-selection.d.ts +54 -0
- package/lib/model-selection.d.ts.map +1 -0
- package/lib/model-selection.js +116 -0
- package/lib/model-selection.js.map +1 -0
- package/lib/outbox/binding-resolver.d.ts +23 -0
- package/lib/outbox/binding-resolver.d.ts.map +1 -0
- package/lib/outbox/binding-resolver.js +38 -0
- package/lib/outbox/binding-resolver.js.map +1 -0
- package/lib/outbox/capabilities.d.ts +48 -0
- package/lib/outbox/capabilities.d.ts.map +1 -0
- package/lib/outbox/capabilities.js +35 -0
- package/lib/outbox/capabilities.js.map +1 -0
- package/lib/outbox/index.d.ts +14 -0
- package/lib/outbox/index.d.ts.map +1 -0
- package/lib/outbox/index.js +14 -0
- package/lib/outbox/index.js.map +1 -0
- package/lib/outbox/service.d.ts +48 -0
- package/lib/outbox/service.d.ts.map +1 -0
- package/lib/outbox/service.js +74 -0
- package/lib/outbox/service.js.map +1 -0
- package/lib/outbox/target.d.ts +17 -0
- package/lib/outbox/target.d.ts.map +1 -0
- package/lib/outbox/target.js +15 -0
- package/lib/outbox/target.js.map +1 -0
- package/lib/outbox/tool-send.d.ts +19 -0
- package/lib/outbox/tool-send.d.ts.map +1 -0
- package/lib/outbox/tool-send.js +77 -0
- package/lib/outbox/tool-send.js.map +1 -0
- package/lib/outbox/types.d.ts +42 -0
- package/lib/outbox/types.d.ts.map +1 -0
- package/lib/outbox/types.js +30 -0
- package/lib/outbox/types.js.map +1 -0
- package/lib/plugin.d.ts +27 -0
- package/lib/plugin.d.ts.map +1 -0
- package/lib/plugin.js +47 -0
- package/lib/plugin.js.map +1 -0
- package/lib/reply-context-store.d.ts +69 -0
- package/lib/reply-context-store.d.ts.map +1 -0
- package/lib/reply-context-store.js +75 -0
- package/lib/reply-context-store.js.map +1 -0
- package/lib/reply-router.d.ts +138 -0
- package/lib/reply-router.d.ts.map +1 -0
- package/lib/reply-router.js +674 -0
- package/lib/reply-router.js.map +1 -0
- package/lib/session-router.d.ts +49 -0
- package/lib/session-router.d.ts.map +1 -0
- package/lib/session-router.js +45 -0
- package/lib/session-router.js.map +1 -0
- package/lib/workspace-resolver.d.ts +67 -0
- package/lib/workspace-resolver.d.ts.map +1 -0
- package/lib/workspace-resolver.js +102 -0
- package/lib/workspace-resolver.js.map +1 -0
- package/package.json +103 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/commands/models.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/new` command.
|
|
3
|
+
*
|
|
4
|
+
* Starts a brand-new Harness session for the current channel conversation by
|
|
5
|
+
* delegating to `deps.startNewSession` (supplied by the bridge). The old
|
|
6
|
+
* session is NOT disposed by this handler: creating B and re-pointing the
|
|
7
|
+
* binding at B happens here, but retiring the previous agent for A is left to
|
|
8
|
+
* the bridge's post-command cleanup after the official
|
|
9
|
+
* `command/done` settles.
|
|
10
|
+
*/
|
|
11
|
+
import { type CommandDefinition } from '@deepseek-ai/dsh-commands';
|
|
12
|
+
import type { ChannelCommandDependencies } from './index.js';
|
|
13
|
+
export declare function createNewCommand(deps: ChannelCommandDependencies): CommandDefinition;
|
|
14
|
+
//# sourceMappingURL=new.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new.d.ts","sourceRoot":"","sources":["../../src/commands/new.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAE7D,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,0BAA0B,GAAG,iBAAiB,CA2BpF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/new` command.
|
|
3
|
+
*
|
|
4
|
+
* Starts a brand-new Harness session for the current channel conversation by
|
|
5
|
+
* delegating to `deps.startNewSession` (supplied by the bridge). The old
|
|
6
|
+
* session is NOT disposed by this handler: creating B and re-pointing the
|
|
7
|
+
* binding at B happens here, but retiring the previous agent for A is left to
|
|
8
|
+
* the bridge's post-command cleanup after the official
|
|
9
|
+
* `command/done` settles.
|
|
10
|
+
*/
|
|
11
|
+
import {} from '@deepseek-ai/dsh-commands';
|
|
12
|
+
export function createNewCommand(deps) {
|
|
13
|
+
return {
|
|
14
|
+
name: 'new',
|
|
15
|
+
description: 'Start a new channel session',
|
|
16
|
+
async handler(invocation) {
|
|
17
|
+
if (invocation.rawInput.trim().length > 0) {
|
|
18
|
+
return {
|
|
19
|
+
kind: 'error',
|
|
20
|
+
text: '用法:/new',
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
if (invocation.agent.status !== 'idle') {
|
|
24
|
+
return {
|
|
25
|
+
kind: 'error',
|
|
26
|
+
text: '当前会话仍在运行,请稍后再执行 /new。',
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
await deps.startNewSession(invocation.agent);
|
|
30
|
+
return {
|
|
31
|
+
kind: 'success',
|
|
32
|
+
text: '已开启新会话。',
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=new.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new.js","sourceRoot":"","sources":["../../src/commands/new.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAA0B,MAAM,2BAA2B,CAAC;AAGnE,MAAM,UAAU,gBAAgB,CAAC,IAAgC;IAC/D,OAAO;QACL,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,6BAA6B;QAC1C,KAAK,CAAC,OAAO,CAAC,UAAU;YACtB,IAAI,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC1C,OAAO;oBACL,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,SAAS;iBAChB,CAAC;YACJ,CAAC;YAED,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;gBACvC,OAAO;oBACL,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,uBAAuB;iBAC9B,CAAC;YACJ,CAAC;YAED,MAAM,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YAE7C,OAAO;gBACL,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,SAAS;aAChB,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/status` command (spec §14).
|
|
3
|
+
*
|
|
4
|
+
* Pure Human Plane — never calls the model. Shows the session identity +
|
|
5
|
+
* lifecycle status and the effective model selection (provider / model /
|
|
6
|
+
* reasoning effort). Secrets (API keys, tokens, webhooks, platform keys,
|
|
7
|
+
* reply-context) are never shown.
|
|
8
|
+
*/
|
|
9
|
+
import { type CommandDefinition } from '@deepseek-ai/dsh-commands';
|
|
10
|
+
import type { ChannelCommandDependencies } from './index.js';
|
|
11
|
+
export declare function createStatusCommand(deps: ChannelCommandDependencies): CommandDefinition;
|
|
12
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAE7D,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,0BAA0B,GAAG,iBAAiB,CAkBvF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/status` command (spec §14).
|
|
3
|
+
*
|
|
4
|
+
* Pure Human Plane — never calls the model. Shows the session identity +
|
|
5
|
+
* lifecycle status and the effective model selection (provider / model /
|
|
6
|
+
* reasoning effort). Secrets (API keys, tokens, webhooks, platform keys,
|
|
7
|
+
* reply-context) are never shown.
|
|
8
|
+
*/
|
|
9
|
+
import {} from '@deepseek-ai/dsh-commands';
|
|
10
|
+
export function createStatusCommand(deps) {
|
|
11
|
+
return {
|
|
12
|
+
name: 'status',
|
|
13
|
+
description: 'Show session / agent / model status',
|
|
14
|
+
async handler(invocation) {
|
|
15
|
+
const lines = [
|
|
16
|
+
'Session',
|
|
17
|
+
'ID: ' + String(invocation.agent.id),
|
|
18
|
+
'Status: ' + invocation.agent.status,
|
|
19
|
+
];
|
|
20
|
+
const selection = await deps.modelSelection.current(invocation.agent);
|
|
21
|
+
if (selection) {
|
|
22
|
+
lines.push('', 'Model', 'Provider: ' + selection.provider, 'Model: ' + selection.model);
|
|
23
|
+
if (selection.reasoningEffort)
|
|
24
|
+
lines.push('Reasoning: ' + String(selection.reasoningEffort));
|
|
25
|
+
}
|
|
26
|
+
return { kind: 'success', text: lines.join('\n') };
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAA0B,MAAM,2BAA2B,CAAC;AAGnE,MAAM,UAAU,mBAAmB,CAAC,IAAgC;IAClE,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,qCAAqC;QAClD,KAAK,CAAC,OAAO,CAAC,UAAU;YACtB,MAAM,KAAK,GAAG;gBACZ,SAAS;gBACT,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;gBACpC,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM;aACrC,CAAC;YACF,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YACtE,IAAI,SAAS,EAAE,CAAC;gBACd,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,YAAY,GAAG,SAAS,CAAC,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;gBACxF,IAAI,SAAS,CAAC,eAAe;oBAAE,KAAK,CAAC,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC;YAC/F,CAAC;YACD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACrD,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/stop` command (spec §10).
|
|
3
|
+
*
|
|
4
|
+
* The command SEMANTICS live here as a normal `CommandDefinition` —
|
|
5
|
+
* discoverable by `/help` and recorded as `command/run` + `command/done` —
|
|
6
|
+
* while the BRIDGE fast path executes this registered command ahead of the
|
|
7
|
+
* serial conversation chain so an in-flight turn can be interrupted
|
|
8
|
+
* immediately (spec §4/§5). The handler performs the official cooperative
|
|
9
|
+
* cancellation `agent.cancel({ kind: 'user' })`: abort the active turn,
|
|
10
|
+
* propagate the AbortSignal to model/tool execution, clear the inbox and
|
|
11
|
+
* pending steering.
|
|
12
|
+
*/
|
|
13
|
+
import { type CommandDefinition } from '@deepseek-ai/dsh-commands';
|
|
14
|
+
import type { ChannelCommandDependencies } from './index.js';
|
|
15
|
+
export declare function createStopCommand(_deps: ChannelCommandDependencies): CommandDefinition;
|
|
16
|
+
//# sourceMappingURL=stop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stop.d.ts","sourceRoot":"","sources":["../../src/commands/stop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAE7D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,0BAA0B,GAAG,iBAAiB,CAYtF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/stop` command (spec §10).
|
|
3
|
+
*
|
|
4
|
+
* The command SEMANTICS live here as a normal `CommandDefinition` —
|
|
5
|
+
* discoverable by `/help` and recorded as `command/run` + `command/done` —
|
|
6
|
+
* while the BRIDGE fast path executes this registered command ahead of the
|
|
7
|
+
* serial conversation chain so an in-flight turn can be interrupted
|
|
8
|
+
* immediately (spec §4/§5). The handler performs the official cooperative
|
|
9
|
+
* cancellation `agent.cancel({ kind: 'user' })`: abort the active turn,
|
|
10
|
+
* propagate the AbortSignal to model/tool execution, clear the inbox and
|
|
11
|
+
* pending steering.
|
|
12
|
+
*/
|
|
13
|
+
import {} from '@deepseek-ai/dsh-commands';
|
|
14
|
+
export function createStopCommand(_deps) {
|
|
15
|
+
return {
|
|
16
|
+
name: 'stop',
|
|
17
|
+
description: 'Stop the current task immediately',
|
|
18
|
+
handler(invocation) {
|
|
19
|
+
if (invocation.rawInput.trim().length > 0) {
|
|
20
|
+
return { kind: 'error', text: 'Usage: /stop' };
|
|
21
|
+
}
|
|
22
|
+
invocation.agent.cancel({ kind: 'user' });
|
|
23
|
+
return { kind: 'success', text: '已停止当前任务。' };
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=stop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stop.js","sourceRoot":"","sources":["../../src/commands/stop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAA0B,MAAM,2BAA2B,CAAC;AAGnE,MAAM,UAAU,iBAAiB,CAAC,KAAiC;IACjE,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,mCAAmC;QAChD,OAAO,CAAC,UAAU;YAChB,IAAI,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC1C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;YACjD,CAAC;YACD,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;YAC1C,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QAC/C,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/version` command — bundle version + Harness tested baseline + a
|
|
3
|
+
* prompt-only npm update hint.
|
|
4
|
+
*
|
|
5
|
+
* Pure Human Plane — never calls the model. The update hint comes from the
|
|
6
|
+
* channel-control update check, reached through the `versionInfo` dep (bridged
|
|
7
|
+
* lazily from the plugin ctx via `ctx.get('channelControl')`, never through
|
|
8
|
+
* `invocation.agent.ctx`). When the control plane is absent, disabled or the
|
|
9
|
+
* registry check has not produced a result yet, the command degrades to the
|
|
10
|
+
* plain version lines — an unreachable check must never surface an error.
|
|
11
|
+
*/
|
|
12
|
+
import { type CommandDefinition } from '@deepseek-ai/dsh-commands';
|
|
13
|
+
import type { ChannelCommandDependencies } from './index.js';
|
|
14
|
+
/**
|
|
15
|
+
* The DeepSeek Harness version this bundle is tested against (peer pins).
|
|
16
|
+
*
|
|
17
|
+
* Single source of truth: `HARNESS_TESTED_VERSION` in
|
|
18
|
+
* `scripts/check-upstream.mjs`, mirrored by every workspace `@deepseek-ai/dsh-*`
|
|
19
|
+
* pin. Keep this constant in sync when the baseline is raised
|
|
20
|
+
* (AGENTS.md red line 6); test/commands-version.test.ts guards the drift
|
|
21
|
+
* against this package's own `@deepseek-ai/dsh-commands` pin.
|
|
22
|
+
*/
|
|
23
|
+
export declare const HARNESS_TESTED_VERSION = "0.2.0-rc.2";
|
|
24
|
+
export declare function createVersionCommand(deps: ChannelCommandDependencies): CommandDefinition;
|
|
25
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/commands/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,0BAA0B,EAAsB,MAAM,YAAY,CAAC;AAGjF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,eAAe,CAAC;AAWnD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,0BAA0B,GAAG,iBAAiB,CAqBxF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/version` command — bundle version + Harness tested baseline + a
|
|
3
|
+
* prompt-only npm update hint.
|
|
4
|
+
*
|
|
5
|
+
* Pure Human Plane — never calls the model. The update hint comes from the
|
|
6
|
+
* channel-control update check, reached through the `versionInfo` dep (bridged
|
|
7
|
+
* lazily from the plugin ctx via `ctx.get('channelControl')`, never through
|
|
8
|
+
* `invocation.agent.ctx`). When the control plane is absent, disabled or the
|
|
9
|
+
* registry check has not produced a result yet, the command degrades to the
|
|
10
|
+
* plain version lines — an unreachable check must never surface an error.
|
|
11
|
+
*/
|
|
12
|
+
import {} from '@deepseek-ai/dsh-commands';
|
|
13
|
+
import pkg from '../../package.json' with { type: 'json' };
|
|
14
|
+
/**
|
|
15
|
+
* The DeepSeek Harness version this bundle is tested against (peer pins).
|
|
16
|
+
*
|
|
17
|
+
* Single source of truth: `HARNESS_TESTED_VERSION` in
|
|
18
|
+
* `scripts/check-upstream.mjs`, mirrored by every workspace `@deepseek-ai/dsh-*`
|
|
19
|
+
* pin. Keep this constant in sync when the baseline is raised
|
|
20
|
+
* (AGENTS.md red line 6); test/commands-version.test.ts guards the drift
|
|
21
|
+
* against this package's own `@deepseek-ai/dsh-commands` pin.
|
|
22
|
+
*/
|
|
23
|
+
export const HARNESS_TESTED_VERSION = '0.2.0-rc.2';
|
|
24
|
+
function renderUpdate(info) {
|
|
25
|
+
const lines = [
|
|
26
|
+
'',
|
|
27
|
+
'Update available: ' + info.version + ' (' + info.tag + ')' + (info.crossLine ? ' — cross-version-line upgrade' : ''),
|
|
28
|
+
];
|
|
29
|
+
for (const command of info.commands)
|
|
30
|
+
lines.push(command);
|
|
31
|
+
return lines;
|
|
32
|
+
}
|
|
33
|
+
export function createVersionCommand(deps) {
|
|
34
|
+
return {
|
|
35
|
+
name: 'version',
|
|
36
|
+
description: 'Show the bundle version, Harness baseline and update hint',
|
|
37
|
+
async handler() {
|
|
38
|
+
let info;
|
|
39
|
+
try {
|
|
40
|
+
info = await deps.versionInfo?.();
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
info = undefined; // control plane hiccup → degrade to version-only
|
|
44
|
+
}
|
|
45
|
+
const currentVersion = info?.currentVersion ?? pkg.version;
|
|
46
|
+
const lines = [
|
|
47
|
+
'Version',
|
|
48
|
+
'Bundle: ' + currentVersion,
|
|
49
|
+
'Harness tested baseline: ' + HARNESS_TESTED_VERSION,
|
|
50
|
+
];
|
|
51
|
+
if (info?.update)
|
|
52
|
+
lines.push(...renderUpdate(info.update));
|
|
53
|
+
return { kind: 'success', text: lines.join('\n') };
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/commands/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAA0B,MAAM,2BAA2B,CAAC;AAEnE,OAAO,GAAG,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE3D;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,YAAY,CAAC;AAEnD,SAAS,YAAY,CAAC,IAA+C;IACnE,MAAM,KAAK,GAAG;QACZ,EAAE;QACF,oBAAoB,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EAAE,CAAC;KACtH,CAAC;IACF,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ;QAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAgC;IACnE,OAAO;QACL,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,2DAA2D;QACxE,KAAK,CAAC,OAAO;YACX,IAAI,IAAoC,CAAC;YACzC,IAAI,CAAC;gBACH,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACpC,CAAC;YAAC,MAAM,CAAC;gBACP,IAAI,GAAG,SAAS,CAAC,CAAC,iDAAiD;YACrE,CAAC;YACD,MAAM,cAAc,GAAG,IAAI,EAAE,cAAc,IAAI,GAAG,CAAC,OAAO,CAAC;YAC3D,MAAM,KAAK,GAAG;gBACZ,SAAS;gBACT,UAAU,GAAG,cAAc;gBAC3B,2BAA2B,GAAG,sBAAsB;aACrD,CAAC;YACF,IAAI,IAAI,EAAE,MAAM;gBAAE,KAAK,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YAC3D,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACrD,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/lib/config.d.ts
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schemastery configuration for the channel-harness bridge.
|
|
3
|
+
*
|
|
4
|
+
* All deployment-related parameters are configurable here; defaults match the
|
|
5
|
+
* v2 behavior (global default route, file-backed binding store with restart
|
|
6
|
+
* recovery, throttled reply previews, bounded gateway concurrency).
|
|
7
|
+
*
|
|
8
|
+
* v2 routing (doc §30): the old `defaultAgentId` and top-level
|
|
9
|
+
* `agentOptions` are gone. Agent selection resolves to an `AgentRouteSpec`
|
|
10
|
+
* (preset / provider / model / maxTokens), with `agent.default` as the global
|
|
11
|
+
* fallback and optional per-channel / per-account / per-conversation overrides.
|
|
12
|
+
*/
|
|
13
|
+
import Schema from '@deepseek-ai/schemastery';
|
|
14
|
+
import type { AgentRouteSpec } from './agent-router.js';
|
|
15
|
+
/** Route for the global default agent. */
|
|
16
|
+
export interface AgentConfig {
|
|
17
|
+
/** Fallback route used when no routing override matches. */
|
|
18
|
+
default: AgentRouteSpec;
|
|
19
|
+
}
|
|
20
|
+
/** How the default agent route is selected for a conversation. */
|
|
21
|
+
export interface RoutingConfig {
|
|
22
|
+
/**
|
|
23
|
+
* The default-resolution granularity. `global` uses only
|
|
24
|
+
* `agent.default`; the finer modes additionally allow per-channel,
|
|
25
|
+
* per-account and per-conversation overrides via `routing.overrides`.
|
|
26
|
+
*/
|
|
27
|
+
mode: 'global' | 'channel' | 'account' | 'conversation';
|
|
28
|
+
/**
|
|
29
|
+
* Per-level agent route overrides. Resolution priority when an override
|
|
30
|
+
* hits: conversation > account > channel > `agent.default`.
|
|
31
|
+
*/
|
|
32
|
+
overrides?: {
|
|
33
|
+
channel?: Record<string, AgentRouteSpec>;
|
|
34
|
+
account?: Record<string, AgentRouteSpec>;
|
|
35
|
+
conversation?: Record<string, AgentRouteSpec>;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/** Reply throttling / splitting behavior. */
|
|
39
|
+
export interface ReplyConfig {
|
|
40
|
+
/**
|
|
41
|
+
* Minimum interval (ms) between reply preview updates for `native` / `edit`
|
|
42
|
+
* strategies. `0` disables throttling (every delta flushes immediately),
|
|
43
|
+
* which also makes the pipeline easy to test deterministically.
|
|
44
|
+
*/
|
|
45
|
+
updateIntervalMs: number;
|
|
46
|
+
/** Optional hard cap for a single outbound message; longer text is split. */
|
|
47
|
+
maxTextLength?: number;
|
|
48
|
+
/** Split long messages on paragraph boundaries first. */
|
|
49
|
+
splitParagraphs: boolean;
|
|
50
|
+
/** Keep fenced code blocks intact while splitting long messages. */
|
|
51
|
+
splitCodeBlocks: boolean;
|
|
52
|
+
/** Whether `turn/end` must deliver trailing partial content. */
|
|
53
|
+
finalFlush: boolean;
|
|
54
|
+
}
|
|
55
|
+
/** Where session bindings are persisted. */
|
|
56
|
+
export interface BindingStoreConfig {
|
|
57
|
+
type: 'memory' | 'file';
|
|
58
|
+
/** Path of the JSON file when `type` is `file`. */
|
|
59
|
+
path?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Channel Workspace strategy. Controls how a channel conversation
|
|
63
|
+
* is mapped to a Session working directory and a Harness `WorkspaceRegistry`
|
|
64
|
+
* member.
|
|
65
|
+
*/
|
|
66
|
+
export interface WorkspaceConfig {
|
|
67
|
+
/**
|
|
68
|
+
* `channel-account` (default): one Workspace per channel/account pair, under
|
|
69
|
+
* `<dsh-home>/workspaces/channels/<channel>/<account-key>`.
|
|
70
|
+
* `host-cwd`: keep the Host's real working directory (`process.cwd()`) and
|
|
71
|
+
* attach only when that cwd is already registered.
|
|
72
|
+
* `disabled`: no WorkspaceRegistry integration (cwd falls back to
|
|
73
|
+
* `config.cwd ?? process.cwd()`).
|
|
74
|
+
*/
|
|
75
|
+
mode: 'channel-account' | 'host-cwd' | 'disabled';
|
|
76
|
+
/** Channel Workspace root; unset defaults to `<dsh-home>/workspaces/channels`. */
|
|
77
|
+
root?: string;
|
|
78
|
+
/** Whether a missing channel Workspace is auto-created. */
|
|
79
|
+
autoCreate: boolean;
|
|
80
|
+
}
|
|
81
|
+
/** Channel-backed handling for Harness `ask_user_question` requests. */
|
|
82
|
+
export interface UserQuestionsConfig {
|
|
83
|
+
enabled: boolean;
|
|
84
|
+
/** Maximum time to wait for a channel answer before cancelling the question. */
|
|
85
|
+
timeoutMs: number;
|
|
86
|
+
}
|
|
87
|
+
export interface Config {
|
|
88
|
+
/** Default route (and explicit per-level override dictionary). */
|
|
89
|
+
agent: AgentConfig;
|
|
90
|
+
/**
|
|
91
|
+
* Working directory for NEW channel sessions. This becomes the session's
|
|
92
|
+
* `header.cwd`, which `dsh-workspace` uses to group the session under a
|
|
93
|
+
* workspace — so set it to the directory of the workspace you want channel
|
|
94
|
+
* sessions to appear in. Defaults to `process.cwd()` at runtime.
|
|
95
|
+
*/
|
|
96
|
+
cwd?: string;
|
|
97
|
+
routing: RoutingConfig;
|
|
98
|
+
bindingStore: BindingStoreConfig;
|
|
99
|
+
/** Channel Workspace policy; defaults to { mode: 'channel-account', autoCreate: true }. */
|
|
100
|
+
workspace: WorkspaceConfig;
|
|
101
|
+
/** Present channel-origin user questions through native interactive actions. */
|
|
102
|
+
userQuestions: UserQuestionsConfig;
|
|
103
|
+
reply: ReplyConfig;
|
|
104
|
+
/**
|
|
105
|
+
* Upper bound on concurrently live agents the bridge owns (per-session
|
|
106
|
+
* single-flight always holds regardless of this value).
|
|
107
|
+
*/
|
|
108
|
+
maxConcurrency: number;
|
|
109
|
+
/**
|
|
110
|
+
* Upper bound (ms) the bridge waits for in-flight agent turns to go idle
|
|
111
|
+
* during unload before giving up and finalizing replies from the durable
|
|
112
|
+
* log.
|
|
113
|
+
*/
|
|
114
|
+
drainTimeoutMs: number;
|
|
115
|
+
/** Prefix inbound user messages with `[channel=.. sender=.. message=..]` when explicitly enabled. */
|
|
116
|
+
includeMetadataPrefix: boolean;
|
|
117
|
+
}
|
|
118
|
+
export declare const Config: Schema<Config>;
|
|
119
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,0CAA0C;AAC1C,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,kEAAkE;AAClE,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC;IACxD;;;OAGG;IACH,SAAS,CAAC,EAAE;QACV,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;QACzC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;QACzC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;KAC/C,CAAC;CACH;AAED,6CAA6C;AAC7C,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,eAAe,EAAE,OAAO,CAAC;IACzB,oEAAoE;IACpE,eAAe,EAAE,OAAO,CAAC;IACzB,gEAAgE;IAChE,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,4CAA4C;AAC5C,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;OAOG;IACH,IAAI,EAAE,iBAAiB,GAAG,UAAU,GAAG,UAAU,CAAC;IAClD,kFAAkF;IAClF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wEAAwE;AACxE,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,gFAAgF;IAChF,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,MAAM;IACrB,kEAAkE;IAClE,KAAK,EAAE,WAAW,CAAC;IACnB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,aAAa,CAAC;IACvB,YAAY,EAAE,kBAAkB,CAAC;IACjC,2FAA2F;IAC3F,SAAS,EAAE,eAAe,CAAC;IAC3B,gFAAgF;IAChF,aAAa,EAAE,mBAAmB,CAAC;IACnC,KAAK,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB,qGAAqG;IACrG,qBAAqB,EAAE,OAAO,CAAC;CAChC;AASD,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,CAuChC,CAAC"}
|
package/lib/config.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schemastery configuration for the channel-harness bridge.
|
|
3
|
+
*
|
|
4
|
+
* All deployment-related parameters are configurable here; defaults match the
|
|
5
|
+
* v2 behavior (global default route, file-backed binding store with restart
|
|
6
|
+
* recovery, throttled reply previews, bounded gateway concurrency).
|
|
7
|
+
*
|
|
8
|
+
* v2 routing (doc §30): the old `defaultAgentId` and top-level
|
|
9
|
+
* `agentOptions` are gone. Agent selection resolves to an `AgentRouteSpec`
|
|
10
|
+
* (preset / provider / model / maxTokens), with `agent.default` as the global
|
|
11
|
+
* fallback and optional per-channel / per-account / per-conversation overrides.
|
|
12
|
+
*/
|
|
13
|
+
import Schema from '@deepseek-ai/schemastery';
|
|
14
|
+
const routeSchema = Schema.object({
|
|
15
|
+
preset: Schema.string(),
|
|
16
|
+
provider: Schema.string(),
|
|
17
|
+
model: Schema.string(),
|
|
18
|
+
maxTokens: Schema.natural(),
|
|
19
|
+
});
|
|
20
|
+
export const Config = Schema.object({
|
|
21
|
+
agent: Schema.object({
|
|
22
|
+
default: routeSchema,
|
|
23
|
+
}),
|
|
24
|
+
cwd: Schema.string().description('Working directory for new channel sessions (default: process.cwd())'),
|
|
25
|
+
routing: Schema.object({
|
|
26
|
+
mode: Schema.union(['global', 'channel', 'account', 'conversation']).default('global'),
|
|
27
|
+
overrides: Schema.object({
|
|
28
|
+
channel: Schema.dict(routeSchema),
|
|
29
|
+
account: Schema.dict(routeSchema),
|
|
30
|
+
conversation: Schema.dict(routeSchema),
|
|
31
|
+
}),
|
|
32
|
+
}),
|
|
33
|
+
bindingStore: Schema.object({
|
|
34
|
+
// File-backed by default so session bindings survive restarts; the file
|
|
35
|
+
// path is resolved at runtime (`<channel-data-dir>/bindings.json`) so
|
|
36
|
+
// bindings no longer depend on the process cwd.
|
|
37
|
+
type: Schema.union(['memory', 'file']).default('file'),
|
|
38
|
+
path: Schema.string(),
|
|
39
|
+
}),
|
|
40
|
+
workspace: Schema.object({
|
|
41
|
+
mode: Schema.union(['channel-account', 'host-cwd', 'disabled']).default('channel-account'),
|
|
42
|
+
root: Schema.string(),
|
|
43
|
+
autoCreate: Schema.boolean().default(true),
|
|
44
|
+
}),
|
|
45
|
+
userQuestions: Schema.object({
|
|
46
|
+
enabled: Schema.boolean().default(true),
|
|
47
|
+
timeoutMs: Schema.natural().default(300000),
|
|
48
|
+
}).default({ enabled: true, timeoutMs: 300000 }),
|
|
49
|
+
reply: Schema.object({
|
|
50
|
+
updateIntervalMs: Schema.natural().default(200),
|
|
51
|
+
maxTextLength: Schema.natural(),
|
|
52
|
+
splitParagraphs: Schema.boolean().default(true),
|
|
53
|
+
splitCodeBlocks: Schema.boolean().default(true),
|
|
54
|
+
finalFlush: Schema.boolean().default(true),
|
|
55
|
+
}),
|
|
56
|
+
maxConcurrency: Schema.natural().default(4),
|
|
57
|
+
drainTimeoutMs: Schema.natural().default(5000),
|
|
58
|
+
includeMetadataPrefix: Schema.boolean().default(false),
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAiH9C,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE;IACzB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;IACtB,SAAS,EAAE,MAAM,CAAC,OAAO,EAAE;CAC5B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,MAAM,GAAmB,MAAM,CAAC,MAAM,CAAC;IAClD,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC;QACnB,OAAO,EAAE,WAAW;KACrB,CAAC;IACF,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,qEAAqE,CAAC;IACvG,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;QACtF,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;YACvB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;YACjC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;YACjC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;SACvC,CAAC;KACH,CAAC;IACF,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC;QAC1B,wEAAwE;QACxE,sEAAsE;QACtE,gDAAgD;QAChD,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QACtD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE;KACtB,CAAC;IACF,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;QACvB,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,iBAAiB,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;QAC1F,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE;QACrB,UAAU,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;KAC3C,CAAC;IACF,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC;QAC3B,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;QACvC,SAAS,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;KAC5C,CAAC,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;IAChD,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC;QACnB,gBAAgB,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC;QAC/C,aAAa,EAAE,MAAM,CAAC,OAAO,EAAE;QAC/B,eAAe,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;QAC/C,eAAe,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;QAC/C,UAAU,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;KAC3C,CAAC;IACF,cAAc,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,cAAc,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAC9C,qBAAqB,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CACvD,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Context } from '@deepseek-ai/cordis';
|
|
2
|
+
export declare const CHANNELS_DEBUG_ENV = "DSH_CHANNELS_DEBUG";
|
|
3
|
+
/**
|
|
4
|
+
* Install an official Cordis exporter for local channel-harness diagnostics.
|
|
5
|
+
* The Host's default exporter only keeps an in-memory buffer.
|
|
6
|
+
*/
|
|
7
|
+
export declare function installDebugConsoleExporter(ctx: Context): void;
|
|
8
|
+
//# sourceMappingURL=debug-logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-logger.d.ts","sourceRoot":"","sources":["../src/debug-logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,OAAO,EAAiB,MAAM,qBAAqB,CAAC;AAE1E,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AAEvD;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CA0B9D"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Logger } from '@deepseek-ai/cordis';
|
|
2
|
+
export const CHANNELS_DEBUG_ENV = 'DSH_CHANNELS_DEBUG';
|
|
3
|
+
/**
|
|
4
|
+
* Install an official Cordis exporter for local channel-harness diagnostics.
|
|
5
|
+
* The Host's default exporter only keeps an in-memory buffer.
|
|
6
|
+
*/
|
|
7
|
+
export function installDebugConsoleExporter(ctx) {
|
|
8
|
+
if (process.env[CHANNELS_DEBUG_ENV] !== '1')
|
|
9
|
+
return;
|
|
10
|
+
console.info(`[channel-harness] console diagnostics enabled (${CHANNELS_DEBUG_ENV}=1)`);
|
|
11
|
+
const exporter = {
|
|
12
|
+
colors: false,
|
|
13
|
+
// Surface harness + every channel adapter's logs (incl. the inbound
|
|
14
|
+
// message info logs each adapter emits) to the console. Cordis levels:
|
|
15
|
+
// ERROR=0 INFO=1 WARN=2 DEBUG=3 — threshold 3 shows everything.
|
|
16
|
+
levels: {
|
|
17
|
+
default: -1,
|
|
18
|
+
'channel-harness': 3,
|
|
19
|
+
'channel-access': 3,
|
|
20
|
+
'channel-weixin': 3,
|
|
21
|
+
'channel-qq': 3,
|
|
22
|
+
'channel-lark': 3,
|
|
23
|
+
'channel-dingtalk': 3,
|
|
24
|
+
'channel-telegram': 3,
|
|
25
|
+
},
|
|
26
|
+
export(message) {
|
|
27
|
+
console[message.type](Logger.format(exporter, message));
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
ctx.logger.exporter(exporter);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=debug-logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-logger.js","sourceRoot":"","sources":["../src/debug-logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA+B,MAAM,qBAAqB,CAAC;AAE1E,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAEvD;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,GAAY;IACtD,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,KAAK,GAAG;QAAE,OAAO;IAEpD,OAAO,CAAC,IAAI,CAAC,kDAAkD,kBAAkB,KAAK,CAAC,CAAC;IAExF,MAAM,QAAQ,GAAa;QACzB,MAAM,EAAE,KAAK;QACb,oEAAoE;QACpE,uEAAuE;QACvE,gEAAgE;QAChE,MAAM,EAAE;YACN,OAAO,EAAE,CAAC,CAAC;YACX,iBAAiB,EAAE,CAAC;YACpB,gBAAgB,EAAE,CAAC;YACnB,gBAAgB,EAAE,CAAC;YACnB,YAAY,EAAE,CAAC;YACf,cAAc,EAAE,CAAC;YACjB,kBAAkB,EAAE,CAAC;YACrB,kBAAkB,EAAE,CAAC;SACtB;QACD,MAAM,CAAC,OAAO;YACZ,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;QAC1D,CAAC;KACF,CAAC;IAEF,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CHANNELS_DATA_DIR_NAME } from '@krischoichoi/channel-core';
|
|
2
|
+
export { CHANNELS_DATA_DIR_NAME };
|
|
3
|
+
/**
|
|
4
|
+
* Resolve the Harness Home directory. Uses `$DSH_HOME` when set (a leading
|
|
5
|
+
* `~` is expanded against `homedir()`), otherwise `~/.dsh`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveDshHome(): string;
|
|
8
|
+
/** Channel plugin persistent data directory: `<dsh-home>/dsh-channels`. */
|
|
9
|
+
export declare function resolveChannelDataDir(): string;
|
|
10
|
+
/** Default binding store path: `<dsh-home>/dsh-channels/bindings.json`. */
|
|
11
|
+
export declare function resolveDefaultBindingStorePath(): string;
|
|
12
|
+
//# sourceMappingURL=dsh-home.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dsh-home.d.ts","sourceRoot":"","sources":["../src/dsh-home.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,sBAAsB,EAEvB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,2EAA2E;AAC3E,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED,2EAA2E;AAC3E,wBAAgB,8BAA8B,IAAI,MAAM,CAEvD"}
|
package/lib/dsh-home.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Harness Home (`$DSH_HOME`, fallback `~/.dsh`) path resolution.
|
|
3
|
+
*
|
|
4
|
+
* channel-harness keeps its persistent state (the binding store) and its
|
|
5
|
+
* channel workspace root under the Harness Home instead of the process cwd,
|
|
6
|
+
* so bindings no longer "disappear" when the host is started from a different
|
|
7
|
+
* directory.
|
|
8
|
+
*
|
|
9
|
+
* The `~` prefix in an explicit `$DSH_HOME` is expanded against the OS home
|
|
10
|
+
* directory; unset `$DSH_HOME` falls back to `~/.dsh`.
|
|
11
|
+
*/
|
|
12
|
+
import { resolveDshHome as resolveHarnessHome, } from '@deepseek-ai/dsh-home-paths';
|
|
13
|
+
import { CHANNELS_DATA_DIR_NAME, resolveChannelDataDirectory, } from '@krischoichoi/channel-core';
|
|
14
|
+
import { join } from 'node:path';
|
|
15
|
+
export { CHANNELS_DATA_DIR_NAME };
|
|
16
|
+
/**
|
|
17
|
+
* Resolve the Harness Home directory. Uses `$DSH_HOME` when set (a leading
|
|
18
|
+
* `~` is expanded against `homedir()`), otherwise `~/.dsh`.
|
|
19
|
+
*/
|
|
20
|
+
export function resolveDshHome() {
|
|
21
|
+
return resolveHarnessHome();
|
|
22
|
+
}
|
|
23
|
+
/** Channel plugin persistent data directory: `<dsh-home>/dsh-channels`. */
|
|
24
|
+
export function resolveChannelDataDir() {
|
|
25
|
+
return resolveChannelDataDirectory();
|
|
26
|
+
}
|
|
27
|
+
/** Default binding store path: `<dsh-home>/dsh-channels/bindings.json`. */
|
|
28
|
+
export function resolveDefaultBindingStorePath() {
|
|
29
|
+
return join(resolveChannelDataDir(), 'bindings.json');
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=dsh-home.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dsh-home.js","sourceRoot":"","sources":["../src/dsh-home.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,cAAc,IAAI,kBAAkB,GACrC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,kBAAkB,EAAE,CAAC;AAC9B,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,qBAAqB;IACnC,OAAO,2BAA2B,EAAE,CAAC;AACvC,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,8BAA8B;IAC5C,OAAO,IAAI,CAAC,qBAAqB,EAAE,EAAE,eAAe,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LlmFailure } from '@deepseek-ai/dsh-llm';
|
|
2
|
+
/**
|
|
3
|
+
* Project a Harness terminal failure into text that is safe to send through a
|
|
4
|
+
* channel: provider AUTH diagnostics are not user-facing because they can
|
|
5
|
+
* contain credential data.
|
|
6
|
+
*/
|
|
7
|
+
export declare function displayChannelFailure(failure: LlmFailure): string;
|
|
8
|
+
/** A distinct channel notice for a failed Harness turn. */
|
|
9
|
+
export declare function formatChannelTurnFailure(failure: LlmFailure): string;
|
|
10
|
+
//# sourceMappingURL=failure-display.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"failure-display.d.ts","sourceRoot":"","sources":["../src/failure-display.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAOvD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAWjE;AAqBD,2DAA2D;AAC3D,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEpE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const PROVIDER_FAILURE_BODY_SCHEMA = z.object({
|
|
3
|
+
message: z.string().trim().min(1),
|
|
4
|
+
});
|
|
5
|
+
/**
|
|
6
|
+
* Project a Harness terminal failure into text that is safe to send through a
|
|
7
|
+
* channel: provider AUTH diagnostics are not user-facing because they can
|
|
8
|
+
* contain credential data.
|
|
9
|
+
*/
|
|
10
|
+
export function displayChannelFailure(failure) {
|
|
11
|
+
if (failure.code === 'AUTH') {
|
|
12
|
+
return 'API key is invalid';
|
|
13
|
+
}
|
|
14
|
+
if (failure.code === 'QUOTA') {
|
|
15
|
+
const providerMessage = providerFailureMessage(failure.message);
|
|
16
|
+
if (providerMessage)
|
|
17
|
+
return providerMessage;
|
|
18
|
+
}
|
|
19
|
+
return failure.message || 'Model request failed';
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Some provider errors arrive as a status prefix followed by a JSON body, for
|
|
23
|
+
* example `429: {"type":"GoUsageLimitError","message":"..."}`. Prefer the
|
|
24
|
+
* body message so channel users see the actionable provider explanation.
|
|
25
|
+
*/
|
|
26
|
+
function providerFailureMessage(text) {
|
|
27
|
+
const bodyStart = text.indexOf('{');
|
|
28
|
+
if (bodyStart < 0)
|
|
29
|
+
return undefined;
|
|
30
|
+
try {
|
|
31
|
+
const parsed = PROVIDER_FAILURE_BODY_SCHEMA.safeParse(JSON.parse(text.slice(bodyStart)));
|
|
32
|
+
return parsed.success ? parsed.data.message : undefined;
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** A distinct channel notice for a failed Harness turn. */
|
|
39
|
+
export function formatChannelTurnFailure(failure) {
|
|
40
|
+
return `⚠️ 本轮运行失败\n\n${displayChannelFailure(failure)}`;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=failure-display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"failure-display.js","sourceRoot":"","sources":["../src/failure-display.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAClC,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAmB;IACvD,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QAC5B,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IAED,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC7B,MAAM,eAAe,GAAG,sBAAsB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAChE,IAAI,eAAe;YAAE,OAAO,eAAe,CAAC;IAC9C,CAAC;IAED,OAAO,OAAO,CAAC,OAAO,IAAI,sBAAsB,CAAC;AACnD,CAAC;AAED;;;;GAIG;AACH,SAAS,sBAAsB,CAAC,IAAY;IAC1C,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACpC,IAAI,SAAS,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IAEpC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,4BAA4B,CAAC,SAAS,CACnD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAClC,CAAC;QACF,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,wBAAwB,CAAC,OAAmB;IAC1D,OAAO,gBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,CAAC;AAC1D,CAAC"}
|