dsh-draw 0.2.3 → 0.2.4

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 CHANGED
@@ -5,6 +5,12 @@ 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.2.4] - 2026-09-02
9
+
10
+ ### Changed
11
+
12
+ - Align the devDependency pins to the published dsh 0.1.2-alpha.5 line and re-verify the adaptation claims; no behavior change.
13
+
8
14
  ## [0.2.3] - 2026-09-01
9
15
 
10
16
  ### Changed
package/README.es.md CHANGED
@@ -30,8 +30,8 @@
30
30
  | Motores | Cualquier endpoint de imágenes compatible con OpenAI; presets para OpenAI Images (`gpt-image-1`) y Zhipu CogView (`cogview-3-flash`) |
31
31
  | Superficies | Herramienta host `image_generate` + tarjeta de resultado web + pestaña de ajustes de Plugins |
32
32
 
33
- La mitad de navegador se apoya en el `Context` de cordis y en los paquetes de cliente publicados (`dsh-client-ui-slots`, `dsh-client-ui-settings`, `dsh-client-ui-tool`, `dsh-client-locale`, `dsh-client-connection`); ya no depende del paquete eliminado `dsh-client-runtime` (el bloque de llamada de herramienta se lee mediante un contrato estructural local), por lo que la superficie de cliente también encaja con hosts `0.1.2-alpha.3`.
34
- 0.1.2-alpha.3 (adaptado el 2026-09-01): el sobre de sesión conserva su campo ignorable solo para compatibilidad de lectura de logs almacenados - Session.append aún no puede estamparlo, por lo que el comportamiento de la puerta no cambia.
33
+ La mitad de navegador se apoya en el `Context` de cordis y en los paquetes de cliente publicados (`dsh-client-ui-slots`, `dsh-client-ui-settings`, `dsh-client-ui-tool`, `dsh-client-locale`, `dsh-client-connection`); ya no depende del paquete eliminado `dsh-client-runtime` (el bloque de llamada de herramienta se lee mediante un contrato estructural local), por lo que la superficie de cliente también encaja con hosts `0.1.2-alpha.5`.
34
+ 0.1.2-alpha.5 (adaptado el 2026-09-02): el sobre de sesión conserva su campo ignorable solo para compatibilidad de lectura de logs almacenados - Session.append aún no puede estamparlo, por lo que el comportamiento de la puerta no cambia.
35
35
 
36
36
  ## Qué obtienes
37
37
 
@@ -121,7 +121,7 @@ Ejemplo de sobrescritura en el parche de tu perfil:
121
121
 
122
122
  - **Permisos**: el plugin solo hace llamadas HTTPS salientes a los endpoints de motor configurados; el resto es de solo lectura. Las únicas escrituras de la pestaña de ajustes son las llamadas de establecer/eliminar credenciales en el seam oficial `ctx.credentials`.
123
123
  - **Datos**: las imágenes generadas se guardan a través del almacén de adjuntos oficial bajo la política de adjuntos del harness. El uso de cuota se pliega desde los eventos de sesión `draw/generated`, más el libro auxiliar en memoria en hosts que no pueden registrar esos eventos — nada más se almacena.
124
- - **Registro de sesión**: el evento `draw/generated` registra motor, modelo, solicitud estandarizada, totales de bytes e ids de adjunto — los hechos de auditoría, nunca las claves API. El evento solo se añade cuando el host conoce el tipo o admite el sobre `ignorable` (sondeado al montar); en hosts rc.6/rc.7 y en el host sin sobre `0.1.2-alpha.3` (que eliminó el sobre y falla cerrado en tipos desconocidos al leer) la carga va al libro auxiliar en memoria, de modo que generar imágenes ya no hace que la sesión se niegue a reabrirse.
124
+ - **Registro de sesión**: el evento `draw/generated` registra motor, modelo, solicitud estandarizada, totales de bytes e ids de adjunto — los hechos de auditoría, nunca las claves API. El evento solo se añade cuando el host conoce el tipo o admite el sobre `ignorable` (sondeado al montar); en hosts rc.6/rc.7 y en el host sin sobre `0.1.2-alpha.5` (que eliminó el sobre y falla cerrado en tipos desconocidos al leer) la carga va al libro auxiliar en memoria, de modo que generar imágenes ya no hace que la sesión se niegue a reabrirse.
125
125
 
126
126
  ## Límites de seguridad
127
127
 
@@ -135,7 +135,7 @@ Ejemplo de sobrescritura en el parche de tu perfil:
135
135
  - **Solo modelos de imagen.** Sin endpoints de vídeo, audio o edición; sin comprensión visual.
