@khorsheed/dsh-reader 0.2.0

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 (58) hide show
  1. package/README.en.md +90 -0
  2. package/README.i18n.yaml +6 -0
  3. package/README.md +90 -0
  4. package/cordis.patch.yml +13 -0
  5. package/lib/client.js +15119 -0
  6. package/lib/index.js +3660 -0
  7. package/lib/invariant.js +38 -0
  8. package/lib/typert.host.d.ts +3 -0
  9. package/lib/typert.host.js +1738 -0
  10. package/lib/typert.remote-client.d.ts +82 -0
  11. package/lib/typert.remote-client.js +1115 -0
  12. package/lib/types/arxiv.d.ts +47 -0
  13. package/lib/types/arxiv.js +76 -0
  14. package/lib/types/client/ReaderPane.d.ts +71 -0
  15. package/lib/types/client/ReaderPane.js +3135 -0
  16. package/lib/types/client/contract.d.ts +254 -0
  17. package/lib/types/client/contract.js +1 -0
  18. package/lib/types/client/definition.d.ts +27 -0
  19. package/lib/types/client/definition.js +32 -0
  20. package/lib/types/client/extract-article.d.ts +102 -0
  21. package/lib/types/client/extract-article.js +1024 -0
  22. package/lib/types/client/icons.d.ts +27 -0
  23. package/lib/types/client/icons.js +11 -0
  24. package/lib/types/client/index.d.ts +34 -0
  25. package/lib/types/client/index.js +222 -0
  26. package/lib/types/client/locales.d.ts +391 -0
  27. package/lib/types/client/locales.js +382 -0
  28. package/lib/types/client/parse-rss.d.ts +69 -0
  29. package/lib/types/client/parse-rss.js +656 -0
  30. package/lib/types/client/quote.d.ts +89 -0
  31. package/lib/types/client/quote.js +119 -0
  32. package/lib/types/client/selectors.d.ts +167 -0
  33. package/lib/types/client/selectors.js +413 -0
  34. package/lib/types/client/session.d.ts +171 -0
  35. package/lib/types/client/session.js +223 -0
  36. package/lib/types/client/store.d.ts +181 -0
  37. package/lib/types/client/store.js +226 -0
  38. package/lib/types/client/translate.d.ts +379 -0
  39. package/lib/types/client/translate.js +873 -0
  40. package/lib/types/index.d.ts +48 -0
  41. package/lib/types/index.js +25 -0
  42. package/lib/types/invariant.d.ts +29 -0
  43. package/lib/types/invariant.js +38 -0
  44. package/lib/types/link-resolvers.d.ts +107 -0
  45. package/lib/types/link-resolvers.js +299 -0
  46. package/lib/types/remote.d.ts +224 -0
  47. package/lib/types/remote.js +275 -0
  48. package/lib/types/schedule.d.ts +78 -0
  49. package/lib/types/schedule.js +114 -0
  50. package/lib/types/service.d.ts +633 -0
  51. package/lib/types/service.js +1697 -0
  52. package/lib/types/store.d.ts +224 -0
  53. package/lib/types/store.js +916 -0
  54. package/lib/types/types.d.ts +710 -0
  55. package/lib/types/types.js +182 -0
  56. package/locale/en.json +6 -0
  57. package/locale/zh.json +6 -0
  58. package/package.json +128 -0
