@khorsheed/dsh-reader 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +29 -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 +29105 -6692
  7. package/lib/index.js +3500 -321
  8. package/lib/typert.host.js +2145 -259
  9. package/lib/typert.remote-client.d.ts +97 -3
  10. package/lib/typert.remote-client.js +1590 -250
  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 +860 -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 +130 -3
  24. package/lib/types/client/extract-article.d.ts +38 -1
  25. package/lib/types/client/extract-article.js +561 -33
  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 +81 -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/document-fetch.d.ts +106 -0
  54. package/lib/types/document-fetch.js +100 -0
  55. package/lib/types/index.d.ts +15 -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 +118 -0
  70. package/lib/types/remote.js +151 -1
  71. package/lib/types/service.d.ts +81 -6
  72. package/lib/types/service.js +286 -65
  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 +90 -2
  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 +33 -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
  }))
@@ -109,10 +264,10 @@ const _khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema = () => (_khors
109
264
  }))
110
265
  let _khorsheed_dsh_reader_reader_fetchImage_result$schema$value
111
266
  const _khorsheed_dsh_reader_reader_fetchImage_result$schema = () => (_khorsheed_dsh_reader_reader_fetchImage_result$schema$value ??= z.object({
112
- 'url': z.string().readonly(),
113
- 'mime': z.string().readonly().optional(),
114
- 'base64': z.string().readonly().optional(),
115
- 'error': z.string().readonly().optional(),
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.'),
116
271
  }))
117
272
  let _khorsheed_dsh_reader_reader_getBodies_parameter_0$schema$value
118
273
  const _khorsheed_dsh_reader_reader_getBodies_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_getBodies_parameter_0$schema$value ??= z.object({
@@ -124,9 +279,9 @@ const _khorsheed_dsh_reader_reader_getBodies_result$schema = () => (_khorsheed_d
124
279
  'id': z.string().readonly(),
125
280
  'raw': z.string().readonly().optional(),
126
281
  'truncated': z.boolean().readonly().optional(),
127
- 'error': z.string().readonly().optional(),
128
- 'title': z.string().readonly().optional(),
129
- '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.'),
130
285
  })),
131
286
  }))
132
287
  let _khorsheed_dsh_reader_reader_getCachePolicy_result$schema$value
@@ -144,15 +299,15 @@ const _khorsheed_dsh_reader_reader_getEntryBody_parameter_0$schema = () => (_kho
144
299
  let _khorsheed_dsh_reader_reader_getEntryBody_result$schema$value
145
300
  const _khorsheed_dsh_reader_reader_getEntryBody_result$schema = () => (_khorsheed_dsh_reader_reader_getEntryBody_result$schema$value ??= z.object({
146
301
  'entryId': z.string().readonly(),
147
- 'cached': z.boolean().readonly(),
148
- 'fresh': z.boolean().readonly(),
149
- '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.'),
150
305
  'html': z.string().readonly().optional(),
151
306
  'fetchedAt': z.string().readonly().optional(),
152
307
  'truncated': z.boolean().readonly().optional(),
153
- 'scriptFigures': z.number().readonly().optional(),
154
- 'rendered': z.boolean().readonly().optional(),
155
- '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.'),
156
311
  }))
157
312
  let _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0$schema$value
158
313
  const _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0$schema$value ??= z.object({
@@ -192,13 +347,13 @@ const _khorsheed_dsh_reader_reader_getStorageStats_result$schema = () => (_khors
192
347
  'bodies': z.object({
193
348
  'entries': z.number().readonly(),
194
349
  'chars': z.number().readonly(),
195
- }).readonly(),
350
+ }).readonly().describe('The cached article bodies (what TTL + maxEntries govern).'),
196
351
  'translations': z.object({
197
- 'entries': z.number().readonly(),
198
- 'chars': z.number().readonly(),
199
- 'memoryEntries': z.number().readonly(),
200
- 'memoryChars': z.number().readonly(),
201
- }).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.'),
202
357
  }))
203
358
  let _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0$schema$value
204
359
  const _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0$schema$value ??= z.object({
@@ -216,7 +371,7 @@ const _khorsheed_dsh_reader_reader_listBackfillCandidates_result$schema = () =>
216
371
  'entryId': z.string().readonly(),
217
372
  'url': z.string().readonly(),
218
373
  'label': z.string().readonly(),
219
- '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).'),
220
375
  })),
221
376
  }))
222
377
  let _khorsheed_dsh_reader_reader_listRecent_result$schema$value
@@ -225,8 +380,8 @@ const _khorsheed_dsh_reader_reader_listRecent_result$schema = () => (_khorsheed_
225
380
  'entryId': z.string().readonly(),
226
381
  'sourceId': z.string().readonly(),
227
382
  'title': z.string().readonly(),
228
- 'url': z.string().readonly().optional(),
229
- '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).'),
230
385
  })),
231
386
  }))
232
387
  let _khorsheed_dsh_reader_reader_listSources_result$schema$value
@@ -237,28 +392,106 @@ const _khorsheed_dsh_reader_reader_listSources_result$schema = () => (_khorsheed
237
392
  'url': z.string().readonly(),
238
393
  'label': z.string().readonly(),
239
394
  'enabled': z.boolean().readonly(),
240
- '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.'),
241
396
  'fetchedAt': z.string().readonly().optional(),
242
- '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(),
243
398
  'error': z.string().readonly().optional(),
244
399
  'truncated': z.boolean().readonly().optional(),
245
400
  'hasBody': z.boolean().readonly(),
246
401
  'failure': z.object({
247
- '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(),
248
403
  'message': z.string().readonly(),
249
- }).readonly().optional(),
250
- '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}).'),
251
406
  })),
252
407
  }))
253
408
  let _khorsheed_dsh_reader_reader_listTags_result$schema$value
254
409
  const _khorsheed_dsh_reader_reader_listTags_result$schema = () => (_khorsheed_dsh_reader_reader_listTags_result$schema$value ??= z.object({
255
410
  'tags': z.array(z.object({
256
- 'id': z.string().readonly(),
257
- '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.'),
258
413
  'createdAt': z.string().readonly(),
259
414
  })),
260
415
  'counts': z.record(z.string(), z.number()),
261
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
+ })]))
262
495
  let _khorsheed_dsh_reader_reader_pruneTags_result$schema$value
