dsh-output-styles 0.6.2 → 0.6.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 CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project are documented in this file. The format
4
4
  follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the
5
5
  project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.6.3] - 2026-09-01
8
+
9
+ ### Changed
10
+
11
+ - Align the devDependency pins to the published dsh `0.1.2-alpha.3` line (21 `@deepseek-ai/dsh-*` packages), widen the `dsh-commands`/`dsh-system-prompt` peers to `>=0.1.0-rc.8 <0.2.0`, and raise `dshWorkshop.compatibility.dshVersions` to `0.1.2-alpha.3`. No behavior change; the five-language READMEs record the alpha.3 fact.
12
+
7
13
  ## [0.6.2] - 2026-08-30
8
14
 
9
15
  ### Fixed
package/README.es.md CHANGED
@@ -25,7 +25,7 @@
25
25
 
26
26
  | Surface | Status |
27
27
  |---|---|
28
- | Harness | DeepSeek Harness `0.1.1-rc.2` |
28
+ | Harness | DeepSeek Harness `0.1.1-rc.2` 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. |
29
29
  | Node | `^22.19.0 || >=24.0.0` |
30
30
  | Platforms | Todas (host + cliente web) |
31
31
  | Model | Cualquiera (inyección en el prompt del sistema) |
package/README.hi.md CHANGED
@@ -25,7 +25,7 @@
25
25
 
26
26
  | Surface | Status |
27
27
  |---|---|
28
- | Harness | DeepSeek Harness `0.1.1-rc.2` |
28
+ | Harness | DeepSeek Harness `0.1.1-rc.2` 0.1.2-alpha.3 (2026-09-01 को अनुकूलित): सत्र लिफ़ाफ़ा अपना ignorable फ़ील्ड केवल संग्रहीत-लॉग पठन संगतता के लिए रखता है - Session.append अभी भी इसे स्टैम्प नहीं कर सकता, इसलिए गेट व्यवहार अपरिवर्तित है। |
29
29
  | Node | `^22.19.0 || >=24.0.0` |
30
30
  | Platforms | सभी (host + वेब क्लाइंट) |
31
31
  | Model | कोई भी (सिस्टम-प्रॉम्प्ट इंजेक्शन) |
package/README.md CHANGED
@@ -28,7 +28,7 @@
28
28
 
29
29
  | Surface | Status |
30
30
  |---|---|
31
- | Harness | DeepSeek Harness `0.1.1-rc.2` |
31
+ | Harness | DeepSeek Harness `0.1.1-rc.2` 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. |
32
32
  | Node | `^22.19.0 || >=24.0.0` |
33
33
  | Platforms | All (host + web client) |
34
34
  | Model | Any (system-prompt injection) |
package/README.pt.md CHANGED
@@ -25,7 +25,7 @@
25
25
 
26
26
  | Surface | Status |
27
27
  |---|---|
28
- | Harness | DeepSeek Harness `0.1.1-rc.2` |
28
+ | Harness | DeepSeek Harness `0.1.1-rc.2` 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. |
29
29
  | Node | `^22.19.0 || >=24.0.0` |
30
30
  | Platforms | Todas (host + cliente web) |
31
31
  | Model | Qualquer (injeção no prompt do sistema) |
package/README.zh.md CHANGED
@@ -27,7 +27,7 @@
27
27
 
28
28
  | Surface | Status |
29
29
  |---|---|
30
- | Harness | DeepSeek Harness `0.1.1-rc.2` |
30
+ | Harness | DeepSeek Harness `0.1.1-rc.2` 0.1.2-alpha.3(2026-09-01 已适配):会话信封保留 ignorable 字段但仅用于存量日志读取兼容——Session.append 仍无法盖章,门控行为不变。 |
31
31
  | Node | `^22.19.0 || >=24.0.0` |
32
32
  | Platforms | 全部(host + Web 客户端) |
33
33
  | Model | 任意(系统提示注入) |
package/lib/index.js CHANGED
@@ -3,7 +3,6 @@ import z from "@deepseek-ai/schemastery";
3
3
  import { resolve } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { watch } from "node:fs";
6
- import { installSettingsSection, settingsNamespace } from "@deepseek-ai/dsh-settings";
7
6
  import { deriveEventMessage, foldSurface } from "@deepseek-ai/dsh-session/surface";
8
7
  //#region lib/types/config.js
9
8
  /**
@@ -477,7 +476,7 @@ const DEFAULT_STYLES_DIR = fileURLToPath(new URL("../styles/", import.meta.url))
477
476
  /** Prompt-section name; a fixed registry key a scoped composition could shadow. */
