@krischoichoi/dsh-channels 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 +146 -0
- package/cordis.patch.yml +81 -0
- package/lib/client.js +5005 -0
- package/lib/client.js.map +7 -0
- package/lib/control.d.ts +2 -0
- package/lib/control.d.ts.map +1 -0
- package/lib/control.js +2 -0
- package/lib/control.js.map +1 -0
- package/lib/dingtalk.d.ts +18 -0
- package/lib/dingtalk.d.ts.map +1 -0
- package/lib/dingtalk.js +18 -0
- package/lib/dingtalk.js.map +1 -0
- package/lib/files.d.ts +2 -0
- package/lib/files.d.ts.map +1 -0
- package/lib/files.js +2 -0
- package/lib/files.js.map +1 -0
- package/lib/harness.d.ts +2 -0
- package/lib/harness.d.ts.map +1 -0
- package/lib/harness.js +2 -0
- package/lib/harness.js.map +1 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -0
- package/lib/lark.d.ts +18 -0
- package/lib/lark.d.ts.map +1 -0
- package/lib/lark.js +18 -0
- package/lib/lark.js.map +1 -0
- package/lib/qq.d.ts +18 -0
- package/lib/qq.d.ts.map +1 -0
- package/lib/qq.js +18 -0
- package/lib/qq.js.map +1 -0
- package/lib/service.d.ts +2 -0
- package/lib/service.d.ts.map +1 -0
- package/lib/service.js +2 -0
- package/lib/service.js.map +1 -0
- package/lib/telegram.d.ts +18 -0
- package/lib/telegram.d.ts.map +1 -0
- package/lib/telegram.js +18 -0
- package/lib/telegram.js.map +1 -0
- package/lib/weixin.d.ts +18 -0
- package/lib/weixin.d.ts.map +1 -0
- package/lib/weixin.js +18 -0
- package/lib/weixin.js.map +1 -0
- package/package.json +101 -0
package/README.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# @krischoichoi/dsh-channels
|
|
2
|
+
|
|
3
|
+
DeepSeek Harness **DSH Bundle** — built-in messaging channels:
|
|
4
|
+
|
|
5
|
+
- Weixin / 微信
|
|
6
|
+
- QQ Bot
|
|
7
|
+
- DingTalk / 钉钉
|
|
8
|
+
- Lark / Feishu / 飞书
|
|
9
|
+
- Telegram / 电报(Bot API)
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @deepseek-ai/dsh plugin --profile web add -w @krischoichoi/dsh-channels@latest
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
> The profile directory is itself a pnpm workspace, so `-w` (`--workspace-root`)
|
|
18
|
+
> is required to add the bundle to the workspace root (otherwise pnpm fails with
|
|
19
|
+
> `ERR_PNPM_ADDING_TO_ROOT`). `@latest` selects the stable release. Run
|
|
20
|
+
> `npm view @krischoichoi/dsh-channels dist-tags` to inspect the current `beta` and
|
|
21
|
+
> `latest` targets.
|
|
22
|
+
|
|
23
|
+
The bundle patch (`cordis.patch.yml`) references only entrypoints exported by
|
|
24
|
+
`@krischoichoi/dsh-channels` itself. Those entrypoints delegate to the ChannelService,
|
|
25
|
+
the generic attachment compatibility backend, Harness bridge, control plane, Web
|
|
26
|
+
settings panel and the five channel adapters through the bundle's own dependency
|
|
27
|
+
tree. Every channel can be disabled through its plugin config.
|
|
28
|
+
|
|
29
|
+
## Quick start
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# 1. add the bundle to a profile
|
|
33
|
+
npx @deepseek-ai/dsh plugin --profile web add -w @krischoichoi/dsh-channels@latest
|
|
34
|
+
|
|
35
|
+
# 2. confirm the merged config inserted the channel plugins
|
|
36
|
+
npx @deepseek-ai/dsh --profile web --dump-config
|
|
37
|
+
|
|
38
|
+
# 3. start the profile — all five channels load
|
|
39
|
+
npx @deepseek-ai/dsh web
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Update and uninstall
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Install or switch package.json to the latest stable release
|
|
46
|
+
npx @deepseek-ai/dsh plugin --profile web add -w @krischoichoi/dsh-channels@latest
|
|
47
|
+
|
|
48
|
+
# Update within the package.json semver range
|
|
49
|
+
npx @deepseek-ai/dsh plugin --profile web update -w @krischoichoi/dsh-channels
|
|
50
|
+
|
|
51
|
+
# Remove the bundle; also remove any channels-* overrides from your profile patch
|
|
52
|
+
npx @deepseek-ai/dsh plugin --profile web remove -w @krischoichoi/dsh-channels
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Disable a channel you don't use by setting its plugin `enabled` flag to `false`
|
|
56
|
+
in your profile patch, e.g. `plugins.channels-weixin.enabled = false`.
|
|
57
|
+
See `apps/example/minimal-profile/` in the repository for a reference profile.
|
|
58
|
+
|
|
59
|
+
## Verify your install
|
|
60
|
+
|
|
61
|
+
Use a clean profile to confirm the bundle loads end to end (never reuse a dirty
|
|
62
|
+
profile for release validation):
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# 1. add the bundle to a clean profile (auto-initializes it on first use)
|
|
66
|
+
npx @deepseek-ai/dsh plugin --profile release-validation add -w @krischoichoi/dsh-channels@latest
|
|
67
|
+
|
|
68
|
+
# 2. dump the merged config — verify the channel plugins were inserted
|
|
69
|
+
npx @deepseek-ai/dsh --profile release-validation --dump-config
|
|
70
|
+
|
|
71
|
+
# 3. start the profile — channels-service / -harness / -control and the five
|
|
72
|
+
# adapters (plus channels-web) should all load without error
|
|
73
|
+
npx @deepseek-ai/dsh --profile release-validation
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Dependencies
|
|
77
|
+
|
|
78
|
+
The bundle owns every Harness loader entry and its Web client face. Its npm
|
|
79
|
+
`dependencies` provide the implementations behind those entries, so **you only
|
|
80
|
+
ever install `@krischoichoi/dsh-channels`**:
|
|
81
|
+
|
|
82
|
+
| Package | Role |
|
|
83
|
+
| ------------------------ | ---- |
|
|
84
|
+
| `@krischoichoi/channel-core` | Cross-channel contract + `ChannelService` (`ctx.channels`) |
|
|
85
|
+
| `@krischoichoi/channel-harness`| Harness bridge (`SessionBinding`, `AgentManager`, reply pipeline) |
|
|
86
|
+
| `@krischoichoi/channel-control`| Config / credentials / auth-session control plane |
|
|
87
|
+
| `@krischoichoi/channel-files` | Generic attachment compatibility backend (store / extract / `read_channel_attachment`) |
|
|
88
|
+
| `@krischoichoi/channel-web` | Web dashboard (`Settings > Channels`) for GUI setup |
|
|
89
|
+
| `@krischoichoi/channel-weixin/qq/dingtalk/lark/telegram` | The five channel adapters |
|
|
90
|
+
|
|
91
|
+
The Web dashboard (`@krischoichoi/channel-web`) declares one dynamic client
|
|
92
|
+
dependency (`@deepseek-ai/dsh-client-locale`, provider of the `locale`
|
|
93
|
+
service); React, `@deepseek-ai/cordis` and the static UI libraries
|
|
94
|
+
(`-ui-primitives`, `-ui-slots`) are shell-owned identities the Harness web app
|
|
95
|
+
compiles in — nothing extra to install for that panel beyond a Harness
|
|
96
|
+
version that ships them.
|
|
97
|
+
|
|
98
|
+
## Selecting adapters
|
|
99
|
+
|
|
100
|
+
The individual adapter packages do not currently carry their own `dsh.bundle`
|
|
101
|
+
profile patches, so installing one with `plugin add` is not a complete Harness
|
|
102
|
+
setup. Install `@krischoichoi/dsh-channels`, then disable or override unwanted
|
|
103
|
+
`channels-*` rows in the profile patch. See `apps/example/minimal-profile/` for
|
|
104
|
+
the complete row shapes.
|
|
105
|
+
|
|
106
|
+
## Architecture
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
Messaging Platform
|
|
110
|
+
│
|
|
111
|
+
▼
|
|
112
|
+
Upstream Driver
|
|
113
|
+
│
|
|
114
|
+
▼
|
|
115
|
+
Channel Adapter (channel-weixin/qq/dingtalk/lark/telegram)
|
|
116
|
+
│
|
|
117
|
+
▼
|
|
118
|
+
ChannelService (Cordis Service, ctx.channels)
|
|
119
|
+
│
|
|
120
|
+
▼
|
|
121
|
+
Harness Bridge (channel-harness)
|
|
122
|
+
│
|
|
123
|
+
▼
|
|
124
|
+
DeepSeek Harness Agent / Session
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
- Adapters never touch `ctx.agents`.
|
|
128
|
+
- The Harness bridge is the only place allowed to import Harness public APIs.
|
|
129
|
+
- Replies flow from `session/event` back through the bridge to the adapters.
|
|
130
|
+
|
|
131
|
+
## Development
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
pnpm --filter @krischoichoi/dsh-channels build
|
|
135
|
+
pnpm --filter @krischoichoi/dsh-channels typecheck
|
|
136
|
+
pnpm --filter @krischoichoi/dsh-channels test
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Related
|
|
140
|
+
|
|
141
|
+
- [Repository root](../../README.md)
|
|
142
|
+
- [Architecture design](../../docs/architecture.md)
|
|
143
|
+
|
|
144
|
+
## License
|
|
145
|
+
|
|
146
|
+
[MIT](../../LICENSE)
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# DSH Bundle patch — @krischoichoi/dsh-channels
|
|
2
|
+
#
|
|
3
|
+
# Inserts the ChannelService, the Harness bridge and the five official
|
|
4
|
+
# adapters into a DeepSeek Harness profile.
|
|
5
|
+
#
|
|
6
|
+
# Every channel below can be disabled through its own plugin config
|
|
7
|
+
# (e.g. `plugins.channels-weixin.enabled = false`).
|
|
8
|
+
#
|
|
9
|
+
# `inject` names follow the Harness public service surface at bundle time;
|
|
10
|
+
# adjust when the upstream service names change (converged in channel-harness).
|
|
11
|
+
|
|
12
|
+
- insert:
|
|
13
|
+
- id: channels-service
|
|
14
|
+
name: '@krischoichoi/dsh-channels/service'
|
|
15
|
+
|
|
16
|
+
# Generic attachment compatibility backend.
|
|
17
|
+
# Required for non-image channel attachments until Harness provides native
|
|
18
|
+
# generic attachment support. Legacy v1 data remains readable even after a
|
|
19
|
+
# native backend becomes available.
|
|
20
|
+
- id: channels-files
|
|
21
|
+
name: '@krischoichoi/dsh-channels/files'
|
|
22
|
+
|
|
23
|
+
# Questions compose on the official `user-questions/request` waterfall.
|
|
24
|
+
# Untagged root listeners are always ADMITTED, but the waterfall is
|
|
25
|
+
# sequential and first-claim-wins: `@deepseek-ai/dsh-api-remotes` (official
|
|
26
|
+
# web profile) registers its forwarding answerer at boot, before this row,
|
|
27
|
+
# so the bridge PREPENDS its own answerer (see WaterfallQuestionBackend)
|
|
28
|
+
# instead of relying on fiber order. Declined presentations still delegate
|
|
29
|
+
# via `next()`.
|
|
30
|
+
- id: channels-harness
|
|
31
|
+
name: '@krischoichoi/dsh-channels/harness'
|
|
32
|
+
inject:
|
|
33
|
+
- channels
|
|
34
|
+
- agents
|
|
35
|
+
- agentDefaultModel
|
|
36
|
+
- agentPresets
|
|
37
|
+
- llm
|
|
38
|
+
- commands
|
|
39
|
+
|
|
40
|
+
- id: channels-control
|
|
41
|
+
name: '@krischoichoi/dsh-channels/control'
|
|
42
|
+
inject:
|
|
43
|
+
- channels
|
|
44
|
+
- credentials
|
|
45
|
+
|
|
46
|
+
- id: channels-weixin
|
|
47
|
+
name: '@krischoichoi/dsh-channels/weixin'
|
|
48
|
+
inject:
|
|
49
|
+
- channels
|
|
50
|
+
- channelControl
|
|
51
|
+
|
|
52
|
+
- id: channels-qq
|
|
53
|
+
name: '@krischoichoi/dsh-channels/qq'
|
|
54
|
+
inject:
|
|
55
|
+
- channels
|
|
56
|
+
- credentials
|
|
57
|
+
- channelControl
|
|
58
|
+
|
|
59
|
+
- id: channels-dingtalk
|
|
60
|
+
name: '@krischoichoi/dsh-channels/dingtalk'
|
|
61
|
+
inject:
|
|
62
|
+
- channels
|
|
63
|
+
- credentials
|
|
64
|
+
- channelControl
|
|
65
|
+
|
|
66
|
+
- id: channels-lark
|
|
67
|
+
name: '@krischoichoi/dsh-channels/lark'
|
|
68
|
+
inject:
|
|
69
|
+
- channels
|
|
70
|
+
- credentials
|
|
71
|
+
- channelControl
|
|
72
|
+
|
|
73
|
+
- id: channels-telegram
|
|
74
|
+
name: '@krischoichoi/dsh-channels/telegram'
|
|
75
|
+
inject:
|
|
76
|
+
- channels
|
|
77
|
+
- credentials
|
|
78
|
+
- channelControl
|
|
79
|
+
|
|
80
|
+
- id: channels-web
|
|
81
|
+
name: '@krischoichoi/dsh-channels'
|