sqs-dsh-better-input 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.
Files changed (40) hide show
  1. package/LICENSE +27 -0
  2. package/README.md +218 -0
  3. package/assets/banner.png +0 -0
  4. package/cordis.patch.yml +6 -0
  5. package/lib/about.d.ts +65 -0
  6. package/lib/client/MicrophoneButton.d.ts +64 -0
  7. package/lib/client/OptimizeButton.d.ts +33 -0
  8. package/lib/client/VoiceRecognitionBar.d.ts +14 -0
  9. package/lib/client/index.d.ts +14 -0
  10. package/lib/client/settings-controller.d.ts +80 -0
  11. package/lib/client/settings.d.ts +15 -0
  12. package/lib/client/strings.d.ts +113 -0
  13. package/lib/client/templates-controller.d.ts +45 -0
  14. package/lib/client/templates-section.d.ts +17 -0
  15. package/lib/client/templates-source.d.ts +16 -0
  16. package/lib/client/voice-session.d.ts +35 -0
  17. package/lib/client/web-speech.d.ts +35 -0
  18. package/lib/client.d.ts +1 -0
  19. package/lib/client.js +2925 -0
  20. package/lib/client.js.map +1 -0
  21. package/lib/config.d.ts +100 -0
  22. package/lib/identity-CzaR1Taa.js +18 -0
  23. package/lib/identity-CzaR1Taa.js.map +1 -0
  24. package/lib/identity.d.ts +24 -0
  25. package/lib/index.d.ts +11 -0
  26. package/lib/index.js +920 -0
  27. package/lib/index.js.map +1 -0
  28. package/lib/polish/prompts.d.ts +37 -0
  29. package/lib/polish/service.d.ts +45 -0
  30. package/lib/remote-contract.d.ts +166 -0
  31. package/lib/remote.d.ts +56 -0
  32. package/lib/remote.js +226 -0
  33. package/lib/remote.js.map +1 -0
  34. package/lib/settings/store.d.ts +41 -0
  35. package/lib/templates/model.d.ts +30 -0
  36. package/lib/templates/store.d.ts +27 -0
  37. package/lib/typert.d.ts +107 -0
  38. package/lib/typert.js +468 -0
  39. package/lib/typert.js.map +1 -0
  40. package/package.json +116 -0