478
477
  const STYLE_SECTION_NAME = "output-style:selection";
479
478
  /** Settings namespace owning the project-level default (`outputStyle`). */
480
- const SETTINGS_NS = settingsNamespace("output-style");
479
+ const SETTINGS_NS = "output-style";
481
480
  /** Coalescing delay for style-file change events; an internal implementation constant, not a deployment knob. */
482
481
  const WATCH_DEBOUNCE_MS = 250;
483
482
  /**
@@ -719,14 +718,14 @@ async function apply(ctx, config) {
719
718
  };
720
719
  });
721
720
  }
722
- installSettingsSection(ctx, SETTINGS_NS, z.object({ style: z.string().default("") }), { style: resolved.defaultStyle }, {
723
- setSource: (current) => {
724
- runtime.setProjectDefault(() => current().style);
725
- },
726
- onChange: () => {},
727
- validate: (value) => {
728
- if (value.style !== "" && !runtime.styles.has(value.style)) throw new Error(`dsh-output-styles: settings outputStyle "${value.style}" names no style (available: ${[...runtime.styles.keys()].join(", ") || "none"})`);
729
- }
721
+ ctx.inject(["settings"], (settingsCtx) => {
722
+ const scope = settingsCtx.settings.register(SETTINGS_NS, z.object({ style: z.string().default("") }), {
723
+ base: { style: resolved.defaultStyle },
724
+ validate: (value) => {
725
+ if (value.style !== "" && !runtime.styles.has(value.style)) throw new Error(`dsh-output-styles: settings outputStyle "${value.style}" names no style (available: ${[...runtime.styles.keys()].join(", ") || "none"})`);
726
+ }
727
+ });
728
+ runtime.setProjectDefault(() => scope.get().style);
730
729
  });
731
730
  if (!coreActive) {
732
731
  ctx.systemPrompt.section({
@@ -822,30 +821,32 @@ async function apply(ctx, config) {
822
821
  renderText
823
822
  };
824
823
  ctx.provide("outputRenderers", renderService);
825
- installSettingsSection(ctx, settingsNamespace("output-style-rules"), z.object({ rules: z.array(z.object({
826
- match: z.object({
827
- tool: z.string().required(false),
828
- contentType: z.union([
829
- z.const("text"),
830
- z.const("markdown"),
831
- z.const("html")
832
- ]).required(false),
833
- session: z.string().required(false)
834
- }).required(false),
835
- style: z.string().min(1),
836
- priority: z.number().required(false)
837
- })).default([]) }), { rules: resolved.rules }, {
838
- setSource: (current) => {
839
- effectiveRules = current().rules.map((rule) => ({
840
- match: rule.match ?? {},
841
- style: rule.style,
842
- priority: rule.priority ?? 0
843
- }));
844
- },
845
- onChange: () => {},
846
- validate: (value) => {
847
- for (const rule of value.rules) if (rule.style === "" || /[^a-z0-9-]/.test(rule.style)) throw new Error(`dsh-output-styles: rule style ${JSON.stringify(rule.style)} must be a kebab-case renderer id`);
848
- }
824
+ ctx.inject(["settings"], (settingsCtx) => {
825
+ const rulesScope = settingsCtx.settings.register("output-style-rules", z.object({ rules: z.array(z.object({
826
+ match: z.object({
827
+ tool: z.string().required(false),
828
+ contentType: z.union([
829
+ z.const("text"),
830
+ z.const("markdown"),
831
+ z.const("html")
832
+ ]).required(false),
833
+ session: z.string().required(false)
834
+ }).required(false),
835
+ style: z.string().min(1),
836
+ priority: z.number().required(false)
837
+ })).default([]) }), {
838
+ base: { rules: resolved.rules },
839
+ validate: (value) => {
840
+ for (const rule of value.rules) if (rule.style === "" || /[^a-z0-9-]/.test(rule.style)) throw new Error(`dsh-output-styles: rule style ${JSON.stringify(rule.style)} must be a kebab-case renderer id`);
841
+ }
842
+ });
843
+ const adoptRules = (next) => {
844
+ effectiveRules = next.rules;
845
+ };
846
+ adoptRules(rulesScope.get());
847
+ rulesScope.watch((next) => {
848
+ adoptRules(next);
849
+ });
849
850
  });
850
851
  if (resolved.enableExport) ctx.inject(["commands"], (commandCtx) => {
851
852
  commandCtx.commands.register({
@@ -1 +1 @@
1
- {"version":3,"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CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;CACvH;AAED,yFAAyF;AACzF,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GAAG,sBAAsB,GAAG,iBAAiB,GAAG,oBAAoB,CAAA;AAEtH,sFAAsF;AACtF,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEzF;;;;;;;;;;;;;GAaG;AACH,wBAAsB,cAAc,CAClC,EAAE,EAAE,gBAAgB,GAAG,SAAS,EAChC,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAoD3B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-output-styles",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Claude Code outputStyles-equivalent runtime output-style switching for DeepSeek Harness",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -107,7 +107,7 @@
107
107
  ],
108
108
  "compatibility": {
109
109
  "dshVersions": [
110
- "0.1.1-rc.2"
110
+ "0.1.2-alpha.3"
111
111
  ]
112
112
  },
113
113
  "capability": {
@@ -132,13 +132,13 @@
132
132
  },
133
133
  "peerDependencies": {
134
134
  "@deepseek-ai/cordis": "^4.0.1",
135
- "@deepseek-ai/dsh-commands": "0.1.1-rc.2",
135
+ "@deepseek-ai/dsh-commands": ">=0.1.0-rc.8 <0.2.0",
136
136
  "@deepseek-ai/dsh-fs": ">=0.1.0-rc.8 <0.2.0",
137
137
  "@deepseek-ai/dsh-session": ">=0.1.0-rc.8 <0.2.0",
138
138
  "@deepseek-ai/dsh-session-projection": ">=0.1.1-rc.2 <0.2.0",
139
139
  "@deepseek-ai/dsh-settings": ">=0.1.0-rc.8 <0.2.0",
140
140
  "@deepseek-ai/dsh-storage-domain": ">=0.1.0-rc.8 <0.2.0",
141
- "@deepseek-ai/dsh-system-prompt": "0.1.1-rc.2",
141
+ "@deepseek-ai/dsh-system-prompt": ">=0.1.0-rc.8 <0.2.0",
142
142
  "@deepseek-ai/dsh-user-approval": ">=0.1.0-rc.8 <0.2.0",
143
143
  "@deepseek-ai/schemastery": "^3.18.1",
144
144
  "@deepseek-ai/dsh-api-remotes": ">=0.1.1-rc.2 <0.2.0",
@@ -175,32 +175,32 @@
175
175
  }
176
176
  },
177
177
  "devDependencies": {
178
- "@deepseek-ai/cordis": "4.0.1",
178
+ "@deepseek-ai/cordis": "^4.0.2",
179
179
  "@deepseek-ai/cordis-plugin-include": "1.0.6",
180
180
  "@deepseek-ai/cordis-plugin-loader": "1.0.2",
181
- "@deepseek-ai/dsh-agent": "0.1.1-rc.2",
182
- "@deepseek-ai/dsh-api-remotes": "0.1.1-rc.2",
183
- "@deepseek-ai/dsh-attachment": "0.1.1-rc.2",
184
- "@deepseek-ai/dsh-brand": "0.1.1-rc.2",
185
- "@deepseek-ai/dsh-client-locale": "0.1.1-rc.2",
186
- "@deepseek-ai/dsh-client-ui-commands": "0.1.1-rc.2",
187
- "@deepseek-ai/dsh-client-ui-input-trigger": "0.1.1-rc.2",
188
- "@deepseek-ai/dsh-client-ui-slots": "0.1.1-rc.2",
189
- "@deepseek-ai/dsh-commands": "0.1.1-rc.2",
190
- "@deepseek-ai/dsh-llm": "0.1.1-rc.2",
191
- "@deepseek-ai/dsh-scope": "0.1.1-rc.2",
192
- "@deepseek-ai/dsh-session": "0.1.1-rc.2",
193
- "@deepseek-ai/dsh-session-persistence": "0.1.1-rc.2",
194
- "@deepseek-ai/dsh-session-persistence-jsonl": "0.1.1-rc.2",
195
- "@deepseek-ai/dsh-session-projection": "0.1.1-rc.2",
196
- "@deepseek-ai/dsh-settings": "0.1.1-rc.2",
197
- "@deepseek-ai/dsh-storage": "0.1.1-rc.2",
198
- "@deepseek-ai/dsh-storage-domain": "0.1.1-rc.2",
199
- "@deepseek-ai/dsh-storage-json": "0.1.1-rc.2",
200
- "@deepseek-ai/dsh-system-prompt": "0.1.1-rc.2",
201
- "@deepseek-ai/dsh-timeout": "0.1.1-rc.2",
202
- "@deepseek-ai/dsh-typert-protocol": "0.1.1-rc.2",
203
- "@deepseek-ai/schemastery": "3.18.1",
181
+ "@deepseek-ai/dsh-agent": "0.1.2-alpha.3",
182
+ "@deepseek-ai/dsh-api-remotes": "0.1.2-alpha.3",
183
+ "@deepseek-ai/dsh-attachment": "0.1.2-alpha.3",
184
+ "@deepseek-ai/dsh-brand": "0.1.2-alpha.3",
185
+ "@deepseek-ai/dsh-client-locale": "0.1.2-alpha.3",
186
+ "@deepseek-ai/dsh-client-ui-commands": "0.1.2-alpha.3",
187
+ "@deepseek-ai/dsh-client-ui-input-trigger": "0.1.2-alpha.3",
188
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.2-alpha.3",
189
+ "@deepseek-ai/dsh-commands": "0.1.2-alpha.3",
190
+ "@deepseek-ai/dsh-llm": "0.1.2-alpha.3",
191
+ "@deepseek-ai/dsh-scope": "0.1.2-alpha.3",
192
+ "@deepseek-ai/dsh-session": "0.1.2-alpha.3",
193
+ "@deepseek-ai/dsh-session-persistence": "0.1.2-alpha.3",
194
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.1.2-alpha.3",
195
+ "@deepseek-ai/dsh-session-projection": "0.1.2-alpha.3",
196
+ "@deepseek-ai/dsh-settings": "0.1.2-alpha.3",
197
+ "@deepseek-ai/dsh-storage": "0.1.2-alpha.3",
198
+ "@deepseek-ai/dsh-storage-domain": "0.1.2-alpha.3",
199
+ "@deepseek-ai/dsh-storage-json": "0.1.2-alpha.3",
200
+ "@deepseek-ai/dsh-system-prompt": "0.1.2-alpha.3",
201
+ "@deepseek-ai/dsh-timeout": "0.1.2-alpha.3",
202
+ "@deepseek-ai/dsh-typert-protocol": "0.1.2-alpha.3",
203
+ "@deepseek-ai/schemastery": "^3.18.2",
204
204
  "@types/node": "^22.20.0",
205
205
  "@vitest/coverage-v8": "4.1.10",
206
206
  "oxlint": "0.18.1",
package/src/runtime.ts CHANGED
@@ -18,7 +18,7 @@ import type {} from '@deepseek-ai/dsh-session-projection'
18
18
  import type { AssembleContext, PromptAssembly } from '@deepseek-ai/dsh-system-prompt'
19
19
  import type { Domain, DomainFacility, KvTable } from '@deepseek-ai/dsh-storage-domain'
20
20
  import z from '@deepseek-ai/schemastery'
21
- import { installSettingsSection, settingsNamespace } from '@deepseek-ai/dsh-settings'
21
+ import type { SettingsNamespace } from '@deepseek-ai/dsh-settings'
22
22
  import { resolveConfig, type Config } from './config.ts'
23
23
  import { detectCoreOutputStyles } from './coexist.ts'
24
24
  import { installInvariant, PACKAGE_NAME, type InvariantFacts, type InvariantRegistry } from './invariant.ts'
@@ -35,7 +35,7 @@ export const DEFAULT_STYLES_DIR = fileURLToPath(new URL('../styles/', import.met
35
35
  export const STYLE_SECTION_NAME = 'output-style:selection'
36
36
 
37
37
  /** Settings namespace owning the project-level default (`outputStyle`). */
