@khorsheed/dsh-reader 0.2.1 → 0.3.1

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.
Files changed (89) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.en.md +26 -121
  3. package/README.i18n.yaml +3 -3
  4. package/README.md +26 -121
  5. package/cordis.patch.yml +7 -0
  6. package/lib/client.js +30580 -6892
  7. package/lib/index.js +4189 -621
  8. package/lib/typert.host.js +2265 -319
  9. package/lib/typert.remote-client.d.ts +99 -3
  10. package/lib/typert.remote-client.js +1618 -240
  11. package/lib/types/captions.d.ts +99 -0
  12. package/lib/types/captions.js +236 -0
  13. package/lib/types/client/MediaPlayer.d.ts +55 -0
  14. package/lib/types/client/MediaPlayer.js +106 -0
  15. package/lib/types/client/NotesView.d.ts +57 -0
  16. package/lib/types/client/NotesView.js +124 -0
  17. package/lib/types/client/ReaderPane.d.ts +20 -3
  18. package/lib/types/client/ReaderPane.js +905 -164
  19. package/lib/types/client/SpeakerLegend.d.ts +18 -0
  20. package/lib/types/client/SpeakerLegend.js +26 -0
  21. package/lib/types/client/canvas-sync.d.ts +84 -0
  22. package/lib/types/client/canvas-sync.js +59 -0
  23. package/lib/types/client/contract.d.ts +138 -3
  24. package/lib/types/client/extract-article.d.ts +38 -1
  25. package/lib/types/client/extract-article.js +501 -28
  26. package/lib/types/client/icons.d.ts +1 -1
  27. package/lib/types/client/icons.js +1 -1
  28. package/lib/types/client/index.js +82 -2
  29. package/lib/types/client/locales.d.ts +279 -11
  30. package/lib/types/client/locales.js +278 -10
  31. package/lib/types/client/notes.d.ts +142 -0
  32. package/lib/types/client/notes.js +334 -0
  33. package/lib/types/client/parse-rss.js +40 -0
  34. package/lib/types/client/preset-visibility.d.ts +93 -0
  35. package/lib/types/client/preset-visibility.js +115 -0
  36. package/lib/types/client/selectors.d.ts +5 -0
  37. package/lib/types/client/selectors.js +5 -0
  38. package/lib/types/client/session.d.ts +21 -1
  39. package/lib/types/client/session.js +12 -0
  40. package/lib/types/client/store.js +4 -1
  41. package/lib/types/client/translate.d.ts +26 -1
  42. package/lib/types/client/translate.js +29 -12
  43. package/lib/types/client/useLocalTranscript.d.ts +43 -0
  44. package/lib/types/client/useLocalTranscript.js +129 -0
  45. package/lib/types/client/useMedia.d.ts +68 -0
  46. package/lib/types/client/useMedia.js +299 -0
  47. package/lib/types/client/useMediaStates.d.ts +9 -0
  48. package/lib/types/client/useMediaStates.js +43 -0
  49. package/lib/types/client/useNotes.d.ts +110 -0
  50. package/lib/types/client/useNotes.js +423 -0
  51. package/lib/types/client/usePolish.d.ts +47 -0
  52. package/lib/types/client/usePolish.js +162 -0
  53. package/lib/types/image-fetch.d.ts +81 -0
  54. package/lib/types/image-fetch.js +385 -0
  55. package/lib/types/index.d.ts +6 -0
  56. package/lib/types/index.js +3 -0
  57. package/lib/types/local-transcribe.d.ts +171 -0
  58. package/lib/types/local-transcribe.js +473 -0
  59. package/lib/types/media-host.d.ts +91 -0
  60. package/lib/types/media-host.js +230 -0
  61. package/lib/types/media.d.ts +100 -0
  62. package/lib/types/media.js +207 -0
  63. package/lib/types/notes-types.d.ts +158 -0
  64. package/lib/types/notes-types.js +8 -0
  65. package/lib/types/notes.d.ts +213 -0
  66. package/lib/types/notes.js +718 -0
  67. package/lib/types/polish.d.ts +41 -0
  68. package/lib/types/polish.js +136 -0
  69. package/lib/types/remote.d.ts +127 -1
  70. package/lib/types/remote.js +162 -1
  71. package/lib/types/service.d.ts +100 -1
  72. package/lib/types/service.js +320 -59
  73. package/lib/types/skill.d.ts +20 -0
  74. package/lib/types/skill.js +78 -0
  75. package/lib/types/store.js +30 -8
  76. package/lib/types/tool.d.ts +23 -0
  77. package/lib/types/tool.js +40 -0
  78. package/lib/types/tools.d.ts +69 -0
  79. package/lib/types/tools.js +400 -0
  80. package/lib/types/types.d.ts +106 -0
  81. package/lib/types/types.js +66 -0
  82. package/lib/types/xiaoyuzhou.d.ts +43 -0
  83. package/lib/types/xiaoyuzhou.js +134 -0
  84. package/lib/types/ytdlp.d.ts +111 -0
  85. package/lib/types/ytdlp.js +269 -0
  86. package/package.json +29 -20
  87. package/lib/invariant.js +0 -38
  88. package/lib/types/invariant.d.ts +0 -29
  89. package/lib/types/invariant.js +0 -38