package/lib/typert.js ADDED
@@ -0,0 +1,468 @@
1
+ import { n as PACKAGE_NAME } from "./identity-CzaR1Taa.js";
2
+ import { z } from "zod";
3
+ //#region src/remote-contract.ts
4
+ const textSchema = z.string();
5
+ z.boolean().optional();
6
+ const betterInputSettingsSchema = z.object({
7
+ language: z.string(),
8
+ maxRecordingSeconds: z.number(),
9
+ polishingEnabled: z.boolean(),
10
+ polishProvider: z.string(),
11
+ polishModel: z.string(),
12
+ polishReasoningEffort: z.string(),
13
+ polishPrompt: z.string(),
14
+ optimizeEnabled: z.boolean(),
15
+ optimizeProvider: z.string(),
16
+ optimizeModel: z.string(),
17
+ optimizeReasoningEffort: z.string(),
18
+ optimizePrompt: z.string(),
19
+ contextTurns: z.number()
20
+ });
21
+ const betterInputSettingsPatchSchema = z.object({
22
+ language: z.string().optional(),
23
+ maxRecordingSeconds: z.number().optional(),
24
+ polishingEnabled: z.boolean().optional(),
25
+ polishProvider: z.string().optional(),
26
+ polishModel: z.string().optional(),
27
+ polishReasoningEffort: z.string().optional(),
28
+ polishPrompt: z.string().optional(),
29
+ optimizeEnabled: z.boolean().optional(),
30
+ optimizeProvider: z.string().optional(),
31
+ optimizeModel: z.string().optional(),
32
+ optimizeReasoningEffort: z.string().optional(),
33
+ optimizePrompt: z.string().optional(),
34
+ contextTurns: z.number().optional()
35
+ });
36
+ const betterInputSettingsViewSchema = z.object({
37
+ available: z.boolean(),
38
+ writable: z.boolean(),
39
+ settings: betterInputSettingsSchema,
40
+ overridden: z.array(z.string()),
41
+ defaultPolishPrompt: z.string(),
42
+ defaultOptimizePrompt: z.string()
43
+ });
44
+ const reasoningEffortSchema = z.object({
45
+ id: z.string(),
46
+ name: z.string(),
47
+ description: z.string().optional()
48
+ });
49
+ const resolveModelEffortsResultSchema = z.object({
50
+ efforts: z.array(reasoningEffortSchema),
51
+ defaultEffort: z.string().optional()
52
+ });
53
+ const polishRouteSchema = z.object({
54
+ provider: z.string(),
55
+ providerName: z.string(),
56
+ model: z.string(),
57
+ modelName: z.string(),
58
+ reasoningEfforts: z.array(reasoningEffortSchema),
59
+ defaultReasoningEffort: z.string().optional()
60
+ });
61
+ const listRoutesResultSchema = z.array(polishRouteSchema);
62
+ const polishResultSchema = z.string();
63
+ const optimizeResultSchema = z.string();
64
+ const templateSchema = z.object({
65
+ id: z.string(),
66
+ name: z.string(),
67
+ description: z.string(),
68
+ content: z.string(),
69
+ tags: z.array(z.string()),
70
+ createdAt: z.number(),
71
+ updatedAt: z.number()
72
+ });
73
+ const templateInputSchema = z.object({
74
+ id: z.string().optional(),
75
+ name: z.string(),
76
+ description: z.string().optional(),
77
+ content: z.string(),
78
+ tags: z.array(z.string()).optional()
79
+ });
80
+ const templateListResultSchema = z.object({ templates: z.array(templateSchema) });
81
+ const templateSaveResultSchema = z.object({ template: templateSchema });
82
+ const templateRemoveResultSchema = z.object({ removed: z.boolean() });
83
+ const aboutInfoSchema = z.object({
84
+ repository: z.string(),
85
+ repositorySlug: z.string(),
86
+ version: z.string(),
87
+ license: z.string(),
88
+ updateCommand: z.string(),
89
+ updateCommandNpx: z.string()
90
+ });
91
+ const updateCheckResultSchema = z.object({
92
+ status: z.enum([
93
+ "up-to-date",
94
+ "update-available",
95
+ "unpublished",
96
+ "error"
97
+ ]),
98
+ installed: z.string(),
99
+ latest: z.string().nullable(),
100
+ updateCommand: z.string(),
101
+ updateCommandNpx: z.string()
102
+ });
103
+ //#endregion
104
+ //#region src/typert.ts
105
+ /**
106
+ * Materialize one strict codec for a schema.
107
+ *
108
+ * dsh 0.1.7 tightened the Typert boundary: a `mode: 'strict'` codec must carry
109
+ * a lazy `create()` factory returning a runtime schema with a `parse()` method
110
+ * (see `TypertCodec` in `@deepseek-ai/dsh-typert-protocol`). Earlier dsh
111
+ * carried the schema directly on a `schema` property; 0.1.7 rejects that with
112
+ * "strict codec has no create() factory" and the whole entry then fails to
113
+ * activate, so the plugin never mounts.
114
+ *
115
+ * Zod schemas already satisfy the `TypertSchema` contract (`parse(value)`), so
116
+ * only deferral is needed. Memoized because the registry may call `create()`
117
+ * more than once.
118
+ */
119
+ function codec(typeSymbol, schema) {
120
+ let materialized;
121
+ return {
122
+ mode: "strict",
123
+ typeSymbol,
124
+ create: () => {
125
+ materialized ??= schema;
126
+ return materialized;
127
+ }
128
+ };
129
+ }
130
+ /** Type symbol for one of this plugin's own wire types. */
131
+ const symbol = (name) => `${PACKAGE_NAME}#${name}`;
132
+ /**
133
+ * The Host-side Typert manifest. It must mirror `TYPERT_REMOTE` (the client
134
+ * face) method-for-method; a mismatch is rejected at the boundary.
135
+ */
136
+ const TYPERT = {
137
+ package: PACKAGE_NAME,
138
+ face: "host",
139
+ schemas: [],
140
+ invocations: [
141
+ {
142
+ id: `${PACKAGE_NAME}#betterInput/getSettings`,
143
+ service: "BetterInputPolish",
144
+ namespace: "betterInput",
145
+ method: "getSettings",
146
+ invocation: { kind: "direct" },
147
+ parameters: [],
148
+ result: codec(symbol("BetterInputSettingsView"), betterInputSettingsViewSchema)
149
+ },
150
+ {
151
+ id: `${PACKAGE_NAME}#betterInput/updateSettings`,
152
+ service: "BetterInputPolish",
153
+ namespace: "betterInput",
154
+ method: "updateSettings",
155
+ invocation: { kind: "direct" },
156
+ parameters: [{
157
+ name: "patch",
158
+ wire: "patch",
159
+ source: "json",
160
+ codec: codec(symbol("BetterInputSettingsPatch"), betterInputSettingsPatchSchema)
161
+ }],
162
+ cancellation: { parameter: "signal" },
163
+ result: codec(symbol("BetterInputSettingsView"), betterInputSettingsViewSchema)
164
+ },
165
+ {
166
+ id: `${PACKAGE_NAME}#betterInput/listRoutes`,
167
+ service: "BetterInputPolish",
168
+ namespace: "betterInput",
169
+ method: "listRoutes",
170
+ invocation: { kind: "direct" },
171
+ parameters: [],
172
+ result: codec(symbol("PolishRoute[]"), listRoutesResultSchema)
173
+ },
174
+ {
175
+ id: `${PACKAGE_NAME}#betterInput/resolveModelEfforts`,
176
+ service: "BetterInputPolish",
177
+ namespace: "betterInput",
178
+ method: "resolveModelEfforts",
179
+ invocation: { kind: "direct" },
180
+ parameters: [{
181
+ name: "provider",
182
+ wire: "provider",
183
+ source: "json",
184
+ codec: codec("string", textSchema)
185
+ }, {
186
+ name: "model",
187
+ wire: "model",
188
+ source: "json",
189
+ codec: codec("string", textSchema)
190
+ }],
191
+ result: codec(symbol("ResolveModelEffortsResult"), resolveModelEffortsResultSchema)
192
+ },
193
+ {
194
+ id: `${PACKAGE_NAME}#betterInput/getAbout`,
195
+ service: "BetterInputPolish",
196
+ namespace: "betterInput",
197
+ method: "getAbout",
198
+ invocation: { kind: "direct" },
199
+ parameters: [],
200
+ result: codec(symbol("AboutInfo"), aboutInfoSchema)
201
+ },
202
+ {
203
+ id: `${PACKAGE_NAME}#betterInput/checkForUpdate`,
204
+ service: "BetterInputPolish",
205
+ namespace: "betterInput",
206
+ method: "checkForUpdate",
207
+ invocation: { kind: "direct" },
208
+ parameters: [],
209
+ cancellation: { parameter: "signal" },
210
+ result: codec(symbol("UpdateCheckResult"), updateCheckResultSchema)
211
+ },
212
+ {
213
+ id: `${PACKAGE_NAME}#betterInput/polish`,
214
+ service: "BetterInputPolish",
215
+ namespace: "betterInput",
216
+ method: "polish",
217
+ invocation: { kind: "direct" },
218
+ parameters: [
219
+ {
220
+ name: "transcript",
221
+ wire: "transcript",
222
+ source: "json",
223
+ codec: codec("string", textSchema)
224
+ },
225
+ {
226
+ name: "provider",
227
+ wire: "provider",
228
+ source: "json",
229
+ codec: codec("string", textSchema)
230
+ },
231
+ {
232
+ name: "model",
233
+ wire: "model",
234
+ source: "json",
235
+ codec: codec("string", textSchema)
236
+ }
237
+ ],
238
+ cancellation: { parameter: "signal" },
239
+ result: codec("string", polishResultSchema)
240
+ },
241
+ {
242
+ id: `${PACKAGE_NAME}#betterInput/optimize`,
243
+ service: "BetterInputPolish",
244
+ namespace: "betterInput",
245
+ method: "optimize",
246
+ invocation: { kind: "direct" },
247
+ parameters: [
248
+ {
249
+ name: "text",
250
+ wire: "text",
251
+ source: "json",
252
+ codec: codec("string", textSchema)
253
+ },
254
+ {
255
+ name: "provider",
256
+ wire: "provider",
257
+ source: "json",
258
+ codec: codec("string", textSchema)
259
+ },
260
+ {
261
+ name: "model",
262
+ wire: "model",
263
+ source: "json",
264
+ codec: codec("string", textSchema)
265
+ },
266
+ {
267
+ name: "context",
268
+ wire: "context",
269
+ source: "json",
270
+ codec: codec("string", textSchema)
271
+ }
272
+ ],
273
+ cancellation: { parameter: "signal" },
274
+ result: codec("string", optimizeResultSchema)
275
+ },
276
+ {
277
+ id: `${PACKAGE_NAME}#betterInput/templatesList`,
278
+ service: "BetterInputPolish",
279
+ namespace: "betterInput",
280
+ method: "templatesList",
281
+ invocation: { kind: "direct" },
282
+ parameters: [],
283
+ result: codec(symbol("TemplateList"), templateListResultSchema)
284
+ },
285
+ {
286
+ id: `${PACKAGE_NAME}#betterInput/templatesSave`,
287
+ service: "BetterInputPolish",
288
+ namespace: "betterInput",
289
+ method: "templatesSave",
290
+ invocation: { kind: "direct" },
291
+ parameters: [{
292
+ name: "template",
293
+ wire: "template",
294
+ source: "json",
295
+ codec: codec(symbol("TemplateInput"), templateInputSchema)
296
+ }],
297
+ cancellation: { parameter: "signal" },
298
+ result: codec(symbol("TemplateSaveResult"), templateSaveResultSchema)
299
+ },
300
+ {
301
+ id: `${PACKAGE_NAME}#betterInput/templatesRemove`,
302
+ service: "BetterInputPolish",
303
+ namespace: "betterInput",
304
+ method: "templatesRemove",
305
+ invocation: { kind: "direct" },
306
+ parameters: [{
307
+ name: "id",
308
+ wire: "id",
309
+ source: "json",
310
+ codec: codec("string", textSchema)
311
+ }],
312
+ cancellation: { parameter: "signal" },
313
+ result: codec(symbol("TemplateRemoveResult"), templateRemoveResultSchema)
314
+ }
315
+ ],
316
+ /**
317
+ * The typed-registry model block.
318
+ *
319
+ * This is REQUIRED by dsh 0.1.7's typert loader, not optional metadata:
320
+ * `validateTypertManifest` reads `manifest.model` and demands an object whose
321
+ * `services` / `events` / `objects` are arrays (see `dsh-typert-loader/lib/index.js`
322
+ * :89-92, and `requireObject` at :119-122). A missing `model` fails the whole
323
+ * entry with "typert-loader: <pkg> TYPERT.model must be an object", the entry
324
+ * never activates, and the browser web boot then refuses to render the UI.
325
+ *
326
+ * Removing the file-input / OCR feature dropped this block by accident in
327
+ * 0.1.0-0.1.2 (`convertFile` and `ConvertFileResult` were the only intended
328
+ * deletions). Keep `model` in sync with `invocations` above and with the
329
+ * service surface in `polish/service.ts`.
330
+ */
331
+ model: {
332
+ services: [{
333
+ description: "Host-side dsh route discovery and transcript polishing.",
334
+ summary: "Voice transcript polishing service.",
335
+ tags: [],
336
+ jsDoc: "/** Host-side dsh route discovery and transcript polishing. */",
337
+ key: "BetterInputPolish",
338
+ exportName: "BetterInputPolishService",
339
+ members: [
340
+ {
341
+ kind: "method",
342
+ name: "getSettings",
343
+ signature: "getSettings(): BetterInputSettingsView",
344
+ summary: "Read the current plugin settings.",
345
+ jsDoc: "/** Read the current plugin settings. */"
346
+ },
347
+ {
348
+ kind: "method",
349
+ name: "updateSettings",
350
+ signature: "updateSettings(patch: BetterInputSettingsPatch, signal: AbortSignal): Promise<BetterInputSettingsView>",
351
+ summary: "Update plugin settings when the request has not been cancelled.",
352
+ jsDoc: "/** Update plugin settings when the request has not been cancelled. */"
353
+ },
354
+ {
355
+ kind: "method",
356
+ name: "listRoutes",
357
+ signature: "listRoutes(): Promise<PolishRoute[]>",
358
+ summary: "List models already registered in dsh.",
359
+ jsDoc: "/** List models already registered in dsh. */"
360
+ },
361
+ {
362
+ kind: "method",
363
+ name: "resolveModelEfforts",
364
+ signature: "resolveModelEfforts(provider: string, model: string): Promise<{ efforts: readonly ReasoningEffortInfo[]; defaultEffort?: string }>",
365
+ summary: "Resolve reasoning-effort tiers for one route (lazy).",
366
+ jsDoc: "/** Resolve reasoning-effort tiers for one route (lazy). */"
367
+ },
368
+ {
369
+ kind: "method",
370
+ name: "getAbout",
371
+ signature: "getAbout(): AboutInfo",
372
+ summary: "Read the installed plugin identity and repository info.",
373
+ jsDoc: "/** Read the installed plugin identity and repository info. */"
374
+ },
375
+ {
376
+ kind: "method",
377
+ name: "checkForUpdate",
378
+ signature: "checkForUpdate(signal: AbortSignal): Promise<UpdateCheckResult>",
379
+ summary: "Check the npm registry for the latest published version.",
380
+ jsDoc: "/** Check the npm registry for the latest published version. */"
381
+ },
382
+ {
383
+ kind: "method",
384
+ name: "polish",
385
+ signature: "polish(transcript: string, provider: string, model: string, signal: AbortSignal): Promise<string>",
386
+ summary: "Polish one transcript through a selected dsh route.",
387
+ jsDoc: "/** Polish one transcript through a selected dsh route. */"
388
+ },
389
+ {
390
+ kind: "method",
391
+ name: "optimize",
392
+ signature: "optimize(text: string, provider: string, model: string, context: string, signal: AbortSignal): Promise<string>",
393
+ summary: "Optimize one prompt through a selected dsh route.",
394
+ jsDoc: "/** Optimize one prompt through a selected dsh route. */"
395
+ },
396
+ {
397
+ kind: "method",
398
+ name: "templatesList",
399
+ signature: "templatesList(): Promise<TemplateListResult>",
400
+ summary: "List all saved prompt templates, newest first.",
401
+ jsDoc: "/** List all saved prompt templates, newest first. */"
402
+ },
403
+ {
404
+ kind: "method",
405
+ name: "templatesSave",
406
+ signature: "templatesSave(template: TemplateInput, signal: AbortSignal): Promise<TemplateSaveResult>",
407
+ summary: "Create or update one prompt template on the Host filesystem.",
408
+ jsDoc: "/** Create or update one prompt template on the Host filesystem. */"
409
+ },
410
+ {
411
+ kind: "method",
412
+ name: "templatesRemove",
413
+ signature: "templatesRemove(id: string, signal: AbortSignal): Promise<TemplateRemoveResult>",
414
+ summary: "Remove one prompt template by id.",
415
+ jsDoc: "/** Remove one prompt template by id. */"
416
+ }
417
+ ],
418
+ types: [
419
+ {
420
+ name: "BetterInputSettingsView",
421
+ declaration: "export interface BetterInputSettingsView { available: boolean; writable: boolean; settings: BetterInputSettings; overridden: string[] }"
422
+ },
423
+ {
424
+ name: "BetterInputSettingsPatch",
425
+ declaration: "export type BetterInputSettingsPatch = Partial<BetterInputSettings>"
426
+ },
427
+ {
428
+ name: "PolishRoute",
429
+ declaration: "export interface ReasoningEffortInfo { id: string; name: string; description?: string } export interface PolishRoute { provider: string; providerName: string; model: string; modelName: string; reasoningEfforts: readonly ReasoningEffortInfo[]; defaultReasoningEffort?: string }"
430
+ },
431
+ {
432
+ name: "AboutInfo",
433
+ declaration: "export interface AboutInfo { repository: string; repositorySlug: string; version: string; license: string; updateCommand: string; updateCommandNpx: string }"
434
+ },
435
+ {
436
+ name: "UpdateCheckResult",
437
+ declaration: "export type UpdateCheckResult = { status: 'up-to-date' | 'update-available' | 'unpublished' | 'error'; installed: string; latest: string | null; updateCommand: string; updateCommandNpx: string }"
438
+ },
439
+ {
440
+ name: "BetterInputTemplate",
441
+ declaration: "export interface BetterInputTemplate { id: string; name: string; description: string; content: string; tags: readonly string[]; createdAt: number; updatedAt: number }"
442
+ },
443
+ {
444
+ name: "TemplateInput",
445
+ declaration: "export interface TemplateInput { id?: string; name: string; description?: string; content: string; tags?: readonly string[] }"
446
+ },
447
+ {
448
+ name: "TemplateListResult",
449
+ declaration: "export interface TemplateListResult { templates: readonly BetterInputTemplate[] }"
450
+ },
451
+ {
452
+ name: "TemplateSaveResult",
453
+ declaration: "export interface TemplateSaveResult { template: BetterInputTemplate }"
454
+ },
455
+ {
456
+ name: "TemplateRemoveResult",
457
+ declaration: "export interface TemplateRemoveResult { removed: boolean }"
458
+ }
459
+ ]
460
+ }],
461
+ events: [],
462
+ objects: []
463
+ }
464
+ };
465
+ //#endregion
466
+ export { TYPERT, TYPERT as default };
467
+
468
+ //# sourceMappingURL=typert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typert.js","names":[],"sources":["../src/remote-contract.ts","../src/typert.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { BetterInputSettings, BetterInputSettingsPatch, BetterInputSettingsView, PolishRoute } from './config.js'\n\nexport const textSchema = z.string()\n\nexport const booleanSchema = z.boolean().optional()\n\nexport const betterInputSettingsSchema = z.object({\n language: z.string(),\n maxRecordingSeconds: z.number(),\n polishingEnabled: z.boolean(),\n polishProvider: z.string(),\n polishModel: z.string(),\n polishReasoningEffort: z.string(),\n polishPrompt: z.string(),\n optimizeEnabled: z.boolean(),\n optimizeProvider: z.string(),\n optimizeModel: z.string(),\n optimizeReasoningEffort: z.string(),\n optimizePrompt: z.string(),\n contextTurns: z.number()\n})\n\nexport const betterInputSettingsPatchSchema = z.object({\n language: z.string().optional(),\n maxRecordingSeconds: z.number().optional(),\n polishingEnabled: z.boolean().optional(),\n polishProvider: z.string().optional(),\n polishModel: z.string().optional(),\n polishReasoningEffort: z.string().optional(),\n polishPrompt: z.string().optional(),\n optimizeEnabled: z.boolean().optional(),\n optimizeProvider: z.string().optional(),\n optimizeModel: z.string().optional(),\n optimizeReasoningEffort: z.string().optional(),\n optimizePrompt: z.string().optional(),\n contextTurns: z.number().optional()\n})\n\nexport const betterInputSettingsViewSchema = z.object({\n available: z.boolean(),\n writable: z.boolean(),\n settings: betterInputSettingsSchema,\n overridden: z.array(z.string()),\n defaultPolishPrompt: z.string(),\n defaultOptimizePrompt: z.string()\n})\n\nexport const reasoningEffortSchema = z.object({\n id: z.string(),\n name: z.string(),\n description: z.string().optional()\n})\n\nexport const resolveModelEffortsResultSchema = z.object({\n efforts: z.array(reasoningEffortSchema),\n defaultEffort: z.string().optional()\n})\n\nexport const polishRouteSchema = z.object({\n provider: z.string(),\n providerName: z.string(),\n model: z.string(),\n modelName: z.string(),\n reasoningEfforts: z.array(reasoningEffortSchema),\n defaultReasoningEffort: z.string().optional()\n})\n\nexport const listRoutesResultSchema = z.array(polishRouteSchema)\n\nexport const polishResultSchema = z.string()\n\nexport const optimizeResultSchema = z.string()\n\nexport const templateSchema = z.object({\n id: z.string(),\n name: z.string(),\n description: z.string(),\n content: z.string(),\n tags: z.array(z.string()),\n createdAt: z.number(),\n updatedAt: z.number()\n})\n\nexport const templateInputSchema = z.object({\n id: z.string().optional(),\n name: z.string(),\n description: z.string().optional(),\n content: z.string(),\n tags: z.array(z.string()).optional()\n})\n\nexport const templateListResultSchema = z.object({\n templates: z.array(templateSchema)\n})\n\nexport const templateSaveResultSchema = z.object({\n template: templateSchema\n})\n\nexport const templateRemoveResultSchema = z.object({\n removed: z.boolean()\n})\n\nexport const aboutInfoSchema = z.object({\n repository: z.string(),\n repositorySlug: z.string(),\n version: z.string(),\n license: z.string(),\n updateCommand: z.string(),\n updateCommandNpx: z.string()\n})\n\nexport const updateCheckResultSchema = z.object({\n status: z.enum(['up-to-date', 'update-available', 'unpublished', 'error']),\n installed: z.string(),\n latest: z.string().nullable(),\n updateCommand: z.string(),\n updateCommandNpx: z.string()\n})\n\nexport type AboutInfoWire = z.infer<typeof aboutInfoSchema>\nexport type UpdateCheckResultWire = z.infer<typeof updateCheckResultSchema>\nexport type TemplateWire = z.infer<typeof templateSchema>\nexport type TemplateInputWire = z.infer<typeof templateInputSchema>\n\nexport type BetterInputSettingsWire = z.infer<typeof betterInputSettingsSchema>\nexport type BetterInputSettingsPatchWire = z.infer<typeof betterInputSettingsPatchSchema>\nexport type BetterInputSettingsViewWire = z.infer<typeof betterInputSettingsViewSchema>\nexport type PolishRouteWire = z.infer<typeof polishRouteSchema>\nexport type ReasoningEffortWire = z.infer<typeof reasoningEffortSchema>\nexport type ResolveModelEffortsResultWire = z.infer<typeof resolveModelEffortsResultSchema>\nexport type { BetterInputSettings, BetterInputSettingsPatch, BetterInputSettingsView, PolishRoute, ReasoningEffortInfo } from './config.js'\n","import { aboutInfoSchema, betterInputSettingsPatchSchema, betterInputSettingsViewSchema, listRoutesResultSchema, optimizeResultSchema, polishResultSchema, resolveModelEffortsResultSchema, templateInputSchema, templateListResultSchema, templateRemoveResultSchema, templateSaveResultSchema, textSchema, updateCheckResultSchema } from './remote-contract.js'\nimport { PACKAGE_NAME } from './identity.js'\n\n/**\n * Materialize one strict codec for a schema.\n *\n * dsh 0.1.7 tightened the Typert boundary: a `mode: 'strict'` codec must carry\n * a lazy `create()` factory returning a runtime schema with a `parse()` method\n * (see `TypertCodec` in `@deepseek-ai/dsh-typert-protocol`). Earlier dsh\n * carried the schema directly on a `schema` property; 0.1.7 rejects that with\n * \"strict codec has no create() factory\" and the whole entry then fails to\n * activate, so the plugin never mounts.\n *\n * Zod schemas already satisfy the `TypertSchema` contract (`parse(value)`), so\n * only deferral is needed. Memoized because the registry may call `create()`\n * more than once.\n */\nfunction codec(typeSymbol: string, schema: unknown) {\n let materialized: unknown\n return {\n mode: 'strict' as const,\n typeSymbol,\n create: () => {\n materialized ??= schema\n return materialized as { parse(value: unknown): unknown }\n }\n }\n}\n\n/** Type symbol for one of this plugin's own wire types. */\nconst symbol = (name: string): string => `${PACKAGE_NAME}#${name}`\n\n/**\n * The Host-side Typert manifest. It must mirror `TYPERT_REMOTE` (the client\n * face) method-for-method; a mismatch is rejected at the boundary.\n */\nexport const TYPERT = {\n package: PACKAGE_NAME,\n face: 'host',\n schemas: [],\n invocations: [\n {\n id: `${PACKAGE_NAME}#betterInput/getSettings`,\n service: 'BetterInputPolish',\n namespace: 'betterInput',\n method: 'getSettings',\n invocation: { kind: 'direct' },\n parameters: [],\n result: codec(symbol('BetterInputSettingsView'), betterInputSettingsViewSchema)\n },\n {\n id: `${PACKAGE_NAME}#betterInput/updateSettings`,\n service: 'BetterInputPolish',\n namespace: 'betterInput',\n method: 'updateSettings',\n invocation: { kind: 'direct' },\n parameters: [{\n name: 'patch',\n wire: 'patch',\n source: 'json',\n codec: codec(symbol('BetterInputSettingsPatch'), betterInputSettingsPatchSchema)\n }],\n cancellation: { parameter: 'signal' },\n result: codec(symbol('BetterInputSettingsView'), betterInputSettingsViewSchema)\n },\n {\n id: `${PACKAGE_NAME}#betterInput/listRoutes`,\n service: 'BetterInputPolish',\n namespace: 'betterInput',\n method: 'listRoutes',\n invocation: { kind: 'direct' },\n parameters: [],\n result: codec(symbol('PolishRoute[]'), listRoutesResultSchema)\n },\n {\n id: `${PACKAGE_NAME}#betterInput/resolveModelEfforts`,\n service: 'BetterInputPolish',\n namespace: 'betterInput',\n method: 'resolveModelEfforts',\n invocation: { kind: 'direct' },\n parameters: [\n { name: 'provider', wire: 'provider', source: 'json', codec: codec('string', textSchema) },\n { name: 'model', wire: 'model', source: 'json', codec: codec('string', textSchema) }\n ],\n result: codec(symbol('ResolveModelEffortsResult'), resolveModelEffortsResultSchema)\n },\n {\n id: `${PACKAGE_NAME}#betterInput/getAbout`,\n service: 'BetterInputPolish',\n namespace: 'betterInput',\n method: 'getAbout',\n invocation: { kind: 'direct' },\n parameters: [],\n result: codec(symbol('AboutInfo'), aboutInfoSchema)\n },\n {\n id: `${PACKAGE_NAME}#betterInput/checkForUpdate`,\n service: 'BetterInputPolish',\n namespace: 'betterInput',\n method: 'checkForUpdate',\n invocation: { kind: 'direct' },\n parameters: [],\n cancellation: { parameter: 'signal' },\n result: codec(symbol('UpdateCheckResult'), updateCheckResultSchema)\n },\n {\n id: `${PACKAGE_NAME}#betterInput/polish`,\n service: 'BetterInputPolish',\n namespace: 'betterInput',\n method: 'polish',\n invocation: { kind: 'direct' },\n parameters: [\n { name: 'transcript', wire: 'transcript', source: 'json', codec: codec('string', textSchema) },\n { name: 'provider', wire: 'provider', source: 'json', codec: codec('string', textSchema) },\n { name: 'model', wire: 'model', source: 'json', codec: codec('string', textSchema) }\n ],\n cancellation: { parameter: 'signal' },\n result: codec('string', polishResultSchema)\n },\n {\n id: `${PACKAGE_NAME}#betterInput/optimize`,\n service: 'BetterInputPolish',\n namespace: 'betterInput',\n method: 'optimize',\n invocation: { kind: 'direct' },\n parameters: [\n { name: 'text', wire: 'text', source: 'json', codec: codec('string', textSchema) },\n { name: 'provider', wire: 'provider', source: 'json', codec: codec('string', textSchema) },\n { name: 'model', wire: 'model', source: 'json', codec: codec('string', textSchema) },\n { name: 'context', wire: 'context', source: 'json', codec: codec('string', textSchema) }\n ],\n cancellation: { parameter: 'signal' },\n result: codec('string', optimizeResultSchema)\n },\n {\n id: `${PACKAGE_NAME}#betterInput/templatesList`,\n service: 'BetterInputPolish',\n namespace: 'betterInput',\n method: 'templatesList',\n invocation: { kind: 'direct' },\n parameters: [],\n result: codec(symbol('TemplateList'), templateListResultSchema)\n },\n {\n id: `${PACKAGE_NAME}#betterInput/templatesSave`,\n service: 'BetterInputPolish',\n namespace: 'betterInput',\n method: 'templatesSave',\n invocation: { kind: 'direct' },\n parameters: [{\n name: 'template',\n wire: 'template',\n source: 'json',\n codec: codec(symbol('TemplateInput'), templateInputSchema)\n }],\n cancellation: { parameter: 'signal' },\n result: codec(symbol('TemplateSaveResult'), templateSaveResultSchema)\n },\n {\n id: `${PACKAGE_NAME}#betterInput/templatesRemove`,\n service: 'BetterInputPolish',\n namespace: 'betterInput',\n method: 'templatesRemove',\n invocation: { kind: 'direct' },\n parameters: [{ name: 'id', wire: 'id', source: 'json', codec: codec('string', textSchema) }],\n cancellation: { parameter: 'signal' },\n result: codec(symbol('TemplateRemoveResult'), templateRemoveResultSchema)\n }\n ],\n /**\n * The typed-registry model block.\n *\n * This is REQUIRED by dsh 0.1.7's typert loader, not optional metadata:\n * `validateTypertManifest` reads `manifest.model` and demands an object whose\n * `services` / `events` / `objects` are arrays (see `dsh-typert-loader/lib/index.js`\n * :89-92, and `requireObject` at :119-122). A missing `model` fails the whole\n * entry with \"typert-loader: <pkg> TYPERT.model must be an object\", the entry\n * never activates, and the browser web boot then refuses to render the UI.\n *\n * Removing the file-input / OCR feature dropped this block by accident in\n * 0.1.0-0.1.2 (`convertFile` and `ConvertFileResult` were the only intended\n * deletions). Keep `model` in sync with `invocations` above and with the\n * service surface in `polish/service.ts`.\n */\n model: {\n services: [{\n description: 'Host-side dsh route discovery and transcript polishing.',\n summary: 'Voice transcript polishing service.',\n tags: [],\n jsDoc: '/** Host-side dsh route discovery and transcript polishing. */',\n key: 'BetterInputPolish',\n exportName: 'BetterInputPolishService',\n members: [\n { kind: 'method', name: 'getSettings', signature: 'getSettings(): BetterInputSettingsView', summary: 'Read the current plugin settings.', jsDoc: '/** Read the current plugin settings. */' },\n { kind: 'method', name: 'updateSettings', signature: 'updateSettings(patch: BetterInputSettingsPatch, signal: AbortSignal): Promise<BetterInputSettingsView>', summary: 'Update plugin settings when the request has not been cancelled.', jsDoc: '/** Update plugin settings when the request has not been cancelled. */' },\n { kind: 'method', name: 'listRoutes', signature: 'listRoutes(): Promise<PolishRoute[]>', summary: 'List models already registered in dsh.', jsDoc: '/** List models already registered in dsh. */' },\n { kind: 'method', name: 'resolveModelEfforts', signature: 'resolveModelEfforts(provider: string, model: string): Promise<{ efforts: readonly ReasoningEffortInfo[]; defaultEffort?: string }>', summary: 'Resolve reasoning-effort tiers for one route (lazy).', jsDoc: '/** Resolve reasoning-effort tiers for one route (lazy). */' },\n { kind: 'method', name: 'getAbout', signature: 'getAbout(): AboutInfo', summary: 'Read the installed plugin identity and repository info.', jsDoc: '/** Read the installed plugin identity and repository info. */' },\n { kind: 'method', name: 'checkForUpdate', signature: 'checkForUpdate(signal: AbortSignal): Promise<UpdateCheckResult>', summary: 'Check the npm registry for the latest published version.', jsDoc: '/** Check the npm registry for the latest published version. */' },\n { kind: 'method', name: 'polish', signature: 'polish(transcript: string, provider: string, model: string, signal: AbortSignal): Promise<string>', summary: 'Polish one transcript through a selected dsh route.', jsDoc: '/** Polish one transcript through a selected dsh route. */' },\n { kind: 'method', name: 'optimize', signature: 'optimize(text: string, provider: string, model: string, context: string, signal: AbortSignal): Promise<string>', summary: 'Optimize one prompt through a selected dsh route.', jsDoc: '/** Optimize one prompt through a selected dsh route. */' },\n { kind: 'method', name: 'templatesList', signature: 'templatesList(): Promise<TemplateListResult>', summary: 'List all saved prompt templates, newest first.', jsDoc: '/** List all saved prompt templates, newest first. */' },\n { kind: 'method', name: 'templatesSave', signature: 'templatesSave(template: TemplateInput, signal: AbortSignal): Promise<TemplateSaveResult>', summary: 'Create or update one prompt template on the Host filesystem.', jsDoc: '/** Create or update one prompt template on the Host filesystem. */' },\n { kind: 'method', name: 'templatesRemove', signature: 'templatesRemove(id: string, signal: AbortSignal): Promise<TemplateRemoveResult>', summary: 'Remove one prompt template by id.', jsDoc: '/** Remove one prompt template by id. */' }\n ],\n types: [\n { name: 'BetterInputSettingsView', declaration: 'export interface BetterInputSettingsView { available: boolean; writable: boolean; settings: BetterInputSettings; overridden: string[] }' },\n { name: 'BetterInputSettingsPatch', declaration: 'export type BetterInputSettingsPatch = Partial<BetterInputSettings>' },\n { name: 'PolishRoute', declaration: 'export interface ReasoningEffortInfo { id: string; name: string; description?: string } export interface PolishRoute { provider: string; providerName: string; model: string; modelName: string; reasoningEfforts: readonly ReasoningEffortInfo[]; defaultReasoningEffort?: string }' },\n { name: 'AboutInfo', declaration: 'export interface AboutInfo { repository: string; repositorySlug: string; version: string; license: string; updateCommand: string; updateCommandNpx: string }' },\n { name: 'UpdateCheckResult', declaration: \"export type UpdateCheckResult = { status: 'up-to-date' | 'update-available' | 'unpublished' | 'error'; installed: string; latest: string | null; updateCommand: string; updateCommandNpx: string }\" },\n { name: 'BetterInputTemplate', declaration: 'export interface BetterInputTemplate { id: string; name: string; description: string; content: string; tags: readonly string[]; createdAt: number; updatedAt: number }' },\n { name: 'TemplateInput', declaration: 'export interface TemplateInput { id?: string; name: string; description?: string; content: string; tags?: readonly string[] }' },\n { name: 'TemplateListResult', declaration: 'export interface TemplateListResult { templates: readonly BetterInputTemplate[] }' },\n { name: 'TemplateSaveResult', declaration: 'export interface TemplateSaveResult { template: BetterInputTemplate }' },\n { name: 'TemplateRemoveResult', declaration: 'export interface TemplateRemoveResult { removed: boolean }' }\n ]\n }],\n events: [],\n objects: []\n }\n}\n\nexport default TYPERT\n"],"mappings":";;;AAGA,MAAa,aAAa,EAAE,OAAO;AAEN,EAAE,QAAQ,CAAC,CAAC,SAAS;AAElD,MAAa,4BAA4B,EAAE,OAAO;CAChD,UAAU,EAAE,OAAO;CACnB,qBAAqB,EAAE,OAAO;CAC9B,kBAAkB,EAAE,QAAQ;CAC5B,gBAAgB,EAAE,OAAO;CACzB,aAAa,EAAE,OAAO;CACtB,uBAAuB,EAAE,OAAO;CAChC,cAAc,EAAE,OAAO;CACvB,i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experience for DeepSeek Harness: voice input with AI polishing, prompt optimization, and a local prompt template library",
5
+ "license": "MIT",
6
+ "author": "sanqianshuang",
7
+ "homepage": "https://github.com/sanqianshuang/sqs-dsh-better-input#readme",
8
+ "bugs": {
9
+ "url": "https://github.com/sanqianshuang/sqs-dsh-better-input/issues"
10
+ },
11
+ "keywords": [
12
+ "dsh",
13
+ "deepseek-harness",
14
+ "voice",
15
+ "speech-to-text",
16
+ "input",
17
+ "better-input"
18
+ ],
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/sanqianshuang/sqs-dsh-better-input.git"
25
+ },
26
+ "type": "module",
27
+ "main": "lib/index.js",
28
+ "types": "lib/index.d.ts",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./lib/index.d.ts",
32
+ "default": "./lib/index.js"
33
+ },
34
+ "./client": {
35
+ "types": "./lib/client.d.ts",
36
+ "default": "./lib/client.js"
37
+ },
38
+ "./typert": {
39
+ "types": "./lib/typert.d.ts",
40
+ "default": "./lib/typert.js"
41
+ },
42
+ "./remote": {
43
+ "types": "./lib/remote.d.ts",
44
+ "default": "./lib/remote.js"
45
+ },
46
+ "./package.json": "./package.json"
47
+ },
48
+ "files": [
49
+ "lib",
50
+ "cordis.patch.yml",
51
+ "assets",
52
+ "README.md",
53
+ "LICENSE"
54
+ ],
55
+ "dsh": {
56
+ "bundle": {
57
+ "patch": "./cordis.patch.yml"
58
+ },
59
+ "client": {
60
+ "platform": "web",
61
+ "inject": [
62
+ "@deepseek-ai/dsh-client-ui-conversation",
63
+ "@deepseek-ai/dsh-client-ui-chat",
64
+ "@deepseek-ai/dsh-client-ui-slots"
65
+ ]
66
+ }
67
+ },
68
+ "scripts": {
69
+ "build": "tsdown && tsc -p tsconfig.build.json",
70
+ "check": "tsc --noEmit -p tsconfig.json",
71
+ "check:bundle": "node scripts/check-client-bundle.mjs",
72
+ "check:typert": "node scripts/verify-typert-manifest.mjs",
73
+ "verify": "npm run build && npm run check:bundle && npm run check:typert",
74
+ "dev:watch": "tsdown --watch",
75
+ "prepack": "npm run build"
76
+ },
77
+ "peerDependencies": {
78
+ "@deepseek-ai/cordis": "~4.0.4",
79
+ "@deepseek-ai/dsh-api-remotes": ">=0.1.7-rc.2 <0.2.0-0",
80
+ "@deepseek-ai/dsh-client-locale": ">=0.1.7-rc.2 <0.2.0-0",
81
+ "@deepseek-ai/dsh-client-store": ">=0.1.7-rc.2 <0.2.0-0",
82
+ "@deepseek-ai/dsh-client-ui-chat": ">=0.1.7-rc.2 <0.2.0-0",
83
+ "@deepseek-ai/dsh-client-ui-conversation": ">=0.1.7-rc.2 <0.2.0-0",
84
+ "@deepseek-ai/dsh-client-ui-input-trigger": ">=0.1.7-rc.2 <0.2.0-0",
85
+ "@deepseek-ai/dsh-client-ui-settings": ">=0.1.7-rc.2 <0.2.0-0",
86
+ "@deepseek-ai/dsh-client-ui-slots": ">=0.1.7-rc.2 <0.2.0-0",
87
+ "@deepseek-ai/dsh-llm": ">=0.1.7-rc.2 <0.2.0-0",
88
+ "@deepseek-ai/dsh-settings": ">=0.1.7-rc.2 <0.2.0-0",
89
+ "@deepseek-ai/dsh-typert-protocol": ">=0.1.7-rc.2 <0.2.0-0",
90
+ "@deepseek-ai/schemastery": "~3.18.4",
91
+ "zod": "^4.4.3"
92
+ },
93
+ "devDependencies": {
94
+ "@deepseek-ai/cordis": "~4.0.4",
95
+ "@deepseek-ai/dsh-api-remotes": "0.1.7-rc.2",
96
+ "@deepseek-ai/dsh-client-locale": "0.1.7-rc.2",
97
+ "@deepseek-ai/dsh-client-store": "0.1.7-rc.2",
98
+ "@deepseek-ai/dsh-client-ui-chat": "0.1.7-rc.2",
99
+ "@deepseek-ai/dsh-client-ui-conversation": "0.1.7-rc.2",
100
+ "@deepseek-ai/dsh-client-ui-input-trigger": "0.1.7-rc.2",
101
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.7-rc.2",
102
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.2",
103
+ "@deepseek-ai/dsh-llm": "0.1.7-rc.2",
104
+ "@deepseek-ai/dsh-settings": "0.1.7-rc.2",
105
+ "@deepseek-ai/dsh-typert-protocol": "0.1.7-rc.2",
106
+ "@deepseek-ai/schemastery": "~3.18.4",
107
+ "@types/node": "^22.20.1",
108
+ "@types/react": "~18.3.31",
109
+ "@types/react-dom": "~18.3.7",
110
+ "react": "^18.3.1",
111
+ "react-dom": "~18.3.1",
112
+ "tsdown": "^0.22.14",
113
+ "typescript": "6.0.3",
114
+ "unrun": "^0.3.1"
115
+ }
116
+ }