@@ -0,0 +1,82 @@
1
+ /* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
2
+ import type {
3
+ RemoteResult,
4
+ TypertRemoteContribution,
5
+ } from '@deepseek-ai/dsh-typert-protocol'
6
+ import type { ReaderAddFailure, ReaderAddOutcome, ReaderAddRefusal, ReaderAnnotationOutcome, ReaderBackfillCandidate, ReaderBody, ReaderCapabilities, ReaderEntryBodyView, ReaderEntryFetchState, ReaderEntryTranslationView, ReaderMutationOutcome, ReaderRecentEntry, ReaderRefreshResult, ReaderSentenceLearn, ReaderSourceSummary, ReaderStorageStats, ReaderTag } from '@khorsheed/dsh-reader/types'
7
+
8
+ declare module '@deepseek-ai/dsh-typert-protocol' {
9
+ interface TypertRemoteNamespace$726561646572 {
10
+ addSource: (request: { url: string; label?: string; }) => Promise<RemoteResult<ReaderAddOutcome | ReaderAddRefusal | ReaderAddFailure>>
11
+ capabilities: () => Promise<RemoteResult<ReaderCapabilities>>
12
+ clearRecent: () => Promise<RemoteResult<{ removed: number; }>>
13
+ clearTranslations: () => Promise<RemoteResult<{ clearedEntries: number; clearedMemory: boolean; }>>
14
+ createTag: (request: { name: string; }) => Promise<RemoteResult<ReaderTag | ReaderAnnotationOutcome>>
15
+ deleteTag: (request: { id: string; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
16
+ entryFetchStates: (request: { entryIds: readonly string[]; }) => Promise<RemoteResult<{ states: Record<string, ReaderEntryFetchState>; }>>
17
+ entryTags: (request: { entryId: string; }) => Promise<RemoteResult<{ tags: ReaderTag[]; }>>
18
+ fetchEntryBody: (request: { entryId: string; url: string; }) => Promise<RemoteResult<{ entryId: string; url?: string; raw?: string; rawFile?: string; truncated?: boolean; error?: string; }>>
19
+ getBodies: (request: { ids: string[]; }) => Promise<RemoteResult<{ bodies: ReaderBody[]; }>>
20
+ getCachePolicy: () => Promise<RemoteResult<{ ttlHours: number; maxEntries: number; translationBudgetChars: number; }>>
21
+ getEntryBody: (request: { entryId: string; url: string; feedHtml?: string; }) => Promise<RemoteResult<ReaderEntryBodyView>>
22
+ getEntryTranslation: (request: { entryId: string; }) => Promise<RemoteResult<{ translation?: ReaderEntryTranslationView; }>>
23
+ getRawBody: (request: { entryId: string; }) => Promise<RemoteResult<{ entryId: string; raw?: string; url?: string; truncated?: boolean; error?: string; }>>
24
+ getSentenceTranslations: (request: { pair: string; hashes: readonly string[]; }) => Promise<RemoteResult<{ translations: Record<string, string>; }>>
25
+ getStorageStats: () => Promise<RemoteResult<ReaderStorageStats>>
26
+ listBackfillCandidates: (request: { entries: readonly { entryId: string; url: string; label: string; hasBody: boolean; }[]; limit?: number; }) => Promise<RemoteResult<{ candidates: ReaderBackfillCandidate[]; }>>
27
+ listRecent: () => Promise<RemoteResult<{ entries: ReaderRecentEntry[]; }>>
28
+ listSources: () => Promise<RemoteResult<{ sources: ReaderSourceSummary[]; }>>
29
+ listTags: () => Promise<RemoteResult<{ tags: ReaderTag[]; counts: Record<string, number>; }>>
30
+ pruneTags: () => Promise<RemoteResult<{ removed: number; }>>
31
+ quoteToSideChat: (request: { contextKey: string; label: string; text: string; }) => Promise<RemoteResult<'ok' | 'unavailable'>>
32
+ recordRead: (request: { entryId: string; sourceId: string; title: string; url?: string; }) => Promise<RemoteResult<{ entries: number; }>>
33
+ refresh: (request: { ids?: string[]; }) => Promise<RemoteResult<{ results: ReaderRefreshResult[]; }>>
34
+ rememberSentences: (request: { pair: string; entries: readonly ReaderSentenceLearn[]; recalled?: readonly ReaderSentenceLearn[]; entryId?: string; bodyHash?: string; }) => Promise<RemoteResult<{ stored: number; }>>
35
+ removeSource: (request: { id: string; entryIds?: readonly string[]; }) => Promise<RemoteResult<ReaderMutationOutcome>>
36
+ renameTag: (request: { id: string; name: string; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
37
+ setCachePolicy: (request: { ttlHours: number; maxEntries?: number; translationBudgetChars?: number; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
38
+ storeEntryBody: (request: { entryId: string; url: string; html: string; truncated?: boolean; scriptFigures?: number; bodyHash?: string; title?: string; excerpt?: string; }) => Promise<RemoteResult<ReaderEntryBodyView>>
39
+ tagEntry: (request: { entryId: string; tagId: string; on: boolean; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
40
+ updateSource: (request: { id: string; enabled?: boolean; label?: string; url?: string; timeOfDay?: string; }) => Promise<RemoteResult<ReaderMutationOutcome>>
41
+ }
42
+ interface TypertRemoteMap {
43
+ 'reader/addSource': (request: { url: string; label?: string; }) => Promise<RemoteResult<ReaderAddOutcome | ReaderAddRefusal | ReaderAddFailure>>
44
+ 'reader/capabilities': () => Promise<RemoteResult<ReaderCapabilities>>
45
+ 'reader/clearRecent': () => Promise<RemoteResult<{ removed: number; }>>
46
+ 'reader/clearTranslations': () => Promise<RemoteResult<{ clearedEntries: number; clearedMemory: boolean; }>>
47
+ 'reader/createTag': (request: { name: string; }) => Promise<RemoteResult<ReaderTag | ReaderAnnotationOutcome>>
48
+ 'reader/deleteTag': (request: { id: string; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
49
+ 'reader/entryFetchStates': (request: { entryIds: readonly string[]; }) => Promise<RemoteResult<{ states: Record<string, ReaderEntryFetchState>; }>>
50
+ 'reader/entryTags': (request: { entryId: string; }) => Promise<RemoteResult<{ tags: ReaderTag[]; }>>
51
+ 'reader/fetchEntryBody': (request: { entryId: string; url: string; }) => Promise<RemoteResult<{ entryId: string; url?: string; raw?: string; rawFile?: string; truncated?: boolean; error?: string; }>>
52
+ 'reader/getBodies': (request: { ids: string[]; }) => Promise<RemoteResult<{ bodies: ReaderBody[]; }>>
53
+ 'reader/getCachePolicy': () => Promise<RemoteResult<{ ttlHours: number; maxEntries: number; translationBudgetChars: number; }>>
54
+ 'reader/getEntryBody': (request: { entryId: string; url: string; feedHtml?: string; }) => Promise<RemoteResult<ReaderEntryBodyView>>
55
+ 'reader/getEntryTranslation': (request: { entryId: string; }) => Promise<RemoteResult<{ translation?: ReaderEntryTranslationView; }>>
56
+ 'reader/getRawBody': (request: { entryId: string; }) => Promise<RemoteResult<{ entryId: string; raw?: string; url?: string; truncated?: boolean; error?: string; }>>
57
+ 'reader/getSentenceTranslations': (request: { pair: string; hashes: readonly string[]; }) => Promise<RemoteResult<{ translations: Record<string, string>; }>>
58
+ 'reader/getStorageStats': () => Promise<RemoteResult<ReaderStorageStats>>
59
+ 'reader/listBackfillCandidates': (request: { entries: readonly { entryId: string; url: string; label: string; hasBody: boolean; }[]; limit?: number; }) => Promise<RemoteResult<{ candidates: ReaderBackfillCandidate[]; }>>
60
+ 'reader/listRecent': () => Promise<RemoteResult<{ entries: ReaderRecentEntry[]; }>>
61
+ 'reader/listSources': () => Promise<RemoteResult<{ sources: ReaderSourceSummary[]; }>>
62
+ 'reader/listTags': () => Promise<RemoteResult<{ tags: ReaderTag[]; counts: Record<string, number>; }>>
63
+ 'reader/pruneTags': () => Promise<RemoteResult<{ removed: number; }>>
64
+ 'reader/quoteToSideChat': (request: { contextKey: string; label: string; text: string; }) => Promise<RemoteResult<'ok' | 'unavailable'>>
65
+ 'reader/recordRead': (request: { entryId: string; sourceId: string; title: string; url?: string; }) => Promise<RemoteResult<{ entries: number; }>>
66
+ 'reader/refresh': (request: { ids?: string[]; }) => Promise<RemoteResult<{ results: ReaderRefreshResult[]; }>>
67
+ 'reader/rememberSentences': (request: { pair: string; entries: readonly ReaderSentenceLearn[]; recalled?: readonly ReaderSentenceLearn[]; entryId?: string; bodyHash?: string; }) => Promise<RemoteResult<{ stored: number; }>>
68
+ 'reader/removeSource': (request: { id: string; entryIds?: readonly string[]; }) => Promise<RemoteResult<ReaderMutationOutcome>>
69
+ 'reader/renameTag': (request: { id: string; name: string; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
70
+ 'reader/setCachePolicy': (request: { ttlHours: number; maxEntries?: number; translationBudgetChars?: number; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
71
+ 'reader/storeEntryBody': (request: { entryId: string; url: string; html: string; truncated?: boolean; scriptFigures?: number; bodyHash?: string; title?: string; excerpt?: string; }) => Promise<RemoteResult<ReaderEntryBodyView>>
72
+ 'reader/tagEntry': (request: { entryId: string; tagId: string; on: boolean; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
73
+ 'reader/updateSource': (request: { id: string; enabled?: boolean; label?: string; url?: string; timeOfDay?: string; }) => Promise<RemoteResult<ReaderMutationOutcome>>
74
+ }
75
+ interface TypertRemoteNamespaceMap {
76
+ 'reader': TypertRemoteNamespace$726561646572
77
+ }
78
+ }
79
+
80
+ export declare const TYPERT_REMOTE: TypertRemoteContribution
81
+ export default TYPERT_REMOTE
82
+ //# sourceMappingURL=typert.remote-client.d.ts.map