@khorsheed/dsh-reader 0.2.1 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.en.md +26 -121
  3. package/README.i18n.yaml +3 -3
  4. package/README.md +26 -121
  5. package/cordis.patch.yml +7 -0
  6. package/lib/client.js +30580 -6892
  7. package/lib/index.js +4189 -621
  8. package/lib/typert.host.js +2265 -319
  9. package/lib/typert.remote-client.d.ts +99 -3
  10. package/lib/typert.remote-client.js +1618 -240
  11. package/lib/types/captions.d.ts +99 -0
  12. package/lib/types/captions.js +236 -0
  13. package/lib/types/client/MediaPlayer.d.ts +55 -0
  14. package/lib/types/client/MediaPlayer.js +106 -0
  15. package/lib/types/client/NotesView.d.ts +57 -0
  16. package/lib/types/client/NotesView.js +124 -0
  17. package/lib/types/client/ReaderPane.d.ts +20 -3
  18. package/lib/types/client/ReaderPane.js +905 -164
  19. package/lib/types/client/SpeakerLegend.d.ts +18 -0
  20. package/lib/types/client/SpeakerLegend.js +26 -0
  21. package/lib/types/client/canvas-sync.d.ts +84 -0
  22. package/lib/types/client/canvas-sync.js +59 -0
  23. package/lib/types/client/contract.d.ts +138 -3
  24. package/lib/types/client/extract-article.d.ts +38 -1
  25. package/lib/types/client/extract-article.js +501 -28
  26. package/lib/types/client/icons.d.ts +1 -1
  27. package/lib/types/client/icons.js +1 -1
  28. package/lib/types/client/index.js +82 -2
  29. package/lib/types/client/locales.d.ts +279 -11
  30. package/lib/types/client/locales.js +278 -10
  31. package/lib/types/client/notes.d.ts +142 -0
  32. package/lib/types/client/notes.js +334 -0
  33. package/lib/types/client/parse-rss.js +40 -0
  34. package/lib/types/client/preset-visibility.d.ts +93 -0
  35. package/lib/types/client/preset-visibility.js +115 -0
  36. package/lib/types/client/selectors.d.ts +5 -0
  37. package/lib/types/client/selectors.js +5 -0
  38. package/lib/types/client/session.d.ts +21 -1
  39. package/lib/types/client/session.js +12 -0
  40. package/lib/types/client/store.js +4 -1
  41. package/lib/types/client/translate.d.ts +26 -1
  42. package/lib/types/client/translate.js +29 -12
  43. package/lib/types/client/useLocalTranscript.d.ts +43 -0
  44. package/lib/types/client/useLocalTranscript.js +129 -0
  45. package/lib/types/client/useMedia.d.ts +68 -0
  46. package/lib/types/client/useMedia.js +299 -0
  47. package/lib/types/client/useMediaStates.d.ts +9 -0
  48. package/lib/types/client/useMediaStates.js +43 -0
  49. package/lib/types/client/useNotes.d.ts +110 -0
  50. package/lib/types/client/useNotes.js +423 -0
  51. package/lib/types/client/usePolish.d.ts +47 -0
  52. package/lib/types/client/usePolish.js +162 -0
  53. package/lib/types/image-fetch.d.ts +81 -0
  54. package/lib/types/image-fetch.js +385 -0
  55. package/lib/types/index.d.ts +6 -0
  56. package/lib/types/index.js +3 -0
  57. package/lib/types/local-transcribe.d.ts +171 -0
  58. package/lib/types/local-transcribe.js +473 -0
  59. package/lib/types/media-host.d.ts +91 -0
  60. package/lib/types/media-host.js +230 -0
  61. package/lib/types/media.d.ts +100 -0
  62. package/lib/types/media.js +207 -0
  63. package/lib/types/notes-types.d.ts +158 -0
  64. package/lib/types/notes-types.js +8 -0
  65. package/lib/types/notes.d.ts +213 -0
  66. package/lib/types/notes.js +718 -0
  67. package/lib/types/polish.d.ts +41 -0
  68. package/lib/types/polish.js +136 -0
  69. package/lib/types/remote.d.ts +127 -1
  70. package/lib/types/remote.js +162 -1
  71. package/lib/types/service.d.ts +100 -1
  72. package/lib/types/service.js +320 -59
  73. package/lib/types/skill.d.ts +20 -0
  74. package/lib/types/skill.js +78 -0
  75. package/lib/types/store.js +30 -8
  76. package/lib/types/tool.d.ts +23 -0
  77. package/lib/types/tool.js +40 -0
  78. package/lib/types/tools.d.ts +69 -0
  79. package/lib/types/tools.js +400 -0
  80. package/lib/types/types.d.ts +106 -0
  81. package/lib/types/types.js +66 -0
  82. package/lib/types/xiaoyuzhou.d.ts +43 -0
  83. package/lib/types/xiaoyuzhou.js +134 -0
  84. package/lib/types/ytdlp.d.ts +111 -0
  85. package/lib/types/ytdlp.js +269 -0
  86. package/package.json +29 -20
  87. package/lib/invariant.js +0 -38
  88. package/lib/types/invariant.d.ts +0 -29
  89. package/lib/types/invariant.js +0 -38
