dsh-connect 0.5.0 → 0.5.3
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 +184 -8
- package/lib/binding.d.ts +53 -0
- package/lib/binding.d.ts.map +1 -1
- package/lib/binding.js +72 -3
- package/lib/binding.js.map +1 -1
- package/lib/commands.d.ts +14 -0
- package/lib/commands.d.ts.map +1 -1
- package/lib/commands.js +40 -0
- package/lib/commands.js.map +1 -1
- package/lib/i18n.d.ts +90 -0
- package/lib/i18n.d.ts.map +1 -1
- package/lib/i18n.js +210 -4
- package/lib/i18n.js.map +1 -1
- package/lib/index.d.ts +16 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -1
- package/lib/index.js.map +1 -1
- package/lib/interaction.d.ts +96 -0
- package/lib/interaction.d.ts.map +1 -0
- package/lib/interaction.js +389 -0
- package/lib/interaction.js.map +1 -0
- package/lib/runner.d.ts +181 -2
- package/lib/runner.d.ts.map +1 -1
- package/lib/runner.js +1169 -62
- package/lib/runner.js.map +1 -1
- package/lib/service.d.ts +19 -0
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +128 -2
- package/lib/service.js.map +1 -1
- package/lib/types.d.ts +26 -0
- package/lib/types.d.ts.map +1 -1
- package/package.json +58 -58
- package/LICENSE +0 -21
package/lib/types.d.ts
CHANGED
|
@@ -20,14 +20,20 @@ export interface InboundMessage {
|
|
|
20
20
|
readonly replyRef?: string;
|
|
21
21
|
/** Local file paths of images attached to the message (downloaded by the adapter). */
|
|
22
22
|
readonly images?: readonly string[];
|
|
23
|
+
/** Local file paths of non-image attachments (files/audio/video) downloaded by the adapter. */
|
|
24
|
+
readonly files?: readonly string[];
|
|
23
25
|
/** Set when image download failed (e.g. missing im:resource permission). */
|
|
24
26
|
readonly imageError?: string;
|
|
27
|
+
/** Set when a non-image attachment download failed. */
|
|
28
|
+
readonly fileError?: string;
|
|
25
29
|
}
|
|
26
30
|
/** Where an outbound message goes. */
|
|
27
31
|
export interface OutboundTarget {
|
|
28
32
|
readonly chatKey: string;
|
|
29
33
|
readonly chatType: ChatType;
|
|
30
34
|
readonly replyRef?: string;
|
|
35
|
+
/** Channel-specific user ids to @-mention on delivery (groups only; best-effort). */
|
|
36
|
+
readonly atUsers?: readonly string[];
|
|
31
37
|
}
|
|
32
38
|
/** A brief status card pushed on turn completion or error. */
|
|
33
39
|
export interface SummaryCard {
|
|
@@ -44,6 +50,8 @@ export interface ChoiceSection {
|
|
|
44
50
|
readonly title?: string;
|
|
45
51
|
/** Option ids belonging to this section, in display order. */
|
|
46
52
|
readonly ids: readonly string[];
|
|
53
|
+
/** Number of columns per row for this section (overrides prompt default). */
|
|
54
|
+
readonly columnsPerRow?: number;
|
|
47
55
|
}
|
|
48
56
|
/** An interactive single-choice prompt rendered by the channel as buttons. */
|
|
49
57
|
export interface ChoicePrompt {
|
|
@@ -54,6 +62,8 @@ export interface ChoicePrompt {
|
|
|
54
62
|
readonly sections?: readonly ChoiceSection[];
|
|
55
63
|
/** Optional footnote rendered at the bottom of the card. */
|
|
56
64
|
readonly footer?: string;
|
|
65
|
+
/** Number of columns per row for button grid (default: 2). Use 1 for full-width items. */
|
|
66
|
+
readonly columnsPerRow?: number;
|
|
57
67
|
}
|
|
58
68
|
/** Result of an interactive choice: the picked option and the card's message id. */
|
|
59
69
|
export interface ChoiceResult {
|
|
@@ -70,6 +80,22 @@ export interface TurnOutcome {
|
|
|
70
80
|
readonly text: string;
|
|
71
81
|
readonly code?: string;
|
|
72
82
|
readonly message?: string;
|
|
83
|
+
/** `provider/model` used by the turn's last LLM request. */
|
|
84
|
+
readonly model?: string;
|
|
85
|
+
/** Total input tokens (sum of every request) across the turn. */
|
|
86
|
+
readonly inputTokens?: number;
|
|
87
|
+
/** Total output tokens across the turn. */
|
|
88
|
+
readonly outputTokens?: number;
|
|
89
|
+
/** Total cache-read tokens across the turn. */
|
|
90
|
+
readonly cacheReadTokens?: number;
|
|
91
|
+
/** Input tokens of the turn's last request (≈ current context size). */
|
|
92
|
+
readonly contextSize?: number;
|
|
93
|
+
/** Context window of the turn's last request (for compaction advice). */
|
|
94
|
+
readonly contextWindow?: number;
|
|
95
|
+
/** Number of steps executed in the turn. */
|
|
96
|
+
readonly steps?: number;
|
|
97
|
+
/** Wall-clock duration of the turn (from `turn/start` to `turn/end`). */
|
|
98
|
+
readonly elapsedMs?: number;
|
|
73
99
|
}
|
|
74
100
|
/** Push-based async iterable bridge: producers push, consumers `for await`. */
|
|
75
101
|
export interface AsyncQueue<T> extends AsyncIterable<T> {
|
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,+DAA+D;AAC/D,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;AAEvC,qDAAqD;AACrD,MAAM,WAAW,cAAc;IAC7B,sEAAsE;IACtE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,gDAAgD;IAChD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,sFAAsF;IACtF,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,4EAA4E;IAC5E,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,+DAA+D;AAC/D,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,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,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAC5G,6EAA6E;IAC7E,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,yEAAyE;IACzE,SAAS,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACzE"}
|
package/package.json
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-connect",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "Channel-agnostic messaging bridge core for DeepSeek Harness (DSH): binds chat channels to DSH agents, streams replies, and pushes work summaries",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "lib/index.js",
|
|
7
|
-
"types": "lib/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./lib/index.d.ts",
|
|
11
|
-
"default": "./lib/index.js"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"lib"
|
|
16
|
-
],
|
|
17
|
-
"keywords": [
|
|
18
|
-
"dsh",
|
|
19
|
-
"deepseek-harness",
|
|
20
|
-
"feishu",
|
|
21
|
-
"lark",
|
|
22
|
-
"dingtalk",
|
|
23
|
-
"ai-agent",
|
|
24
|
-
"chatbot",
|
|
25
|
-
"cordis",
|
|
26
|
-
"messaging"
|
|
27
|
-
],
|
|
28
|
-
"license": "MIT",
|
|
29
|
-
"repository": {
|
|
30
|
-
"type": "git",
|
|
31
|
-
"url": "https://github.com/IvanWu2015/dsh-connect.git",
|
|
32
|
-
"directory": "packages/connect"
|
|
33
|
-
},
|
|
34
|
-
"homepage": "https://github.com/IvanWu2015/dsh-connect",
|
|
35
|
-
"bugs": {
|
|
36
|
-
"url": "https://github.com/IvanWu2015/dsh-connect/issues"
|
|
37
|
-
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"@deepseek-ai/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"@deepseek-ai/
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"@
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-connect",
|
|
3
|
+
"version": "0.5.3",
|
|
4
|
+
"description": "Channel-agnostic messaging bridge core for DeepSeek Harness (DSH): binds chat channels to DSH agents, streams replies, and pushes work summaries",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"types": "lib/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/index.d.ts",
|
|
11
|
+
"default": "./lib/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"lib"
|
|
16
|
+
],
|
|
17
|
+
"keywords": [
|
|
18
|
+
"dsh",
|
|
19
|
+
"deepseek-harness",
|
|
20
|
+
"feishu",
|
|
21
|
+
"lark",
|
|
22
|
+
"dingtalk",
|
|
23
|
+
"ai-agent",
|
|
24
|
+
"chatbot",
|
|
25
|
+
"cordis",
|
|
26
|
+
"messaging"
|
|
27
|
+
],
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://github.com/IvanWu2015/dsh-connect.git",
|
|
32
|
+
"directory": "packages/connect"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://github.com/IvanWu2015/dsh-connect",
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/IvanWu2015/dsh-connect/issues"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsc -p tsconfig.json",
|
|
40
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@deepseek-ai/schemastery": "^3.18.1"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
47
|
+
"@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
|
|
48
|
+
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
|
|
49
|
+
"@deepseek-ai/dsh-session": "^0.1.0-rc.6"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
53
|
+
"@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
|
|
54
|
+
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
|
|
55
|
+
"@deepseek-ai/dsh-session": "^0.1.0-rc.6",
|
|
56
|
+
"@types/node": "^22.15.0",
|
|
57
|
+
"typescript": "^5.6.3"
|
|
58
|
+
}
|
|
59
59
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 IvanWu2015
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|