@@ -1,32 +1,99 @@
1
1
  /* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
2
2
  import { z } from 'zod'
3
3
 
4
+ import { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'
5
+
6
+ let _khorsheed_dsh_reader_reader_addNote_parameter_0$schema$value
7
+ const _khorsheed_dsh_reader_reader_addNote_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_addNote_parameter_0$schema$value ??= z.object({
8
+ 'block': z.number().readonly(),
9
+ 'start': z.number().readonly().optional(),
10
+ 'quote': z.string().readonly(),
11
+ 'translated': z.string().readonly().optional(),
12
+ 'comment': z.string().readonly().optional(),
13
+ 'time': z.number().readonly().optional(),
14
+ 'entryId': z.string().readonly(),
15
+ 'title': z.string().readonly(),
16
+ 'url': z.string().readonly().optional(),
17
+ 'source': z.string().readonly().optional(),
18
+ }))
19
+ let _khorsheed_dsh_reader_reader_addNote_result$schema$value
20
+ const _khorsheed_dsh_reader_reader_addNote_result$schema = () => (_khorsheed_dsh_reader_reader_addNote_result$schema$value ??= z.union([z.literal("empty"), z.object({
21
+ 'id': z.string().readonly().describe('`n1`, `n2`… per article, never reused — the model cites notes by it.'),
22
+ 'anchor': z.object({
23
+ 'block': z.number().readonly(),
24
+ 'start': z.number().readonly().optional(),
25
+ 'quote': z.string().readonly(),
26
+ 'translated': z.string().readonly().optional().describe('The translated text, when the selection was made in the translated view.'),
27
+ 'time': z.number().readonly().optional().describe('A video / audio transcript paragraph\'s start (seconds): where ▶ plays from.'),
28
+ }).readonly(),
29
+ 'comment': z.string().readonly().optional(),
30
+ 'replies': z.array(z.object({
31
+ 'by': z.union([z.literal("user"), z.literal("agent")]).readonly(),
32
+ 'text': z.string().readonly(),
33
+ 'sessionId': z.string().readonly().optional().describe('The conversation it came from, so the reader can go back to it.'),
34
+ 'editedFrom': z.literal("agent").readonly().optional().describe('Set when the reader rewrote a line the model wrote.'),
35
+ 'at': z.string().readonly(),
36
+ })).readonly().optional().describe('Conclusions and additions, oldest first.'),
37
+ 'syncedTo': z.array(z.object({
38
+ 'canvasId': z.string().readonly(),
39
+ 'cardId': z.string().readonly(),
40
+ 'canvasTitle': z.string().readonly().describe('The canvas\'s title when it was synced (for the 「已在…」 mark).'),
41
+ 'at': z.string().readonly(),
42
+ })).readonly().optional().describe('Canvas cards made from it (a later edit does not reach them).'),
43
+ 'createdAt': z.string().readonly(),
44
+ 'updatedAt': z.string().readonly(),
45
+ }), z.literal("full")]))
46
+ let _khorsheed_dsh_reader_reader_addReply_parameter_0$schema$value
47
+ const _khorsheed_dsh_reader_reader_addReply_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_addReply_parameter_0$schema$value ??= z.object({
48
+ 'entryId': z.string(),
49
+ 'noteId': z.string(),
50
+ 'text': z.string(),
51
+ }))
52
+ let _khorsheed_dsh_reader_reader_addReply_result$schema$value
53
+ const _khorsheed_dsh_reader_reader_addReply_result$schema = () => (_khorsheed_dsh_reader_reader_addReply_result$schema$value ??= z.union([z.literal("not-found"), z.literal("ok"), z.literal("empty"), z.literal("full")]))
4
54
  let _khorsheed_dsh_reader_reader_addSource_parameter_0$schema$value
5
55
  const _khorsheed_dsh_reader_reader_addSource_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_addSource_parameter_0$schema$value ??= z.object({
6
56
  'url': z.string(),
7
57
  'label': z.string().optional(),
8
58
  }))
9
59
  let _khorsheed_dsh_reader_reader_addSource_result$schema$value
10
- const _khorsheed_dsh_reader_reader_addSource_result$schema = () => (_khorsheed_dsh_reader_reader_addSource_result$schema$value ??= z.union([z.literal("unavailable"), z.object({
60
+ const _khorsheed_dsh_reader_reader_addSource_result$schema = () => (_khorsheed_dsh_reader_reader_addSource_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("duplicate"), z.object({
11
61
  'outcome': z.union([z.literal("subscribed"), z.literal("saved-link")]).readonly(),
12
62
  'kind': z.union([z.literal("rss"), z.literal("link")]).readonly(),
13
63
  'id': z.string().readonly(),
14
64
  'label': z.string().readonly(),
15
65
  'failure': z.object({
16
- 'code': z.union([z.literal("unreadable"), z.literal("empty"), z.literal("blocked"), z.literal("login"), z.literal("unsupported-type"), z.literal("redirected"), z.literal("unreachable"), z.literal("http")]).readonly(),
66
+ 'code': z.union([z.literal("blocked"), z.literal("http"), z.literal("unreadable"), z.literal("empty"), z.literal("login"), z.literal("unsupported-type"), z.literal("redirected"), z.literal("unreachable")]).readonly(),
17
67
  'message': z.string().readonly(),
18
- }).readonly().optional(),
19
- }), z.literal("invalid-url"), z.literal("duplicate"), z.literal("unsupported-content"), z.literal("fetch-failed"), z.object({
68
+ }).readonly().optional().describe('Present when the source was saved but its body cannot be previewed. The add still succeeded: the URL is a link the reader now owns. This is the verdict\'s reason, not a failure — which is why it rides the outcome instead of becoming one more refusal that loses the link.'),
69
+ }), z.literal("invalid-url"), z.literal("unsupported-content"), z.literal("fetch-failed"), z.object({
20
70
  'outcome': z.literal("fetch-failed").readonly(),
21
- 'reason': z.string().readonly(),
71
+ 'reason': z.string().readonly().describe('The fetch seam\'s message, verbatim — a refused connection, a timeout, a byte cap.'),
22
72
  })]))
73
+ let _khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0$schema$value
74
+ const _khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0$schema$value ??= z.object({
75
+ 'entryId': z.string(),
76
+ 'force': z.boolean(),
77
+ }))
78
+ let _khorsheed_dsh_reader_reader_cancelLocalTranscript_result$schema$value
79
+ const _khorsheed_dsh_reader_reader_cancelLocalTranscript_result$schema = () => (_khorsheed_dsh_reader_reader_cancelLocalTranscript_result$schema$value ??= z.object({
80
+ 'entryId': z.string().readonly(),
81
+ 'state': z.union([z.literal("failed"), z.literal("unavailable"), z.literal("done"), z.literal("idle"), z.literal("queued"), z.literal("fetching"), z.literal("needs-models"), z.literal("transcribing"), z.literal("speakers")]).readonly(),
82
+ 'progress': z.number().readonly().optional().describe('0–1 across fetching the audio and transcribing it.'),
83
+ 'ahead': z.number().readonly().optional().describe('Jobs ahead in the engine\'s queue.'),
84
+ 'bytes': z.number().readonly().optional().describe('Bytes of speech models still to download (`needs-models`).'),
85
+ 'html': z.string().readonly().optional().describe('The transcript so far (or in full, once `done`).'),
86
+ 'language': z.string().readonly().optional().describe('The language the transcript is in, once known.'),
87
+ 'speakers': z.number().readonly().optional().describe('How many voices the transcript has, once the speakers pass settled it.'),
88
+ 'error': z.string().readonly().optional(),
89
+ }))
23
90
  let _khorsheed_dsh_reader_reader_capabilities_result$schema$value
24
91
  const _khorsheed_dsh_reader_reader_capabilities_result$schema = () => (_khorsheed_dsh_reader_reader_capabilities_result$schema$value ??= z.object({
25
92
  'protocolVersion': z.literal(1).readonly(),
26
- 'hasFs': z.boolean().readonly(),
27
- 'hasSideChat': z.boolean().readonly(),
28
- 'nextRefreshAt': z.string().readonly().optional(),
29
- 'lastRefreshAt': z.string().readonly().optional(),
93
+ 'hasFs': z.boolean().readonly().describe('False when no filesystem is mounted: state lives in memory and is lost on restart.'),
94
+ 'hasSideChat': z.boolean().readonly().describe('False when no side-chat service is mounted: the side-chat gesture must hide.'),
95
+ 'nextRefreshAt': z.string().readonly().optional().describe('ISO-8601 timestamp of the next scheduled refresh, when one is armed.'),
96
+ 'lastRefreshAt': z.string().readonly().optional().describe('ISO-8601 timestamp of the last completed refresh run, when there was one. The list shows it so a reader can decide whether the snapshot is stale enough to be worth a fetch.'),
30
97
  }))
31
98
  let _khorsheed_dsh_reader_reader_clearRecent_result$schema$value
32
99
  const _khorsheed_dsh_reader_reader_clearRecent_result$schema = () => (_khorsheed_dsh_reader_reader_clearRecent_result$schema$value ??= z.object({
@@ -42,17 +109,40 @@ const _khorsheed_dsh_reader_reader_createTag_parameter_0$schema = () => (_khorsh
42
109
  'name': z.string(),
43
110
  }))
44
111
  let _khorsheed_dsh_reader_reader_createTag_result$schema$value
45
- const _khorsheed_dsh_reader_reader_createTag_result$schema = () => (_khorsheed_dsh_reader_reader_createTag_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok"), z.literal("empty"), z.literal("not-found"), z.literal("duplicate"), z.object({
46
- 'id': z.string().readonly(),
47
- 'name': z.string().readonly(),
112
+ const _khorsheed_dsh_reader_reader_createTag_result$schema = () => (_khorsheed_dsh_reader_reader_createTag_result$schema$value ??= z.union([z.literal("not-found"), z.literal("unavailable"), z.literal("duplicate"), z.literal("ok"), z.literal("empty"), z.literal("invalid"), z.object({
113
+ 'id': z.string().readonly().describe('Stable id — renaming a tag must not rewrite every entry that carries it.'),
114
+ 'name': z.string().readonly().describe('The reader-facing name, unique case-insensitively.'),
48
115
  'createdAt': z.string().readonly(),
49
- }), z.literal("invalid")]))
116
+ })]))
117
+ let _khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0$schema$value
118
+ const _khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0$schema$value ??= z.object({
119
+ 'entryId': z.string(),
120
+ 'discussionId': z.string(),
121
+ }))
122
+ let _khorsheed_dsh_reader_reader_deleteDiscussion_result$schema$value
123
+ const _khorsheed_dsh_reader_reader_deleteDiscussion_result$schema = () => (_khorsheed_dsh_reader_reader_deleteDiscussion_result$schema$value ??= z.union([z.literal("not-found"), z.literal("ok"), z.literal("empty"), z.literal("full")]))
124
+ let _khorsheed_dsh_reader_reader_deleteNote_parameter_0$schema$value
125
+ const _khorsheed_dsh_reader_reader_deleteNote_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_deleteNote_parameter_0$schema$value ??= z.object({
126
+ 'entryId': z.string(),
127
+ 'noteId': z.string(),
128
+ }))
129
+ let _khorsheed_dsh_reader_reader_deleteNote_result$schema$value
130
+ const _khorsheed_dsh_reader_reader_deleteNote_result$schema = () => (_khorsheed_dsh_reader_reader_deleteNote_result$schema$value ??= z.union([z.literal("not-found"), z.literal("ok"), z.literal("empty"), z.literal("full")]))
50
131
  let _khorsheed_dsh_reader_reader_deleteTag_parameter_0$schema$value
51
132
  const _khorsheed_dsh_reader_reader_deleteTag_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_deleteTag_parameter_0$schema$value ??= z.object({
52
133
  'id': z.string(),
53
134
  }))
54
135
  let _khorsheed_dsh_reader_reader_deleteTag_result$schema$value
55
- const _khorsheed_dsh_reader_reader_deleteTag_result$schema = () => (_khorsheed_dsh_reader_reader_deleteTag_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok"), z.literal("empty"), z.literal("not-found"), z.literal("duplicate"), z.literal("invalid")]))
136
+ const _khorsheed_dsh_reader_reader_deleteTag_result$schema = () => (_khorsheed_dsh_reader_reader_deleteTag_result$schema$value ??= z.union([z.literal("not-found"), z.literal("unavailable"), z.literal("duplicate"), z.literal("ok"), z.literal("empty"), z.literal("invalid")]))
137
+ let _khorsheed_dsh_reader_reader_editReply_parameter_0$schema$value
138
+ const _khorsheed_dsh_reader_reader_editReply_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_editReply_parameter_0$schema$value ??= z.object({
139
+ 'entryId': z.string(),
140
+ 'noteId': z.string(),
141
+ 'index': z.number(),
142
+ 'text': z.string(),
143
+ }))
144
+ let _khorsheed_dsh_reader_reader_editReply_result$schema$value
145
+ const _khorsheed_dsh_reader_reader_editReply_result$schema = () => (_khorsheed_dsh_reader_reader_editReply_result$schema$value ??= z.union([z.literal("not-found"), z.literal("ok"), z.literal("empty"), z.literal("full")]))
56
146
  let _khorsheed_dsh_reader_reader_entryFetchStates_parameter_0$schema$value
57
147
  const _khorsheed_dsh_reader_reader_entryFetchStates_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_entryFetchStates_parameter_0$schema$value ??= z.object({
58
148
  'entryIds': z.array(z.string()),
@@ -74,9 +164,74 @@ const _khorsheed_dsh_reader_reader_entryFetchStates_result$schema = () => (_khor
74
164
  'state': z.literal("failed").readonly(),
75
165
  'at': z.string().readonly(),
76
166
  'message': z.string().readonly(),
77
- 'code': z.union([z.literal("unreadable"), z.literal("empty"), z.literal("blocked"), z.literal("login"), z.literal("unsupported-type"), z.literal("redirected"), z.literal("unreachable"), z.literal("http")]).readonly().optional(),
167
+ 'code': z.union([z.literal("blocked"), z.literal("http"), z.literal("unreadable"), z.literal("empty"), z.literal("login"), z.literal("unsupported-type"), z.literal("redirected"), z.literal("unreachable")]).readonly().optional(),
78
168
  })])),
79
169
  }))
170
+ let _khorsheed_dsh_reader_reader_entryNotes_parameter_0$schema$value
171
+ const _khorsheed_dsh_reader_reader_entryNotes_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_entryNotes_parameter_0$schema$value ??= z.object({
172
+ 'entryId': z.string(),
173
+ }))
174
+ let _khorsheed_dsh_reader_reader_entryNotes_result$schema$value
175
+ const _khorsheed_dsh_reader_reader_entryNotes_result$schema = () => (_khorsheed_dsh_reader_reader_entryNotes_result$schema$value ??= z.object({
176
+ 'entry': z.object({
177
+ 'entryId': z.string().readonly(),
178
+ 'title': z.string().readonly(),
179
+ 'url': z.string().readonly().optional(),
180
+ 'source': z.string().readonly().optional().describe('The source\'s display label (the feed\'s name, or the site).'),
181
+ 'notes': z.array(z.object({
182
+ 'id': z.string().readonly().describe('`n1`, `n2`… per article, never reused — the model cites notes by it.'),
183
+ 'anchor': z.object({
184
+ 'block': z.number().readonly(),
185
+ 'start': z.number().readonly().optional(),
186
+ 'quote': z.string().readonly(),
187
+ 'translated': z.string().readonly().optional().describe('The translated text, when the selection was made in the translated view.'),
188
+ 'time': z.number().readonly().optional().describe('A video / audio transcript paragraph\'s start (seconds): where ▶ plays from.'),
189
+ }).readonly(),
190
+ 'comment': z.string().readonly().optional(),
191
+ 'replies': z.array(z.object({
192
+ 'by': z.union([z.literal("user"), z.literal("agent")]).readonly(),
193
+ 'text': z.string().readonly(),
194
+ 'sessionId': z.string().readonly().optional().describe('The conversation it came from, so the reader can go back to it.'),
195
+ 'editedFrom': z.literal("agent").readonly().optional().describe('Set when the reader rewrote a line the model wrote.'),
196
+ 'at': z.string().readonly(),
197
+ })).readonly().optional().describe('Conclusions and additions, oldest first.'),
198
+ 'syncedTo': z.array(z.object({
199
+ 'canvasId': z.string().readonly(),
200
+ 'cardId': z.string().readonly(),
201
+ 'canvasTitle': z.string().readonly().describe('The canvas\'s title when it was synced (for the 「已在…」 mark).'),
202
+ 'at': z.string().readonly(),
203
+ })).readonly().optional().describe('Canvas cards made from it (a later edit does not reach them).'),
204
+ 'createdAt': z.string().readonly(),
205
+ 'updatedAt': z.string().readonly(),
206
+ })).readonly(),
207
+ 'sessions': z.array(z.object({
208
+ 'sessionId': z.string().readonly(),
209
+ 'title': z.string().readonly().optional(),
210
+ 'lastAt': z.string().readonly(),
211
+ })).readonly(),
212
+ 'discussions': z.array(z.object({
213
+ 'id': z.string().readonly().describe('`d1`, `d2`… per article, never reused.'),
214
+ 'kind': z.union([z.literal("check"), z.literal("discussion")]).readonly(),
215
+ 'sessionId': z.string().readonly().optional(),
216
+ 'title': z.string().readonly(),
217
+ 'points': z.array(z.object({
218
+ 'text': z.string().readonly(),
219
+ 'para': z.number().readonly().optional().describe('¶ number (1-based), when the point cites the article.'),
220
+ })).readonly(),
221
+ 'aside': z.string().readonly().optional().describe('One line for what went fine (「其余 2 题讲到位了」).'),
222
+ 'syncedTo': z.array(z.object({
223
+ 'canvasId': z.string().readonly(),
224
+ 'cardId': z.string().readonly(),
225
+ 'canvasTitle': z.string().readonly().describe('The canvas\'s title when it was synced (for the 「已在…」 mark).'),
226
+ 'at': z.string().readonly(),
227
+ })).readonly().optional().describe('Canvas cards made from it.'),
228
+ 'createdAt': z.string().readonly(),
229
+ })).readonly().optional().describe('Discussion notes, newest first.'),
230
+ 'nextNote': z.number().readonly().describe('The next note number; ids are never reused, so a deleted n3 stays deleted.'),
231
+ 'nextDiscussion': z.number().readonly().optional().describe('The next discussion number, never reused either.'),
232
+ 'updatedAt': z.string().readonly(),
233
+ }).optional(),
234
+ }))
80
235
  let _khorsheed_dsh_reader_reader_entryTags_parameter_0$schema$value
81
236
  const _khorsheed_dsh_reader_reader_entryTags_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_entryTags_parameter_0$schema$value ??= z.object({
82
237
  'entryId': z.string(),
@@ -84,8 +239,8 @@ const _khorsheed_dsh_reader_reader_entryTags_parameter_0$schema = () => (_khorsh
84
239
  let _khorsheed_dsh_reader_reader_entryTags_result$schema$value
85
240
  const _khorsheed_dsh_reader_reader_entryTags_result$schema = () => (_khorsheed_dsh_reader_reader_entryTags_result$schema$value ??= z.object({
86
241
  'tags': z.array(z.object({
87
- 'id': z.string().readonly(),
88
- 'name': z.string().readonly(),
242
+ 'id': z.string().readonly().describe('Stable id — renaming a tag must not rewrite every entry that carries it.'),
243
+ 'name': z.string().readonly().describe('The reader-facing name, unique case-insensitively.'),
89
244
  'createdAt': z.string().readonly(),
90
245
  })),
91
246
  }))
@@ -103,6 +258,17 @@ const _khorsheed_dsh_reader_reader_fetchEntryBody_result$schema = () => (_khorsh
103
258
  'truncated': z.boolean().optional(),
104
259
  'error': z.string().optional(),
105
260
  }))
261
+ let _khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema$value
262
+ const _khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema$value ??= z.object({
263
+ 'url': z.string(),
264
+ }))
265
+ let _khorsheed_dsh_reader_reader_fetchImage_result$schema$value
266
+ const _khorsheed_dsh_reader_reader_fetchImage_result$schema = () => (_khorsheed_dsh_reader_reader_fetchImage_result$schema$value ??= z.object({
267
+ 'url': z.string().readonly().describe('The URL the pane asked about (echoed, so a late answer can be matched).'),
268
+ 'mime': z.string().readonly().optional().describe('The image\'s declared content type, when the fetch produced bytes.'),
269
+ 'base64': z.string().readonly().optional().describe('The image bytes, base64-encoded, when the fetch produced them.'),
270
+ 'error': z.string().readonly().optional().describe('Why the rescue failed, when it did.'),
271
+ }))
106
272
  let _khorsheed_dsh_reader_reader_getBodies_parameter_0$schema$value
107
273
  const _khorsheed_dsh_reader_reader_getBodies_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_getBodies_parameter_0$schema$value ??= z.object({
108
274
  'ids': z.array(z.string()),
@@ -113,9 +279,9 @@ const _khorsheed_dsh_reader_reader_getBodies_result$schema = () => (_khorsheed_d
113
279
  'id': z.string().readonly(),
114
280
  'raw': z.string().readonly().optional(),
115
281
  'truncated': z.boolean().readonly().optional(),
116
- 'error': z.string().readonly().optional(),
117
- 'title': z.string().readonly().optional(),
118
- 'excerpt': z.string().readonly().optional(),
282
+ 'error': z.string().readonly().optional().describe('Present when the payload could not be produced (fetch failed, no fs, …).'),
283
+ 'title': z.string().readonly().optional().describe('The captured article title for a link source\'s single entry, when a past extraction stored it (see {@link ReaderEntryAnnotation.title}). The wall prefers it over the URL-derived label.'),
284
+ 'excerpt': z.string().readonly().optional().describe('The captured excerpt, with the title.'),
119
285
  })),
120
286
  }))
121
287
  let _khorsheed_dsh_reader_reader_getCachePolicy_result$schema$value
@@ -133,15 +299,15 @@ const _khorsheed_dsh_reader_reader_getEntryBody_parameter_0$schema = () => (_kho
133
299
  let _khorsheed_dsh_reader_reader_getEntryBody_result$schema$value
134
300
  const _khorsheed_dsh_reader_reader_getEntryBody_result$schema = () => (_khorsheed_dsh_reader_reader_getEntryBody_result$schema$value ??= z.object({
135
301
  'entryId': z.string().readonly(),
136
- 'cached': z.boolean().readonly(),
137
- 'fresh': z.boolean().readonly(),
138
- 'fromFeed': z.boolean().readonly(),
302
+ 'cached': z.boolean().readonly().describe('True when this body is a cached fetch rather than the feed\'s own payload.'),
303
+ 'fresh': z.boolean().readonly().describe('False when the cache\'s deadline has passed: the view offers the fetch.'),
304
+ 'fromFeed': z.boolean().readonly().describe('True when the feed\'s payload already carries full text for this entry.'),
139
305
  'html': z.string().readonly().optional(),
140
306
  'fetchedAt': z.string().readonly().optional(),
141
307
  'truncated': z.boolean().readonly().optional(),
142
- 'scriptFigures': z.number().readonly().optional(),
143
- 'rendered': z.boolean().readonly().optional(),
144
- 'error': z.string().readonly().optional(),
308
+ 'scriptFigures': z.number().readonly().optional().describe('Figures this page draws with scripts — the detail view says so.'),
309
+ 'rendered': z.boolean().readonly().optional().describe('True when this body came from a rendered fetch (the「重新抓取」route reads it).'),
310
+ 'error': z.string().readonly().optional().describe('Why a fetch could not produce a body, when one was attempted.'),
145
311
  }))
146
312
  let _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0$schema$value
147
313
  const _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0$schema$value ??= z.object({
@@ -181,13 +347,13 @@ const _khorsheed_dsh_reader_reader_getStorageStats_result$schema = () => (_khors
181
347
  'bodies': z.object({
182
348
  'entries': z.number().readonly(),
183
349
  'chars': z.number().readonly(),
184
- }).readonly(),
350
+ }).readonly().describe('The cached article bodies (what TTL + maxEntries govern).'),
185
351
  'translations': z.object({
186
- 'entries': z.number().readonly(),
187
- 'chars': z.number().readonly(),
188
- 'memoryEntries': z.number().readonly(),
189
- 'memoryChars': z.number().readonly(),
190
- }).readonly(),
352
+ 'entries': z.number().readonly().describe('How many entries carry a segment map.'),
353
+ 'chars': z.number().readonly().describe('The maps\' combined size.'),
354
+ 'memoryEntries': z.number().readonly().describe('The global memory\'s sentence count (0 when no table exists).'),
355
+ 'memoryChars': z.number().readonly().describe('The global memory\'s size (0 when no table exists).'),
356
+ }).readonly().describe('The two translation tiers: per-entry maps, and the global sentence memory.'),
191
357
  }))
192
358
  let _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0$schema$value
193
359
  const _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0$schema$value ??= z.object({
@@ -205,7 +371,7 @@ const _khorsheed_dsh_reader_reader_listBackfillCandidates_result$schema = () =>
205
371
  'entryId': z.string().readonly(),
206
372
  'url': z.string().readonly(),
207
373
  'label': z.string().readonly(),
208
- 'lastError': z.string().readonly().optional(),
374
+ 'lastError': z.string().readonly().optional().describe('Why a previous attempt failed, when one did (and when it is worth retrying).'),
209
375
  })),
210
376
  }))
211
377
  let _khorsheed_dsh_reader_reader_listRecent_result$schema$value
@@ -214,8 +380,8 @@ const _khorsheed_dsh_reader_reader_listRecent_result$schema = () => (_khorsheed_
214
380
  'entryId': z.string().readonly(),
215
381
  'sourceId': z.string().readonly(),
216
382
  'title': z.string().readonly(),
217
- 'url': z.string().readonly().optional(),
218
- 'readAt': z.string().readonly(),
383
+ 'url': z.string().readonly().optional().describe('The article URL, for reopening an entry the feed no longer publishes.'),
384
+ 'readAt': z.string().readonly().describe('When it was opened (ISO-8601).'),
219
385
  })),
220
386
  }))
221
387
  let _khorsheed_dsh_reader_reader_listSources_result$schema$value
@@ -226,28 +392,106 @@ const _khorsheed_dsh_reader_reader_listSources_result$schema = () => (_khorsheed
226
392
  'url': z.string().readonly(),
227
393
  'label': z.string().readonly(),
228
394
  'enabled': z.boolean().readonly(),
229
- 'addedAt': z.string().readonly(),
395
+ 'addedAt': z.string().readonly().describe('When the reader added it (ISO-8601). The browser needs this to order the wall and the management list by "when did this arrive": a saved link carries no publication date at all, so without this field it sorts as the oldest thing on the wall — which is exactly where a reader who just added it will not look.'),
230
396
  'fetchedAt': z.string().readonly().optional(),
231
- 'status': z.union([z.literal("ok"), z.literal("error"), z.literal("fetching")]).readonly().optional(),
397
+ 'status': z.union([z.literal("error"), z.literal("ok"), z.literal("fetching")]).readonly().optional(),
232
398
  'error': z.string().readonly().optional(),
233
399
  'truncated': z.boolean().readonly().optional(),
234
400
  'hasBody': z.boolean().readonly(),
235
401
  'failure': z.object({
236
- 'code': z.union([z.literal("unreadable"), z.literal("empty"), z.literal("blocked"), z.literal("login"), z.literal("unsupported-type"), z.literal("redirected"), z.literal("unreachable"), z.literal("http")]).readonly(),
402
+ 'code': z.union([z.literal("blocked"), z.literal("http"), z.literal("unreadable"), z.literal("empty"), z.literal("login"), z.literal("unsupported-type"), z.literal("redirected"), z.literal("unreachable")]).readonly(),
237
403
  'message': z.string().readonly(),
238
- }).readonly().optional(),
239
- 'resolvedFrom': z.string().readonly().optional(),
404
+ }).readonly().optional().describe('Present when this source has no previewable body (see {@link ReaderPreviewFailure}).'),
405
+ 'resolvedFrom': z.string().readonly().optional().describe('The URL the reader pasted, when the source was resolved to a canonical version (see {@link ReaderSource.resolvedFrom}).'),
240
406
  })),
241
407
  }))
242
408
  let _khorsheed_dsh_reader_reader_listTags_result$schema$value
243
409
  const _khorsheed_dsh_reader_reader_listTags_result$schema = () => (_khorsheed_dsh_reader_reader_listTags_result$schema$value ??= z.object({
244
410
  'tags': z.array(z.object({
245
- 'id': z.string().readonly(),
246
- 'name': z.string().readonly(),
411
+ 'id': z.string().readonly().describe('Stable id — renaming a tag must not rewrite every entry that carries it.'),
412
+ 'name': z.string().readonly().describe('The reader-facing name, unique case-insensitively.'),
247
413
  'createdAt': z.string().readonly(),
248
414
  })),
249
415
  'counts': z.record(z.string(), z.number()),
250
416
  }))
417
+ let _khorsheed_dsh_reader_reader_localTranscript_parameter_0$schema$value
418
+ const _khorsheed_dsh_reader_reader_localTranscript_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_localTranscript_parameter_0$schema$value ??= z.object({
419
+ 'entryId': z.string(),
420
+ }))
421
+ let _khorsheed_dsh_reader_reader_localTranscript_result$schema$value
422
+ const _khorsheed_dsh_reader_reader_localTranscript_result$schema = () => (_khorsheed_dsh_reader_reader_localTranscript_result$schema$value ??= z.object({
423
+ 'entryId': z.string().readonly(),
424
+ 'state': z.union([z.literal("failed"), z.literal("unavailable"), z.literal("done"), z.literal("idle"), z.literal("queued"), z.literal("fetching"), z.literal("needs-models"), z.literal("transcribing"), z.literal("speakers")]).readonly(),
425
+ 'progress': z.number().readonly().optional().describe('0–1 across fetching the audio and transcribing it.'),
426
+ 'ahead': z.number().readonly().optional().describe('Jobs ahead in the engine\'s queue.'),
427
+ 'bytes': z.number().readonly().optional().describe('Bytes of speech models still to download (`needs-models`).'),
428
+ 'html': z.string().readonly().optional().describe('The transcript so far (or in full, once `done`).'),
429
+ 'language': z.string().readonly().optional().describe('The language the transcript is in, once known.'),
430
+ 'speakers': z.number().readonly().optional().describe('How many voices the transcript has, once the speakers pass settled it.'),
431
+ 'error': z.string().readonly().optional(),
432
+ }))
433
+ let _khorsheed_dsh_reader_reader_markSynced_parameter_0$schema$value
434
+ const _khorsheed_dsh_reader_reader_markSynced_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_markSynced_parameter_0$schema$value ??= z.object({
435
+ 'entryId': z.string(),
436
+ 'noteId': z.string().optional(),
437
+ 'discussionId': z.string().optional(),
438
+ 'canvasId': z.string(),
439
+ 'cardId': z.string(),
440
+ 'canvasTitle': z.string(),
441
+ }))
442
+ let _khorsheed_dsh_reader_reader_markSynced_result$schema$value
443
+ const _khorsheed_dsh_reader_reader_markSynced_result$schema = () => (_khorsheed_dsh_reader_reader_markSynced_result$schema$value ??= z.union([z.literal("not-found"), z.literal("ok"), z.literal("empty"), z.literal("full")]))
444
+ let _khorsheed_dsh_reader_reader_mediaStates_parameter_0$schema$value
445
+ const _khorsheed_dsh_reader_reader_mediaStates_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_mediaStates_parameter_0$schema$value ??= z.object({
446
+ 'entryIds': z.array(z.string()),
447
+ }))
448
+ let _khorsheed_dsh_reader_reader_mediaStates_result$schema$value
449
+ const _khorsheed_dsh_reader_reader_mediaStates_result$schema = () => (_khorsheed_dsh_reader_reader_mediaStates_result$schema$value ??= z.object({
450
+ 'engine': z.boolean().readonly(),
451
+ 'states': z.record(z.string(), z.object({
452
+ 'state': z.union([z.literal("failed"), z.literal("none"), z.literal("local"), z.literal("queued"), z.literal("fetching"), z.literal("platform"), z.literal("transcribing")]).readonly(),
453
+ 'progress': z.number().readonly().optional().describe('0–1, while transcribing.'),
454
+ 'ahead': z.number().readonly().optional().describe('Jobs ahead in the engine\'s queue, while queued.'),
455
+ })).readonly().readonly(),
456
+ }))
457
+ let _khorsheed_dsh_reader_reader_mediaTranscript_parameter_0$schema$value
458
+ const _khorsheed_dsh_reader_reader_mediaTranscript_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_mediaTranscript_parameter_0$schema$value ??= z.object({
459
+ 'entryId': z.string(),
460
+ 'url': z.string(),
461
+ }))
462
+ let _khorsheed_dsh_reader_reader_mediaTranscript_result$schema$value
463
+ const _khorsheed_dsh_reader_reader_mediaTranscript_result$schema = () => (_khorsheed_dsh_reader_reader_mediaTranscript_result$schema$value ??= z.object({
464
+ 'entryId': z.string(),
465
+ 'html': z.string().optional(),
466
+ 'captions': z.union([z.literal("failed"), z.literal("none"), z.literal("platform")]),
467
+ 'language': z.string().optional(),
468
+ 'error': z.string().optional(),
469
+ }))
470
+ let _khorsheed_dsh_reader_reader_nameSpeaker_parameter_0$schema$value
471
+ const _khorsheed_dsh_reader_reader_nameSpeaker_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_nameSpeaker_parameter_0$schema$value ??= z.object({
472
+ 'entryId': z.string(),
473
+ 'speaker': z.number(),
474
+ 'name': z.string(),
475
+ }))
476
+ let _khorsheed_dsh_reader_reader_nameSpeaker_result$schema$value
477
+ const _khorsheed_dsh_reader_reader_nameSpeaker_result$schema = () => (_khorsheed_dsh_reader_reader_nameSpeaker_result$schema$value ??= z.record(z.string(), z.string()))
478
+ let _khorsheed_dsh_reader_reader_noteCounts_result$schema$value
479
+ const _khorsheed_dsh_reader_reader_noteCounts_result$schema = () => (_khorsheed_dsh_reader_reader_noteCounts_result$schema$value ??= z.object({
480
+ 'counts': z.record(z.string(), z.number()),
481
+ }))
482
+ let _khorsheed_dsh_reader_reader_polish_parameter_0$schema$value
483
+ const _khorsheed_dsh_reader_reader_polish_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_polish_parameter_0$schema$value ??= z.object({
484
+ 'entryId': z.string(),
485
+ }))
486
+ let _khorsheed_dsh_reader_reader_polish_result$schema$value
487
+ const _khorsheed_dsh_reader_reader_polish_result$schema = () => (_khorsheed_dsh_reader_reader_polish_result$schema$value ??= z.union([z.literal(null), z.object({
488
+ 'total': z.number().readonly().describe('Paragraphs in the article (the ¶ numbering the model read).'),
489
+ 'done': z.number().readonly(),
490
+ 'paragraphs': z.record(z.string(), z.string()).readonly().readonly().describe('¶ number (1-based, as a string key) → the agent\'s translation.'),
491
+ 'off': z.array(z.number()).readonly().describe('Paragraphs the reader turned back to the machine translation.'),
492
+ 'updatedAt': z.string().readonly(),
493
+ 'complete': z.boolean().readonly(),
494
+ })]))
251
495
  let _khorsheed_dsh_reader_reader_pruneTags_result$schema$value
252
496
  const _khorsheed_dsh_reader_reader_pruneTags_result$schema = () => (_khorsheed_dsh_reader_reader_pruneTags_result$schema$value ??= z.object({
253
497
  'removed': z.number(),
@@ -260,6 +504,17 @@ const _khorsheed_dsh_reader_reader_quoteToSideChat_parameter_0$schema = () => (_
260
504
  }))
261
505
  let _khorsheed_dsh_reader_reader_quoteToSideChat_result$schema$value
262
506
  const _khorsheed_dsh_reader_reader_quoteToSideChat_result$schema = () => (_khorsheed_dsh_reader_reader_quoteToSideChat_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok")]))
507
+ let _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0$schema$value
508
+ const _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_recordDiscussion_parameter_0$schema$value ??= z.object({
509
+ 'entryId': z.string().readonly(),
510
+ 'title': z.string().readonly(),
511
+ 'url': z.string().readonly().optional(),
512
+ 'source': z.string().readonly().optional(),
513
+ 'sessionId': z.string(),
514
+ 'sessionTitle': z.string().optional(),
515
+ }))
516
+ let _khorsheed_dsh_reader_reader_recordDiscussion_result$schema$value
517
+ const _khorsheed_dsh_reader_reader_recordDiscussion_result$schema = () => (_khorsheed_dsh_reader_reader_recordDiscussion_result$schema$value ??= z.union([z.literal("ok"), z.literal("empty")]))
263
518
  let _khorsheed_dsh_reader_reader_recordRead_parameter_0$schema$value
264
519
  const _khorsheed_dsh_reader_reader_recordRead_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_recordRead_parameter_0$schema$value ??= z.object({
265
520
  'entryId': z.string(),
@@ -287,12 +542,12 @@ let _khorsheed_dsh_reader_reader_rememberSentences_parameter_0$schema$value
287
542
  const _khorsheed_dsh_reader_reader_rememberSentences_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_rememberSentences_parameter_0$schema$value ??= z.object({
288
543
  'pair': z.string(),
289
544
  'entries': z.array(z.object({
290
- 'hash': z.string().readonly(),
545
+ 'hash': z.string().readonly().describe('The client\'s `translationHash(source)`, stored opaquely.'),
291
546
  'source': z.string().readonly(),
292
547
  'target': z.string().readonly(),
293
548
  })),
294
549
  'recalled': z.array(z.object({
295
- 'hash': z.string().readonly(),
550
+ 'hash': z.string().readonly().describe('The client\'s `translationHash(source)`, stored opaquely.'),
296
551
  'source': z.string().readonly(),
297
552
  'target': z.string().readonly(),
298
553
  })).optional(),
@@ -309,14 +564,14 @@ const _khorsheed_dsh_reader_reader_removeSource_parameter_0$schema = () => (_kho
309
564
  'entryIds': z.array(z.string()).optional(),
310
565
  }))
311
566
  let _khorsheed_dsh_reader_reader_removeSource_result$schema$value
312
- const _khorsheed_dsh_reader_reader_removeSource_result$schema = () => (_khorsheed_dsh_reader_reader_removeSource_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok"), z.literal("not-found"), z.literal("invalid-url"), z.literal("invalid-time"), z.literal("duplicate")]))
567
+ const _khorsheed_dsh_reader_reader_removeSource_result$schema = () => (_khorsheed_dsh_reader_reader_removeSource_result$schema$value ??= z.union([z.literal("not-found"), z.literal("unavailable"), z.literal("duplicate"), z.literal("ok"), z.literal("invalid-url"), z.literal("invalid-time")]))
313
568
  let _khorsheed_dsh_reader_reader_renameTag_parameter_0$schema$value
314
569
  const _khorsheed_dsh_reader_reader_renameTag_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_renameTag_parameter_0$schema$value ??= z.object({
315
570
  'id': z.string(),
316
571
  'name': z.string(),
317
572
  }))
318
573
  let _khorsheed_dsh_reader_reader_renameTag_result$schema$value
319
- const _khorsheed_dsh_reader_reader_renameTag_result$schema = () => (_khorsheed_dsh_reader_reader_renameTag_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok"), z.literal("empty"), z.literal("not-found"), z.literal("duplicate"), z.literal("invalid")]))
574
+ const _khorsheed_dsh_reader_reader_renameTag_result$schema = () => (_khorsheed_dsh_reader_reader_renameTag_result$schema$value ??= z.union([z.literal("not-found"), z.literal("unavailable"), z.literal("duplicate"), z.literal("ok"), z.literal("empty"), z.literal("invalid")]))
320
575
  let _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema$value
321
576
  const _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema$value ??= z.object({
322
577
  'ttlHours': z.number(),
@@ -324,7 +579,64 @@ const _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema = () => (_k
324
579
  'translationBudgetChars': z.number().optional(),
325
580
  }))
326
581
  let _khorsheed_dsh_reader_reader_setCachePolicy_result$schema$value
327
- const _khorsheed_dsh_reader_reader_setCachePolicy_result$schema = () => (_khorsheed_dsh_reader_reader_setCachePolicy_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok"), z.literal("empty"), z.literal("not-found"), z.literal("duplicate"), z.literal("invalid")]))
582
+ const _khorsheed_dsh_reader_reader_setCachePolicy_result$schema = () => (_khorsheed_dsh_reader_reader_setCachePolicy_result$schema$value ??= z.union([z.literal("not-found"), z.literal("unavailable"), z.literal("duplicate"), z.literal("ok"), z.literal("empty"), z.literal("invalid")]))
583
+ let _khorsheed_dsh_reader_reader_setPolishOff_parameter_0$schema$value
584
+ const _khorsheed_dsh_reader_reader_setPolishOff_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_setPolishOff_parameter_0$schema$value ??= z.object({
585
+ 'entryId': z.string(),
586
+ 'paragraph': z.number(),
587
+ 'off': z.boolean(),
588
+ }))
589
+ let _khorsheed_dsh_reader_reader_setPolishOff_result$schema$value
590
+ const _khorsheed_dsh_reader_reader_setPolishOff_result$schema = () => (_khorsheed_dsh_reader_reader_setPolishOff_result$schema$value ??= z.union([z.literal(null), z.object({
591
+ 'total': z.number().readonly().describe('Paragraphs in the article (the ¶ numbering the model read).'),
592
+ 'done': z.number().readonly(),
593
+ 'paragraphs': z.record(z.string(), z.string()).readonly().readonly().describe('¶ number (1-based, as a string key) → the agent\'s translation.'),
594
+ 'off': z.array(z.number()).readonly().describe('Paragraphs the reader turned back to the machine translation.'),
595
+ 'updatedAt': z.string().readonly(),
596
+ 'complete': z.boolean().readonly(),
597
+ })]))
598
+ let _khorsheed_dsh_reader_reader_snapshotEntry_parameter_0$schema$value
599
+ const _khorsheed_dsh_reader_reader_snapshotEntry_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_snapshotEntry_parameter_0$schema$value ??= z.object({
600
+ 'entryId': z.string().readonly(),
601
+ 'title': z.string().readonly(),
602
+ 'url': z.string().readonly().optional(),
603
+ 'source': z.string().readonly().optional(),
604
+ 'paragraphs': z.array(z.string()),
605
+ }))
606
+ let _khorsheed_dsh_reader_reader_snapshotEntry_result$schema$value
607
+ const _khorsheed_dsh_reader_reader_snapshotEntry_result$schema = () => (_khorsheed_dsh_reader_reader_snapshotEntry_result$schema$value ??= z.union([z.literal("ok"), z.literal("empty")]))
608
+ let _khorsheed_dsh_reader_reader_speakerNames_parameter_0$schema$value
609
+ const _khorsheed_dsh_reader_reader_speakerNames_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_speakerNames_parameter_0$schema$value ??= z.object({
610
+ 'entryId': z.string(),
611
+ }))
612
+ let _khorsheed_dsh_reader_reader_speakerNames_result$schema$value
613
+ const _khorsheed_dsh_reader_reader_speakerNames_result$schema = () => (_khorsheed_dsh_reader_reader_speakerNames_result$schema$value ??= z.record(z.string(), z.string()))
614
+ let _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0$schema$value
615
+ const _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0$schema$value ??= z.object({
616
+ 'entryId': z.string(),
617
+ 'url': z.string(),
618
+ 'media': z.object({
619
+ 'kind': z.union([z.literal("video"), z.literal("audio")]).readonly(),
620
+ 'provider': z.union([z.literal("youtube"), z.literal("bilibili"), z.literal("xiaoyuzhou"), z.literal("enclosure")]).readonly(),
621
+ 'ref': z.string().readonly().describe('The platform\'s id (YouTube video id, Bilibili BV id) or the audio URL.'),
622
+ 'durationSec': z.number().readonly().optional(),
623
+ 'thumbnail': z.string().readonly().optional(),
624
+ }),
625
+ 'title': z.string().optional(),
626
+ 'confirmModels': z.boolean().optional(),
627
+ }))
628
+ let _khorsheed_dsh_reader_reader_startLocalTranscript_result$schema$value
629
+ const _khorsheed_dsh_reader_reader_startLocalTranscript_result$schema = () => (_khorsheed_dsh_reader_reader_startLocalTranscript_result$schema$value ??= z.object({
630
+ 'entryId': z.string().readonly(),
631
+ 'state': z.union([z.literal("failed"), z.literal("unavailable"), z.literal("done"), z.literal("idle"), z.literal("queued"), z.literal("fetching"), z.literal("needs-models"), z.literal("transcribing"), z.literal("speakers")]).readonly(),
632
+ 'progress': z.number().readonly().optional().describe('0–1 across fetching the audio and transcribing it.'),
633
+ 'ahead': z.number().readonly().optional().describe('Jobs ahead in the engine\'s queue.'),
634
+ 'bytes': z.number().readonly().optional().describe('Bytes of speech models still to download (`needs-models`).'),
635
+ 'html': z.string().readonly().optional().describe('The transcript so far (or in full, once `done`).'),
636
+ 'language': z.string().readonly().optional().describe('The language the transcript is in, once known.'),
637
+ 'speakers': z.number().readonly().optional().describe('How many voices the transcript has, once the speakers pass settled it.'),
638
+ 'error': z.string().readonly().optional(),
639
+ }))
328
640
  let _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema$value
329
641
  const _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema$value ??= z.object({
330
642
  'entryId': z.string(),
@@ -333,21 +645,21 @@ const _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema = () => (_k
333
645
  'truncated': z.boolean().optional(),
334
646
  'scriptFigures': z.number().optional(),
335
647
  'bodyHash': z.string().optional(),
336
- 'title': z.string().optional(),
337
- 'excerpt': z.string().optional(),
648
+ 'title': z.string().optional().describe('The article\'s own title, as extracted — the saved link\'s card upgrade.'),
649
+ 'excerpt': z.string().optional().describe('A short excerpt (abstract / first paragraph), with the title.'),
338
650
  }))
339
651
  let _khorsheed_dsh_reader_reader_storeEntryBody_result$schema$value
340
652
  const _khorsheed_dsh_reader_reader_storeEntryBody_result$schema = () => (_khorsheed_dsh_reader_reader_storeEntryBody_result$schema$value ??= z.object({
341
653
  'entryId': z.string().readonly(),
342
- 'cached': z.boolean().readonly(),
343
- 'fresh': z.boolean().readonly(),
344
- 'fromFeed': z.boolean().readonly(),
654
+ 'cached': z.boolean().readonly().describe('True when this body is a cached fetch rather than the feed\'s own payload.'),
655
+ 'fresh': z.boolean().readonly().describe('False when the cache\'s deadline has passed: the view offers the fetch.'),
656
+ 'fromFeed': z.boolean().readonly().describe('True when the feed\'s payload already carries full text for this entry.'),
345
657
  'html': z.string().readonly().optional(),
346
658
  'fetchedAt': z.string().readonly().optional(),
347
659
  'truncated': z.boolean().readonly().optional(),
348
- 'scriptFigures': z.number().readonly().optional(),
349
- 'rendered': z.boolean().readonly().optional(),
350
- 'error': z.string().readonly().optional(),
660
+ 'scriptFigures': z.number().readonly().optional().describe('Figures this page draws with scripts — the detail view says so.'),
661
+ 'rendered': z.boolean().readonly().optional().describe('True when this body came from a rendered fetch (the「重新抓取」route reads it).'),
662
+ 'error': z.string().readonly().optional().describe('Why a fetch could not produce a body, when one was attempted.'),
351
663
  }))
352
664
  let _khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema$value
353
665
  const _khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema$value ??= z.object({
@@ -356,7 +668,15 @@ const _khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema = () => (_khorshe
356
668
  'on': z.boolean(),
357
669
  }))
358
670
  let _khorsheed_dsh_reader_reader_tagEntry_result$schema$value
359
- const _khorsheed_dsh_reader_reader_tagEntry_result$schema = () => (_khorsheed_dsh_reader_reader_tagEntry_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok"), z.literal("empty"), z.literal("not-found"), z.literal("duplicate"), z.literal("invalid")]))
671
+ const _khorsheed_dsh_reader_reader_tagEntry_result$schema = () => (_khorsheed_dsh_reader_reader_tagEntry_result$schema$value ??= z.union([z.literal("not-found"), z.literal("unavailable"), z.literal("duplicate"), z.literal("ok"), z.literal("empty"), z.literal("invalid")]))
672
+ let _khorsheed_dsh_reader_reader_updateNote_parameter_0$schema$value
673
+ const _khorsheed_dsh_reader_reader_updateNote_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_updateNote_parameter_0$schema$value ??= z.object({
674
+ 'entryId': z.string(),
675
+ 'noteId': z.string(),
676
+ 'comment': z.string(),
677
+ }))
678
+ let _khorsheed_dsh_reader_reader_updateNote_result$schema$value
679
+ const _khorsheed_dsh_reader_reader_updateNote_result$schema = () => (_khorsheed_dsh_reader_reader_updateNote_result$schema$value ??= z.union([z.literal("not-found"), z.literal("ok"), z.literal("empty"), z.literal("full")]))
360
680
  let _khorsheed_dsh_reader_reader_updateSource_parameter_0$schema$value
361
681
  const _khorsheed_dsh_reader_reader_updateSource_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_updateSource_parameter_0$schema$value ??= z.object({
362
682
  'id': z.string(),
@@ -366,62 +686,422 @@ const _khorsheed_dsh_reader_reader_updateSource_parameter_0$schema = () => (_kho
366
686
  'timeOfDay': z.string().optional(),
367
687
  }))
368
688
  let _khorsheed_dsh_reader_reader_updateSource_result$schema$value
369
- const _khorsheed_dsh_reader_reader_updateSource_result$schema = () => (_khorsheed_dsh_reader_reader_updateSource_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok"), z.literal("not-found"), z.literal("invalid-url"), z.literal("invalid-time"), z.literal("duplicate")]))
689
+ const _khorsheed_dsh_reader_reader_updateSource_result$schema = () => (_khorsheed_dsh_reader_reader_updateSource_result$schema$value ??= z.union([z.literal("not-found"), z.literal("unavailable"), z.literal("duplicate"), z.literal("ok"), z.literal("invalid-url"), z.literal("invalid-time")]))
690
+ let _khorsheed_dsh_reader_reader_addNote_parameter_0_strict$schema$value
691
+ const _khorsheed_dsh_reader_reader_addNote_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_addNote_parameter_0_strict$schema$value ??= z.strictObject({
692
+ 'block': z.number().readonly(),
693
+ 'start': z.number().readonly().optional(),
694
+ 'quote': z.string().readonly(),
695
+ 'translated': z.string().readonly().optional(),
696
+ 'comment': z.string().readonly().optional(),
697
+ 'time': z.number().readonly().optional(),
698
+ 'entryId': z.string().readonly(),
699
+ 'title': z.string().readonly(),
700
+ 'url': z.string().readonly().optional(),
701
+ 'source': z.string().readonly().optional(),
702
+ }))
703
+ let _khorsheed_dsh_reader_reader_addReply_parameter_0_strict$schema$value
704
+ const _khorsheed_dsh_reader_reader_addReply_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_addReply_parameter_0_strict$schema$value ??= z.strictObject({
705
+ 'entryId': z.string(),
706
+ 'noteId': z.string(),
707
+ 'text': z.string(),
708
+ }))
709
+ let _khorsheed_dsh_reader_reader_addSource_parameter_0_strict$schema$value
710
+ const _khorsheed_dsh_reader_reader_addSource_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_addSource_parameter_0_strict$schema$value ??= z.strictObject({
711
+ 'url': z.string(),
712
+ 'label': z.string().optional(),
713
+ }))
714
+ let _khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0_strict$schema$value
715
+ const _khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0_strict$schema$value ??= z.strictObject({
716
+ 'entryId': z.string(),
717
+ 'force': z.boolean(),
718
+ }))
719
+ let _khorsheed_dsh_reader_reader_createTag_parameter_0_strict$schema$value
720
+ const _khorsheed_dsh_reader_reader_createTag_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_createTag_parameter_0_strict$schema$value ??= z.strictObject({
721
+ 'name': z.string(),
722
+ }))
723
+ let _khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0_strict$schema$value
724
+ const _khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0_strict$schema$value ??= z.strictObject({
725
+ 'entryId': z.string(),
726
+ 'discussionId': z.string(),
727
+ }))
728
+ let _khorsheed_dsh_reader_reader_deleteNote_parameter_0_strict$schema$value
729
+ const _khorsheed_dsh_reader_reader_deleteNote_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_deleteNote_parameter_0_strict$schema$value ??= z.strictObject({
730
+ 'entryId': z.string(),
731
+ 'noteId': z.string(),
732
+ }))
733
+ let _khorsheed_dsh_reader_reader_deleteTag_parameter_0_strict$schema$value
734
+ const _khorsheed_dsh_reader_reader_deleteTag_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_deleteTag_parameter_0_strict$schema$value ??= z.strictObject({
735
+ 'id': z.string(),
736
+ }))
737
+ let _khorsheed_dsh_reader_reader_editReply_parameter_0_strict$schema$value
738
+ const _khorsheed_dsh_reader_reader_editReply_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_editReply_parameter_0_strict$schema$value ??= z.strictObject({
739
+ 'entryId': z.string(),
740
+ 'noteId': z.string(),
741
+ 'index': z.number(),
742
+ 'text': z.string(),
743
+ }))
744
+ let _khorsheed_dsh_reader_reader_entryFetchStates_parameter_0_strict$schema$value
745
+ const _khorsheed_dsh_reader_reader_entryFetchStates_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_entryFetchStates_parameter_0_strict$schema$value ??= z.strictObject({
746
+ 'entryIds': z.array(z.string()),
747
+ }))
748
+ let _khorsheed_dsh_reader_reader_entryNotes_parameter_0_strict$schema$value
749
+ const _khorsheed_dsh_reader_reader_entryNotes_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_entryNotes_parameter_0_strict$schema$value ??= z.strictObject({
750
+ 'entryId': z.string(),
751
+ }))
752
+ let _khorsheed_dsh_reader_reader_entryTags_parameter_0_strict$schema$value
753
+ const _khorsheed_dsh_reader_reader_entryTags_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_entryTags_parameter_0_strict$schema$value ??= z.strictObject({
754
+ 'entryId': z.string(),
755
+ }))
756
+ let _khorsheed_dsh_reader_reader_fetchEntryBody_parameter_0_strict$schema$value
757
+ const _khorsheed_dsh_reader_reader_fetchEntryBody_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_fetchEntryBody_parameter_0_strict$schema$value ??= z.strictObject({
758
+ 'entryId': z.string(),
759
+ 'url': z.string(),
760
+ }))
761
+ let _khorsheed_dsh_reader_reader_fetchImage_parameter_0_strict$schema$value
762
+ const _khorsheed_dsh_reader_reader_fetchImage_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_fetchImage_parameter_0_strict$schema$value ??= z.strictObject({
763
+ 'url': z.string(),
764
+ }))
765
+ let _khorsheed_dsh_reader_reader_getBodies_parameter_0_strict$schema$value
766
+ const _khorsheed_dsh_reader_reader_getBodies_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_getBodies_parameter_0_strict$schema$value ??= z.strictObject({
767
+ 'ids': z.array(z.string()),
768
+ }))
769
+ let _khorsheed_dsh_reader_reader_getEntryBody_parameter_0_strict$schema$value
770
+ const _khorsheed_dsh_reader_reader_getEntryBody_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_getEntryBody_parameter_0_strict$schema$value ??= z.strictObject({
771
+ 'entryId': z.string(),
772
+ 'url': z.string(),
773
+ 'feedHtml': z.string().optional(),
774
+ }))
775
+ let _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0_strict$schema$value
776
+ const _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0_strict$schema$value ??= z.strictObject({
777
+ 'entryId': z.string(),
778
+ }))
779
+ let _khorsheed_dsh_reader_reader_getRawBody_parameter_0_strict$schema$value
780
+ const _khorsheed_dsh_reader_reader_getRawBody_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_getRawBody_parameter_0_strict$schema$value ??= z.strictObject({
781
+ 'entryId': z.string(),
782
+ }))
783
+ let _khorsheed_dsh_reader_reader_getSentenceTranslations_parameter_0_strict$schema$value
784
+ const _khorsheed_dsh_reader_reader_getSentenceTranslations_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_getSentenceTranslations_parameter_0_strict$schema$value ??= z.strictObject({
785
+ 'pair': z.string(),
786
+ 'hashes': z.array(z.string()),
787
+ }))
788
+ let _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0_strict$schema$value
789
+ const _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0_strict$schema$value ??= z.strictObject({
790
+ 'entries': z.array(z.strictObject({
791
+ 'entryId': z.string(),
792
+ 'url': z.string(),
793
+ 'label': z.string(),
794
+ 'hasBody': z.boolean(),
795
+ })),
796
+ 'limit': z.number().optional(),
797
+ }))
798
+ let _khorsheed_dsh_reader_reader_localTranscript_parameter_0_strict$schema$value
799
+ const _khorsheed_dsh_reader_reader_localTranscript_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_localTranscript_parameter_0_strict$schema$value ??= z.strictObject({
800
+ 'entryId': z.string(),
801
+ }))
802
+ let _khorsheed_dsh_reader_reader_markSynced_parameter_0_strict$schema$value
803
+ const _khorsheed_dsh_reader_reader_markSynced_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_markSynced_parameter_0_strict$schema$value ??= z.strictObject({
804
+ 'entryId': z.string(),
805
+ 'noteId': z.string().optional(),
806
+ 'discussionId': z.string().optional(),
807
+ 'canvasId': z.string(),
808
+ 'cardId': z.string(),
809
+ 'canvasTitle': z.string(),
810
+ }))
811
+ let _khorsheed_dsh_reader_reader_mediaStates_parameter_0_strict$schema$value
812
+ const _khorsheed_dsh_reader_reader_mediaStates_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_mediaStates_parameter_0_strict$schema$value ??= z.strictObject({
813
+ 'entryIds': z.array(z.string()),
814
+ }))
815
+ let _khorsheed_dsh_reader_reader_mediaTranscript_parameter_0_strict$schema$value
816
+ const _khorsheed_dsh_reader_reader_mediaTranscript_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_mediaTranscript_parameter_0_strict$schema$value ??= z.strictObject({
817
+ 'entryId': z.string(),
818
+ 'url': z.string(),
819
+ }))
820
+ let _khorsheed_dsh_reader_reader_nameSpeaker_parameter_0_strict$schema$value
821
+ const _khorsheed_dsh_reader_reader_nameSpeaker_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_nameSpeaker_parameter_0_strict$schema$value ??= z.strictObject({
822
+ 'entryId': z.string(),
823
+ 'speaker': z.number(),
824
+ 'name': z.string(),
825
+ }))
826
+ let _khorsheed_dsh_reader_reader_polish_parameter_0_strict$schema$value
827
+ const _khorsheed_dsh_reader_reader_polish_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_polish_parameter_0_strict$schema$value ??= z.strictObject({
828
+ 'entryId': z.string(),
829
+ }))
830
+ let _khorsheed_dsh_reader_reader_quoteToSideChat_parameter_0_strict$schema$value
831
+ const _khorsheed_dsh_reader_reader_quoteToSideChat_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_quoteToSideChat_parameter_0_strict$schema$value ??= z.strictObject({
832
+ 'contextKey': z.string(),
833
+ 'label': z.string(),
834
+ 'text': z.string(),
835
+ }))
836
+ let _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0_strict$schema$value
837
+ const _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_recordDiscussion_parameter_0_strict$schema$value ??= z.strictObject({
838
+ 'entryId': z.string().readonly(),
839
+ 'title': z.string().readonly(),
840
+ 'url': z.string().readonly().optional(),
841
+ 'source': z.string().readonly().optional(),
842
+ 'sessionId': z.string(),
843
+ 'sessionTitle': z.string().optional(),
844
+ }))
845
+ let _khorsheed_dsh_reader_reader_recordRead_parameter_0_strict$schema$value
846
+ const _khorsheed_dsh_reader_reader_recordRead_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_recordRead_parameter_0_strict$schema$value ??= z.strictObject({
847
+ 'entryId': z.string(),
848
+ 'sourceId': z.string(),
849
+ 'title': z.string(),
850
+ 'url': z.string().optional(),
851
+ }))
852
+ let _khorsheed_dsh_reader_reader_refresh_parameter_0_strict$schema$value
853
+ const _khorsheed_dsh_reader_reader_refresh_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_refresh_parameter_0_strict$schema$value ??= z.strictObject({
854
+ 'ids': z.array(z.string()).optional(),
855
+ }))
856
+ let _khorsheed_dsh_reader_reader_rememberSentences_parameter_0_strict$schema$value
857
+ const _khorsheed_dsh_reader_reader_rememberSentences_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_rememberSentences_parameter_0_strict$schema$value ??= z.strictObject({
858
+ 'pair': z.string(),
859
+ 'entries': z.array(z.strictObject({
860
+ 'hash': z.string().readonly().describe('The client\'s `translationHash(source)`, stored opaquely.'),
861
+ 'source': z.string().readonly(),
862
+ 'target': z.string().readonly(),
863
+ })),
864
+ 'recalled': z.array(z.strictObject({
865
+ 'hash': z.string().readonly().describe('The client\'s `translationHash(source)`, stored opaquely.'),
866
+ 'source': z.string().readonly(),
867
+ 'target': z.string().readonly(),
868
+ })).optional(),
869
+ 'entryId': z.string().optional(),
870
+ 'bodyHash': z.string().optional(),
871
+ }))
872
+ let _khorsheed_dsh_reader_reader_removeSource_parameter_0_strict$schema$value
873
+ const _khorsheed_dsh_reader_reader_removeSource_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_removeSource_parameter_0_strict$schema$value ??= z.strictObject({
874
+ 'id': z.string(),
875
+ 'entryIds': z.array(z.string()).optional(),
876
+ }))
877
+ let _khorsheed_dsh_reader_reader_renameTag_parameter_0_strict$schema$value
878
+ const _khorsheed_dsh_reader_reader_renameTag_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_renameTag_parameter_0_strict$schema$value ??= z.strictObject({
879
+ 'id': z.string(),
880
+ 'name': z.string(),
881
+ }))
882
+ let _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0_strict$schema$value
883
+ const _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_setCachePolicy_parameter_0_strict$schema$value ??= z.strictObject({
884
+ 'ttlHours': z.number(),
885
+ 'maxEntries': z.number().optional(),
886
+ 'translationBudgetChars': z.number().optional(),
887
+ }))
888
+ let _khorsheed_dsh_reader_reader_setPolishOff_parameter_0_strict$schema$value
889
+ const _khorsheed_dsh_reader_reader_setPolishOff_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_setPolishOff_parameter_0_strict$schema$value ??= z.strictObject({
890
+ 'entryId': z.string(),
891
+ 'paragraph': z.number(),
892
+ 'off': z.boolean(),
893
+ }))
894
+ let _khorsheed_dsh_reader_reader_snapshotEntry_parameter_0_strict$schema$value
895
+ const _khorsheed_dsh_reader_reader_snapshotEntry_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_snapshotEntry_parameter_0_strict$schema$value ??= z.strictObject({
896
+ 'entryId': z.string().readonly(),
897
+ 'title': z.string().readonly(),
898
+ 'url': z.string().readonly().optional(),
899
+ 'source': z.string().readonly().optional(),
900
+ 'paragraphs': z.array(z.string()),
901
+ }))
902
+ let _khorsheed_dsh_reader_reader_speakerNames_parameter_0_strict$schema$value
903
+ const _khorsheed_dsh_reader_reader_speakerNames_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_speakerNames_parameter_0_strict$schema$value ??= z.strictObject({
904
+ 'entryId': z.string(),
905
+ }))
906
+ let _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0_strict$schema$value
907
+ const _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0_strict$schema$value ??= z.strictObject({
908
+ 'entryId': z.string(),
909
+ 'url': z.string(),
910
+ 'media': z.strictObject({
911
+ 'kind': z.union([z.literal("video"), z.literal("audio")]).readonly(),
912
+ 'provider': z.union([z.literal("youtube"), z.literal("bilibili"), z.literal("xiaoyuzhou"), z.literal("enclosure")]).readonly(),
913
+ 'ref': z.string().readonly().describe('The platform\'s id (YouTube video id, Bilibili BV id) or the audio URL.'),
914
+ 'durationSec': z.number().readonly().optional(),
915
+ 'thumbnail': z.string().readonly().optional(),
916
+ }),
917
+ 'title': z.string().optional(),
918
+ 'confirmModels': z.boolean().optional(),
919
+ }))
920
+ let _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0_strict$schema$value
921
+ const _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_storeEntryBody_parameter_0_strict$schema$value ??= z.strictObject({
922
+ 'entryId': z.string(),
923
+ 'url': z.string(),
924
+ 'html': z.string(),
925
+ 'truncated': z.boolean().optional(),
926
+ 'scriptFigures': z.number().optional(),
927
+ 'bodyHash': z.string().optional(),
928
+ 'title': z.string().optional().describe('The article\'s own title, as extracted — the saved link\'s card upgrade.'),
929
+ 'excerpt': z.string().optional().describe('A short excerpt (abstract / first paragraph), with the title.'),
930
+ }))
931
+ let _khorsheed_dsh_reader_reader_tagEntry_parameter_0_strict$schema$value
932
+ const _khorsheed_dsh_reader_reader_tagEntry_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_tagEntry_parameter_0_strict$schema$value ??= z.strictObject({
933
+ 'entryId': z.string(),
934
+ 'tagId': z.string(),
935
+ 'on': z.boolean(),
936
+ }))
937
+ let _khorsheed_dsh_reader_reader_updateNote_parameter_0_strict$schema$value
938
+ const _khorsheed_dsh_reader_reader_updateNote_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_updateNote_parameter_0_strict$schema$value ??= z.strictObject({
939
+ 'entryId': z.string(),
940
+ 'noteId': z.string(),
941
+ 'comment': z.string(),
942
+ }))
943
+ let _khorsheed_dsh_reader_reader_updateSource_parameter_0_strict$schema$value
944
+ const _khorsheed_dsh_reader_reader_updateSource_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_updateSource_parameter_0_strict$schema$value ??= z.strictObject({
945
+ 'id': z.string(),
946
+ 'enabled': z.boolean().optional(),
947
+ 'label': z.string().optional(),
948
+ 'url': z.string().optional(),
949
+ 'timeOfDay': z.string().optional(),
950
+ }))
370
951
 
371
- export const TYPERT = {
952
+ const $remote = createTypertRemoteInfo({
372
953
  package: '@khorsheed/dsh-reader',
373
- face: 'host',
374
- schemas: [
375
- ],
376
- invocations: [
377
- {
378
- id: '@khorsheed/dsh-reader#reader/addSource',
954
+ methods: {
955
+ 'reader/addNote': {
379
956
  service: 'readerRemote',
380
- namespace: 'reader',
381
- method: 'addSource',
957
+ description: 'Keep one excerpt (and its comment).',
382
958
  invocation: { kind: 'direct' },
383
959
  parameters: [
384
960
  {
385
961
  name: 'request',
386
- wire: 'request',
387
962
  source: 'json',
388
963
  codec: {
389
964
  mode: 'strict',
390
- typeSymbol: '@khorsheed/dsh-reader#reader/addSource:request',
391
- create: _khorsheed_dsh_reader_reader_addSource_parameter_0$schema,
392
- schema: _khorsheed_dsh_reader_reader_addSource_parameter_0$schema(),
965
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderNoteInput',
966
+ create: _khorsheed_dsh_reader_reader_addNote_parameter_0$schema,
967
+ schema: _khorsheed_dsh_reader_reader_addNote_parameter_0$schema(),
968
+ jsonSchema: {"type":"object","properties":{"block":{"type":"number"},"start":{"type":"number"},"quote":{"type":"string"},"translated":{"type":"string"},"comment":{"type":"string"},"time":{"type":"number"},"entryId":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"source":{"type":"string"}},"required":["block","quote","entryId","title"],"additionalProperties":true},
969
+ },
970
+ strictCodec: {
971
+ mode: 'strict',
972
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderNoteInput',
973
+ create: _khorsheed_dsh_reader_reader_addNote_parameter_0_strict$schema,
974
+ schema: _khorsheed_dsh_reader_reader_addNote_parameter_0_strict$schema(),
975
+ jsonSchema: {"type":"object","properties":{"block":{"type":"number"},"start":{"type":"number"},"quote":{"type":"string"},"translated":{"type":"string"},"comment":{"type":"string"},"time":{"type":"number"},"entryId":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"source":{"type":"string"}},"required":["block","quote","entryId","title"],"additionalProperties":false},
393
976
  },
394
977
  },
395
978
  ],
396
979
  result: {
397
980
  mode: 'strict',
398
- typeSymbol: '@khorsheed/dsh-reader#reader/addSource:result',
399
- create: _khorsheed_dsh_reader_reader_addSource_result$schema,
400
- schema: _khorsheed_dsh_reader_reader_addSource_result$schema(),
981
+ typeSymbol: '@khorsheed/dsh-reader#reader/addNote:result',
982
+ create: _khorsheed_dsh_reader_reader_addNote_result$schema,
983
+ schema: _khorsheed_dsh_reader_reader_addNote_result$schema(),
984
+ jsonSchema: {"oneOf":[{"type":"string","enum":["empty","full"]},{"type":"object","properties":{"id":{"type":"string","description":"`n1`, `n2`… per article, never reused — the model cites notes by it."},"anchor":{"type":"object","properties":{"block":{"type":"number"},"start":{"type":"number"},"quote":{"type":"string"},"translated":{"type":"string","description":"The translated text, when the selection was made in the translated view."},"time":{"type":"number","description":"A video / audio transcript paragraph's start (seconds): where ▶ plays from."}},"required":["block","quote"],"additionalProperties":true},"comment":{"type":"string"},"replies":{"type":"array","items":{"type":"object","properties":{"by":{"type":"string","enum":["user","agent"]},"text":{"type":"string"},"sessionId":{"type":"string","description":"The conversation it came from, so the reader can go back to it."},"editedFrom":{"type":"string","const":"agent","description":"Set when the reader rewrote a line the model wrote."},"at":{"type":"string"}},"required":["by","text","at"],"additionalProperties":true},"description":"Conclusions and additions, oldest first."},"syncedTo":{"type":"array","items":{"type":"object","properties":{"canvasId":{"type":"string"},"cardId":{"type":"string"},"canvasTitle":{"type":"string","description":"The canvas's title when it was synced (for the 「已在…」 mark)."},"at":{"type":"string"}},"required":["canvasId","cardId","canvasTitle","at"],"additionalProperties":true},"description":"Canvas cards made from it (a later edit does not reach them)."},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","anchor","createdAt","updatedAt"],"additionalProperties":true}]},
401
985
  },
402
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":71,"column":3},
986
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":322,"column":3},
403
987
  },
404
- {
405
- id: '@khorsheed/dsh-reader#reader/capabilities',
988
+ 'reader/addReply': {
406
989
  service: 'readerRemote',
407
- namespace: 'reader',
408
- method: 'capabilities',
990
+ description: 'Add the reader\'s own line under a note.',
409
991
  invocation: { kind: 'direct' },
410
992
  parameters: [
411
- ],
412
- result: {
413
- mode: 'strict',
414
- typeSymbol: '@khorsheed/dsh-reader/types#ReaderCapabilities',
415
- create: _khorsheed_dsh_reader_reader_capabilities_result$schema,
416
- schema: _khorsheed_dsh_reader_reader_capabilities_result$schema(),
417
- },
418
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":59,"column":3},
419
- },
420
- {
421
- id: '@khorsheed/dsh-reader#reader/clearRecent',
993
+ {
994
+ name: 'request',
995
+ source: 'json',
996
+ codec: {
997
+ mode: 'strict',
998
+ typeSymbol: '@khorsheed/dsh-reader#reader/addReply:request',
999
+ create: _khorsheed_dsh_reader_reader_addReply_parameter_0$schema,
1000
+ schema: _khorsheed_dsh_reader_reader_addReply_parameter_0$schema(),
1001
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"noteId":{"type":"string"},"text":{"type":"string"}},"required":["entryId","noteId","text"],"additionalProperties":true},
1002
+ },
1003
+ strictCodec: {
1004
+ mode: 'strict',
1005
+ typeSymbol: '@khorsheed/dsh-reader#reader/addReply:request',
1006
+ create: _khorsheed_dsh_reader_reader_addReply_parameter_0_strict$schema,
1007
+ schema: _khorsheed_dsh_reader_reader_addReply_parameter_0_strict$schema(),
1008
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"noteId":{"type":"string"},"text":{"type":"string"}},"required":["entryId","noteId","text"],"additionalProperties":false},
1009
+ },
1010
+ },
1011
+ ],
1012
+ result: {
1013
+ mode: 'strict',
1014
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderNoteOutcome',
1015
+ create: _khorsheed_dsh_reader_reader_addReply_result$schema,
1016
+ schema: _khorsheed_dsh_reader_reader_addReply_result$schema(),
1017
+ jsonSchema: {"type":"string","enum":["not-found","ok","empty","full"]},
1018
+ },
1019
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":346,"column":3},
1020
+ },
1021
+ 'reader/addSource': {
1022
+ service: 'readerRemote',
1023
+ description: 'Add a source; the host decides whether the URL is a feed or an article.',
1024
+ invocation: { kind: 'direct' },
1025
+ parameters: [
1026
+ {
1027
+ name: 'request',
1028
+ source: 'json',
1029
+ codec: {
1030
+ mode: 'strict',
1031
+ typeSymbol: '@khorsheed/dsh-reader#reader/addSource:request',
1032
+ create: _khorsheed_dsh_reader_reader_addSource_parameter_0$schema,
1033
+ schema: _khorsheed_dsh_reader_reader_addSource_parameter_0$schema(),
1034
+ jsonSchema: {"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}},"required":["url"],"additionalProperties":true},
1035
+ },
1036
+ strictCodec: {
1037
+ mode: 'strict',
1038
+ typeSymbol: '@khorsheed/dsh-reader#reader/addSource:request',
1039
+ create: _khorsheed_dsh_reader_reader_addSource_parameter_0_strict$schema,
1040
+ schema: _khorsheed_dsh_reader_reader_addSource_parameter_0_strict$schema(),
1041
+ jsonSchema: {"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}},"required":["url"],"additionalProperties":false},
1042
+ },
1043
+ },
1044
+ ],
1045
+ result: {
1046
+ mode: 'strict',
1047
+ typeSymbol: '@khorsheed/dsh-reader#reader/addSource:result',
1048
+ create: _khorsheed_dsh_reader_reader_addSource_result$schema,
1049
+ schema: _khorsheed_dsh_reader_reader_addSource_result$schema(),
1050
+ jsonSchema: {"oneOf":[{"type":"string","enum":["unavailable","duplicate","invalid-url","unsupported-content","fetch-failed"]},{"type":"object","properties":{"outcome":{"type":"string","enum":["subscribed","saved-link"]},"kind":{"type":"string","enum":["rss","link"]},"id":{"type":"string"},"label":{"type":"string"},"failure":{"type":"object","properties":{"code":{"type":"string","enum":["blocked","http","unreadable","empty","login","unsupported-type","redirected","unreachable"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":true,"description":"Present when the source was saved but its body cannot be previewed. The add still succeeded: the URL is a link the reader now owns. This is the verdict's reason, not a failure — which is why it rides the outcome instead of becoming one more refusal that loses the link."}},"required":["outcome","kind","id","label"],"additionalProperties":true},{"type":"object","properties":{"outcome":{"type":"string","const":"fetch-failed"},"reason":{"type":"string","description":"The fetch seam's message, verbatim — a refused connection, a timeout, a byte cap."}},"required":["outcome","reason"],"additionalProperties":true}]},
1051
+ },
1052
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":79,"column":3},
1053
+ },
1054
+ 'reader/cancelLocalTranscript': {
422
1055
  service: 'readerRemote',
423
- namespace: 'reader',
424
- method: 'clearRecent',
1056
+ description: 'Leave (withdraws a queued job) or, with `force`, stop an entry\'s local transcription.',
1057
+ invocation: { kind: 'direct' },
1058
+ parameters: [
1059
+ {
1060
+ name: 'request',
1061
+ source: 'json',
1062
+ codec: {
1063
+ mode: 'strict',
1064
+ typeSymbol: '@khorsheed/dsh-reader#reader/cancelLocalTranscript:request',
1065
+ create: _khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0$schema,
1066
+ schema: _khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0$schema(),
1067
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"force":{"type":"boolean"}},"required":["entryId","force"],"additionalProperties":true},
1068
+ },
1069
+ strictCodec: {
1070
+ mode: 'strict',
1071
+ typeSymbol: '@khorsheed/dsh-reader#reader/cancelLocalTranscript:request',
1072
+ create: _khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0_strict$schema,
1073
+ schema: _khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0_strict$schema(),
1074
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"force":{"type":"boolean"}},"required":["entryId","force"],"additionalProperties":false},
1075
+ },
1076
+ },
1077
+ ],
1078
+ result: {
1079
+ mode: 'strict',
1080
+ typeSymbol: '@khorsheed/dsh-reader/types#LocalTranscriptStatus',
1081
+ create: _khorsheed_dsh_reader_reader_cancelLocalTranscript_result$schema,
1082
+ schema: _khorsheed_dsh_reader_reader_cancelLocalTranscript_result$schema(),
1083
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"state":{"type":"string","enum":["failed","unavailable","done","idle","queued","fetching","needs-models","transcribing","speakers"]},"progress":{"type":"number","description":"0–1 across fetching the audio and transcribing it."},"ahead":{"type":"number","description":"Jobs ahead in the engine's queue."},"bytes":{"type":"number","description":"Bytes of speech models still to download (`needs-models`)."},"html":{"type":"string","description":"The transcript so far (or in full, once `done`)."},"language":{"type":"string","description":"The language the transcript is in, once known."},"speakers":{"type":"number","description":"How many voices the transcript has, once the speakers pass settled it."},"error":{"type":"string"}},"required":["entryId","state"],"additionalProperties":true},
1084
+ },
1085
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":410,"column":3},
1086
+ },
1087
+ 'reader/capabilities': {
1088
+ service: 'readerRemote',
1089
+ description: 'Capability handshake: what the browser may rely on in this composition.',
1090
+ invocation: { kind: 'direct' },
1091
+ parameters: [
1092
+ ],
1093
+ result: {
1094
+ mode: 'strict',
1095
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderCapabilities',
1096
+ create: _khorsheed_dsh_reader_reader_capabilities_result$schema,
1097
+ schema: _khorsheed_dsh_reader_reader_capabilities_result$schema(),
1098
+ jsonSchema: {"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"hasFs":{"type":"boolean","description":"False when no filesystem is mounted: state lives in memory and is lost on restart."},"hasSideChat":{"type":"boolean","description":"False when no side-chat service is mounted: the side-chat gesture must hide."},"nextRefreshAt":{"type":"string","description":"ISO-8601 timestamp of the next scheduled refresh, when one is armed."},"lastRefreshAt":{"type":"string","description":"ISO-8601 timestamp of the last completed refresh run, when there was one. The list shows it so a reader can decide whether the snapshot is stale enough to be worth a fetch."}},"required":["protocolVersion","hasFs","hasSideChat"],"additionalProperties":true},
1099
+ },
1100
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":67,"column":3},
1101
+ },
1102
+ 'reader/clearRecent': {
1103
+ service: 'readerRemote',
1104
+ description: 'Forget every recent entry.',
425
1105
  invocation: { kind: 'direct' },
426
1106
  parameters: [
427
1107
  ],
@@ -430,14 +1110,13 @@ export const TYPERT = {
430
1110
  typeSymbol: '@khorsheed/dsh-reader#reader/clearRecent:result',
431
1111
  create: _khorsheed_dsh_reader_reader_clearRecent_result$schema,
432
1112
  schema: _khorsheed_dsh_reader_reader_clearRecent_result$schema(),
1113
+ jsonSchema: {"type":"object","properties":{"removed":{"type":"number"}},"required":["removed"],"additionalProperties":true},
433
1114
  },
434
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":274,"column":3},
1115
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":292,"column":3},
435
1116
  },
436
- {
437
- id: '@khorsheed/dsh-reader#reader/clearTranslations',
1117
+ 'reader/clearTranslations': {
438
1118
  service: 'readerRemote',
439
- namespace: 'reader',
440
- method: 'clearTranslations',
1119
+ description: 'Forget every translation: the global memory and every entry map.',
441
1120
  invocation: { kind: 'direct' },
442
1121
  parameters: [
443
1122
  ],
@@ -446,25 +1125,31 @@ export const TYPERT = {
446
1125
  typeSymbol: '@khorsheed/dsh-reader#reader/clearTranslations:result',
447
1126
  create: _khorsheed_dsh_reader_reader_clearTranslations_result$schema,
448
1127
  schema: _khorsheed_dsh_reader_reader_clearTranslations_result$schema(),
1128
+ jsonSchema: {"type":"object","properties":{"clearedEntries":{"type":"number"},"clearedMemory":{"type":"boolean"}},"required":["clearedEntries","clearedMemory"],"additionalProperties":true},
449
1129
  },
450
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":198,"column":3},
1130
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":216,"column":3},
451
1131
  },
452
- {
453
- id: '@khorsheed/dsh-reader#reader/createTag',
1132
+ 'reader/createTag': {
454
1133
  service: 'readerRemote',
455
- namespace: 'reader',
456
- method: 'createTag',
1134
+ description: 'Create a tag, or return the existing one with the same name.',
457
1135
  invocation: { kind: 'direct' },
458
1136
  parameters: [
459
1137
  {
460
1138
  name: 'request',
461
- wire: 'request',
462
1139
  source: 'json',
463
1140
  codec: {
464
1141
  mode: 'strict',
465
1142
  typeSymbol: '@khorsheed/dsh-reader#reader/createTag:request',
466
1143
  create: _khorsheed_dsh_reader_reader_createTag_parameter_0$schema,
467
1144
  schema: _khorsheed_dsh_reader_reader_createTag_parameter_0$schema(),
1145
+ jsonSchema: {"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":true},
1146
+ },
1147
+ strictCodec: {
1148
+ mode: 'strict',
1149
+ typeSymbol: '@khorsheed/dsh-reader#reader/createTag:request',
1150
+ create: _khorsheed_dsh_reader_reader_createTag_parameter_0_strict$schema,
1151
+ schema: _khorsheed_dsh_reader_reader_createTag_parameter_0_strict$schema(),
1152
+ jsonSchema: {"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false},
468
1153
  },
469
1154
  },
470
1155
  ],
@@ -473,25 +1158,97 @@ export const TYPERT = {
473
1158
  typeSymbol: '@khorsheed/dsh-reader#reader/createTag:result',
474
1159
  create: _khorsheed_dsh_reader_reader_createTag_result$schema,
475
1160
  schema: _khorsheed_dsh_reader_reader_createTag_result$schema(),
1161
+ jsonSchema: {"oneOf":[{"type":"string","enum":["not-found","unavailable","duplicate","ok","empty","invalid"]},{"type":"object","properties":{"id":{"type":"string","description":"Stable id — renaming a tag must not rewrite every entry that carries it."},"name":{"type":"string","description":"The reader-facing name, unique case-insensitively."},"createdAt":{"type":"string"}},"required":["id","name","createdAt"],"additionalProperties":true}]},
1162
+ },
1163
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":228,"column":3},
1164
+ },
1165
+ 'reader/deleteDiscussion': {
1166
+ service: 'readerRemote',
1167
+ description: 'Delete one discussion note.',
1168
+ invocation: { kind: 'direct' },
1169
+ parameters: [
1170
+ {
1171
+ name: 'request',
1172
+ source: 'json',
1173
+ codec: {
1174
+ mode: 'strict',
1175
+ typeSymbol: '@khorsheed/dsh-reader#reader/deleteDiscussion:request',
1176
+ create: _khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0$schema,
1177
+ schema: _khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0$schema(),
1178
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"discussionId":{"type":"string"}},"required":["entryId","discussionId"],"additionalProperties":true},
1179
+ },
1180
+ strictCodec: {
1181
+ mode: 'strict',
1182
+ typeSymbol: '@khorsheed/dsh-reader#reader/deleteDiscussion:request',
1183
+ create: _khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0_strict$schema,
1184
+ schema: _khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0_strict$schema(),
1185
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"discussionId":{"type":"string"}},"required":["entryId","discussionId"],"additionalProperties":false},
1186
+ },
1187
+ },
1188
+ ],
1189
+ result: {
1190
+ mode: 'strict',
1191
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderNoteOutcome',
1192
+ create: _khorsheed_dsh_reader_reader_deleteDiscussion_result$schema,
1193
+ schema: _khorsheed_dsh_reader_reader_deleteDiscussion_result$schema(),
1194
+ jsonSchema: {"type":"string","enum":["not-found","ok","empty","full"]},
1195
+ },
1196
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":364,"column":3},
1197
+ },
1198
+ 'reader/deleteNote': {
1199
+ service: 'readerRemote',
1200
+ description: 'Delete one note.',
1201
+ invocation: { kind: 'direct' },
1202
+ parameters: [
1203
+ {
1204
+ name: 'request',
1205
+ source: 'json',
1206
+ codec: {
1207
+ mode: 'strict',
1208
+ typeSymbol: '@khorsheed/dsh-reader#reader/deleteNote:request',
1209
+ create: _khorsheed_dsh_reader_reader_deleteNote_parameter_0$schema,
1210
+ schema: _khorsheed_dsh_reader_reader_deleteNote_parameter_0$schema(),
1211
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"noteId":{"type":"string"}},"required":["entryId","noteId"],"additionalProperties":true},
1212
+ },
1213
+ strictCodec: {
1214
+ mode: 'strict',
1215
+ typeSymbol: '@khorsheed/dsh-reader#reader/deleteNote:request',
1216
+ create: _khorsheed_dsh_reader_reader_deleteNote_parameter_0_strict$schema,
1217
+ schema: _khorsheed_dsh_reader_reader_deleteNote_parameter_0_strict$schema(),
1218
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"noteId":{"type":"string"}},"required":["entryId","noteId"],"additionalProperties":false},
1219
+ },
1220
+ },
1221
+ ],
1222
+ result: {
1223
+ mode: 'strict',
1224
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderNoteOutcome',
1225
+ create: _khorsheed_dsh_reader_reader_deleteNote_result$schema,
1226
+ schema: _khorsheed_dsh_reader_reader_deleteNote_result$schema(),
1227
+ jsonSchema: {"type":"string","enum":["not-found","ok","empty","full"]},
476
1228
  },
477
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":210,"column":3},
1229
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":334,"column":3},
478
1230
  },
479
- {
480
- id: '@khorsheed/dsh-reader#reader/deleteTag',
1231
+ 'reader/deleteTag': {
481
1232
  service: 'readerRemote',
482
- namespace: 'reader',
483
- method: 'deleteTag',
1233
+ description: 'Delete a tag and remove it from every entry.',
484
1234
  invocation: { kind: 'direct' },
485
1235
  parameters: [
486
1236
  {
487
1237
  name: 'request',
488
- wire: 'request',
489
1238
  source: 'json',
490
1239
  codec: {
491
1240
  mode: 'strict',
492
1241
  typeSymbol: '@khorsheed/dsh-reader#reader/deleteTag:request',
493
1242
  create: _khorsheed_dsh_reader_reader_deleteTag_parameter_0$schema,
494
1243
  schema: _khorsheed_dsh_reader_reader_deleteTag_parameter_0$schema(),
1244
+ jsonSchema: {"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":true},
1245
+ },
1246
+ strictCodec: {
1247
+ mode: 'strict',
1248
+ typeSymbol: '@khorsheed/dsh-reader#reader/deleteTag:request',
1249
+ create: _khorsheed_dsh_reader_reader_deleteTag_parameter_0_strict$schema,
1250
+ schema: _khorsheed_dsh_reader_reader_deleteTag_parameter_0_strict$schema(),
1251
+ jsonSchema: {"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},
495
1252
  },
496
1253
  },
497
1254
  ],
@@ -500,25 +1257,64 @@ export const TYPERT = {
500
1257
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderAnnotationOutcome',
501
1258
  create: _khorsheed_dsh_reader_reader_deleteTag_result$schema,
502
1259
  schema: _khorsheed_dsh_reader_reader_deleteTag_result$schema(),
1260
+ jsonSchema: {"type":"string","enum":["not-found","unavailable","duplicate","ok","empty","invalid"]},
1261
+ },
1262
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":240,"column":3},
1263
+ },
1264
+ 'reader/editReply': {
1265
+ service: 'readerRemote',
1266
+ description: 'Rewrite (or, with empty text, remove) one line under a note.',
1267
+ invocation: { kind: 'direct' },
1268
+ parameters: [
1269
+ {
1270
+ name: 'request',
1271
+ source: 'json',
1272
+ codec: {
1273
+ mode: 'strict',
1274
+ typeSymbol: '@khorsheed/dsh-reader#reader/editReply:request',
1275
+ create: _khorsheed_dsh_reader_reader_editReply_parameter_0$schema,
1276
+ schema: _khorsheed_dsh_reader_reader_editReply_parameter_0$schema(),
1277
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"noteId":{"type":"string"},"index":{"type":"number"},"text":{"type":"string"}},"required":["entryId","noteId","index","text"],"additionalProperties":true},
1278
+ },
1279
+ strictCodec: {
1280
+ mode: 'strict',
1281
+ typeSymbol: '@khorsheed/dsh-reader#reader/editReply:request',
1282
+ create: _khorsheed_dsh_reader_reader_editReply_parameter_0_strict$schema,
1283
+ schema: _khorsheed_dsh_reader_reader_editReply_parameter_0_strict$schema(),
1284
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"noteId":{"type":"string"},"index":{"type":"number"},"text":{"type":"string"}},"required":["entryId","noteId","index","text"],"additionalProperties":false},
1285
+ },
1286
+ },
1287
+ ],
1288
+ result: {
1289
+ mode: 'strict',
1290
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderNoteOutcome',
1291
+ create: _khorsheed_dsh_reader_reader_editReply_result$schema,
1292
+ schema: _khorsheed_dsh_reader_reader_editReply_result$schema(),
1293
+ jsonSchema: {"type":"string","enum":["not-found","ok","empty","full"]},
503
1294
  },
504
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":222,"column":3},
1295
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":352,"column":3},
505
1296
  },
506
- {
507
- id: '@khorsheed/dsh-reader#reader/entryFetchStates',
1297
+ 'reader/entryFetchStates': {
508
1298
  service: 'readerRemote',
509
- namespace: 'reader',
510
- method: 'entryFetchStates',
1299
+ description: 'What the plugin holds per entry: a body, a stored raw payload, or a failure.',
511
1300
  invocation: { kind: 'direct' },
512
1301
  parameters: [
513
1302
  {
514
1303
  name: 'request',
515
- wire: 'request',
516
1304
  source: 'json',
517
1305
  codec: {
518
1306
  mode: 'strict',
519
1307
  typeSymbol: '@khorsheed/dsh-reader#reader/entryFetchStates:request',
520
1308
  create: _khorsheed_dsh_reader_reader_entryFetchStates_parameter_0$schema,
521
1309
  schema: _khorsheed_dsh_reader_reader_entryFetchStates_parameter_0$schema(),
1310
+ jsonSchema: {"type":"object","properties":{"entryIds":{"type":"array","items":{"type":"string"}}},"required":["entryIds"],"additionalProperties":true},
1311
+ },
1312
+ strictCodec: {
1313
+ mode: 'strict',
1314
+ typeSymbol: '@khorsheed/dsh-reader#reader/entryFetchStates:request',
1315
+ create: _khorsheed_dsh_reader_reader_entryFetchStates_parameter_0_strict$schema,
1316
+ schema: _khorsheed_dsh_reader_reader_entryFetchStates_parameter_0_strict$schema(),
1317
+ jsonSchema: {"type":"object","properties":{"entryIds":{"type":"array","items":{"type":"string"}}},"required":["entryIds"],"additionalProperties":false},
522
1318
  },
523
1319
  },
524
1320
  ],
@@ -527,25 +1323,64 @@ export const TYPERT = {
527
1323
  typeSymbol: '@khorsheed/dsh-reader#reader/entryFetchStates:result',
528
1324
  create: _khorsheed_dsh_reader_reader_entryFetchStates_result$schema,
529
1325
  schema: _khorsheed_dsh_reader_reader_entryFetchStates_result$schema(),
1326
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
1327
+ },
1328
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":163,"column":3},
1329
+ },
1330
+ 'reader/entryNotes': {
1331
+ service: 'readerRemote',
1332
+ description: 'One article\'s notes and the conversations that discussed it.',
1333
+ invocation: { kind: 'direct' },
1334
+ parameters: [
1335
+ {
1336
+ name: 'request',
1337
+ source: 'json',
1338
+ codec: {
1339
+ mode: 'strict',
1340
+ typeSymbol: '@khorsheed/dsh-reader#reader/entryNotes:request',
1341
+ create: _khorsheed_dsh_reader_reader_entryNotes_parameter_0$schema,
1342
+ schema: _khorsheed_dsh_reader_reader_entryNotes_parameter_0$schema(),
1343
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"}},"required":["entryId"],"additionalProperties":true},
1344
+ },
1345
+ strictCodec: {
1346
+ mode: 'strict',
1347
+ typeSymbol: '@khorsheed/dsh-reader#reader/entryNotes:request',
1348
+ create: _khorsheed_dsh_reader_reader_entryNotes_parameter_0_strict$schema,
1349
+ schema: _khorsheed_dsh_reader_reader_entryNotes_parameter_0_strict$schema(),
1350
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"}},"required":["entryId"],"additionalProperties":false},
1351
+ },
1352
+ },
1353
+ ],
1354
+ result: {
1355
+ mode: 'strict',
1356
+ typeSymbol: '@khorsheed/dsh-reader#reader/entryNotes:result',
1357
+ create: _khorsheed_dsh_reader_reader_entryNotes_result$schema,
1358
+ schema: _khorsheed_dsh_reader_reader_entryNotes_result$schema(),
1359
+ jsonSchema: {"type":"object","properties":{"entry":{"type":"object","properties":{"entryId":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"source":{"type":"string","description":"The source's display label (the feed's name, or the site)."},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"`n1`, `n2`… per article, never reused — the model cites notes by it."},"anchor":{"type":"object","properties":{"block":{"type":"number"},"start":{"type":"number"},"quote":{"type":"string"},"translated":{"type":"string","description":"The translated text, when the selection was made in the translated view."},"time":{"type":"number","description":"A video / audio transcript paragraph's start (seconds): where ▶ plays from."}},"required":["block","quote"],"additionalProperties":true},"comment":{"type":"string"},"replies":{"type":"array","items":{"type":"object","properties":{"by":{"type":"string","enum":["user","agent"]},"text":{"type":"string"},"sessionId":{"type":"string","description":"The conversation it came from, so the reader can go back to it."},"editedFrom":{"type":"string","const":"agent","description":"Set when the reader rewrote a line the model wrote."},"at":{"type":"string"}},"required":["by","text","at"],"additionalProperties":true},"description":"Conclusions and additions, oldest first."},"syncedTo":{"type":"array","items":{"type":"object","properties":{"canvasId":{"type":"string"},"cardId":{"type":"string"},"canvasTitle":{"type":"string","description":"The canvas's title when it was synced (for the 「已在…」 mark)."},"at":{"type":"string"}},"required":["canvasId","cardId","canvasTitle","at"],"additionalProperties":true},"description":"Canvas cards made from it (a later edit does not reach them)."},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","anchor","createdAt","updatedAt"],"additionalProperties":true}},"sessions":{"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string"},"title":{"type":"string"},"lastAt":{"type":"string"}},"required":["sessionId","lastAt"],"additionalProperties":true}},"discussions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"`d1`, `d2`… per article, never reused."},"kind":{"type":"string","enum":["check","discussion"]},"sessionId":{"type":"string"},"title":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"para":{"type":"number","description":"¶ number (1-based), when the point cites the article."}},"required":["text"],"additionalProperties":true}},"aside":{"type":"string","description":"One line for what went fine (「其余 2 题讲到位了」)."},"syncedTo":{"type":"array","items":{"type":"object","properties":{"canvasId":{"type":"string"},"cardId":{"type":"string"},"canvasTitle":{"type":"string","description":"The canvas's title when it was synced (for the 「已在…」 mark)."},"at":{"type":"string"}},"required":["canvasId","cardId","canvasTitle","at"],"additionalProperties":true},"description":"Canvas cards made from it."},"createdAt":{"type":"string"}},"required":["id","kind","title","points","createdAt"],"additionalProperties":true},"description":"Discussion notes, newest first."},"nextNote":{"type":"number","description":"The next note number; ids are never reused, so a deleted n3 stays deleted."},"nextDiscussion":{"type":"number","description":"The next discussion number, never reused either."},"updatedAt":{"type":"string"}},"required":["entryId","title","notes","sessions","nextNote","updatedAt"],"additionalProperties":true}},"required":[],"additionalProperties":true},
530
1360
  },
531
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":145,"column":3},
1361
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":309,"column":9},
532
1362
  },
533
- {
534
- id: '@khorsheed/dsh-reader#reader/entryTags',
1363
+ 'reader/entryTags': {
535
1364
  service: 'readerRemote',
536
- namespace: 'reader',
537
- method: 'entryTags',
1365
+ description: 'The tags on one entry.',
538
1366
  invocation: { kind: 'direct' },
539
1367
  parameters: [
540
1368
  {
541
1369
  name: 'request',
542
- wire: 'request',
543
1370
  source: 'json',
544
1371
  codec: {
545
1372
  mode: 'strict',
546
1373
  typeSymbol: '@khorsheed/dsh-reader#reader/entryTags:request',
547
1374
  create: _khorsheed_dsh_reader_reader_entryTags_parameter_0$schema,
548
1375
  schema: _khorsheed_dsh_reader_reader_entryTags_parameter_0$schema(),
1376
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"}},"required":["entryId"],"additionalProperties":true},
1377
+ },
1378
+ strictCodec: {
1379
+ mode: 'strict',
1380
+ typeSymbol: '@khorsheed/dsh-reader#reader/entryTags:request',
1381
+ create: _khorsheed_dsh_reader_reader_entryTags_parameter_0_strict$schema,
1382
+ schema: _khorsheed_dsh_reader_reader_entryTags_parameter_0_strict$schema(),
1383
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"}},"required":["entryId"],"additionalProperties":false},
549
1384
  },
550
1385
  },
551
1386
  ],
@@ -554,25 +1389,31 @@ export const TYPERT = {
554
1389
  typeSymbol: '@khorsheed/dsh-reader#reader/entryTags:result',
555
1390
  create: _khorsheed_dsh_reader_reader_entryTags_result$schema,
556
1391
  schema: _khorsheed_dsh_reader_reader_entryTags_result$schema(),
1392
+ jsonSchema: {"type":"object","properties":{"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable id — renaming a tag must not rewrite every entry that carries it."},"name":{"type":"string","description":"The reader-facing name, unique case-insensitively."},"createdAt":{"type":"string"}},"required":["id","name","createdAt"],"additionalProperties":true}}},"required":["tags"],"additionalProperties":true},
557
1393
  },
558
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":234,"column":3},
1394
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":252,"column":3},
559
1395
  },
560
- {
561
- id: '@khorsheed/dsh-reader#reader/fetchEntryBody',
1396
+ 'reader/fetchEntryBody': {
562
1397
  service: 'readerRemote',
563
- namespace: 'reader',
564
- method: 'fetchEntryBody',
1398
+ description: 'Fetch one entry\'s article (the network half; the browser extracts).',
565
1399
  invocation: { kind: 'direct' },
566
1400
  parameters: [
567
1401
  {
568
1402
  name: 'request',
569
- wire: 'request',
570
1403
  source: 'json',
571
1404
  codec: {
572
1405
  mode: 'strict',
573
1406
  typeSymbol: '@khorsheed/dsh-reader#reader/fetchEntryBody:request',
574
1407
  create: _khorsheed_dsh_reader_reader_fetchEntryBody_parameter_0$schema,
575
1408
  schema: _khorsheed_dsh_reader_reader_fetchEntryBody_parameter_0$schema(),
1409
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"}},"required":["entryId","url"],"additionalProperties":true},
1410
+ },
1411
+ strictCodec: {
1412
+ mode: 'strict',
1413
+ typeSymbol: '@khorsheed/dsh-reader#reader/fetchEntryBody:request',
1414
+ create: _khorsheed_dsh_reader_reader_fetchEntryBody_parameter_0_strict$schema,
1415
+ schema: _khorsheed_dsh_reader_reader_fetchEntryBody_parameter_0_strict$schema(),
1416
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"}},"required":["entryId","url"],"additionalProperties":false},
576
1417
  },
577
1418
  },
578
1419
  ],
@@ -581,256 +1422,532 @@ export const TYPERT = {
581
1422
  typeSymbol: '@khorsheed/dsh-reader#reader/fetchEntryBody:result',
582
1423
  create: _khorsheed_dsh_reader_reader_fetchEntryBody_result$schema,
583
1424
  schema: _khorsheed_dsh_reader_reader_fetchEntryBody_result$schema(),
1425
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"},"raw":{"type":"string"},"rawFile":{"type":"string"},"truncated":{"type":"boolean"},"error":{"type":"string"}},"required":["entryId"],"additionalProperties":true},
1426
+ },
1427
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":123,"column":3},
1428
+ },
1429
+ 'reader/fetchImage': {
1430
+ service: 'readerRemote',
1431
+ description: 'Fetch one image the browser could not load cross-origin (CORP / hotlink-protected), so the pane can re-point the failed `<img>` at the bytes. Called per failed image, never for a healthy one.',
1432
+ invocation: { kind: 'direct' },
1433
+ parameters: [
1434
+ {
1435
+ name: 'request',
1436
+ source: 'json',
1437
+ codec: {
1438
+ mode: 'strict',
1439
+ typeSymbol: '@khorsheed/dsh-reader#reader/fetchImage:request',
1440
+ create: _khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema,
1441
+ schema: _khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema(),
1442
+ jsonSchema: {"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":true},
1443
+ },
1444
+ strictCodec: {
1445
+ mode: 'strict',
1446
+ typeSymbol: '@khorsheed/dsh-reader#reader/fetchImage:request',
1447
+ create: _khorsheed_dsh_reader_reader_fetchImage_parameter_0_strict$schema,
1448
+ schema: _khorsheed_dsh_reader_reader_fetchImage_parameter_0_strict$schema(),
1449
+ jsonSchema: {"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},
1450
+ },
1451
+ },
1452
+ ],
1453
+ result: {
1454
+ mode: 'strict',
1455
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderImageResult',
1456
+ create: _khorsheed_dsh_reader_reader_fetchImage_result$schema,
1457
+ schema: _khorsheed_dsh_reader_reader_fetchImage_result$schema(),
1458
+ jsonSchema: {"type":"object","properties":{"url":{"type":"string","description":"The URL the pane asked about (echoed, so a late answer can be matched)."},"mime":{"type":"string","description":"The image's declared content type, when the fetch produced bytes."},"base64":{"type":"string","description":"The image bytes, base64-encoded, when the fetch produced them."},"error":{"type":"string","description":"Why the rescue failed, when it did."}},"required":["url"],"additionalProperties":true},
1459
+ },
1460
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":140,"column":3},
1461
+ },
1462
+ 'reader/getBodies': {
1463
+ service: 'readerRemote',
1464
+ description: 'Hand back raw payloads for the browser to parse.',
1465
+ invocation: { kind: 'direct' },
1466
+ parameters: [
1467
+ {
1468
+ name: 'request',
1469
+ source: 'json',
1470
+ codec: {
1471
+ mode: 'strict',
1472
+ typeSymbol: '@khorsheed/dsh-reader#reader/getBodies:request',
1473
+ create: _khorsheed_dsh_reader_reader_getBodies_parameter_0$schema,
1474
+ schema: _khorsheed_dsh_reader_reader_getBodies_parameter_0$schema(),
1475
+ jsonSchema: {"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"],"additionalProperties":true},
1476
+ },
1477
+ strictCodec: {
1478
+ mode: 'strict',
1479
+ typeSymbol: '@khorsheed/dsh-reader#reader/getBodies:request',
1480
+ create: _khorsheed_dsh_reader_reader_getBodies_parameter_0_strict$schema,
1481
+ schema: _khorsheed_dsh_reader_reader_getBodies_parameter_0_strict$schema(),
1482
+ jsonSchema: {"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"],"additionalProperties":false},
1483
+ },
1484
+ },
1485
+ ],
1486
+ result: {
1487
+ mode: 'strict',
1488
+ typeSymbol: '@khorsheed/dsh-reader#reader/getBodies:result',
1489
+ create: _khorsheed_dsh_reader_reader_getBodies_result$schema,
1490
+ schema: _khorsheed_dsh_reader_reader_getBodies_result$schema(),
1491
+ jsonSchema: {"type":"object","properties":{"bodies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"raw":{"type":"string"},"truncated":{"type":"boolean"},"error":{"type":"string","description":"Present when the payload could not be produced (fetch failed, no fs, …)."},"title":{"type":"string","description":"The captured article title for a link source's single entry, when a past extraction stored it (see {@link ReaderEntryAnnotation.title}). The wall prefers it over the URL-derived label."},"excerpt":{"type":"string","description":"The captured excerpt, with the title."}},"required":["id"],"additionalProperties":true}}},"required":["bodies"],"additionalProperties":true},
1492
+ },
1493
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":109,"column":9},
1494
+ },
1495
+ 'reader/getCachePolicy': {
1496
+ service: 'readerRemote',
1497
+ description: 'Read or set how long a fetched body is served (and the translation budget).',
1498
+ invocation: { kind: 'direct' },
1499
+ parameters: [
1500
+ ],
1501
+ result: {
1502
+ mode: 'strict',
1503
+ typeSymbol: '@khorsheed/dsh-reader#reader/getCachePolicy:result',
1504
+ create: _khorsheed_dsh_reader_reader_getCachePolicy_result$schema,
1505
+ schema: _khorsheed_dsh_reader_reader_getCachePolicy_result$schema(),
1506
+ jsonSchema: {"type":"object","properties":{"ttlHours":{"type":"number"},"maxEntries":{"type":"number"},"translationBudgetChars":{"type":"number"}},"required":["ttlHours","maxEntries","translationBudgetChars"],"additionalProperties":true},
1507
+ },
1508
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":258,"column":3},
1509
+ },
1510
+ 'reader/getEntryBody': {
1511
+ service: 'readerRemote',
1512
+ description: 'What the detail view should render for one entry, and whether a fetch is worth offering.',
1513
+ invocation: { kind: 'direct' },
1514
+ parameters: [
1515
+ {
1516
+ name: 'request',
1517
+ source: 'json',
1518
+ codec: {
1519
+ mode: 'strict',
1520
+ typeSymbol: '@khorsheed/dsh-reader#reader/getEntryBody:request',
1521
+ create: _khorsheed_dsh_reader_reader_getEntryBody_parameter_0$schema,
1522
+ schema: _khorsheed_dsh_reader_reader_getEntryBody_parameter_0$schema(),
1523
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"},"feedHtml":{"type":"string"}},"required":["entryId","url"],"additionalProperties":true},
1524
+ },
1525
+ strictCodec: {
1526
+ mode: 'strict',
1527
+ typeSymbol: '@khorsheed/dsh-reader#reader/getEntryBody:request',
1528
+ create: _khorsheed_dsh_reader_reader_getEntryBody_parameter_0_strict$schema,
1529
+ schema: _khorsheed_dsh_reader_reader_getEntryBody_parameter_0_strict$schema(),
1530
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"},"feedHtml":{"type":"string"}},"required":["entryId","url"],"additionalProperties":false},
1531
+ },
1532
+ },
1533
+ ],
1534
+ result: {
1535
+ mode: 'strict',
1536
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderEntryBodyView',
1537
+ create: _khorsheed_dsh_reader_reader_getEntryBody_result$schema,
1538
+ schema: _khorsheed_dsh_reader_reader_getEntryBody_result$schema(),
1539
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"cached":{"type":"boolean","description":"True when this body is a cached fetch rather than the feed's own payload."},"fresh":{"type":"boolean","description":"False when the cache's deadline has passed: the view offers the fetch."},"fromFeed":{"type":"boolean","description":"True when the feed's payload already carries full text for this entry."},"html":{"type":"string"},"fetchedAt":{"type":"string"},"truncated":{"type":"boolean"},"scriptFigures":{"type":"number","description":"Figures this page draws with scripts — the detail view says so."},"rendered":{"type":"boolean","description":"True when this body came from a rendered fetch (the「重新抓取」route reads it)."},"error":{"type":"string","description":"Why a fetch could not produce a body, when one was attempted."}},"required":["entryId","cached","fresh","fromFeed"],"additionalProperties":true},
1540
+ },
1541
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":117,"column":3},
1542
+ },
1543
+ 'reader/getEntryTranslation': {
1544
+ service: 'readerRemote',
1545
+ description: 'One entry\'s exact-fit translation record (segment map resolved), when usable.',
1546
+ invocation: { kind: 'direct' },
1547
+ parameters: [
1548
+ {
1549
+ name: 'request',
1550
+ source: 'json',
1551
+ codec: {
1552
+ mode: 'strict',
1553
+ typeSymbol: '@khorsheed/dsh-reader#reader/getEntryTranslation:request',
1554
+ create: _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0$schema,
1555
+ schema: _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0$schema(),
1556
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"}},"required":["entryId"],"additionalProperties":true},
1557
+ },
1558
+ strictCodec: {
1559
+ mode: 'strict',
1560
+ typeSymbol: '@khorsheed/dsh-reader#reader/getEntryTranslation:request',
1561
+ create: _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0_strict$schema,
1562
+ schema: _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0_strict$schema(),
1563
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"}},"required":["entryId"],"additionalProperties":false},
1564
+ },
1565
+ },
1566
+ ],
1567
+ result: {
1568
+ mode: 'strict',
1569
+ typeSymbol: '@khorsheed/dsh-reader#reader/getEntryTranslation:result',
1570
+ create: _khorsheed_dsh_reader_reader_getEntryTranslation_result$schema,
1571
+ schema: _khorsheed_dsh_reader_reader_getEntryTranslation_result$schema(),
1572
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
1573
+ },
1574
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":186,"column":3},
1575
+ },
1576
+ 'reader/getRawBody': {
1577
+ service: 'readerRemote',
1578
+ description: 'A stored raw payload, so the browser can extract it later.',
1579
+ invocation: { kind: 'direct' },
1580
+ parameters: [
1581
+ {
1582
+ name: 'request',
1583
+ source: 'json',
1584
+ codec: {
1585
+ mode: 'strict',
1586
+ typeSymbol: '@khorsheed/dsh-reader#reader/getRawBody:request',
1587
+ create: _khorsheed_dsh_reader_reader_getRawBody_parameter_0$schema,
1588
+ schema: _khorsheed_dsh_reader_reader_getRawBody_parameter_0$schema(),
1589
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"}},"required":["entryId"],"additionalProperties":true},
1590
+ },
1591
+ strictCodec: {
1592
+ mode: 'strict',
1593
+ typeSymbol: '@khorsheed/dsh-reader#reader/getRawBody:request',
1594
+ create: _khorsheed_dsh_reader_reader_getRawBody_parameter_0_strict$schema,
1595
+ schema: _khorsheed_dsh_reader_reader_getRawBody_parameter_0_strict$schema(),
1596
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"}},"required":["entryId"],"additionalProperties":false},
1597
+ },
1598
+ },
1599
+ ],
1600
+ result: {
1601
+ mode: 'strict',
1602
+ typeSymbol: '@khorsheed/dsh-reader#reader/getRawBody:result',
1603
+ create: _khorsheed_dsh_reader_reader_getRawBody_result$schema,
1604
+ schema: _khorsheed_dsh_reader_reader_getRawBody_result$schema(),
1605
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"raw":{"type":"string"},"url":{"type":"string"},"truncated":{"type":"boolean"},"error":{"type":"string"}},"required":["entryId"],"additionalProperties":true},
1606
+ },
1607
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":169,"column":3},
1608
+ },
1609
+ 'reader/getSentenceTranslations': {
1610
+ service: 'readerRemote',
1611
+ description: 'Translations for exactly the asked sentence hashes of one pair — never the whole table.',
1612
+ invocation: { kind: 'direct' },
1613
+ parameters: [
1614
+ {
1615
+ name: 'request',
1616
+ source: 'json',
1617
+ codec: {
1618
+ mode: 'strict',
1619
+ typeSymbol: '@khorsheed/dsh-reader#reader/getSentenceTranslations:request',
1620
+ create: _khorsheed_dsh_reader_reader_getSentenceTranslations_parameter_0$schema,
1621
+ schema: _khorsheed_dsh_reader_reader_getSentenceTranslations_parameter_0$schema(),
1622
+ jsonSchema: {"type":"object","properties":{"pair":{"type":"string"},"hashes":{"type":"array","items":{"type":"string"}}},"required":["pair","hashes"],"additionalProperties":true},
1623
+ },
1624
+ strictCodec: {
1625
+ mode: 'strict',
1626
+ typeSymbol: '@khorsheed/dsh-reader#reader/getSentenceTranslations:request',
1627
+ create: _khorsheed_dsh_reader_reader_getSentenceTranslations_parameter_0_strict$schema,
1628
+ schema: _khorsheed_dsh_reader_reader_getSentenceTranslations_parameter_0_strict$schema(),
1629
+ jsonSchema: {"type":"object","properties":{"pair":{"type":"string"},"hashes":{"type":"array","items":{"type":"string"}}},"required":["pair","hashes"],"additionalProperties":false},
1630
+ },
1631
+ },
1632
+ ],
1633
+ result: {
1634
+ mode: 'strict',
1635
+ typeSymbol: '@khorsheed/dsh-reader#reader/getSentenceTranslations:result',
1636
+ create: _khorsheed_dsh_reader_reader_getSentenceTranslations_result$schema,
1637
+ schema: _khorsheed_dsh_reader_reader_getSentenceTranslations_result$schema(),
1638
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
1639
+ },
1640
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":192,"column":3},
1641
+ },
1642
+ 'reader/getStorageStats': {
1643
+ service: 'readerRemote',
1644
+ description: 'Per-tier cache usage, aggregated on the host (the tables never cross).',
1645
+ invocation: { kind: 'direct' },
1646
+ parameters: [
1647
+ ],
1648
+ result: {
1649
+ mode: 'strict',
1650
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderStorageStats',
1651
+ create: _khorsheed_dsh_reader_reader_getStorageStats_result$schema,
1652
+ schema: _khorsheed_dsh_reader_reader_getStorageStats_result$schema(),
1653
+ jsonSchema: {"type":"object","properties":{"bodies":{"type":"object","properties":{"entries":{"type":"number"},"chars":{"type":"number"}},"required":["entries","chars"],"additionalProperties":true,"description":"The cached article bodies (what TTL + maxEntries govern)."},"translations":{"type":"object","properties":{"entries":{"type":"number","description":"How many entries carry a segment map."},"chars":{"type":"number","description":"The maps' combined size."},"memoryEntries":{"type":"number","description":"The global memory's sentence count (0 when no table exists)."},"memoryChars":{"type":"number","description":"The global memory's size (0 when no table exists)."}},"required":["entries","chars","memoryEntries","memoryChars"],"additionalProperties":true,"description":"The two translation tiers: per-entry maps, and the global sentence memory."}},"required":["bodies","translations"],"additionalProperties":true},
584
1654
  },
585
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":115,"column":3},
1655
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":210,"column":3},
586
1656
  },
587
- {
588
- id: '@khorsheed/dsh-reader#reader/getBodies',
1657
+ 'reader/listBackfillCandidates': {
589
1658
  service: 'readerRemote',
590
- namespace: 'reader',
591
- method: 'getBodies',
1659
+ description: 'Which entries still need their full text (the automatic backfill\'s work list).',
592
1660
  invocation: { kind: 'direct' },
593
1661
  parameters: [
594
1662
  {
595
1663
  name: 'request',
596
- wire: 'request',
597
1664
  source: 'json',
598
1665
  codec: {
599
1666
  mode: 'strict',
600
- typeSymbol: '@khorsheed/dsh-reader#reader/getBodies:request',
601
- create: _khorsheed_dsh_reader_reader_getBodies_parameter_0$schema,
602
- schema: _khorsheed_dsh_reader_reader_getBodies_parameter_0$schema(),
1667
+ typeSymbol: '@khorsheed/dsh-reader#reader/listBackfillCandidates:request',
1668
+ create: _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0$schema,
1669
+ schema: _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0$schema(),
1670
+ jsonSchema: {"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"},"label":{"type":"string"},"hasBody":{"type":"boolean"}},"required":["entryId","url","label","hasBody"],"additionalProperties":true}},"limit":{"type":"number"}},"required":["entries"],"additionalProperties":true},
1671
+ },
1672
+ strictCodec: {
1673
+ mode: 'strict',
1674
+ typeSymbol: '@khorsheed/dsh-reader#reader/listBackfillCandidates:request',
1675
+ create: _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0_strict$schema,
1676
+ schema: _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0_strict$schema(),
1677
+ jsonSchema: {"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"},"label":{"type":"string"},"hasBody":{"type":"boolean"}},"required":["entryId","url","label","hasBody"],"additionalProperties":false}},"limit":{"type":"number"}},"required":["entries"],"additionalProperties":false},
603
1678
  },
604
1679
  },
605
1680
  ],
606
1681
  result: {
607
1682
  mode: 'strict',
608
- typeSymbol: '@khorsheed/dsh-reader#reader/getBodies:result',
609
- create: _khorsheed_dsh_reader_reader_getBodies_result$schema,
610
- schema: _khorsheed_dsh_reader_reader_getBodies_result$schema(),
1683
+ typeSymbol: '@khorsheed/dsh-reader#reader/listBackfillCandidates:result',
1684
+ create: _khorsheed_dsh_reader_reader_listBackfillCandidates_result$schema,
1685
+ schema: _khorsheed_dsh_reader_reader_listBackfillCandidates_result$schema(),
1686
+ jsonSchema: {"type":"object","properties":{"candidates":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"},"label":{"type":"string"},"lastError":{"type":"string","description":"Why a previous attempt failed, when one did (and when it is worth retrying)."}},"required":["entryId","url","label"],"additionalProperties":true}}},"required":["candidates"],"additionalProperties":true},
611
1687
  },
612
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":101,"column":9},
1688
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":175,"column":3},
613
1689
  },
614
- {
615
- id: '@khorsheed/dsh-reader#reader/getCachePolicy',
1690
+ 'reader/listRecent': {
616
1691
  service: 'readerRemote',
617
- namespace: 'reader',
618
- method: 'getCachePolicy',
1692
+ description: 'The entries the reader opened, newest first.',
619
1693
  invocation: { kind: 'direct' },
620
1694
  parameters: [
621
1695
  ],
622
1696
  result: {
623
1697
  mode: 'strict',
624
- typeSymbol: '@khorsheed/dsh-reader#reader/getCachePolicy:result',
625
- create: _khorsheed_dsh_reader_reader_getCachePolicy_result$schema,
626
- schema: _khorsheed_dsh_reader_reader_getCachePolicy_result$schema(),
1698
+ typeSymbol: '@khorsheed/dsh-reader#reader/listRecent:result',
1699
+ create: _khorsheed_dsh_reader_reader_listRecent_result$schema,
1700
+ schema: _khorsheed_dsh_reader_reader_listRecent_result$schema(),
1701
+ jsonSchema: {"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string"},"sourceId":{"type":"string"},"title":{"type":"string"},"url":{"type":"string","description":"The article URL, for reopening an entry the feed no longer publishes."},"readAt":{"type":"string","description":"When it was opened (ISO-8601)."}},"required":["entryId","sourceId","title","readAt"],"additionalProperties":true}}},"required":["entries"],"additionalProperties":true},
627
1702
  },
628
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":240,"column":3},
1703
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":286,"column":3},
629
1704
  },
630
- {
631
- id: '@khorsheed/dsh-reader#reader/getEntryBody',
1705
+ 'reader/listSources': {
632
1706
  service: 'readerRemote',
633
- namespace: 'reader',
634
- method: 'getEntryBody',
1707
+ description: 'The configured sources, without payloads.',
635
1708
  invocation: { kind: 'direct' },
636
1709
  parameters: [
637
- {
638
- name: 'request',
639
- wire: 'request',
640
- source: 'json',
641
- codec: {
642
- mode: 'strict',
643
- typeSymbol: '@khorsheed/dsh-reader#reader/getEntryBody:request',
644
- create: _khorsheed_dsh_reader_reader_getEntryBody_parameter_0$schema,
645
- schema: _khorsheed_dsh_reader_reader_getEntryBody_parameter_0$schema(),
646
- },
647
- },
648
1710
  ],
649
1711
  result: {
650
1712
  mode: 'strict',
651
- typeSymbol: '@khorsheed/dsh-reader/types#ReaderEntryBodyView',
652
- create: _khorsheed_dsh_reader_reader_getEntryBody_result$schema,
653
- schema: _khorsheed_dsh_reader_reader_getEntryBody_result$schema(),
1713
+ typeSymbol: '@khorsheed/dsh-reader#reader/listSources:result',
1714
+ create: _khorsheed_dsh_reader_reader_listSources_result$schema,
1715
+ schema: _khorsheed_dsh_reader_reader_listSources_result$schema(),
1716
+ jsonSchema: {"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["rss","link"]},"url":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"addedAt":{"type":"string","description":"When the reader added it (ISO-8601). The browser needs this to order the wall and the management list by \"when did this arrive\": a saved link carries no publication date at all, so without this field it sorts as the oldest thing on the wall — which is exactly where a reader who just added it will not look."},"fetchedAt":{"type":"string"},"status":{"type":"string","enum":["error","ok","fetching"]},"error":{"type":"string"},"truncated":{"type":"boolean"},"hasBody":{"type":"boolean"},"failure":{"type":"object","properties":{"code":{"type":"string","enum":["blocked","http","unreadable","empty","login","unsupported-type","redirected","unreachable"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":true,"description":"Present when this source has no previewable body (see {@link ReaderPreviewFailure})."},"resolvedFrom":{"type":"string","description":"The URL the reader pasted, when the source was resolved to a canonical version (see {@link ReaderSource.resolvedFrom})."}},"required":["id","kind","url","label","enabled","addedAt","hasBody"],"additionalProperties":true}}},"required":["sources"],"additionalProperties":true},
654
1717
  },
655
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":109,"column":3},
1718
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":73,"column":9},
656
1719
  },
657
- {
658
- id: '@khorsheed/dsh-reader#reader/getEntryTranslation',
1720
+ 'reader/listTags': {
659
1721
  service: 'readerRemote',
660
- namespace: 'reader',
661
- method: 'getEntryTranslation',
1722
+ description: 'The tag vocabulary, with how many entries carry each tag.',
662
1723
  invocation: { kind: 'direct' },
663
1724
  parameters: [
664
- {
665
- name: 'request',
666
- wire: 'request',
667
- source: 'json',
668
- codec: {
669
- mode: 'strict',
670
- typeSymbol: '@khorsheed/dsh-reader#reader/getEntryTranslation:request',
671
- create: _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0$schema,
672
- schema: _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0$schema(),
673
- },
674
- },
675
1725
  ],
676
1726
  result: {
677
1727
  mode: 'strict',
678
- typeSymbol: '@khorsheed/dsh-reader#reader/getEntryTranslation:result',
679
- create: _khorsheed_dsh_reader_reader_getEntryTranslation_result$schema,
680
- schema: _khorsheed_dsh_reader_reader_getEntryTranslation_result$schema(),
1728
+ typeSymbol: '@khorsheed/dsh-reader#reader/listTags:result',
1729
+ create: _khorsheed_dsh_reader_reader_listTags_result$schema,
1730
+ schema: _khorsheed_dsh_reader_reader_listTags_result$schema(),
1731
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
681
1732
  },
682
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":168,"column":3},
1733
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":222,"column":3},
683
1734
  },
684
- {
685
- id: '@khorsheed/dsh-reader#reader/getRawBody',
1735
+ 'reader/localTranscript': {
686
1736
  service: 'readerRemote',
687
- namespace: 'reader',
688
- method: 'getRawBody',
1737
+ description: 'Where an entry\'s local transcription stands, with the transcript so far.',
689
1738
  invocation: { kind: 'direct' },
690
1739
  parameters: [
691
1740
  {
692
1741
  name: 'request',
693
- wire: 'request',
694
1742
  source: 'json',
695
1743
  codec: {
696
1744
  mode: 'strict',
697
- typeSymbol: '@khorsheed/dsh-reader#reader/getRawBody:request',
698
- create: _khorsheed_dsh_reader_reader_getRawBody_parameter_0$schema,
699
- schema: _khorsheed_dsh_reader_reader_getRawBody_parameter_0$schema(),
1745
+ typeSymbol: '@khorsheed/dsh-reader#reader/localTranscript:request',
1746
+ create: _khorsheed_dsh_reader_reader_localTranscript_parameter_0$schema,
1747
+ schema: _khorsheed_dsh_reader_reader_localTranscript_parameter_0$schema(),
1748
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"}},"required":["entryId"],"additionalProperties":true},
1749
+ },
1750
+ strictCodec: {
1751
+ mode: 'strict',
1752
+ typeSymbol: '@khorsheed/dsh-reader#reader/localTranscript:request',
1753
+ create: _khorsheed_dsh_reader_reader_localTranscript_parameter_0_strict$schema,
1754
+ schema: _khorsheed_dsh_reader_reader_localTranscript_parameter_0_strict$schema(),
1755
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"}},"required":["entryId"],"additionalProperties":false},
700
1756
  },
701
1757
  },
702
1758
  ],
703
1759
  result: {
704
1760
  mode: 'strict',
705
- typeSymbol: '@khorsheed/dsh-reader#reader/getRawBody:result',
706
- create: _khorsheed_dsh_reader_reader_getRawBody_result$schema,
707
- schema: _khorsheed_dsh_reader_reader_getRawBody_result$schema(),
1761
+ typeSymbol: '@khorsheed/dsh-reader/types#LocalTranscriptStatus',
1762
+ create: _khorsheed_dsh_reader_reader_localTranscript_result$schema,
1763
+ schema: _khorsheed_dsh_reader_reader_localTranscript_result$schema(),
1764
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"state":{"type":"string","enum":["failed","unavailable","done","idle","queued","fetching","needs-models","transcribing","speakers"]},"progress":{"type":"number","description":"0–1 across fetching the audio and transcribing it."},"ahead":{"type":"number","description":"Jobs ahead in the engine's queue."},"bytes":{"type":"number","description":"Bytes of speech models still to download (`needs-models`)."},"html":{"type":"string","description":"The transcript so far (or in full, once `done`)."},"language":{"type":"string","description":"The language the transcript is in, once known."},"speakers":{"type":"number","description":"How many voices the transcript has, once the speakers pass settled it."},"error":{"type":"string"}},"required":["entryId","state"],"additionalProperties":true},
708
1765
  },
709
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":151,"column":3},
1766
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":386,"column":3},
710
1767
  },
711
- {
712
- id: '@khorsheed/dsh-reader#reader/getSentenceTranslations',
1768
+ 'reader/markSynced': {
713
1769
  service: 'readerRemote',
714
- namespace: 'reader',
715
- method: 'getSentenceTranslations',
1770
+ description: 'Remember that a note or a discussion note became a canvas card.',
716
1771
  invocation: { kind: 'direct' },
717
1772
  parameters: [
718
1773
  {
719
1774
  name: 'request',
720
- wire: 'request',
721
1775
  source: 'json',
722
1776
  codec: {
723
1777
  mode: 'strict',
724
- typeSymbol: '@khorsheed/dsh-reader#reader/getSentenceTranslations:request',
725
- create: _khorsheed_dsh_reader_reader_getSentenceTranslations_parameter_0$schema,
726
- schema: _khorsheed_dsh_reader_reader_getSentenceTranslations_parameter_0$schema(),
1778
+ typeSymbol: '@khorsheed/dsh-reader#reader/markSynced:request',
1779
+ create: _khorsheed_dsh_reader_reader_markSynced_parameter_0$schema,
1780
+ schema: _khorsheed_dsh_reader_reader_markSynced_parameter_0$schema(),
1781
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"noteId":{"type":"string"},"discussionId":{"type":"string"},"canvasId":{"type":"string"},"cardId":{"type":"string"},"canvasTitle":{"type":"string"}},"required":["entryId","canvasId","cardId","canvasTitle"],"additionalProperties":true},
1782
+ },
1783
+ strictCodec: {
1784
+ mode: 'strict',
1785
+ typeSymbol: '@khorsheed/dsh-reader#reader/markSynced:request',
1786
+ create: _khorsheed_dsh_reader_reader_markSynced_parameter_0_strict$schema,
1787
+ schema: _khorsheed_dsh_reader_reader_markSynced_parameter_0_strict$schema(),
1788
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"noteId":{"type":"string"},"discussionId":{"type":"string"},"canvasId":{"type":"string"},"cardId":{"type":"string"},"canvasTitle":{"type":"string"}},"required":["entryId","canvasId","cardId","canvasTitle"],"additionalProperties":false},
727
1789
  },
728
1790
  },
729
1791
  ],
730
1792
  result: {
731
1793
  mode: 'strict',
732
- typeSymbol: '@khorsheed/dsh-reader#reader/getSentenceTranslations:result',
733
- create: _khorsheed_dsh_reader_reader_getSentenceTranslations_result$schema,
734
- schema: _khorsheed_dsh_reader_reader_getSentenceTranslations_result$schema(),
1794
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderNoteOutcome',
1795
+ create: _khorsheed_dsh_reader_reader_markSynced_result$schema,
1796
+ schema: _khorsheed_dsh_reader_reader_markSynced_result$schema(),
1797
+ jsonSchema: {"type":"string","enum":["not-found","ok","empty","full"]},
735
1798
  },
736
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":174,"column":3},
1799
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":358,"column":3},
737
1800
  },
738
- {
739
- id: '@khorsheed/dsh-reader#reader/getStorageStats',
1801
+ 'reader/mediaStates': {
740
1802
  service: 'readerRemote',
741
- namespace: 'reader',
742
- method: 'getStorageStats',
1803
+ description: 'The wall\'s video / audio cards: what each one\'s transcript is (captions, local, transcribing…).',
743
1804
  invocation: { kind: 'direct' },
744
1805
  parameters: [
1806
+ {
1807
+ name: 'request',
1808
+ source: 'json',
1809
+ codec: {
1810
+ mode: 'strict',
1811
+ typeSymbol: '@khorsheed/dsh-reader#reader/mediaStates:request',
1812
+ create: _khorsheed_dsh_reader_reader_mediaStates_parameter_0$schema,
1813
+ schema: _khorsheed_dsh_reader_reader_mediaStates_parameter_0$schema(),
1814
+ jsonSchema: {"type":"object","properties":{"entryIds":{"type":"array","items":{"type":"string"}}},"required":["entryIds"],"additionalProperties":true},
1815
+ },
1816
+ strictCodec: {
1817
+ mode: 'strict',
1818
+ typeSymbol: '@khorsheed/dsh-reader#reader/mediaStates:request',
1819
+ create: _khorsheed_dsh_reader_reader_mediaStates_parameter_0_strict$schema,
1820
+ schema: _khorsheed_dsh_reader_reader_mediaStates_parameter_0_strict$schema(),
1821
+ jsonSchema: {"type":"object","properties":{"entryIds":{"type":"array","items":{"type":"string"}}},"required":["entryIds"],"additionalProperties":false},
1822
+ },
1823
+ },
745
1824
  ],
746
1825
  result: {
747
1826
  mode: 'strict',
748
- typeSymbol: '@khorsheed/dsh-reader/types#ReaderStorageStats',
749
- create: _khorsheed_dsh_reader_reader_getStorageStats_result$schema,
750
- schema: _khorsheed_dsh_reader_reader_getStorageStats_result$schema(),
1827
+ typeSymbol: '@khorsheed/dsh-reader/types#MediaCardStates',
1828
+ create: _khorsheed_dsh_reader_reader_mediaStates_result$schema,
1829
+ schema: _khorsheed_dsh_reader_reader_mediaStates_result$schema(),
1830
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
751
1831
  },
752
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":192,"column":3},
1832
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":404,"column":3},
753
1833
  },
754
- {
755
- id: '@khorsheed/dsh-reader#reader/listBackfillCandidates',
1834
+ 'reader/mediaTranscript': {
756
1835
  service: 'readerRemote',
757
- namespace: 'reader',
758
- method: 'listBackfillCandidates',
1836
+ description: 'A video entry\'s transcript from its platform captions (stored; `none` when it has none).',
759
1837
  invocation: { kind: 'direct' },
760
1838
  parameters: [
761
1839
  {
762
1840
  name: 'request',
763
- wire: 'request',
764
1841
  source: 'json',
765
1842
  codec: {
766
1843
  mode: 'strict',
767
- typeSymbol: '@khorsheed/dsh-reader#reader/listBackfillCandidates:request',
768
- create: _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0$schema,
769
- schema: _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0$schema(),
1844
+ typeSymbol: '@khorsheed/dsh-reader#reader/mediaTranscript:request',
1845
+ create: _khorsheed_dsh_reader_reader_mediaTranscript_parameter_0$schema,
1846
+ schema: _khorsheed_dsh_reader_reader_mediaTranscript_parameter_0$schema(),
1847
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"}},"required":["entryId","url"],"additionalProperties":true},
1848
+ },
1849
+ strictCodec: {
1850
+ mode: 'strict',
1851
+ typeSymbol: '@khorsheed/dsh-reader#reader/mediaTranscript:request',
1852
+ create: _khorsheed_dsh_reader_reader_mediaTranscript_parameter_0_strict$schema,
1853
+ schema: _khorsheed_dsh_reader_reader_mediaTranscript_parameter_0_strict$schema(),
1854
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"}},"required":["entryId","url"],"additionalProperties":false},
770
1855
  },
771
1856
  },
772
1857
  ],
773
1858
  result: {
774
1859
  mode: 'strict',
775
- typeSymbol: '@khorsheed/dsh-reader#reader/listBackfillCandidates:result',
776
- create: _khorsheed_dsh_reader_reader_listBackfillCandidates_result$schema,
777
- schema: _khorsheed_dsh_reader_reader_listBackfillCandidates_result$schema(),
1860
+ typeSymbol: '@khorsheed/dsh-reader#reader/mediaTranscript:result',
1861
+ create: _khorsheed_dsh_reader_reader_mediaTranscript_result$schema,
1862
+ schema: _khorsheed_dsh_reader_reader_mediaTranscript_result$schema(),
1863
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"html":{"type":"string"},"captions":{"type":"string","enum":["failed","none","platform"]},"language":{"type":"string"},"error":{"type":"string"}},"required":["entryId","captions"],"additionalProperties":true},
778
1864
  },
779
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":157,"column":3},
1865
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":370,"column":3},
780
1866
  },
781
- {
782
- id: '@khorsheed/dsh-reader#reader/listRecent',
1867
+ 'reader/nameSpeaker': {
783
1868
  service: 'readerRemote',
784
- namespace: 'reader',
785
- method: 'listRecent',
1869
+ description: 'Name one speaker of a transcript (empty: back to 说话人 A…); answers all the names.',
786
1870
  invocation: { kind: 'direct' },
787
1871
  parameters: [
1872
+ {
1873
+ name: 'request',
1874
+ source: 'json',
1875
+ codec: {
1876
+ mode: 'strict',
1877
+ typeSymbol: '@khorsheed/dsh-reader#reader/nameSpeaker:request',
1878
+ create: _khorsheed_dsh_reader_reader_nameSpeaker_parameter_0$schema,
1879
+ schema: _khorsheed_dsh_reader_reader_nameSpeaker_parameter_0$schema(),
1880
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"speaker":{"type":"number"},"name":{"type":"string"}},"required":["entryId","speaker","name"],"additionalProperties":true},
1881
+ },
1882
+ strictCodec: {
1883
+ mode: 'strict',
1884
+ typeSymbol: '@khorsheed/dsh-reader#reader/nameSpeaker:request',
1885
+ create: _khorsheed_dsh_reader_reader_nameSpeaker_parameter_0_strict$schema,
1886
+ schema: _khorsheed_dsh_reader_reader_nameSpeaker_parameter_0_strict$schema(),
1887
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"speaker":{"type":"number"},"name":{"type":"string"}},"required":["entryId","speaker","name"],"additionalProperties":false},
1888
+ },
1889
+ },
788
1890
  ],
789
1891
  result: {
790
1892
  mode: 'strict',
791
- typeSymbol: '@khorsheed/dsh-reader#reader/listRecent:result',
792
- create: _khorsheed_dsh_reader_reader_listRecent_result$schema,
793
- schema: _khorsheed_dsh_reader_reader_listRecent_result$schema(),
1893
+ typeSymbol: '@khorsheed/dsh-reader#reader/nameSpeaker:result',
1894
+ create: _khorsheed_dsh_reader_reader_nameSpeaker_result$schema,
1895
+ schema: _khorsheed_dsh_reader_reader_nameSpeaker_result$schema(),
1896
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
794
1897
  },
795
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":268,"column":3},
1898
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":398,"column":3},
796
1899
  },
797
- {
798
- id: '@khorsheed/dsh-reader#reader/listSources',
1900
+ 'reader/noteCounts': {
799
1901
  service: 'readerRemote',
800
- namespace: 'reader',
801
- method: 'listSources',
1902
+ description: 'How many notes each article carries.',
802
1903
  invocation: { kind: 'direct' },
803
1904
  parameters: [
804
1905
  ],
805
1906
  result: {
806
1907
  mode: 'strict',
807
- typeSymbol: '@khorsheed/dsh-reader#reader/listSources:result',
808
- create: _khorsheed_dsh_reader_reader_listSources_result$schema,
809
- schema: _khorsheed_dsh_reader_reader_listSources_result$schema(),
1908
+ typeSymbol: '@khorsheed/dsh-reader#reader/noteCounts:result',
1909
+ create: _khorsheed_dsh_reader_reader_noteCounts_result$schema,
1910
+ schema: _khorsheed_dsh_reader_reader_noteCounts_result$schema(),
1911
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
810
1912
  },
811
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":65,"column":9},
1913
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":316,"column":9},
812
1914
  },
813
- {
814
- id: '@khorsheed/dsh-reader#reader/listTags',
1915
+ 'reader/polish': {
815
1916
  service: 'readerRemote',
816
- namespace: 'reader',
817
- method: 'listTags',
1917
+ description: 'The article\'s 润色 layer (the agent\'s translation), when there is one for its current text.',
818
1918
  invocation: { kind: 'direct' },
819
1919
  parameters: [
1920
+ {
1921
+ name: 'request',
1922
+ source: 'json',
1923
+ codec: {
1924
+ mode: 'strict',
1925
+ typeSymbol: '@khorsheed/dsh-reader#reader/polish:request',
1926
+ create: _khorsheed_dsh_reader_reader_polish_parameter_0$schema,
1927
+ schema: _khorsheed_dsh_reader_reader_polish_parameter_0$schema(),
1928
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"}},"required":["entryId"],"additionalProperties":true},
1929
+ },
1930
+ strictCodec: {
1931
+ mode: 'strict',
1932
+ typeSymbol: '@khorsheed/dsh-reader#reader/polish:request',
1933
+ create: _khorsheed_dsh_reader_reader_polish_parameter_0_strict$schema,
1934
+ schema: _khorsheed_dsh_reader_reader_polish_parameter_0_strict$schema(),
1935
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"}},"required":["entryId"],"additionalProperties":false},
1936
+ },
1937
+ },
820
1938
  ],
821
1939
  result: {
822
1940
  mode: 'strict',
823
- typeSymbol: '@khorsheed/dsh-reader#reader/listTags:result',
824
- create: _khorsheed_dsh_reader_reader_listTags_result$schema,
825
- schema: _khorsheed_dsh_reader_reader_listTags_result$schema(),
1941
+ typeSymbol: '@khorsheed/dsh-reader#reader/polish:result',
1942
+ create: _khorsheed_dsh_reader_reader_polish_result$schema,
1943
+ schema: _khorsheed_dsh_reader_reader_polish_result$schema(),
1944
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
826
1945
  },
827
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":204,"column":3},
1946
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":416,"column":3},
828
1947
  },
829
- {
830
- id: '@khorsheed/dsh-reader#reader/pruneTags',
1948
+ 'reader/pruneTags': {
831
1949
  service: 'readerRemote',
832
- namespace: 'reader',
833
- method: 'pruneTags',
1950
+ description: 'Drop tags nothing references any more.',
834
1951
  invocation: { kind: 'direct' },
835
1952
  parameters: [
836
1953
  ],
@@ -839,25 +1956,31 @@ export const TYPERT = {
839
1956
  typeSymbol: '@khorsheed/dsh-reader#reader/pruneTags:result',
840
1957
  create: _khorsheed_dsh_reader_reader_pruneTags_result$schema,
841
1958
  schema: _khorsheed_dsh_reader_reader_pruneTags_result$schema(),
1959
+ jsonSchema: {"type":"object","properties":{"removed":{"type":"number"}},"required":["removed"],"additionalProperties":true},
842
1960
  },
843
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":251,"column":3},
1961
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":269,"column":3},
844
1962
  },
845
- {
846
- id: '@khorsheed/dsh-reader#reader/quoteToSideChat',
1963
+ 'reader/quoteToSideChat': {
847
1964
  service: 'readerRemote',
848
- namespace: 'reader',
849
- method: 'quoteToSideChat',
1965
+ description: 'Forward a ref block to the side-chat service when one is composed.',
850
1966
  invocation: { kind: 'direct' },
851
1967
  parameters: [
852
1968
  {
853
1969
  name: 'request',
854
- wire: 'request',
855
1970
  source: 'json',
856
1971
  codec: {
857
1972
  mode: 'strict',
858
1973
  typeSymbol: '@khorsheed/dsh-reader#reader/quoteToSideChat:request',
859
1974
  create: _khorsheed_dsh_reader_reader_quoteToSideChat_parameter_0$schema,
860
1975
  schema: _khorsheed_dsh_reader_reader_quoteToSideChat_parameter_0$schema(),
1976
+ jsonSchema: {"type":"object","properties":{"contextKey":{"type":"string"},"label":{"type":"string"},"text":{"type":"string"}},"required":["contextKey","label","text"],"additionalProperties":true},
1977
+ },
1978
+ strictCodec: {
1979
+ mode: 'strict',
1980
+ typeSymbol: '@khorsheed/dsh-reader#reader/quoteToSideChat:request',
1981
+ create: _khorsheed_dsh_reader_reader_quoteToSideChat_parameter_0_strict$schema,
1982
+ schema: _khorsheed_dsh_reader_reader_quoteToSideChat_parameter_0_strict$schema(),
1983
+ jsonSchema: {"type":"object","properties":{"contextKey":{"type":"string"},"label":{"type":"string"},"text":{"type":"string"}},"required":["contextKey","label","text"],"additionalProperties":false},
861
1984
  },
862
1985
  },
863
1986
  ],
@@ -866,25 +1989,64 @@ export const TYPERT = {
866
1989
  typeSymbol: '@khorsheed/dsh-reader#reader/quoteToSideChat:result',
867
1990
  create: _khorsheed_dsh_reader_reader_quoteToSideChat_result$schema,
868
1991
  schema: _khorsheed_dsh_reader_reader_quoteToSideChat_result$schema(),
1992
+ jsonSchema: {"type":"string","enum":["unavailable","ok"]},
1993
+ },
1994
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":298,"column":3},
1995
+ },
1996
+ 'reader/recordDiscussion': {
1997
+ service: 'readerRemote',
1998
+ description: 'Remember that a conversation discussed this article.',
1999
+ invocation: { kind: 'direct' },
2000
+ parameters: [
2001
+ {
2002
+ name: 'request',
2003
+ source: 'json',
2004
+ codec: {
2005
+ mode: 'strict',
2006
+ typeSymbol: '@khorsheed/dsh-reader#reader/recordDiscussion:request',
2007
+ create: _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0$schema,
2008
+ schema: _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0$schema(),
2009
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"source":{"type":"string"},"sessionId":{"type":"string"},"sessionTitle":{"type":"string"}},"required":["entryId","title","sessionId"],"additionalProperties":true},
2010
+ },
2011
+ strictCodec: {
2012
+ mode: 'strict',
2013
+ typeSymbol: '@khorsheed/dsh-reader#reader/recordDiscussion:request',
2014
+ create: _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0_strict$schema,
2015
+ schema: _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0_strict$schema(),
2016
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"source":{"type":"string"},"sessionId":{"type":"string"},"sessionTitle":{"type":"string"}},"required":["entryId","title","sessionId"],"additionalProperties":false},
2017
+ },
2018
+ },
2019
+ ],
2020
+ result: {
2021
+ mode: 'strict',
2022
+ typeSymbol: '@khorsheed/dsh-reader#reader/recordDiscussion:result',
2023
+ create: _khorsheed_dsh_reader_reader_recordDiscussion_result$schema,
2024
+ schema: _khorsheed_dsh_reader_reader_recordDiscussion_result$schema(),
2025
+ jsonSchema: {"type":"string","enum":["ok","empty"]},
869
2026
  },
870
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":280,"column":3},
2027
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":340,"column":3},
871
2028
  },
872
- {
873
- id: '@khorsheed/dsh-reader#reader/recordRead',
2029
+ 'reader/recordRead': {
874
2030
  service: 'readerRemote',
875
- namespace: 'reader',
876
- method: 'recordRead',
2031
+ description: 'Record that the reader opened one entry (the recent page\'s write half).',
877
2032
  invocation: { kind: 'direct' },
878
2033
  parameters: [
879
2034
  {
880
2035
  name: 'request',
881
- wire: 'request',
882
2036
  source: 'json',
883
2037
  codec: {
884
2038
  mode: 'strict',
885
2039
  typeSymbol: '@khorsheed/dsh-reader#reader/recordRead:request',
886
2040
  create: _khorsheed_dsh_reader_reader_recordRead_parameter_0$schema,
887
2041
  schema: _khorsheed_dsh_reader_reader_recordRead_parameter_0$schema(),
2042
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"sourceId":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":["entryId","sourceId","title"],"additionalProperties":true},
2043
+ },
2044
+ strictCodec: {
2045
+ mode: 'strict',
2046
+ typeSymbol: '@khorsheed/dsh-reader#reader/recordRead:request',
2047
+ create: _khorsheed_dsh_reader_reader_recordRead_parameter_0_strict$schema,
2048
+ schema: _khorsheed_dsh_reader_reader_recordRead_parameter_0_strict$schema(),
2049
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"sourceId":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":["entryId","sourceId","title"],"additionalProperties":false},
888
2050
  },
889
2051
  },
890
2052
  ],
@@ -893,25 +2055,31 @@ export const TYPERT = {
893
2055
  typeSymbol: '@khorsheed/dsh-reader#reader/recordRead:result',
894
2056
  create: _khorsheed_dsh_reader_reader_recordRead_result$schema,
895
2057
  schema: _khorsheed_dsh_reader_reader_recordRead_result$schema(),
2058
+ jsonSchema: {"type":"object","properties":{"entries":{"type":"number"}},"required":["entries"],"additionalProperties":true},
896
2059
  },
897
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":257,"column":3},
2060
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":275,"column":3},
898
2061
  },
899
- {
900
- id: '@khorsheed/dsh-reader#reader/refresh',
2062
+ 'reader/refresh': {
901
2063
  service: 'readerRemote',
902
- namespace: 'reader',
903
- method: 'refresh',
2064
+ description: 'Fetch the named sources (or every enabled one) now.',
904
2065
  invocation: { kind: 'direct' },
905
2066
  parameters: [
906
2067
  {
907
2068
  name: 'request',
908
- wire: 'request',
909
2069
  source: 'json',
910
2070
  codec: {
911
2071
  mode: 'strict',
912
2072
  typeSymbol: '@khorsheed/dsh-reader#reader/refresh:request',
913
2073
  create: _khorsheed_dsh_reader_reader_refresh_parameter_0$schema,
914
2074
  schema: _khorsheed_dsh_reader_reader_refresh_parameter_0$schema(),
2075
+ jsonSchema: {"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":true},
2076
+ },
2077
+ strictCodec: {
2078
+ mode: 'strict',
2079
+ typeSymbol: '@khorsheed/dsh-reader#reader/refresh:request',
2080
+ create: _khorsheed_dsh_reader_reader_refresh_parameter_0_strict$schema,
2081
+ schema: _khorsheed_dsh_reader_reader_refresh_parameter_0_strict$schema(),
2082
+ jsonSchema: {"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},
915
2083
  },
916
2084
  },
917
2085
  ],
@@ -920,25 +2088,31 @@ export const TYPERT = {
920
2088
  typeSymbol: '@khorsheed/dsh-reader#reader/refresh:result',
921
2089
  create: _khorsheed_dsh_reader_reader_refresh_result$schema,
922
2090
  schema: _khorsheed_dsh_reader_reader_refresh_result$schema(),
2091
+ jsonSchema: {"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["unavailable","ok","fetch-failed","truncated"]},"message":{"type":"string"}},"required":["id","status"],"additionalProperties":true}}},"required":["results"],"additionalProperties":true},
923
2092
  },
924
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":95,"column":9},
2093
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":103,"column":9},
925
2094
  },
926
- {
927
- id: '@khorsheed/dsh-reader#reader/rememberSentences',
2095
+ 'reader/rememberSentences': {
928
2096
  service: 'readerRemote',
929
- namespace: 'reader',
930
- method: 'rememberSentences',
2097
+ description: 'Persist what one translation run learned (and refresh what it reused), in one batch.',
931
2098
  invocation: { kind: 'direct' },
932
2099
  parameters: [
933
2100
  {
934
2101
  name: 'request',
935
- wire: 'request',
936
2102
  source: 'json',
937
2103
  codec: {
938
2104
  mode: 'strict',
939
2105
  typeSymbol: '@khorsheed/dsh-reader#reader/rememberSentences:request',
940
2106
  create: _khorsheed_dsh_reader_reader_rememberSentences_parameter_0$schema,
941
2107
  schema: _khorsheed_dsh_reader_reader_rememberSentences_parameter_0$schema(),
2108
+ jsonSchema: {"type":"object","properties":{"pair":{"type":"string"},"entries":{"type":"array","items":{"type":"object","properties":{"hash":{"type":"string","description":"The client's `translationHash(source)`, stored opaquely."},"source":{"type":"string"},"target":{"type":"string"}},"required":["hash","source","target"],"additionalProperties":true}},"recalled":{"type":"array","items":{"type":"object","properties":{"hash":{"type":"string","description":"The client's `translationHash(source)`, stored opaquely."},"source":{"type":"string"},"target":{"type":"string"}},"required":["hash","source","target"],"additionalProperties":true}},"entryId":{"type":"string"},"bodyHash":{"type":"string"}},"required":["pair","entries"],"additionalProperties":true},
2109
+ },
2110
+ strictCodec: {
2111
+ mode: 'strict',
2112
+ typeSymbol: '@khorsheed/dsh-reader#reader/rememberSentences:request',
2113
+ create: _khorsheed_dsh_reader_reader_rememberSentences_parameter_0_strict$schema,
2114
+ schema: _khorsheed_dsh_reader_reader_rememberSentences_parameter_0_strict$schema(),
2115
+ jsonSchema: {"type":"object","properties":{"pair":{"type":"string"},"entries":{"type":"array","items":{"type":"object","properties":{"hash":{"type":"string","description":"The client's `translationHash(source)`, stored opaquely."},"source":{"type":"string"},"target":{"type":"string"}},"required":["hash","source","target"],"additionalProperties":false}},"recalled":{"type":"array","items":{"type":"object","properties":{"hash":{"type":"string","description":"The client's `translationHash(source)`, stored opaquely."},"source":{"type":"string"},"target":{"type":"string"}},"required":["hash","source","target"],"additionalProperties":false}},"entryId":{"type":"string"},"bodyHash":{"type":"string"}},"required":["pair","entries"],"additionalProperties":false},
942
2116
  },
943
2117
  },
944
2118
  ],
@@ -947,25 +2121,31 @@ export const TYPERT = {
947
2121
  typeSymbol: '@khorsheed/dsh-reader#reader/rememberSentences:result',
948
2122
  create: _khorsheed_dsh_reader_reader_rememberSentences_result$schema,
949
2123
  schema: _khorsheed_dsh_reader_reader_rememberSentences_result$schema(),
2124
+ jsonSchema: {"type":"object","properties":{"stored":{"type":"number"}},"required":["stored"],"additionalProperties":true},
950
2125
  },
951
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":180,"column":3},
2126
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":198,"column":3},
952
2127
  },
953
- {
954
- id: '@khorsheed/dsh-reader#reader/removeSource',
2128
+ 'reader/removeSource': {
955
2129
  service: 'readerRemote',
956
- namespace: 'reader',
957
- method: 'removeSource',
2130
+ description: 'Drop a source; its entries\' translations go with it (their bodies stay for the budget).',
958
2131
  invocation: { kind: 'direct' },
959
2132
  parameters: [
960
2133
  {
961
2134
  name: 'request',
962
- wire: 'request',
963
2135
  source: 'json',
964
2136
  codec: {
965
2137
  mode: 'strict',
966
2138
  typeSymbol: '@khorsheed/dsh-reader#reader/removeSource:request',
967
2139
  create: _khorsheed_dsh_reader_reader_removeSource_parameter_0$schema,
968
2140
  schema: _khorsheed_dsh_reader_reader_removeSource_parameter_0$schema(),
2141
+ jsonSchema: {"type":"object","properties":{"id":{"type":"string"},"entryIds":{"type":"array","items":{"type":"string"}}},"required":["id"],"additionalProperties":true},
2142
+ },
2143
+ strictCodec: {
2144
+ mode: 'strict',
2145
+ typeSymbol: '@khorsheed/dsh-reader#reader/removeSource:request',
2146
+ create: _khorsheed_dsh_reader_reader_removeSource_parameter_0_strict$schema,
2147
+ schema: _khorsheed_dsh_reader_reader_removeSource_parameter_0_strict$schema(),
2148
+ jsonSchema: {"type":"object","properties":{"id":{"type":"string"},"entryIds":{"type":"array","items":{"type":"string"}}},"required":["id"],"additionalProperties":false},
969
2149
  },
970
2150
  },
971
2151
  ],
@@ -974,25 +2154,31 @@ export const TYPERT = {
974
2154
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderMutationOutcome',
975
2155
  create: _khorsheed_dsh_reader_reader_removeSource_result$schema,
976
2156
  schema: _khorsheed_dsh_reader_reader_removeSource_result$schema(),
2157
+ jsonSchema: {"type":"string","enum":["not-found","unavailable","duplicate","ok","invalid-url","invalid-time"]},
977
2158
  },
978
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":89,"column":3},
2159
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":97,"column":3},
979
2160
  },
980
- {
981
- id: '@khorsheed/dsh-reader#reader/renameTag',
2161
+ 'reader/renameTag': {
982
2162
  service: 'readerRemote',
983
- namespace: 'reader',
984
- method: 'renameTag',
2163
+ description: 'Rename a tag without touching the entries that carry it.',
985
2164
  invocation: { kind: 'direct' },
986
2165
  parameters: [
987
2166
  {
988
2167
  name: 'request',
989
- wire: 'request',
990
2168
  source: 'json',
991
2169
  codec: {
992
2170
  mode: 'strict',
993
2171
  typeSymbol: '@khorsheed/dsh-reader#reader/renameTag:request',
994
2172
  create: _khorsheed_dsh_reader_reader_renameTag_parameter_0$schema,
995
2173
  schema: _khorsheed_dsh_reader_reader_renameTag_parameter_0$schema(),
2174
+ jsonSchema: {"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":true},
2175
+ },
2176
+ strictCodec: {
2177
+ mode: 'strict',
2178
+ typeSymbol: '@khorsheed/dsh-reader#reader/renameTag:request',
2179
+ create: _khorsheed_dsh_reader_reader_renameTag_parameter_0_strict$schema,
2180
+ schema: _khorsheed_dsh_reader_reader_renameTag_parameter_0_strict$schema(),
2181
+ jsonSchema: {"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},
996
2182
  },
997
2183
  },
998
2184
  ],
@@ -1001,25 +2187,30 @@ export const TYPERT = {
1001
2187
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderAnnotationOutcome',
1002
2188
  create: _khorsheed_dsh_reader_reader_renameTag_result$schema,
1003
2189
  schema: _khorsheed_dsh_reader_reader_renameTag_result$schema(),
2190
+ jsonSchema: {"type":"string","enum":["not-found","unavailable","duplicate","ok","empty","invalid"]},
1004
2191
  },
1005
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":216,"column":3},
2192
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":234,"column":3},
1006
2193
  },
1007
- {
1008
- id: '@khorsheed/dsh-reader#reader/setCachePolicy',
2194
+ 'reader/setCachePolicy': {
1009
2195
  service: 'readerRemote',
1010
- namespace: 'reader',
1011
- method: 'setCachePolicy',
1012
2196
  invocation: { kind: 'direct' },
1013
2197
  parameters: [
1014
2198
  {
1015
2199
  name: 'request',
1016
- wire: 'request',
1017
2200
  source: 'json',
1018
2201
  codec: {
1019
2202
  mode: 'strict',
1020
2203
  typeSymbol: '@khorsheed/dsh-reader#reader/setCachePolicy:request',
1021
2204
  create: _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema,
1022
2205
  schema: _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema(),
2206
+ jsonSchema: {"type":"object","properties":{"ttlHours":{"type":"number"},"maxEntries":{"type":"number"},"translationBudgetChars":{"type":"number"}},"required":["ttlHours"],"additionalProperties":true},
2207
+ },
2208
+ strictCodec: {
2209
+ mode: 'strict',
2210
+ typeSymbol: '@khorsheed/dsh-reader#reader/setCachePolicy:request',
2211
+ create: _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0_strict$schema,
2212
+ schema: _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0_strict$schema(),
2213
+ jsonSchema: {"type":"object","properties":{"ttlHours":{"type":"number"},"maxEntries":{"type":"number"},"translationBudgetChars":{"type":"number"}},"required":["ttlHours"],"additionalProperties":false},
1023
2214
  },
1024
2215
  },
1025
2216
  ],
@@ -1028,25 +2219,163 @@ export const TYPERT = {
1028
2219
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderAnnotationOutcome',
1029
2220
  create: _khorsheed_dsh_reader_reader_setCachePolicy_result$schema,
1030
2221
  schema: _khorsheed_dsh_reader_reader_setCachePolicy_result$schema(),
2222
+ jsonSchema: {"type":"string","enum":["not-found","unavailable","duplicate","ok","empty","invalid"]},
2223
+ },
2224
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":263,"column":3},
2225
+ },
2226
+ 'reader/setPolishOff': {
2227
+ service: 'readerRemote',
2228
+ description: 'Show one paragraph\'s machine translation instead of the 润色 (or back).',
2229
+ invocation: { kind: 'direct' },
2230
+ parameters: [
2231
+ {
2232
+ name: 'request',
2233
+ source: 'json',
2234
+ codec: {
2235
+ mode: 'strict',
2236
+ typeSymbol: '@khorsheed/dsh-reader#reader/setPolishOff:request',
2237
+ create: _khorsheed_dsh_reader_reader_setPolishOff_parameter_0$schema,
2238
+ schema: _khorsheed_dsh_reader_reader_setPolishOff_parameter_0$schema(),
2239
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"paragraph":{"type":"number"},"off":{"type":"boolean"}},"required":["entryId","paragraph","off"],"additionalProperties":true},
2240
+ },
2241
+ strictCodec: {
2242
+ mode: 'strict',
2243
+ typeSymbol: '@khorsheed/dsh-reader#reader/setPolishOff:request',
2244
+ create: _khorsheed_dsh_reader_reader_setPolishOff_parameter_0_strict$schema,
2245
+ schema: _khorsheed_dsh_reader_reader_setPolishOff_parameter_0_strict$schema(),
2246
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"paragraph":{"type":"number"},"off":{"type":"boolean"}},"required":["entryId","paragraph","off"],"additionalProperties":false},
2247
+ },
2248
+ },
2249
+ ],
2250
+ result: {
2251
+ mode: 'strict',
2252
+ typeSymbol: '@khorsheed/dsh-reader#reader/setPolishOff:result',
2253
+ create: _khorsheed_dsh_reader_reader_setPolishOff_result$schema,
2254
+ schema: _khorsheed_dsh_reader_reader_setPolishOff_result$schema(),
2255
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
2256
+ },
2257
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":422,"column":3},
2258
+ },
2259
+ 'reader/snapshotEntry': {
2260
+ service: 'readerRemote',
2261
+ description: 'Hand the host the article\'s original text, block by block, for the model to read.',
2262
+ invocation: { kind: 'direct' },
2263
+ parameters: [
2264
+ {
2265
+ name: 'request',
2266
+ source: 'json',
2267
+ codec: {
2268
+ mode: 'strict',
2269
+ typeSymbol: '@khorsheed/dsh-reader#reader/snapshotEntry:request',
2270
+ create: _khorsheed_dsh_reader_reader_snapshotEntry_parameter_0$schema,
2271
+ schema: _khorsheed_dsh_reader_reader_snapshotEntry_parameter_0$schema(),
2272
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"source":{"type":"string"},"paragraphs":{"type":"array","items":{"type":"string"}}},"required":["entryId","title","paragraphs"],"additionalProperties":true},
2273
+ },
2274
+ strictCodec: {
2275
+ mode: 'strict',
2276
+ typeSymbol: '@khorsheed/dsh-reader#reader/snapshotEntry:request',
2277
+ create: _khorsheed_dsh_reader_reader_snapshotEntry_parameter_0_strict$schema,
2278
+ schema: _khorsheed_dsh_reader_reader_snapshotEntry_parameter_0_strict$schema(),
2279
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"source":{"type":"string"},"paragraphs":{"type":"array","items":{"type":"string"}}},"required":["entryId","title","paragraphs"],"additionalProperties":false},
2280
+ },
2281
+ },
2282
+ ],
2283
+ result: {
2284
+ mode: 'strict',
2285
+ typeSymbol: '@khorsheed/dsh-reader#reader/snapshotEntry:result',
2286
+ create: _khorsheed_dsh_reader_reader_snapshotEntry_result$schema,
2287
+ schema: _khorsheed_dsh_reader_reader_snapshotEntry_result$schema(),
2288
+ jsonSchema: {"type":"string","enum":["ok","empty"]},
1031
2289
  },
1032
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":245,"column":3},
2290
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":428,"column":3},
1033
2291
  },
1034
- {
1035
- id: '@khorsheed/dsh-reader#reader/storeEntryBody',
2292
+ 'reader/speakerNames': {
1036
2293
  service: 'readerRemote',
1037
- namespace: 'reader',
1038
- method: 'storeEntryBody',
2294
+ description: 'The reader\'s names for a transcript\'s speakers, by index.',
2295
+ invocation: { kind: 'direct' },
2296
+ parameters: [
2297
+ {
2298
+ name: 'request',
2299
+ source: 'json',
2300
+ codec: {
2301
+ mode: 'strict',
2302
+ typeSymbol: '@khorsheed/dsh-reader#reader/speakerNames:request',
2303
+ create: _khorsheed_dsh_reader_reader_speakerNames_parameter_0$schema,
2304
+ schema: _khorsheed_dsh_reader_reader_speakerNames_parameter_0$schema(),
2305
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"}},"required":["entryId"],"additionalProperties":true},
2306
+ },
2307
+ strictCodec: {
2308
+ mode: 'strict',
2309
+ typeSymbol: '@khorsheed/dsh-reader#reader/speakerNames:request',
2310
+ create: _khorsheed_dsh_reader_reader_speakerNames_parameter_0_strict$schema,
2311
+ schema: _khorsheed_dsh_reader_reader_speakerNames_parameter_0_strict$schema(),
2312
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"}},"required":["entryId"],"additionalProperties":false},
2313
+ },
2314
+ },
2315
+ ],
2316
+ result: {
2317
+ mode: 'strict',
2318
+ typeSymbol: '@khorsheed/dsh-reader#reader/speakerNames:result',
2319
+ create: _khorsheed_dsh_reader_reader_speakerNames_result$schema,
2320
+ schema: _khorsheed_dsh_reader_reader_speakerNames_result$schema(),
2321
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
2322
+ },
2323
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":392,"column":3},
2324
+ },
2325
+ 'reader/startLocalTranscript': {
2326
+ service: 'readerRemote',
2327
+ description: 'Start (or rejoin) local transcription of an entry without captions. Answers `unavailable` without the transcription plugin and `needs-models` until the first model download is confirmed.',
2328
+ invocation: { kind: 'direct' },
2329
+ parameters: [
2330
+ {
2331
+ name: 'request',
2332
+ source: 'json',
2333
+ codec: {
2334
+ mode: 'strict',
2335
+ typeSymbol: '@khorsheed/dsh-reader#reader/startLocalTranscript:request',
2336
+ create: _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0$schema,
2337
+ schema: _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0$schema(),
2338
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"},"media":{"type":"object","properties":{"kind":{"type":"string","enum":["video","audio"]},"provider":{"type":"string","enum":["youtube","bilibili","xiaoyuzhou","enclosure"]},"ref":{"type":"string","description":"The platform's id (YouTube video id, Bilibili BV id) or the audio URL."},"durationSec":{"type":"number"},"thumbnail":{"type":"string"}},"required":["kind","provider","ref"],"additionalProperties":true},"title":{"type":"string"},"confirmModels":{"type":"boolean"}},"required":["entryId","url","media"],"additionalProperties":true},
2339
+ },
2340
+ strictCodec: {
2341
+ mode: 'strict',
2342
+ typeSymbol: '@khorsheed/dsh-reader#reader/startLocalTranscript:request',
2343
+ create: _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0_strict$schema,
2344
+ schema: _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0_strict$schema(),
2345
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"},"media":{"type":"object","properties":{"kind":{"type":"string","enum":["video","audio"]},"provider":{"type":"string","enum":["youtube","bilibili","xiaoyuzhou","enclosure"]},"ref":{"type":"string","description":"The platform's id (YouTube video id, Bilibili BV id) or the audio URL."},"durationSec":{"type":"number"},"thumbnail":{"type":"string"}},"required":["kind","provider","ref"],"additionalProperties":false},"title":{"type":"string"},"confirmModels":{"type":"boolean"}},"required":["entryId","url","media"],"additionalProperties":false},
2346
+ },
2347
+ },
2348
+ ],
2349
+ result: {
2350
+ mode: 'strict',
2351
+ typeSymbol: '@khorsheed/dsh-reader/types#LocalTranscriptStatus',
2352
+ create: _khorsheed_dsh_reader_reader_startLocalTranscript_result$schema,
2353
+ schema: _khorsheed_dsh_reader_reader_startLocalTranscript_result$schema(),
2354
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"state":{"type":"string","enum":["failed","unavailable","done","idle","queued","fetching","needs-models","transcribing","speakers"]},"progress":{"type":"number","description":"0–1 across fetching the audio and transcribing it."},"ahead":{"type":"number","description":"Jobs ahead in the engine's queue."},"bytes":{"type":"number","description":"Bytes of speech models still to download (`needs-models`)."},"html":{"type":"string","description":"The transcript so far (or in full, once `done`)."},"language":{"type":"string","description":"The language the transcript is in, once known."},"speakers":{"type":"number","description":"How many voices the transcript has, once the speakers pass settled it."},"error":{"type":"string"}},"required":["entryId","state"],"additionalProperties":true},
2355
+ },
2356
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":380,"column":3},
2357
+ },
2358
+ 'reader/storeEntryBody': {
2359
+ service: 'readerRemote',
2360
+ description: 'Cache the markup the browser extracted for one entry.',
1039
2361
  invocation: { kind: 'direct' },
1040
2362
  parameters: [
1041
2363
  {
1042
2364
  name: 'request',
1043
- wire: 'request',
1044
2365
  source: 'json',
1045
2366
  codec: {
1046
2367
  mode: 'strict',
1047
2368
  typeSymbol: '@khorsheed/dsh-reader#reader/storeEntryBody:request',
1048
2369
  create: _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema,
1049
2370
  schema: _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema(),
2371
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"},"html":{"type":"string"},"truncated":{"type":"boolean"},"scriptFigures":{"type":"number"},"bodyHash":{"type":"string"},"title":{"type":"string","description":"The article's own title, as extracted — the saved link's card upgrade."},"excerpt":{"type":"string","description":"A short excerpt (abstract / first paragraph), with the title."}},"required":["entryId","url","html"],"additionalProperties":true},
2372
+ },
2373
+ strictCodec: {
2374
+ mode: 'strict',
2375
+ typeSymbol: '@khorsheed/dsh-reader#reader/storeEntryBody:request',
2376
+ create: _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0_strict$schema,
2377
+ schema: _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0_strict$schema(),
2378
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"},"html":{"type":"string"},"truncated":{"type":"boolean"},"scriptFigures":{"type":"number"},"bodyHash":{"type":"string"},"title":{"type":"string","description":"The article's own title, as extracted — the saved link's card upgrade."},"excerpt":{"type":"string","description":"A short excerpt (abstract / first paragraph), with the title."}},"required":["entryId","url","html"],"additionalProperties":false},
1050
2379
  },
1051
2380
  },
1052
2381
  ],
@@ -1055,25 +2384,31 @@ export const TYPERT = {
1055
2384
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderEntryBodyView',
1056
2385
  create: _khorsheed_dsh_reader_reader_storeEntryBody_result$schema,
1057
2386
  schema: _khorsheed_dsh_reader_reader_storeEntryBody_result$schema(),
2387
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"cached":{"type":"boolean","description":"True when this body is a cached fetch rather than the feed's own payload."},"fresh":{"type":"boolean","description":"False when the cache's deadline has passed: the view offers the fetch."},"fromFeed":{"type":"boolean","description":"True when the feed's payload already carries full text for this entry."},"html":{"type":"string"},"fetchedAt":{"type":"string"},"truncated":{"type":"boolean"},"scriptFigures":{"type":"number","description":"Figures this page draws with scripts — the detail view says so."},"rendered":{"type":"boolean","description":"True when this body came from a rendered fetch (the「重新抓取」route reads it)."},"error":{"type":"string","description":"Why a fetch could not produce a body, when one was attempted."}},"required":["entryId","cached","fresh","fromFeed"],"additionalProperties":true},
1058
2388
  },
1059
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":128,"column":3},
2389
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":146,"column":3},
1060
2390
  },
1061
- {
1062
- id: '@khorsheed/dsh-reader#reader/tagEntry',
2391
+ 'reader/tagEntry': {
1063
2392
  service: 'readerRemote',
1064
- namespace: 'reader',
1065
- method: 'tagEntry',
2393
+ description: 'Add or remove one tag on one entry.',
1066
2394
  invocation: { kind: 'direct' },
1067
2395
  parameters: [
1068
2396
  {
1069
2397
  name: 'request',
1070
- wire: 'request',
1071
2398
  source: 'json',
1072
2399
  codec: {
1073
2400
  mode: 'strict',
1074
2401
  typeSymbol: '@khorsheed/dsh-reader#reader/tagEntry:request',
1075
2402
  create: _khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema,
1076
2403
  schema: _khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema(),
2404
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"tagId":{"type":"string"},"on":{"type":"boolean"}},"required":["entryId","tagId","on"],"additionalProperties":true},
2405
+ },
2406
+ strictCodec: {
2407
+ mode: 'strict',
2408
+ typeSymbol: '@khorsheed/dsh-reader#reader/tagEntry:request',
2409
+ create: _khorsheed_dsh_reader_reader_tagEntry_parameter_0_strict$schema,
2410
+ schema: _khorsheed_dsh_reader_reader_tagEntry_parameter_0_strict$schema(),
2411
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"tagId":{"type":"string"},"on":{"type":"boolean"}},"required":["entryId","tagId","on"],"additionalProperties":false},
1077
2412
  },
1078
2413
  },
1079
2414
  ],
@@ -1082,25 +2417,64 @@ export const TYPERT = {
1082
2417
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderAnnotationOutcome',
1083
2418
  create: _khorsheed_dsh_reader_reader_tagEntry_result$schema,
1084
2419
  schema: _khorsheed_dsh_reader_reader_tagEntry_result$schema(),
2420
+ jsonSchema: {"type":"string","enum":["not-found","unavailable","duplicate","ok","empty","invalid"]},
2421
+ },
2422
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":246,"column":3},
2423
+ },
2424
+ 'reader/updateNote': {
2425
+ service: 'readerRemote',
2426
+ description: 'Change or clear one note\'s comment.',
2427
+ invocation: { kind: 'direct' },
2428
+ parameters: [
2429
+ {
2430
+ name: 'request',
2431
+ source: 'json',
2432
+ codec: {
2433
+ mode: 'strict',
2434
+ typeSymbol: '@khorsheed/dsh-reader#reader/updateNote:request',
2435
+ create: _khorsheed_dsh_reader_reader_updateNote_parameter_0$schema,
2436
+ schema: _khorsheed_dsh_reader_reader_updateNote_parameter_0$schema(),
2437
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"noteId":{"type":"string"},"comment":{"type":"string"}},"required":["entryId","noteId","comment"],"additionalProperties":true},
2438
+ },
2439
+ strictCodec: {
2440
+ mode: 'strict',
2441
+ typeSymbol: '@khorsheed/dsh-reader#reader/updateNote:request',
2442
+ create: _khorsheed_dsh_reader_reader_updateNote_parameter_0_strict$schema,
2443
+ schema: _khorsheed_dsh_reader_reader_updateNote_parameter_0_strict$schema(),
2444
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"noteId":{"type":"string"},"comment":{"type":"string"}},"required":["entryId","noteId","comment"],"additionalProperties":false},
2445
+ },
2446
+ },
2447
+ ],
2448
+ result: {
2449
+ mode: 'strict',
2450
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderNoteOutcome',
2451
+ create: _khorsheed_dsh_reader_reader_updateNote_result$schema,
2452
+ schema: _khorsheed_dsh_reader_reader_updateNote_result$schema(),
2453
+ jsonSchema: {"type":"string","enum":["not-found","ok","empty","full"]},
1085
2454
  },
1086
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":228,"column":3},
2455
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":328,"column":3},
1087
2456
  },
1088
- {
1089
- id: '@khorsheed/dsh-reader#reader/updateSource',
2457
+ 'reader/updateSource': {
1090
2458
  service: 'readerRemote',
1091
- namespace: 'reader',
1092
- method: 'updateSource',
2459
+ description: 'Change a source\'s label/enabled flag, or the global refresh time.',
1093
2460
  invocation: { kind: 'direct' },
1094
2461
  parameters: [
1095
2462
  {
1096
2463
  name: 'request',
1097
- wire: 'request',
1098
2464
  source: 'json',
1099
2465
  codec: {
1100
2466
  mode: 'strict',
1101
2467
  typeSymbol: '@khorsheed/dsh-reader#reader/updateSource:request',
1102
2468
  create: _khorsheed_dsh_reader_reader_updateSource_parameter_0$schema,
1103
2469
  schema: _khorsheed_dsh_reader_reader_updateSource_parameter_0$schema(),
2470
+ jsonSchema: {"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"label":{"type":"string"},"url":{"type":"string"},"timeOfDay":{"type":"string"}},"required":["id"],"additionalProperties":true},
2471
+ },
2472
+ strictCodec: {
2473
+ mode: 'strict',
2474
+ typeSymbol: '@khorsheed/dsh-reader#reader/updateSource:request',
2475
+ create: _khorsheed_dsh_reader_reader_updateSource_parameter_0_strict$schema,
2476
+ schema: _khorsheed_dsh_reader_reader_updateSource_parameter_0_strict$schema(),
2477
+ jsonSchema: {"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"label":{"type":"string"},"url":{"type":"string"},"timeOfDay":{"type":"string"}},"required":["id"],"additionalProperties":false},
1104
2478
  },
1105
2479
  },
1106
2480
  ],
@@ -1109,10 +2483,19 @@ export const TYPERT = {
1109
2483
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderMutationOutcome',
1110
2484
  create: _khorsheed_dsh_reader_reader_updateSource_result$schema,
1111
2485
  schema: _khorsheed_dsh_reader_reader_updateSource_result$schema(),
2486
+ jsonSchema: {"type":"string","enum":["not-found","unavailable","duplicate","ok","invalid-url","invalid-time"]},
1112
2487
  },
1113
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":77,"column":3},
2488
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":85,"column":3},
1114
2489
  },
2490
+ },
2491
+ }, z)
2492
+
2493
+ export const TYPERT = {
2494
+ package: '@khorsheed/dsh-reader',
2495
+ face: 'host',
2496
+ schemas: [
1115
2497
  ],
2498
+ get invocations() { return $remote.descriptors },
1116
2499
  model: {
1117
2500
  "services": [
1118
2501
  {
@@ -1123,6 +2506,20 @@ export const TYPERT = {
1123
2506
  "key": "reader",
1124
2507
  "exportName": "ReaderService",
1125
2508
  "members": [
2509
+ {
2510
+ "kind": "property",
2511
+ "name": "media",
2512
+ "signature": "readonly media: ReaderMediaHost",
2513
+ "summary": "Video and audio entries: synthetic pages, channel feeds, transcripts.",
2514
+ "jsDoc": "/** Video and audio entries: synthetic pages, channel feeds, transcripts. */"
2515
+ },
2516
+ {
2517
+ "kind": "property",
2518
+ "name": "local",
2519
+ "signature": "readonly local: LocalTranscriber",
2520
+ "summary": "Local transcription of entries without captions (the optional `transcribe` engine).",
2521
+ "jsDoc": "/** Local transcription of entries without captions (the optional `transcribe` engine). */"
2522
+ },
1126
2523
  {
1127
2524
  "kind": "method",
1128
2525
  "name": "capabilities",
@@ -1193,6 +2590,13 @@ export const TYPERT = {
1193
2590
  "summary": "Fetch one entry's article and hand the raw HTML to the browser.",
1194
2591
  "jsDoc": "/**\n * Fetch one entry's article and hand the raw HTML to the browser.\n *\n * The HOST does not extract: extraction needs a DOM, and this runtime has no\n * XML/HTML parser at all (the same reason feed parsing lives in the browser\n * half). So this verb is the network half only — it returns what came back,\n * and `storeEntryBody` persists what the browser made of it.\n *\n * Fetching here is deliberately NOT automatic on refresh: doing it for every\n * summary-only entry would make this a crawler of other people's sites, which\n * the design refuses. One entry, one fetch, on the reader's request.\n *\n * @param request - the entry and its article URL.\n * @returns the raw payload, or why there is none.\n */"
1195
2592
  },
2593
+ {
2594
+ "kind": "method",
2595
+ "name": "fetchImage",
2596
+ "signature": "async fetchImage(request: { url: string }): Promise<ReaderImageResult>",
2597
+ "summary": "One image the browser could not load cross-origin, fetched host-side.",
2598
+ "jsDoc": "/**\n * One image the browser could not load cross-origin, fetched host-side.\n *\n * The pane calls this only for an `<img>` that already FAILED: the page's\n * bytes arrived fine (a direct fetch gets a 200) but the origin answers them\n * with `Cross-Origin-Resource-Policy: same-origin`, so the browser withholds\n * them from this page no matter what the tag asks — measured on claude.dev's\n * `/media/*` figures (2026-09-29), which broke with the alt text showing.\n * CORP is an embedder-side check, so a host-process fetch is the way through.\n *\n * This deliberately does NOT ride `ctx.web.fetch`: the seam's decoded body is\n * a closed html|text union and its provider refuses binary content types\n * outright. The image fetch re-implements the seam's hardening at image\n * scope instead (public-address validation with the connection pinned to the\n * validated answers, a byte cap, a timeout, per-hop re-validation, and an\n * image/* content-type gate) — see `image-fetch.ts`.\n *\n * Rescued bytes are kept in an in-memory LRU under a byte budget: the\n * sidebar unmounts wholesale when another panel takes over, and a remount\n * re-fails every blocked image before this cache can answer it.\n *\n * @param request - the image URL the pane failed on.\n * @returns the bytes and their declared type, or why there are none.\n */"
2599
+ },
1196
2600
  {
1197
2601
  "kind": "method",
1198
2602
  "name": "entryFetchStates",
@@ -1210,7 +2614,7 @@ export const TYPERT = {
1210
2614
  {
1211
2615
  "kind": "method",
1212
2616
  "name": "storeEntryBody",
1213
- "signature": "async storeEntryBody(request: { entryId: string url: string html: string truncated?: boolean scriptFigures?: number /** True when this body came from the capture rendered fetch — 「重新抓取」 re-renders it. */ rendered?: boolean /** The caller's hash of `html`; the entry's translation map dies with a body it no longer matches. */ bodyHash?: string /** The article's own title, as the extraction read it — a saved link's card upgrade. */ title?: string /** A short excerpt (abstract / first paragraph), with the title. */ excerpt?: string }): Promise<ReaderEntryBodyView>",
2617
+ "signature": "async storeEntryBody(request: { entryId: string url: string html: string truncated?: boolean scriptFigures?: number /** True when this body came from the capture rendered fetch — 「重新抓取」 re-renders it. */ rendered?: boolean /** The caller's hash of `html`; the entry's translation map dies with a body it no longer matches. */ bodyHash?: string /** The article's own title, as the extraction read it — a saved link's card upgrade. */ title?: string /** A short excerpt (abstract / first paragraph), with the title. */ excerpt?: string /** Keep regardless of the cache TTL (a transcript costs a yt-dlp run, not a page fetch). */ keep?: boolean }): Promise<ReaderEntryBodyView>",
1214
2618
  "summary": "Cache the markup the browser extracted for one entry.",
1215
2619
  "jsDoc": "/**\n * Cache the markup the browser extracted for one entry.\n *\n * The deadline is computed here, not on the client, so the policy has exactly\n * one owner (this service's document) — a client that guessed the TTL would\n * be a second implementation of it.\n *\n * @param request - the entry, the markup, and the URL it came from.\n * @returns the stored view.\n */"
1216
2620
  },
@@ -1339,9 +2743,73 @@ export const TYPERT = {
1339
2743
  "signature": "async clearRecent(): Promise<{ removed: number }>",
1340
2744
  "summary": "Forget every recent entry.",
1341
2745
  "jsDoc": "/**\n * Forget every recent entry.\n *\n * The reader's own list is theirs to erase: a \"recently read\" page that can\n * only grow is one nobody wants to open in company.\n *\n * @returns how many entries were dropped.\n */"
2746
+ },
2747
+ {
2748
+ "kind": "method",
2749
+ "name": "mediaTranscript",
2750
+ "signature": "async mediaTranscript(request: { entryId: string; url: string }): Promise<{ entryId: string; html?: string; captions: 'platform' | 'none' | 'failed'; language?: string; error?: string }>",
2751
+ "summary": "A video entry's transcript: the stored one, else the platform captions fetched now and kept (no TTL — it costs a yt-dlp run).",
2752
+ "jsDoc": "/**\n * A video entry's transcript: the stored one, else the platform captions\n * fetched now and kept (no TTL — it costs a yt-dlp run). A video known to\n * have no captions answers so without running yt-dlp again.\n *\n * @param request - the entry and its video page URL.\n * @returns the transcript markup, `none`, or why it failed.\n */"
2753
+ },
2754
+ {
2755
+ "kind": "method",
2756
+ "name": "speakerNames",
2757
+ "signature": "speakerNames(request: { entryId: string }): Record<string, string>",
2758
+ "summary": "The reader's names for an entry's speakers, by index.",
2759
+ "jsDoc": "/** The reader's names for an entry's speakers, by index. */"
2760
+ },
2761
+ {
2762
+ "kind": "method",
2763
+ "name": "nameSpeaker",
2764
+ "signature": "nameSpeaker(request: { entryId: string; speaker: number; name: string }): Record<string, string>",
2765
+ "summary": "Name one speaker of an entry's transcript (an empty name restores the default).",
2766
+ "jsDoc": "/**\n * Name one speaker of an entry's transcript (an empty name restores the default).\n *\n * @param request - the entry, the speaker's index, the name.\n */"
2767
+ },
2768
+ {
2769
+ "kind": "method",
2770
+ "name": "mediaStates",
2771
+ "signature": "mediaStates(request: { entryIds: readonly string[] }): MediaCardStates",
2772
+ "summary": "The wall's media cards: a live local job first, else what the captions record says (platform captions, a stored local transcript, none).",
2773
+ "jsDoc": "/**\n * The wall's media cards: a live local job first, else what the captions\n * record says (platform captions, a stored local transcript, none).\n *\n * @param request - the card ids on screen.\n */"
1342
2774
  }
1343
2775
  ],
1344
2776
  "types": [
2777
+ {
2778
+ "name": "CaptionRecord",
2779
+ "declaration": "export interface CaptionRecord {\n readonly state: 'platform' | 'none' | 'local';\n readonly language?: string;\n readonly checkedAt: string;\n readonly speakers?: number;\n readonly names?: Readonly<Record<string, string>>;\n}"
2780
+ },
2781
+ {
2782
+ "name": "CaptionTrack",
2783
+ "declaration": "export interface CaptionTrack {\n readonly lang: string;\n readonly auto: boolean;\n readonly ext: string;\n}"
2784
+ },
2785
+ {
2786
+ "name": "Cue",
2787
+ "declaration": "export interface Cue {\n readonly start: number;\n readonly end: number;\n readonly text: string;\n}"
2788
+ },
2789
+ {
2790
+ "name": "LocalTranscriber",
2791
+ "declaration": "export class LocalTranscriber {\n status(entryId: string): LocalTranscriptStatus;\n start(request: { entryId: string; url: string; media: ReaderMedia; title?: string; confirmModels?: boolean; }): Promise<LocalTranscriptStatus>;\n cancel(entryId: string, force: boolean): LocalTranscriptStatus;\n engineAvailable(): boolean;\n dispose(): void;\n}"
2792
+ },
2793
+ {
2794
+ "name": "LocalTranscriptState",
2795
+ "declaration": "export type LocalTranscriptState = 'unavailable' | 'needs-models' | 'fetching' | 'queued' | 'transcribing' | 'speakers' | 'done' | 'failed' | 'idle';"
2796
+ },
2797
+ {
2798
+ "name": "LocalTranscriptStatus",
2799
+ "declaration": "export interface LocalTranscriptStatus {\n readonly entryId: string;\n readonly state: LocalTranscriptState;\n readonly progress?: number;\n readonly ahead?: number;\n readonly bytes?: number;\n readonly html?: string;\n readonly language?: string;\n readonly speakers?: number;\n readonly error?: string;\n}"
2800
+ },
2801
+ {
2802
+ "name": "MediaCardState",
2803
+ "declaration": "export type MediaCardState = 'platform' | 'local' | 'none' | 'fetching' | 'queued' | 'transcribing' | 'failed';"
2804
+ },
2805
+ {
2806
+ "name": "MediaCardStates",
2807
+ "declaration": "export interface MediaCardStates {\n readonly engine: boolean;\n readonly states: Readonly<Record<string, MediaCardStatus>>;\n}"
2808
+ },
2809
+ {
2810
+ "name": "MediaCardStatus",
2811
+ "declaration": "export interface MediaCardStatus {\n readonly state: MediaCardState;\n readonly progress?: number;\n readonly ahead?: number;\n}"
2812
+ },
1345
2813
  {
1346
2814
  "name": "ReaderAddFailure",
1347
2815
  "declaration": "export interface ReaderAddFailure {\n readonly outcome: 'fetch-failed';\n readonly reason: string;\n}"
@@ -1386,6 +2854,22 @@ export const TYPERT = {
1386
2854
  "name": "ReaderFetchStatus",
1387
2855
  "declaration": "export type ReaderFetchStatus = 'ok' | 'fetching' | 'error';"
1388
2856
  },
2857
+ {
2858
+ "name": "ReaderImageResult",
2859
+ "declaration": "export interface ReaderImageResult {\n readonly url: string;\n readonly mime?: string;\n readonly base64?: string;\n readonly error?: string;\n}"
2860
+ },
2861
+ {
2862
+ "name": "ReaderMedia",
2863
+ "declaration": "export interface ReaderMedia {\n readonly kind: 'video' | 'audio';\n readonly provider: ReaderMediaProvider;\n readonly ref: string;\n readonly durationSec?: number;\n readonly thumbnail?: string;\n}"
2864
+ },
2865
+ {
2866
+ "name": "ReaderMediaHost",
2867
+ "declaration": "export class ReaderMediaHost {\n readonly ytdlp: YtDlp;\n captions(entryId: string): CaptionRecord | undefined;\n remember(entryId: string, record: CaptionRecord): void;\n transcript(url: string): Promise<{ html: string; language: string; } | 'none'>;\n}"
2868
+ },
2869
+ {
2870
+ "name": "ReaderMediaProvider",
2871
+ "declaration": "export type ReaderMediaProvider = 'youtube' | 'bilibili' | 'xiaoyuzhou' | 'enclosure';"
2872
+ },
1389
2873
  {
1390
2874
  "name": "ReaderMutationOutcome",
1391
2875
  "declaration": "export type ReaderMutationOutcome = 'ok' | 'not-found' | 'invalid-url' | 'invalid-time' | 'duplicate' | 'unavailable';"
@@ -1421,6 +2905,241 @@ export const TYPERT = {
1421
2905
  {
1422
2906
  "name": "ReaderTag",
1423
2907
  "declaration": "export interface ReaderTag {\n readonly id: string;\n readonly name: string;\n readonly createdAt: string;\n}"
2908
+ },
2909
+ {
2910
+ "name": "YtDlp",
2911
+ "declaration": "export class YtDlp {\n binary(): Promise<string>;\n version(): Promise<string>;\n info(url: string): Promise<YtDlpInfo>;\n channel(url: string, limit: number = 15): Promise<{ title?: string; entries: YtDlpInfo[]; }>;\n audio(url: string, dir: string, options: { signal?: AbortSignal; onProgress?: (fraction: number) => void; } = {}): Promise<string>;\n captions(url: string, track: CaptionTrack): Promise<Cue[]>;\n}"
2912
+ },
2913
+ {
2914
+ "name": "YtDlpInfo",
2915
+ "declaration": "export interface YtDlpInfo {\n readonly id?: string;\n readonly title?: string;\n readonly description?: string;\n readonly duration?: number;\n readonly thumbnail?: string;\n readonly uploader?: string;\n readonly channel?: string;\n readonly channel_id?: string;\n readonly upload_date?: string;\n readonly timestamp?: number;\n readonly language?: string;\n readonly webpage_url?: string;\n readonly subtitles?: Record<string, readonly { ext: string; }[]>;\n readonly automatic_captions?: Record<string, readonly { ext: string; }[]>;\n}"
2916
+ }
2917
+ ]
2918
+ },
2919
+ {
2920
+ "description": "The reader's notes store.",
2921
+ "summary": "The reader's notes store.",
2922
+ "tags": [],
2923
+ "jsDoc": "/** The reader's notes store. */",
2924
+ "key": "readerNotes",
2925
+ "exportName": "ReaderNotesStore",
2926
+ "members": [
2927
+ {
2928
+ "kind": "property",
2929
+ "name": "polish",
2930
+ "signature": "readonly polish: ReaderPolishStore",
2931
+ "summary": "The agent's 润色 translations, per article (keyed to the snapshot's text).",
2932
+ "jsDoc": "/** The agent's 润色 translations, per article (keyed to the snapshot's text). */"
2933
+ },
2934
+ {
2935
+ "kind": "method",
2936
+ "name": "polishView",
2937
+ "signature": "polishView(entryId: string): ReaderPolishView | undefined",
2938
+ "summary": "An article's 润色 layer, when it belongs to the text captured now.",
2939
+ "jsDoc": "/** An article's 润色 layer, when it belongs to the text captured now. */"
2940
+ },
2941
+ {
2942
+ "kind": "method",
2943
+ "name": "setPolishOff",
2944
+ "signature": "setPolishOff(entryId: string, paragraph: number, off: boolean): ReaderPolishView | undefined",
2945
+ "summary": "Turn one paragraph back to the machine translation, or to the 润色 again.",
2946
+ "jsDoc": "/** Turn one paragraph back to the machine translation, or to the 润色 again. */"
2947
+ },
2948
+ {
2949
+ "kind": "getter",
2950
+ "name": "available",
2951
+ "signature": "get available(): boolean",
2952
+ "summary": "Whether the notes persist (false means memory-only, for this process).",
2953
+ "jsDoc": "/** Whether the notes persist (false means memory-only, for this process). */"
2954
+ },
2955
+ {
2956
+ "kind": "method",
2957
+ "name": "read",
2958
+ "signature": "read(): ReaderNotesDoc",
2959
+ "summary": "Read the document; a missing or unreadable file reads as empty.",
2960
+ "jsDoc": "/** Read the document; a missing or unreadable file reads as empty. */"
2961
+ },
2962
+ {
2963
+ "kind": "method",
2964
+ "name": "entry",
2965
+ "signature": "entry(entryId: string): ReaderEntryNotes | undefined",
2966
+ "summary": "One article's notes and discussions, oldest note first.",
2967
+ "jsDoc": "/** One article's notes and discussions, oldest note first. */"
2968
+ },
2969
+ {
2970
+ "kind": "method",
2971
+ "name": "entries",
2972
+ "signature": "entries(): ReaderEntryNotes[]",
2973
+ "summary": "Every article that carries notes or discussions.",
2974
+ "jsDoc": "/** Every article that carries notes or discussions. */"
2975
+ },
2976
+ {
2977
+ "kind": "method",
2978
+ "name": "counts",
2979
+ "signature": "counts(): Record<string, number>",
2980
+ "summary": "How many notes each article carries (the wall's badge).",
2981
+ "jsDoc": "/** How many notes each article carries (the wall's badge). */"
2982
+ },
2983
+ {
2984
+ "kind": "method",
2985
+ "name": "addNote",
2986
+ "signature": "addNote(input: ReaderNoteInput): Promise<ReaderNote | 'empty' | 'full'>",
2987
+ "summary": "Keep one excerpt.",
2988
+ "jsDoc": "/**\n * Keep one excerpt.\n *\n * @param input - the article, the excerpt and where it sits, and the comment.\n * @returns the new note, or why none was kept.\n */"
2989
+ },
2990
+ {
2991
+ "kind": "method",
2992
+ "name": "updateNote",
2993
+ "signature": "updateNote(request: { entryId: string; noteId: string; comment: string }): Promise<ReaderNoteOutcome>",
2994
+ "summary": "Change (or clear) one note's comment.",
2995
+ "jsDoc": "/** Change (or clear) one note's comment. */"
2996
+ },
2997
+ {
2998
+ "kind": "method",
2999
+ "name": "deleteNote",
3000
+ "signature": "deleteNote(request: { entryId: string; noteId: string }): Promise<ReaderNoteOutcome>",
3001
+ "summary": "Delete one note (its id is not handed out again).",
3002
+ "jsDoc": "/** Delete one note (its id is not handed out again). */"
3003
+ },
3004
+ {
3005
+ "kind": "method",
3006
+ "name": "addReply",
3007
+ "signature": "addReply(request: { entryId: string; noteId: string; text: string; by: 'agent' | 'user'; sessionId?: string }): Promise<ReaderNoteOutcome>",
3008
+ "summary": "Add one line under a note: a conclusion (by the model, when the reader asked for it) or the reader's own addition.",
3009
+ "jsDoc": "/**\n * Add one line under a note: a conclusion (by the model, when the reader asked\n * for it) or the reader's own addition.\n *\n * @param request - the article, the note, the line and who wrote it.\n */"
3010
+ },
3011
+ {
3012
+ "kind": "method",
3013
+ "name": "editReply",
3014
+ "signature": "editReply(request: { entryId: string; noteId: string; index: number; text: string }): Promise<ReaderNoteOutcome>",
3015
+ "summary": "Rewrite (or, with empty text, remove) one line under a note.",
3016
+ "jsDoc": "/**\n * Rewrite (or, with empty text, remove) one line under a note. A line the\n * model wrote becomes the reader's, marked as rewritten from the model's.\n */"
3017
+ },
3018
+ {
3019
+ "kind": "method",
3020
+ "name": "addDiscussion",
3021
+ "signature": "addDiscussion(input: ReaderDiscussionInput): Promise<ReaderDiscussion | 'empty'>",
3022
+ "summary": "Keep one discussion note (newest first).",
3023
+ "jsDoc": "/**\n * Keep one discussion note (newest first). The conversation it came from is\n * remembered on the article too.\n *\n * @param input - the article, the kind, the points.\n * @returns the new discussion note, or why none was kept.\n */"
3024
+ },
3025
+ {
3026
+ "kind": "method",
3027
+ "name": "markSynced",
3028
+ "signature": "markSynced(request: { entryId: string; noteId?: string; discussionId?: string; canvasId: string; cardId: string; canvasTitle: string }): Promise<ReaderNoteOutcome>",
3029
+ "summary": "Remember that a note (or a discussion note) became a canvas card, so the notes face can say where it went and not offer the same sync twice blindly.",
3030
+ "jsDoc": "/**\n * Remember that a note (or a discussion note) became a canvas card, so the\n * notes face can say where it went and not offer the same sync twice blindly.\n */"
3031
+ },
3032
+ {
3033
+ "kind": "method",
3034
+ "name": "deleteDiscussion",
3035
+ "signature": "deleteDiscussion(request: { entryId: string; discussionId: string }): Promise<ReaderNoteOutcome>",
3036
+ "summary": "Delete one discussion note.",
3037
+ "jsDoc": "/** Delete one discussion note. */"
3038
+ },
3039
+ {
3040
+ "kind": "method",
3041
+ "name": "sessionEntry",
3042
+ "signature": "sessionEntry(sessionId: string): string | undefined",
3043
+ "summary": "The article this conversation discussed most recently, when there is one — where a model's write lands when it names no article.",
3044
+ "jsDoc": "/**\n * The article this conversation discussed most recently, when there is one —\n * where a model's write lands when it names no article.\n */"
3045
+ },
3046
+ {
3047
+ "kind": "method",
3048
+ "name": "recordSession",
3049
+ "signature": "recordSession(request: ReaderEntryIdentity & { sessionId: string; sessionTitle?: string }): Promise<'ok' | 'empty'>",
3050
+ "summary": "Remember that a conversation discussed this article (most recent first).",
3051
+ "jsDoc": "/**\n * Remember that a conversation discussed this article (most recent first).\n *\n * @param request - the article and the conversation.\n */"
3052
+ },
3053
+ {
3054
+ "kind": "method",
3055
+ "name": "snapshot",
3056
+ "signature": "snapshot(request: ReaderEntryIdentity & { paragraphs: readonly string[] }): Promise<'ok' | 'empty'>",
3057
+ "summary": "Keep the article's text for the model, replacing the previous snapshot.",
3058
+ "jsDoc": "/**\n * Keep the article's text for the model, replacing the previous snapshot.\n *\n * Loose snapshots (articles with no notes and no discussions) are pruned to\n * the {@link MAX_LOOSE_SNAPSHOTS} most recent; the rest are kept as long as\n * their article carries anything.\n *\n * @param request - the article and its blocks' original text.\n */"
3059
+ },
3060
+ {
3061
+ "kind": "method",
3062
+ "name": "readSnapshot",
3063
+ "signature": "readSnapshot(entryId: string): ReaderEntrySnapshot | undefined",
3064
+ "summary": "The article's text as last captured, when there is one.",
3065
+ "jsDoc": "/** The article's text as last captured, when there is one. */"
3066
+ },
3067
+ {
3068
+ "kind": "method",
3069
+ "name": "snapshotIds",
3070
+ "signature": "snapshotIds(): string[]",
3071
+ "summary": "Every article with a snapshot, newest capture first.",
3072
+ "jsDoc": "/** Every article with a snapshot, newest capture first. */"
3073
+ }
3074
+ ],
3075
+ "types": [
3076
+ {
3077
+ "name": "ReaderDiscussion",
3078
+ "declaration": "export interface ReaderDiscussion {\n readonly id: string;\n readonly kind: 'discussion' | 'check';\n readonly sessionId?: string;\n readonly title: string;\n readonly points: readonly ReaderDiscussionPoint[];\n readonly aside?: string;\n readonly syncedTo?: readonly ReaderSyncedCard[];\n readonly createdAt: string;\n}"
3079
+ },
3080
+ {
3081
+ "name": "ReaderDiscussionInput",
3082
+ "declaration": "export interface ReaderDiscussionInput extends ReaderEntryIdentity {\n readonly kind: 'discussion' | 'check';\n readonly sessionId?: string;\n readonly heading?: string;\n readonly points: readonly ReaderDiscussionPoint[];\n readonly aside?: string;\n}"
3083
+ },
3084
+ {
3085
+ "name": "ReaderDiscussionPoint",
3086
+ "declaration": "export interface ReaderDiscussionPoint {\n readonly text: string;\n readonly para?: number;\n}"
3087
+ },
3088
+ {
3089
+ "name": "ReaderEntryIdentity",
3090
+ "declaration": "export interface ReaderEntryIdentity {\n readonly entryId: string;\n readonly title: string;\n readonly url?: string;\n readonly source?: string;\n}"
3091
+ },
3092
+ {
3093
+ "name": "ReaderEntryNotes",
3094
+ "declaration": "export interface ReaderEntryNotes {\n readonly entryId: string;\n readonly title: string;\n readonly url?: string;\n readonly source?: string;\n readonly notes: readonly ReaderNote[];\n readonly sessions: readonly ReaderEntrySession[];\n readonly discussions?: readonly ReaderDiscussion[];\n readonly nextNote: number;\n readonly nextDiscussion?: number;\n readonly updatedAt: string;\n}"
3095
+ },
3096
+ {
3097
+ "name": "ReaderEntrySession",
3098
+ "declaration": "export interface ReaderEntrySession {\n readonly sessionId: string;\n readonly title?: string;\n readonly lastAt: string;\n}"
3099
+ },
3100
+ {
3101
+ "name": "ReaderEntrySnapshot",
3102
+ "declaration": "export interface ReaderEntrySnapshot {\n readonly entryId: string;\n readonly title: string;\n readonly url?: string;\n readonly source?: string;\n readonly paragraphs: readonly string[];\n readonly truncated?: boolean;\n readonly capturedAt: string;\n}"
3103
+ },
3104
+ {
3105
+ "name": "ReaderNote",
3106
+ "declaration": "export interface ReaderNote {\n readonly id: string;\n readonly anchor: ReaderNoteAnchor;\n readonly comment?: string;\n readonly replies?: readonly ReaderNoteReply[];\n readonly syncedTo?: readonly ReaderSyncedCard[];\n readonly createdAt: string;\n readonly updatedAt: string;\n}"
3107
+ },
3108
+ {
3109
+ "name": "ReaderNoteAnchor",
3110
+ "declaration": "export interface ReaderNoteAnchor {\n readonly block: number;\n readonly start?: number;\n readonly quote: string;\n readonly translated?: string;\n readonly time?: number;\n}"
3111
+ },
3112
+ {
3113
+ "name": "ReaderNoteInput",
3114
+ "declaration": "export interface ReaderNoteInput extends ReaderEntryIdentity {\n readonly block: number;\n readonly start?: number;\n readonly quote: string;\n readonly translated?: string;\n readonly comment?: string;\n readonly time?: number;\n}"
3115
+ },
3116
+ {
3117
+ "name": "ReaderNoteOutcome",
3118
+ "declaration": "export type ReaderNoteOutcome = 'ok' | 'not-found' | 'empty' | 'full';"
3119
+ },
3120
+ {
3121
+ "name": "ReaderNoteReply",
3122
+ "declaration": "export interface ReaderNoteReply {\n readonly by: 'agent' | 'user';\n readonly text: string;\n readonly sessionId?: string;\n readonly editedFrom?: 'agent';\n readonly at: string;\n}"
3123
+ },
3124
+ {
3125
+ "name": "ReaderNotesDoc",
3126
+ "declaration": "export interface ReaderNotesDoc {\n readonly version: 1;\n readonly entries: Readonly<Record<string, ReaderEntryNotes>>;\n readonly snapshots: Readonly<Record<string, ReaderSnapshotRecord>>;\n}"
3127
+ },
3128
+ {
3129
+ "name": "ReaderPolishStore",
3130
+ "declaration": "export class ReaderPolishStore {\n view(entryId: string, key: string | undefined): ReaderPolishView | undefined;\n write(entryId: string, key: string, total: number, updates: ReadonlyMap<number, string>): ReaderPolishView;\n setOff(entryId: string, key: string | undefined, paragraph: number, off: boolean): ReaderPolishView | undefined;\n drop(entryId: string): void;\n}"
3131
+ },
3132
+ {
3133
+ "name": "ReaderPolishView",
3134
+ "declaration": "export interface ReaderPolishView {\n readonly total: number;\n readonly done: number;\n readonly paragraphs: Readonly<Record<string, string>>;\n readonly off: readonly number[];\n readonly updatedAt: string;\n readonly complete: boolean;\n}"
3135
+ },
3136
+ {
3137
+ "name": "ReaderSnapshotRecord",
3138
+ "declaration": "export interface ReaderSnapshotRecord {\n readonly file: string;\n readonly chars: number;\n readonly capturedAt: string;\n}"
3139
+ },
3140
+ {
3141
+ "name": "ReaderSyncedCard",
3142
+ "declaration": "export interface ReaderSyncedCard {\n readonly canvasId: string;\n readonly cardId: string;\n readonly canvasTitle: string;\n readonly at: string;\n}"
1424
3143
  }
1425
3144
  ]
1426
3145
  },
@@ -1495,6 +3214,13 @@ export const TYPERT = {
1495
3214
  "summary": "Fetch one entry's article (the network half; the browser extracts).",
1496
3215
  "jsDoc": "/** Fetch one entry's article (the network half; the browser extracts). */"
1497
3216
  },
3217
+ {
3218
+ "kind": "method",
3219
+ "name": "fetchImage",
3220
+ "signature": "@Remote('fetchImage') fetchImage(request: { url: string }): Promise<ReaderImageResult>",
3221
+ "summary": "Fetch one image the browser could not load cross-origin (CORP / hotlink-protected), so the pane can re-point the failed `<img>` at the bytes.",
3222
+ "jsDoc": "/**\n * Fetch one image the browser could not load cross-origin (CORP /\n * hotlink-protected), so the pane can re-point the failed `<img>` at the\n * bytes. Called per failed image, never for a healthy one.\n */"
3223
+ },
1498
3224
  {
1499
3225
  "kind": "method",
1500
3226
  "name": "storeEntryBody",
@@ -1646,9 +3372,169 @@ export const TYPERT = {
1646
3372
  "signature": "@Remote('quoteToSideChat') quoteToSideChat(request: { contextKey: string label: string text: string }): Promise<'ok' | 'unavailable'>",
1647
3373
  "summary": "Forward a ref block to the side-chat service when one is composed.",
1648
3374
  "jsDoc": "/** Forward a ref block to the side-chat service when one is composed. */"
3375
+ },
3376
+ {
3377
+ "kind": "method",
3378
+ "name": "entryNotes",
3379
+ "signature": "@Remote('entryNotes') async entryNotes(request: { entryId: string }): Promise<{ entry?: ReaderEntryNotes }>",
3380
+ "summary": "One article's notes and the conversations that discussed it.",
3381
+ "jsDoc": "/** One article's notes and the conversations that discussed it. */"
3382
+ },
3383
+ {
3384
+ "kind": "method",
3385
+ "name": "noteCounts",
3386
+ "signature": "@Remote('noteCounts') async noteCounts(): Promise<{ counts: Record<string, number> }>",
3387
+ "summary": "How many notes each article carries.",
3388
+ "jsDoc": "/** How many notes each article carries. */"
3389
+ },
3390
+ {
3391
+ "kind": "method",
3392
+ "name": "addNote",
3393
+ "signature": "@Remote('addNote') addNote(request: ReaderNoteInput): Promise<ReaderNote | 'empty' | 'full'>",
3394
+ "summary": "Keep one excerpt (and its comment).",
3395
+ "jsDoc": "/** Keep one excerpt (and its comment). */"
3396
+ },
3397
+ {
3398
+ "kind": "method",
3399
+ "name": "updateNote",
3400
+ "signature": "@Remote('updateNote') updateNote(request: { entryId: string; noteId: string; comment: string }): Promise<ReaderNoteOutcome>",
3401
+ "summary": "Change or clear one note's comment.",
3402
+ "jsDoc": "/** Change or clear one note's comment. */"
3403
+ },
3404
+ {
3405
+ "kind": "method",
3406
+ "name": "deleteNote",
3407
+ "signature": "@Remote('deleteNote') deleteNote(request: { entryId: string; noteId: string }): Promise<ReaderNoteOutcome>",
3408
+ "summary": "Delete one note.",
3409
+ "jsDoc": "/** Delete one note. */"
3410
+ },
3411
+ {
3412
+ "kind": "method",
3413
+ "name": "recordDiscussion",
3414
+ "signature": "@Remote('recordDiscussion') recordDiscussion(request: ReaderEntryIdentity & { sessionId: string; sessionTitle?: string }): Promise<'ok' | 'empty'>",
3415
+ "summary": "Remember that a conversation discussed this article.",
3416
+ "jsDoc": "/** Remember that a conversation discussed this article. */"
3417
+ },
3418
+ {
3419
+ "kind": "method",
3420
+ "name": "addReply",
3421
+ "signature": "@Remote('addReply') addReply(request: { entryId: string; noteId: string; text: string }): Promise<ReaderNoteOutcome>",
3422
+ "summary": "Add the reader's own line under a note.",
3423
+ "jsDoc": "/** Add the reader's own line under a note. */"
3424
+ },
3425
+ {
3426
+ "kind": "method",
3427
+ "name": "editReply",
3428
+ "signature": "@Remote('editReply') editReply(request: { entryId: string; noteId: string; index: number; text: string }): Promise<ReaderNoteOutcome>",
3429
+ "summary": "Rewrite (or, with empty text, remove) one line under a note.",
3430
+ "jsDoc": "/** Rewrite (or, with empty text, remove) one line under a note. */"
3431
+ },
3432
+ {
3433
+ "kind": "method",
3434
+ "name": "markSynced",
3435
+ "signature": "@Remote('markSynced') markSynced(request: { entryId: string; noteId?: string; discussionId?: string; canvasId: string; cardId: string; canvasTitle: string }): Promise<ReaderNoteOutcome>",
3436
+ "summary": "Remember that a note or a discussion note became a canvas card.",
3437
+ "jsDoc": "/** Remember that a note or a discussion note became a canvas card. */"
3438
+ },
3439
+ {
3440
+ "kind": "method",
3441
+ "name": "deleteDiscussion",
3442
+ "signature": "@Remote('deleteDiscussion') deleteDiscussion(request: { entryId: string; discussionId: string }): Promise<ReaderNoteOutcome>",
3443
+ "summary": "Delete one discussion note.",
3444
+ "jsDoc": "/** Delete one discussion note. */"
3445
+ },
3446
+ {
3447
+ "kind": "method",
3448
+ "name": "mediaTranscript",
3449
+ "signature": "@Remote('mediaTranscript') mediaTranscript(request: { entryId: string; url: string }): Promise<{ entryId: string; html?: string; captions: 'platform' | 'none' | 'failed'; language?: string; error?: string }>",
3450
+ "summary": "A video entry's transcript from its platform captions (stored; `none` when it has none).",
3451
+ "jsDoc": "/** A video entry's transcript from its platform captions (stored; `none` when it has none). */"
3452
+ },
3453
+ {
3454
+ "kind": "method",
3455
+ "name": "startLocalTranscript",
3456
+ "signature": "@Remote('startLocalTranscript') startLocalTranscript(request: { entryId: string; url: string; media: ReaderMedia; title?: string; confirmModels?: boolean }): Promise<LocalTranscriptStatus>",
3457
+ "summary": "Start (or rejoin) local transcription of an entry without captions.",
3458
+ "jsDoc": "/**\n * Start (or rejoin) local transcription of an entry without captions.\n * Answers `unavailable` without the transcription plugin and `needs-models`\n * until the first model download is confirmed.\n */"
3459
+ },
3460
+ {
3461
+ "kind": "method",
3462
+ "name": "localTranscript",
3463
+ "signature": "@Remote('localTranscript') localTranscript(request: { entryId: string }): Promise<LocalTranscriptStatus>",
3464
+ "summary": "Where an entry's local transcription stands, with the transcript so far.",
3465
+ "jsDoc": "/** Where an entry's local transcription stands, with the transcript so far. */"
3466
+ },
3467
+ {
3468
+ "kind": "method",
3469
+ "name": "speakerNames",
3470
+ "signature": "@Remote('speakerNames') speakerNames(request: { entryId: string }): Promise<Record<string, string>>",
3471
+ "summary": "The reader's names for a transcript's speakers, by index.",
3472
+ "jsDoc": "/** The reader's names for a transcript's speakers, by index. */"
3473
+ },
3474
+ {
3475
+ "kind": "method",
3476
+ "name": "nameSpeaker",
3477
+ "signature": "@Remote('nameSpeaker') nameSpeaker(request: { entryId: string; speaker: number; name: string }): Promise<Record<string, string>>",
3478
+ "summary": "Name one speaker of a transcript (empty: back to 说话人 A…); answers all the names.",
3479
+ "jsDoc": "/** Name one speaker of a transcript (empty: back to 说话人 A…); answers all the names. */"
3480
+ },
3481
+ {
3482
+ "kind": "method",
3483
+ "name": "mediaStates",
3484
+ "signature": "@Remote('mediaStates') mediaStates(request: { entryIds: string[] }): Promise<MediaCardStates>",
3485
+ "summary": "The wall's video / audio cards: what each one's transcript is (captions, local, transcribing…).",
3486
+ "jsDoc": "/** The wall's video / audio cards: what each one's transcript is (captions, local, transcribing…). */"
3487
+ },
3488
+ {
3489
+ "kind": "method",
3490
+ "name": "cancelLocalTranscript",
3491
+ "signature": "@Remote('cancelLocalTranscript') cancelLocalTranscript(request: { entryId: string; force: boolean }): Promise<LocalTranscriptStatus>",
3492
+ "summary": "Leave (withdraws a queued job) or, with `force`, stop an entry's local transcription.",
3493
+ "jsDoc": "/** Leave (withdraws a queued job) or, with `force`, stop an entry's local transcription. */"
3494
+ },
3495
+ {
3496
+ "kind": "method",
3497
+ "name": "polish",
3498
+ "signature": "@Remote('polish') polish(request: { entryId: string }): Promise<ReaderPolishView | null>",
3499
+ "summary": "The article's 润色 layer (the agent's translation), when there is one for its current text.",
3500
+ "jsDoc": "/** The article's 润色 layer (the agent's translation), when there is one for its current text. */"
3501
+ },
3502
+ {
3503
+ "kind": "method",
3504
+ "name": "setPolishOff",
3505
+ "signature": "@Remote('setPolishOff') setPolishOff(request: { entryId: string; paragraph: number; off: boolean }): Promise<ReaderPolishView | null>",
3506
+ "summary": "Show one paragraph's machine translation instead of the 润色 (or back).",
3507
+ "jsDoc": "/** Show one paragraph's machine translation instead of the 润色 (or back). */"
3508
+ },
3509
+ {
3510
+ "kind": "method",
3511
+ "name": "snapshotEntry",
3512
+ "signature": "@Remote('snapshotEntry') snapshotEntry(request: ReaderEntryIdentity & { paragraphs: string[] }): Promise<'ok' | 'empty'>",
3513
+ "summary": "Hand the host the article's original text, block by block, for the model to read.",
3514
+ "jsDoc": "/** Hand the host the article's original text, block by block, for the model to read. */"
1649
3515
  }
1650
3516
  ],
1651
3517
  "types": [
3518
+ {
3519
+ "name": "LocalTranscriptState",
3520
+ "declaration": "export type LocalTranscriptState = 'unavailable' | 'needs-models' | 'fetching' | 'queued' | 'transcribing' | 'speakers' | 'done' | 'failed' | 'idle';"
3521
+ },
3522
+ {
3523
+ "name": "LocalTranscriptStatus",
3524
+ "declaration": "export interface LocalTranscriptStatus {\n readonly entryId: string;\n readonly state: LocalTranscriptState;\n readonly progress?: number;\n readonly ahead?: number;\n readonly bytes?: number;\n readonly html?: string;\n readonly language?: string;\n readonly speakers?: number;\n readonly error?: string;\n}"
3525
+ },
3526
+ {
3527
+ "name": "MediaCardState",
3528
+ "declaration": "export type MediaCardState = 'platform' | 'local' | 'none' | 'fetching' | 'queued' | 'transcribing' | 'failed';"
3529
+ },
3530
+ {
3531
+ "name": "MediaCardStates",
3532
+ "declaration": "export interface MediaCardStates {\n readonly engine: boolean;\n readonly states: Readonly<Record<string, MediaCardStatus>>;\n}"
3533
+ },
3534
+ {
3535
+ "name": "MediaCardStatus",
3536
+ "declaration": "export interface MediaCardStatus {\n readonly state: MediaCardState;\n readonly progress?: number;\n readonly ahead?: number;\n}"
3537
+ },
1652
3538
  {
1653
3539
  "name": "ReaderAddFailure",
1654
3540
  "declaration": "export interface ReaderAddFailure {\n readonly outcome: 'fetch-failed';\n readonly reason: string;\n}"
@@ -1677,6 +3563,14 @@ export const TYPERT = {
1677
3563
  "name": "ReaderCapabilities",
1678
3564
  "declaration": "export interface ReaderCapabilities {\n readonly protocolVersion: 1;\n readonly hasFs: boolean;\n readonly hasSideChat: boolean;\n readonly nextRefreshAt?: string;\n readonly lastRefreshAt?: string;\n}"
1679
3565
  },
3566
+ {
3567
+ "name": "ReaderDiscussion",
3568
+ "declaration": "export interface ReaderDiscussion {\n readonly id: string;\n readonly kind: 'discussion' | 'check';\n readonly sessionId?: string;\n readonly title: string;\n readonly points: readonly ReaderDiscussionPoint[];\n readonly aside?: string;\n readonly syncedTo?: readonly ReaderSyncedCard[];\n readonly createdAt: string;\n}"
3569
+ },
3570
+ {
3571
+ "name": "ReaderDiscussionPoint",
3572
+ "declaration": "export interface ReaderDiscussionPoint {\n readonly text: string;\n readonly para?: number;\n}"
3573
+ },
1680
3574
  {
1681
3575
  "name": "ReaderEntryBodyView",
1682
3576
  "declaration": "export interface ReaderEntryBodyView {\n readonly entryId: string;\n readonly cached: boolean;\n readonly fresh: boolean;\n readonly fromFeed: boolean;\n readonly html?: string;\n readonly fetchedAt?: string;\n readonly truncated?: boolean;\n readonly scriptFigures?: number;\n readonly rendered?: boolean;\n readonly error?: string;\n}"
@@ -1685,6 +3579,18 @@ export const TYPERT = {
1685
3579
  "name": "ReaderEntryFetchState",
1686
3580
  "declaration": "export type ReaderEntryFetchState = { readonly state: 'none'; } | { readonly state: 'fetching'; readonly at: string; } | { readonly state: 'raw'; readonly at: string; } | { readonly state: 'ready'; readonly at?: string; } | { readonly state: 'failed'; readonly at: string; readonly message: string; readonly code?: ReaderPreviewFailureCode; };"
1687
3581
  },
3582
+ {
3583
+ "name": "ReaderEntryIdentity",
3584
+ "declaration": "export interface ReaderEntryIdentity {\n readonly entryId: string;\n readonly title: string;\n readonly url?: string;\n readonly source?: string;\n}"
3585
+ },
3586
+ {
3587
+ "name": "ReaderEntryNotes",
3588
+ "declaration": "export interface ReaderEntryNotes {\n readonly entryId: string;\n readonly title: string;\n readonly url?: string;\n readonly source?: string;\n readonly notes: readonly ReaderNote[];\n readonly sessions: readonly ReaderEntrySession[];\n readonly discussions?: readonly ReaderDiscussion[];\n readonly nextNote: number;\n readonly nextDiscussion?: number;\n readonly updatedAt: string;\n}"
3589
+ },
3590
+ {
3591
+ "name": "ReaderEntrySession",
3592
+ "declaration": "export interface ReaderEntrySession {\n readonly sessionId: string;\n readonly title?: string;\n readonly lastAt: string;\n}"
3593
+ },
1688
3594
  {
1689
3595
  "name": "ReaderEntryTranslationView",
1690
3596
  "declaration": "export interface ReaderEntryTranslationView {\n readonly pair: string;\n readonly bodyHash: string;\n readonly segments: Record<string, string>;\n}"
@@ -1693,10 +3599,46 @@ export const TYPERT = {
1693
3599
  "name": "ReaderFetchStatus",
1694
3600
  "declaration": "export type ReaderFetchStatus = 'ok' | 'fetching' | 'error';"
1695
3601
  },
3602
+ {
3603
+ "name": "ReaderImageResult",
3604
+ "declaration": "export interface ReaderImageResult {\n readonly url: string;\n readonly mime?: string;\n readonly base64?: string;\n readonly error?: string;\n}"
3605
+ },
3606
+ {
3607
+ "name": "ReaderMedia",
3608
+ "declaration": "export interface ReaderMedia {\n readonly kind: 'video' | 'audio';\n readonly provider: ReaderMediaProvider;\n readonly ref: string;\n readonly durationSec?: number;\n readonly thumbnail?: string;\n}"
3609
+ },
3610
+ {
3611
+ "name": "ReaderMediaProvider",
3612
+ "declaration": "export type ReaderMediaProvider = 'youtube' | 'bilibili' | 'xiaoyuzhou' | 'enclosure';"
3613
+ },
1696
3614
  {
1697
3615
  "name": "ReaderMutationOutcome",
1698
3616
  "declaration": "export type ReaderMutationOutcome = 'ok' | 'not-found' | 'invalid-url' | 'invalid-time' | 'duplicate' | 'unavailable';"
1699
3617
  },
3618
+ {
3619
+ "name": "ReaderNote",
3620
+ "declaration": "export interface ReaderNote {\n readonly id: string;\n readonly anchor: ReaderNoteAnchor;\n readonly comment?: string;\n readonly replies?: readonly ReaderNoteReply[];\n readonly syncedTo?: readonly ReaderSyncedCard[];\n readonly createdAt: string;\n readonly updatedAt: string;\n}"
3621
+ },
3622
+ {
3623
+ "name": "ReaderNoteAnchor",
3624
+ "declaration": "export interface ReaderNoteAnchor {\n readonly block: number;\n readonly start?: number;\n readonly quote: string;\n readonly translated?: string;\n readonly time?: number;\n}"
3625
+ },
3626
+ {
3627
+ "name": "ReaderNoteInput",
3628
+ "declaration": "export interface ReaderNoteInput extends ReaderEntryIdentity {\n readonly block: number;\n readonly start?: number;\n readonly quote: string;\n readonly translated?: string;\n readonly comment?: string;\n readonly time?: number;\n}"
3629
+ },
3630
+ {
3631
+ "name": "ReaderNoteOutcome",
3632
+ "declaration": "export type ReaderNoteOutcome = 'ok' | 'not-found' | 'empty' | 'full';"
3633
+ },
3634
+ {
3635
+ "name": "ReaderNoteReply",
3636
+ "declaration": "export interface ReaderNoteReply {\n readonly by: 'agent' | 'user';\n readonly text: string;\n readonly sessionId?: string;\n readonly editedFrom?: 'agent';\n readonly at: string;\n}"
3637
+ },
3638
+ {
3639
+ "name": "ReaderPolishView",
3640
+ "declaration": "export interface ReaderPolishView {\n readonly total: number;\n readonly done: number;\n readonly paragraphs: Readonly<Record<string, string>>;\n readonly off: readonly number[];\n readonly updatedAt: string;\n readonly complete: boolean;\n}"
3641
+ },
1700
3642
  {
1701
3643
  "name": "ReaderPreviewFailureCode",
1702
3644
  "declaration": "export type ReaderPreviewFailureCode = 'blocked' | 'login' | 'unsupported-type' | 'redirected' | 'empty' | 'unreachable' | 'http' | 'unreadable';"
@@ -1725,6 +3667,10 @@ export const TYPERT = {
1725
3667
  "name": "ReaderStorageStats",
1726
3668
  "declaration": "export interface ReaderStorageStats {\n readonly bodies: { readonly entries: number; readonly chars: number; };\n readonly translations: { readonly entries: number; readonly chars: number; readonly memoryEntries: number; readonly memoryChars: number; };\n}"
1727
3669
  },
3670
+ {
3671
+ "name": "ReaderSyncedCard",
3672
+ "declaration": "export interface ReaderSyncedCard {\n readonly canvasId: string;\n readonly cardId: string;\n readonly canvasTitle: string;\n readonly at: string;\n}"
3673
+ },
1728
3674
  {
1729
3675
  "name": "ReaderTag",
1730
3676
  "declaration": "export interface ReaderTag {\n readonly id: string;\n readonly name: string;\n readonly createdAt: string;\n}"