dsh-watch-together 0.2.0 → 0.2.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.
@@ -0,0 +1,167 @@
1
+ """window_protocol.py — 悬浮窗与插件之间的 JSONL 接口。
2
+
3
+ Node 侧只看 src/window-protocol.js;Python 侧只看这个文件。两边都不 import
4
+ 对方的实现,只共享这份很小的线格式:
5
+
6
+ window-events.jsonl 插件 -> 窗口
7
+ window-outbox.jsonl 窗口 -> 插件
8
+
9
+ 消息事件沿用 chat.jsonl 的 role/text/at 字段,所以旧窗口/浏览器仍可读 chat.jsonl;
10
+ 窗口按 (role, text, at) 去重,迁移期间不会出现两遍。
11
+ """
12
+ from __future__ import annotations
13
+
14
+ import json
15
+ import os
16
+ import time
17
+ from pathlib import Path
18
+
19
+ WINDOW_PROTOCOL_VERSION = 1
20
+ WINDOW_EVENT_FILE = "window-events.jsonl"
21
+ WINDOW_OUTBOX_FILE = "window-outbox.jsonl"
22
+
23
+
24
+ def cache_dir() -> Path:
25
+ d = os.environ.get("DSH_VIDEO_CACHE_DIR")
26
+ if d:
27
+ return Path(d)
28
+ local = os.environ.get("LOCALAPPDATA")
29
+ if os.name == "nt" and local:
30
+ return Path(local) / "dsh-video-storyboard" / "cache"
31
+ return Path(os.environ.get("XDG_CACHE_HOME") or "~/.cache").expanduser() / "dsh-video-storyboard"
32
+
33
+
34
+ def event_file() -> Path:
35
+ return cache_dir() / WINDOW_EVENT_FILE
36
+
37
+
38
+ def outbox_file() -> Path:
39
+ return cache_dir() / WINDOW_OUTBOX_FILE
40
+
41
+
42
+ class WindowProtocol:
43
+ """增量读取事件;所有解析错误都静默跳过(窗口不能因为一行坏 JSON 不动)。"""
44
+
45
+ def __init__(self) -> None:
46
+ self._event_offset = 0
47
+ self._event_carry = ""
48
+ self._event_size = -1
49
+ self._outbox_offset = 0
50
+ self._outbox_carry = ""
51
+ self._outbox_size = -1
52
+
53
+ # ---- 插件 -> 窗口 ----
54
+ def reset_events(self, replay: int = 60) -> list[dict]:
55
+ """开场:只回放最后 replay 条,但不和 chat.jsonl 的历史重复。"""
56
+ path = event_file()
57
+ try:
58
+ size = path.stat().st_size
59
+ except OSError:
60
+ self._event_offset, self._event_carry, self._event_size = 0, "", 0
61
+ return []
62
+ self._event_offset = size
63
+ self._event_carry = ""
64
+ self._event_size = size
65
+ if replay <= 0 or size == 0:
66
+ return []
67
+ try:
68
+ with path.open("rb") as f:
69
+ f.seek(max(0, size - 96 * 1024))
70
+ chunk = f.read()
71
+ except OSError:
72
+ return []
73
+ lines = [ln for ln in chunk.decode("utf-8", "replace").split("\n") if ln.strip()]
74
+ if size > 96 * 1024 and lines:
75
+ lines = lines[1:]
76
+ out = []
77
+ for line in lines[-replay:]:
78
+ try:
79
+ obj = json.loads(line)
80
+ except Exception:
81
+ continue
82
+ if isinstance(obj, dict):
83
+ out.append(obj)
84
+ return out
85
+
86
+ def read_events(self) -> list[dict]:
87
+ path = event_file()
88
+ try:
89
+ size = path.stat().st_size
90
+ except OSError:
91
+ return []
92
+ if size < self._event_offset:
93
+ self._event_offset, self._event_carry = 0, ""
94
+ if size == self._event_size:
95
+ return []
96
+ self._event_size = size
97
+ try:
98
+ with path.open("rb") as f:
99
+ f.seek(self._event_offset)
100
+ chunk = f.read(size - self._event_offset)
101
+ except OSError:
102
+ return []
103
+ self._event_offset = size
104
+ text = self._event_carry + chunk.decode("utf-8", "replace")
105
+ parts = text.split("\n")
106
+ self._event_carry = parts.pop()
107
+ out = []
108
+ for line in parts:
109
+ if not line.strip():
110
+ continue
111
+ try:
112
+ obj = json.loads(line)
113
+ except Exception:
114
+ continue
115
+ if isinstance(obj, dict):
116
+ out.append(obj)
117
+ return out
118
+
119
+ # ---- 窗口 -> 插件 ----
120
+ def action(self, action_type: str, **fields) -> dict:
121
+ item = {
122
+ "v": WINDOW_PROTOCOL_VERSION,
123
+ "type": str(action_type),
124
+ "at": int(time.time() * 1000),
125
+ }
126
+ item.update({k: v for k, v in fields.items() if v is not None})
127
+ path = outbox_file()
128
+ try:
129
+ path.parent.mkdir(parents=True, exist_ok=True)
130
+ with path.open("a", encoding="utf-8") as f:
131
+ f.write(json.dumps(item, ensure_ascii=False) + "\n")
132
+ except OSError:
133
+ pass
134
+ return item
135
+
136
+ def read_actions(self) -> list[dict]:
137
+ path = outbox_file()
138
+ try:
139
+ size = path.stat().st_size
140
+ except OSError:
141
+ return []
142
+ if size < self._outbox_offset:
143
+ self._outbox_offset, self._outbox_carry = 0, ""
144
+ if size == self._outbox_size:
145
+ return []
146
+ self._outbox_size = size
147
+ try:
148
+ with path.open("rb") as f:
149
+ f.seek(self._outbox_offset)
150
+ chunk = f.read(size - self._outbox_offset)
151
+ except OSError:
152
+ return []
153
+ self._outbox_offset = size
154
+ text = self._outbox_carry + chunk.decode("utf-8", "replace")
155
+ parts = text.split("\n")
156
+ self._outbox_carry = parts.pop()
157
+ out = []
158
+ for line in parts:
159
+ if not line.strip():
160
+ continue
161
+ try:
162
+ obj = json.loads(line)
163
+ except Exception:
164
+ continue
165
+ if isinstance(obj, dict):
166
+ out.append(obj)
167
+ return out
package/lib/client.js ADDED
@@ -0,0 +1,306 @@
1
+ window.__ModuleLoader__.load({
2
+ id: "dsh-watch-together",
3
+ factory: (require) => {
4
+ var module = { exports: {} };
5
+ var exports = module.exports;
6
+ const React = require("react");
7
+ const h = React.createElement;
8
+ const { useEffect, useState } = React;
9
+
10
+ const CSS = [
11
+ '[data-dsh-vs]{color:var(--dsw-alias-label-primary,#1f2329);font-size:13px;line-height:20px}',
12
+ '[data-dsh-vs] *{box-sizing:border-box}',
13
+ '[data-dsh-vs] .dsh-vs-section{padding:20px 0;border-top:1px solid var(--dsw-alias-border-l2,rgba(0,0,0,.1))}',
14
+ '[data-dsh-vs] .dsh-vs-section:first-of-type{padding-top:2px;border-top:0}',
15
+ '[data-dsh-vs] .dsh-vs-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}',
16
+ '[data-dsh-vs] .dsh-vs-section-title{margin:0;font-size:14px;line-height:22px;font-weight:600}',
17
+ '[data-dsh-vs] .dsh-vs-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}',
18
+ '[data-dsh-vs] .dsh-vs-field{display:flex;flex-direction:column;gap:6px;min-width:0}',
19
+ '[data-dsh-vs] .dsh-vs-span-2{grid-column:1/-1}',
20
+ '[data-dsh-vs] .dsh-vs-label{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#5c6370)}',
21
+ '[data-dsh-vs] .dsh-vs-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary,#8a919e)}',
22
+ '[data-dsh-vs] .dsh-vs-input{width:100%;height:34px;padding:0 10px;border:1px solid var(--dsw-alias-border-l2,rgba(0,0,0,.14));border-radius:8px;background:var(--dsw-alias-bg-layer-1,#fff);color:inherit;font:inherit;outline:none}',
23
+ '[data-dsh-vs] .dsh-vs-input::placeholder{color:var(--dsw-alias-label-tertiary,#a0a6b0)}',
24
+ '[data-dsh-vs] .dsh-vs-input:focus{border-color:var(--dsw-alias-brand-primary,#4f7cff);box-shadow:0 0 0 3px rgba(79,124,255,.14)}',
25
+ '[data-dsh-vs] .dsh-vs-deps{display:flex;flex-direction:column}',
26
+ '[data-dsh-vs] .dsh-vs-dep{display:flex;align-items:center;gap:10px;min-height:46px;padding:8px 0;border-top:1px solid var(--dsw-alias-border-l2,rgba(0,0,0,.08))}',
27
+ '[data-dsh-vs] .dsh-vs-dep:first-child{border-top:0;padding-top:2px}',
28
+ '[data-dsh-vs] .dsh-vs-dot{width:7px;height:7px;flex:none;border-radius:50%;background:var(--dsw-alias-state-success-primary,#31a36b)}',
29
+ '[data-dsh-vs] .dsh-vs-dot.is-bad{background:var(--dsw-alias-state-error-primary,#e5484d)}',
30
+ '[data-dsh-vs] .dsh-vs-dot.is-warn{background:var(--dsw-alias-state-warn-primary,#d89614)}',
31
+ '[data-dsh-vs] .dsh-vs-dep-main{min-width:0;flex:1}',
32
+ '[data-dsh-vs] .dsh-vs-dep-name{font-size:13px;line-height:18px}',
33
+ '[data-dsh-vs] .dsh-vs-dep-detail{margin-top:1px;font-size:12px;line-height:17px;color:var(--dsw-alias-label-tertiary,#8a919e);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}',
34
+ '[data-dsh-vs] .dsh-vs-btn{display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;border:1px solid var(--dsw-alias-border-l2,rgba(0,0,0,.14));border-radius:8px;background:transparent;color:inherit;font:inherit;font-size:13px;text-decoration:none;cursor:pointer;white-space:nowrap}',
35
+ '[data-dsh-vs] .dsh-vs-btn:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(0,0,0,.04))}',
36
+ '[data-dsh-vs] .dsh-vs-btn-sm{height:28px;padding:0 10px;font-size:12px}',
37
+ '[data-dsh-vs] .dsh-vs-btn-primary{border-color:transparent;background:var(--dsw-alias-button-primary-fill,#4f7cff);color:var(--dsw-alias-label-primary-foreground,#fff)}',
38
+ '[data-dsh-vs] .dsh-vs-btn-primary:hover{background:var(--dsw-alias-button-primary-hover,#3f6be0)}',
39
+ '[data-dsh-vs] .dsh-vs-btn:disabled{opacity:.5;cursor:default}',
40
+ '[data-dsh-vs] .dsh-vs-textbtn{padding:0;border:0;background:transparent;color:var(--dsw-alias-brand-primary,#4f7cff);font:inherit;font-size:12px;cursor:pointer}',
41
+ '[data-dsh-vs] .dsh-vs-textbtn:disabled{opacity:.5;cursor:default}',
42
+ '[data-dsh-vs] .dsh-vs-footer{display:flex;align-items:center;gap:12px;padding-top:16px;border-top:1px solid var(--dsw-alias-border-l2,rgba(0,0,0,.1))}',
43
+ '[data-dsh-vs] .dsh-vs-status{margin-left:auto;font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary,#8a919e);text-align:right}',
44
+ '[data-dsh-vs] .dsh-vs-status.is-error{color:var(--dsw-alias-state-error-primary,#e5484d)}',
45
+ '[data-dsh-vs] .dsh-vs-loading{padding:16px 0;color:var(--dsw-alias-label-tertiary,#8a919e)}',
46
+ '@media(max-width:720px){[data-dsh-vs] .dsh-vs-grid{grid-template-columns:1fr}[data-dsh-vs] .dsh-vs-span-2{grid-column:auto}}',
47
+ ].join('');
48
+
49
+ function useInjectedStyle() {
50
+ useEffect(() => {
51
+ if (typeof document === 'undefined' || document.getElementById('dsh-vs-watch-style')) return;
52
+ const style = document.createElement('style');
53
+ style.id = 'dsh-vs-watch-style';
54
+ style.textContent = CSS;
55
+ document.head.appendChild(style);
56
+ }, []);
57
+ }
58
+
59
+ function apiConfig() {
60
+ const injected = globalThis.__DSH_WATCH_TOGETHER_SETTINGS__;
61
+ if (!injected || typeof injected.url !== 'string') return null;
62
+ const url = new URL(injected.url);
63
+ const token = url.searchParams.get('token') || '';
64
+ const base = url.pathname.replace(/\/+$/, '') + '/api';
65
+ return { token: token, base: base };
66
+ }
67
+
68
+ async function apiCall(api, action, body) {
69
+ const res = await fetch(api.base + action, {
70
+ method: body === undefined ? 'GET' : 'POST',
71
+ cache: 'no-store',
72
+ headers: body === undefined
73
+ ? { 'x-settings-token': api.token }
74
+ : { 'x-settings-token': api.token, 'content-type': 'application/json' },
75
+ body: body === undefined ? undefined : JSON.stringify(body),
76
+ });
77
+ const data = await res.json().catch(() => ({}));
78
+ if (!res.ok) throw new Error(data.error || ('HTTP ' + res.status));
79
+ return data;
80
+ }
81
+
82
+ function formFromState(state) {
83
+ const video = state && state.video ? state.video : {};
84
+ const watch = state && state.watch ? state.watch : {};
85
+ const voice = state && state.voice ? state.voice : {};
86
+ return {
87
+ browserPort: video.browserPort ? String(video.browserPort) : '',
88
+ chatPort: watch.chatPort ? String(watch.chatPort) : '9377',
89
+ adapter: typeof voice.adapter === 'string' ? voice.adapter : '',
90
+ };
91
+ }
92
+
93
+ function TextField(props) {
94
+ return h('div', { className: 'dsh-vs-field' + (props.wide ? ' dsh-vs-span-2' : '') },
95
+ h('span', { className: 'dsh-vs-label' }, props.label),
96
+ h('input', {
97
+ className: 'dsh-vs-input',
98
+ type: props.type || 'text',
99
+ value: props.value,
100
+ placeholder: props.placeholder || '',
101
+ autoComplete: 'off',
102
+ spellCheck: false,
103
+ onChange: event => props.onChange(event.target.value),
104
+ }),
105
+ props.hint ? h('span', { className: 'dsh-vs-hint' }, props.hint) : null,
106
+ );
107
+ }
108
+
109
+ function depDetail(check) {
110
+ if (check.ok && (check.id === 'core' || check.id === 'extension' || check.id === 'floating')) return '已安装';
111
+ return check.detail || '';
112
+ }
113
+
114
+ function depAction(check) {
115
+ if (check.ok || !check.downloadUrl || !/^https:\/\//.test(check.downloadUrl)) return null;
116
+ const label = check.downloadLabel || '查看';
117
+ return h('a', {
118
+ className: 'dsh-vs-btn dsh-vs-btn-sm',
119
+ href: check.downloadUrl,
120
+ target: '_blank',
121
+ rel: 'noopener noreferrer',
122
+ }, /下载/.test(label) ? '下载' : /获取/.test(label) ? '获取' : '查看');
123
+ }
124
+
125
+ function SettingsTab() {
126
+ useInjectedStyle();
127
+ const [form, setForm] = useState(null);
128
+ const [checks, setChecks] = useState([]);
129
+ const [busy, setBusy] = useState(false);
130
+ const [checking, setChecking] = useState(false);
131
+ const [error, setError] = useState('');
132
+ const [notice, setNotice] = useState('');
133
+
134
+ async function runCheck(api) {
135
+ const target = api || apiConfig();
136
+ if (!target) {
137
+ setError('设置接口未注入,请重启 DSH。');
138
+ return;
139
+ }
140
+ setChecking(true);
141
+ setError('');
142
+ try {
143
+ const data = await apiCall(target, '/check', {});
144
+ setChecks(Array.isArray(data.checks) ? data.checks : []);
145
+ setNotice('环境检查完成。');
146
+ } catch (e) {
147
+ setError(String(e && e.message ? e.message : e));
148
+ } finally {
149
+ setChecking(false);
150
+ }
151
+ }
152
+
153
+ useEffect(() => {
154
+ let cancelled = false;
155
+ const api = apiConfig();
156
+ if (!api) {
157
+ setError('设置接口未注入,请重启 DSH。');
158
+ return undefined;
159
+ }
160
+ setBusy(true);
161
+ apiCall(api, '/state').then(state => {
162
+ if (cancelled) return;
163
+ setForm(formFromState(state));
164
+ setBusy(false);
165
+ void runCheck(api);
166
+ }).catch(e => {
167
+ if (cancelled) return;
168
+ setError(String(e && e.message ? e.message : e));
169
+ setBusy(false);
170
+ });
171
+ return () => { cancelled = true; };
172
+ }, []);
173
+
174
+ async function save() {
175
+ if (!form) return;
176
+ const api = apiConfig();
177
+ if (!api) {
178
+ setError('设置接口未注入,请重启 DSH。');
179
+ return;
180
+ }
181
+ setBusy(true);
182
+ setError('');
183
+ setNotice('');
184
+ try {
185
+ const video = {
186
+ browserPort: form.browserPort === '' ? false : Number(form.browserPort),
187
+ };
188
+ const watch = { chatPort: Number(form.chatPort) };
189
+ const voice = { adapter: form.adapter };
190
+ await apiCall(api, '/save', { video: video, watch: watch, voice: voice });
191
+ setNotice('已保存。聊天端口改动在下次启动 DSH 后生效。');
192
+ } catch (e) {
193
+ setError(String(e && e.message ? e.message : e));
194
+ } finally {
195
+ setBusy(false);
196
+ }
197
+ }
198
+
199
+ if (!form) {
200
+ return h('div', { 'data-dsh-vs': 'watch', className: 'dsh-vs dsh-vs-loading' }, error || '正在加载设置…');
201
+ }
202
+
203
+ const visibleChecks = checks.filter(item => item.id !== 'browser' && item.id !== 'chat' && item.id !== 'voice');
204
+ const optionalIds = { python: true, extension: true, floating: true };
205
+
206
+ return h('div', { 'data-dsh-vs': 'watch', className: 'dsh-vs' },
207
+ h('section', { className: 'dsh-vs-section' },
208
+ h('div', { className: 'dsh-vs-section-head' },
209
+ h('h3', { className: 'dsh-vs-section-title' }, '位置与聊天'),
210
+ ),
211
+ h('div', { className: 'dsh-vs-grid' },
212
+ h(TextField, {
213
+ label: '浏览器调试端口',
214
+ value: form.browserPort,
215
+ type: 'number',
216
+ placeholder: '9333',
217
+ hint: 'Edge 带 --remote-debugging-port 启动后,才能读取实时播放位置。',
218
+ onChange: value => setForm(prev => ({ ...prev, browserPort: value })),
219
+ }),
220
+ h(TextField, {
221
+ label: '聊天服务端口',
222
+ value: form.chatPort,
223
+ type: 'number',
224
+ placeholder: '9377',
225
+ hint: '聊天服务启动时读取;已在运行需重启 DSH。',
226
+ onChange: value => setForm(prev => ({ ...prev, chatPort: value })),
227
+ }),
228
+ ),
229
+ ),
230
+ h('section', { className: 'dsh-vs-section' },
231
+ h('div', { className: 'dsh-vs-section-head' },
232
+ h('h3', { className: 'dsh-vs-section-title' }, '声音'),
233
+ ),
234
+ h('div', { className: 'dsh-vs-grid' },
235
+ h(TextField, {
236
+ label: '语音适配器',
237
+ value: form.adapter,
238
+ wide: true,
239
+ placeholder: 'C:\\path\\to\\voice.mjs 或包名',
240
+ hint: '留空则台词只写入聊天记录;下一次陪看开始时挂载。',
241
+ onChange: value => setForm(prev => ({ ...prev, adapter: value })),
242
+ }),
243
+ ),
244
+ ),
245
+ h('section', { className: 'dsh-vs-section' },
246
+ h('div', { className: 'dsh-vs-section-head' },
247
+ h('h3', { className: 'dsh-vs-section-title' }, '依赖'),
248
+ h('button', {
249
+ type: 'button',
250
+ className: 'dsh-vs-textbtn',
251
+ disabled: checking,
252
+ onClick: () => { setNotice(''); void runCheck(); },
253
+ }, checking ? '检查中…' : '重新检查'),
254
+ ),
255
+ h('p', { className: 'dsh-vs-hint', style: { margin: '0 0 6px' } },
256
+ '缺少时显示官方下载按钮;插件不会自动安装或执行下载的文件。'),
257
+ visibleChecks.length
258
+ ? h('div', { className: 'dsh-vs-deps' }, visibleChecks.map(check =>
259
+ h('div', { className: 'dsh-vs-dep', key: check.id },
260
+ h('span', {
261
+ className: 'dsh-vs-dot'
262
+ + (check.ok ? '' : optionalIds[check.id] ? ' is-warn' : ' is-bad'),
263
+ }),
264
+ h('div', { className: 'dsh-vs-dep-main' },
265
+ h('div', { className: 'dsh-vs-dep-name' }, check.label || check.id),
266
+ h('div', { className: 'dsh-vs-dep-detail', title: check.detail || '' }, depDetail(check)),
267
+ ),
268
+ depAction(check),
269
+ )))
270
+ : h('p', { className: 'dsh-vs-hint' }, checking ? '正在检查…' : '尚未检查。'),
271
+ ),
272
+ h('div', { className: 'dsh-vs-footer' },
273
+ h('button', {
274
+ type: 'button',
275
+ className: 'dsh-vs-btn dsh-vs-btn-primary',
276
+ disabled: busy,
277
+ onClick: save,
278
+ }, busy ? '保存中…' : '保存'),
279
+ h('span', { className: 'dsh-vs-status' + (error ? ' is-error' : ''), role: 'status' },
280
+ error || notice),
281
+ ),
282
+ );
283
+ }
284
+
285
+ function BundleConfig(props) {
286
+ return props && props.view === 'page' ? h(SettingsTab) : null;
287
+ }
288
+
289
+ function apply(ctx) {
290
+ ctx.slots.inject('settings.plugins.tab', () => ctx.slots.register({
291
+ name: 'settings.plugins.tab',
292
+ id: 'watch-together',
293
+ order: 20,
294
+ label: () => '一起看',
295
+ }, SettingsTab));
296
+ ctx.slots.inject('plugins.bundle.config', () => ctx.slots.register({
297
+ name: 'plugins.bundle.config',
298
+ key: 'dsh-watch-together',
299
+ }, BundleConfig));
300
+ }
301
+
302
+ exports.apply = apply;
303
+ exports.inject = ['slots'];
304
+ return module.exports;
305
+ },
306
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-watch-together",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Watch a video together with a text-only agent: follow the user's real playback position, hand over one segment at a time just before it ends, and keep a single text stream of scripted lines, interjections and the user's replies.",
5
5
  "keywords": [
6
6
  "dsh",
@@ -29,6 +29,7 @@
29
29
  "main": "./src/index.js",
30
30
  "exports": {
31
31
  ".": "./src/index.js",
32
+ "./client": "./lib/client.js",
32
33
  "./register": "./src/register.js",
33
34
  "./tool-spec": "./src/tool-spec.js",
34
35
  "./watch": "./src/watch.js",
@@ -36,7 +37,13 @@
36
37
  "./chat": "./src/chat.js",
37
38
  "./voice": "./src/voice.js",
38
39
  "./speech-bus": "./src/speech-bus.js",
39
- "./voice-adapter": "./src/voice-adapter.js"
40
+ "./voice-adapter": "./src/voice-adapter.js",
41
+ "./interfaces": "./src/interfaces.js",
42
+ "./public-api": "./src/public-api.js",
43
+ "./recognition-interface": "./src/recognition-interface.js",
44
+ "./tts-interface": "./src/tts-interface.js",
45
+ "./window-interface": "./src/window-interface.js",
46
+ "./window-protocol": "./src/window-protocol.js"
40
47
  },
41
48
  "bin": {
42
49
  "dsh-watch": "./bin/watch.mjs",
@@ -44,6 +51,7 @@
44
51
  },
45
52
  "files": [
46
53
  "src",
54
+ "lib",
47
55
  "bin",
48
56
  "examples",
49
57
  "extension",
@@ -84,6 +92,20 @@
84
92
  "dsh": {
85
93
  "bundle": {
86
94
  "patch": "./cordis.patch.yml"
95
+ },
96
+ "client": {
97
+ "platform": "web"
98
+ },
99
+ "catalog": {
100
+ "category": "tool",
101
+ "summary": {
102
+ "en": "Watch a video together with a text-only agent: it follows your real playback position and hands over one segment at a time, just before that segment ends.",
103
+ "zh": "和只有文字的智能体一起看视频:跟着你真实的播放位置,一段一段把画面和台词交到它手上,在每段结束前说完。"
104
+ },
105
+ "capabilities": [
106
+ "fs",
107
+ "shell"
108
+ ]
87
109
  }
88
110
  }
89
111
  }