136
136
  - **Compatibilidad de motores.** Los motores deben hablar la forma `POST /images/generations` de OpenAI (entrega base64 o URL); los extras específicos de cada proveedor quedan fuera.
137
137
  - **La conciencia de coste es estructural.** El plugin cuenta llamadas y bytes pero no conoce el precio de los motores — combínalo con `dsh-budget` para la gobernanza de coste.
138
- - **Durabilidad de cuota en rc.6/rc.7 y 0.1.2-alpha.3.** En hosts cuyo registro de sesión no puede llevar `draw/generated` (lista blanca estática de eventos, sin sobre `ignorable`; `0.1.2-alpha.3` eliminó el sobre y falla cerrado en tipos de evento desconocidos al leer), la cuota sigue exacta en la sesión viva desde el libro auxiliar en memoria pero se reinicia al reiniciar; la contabilidad duradera vuelve en hosts con una superficie de eventos para plugins.
138
+ - **Durabilidad de cuota en rc.6/rc.7 y 0.1.2-alpha.5.** En hosts cuyo registro de sesión no puede llevar `draw/generated` (lista blanca estática de eventos, sin sobre `ignorable`; `0.1.2-alpha.5` eliminó el sobre y falla cerrado en tipos de evento desconocidos al leer), la cuota sigue exacta en la sesión viva desde el libro auxiliar en memoria pero se reinicia al reiniciar; la contabilidad duradera vuelve en hosts con una superficie de eventos para plugins.
139
139
 
140
140
  ## Desarrollo
141
141
 
package/README.hi.md CHANGED
@@ -30,8 +30,8 @@
30
30
  | इंजन | कोई भी OpenAI-संगत images एंडपॉइंट; OpenAI Images (`gpt-image-1`) और Zhipu CogView (`cogview-3-flash`) प्रीसेट |
31
31
  | सतहें | Host `image_generate` टूल + वेब परिणाम कार्ड + Plugins सेटिंग टैब |
32
32
 
33
- ब्राउज़र हिस्सा cordis `Context` और प्रकाशित क्लाइंट पैकेजों (`dsh-client-ui-slots`, `dsh-client-ui-settings`, `dsh-client-ui-tool`, `dsh-client-locale`, `dsh-client-connection`) पर चलता है; यह अब हटाए गए `dsh-client-runtime` पैकेज पर निर्भर नहीं करता (टूल-कॉल ब्लॉक स्थानीय संरचनात्मक अनुबंध से पढ़ा जाता है), इसलिए क्लाइंट सतह `0.1.2-alpha.3` होस्ट के साथ भी मेल खाती है।
34
- 0.1.2-alpha.3 (2026-09-01 को अनुकूलित): सत्र लिफ़ाफ़ा अपना ignorable फ़ील्ड केवल संग्रहीत-लॉग पठन संगतता के लिए रखता है - Session.append अभी भी इसे स्टैम्प नहीं कर सकता, इसलिए गेट व्यवहार अपरिवर्तित है।
33
+ ब्राउज़र हिस्सा cordis `Context` और प्रकाशित क्लाइंट पैकेजों (`dsh-client-ui-slots`, `dsh-client-ui-settings`, `dsh-client-ui-tool`, `dsh-client-locale`, `dsh-client-connection`) पर चलता है; यह अब हटाए गए `dsh-client-runtime` पैकेज पर निर्भर नहीं करता (टूल-कॉल ब्लॉक स्थानीय संरचनात्मक अनुबंध से पढ़ा जाता है), इसलिए क्लाइंट सतह `0.1.2-alpha.5` होस्ट के साथ भी मेल खाती है।
34
+ 0.1.2-alpha.5 (2026-09-02 को अनुकूलित): सत्र लिफ़ाफ़ा अपना ignorable फ़ील्ड केवल संग्रहीत-लॉग पठन संगतता के लिए रखता है - Session.append अभी भी इसे स्टैम्प नहीं कर सकता, इसलिए गेट व्यवहार अपरिवर्तित है।
35
35
 
36
36
  ## आपको क्या मिलता है
37
37
 
@@ -121,7 +121,7 @@ dsh --profile web --dump-config | grep -A2 'id: dsh-draw'
121
121
 
122
122
  - **अनुमतियाँ**: प्लगइन केवल कॉन्फ़िगर किए इंजन एंडपॉइंट पर आउटबाउंड HTTPS कॉल करता है; बाकी सब केवल-पठन है। सेटिंग टैब का एकमात्र लेखन आधिकारिक `ctx.credentials` सीम पर क्रेडेंशियल सेट/हटाना है।