263
496
  const _khorsheed_dsh_reader_reader_pruneTags_result$schema = () => (_khorsheed_dsh_reader_reader_pruneTags_result$schema$value ??= z.object({
264
497
  'removed': z.number(),
@@ -271,6 +504,17 @@ const _khorsheed_dsh_reader_reader_quoteToSideChat_parameter_0$schema = () => (_
271
504
  }))
272
505
  let _khorsheed_dsh_reader_reader_quoteToSideChat_result$schema$value
273
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")]))
274
518
  let _khorsheed_dsh_reader_reader_recordRead_parameter_0$schema$value
275
519
  const _khorsheed_dsh_reader_reader_recordRead_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_recordRead_parameter_0$schema$value ??= z.object({
276
520
  'entryId': z.string(),
@@ -298,12 +542,12 @@ let _khorsheed_dsh_reader_reader_rememberSentences_parameter_0$schema$value
298
542
  const _khorsheed_dsh_reader_reader_rememberSentences_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_rememberSentences_parameter_0$schema$value ??= z.object({
299
543
  'pair': z.string(),
300
544
  'entries': z.array(z.object({
301
- 'hash': z.string().readonly(),
545
+ 'hash': z.string().readonly().describe('The client\'s `translationHash(source)`, stored opaquely.'),
302
546
  'source': z.string().readonly(),
303
547
  'target': z.string().readonly(),
304
548
  })),
305
549
  'recalled': z.array(z.object({
306
- 'hash': z.string().readonly(),
550
+ 'hash': z.string().readonly().describe('The client\'s `translationHash(source)`, stored opaquely.'),
307
551
  'source': z.string().readonly(),
308
552
  'target': z.string().readonly(),
309
553
  })).optional(),
@@ -320,14 +564,14 @@ const _khorsheed_dsh_reader_reader_removeSource_parameter_0$schema = () => (_kho
320
564
  'entryIds': z.array(z.string()).optional(),
321
565
  }))
322
566
  let _khorsheed_dsh_reader_reader_removeSource_result$schema$value
323
- 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")]))
324
568
  let _khorsheed_dsh_reader_reader_renameTag_parameter_0$schema$value
325
569
  const _khorsheed_dsh_reader_reader_renameTag_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_renameTag_parameter_0$schema$value ??= z.object({
326
570
  'id': z.string(),
327
571
  'name': z.string(),
328
572
  }))
329
573
  let _khorsheed_dsh_reader_reader_renameTag_result$schema$value
330
- 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")]))
331
575
  let _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema$value
332
576
  const _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema$value ??= z.object({
333
577
  'ttlHours': z.number(),
@@ -335,7 +579,64 @@ const _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema = () => (_k
335
579
  'translationBudgetChars': z.number().optional(),
336
580
  }))
337
581
  let _khorsheed_dsh_reader_reader_setCachePolicy_result$schema$value
338
- 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
+ }))
339
640
  let _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema$value
340
641
  const _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema$value ??= z.object({
341
642
  'entryId': z.string(),
@@ -344,21 +645,21 @@ const _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema = () => (_k
344
645
  'truncated': z.boolean().optional(),
345
646
  'scriptFigures': z.number().optional(),
346
647
  'bodyHash': z.string().optional(),
347
- 'title': z.string().optional(),
348
- '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.'),
349
650
  }))
350
651
  let _khorsheed_dsh_reader_reader_storeEntryBody_result$schema$value
351
652
  const _khorsheed_dsh_reader_reader_storeEntryBody_result$schema = () => (_khorsheed_dsh_reader_reader_storeEntryBody_result$schema$value ??= z.object({
352
653
  'entryId': z.string().readonly(),
353
- 'cached': z.boolean().readonly(),
354
- 'fresh': z.boolean().readonly(),
355
- '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.'),
356
657
  'html': z.string().readonly().optional(),
357
658
  'fetchedAt': z.string().readonly().optional(),
358
659
  'truncated': z.boolean().readonly().optional(),
359
- 'scriptFigures': z.number().readonly().optional(),
360
- 'rendered': z.boolean().readonly().optional(),
361
- '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.'),
362
663
  }))
363
664
  let _khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema$value
364
665
  const _khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema$value ??= z.object({
@@ -367,7 +668,15 @@ const _khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema = () => (_khorshe
367
668
  'on': z.boolean(),
368
669
  }))
369
670
  let _khorsheed_dsh_reader_reader_tagEntry_result$schema$value
370
- 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")]))
371
680
  let _khorsheed_dsh_reader_reader_updateSource_parameter_0$schema$value
372
681
  const _khorsheed_dsh_reader_reader_updateSource_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_updateSource_parameter_0$schema$value ??= z.object({
373
682
  'id': z.string(),
@@ -377,46 +686,407 @@ const _khorsheed_dsh_reader_reader_updateSource_parameter_0$schema = () => (_kho
377
686
  'timeOfDay': z.string().optional(),
378
687
  }))
379
688
  let _khorsheed_dsh_reader_reader_updateSource_result$schema$value
380
- 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
+ }))
381
951
 