38
- const SETTINGS_NS = settingsNamespace('output-style')
38
+ const SETTINGS_NS = 'output-style' as SettingsNamespace
39
39
 
40
40
  /** Coalescing delay for style-file change events; an internal implementation constant, not a deployment knob. */
41
41
  const WATCH_DEBOUNCE_MS = 250
@@ -337,25 +337,27 @@ export async function apply(ctx: Context, config: Config): Promise<void> {
337
337
  // selected a style fall back to `output-style.style` (user settings layer,
338
338
  // then the composition defaultStyle). Stays inactive until a settings
339
339
  // provider is composed; the settings namespace validates names against the
340
- // live library at write time.
341
- installSettingsSection(
342
- ctx,
343
- SETTINGS_NS,
344
- z.object({ style: z.string().default('') }),
345
- { style: resolved.defaultStyle },
346
- {
347
- setSource: current => { runtime.setProjectDefault(() => current().style) },
348
- onChange: () => {},
349
- validate: value => {
350
- if (value.style !== '' && !runtime.styles.has(value.style)) {
351
- throw new Error(
352
- `dsh-output-styles: settings outputStyle "${value.style}" names no style `
353
- + `(available: ${[...runtime.styles.keys()].join(', ') || 'none'})`,
354
- )
355
- }
340
+ // live library at write time. The 0.1.2-alpha.2 settings seam registers a
341
+ // namespace schema and returns an owner scope (`get`/`watch`); the removed
342
+ // `installSettingsSection` helper no longer exists.
343
+ ctx.inject(['settings'], (settingsCtx) => {
344
+ const scope = settingsCtx.settings.register(
345
+ SETTINGS_NS,
346
+ z.object({ style: z.string().default('') }),
347
+ {
348
+ base: { style: resolved.defaultStyle },
349
+ validate: (value: { style: string }): void => {
350
+ if (value.style !== '' && !runtime.styles.has(value.style)) {
351
+ throw new Error(
352
+ `dsh-output-styles: settings outputStyle "${value.style}" names no style `
353
+ + `(available: ${[...runtime.styles.keys()].join(', ') || 'none'})`,
354
+ )
355
+ }
356
+ },
356
357
  },
357
- },
358
- )
358
+ )
359
+ runtime.setProjectDefault(() => scope.get().style)
360
+ })
359
361
 
360
362
  if (!coreActive) {
361
363
  ctx.systemPrompt.section({
@@ -484,35 +486,37 @@ export async function apply(ctx: Context, config: Config): Promise<void> {
484
486
  // namespace carries the rule table (composition `base` + user overrides);
485
487
  // rules referencing an unknown renderer fail at write time, and rendering
486
488
  // fails loudly at call time if a renderer left the registry.
487
- installSettingsSection(
488
- ctx,
489
- settingsNamespace('output-style-rules'),
490
- z.object({
491
- rules: z.array(z.object({
492
- match: z.object({
493
- tool: z.string().required(false),
494
- contentType: z.union([z.const('text'), z.const('markdown'), z.const('html')]).required(false),
495
- session: z.string().required(false),
496
- }).required(false),
497
- style: z.string().min(1),
498
- priority: z.number().required(false),
499
- })).default([]),
500
- }),
501
- { rules: resolved.rules },
502
- {
503
- setSource: current => {
504
- effectiveRules = current().rules.map(rule => ({ match: rule.match ?? {}, style: rule.style, priority: rule.priority ?? 0 }))
505
- },
506
- onChange: () => {},
507
- validate: value => {
508
- for (const rule of value.rules) {
509
- if (rule.style === '' || /[^a-z0-9-]/.test(rule.style)) {
510
- throw new Error(`dsh-output-styles: rule style ${JSON.stringify(rule.style)} must be a kebab-case renderer id`)
489
+ ctx.inject(['settings'], (settingsCtx) => {
490
+ const rulesScope = settingsCtx.settings.register(
491
+ 'output-style-rules' as SettingsNamespace,
492
+ z.object({
493
+ rules: z.array(z.object({
494
+ match: z.object({
495
+ tool: z.string().required(false),
496
+ contentType: z.union([z.const('text'), z.const('markdown'), z.const('html')]).required(false),
497
+ session: z.string().required(false),
498
+ }).required(false),
499
+ style: z.string().min(1),
500
+ priority: z.number().required(false),
501
+ })).default([]),
502
+ }),
503
+ {
504
+ base: { rules: resolved.rules } as never,
505
+ validate: (value: { rules: ReadonlyArray<{ style: string }> }): void => {
506
+ for (const rule of value.rules) {
507
+ if (rule.style === '' || /[^a-z0-9-]/.test(rule.style)) {
508
+ throw new Error(`dsh-output-styles: rule style ${JSON.stringify(rule.style)} must be a kebab-case renderer id`)
509
+ }
511
510
  }
512
- }
511
+ },
513
512
  },
514
- },
515
- )
513
+ )
514
+ const adoptRules = (next: { rules: readonly StyleRule[] }): void => {
515
+ effectiveRules = next.rules
516
+ }
517
+ adoptRules(rulesScope.get() as unknown as { rules: readonly StyleRule[] })
518
+ rulesScope.watch(next => { adoptRules(next as unknown as { rules: readonly StyleRule[] }) })
519
+ })
516
520
 
517
521
  // The /export command: renders the current session's message surface to
518
522
  // Markdown or sanitized HTML through the renderer pipeline. The document