123
123
  - **डेटा**: बनी छवियाँ आधिकारिक अटैचमेंट स्टोर से हार्नेस की अपनी नीति के तहत सहेजी जाती हैं। कोटा उपयोग `draw/generated` सत्र इवेंट से मोड़ा जाता है, साथ में उन होस्ट पर इन-मेमोरी फ़ॉलबैक लेजर से जो उन इवेंट को लॉग नहीं कर सकते — और कुछ संग्रहीत नहीं होता।
124
- - **सत्र लॉग**: `draw/generated` इवेंट इंजन, मॉडल, मानकीकृत अनुरोध, बाइट योग और अटैचमेंट आईडी दर्ज करता है — ऑडिट तथ्य, कभी API कुंजियाँ नहीं। इवेंट तभी जोड़ा जाता है जब होस्ट उस प्रकार को जानता हो या `ignorable` एनवेलप स्वीकार करता हो (माउंट पर जांचा जाता है); rc.6/rc.7 होस्ट और एनवेलप-रहित `0.1.2-alpha.3` होस्ट (जिसने एनवेलप हटा दिया और पढ़ने पर अज्ञात प्रकारों पर फेल-क्लोज़ करता है) पर पेलोड इन-मेमोरी फ़ॉलबैक लेजर में जाता है, इसलिए इमेज बनाने से सत्र अब दोबारा खुलने से इनकार नहीं करता।
124
+ - **सत्र लॉग**: `draw/generated` इवेंट इंजन, मॉडल, मानकीकृत अनुरोध, बाइट योग और अटैचमेंट आईडी दर्ज करता है — ऑडिट तथ्य, कभी API कुंजियाँ नहीं। इवेंट तभी जोड़ा जाता है जब होस्ट उस प्रकार को जानता हो या `ignorable` एनवेलप स्वीकार करता हो (माउंट पर जांचा जाता है); rc.6/rc.7 होस्ट और एनवेलप-रहित `0.1.2-alpha.5` होस्ट (जिसने एनवेलप हटा दिया और पढ़ने पर अज्ञात प्रकारों पर फेल-क्लोज़ करता है) पर पेलोड इन-मेमोरी फ़ॉलबैक लेजर में जाता है, इसलिए इमेज बनाने से सत्र अब दोबारा खुलने से इनकार नहीं करता।
125
125
 
126
126
  ## सुरक्षा सीमाएँ
127
127
 
@@ -135,7 +135,7 @@ dsh --profile web --dump-config | grep -A2 'id: dsh-draw'
135
135
  - **केवल छवि मॉडल।** कोई वीडियो, ऑडियो या संपादन एंडपॉइंट नहीं; कोई विज़ुअल समझ नहीं।
136
136
  - **इंजन संगतता।** इंजन को OpenAI `POST /images/generations` आकार बोलना चाहिए (base64 या URL डिलीवरी); प्रदाता-विशेष अतिरिक्त दायरे से बाहर हैं।
137
137
  - **लागत-जागरूकता संरचनात्मक है।** प्लगइन कॉल और बाइट गिनता है, इंजन मूल्य नहीं जानता — लागत प्रशासन के लिए `dsh-budget` के साथ जोड़ें।
138
- - **rc.6/rc.7 और 0.1.2-alpha.3 पर कोटा स्थायित्व।** जिन होस्ट का सत्र लॉग `draw/generated` को सुरक्षित रूप से नहीं रख सकता (स्थिर इवेंट श्वेतसूची, कोई `ignorable` एनवेलप नहीं; `0.1.2-alpha.3` ने एनवेलप हटा दिया और पढ़ने पर अज्ञात इवेंट प्रकारों पर फेल-क्लोज़ करता है), कोटा इन-मेमोरी फ़ॉलबैक लेजर से जीवित सत्र में सटीक रहता है लेकिन पुनः आरंभ पर रीसेट हो जाता है; प्लगइन इवेंट सतह वाले होस्ट पर टिकाऊ लेखांकन फिर से शुरू होता है।
138
+ - **rc.6/rc.7 और 0.1.2-alpha.5 पर कोटा स्थायित्व।** जिन होस्ट का सत्र लॉग `draw/generated` को सुरक्षित रूप से नहीं रख सकता (स्थिर इवेंट श्वेतसूची, कोई `ignorable` एनवेलप नहीं; `0.1.2-alpha.5` ने एनवेलप हटा दिया और पढ़ने पर अज्ञात इवेंट प्रकारों पर फेल-क्लोज़ करता है), कोटा इन-मेमोरी फ़ॉलबैक लेजर से जीवित सत्र में सटीक रहता है लेकिन पुनः आरंभ पर रीसेट हो जाता है; प्लगइन इवेंट सतह वाले होस्ट पर टिकाऊ लेखांकन फिर से शुरू होता है।
139
139
 
140
140
  ## विकास
141
141
 