382
- export const TYPERT = {
952
+ const $remote = createTypertRemoteInfo({
383
953
  package: '@khorsheed/dsh-reader',
384
- face: 'host',
385
- schemas: [
386
- ],
387
- invocations: [
388
- {
389
- id: '@khorsheed/dsh-reader#reader/addSource',
954
+ methods: {
955
+ 'reader/addNote': {
390
956
  service: 'readerRemote',
391
- namespace: 'reader',
392
- method: 'addSource',
957
+ description: 'Keep one excerpt (and its comment).',
393
958
  invocation: { kind: 'direct' },
394
959
  parameters: [
395
960
  {
396
961
  name: 'request',
397
- wire: 'request',
398
962
  source: 'json',
399
963
  codec: {
400
964
  mode: 'strict',
401
- typeSymbol: '@khorsheed/dsh-reader#reader/addSource:request',
402
- create: _khorsheed_dsh_reader_reader_addSource_parameter_0$schema,
403
- 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},
404
976
  },
405
977
  },
406
978
  ],
407
979
  result: {
408
980
  mode: 'strict',
409
- typeSymbol: '@khorsheed/dsh-reader#reader/addSource:result',
410
- create: _khorsheed_dsh_reader_reader_addSource_result$schema,
411
- 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}]},
412
985
  },
413
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":72,"column":3},
986
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":322,"column":3},
414
987
  },
415
- {
416
- id: '@khorsheed/dsh-reader#reader/capabilities',
988
+ 'reader/addReply': {
417
989
  service: 'readerRemote',
418
- namespace: 'reader',
419
- method: 'capabilities',
990
+ description: 'Add the reader\'s own line under a note.',
991
+ invocation: { kind: 'direct' },
992
+ parameters: [
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': {
1055
+ service: 'readerRemote',
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.',
420
1090
  invocation: { kind: 'direct' },
421
1091
  parameters: [
422
1092
  ],
@@ -425,14 +1095,13 @@ export const TYPERT = {
425
1095
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderCapabilities',
426
1096
  create: _khorsheed_dsh_reader_reader_capabilities_result$schema,
427
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},
428
1099
  },
429
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":60,"column":3},
1100
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":67,"column":3},
430
1101
  },
431
- {
432
- id: '@khorsheed/dsh-reader#reader/clearRecent',
1102
+ 'reader/clearRecent': {
433
1103
  service: 'readerRemote',
434
- namespace: 'reader',
435
- method: 'clearRecent',
1104
+ description: 'Forget every recent entry.',
436
1105
  invocation: { kind: 'direct' },
437
1106
  parameters: [
438
1107
  ],
@@ -441,14 +1110,13 @@ export const TYPERT = {
441
1110
  typeSymbol: '@khorsheed/dsh-reader#reader/clearRecent:result',
442
1111
  create: _khorsheed_dsh_reader_reader_clearRecent_result$schema,
443
1112
  schema: _khorsheed_dsh_reader_reader_clearRecent_result$schema(),
1113
+ jsonSchema: {"type":"object","properties":{"removed":{"type":"number"}},"required":["removed"],"additionalProperties":true},
444
1114
  },
445
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":285,"column":3},
1115
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":292,"column":3},
446
1116
  },
447
- {
448
- id: '@khorsheed/dsh-reader#reader/clearTranslations',
1117
+ 'reader/clearTranslations': {
449
1118
  service: 'readerRemote',
450
- namespace: 'reader',
451
- method: 'clearTranslations',
1119
+ description: 'Forget every translation: the global memory and every entry map.',
452
1120
  invocation: { kind: 'direct' },
453
1121
  parameters: [
454
1122
  ],
@@ -457,25 +1125,31 @@ export const TYPERT = {
457
1125
  typeSymbol: '@khorsheed/dsh-reader#reader/clearTranslations:result',
458
1126
  create: _khorsheed_dsh_reader_reader_clearTranslations_result$schema,
459
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},
460
1129
  },
461
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":209,"column":3},
1130
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":216,"column":3},
462
1131
  },
463
- {
464
- id: '@khorsheed/dsh-reader#reader/createTag',
1132
+ 'reader/createTag': {
465
1133
  service: 'readerRemote',
466
- namespace: 'reader',
467
- method: 'createTag',
1134
+ description: 'Create a tag, or return the existing one with the same name.',
468
1135
  invocation: { kind: 'direct' },
469
1136
  parameters: [
470
1137
  {
471
1138
  name: 'request',
472
- wire: 'request',
473
1139
  source: 'json',
474
1140
  codec: {
475
1141
  mode: 'strict',
476
1142
  typeSymbol: '@khorsheed/dsh-reader#reader/createTag:request',
477
1143
  create: _khorsheed_dsh_reader_reader_createTag_parameter_0$schema,
478
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},
479
1153
  },
480
1154
  },
481
1155
  ],
@@ -484,25 +1158,97 @@ export const TYPERT = {
484
1158
  typeSymbol: '@khorsheed/dsh-reader#reader/createTag:result',
485
1159
  create: _khorsheed_dsh_reader_reader_createTag_result$schema,
486
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}]},
487
1162
  },
488
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":221,"column":3},
1163
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":228,"column":3},
489
1164
  },
490
- {
491
- id: '@khorsheed/dsh-reader#reader/deleteTag',
1165
+ 'reader/deleteDiscussion': {
492
1166
  service: 'readerRemote',
493
- namespace: 'reader',
494
- method: 'deleteTag',
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"]},
1228
+ },
1229
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":334,"column":3},
1230
+ },
1231
+ 'reader/deleteTag': {
1232
+ service: 'readerRemote',
1233
+ description: 'Delete a tag and remove it from every entry.',
495
1234
  invocation: { kind: 'direct' },
496
1235
  parameters: [
497
1236
  {
498
1237
  name: 'request',
499
- wire: 'request',
500
1238
  source: 'json',
501
1239
  codec: {
502
1240
  mode: 'strict',
503
1241
  typeSymbol: '@khorsheed/dsh-reader#reader/deleteTag:request',
504
1242
  create: _khorsheed_dsh_reader_reader_deleteTag_parameter_0$schema,
505
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},
506
1252
  },
507
1253
  },
508
1254
  ],
@@ -511,25 +1257,64 @@ export const TYPERT = {
511
1257
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderAnnotationOutcome',
512
1258
  create: _khorsheed_dsh_reader_reader_deleteTag_result$schema,
513
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"]},
514
1294
  },
515
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":233,"column":3},
1295
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":352,"column":3},
516
1296
  },
517
- {
518
- id: '@khorsheed/dsh-reader#reader/entryFetchStates',
1297
+ 'reader/entryFetchStates': {
519
1298
  service: 'readerRemote',
520
- namespace: 'reader',
521
- method: 'entryFetchStates',
1299
+ description: 'What the plugin holds per entry: a body, a stored raw payload, or a failure.',
522
1300
  invocation: { kind: 'direct' },
523
1301
  parameters: [
524
1302
  {
525
1303
  name: 'request',
526
- wire: 'request',
527
1304
  source: 'json',
528
1305
  codec: {
529
1306
  mode: 'strict',
530
1307
  typeSymbol: '@khorsheed/dsh-reader#reader/entryFetchStates:request',
531
1308
  create: _khorsheed_dsh_reader_reader_entryFetchStates_parameter_0$schema,
532
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},
533
1318
  },
534
1319
  },
535
1320
  ],
@@ -538,25 +1323,64 @@ export const TYPERT = {
538
1323
  typeSymbol: '@khorsheed/dsh-reader#reader/entryFetchStates:result',
539
1324
  create: _khorsheed_dsh_reader_reader_entryFetchStates_result$schema,
540
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},
541
1360
  },
542
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":156,"column":3},
1361
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":309,"column":9},
543
1362
  },
544
- {
545
- id: '@khorsheed/dsh-reader#reader/entryTags',
1363
+ 'reader/entryTags': {
546
1364
  service: 'readerRemote',
547
- namespace: 'reader',
548
- method: 'entryTags',
1365
+ description: 'The tags on one entry.',
549
1366
  invocation: { kind: 'direct' },
550
1367
  parameters: [
551
1368
  {
552
1369
  name: 'request',
553
- wire: 'request',
554
1370
  source: 'json',
555
1371
  codec: {
556
1372
  mode: 'strict',
557
1373
  typeSymbol: '@khorsheed/dsh-reader#reader/entryTags:request',
558
1374
  create: _khorsheed_dsh_reader_reader_entryTags_parameter_0$schema,
559
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},
560
1384
  },
561
1385
  },
562
1386
  ],
@@ -565,25 +1389,31 @@ export const TYPERT = {
565
1389
  typeSymbol: '@khorsheed/dsh-reader#reader/entryTags:result',
566
1390
  create: _khorsheed_dsh_reader_reader_entryTags_result$schema,
567
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},
568
1393
  },
569
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":245,"column":3},
1394
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":252,"column":3},
570
1395
  },
571
- {
572
- id: '@khorsheed/dsh-reader#reader/fetchEntryBody',
1396
+ 'reader/fetchEntryBody': {
573
1397
  service: 'readerRemote',
574
- namespace: 'reader',
575
- method: 'fetchEntryBody',
1398
+ description: 'Fetch one entry\'s article (the network half; the browser extracts).',
576
1399
  invocation: { kind: 'direct' },
577
1400
  parameters: [
578
1401
  {
579
1402
  name: 'request',
580
- wire: 'request',
581
1403
  source: 'json',
582
1404
  codec: {
583
1405
  mode: 'strict',
584
1406
  typeSymbol: '@khorsheed/dsh-reader#reader/fetchEntryBody:request',
585
1407
  create: _khorsheed_dsh_reader_reader_fetchEntryBody_parameter_0$schema,
586
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},
587
1417
  },
588
1418
  },
589
1419
  ],
@@ -592,25 +1422,31 @@ export const TYPERT = {
592
1422
  typeSymbol: '@khorsheed/dsh-reader#reader/fetchEntryBody:result',
593
1423
  create: _khorsheed_dsh_reader_reader_fetchEntryBody_result$schema,
594
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},
595
1426
  },
