@eddyskywalker/dsh-chatgpt-subscription 0.11.7 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/CHANGELOG.md +619 -776
  2. package/README.md +34 -2
  3. package/lib/client.js +141 -5
  4. package/lib/client.js.map +1 -1
  5. package/lib/index.js +2879 -1541
  6. package/lib/types/client/CodexSubscriptionSection.d.ts +18 -0
  7. package/lib/types/client/CodexSubscriptionSection.d.ts.map +1 -1
  8. package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -1
  9. package/lib/types/client/kimi-code/KimiModelCapabilities.d.ts.map +1 -1
  10. package/lib/types/client/kimi-code/locales.d.ts +11 -2
  11. package/lib/types/client/kimi-code/locales.d.ts.map +1 -1
  12. package/lib/types/client/kimi-code/styles.d.ts.map +1 -1
  13. package/lib/types/client/locales.d.ts +45 -5
  14. package/lib/types/client/locales.d.ts.map +1 -1
  15. package/lib/types/host/antigravity/mapper.d.ts +3 -2
  16. package/lib/types/host/antigravity/mapper.d.ts.map +1 -1
  17. package/lib/types/host/antigravity/tool-schema.d.ts +13 -1
  18. package/lib/types/host/antigravity/tool-schema.d.ts.map +1 -1
  19. package/lib/types/host/claude/mapper.d.ts +57 -3
  20. package/lib/types/host/claude/mapper.d.ts.map +1 -1
  21. package/lib/types/host/codex-fetch.d.ts.map +1 -1
  22. package/lib/types/host/common/idle-watchdog.d.ts +10 -0
  23. package/lib/types/host/common/idle-watchdog.d.ts.map +1 -1
  24. package/lib/types/host/common/prompt-estimate.d.ts +22 -0
  25. package/lib/types/host/common/prompt-estimate.d.ts.map +1 -0
  26. package/lib/types/host/common/request-images.d.ts +130 -0
  27. package/lib/types/host/common/request-images.d.ts.map +1 -0
  28. package/lib/types/host/common/tool-schema.d.ts +27 -0
  29. package/lib/types/host/common/tool-schema.d.ts.map +1 -0
  30. package/lib/types/host/common/video-request.d.ts +81 -0
  31. package/lib/types/host/common/video-request.d.ts.map +1 -0
  32. package/lib/types/host/common/video.d.ts +90 -0
  33. package/lib/types/host/common/video.d.ts.map +1 -0
  34. package/lib/types/host/fetch-address-policy.d.ts +2 -1
  35. package/lib/types/host/fetch-address-policy.d.ts.map +1 -1
  36. package/lib/types/host/fetch-configuration.d.ts +6 -0
  37. package/lib/types/host/fetch-configuration.d.ts.map +1 -0
  38. package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
  39. package/lib/types/host/kimi-code/cache-hint.d.ts +76 -0
  40. package/lib/types/host/kimi-code/cache-hint.d.ts.map +1 -0
  41. package/lib/types/host/kimi-code/client.d.ts +36 -1
  42. package/lib/types/host/kimi-code/client.d.ts.map +1 -1
  43. package/lib/types/host/kimi-code/mapper.d.ts +118 -145
  44. package/lib/types/host/kimi-code/mapper.d.ts.map +1 -1
  45. package/lib/types/host/kimi-code/modalities.d.ts +9 -80
  46. package/lib/types/host/kimi-code/modalities.d.ts.map +1 -1
  47. package/lib/types/host/kimi-code/routes.d.ts +8 -0
  48. package/lib/types/host/kimi-code/routes.d.ts.map +1 -1
  49. package/lib/types/host/kimi-code/token-store.d.ts +30 -1
  50. package/lib/types/host/kimi-code/token-store.d.ts.map +1 -1
  51. package/lib/types/host/kimi-code/video-store.d.ts.map +1 -1
  52. package/lib/types/host/minimax-code/adapter.d.ts +8 -1
  53. package/lib/types/host/minimax-code/adapter.d.ts.map +1 -1
  54. package/lib/types/host/minimax-code/files-api.d.ts +117 -0
  55. package/lib/types/host/minimax-code/files-api.d.ts.map +1 -0
  56. package/lib/types/host/minimax-code/mapper.d.ts +50 -25
  57. package/lib/types/host/minimax-code/mapper.d.ts.map +1 -1
  58. package/lib/types/host/minimax-code/modalities.d.ts +20 -0
  59. package/lib/types/host/minimax-code/modalities.d.ts.map +1 -0
  60. package/lib/types/host/minimax-code/model-catalog.d.ts +27 -11
  61. package/lib/types/host/minimax-code/model-catalog.d.ts.map +1 -1
  62. package/lib/types/host/minimax-code/types.d.ts +10 -0
  63. package/lib/types/host/minimax-code/types.d.ts.map +1 -1
  64. package/lib/types/host/routes.d.ts +2 -2
  65. package/lib/types/host/routes.d.ts.map +1 -1
  66. package/lib/types/host/search-provider-switcher.d.ts +2 -0
  67. package/lib/types/host/search-provider-switcher.d.ts.map +1 -1
  68. package/lib/types/index.d.ts +8 -1
  69. package/lib/types/index.d.ts.map +1 -1
  70. package/lib/types/shared/contracts.d.ts +11 -0
  71. package/lib/types/shared/contracts.d.ts.map +1 -1
  72. package/lib/types/shared/kimi-code-contracts.d.ts +65 -0
  73. package/lib/types/shared/kimi-code-contracts.d.ts.map +1 -1
  74. package/package.json +1 -1
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Image resolution, byte budgeting and data-URL handling for one request.
3
+ *
4
+ * Shared by the provider lines that send inline images, because the budget is a
5
+ * property of the deployment rather than of any one endpoint, and because two
6
+ * lines that budget differently send different request bytes for the same picture.
7
+ *
8
+ * The notable decision is SCALE, not drop: see {@link resolveRequestImages}.
9
+ *
10
+ * @module dsh-chatgpt-subscription/request-images
11
+ */
12
+ import type { GenerateOptions } from "./llm-compat.ts";
13
+ import type { AttachmentStore, ImageAttachmentRef } from "@deepseek-ai/dsh-attachment";
14
+ /**
15
+ * Attachment seam this route needs: verified bytes for one durable image, and a
16
+ * downscaled request version of one that does not fit the image budget.
17
+ *
18
+ * Every harness generation in the peer range declares readImageRequest; a
19
+ * backend that cannot derive request versions rejects the call, and that
20
+ * rejection is handled like any other unreadable image.
21
+ */
22
+ export type AttachmentImageReader = Pick<AttachmentStore, 'readImage' | 'readImageRequest'>;
23
+ /** One durable user image resolved for an in-flight request, or proven unreadable. */
24
+ export type ResolvedRequestImage = {
25
+ readonly kind: 'inline';
26
+ readonly mediaType: string;
27
+ readonly data: string;
28
+ } | {
29
+ readonly kind: 'unavailable';
30
+ };
31
+ /** Resolved images keyed by durable attachment id; consumed by one request build. */
32
+ export type ResolvedRequestImages = ReadonlyMap<string, ResolvedRequestImage>;
33
+ export declare const NO_RESOLVED_IMAGES: ResolvedRequestImages;
34
+ /**
35
+ * Base64 image payload one request may carry.
36
+ *
37
+ * Kimi rejects a request whose total message size exceeds 2 MB with a 400, and
38
+ * the image bytes share that budget with the conversation text, tool schemas,
39
+ * and system prompt — so the bound is deliberately the smaller of the two
40
+ * documented limits rather than the largest body the transport would accept.
41
+ */
42
+ export declare const MAX_REQUEST_IMAGE_BYTES = 1500000;
43
+ /** Message-body ceiling the service documents for one request. */
44
+ export declare const MAX_MESSAGE_BODY_BYTES = 2097152;
45
+ /**
46
+ * Body ceiling once a request carries video.
47
+ *
48
+ * The 2 MB figure above is the documented limit for text and images, and it is
49
+ * far too small for video: a single frame-sequence clip dwarfs it. Kimi's own
50
+ * video guidance carries a separate, much larger request budget, so the ceiling
51
+ * is raised only for a request that actually attaches video. A text-only or
52
+ * image-only request keeps the tighter guard, because catching that 400 locally
53
+ * is the whole reason it exists.
54
+ */
55
+ export declare const MAX_VIDEO_MESSAGE_BODY_BYTES: number;
56
+ /**
57
+ * Base64 video budget for one request.
58
+ *
59
+ * Deliberately below {@link MAX_VIDEO_MESSAGE_BODY_BYTES} so the surrounding
60
+ * JSON envelope, tool schemas and text still fit; the oldest clips are dropped
61
+ * first once the total would exceed it.
62
+ */
63
+ export declare const MAX_REQUEST_VIDEO_BYTES: number;
64
+ /** Media types both upstream wires accept as inline base64. */
65
+ export declare const SUPPORTED_IMAGE_MEDIA_TYPES: Set<string>;
66
+ export declare function attachmentLabel(block: Record<string, unknown>): string | undefined;
67
+ /**
68
+ * Longest edge any image of this request may keep.
69
+ *
70
+ * Kimi's own client compresses an oversized image down to roughly 2 MB of raw
71
+ * bytes before it sends it, and this route has to fit every image of one request
72
+ * inside a far smaller shared budget. Screening on the long edge rather than on
73
+ * the encoded size is what makes the decision stable: it reads only the
74
+ * attachment's own dimensions, so the same image yields the same target in every
75
+ * later turn and the cached prefix survives.
76
+ */
77
+ export declare const REQUEST_IMAGE_MAX_EDGE = 1024;
78
+ /**
79
+ * Request-version target for one stored image whose long edge is over the
80
+ * ceiling, or undefined when it fits and is sent as stored.
81
+ *
82
+ * A reference without usable dimensions is sent as stored: there is no basis
83
+ * for choosing a target, and the budget fallback still applies to it.
84
+ */
85
+ export declare function requestImageTarget(ref: ImageAttachmentRef, edge?: number): {
86
+ width: number;
87
+ height: number;
88
+ maxBytes: number;
89
+ } | undefined;
90
+ /**
91
+ * Replace the oldest inline images with a text placeholder once one request
92
+ * would carry more than `maxBytes` of base64 image data.
93
+ *
94
+ * The MECHANISM is shared because it is generic: measure the retained
95
+ * occurrences' encoded length, drop oldest-first, leave durable history alone.
96
+ * The BUDGET is not, and it is a parameter for exactly that reason — an
97
+ * image budget is a property of the upstream gateway, and importing one route's
98
+ * number into another refuses that other route's own legal images. The default
99
+ * is Kimi's, so every existing call site is byte-for-byte unchanged; a route
100
+ * with a different ceiling passes its own.
101
+ *
102
+ * Durable history is untouched; only the request about to be sent changes.
103
+ */
104
+ export declare function offloadOldestRequestImages(options: GenerateOptions, maxBytes?: number): GenerateOptions;
105
+ /**
106
+ * Read every durable `{ type: 'image', attachment }` block one request carries.
107
+ * An unreadable image resolves to `unavailable` rather than disappearing, so
108
+ * the model is told the picture is missing instead of answering about a blank.
109
+ *
110
+ * An image whose long edge is over {@link REQUEST_IMAGE_MAX_EDGE} is sent as the
111
+ * harness's downscaled request version (see {@link requestImageTarget}). The
112
+ * stored image and durable history do not change, and an image that already
113
+ * fits is sent byte-for-byte as stored.
114
+ *
115
+ * WHY scale instead of drop. `offloadOldestRequestImages` has to drop an image
116
+ * once the request exceeds `MAX_REQUEST_IMAGE_BYTES`, and the number it drops
117
+ * grows with every later image. Each change rewrites the retained prefix, so the
118
+ * prompt cache is invalidated again on the very next turn. Scaling keeps the
119
+ * image COUNT stable, which is what preserves that prefix: a conversation that
120
+ * outgrew the budget once stays inside it instead of breaking the cache every
121
+ * time an image is added.
122
+ */
123
+ export declare function resolveRequestImages(options: GenerateOptions, attachments: AttachmentImageReader | undefined, signal?: AbortSignal): Promise<ResolvedRequestImages>;
124
+ export declare function unavailableImageText(block: Record<string, unknown>): string;
125
+ export interface InlineImage {
126
+ mediaType: string;
127
+ data: string;
128
+ }
129
+ export declare function imageBlockToInline(block: Record<string, unknown>, images: ResolvedRequestImages): InlineImage | undefined;
130
+ //# sourceMappingURL=request-images.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-images.d.ts","sourceRoot":"","sources":["../../../../src/host/common/request-images.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAgB,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAuBtF;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,kBAAkB,CAAC,CAAA;AAE3F,sFAAsF;AACtF,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9E;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;CAAE,CAAA;AAEpC,qFAAqF;AACrF,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;AAE7E,eAAO,MAAM,kBAAkB,EAAE,qBAAiC,CAAA;AAElE;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,UAAY,CAAA;AAEhD,kEAAkE;AAClE,eAAO,MAAM,sBAAsB,UAAY,CAAA;AAE/C;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,QAAmB,CAAA;AAE5D;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,QAAmB,CAAA;AAMvD,+DAA+D;AAC/D,eAAO,MAAM,2BAA2B,aAAkE,CAAA;AAQ1G,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAGlF;AAsCD;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,OAAO,CAAA;AAe1C;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,kBAAkB,EACvB,IAAI,GAAE,MAA+B,GACpC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAOjE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,eAAe,EACxB,QAAQ,GAAE,MAAgC,GACzC,eAAe,CA4BjB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,qBAAqB,GAAG,SAAS,EAC9C,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,qBAAqB,CAAC,CAgChC;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAI3E;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,qBAAqB,GAAG,WAAW,GAAG,SAAS,CAuBzH"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * JSON-Schema normalization for tool parameter schemas.
3
+ *
4
+ * Provider gateways reject or ignore parts of a JSON Schema that a TypeBox/Zod-style
5
+ * schema carries, and a few keywords arrive unresolved. This module is shared
6
+ * because several provider lines send the same normalized shape and the
7
+ * normalization is behaviour, not preference: two lines that normalize
8
+ * differently send different request bytes for the same tool.
9
+ *
10
+ * The work is:
11
+ *
12
+ * - drop the meta keywords ($schema) a gateway ignores;
13
+ * - INLINE $defs / definitions / $ref, so no reference survives to the wire;
14
+ * - give enum and const nodes an explicit type, which some gateways require;
15
+ * - walk the whole tree, with cycle detection so a self-referential schema
16
+ * terminates instead of recursing forever.
17
+ *
18
+ * @module dsh-chatgpt-subscription/tool-schema
19
+ */
20
+ /**
21
+ * Normalizes tool parameter schemas for Kimi by stripping meta keywords ($schema),
22
+ * inlining definitions ($defs/definitions/$ref), and ensuring property types for enums/consts.
23
+ */
24
+ export declare function normalizeKimiToolSchema(schema: unknown): Record<string, unknown>;
25
+ /** Drop the JSON-Schema keywords provider gateways reject or ignore, and normalize properties. */
26
+ export declare function stripMetaSchema(schema: unknown): Record<string, unknown>;
27
+ //# sourceMappingURL=tool-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-schema.d.ts","sourceRoot":"","sources":["../../../../src/host/common/tool-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAoIH;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAYhF;AAED,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAExE"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Request-side machinery for video input, shared by every line that accepts it.
3
+ *
4
+ * Everything here walks ContentBlocks and base64-encodes bytes; none of it knows
5
+ * which provider it is serving. A line contributes the two things that DO differ:
6
+ * the wording for a video it cannot send, and the byte budget its endpoint
7
+ * tolerates.
8
+ *
9
+ * @module dsh-chatgpt-subscription/video-request
10
+ */
11
+ import type { GenerateOptions } from './llm-compat.ts';
12
+ import { type VideoAttachmentRef, type VideoOmissionText } from './video.ts';
13
+ /**
14
+ * One durable video resolved for an in-flight request, or proven unreadable.
15
+ *
16
+ * The shape mirrors the image counterpart so the two media kinds travel the
17
+ * same path and differ only in the wire part each produces.
18
+ */
19
+ export type ResolvedRequestVideo = {
20
+ readonly kind: 'inline';
21
+ readonly mediaType: string;
22
+ readonly data: string;
23
+ } | {
24
+ readonly kind: 'unavailable';
25
+ };
26
+ /** Resolved videos keyed by attachment id; consumed by one request build. */
27
+ export type ResolvedRequestVideos = ReadonlyMap<string, ResolvedRequestVideo>;
28
+ /**
29
+ * Attachment seam for video bytes.
30
+ *
31
+ * DSH's own attachment service stores images only, so a video reference can
32
+ * only exist if some producer in this deployment created it. Rather than
33
+ * pretend otherwise, the reader is an injected seam: absent means every video
34
+ * resolves to `unavailable` and the model is told the clip is missing, which is
35
+ * strictly better than silently sending a request with no video at all.
36
+ */
37
+ export type AttachmentVideoReader = {
38
+ readVideo(ref: VideoAttachmentRef, signal?: AbortSignal): Promise<{
39
+ data: Uint8Array;
40
+ mediaType: string;
41
+ }>;
42
+ };
43
+ /**
44
+ * Read every durable `{ type: 'video', attachment }` block one request carries.
45
+ *
46
+ * An unreadable clip resolves to `unavailable` rather than disappearing, so the
47
+ * model is told the video is missing instead of answering about a blank.
48
+ */
49
+ export declare function resolveRequestVideos(options: GenerateOptions, attachments: AttachmentVideoReader | undefined, signal?: AbortSignal): Promise<ResolvedRequestVideos>;
50
+ /** True when the request carries any video occurrence at all. */
51
+ export declare function requestHasVideo(options: GenerateOptions): boolean;
52
+ /**
53
+ * Drop the oldest videos once one request would exceed `maxBytes` of base64
54
+ * video data, replacing each with a text placeholder.
55
+ *
56
+ * Durable history is untouched; only the request about to be sent changes.
57
+ * Images are left alone — they have their own, much smaller budget and their own
58
+ * offload pass.
59
+ *
60
+ * @param maxBytes - the endpoint's base64 video budget.
61
+ */
62
+ export declare function offloadOldestRequestVideos(options: GenerateOptions, maxBytes: number): GenerateOptions;
63
+ /** One video block resolved for the wire, or the reason it cannot be sent. */
64
+ export type ResolvedVideoBlock = {
65
+ readonly inline: {
66
+ readonly mediaType: string;
67
+ readonly data: string;
68
+ };
69
+ } | {
70
+ readonly omission: string;
71
+ };
72
+ /**
73
+ * Resolve one video block for the wire, or explain why it cannot be sent.
74
+ *
75
+ * @param block - the durable video occurrence.
76
+ * @param videos - videos read for this request.
77
+ * @param videoAccepted - whether the selected model declares video input.
78
+ * @param omit - the line's wording for a video it cannot send.
79
+ */
80
+ export declare function videoBlockToInline(block: Record<string, unknown>, videos: ResolvedRequestVideos, videoAccepted: boolean, omit: VideoOmissionText): ResolvedVideoBlock;
81
+ //# sourceMappingURL=video-request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-request.d.ts","sourceRoot":"","sources":["../../../../src/host/common/video-request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAgB,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAA;AAyCnB;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9E;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;CAAE,CAAA;AAEpC,6EAA6E;AAC7E,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;AAI7E;;;;;;;;GAQG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,CAAC,GAAG,EAAE,kBAAkB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC3G,CAAA;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,qBAAqB,GAAG,SAAS,EAC9C,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,qBAAqB,CAAC,CA0BhC;AASD,iEAAiE;AACjE,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAGjE;AAWD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,MAAM,GACf,eAAe,CA4BjB;AAED,8EAA8E;AAC9E,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAC1E;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAA;AAEjC;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,MAAM,EAAE,qBAAqB,EAC7B,aAAa,EAAE,OAAO,EACtB,IAAI,EAAE,iBAAiB,GACtB,kBAAkB,CAwBpB"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Video input, shared by every line in this plugin that accepts it.
3
+ *
4
+ * DSH ships ModelModalityMap = { text, image } and a ContentBlockMap with no
5
+ * video entry, but both are merge-extensible interfaces. This module performs
6
+ * that widening ONCE, in the plugin's own compilation unit, so the video
7
+ * capability travels through DSH's real pipeline - the one that gates prompt
8
+ * admission, the model picker and subagent delegation - rather than living in
9
+ * a tooltip. Two providers now declare video (Kimi Code and MiniMax Code), and
10
+ * a second augmentation of the same key would be a conflicting redeclaration,
11
+ * so the vocabulary has to be shared rather than copied per line.
12
+ *
13
+ * Nothing here is provider-specific. A line supplies the wording for a video it
14
+ * cannot send (see {@link VideoOmissionText}) and the media types its endpoint
15
+ * accepts, and inherits the traversal, byte budgeting and base64 encoding.
16
+ *
17
+ * @module dsh-chatgpt-subscription/video
18
+ */
19
+ /**
20
+ * Container formats the coding endpoints accept as video input.
21
+ *
22
+ * The services validate the media type, so an unlisted container is reported
23
+ * before it is base64-expanded into a request that would be rejected.
24
+ */
25
+ export declare const VIDEO_MEDIA_TYPES: readonly string[];
26
+ /** Runtime membership test for one video container. */
27
+ export declare function isVideoMediaType(mediaType: string): boolean;
28
+ /**
29
+ * One durable video reference carried by a request.
30
+ *
31
+ * attachmentId is a plain string rather than DSH's branded AttachmentId: no
32
+ * DSH service issues this identifier, so branding it would imply an origin that
33
+ * does not exist. The field name matches ImageAttachmentRef so one traversal
34
+ * helper can walk both block kinds.
35
+ */
36
+ export interface VideoAttachmentRef {
37
+ attachmentId: string;
38
+ /** Verified media type, for example video/mp4. */
39
+ mediaType: string;
40
+ /** Exact encoded byte length. */
41
+ bytes: number;
42
+ /** Intrinsic duration in milliseconds, when the producer knows it. */
43
+ durationMs?: number;
44
+ /** Optional display name, stripped of any local path. */
45
+ name?: string;
46
+ }
47
+ /** One video occurrence in message content. */
48
+ export interface VideoBlock {
49
+ type: 'video';
50
+ attachment: VideoAttachmentRef;
51
+ }
52
+ declare module '@deepseek-ai/dsh-llm' {
53
+ interface ModelModalityMap {
54
+ /** Widened by this plugin for the providers that accept video. */
55
+ video: 'video';
56
+ }
57
+ interface ContentBlockMap {
58
+ /** Widened by this plugin; only this package's request mappers read it. */
59
+ video: VideoBlock;
60
+ }
61
+ }
62
+ /** Base64 length of raw bytes, including padding. */
63
+ export declare function base64LengthOf(bytes: number): number;
64
+ /** Canonical data URL an inline video part carries. */
65
+ export declare function videoDataUrl(mediaType: string, base64: string): string;
66
+ /**
67
+ * Human-readable byte size for a refusal message.
68
+ * @param bytes - exact encoded byte length.
69
+ */
70
+ export declare function formatMediaBytes(bytes: number): string;
71
+ /** Why one video occurrence was replaced by text instead of being sent. */
72
+ export type VideoOmissionReason = 'unsupported-model' | 'unreadable' | 'unsupported-container'
73
+ /** The selected protocol has no documented video part, so none is sent. */
74
+ | 'unsupported-wire';
75
+ /**
76
+ * A line's own wording for a video it cannot send.
77
+ *
78
+ * A function rather than a fixed string because the actionable half differs per
79
+ * provider: the models that DO take video, and whether the selected wire has a
80
+ * video part at all, are different answers on different routes.
81
+ */
82
+ export type VideoOmissionText = (reason: VideoOmissionReason, label?: string) => string;
83
+ /** Attachment id or display name for one block, whichever is present. */
84
+ export declare function videoBlockLabel(block: {
85
+ attachment?: {
86
+ name?: string;
87
+ attachmentId?: string;
88
+ };
89
+ }): string | undefined;
90
+ //# sourceMappingURL=video.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../../src/host/common/video.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAU9C,CAAA;AAED,uDAAuD;AACvD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,MAAM,CAAA;IACpB,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAA;IACjB,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,+CAA+C;AAC/C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,CAAA;IACb,UAAU,EAAE,kBAAkB,CAAA;CAC/B;AAED,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,gBAAgB;QACxB,kEAAkE;QAClE,KAAK,EAAE,OAAO,CAAA;KACf;IAED,UAAU,eAAe;QACvB,2EAA2E;QAC3E,KAAK,EAAE,UAAU,CAAA;KAClB;CACF;AAED,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,uDAAuD;AACvD,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAItD;AAED,2EAA2E;AAC3E,MAAM,MAAM,mBAAmB,GAC3B,mBAAmB,GACnB,YAAY,GACZ,uBAAuB;AACzB,2EAA2E;GACzE,kBAAkB,CAAA;AAEtB;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;AAEvF,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,KAAK,EAAE;IAAE,UAAU,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAAG,MAAM,GAAG,SAAS,CAIpH"}
@@ -14,7 +14,8 @@
14
14
  * proxy on this machine must not become a path into loopback or a LAN — and it