package/README.md CHANGED
@@ -31,8 +31,8 @@
31
31
  | Engines | Any OpenAI-compatible images endpoint; presets for OpenAI Images (`gpt-image-1`) and Zhipu CogView (`cogview-3-flash`) |
32
32
  | Surfaces | Host `image_generate` tool + web result card + Plugins settings tab |
33
33
 
34
- The browser half rides the cordis `Context` and the published client packages (`dsh-client-ui-slots`, `dsh-client-ui-settings`, `dsh-client-ui-tool`, `dsh-client-locale`, `dsh-client-connection`); it no longer depends on the removed `dsh-client-runtime` package (the tool-call block is read through a local structural contract), so the client surface also lines up with `0.1.2-alpha.3` hosts.
35
- 0.1.2-alpha.3 (adapted 2026-09-01): the session envelope keeps its ignorable field for stored-log read compatibility only - Session.append still cannot stamp it, so audit-gate behavior is unchanged.
34
+ The browser half rides the cordis `Context` and the published client packages (`dsh-client-ui-slots`, `dsh-client-ui-settings`, `dsh-client-ui-tool`, `dsh-client-locale`, `dsh-client-connection`); it no longer depends on the removed `dsh-client-runtime` package (the tool-call block is read through a local structural contract), so the client surface also lines up with `0.1.2-alpha.5` hosts.
35
+ 0.1.2-alpha.5 (adapted 2026-09-02): the session envelope keeps its ignorable field for stored-log read compatibility only - Session.append still cannot stamp it, so audit-gate behavior is unchanged.
36
36
 
37
37
  ## What you get
38
38
 
@@ -122,7 +122,7 @@ Example override in your profile patch:
122
122
 
123
123
  - **Permissions**: the plugin makes outbound HTTPS calls to the configured engine endpoints only; every other surface is read-only. The settings tab's only writes are credential set/remove calls on the official `ctx.credentials` seam.
124
124
  - **Data**: generated images are saved through the official attachment store under the harness's own attachment policy. Quota usage is folded from the `draw/generated` session events, plus the in-memory fallback ledger on hosts that cannot log those events — nothing else is stored.
125
- - **Session log**: the `draw/generated` event records engine, model, standardized request, byte totals, and attachment ids — the audit facts, never the API keys. The event is appended only when the host knows the type or honors the `ignorable` envelope (probed at mount); on rc.6/rc.7 hosts and the envelope-less `0.1.2-alpha.3` host (which removed the envelope and fails closed on unknown types at read) the payload goes to the in-memory fallback ledger instead, so generating images can no longer make a session refuse to reopen.
125
+ - **Session log**: the `draw/generated` event records engine, model, standardized request, byte totals, and attachment ids — the audit facts, never the API keys. The event is appended only when the host knows the type or honors the `ignorable` envelope (probed at mount); on rc.6/rc.7 hosts and the envelope-less `0.1.2-alpha.5` host (which removed the envelope and fails closed on unknown types at read) the payload goes to the in-memory fallback ledger instead, so generating images can no longer make a session refuse to reopen.
126
126
 
127
127
  ## Security boundaries
128
128
 
@@ -136,7 +136,7 @@ Example override in your profile patch:
136
136
  - **Image models only.** No video, audio, or edit endpoints; no vision understanding.
137
137
  - **Engine compatibility.** Three vocabularies are supported through the provider seam: `openai` (the `POST /images/generations` shape), `replicate` (prediction create + poll), and `fal` (the `fal.run` queue). Provider-specific extras beyond `prompt`/size/count (e.g. seed, scheduler) are out of scope.
138
138
  - **Cost awareness is structural.** The plugin counts calls and bytes but does not know engine pricing — pair with `dsh-budget` for cost governance.
139
- - **Quota durability on rc.6/rc.7 and 0.1.2-alpha.3.** On hosts whose session log cannot carry `draw/generated` (static event whitelist, no `ignorable` envelope; `0.1.2-alpha.3` removed the envelope and fails closed on unknown event types at read), quota stays exact for the live session from the in-memory fallback ledger but resets on restart; durable accounting resumes on hosts with a plugin event surface.
139
+ - **Quota durability on rc.6/rc.7 and 0.1.2-alpha.5.** On hosts whose session log cannot carry `draw/generated` (static event whitelist, no `ignorable` envelope; `0.1.2-alpha.5` removed the envelope and fails closed on unknown event types at read), quota stays exact for the live session from the in-memory fallback ledger but resets on restart; durable accounting resumes on hosts with a plugin event surface.
140
140
 
141
141
  ## Development
142
142
 
