dsh-draw 0.1.2 → 0.1.3
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 +15 -0
- package/README.es.md +1 -1
- package/README.hi.md +1 -1
- package/README.md +1 -1
- package/README.pt.md +1 -1
- package/README.zh.md +1 -1
- package/lib/client.js +4 -2
- package/lib/client.js.map +1 -1
- package/lib/index.js +4 -3
- package/lib/types/client/present.d.ts +3 -1
- package/lib/types/client/present.d.ts.map +1 -1
- package/lib/types/client/present.js +4 -2
- package/lib/types/version.d.ts +4 -3
- package/lib/types/version.d.ts.map +1 -1
- package/lib/types/version.js +4 -3
- package/package.json +1 -1
- package/src/client/present.ts +4 -2
- package/src/version.ts +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.1.3] - 2026-08-23
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Presenter pure-function suite (`tests/present.spec.ts`, 11 tests): `presentDrawResult` and `presentDrawPanel` are pinned directly on their arguments — settled/error/foreign/null-call-head blocks, meta fallbacks, regenerate-args parsing, engine-row projection, and the cooldown flag.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- `presentDrawPanel` now takes an optional `now` clock (default `Date.now`) so the cooldown flag is a pure function of its inputs and testable without fake timers; the `image_generate` tool surface and the settings tab are unchanged.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- The five-language README "Development" section reported a stale `77 tests, 11 suites`; it now matches the actual `107 tests, 16 test files`.
|
|
21
|
+
- `src/version.ts` referenced a non-existent `tests/version.spec.ts`; the comment now names the real tripwire (`tests/session-events.spec.ts`).
|
|
22
|
+
|
|
8
23
|
## [0.1.2] - 2026-08-22
|
|
9
24
|
|
|
10
25
|
### Changed
|
package/README.es.md
CHANGED
|
@@ -139,7 +139,7 @@ Ejemplo de sobrescritura en el parche de tu perfil:
|
|
|
139
139
|
pnpm install # node ^22.19 || >=24
|
|
140
140
|
pnpm run typecheck # tsc: src + tests contra el checkout local del harness
|
|
141
141
|
pnpm run typecheck:ci # tsc contra las caras publicadas 0.1.1-rc.2 (sin paths)
|
|
142
|
-
pnpm test # vitest:
|
|
142
|
+
pnpm test # vitest: 107 tests, 16 archivos de prueba (transporte guionado, Context/Session/ToolRuntime reales)
|
|
143
143
|
pnpm run build # declaraciones tsc + bundles tsdown (lib/)
|
|
144
144
|
pnpm run verify:self-contained # las especificaciones de dependencias resuelven desde el registry
|
|
145
145
|
pnpm run verify:artifacts # cara ESM host + manifiesto typert + bundle de navegador + archivos de configuración
|
package/README.hi.md
CHANGED
|
@@ -139,7 +139,7 @@ dsh --profile web --dump-config | grep -A2 'id: dsh-draw'
|
|
|
139
139
|
pnpm install # node ^22.19 || >=24
|
|
140
140
|
pnpm run typecheck # tsc: src + tests स्थानीय हार्नेस चेकआउट के विरुद्ध
|
|
141
141
|
pnpm run typecheck:ci # tsc प्रकाशित 0.1.1-rc.2 फ़ेस के विरुद्ध (बिना paths)
|
|
142
|
-
pnpm test # vitest:
|
|
142
|
+
pnpm test # vitest: 107 टेस्ट, 16 टेस्ट फ़ाइलें (स्क्रिप्टेड ट्रांसपोर्ट, वास्तविक Context/Session/ToolRuntime)
|
|
143
143
|
pnpm run build # tsc घोषणाएँ + tsdown बंडल (lib/)
|
|
144
144
|
pnpm run verify:self-contained # निर्भरता स्पेक registry से हल होती हैं
|
|
145
145
|
pnpm run verify:artifacts # host ESM फ़ेस + typert मैनिफ़ेस्ट + ब्राउज़र बंडल + कॉन्फ़िग फ़ाइलें
|
package/README.md
CHANGED
|
@@ -140,7 +140,7 @@ Example override in your profile patch:
|
|
|
140
140
|
pnpm install # node ^22.19 || >=24
|
|
141
141
|
pnpm run typecheck # tsc: src + tests against the local harness checkout
|
|
142
142
|
pnpm run typecheck:ci # tsc against the published 0.1.1-rc.2 faces (no paths)
|
|
143
|
-
pnpm test # vitest:
|
|
143
|
+
pnpm test # vitest: 107 tests, 16 test files (scripted transport, real Context/Session/ToolRuntime)
|
|
144
144
|
pnpm run build # tsc declarations + tsdown bundles (lib/)
|
|
145
145
|
pnpm run verify:self-contained # dependency specs resolve from the registry
|
|
146
146
|
pnpm run verify:artifacts # host ESM face + typert manifest + browser bundle + config files
|
package/README.pt.md
CHANGED
|
@@ -139,7 +139,7 @@ Exemplo de sobrescrita no patch do seu perfil:
|
|
|
139
139
|
pnpm install # node ^22.19 || >=24
|
|
140
140
|
pnpm run typecheck # tsc: src + tests contra o checkout local do harness
|
|
141
141
|
pnpm run typecheck:ci # tsc contra as faces publicadas 0.1.1-rc.2 (sem paths)
|
|
142
|
-
pnpm test # vitest:
|
|
142
|
+
pnpm test # vitest: 107 testes, 16 arquivos de teste (transporte roteirizado, Context/Session/ToolRuntime reais)
|
|
143
143
|
pnpm run build # declarações tsc + bundles tsdown (lib/)
|
|
144
144
|
pnpm run verify:self-contained # as especificações de dependências resolvem pelo registry
|
|
145
145
|
pnpm run verify:artifacts # face ESM host + manifesto typert + bundle de navegador + arquivos de configuração
|
package/README.zh.md
CHANGED
|
@@ -139,7 +139,7 @@ profile patch 中的覆盖示例:
|
|
|
139
139
|
pnpm install # node ^22.19 || >=24
|
|
140
140
|
pnpm run typecheck # tsc:src + tests,对照本地 harness checkout
|
|
141
141
|
pnpm run typecheck:ci # tsc:对照已发布的 0.1.1-rc.2 类型(无 paths)
|
|
142
|
-
pnpm test # vitest:
|
|
142
|
+
pnpm test # vitest:107 个测试、16 个测试文件(scripted 传输、真实 Context/Session/ToolRuntime)
|
|
143
143
|
pnpm run build # tsc 声明 + tsdown 打包(lib/)
|
|
144
144
|
pnpm run verify:self-contained # 依赖声明全部来自 registry
|
|
145
145
|
pnpm run verify:artifacts # host ESM 面 + typert manifest + 浏览器包 + 配置文件
|
package/lib/client.js
CHANGED
|
@@ -54,9 +54,11 @@ window.__ModuleLoader__.load({
|
|
|
54
54
|
* Project the panel snapshot onto the settings row model.
|
|
55
55
|
*
|
|
56
56
|
* @param snapshot - the `draw/status` wire snapshot.
|
|
57
|
+
* @param now - clock override for the cooldown flag (default {@link Date.now});
|
|
58
|
+
* injected so the presenter stays a pure function of its inputs.
|
|
57
59
|
* @returns the presented panel model.
|
|
58
60
|
*/
|
|
59
|
-
function presentDrawPanel(snapshot) {
|
|
61
|
+
function presentDrawPanel(snapshot, now = Date.now) {
|
|
60
62
|
return {
|
|
61
63
|
pluginVersion: snapshot.pluginVersion,
|
|
62
64
|
engines: snapshot.engines.map((engine) => ({
|
|
@@ -70,7 +72,7 @@ window.__ModuleLoader__.load({
|
|
|
70
72
|
...engine.credential.source !== void 0 ? { credentialSource: engine.credential.source } : {},
|
|
71
73
|
credentialWritable: engine.credential.writable,
|
|
72
74
|
consecutiveFailures: engine.health.consecutiveFailures,
|
|
73
|
-
coolingDown: engine.health.cooldownUntil !== null && engine.health.cooldownUntil >
|
|
75
|
+
coolingDown: engine.health.cooldownUntil !== null && engine.health.cooldownUntil > now(),
|
|
74
76
|
lastError: engine.health.lastError
|
|
75
77
|
})),
|
|
76
78
|
quota: {
|