596
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":116,"column":3},
1427
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":123,"column":3},
597
1428
  },
598
- {
599
- id: '@khorsheed/dsh-reader#reader/fetchImage',
1429
+ 'reader/fetchImage': {
600
1430
  service: 'readerRemote',
601
- namespace: 'reader',
602
- method: 'fetchImage',
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.',
603
1432
  invocation: { kind: 'direct' },
604
1433
  parameters: [
605
1434
  {
606
1435
  name: 'request',
607
- wire: 'request',
608
1436
  source: 'json',
609
1437
  codec: {
610
1438
  mode: 'strict',
611
1439
  typeSymbol: '@khorsheed/dsh-reader#reader/fetchImage:request',
612
1440
  create: _khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema,
613
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},
614
1450
  },
615
1451
  },
616
1452
  ],
@@ -619,25 +1455,31 @@ export const TYPERT = {
619
1455
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderImageResult',
620
1456
  create: _khorsheed_dsh_reader_reader_fetchImage_result$schema,
621
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},
622
1459
  },
623
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":133,"column":3},
1460
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":140,"column":3},
624
1461
  },
625
- {
626
- id: '@khorsheed/dsh-reader#reader/getBodies',
1462
+ 'reader/getBodies': {
627
1463
  service: 'readerRemote',
628
- namespace: 'reader',
629
- method: 'getBodies',
1464
+ description: 'Hand back raw payloads for the browser to parse.',
630
1465
  invocation: { kind: 'direct' },
631
1466
  parameters: [
632
1467
  {
633
1468
  name: 'request',
634
- wire: 'request',
635
1469
  source: 'json',
636
1470
  codec: {
637
1471
  mode: 'strict',
638
1472
  typeSymbol: '@khorsheed/dsh-reader#reader/getBodies:request',
639
1473
  create: _khorsheed_dsh_reader_reader_getBodies_parameter_0$schema,
640
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},
641
1483
  },
642
1484
  },
643
1485
  ],
@@ -646,14 +1488,13 @@ export const TYPERT = {
646
1488
  typeSymbol: '@khorsheed/dsh-reader#reader/getBodies:result',
647
1489
  create: _khorsheed_dsh_reader_reader_getBodies_result$schema,
648
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},
649
1492
  },
650
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":102,"column":9},
1493
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":109,"column":9},
651
1494
  },
652
- {
653
- id: '@khorsheed/dsh-reader#reader/getCachePolicy',
1495
+ 'reader/getCachePolicy': {
654
1496
  service: 'readerRemote',
655
- namespace: 'reader',
656
- method: 'getCachePolicy',
1497
+ description: 'Read or set how long a fetched body is served (and the translation budget).',
657
1498
  invocation: { kind: 'direct' },
658
1499
  parameters: [
659
1500
  ],
@@ -662,25 +1503,31 @@ export const TYPERT = {
662
1503
  typeSymbol: '@khorsheed/dsh-reader#reader/getCachePolicy:result',
663
1504
  create: _khorsheed_dsh_reader_reader_getCachePolicy_result$schema,
664
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},
665
1507
  },
666
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":251,"column":3},
1508
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":258,"column":3},
667
1509
  },
668
- {
669
- id: '@khorsheed/dsh-reader#reader/getEntryBody',
1510
+ 'reader/getEntryBody': {
670
1511
  service: 'readerRemote',
671
- namespace: 'reader',
672
- method: 'getEntryBody',
1512
+ description: 'What the detail view should render for one entry, and whether a fetch is worth offering.',
673
1513
  invocation: { kind: 'direct' },
674
1514
  parameters: [
675
1515
  {
676
1516
  name: 'request',
677
- wire: 'request',
678
1517
  source: 'json',
679
1518
  codec: {
680
1519
  mode: 'strict',
681
1520
  typeSymbol: '@khorsheed/dsh-reader#reader/getEntryBody:request',
682
1521
  create: _khorsheed_dsh_reader_reader_getEntryBody_parameter_0$schema,
683
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},
684
1531
  },
685
1532
  },
686
1533
  ],
@@ -689,25 +1536,31 @@ export const TYPERT = {
689
1536
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderEntryBodyView',
690
1537
  create: _khorsheed_dsh_reader_reader_getEntryBody_result$schema,
691
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},
692
1540
  },
693
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":110,"column":3},
1541
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":117,"column":3},
694
1542
  },
695
- {
696
- id: '@khorsheed/dsh-reader#reader/getEntryTranslation',
1543
+ 'reader/getEntryTranslation': {
697
1544
  service: 'readerRemote',
698
- namespace: 'reader',
699
- method: 'getEntryTranslation',
1545
+ description: 'One entry\'s exact-fit translation record (segment map resolved), when usable.',
700
1546
  invocation: { kind: 'direct' },
701
1547
  parameters: [
702
1548
  {
703
1549
  name: 'request',
704
- wire: 'request',
705
1550
  source: 'json',
706
1551
  codec: {
707
1552
  mode: 'strict',
708
1553
  typeSymbol: '@khorsheed/dsh-reader#reader/getEntryTranslation:request',
709
1554
  create: _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0$schema,
710
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},
711
1564
  },
712
1565
  },
713
1566
  ],
@@ -716,25 +1569,31 @@ export const TYPERT = {
716
1569
  typeSymbol: '@khorsheed/dsh-reader#reader/getEntryTranslation:result',
717
1570
  create: _khorsheed_dsh_reader_reader_getEntryTranslation_result$schema,
718
1571
  schema: _khorsheed_dsh_reader_reader_getEntryTranslation_result$schema(),
1572
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
719
1573
  },
720
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":179,"column":3},
1574
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":186,"column":3},
721
1575
  },
722
- {
723
- id: '@khorsheed/dsh-reader#reader/getRawBody',
1576
+ 'reader/getRawBody': {
724
1577
  service: 'readerRemote',
725
- namespace: 'reader',
726
- method: 'getRawBody',
1578
+ description: 'A stored raw payload, so the browser can extract it later.',
727
1579
  invocation: { kind: 'direct' },
728
1580
  parameters: [
729
1581
  {
730
1582
  name: 'request',
731
- wire: 'request',
732
1583
  source: 'json',
733
1584
  codec: {
734
1585
  mode: 'strict',
735
1586
  typeSymbol: '@khorsheed/dsh-reader#reader/getRawBody:request',
736
1587
  create: _khorsheed_dsh_reader_reader_getRawBody_parameter_0$schema,
737
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},
738
1597
  },
739
1598
  },
740
1599
  ],
@@ -743,25 +1602,31 @@ export const TYPERT = {
743
1602
  typeSymbol: '@khorsheed/dsh-reader#reader/getRawBody:result',
744
1603
  create: _khorsheed_dsh_reader_reader_getRawBody_result$schema,
745
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},
746
1606
  },
747
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":162,"column":3},
1607
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":169,"column":3},
748
1608
  },