package/README.pt.md CHANGED
@@ -30,8 +30,8 @@
30
30
  | Motores | Qualquer endpoint de imagens compatível com OpenAI; presets para OpenAI Images (`gpt-image-1`) e Zhipu CogView (`cogview-3-flash`) |
31
31
  | Superfícies | Ferramenta host `image_generate` + cartão de resultado web + aba de ajustes de Plugins |
32
32
 
33
- A metade de navegador usa o `Context` do cordis e os pacotes de cliente publicados (`dsh-client-ui-slots`, `dsh-client-ui-settings`, `dsh-client-ui-tool`, `dsh-client-locale`, `dsh-client-connection`); ela não depende mais do pacote removido `dsh-client-runtime` (o bloco de chamada de ferramenta é lido por um contrato estrutural local), então a superfície de cliente também se alinha com hosts `0.1.2-alpha.3`.
34
- 0.1.2-alpha.3 (adaptado em 2026-09-01): o envelope de sessão mantém seu campo ignorable apenas para compatibilidade de leitura de logs armazenados - o Session.append ainda não consegue estampá-lo, então o comportamento da porta não muda.
33
+ A metade de navegador usa o `Context` do cordis e os pacotes de cliente publicados (`dsh-client-ui-slots`, `dsh-client-ui-settings`, `dsh-client-ui-tool`, `dsh-client-locale`, `dsh-client-connection`); ela não depende mais do pacote removido `dsh-client-runtime` (o bloco de chamada de ferramenta é lido por um contrato estrutural local), então a superfície de cliente também se alinha com hosts `0.1.2-alpha.5`.
34
+ 0.1.2-alpha.5 (adaptado em 2026-09-02): o envelope de sessão mantém seu campo ignorable apenas para compatibilidade de leitura de logs armazenados - o Session.append ainda não consegue estampá-lo, então o comportamento da porta não muda.
35
35
 
36
36
  ## O que você ganha
37
37
 
@@ -121,7 +121,7 @@ Exemplo de sobrescrita no patch do seu perfil:
121
121
 
122
122
  - **Permissões**: o plugin só faz chamadas HTTPS de saída para os endpoints de motor configurados; todo o resto é somente leitura. As únicas escritas da aba de ajustes são as chamadas de definir/remover credenciais no seam oficial `ctx.credentials`.
123
123
  - **Dados**: as imagens geradas são salvas através do armazenamento de anexos oficial sob a política de anexos do harness. O uso de cota é dobrado dos eventos de sessão `draw/generated`, mais o livro auxiliar em memória em hosts que não podem registrar esses eventos — nada mais é armazenado.
124
- - **Registro de sessão**: o evento `draw/generated` registra motor, modelo, solicitação padronizada, totais de bytes e ids de anexo — os fatos de auditoria, nunca as chaves API. O evento só é anexado quando o host conhece o tipo ou honra o envelope `ignorable` (sondado na montagem); em hosts rc.6/rc.7 e no host sem envelope `0.1.2-alpha.3` (que removeu o envelope e falha fechado em tipos desconhecidos na leitura) a carga vai para o livro auxiliar em memória, então gerar imagens não faz mais a sessão recusar reabrir.
124
+ - **Registro de sessão**: o evento `draw/generated` registra motor, modelo, solicitação padronizada, totais de bytes e ids de anexo — os fatos de auditoria, nunca as chaves API. O evento só é anexado quando o host conhece o tipo ou honra o envelope `ignorable` (sondado na montagem); em hosts rc.6/rc.7 e no host sem envelope `0.1.2-alpha.5` (que removeu o envelope e falha fechado em tipos desconhecidos na leitura) a carga vai para o livro auxiliar em memória, então gerar imagens não faz mais a sessão recusar reabrir.
125
125
 
126
126
  ## Limites de segurança
127
127
 
@@ -135,7 +135,7 @@ Exemplo de sobrescrita no patch do seu perfil:
135
135
  - **Somente modelos de imagem.** Sem endpoints de vídeo, áudio ou edição; sem compreensão visual.
136
136
  - **Compatibilidade de motores.** Os motores devem falar a forma `POST /images/generations` da OpenAI (entrega base64 ou URL); extras específicos de cada provedor ficam de fora.
137
137
  - **Consciência de custo é estrutural.** O plugin conta chamadas e bytes, mas não conhece o preço dos motores — combine com `dsh-budget` para a governança de custo.
