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,21 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
`dsh-draw` bundles no third-party source code; all TypeScript/JavaScript
|
|
4
|
+
sources in this repository are original works by the dsh-draw contributors,
|
|
5
|
+
licensed under Apache-2.0 (see `LICENSE`).
|
|
6
|
+
|
|
7
|
+
The package depends on the following software. The published tarball bundles
|
|
8
|
+
only `zod` (the wire codec library inlined into the host and client bundles);
|
|
9
|
+
everything else is install-time:
|
|
10
|
+
|
|
11
|
+
| Package | Version range | License | Purpose |
|
|
12
|
+
|---|---|---|---|
|
|
13
|
+
| [zod](https://github.com/colinhacks/zod) | `^4.4.3` | MIT | Wire codecs shared by the host and client Typert faces (bundled into `lib/`) |
|
|
14
|
+
| [tsdown](https://github.com/rolldown/tsdown) | `^0.22.14` | MIT | Build-time bundling of `lib/` (a regular dependency so the git-install channel's `prepare` script can build) |
|
|
15
|
+
| [typescript](https://github.com/microsoft/TypeScript) | `^7.0.2` | Apache-2.0 | Build-time declaration emission (`lib/types/`) |
|
|
16
|
+
| [@deepseek-ai/cordis](https://www.npmjs.com/package/@deepseek-ai/cordis) | `^4.0.1` (peer) | See package | The plugin runtime |
|
|
17
|
+
| [@deepseek-ai/schemastery](https://www.npmjs.com/package/@deepseek-ai/schemastery) | `^3.18.0` (peer) | See package | Configuration schema |
|
|
18
|
+
| `@deepseek-ai/dsh-*` peers | `0.1.0-rc.6` (peer) | See packages | Official harness seams (`dsh-tools`, `dsh-session`, `dsh-attachment`, `dsh-credentials`, `dsh-llm`, `dsh-brand`, `dsh-typert-protocol`) |
|
|
19
|
+
|
|
20
|
+
At runtime the plugin only talks to the image-generation endpoints the user
|
|
21
|
+
configures and to the harness services listed as peerDependencies.
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# dsh-draw bundle patch: mount the unified image-generation router.
|
|
2
|
+
#
|
|
3
|
+
# Every key below is a Config field (Schemastery schema); invalid values fail
|
|
4
|
+
# the profile load loudly. See README.md "Configuration" for the full table.
|
|
5
|
+
- insert:
|
|
6
|
+
- id: dsh-draw
|
|
7
|
+
name: dsh-draw
|
|
8
|
+
config:
|
|
9
|
+
# Ordered engine chain; the router walks it top-down and falls back on
|
|
10
|
+
# failure. apiKeyRef names an environment variable (credential
|
|
11
|
+
# reference) — never put a literal key here.
|
|
12
|
+
engines:
|
|
13
|
+
- id: openai
|
|
14
|
+
baseUrl: https://api.openai.com/v1
|
|
15
|
+
model: gpt-image-1
|
|
16
|
+
apiKeyRef: OPENAI_API_KEY
|
|
17
|
+
enabled: true
|
|
18
|
+
sizeMap: { square: 1024x1024, landscape: 1536x1024, portrait: 1024x1536, auto: auto }
|
|
19
|
+
qualitySupported: true
|
|
20
|
+
styleSupported: true
|
|
21
|
+
responseFormat: b64_json
|
|
22
|
+
imageMediaType: image/png
|
|
23
|
+
- id: cogview
|
|
24
|
+
baseUrl: https://open.bigmodel.cn/api/paas/v4
|
|
25
|
+
model: cogview-3-flash
|
|
26
|
+
apiKeyRef: ZHIPU_API_KEY
|
|
27
|
+
enabled: true
|
|
28
|
+
sizeMap: { square: 1024x1024, landscape: 1344x768, portrait: 768x1344, auto: 1024x1024 }
|
|
29
|
+
qualitySupported: false
|
|
30
|
+
styleSupported: false
|
|
31
|
+
responseFormat: url
|
|
32
|
+
imageMediaType: image/png
|
|
33
|
+
# Engine id the router prefers; must name a configured engine.
|
|
34
|
+
defaultEngine: openai
|
|
35
|
+
# Per-generation HTTP timeout in milliseconds (1000..600000).
|
|
36
|
+
requestTimeoutMs: 120000
|
|
37
|
+
# Cap on images one call may produce (1..10).
|
|
38
|
+
maxImagesPerCall: 4
|
|
39
|
+
# Prompt length cap in characters (1..32000).
|
|
40
|
+
maxPromptLength: 4000
|
|
41
|
+
# Per-session generation-call cap (1..100000).
|
|
42
|
+
maxGenerationsPerSession: 200
|
|
43
|
+
# Per-session generated-image byte cap (1048576..4294967296).
|
|
44
|
+
maxBytesPerSession: 209715200
|
|
45
|
+
# Consecutive failures before an engine enters cooldown (1..10).
|
|
46
|
+
failureThreshold: 2
|
|
47
|
+
# Engine cooldown in milliseconds after the threshold trips (1000..3600000).
|
|
48
|
+
cooldownMs: 60000
|