@khorsheed/dsh-reader 0.2.0 → 0.3.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.
@@ -103,6 +103,17 @@ const _khorsheed_dsh_reader_reader_fetchEntryBody_result$schema = () => (_khorsh
103
103
  'truncated': z.boolean().optional(),
104
104
  'error': z.string().optional(),
105
105
  }))
106
+ let _khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema$value
107
+ const _khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema$value ??= z.object({
108
+ 'url': z.string(),
109
+ }))
110
+ let _khorsheed_dsh_reader_reader_fetchImage_result$schema$value
111
+ const _khorsheed_dsh_reader_reader_fetchImage_result$schema = () => (_khorsheed_dsh_reader_reader_fetchImage_result$schema$value ??= z.object({
112
+ 'url': z.string().readonly(),
113
+ 'mime': z.string().readonly().optional(),
114
+ 'base64': z.string().readonly().optional(),
115
+ 'error': z.string().readonly().optional(),
116
+ }))
106
117
  let _khorsheed_dsh_reader_reader_getBodies_parameter_0$schema$value
107
118
  const _khorsheed_dsh_reader_reader_getBodies_parameter_0$schema = () => (_khorsheed_dsh_reader_reader_getBodies_parameter_0$schema$value ??= z.object({
108
119
  'ids': z.array(z.string()),
@@ -399,7 +410,7 @@ export const TYPERT = {
399
410
  create: _khorsheed_dsh_reader_reader_addSource_result$schema,
400
411
  schema: _khorsheed_dsh_reader_reader_addSource_result$schema(),
401
412
  },
402
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":71,"column":3},
413
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":72,"column":3},
403
414
  },
404
415
  {
405
416
  id: '@khorsheed/dsh-reader#reader/capabilities',
@@ -415,7 +426,7 @@ export const TYPERT = {
415
426
  create: _khorsheed_dsh_reader_reader_capabilities_result$schema,
416
427
  schema: _khorsheed_dsh_reader_reader_capabilities_result$schema(),
417
428
  },
418
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":59,"column":3},
429
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":60,"column":3},
419
430
  },
420
431
  {
421
432
  id: '@khorsheed/dsh-reader#reader/clearRecent',
@@ -431,7 +442,7 @@ export const TYPERT = {
431
442
  create: _khorsheed_dsh_reader_reader_clearRecent_result$schema,
432
443
  schema: _khorsheed_dsh_reader_reader_clearRecent_result$schema(),
433
444
  },
434
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":274,"column":3},
445
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":285,"column":3},
435
446
  },
436
447
  {
437
448
  id: '@khorsheed/dsh-reader#reader/clearTranslations',
@@ -447,7 +458,7 @@ export const TYPERT = {
447
458
  create: _khorsheed_dsh_reader_reader_clearTranslations_result$schema,
448
459
  schema: _khorsheed_dsh_reader_reader_clearTranslations_result$schema(),
449
460
  },
450
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":198,"column":3},
461
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":209,"column":3},
451
462
  },
452
463
  {
453
464
  id: '@khorsheed/dsh-reader#reader/createTag',
@@ -474,7 +485,7 @@ export const TYPERT = {
474
485
  create: _khorsheed_dsh_reader_reader_createTag_result$schema,
475
486
  schema: _khorsheed_dsh_reader_reader_createTag_result$schema(),
476
487
  },
477
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":210,"column":3},
488
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":221,"column":3},
478
489
  },
479
490
  {
480
491
  id: '@khorsheed/dsh-reader#reader/deleteTag',
@@ -501,7 +512,7 @@ export const TYPERT = {
501
512
  create: _khorsheed_dsh_reader_reader_deleteTag_result$schema,
502
513
  schema: _khorsheed_dsh_reader_reader_deleteTag_result$schema(),
503
514
  },
504
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":222,"column":3},
515
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":233,"column":3},
505
516
  },
506
517
  {
507
518
  id: '@khorsheed/dsh-reader#reader/entryFetchStates',
@@ -528,7 +539,7 @@ export const TYPERT = {
528
539
  create: _khorsheed_dsh_reader_reader_entryFetchStates_result$schema,
529
540
  schema: _khorsheed_dsh_reader_reader_entryFetchStates_result$schema(),
530
541
  },
531
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":145,"column":3},
542
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":156,"column":3},
532
543
  },
533
544
  {
534
545
  id: '@khorsheed/dsh-reader#reader/entryTags',
@@ -555,7 +566,7 @@ export const TYPERT = {
555
566
  create: _khorsheed_dsh_reader_reader_entryTags_result$schema,
556
567
  schema: _khorsheed_dsh_reader_reader_entryTags_result$schema(),
557
568
  },
558
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":234,"column":3},
569
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":245,"column":3},
559
570
  },
560
571
  {
561
572
  id: '@khorsheed/dsh-reader#reader/fetchEntryBody',
@@ -582,7 +593,34 @@ export const TYPERT = {
582
593
  create: _khorsheed_dsh_reader_reader_fetchEntryBody_result$schema,
583
594
  schema: _khorsheed_dsh_reader_reader_fetchEntryBody_result$schema(),
584
595
  },
585
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":115,"column":3},
596
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":116,"column":3},
597
+ },
598
+ {
599
+ id: '@khorsheed/dsh-reader#reader/fetchImage',
600
+ service: 'readerRemote',
601
+ namespace: 'reader',
602
+ method: 'fetchImage',
603
+ invocation: { kind: 'direct' },
604
+ parameters: [
605
+ {
606
+ name: 'request',
607
+ wire: 'request',
608
+ source: 'json',
609
+ codec: {
610
+ mode: 'strict',
611
+ typeSymbol: '@khorsheed/dsh-reader#reader/fetchImage:request',
612
+ create: _khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema,
613
+ schema: _khorsheed_dsh_reader_reader_fetchImage_parameter_0$schema(),
614
+ },
615
+ },
616
+ ],
617
+ result: {
618
+ mode: 'strict',
619
+ typeSymbol: '@khorsheed/dsh-reader/types#ReaderImageResult',
620
+ create: _khorsheed_dsh_reader_reader_fetchImage_result$schema,
621
+ schema: _khorsheed_dsh_reader_reader_fetchImage_result$schema(),
622
+ },
623
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":133,"column":3},
586
624
  },
587
625
  {
588
626
  id: '@khorsheed/dsh-reader#reader/getBodies',
@@ -609,7 +647,7 @@ export const TYPERT = {
609
647
  create: _khorsheed_dsh_reader_reader_getBodies_result$schema,
610
648
  schema: _khorsheed_dsh_reader_reader_getBodies_result$schema(),
611
649
  },
612
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":101,"column":9},
650
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":102,"column":9},
613
651
  },
614
652
  {
615
653
  id: '@khorsheed/dsh-reader#reader/getCachePolicy',
@@ -625,7 +663,7 @@ export const TYPERT = {
625
663
  create: _khorsheed_dsh_reader_reader_getCachePolicy_result$schema,
626
664
  schema: _khorsheed_dsh_reader_reader_getCachePolicy_result$schema(),
627
665
  },
628
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":240,"column":3},
666
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":251,"column":3},
629
667
  },
630
668
  {
631
669
  id: '@khorsheed/dsh-reader#reader/getEntryBody',
@@ -652,7 +690,7 @@ export const TYPERT = {
652
690
  create: _khorsheed_dsh_reader_reader_getEntryBody_result$schema,
653
691
  schema: _khorsheed_dsh_reader_reader_getEntryBody_result$schema(),
654
692
  },
655
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":109,"column":3},
693
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":110,"column":3},
656
694
  },
657
695
  {
658
696
  id: '@khorsheed/dsh-reader#reader/getEntryTranslation',
@@ -679,7 +717,7 @@ export const TYPERT = {
679
717
  create: _khorsheed_dsh_reader_reader_getEntryTranslation_result$schema,
680
718
  schema: _khorsheed_dsh_reader_reader_getEntryTranslation_result$schema(),
681
719
  },
682
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":168,"column":3},
720
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":179,"column":3},
683
721
  },
684
722
  {
685
723
  id: '@khorsheed/dsh-reader#reader/getRawBody',
@@ -706,7 +744,7 @@ export const TYPERT = {
706
744
  create: _khorsheed_dsh_reader_reader_getRawBody_result$schema,
707
745
  schema: _khorsheed_dsh_reader_reader_getRawBody_result$schema(),
708
746
  },
709
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":151,"column":3},
747
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":162,"column":3},
710
748
  },
711
749
  {
712
750
  id: '@khorsheed/dsh-reader#reader/getSentenceTranslations',
@@ -733,7 +771,7 @@ export const TYPERT = {
733
771
  create: _khorsheed_dsh_reader_reader_getSentenceTranslations_result$schema,
734
772
  schema: _khorsheed_dsh_reader_reader_getSentenceTranslations_result$schema(),
735
773
  },
736
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":174,"column":3},
774
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":185,"column":3},
737
775
  },
738
776
  {
739
777
  id: '@khorsheed/dsh-reader#reader/getStorageStats',
@@ -749,7 +787,7 @@ export const TYPERT = {
749
787
  create: _khorsheed_dsh_reader_reader_getStorageStats_result$schema,
750
788
  schema: _khorsheed_dsh_reader_reader_getStorageStats_result$schema(),
751
789
  },
752
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":192,"column":3},
790
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":203,"column":3},
753
791
  },
754
792
  {
755
793
  id: '@khorsheed/dsh-reader#reader/listBackfillCandidates',
@@ -776,7 +814,7 @@ export const TYPERT = {
776
814
  create: _khorsheed_dsh_reader_reader_listBackfillCandidates_result$schema,
777
815
  schema: _khorsheed_dsh_reader_reader_listBackfillCandidates_result$schema(),
778
816
  },
779
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":157,"column":3},
817
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":168,"column":3},
780
818
  },
781
819
  {
782
820
  id: '@khorsheed/dsh-reader#reader/listRecent',
@@ -792,7 +830,7 @@ export const TYPERT = {
792
830
  create: _khorsheed_dsh_reader_reader_listRecent_result$schema,
793
831
  schema: _khorsheed_dsh_reader_reader_listRecent_result$schema(),
794
832
  },
795
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":268,"column":3},
833
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":279,"column":3},
796
834
  },
797
835
  {
798
836
  id: '@khorsheed/dsh-reader#reader/listSources',
@@ -808,7 +846,7 @@ export const TYPERT = {
808
846
  create: _khorsheed_dsh_reader_reader_listSources_result$schema,
809
847
  schema: _khorsheed_dsh_reader_reader_listSources_result$schema(),
810
848
  },
811
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":65,"column":9},
849
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":66,"column":9},
812
850
  },
813
851
  {
814
852
  id: '@khorsheed/dsh-reader#reader/listTags',
@@ -824,7 +862,7 @@ export const TYPERT = {
824
862
  create: _khorsheed_dsh_reader_reader_listTags_result$schema,
825
863
  schema: _khorsheed_dsh_reader_reader_listTags_result$schema(),
826
864
  },
827
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":204,"column":3},
865
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":215,"column":3},
828
866
  },
829
867
  {
830
868
  id: '@khorsheed/dsh-reader#reader/pruneTags',
@@ -840,7 +878,7 @@ export const TYPERT = {
840
878
  create: _khorsheed_dsh_reader_reader_pruneTags_result$schema,
841
879
  schema: _khorsheed_dsh_reader_reader_pruneTags_result$schema(),
842
880
  },
843
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":251,"column":3},
881
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":262,"column":3},
844
882
  },
845
883
  {
846
884
  id: '@khorsheed/dsh-reader#reader/quoteToSideChat',
@@ -867,7 +905,7 @@ export const TYPERT = {
867
905
  create: _khorsheed_dsh_reader_reader_quoteToSideChat_result$schema,
868
906
  schema: _khorsheed_dsh_reader_reader_quoteToSideChat_result$schema(),
869
907
  },
870
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":280,"column":3},
908
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":291,"column":3},
871
909
  },
872
910
  {
873
911
  id: '@khorsheed/dsh-reader#reader/recordRead',
@@ -894,7 +932,7 @@ export const TYPERT = {
894
932
  create: _khorsheed_dsh_reader_reader_recordRead_result$schema,
895
933
  schema: _khorsheed_dsh_reader_reader_recordRead_result$schema(),
896
934
  },
897
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":257,"column":3},
935
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":268,"column":3},
898
936
  },
899
937
  {
900
938
  id: '@khorsheed/dsh-reader#reader/refresh',
@@ -921,7 +959,7 @@ export const TYPERT = {
921
959
  create: _khorsheed_dsh_reader_reader_refresh_result$schema,
922
960
  schema: _khorsheed_dsh_reader_reader_refresh_result$schema(),
923
961
  },
924
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":95,"column":9},
962
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":96,"column":9},
925
963
  },
926
964
  {
927
965
  id: '@khorsheed/dsh-reader#reader/rememberSentences',
@@ -948,7 +986,7 @@ export const TYPERT = {
948
986
  create: _khorsheed_dsh_reader_reader_rememberSentences_result$schema,
949
987
  schema: _khorsheed_dsh_reader_reader_rememberSentences_result$schema(),
950
988
  },
951
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":180,"column":3},
989
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":191,"column":3},
952
990
  },
953
991
  {
954
992
  id: '@khorsheed/dsh-reader#reader/removeSource',
@@ -975,7 +1013,7 @@ export const TYPERT = {
975
1013
  create: _khorsheed_dsh_reader_reader_removeSource_result$schema,
976
1014
  schema: _khorsheed_dsh_reader_reader_removeSource_result$schema(),
977
1015
  },
978
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":89,"column":3},
1016
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":90,"column":3},
979
1017
  },
980
1018
  {
981
1019
  id: '@khorsheed/dsh-reader#reader/renameTag',
@@ -1002,7 +1040,7 @@ export const TYPERT = {
1002
1040
  create: _khorsheed_dsh_reader_reader_renameTag_result$schema,
1003
1041
  schema: _khorsheed_dsh_reader_reader_renameTag_result$schema(),
1004
1042
  },
1005
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":216,"column":3},
1043
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":227,"column":3},
1006
1044
  },
1007
1045
  {
1008
1046
  id: '@khorsheed/dsh-reader#reader/setCachePolicy',
@@ -1029,7 +1067,7 @@ export const TYPERT = {
1029
1067
  create: _khorsheed_dsh_reader_reader_setCachePolicy_result$schema,
1030
1068
  schema: _khorsheed_dsh_reader_reader_setCachePolicy_result$schema(),
1031
1069
  },
1032
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":245,"column":3},
1070
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":256,"column":3},
1033
1071
  },
1034
1072
  {
1035
1073
  id: '@khorsheed/dsh-reader#reader/storeEntryBody',
@@ -1056,7 +1094,7 @@ export const TYPERT = {
1056
1094
  create: _khorsheed_dsh_reader_reader_storeEntryBody_result$schema,
1057
1095
  schema: _khorsheed_dsh_reader_reader_storeEntryBody_result$schema(),
1058
1096
  },
1059
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":128,"column":3},
1097
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":139,"column":3},
1060
1098
  },
1061
1099
  {
1062
1100
  id: '@khorsheed/dsh-reader#reader/tagEntry',
@@ -1083,7 +1121,7 @@ export const TYPERT = {
1083
1121
  create: _khorsheed_dsh_reader_reader_tagEntry_result$schema,
1084
1122
  schema: _khorsheed_dsh_reader_reader_tagEntry_result$schema(),
1085
1123
  },
1086
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":228,"column":3},
1124
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":239,"column":3},
1087
1125
  },
1088
1126
  {
1089
1127
  id: '@khorsheed/dsh-reader#reader/updateSource',
@@ -1110,7 +1148,7 @@ export const TYPERT = {
1110
1148
  create: _khorsheed_dsh_reader_reader_updateSource_result$schema,
1111
1149
  schema: _khorsheed_dsh_reader_reader_updateSource_result$schema(),
1112
1150
  },
1113
- sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":77,"column":3},
1151
+ sourceLocation: {"file":"packages/dsh-reader/src/remote.ts","line":78,"column":3},
1114
1152
  },
1115
1153
  ],
1116
1154
  model: {
@@ -1193,6 +1231,13 @@ export const TYPERT = {
1193
1231
  "summary": "Fetch one entry's article and hand the raw HTML to the browser.",
1194
1232
  "jsDoc": "/**\n * Fetch one entry's article and hand the raw HTML to the browser.\n *\n * The HOST does not extract: extraction needs a DOM, and this runtime has no\n * XML/HTML parser at all (the same reason feed parsing lives in the browser\n * half). So this verb is the network half only — it returns what came back,\n * and `storeEntryBody` persists what the browser made of it.\n *\n * Fetching here is deliberately NOT automatic on refresh: doing it for every\n * summary-only entry would make this a crawler of other people's sites, which\n * the design refuses. One entry, one fetch, on the reader's request.\n *\n * @param request - the entry and its article URL.\n * @returns the raw payload, or why there is none.\n */"
1195
1233
  },
1234
+ {
1235
+ "kind": "method",
1236
+ "name": "fetchImage",
1237
+ "signature": "async fetchImage(request: { url: string }): Promise<ReaderImageResult>",
1238
+ "summary": "One image the browser could not load cross-origin, fetched host-side.",
1239
+ "jsDoc": "/**\n * One image the browser could not load cross-origin, fetched host-side.\n *\n * The pane calls this only for an `<img>` that already FAILED: the page's\n * bytes arrived fine (a direct fetch gets a 200) but the origin answers them\n * with `Cross-Origin-Resource-Policy: same-origin`, so the browser withholds\n * them from this page no matter what the tag asks — measured on claude.dev's\n * `/media/*` figures (2026-09-29), which broke with the alt text showing.\n * CORP is an embedder-side check, so a host-process fetch is the way through.\n *\n * This deliberately does NOT ride `ctx.web.fetch`: the seam's decoded body is\n * a closed html|text union and its provider refuses binary content types\n * outright. The image fetch re-implements the seam's hardening at image\n * scope instead (public-address validation with the connection pinned to the\n * validated answers, a byte cap, a timeout, per-hop re-validation, and an\n * image/* content-type gate) — see `image-fetch.ts`.\n *\n * Rescued bytes are kept in an in-memory LRU under a byte budget: the\n * sidebar unmounts wholesale when another panel takes over, and a remount\n * re-fails every blocked image before this cache can answer it.\n *\n * @param request - the image URL the pane failed on.\n * @returns the bytes and their declared type, or why there are none.\n */"
1240
+ },
1196
1241
  {
1197
1242
  "kind": "method",
1198
1243
  "name": "entryFetchStates",
@@ -1386,6 +1431,10 @@ export const TYPERT = {
1386
1431
  "name": "ReaderFetchStatus",
1387
1432
  "declaration": "export type ReaderFetchStatus = 'ok' | 'fetching' | 'error';"
1388
1433
  },
1434
+ {
1435
+ "name": "ReaderImageResult",
1436
+ "declaration": "export interface ReaderImageResult {\n readonly url: string;\n readonly mime?: string;\n readonly base64?: string;\n readonly error?: string;\n}"
1437
+ },
1389
1438
  {
1390
1439
  "name": "ReaderMutationOutcome",
1391
1440
  "declaration": "export type ReaderMutationOutcome = 'ok' | 'not-found' | 'invalid-url' | 'invalid-time' | 'duplicate' | 'unavailable';"
@@ -1495,6 +1544,13 @@ export const TYPERT = {
1495
1544
  "summary": "Fetch one entry's article (the network half; the browser extracts).",
1496
1545
  "jsDoc": "/** Fetch one entry's article (the network half; the browser extracts). */"
1497
1546
  },
1547
+ {
1548
+ "kind": "method",
1549
+ "name": "fetchImage",
1550
+ "signature": "@Remote('fetchImage') fetchImage(request: { url: string }): Promise<ReaderImageResult>",
1551
+ "summary": "Fetch one image the browser could not load cross-origin (CORP / hotlink-protected), so the pane can re-point the failed `<img>` at the bytes.",
1552
+ "jsDoc": "/**\n * Fetch one image the browser could not load cross-origin (CORP /\n * hotlink-protected), so the pane can re-point the failed `<img>` at the\n * bytes. Called per failed image, never for a healthy one.\n */"
1553
+ },
1498
1554
  {
1499
1555
  "kind": "method",
1500
1556
  "name": "storeEntryBody",
@@ -1693,6 +1749,10 @@ export const TYPERT = {
1693
1749
  "name": "ReaderFetchStatus",
1694
1750
  "declaration": "export type ReaderFetchStatus = 'ok' | 'fetching' | 'error';"
1695
1751
  },
1752
+ {
1753
+ "name": "ReaderImageResult",
1754
+ "declaration": "export interface ReaderImageResult {\n readonly url: string;\n readonly mime?: string;\n readonly base64?: string;\n readonly error?: string;\n}"
1755
+ },
1696
1756
  {
1697
1757
  "name": "ReaderMutationOutcome",
1698
1758
  "declaration": "export type ReaderMutationOutcome = 'ok' | 'not-found' | 'invalid-url' | 'invalid-time' | 'duplicate' | 'unavailable';"
@@ -3,7 +3,7 @@ import type {
3
3
  RemoteResult,
4
4
  TypertRemoteContribution,
5
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'
6
+ import type { ReaderAddFailure, ReaderAddOutcome, ReaderAddRefusal, ReaderAnnotationOutcome, ReaderBackfillCandidate, ReaderBody, ReaderCapabilities, ReaderEntryBodyView, ReaderEntryFetchState, ReaderEntryTranslationView, ReaderImageResult, ReaderMutationOutcome, ReaderRecentEntry, ReaderRefreshResult, ReaderSentenceLearn, ReaderSourceSummary, ReaderStorageStats, ReaderTag } from '@khorsheed/dsh-reader/types'
7
7
 
8
8
  declare module '@deepseek-ai/dsh-typert-protocol' {
9
9
  interface TypertRemoteNamespace$726561646572 {
@@ -16,6 +16,7 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
16
16
  entryFetchStates: (request: { entryIds: readonly string[]; }) => Promise<RemoteResult<{ states: Record<string, ReaderEntryFetchState>; }>>
17
17
  entryTags: (request: { entryId: string; }) => Promise<RemoteResult<{ tags: ReaderTag[]; }>>
18
18
  fetchEntryBody: (request: { entryId: string; url: string; }) => Promise<RemoteResult<{ entryId: string; url?: string; raw?: string; rawFile?: string; truncated?: boolean; error?: string; }>>
19
+ fetchImage: (request: { url: string; }) => Promise<RemoteResult<ReaderImageResult>>
19
20
  getBodies: (request: { ids: string[]; }) => Promise<RemoteResult<{ bodies: ReaderBody[]; }>>
20
21
  getCachePolicy: () => Promise<RemoteResult<{ ttlHours: number; maxEntries: number; translationBudgetChars: number; }>>
21
22
  getEntryBody: (request: { entryId: string; url: string; feedHtml?: string; }) => Promise<RemoteResult<ReaderEntryBodyView>>
@@ -49,6 +50,7 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
49
50
  'reader/entryFetchStates': (request: { entryIds: readonly string[]; }) => Promise<RemoteResult<{ states: Record<string, ReaderEntryFetchState>; }>>
50
51
  'reader/entryTags': (request: { entryId: string; }) => Promise<RemoteResult<{ tags: ReaderTag[]; }>>
51
52
  'reader/fetchEntryBody': (request: { entryId: string; url: string; }) => Promise<RemoteResult<{ entryId: string; url?: string; raw?: string; rawFile?: string; truncated?: boolean; error?: string; }>>
53
+ 'reader/fetchImage': (request: { url: string; }) => Promise<RemoteResult<ReaderImageResult>>
52
54
  'reader/getBodies': (request: { ids: string[]; }) => Promise<RemoteResult<{ bodies: ReaderBody[]; }>>
53
55
  'reader/getCachePolicy': () => Promise<RemoteResult<{ ttlHours: number; maxEntries: number; translationBudgetChars: number; }>>
54
56
  'reader/getEntryBody': (request: { entryId: string; url: string; feedHtml?: string; }) => Promise<RemoteResult<ReaderEntryBodyView>>