749
- {
750
- id: '@khorsheed/dsh-reader#reader/getSentenceTranslations',
1609
+ 'reader/getSentenceTranslations': {
751
1610
  service: 'readerRemote',
752
- namespace: 'reader',
753
- method: 'getSentenceTranslations',
1611
+ description: 'Translations for exactly the asked sentence hashes of one pair — never the whole table.',
754
1612
  invocation: { kind: 'direct' },
755
1613
  parameters: [
756
1614
  {
757
1615
  name: 'request',
758
- wire: 'request',
759
1616
  source: 'json',
760
1617
  codec: {
761
1618
  mode: 'strict',
762
1619
  typeSymbol: '@khorsheed/dsh-reader#reader/getSentenceTranslations:request',
763
1620
  create: _khorsheed_dsh_reader_reader_getSentenceTranslations_parameter_0$schema,
764
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},
765
1630
  },
766
1631
  },
767
1632
  ],
@@ -770,14 +1635,13 @@ export const TYPERT = {
770
1635
  typeSymbol: '@khorsheed/dsh-reader#reader/getSentenceTranslations:result',
771
1636
  create: _khorsheed_dsh_reader_reader_getSentenceTranslations_result$schema,
772
1637
  schema: _khorsheed_dsh_reader_reader_getSentenceTranslations_result$schema(),
1638
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
773
1639
  },
774
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":185,"column":3},
1640
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":192,"column":3},
775
1641
  },
776
- {
777
- id: '@khorsheed/dsh-reader#reader/getStorageStats',
1642
+ 'reader/getStorageStats': {
778
1643
  service: 'readerRemote',
779
- namespace: 'reader',
780
- method: 'getStorageStats',
1644
+ description: 'Per-tier cache usage, aggregated on the host (the tables never cross).',
781
1645
  invocation: { kind: 'direct' },
782
1646
  parameters: [
783
1647
  ],
@@ -786,25 +1650,31 @@ export const TYPERT = {
786
1650
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderStorageStats',
787
1651
  create: _khorsheed_dsh_reader_reader_getStorageStats_result$schema,
788
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},
789
1654
  },
790
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":203,"column":3},
1655
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":210,"column":3},
791
1656
  },
792
- {
793
- id: '@khorsheed/dsh-reader#reader/listBackfillCandidates',
1657
+ 'reader/listBackfillCandidates': {
794
1658
  service: 'readerRemote',
795
- namespace: 'reader',
796
- method: 'listBackfillCandidates',
1659
+ description: 'Which entries still need their full text (the automatic backfill\'s work list).',
797
1660
  invocation: { kind: 'direct' },
798
1661
  parameters: [
799
1662
  {
800
1663
  name: 'request',
801
- wire: 'request',
802
1664
  source: 'json',
803
1665
  codec: {
804
1666
  mode: 'strict',
805
1667
  typeSymbol: '@khorsheed/dsh-reader#reader/listBackfillCandidates:request',
806
1668
  create: _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0$schema,
807
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},
808
1678
  },
809
1679
  },
810
1680
  ],
@@ -813,14 +1683,13 @@ export const TYPERT = {
813
1683
  typeSymbol: '@khorsheed/dsh-reader#reader/listBackfillCandidates:result',
814
1684
  create: _khorsheed_dsh_reader_reader_listBackfillCandidates_result$schema,
815
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},
816
1687
  },
817
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":168,"column":3},
1688
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":175,"column":3},
818
1689
  },
819
- {
820
- id: '@khorsheed/dsh-reader#reader/listRecent',
1690
+ 'reader/listRecent': {
821
1691
  service: 'readerRemote',
822
- namespace: 'reader',
823
- method: 'listRecent',
1692
+ description: 'The entries the reader opened, newest first.',
824
1693
  invocation: { kind: 'direct' },
825
1694
  parameters: [
826
1695
  ],
@@ -829,14 +1698,13 @@ export const TYPERT = {
829
1698
  typeSymbol: '@khorsheed/dsh-reader#reader/listRecent:result',
830
1699
  create: _khorsheed_dsh_reader_reader_listRecent_result$schema,
831
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},
832
1702
  },
833
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":279,"column":3},
1703
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":286,"column":3},
834
1704
  },
835
- {
836
- id: '@khorsheed/dsh-reader#reader/listSources',
1705
+ 'reader/listSources': {
837
1706
  service: 'readerRemote',
838
- namespace: 'reader',
839
- method: 'listSources',
1707
+ description: 'The configured sources, without payloads.',
840
1708
  invocation: { kind: 'direct' },
841
1709
  parameters: [
842
1710
  ],
@@ -845,14 +1713,13 @@ export const TYPERT = {
845
1713
  typeSymbol: '@khorsheed/dsh-reader#reader/listSources:result',
846
1714
  create: _khorsheed_dsh_reader_reader_listSources_result$schema,
847
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},
848
1717
  },
849
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":66,"column":9},
1718
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":73,"column":9},
850
1719
  },