15
15
  * also refuses a name this machine resolves into private space. Only the proxy's
16
16
  * own fake-ip answers are accepted, since that is what the proxy's name
17
- * resolution looks like from here; the URL hostname still reaches the proxy
17
+ * resolution looks like from here: the IPv4 one, and the IPv6 one only beside it
18
+ * (see assertPublicFetchTarget). The URL hostname still reaches the proxy
18
19
  * intact, so the proxy decides where the name really goes.
19
20
  *
20
21
  * @module dsh-chatgpt-subscription/fetch-address-policy
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-address-policy.d.ts","sourceRoot":"","sources":["../../../src/host/fetch-address-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAkCH;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAOtF;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAG7D;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQ1D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAG9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAQ5F"}
1
+ {"version":3,"file":"fetch-address-policy.d.ts","sourceRoot":"","sources":["../../../src/host/fetch-address-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAkCH;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAOtF;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAG7D;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQ1D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAG9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAe5F"}
@@ -0,0 +1,6 @@
1
+ import type { FetchConfigurationDto } from '../shared/contracts.ts';
2
+ export declare const DEFAULT_FETCH_MAX_BODY_CHARS = 100000;
3
+ export declare const DEFAULT_FETCH_MAX_RESPONSE_BYTES: number;
4
+ export declare function positiveFetchLimit(value: number | undefined, fallback: number, name: string): number;
5
+ export declare function resolveFetchConfiguration(config: Partial<FetchConfigurationDto>): FetchConfigurationDto;
6
+ //# sourceMappingURL=fetch-configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-configuration.d.ts","sourceRoot":"","sources":["../../../src/host/fetch-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAEnE,eAAO,MAAM,4BAA4B,SAAU,CAAA;AACnD,eAAO,MAAM,gCAAgC,QAAkB,CAAA;AAE/D,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAIpG;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,CAUvG"}
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EAEV,iBAAiB,EAEjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAGL,WAAW,EAOX,mBAAmB,EACpB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EAEtB,KAAK,oBAAoB,EAEzB,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAOnB,MAAM,aAAa,CAAA;AACpB,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,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAO/F,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,aAAa,CAAC,WAAW,CAAC;YAgBpD,aAAa;CA2M7B;AAQD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * When it is worth telling the user their prompt cache has gone cold.
3
+ *
4
+ * Kimi's cache is automatic and content-hash based, so a client gets no marker
5
+ * that it is no longer being reused — the only evidence is the read ratio in
6
+ * the usage stream. A conversation that sat idle past the cache TTL pays the
7
+ * full prompt again on its next turn, and it is large enough on a real
8
+ * codebase to be worth a sentence.
9
+ *
10
+ * The trigger mirrors the official client's: idle beyond the tier's lifetime
11
+ * AND a context large enough that reprocessing it actually costs something.
12
+ * The upstream rules arrive from a remote config that a private deployment
13
+ * cannot reach, so the thresholds here are the documented defaults; the
14
+ * decision function itself is written to take them, so swapping the source
15
+ * later changes only where the numbers come from.
16
+ */
17
+ import type { KimiCodeCacheTtl } from '../../shared/kimi-code-contracts.ts';
18
+ /**
19
+ * How long an entry written at each tier survives.
20
+ *
21
+ * The tier is LOCKED when the prefix is first written, so this is the lifetime
22
+ * of the entry a request actually created rather than of the tier as a name.
23
+ */
24
+ export declare const CACHE_TTL_MS: Record<KimiCodeCacheTtl, number>;
25
+ /**
26
+ * Context below which a cold cache is not worth mentioning.
27
+ *
28
+ * Reprocessing a few thousand tokens is invisible; reprocessing a few hundred
29
+ * thousand is the difference between an instant and a visible pause, and
30
+ * telling someone about the former trains them to ignore the notice.
31
+ */
32
+ export declare const MIN_TOKENS_TO_HINT = 100000;
33
+ /**
34
+ * Note that a session just did something.
35
+ *
36
+ * Called on every turn, so the timestamp answers how long since this
37
+ * conversation last ran, which is what decides whether its cache entry can
38
+ * still be alive.
39
+ */
40
+ export declare function markSessionActive(sessionId: string | undefined, now?: number): void;
41
+ /** When a session last did something, or undefined when it never has. */
42
+ export declare function sessionLastActiveAt(sessionId: string | undefined): number | undefined;
43
+ /** Forget one session's activity, or all of it. Test seam and teardown. */
44
+ export declare function resetSessionActivity(sessionId?: string): void;
45
+ export interface CacheHintInput {
46
+ /** Current time, epoch ms. */
47
+ readonly now: number;
48
+ /**
49
+ * When the conversation last did anything, epoch ms.
50
+ *
51
+ * Absent means nothing is known, and the hint is skipped: a client that
52
+ * cannot say how long the session was idle cannot claim the entry expired.
53
+ */
54
+ readonly lastActiveAt?: number;
55
+ /** Context currently loaded, in tokens. Absent means no local estimate. */
56
+ readonly totalTokens?: number;
57
+ /** Tier the conversation's entries were written at. */
58
+ readonly cacheTtl?: KimiCodeCacheTtl | null;
59
+ }
60
+ export type CacheHintDecision = {
61
+ readonly kind: 'skip';
62
+ } | {
63
+ readonly kind: 'hint';
64
+ readonly idleMs: number;
65
+ readonly totalTokens: number;
66
+ };
67
+ /**
68
+ * Whether one conversation should be warned about a cold cache.
69
+ *
70
+ * Every missing-data branch skips. That asymmetry is deliberate and matches
71
+ * the official client: a false negative costs one turn nobody noticed, while a
72
+ * false positive teaches the user the notice is noise and stops them reading
73
+ * the one that mattered.
74
+ */
75
+ export declare function evaluateCacheHint(input: CacheHintInput): CacheHintDecision;
76
+ //# sourceMappingURL=cache-hint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-hint.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/cache-hint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AAE3E;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAGzD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,SAAU,CAAA;AAiBzC;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,GAAE,MAAmB,GAAG,IAAI,CAS/F;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGrF;AAED,2EAA2E;AAC3E,wBAAgB,oBAAoB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAM7D;AAED,MAAM,WAAW,cAAc;IAC7B,8BAA8B;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,2EAA2E;IAC3E,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAA;CAC5C;AAED,MAAM,MAAM,iBAAiB,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpF;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,GAAG,iBAAiB,CAY1E"}
@@ -76,8 +76,43 @@ export declare function rememberCatalogCredential(region: KimiCodeRegion, access
76
76
  export declare function clearCatalogCredentials(): void;
77
77
  /** Choose the wire dialect for one model, from the live catalog when it says. */
78
78
  export declare function wireForCatalogEntry(modelId: string, catalog: readonly KimiCodeCatalogModel[]): KimiCodeWire;
79
- /** Thinking levels for one model, from the catalog when it declares them. */
79
+ /**
80
+ * Thinking levels for one model, from the catalog when it declares them.
81
+ *
82
+ * `supports_thinking_type` is applied last because it is the field that can
83
+ * invalidate the effort list itself. A model that declares `only` reasons at
84
+ * every level, so offering `none` asks for a turn the service will reject; a
85
+ * model that declares `no` does not reason at all, so exposing its levels would
86
+ * advertise behaviour it does not have.
87
+ */
80
88
  export declare function reasoningEffortsForEntry(modelId: string, catalog: readonly KimiCodeCatalogModel[]): string[];
89
+ /**
90
+ * Default thinking level for one model, when the server states one.
91
+ *
92
+ * A declared default that the resolved effort list no longer contains is
93
+ * dropped rather than carried through: with `only` in force the list can lose
94
+ * `none`, and a default naming a level the model can no longer be asked for
95
+ * would fail on the first turn that relied on it.
96
+ */
97
+ export declare function defaultReasoningEffortForEntry(modelId: string, catalog: readonly KimiCodeCatalogModel[]): string | undefined;
98
+ /**
99
+ * Whether one model accepts tool declarations at all.
100
+ *
101
+ * Distinct from {@link dynamicToolsForEntry}, which asks the narrower question
102
+ * of message-level declarations: a model can take tools at the top level and
103
+ * not accept them per message, and collapsing the two would disable tools on a
104
+ * model that still works. Precedence is the live listing, including an
105
+ * explicit false, then the shipped registry.
106
+ */
107
+ export declare function toolUseForEntry(modelId: string, catalog: readonly KimiCodeCatalogModel[]): boolean;
108
+ /**
109
+ * Prompt ceiling for one model, or undefined when it equals the window.
110
+ *
111
+ * The completion budget still uses the full window — the cap bounds what may be
112
+ * sent, not how much may be generated — but a caller sizing a prompt needs the
113
+ * smaller of the two whenever the service states a lower input bound.
114
+ */
115
+ export declare function maxInputTokensForEntry(modelId: string, catalog: readonly KimiCodeCatalogModel[]): number | undefined;
81
116
  /**
82
117
  * Whether one model accepts message-level tool declarations.
83
118
  *
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,aAAa,EAQd,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,mBAAmB,EAEnB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,mBAAm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