dsh-connect 0.5.0 → 0.5.2
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 +51 -0
- package/lib/binding.d.ts.map +1 -1
- package/lib/binding.js +71 -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 +75 -0
- package/lib/i18n.d.ts.map +1 -1
- package/lib/i18n.js +164 -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 +169 -2
- package/lib/runner.d.ts.map +1 -1
- package/lib/runner.js +1082 -56
- 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 +24 -0
- package/lib/types.d.ts.map +1 -1
- package/package.json +58 -58
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -1,21 +1,197 @@
|
|
|
1
1
|
# dsh-connect
|
|
2
2
|
|
|
3
|
-
The **channel-agnostic core** for connecting [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (**DSH**) agents to chat platforms (Feishu / Lark
|
|
3
|
+
The **channel-agnostic core** for connecting [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (**DSH**) agents to chat platforms (Feishu / Lark first, more to come): session binding, agent driving, streaming reply bridging, interactive menu cards, and local commands.
|
|
4
4
|
|
|
5
|
-
> Install together with a channel adapter
|
|
5
|
+
> Install together with a channel adapter — e.g. [dsh-connect-feishu](https://www.npmjs.com/package/dsh-connect-feishu) — or the optional [dsh-connect-web](https://www.npmjs.com/package/dsh-connect-web) mirror monitor.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
`dsh-connect` binds a chat conversation to a DSH agent session and drives it end to end:
|
|
10
|
+
|
|
11
|
+
- **Session binding & routing** — one chat ⇄ one agent session, persisted in a `bindings.json` route store; sessions can be created, resumed, switched, cleared and mirrored to the DSH Web GUI.
|
|
12
|
+
- **Streaming replies** — DSH `assistant/chunk` events are bridged into the channel's native streaming (Feishu typewriter cards): the thinking hint opens the reasoning phase, reasoning streams live with readable paragraph breaks, tool calls appear as `🔧` progress lines, and a liveness heartbeat keeps the card moving even through long silent stretches (long first-token waits, heavy tool runs) so it never sits frozen on "Thinking…".
|
|
13
|
+
- **Notification levels** — per-chat control over how much of the process is streamed: `尽量输出过程` (full process) / `输出重要节点` (key milestones) / `只输出结果` (result only). Switch any time via the settings menu or `/notify`; the choice is persisted per chat and applies immediately.
|
|
14
|
+
- **Task-end stats** — after every task a compact card reports the model used, input/output tokens, elapsed time and context-window usage, and suggests `/compact` when the context is getting full.
|
|
15
|
+
- **Interactive menus** — button cards for status, tasks, history, goals, schedule, model/effort switching, workspace picking, language, and more (see the in-chat `/` commands).
|
|
16
|
+
- **Media handling** — downloads user images/attachments, passes them to a vision-capable model (or a configured vision model) so text-only main models never stall on images.
|
|
17
|
+
- **Locking & queuing** — per-chat write locks coordinate Feishu and Web writers; queued messages drain when the lock releases.
|
|
18
|
+
- **Web mirror (auto)** — every Feishu conversation is automatically available in the DSH Web GUI as a mirrored session (disable with `autoMirror: false`).
|
|
19
|
+
|
|
20
|
+
**Who is it for?** Anyone running DSH who wants to operate agents from a chat platform — solo operators running a bot for their own workspaces, and small teams sharing a bot in group chats with an allowlist.
|
|
21
|
+
|
|
22
|
+
## Compatibility
|
|
23
|
+
|
|
24
|
+
| Aspect | Value |
|
|
25
|
+
|---|---|
|
|
26
|
+
| DSH version | `^0.1.0-rc.6` (peer `@deepseek-ai/dsh-agent`, `dsh-llm`, `dsh-session`) |
|
|
27
|
+
| Cordis | `^4.0.1` |
|
|
28
|
+
| Node.js | ≥ 20 (ESM, `NodeNext`) |
|
|
29
|
+
| Last verified | **2026-08-16** against DSH `0.1.0-rc.6` on Windows (Feishu WebSocket transport) |
|
|
30
|
+
|
|
31
|
+
The plugin runs on the DSH **Host plane** (process-level singleton services), not inside an agent preset.
|
|
32
|
+
|
|
33
|
+
## Install / Uninstall
|
|
34
|
+
|
|
35
|
+
Plugin management is a thin wrapper over pnpm in the DSH profile:
|
|
8
36
|
|
|
9
37
|
```sh
|
|
38
|
+
# Install (core + Feishu adapter)
|
|
10
39
|
dsh plugin --profile web add dsh-connect dsh-connect-feishu
|
|
40
|
+
|
|
41
|
+
# Optional: Web mirror monitor
|
|
42
|
+
dsh plugin --profile web add dsh-connect-web
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Upgrade**
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
dsh plugin --profile web update dsh-connect dsh-connect-feishu
|
|
11
49
|
```
|
|
12
50
|
|
|
13
|
-
|
|
51
|
+
**Disable** — remove the entries from the profile patch so the plugins stop loading (see `~/.dsh/profiles/<profile>/cordis.patch.yml`):
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
- insert:
|
|
55
|
+
- id: connect # delete this block (and connect-feishu) to disable
|
|
56
|
+
name: dsh-connect
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Complete removal** — uninstall the packages and delete the data they created:
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
dsh plugin --profile web remove dsh-connect dsh-connect-feishu
|
|
63
|
+
# then remove the plugin data (see "Permissions & data" below):
|
|
64
|
+
rm -rf .dsh-connect # binding route store (stateDir)
|
|
65
|
+
rm -f ~/.dsh/.dsh-connect/feishu-credentials.json
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Quick start
|
|
69
|
+
|
|
70
|
+
1. **Install the plugins** (see above).
|
|
71
|
+
2. **Add the minimal config** to `~/.dsh/profiles/<profile>/cordis.patch.yml` (also see [`examples/profile-cordis.patch.yml`](../../examples/profile-cordis.patch.yml)):
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
- insert:
|
|
75
|
+
- id: connect
|
|
76
|
+
name: dsh-connect
|
|
77
|
+
# workDir: D:\your\workdir # agent working directory (default: process cwd)
|
|
78
|
+
- id: connect-feishu
|
|
79
|
+
name: dsh-connect-feishu
|
|
80
|
+
config:
|
|
81
|
+
appId: cli_xxxx
|
|
82
|
+
appSecret: cli_secret_xxxx
|
|
83
|
+
transport: websocket
|
|
84
|
+
requireMention: true
|
|
85
|
+
dmMode: open
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
3. **Start the host** — `dsh web` (or `dsh run`). With no credentials configured, `dsh-connect-feishu` enters **one-click onboarding**: scan the QR / open the link from the log to authorize the bot.
|
|
89
|
+
4. **Send a message** to the bot in Feishu. The bot replies with a streaming card; `/help` lists all commands; the conversation also appears in the DSH Web GUI automatically (auto-mirror).
|
|
90
|
+
|
|
91
|
+
A fully reproducible example is the `examples/` folder plus `docs/feishu-setup.md` (Feishu app creation, event subscriptions, publishing).
|
|
92
|
+
|
|
93
|
+
## Configuration
|
|
94
|
+
|
|
95
|
+
Configuration lives in the DSH profile patch (`cordis.patch.yml`) under each plugin's `config:`. `dsh.shared.config.json` in the project root (or its parent) can supply workspace/state defaults that take precedence for those keys.
|
|
96
|
+
|
|
97
|
+
### `dsh-connect` (core)
|
|
98
|
+
|
|
99
|
+
| Key | Default | Description |
|
|
100
|
+
|---|---|---|
|
|
101
|
+
| `agentPreset` | roster default | Agent preset id composed into each bound session |
|
|
102
|
+
| `workDir` | process cwd | Absolute working directory for each bound agent |
|
|
103
|
+
| `workspaces` | `[]` | Extra workdirs offered by the `/dir` picker |
|
|
104
|
+
| `visionModel` | auto-detected | `{ provider, model }` used to describe images when the main model can't see them |
|
|
105
|
+
| `language` | `zh` | User-facing message language: `zh` / `en` |
|
|
106
|
+
| `allowUsers` | `[]` | Sender allowlist (open_id). Empty = allow all |
|
|
107
|
+
| `allowChats` | `[]` | Chat allowlist (chat_id). Empty = allow all |
|
|
108
|
+
| `stateDir` | `.dsh-connect` | Directory holding the `bindings.json` route store (env `DSH_CONNECT_STATE_DIR` overrides) |
|
|
109
|
+
| `autoMirror` | `true` | Automatically create a Web GUI mirror for every new session |
|
|
110
|
+
| `streamHeartbeatMs` | `60000` | Liveness heartbeat interval (ms) for the streaming card; `0` disables it |
|
|
111
|
+
| `notifyLevel` | `important` | Default notification level: `full` (stream everything) / `important` (key milestones) / `result` (answer only); per-chat override via settings menu or `/notify` |
|
|
112
|
+
| `progressTimeoutMs` | `300000` | Proactive progress-notice interval (ms): when a turn has sent no standalone card/text for this long, a status card reports the latest milestone; `0` disables; per-chat override via settings menu or `/progress` |
|
|
113
|
+
|
|
114
|
+
### `dsh-connect-feishu` (adapter)
|
|
115
|
+
|
|
116
|
+
| Key | Default | Description |
|
|
117
|
+
|---|---|---|
|
|
118
|
+
| `appId` | env `FEISHU_APP_ID` | Feishu custom app id (**secret**) |
|
|
119
|
+
| `appSecret` | env `FEISHU_APP_SECRET` | Feishu custom app secret (**secret**) |
|
|
120
|
+
| `transport` | `websocket` | `websocket` = long connection (no public network); `webhook` needs public HTTPS |
|
|
121
|
+
| `verificationToken` | — | Webhook verification token (**secret**) |
|
|
122
|
+
| `encryptKey` | — | Webhook encrypt key (**secret**) |
|
|
123
|
+
| `requireMention` | `true` | Groups only respond when the bot is @mentioned |
|
|
124
|
+
| `dmMode` | `open` | DM policy: `open` / `allowlist` / `pair` / `disabled` |
|
|
125
|
+
| `language` | `zh` | User-facing message language: `zh` / `en` |
|
|
126
|
+
|
|
127
|
+
**Environment variables**
|
|
128
|
+
|
|
129
|
+
| Variable | Purpose |
|
|
130
|
+
|---|---|
|
|
131
|
+
| `FEISHU_APP_ID` / `FEISHU_APP_SECRET` | Feishu credentials — preferred over putting secrets in config files |
|
|
132
|
+
| `DSH_CONNECT_STATE_DIR` | Overrides `stateDir` for the binding store |
|
|
133
|
+
| `DSH_HOME` | Overrides the `~/.dsh` base for credential files |
|
|
134
|
+
|
|
135
|
+
**Sensitive items** — `appSecret`, `verificationToken`, `encryptKey`, and `feishu-credentials.json`. Prefer environment variables or one-click onboarding; keep them out of version control.
|
|
136
|
+
|
|
137
|
+
## Permissions & data
|
|
138
|
+
|
|
139
|
+
- **Files written**
|
|
140
|
+
- `<stateDir>/bindings.json` (default `.dsh-connect/`) — the chat ⇄ session route store (chat keys, session ids, mirror and lock state).
|
|
141
|
+
- `~/.dsh/.dsh-connect/feishu-credentials.json` — Feishu credentials saved by one-click onboarding.
|
|
142
|
+
- `<workDir>/.dsh-connect-images/` — user images/attachments staged for the agent's tools.
|
|
143
|
+
- DSH's own session logs and settings under `~/.dsh/` (sessions, settings, etc.).
|
|
144
|
+
- **Network**
|
|
145
|
+
- Feishu Open Platform: WebSocket long connection (or webhook over public HTTPS), plus HTTPS API calls (media download, cards).
|
|
146
|
+
- LLM provider APIs used by DSH for the agent's model (e.g. DeepSeek), plus the optional vision model.
|
|
147
|
+
- **User data** — message text and attachments flow through the bot to the agent session; they are stored in the DSH session log like any DSH conversation. The allowlists (`allowUsers` / `allowChats`) limit who can drive the bot.
|
|
148
|
+
|
|
149
|
+
## Troubleshooting
|
|
150
|
+
|
|
151
|
+
Logs come from the DSH host logger (run `dsh web` in a terminal); plugin messages are prefixed `connect:` / `connect-feishu:`.
|
|
152
|
+
|
|
153
|
+
| Symptom | Likely cause / fix |
|
|
154
|
+
|---|---|
|
|
155
|
+
| `connect-feishu: adapter init failed` / `start failed` | Bad credentials, app not published, or network blocked. Check `appId`/`appSecret`, re-run onboarding, verify the bot is online in the Feishu console. |
|
|
156
|
+
| `connect: resume of <id> failed, creating fresh session` | The persisted session could not be resumed (missing workdir, persistence issue). Check `workDir` and `~/.dsh/sessions`. |
|
|
157
|
+
| Session-locked notices | Another client (Feishu or Web) holds the write lock. Use `/unlock` or wait for the lock timeout. |
|
|
158
|
+
| Model switch in the Web GUI appears ignored | Fixed in the current main: the plugin no longer pins a static default model over the Web GUI's session selection. Restart `dsh web` so the rebuilt plugin is loaded. |
|
|
159
|
+
| `[用户发送了图片,但下载失败…]` | Feishu `im:resource` permission is missing on the app; grant it and re-approve. |
|
|
160
|
+
| Streaming reply is one unbroken blob | Fixed in the current main: block boundaries and the reasoning/answer split now insert blank lines (and reasoning soft breaks are expanded for Feishu cards). Restart `dsh web`. |
|
|
161
|
+
| Card frozen on "Thinking…" with no progress on a long task | Fixed in the current main: reasoning now streams live, tool calls show as `🔧` progress lines, and a liveness heartbeat updates the card during silent stretches. Restart `dsh web`. |
|
|
162
|
+
| Menu cards don't update / expire | Cards auto-close after 60 s idle by design; re-open the menu. |
|
|
163
|
+
|
|
164
|
+
**Rollback** — reinstall a previous release (`dsh plugin --profile web add dsh-connect@<version>` after removing the current one), or `git checkout` the pinned commit in a source install.
|
|
165
|
+
|
|
166
|
+
## Development
|
|
167
|
+
|
|
168
|
+
This is a pnpm workspace; the plugins are independent npm packages under `packages/`:
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
packages/
|
|
172
|
+
connect/ # this package — channel-agnostic core
|
|
173
|
+
connect-feishu/ # Feishu / Lark adapter
|
|
174
|
+
connect-web/ # optional Web mirror monitor
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
```sh
|
|
178
|
+
pnpm install
|
|
179
|
+
|
|
180
|
+
# build & typecheck one package
|
|
181
|
+
pnpm --filter dsh-connect build
|
|
182
|
+
pnpm --filter dsh-connect typecheck
|
|
183
|
+
|
|
184
|
+
# unit tests (node:test)
|
|
185
|
+
pnpm test
|
|
186
|
+
# or run one suite
|
|
187
|
+
node packages/connect/test/unit.test.mjs
|
|
188
|
+
```
|
|
14
189
|
|
|
15
|
-
|
|
190
|
+
**Structure** — `src/runner.ts` owns the per-chat agent driver and the streaming bridge (`applyStreamChunk` is the pure, unit-tested chunk assembler); `src/service.ts` owns the adapter registry and routing; `src/i18n.ts` holds the `zh`/`en` dictionaries (keep keys in sync across both); `src/binding.ts` is the route store.
|
|
16
191
|
|
|
17
|
-
https://github.com/IvanWu2015/dsh-connect
|
|
192
|
+
**Contributing** — PRs welcome at [github.com/IvanWu2015/dsh-connect](https://github.com/IvanWu2015/dsh-connect). For user-facing strings, add the key to both `zh` and `en` in `src/i18n.ts`. Release notes live in `CHANGELOG.md`; see `docs/PUBLISHING.md` for the release flow.
|
|
18
193
|
|
|
19
|
-
## License
|
|
194
|
+
## License & security
|
|
20
195
|
|
|
21
|
-
MIT
|
|
196
|
+
- **License:** MIT (see `LICENSE`).
|
|
197
|
+
- **Security:** report vulnerabilities **privately** — use the GitHub security advisory flow on the repository, or contact the maintainer via the email listed on the GitHub profile. Please do not open public issues for credential exposure. Treat `appSecret` / `verificationToken` / `encryptKey` / `feishu-credentials.json` as secrets: prefer environment variables, and never commit them.
|
package/lib/binding.d.ts
CHANGED
|
@@ -16,13 +16,64 @@ export interface ChatBinding {
|
|
|
16
16
|
ownerKey: string;
|
|
17
17
|
createdAt: number;
|
|
18
18
|
lastActiveAt: number;
|
|
19
|
+
/** Per-chat UI language override (`zh` / `en`); falls back to the plugin config. */
|
|
20
|
+
language?: "zh" | "en";
|
|
21
|
+
/** Per-chat notification level for streaming replies; falls back to the plugin config. */
|
|
22
|
+
notifyLevel?: "full" | "important" | "result";
|
|
23
|
+
/** Per-chat proactive progress-notice interval ms (0 disables); falls back to the plugin config. */
|
|
24
|
+
progressTimeoutMs?: number;
|
|
25
|
+
/** Web mirror session id (shared with DSH Web for viewing). */
|
|
26
|
+
webMirrorSessionId?: string;
|
|
27
|
+
/** Session lock status: which channel currently owns write access. */
|
|
28
|
+
lockOwner?: "feishu" | "web";
|
|
29
|
+
/** Timestamp when the lock was acquired (for timeout detection). */
|
|
30
|
+
lockAcquiredAt?: number;
|
|
31
|
+
/** Lock timeout in milliseconds (default 5 minutes). */
|
|
32
|
+
lockTimeoutMs?: number;
|
|
33
|
+
/** Queued messages waiting for lock release (Web → Feishu bridge). */
|
|
34
|
+
queuedMessages?: Array<{
|
|
35
|
+
text: string;
|
|
36
|
+
senderKey: string;
|
|
37
|
+
timestamp: number;
|
|
38
|
+
replyRef?: string;
|
|
39
|
+
images?: readonly string[];
|
|
40
|
+
files?: readonly string[];
|
|
41
|
+
}>;
|
|
19
42
|
/** Every conversation ever opened in this chat, oldest last. */
|
|
20
43
|
sessions: ChatSessionRecord[];
|
|
21
44
|
}
|
|
45
|
+
/** Callback type for binding change events. */
|
|
46
|
+
export type BindingChangeCallback = (binding: ChatBinding, changeType: "add" | "update" | "delete") => void;
|
|
22
47
|
export declare class BindingStore {
|
|
23
48
|
private readonly map;
|
|
24
49
|
private readonly file;
|
|
50
|
+
private readonly changeListeners;
|
|
25
51
|
constructor(stateDir?: string);
|
|
52
|
+
/**
|
|
53
|
+
* Register a listener for binding changes.
|
|
54
|
+
* @param callback - Function called when any binding is added, updated, or deleted
|
|
55
|
+
* @returns Unsubscribe function
|
|
56
|
+
*/
|
|
57
|
+
onChange(callback: BindingChangeCallback): () => void;
|
|
58
|
+
/**
|
|
59
|
+
* Emit a change event to all registered listeners.
|
|
60
|
+
*/
|
|
61
|
+
private emitChange;
|
|
62
|
+
/**
|
|
63
|
+
* Iterate over all bindings in the store.
|
|
64
|
+
* @returns Iterator of all ChatBinding entries
|
|
65
|
+
*/
|
|
66
|
+
entries(): IterableIterator<ChatBinding>;
|
|
67
|
+
/**
|
|
68
|
+
* Get all bindings as an array.
|
|
69
|
+
*/
|
|
70
|
+
list(): ChatBinding[];
|
|
71
|
+
/**
|
|
72
|
+
* Find bindings by webMirrorSessionId.
|
|
73
|
+
* @param sessionId - The session ID to search for
|
|
74
|
+
* @returns Array of bindings that have this sessionId as their webMirrorSessionId
|
|
75
|
+
*/
|
|
76
|
+
findByWebMirror(sessionId: string): ChatBinding[];
|
|
26
77
|
get(channel: string, chatKey: string): ChatBinding | undefined;
|
|
27
78
|
put(binding: ChatBinding): void;
|
|
28
79
|
delete(channel: string, chatKey: string): void;
|
package/lib/binding.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binding.d.ts","sourceRoot":"","sources":["../src/binding.ts"],"names":[],"mappings":"AAUA,8CAA8C;AAC9C,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,GAAG,OAAO,CAAC;IAC1B,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B;AA0BD,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAkC;IACtD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;
|
|
1
|
+
{"version":3,"file":"binding.d.ts","sourceRoot":"","sources":["../src/binding.ts"],"names":[],"mappings":"AAUA,8CAA8C;AAC9C,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB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AAe,CAAoC;gBAExD,QAAQ,CAAC,EAAE,MAAM;IAM7B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,GAAG,MAAM,IAAI;IAOrD;;OAEG;IACH,OAAO,CAAC,UAAU;IAUlB;;;OAGG;IACH,OAAO,IAAI,gBAAgB,CAAC,WAAW,CAAC;IAIxC;;OAEG;IACH,IAAI,IAAI,WAAW,EAAE;IAIrB;;;;OAIG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,EAAE;IAUjD,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAI9D,GAAG,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAQ/B,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAU9C,OAAO,CAAC,IAAI;IAmCZ,OAAO,CAAC,IAAI;CAQb"}
|
package/lib/binding.js
CHANGED
|
@@ -33,21 +33,81 @@ function normalizeSessions(value) {
|
|
|
33
33
|
export class BindingStore {
|
|
34
34
|
map = new Map();
|
|
35
35
|
file;
|
|
36
|
+
changeListeners = new Set();
|
|
36
37
|
constructor(stateDir) {
|
|
37
38
|
const dir = stateDir ?? process.env.DSH_CONNECT_STATE_DIR ?? ".dsh-connect";
|
|
38
39
|
this.file = resolve(dir, "bindings.json");
|
|
39
40
|
this.load();
|
|
40
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Register a listener for binding changes.
|
|
44
|
+
* @param callback - Function called when any binding is added, updated, or deleted
|
|
45
|
+
* @returns Unsubscribe function
|
|
46
|
+
*/
|
|
47
|
+
onChange(callback) {
|
|
48
|
+
this.changeListeners.add(callback);
|
|
49
|
+
return () => {
|
|
50
|
+
this.changeListeners.delete(callback);
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Emit a change event to all registered listeners.
|
|
55
|
+
*/
|
|
56
|
+
emitChange(binding, changeType) {
|
|
57
|
+
for (const listener of this.changeListeners) {
|
|
58
|
+
try {
|
|
59
|
+
listener(binding, changeType);
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
// Listener errors should not break the store
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Iterate over all bindings in the store.
|
|
68
|
+
* @returns Iterator of all ChatBinding entries
|
|
69
|
+
*/
|
|
70
|
+
entries() {
|
|
71
|
+
return this.map.values();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Get all bindings as an array.
|
|
75
|
+
*/
|
|
76
|
+
list() {
|
|
77
|
+
return [...this.map.values()];
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Find bindings by webMirrorSessionId.
|
|
81
|
+
* @param sessionId - The session ID to search for
|
|
82
|
+
* @returns Array of bindings that have this sessionId as their webMirrorSessionId
|
|
83
|
+
*/
|
|
84
|
+
findByWebMirror(sessionId) {
|
|
85
|
+
const results = [];
|
|
86
|
+
for (const binding of this.map.values()) {
|
|
87
|
+
if (binding.webMirrorSessionId === sessionId) {
|
|
88
|
+
results.push(binding);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return results;
|
|
92
|
+
}
|
|
41
93
|
get(channel, chatKey) {
|
|
42
94
|
return this.map.get(keyOf(channel, chatKey));
|
|
43
95
|
}
|
|
44
96
|
put(binding) {
|
|
45
|
-
|
|
97
|
+
const key = keyOf(binding.channel, binding.chatKey);
|
|
98
|
+
const existed = this.map.has(key);
|
|
99
|
+
this.map.set(key, binding);
|
|
46
100
|
this.save();
|
|
101
|
+
this.emitChange(binding, existed ? "update" : "add");
|
|
47
102
|
}
|
|
48
103
|
delete(channel, chatKey) {
|
|
49
|
-
|
|
50
|
-
this.
|
|
104
|
+
const key = keyOf(channel, chatKey);
|
|
105
|
+
const binding = this.map.get(key);
|
|
106
|
+
if (binding !== undefined) {
|
|
107
|
+
this.map.delete(key);
|
|
108
|
+
this.save();
|
|
109
|
+
this.emitChange(binding, "delete");
|
|
110
|
+
}
|
|
51
111
|
}
|
|
52
112
|
load() {
|
|
53
113
|
try {
|
|
@@ -69,6 +129,14 @@ export class BindingStore {
|
|
|
69
129
|
ownerKey: typeof b.ownerKey === "string" ? b.ownerKey : "",
|
|
70
130
|
createdAt: typeof b.createdAt === "number" ? b.createdAt : Date.now(),
|
|
71
131
|
lastActiveAt: typeof b.lastActiveAt === "number" ? b.lastActiveAt : Date.now(),
|
|
132
|
+
...(b.language === "zh" || b.language === "en" ? { language: b.language } : {}),
|
|
133
|
+
...(b.notifyLevel === "full" || b.notifyLevel === "important" || b.notifyLevel === "result" ? { notifyLevel: b.notifyLevel } : {}),
|
|
134
|
+
...(typeof b.progressTimeoutMs === "number" && b.progressTimeoutMs >= 0 ? { progressTimeoutMs: b.progressTimeoutMs } : {}),
|
|
135
|
+
...(typeof b.webMirrorSessionId === "string" ? { webMirrorSessionId: b.webMirrorSessionId } : {}),
|
|
136
|
+
...(b.lockOwner === "feishu" || b.lockOwner === "web" ? { lockOwner: b.lockOwner } : {}),
|
|
137
|
+
...(typeof b.lockAcquiredAt === "number" ? { lockAcquiredAt: b.lockAcquiredAt } : {}),
|
|
138
|
+
...(typeof b.lockTimeoutMs === "number" ? { lockTimeoutMs: b.lockTimeoutMs } : {}),
|
|
139
|
+
...(Array.isArray(b.queuedMessages) ? { queuedMessages: b.queuedMessages.filter((m) => typeof m === "object" && m !== null && typeof m.text === "string" && typeof m.senderKey === "string") } : {}),
|
|
72
140
|
sessions: normalizeSessions(b.sessions),
|
|
73
141
|
});
|
|
74
142
|
}
|
package/lib/binding.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binding.js","sourceRoot":"","sources":["../src/binding.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACjE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CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBAClF,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAA+D,EAAE,CACjJ,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,OAAQ,CAAS,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAQ,CAAS,CAAC,SAAS,KAAK,QAAQ,CACvH,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBACT,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,QAAQ,CAAC;iBACxC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,wCAAwC;QAC1C,CAAC;IACH,CAAC;IAEO,IAAI;QACV,IAAI,CAAC;YACH,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YACnD,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;QACpF,CAAC;QAAC,MAAM,CAAC;YACP,kEAAkE;QACpE,CAAC;IACH,CAAC;CACF"}
|
package/lib/commands.d.ts
CHANGED
|
@@ -39,8 +39,22 @@ export type Command = {
|
|
|
39
39
|
readonly kind: "schedule";
|
|
40
40
|
} | {
|
|
41
41
|
readonly kind: "model";
|
|
42
|
+
} | {
|
|
43
|
+
readonly kind: "notify";
|
|
44
|
+
} | {
|
|
45
|
+
readonly kind: "progress";
|
|
42
46
|
} | {
|
|
43
47
|
readonly kind: "workspaces";
|
|
48
|
+
} | {
|
|
49
|
+
readonly kind: "mirror";
|
|
50
|
+
readonly timeoutMin?: number;
|
|
51
|
+
} | {
|
|
52
|
+
readonly kind: "unlock";
|
|
53
|
+
} | {
|
|
54
|
+
readonly kind: "renew";
|
|
55
|
+
} | {
|
|
56
|
+
readonly kind: "export";
|
|
57
|
+
readonly format?: "markdown" | "pdf";
|
|
44
58
|
} | {
|
|
45
59
|
readonly kind: "help";
|
|
46
60
|
} | {
|
package/lib/commands.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,MAAM,OAAO,GACf;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;CAAE,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GAC1B;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GAC7B;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GA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AE,MAAM,GAAG,OAAO,CAiGjD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM,CA4B5C"}
|
package/lib/commands.js
CHANGED
|
@@ -52,9 +52,43 @@ export function parseCommand(raw) {
|
|
|
52
52
|
return { kind: "schedule" };
|
|
53
53
|
case "/model":
|
|
54
54
|
return { kind: "model" };
|
|
55
|
+
case "/notify":
|
|
56
|
+
case "/notice":
|
|
57
|
+
return { kind: "notify" };
|
|
58
|
+
case "/progress":
|
|
59
|
+
case "/remind-interval":
|
|
60
|
+
return { kind: "progress" };
|
|
55
61
|
case "/workspaces":
|
|
56
62
|
case "/wslist":
|
|
57
63
|
return { kind: "workspaces" };
|
|
64
|
+
case "/mirror":
|
|
65
|
+
case "/web": {
|
|
66
|
+
// Parse optional --timeout N parameter
|
|
67
|
+
if (arg !== undefined && arg !== "") {
|
|
68
|
+
const timeoutMatch = arg.match(/--timeout\s+(\d+)/);
|
|
69
|
+
if (timeoutMatch) {
|
|
70
|
+
const timeoutMin = parseInt(timeoutMatch[1], 10);
|
|
71
|
+
return { kind: "mirror", timeoutMin };
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return { kind: "mirror" };
|
|
75
|
+
}
|
|
76
|
+
case "/unlock":
|
|
77
|
+
case "/release":
|
|
78
|
+
return { kind: "unlock" };
|
|
79
|
+
case "/renew":
|
|
80
|
+
case "/renew-lock":
|
|
81
|
+
return { kind: "renew" };
|
|
82
|
+
case "/export": {
|
|
83
|
+
// Parse optional format parameter: /export markdown or /export pdf
|
|
84
|
+
if (arg === "markdown" || arg === "md") {
|
|
85
|
+
return { kind: "export", format: "markdown" };
|
|
86
|
+
}
|
|
87
|
+
else if (arg === "pdf") {
|
|
88
|
+
return { kind: "export", format: "pdf" };
|
|
89
|
+
}
|
|
90
|
+
return { kind: "export" };
|
|
91
|
+
}
|
|
58
92
|
case "/help":
|
|
59
93
|
case "/start":
|
|
60
94
|
return { kind: "help" };
|
|
@@ -78,7 +112,13 @@ export function helpText(t) {
|
|
|
78
112
|
"- `/goals` " + t.helpGoals,
|
|
79
113
|
"- `/schedule` " + t.helpSchedule,
|
|
80
114
|
"- `/model` " + t.helpModel,
|
|
115
|
+
"- `/notify` " + t.helpNotify,
|
|
116
|
+
"- `/progress` " + t.helpProgress,
|
|
81
117
|
"- `/workspaces` " + t.helpWorkspaces,
|
|
118
|
+
"- `/mirror [--timeout N]` create Web mirror session (optional timeout in minutes)",
|
|
119
|
+
"- `/unlock` manually release session lock",
|
|
120
|
+
"- `/renew` renew current session lock timeout",
|
|
121
|
+
"- `/export [markdown|pdf]` export conversation history",
|
|
82
122
|
"- `/new` " + t.helpNew,
|
|
83
123
|
"- `/clear` " + t.helpClear,
|
|
84
124
|
"- `/stop` " + t.helpStop,
|
package/lib/commands.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAkCA,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IACxB,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACxD,MAAM,GAAG,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAEpE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,MAAM,CAAC;QACZ,KAAK,QAAQ;YACX,OAAO,EAAE,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/B,eAAe,GAAG,CAAC,CAAC,WAAW;QAC/B,uBAAuB,GAAG,CAAC,CAAC,WAAW;QACvC,aAAa,GAAG,CAAC,CAAC,SAAS;QAC3B,gBAAgB,GAAG,CAAC,CAAC,YAAY;QACjC,aAAa,GAAG,CAAC,CAAC,SAAS;QAC3B,cAAc,GAAG,CAAC,CAAC,UAAU;QAC7B,gBAAgB,GAAG,CAAC,CAAC,YAAY;QACjC,kBAAkB,GAAG,CAAC,CAAC,cAAc;QACrC,mFAAmF;QACnF,2CAA2C;QAC3C,+CAA+C;QAC/C,wDAAwD;QACxD,WAAW,GAAG,CAAC,CAAC,OAAO;QACvB,aAAa,GAAG,CAAC,CAAC,SAAS;QAC3B,YAAY,GAAG,CAAC,CAAC,QAAQ;QACzB,IAAI,GAAG,CAAC,CAAC,SAAS;KACnB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
package/lib/i18n.d.ts
CHANGED
|
@@ -28,12 +28,56 @@ export interface Messages {
|
|
|
28
28
|
rootSectionSystem: string;
|
|
29
29
|
rootMenuFooter: string;
|
|
30
30
|
thinkingHint: string;
|
|
31
|
+
toolCalling(name: string, summary: string | undefined): string;
|
|
32
|
+
processingHeartbeat(minutes: number): string;
|
|
31
33
|
processingFailed(detail: string): string;
|
|
34
|
+
processingStarted(preview: string): string;
|
|
35
|
+
progressReminder(minutes: number, status: string): string;
|
|
36
|
+
progressThinking: string;
|
|
37
|
+
progressMenuTitle: string;
|
|
38
|
+
progressOff: string;
|
|
39
|
+
progressMinutes(n: number): string;
|
|
40
|
+
progressSet(label: string): string;
|
|
41
|
+
progressSetting(label: string): string;
|
|
42
|
+
menuSettingsProgress: string;
|
|
43
|
+
helpProgress: string;
|
|
44
|
+
compactStarted: string;
|
|
45
|
+
compactDone: string;
|
|
46
|
+
questionCardTitle: string;
|
|
47
|
+
questionCardHint: string;
|
|
48
|
+
questionMultiHint: string;
|
|
49
|
+
questionStep(index: number, total: number): string;
|
|
50
|
+
questionTextHint(question: string): string;
|
|
51
|
+
questionWaiting(question: string): string;
|
|
52
|
+
approvalCardTitle: string;
|
|
53
|
+
approvalAsk(toolName: string, reason: string | undefined): string;
|
|
54
|
+
approveLabel: string;
|
|
55
|
+
rejectLabel: string;
|
|
56
|
+
answerReceived: string;
|
|
57
|
+
questionToolCall(text: string): string;
|
|
58
|
+
notifyFull: string;
|
|
59
|
+
notifyImportant: string;
|
|
60
|
+
notifyResult: string;
|
|
61
|
+
notifyFullDesc: string;
|
|
62
|
+
notifyImportantDesc: string;
|
|
63
|
+
notifyResultDesc: string;
|
|
64
|
+
notifySet(level: string, description: string): string;
|
|
65
|
+
taskStatsHeader(duration: string): string;
|
|
66
|
+
taskStatsModel(providerModel: string): string;
|
|
67
|
+
taskStatsTokensIn(tokens: string, cached: string | undefined): string;
|
|
68
|
+
taskStatsTokensOut(tokens: string): string;
|
|
69
|
+
taskStatsSteps(count: number): string;
|
|
70
|
+
taskStatsContext(usedPct: string, window: string): string;
|
|
71
|
+
taskStatsCompactOk: string;
|
|
72
|
+
taskStatsCompactSuggest: string;
|
|
73
|
+
taskDuration(ms: number): string;
|
|
32
74
|
imageDownloadFailed(imageError: string): string;
|
|
75
|
+
fileDownloadFailed(fileError: string): string;
|
|
33
76
|
imagesStaged(locations: string, description: string): string;
|
|
34
77
|
imageDescriptionLabel(description: string): string;
|
|
35
78
|
imageNoDescription: string;
|
|
36
79
|
visionPrompt: string;
|
|
80
|
+
filesStaged(count: number, locations: string): string;
|
|
37
81
|
taskEnded(reasonLabel: string): string;
|
|
38
82
|
errorCode(code: string): string;
|
|
39
83
|
reasonMessage(message: string): string;
|
|
@@ -65,15 +109,26 @@ export interface Messages {
|
|
|
65
109
|
menuSettingsReasoning: string;
|
|
66
110
|
menuSettingsNotify: string;
|
|
67
111
|
menuSettingsOverview: string;
|
|
112
|
+
menuSettingsLanguage: string;
|
|
113
|
+
languageZh: string;
|
|
114
|
+
languageEn: string;
|
|
115
|
+
languageSet(lang: string): string;
|
|
68
116
|
streamLabel(on: boolean): string;
|
|
69
117
|
summaryLabel(on: boolean): string;
|
|
70
118
|
statusNoSession(workdir: string): string;
|
|
71
119
|
statusRunning: string;
|
|
72
120
|
statusIdle: string;
|
|
121
|
+
statusExecuting: string;
|
|
122
|
+
statusWaiting: string;
|
|
73
123
|
statusField(status: string): string;
|
|
74
124
|
modelField(model: string): string;
|
|
75
125
|
workdirField(workdir: string): string;
|
|
76
126
|
queuedField(n: number): string;
|
|
127
|
+
queueEmpty: string;
|
|
128
|
+
queueDetail(n: number): string;
|
|
129
|
+
lastTurnReason(reason: string): string;
|
|
130
|
+
lastTurnTime(time: string): string;
|
|
131
|
+
noTurnHistory: string;
|
|
77
132
|
sessionField(id: string): string;
|
|
78
133
|
contextField(total: number, surface: number): string;
|
|
79
134
|
noTodos: string;
|
|
@@ -134,6 +189,25 @@ export interface Messages {
|
|
|
134
189
|
workspaceSessions(n: number): string;
|
|
135
190
|
workspacesCount(n: number, list: string): string;
|
|
136
191
|
currentDir: string;
|
|
192
|
+
mirrorCreated(sessionId: string): string;
|
|
193
|
+
mirrorAlreadyExists(sessionId: string): string;
|
|
194
|
+
mirrorNotConfigured: string;
|
|
195
|
+
sessionLockedBy(channel: string): string;
|
|
196
|
+
sessionReadOnly: string;
|
|
197
|
+
lockReleased: string;
|
|
198
|
+
lockTimeoutReleased(minutes: number): string;
|
|
199
|
+
unlockSuccess: string;
|
|
200
|
+
unlockNoLock: string;
|
|
201
|
+
lockRenewed(minutes: number): string;
|
|
202
|
+
messageQueued(position: number): string;
|
|
203
|
+
queueProcessed(count: number): string;
|
|
204
|
+
exportMarkdown(path: string): string;
|
|
205
|
+
exportPdfNotSupported: string;
|
|
206
|
+
exportNoSession: string;
|
|
207
|
+
exportFailed(error: string): string;
|
|
208
|
+
mirrorStatus(sessionId: string, lockedBy?: string, timeoutMin?: number, queuedCount?: number): string;
|
|
209
|
+
webMirrorIndicator: string;
|
|
210
|
+
sessionAvailableOnWeb: string;
|
|
137
211
|
helpHeader: string;
|
|
138
212
|
helpMenu: string;
|
|
139
213
|
helpSettings: string;
|
|
@@ -148,6 +222,7 @@ export interface Messages {
|
|
|
148
222
|
helpGoals: string;
|
|
149
223
|
helpSchedule: string;
|
|
150
224
|
helpModel: string;
|
|
225
|
+
helpNotify: string;
|
|
151
226
|
helpWorkspaces: string;
|
|
152
227
|
helpNew: string;
|
|
153
228
|
helpClear: string;
|