851
- {
852
- id: '@khorsheed/dsh-reader#reader/listTags',
1720
+ 'reader/listTags': {
853
1721
  service: 'readerRemote',
854
- namespace: 'reader',
855
- method: 'listTags',
1722
+ description: 'The tag vocabulary, with how many entries carry each tag.',
856
1723
  invocation: { kind: 'direct' },
857
1724
  parameters: [
858
1725
  ],
@@ -861,14 +1728,226 @@ export const TYPERT = {
861
1728
  typeSymbol: '@khorsheed/dsh-reader#reader/listTags:result',
862
1729
  create: _khorsheed_dsh_reader_reader_listTags_result$schema,
863
1730
  schema: _khorsheed_dsh_reader_reader_listTags_result$schema(),
1731
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
864
1732
  },
865
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":215,"column":3},
1733
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":222,"column":3},
866
1734
  },
867
- {
868
- id: '@khorsheed/dsh-reader#reader/pruneTags',
1735
+ 'reader/localTranscript': {
869
1736
  service: 'readerRemote',
870
- namespace: 'reader',
871
- method: 'pruneTags',
1737
+ description: 'Where an entry\'s local transcription stands, with the transcript so far.',
1738
+ invocation: { kind: 'direct' },
1739
+ parameters: [
1740
+ {
1741
+ name: 'request',
1742
+ source: 'json',
1743
+ codec: {
1744
+ mode: 'strict',
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},
1756
+ },
1757
+ },
1758
+ ],
1759
+ result: {
1760
+ mode: 'strict',
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},
1765
+ },
1766
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":386,"column":3},
1767
+ },
1768
+ 'reader/markSynced': {
1769
+ service: 'readerRemote',
1770
+ description: 'Remember that a note or a discussion note became a canvas card.',
1771
+ invocation: { kind: 'direct' },
1772
+ parameters: [
1773
+ {
1774
+ name: 'request',
1775
+ source: 'json',
1776
+ codec: {
1777
+ mode: 'strict',
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},
1789
+ },
1790
+ },
1791
+ ],
1792
+ result: {
1793
+ mode: 'strict',
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"]},
1798
+ },
1799
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":358,"column":3},
1800
+ },
1801
+ 'reader/mediaStates': {
1802
+ service: 'readerRemote',
1803
+ description: 'The wall\'s video / audio cards: what each one\'s transcript is (captions, local, transcribing…).',
1804
+ invocation: { kind: 'direct' },
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
+ },
1824
+ ],
1825
+ result: {
1826
+ mode: 'strict',
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',
1831
+ },
1832
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":404,"column":3},
1833
+ },
1834
+ 'reader/mediaTranscript': {
1835
+ service: 'readerRemote',
1836
+ description: 'A video entry\'s transcript from its platform captions (stored; `none` when it has none).',
1837
+ invocation: { kind: 'direct' },
1838
+ parameters: [
1839
+ {
1840
+ name: 'request',
1841
+ source: 'json',
1842
+ codec: {
1843
+ mode: 'strict',
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},
1855
+ },
1856
+ },
1857
+ ],
1858
+ result: {
1859
+ mode: 'strict',
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},
1864
+ },
1865
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":370,"column":3},
1866
+ },
1867
+ 'reader/nameSpeaker': {
1868
+ service: 'readerRemote',
1869
+ description: 'Name one speaker of a transcript (empty: back to 说话人 A…); answers all the names.',
1870
+ invocation: { kind: 'direct' },
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
+ },
1890
+ ],
1891
+ result: {
1892
+ mode: 'strict',
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',
1897
+ },
1898
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":398,"column":3},
1899
+ },
1900
+ 'reader/noteCounts': {
1901
+ service: 'readerRemote',
1902
+ description: 'How many notes each article carries.',
1903
+ invocation: { kind: 'direct' },
1904
+ parameters: [
1905
+ ],
1906
+ result: {
1907
+ mode: 'strict',
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',
1912
+ },
1913
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":316,"column":9},
1914
+ },
1915
+ 'reader/polish': {
1916
+ service: 'readerRemote',
1917
+ description: 'The article\'s 润色 layer (the agent\'s translation), when there is one for its current text.',
1918
+ invocation: { kind: 'direct' },
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
+ },
1938
+ ],
1939
+ result: {
1940
+ mode: 'strict',
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',
1945
+ },
1946
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":416,"column":3},
1947
+ },
1948
+ 'reader/pruneTags': {
1949
+ service: 'readerRemote',
1950
+ description: 'Drop tags nothing references any more.',
872
1951
  invocation: { kind: 'direct' },
873
1952
  parameters: [
874
1953
  ],
@@ -877,25 +1956,31 @@ export const TYPERT = {
877
1956
  typeSymbol: '@khorsheed/dsh-reader#reader/pruneTags:result',
878
1957
  create: _khorsheed_dsh_reader_reader_pruneTags_result$schema,
879
1958
  schema: _khorsheed_dsh_reader_reader_pruneTags_result$schema(),
1959
+ jsonSchema: {"type":"object","properties":{"removed":{"type":"number"}},"required":["removed"],"additionalProperties":true},
880
1960
  },
881
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":262,"column":3},
1961
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":269,"column":3},
882
1962
  },
883
- {
884
- id: '@khorsheed/dsh-reader#reader/quoteToSideChat',
1963
+ 'reader/quoteToSideChat': {
885
1964
  service: 'readerRemote',
886
- namespace: 'reader',
887
- method: 'quoteToSideChat',
1965
+ description: 'Forward a ref block to the side-chat service when one is composed.',
888
1966
  invocation: { kind: 'direct' },
889
1967
  parameters: [
890
1968
  {
891
1969
  name: 'request',
892
- wire: 'request',
893
1970
  source: 'json',
894
1971
  codec: {
895
1972
  mode: 'strict',
896
1973
  typeSymbol: '@khorsheed/dsh-reader#reader/quoteToSideChat:request',
897
1974
  create: _khorsheed_dsh_reader_reader_quoteToSideChat_parameter_0$schema,
898
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},
899
1984
  },
900
1985
  },
901
1986
  ],
@@ -904,25 +1989,64 @@ export const TYPERT = {
904
1989
  typeSymbol: '@khorsheed/dsh-reader#reader/quoteToSideChat:result',
905
1990
  create: _khorsheed_dsh_reader_reader_quoteToSideChat_result$schema,
906
1991
  schema: _khorsheed_dsh_reader_reader_quoteToSideChat_result$schema(),
1992
+ jsonSchema: {"type":"string","enum":["unavailable","ok"]},
907
1993
  },
908
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":291,"column":3},
1994
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":298,"column":3},
909
1995
  },
910
- {
911
- id: '@khorsheed/dsh-reader#reader/recordRead',
1996
+ 'reader/recordDiscussion': {
912
1997
  service: 'readerRemote',
913
- namespace: 'reader',
914
- method: 'recordRead',
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"]},
2026
+ },
2027
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":340,"column":3},
2028
+ },
2029
+ 'reader/recordRead': {
2030
+ service: 'readerRemote',
2031
+ description: 'Record that the reader opened one entry (the recent page\'s write half).',
915
2032
  invocation: { kind: 'direct' },
916
2033
  parameters: [
917
2034
  {
918
2035
  name: 'request',
919
- wire: 'request',
920
2036
  source: 'json',
921
2037
  codec: {
922
2038
  mode: 'strict',
923
2039
  typeSymbol: '@khorsheed/dsh-reader#reader/recordRead:request',
924
2040
  create: _khorsheed_dsh_reader_reader_recordRead_parameter_0$schema,
925
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},
926
2050
  },
927
2051
  },
928
2052
  ],
@@ -931,25 +2055,31 @@ export const TYPERT = {
931
2055
  typeSymbol: '@khorsheed/dsh-reader#reader/recordRead:result',
932
2056
  create: _khorsheed_dsh_reader_reader_recordRead_result$schema,
933
2057
  schema: _khorsheed_dsh_reader_reader_recordRead_result$schema(),
2058
+ jsonSchema: {"type":"object","properties":{"entries":{"type":"number"}},"required":["entries"],"additionalProperties":true},
934
2059
  },
935
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":268,"column":3},
2060
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":275,"column":3},
936
2061
  },
937
- {
938
- id: '@khorsheed/dsh-reader#reader/refresh',
2062
+ 'reader/refresh': {
939
2063
  service: 'readerRemote',
940
- namespace: 'reader',
941
- method: 'refresh',
2064
+ description: 'Fetch the named sources (or every enabled one) now.',
942
2065
  invocation: { kind: 'direct' },
943
2066
  parameters: [
944
2067
  {
945
2068
  name: 'request',
946
- wire: 'request',
947
2069
  source: 'json',
948
2070
  codec: {
949
2071
  mode: 'strict',
950
2072
  typeSymbol: '@khorsheed/dsh-reader#reader/refresh:request',
951
2073
  create: _khorsheed_dsh_reader_reader_refresh_parameter_0$schema,
952
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},
953
2083
  },
954
2084
  },
955
2085
  ],
@@ -958,25 +2088,31 @@ export const TYPERT = {
958
2088
  typeSymbol: '@khorsheed/dsh-reader#reader/refresh:result',
959
2089
  create: _khorsheed_dsh_reader_reader_refresh_result$schema,
960
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},
961
2092
  },
962
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":96,"column":9},
2093
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":103,"column":9},
963
2094
  },