@@ -1,32 +1,99 @@
1
1
  /* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
2
2
  import { z } from 'zod'
3
3
 
4
+ import { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'
5
+
6
+ let _khorsheed_dsh_reader_reader_addNote_parameter_0$schema$value
7
+ const _khorsheed_dsh_reader_reader_addNote_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_addNote_parameter_0$schema$value ??= z.object({
8
+ 'block': z.number().readonly(),
9
+ 'start': z.number().readonly().optional(),
10
+ 'quote': z.string().readonly(),
11
+ 'translated': z.string().readonly().optional(),
12
+ 'comment': z.string().readonly().optional(),
13
+ 'time': z.number().readonly().optional(),
14
+ 'entryId': z.string().readonly(),
15
+ 'title': z.string().readonly(),
16
+ 'url': z.string().readonly().optional(),
17
+ 'source': z.string().readonly().optional(),
18
+ }))
19
+ let _khorsheed_dsh_reader_reader_addNote_result$schema$value
20
+ const _khorsheed_dsh_reader_reader_addNote_result$schema = () => (_khorsheed_dsh_reader_reader_addNote_result$schema$value ??= z.union([z.literal("empty"), z.object({
21
+ 'id': z.string().readonly().describe('`n1`, `n2`… per article, never reused — the model cites notes by it.'),
22
+ 'anchor': z.object({
23
+ 'block': z.number().readonly(),
24
+ 'start': z.number().readonly().optional(),
25
+ 'quote': z.string().readonly(),
26
+ 'translated': z.string().readonly().optional().describe('The translated text, when the selection was made in the translated view.'),
27
+ 'time': z.number().readonly().optional().describe('A video / audio transcript paragraph\'s start (seconds): where ▶ plays from.'),
28
+ }).readonly(),
29
+ 'comment': z.string().readonly().optional(),
30
+ 'replies': z.array(z.object({
31
+ 'by': z.union([z.literal("user"), z.literal("agent")]).readonly(),
32
+ 'text': z.string().readonly(),
33
+ 'sessionId': z.string().readonly().optional().describe('The conversation it came from, so the reader can go back to it.'),
34
+ 'editedFrom': z.literal("agent").readonly().optional().describe('Set when the reader rewrote a line the model wrote.'),
35
+ 'at': z.string().readonly(),
36
+ })).readonly().optional().describe('Conclusions and additions, oldest first.'),
37
+ 'syncedTo': z.array(z.object({
38
+ 'canvasId': z.string().readonly(),
39
+ 'cardId': z.string().readonly(),
40
+ 'canvasTitle': z.string().readonly().describe('The canvas\'s title when it was synced (for the 「已在…」 mark).'),
41
+ 'at': z.string().readonly(),
42
+ })).readonly().optional().describe('Canvas cards made from it (a later edit does not reach them).'),
43
+ 'createdAt': z.string().readonly(),
44
+ 'updatedAt': z.string().readonly(),
45
+ }), z.literal("full")]))
46
+ let _khorsheed_dsh_reader_reader_addReply_parameter_0$schema$value
47
+ const _khorsheed_dsh_reader_reader_addReply_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_addReply_parameter_0$schema$value ??= z.object({
48
+ 'entryId': z.string(),
49
+ 'noteId': z.string(),
50
+ 'text': z.string(),
51
+ }))
52
+ let _khorsheed_dsh_reader_reader_addReply_result$schema$value
53
+ const _khorsheed_dsh_reader_reader_addReply_result$schema = () => (_khorsheed_dsh_reader_reader_addReply_result$schema$value ??= z.union([z.literal("not-found"), z.literal("ok"), z.literal("empty"), z.literal("full")]))
4
54
  let _khorsheed_dsh_reader_reader_addSource_parameter_0$schema$value
5
55
  const _khorsheed_dsh_reader_reader_addSource_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_addSource_parameter_0$schema$value ??= z.object({
6
56
  'url': z.string(),
7
57
  'label': z.string().optional(),
8
58
  }))
9
59
  let _khorsheed_dsh_reader_reader_addSource_result$schema$value
10
- const _khorsheed_dsh_reader_reader_addSource_result$schema = () => (_khorsheed_dsh_reader_reader_addSource_result$schema$value ??= z.union([z.literal("unavailable"), z.object({
60
+ const _khorsheed_dsh_reader_reader_addSource_result$schema = () => (_khorsheed_dsh_reader_reader_addSource_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("duplicate"), z.object({
11
61
  'outcome': z.union([z.literal("subscribed"), z.literal("saved-link")]).readonly(),
12
62
  'kind': z.union([z.literal("rss"), z.literal("link")]).readonly(),
13
63
  'id': z.string().readonly(),
14
64
  'label': z.string().readonly(),
15
65
  'failure': z.object({
16
- 'code': z.union([z.literal("unreadable"), z.literal("empty"), z.literal("blocked"), z.literal("login"), z.literal("unsupported-type"), z.literal("redirected"), z.literal("unreachable"), z.literal("http")]).readonly(),
66
+ 'code': z.union([z.literal("blocked"), z.literal("http"), z.literal("unreadable"), z.literal("empty"), z.literal("login"), z.literal("unsupported-type"), z.literal("redirected"), z.literal("unreachable")]).readonly(),
17
67
  'message': z.string().readonly(),
18
- }).readonly().optional(),
19
- }), z.literal("invalid-url"), z.literal("duplicate"), z.literal("unsupported-content"), z.literal("fetch-failed"), z.object({
68
+ }).readonly().optional().describe('Present when the source was saved but its body cannot be previewed. The add still succeeded: the URL is a link the reader now owns. This is the verdict\'s reason, not a failure — which is why it rides the outcome instead of becoming one more refusal that loses the link.'),
69
+ }), z.literal("invalid-url"), z.literal("unsupported-content"), z.literal("fetch-failed"), z.object({
20
70
  'outcome': z.literal("fetch-failed").readonly(),
21
- 'reason': z.string().readonly(),
71
+ 'reason': z.string().readonly().describe('The fetch seam\'s message, verbatim — a refused connection, a timeout, a byte cap.'),
22
72
  })]))
73
+ let _khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0$schema$value
74
+ const _khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0$schema$value ??= z.object({
75
+ 'entryId': z.string(),
76
+ 'force': z.boolean(),
77
+ }))
78
+ let _khorsheed_dsh_reader_reader_cancelLocalTranscript_result$schema$value
79
+ const _khorsheed_dsh_reader_reader_cancelLocalTranscript_result$schema = () => (_khorsheed_dsh_reader_reader_cancelLocalTranscript_result$schema$value ??= z.object({
80
+ 'entryId': z.string().readonly(),
81
+ 'state': z.union([z.literal("failed"), z.literal("unavailable"), z.literal("done"), z.literal("idle"), z.literal("queued"), z.literal("fetching"), z.literal("needs-models"), z.literal("transcribing"), z.literal("speakers")]).readonly(),
82
+ 'progress': z.number().readonly().optional().describe('0–1 across fetching the audio and transcribing it.'),
83
+ 'ahead': z.number().readonly().optional().describe('Jobs ahead in the engine\'s queue.'),
84
+ 'bytes': z.number().readonly().optional().describe('Bytes of speech models still to download (`needs-models`).'),
85
+ 'html': z.string().readonly().optional().describe('The transcript so far (or in full, once `done`).'),
86
+ 'language': z.string().readonly().optional().describe('The language the transcript is in, once known.'),
87
+ 'speakers': z.number().readonly().optional().describe('How many voices the transcript has, once the speakers pass settled it.'),
88
+ 'error': z.string().readonly().optional(),
89
+ }))
23
90
  let _khorsheed_dsh_reader_reader_capabilities_result$schema$value
24
91
  const _khorsheed_dsh_reader_reader_capabilities_result$schema = () => (_khorsheed_dsh_reader_reader_capabilities_result$schema$value ??= z.object({
25
92
  'protocolVersion': z.literal(1).readonly(),
26
- 'hasFs': z.boolean().readonly(),
27
- 'hasSideChat': z.boolean().readonly(),
28
- 'nextRefreshAt': z.string().readonly().optional(),
29
- 'lastRefreshAt': z.string().readonly().optional(),
93
+ 'hasFs': z.boolean().readonly().describe('False when no filesystem is mounted: state lives in memory and is lost on restart.'),
94
+ 'hasSideChat': z.boolean().readonly().describe('False when no side-chat service is mounted: the side-chat gesture must hide.'),
95
+ 'nextRefreshAt': z.string().readonly().optional().describe('ISO-8601 timestamp of the next scheduled refresh, when one is armed.'),
96
+ 'lastRefreshAt': z.string().readonly().optional().describe('ISO-8601 timestamp of the last completed refresh run, when there was one. The list shows it so a reader can decide whether the snapshot is stale enough to be worth a fetch.'),
30
97
  }))
31
98
  let _khorsheed_dsh_reader_reader_clearRecent_result$schema$value
32
99
  const _khorsheed_dsh_reader_reader_clearRecent_result$schema = () => (_khorsheed_dsh_reader_reader_clearRecent_result$schema$value ??= z.object({
@@ -42,17 +109,40 @@ const _khorsheed_dsh_reader_reader_createTag_parameter_0$schema = () => (_khorsh
42
109
  'name': z.string(),
43
110
  }))
44
111
  let _khorsheed_dsh_reader_reader_createTag_result$schema$value
45
- const _khorsheed_dsh_reader_reader_createTag_result$schema = () => (_khorsheed_dsh_reader_reader_createTag_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok"), z.literal("empty"), z.literal("not-found"), z.literal("duplicate"), z.object({
46
- 'id': z.string().readonly(),
47
- 'name': z.string().readonly(),
112
+ const _khorsheed_dsh_reader_reader_createTag_result$schema = () => (_khorsheed_dsh_reader_reader_createTag_result$schema$value ??= z.union([z.literal("not-found"), z.literal("unavailable"), z.literal("duplicate"), z.literal("ok"), z.literal("empty"), z.literal("invalid"), z.object({
113
+ 'id': z.string().readonly().describe('Stable id — renaming a tag must not rewrite every entry that carries it.'),
114
+ 'name': z.string().readonly().describe('The reader-facing name, unique case-insensitively.'),
48
115
  'createdAt': z.string().readonly(),
49
- }), z.literal("invalid")]))
116
+ })]))
117
+ let _khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0$schema$value
118
+ const _khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0$schema$value ??= z.object({
119
+ 'entryId': z.string(),
120
+ 'discussionId': z.string(),
121
+ }))
122
+ let _khorsheed_dsh_reader_reader_deleteDiscussion_result$schema$value
123
+ const _khorsheed_dsh_reader_reader_deleteDiscussion_result$schema = () => (_khorsheed_dsh_reader_reader_deleteDiscussion_result$schema$value ??= z.union([z.literal("not-found"), z.literal("ok"), z.literal("empty"), z.literal("full")]))
124
+ let _khorsheed_dsh_reader_reader_deleteNote_parameter_0$schema$value
125
+ const _khorsheed_dsh_reader_reader_deleteNote_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_deleteNote_parameter_0$schema$value ??= z.object({
126
+ 'entryId': z.string(),
127
+ 'noteId': z.string(),
128
+ }))
129
+ let _khorsheed_dsh_reader_reader_deleteNote_result$schema$value
130
+ const _khorsheed_dsh_reader_reader_deleteNote_result$schema = () => (_khorsheed_dsh_reader_reader_deleteNote_result$schema$value ??= z.union([z.literal("not-found"), z.literal("ok"), z.literal("empty"), z.literal("full")]))
50
131
  let _khorsheed_dsh_reader_reader_deleteTag_parameter_0$schema$value
51
132
  const _khorsheed_dsh_reader_reader_deleteTag_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_deleteTag_parameter_0$schema$value ??= z.object({
52
133
  'id': z.string(),
53
134
  }))
54
135
  let _khorsheed_dsh_reader_reader_deleteTag_result$schema$value
55
- const _khorsheed_dsh_reader_reader_deleteTag_result$schema = () => (_khorsheed_dsh_reader_reader_deleteTag_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok"), z.literal("empty"), z.literal("not-found"), z.literal("duplicate"), z.literal("invalid")]))
136
+ const _khorsheed_dsh_reader_reader_deleteTag_result$schema = () => (_khorsheed_dsh_reader_reader_deleteTag_result$schema$value ??= z.union([z.literal("not-found"), z.literal("unavailable"), z.literal("duplicate"), z.literal("ok"), z.literal("empty"), z.literal("invalid")]))
137
+ let _khorsheed_dsh_reader_reader_editReply_parameter_0$schema$value
138
+ const _khorsheed_dsh_reader_reader_editReply_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_editReply_parameter_0$schema$value ??= z.object({
139
+ 'entryId': z.string(),
140
+ 'noteId': z.string(),
141
+ 'index': z.number(),
142
+ 'text': z.string(),
143
+ }))
144
+ let _khorsheed_dsh_reader_reader_editReply_result$schema$value
145
+ const _khorsheed_dsh_reader_reader_editReply_result$schema = () => (_khorsheed_dsh_reader_reader_editReply_result$schema$value ??= z.union([z.literal("not-found"), z.literal("ok"), z.literal("empty"), z.literal("full")]))
56
146
  let _khorsheed_dsh_reader_reader_entryFetchStates_parameter_0$schema$value
57
147
  const _khorsheed_dsh_reader_reader_entryFetchStates_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_entryFetchStates_parameter_0$schema$value ??= z.object({
58
148
  'entryIds': z.array(z.string()),
@@ -74,9 +164,74 @@ const _khorsheed_dsh_reader_reader_entryFetchStates_result$schema = () => (_khor
74
164
  'state': z.literal("failed").readonly(),
75
165
  'at': z.string().readonly(),
76
166
  'message': z.string().readonly(),
77
- 'code': z.union([z.literal("unreadable"), z.literal("empty"), z.literal("blocked"), z.literal("login"), z.literal("unsupported-type"), z.literal("redirected"), z.literal("unreachable"), z.literal("http")]).readonly().optional(),
167
+ 'code': z.union([z.literal("blocked"), z.literal("http"), z.literal("unreadable"), z.literal("empty"), z.literal("login"), z.literal("unsupported-type"), z.literal("redirected"), z.literal("unreachable")]).readonly().optional(),
78
168
  })])),
79
169
  }))
170
+ let _khorsheed_dsh_reader_reader_entryNotes_parameter_0$schema$value
171
+ const _khorsheed_dsh_reader_reader_entryNotes_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_entryNotes_parameter_0$schema$value ??= z.object({
172
+ 'entryId': z.string(),
173
+ }))
174
+ let _khorsheed_dsh_reader_reader_entryNotes_result$schema$value
175
+ const _khorsheed_dsh_reader_reader_entryNotes_result$schema = () => (_khorsheed_dsh_reader_reader_entryNotes_result$schema$value ??= z.object({
176
+ 'entry': z.object({
177
+ 'entryId': z.string().readonly(),
178
+ 'title': z.string().readonly(),
179
+ 'url': z.string().readonly().optional(),
180
+ 'source': z.string().readonly().optional().describe('The source\'s display label (the feed\'s name, or the site).'),
181
+ 'notes': z.array(z.object({
182
+ 'id': z.string().readonly().describe('`n1`, `n2`… per article, never reused — the model cites notes by it.'),
183
+ 'anchor': z.object({
184
+ 'block': z.number().readonly(),
185
+ 'start': z.number().readonly().optional(),
186
+ 'quote': z.string().readonly(),
187
+ 'translated': z.string().readonly().optional().describe('The translated text, when the selection was made in the translated view.'),
188
+ 'time': z.number().readonly().optional().describe('A video / audio transcript paragraph\'s start (seconds): where ▶ plays from.'),
189
+ }).readonly(),
190
+ 'comment': z.string().readonly().optional(),
191
+ 'replies': z.array(z.object({
192
+ 'by': z.union([z.literal("user"), z.literal("agent")]).readonly(),
193
+ 'text': z.string().readonly(),
194
+ 'sessionId': z.string().readonly().optional().describe('The conversation it came from, so the reader can go back to it.'),
195
+ 'editedFrom': z.literal("agent").readonly().optional().describe('Set when the reader rewrote a line the model wrote.'),
196
+ 'at': z.string().readonly(),
197
+ })).readonly().optional().describe('Conclusions and additions, oldest first.'),
198
+ 'syncedTo': z.array(z.object({
199
+ 'canvasId': z.string().readonly(),
200
+ 'cardId': z.string().readonly(),
201
+ 'canvasTitle': z.string().readonly().describe('The canvas\'s title when it was synced (for the 「已在…」 mark).'),
202
+ 'at': z.string().readonly(),
203
+ })).readonly().optional().describe('Canvas cards made from it (a later edit does not reach them).'),
204
+ 'createdAt': z.string().readonly(),
205
+ 'updatedAt': z.string().readonly(),
206
+ })).readonly(),
207
+ 'sessions': z.array(z.object({
208
+ 'sessionId': z.string().readonly(),
209
+ 'title': z.string().readonly().optional(),
210
+ 'lastAt': z.string().readonly(),
211
+ })).readonly(),
212
+ 'discussions': z.array(z.object({
213
+ 'id': z.string().readonly().describe('`d1`, `d2`… per article, never reused.'),
214
+ 'kind': z.union([z.literal("check"), z.literal("discussion")]).readonly(),
215
+ 'sessionId': z.string().readonly().optional(),
216
+ 'title': z.string().readonly(),
217
+ 'points': z.array(z.object({
218
+ 'text': z.string().readonly(),
219
+ 'para': z.number().readonly().optional().describe('¶ number (1-based), when the point cites the article.'),
220
+ })).readonly(),
221
+ 'aside': z.string().readonly().optional().describe('One line for what went fine (「其余 2 题讲到位了」).'),
222
+ 'syncedTo': z.array(z.object({
223
+ 'canvasId': z.string().readonly(),
224
+ 'cardId': z.string().readonly(),
225
+ 'canvasTitle': z.string().readonly().describe('The canvas\'s title when it was synced (for the 「已在…」 mark).'),
226
+ 'at': z.string().readonly(),
227
+ })).readonly().optional().describe('Canvas cards made from it.'),
228
+ 'createdAt': z.string().readonly(),
229
+ })).readonly().optional().describe('Discussion notes, newest first.'),
230
+ 'nextNote': z.number().readonly().describe('The next note number; ids are never reused, so a deleted n3 stays deleted.'),
231
+ 'nextDiscussion': z.number().readonly().optional().describe('The next discussion number, never reused either.'),
232
+ 'updatedAt': z.string().readonly(),
233
+ }).optional(),
234
+ }))
80
235
  let _khorsheed_dsh_reader_reader_entryTags_parameter_0$schema$value
81
236
  const _khorsheed_dsh_reader_reader_entryTags_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_entryTags_parameter_0$schema$value ??= z.object({
82
237
  'entryId': z.string(),
@@ -84,8 +239,8 @@ const _khorsheed_dsh_reader_reader_entryTags_parameter_0$schema = () => (_khorsh
84
239
  let _khorsheed_dsh_reader_reader_entryTags_result$schema$value
85
240
  const _khorsheed_dsh_reader_reader_entryTags_result$schema = () => (_khorsheed_dsh_reader_reader_entryTags_result$schema$value ??= z.object({
86
241
  'tags': z.array(z.object({
87
- 'id': z.string().readonly(),
88
- 'name': z.string().readonly(),
242
+ 'id': z.string().readonly().describe('Stable id — renaming a tag must not rewrite every entry that carries it.'),
243
+ 'name': z.string().readonly().describe('The reader-facing name, unique case-insensitively.'),
89
244
  'createdAt': z.string().readonly(),
90
245
  })),
91
246
  }))
@@ -103,6 +258,17 @@ const _khorsheed_dsh_reader_reader_fetchEntryBody_result$schema = () => (_khorsh
103
258
  'truncated': z.boolean().optional(),
104
259
  'error': z.string().optional(),
105
260
  }))
261
+ let _khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema$value
262
+ const _khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema$value ??= z.object({
263
+ 'url': z.string(),
264
+ }))
265
+ let _khorsheed_dsh_reader_reader_fetchImage_result$schema$value
266
+ const _khorsheed_dsh_reader_reader_fetchImage_result$schema = () => (_khorsheed_dsh_reader_reader_fetchImage_result$schema$value ??= z.object({
267
+ 'url': z.string().readonly().describe('The URL the pane asked about (echoed, so a late answer can be matched).'),
268
+ 'mime': z.string().readonly().optional().describe('The image\'s declared content type, when the fetch produced bytes.'),
269
+ 'base64': z.string().readonly().optional().describe('The image bytes, base64-encoded, when the fetch produced them.'),
270
+ 'error': z.string().readonly().optional().describe('Why the rescue failed, when it did.'),
271
+ }))
106
272
  let _khorsheed_dsh_reader_reader_getBodies_parameter_0$schema$value
107
273
  const _khorsheed_dsh_reader_reader_getBodies_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_getBodies_parameter_0$schema$value ??= z.object({
108
274
  'ids': z.array(z.string()),
@@ -113,9 +279,9 @@ const _khorsheed_dsh_reader_reader_getBodies_result$schema = () => (_khorsheed_d
113
279
  'id': z.string().readonly(),
114
280
  'raw': z.string().readonly().optional(),
115
281
  'truncated': z.boolean().readonly().optional(),
116
- 'error': z.string().readonly().optional(),
117
- 'title': z.string().readonly().optional(),
118
- 'excerpt': z.string().readonly().optional(),
282
+ 'error': z.string().readonly().optional().describe('Present when the payload could not be produced (fetch failed, no fs, …).'),
283
+ 'title': z.string().readonly().optional().describe('The captured article title for a link source\'s single entry, when a past extraction stored it (see {@link ReaderEntryAnnotation.title}). The wall prefers it over the URL-derived label.'),
284
+ 'excerpt': z.string().readonly().optional().describe('The captured excerpt, with the title.'),
119
285
  })),
120
286
  }))
121
287
  let _khorsheed_dsh_reader_reader_getCachePolicy_result$schema$value
@@ -133,15 +299,15 @@ const _khorsheed_dsh_reader_reader_getEntryBody_parameter_0$schema = () => (_kho
133
299
  let _khorsheed_dsh_reader_reader_getEntryBody_result$schema$value
134
300
  const _khorsheed_dsh_reader_reader_getEntryBody_result$schema = () => (_khorsheed_dsh_reader_reader_getEntryBody_result$schema$value ??= z.object({
135
301
  'entryId': z.string().readonly(),
136
- 'cached': z.boolean().readonly(),
137
- 'fresh': z.boolean().readonly(),
138
- 'fromFeed': z.boolean().readonly(),
302
+ 'cached': z.boolean().readonly().describe('True when this body is a cached fetch rather than the feed\'s own payload.'),
303
+ 'fresh': z.boolean().readonly().describe('False when the cache\'s deadline has passed: the view offers the fetch.'),
304
+ 'fromFeed': z.boolean().readonly().describe('True when the feed\'s payload already carries full text for this entry.'),
139
305
  'html': z.string().readonly().optional(),
140
306
  'fetchedAt': z.string().readonly().optional(),
141
307
  'truncated': z.boolean().readonly().optional(),
142
- 'scriptFigures': z.number().readonly().optional(),
143
- 'rendered': z.boolean().readonly().optional(),
144
- 'error': z.string().readonly().optional(),
308
+ 'scriptFigures': z.number().readonly().optional().describe('Figures this page draws with scripts — the detail view says so.'),
309
+ 'rendered': z.boolean().readonly().optional().describe('True when this body came from a rendered fetch (the「重新抓取」route reads it).'),
310
+ 'error': z.string().readonly().optional().describe('Why a fetch could not produce a body, when one was attempted.'),
145
311
  }))
146
312
  let _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0$schema$value
147
313
  const _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0$schema$value ??= z.object({
@@ -181,13 +347,13 @@ const _khorsheed_dsh_reader_reader_getStorageStats_result$schema = () => (_khors
181
347
  'bodies': z.object({
182
348
  'entries': z.number().readonly(),
183
349
  'chars': z.number().readonly(),
184
- }).readonly(),
350
+ }).readonly().describe('The cached article bodies (what TTL + maxEntries govern).'),
185
351
  'translations': z.object({
186
- 'entries': z.number().readonly(),
187
- 'chars': z.number().readonly(),
188
- 'memoryEntries': z.number().readonly(),
189
- 'memoryChars': z.number().readonly(),
190
- }).readonly(),
352
+ 'entries': z.number().readonly().describe('How many entries carry a segment map.'),
353
+ 'chars': z.number().readonly().describe('The maps\' combined size.'),
354
+ 'memoryEntries': z.number().readonly().describe('The global memory\'s sentence count (0 when no table exists).'),
355
+ 'memoryChars': z.number().readonly().describe('The global memory\'s size (0 when no table exists).'),
356
+ }).readonly().describe('The two translation tiers: per-entry maps, and the global sentence memory.'),
191
357
  }))
192
358
  let _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0$schema$value
193
359
  const _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0$schema$value ??= z.object({
@@ -205,7 +371,7 @@ const _khorsheed_dsh_reader_reader_listBackfillCandidates_result$schema = () =>
205
371
  'entryId': z.string().readonly(),
206
372
  'url': z.string().readonly(),
207
373
  'label': z.string().readonly(),
208
- 'lastError': z.string().readonly().optional(),
374
+ 'lastError': z.string().readonly().optional().describe('Why a previous attempt failed, when one did (and when it is worth retrying).'),
209
375
  })),
210
376
  }))
211
377
  let _khorsheed_dsh_reader_reader_listRecent_result$schema$value
@@ -214,8 +380,8 @@ const _khorsheed_dsh_reader_reader_listRecent_result$schema = () => (_khorsheed_
214
380
  'entryId': z.string().readonly(),
215
381
  'sourceId': z.string().readonly(),
216
382
  'title': z.string().readonly(),
217
- 'url': z.string().readonly().optional(),
218
- 'readAt': z.string().readonly(),
383
+ 'url': z.string().readonly().optional().describe('The article URL, for reopening an entry the feed no longer publishes.'),
384
+ 'readAt': z.string().readonly().describe('When it was opened (ISO-8601).'),
219
385
  })),
220
386
  }))
221
387
  let _khorsheed_dsh_reader_reader_listSources_result$schema$value
@@ -226,28 +392,106 @@ const _khorsheed_dsh_reader_reader_listSources_result$schema = () => (_khorsheed
226
392
  'url': z.string().readonly(),
227
393
  'label': z.string().readonly(),
228
394
  'enabled': z.boolean().readonly(),
229
- 'addedAt': z.string().readonly(),
395
+ 'addedAt': z.string().readonly().describe('When the reader added it (ISO-8601). The browser needs this to order the wall and the management list by "when did this arrive": a saved link carries no publication date at all, so without this field it sorts as the oldest thing on the wall — which is exactly where a reader who just added it will not look.'),
230
396
  'fetchedAt': z.string().readonly().optional(),
231
- 'status': z.union([z.literal("ok"), z.literal("error"), z.literal("fetching")]).readonly().optional(),
397
+ 'status': z.union([z.literal("error"), z.literal("ok"), z.literal("fetching")]).readonly().optional(),
232
398
  'error': z.string().readonly().optional(),
233
399
  'truncated': z.boolean().readonly().optional(),
234
400
  'hasBody': z.boolean().readonly(),
235
401
  'failure': z.object({
236
- 'code': z.union([z.literal("unreadable"), z.literal("empty"), z.literal("blocked"), z.literal("login"), z.literal("unsupported-type"), z.literal("redirected"), z.literal("unreachable"), z.literal("http")]).readonly(),
402
+ 'code': z.union([z.literal("blocked"), z.literal("http"), z.literal("unreadable"), z.literal("empty"), z.literal("login"), z.literal("unsupported-type"), z.literal("redirected"), z.literal("unreachable")]).readonly(),
237
403
  'message': z.string().readonly(),
238
- }).readonly().optional(),
239
- 'resolvedFrom': z.string().readonly().optional(),
404
+ }).readonly().optional().describe('Present when this source has no previewable body (see {@link ReaderPreviewFailure}).'),
405
+ 'resolvedFrom': z.string().readonly().optional().describe('The URL the reader pasted, when the source was resolved to a canonical version (see {@link ReaderSource.resolvedFrom}).'),
240
406
  })),
241
407
  }))
242
408
  let _khorsheed_dsh_reader_reader_listTags_result$schema$value
243
409
  const _khorsheed_dsh_reader_reader_listTags_result$schema = () => (_khorsheed_dsh_reader_reader_listTags_result$schema$value ??= z.object({
244
410
  'tags': z.array(z.object({
245
- 'id': z.string().readonly(),
246
- 'name': z.string().readonly(),
411
+ 'id': z.string().readonly().describe('Stable id — renaming a tag must not rewrite every entry that carries it.'),
412
+ 'name': z.string().readonly().describe('The reader-facing name, unique case-insensitively.'),
247
413
  'createdAt': z.string().readonly(),
248
414
  })),
249
415
  'counts': z.record(z.string(), z.number()),
250
416
  }))
417
+ let _khorsheed_dsh_reader_reader_localTranscript_parameter_0$schema$value
418
+ const _khorsheed_dsh_reader_reader_localTranscript_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_localTranscript_parameter_0$schema$value ??= z.object({
419
+ 'entryId': z.string(),
420
+ }))
421
+ let _khorsheed_dsh_reader_reader_localTranscript_result$schema$value
422
+ const _khorsheed_dsh_reader_reader_localTranscript_result$schema = () => (_khorsheed_dsh_reader_reader_localTranscript_result$schema$value ??= z.object({
423
+ 'entryId': z.string().readonly(),
424
+ 'state': z.union([z.literal("failed"), z.literal("unavailable"), z.literal("done"), z.literal("idle"), z.literal("queued"), z.literal("fetching"), z.literal("needs-models"), z.literal("transcribing"), z.literal("speakers")]).readonly(),
425
+ 'progress': z.number().readonly().optional().describe('0–1 across fetching the audio and transcribing it.'),
426
+ 'ahead': z.number().readonly().optional().describe('Jobs ahead in the engine\'s queue.'),
427
+ 'bytes': z.number().readonly().optional().describe('Bytes of speech models still to download (`needs-models`).'),
428
+ 'html': z.string().readonly().optional().describe('The transcript so far (or in full, once `done`).'),
429
+ 'language': z.string().readonly().optional().describe('The language the transcript is in, once known.'),
430
+ 'speakers': z.number().readonly().optional().describe('How many voices the transcript has, once the speakers pass settled it.'),
431
+ 'error': z.string().readonly().optional(),
432
+ }))
433
+ let _khorsheed_dsh_reader_reader_markSynced_parameter_0$schema$value
434
+ const _khorsheed_dsh_reader_reader_markSynced_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_markSynced_parameter_0$schema$value ??= z.object({
435
+ 'entryId': z.string(),
436
+ 'noteId': z.string().optional(),
437
+ 'discussionId': z.string().optional(),
438
+ 'canvasId': z.string(),
439
+ 'cardId': z.string(),
440
+ 'canvasTitle': z.string(),
441
+ }))
442
+ let _khorsheed_dsh_reader_reader_markSynced_result$schema$value
443
+ const _khorsheed_dsh_reader_reader_markSynced_result$schema = () => (_khorsheed_dsh_reader_reader_markSynced_result$schema$value ??= z.union([z.literal("not-found"), z.literal("ok"), z.literal("empty"), z.literal("full")]))
444
+ let _khorsheed_dsh_reader_reader_mediaStates_parameter_0$schema$value
445
+ const _khorsheed_dsh_reader_reader_mediaStates_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_mediaStates_parameter_0$schema$value ??= z.object({
446
+ 'entryIds': z.array(z.string()),
447
+ }))
448
+ let _khorsheed_dsh_reader_reader_mediaStates_result$schema$value
449
+ const _khorsheed_dsh_reader_reader_mediaStates_result$schema = () => (_khorsheed_dsh_reader_reader_mediaStates_result$schema$value ??= z.object({
450
+ 'engine': z.boolean().readonly(),
451
+ 'states': z.record(z.string(), z.object({
452
+ 'state': z.union([z.literal("failed"), z.literal("none"), z.literal("local"), z.literal("queued"), z.literal("fetching"), z.literal("platform"), z.literal("transcribing")]).readonly(),
453
+ 'progress': z.number().readonly().optional().describe('0–1, while transcribing.'),
454
+ 'ahead': z.number().readonly().optional().describe('Jobs ahead in the engine\'s queue, while queued.'),
455
+ })).readonly().readonly(),
456
+ }))
457
+ let _khorsheed_dsh_reader_reader_mediaTranscript_parameter_0$schema$value
458
+ const _khorsheed_dsh_reader_reader_mediaTranscript_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_mediaTranscript_parameter_0$schema$value ??= z.object({
459
+ 'entryId': z.string(),
460
+ 'url': z.string(),
461
+ }))
462
+ let _khorsheed_dsh_reader_reader_mediaTranscript_result$schema$value
463
+ const _khorsheed_dsh_reader_reader_mediaTranscript_result$schema = () => (_khorsheed_dsh_reader_reader_mediaTranscript_result$schema$value ??= z.object({
464
+ 'entryId': z.string(),
465
+ 'html': z.string().optional(),
466
+ 'captions': z.union([z.literal("failed"), z.literal("none"), z.literal("platform")]),
467
+ 'language': z.string().optional(),
468
+ 'error': z.string().optional(),
469
+ }))
470
+ let _khorsheed_dsh_reader_reader_nameSpeaker_parameter_0$schema$value
471
+ const _khorsheed_dsh_reader_reader_nameSpeaker_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_nameSpeaker_parameter_0$schema$value ??= z.object({
472
+ 'entryId': z.string(),
473
+ 'speaker': z.number(),
474
+ 'name': z.string(),
475
+ }))
476
+ let _khorsheed_dsh_reader_reader_nameSpeaker_result$schema$value
477
+ const _khorsheed_dsh_reader_reader_nameSpeaker_result$schema = () => (_khorsheed_dsh_reader_reader_nameSpeaker_result$schema$value ??= z.record(z.string(), z.string()))
478
+ let _khorsheed_dsh_reader_reader_noteCounts_result$schema$value
479
+ const _khorsheed_dsh_reader_reader_noteCounts_result$schema = () => (_khorsheed_dsh_reader_reader_noteCounts_result$schema$value ??= z.object({
480
+ 'counts': z.record(z.string(), z.number()),
481
+ }))
482
+ let _khorsheed_dsh_reader_reader_polish_parameter_0$schema$value
483
+ const _khorsheed_dsh_reader_reader_polish_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_polish_parameter_0$schema$value ??= z.object({
484
+ 'entryId': z.string(),
485
+ }))
486
+ let _khorsheed_dsh_reader_reader_polish_result$schema$value
487
+ const _khorsheed_dsh_reader_reader_polish_result$schema = () => (_khorsheed_dsh_reader_reader_polish_result$schema$value ??= z.union([z.literal(null), z.object({
488
+ 'total': z.number().readonly().describe('Paragraphs in the article (the ¶ numbering the model read).'),
489
+ 'done': z.number().readonly(),
490
+ 'paragraphs': z.record(z.string(), z.string()).readonly().readonly().describe('¶ number (1-based, as a string key) → the agent\'s translation.'),
491
+ 'off': z.array(z.number()).readonly().describe('Paragraphs the reader turned back to the machine translation.'),
492
+ 'updatedAt': z.string().readonly(),
493
+ 'complete': z.boolean().readonly(),
494
+ })]))
251
495
  let _khorsheed_dsh_reader_reader_pruneTags_result$schema$value
252
496
  const _khorsheed_dsh_reader_reader_pruneTags_result$schema = () => (_khorsheed_dsh_reader_reader_pruneTags_result$schema$value ??= z.object({
253
497
  'removed': z.number(),
@@ -260,6 +504,17 @@ const _khorsheed_dsh_reader_reader_quoteToSideChat_parameter_0$schema = () => (_
260
504
  }))
261
505
  let _khorsheed_dsh_reader_reader_quoteToSideChat_result$schema$value
262
506
  const _khorsheed_dsh_reader_reader_quoteToSideChat_result$schema = () => (_khorsheed_dsh_reader_reader_quoteToSideChat_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok")]))
507
+ let _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0$schema$value
508
+ const _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_recordDiscussion_parameter_0$schema$value ??= z.object({
509
+ 'entryId': z.string().readonly(),
510
+ 'title': z.string().readonly(),
511
+ 'url': z.string().readonly().optional(),
512
+ 'source': z.string().readonly().optional(),
513
+ 'sessionId': z.string(),
514
+ 'sessionTitle': z.string().optional(),
515
+ }))
516
+ let _khorsheed_dsh_reader_reader_recordDiscussion_result$schema$value
517
+ const _khorsheed_dsh_reader_reader_recordDiscussion_result$schema = () => (_khorsheed_dsh_reader_reader_recordDiscussion_result$schema$value ??= z.union([z.literal("ok"), z.literal("empty")]))
263
518
  let _khorsheed_dsh_reader_reader_recordRead_parameter_0$schema$value
264
519
  const _khorsheed_dsh_reader_reader_recordRead_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_recordRead_parameter_0$schema$value ??= z.object({
265
520
  'entryId': z.string(),
@@ -287,12 +542,12 @@ let _khorsheed_dsh_reader_reader_rememberSentences_parameter_0$schema$value
287
542
  const _khorsheed_dsh_reader_reader_rememberSentences_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_rememberSentences_parameter_0$schema$value ??= z.object({
288
543
  'pair': z.string(),
289
544
  'entries': z.array(z.object({
290
- 'hash': z.string().readonly(),
545
+ 'hash': z.string().readonly().describe('The client\'s `translationHash(source)`, stored opaquely.'),
291
546
  'source': z.string().readonly(),
292
547
  'target': z.string().readonly(),
293
548
  })),
294
549
  'recalled': z.array(z.object({
295
- 'hash': z.string().readonly(),
550
+ 'hash': z.string().readonly().describe('The client\'s `translationHash(source)`, stored opaquely.'),
296
551
  'source': z.string().readonly(),
297
552
  'target': z.string().readonly(),
298
553
  })).optional(),
@@ -309,14 +564,14 @@ const _khorsheed_dsh_reader_reader_removeSource_parameter_0$schema = () => (_kho
309
564
  'entryIds': z.array(z.string()).optional(),
310
565
  }))
311
566
  let _khorsheed_dsh_reader_reader_removeSource_result$schema$value
312
- const _khorsheed_dsh_reader_reader_removeSource_result$schema = () => (_khorsheed_dsh_reader_reader_removeSource_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok"), z.literal("not-found"), z.literal("invalid-url"), z.literal("invalid-time"), z.literal("duplicate")]))
567
+ const _khorsheed_dsh_reader_reader_removeSource_result$schema = () => (_khorsheed_dsh_reader_reader_removeSource_result$schema$value ??= z.union([z.literal("not-found"), z.literal("unavailable"), z.literal("duplicate"), z.literal("ok"), z.literal("invalid-url"), z.literal("invalid-time")]))
313
568
  let _khorsheed_dsh_reader_reader_renameTag_parameter_0$schema$value
314
569
  const _khorsheed_dsh_reader_reader_renameTag_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_renameTag_parameter_0$schema$value ??= z.object({
315
570
  'id': z.string(),
316
571
  'name': z.string(),
317
572
  }))
318
573
  let _khorsheed_dsh_reader_reader_renameTag_result$schema$value
319
- const _khorsheed_dsh_reader_reader_renameTag_result$schema = () => (_khorsheed_dsh_reader_reader_renameTag_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok"), z.literal("empty"), z.literal("not-found"), z.literal("duplicate"), z.literal("invalid")]))
574
+ const _khorsheed_dsh_reader_reader_renameTag_result$schema = () => (_khorsheed_dsh_reader_reader_renameTag_result$schema$value ??= z.union([z.literal("not-found"), z.literal("unavailable"), z.literal("duplicate"), z.literal("ok"), z.literal("empty"), z.literal("invalid")]))
320
575
  let _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema$value
321
576
  const _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema$value ??= z.object({
322
577
  'ttlHours': z.number(),
@@ -324,7 +579,64 @@ const _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema = () => (_k
324
579
  'translationBudgetChars': z.number().optional(),
325
580
  }))
326
581
  let _khorsheed_dsh_reader_reader_setCachePolicy_result$schema$value
327
- const _khorsheed_dsh_reader_reader_setCachePolicy_result$schema = () => (_khorsheed_dsh_reader_reader_setCachePolicy_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok"), z.literal("empty"), z.literal("not-found"), z.literal("duplicate"), z.literal("invalid")]))
582
+ const _khorsheed_dsh_reader_reader_setCachePolicy_result$schema = () => (_khorsheed_dsh_reader_reader_setCachePolicy_result$schema$value ??= z.union([z.literal("not-found"), z.literal("unavailable"), z.literal("duplicate"), z.literal("ok"), z.literal("empty"), z.literal("invalid")]))
583
+ let _khorsheed_dsh_reader_reader_setPolishOff_parameter_0$schema$value
584
+ const _khorsheed_dsh_reader_reader_setPolishOff_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_setPolishOff_parameter_0$schema$value ??= z.object({
585
+ 'entryId': z.string(),
586
+ 'paragraph': z.number(),
587
+ 'off': z.boolean(),
588
+ }))
589
+ let _khorsheed_dsh_reader_reader_setPolishOff_result$schema$value
590
+ const _khorsheed_dsh_reader_reader_setPolishOff_result$schema = () => (_khorsheed_dsh_reader_reader_setPolishOff_result$schema$value ??= z.union([z.literal(null), z.object({
591
+ 'total': z.number().readonly().describe('Paragraphs in the article (the ¶ numbering the model read).'),
592
+ 'done': z.number().readonly(),
593
+ 'paragraphs': z.record(z.string(), z.string()).readonly().readonly().describe('¶ number (1-based, as a string key) → the agent\'s translation.'),
594
+ 'off': z.array(z.number()).readonly().describe('Paragraphs the reader turned back to the machine translation.'),
595
+ 'updatedAt': z.string().readonly(),
596
+ 'complete': z.boolean().readonly(),
597
+ })]))
598
+ let _khorsheed_dsh_reader_reader_snapshotEntry_parameter_0$schema$value
599
+ const _khorsheed_dsh_reader_reader_snapshotEntry_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_snapshotEntry_parameter_0$schema$value ??= z.object({
600
+ 'entryId': z.string().readonly(),
601
+ 'title': z.string().readonly(),
602
+ 'url': z.string().readonly().optional(),
603
+ 'source': z.string().readonly().optional(),
604
+ 'paragraphs': z.array(z.string()),
605
+ }))
606
+ let _khorsheed_dsh_reader_reader_snapshotEntry_result$schema$value
607
+ const _khorsheed_dsh_reader_reader_snapshotEntry_result$schema = () => (_khorsheed_dsh_reader_reader_snapshotEntry_result$schema$value ??= z.union([z.literal("ok"), z.literal("empty")]))
608
+ let _khorsheed_dsh_reader_reader_speakerNames_parameter_0$schema$value
609
+ const _khorsheed_dsh_reader_reader_speakerNames_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_speakerNames_parameter_0$schema$value ??= z.object({
610
+ 'entryId': z.string(),
611
+ }))
612
+ let _khorsheed_dsh_reader_reader_speakerNames_result$schema$value
613
+ const _khorsheed_dsh_reader_reader_speakerNames_result$schema = () => (_khorsheed_dsh_reader_reader_speakerNames_result$schema$value ??= z.record(z.string(), z.string()))
614
+ let _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0$schema$value
615
+ const _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0$schema$value ??= z.object({
616
+ 'entryId': z.string(),
617
+ 'url': z.string(),
618
+ 'media': z.object({
619
+ 'kind': z.union([z.literal("video"), z.literal("audio")]).readonly(),
620
+ 'provider': z.union([z.literal("youtube"), z.literal("bilibili"), z.literal("xiaoyuzhou"), z.literal("enclosure")]).readonly(),
621
+ 'ref': z.string().readonly().describe('The platform\'s id (YouTube video id, Bilibili BV id) or the audio URL.'),
622
+ 'durationSec': z.number().readonly().optional(),
623
+ 'thumbnail': z.string().readonly().optional(),
624
+ }),
625
+ 'title': z.string().optional(),
626
+ 'confirmModels': z.boolean().optional(),
627
+ }))
628
+ let _khorsheed_dsh_reader_reader_startLocalTranscript_result$schema$value
629
+ const _khorsheed_dsh_reader_reader_startLocalTranscript_result$schema = () => (_khorsheed_dsh_reader_reader_startLocalTranscript_result$schema$value ??= z.object({
630
+ 'entryId': z.string().readonly(),
631
+ 'state': z.union([z.literal("failed"), z.literal("unavailable"), z.literal("done"), z.literal("idle"), z.literal("queued"), z.literal("fetching"), z.literal("needs-models"), z.literal("transcribing"), z.literal("speakers")]).readonly(),
632
+ 'progress': z.number().readonly().optional().describe('0–1 across fetching the audio and transcribing it.'),
633
+ 'ahead': z.number().readonly().optional().describe('Jobs ahead in the engine\'s queue.'),
634
+ 'bytes': z.number().readonly().optional().describe('Bytes of speech models still to download (`needs-models`).'),
635
+ 'html': z.string().readonly().optional().describe('The transcript so far (or in full, once `done`).'),
636
+ 'language': z.string().readonly().optional().describe('The language the transcript is in, once known.'),
637
+ 'speakers': z.number().readonly().optional().describe('How many voices the transcript has, once the speakers pass settled it.'),
638
+ 'error': z.string().readonly().optional(),
639
+ }))
328
640
  let _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema$value
329
641
  const _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema$value ??= z.object({
330
642
  'entryId': z.string(),
@@ -333,21 +645,21 @@ const _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema = () => (_k
333
645
  'truncated': z.boolean().optional(),
334
646
  'scriptFigures': z.number().optional(),
335
647
  'bodyHash': z.string().optional(),
336
- 'title': z.string().optional(),
337
- 'excerpt': z.string().optional(),
648
+ 'title': z.string().optional().describe('The article\'s own title, as extracted — the saved link\'s card upgrade.'),
649
+ 'excerpt': z.string().optional().describe('A short excerpt (abstract / first paragraph), with the title.'),
338
650
  }))
339
651
  let _khorsheed_dsh_reader_reader_storeEntryBody_result$schema$value
340
652
  const _khorsheed_dsh_reader_reader_storeEntryBody_result$schema = () => (_khorsheed_dsh_reader_reader_storeEntryBody_result$schema$value ??= z.object({
341
653
  'entryId': z.string().readonly(),
342
- 'cached': z.boolean().readonly(),
343
- 'fresh': z.boolean().readonly(),
344
- 'fromFeed': z.boolean().readonly(),
654
+ 'cached': z.boolean().readonly().describe('True when this body is a cached fetch rather than the feed\'s own payload.'),
655
+ 'fresh': z.boolean().readonly().describe('False when the cache\'s deadline has passed: the view offers the fetch.'),
656
+ 'fromFeed': z.boolean().readonly().describe('True when the feed\'s payload already carries full text for this entry.'),
345
657
  'html': z.string().readonly().optional(),
346
658
  'fetchedAt': z.string().readonly().optional(),
347
659
  'truncated': z.boolean().readonly().optional(),
348
- 'scriptFigures': z.number().readonly().optional(),
349
- 'rendered': z.boolean().readonly().optional(),
350
- 'error': z.string().readonly().optional(),
660
+ 'scriptFigures': z.number().readonly().optional().describe('Figures this page draws with scripts — the detail view says so.'),
661
+ 'rendered': z.boolean().readonly().optional().describe('True when this body came from a rendered fetch (the「重新抓取」route reads it).'),
662
+ 'error': z.string().readonly().optional().describe('Why a fetch could not produce a body, when one was attempted.'),
351
663
  }))
352
664
  let _khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema$value
353
665
  const _khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema$value ??= z.object({
@@ -356,7 +668,15 @@ const _khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema = () => (_khorshe
356
668
  'on': z.boolean(),
357
669
  }))
358
670
  let _khorsheed_dsh_reader_reader_tagEntry_result$schema$value
359
- const _khorsheed_dsh_reader_reader_tagEntry_result$schema = () => (_khorsheed_dsh_reader_reader_tagEntry_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok"), z.literal("empty"), z.literal("not-found"), z.literal("duplicate"), z.literal("invalid")]))
671
+ const _khorsheed_dsh_reader_reader_tagEntry_result$schema = () => (_khorsheed_dsh_reader_reader_tagEntry_result$schema$value ??= z.union([z.literal("not-found"), z.literal("unavailable"), z.literal("duplicate"), z.literal("ok"), z.literal("empty"), z.literal("invalid")]))
672
+ let _khorsheed_dsh_reader_reader_updateNote_parameter_0$schema$value
673
+ const _khorsheed_dsh_reader_reader_updateNote_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_updateNote_parameter_0$schema$value ??= z.object({
674
+ 'entryId': z.string(),
675
+ 'noteId': z.string(),
676
+ 'comment': z.string(),
677
+ }))
678
+ let _khorsheed_dsh_reader_reader_updateNote_result$schema$value
679
+ const _khorsheed_dsh_reader_reader_updateNote_result$schema = () => (_khorsheed_dsh_reader_reader_updateNote_result$schema$value ??= z.union([z.literal("not-found"), z.literal("ok"), z.literal("empty"), z.literal("full")]))
360
680
  let _khorsheed_dsh_reader_reader_updateSource_parameter_0$schema$value
361
681
  const _khorsheed_dsh_reader_reader_updateSource_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_updateSource_parameter_0$schema$value ??= z.object({
362
682
  'id': z.string(),
@@ -366,27 +686,359 @@ const _khorsheed_dsh_reader_reader_updateSource_parameter_0$schema = () => (_kho
366
686
  'timeOfDay': z.string().optional(),
367
687
  }))
368
688
  let _khorsheed_dsh_reader_reader_updateSource_result$schema$value
369
- const _khorsheed_dsh_reader_reader_updateSource_result$schema = () => (_khorsheed_dsh_reader_reader_updateSource_result$schema$value ??= z.union([z.literal("unavailable"), z.literal("ok"), z.literal("not-found"), z.literal("invalid-url"), z.literal("invalid-time"), z.literal("duplicate")]))
689
+ const _khorsheed_dsh_reader_reader_updateSource_result$schema = () => (_khorsheed_dsh_reader_reader_updateSource_result$schema$value ??= z.union([z.literal("not-found"), z.literal("unavailable"), z.literal("duplicate"), z.literal("ok"), z.literal("invalid-url"), z.literal("invalid-time")]))
690
+ let _khorsheed_dsh_reader_reader_addNote_parameter_0_strict$schema$value
691
+ const _khorsheed_dsh_reader_reader_addNote_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_addNote_parameter_0_strict$schema$value ??= z.strictObject({
692
+ 'block': z.number().readonly(),
693
+ 'start': z.number().readonly().optional(),
694
+ 'quote': z.string().readonly(),
695
+ 'translated': z.string().readonly().optional(),
696
+ 'comment': z.string().readonly().optional(),
697
+ 'time': z.number().readonly().optional(),
698
+ 'entryId': z.string().readonly(),
699
+ 'title': z.string().readonly(),
700
+ 'url': z.string().readonly().optional(),
701
+ 'source': z.string().readonly().optional(),
702
+ }))
703
+ let _khorsheed_dsh_reader_reader_addReply_parameter_0_strict$schema$value
704
+ const _khorsheed_dsh_reader_reader_addReply_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_addReply_parameter_0_strict$schema$value ??= z.strictObject({
705
+ 'entryId': z.string(),
706
+ 'noteId': z.string(),
707
+ 'text': z.string(),
708
+ }))
709
+ let _khorsheed_dsh_reader_reader_addSource_parameter_0_strict$schema$value
710
+ const _khorsheed_dsh_reader_reader_addSource_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_addSource_parameter_0_strict$schema$value ??= z.strictObject({
711
+ 'url': z.string(),
712
+ 'label': z.string().optional(),
713
+ }))
714
+ let _khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0_strict$schema$value
715
+ const _khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_cancelLocalTranscript_parameter_0_strict$schema$value ??= z.strictObject({
716
+ 'entryId': z.string(),
717
+ 'force': z.boolean(),
718
+ }))
719
+ let _khorsheed_dsh_reader_reader_createTag_parameter_0_strict$schema$value
720
+ const _khorsheed_dsh_reader_reader_createTag_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_createTag_parameter_0_strict$schema$value ??= z.strictObject({
721
+ 'name': z.string(),
722
+ }))
723
+ let _khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0_strict$schema$value
724
+ const _khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_deleteDiscussion_parameter_0_strict$schema$value ??= z.strictObject({
725
+ 'entryId': z.string(),
726
+ 'discussionId': z.string(),
727
+ }))
728
+ let _khorsheed_dsh_reader_reader_deleteNote_parameter_0_strict$schema$value
729
+ const _khorsheed_dsh_reader_reader_deleteNote_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_deleteNote_parameter_0_strict$schema$value ??= z.strictObject({
730
+ 'entryId': z.string(),
731
+ 'noteId': z.string(),
732
+ }))
733
+ let _khorsheed_dsh_reader_reader_deleteTag_parameter_0_strict$schema$value
734
+ const _khorsheed_dsh_reader_reader_deleteTag_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_deleteTag_parameter_0_strict$schema$value ??= z.strictObject({
735
+ 'id': z.string(),
736
+ }))
737
+ let _khorsheed_dsh_reader_reader_editReply_parameter_0_strict$schema$value
738
+ const _khorsheed_dsh_reader_reader_editReply_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_editReply_parameter_0_strict$schema$value ??= z.strictObject({
739
+ 'entryId': z.string(),
740
+ 'noteId': z.string(),
741
+ 'index': z.number(),
742
+ 'text': z.string(),
743
+ }))
744
+ let _khorsheed_dsh_reader_reader_entryFetchStates_parameter_0_strict$schema$value
745
+ const _khorsheed_dsh_reader_reader_entryFetchStates_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_entryFetchStates_parameter_0_strict$schema$value ??= z.strictObject({
746
+ 'entryIds': z.array(z.string()),
747
+ }))
748
+ let _khorsheed_dsh_reader_reader_entryNotes_parameter_0_strict$schema$value
749
+ const _khorsheed_dsh_reader_reader_entryNotes_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_entryNotes_parameter_0_strict$schema$value ??= z.strictObject({
750
+ 'entryId': z.string(),
751
+ }))
752
+ let _khorsheed_dsh_reader_reader_entryTags_parameter_0_strict$schema$value
753
+ const _khorsheed_dsh_reader_reader_entryTags_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_entryTags_parameter_0_strict$schema$value ??= z.strictObject({
754
+ 'entryId': z.string(),
755
+ }))
756
+ let _khorsheed_dsh_reader_reader_fetchEntryBody_parameter_0_strict$schema$value
757
+ const _khorsheed_dsh_reader_reader_fetchEntryBody_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_fetchEntryBody_parameter_0_strict$schema$value ??= z.strictObject({
758
+ 'entryId': z.string(),
759
+ 'url': z.string(),
760
+ }))
761
+ let _khorsheed_dsh_reader_reader_fetchImage_parameter_0_strict$schema$value
762
+ const _khorsheed_dsh_reader_reader_fetchImage_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_fetchImage_parameter_0_strict$schema$value ??= z.strictObject({
763
+ 'url': z.string(),
764
+ }))
765
+ let _khorsheed_dsh_reader_reader_getBodies_parameter_0_strict$schema$value
766
+ const _khorsheed_dsh_reader_reader_getBodies_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_getBodies_parameter_0_strict$schema$value ??= z.strictObject({
767
+ 'ids': z.array(z.string()),
768
+ }))
769
+ let _khorsheed_dsh_reader_reader_getEntryBody_parameter_0_strict$schema$value
770
+ const _khorsheed_dsh_reader_reader_getEntryBody_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_getEntryBody_parameter_0_strict$schema$value ??= z.strictObject({
771
+ 'entryId': z.string(),
772
+ 'url': z.string(),
773
+ 'feedHtml': z.string().optional(),
774
+ }))
775
+ let _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0_strict$schema$value
776
+ const _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0_strict$schema$value ??= z.strictObject({
777
+ 'entryId': z.string(),
778
+ }))
779
+ let _khorsheed_dsh_reader_reader_getRawBody_parameter_0_strict$schema$value
780
+ const _khorsheed_dsh_reader_reader_getRawBody_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_getRawBody_parameter_0_strict$schema$value ??= z.strictObject({
781
+ 'entryId': z.string(),
782
+ }))
783
+ let _khorsheed_dsh_reader_reader_getSentenceTranslations_parameter_0_strict$schema$value
784
+ const _khorsheed_dsh_reader_reader_getSentenceTranslations_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_getSentenceTranslations_parameter_0_strict$schema$value ??= z.strictObject({
785
+ 'pair': z.string(),
786
+ 'hashes': z.array(z.string()),
787
+ }))
788
+ let _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0_strict$schema$value
789
+ const _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0_strict$schema$value ??= z.strictObject({
790
+ 'entries': z.array(z.strictObject({
791
+ 'entryId': z.string(),
792
+ 'url': z.string(),
793
+ 'label': z.string(),
794
+ 'hasBody': z.boolean(),
795
+ })),
796
+ 'limit': z.number().optional(),
797
+ }))
798
+ let _khorsheed_dsh_reader_reader_localTranscript_parameter_0_strict$schema$value
799
+ const _khorsheed_dsh_reader_reader_localTranscript_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_localTranscript_parameter_0_strict$schema$value ??= z.strictObject({
800
+ 'entryId': z.string(),
801
+ }))
802
+ let _khorsheed_dsh_reader_reader_markSynced_parameter_0_strict$schema$value
803
+ const _khorsheed_dsh_reader_reader_markSynced_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_markSynced_parameter_0_strict$schema$value ??= z.strictObject({
804
+ 'entryId': z.string(),
805
+ 'noteId': z.string().optional(),
806
+ 'discussionId': z.string().optional(),
807
+ 'canvasId': z.string(),
808
+ 'cardId': z.string(),
809
+ 'canvasTitle': z.string(),
810
+ }))
811
+ let _khorsheed_dsh_reader_reader_mediaStates_parameter_0_strict$schema$value
812
+ const _khorsheed_dsh_reader_reader_mediaStates_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_mediaStates_parameter_0_strict$schema$value ??= z.strictObject({
813
+ 'entryIds': z.array(z.string()),
814
+ }))
815
+ let _khorsheed_dsh_reader_reader_mediaTranscript_parameter_0_strict$schema$value
816
+ const _khorsheed_dsh_reader_reader_mediaTranscript_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_mediaTranscript_parameter_0_strict$schema$value ??= z.strictObject({
817
+ 'entryId': z.string(),
818
+ 'url': z.string(),
819
+ }))
820
+ let _khorsheed_dsh_reader_reader_nameSpeaker_parameter_0_strict$schema$value
821
+ const _khorsheed_dsh_reader_reader_nameSpeaker_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_nameSpeaker_parameter_0_strict$schema$value ??= z.strictObject({
822
+ 'entryId': z.string(),
823
+ 'speaker': z.number(),
824
+ 'name': z.string(),
825
+ }))
826
+ let _khorsheed_dsh_reader_reader_polish_parameter_0_strict$schema$value
827
+ const _khorsheed_dsh_reader_reader_polish_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_polish_parameter_0_strict$schema$value ??= z.strictObject({
828
+ 'entryId': z.string(),
829
+ }))
830
+ let _khorsheed_dsh_reader_reader_quoteToSideChat_parameter_0_strict$schema$value
831
+ const _khorsheed_dsh_reader_reader_quoteToSideChat_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_quoteToSideChat_parameter_0_strict$schema$value ??= z.strictObject({
832
+ 'contextKey': z.string(),
833
+ 'label': z.string(),
834
+ 'text': z.string(),
835
+ }))
836
+ let _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0_strict$schema$value
837
+ const _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_recordDiscussion_parameter_0_strict$schema$value ??= z.strictObject({
838
+ 'entryId': z.string().readonly(),
839
+ 'title': z.string().readonly(),
840
+ 'url': z.string().readonly().optional(),
841
+ 'source': z.string().readonly().optional(),
842
+ 'sessionId': z.string(),
843
+ 'sessionTitle': z.string().optional(),
844
+ }))
845
+ let _khorsheed_dsh_reader_reader_recordRead_parameter_0_strict$schema$value
846
+ const _khorsheed_dsh_reader_reader_recordRead_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_recordRead_parameter_0_strict$schema$value ??= z.strictObject({
847
+ 'entryId': z.string(),
848
+ 'sourceId': z.string(),
849
+ 'title': z.string(),
850
+ 'url': z.string().optional(),
851
+ }))
852
+ let _khorsheed_dsh_reader_reader_refresh_parameter_0_strict$schema$value
853
+ const _khorsheed_dsh_reader_reader_refresh_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_refresh_parameter_0_strict$schema$value ??= z.strictObject({
854
+ 'ids': z.array(z.string()).optional(),
855
+ }))
856
+ let _khorsheed_dsh_reader_reader_rememberSentences_parameter_0_strict$schema$value
857
+ const _khorsheed_dsh_reader_reader_rememberSentences_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_rememberSentences_parameter_0_strict$schema$value ??= z.strictObject({
858
+ 'pair': z.string(),
859
+ 'entries': z.array(z.strictObject({
860
+ 'hash': z.string().readonly().describe('The client\'s `translationHash(source)`, stored opaquely.'),
861
+ 'source': z.string().readonly(),
862
+ 'target': z.string().readonly(),
863
+ })),
864
+ 'recalled': z.array(z.strictObject({
865
+ 'hash': z.string().readonly().describe('The client\'s `translationHash(source)`, stored opaquely.'),
866
+ 'source': z.string().readonly(),
867
+ 'target': z.string().readonly(),
868
+ })).optional(),
869
+ 'entryId': z.string().optional(),
870
+ 'bodyHash': z.string().optional(),
871
+ }))
872
+ let _khorsheed_dsh_reader_reader_removeSource_parameter_0_strict$schema$value
873
+ const _khorsheed_dsh_reader_reader_removeSource_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_removeSource_parameter_0_strict$schema$value ??= z.strictObject({
874
+ 'id': z.string(),
875
+ 'entryIds': z.array(z.string()).optional(),
876
+ }))
877
+ let _khorsheed_dsh_reader_reader_renameTag_parameter_0_strict$schema$value
878
+ const _khorsheed_dsh_reader_reader_renameTag_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_renameTag_parameter_0_strict$schema$value ??= z.strictObject({
879
+ 'id': z.string(),
880
+ 'name': z.string(),
881
+ }))
882
+ let _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0_strict$schema$value
883
+ const _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_setCachePolicy_parameter_0_strict$schema$value ??= z.strictObject({
884
+ 'ttlHours': z.number(),
885
+ 'maxEntries': z.number().optional(),
886
+ 'translationBudgetChars': z.number().optional(),
887
+ }))
888
+ let _khorsheed_dsh_reader_reader_setPolishOff_parameter_0_strict$schema$value
889
+ const _khorsheed_dsh_reader_reader_setPolishOff_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_setPolishOff_parameter_0_strict$schema$value ??= z.strictObject({
890
+ 'entryId': z.string(),
891
+ 'paragraph': z.number(),
892
+ 'off': z.boolean(),
893
+ }))
894
+ let _khorsheed_dsh_reader_reader_snapshotEntry_parameter_0_strict$schema$value
895
+ const _khorsheed_dsh_reader_reader_snapshotEntry_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_snapshotEntry_parameter_0_strict$schema$value ??= z.strictObject({
896
+ 'entryId': z.string().readonly(),
897
+ 'title': z.string().readonly(),
898
+ 'url': z.string().readonly().optional(),
899
+ 'source': z.string().readonly().optional(),
900
+ 'paragraphs': z.array(z.string()),
901
+ }))
902
+ let _khorsheed_dsh_reader_reader_speakerNames_parameter_0_strict$schema$value
903
+ const _khorsheed_dsh_reader_reader_speakerNames_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_speakerNames_parameter_0_strict$schema$value ??= z.strictObject({
904
+ 'entryId': z.string(),
905
+ }))
906
+ let _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0_strict$schema$value
907
+ const _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0_strict$schema$value ??= z.strictObject({
908
+ 'entryId': z.string(),
909
+ 'url': z.string(),
910
+ 'media': z.strictObject({
911
+ 'kind': z.union([z.literal("video"), z.literal("audio")]).readonly(),
912
+ 'provider': z.union([z.literal("youtube"), z.literal("bilibili"), z.literal("xiaoyuzhou"), z.literal("enclosure")]).readonly(),
913
+ 'ref': z.string().readonly().describe('The platform\'s id (YouTube video id, Bilibili BV id) or the audio URL.'),
914
+ 'durationSec': z.number().readonly().optional(),
915
+ 'thumbnail': z.string().readonly().optional(),
916
+ }),
917
+ 'title': z.string().optional(),
918
+ 'confirmModels': z.boolean().optional(),
919
+ }))
920
+ let _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0_strict$schema$value
921
+ const _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_storeEntryBody_parameter_0_strict$schema$value ??= z.strictObject({
922
+ 'entryId': z.string(),
923
+ 'url': z.string(),
924
+ 'html': z.string(),
925
+ 'truncated': z.boolean().optional(),
926
+ 'scriptFigures': z.number().optional(),
927
+ 'bodyHash': z.string().optional(),
928
+ 'title': z.string().optional().describe('The article\'s own title, as extracted — the saved link\'s card upgrade.'),
929
+ 'excerpt': z.string().optional().describe('A short excerpt (abstract / first paragraph), with the title.'),
930
+ }))
931
+ let _khorsheed_dsh_reader_reader_tagEntry_parameter_0_strict$schema$value
932
+ const _khorsheed_dsh_reader_reader_tagEntry_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_tagEntry_parameter_0_strict$schema$value ??= z.strictObject({
933
+ 'entryId': z.string(),
934
+ 'tagId': z.string(),
935
+ 'on': z.boolean(),
936
+ }))
937
+ let _khorsheed_dsh_reader_reader_updateNote_parameter_0_strict$schema$value
938
+ const _khorsheed_dsh_reader_reader_updateNote_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_updateNote_parameter_0_strict$schema$value ??= z.strictObject({
939
+ 'entryId': z.string(),
940
+ 'noteId': z.string(),
941
+ 'comment': z.string(),
942
+ }))
943
+ let _khorsheed_dsh_reader_reader_updateSource_parameter_0_strict$schema$value
944
+ const _khorsheed_dsh_reader_reader_updateSource_parameter_0_strict$schema = () => (_khorsheed_dsh_reader_reader_updateSource_parameter_0_strict$schema$value ??= z.strictObject({
945
+ 'id': z.string(),
946
+ 'enabled': z.boolean().optional(),
947
+ 'label': z.string().optional(),
948
+ 'url': z.string().optional(),
949
+ 'timeOfDay': z.string().optional(),
950
+ }))
370
951
 
371
- export const TYPERT_REMOTE = {
952
+ export const TYPERT_REMOTE = createTypertRemoteInfo({
372
953
  package: '@khorsheed/dsh-reader',
373
- descriptors: [
374
- {
375
- id: '@khorsheed/dsh-reader#reader/addSource',
954
+ methods: {
955
+ 'reader/addNote': {
956
+ service: 'readerRemote',
957
+ description: 'Keep one excerpt (and its comment).',
958
+ invocation: { kind: 'direct' },
959
+ parameters: [
960
+ {
961
+ name: 'request',
962
+ source: 'json',
963
+ codec: {
964
+ mode: 'strict',
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},
976
+ },
977
+ },
978
+ ],
979
+ result: {
980
+ mode: 'strict',
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}]},
985
+ },
986
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":322,"column":3},
987
+ },
988
+ 'reader/addReply': {
376
989
  service: 'readerRemote',
377
- namespace: 'reader',
378
- method: 'addSource',
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.',
379
1024
  invocation: { kind: 'direct' },
380
1025
  parameters: [
381
1026
  {
382
1027
  name: 'request',
383
- wire: 'request',
384
1028
  source: 'json',
385
1029
  codec: {
386
1030
  mode: 'strict',
387
1031
  typeSymbol: '@khorsheed/dsh-reader#reader/addSource:request',
388
1032
  create: _khorsheed_dsh_reader_reader_addSource_parameter_0$schema,
389
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},
390
1042
  },
391
1043
  },
392
1044
  ],
@@ -395,14 +1047,46 @@ export const TYPERT_REMOTE = {
395
1047
  typeSymbol: '@khorsheed/dsh-reader#reader/addSource:result',
396
1048
  create: _khorsheed_dsh_reader_reader_addSource_result$schema,
397
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},
398
1084
  },
399
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":71,"column":3},
1085
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":410,"column":3},
400
1086
  },
401
- {
402
- id: '@khorsheed/dsh-reader#reader/capabilities',
1087
+ 'reader/capabilities': {
403
1088
  service: 'readerRemote',
404
- namespace: 'reader',
405
- method: 'capabilities',
1089
+ description: 'Capability handshake: what the browser may rely on in this composition.',
406
1090
  invocation: { kind: 'direct' },
407
1091
  parameters: [
408
1092
  ],
@@ -411,14 +1095,13 @@ export const TYPERT_REMOTE = {
411
1095
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderCapabilities',
412
1096
  create: _khorsheed_dsh_reader_reader_capabilities_result$schema,
413
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},
414
1099
  },
415
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":59,"column":3},
1100
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":67,"column":3},
416
1101
  },
417
- {
418
- id: '@khorsheed/dsh-reader#reader/clearRecent',
1102
+ 'reader/clearRecent': {
419
1103
  service: 'readerRemote',
420
- namespace: 'reader',
421
- method: 'clearRecent',
1104
+ description: 'Forget every recent entry.',
422
1105
  invocation: { kind: 'direct' },
423
1106
  parameters: [
424
1107
  ],
@@ -427,14 +1110,13 @@ export const TYPERT_REMOTE = {
427
1110
  typeSymbol: '@khorsheed/dsh-reader#reader/clearRecent:result',
428
1111
  create: _khorsheed_dsh_reader_reader_clearRecent_result$schema,
429
1112
  schema: _khorsheed_dsh_reader_reader_clearRecent_result$schema(),
1113
+ jsonSchema: {"type":"object","properties":{"removed":{"type":"number"}},"required":["removed"],"additionalProperties":true},
430
1114
  },
431
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":274,"column":3},
1115
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":292,"column":3},
432
1116
  },
433
- {
434
- id: '@khorsheed/dsh-reader#reader/clearTranslations',
1117
+ 'reader/clearTranslations': {
435
1118
  service: 'readerRemote',
436
- namespace: 'reader',
437
- method: 'clearTranslations',
1119
+ description: 'Forget every translation: the global memory and every entry map.',
438
1120
  invocation: { kind: 'direct' },
439
1121
  parameters: [
440
1122
  ],
@@ -443,25 +1125,31 @@ export const TYPERT_REMOTE = {
443
1125
  typeSymbol: '@khorsheed/dsh-reader#reader/clearTranslations:result',
444
1126
  create: _khorsheed_dsh_reader_reader_clearTranslations_result$schema,
445
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},
446
1129
  },
447
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":198,"column":3},
1130
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":216,"column":3},
448
1131
  },
449
- {
450
- id: '@khorsheed/dsh-reader#reader/createTag',
1132
+ 'reader/createTag': {
451
1133
  service: 'readerRemote',
452
- namespace: 'reader',
453
- method: 'createTag',
1134
+ description: 'Create a tag, or return the existing one with the same name.',
454
1135
  invocation: { kind: 'direct' },
455
1136
  parameters: [
456
1137
  {
457
1138
  name: 'request',
458
- wire: 'request',
459
1139
  source: 'json',
460
1140
  codec: {
461
1141
  mode: 'strict',
462
1142
  typeSymbol: '@khorsheed/dsh-reader#reader/createTag:request',
463
1143
  create: _khorsheed_dsh_reader_reader_createTag_parameter_0$schema,
464
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},
465
1153
  },
466
1154
  },
467
1155
  ],
@@ -470,25 +1158,97 @@ export const TYPERT_REMOTE = {
470
1158
  typeSymbol: '@khorsheed/dsh-reader#reader/createTag:result',
471
1159
  create: _khorsheed_dsh_reader_reader_createTag_result$schema,
472
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}]},
473
1162
  },
474
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":210,"column":3},
1163
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":228,"column":3},
475
1164
  },
476
- {
477
- id: '@khorsheed/dsh-reader#reader/deleteTag',
1165
+ 'reader/deleteDiscussion': {
478
1166
  service: 'readerRemote',
479
- namespace: 'reader',
480
- 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.',
481
1234
  invocation: { kind: 'direct' },
482
1235
  parameters: [
483
1236
  {
484
1237
  name: 'request',
485
- wire: 'request',
486
1238
  source: 'json',
487
1239
  codec: {
488
1240
  mode: 'strict',
489
1241
  typeSymbol: '@khorsheed/dsh-reader#reader/deleteTag:request',
490
1242
  create: _khorsheed_dsh_reader_reader_deleteTag_parameter_0$schema,
491
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},
492
1252
  },
493
1253
  },
494
1254
  ],
@@ -497,25 +1257,64 @@ export const TYPERT_REMOTE = {
497
1257
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderAnnotationOutcome',
498
1258
  create: _khorsheed_dsh_reader_reader_deleteTag_result$schema,
499
1259
  schema: _khorsheed_dsh_reader_reader_deleteTag_result$schema(),
1260
+ jsonSchema: {"type":"string","enum":["not-found","unavailable","duplicate","ok","empty","invalid"]},
500
1261
  },
501
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":222,"column":3},
1262
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":240,"column":3},
502
1263
  },
503
- {
504
- id: '@khorsheed/dsh-reader#reader/entryFetchStates',
1264
+ 'reader/editReply': {
505
1265
  service: 'readerRemote',
506
- namespace: 'reader',
507
- method: 'entryFetchStates',
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"]},
1294
+ },
1295
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":352,"column":3},
1296
+ },
1297
+ 'reader/entryFetchStates': {
1298
+ service: 'readerRemote',
1299
+ description: 'What the plugin holds per entry: a body, a stored raw payload, or a failure.',
508
1300
  invocation: { kind: 'direct' },
509
1301
  parameters: [
510
1302
  {
511
1303
  name: 'request',
512
- wire: 'request',
513
1304
  source: 'json',
514
1305
  codec: {
515
1306
  mode: 'strict',
516
1307
  typeSymbol: '@khorsheed/dsh-reader#reader/entryFetchStates:request',
517
1308
  create: _khorsheed_dsh_reader_reader_entryFetchStates_parameter_0$schema,
518
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},
519
1318
  },
520
1319
  },
521
1320
  ],
@@ -524,25 +1323,64 @@ export const TYPERT_REMOTE = {
524
1323
  typeSymbol: '@khorsheed/dsh-reader#reader/entryFetchStates:result',
525
1324
  create: _khorsheed_dsh_reader_reader_entryFetchStates_result$schema,
526
1325
  schema: _khorsheed_dsh_reader_reader_entryFetchStates_result$schema(),
1326
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
527
1327
  },
528
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":145,"column":3},
1328
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":163,"column":3},
529
1329
  },
530
- {
531
- id: '@khorsheed/dsh-reader#reader/entryTags',
1330
+ 'reader/entryNotes': {
532
1331
  service: 'readerRemote',
533
- namespace: 'reader',
534
- method: 'entryTags',
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},
1360
+ },
1361
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":309,"column":9},
1362
+ },
1363
+ 'reader/entryTags': {
1364
+ service: 'readerRemote',
1365
+ description: 'The tags on one entry.',
535
1366
  invocation: { kind: 'direct' },
536
1367
  parameters: [
537
1368
  {
538
1369
  name: 'request',
539
- wire: 'request',
540
1370
  source: 'json',
541
1371
  codec: {
542
1372
  mode: 'strict',
543
1373
  typeSymbol: '@khorsheed/dsh-reader#reader/entryTags:request',
544
1374
  create: _khorsheed_dsh_reader_reader_entryTags_parameter_0$schema,
545
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},
546
1384
  },
547
1385
  },
548
1386
  ],
@@ -551,25 +1389,31 @@ export const TYPERT_REMOTE = {
551
1389
  typeSymbol: '@khorsheed/dsh-reader#reader/entryTags:result',
552
1390
  create: _khorsheed_dsh_reader_reader_entryTags_result$schema,
553
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},
554
1393
  },
555
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":234,"column":3},
1394
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":252,"column":3},
556
1395
  },
557
- {
558
- id: '@khorsheed/dsh-reader#reader/fetchEntryBody',
1396
+ 'reader/fetchEntryBody': {
559
1397
  service: 'readerRemote',
560
- namespace: 'reader',
561
- method: 'fetchEntryBody',
1398
+ description: 'Fetch one entry\'s article (the network half; the browser extracts).',
562
1399
  invocation: { kind: 'direct' },
563
1400
  parameters: [
564
1401
  {
565
1402
  name: 'request',
566
- wire: 'request',
567
1403
  source: 'json',
568
1404
  codec: {
569
1405
  mode: 'strict',
570
1406
  typeSymbol: '@khorsheed/dsh-reader#reader/fetchEntryBody:request',
571
1407
  create: _khorsheed_dsh_reader_reader_fetchEntryBody_parameter_0$schema,
572
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},
573
1417
  },
574
1418
  },
575
1419
  ],
@@ -578,25 +1422,64 @@ export const TYPERT_REMOTE = {
578
1422
  typeSymbol: '@khorsheed/dsh-reader#reader/fetchEntryBody:result',
579
1423
  create: _khorsheed_dsh_reader_reader_fetchEntryBody_result$schema,
580
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},
581
1426
  },
582
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":115,"column":3},
1427
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":123,"column":3},
583
1428
  },
584
- {
585
- id: '@khorsheed/dsh-reader#reader/getBodies',
1429
+ 'reader/fetchImage': {
586
1430
  service: 'readerRemote',
587
- namespace: 'reader',
588
- method: 'getBodies',
1431
+ description: 'Fetch one image the browser could not load cross-origin (CORP / hotlink-protected), so the pane can re-point the failed `<img>` at the bytes. Called per failed image, never for a healthy one.',
1432
+ invocation: { kind: 'direct' },
1433
+ parameters: [
1434
+ {
1435
+ name: 'request',
1436
+ source: 'json',
1437
+ codec: {
1438
+ mode: 'strict',
1439
+ typeSymbol: '@khorsheed/dsh-reader#reader/fetchImage:request',
1440
+ create: _khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema,
1441
+ schema: _khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema(),
1442
+ jsonSchema: {"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":true},
1443
+ },
1444
+ strictCodec: {
1445
+ mode: 'strict',
1446
+ typeSymbol: '@khorsheed/dsh-reader#reader/fetchImage:request',
1447
+ create: _khorsheed_dsh_reader_reader_fetchImage_parameter_0_strict$schema,
1448
+ schema: _khorsheed_dsh_reader_reader_fetchImage_parameter_0_strict$schema(),
1449
+ jsonSchema: {"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},
1450
+ },
1451
+ },
1452
+ ],
1453
+ result: {
1454
+ mode: 'strict',
1455
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderImageResult',
1456
+ create: _khorsheed_dsh_reader_reader_fetchImage_result$schema,
1457
+ schema: _khorsheed_dsh_reader_reader_fetchImage_result$schema(),
1458
+ jsonSchema: {"type":"object","properties":{"url":{"type":"string","description":"The URL the pane asked about (echoed, so a late answer can be matched)."},"mime":{"type":"string","description":"The image's declared content type, when the fetch produced bytes."},"base64":{"type":"string","description":"The image bytes, base64-encoded, when the fetch produced them."},"error":{"type":"string","description":"Why the rescue failed, when it did."}},"required":["url"],"additionalProperties":true},
1459
+ },
1460
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":140,"column":3},
1461
+ },
1462
+ 'reader/getBodies': {
1463
+ service: 'readerRemote',
1464
+ description: 'Hand back raw payloads for the browser to parse.',
589
1465
  invocation: { kind: 'direct' },
590
1466
  parameters: [
591
1467
  {
592
1468
  name: 'request',
593
- wire: 'request',
594
1469
  source: 'json',
595
1470
  codec: {
596
1471
  mode: 'strict',
597
1472
  typeSymbol: '@khorsheed/dsh-reader#reader/getBodies:request',
598
1473
  create: _khorsheed_dsh_reader_reader_getBodies_parameter_0$schema,
599
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},
600
1483
  },
601
1484
  },
602
1485
  ],
@@ -605,14 +1488,13 @@ export const TYPERT_REMOTE = {
605
1488
  typeSymbol: '@khorsheed/dsh-reader#reader/getBodies:result',
606
1489
  create: _khorsheed_dsh_reader_reader_getBodies_result$schema,
607
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},
608
1492
  },
609
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":101,"column":9},
1493
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":109,"column":9},
610
1494
  },
611
- {
612
- id: '@khorsheed/dsh-reader#reader/getCachePolicy',
1495
+ 'reader/getCachePolicy': {
613
1496
  service: 'readerRemote',
614
- namespace: 'reader',
615
- method: 'getCachePolicy',
1497
+ description: 'Read or set how long a fetched body is served (and the translation budget).',
616
1498
  invocation: { kind: 'direct' },
617
1499
  parameters: [
618
1500
  ],
@@ -621,25 +1503,31 @@ export const TYPERT_REMOTE = {
621
1503
  typeSymbol: '@khorsheed/dsh-reader#reader/getCachePolicy:result',
622
1504
  create: _khorsheed_dsh_reader_reader_getCachePolicy_result$schema,
623
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},
624
1507
  },
625
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":240,"column":3},
1508
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":258,"column":3},
626
1509
  },
627
- {
628
- id: '@khorsheed/dsh-reader#reader/getEntryBody',
1510
+ 'reader/getEntryBody': {
629
1511
  service: 'readerRemote',
630
- namespace: 'reader',
631
- method: 'getEntryBody',
1512
+ description: 'What the detail view should render for one entry, and whether a fetch is worth offering.',
632
1513
  invocation: { kind: 'direct' },
633
1514
  parameters: [
634
1515
  {
635
1516
  name: 'request',
636
- wire: 'request',
637
1517
  source: 'json',
638
1518
  codec: {
639
1519
  mode: 'strict',
640
1520
  typeSymbol: '@khorsheed/dsh-reader#reader/getEntryBody:request',
641
- create: _khorsheed_dsh_reader_reader_getEntryBody_parameter_0$schema,
642
- schema: _khorsheed_dsh_reader_reader_getEntryBody_parameter_0$schema(),
1521
+ create: _khorsheed_dsh_reader_reader_getEntryBody_parameter_0$schema,
1522
+ schema: _khorsheed_dsh_reader_reader_getEntryBody_parameter_0$schema(),
1523
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"},"feedHtml":{"type":"string"}},"required":["entryId","url"],"additionalProperties":true},
1524
+ },
1525
+ strictCodec: {
1526
+ mode: 'strict',
1527
+ typeSymbol: '@khorsheed/dsh-reader#reader/getEntryBody:request',
1528
+ create: _khorsheed_dsh_reader_reader_getEntryBody_parameter_0_strict$schema,
1529
+ schema: _khorsheed_dsh_reader_reader_getEntryBody_parameter_0_strict$schema(),
1530
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"},"feedHtml":{"type":"string"}},"required":["entryId","url"],"additionalProperties":false},
643
1531
  },
644
1532
  },
645
1533
  ],
@@ -648,25 +1536,31 @@ export const TYPERT_REMOTE = {
648
1536
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderEntryBodyView',
649
1537
  create: _khorsheed_dsh_reader_reader_getEntryBody_result$schema,
650
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},
651
1540
  },
652
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":109,"column":3},
1541
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":117,"column":3},
653
1542
  },
654
- {
655
- id: '@khorsheed/dsh-reader#reader/getEntryTranslation',
1543
+ 'reader/getEntryTranslation': {
656
1544
  service: 'readerRemote',
657
- namespace: 'reader',
658
- method: 'getEntryTranslation',
1545
+ description: 'One entry\'s exact-fit translation record (segment map resolved), when usable.',
659
1546
  invocation: { kind: 'direct' },
660
1547
  parameters: [
661
1548
  {
662
1549
  name: 'request',
663
- wire: 'request',
664
1550
  source: 'json',
665
1551
  codec: {
666
1552
  mode: 'strict',
667
1553
  typeSymbol: '@khorsheed/dsh-reader#reader/getEntryTranslation:request',
668
1554
  create: _khorsheed_dsh_reader_reader_getEntryTranslation_parameter_0$schema,
669
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},
670
1564
  },
671
1565
  },
672
1566
  ],
@@ -675,25 +1569,31 @@ export const TYPERT_REMOTE = {
675
1569
  typeSymbol: '@khorsheed/dsh-reader#reader/getEntryTranslation:result',
676
1570
  create: _khorsheed_dsh_reader_reader_getEntryTranslation_result$schema,
677
1571
  schema: _khorsheed_dsh_reader_reader_getEntryTranslation_result$schema(),
1572
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
678
1573
  },
679
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":168,"column":3},
1574
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":186,"column":3},
680
1575
  },
681
- {
682
- id: '@khorsheed/dsh-reader#reader/getRawBody',
1576
+ 'reader/getRawBody': {
683
1577
  service: 'readerRemote',
684
- namespace: 'reader',
685
- method: 'getRawBody',
1578
+ description: 'A stored raw payload, so the browser can extract it later.',
686
1579
  invocation: { kind: 'direct' },
687
1580
  parameters: [
688
1581
  {
689
1582
  name: 'request',
690
- wire: 'request',
691
1583
  source: 'json',
692
1584
  codec: {
693
1585
  mode: 'strict',
694
1586
  typeSymbol: '@khorsheed/dsh-reader#reader/getRawBody:request',
695
1587
  create: _khorsheed_dsh_reader_reader_getRawBody_parameter_0$schema,
696
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},
697
1597
  },
698
1598
  },
699
1599
  ],
@@ -702,25 +1602,31 @@ export const TYPERT_REMOTE = {
702
1602
  typeSymbol: '@khorsheed/dsh-reader#reader/getRawBody:result',
703
1603
  create: _khorsheed_dsh_reader_reader_getRawBody_result$schema,
704
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},
705
1606
  },
706
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":151,"column":3},
1607
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":169,"column":3},
707
1608
  },
708
- {
709
- id: '@khorsheed/dsh-reader#reader/getSentenceTranslations',
1609
+ 'reader/getSentenceTranslations': {
710
1610
  service: 'readerRemote',
711
- namespace: 'reader',
712
- method: 'getSentenceTranslations',
1611
+ description: 'Translations for exactly the asked sentence hashes of one pair — never the whole table.',
713
1612
  invocation: { kind: 'direct' },
714
1613
  parameters: [
715
1614
  {
716
1615
  name: 'request',
717
- wire: 'request',
718
1616
  source: 'json',
719
1617
  codec: {
720
1618
  mode: 'strict',
721
1619
  typeSymbol: '@khorsheed/dsh-reader#reader/getSentenceTranslations:request',
722
1620
  create: _khorsheed_dsh_reader_reader_getSentenceTranslations_parameter_0$schema,
723
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},
724
1630
  },
725
1631
  },
726
1632
  ],
@@ -729,14 +1635,13 @@ export const TYPERT_REMOTE = {
729
1635
  typeSymbol: '@khorsheed/dsh-reader#reader/getSentenceTranslations:result',
730
1636
  create: _khorsheed_dsh_reader_reader_getSentenceTranslations_result$schema,
731
1637
  schema: _khorsheed_dsh_reader_reader_getSentenceTranslations_result$schema(),
1638
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
732
1639
  },
733
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":174,"column":3},
1640
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":192,"column":3},
734
1641
  },
735
- {
736
- id: '@khorsheed/dsh-reader#reader/getStorageStats',
1642
+ 'reader/getStorageStats': {
737
1643
  service: 'readerRemote',
738
- namespace: 'reader',
739
- method: 'getStorageStats',
1644
+ description: 'Per-tier cache usage, aggregated on the host (the tables never cross).',
740
1645
  invocation: { kind: 'direct' },
741
1646
  parameters: [
742
1647
  ],
@@ -745,25 +1650,31 @@ export const TYPERT_REMOTE = {
745
1650
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderStorageStats',
746
1651
  create: _khorsheed_dsh_reader_reader_getStorageStats_result$schema,
747
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},
748
1654
  },
749
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":192,"column":3},
1655
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":210,"column":3},
750
1656
  },
751
- {
752
- id: '@khorsheed/dsh-reader#reader/listBackfillCandidates',
1657
+ 'reader/listBackfillCandidates': {
753
1658
  service: 'readerRemote',
754
- namespace: 'reader',
755
- method: 'listBackfillCandidates',
1659
+ description: 'Which entries still need their full text (the automatic backfill\'s work list).',
756
1660
  invocation: { kind: 'direct' },
757
1661
  parameters: [
758
1662
  {
759
1663
  name: 'request',
760
- wire: 'request',
761
1664
  source: 'json',
762
1665
  codec: {
763
1666
  mode: 'strict',
764
1667
  typeSymbol: '@khorsheed/dsh-reader#reader/listBackfillCandidates:request',
765
1668
  create: _khorsheed_dsh_reader_reader_listBackfillCandidates_parameter_0$schema,
766
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},
767
1678
  },
768
1679
  },
769
1680
  ],
@@ -772,14 +1683,13 @@ export const TYPERT_REMOTE = {
772
1683
  typeSymbol: '@khorsheed/dsh-reader#reader/listBackfillCandidates:result',
773
1684
  create: _khorsheed_dsh_reader_reader_listBackfillCandidates_result$schema,
774
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},
775
1687
  },
776
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":157,"column":3},
1688
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":175,"column":3},
777
1689
  },
778
- {
779
- id: '@khorsheed/dsh-reader#reader/listRecent',
1690
+ 'reader/listRecent': {
780
1691
  service: 'readerRemote',
781
- namespace: 'reader',
782
- method: 'listRecent',
1692
+ description: 'The entries the reader opened, newest first.',
783
1693
  invocation: { kind: 'direct' },
784
1694
  parameters: [
785
1695
  ],
@@ -788,14 +1698,13 @@ export const TYPERT_REMOTE = {
788
1698
  typeSymbol: '@khorsheed/dsh-reader#reader/listRecent:result',
789
1699
  create: _khorsheed_dsh_reader_reader_listRecent_result$schema,
790
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},
791
1702
  },
792
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":268,"column":3},
1703
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":286,"column":3},
793
1704
  },
794
- {
795
- id: '@khorsheed/dsh-reader#reader/listSources',
1705
+ 'reader/listSources': {
796
1706
  service: 'readerRemote',
797
- namespace: 'reader',
798
- method: 'listSources',
1707
+ description: 'The configured sources, without payloads.',
799
1708
  invocation: { kind: 'direct' },
800
1709
  parameters: [
801
1710
  ],
@@ -804,14 +1713,13 @@ export const TYPERT_REMOTE = {
804
1713
  typeSymbol: '@khorsheed/dsh-reader#reader/listSources:result',
805
1714
  create: _khorsheed_dsh_reader_reader_listSources_result$schema,
806
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},
807
1717
  },
808
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":65,"column":9},
1718
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":73,"column":9},
809
1719
  },
810
- {
811
- id: '@khorsheed/dsh-reader#reader/listTags',
1720
+ 'reader/listTags': {
812
1721
  service: 'readerRemote',
813
- namespace: 'reader',
814
- method: 'listTags',
1722
+ description: 'The tag vocabulary, with how many entries carry each tag.',
815
1723
  invocation: { kind: 'direct' },
816
1724
  parameters: [
817
1725
  ],
@@ -820,14 +1728,226 @@ export const TYPERT_REMOTE = {
820
1728
  typeSymbol: '@khorsheed/dsh-reader#reader/listTags:result',
821
1729
  create: _khorsheed_dsh_reader_reader_listTags_result$schema,
822
1730
  schema: _khorsheed_dsh_reader_reader_listTags_result$schema(),
1731
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
1732
+ },
1733
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":222,"column":3},
1734
+ },
1735
+ 'reader/localTranscript': {
1736
+ service: 'readerRemote',
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',
823
1945
  },
824
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":204,"column":3},
1946
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":416,"column":3},
825
1947
  },
826
- {
827
- id: '@khorsheed/dsh-reader#reader/pruneTags',
1948
+ 'reader/pruneTags': {
828
1949
  service: 'readerRemote',
829
- namespace: 'reader',
830
- method: 'pruneTags',
1950
+ description: 'Drop tags nothing references any more.',
831
1951
  invocation: { kind: 'direct' },
832
1952
  parameters: [
833
1953
  ],
@@ -836,25 +1956,31 @@ export const TYPERT_REMOTE = {
836
1956
  typeSymbol: '@khorsheed/dsh-reader#reader/pruneTags:result',
837
1957
  create: _khorsheed_dsh_reader_reader_pruneTags_result$schema,
838
1958
  schema: _khorsheed_dsh_reader_reader_pruneTags_result$schema(),
1959
+ jsonSchema: {"type":"object","properties":{"removed":{"type":"number"}},"required":["removed"],"additionalProperties":true},
839
1960
  },
840
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":251,"column":3},
1961
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":269,"column":3},
841
1962
  },
842
- {
843
- id: '@khorsheed/dsh-reader#reader/quoteToSideChat',
1963
+ 'reader/quoteToSideChat': {
844
1964
  service: 'readerRemote',
845
- namespace: 'reader',
846
- method: 'quoteToSideChat',
1965
+ description: 'Forward a ref block to the side-chat service when one is composed.',
847
1966
  invocation: { kind: 'direct' },
848
1967
  parameters: [
849
1968
  {
850
1969
  name: 'request',
851
- wire: 'request',
852
1970
  source: 'json',
853
1971
  codec: {
854
1972
  mode: 'strict',
855
1973
  typeSymbol: '@khorsheed/dsh-reader#reader/quoteToSideChat:request',
856
1974
  create: _khorsheed_dsh_reader_reader_quoteToSideChat_parameter_0$schema,
857
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},
858
1984
  },
859
1985
  },
860
1986
  ],
@@ -863,25 +1989,64 @@ export const TYPERT_REMOTE = {
863
1989
  typeSymbol: '@khorsheed/dsh-reader#reader/quoteToSideChat:result',
864
1990
  create: _khorsheed_dsh_reader_reader_quoteToSideChat_result$schema,
865
1991
  schema: _khorsheed_dsh_reader_reader_quoteToSideChat_result$schema(),
1992
+ jsonSchema: {"type":"string","enum":["unavailable","ok"]},
1993
+ },
1994
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":298,"column":3},
1995
+ },
1996
+ 'reader/recordDiscussion': {
1997
+ service: 'readerRemote',
1998
+ description: 'Remember that a conversation discussed this article.',
1999
+ invocation: { kind: 'direct' },
2000
+ parameters: [
2001
+ {
2002
+ name: 'request',
2003
+ source: 'json',
2004
+ codec: {
2005
+ mode: 'strict',
2006
+ typeSymbol: '@khorsheed/dsh-reader#reader/recordDiscussion:request',
2007
+ create: _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0$schema,
2008
+ schema: _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0$schema(),
2009
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"source":{"type":"string"},"sessionId":{"type":"string"},"sessionTitle":{"type":"string"}},"required":["entryId","title","sessionId"],"additionalProperties":true},
2010
+ },
2011
+ strictCodec: {
2012
+ mode: 'strict',
2013
+ typeSymbol: '@khorsheed/dsh-reader#reader/recordDiscussion:request',
2014
+ create: _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0_strict$schema,
2015
+ schema: _khorsheed_dsh_reader_reader_recordDiscussion_parameter_0_strict$schema(),
2016
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"source":{"type":"string"},"sessionId":{"type":"string"},"sessionTitle":{"type":"string"}},"required":["entryId","title","sessionId"],"additionalProperties":false},
2017
+ },
2018
+ },
2019
+ ],
2020
+ result: {
2021
+ mode: 'strict',
2022
+ typeSymbol: '@khorsheed/dsh-reader#reader/recordDiscussion:result',
2023
+ create: _khorsheed_dsh_reader_reader_recordDiscussion_result$schema,
2024
+ schema: _khorsheed_dsh_reader_reader_recordDiscussion_result$schema(),
2025
+ jsonSchema: {"type":"string","enum":["ok","empty"]},
866
2026
  },
867
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":280,"column":3},
2027
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":340,"column":3},
868
2028
  },
869
- {
870
- id: '@khorsheed/dsh-reader#reader/recordRead',
2029
+ 'reader/recordRead': {
871
2030
  service: 'readerRemote',
872
- namespace: 'reader',
873
- method: 'recordRead',
2031
+ description: 'Record that the reader opened one entry (the recent page\'s write half).',
874
2032
  invocation: { kind: 'direct' },
875
2033
  parameters: [
876
2034
  {
877
2035
  name: 'request',
878
- wire: 'request',
879
2036
  source: 'json',
880
2037
  codec: {
881
2038
  mode: 'strict',
882
2039
  typeSymbol: '@khorsheed/dsh-reader#reader/recordRead:request',
883
2040
  create: _khorsheed_dsh_reader_reader_recordRead_parameter_0$schema,
884
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},
885
2050
  },
886
2051
  },
887
2052
  ],
@@ -890,25 +2055,31 @@ export const TYPERT_REMOTE = {
890
2055
  typeSymbol: '@khorsheed/dsh-reader#reader/recordRead:result',
891
2056
  create: _khorsheed_dsh_reader_reader_recordRead_result$schema,
892
2057
  schema: _khorsheed_dsh_reader_reader_recordRead_result$schema(),
2058
+ jsonSchema: {"type":"object","properties":{"entries":{"type":"number"}},"required":["entries"],"additionalProperties":true},
893
2059
  },
894
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":257,"column":3},
2060
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":275,"column":3},
895
2061
  },
896
- {
897
- id: '@khorsheed/dsh-reader#reader/refresh',
2062
+ 'reader/refresh': {
898
2063
  service: 'readerRemote',
899
- namespace: 'reader',
900
- method: 'refresh',
2064
+ description: 'Fetch the named sources (or every enabled one) now.',
901
2065
  invocation: { kind: 'direct' },
902
2066
  parameters: [
903
2067
  {
904
2068
  name: 'request',
905
- wire: 'request',
906
2069
  source: 'json',
907
2070
  codec: {
908
2071
  mode: 'strict',
909
2072
  typeSymbol: '@khorsheed/dsh-reader#reader/refresh:request',
910
2073
  create: _khorsheed_dsh_reader_reader_refresh_parameter_0$schema,
911
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},
912
2083
  },
913
2084
  },
914
2085
  ],
@@ -917,25 +2088,31 @@ export const TYPERT_REMOTE = {
917
2088
  typeSymbol: '@khorsheed/dsh-reader#reader/refresh:result',
918
2089
  create: _khorsheed_dsh_reader_reader_refresh_result$schema,
919
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},
920
2092
  },
921
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":95,"column":9},
2093
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":103,"column":9},
922
2094
  },
923
- {
924
- id: '@khorsheed/dsh-reader#reader/rememberSentences',
2095
+ 'reader/rememberSentences': {
925
2096
  service: 'readerRemote',
926
- namespace: 'reader',
927
- method: 'rememberSentences',
2097
+ description: 'Persist what one translation run learned (and refresh what it reused), in one batch.',
928
2098
  invocation: { kind: 'direct' },
929
2099
  parameters: [
930
2100
  {
931
2101
  name: 'request',
932
- wire: 'request',
933
2102
  source: 'json',
934
2103
  codec: {
935
2104
  mode: 'strict',
936
2105
  typeSymbol: '@khorsheed/dsh-reader#reader/rememberSentences:request',
937
2106
  create: _khorsheed_dsh_reader_reader_rememberSentences_parameter_0$schema,
938
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},
939
2116
  },
940
2117
  },
941
2118
  ],
@@ -944,25 +2121,31 @@ export const TYPERT_REMOTE = {
944
2121
  typeSymbol: '@khorsheed/dsh-reader#reader/rememberSentences:result',
945
2122
  create: _khorsheed_dsh_reader_reader_rememberSentences_result$schema,
946
2123
  schema: _khorsheed_dsh_reader_reader_rememberSentences_result$schema(),
2124
+ jsonSchema: {"type":"object","properties":{"stored":{"type":"number"}},"required":["stored"],"additionalProperties":true},
947
2125
  },
948
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":180,"column":3},
2126
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":198,"column":3},
949
2127
  },
950
- {
951
- id: '@khorsheed/dsh-reader#reader/removeSource',
2128
+ 'reader/removeSource': {
952
2129
  service: 'readerRemote',
953
- namespace: 'reader',
954
- method: 'removeSource',
2130
+ description: 'Drop a source; its entries\' translations go with it (their bodies stay for the budget).',
955
2131
  invocation: { kind: 'direct' },
956
2132
  parameters: [
957
2133
  {
958
2134
  name: 'request',
959
- wire: 'request',
960
2135
  source: 'json',
961
2136
  codec: {
962
2137
  mode: 'strict',
963
2138
  typeSymbol: '@khorsheed/dsh-reader#reader/removeSource:request',
964
2139
  create: _khorsheed_dsh_reader_reader_removeSource_parameter_0$schema,
965
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},
966
2149
  },
967
2150
  },
968
2151
  ],
@@ -971,25 +2154,31 @@ export const TYPERT_REMOTE = {
971
2154
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderMutationOutcome',
972
2155
  create: _khorsheed_dsh_reader_reader_removeSource_result$schema,
973
2156
  schema: _khorsheed_dsh_reader_reader_removeSource_result$schema(),
2157
+ jsonSchema: {"type":"string","enum":["not-found","unavailable","duplicate","ok","invalid-url","invalid-time"]},
974
2158
  },
975
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":89,"column":3},
2159
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":97,"column":3},
976
2160
  },
977
- {
978
- id: '@khorsheed/dsh-reader#reader/renameTag',
2161
+ 'reader/renameTag': {
979
2162
  service: 'readerRemote',
980
- namespace: 'reader',
981
- method: 'renameTag',
2163
+ description: 'Rename a tag without touching the entries that carry it.',
982
2164
  invocation: { kind: 'direct' },
983
2165
  parameters: [
984
2166
  {
985
2167
  name: 'request',
986
- wire: 'request',
987
2168
  source: 'json',
988
2169
  codec: {
989
2170
  mode: 'strict',
990
2171
  typeSymbol: '@khorsheed/dsh-reader#reader/renameTag:request',
991
2172
  create: _khorsheed_dsh_reader_reader_renameTag_parameter_0$schema,
992
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},
993
2182
  },
994
2183
  },
995
2184
  ],
@@ -998,25 +2187,30 @@ export const TYPERT_REMOTE = {
998
2187
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderAnnotationOutcome',
999
2188
  create: _khorsheed_dsh_reader_reader_renameTag_result$schema,
1000
2189
  schema: _khorsheed_dsh_reader_reader_renameTag_result$schema(),
2190
+ jsonSchema: {"type":"string","enum":["not-found","unavailable","duplicate","ok","empty","invalid"]},
1001
2191
  },
1002
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":216,"column":3},
2192
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":234,"column":3},
1003
2193
  },
1004
- {
1005
- id: '@khorsheed/dsh-reader#reader/setCachePolicy',
2194
+ 'reader/setCachePolicy': {
1006
2195
  service: 'readerRemote',
1007
- namespace: 'reader',
1008
- method: 'setCachePolicy',
1009
2196
  invocation: { kind: 'direct' },
1010
2197
  parameters: [
1011
2198
  {
1012
2199
  name: 'request',
1013
- wire: 'request',
1014
2200
  source: 'json',
1015
2201
  codec: {
1016
2202
  mode: 'strict',
1017
2203
  typeSymbol: '@khorsheed/dsh-reader#reader/setCachePolicy:request',
1018
2204
  create: _khorsheed_dsh_reader_reader_setCachePolicy_parameter_0$schema,
1019
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},
1020
2214
  },
1021
2215
  },
1022
2216
  ],
@@ -1025,25 +2219,163 @@ export const TYPERT_REMOTE = {
1025
2219
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderAnnotationOutcome',
1026
2220
  create: _khorsheed_dsh_reader_reader_setCachePolicy_result$schema,
1027
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',
2322
+ },
2323
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":392,"column":3},
2324
+ },
2325
+ 'reader/startLocalTranscript': {
2326
+ service: 'readerRemote',
2327
+ description: 'Start (or rejoin) local transcription of an entry without captions. Answers `unavailable` without the transcription plugin and `needs-models` until the first model download is confirmed.',
2328
+ invocation: { kind: 'direct' },
2329
+ parameters: [
2330
+ {
2331
+ name: 'request',
2332
+ source: 'json',
2333
+ codec: {
2334
+ mode: 'strict',
2335
+ typeSymbol: '@khorsheed/dsh-reader#reader/startLocalTranscript:request',
2336
+ create: _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0$schema,
2337
+ schema: _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0$schema(),
2338
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"},"media":{"type":"object","properties":{"kind":{"type":"string","enum":["video","audio"]},"provider":{"type":"string","enum":["youtube","bilibili","xiaoyuzhou","enclosure"]},"ref":{"type":"string","description":"The platform's id (YouTube video id, Bilibili BV id) or the audio URL."},"durationSec":{"type":"number"},"thumbnail":{"type":"string"}},"required":["kind","provider","ref"],"additionalProperties":true},"title":{"type":"string"},"confirmModels":{"type":"boolean"}},"required":["entryId","url","media"],"additionalProperties":true},
2339
+ },
2340
+ strictCodec: {
2341
+ mode: 'strict',
2342
+ typeSymbol: '@khorsheed/dsh-reader#reader/startLocalTranscript:request',
2343
+ create: _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0_strict$schema,
2344
+ schema: _khorsheed_dsh_reader_reader_startLocalTranscript_parameter_0_strict$schema(),
2345
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"url":{"type":"string"},"media":{"type":"object","properties":{"kind":{"type":"string","enum":["video","audio"]},"provider":{"type":"string","enum":["youtube","bilibili","xiaoyuzhou","enclosure"]},"ref":{"type":"string","description":"The platform's id (YouTube video id, Bilibili BV id) or the audio URL."},"durationSec":{"type":"number"},"thumbnail":{"type":"string"}},"required":["kind","provider","ref"],"additionalProperties":false},"title":{"type":"string"},"confirmModels":{"type":"boolean"}},"required":["entryId","url","media"],"additionalProperties":false},
2346
+ },
2347
+ },
2348
+ ],
2349
+ result: {
2350
+ mode: 'strict',
2351
+ typeSymbol: '@khorsheed/dsh-reader/types#LocalTranscriptStatus',
2352
+ create: _khorsheed_dsh_reader_reader_startLocalTranscript_result$schema,
2353
+ schema: _khorsheed_dsh_reader_reader_startLocalTranscript_result$schema(),
2354
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"state":{"type":"string","enum":["failed","unavailable","done","idle","queued","fetching","needs-models","transcribing","speakers"]},"progress":{"type":"number","description":"0–1 across fetching the audio and transcribing it."},"ahead":{"type":"number","description":"Jobs ahead in the engine's queue."},"bytes":{"type":"number","description":"Bytes of speech models still to download (`needs-models`)."},"html":{"type":"string","description":"The transcript so far (or in full, once `done`)."},"language":{"type":"string","description":"The language the transcript is in, once known."},"speakers":{"type":"number","description":"How many voices the transcript has, once the speakers pass settled it."},"error":{"type":"string"}},"required":["entryId","state"],"additionalProperties":true},
1028
2355
  },
1029
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":245,"column":3},
2356
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":380,"column":3},
1030
2357
  },
1031
- {
1032
- id: '@khorsheed/dsh-reader#reader/storeEntryBody',
2358
+ 'reader/storeEntryBody': {
1033
2359
  service: 'readerRemote',
1034
- namespace: 'reader',
1035
- method: 'storeEntryBody',
2360
+ description: 'Cache the markup the browser extracted for one entry.',
1036
2361
  invocation: { kind: 'direct' },
1037
2362
  parameters: [
1038
2363
  {
1039
2364
  name: 'request',
1040
- wire: 'request',
1041
2365
  source: 'json',
1042
2366
  codec: {
1043
2367
  mode: 'strict',
1044
2368
  typeSymbol: '@khorsheed/dsh-reader#reader/storeEntryBody:request',
1045
2369
  create: _khorsheed_dsh_reader_reader_storeEntryBody_parameter_0$schema,
1046
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},
1047
2379
  },
1048
2380
  },
1049
2381
  ],
@@ -1052,25 +2384,31 @@ export const TYPERT_REMOTE = {
1052
2384
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderEntryBodyView',
1053
2385
  create: _khorsheed_dsh_reader_reader_storeEntryBody_result$schema,
1054
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},
1055
2388
  },
1056
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":128,"column":3},
2389
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":146,"column":3},
1057
2390
  },
1058
- {
1059
- id: '@khorsheed/dsh-reader#reader/tagEntry',
2391
+ 'reader/tagEntry': {
1060
2392
  service: 'readerRemote',
1061
- namespace: 'reader',
1062
- method: 'tagEntry',
2393
+ description: 'Add or remove one tag on one entry.',
1063
2394
  invocation: { kind: 'direct' },
1064
2395
  parameters: [
1065
2396
  {
1066
2397
  name: 'request',
1067
- wire: 'request',
1068
2398
  source: 'json',
1069
2399
  codec: {
1070
2400
  mode: 'strict',
1071
2401
  typeSymbol: '@khorsheed/dsh-reader#reader/tagEntry:request',
1072
2402
  create: _khorsheed_dsh_reader_reader_tagEntry_parameter_0$schema,
1073
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},
1074
2412
  },
1075
2413
  },
1076
2414
  ],
@@ -1079,25 +2417,64 @@ export const TYPERT_REMOTE = {
1079
2417
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderAnnotationOutcome',
1080
2418
  create: _khorsheed_dsh_reader_reader_tagEntry_result$schema,
1081
2419
  schema: _khorsheed_dsh_reader_reader_tagEntry_result$schema(),
2420
+ jsonSchema: {"type":"string","enum":["not-found","unavailable","duplicate","ok","empty","invalid"]},
2421
+ },
2422
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":246,"column":3},
2423
+ },
2424
+ 'reader/updateNote': {
2425
+ service: 'readerRemote',
2426
+ description: 'Change or clear one note\'s comment.',
2427
+ invocation: { kind: 'direct' },
2428
+ parameters: [
2429
+ {
2430
+ name: 'request',
2431
+ source: 'json',
2432
+ codec: {
2433
+ mode: 'strict',
2434
+ typeSymbol: '@khorsheed/dsh-reader#reader/updateNote:request',
2435
+ create: _khorsheed_dsh_reader_reader_updateNote_parameter_0$schema,
2436
+ schema: _khorsheed_dsh_reader_reader_updateNote_parameter_0$schema(),
2437
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"noteId":{"type":"string"},"comment":{"type":"string"}},"required":["entryId","noteId","comment"],"additionalProperties":true},
2438
+ },
2439
+ strictCodec: {
2440
+ mode: 'strict',
2441
+ typeSymbol: '@khorsheed/dsh-reader#reader/updateNote:request',
2442
+ create: _khorsheed_dsh_reader_reader_updateNote_parameter_0_strict$schema,
2443
+ schema: _khorsheed_dsh_reader_reader_updateNote_parameter_0_strict$schema(),
2444
+ jsonSchema: {"type":"object","properties":{"entryId":{"type":"string"},"noteId":{"type":"string"},"comment":{"type":"string"}},"required":["entryId","noteId","comment"],"additionalProperties":false},
2445
+ },
2446
+ },
2447
+ ],
2448
+ result: {
2449
+ mode: 'strict',
2450
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderNoteOutcome',
2451
+ create: _khorsheed_dsh_reader_reader_updateNote_result$schema,
2452
+ schema: _khorsheed_dsh_reader_reader_updateNote_result$schema(),
2453
+ jsonSchema: {"type":"string","enum":["not-found","ok","empty","full"]},
1082
2454
  },
1083
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":228,"column":3},
2455
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":328,"column":3},
1084
2456
  },
1085
- {
1086
- id: '@khorsheed/dsh-reader#reader/updateSource',
2457
+ 'reader/updateSource': {
1087
2458
  service: 'readerRemote',
1088
- namespace: 'reader',
1089
- method: 'updateSource',
2459
+ description: 'Change a source\'s label/enabled flag, or the global refresh time.',
1090
2460
  invocation: { kind: 'direct' },
1091
2461
  parameters: [
1092
2462
  {
1093
2463
  name: 'request',
1094
- wire: 'request',
1095
2464
  source: 'json',
1096
2465
  codec: {
1097
2466
  mode: 'strict',
1098
2467
  typeSymbol: '@khorsheed/dsh-reader#reader/updateSource:request',
1099
2468
  create: _khorsheed_dsh_reader_reader_updateSource_parameter_0$schema,
1100
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},
1101
2478
  },
1102
2479
  },
1103
2480
  ],
@@ -1106,10 +2483,11 @@ export const TYPERT_REMOTE = {
1106
2483
  typeSymbol: '@khorsheed/dsh-reader/types#ReaderMutationOutcome',
1107
2484
  create: _khorsheed_dsh_reader_reader_updateSource_result$schema,
1108
2485
  schema: _khorsheed_dsh_reader_reader_updateSource_result$schema(),
2486
+ jsonSchema: {"type":"string","enum":["not-found","unavailable","duplicate","ok","invalid-url","invalid-time"]},
1109
2487
  },
1110
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":77,"column":3},
2488
+ sourceLocation: {"file":"packages/reader/src/remote.ts","line":85,"column":3},
1111
2489
  },
1112
- ],
1113
- }
2490
+ },
2491
+ }, z)
1114
2492
 
1115
2493
  export default TYPERT_REMOTE