138
- - **Durabilidade de cota em rc.6/rc.7 e 0.1.2-alpha.3.** Em hosts cujo registro de sessão não pode carregar `draw/generated` (lista estática de eventos, sem envelope `ignorable`; `0.1.2-alpha.3` removeu o envelope e falha fechado em tipos de evento desconhecidos na leitura), a cota continua exata na sessão viva a partir do livro auxiliar em memória, mas zera ao reiniciar; a contabilidade durável retorna em hosts com uma superfície de eventos para plugins.
138
+ - **Durabilidade de cota em rc.6/rc.7 e 0.1.2-alpha.5.** Em hosts cujo registro de sessão não pode carregar `draw/generated` (lista estática de eventos, sem envelope `ignorable`; `0.1.2-alpha.5` removeu o envelope e falha fechado em tipos de evento desconhecidos na leitura), a cota continua exata na sessão viva a partir do livro auxiliar em memória, mas zera ao reiniciar; a contabilidade durável retorna em hosts com uma superfície de eventos para plugins.
139
139
 
140
140
  ## Desenvolvimento
141
141
 
package/README.zh.md CHANGED
@@ -30,8 +30,8 @@
30
30
  | 引擎 | 任意 OpenAI 兼容图像端点;内置 OpenAI Images(`gpt-image-1`)与智谱 CogView(`cogview-3-flash`)预设 |
31
31
  | 界面 | Host `image_generate` 工具 + Web 结果卡片 + Plugins 设置页签 |
32
32
 
33
- 浏览器半边基于 cordis `Context` 与已发布的客户端包(`dsh-client-ui-slots`、`dsh-client-ui-settings`、`dsh-client-ui-tool`、`dsh-client-locale`、`dsh-client-connection`);它不再依赖已移除的 `dsh-client-runtime` 包(工具调用块经本地结构契约读取),因此客户端接口面同样对齐 `0.1.2-alpha.3` 宿主。
34
- 0.1.2-alpha.3(2026-09-01 已适配):会话信封保留 ignorable 字段但仅用于存量日志读取兼容——Session.append 仍无法盖章,门控行为不变。
33
+ 浏览器半边基于 cordis `Context` 与已发布的客户端包(`dsh-client-ui-slots`、`dsh-client-ui-settings`、`dsh-client-ui-tool`、`dsh-client-locale`、`dsh-client-connection`);它不再依赖已移除的 `dsh-client-runtime` 包(工具调用块经本地结构契约读取),因此客户端接口面同样对齐 `0.1.2-alpha.5` 宿主。
34
+ 0.1.2-alpha.5(2026-09-02 已适配):会话信封保留 ignorable 字段但仅用于存量日志读取兼容——Session.append 仍无法盖章,门控行为不变。
35
35
 
36
36
  ## 你能得到什么
37
37
 
@@ -121,7 +121,7 @@ profile patch 中的覆盖示例:
121
121
 
122
122
  - **权限**:插件仅对配置的引擎端点发起 HTTPS 出站请求;其余界面全部只读。设置页签唯一的写入是对官方 `ctx.credentials` 接缝的凭据设置/移除。
123
123
  - **数据**:生成的图片经官方附件存储落盘,受 harness 附件策略约束。配额用量从 `draw/generated` 会话事件折叠;在无法安全落盘该事件的宿主上另加内存兜底账簿 —— 除此之外不存储任何东西。
124
- - **会话日志**:`draw/generated` 事件记录引擎、模型、标准化请求、字节总量与附件 id —— 审计事实,绝不包含 API 密钥。仅当宿主收录该类型或支持 `ignorable` 信封时才落盘(挂载期探测);在 rc.6/rc.7 宿主与移除信封的 `0.1.2-alpha.3` 宿主(读取时对未知类型失败关闭)上,载荷改记内存兜底账簿,生成图片不再导致会话重启后无法打开。
124
+ - **会话日志**:`draw/generated` 事件记录引擎、模型、标准化请求、字节总量与附件 id —— 审计事实,绝不包含 API 密钥。仅当宿主收录该类型或支持 `ignorable` 信封时才落盘(挂载期探测);在 rc.6/rc.7 宿主与移除信封的 `0.1.2-alpha.5` 宿主(读取时对未知类型失败关闭)上,载荷改记内存兜底账簿,生成图片不再导致会话重启后无法打开。
125
125
 
126
126
  ## 安全边界
127
127
 
@@ -135,7 +135,7 @@ profile patch 中的覆盖示例:
135
135
  - **仅图像模型。** 无视频、音频或编辑端点;无视觉理解。
136
136
  - **引擎兼容性。** 引擎需支持 OpenAI `POST /images/generations` 形状(base64 或 URL 交付);厂商专属扩展不在范围内。
137
137
  - **成本感知是结构性的。** 插件统计调用次数与字节,但不了解引擎定价 —— 与 `dsh-budget` 配合做成本治理。