964
- {
965
- id: '@khorsheed/dsh-reader#reader/rememberSentences',
2095
+ 'reader/rememberSentences': {
966
2096
  service: 'readerRemote',
967
- namespace: 'reader',
968
- method: 'rememberSentences',
2097
+ description: 'Persist what one translation run learned (and refresh what it reused), in one batch.',
969
2098
  invocation: { kind: 'direct' },
970
2099
  parameters: [
971
2100
  {
972
2101
  name: 'request',
973
- wire: 'request',
974
2102
  source: 'json',
975
2103
  codec: {
976
2104
  mode: 'strict',
977
2105
  typeSymbol: '@khorsheed/dsh-reader#reader/rememberSentences:request',
978
2106
  create: _khorsheed_dsh_reader_reader_rememberSentences_parameter_0$schema,
979
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},
980
2116
  },
981
2117
  },
982
2118
  ],
@@ -985,25 +2121,31 @@ export const TYPERT = {
985
2121
  typeSymbol: '@khorsheed/dsh-reader#reader/rememberSentences:result',
986
2122
  create: _khorsheed_dsh_reader_reader_rememberSentences_result$schema,
987
2123
  schema: _khorsheed_dsh_reader_reader_rememberSentences_result$schema(),
2124
+ jsonSchema: {"type":"object","properties":{"stored":{"type":"number"}},"required":["stored"],"additionalProperties":true},
988
2125
  },
989
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":191,"column":3},
2126
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":198,"column":3},
990
2127
  },
991
- {
992
- id: '@khorsheed/dsh-reader#reader/removeSource',
2128
+ 'reader/removeSource': {
993
2129
  service: 'readerRemote',
994
- namespace: 'reader',
995
- method: 'removeSource',
2130
+ description: 'Drop a source; its entries\' translations go with it (their bodies stay for the budget).',
996
2131
  invocation: { kind: 'direct' },
997
2132
  parameters: [
998
2133
  {
999
2134
  name: 'request',
1000
- wire: 'request',
1001
2135
  source: 'json',
1002
2136
  codec: {
1003
2137
  mode: 'strict',
1004
2138
  typeSymbol: '@khorsheed/dsh-reader#reader/removeSource:request',
1005
2139
  create: _khorsheed_dsh_reader_reader_removeSource_parameter_0$schema,
1006
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},
1007
2149
  },
1008
2150
  },
1009
2151
  ],
@@ -1012,25 +2154,31 @@ export const TYPERT = {
1012
2154
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderMutationOutcome',
1013
2155
  create: _khorsheed_dsh_reader_reader_removeSource_result$schema,
1014
2156
  schema: _khorsheed_dsh_reader_reader_removeSource_result$schema(),
2157
+ jsonSchema: {"type":"string","enum":["not-found","unavailable","duplicate","ok","invalid-url","invalid-time"]},
1015
2158
  },
1016
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":90,"column":3},
2159
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":97,"column":3},
1017
2160
  },
1018
- {
1019
- id: '@khorsheed/dsh-reader#reader/renameTag',
2161
+ 'reader/renameTag': {
1020
2162
  service: 'readerRemote',
1021
- namespace: 'reader',
1022
- method: 'renameTag',
2163
+ description: 'Rename a tag without touching the entries that carry it.',
1023
2164
  invocation: { kind: 'direct' },
1024
2165
  parameters: [
1025
2166
  {
1026
2167
  name: 'request',
1027
- wire: 'request',
1028
2168
  source: 'json',
1029
2169
  codec: {
1030
2170
  mode: 'strict',
1031
2171
  typeSymbol: '@khorsheed/dsh-reader#reader/renameTag:request',
1032
2172
  create: _khorsheed_dsh_reader_reader_renameTag_parameter_0$schema,
1033
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},
1034
2182
  },
1035
2183
  },
1036
2184
  ],
@@ -1039,25 +2187,30 @@ export const TYPERT = {
1039
2187
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderAnnotationOutcome',
1040
2188
  create: _khorsheed_dsh_reader_reader_renameTag_result$schema,
1041
2189
  schema: _khorsheed_dsh_reader_reader_renameTag_result$schema(),
2190
+ jsonSchema: {"type":"string","enum":["not-found","unavailable","duplicate","ok","empty","invalid"]},
1042
2191
  },
1043
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":227,"column":3},
2192
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":234,"column":3},
1044
2193
  },
1045
- {
1046
- id: '@khorsheed/dsh-reader#reader/setCachePolicy',
2194
+ 'reader/setCachePolicy': {
1047
2195
  service: 'readerRemote',
1048
- namespace: 'reader',
1049
- method: 'setCachePolicy',
1050
2196
  invocation: { kind: 'direct' },
1051
2197
  parameters: [
1052
2198
  {
1053
2199
  name: 'request',
1054
- wire: 'request',
1055
2200
  source: 'json',
1056
2201
  codec: {
1057
2202
  mode: 'strict',
1058
2203
  typeSymbol: '@khorsheed/dsh-reader#reader/setCachePolicy:request',
1059
2204
  create: _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema,
1060
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},
1061
2214
  },
1062
2215
  },
1063
2216
  ],
@@ -1066,25 +2219,163 @@ export const TYPERT = {
1066
2219
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderAnnotationOutcome',
1067
2220
  create: _khorsheed_dsh_reader_reader_setCachePolicy_result$schema,
1068
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"]},
2289
+ },
2290
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":428,"column":3},
2291
+ },
2292
+ 'reader/speakerNames': {
2293
+ service: 'readerRemote',
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',
1069
2322
  },
1070
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":256,"column":3},
2323
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":392,"column":3},
1071
2324
  },
1072
- {
1073
- id: '@khorsheed/dsh-reader#reader/storeEntryBody',
2325
+ 'reader/startLocalTranscript': {
1074
2326
  service: 'readerRemote',
1075
- namespace: 'reader',
1076
- method: 'storeEntryBody',
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.',
1077
2361
  invocation: { kind: 'direct' },
1078
2362
  parameters: [
1079
2363
  {
1080
2364
  name: 'request',
1081
- wire: 'request',
1082
2365
  source: 'json',
1083
2366
  codec: {
1084
2367
  mode: 'strict',
1085
2368
  typeSymbol: '@khorsheed/dsh-reader#reader/storeEntryBody:request',
1086
2369
  create: _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema,
1087
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},
1088
2379
  },
1089
2380
  },
1090
2381
  ],
@@ -1093,52 +2384,97 @@ export const TYPERT = {
1093
2384
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderEntryBodyView',
1094
2385
  create: _khorsheed_dsh_reader_reader_storeEntryBody_result$schema,
1095
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},
1096
2388
  },
1097
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":139,"column":3},
2389
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":146,"column":3},
1098
2390
  },
1099
- {
1100
- id: '@khorsheed/dsh-reader#reader/tagEntry',
2391
+ 'reader/tagEntry': {
1101
2392
  service: 'readerRemote',
1102
- namespace: 'reader',
1103
- method: 'tagEntry',
2393
+ description: 'Add or remove one tag on one entry.',
1104
2394
  invocation: { kind: 'direct' },
1105
2395
  parameters: [
1106
2396
  {
1107
2397
  name: 'request',
1108
- wire: 'request',
1109
2398
  source: 'json',
1110
2399
  codec: {
1111
2400
  mode: 'strict',
1112
2401
  typeSymbol: '@khorsheed/dsh-reader#reader/tagEntry:request',
1113
2402
  create: _khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema,
1114
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},
2412
+ },
2413
+ },
2414
+ ],
2415
+ result: {
2416
+ mode: 'strict',
2417
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderAnnotationOutcome',
2418
+ create: _khorsheed_dsh_reader_reader_tagEntry_result$schema,
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},
1115
2445
  },
