@eddyskywalker/dsh-chatgpt-subscription 0.30.0 → 0.31.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 (55) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/lib/client.js +2905 -194
  3. package/lib/client.js.map +1 -1
  4. package/lib/index.js +3829 -553
  5. package/lib/types/client/index.d.ts.map +1 -1
  6. package/lib/types/client/minimax-code/MinimaxCodeSection.d.ts.map +1 -1
  7. package/lib/types/client/minimax-code/MinimaxVideoDocumentBody.d.ts +69 -0
  8. package/lib/types/client/minimax-code/MinimaxVideoDocumentBody.d.ts.map +1 -0
  9. package/lib/types/client/minimax-code/MinimaxVideoToolView.d.ts +83 -0
  10. package/lib/types/client/minimax-code/MinimaxVideoToolView.d.ts.map +1 -0
  11. package/lib/types/client/minimax-code/VideoFormDialog.d.ts +90 -0
  12. package/lib/types/client/minimax-code/VideoFormDialog.d.ts.map +1 -0
  13. package/lib/types/client/minimax-code/VideoSettingsSections.d.ts +73 -0
  14. package/lib/types/client/minimax-code/VideoSettingsSections.d.ts.map +1 -0
  15. package/lib/types/client/minimax-code/commands-contract.d.ts +35 -0
  16. package/lib/types/client/minimax-code/commands-contract.d.ts.map +1 -0
  17. package/lib/types/client/minimax-code/document-preview.d.ts +45 -0
  18. package/lib/types/client/minimax-code/document-preview.d.ts.map +1 -0
  19. package/lib/types/client/minimax-code/locales.d.ts +206 -2
  20. package/lib/types/client/minimax-code/locales.d.ts.map +1 -1
  21. package/lib/types/client/minimax-code/styles.d.ts.map +1 -1
  22. package/lib/types/client/minimax-code/video-command-host.d.ts +61 -0
  23. package/lib/types/client/minimax-code/video-command-host.d.ts.map +1 -0
  24. package/lib/types/client/minimax-code/video-command.d.ts +126 -0
  25. package/lib/types/client/minimax-code/video-command.d.ts.map +1 -0
  26. package/lib/types/client/minimax-code/video-contract.d.ts +172 -0
  27. package/lib/types/client/minimax-code/video-contract.d.ts.map +1 -0
  28. package/lib/types/client/minimax-code/video-defaults-store.d.ts +61 -0
  29. package/lib/types/client/minimax-code/video-defaults-store.d.ts.map +1 -0
  30. package/lib/types/client/minimax-code/video-form-rules.d.ts +288 -0
  31. package/lib/types/client/minimax-code/video-form-rules.d.ts.map +1 -0
  32. package/lib/types/client/minimax-code/video-media.d.ts +61 -0
  33. package/lib/types/client/minimax-code/video-media.d.ts.map +1 -0
  34. package/lib/types/client/minimax-code/video-slots.d.ts +87 -0
  35. package/lib/types/client/minimax-code/video-slots.d.ts.map +1 -0
  36. package/lib/types/host/minimax-code/client.d.ts.map +1 -1
  37. package/lib/types/host/minimax-code/iso-bmff-duration.d.ts +84 -0
  38. package/lib/types/host/minimax-code/iso-bmff-duration.d.ts.map +1 -0
  39. package/lib/types/host/minimax-code/matrix-client.d.ts +168 -0
  40. package/lib/types/host/minimax-code/matrix-client.d.ts.map +1 -0
  41. package/lib/types/host/minimax-code/media-store.d.ts +153 -0
  42. package/lib/types/host/minimax-code/media-store.d.ts.map +1 -0
  43. package/lib/types/host/minimax-code/routes.d.ts.map +1 -1
  44. package/lib/types/host/minimax-code/video-history.d.ts +240 -0
  45. package/lib/types/host/minimax-code/video-history.d.ts.map +1 -0
  46. package/lib/types/host/minimax-code/video-submit-rules.d.ts +40 -0
  47. package/lib/types/host/minimax-code/video-submit-rules.d.ts.map +1 -0
  48. package/lib/types/host/minimax-code/video-tool.d.ts +757 -0
  49. package/lib/types/host/minimax-code/video-tool.d.ts.map +1 -0
  50. package/lib/types/host/progress-updates/index.d.ts +6 -0
  51. package/lib/types/host/progress-updates/index.d.ts.map +1 -1
  52. package/lib/types/host/progress-updates/projection.d.ts +214 -0
  53. package/lib/types/host/progress-updates/projection.d.ts.map +1 -0
  54. package/lib/types/index.d.ts.map +1 -1
  55. package/package.json +13 -4