138
- - **rc.6/rc.7 与 0.1.2-alpha.3 上的配额持久性。** 会话日志无法安全携带 `draw/generated` 的宿主(静态事件白名单、无 `ignorable` 信封;`0.1.2-alpha.3` 已移除信封并在读取时对未知事件类型失败关闭)上,配额经内存兜底账簿在活会话内保持精确,但重启后重置;宿主具备插件事件面后恢复持久记账。
138
+ - **rc.6/rc.7 与 0.1.2-alpha.5 上的配额持久性。** 会话日志无法安全携带 `draw/generated` 的宿主(静态事件白名单、无 `ignorable` 信封;`0.1.2-alpha.5` 已移除信封并在读取时对未知事件类型失败关闭)上,配额经内存兜底账簿在活会话内保持精确,但重启后重置;宿主具备插件事件面后恢复持久记账。
139
139
 
140
140
  ## 开发
141
141
 
package/lib/index.js CHANGED
@@ -281,7 +281,7 @@ function fallbackDrawGeneratedEvents(session) {
281
281
  * @returns the accounting events.
282
282
  */
283
283
  function drawGeneratedEvents(session) {
284
- return session.events.filter((event) => event.type === "draw/generated");
284
+ return (typeof session.snapshotEvents === "function" ? session.snapshotEvents() : session.events).filter((event) => event.type === "draw/generated");
285
285
  }
286
286
  //#endregion
287
287
  //#region src/quota.ts
@@ -1359,7 +1359,7 @@ var EngineRouter = class {
1359
1359
  * @module dsh-draw/version
1360
1360
  */
1361
1361
  /** Plugin version; must equal the `version` field in `package.json`. */
1362
- const PLUGIN_VERSION = "0.2.3";
1362
+ const PLUGIN_VERSION = "0.2.4";
1363
1363
  //#endregion
1364
1364
  //#region src/service.ts
1365
1365
  /**
@@ -62,7 +62,7 @@ export interface DrawGeneratedEvent {
62
62
  */
63
63
  export declare function appendDrawGenerated(session: Session, event: DrawGeneratedEvent): {
64
64
  type: "draw/generated";
65
- seq: number;
65
+ seq: import("@deepseek-ai/dsh-session").SessionSeq;
66
66
  time: number;
67
67
  data: DrawGeneratedEvent;
68
68
  ignorable?: true;
@@ -1 +1 @@
1
- {"version":3,"file":"session-events.d.ts","sourceRoot":"","sources":["../../src/session-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,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAiBvI;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,kBAAkB,EAAE,CAE3F;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,OAAO,0BAA0B,EAAE,YAAY,CAAC,gBAAgB,CAAC,EAAE,CAOlI"}
@@ -87,5 +87,10 @@ export function fallbackDrawGeneratedEvents(session) {
87
87
  * @returns the accounting events.
88
88
  */
89
89
  export function drawGeneratedEvents(session) {
90
- return session.events.filter(event => event.type === 'draw/generated');
90
+ // alpha.5 renamed the Session.events getter to snapshotEvents(); the peer
91
+ // floor (>=0.1.0-rc.8) still exposes .events, so detect at runtime.
92
+ const snapshot = typeof session.snapshotEvents === 'function'
93
+ ? session.snapshotEvents()
94
+ : session.events;
95
+ return snapshot.filter(event => event.type === 'draw/generated');
91
96
  }
@@ -7,5 +7,5 @@
7
7
  * @module dsh-draw/version
8
8
  */
9
9
  /** Plugin version; must equal the `version` field in `package.json`. */
10
- export declare const PLUGIN_VERSION = "0.2.3";
10
+ export declare const PLUGIN_VERSION = "0.2.4";
11
11
  //# sourceMappingURL=version.d.ts.map
@@ -7,4 +7,4 @@
7
7
  * @module dsh-draw/version
8
8
  */
9
9
  /** Plugin version; must equal the `version` field in `package.json`. */
10
- export const PLUGIN_VERSION = '0.2.3';
10
+ export const PLUGIN_VERSION = '0.2.4';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-draw",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Unified static-image generation router for DeepSeek Harness: one image_generate tool with standard parameters, config-driven OpenAI-compatible engine routing (OpenAI Images, Zhipu CogView, and any compatible endpoint) with health-aware fallback, durable workspace attachment results, per-session quota accounting, an in-conversation result card, and a Plugins settings panel that stores API keys as credential references.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -89,7 +89,7 @@
89
89
  ],
90
90
  "compatibility": {
91
91
  "dshVersions": [
92
- "0.1.2-alpha.3"
92
+ "0.1.2-alpha.5"
93
93
  ]
94
94
  },
95
95
  "capability": {
@@ -159,26 +159,26 @@
159
159
  "typescript": "^7.0.2",
160
160
  "zod": "^4.4.3"
161
161
  },
162
- "devDependencies": {"@deepseek-ai/dsh-util-values": "0.1.2-alpha.3",
162
+ "devDependencies": {"@deepseek-ai/dsh-util-values": "0.1.2-alpha.5",
163
163
  "@deepseek-ai/cordis": "^4.0.2",
164
164
  "@deepseek-ai/cordis-plugin-include": "1.0.6",
165
165
  "@deepseek-ai/cordis-plugin-loader": "1.0.2",
166
- "@deepseek-ai/dsh-agent": "0.1.2-alpha.3",
167
- "@deepseek-ai/dsh-api-remotes": "0.1.2-alpha.3",
168
- "@deepseek-ai/dsh-attachment": "0.1.2-alpha.3",
169
- "@deepseek-ai/dsh-attachment-local": "0.1.2-alpha.3",
170
- "@deepseek-ai/dsh-brand": "0.1.2-alpha.3",
171
- "@deepseek-ai/dsh-client-connection": "0.1.2-alpha.3",
172
- "@deepseek-ai/dsh-client-locale": "0.1.2-alpha.3",
173
- "@deepseek-ai/dsh-client-ui-settings": "0.1.2-alpha.3",
174
- "@deepseek-ai/dsh-client-ui-slots": "0.1.2-alpha.3",
175
- "@deepseek-ai/dsh-client-ui-tool": "0.1.2-alpha.3",
176
- "@deepseek-ai/dsh-credentials": "0.1.2-alpha.3",
177
- "@deepseek-ai/dsh-credentials-local": "0.1.2-alpha.3",
178
- "@deepseek-ai/dsh-llm": "0.1.2-alpha.3",
179
- "@deepseek-ai/dsh-session": "0.1.2-alpha.3",
180
- "@deepseek-ai/dsh-tools": "0.1.2-alpha.3",
181
- "@deepseek-ai/dsh-typert-protocol": "0.1.2-alpha.3",
166
+ "@deepseek-ai/dsh-agent": "0.1.2-alpha.5",
167
+ "@deepseek-ai/dsh-api-remotes": "0.1.2-alpha.5",
168
+ "@deepseek-ai/dsh-attachment": "0.1.2-alpha.5",
169
+ "@deepseek-ai/dsh-attachment-local": "0.1.2-alpha.5",
170
+ "@deepseek-ai/dsh-brand": "0.1.2-alpha.5",
171
+ "@deepseek-ai/dsh-client-connection": "0.1.2-alpha.5",
172
+ "@deepseek-ai/dsh-client-locale": "0.1.2-alpha.5",
173
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.2-alpha.5",
174
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.2-alpha.5",
175
+ "@deepseek-ai/dsh-client-ui-tool": "0.1.2-alpha.5",
176
+ "@deepseek-ai/dsh-credentials": "0.1.2-alpha.5",
177
+ "@deepseek-ai/dsh-credentials-local": "0.1.2-alpha.5",
178
+ "@deepseek-ai/dsh-llm": "0.1.2-alpha.5",
179
+ "@deepseek-ai/dsh-session": "0.1.2-alpha.5",
180
+ "@deepseek-ai/dsh-tools": "0.1.2-alpha.5",
181
+ "@deepseek-ai/dsh-typert-protocol": "0.1.2-alpha.5",
182
182
  "@deepseek-ai/schemastery": "^3.18.2",
183
183
  "@types/node": "^22.19.0",
184
184
  "@types/react": "18.3.31",
@@ -129,5 +129,10 @@ export function fallbackDrawGeneratedEvents(session: Session): readonly DrawGene
129
129
  * @returns the accounting events.
130
130
  */
131
131
  export function drawGeneratedEvents(session: Session): readonly import('@deepseek-ai/dsh-session').SessionEvent<'draw/generated'>[] {
132
- return session.events.filter(event => event.type === 'draw/generated')
132
+ // alpha.5 renamed the Session.events getter to snapshotEvents(); the peer
133
+ // floor (>=0.1.0-rc.8) still exposes .events, so detect at runtime.
134
+ const snapshot: readonly import('@deepseek-ai/dsh-session').SessionEvent[] = typeof session.snapshotEvents === 'function'
135
+ ? session.snapshotEvents()
136
+ : (session as unknown as { events: readonly import('@deepseek-ai/dsh-session').SessionEvent[] }).events
137
+ return snapshot.filter(event => event.type === 'draw/generated')
133
138
  }
package/src/version.ts CHANGED
@@ -8,4 +8,4 @@
8
8
  */
9
9
 
10
10
  /** Plugin version; must equal the `version` field in `package.json`. */
11
- export const PLUGIN_VERSION = '0.2.3'
11
+ export const PLUGIN_VERSION = '0.2.4'