1116
2446
  },
1117
2447
  ],
1118
2448
  result: {
1119
2449
  mode: 'strict',
1120
- typeSymbol: '@khorsheed/dsh-reader/types#ReaderAnnotationOutcome',
1121
- create: _khorsheed_dsh_reader_reader_tagEntry_result$schema,
1122
- schema: _khorsheed_dsh_reader_reader_tagEntry_result$schema(),
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"]},
1123
2454
  },
1124
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":239,"column":3},
2455
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":328,"column":3},
1125
2456
  },
1126
- {
1127
- id: '@khorsheed/dsh-reader#reader/updateSource',
2457
+ 'reader/updateSource': {
1128
2458
  service: 'readerRemote',
1129
- namespace: 'reader',
1130
- method: 'updateSource',
2459
+ description: 'Change a source\'s label/enabled flag, or the global refresh time.',
1131
2460
  invocation: { kind: 'direct' },
1132
2461
  parameters: [
1133
2462
  {
1134
2463
  name: 'request',
1135
- wire: 'request',
1136
2464
  source: 'json',
1137
2465
  codec: {
1138
2466
  mode: 'strict',
1139
2467
  typeSymbol: '@khorsheed/dsh-reader#reader/updateSource:request',
1140
2468
  create: _khorsheed_dsh_reader_reader_updateSource_parameter_0$schema,
1141
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},
1142
2478
  },
1143
2479
  },
1144
2480
  ],
@@ -1147,10 +2483,19 @@ export const TYPERT = {
1147
2483
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderMutationOutcome',
1148
2484
  create: _khorsheed_dsh_reader_reader_updateSource_result$schema,
1149
2485
  schema: _khorsheed_dsh_reader_reader_updateSource_result$schema(),
2486
+ jsonSchema: {"type":"string","enum":["not-found","unavailable","duplicate","ok","invalid-url","invalid-time"]},
1150
2487
  },
1151
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":78,"column":3},
2488
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":85,"column":3},
1152
2489
  },
2490
+ },
2491
+ }, z)
2492
+
2493
+ export const TYPERT = {
2494
+ package: '@khorsheed/dsh-reader',
2495
+ face: 'host',
2496
+ schemas: [
1153
2497
  ],
2498
+ get invocations() { return $remote.descriptors },
1154
2499
  model: {
1155
2500
  "services": [
1156
2501
  {
@@ -1161,6 +2506,20 @@ export const TYPERT = {
1161
2506
  "key": "reader",
1162
2507
  "exportName": "ReaderService",
1163
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
+ },
1164
2523
  {
1165
2524
  "kind": "method",
1166
2525
  "name": "capabilities",
@@ -1255,7 +2614,7 @@ export const TYPERT = {
1255
2614
  {
1256
2615
  "kind": "method",
1257
2616
  "name": "storeEntryBody",
1258
- "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>",
1259
2618
  "summary": "Cache the markup the browser extracted for one entry.",
1260
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 */"
1261
2620
  },
@@ -1384,9 +2743,73 @@ export const TYPERT = {
1384
2743
  "signature": "async clearRecent(): Promise<{ removed: number }>",
1385
2744
  "summary": "Forget every recent entry.",
1386
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 */"
1387
2774
  }
1388
2775
  ],
1389
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
+ },
1390
2813
  {
1391
2814
  "name": "ReaderAddFailure",
1392
2815
  "declaration": "export interface ReaderAddFailure {\n readonly outcome: 'fetch-failed';\n readonly reason: string;\n}"
@@ -1435,6 +2858,18 @@ export const TYPERT = {
1435
2858
  "name": "ReaderImageResult",
1436
2859
  "declaration": "export interface ReaderImageResult {\n readonly url: string;\n readonly mime?: string;\n readonly base64?: string;\n readonly error?: string;\n}"
1437
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
+ },
1438
2873
  {
1439
2874
  "name": "ReaderMutationOutcome",
1440
2875
  "declaration": "export type ReaderMutationOutcome = 'ok' | 'not-found' | 'invalid-url' | 'invalid-time' | 'duplicate' | 'unavailable';"
@@ -1470,6 +2905,241 @@ export const TYPERT = {
1470
2905
  {
1471
2906
  "name": "ReaderTag",
1472
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}"
1473
3143
  }
1474
3144
  ]
1475
3145
  },
@@ -1702,9 +3372,169 @@ export const TYPERT = {
1702
3372
  "signature": "@Remote('quoteToSideChat') quoteToSideChat(request: { contextKey: string label: string text: string }): Promise<'ok' | 'unavailable'>",
1703
3373
  "summary": "Forward a ref block to the side-chat service when one is composed.",
1704
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. */"
1705
3515
  }
1706
3516
  ],
1707
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
+ },
1708
3538
  {
1709
3539
  "name": "ReaderAddFailure",
1710
3540
  "declaration": "export interface ReaderAddFailure {\n readonly outcome: 'fetch-failed';\n readonly reason: string;\n}"
@@ -1733,6 +3563,14 @@ export const TYPERT = {
1733
3563
  "name": "ReaderCapabilities",
1734
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}"
1735
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
+ },
1736
3574
  {
1737
3575
  "name": "ReaderEntryBodyView",
1738
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}"
@@ -1741,6 +3579,18 @@ export const TYPERT = {
1741
3579
  "name": "ReaderEntryFetchState",
1742
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; };"
1743
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
+ },
1744
3594
  {
1745
3595
  "name": "ReaderEntryTranslationView",
1746
3596
  "declaration": "export interface ReaderEntryTranslationView {\n readonly pair: string;\n readonly bodyHash: string;\n readonly segments: Record<string, string>;\n}"
@@ -1753,10 +3603,42 @@ export const TYPERT = {
1753
3603
  "name": "ReaderImageResult",
1754
3604
  "declaration": "export interface ReaderImageResult {\n readonly url: string;\n readonly mime?: string;\n readonly base64?: string;\n readonly error?: string;\n}"
1755
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
+ },
1756
3614
  {
1757
3615
  "name": "ReaderMutationOutcome",
1758
3616
  "declaration": "export type ReaderMutationOutcome = 'ok' | 'not-found' | 'invalid-url' | 'invalid-time' | 'duplicate' | 'unavailable';"
1759
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
+ },
1760
3642
  {
1761
3643
  "name": "ReaderPreviewFailureCode",
1762
3644
  "declaration": "export type ReaderPreviewFailureCode = 'blocked' | 'login' | 'unsupported-type' | 'redirected' | 'empty' | 'unreachable' | 'http' | 'unreadable';"
@@ -1785,6 +3667,10 @@ export const TYPERT = {
1785
3667
  "name": "ReaderStorageStats",
1786
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}"
1787
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
+ },
1788
3674
  {
1789
3675
  "name": "ReaderTag",
1790
3676
  "declaration": "export interface ReaderTag {\n readonly id: string;\n readonly name: string;\n readonly createdAt: string;\n}"