@@ -0,0 +1,240 @@
1
+ /**
2
+ * Generation history for the MiniMax Code video tools.
3
+ *
4
+ * The two video tools (`minimax_generate_video` / `minimax_understand_video`) are
5
+ * called by the MODEL, so before this store existed the only trace of a clip was
6
+ * the file on disk: a user who closed the session could not tell which clips they
7
+ * had already spent quota on. This store is that ledger, and it is deliberately
8
+ * narrow.
9
+ *
10
+ * WHAT IS STORED, AND WHAT IS NOT. One row per finished generation: when, which
11
+ * model, which ratio and duration, the WORKSPACE-RELATIVE path, the byte count and
12
+ * the upstream task id. `videoPath` is workspace-relative because the workspace
13
+ * moves with the user (a repo can be cloned anywhere) and an absolute path would
14
+ * go stale the moment it did; the byte count is what lets the card render a row
15
+ * before the (potentially hundreds of MB) file is read. THE VIDEO ITSELF IS NEVER
16
+ * STORED HERE - not the bytes, not a copy, not a thumbnail. A history file that
17
+ * carried media would double every generation on disk, and this store's whole job
18
+ * is to point at the file the media store already wrote.
19
+ *
20
+ * WHY IT IS ENCRYPTED. It holds no token and nothing secret, and the sibling
21
+ * lines' rule is that a store under `$DSH_HOME` which is easy to protect is
22
+ * protected: the same platform credential backend the siblings use (Windows
23
+ * CurrentUser DPAPI, macOS Keychain, Linux Secret Service) reads and writes it, so
24
+ * the format on disk is that backend's own envelope rather than plain JSON. A
25
+ * plaintext fallback is kept for a platform with no backend at all, because a
26
+ * history a user cannot read on an unusual host is worse than a history that is
27
+ * merely not encrypted - and the file carries no credential either way.
28
+ *
29
+ * Path: `$DSH_HOME/storages/minimax-code-video-history.json` (Windows appends
30
+ * `.dpapi`, exactly like every sibling credential file), matching the path the
31
+ * sibling stores in this line already use (`minimax-code-files.json`,
32
+ * `minimax-code-models.json`).
33
+ *
34
+ * @module dsh-chatgpt-subscription/minimax-code/video-history
35
+ */
36
+ import type { CredentialStore } from '../token-store.ts';
37
+ /** How many rows the ledger keeps. Older rows fall off the tail. */
38
+ export declare const MAX_VIDEO_HISTORY_ENTRIES = 100;
39
+ /**
40
+ * One finished generation.
41
+ *
42
+ * Every field except `durationSeconds` is always present: a row without them could
43
+ * not be rendered as a row at all, so a document missing one is treated as
44
+ * corrupt and dropped rather than repaired with a guess.
45
+ */
46
+ export interface MinimaxVideoHistoryEntry {
47
+ /** Unix milliseconds the clip finished writing. */
48
+ readonly createdAtMs: number;
49
+ /** Model id the submit named, exactly as it was sent. */
50
+ readonly model: string;
51
+ /** Effective ratio, or absent when the linkage sent no ratio field. */
52
+ readonly ratio?: string;
53
+ /** Duration the service reported for the settled task, in seconds. */
54
+ readonly durationSeconds?: number;
55
+ /** Workspace-relative, POSIX-separated path of the written file. */
56
+ readonly videoPath: string;
57
+ /** Exact byte length of that file. */
58
+ readonly bytes: number;
59
+ /** Upstream task id, for diagnosis and follow-up. */
60
+ readonly taskId: string;
61
+ }
62
+ /** The stored document. The version marker is what lets a later build migrate. */
63
+ export interface MinimaxVideoHistoryDocument {
64
+ readonly version: 1;
65
+ readonly entries: readonly MinimaxVideoHistoryEntry[];
66
+ }
67
+ /** What one generation records. The timestamp is added by the store. */
68
+ export interface MinimaxVideoHistoryRecord {
69
+ readonly model: string;
70
+ readonly ratio?: string;
71
+ readonly durationSeconds?: number;
72
+ readonly videoPath: string;
73
+ readonly bytes: number;
74
+ readonly taskId: string;
75
+ }
76
+ /** Path of the history file. Mirrors {@link fileHistoryPath} in the sibling stores. */
77
+ export declare function videoHistoryPath(): string;
78
+ /**
79
+ * Validate and normalize one stored row.
80
+ *
81
+ * A row that cannot be rendered is DROPPED rather than repaired: the history is a
82
+ * convenience, and inventing a byte count or a path would put a row in front of
83
+ * the user that describes nothing. Nothing here throws - the whole document goes
84
+ * through this per row, and one corrupt row must not hide the ninety-nine good
85
+ * ones beside it.
86
+ *
87
+ * @param value - one parsed row.
88
+ * @returns the normalized entry, or undefined to drop it.
89
+ */
90
+ export declare function parseHistoryEntry(value: unknown): MinimaxVideoHistoryEntry | undefined;
91
+ /**
92
+ * Normalize a whole parsed document.
93
+ *
94
+ * A document this build cannot recognise yields an EMPTY history rather than an
95
+ * error: the file is read on every settings-card view and after every generation,
96
+ * and a hand-edited or forward-versioned file must degrade to "no history yet"
97
+ * instead of making the card unusable.
98
+ *
99
+ * @param value - parsed JSON, or anything else.
100
+ * @returns the normalized document.
101
+ */
102
+ export declare function parseHistoryDocument(value: unknown): MinimaxVideoHistoryDocument;
103
+ /**
104
+ * Prepend one record and trim the tail.
105
+ *
106
+ * Newest first, so the card renders the most recent clip without sorting, and a
107
+ * duplicate task id REPLACES its earlier row: a generation retried after a
108
+ * timeout settles on the same upstream task, and two rows for one clip would
109
+ * count one generation twice.
110
+ *
111
+ * @param document - the current document.
112
+ * @param record - the generation to add.
113
+ * @param now - timestamp to stamp it with.
114
+ * @returns the next document.
115
+ */
116
+ export declare function appendHistoryEntry(document: MinimaxVideoHistoryDocument, record: MinimaxVideoHistoryRecord, now: number): MinimaxVideoHistoryDocument;
117
+ /**
118
+ * The generation ledger for this machine.
119
+ *
120
+ * Reads and writes are serialized per file so two generations settling at once
121
+ * cannot each read the same document and have the second silently discard the
122
+ * first. The queue is process-wide and keyed by resolved path, exactly like the
123
+ * credential store's.
124
+ */
125
+ export declare class MinimaxVideoHistoryStore {
126
+ private readonly filePath;
127
+ private readonly backend;
128
+ private readonly queue;
129
+ /**
130
+ * @param filePath - override for tests; defaults to {@link videoHistoryPath}.
131
+ * @param backend - override for tests; defaults to the platform backend.
132
+ */
133
+ constructor(filePath?: string, backend?: CredentialStore<MinimaxVideoHistoryDocument> | undefined);
134
+ /** Where this store writes. Reported by the card so the path is never a mystery. */
135
+ path(): string;
136
+ /** Whether the stored document is encrypted at rest by a platform backend. */
137
+ encryptedAtRest(): boolean;
138
+ /**
139
+ * Read the ledger.
140
+ *
141
+ * Never throws: a missing, unreadable or corrupt file yields an empty history, so
142
+ * one bad write cannot make the video tools or the settings card fail.
143
+ *
144
+ * @returns the stored document.
145
+ */
146
+ read(): Promise<MinimaxVideoHistoryDocument>;
147
+ /**
148
+ * The rows the card renders, newest first.
149
+ *
150
+ * @returns the entries alone, which is what the route answers with.
151
+ */
152
+ list(): Promise<readonly MinimaxVideoHistoryEntry[]>;
153
+ /**
154
+ * Record one finished generation.
155
+ *
156
+ * Read-modify-write under the per-file queue. A failure to record is REPORTED to
157
+ * the caller but is never allowed to fail a generation that already succeeded:
158
+ * the video is on disk and paid for either way.
159
+ *
160
+ * @param record - the generation to add.
161
+ * @param now - timestamp override for tests.
162
+ * @returns the document as written.
163
+ */
164
+ record(record: MinimaxVideoHistoryRecord, now?: number): Promise<MinimaxVideoHistoryDocument>;
165
+ /** Write the whole document through the platform backend or the plaintext file. */
166
+ private write;
167
+ /**
168
+ * Run one operation after everything already queued for this file.
169
+ *
170
+ * @param operation - the read-modify-write.
171
+ * @returns its result.
172
+ */
173
+ private serialize;
174
+ }
175
+ /**
176
+ * A store that keeps the ledger in memory and writes nothing.
177
+ *
178
+ * Two callers use it. A test that exercises a generation end to end does not want
179
+ * either side effect of the real store: on Windows every uncached read spawns a
180
+ * `powershell.exe` DPAPI helper, and either way the row lands in the developer's
181
+ * personal `$DSH_HOME`. And a host with no platform backend and an unwritable home
182
+ * still gets a readable history for the length of the process.
183
+ */
184
+ export declare class InMemoryVideoHistoryStore {
185
+ private document;
186
+ /** @returns the in-memory file label, so the card can say where it is (nowhere). */
187
+ path(): string;
188
+ /** @returns false: nothing on disk to encrypt. */
189
+ encryptedAtRest(): boolean;
190
+ /** @returns the stored document. */
191
+ read(): Promise<MinimaxVideoHistoryDocument>;
192
+ /** @returns the entries alone, newest first. */
193
+ list(): Promise<readonly MinimaxVideoHistoryEntry[]>;
194
+ /**
195
+ * Append one row in memory.
196
+ *
197
+ * @param record - the generation.
198
+ * @param now - timestamp to stamp it with.
199
+ * @returns the document as stored.
200
+ */
201
+ record(record: MinimaxVideoHistoryRecord, now?: number): Promise<MinimaxVideoHistoryDocument>;
202
+ }
203
+ /** What the routes need from a store; both implementations satisfy it. */
204
+ export type MinimaxVideoHistoryPort = Pick<MinimaxVideoHistoryStore | InMemoryVideoHistoryStore, 'path' | 'encryptedAtRest' | 'read' | 'list' | 'record'>;
205
+ /**
206
+ * The process-wide history store.
207
+ *
208
+ * A test run gets the in-memory store unless something installed one explicitly.
209
+ * That default is deliberate rather than convenient: the video tool's own test
210
+ * suite drives real generations through this hook, and on Windows each row would
211
+ * otherwise spawn a DPAPI helper and append to the developer's real ledger. A
212
+ * suite that WANTS the file behaviour installs a store through
213
+ * {@link setMinimaxVideoHistoryStore} and gets exactly that.
214
+ *
215
+ * @returns the process-wide store.
216
+ */
217
+ export declare function minimaxVideoHistory(): MinimaxVideoHistoryPort;
218
+ /**
219
+ * Test seam: replace or drop the process-wide store.
220
+ *
221
+ * @param store - the store to install, or undefined to rebuild on next use.
222
+ */
223
+ export declare function setMinimaxVideoHistoryStore(store: MinimaxVideoHistoryPort | undefined): void;
224
+ /**
225
+ * Record one finished generation, never throwing.
226
+ *
227
+ * Called from the video tool right after the clip is on disk. A recording failure
228
+ * must not turn a SUCCESSFUL generation into an error the user sees: the clip
229
+ * exists and the quota is spent either way, so the failure is logged and dropped.
230
+ *
231
+ * @param record - the generation.
232
+ * @param logger - the host logger, when the caller has one.
233
+ * @returns whether the row was written.
234
+ */
235
+ export declare function recordMinimaxVideoGeneration(record: MinimaxVideoHistoryRecord): Promise<boolean>;
236
+ /** @returns the last recording failure, or undefined when the last write succeeded. */
237
+ export declare function lastMinimaxVideoHistoryFailure(): string | undefined;
238
+ /** Test seam: forget the last recording failure. */
239
+ export declare function resetMinimaxVideoHistoryFailure(): void;
240
+ //# sourceMappingURL=video-history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-history.d.ts","sourceRoot":"","sources":["../../../../src/host/minimax-code/video-history.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AASH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAKxD,oEAAoE;AACpE,eAAO,MAAM,yBAAyB,MAAM,CAAA;AAE5C;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC,mDAAmD;IACnD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,yDAAyD;I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;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,IAAI,uBAAuB,CAK7D;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,uBAAuB,GAAG,SAAS,GAAG,IAAI,CAE5F;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,OAAO,CAAC,CAUlB;AAYD,uFAAuF;AACvF,wBAAgB,8BAA8B,IAAI,MAAM,GAAG,SAAS,CAEnE;AAED,oDAAoD;AACpD,wBAAgB,+BAA+B,IAAI,IAAI,CAEtD"}
@@ -0,0 +1,40 @@
1
+ export declare const MAX_REFERENCE_IMAGES = 9;
2
+ export declare const MAX_REFERENCE_VIDEOS = 3;
3
+ export declare const MAX_REFERENCE_AUDIOS = 3;
4
+ export declare const MAX_REFERENCE_MEDIA_TOTAL = 12;
5
+ export declare function minimaxModelSupportsReferenceMedia(model: string): boolean;
6
+ export interface MinimaxGenerationMediaInput {
7
+ readonly inputImagePath?: string;
8
+ readonly lastFrameImagePath?: string;
9
+ readonly referenceType?: string;
10
+ readonly referenceImagePaths?: readonly string[];
11
+ readonly referenceVideoPaths?: readonly string[];
12
+ readonly referenceVideoDurationSeconds?: readonly number[];
13
+ readonly referenceAudioPaths?: readonly string[];
14
+ }
15
+ export declare function assertGenerationMediaLimits(input: MinimaxGenerationMediaInput, model: string): void;
16
+ export declare function stableJsonKey(value: unknown): string;
17
+ export declare function videoSubmissionKey(sessionId: string | undefined, turn: string | number | undefined, body: unknown): string;
18
+ /**
19
+ * Whether a submission key is precise enough to REFUSE a repeat on.
20
+ *
21
+ * The key is only meaningful WITHIN one session and turn. When the runtime
22
+ * exposes neither, the key degrades to the request body alone - and then two
23
+ * genuinely different requests in the same process would carry the same key,
24
+ * so the guard would refuse a generation the user actually asked for.
25
+ *
26
+ * A false refusal is worse than a missed duplicate: a missed duplicate costs
27
+ * one extra generation, while a false refusal blocks the request outright. The
28
+ * guard therefore stays INACTIVE without a session identity, and the caller's
29
+ * own retry discipline carries that case.
30
+ *
31
+ * @param sessionId - the session the call belongs to, when known.
32
+ * @param turn - the turn within it, when known.
33
+ * @returns true when the key identifies one request in one session turn.
34
+ */
35
+ export declare function isPreciseSubmissionKey(sessionId: string | undefined, turn: string | number | undefined): boolean;
36
+ export declare function attemptedVideoSubmissionFor(key: string): string | undefined;
37
+ export declare function recordVideoSubmissionAttempt(key: string, taskId?: string): void;
38
+ export declare function attemptedVideoSubmissionCount(): number;
39
+ export declare function resetVideoSubmissionGuard(): void;
40
+ //# sourceMappingURL=video-submit-rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-submit-rules.d.ts","sourceRoot":"","sources":["../../../../src/host/minimax-code/video-submit-rules.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,IAAI,CAAA;AACrC,eAAO,MAAM,oBAAoB,IAAI,CAAA;AACrC,eAAO,MAAM,oBAAoB,IAAI,CAAA;AACrC,eAAO,MAAM,yBAAyB,KAAK,CAAA;AAE3C,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEzE;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IACpC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAChD,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAChD,QAAQ,CAAC,6BAA6B,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1D,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACjD;AAgBD,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,2BAA2B,EAClC,KAAK,EAAE,MA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