dsh-draw 0.1.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.
- package/CHANGELOG.md +29 -0
- package/LICENSE +201 -0
- package/README.es.md +194 -0
- package/README.hi.md +194 -0
- package/README.md +194 -0
- package/README.pt.md +194 -0
- package/README.zh.md +194 -0
- package/SECURITY.md +39 -0
- package/THIRD_PARTY_NOTICES.md +21 -0
- package/cordis.patch.yml +48 -0
- package/lib/client.js +4787 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +1429 -0
- package/lib/typert.host.js +26 -0
- package/lib/types/client/DrawResultCard.d.ts +58 -0
- package/lib/types/client/DrawResultCard.d.ts.map +1 -0
- package/lib/types/client/DrawResultCard.js +48 -0
- package/lib/types/client/DrawSettingsTab.d.ts +31 -0
- package/lib/types/client/DrawSettingsTab.d.ts.map +1 -0
- package/lib/types/client/DrawSettingsTab.js +129 -0
- package/lib/types/client/index.d.ts +35 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/index.js +98 -0
- package/lib/types/client/locales.d.ts +14 -0
- package/lib/types/client/locales.d.ts.map +1 -0
- package/lib/types/client/locales.js +57 -0
- package/lib/types/client/present.d.ts +80 -0
- package/lib/types/client/present.d.ts.map +1 -0
- package/lib/types/client/present.js +86 -0
- package/lib/types/client/remote.d.ts +268 -0
- package/lib/types/client/remote.d.ts.map +1 -0
- package/lib/types/client/remote.js +15 -0
- package/lib/types/client/styles.d.ts +11 -0
- package/lib/types/client/styles.d.ts.map +1 -0
- package/lib/types/client/styles.js +43 -0
- package/lib/types/config.d.ts +160 -0
- package/lib/types/config.d.ts.map +1 -0
- package/lib/types/config.js +230 -0
- package/lib/types/drawer.d.ts +114 -0
- package/lib/types/drawer.d.ts.map +1 -0
- package/lib/types/drawer.js +138 -0
- package/lib/types/engine.d.ts +58 -0
- package/lib/types/engine.d.ts.map +1 -0
- package/lib/types/engine.js +135 -0
- package/lib/types/http.d.ts +89 -0
- package/lib/types/http.d.ts.map +1 -0
- package/lib/types/http.js +127 -0
- package/lib/types/index.d.ts +43 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +78 -0
- package/lib/types/quota.d.ts +69 -0
- package/lib/types/quota.d.ts.map +1 -0
- package/lib/types/quota.js +56 -0
- package/lib/types/router.d.ts +141 -0
- package/lib/types/router.d.ts.map +1 -0
- package/lib/types/router.js +207 -0
- package/lib/types/sanitize.d.ts +40 -0
- package/lib/types/sanitize.d.ts.map +1 -0
- package/lib/types/sanitize.js +103 -0
- package/lib/types/service.d.ts +59 -0
- package/lib/types/service.d.ts.map +1 -0
- package/lib/types/service.js +131 -0
- package/lib/types/session-events.d.ts +66 -0
- package/lib/types/session-events.d.ts.map +1 -0
- package/lib/types/session-events.js +32 -0
- package/lib/types/tool.d.ts +30 -0
- package/lib/types/tool.d.ts.map +1 -0
- package/lib/types/tool.js +131 -0
- package/lib/types/translate.d.ts +64 -0
- package/lib/types/translate.d.ts.map +1 -0
- package/lib/types/translate.js +56 -0
- package/lib/types/typert.host.d.ts +250 -0
- package/lib/types/typert.host.d.ts.map +1 -0
- package/lib/types/typert.host.js +23 -0
- package/lib/types/version.d.ts +10 -0
- package/lib/types/version.d.ts.map +1 -0
- package/lib/types/version.js +9 -0
- package/lib/types/wire.d.ts +699 -0
- package/lib/types/wire.d.ts.map +1 -0
- package/lib/types/wire.js +273 -0
- package/lib/wire-Cc4JZ3jR.js +4370 -0
- package/package.json +179 -0
- package/src/client/DrawResultCard.tsx +100 -0
- package/src/client/DrawSettingsTab.tsx +159 -0
- package/src/client/index.ts +123 -0
- package/src/client/locales.ts +84 -0
- package/src/client/present.ts +137 -0
- package/src/client/remote.ts +44 -0
- package/src/client/styles.ts +44 -0
- package/src/config.ts +358 -0
- package/src/drawer.ts +234 -0
- package/src/engine.ts +182 -0
- package/src/http.ts +161 -0
- package/src/index.ts +93 -0
- package/src/quota.ts +98 -0
- package/src/router.ts +309 -0
- package/src/sanitize.ts +113 -0
- package/src/service.ts +169 -0
- package/src/session-events.ts +70 -0
- package/src/tool.ts +145 -0
- package/src/translate.ts +101 -0
- package/src/typert.host.ts +25 -0
- package/src/version.ts +10 -0
- package/src/wire.ts +417 -0
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hand-written Typert HOST manifest for `dsh-draw`, exported as `./typert`
|
|
3
|
+
* so the harness's typert-loader registers the `draw` status/probe/credential/
|
|
4
|
+
* regenerate invocations automatically when this plugin mounts. Same shape as
|
|
5
|
+
* a generator output (validated by the loader): package face, empty model and
|
|
6
|
+
* schemas, and the canonical invocation list shared with the client Remote
|
|
7
|
+
* contribution (`src/wire.ts`).
|
|
8
|
+
*
|
|
9
|
+
* @module dsh-draw/typert
|
|
10
|
+
*/
|
|
11
|
+
/** Host Typert manifest (validated by `@deepseek-ai/dsh-typert-loader`). */
|
|
12
|
+
export declare const TYPERT: Readonly<{
|
|
13
|
+
package: "dsh-draw";
|
|
14
|
+
face: "host";
|
|
15
|
+
schemas: readonly never[];
|
|
16
|
+
invocations: readonly (Readonly<{
|
|
17
|
+
readonly id: 'dsh-draw#draw/status';
|
|
18
|
+
readonly service: 'dsh-draw';
|
|
19
|
+
readonly namespace: 'draw';
|
|
20
|
+
readonly method: 'status';
|
|
21
|
+
readonly invocation: Readonly<{
|
|
22
|
+
kind: "direct";
|
|
23
|
+
}>;
|
|
24
|
+
readonly parameters: readonly never[];
|
|
25
|
+
readonly result: Readonly<{
|
|
26
|
+
mode: "strict";
|
|
27
|
+
typeSymbol: "dsh-draw/types#DrawStatusSnapshot";
|
|
28
|
+
schema: import("zod").ZodObject<{
|
|
29
|
+
pluginVersion: import("zod").ZodString;
|
|
30
|
+
engines: import("zod").ZodArray<import("zod").ZodObject<{
|
|
31
|
+
id: import("zod").ZodString;
|
|
32
|
+
model: import("zod").ZodString;
|
|
33
|
+
baseUrl: import("zod").ZodString;
|
|
34
|
+
apiKeyRef: import("zod").ZodString;
|
|
35
|
+
enabled: import("zod").ZodBoolean;
|
|
36
|
+
preferred: import("zod").ZodBoolean;
|
|
37
|
+
credential: import("zod").ZodObject<{
|
|
38
|
+
configured: import("zod").ZodBoolean;
|
|
39
|
+
source: import("zod").ZodOptional<import("zod").ZodString>;
|
|
40
|
+
writable: import("zod").ZodBoolean;
|
|
41
|
+
}, import("zod/v4/core").$strip>;
|
|
42
|
+
health: import("zod").ZodObject<{
|
|
43
|
+
consecutiveFailures: import("zod").ZodNumber;
|
|
44
|
+
cooldownUntil: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
45
|
+
lastError: import("zod").ZodNullable<import("zod").ZodString>;
|
|
46
|
+
lastStatus: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
47
|
+
}, import("zod/v4/core").$strip>;
|
|
48
|
+
}, import("zod/v4/core").$strip>>;
|
|
49
|
+
quota: import("zod").ZodObject<{
|
|
50
|
+
maxGenerationsPerSession: import("zod").ZodNumber;
|
|
51
|
+
maxBytesPerSession: import("zod").ZodNumber;
|
|
52
|
+
}, import("zod/v4/core").$strip>;
|
|
53
|
+
requestTimeoutMs: import("zod").ZodNumber;
|
|
54
|
+
maxImagesPerCall: import("zod").ZodNumber;
|
|
55
|
+
}, import("zod/v4/core").$strip>;
|
|
56
|
+
}>;
|
|
57
|
+
readonly sourceLocation: Readonly<{
|
|
58
|
+
file: "src/wire.ts";
|
|
59
|
+
line: 1;
|
|
60
|
+
column: 1;
|
|
61
|
+
}>;
|
|
62
|
+
}> | Readonly<{
|
|
63
|
+
readonly id: 'dsh-draw#draw/probe';
|
|
64
|
+
readonly service: 'dsh-draw';
|
|
65
|
+
readonly namespace: 'draw';
|
|
66
|
+
readonly method: 'probe';
|
|
67
|
+
readonly invocation: Readonly<{
|
|
68
|
+
kind: "direct";
|
|
69
|
+
}>;
|
|
70
|
+
readonly parameters: readonly Readonly<{
|
|
71
|
+
name: string;
|
|
72
|
+
wire: string;
|
|
73
|
+
source: "json";
|
|
74
|
+
codec: Readonly<{
|
|
75
|
+
mode: "strict";
|
|
76
|
+
typeSymbol: "dsh-draw/types#EngineId";
|
|
77
|
+
schema: import("zod").ZodString;
|
|
78
|
+
}>;
|
|
79
|
+
}>[];
|
|
80
|
+
readonly result: Readonly<{
|
|
81
|
+
mode: "strict";
|
|
82
|
+
typeSymbol: "dsh-draw/types#DrawProbeResult";
|
|
83
|
+
schema: import("zod").ZodObject<{
|
|
84
|
+
engineId: import("zod").ZodString;
|
|
85
|
+
reachable: import("zod").ZodBoolean;
|
|
86
|
+
httpStatus: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
87
|
+
target: import("zod").ZodString;
|
|
88
|
+
note: import("zod").ZodString;
|
|
89
|
+
credentialConfigured: import("zod").ZodBoolean;
|
|
90
|
+
}, import("zod/v4/core").$strip>;
|
|
91
|
+
}>;
|
|
92
|
+
readonly sourceLocation: Readonly<{
|
|
93
|
+
file: "src/wire.ts";
|
|
94
|
+
line: 1;
|
|
95
|
+
column: 1;
|
|
96
|
+
}>;
|
|
97
|
+
}> | Readonly<{
|
|
98
|
+
readonly id: 'dsh-draw#draw/setCredential';
|
|
99
|
+
readonly service: 'dsh-draw';
|
|
100
|
+
readonly namespace: 'draw';
|
|
101
|
+
readonly method: 'setCredential';
|
|
102
|
+
readonly invocation: Readonly<{
|
|
103
|
+
kind: "direct";
|
|
104
|
+
}>;
|
|
105
|
+
readonly parameters: readonly (Readonly<{
|
|
106
|
+
name: string;
|
|
107
|
+
wire: string;
|
|
108
|
+
source: "json";
|
|
109
|
+
codec: Readonly<{
|
|
110
|
+
mode: "strict";
|
|
111
|
+
typeSymbol: "dsh-draw/types#EngineId";
|
|
112
|
+
schema: import("zod").ZodString;
|
|
113
|
+
}>;
|
|
114
|
+
}> | Readonly<{
|
|
115
|
+
name: string;
|
|
116
|
+
wire: string;
|
|
117
|
+
source: "json";
|
|
118
|
+
codec: Readonly<{
|
|
119
|
+
mode: "strict";
|
|
120
|
+
typeSymbol: "dsh-draw/types#CredentialValue";
|
|
121
|
+
schema: import("zod").ZodString;
|
|
122
|
+
}>;
|
|
123
|
+
}>)[];
|
|
124
|
+
readonly result: Readonly<{
|
|
125
|
+
mode: "strict";
|
|
126
|
+
typeSymbol: "dsh-draw/types#CredentialActionResult";
|
|
127
|
+
schema: import("zod").ZodObject<{
|
|
128
|
+
engineId: import("zod").ZodString;
|
|
129
|
+
reference: import("zod").ZodString;
|
|
130
|
+
note: import("zod").ZodString;
|
|
131
|
+
}, import("zod/v4/core").$strip>;
|
|
132
|
+
}>;
|
|
133
|
+
readonly sourceLocation: Readonly<{
|
|
134
|
+
file: "src/wire.ts";
|
|
135
|
+
line: 1;
|
|
136
|
+
column: 1;
|
|
137
|
+
}>;
|
|
138
|
+
}> | Readonly<{
|
|
139
|
+
readonly id: 'dsh-draw#draw/unsetCredential';
|
|
140
|
+
readonly service: 'dsh-draw';
|
|
141
|
+
readonly namespace: 'draw';
|
|
142
|
+
readonly method: 'unsetCredential';
|
|
143
|
+
readonly invocation: Readonly<{
|
|
144
|
+
kind: "direct";
|
|
145
|
+
}>;
|
|
146
|
+
readonly parameters: readonly Readonly<{
|
|
147
|
+
name: string;
|
|
148
|
+
wire: string;
|
|
149
|
+
source: "json";
|
|
150
|
+
codec: Readonly<{
|
|
151
|
+
mode: "strict";
|
|
152
|
+
typeSymbol: "dsh-draw/types#EngineId";
|
|
153
|
+
schema: import("zod").ZodString;
|
|
154
|
+
}>;
|
|
155
|
+
}>[];
|
|
156
|
+
readonly result: Readonly<{
|
|
157
|
+
mode: "strict";
|
|
158
|
+
typeSymbol: "dsh-draw/types#CredentialActionResult";
|
|
159
|
+
schema: import("zod").ZodObject<{
|
|
160
|
+
engineId: import("zod").ZodString;
|
|
161
|
+
reference: import("zod").ZodString;
|
|
162
|
+
note: import("zod").ZodString;
|
|
163
|
+
}, import("zod/v4/core").$strip>;
|
|
164
|
+
}>;
|
|
165
|
+
readonly sourceLocation: Readonly<{
|
|
166
|
+
file: "src/wire.ts";
|
|
167
|
+
line: 1;
|
|
168
|
+
column: 1;
|
|
169
|
+
}>;
|
|
170
|
+
}> | Readonly<{
|
|
171
|
+
readonly id: 'dsh-draw#draw/regenerate';
|
|
172
|
+
readonly service: 'dsh-draw';
|
|
173
|
+
readonly namespace: 'draw';
|
|
174
|
+
readonly method: 'regenerate';
|
|
175
|
+
readonly invocation: Readonly<{
|
|
176
|
+
kind: "direct";
|
|
177
|
+
}>;
|
|
178
|
+
readonly parameters: readonly (Readonly<{
|
|
179
|
+
name: string;
|
|
180
|
+
wire: string;
|
|
181
|
+
source: "json";
|
|
182
|
+
codec: Readonly<{
|
|
183
|
+
mode: "strict";
|
|
184
|
+
typeSymbol: "dsh-draw/types#SessionId";
|
|
185
|
+
schema: import("zod").ZodString;
|
|
186
|
+
}>;
|
|
187
|
+
}> | Readonly<{
|
|
188
|
+
name: string;
|
|
189
|
+
wire: string;
|
|
190
|
+
source: "json";
|
|
191
|
+
codec: Readonly<{
|
|
192
|
+
mode: "strict";
|
|
193
|
+
typeSymbol: "dsh-draw/types#RegenerateArgs";
|
|
194
|
+
schema: import("zod").ZodObject<{
|
|
195
|
+
prompt: import("zod").ZodString;
|
|
196
|
+
size: import("zod").ZodOptional<import("zod").ZodString>;
|
|
197
|
+
count: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
198
|
+
quality: import("zod").ZodOptional<import("zod").ZodString>;
|
|
199
|
+
style: import("zod").ZodOptional<import("zod").ZodString>;
|
|
200
|
+
engine: import("zod").ZodOptional<import("zod").ZodString>;
|
|
201
|
+
}, import("zod/v4/core").$loose>;
|
|
202
|
+
}>;
|
|
203
|
+
}>)[];
|
|
204
|
+
readonly result: Readonly<{
|
|
205
|
+
mode: "strict";
|
|
206
|
+
typeSymbol: "dsh-draw/types#DrawRegenerateResult";
|
|
207
|
+
schema: import("zod").ZodObject<{
|
|
208
|
+
engine: import("zod").ZodString;
|
|
209
|
+
model: import("zod").ZodString;
|
|
210
|
+
size: import("zod").ZodString;
|
|
211
|
+
images: import("zod").ZodArray<import("zod").ZodObject<{
|
|
212
|
+
attachmentId: import("zod").ZodString;
|
|
213
|
+
mediaType: import("zod").ZodString;
|
|
214
|
+
bytes: import("zod").ZodNumber;
|
|
215
|
+
width: import("zod").ZodNumber;
|
|
216
|
+
height: import("zod").ZodNumber;
|
|
217
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
218
|
+
}, import("zod/v4/core").$strip>>;
|
|
219
|
+
quota: import("zod").ZodObject<{
|
|
220
|
+
generations: import("zod").ZodNumber;
|
|
221
|
+
bytes: import("zod").ZodNumber;
|
|
222
|
+
}, import("zod/v4/core").$strip>;
|
|
223
|
+
quotaLimits: import("zod").ZodObject<{
|
|
224
|
+
maxGenerations: import("zod").ZodNumber;
|
|
225
|
+
maxBytes: import("zod").ZodNumber;
|
|
226
|
+
}, import("zod/v4/core").$strip>;
|
|
227
|
+
fallbackUsed: import("zod").ZodBoolean;
|
|
228
|
+
elapsedMs: import("zod").ZodNumber;
|
|
229
|
+
attempts: import("zod").ZodArray<import("zod").ZodObject<{
|
|
230
|
+
engine: import("zod").ZodString;
|
|
231
|
+
phase: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"credential">, import("zod").ZodLiteral<"request">, import("zod").ZodLiteral<"parse">]>>;
|
|
232
|
+
code: import("zod").ZodString;
|
|
233
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
234
|
+
status: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
235
|
+
}, import("zod/v4/core").$strip>>;
|
|
236
|
+
}, import("zod/v4/core").$strip>;
|
|
237
|
+
}>;
|
|
238
|
+
readonly sourceLocation: Readonly<{
|
|
239
|
+
file: "src/wire.ts";
|
|
240
|
+
line: 1;
|
|
241
|
+
column: 1;
|
|
242
|
+
}>;
|
|
243
|
+
}>)[];
|
|
244
|
+
model: Readonly<{
|
|
245
|
+
services: readonly never[];
|
|
246
|
+
events: readonly never[];
|
|
247
|
+
objects: readonly never[];
|
|
248
|
+
}>;
|
|
249
|
+
}>;
|
|
250
|
+
//# sourceMappingURL=typert.host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typert.host.d.ts","sourceRoot":"","sources":["../../src/typert.host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,4EAA4E;AAC5E,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUjB,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hand-written Typert HOST manifest for `dsh-draw`, exported as `./typert`
|
|
3
|
+
* so the harness's typert-loader registers the `draw` status/probe/credential/
|
|
4
|
+
* regenerate invocations automatically when this plugin mounts. Same shape as
|
|
5
|
+
* a generator output (validated by the loader): package face, empty model and
|
|
6
|
+
* schemas, and the canonical invocation list shared with the client Remote
|
|
7
|
+
* contribution (`src/wire.ts`).
|
|
8
|
+
*
|
|
9
|
+
* @module dsh-draw/typert
|
|
10
|
+
*/
|
|
11
|
+
import { DRAW_INVOCATIONS } from './wire.js';
|
|
12
|
+
/** Host Typert manifest (validated by `@deepseek-ai/dsh-typert-loader`). */
|
|
13
|
+
export const TYPERT = Object.freeze({
|
|
14
|
+
package: 'dsh-draw',
|
|
15
|
+
face: 'host',
|
|
16
|
+
schemas: Object.freeze([]),
|
|
17
|
+
invocations: DRAW_INVOCATIONS,
|
|
18
|
+
model: Object.freeze({
|
|
19
|
+
services: Object.freeze([]),
|
|
20
|
+
events: Object.freeze([]),
|
|
21
|
+
objects: Object.freeze([]),
|
|
22
|
+
}),
|
|
23
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The plugin version, hardcoded beside `package.json` so the release script
|
|
3
|
+
* bumps both and `tests/version.spec.ts` trips when they drift. Served in the
|
|
4
|
+
* `draw/status` snapshot so the settings panel shows which plugin build runs.
|
|
5
|
+
*
|
|
6
|
+
* @module dsh-draw/version
|
|
7
|
+
*/
|
|
8
|
+
/** Plugin version; must equal the `version` field in `package.json`. */
|
|
9
|
+
export declare const PLUGIN_VERSION = "0.1.0";
|
|
10
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,wEAAwE;AACxE,eAAO,MAAM,cAAc,UAAU,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The plugin version, hardcoded beside `package.json` so the release script
|
|
3
|
+
* bumps both and `tests/version.spec.ts` trips when they drift. Served in the
|
|
4
|
+
* `draw/status` snapshot so the settings panel shows which plugin build runs.
|
|
5
|
+
*
|
|
6
|
+
* @module dsh-draw/version
|
|
7
|
+
*/
|
|
8
|
+
/** Plugin version; must equal the `version` field in `package.json`. */
|
|
9
|
+
export const PLUGIN_VERSION = '0.1.0';
|