@linxin666/dsh-pet 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.
Files changed (70) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +64 -1
  3. package/README.zh.md +64 -1
  4. package/assets/decorations/whale/decoration.json +20 -0
  5. package/assets/decorations/whale/whale-frames.png +0 -0
  6. package/contracts/pet-manifest-v2.schema.json +281 -0
  7. package/contracts/status-decoration-v1.schema.json +144 -0
  8. package/contracts/voice-pack-v1.schema.json +234 -0
  9. package/lib/client.js +144 -18
  10. package/lib/client.js.map +1 -1
  11. package/lib/index.js +979 -70
  12. package/lib/types/chatter.d.ts +61 -3
  13. package/lib/types/chatter.d.ts.map +1 -1
  14. package/lib/types/chatter.js +71 -12
  15. package/lib/types/client/PetSettingsCard.d.ts +4 -0
  16. package/lib/types/client/PetSettingsCard.d.ts.map +1 -1
  17. package/lib/types/client/PetSettingsCard.js +3 -1
  18. package/lib/types/client/PetSprite.d.ts.map +1 -1
  19. package/lib/types/client/PetSprite.js +103 -4
  20. package/lib/types/client/locales.d.ts +4 -0
  21. package/lib/types/client/locales.d.ts.map +1 -1
  22. package/lib/types/client/locales.js +4 -0
  23. package/lib/types/client/renderers/live2d.d.ts.map +1 -1
  24. package/lib/types/client/renderers/live2d.js +13 -1
  25. package/lib/types/client/settings-form.d.ts.map +1 -1
  26. package/lib/types/client/settings-form.js +9 -6
  27. package/lib/types/contracts/status-decoration.d.ts +85 -0
  28. package/lib/types/contracts/status-decoration.d.ts.map +1 -0
  29. package/lib/types/contracts/status-decoration.js +21 -0
  30. package/lib/types/decoration.d.ts +39 -0
  31. package/lib/types/decoration.d.ts.map +1 -0
  32. package/lib/types/decoration.js +210 -0
  33. package/lib/types/event-projection.d.ts +8 -3
  34. package/lib/types/event-projection.d.ts.map +1 -1
  35. package/lib/types/event-projection.js +9 -4
  36. package/lib/types/index.d.ts +2 -0
  37. package/lib/types/index.d.ts.map +1 -1
  38. package/lib/types/index.js +2 -0
  39. package/lib/types/registry.d.ts +55 -2
  40. package/lib/types/registry.d.ts.map +1 -1
  41. package/lib/types/registry.js +198 -16
  42. package/lib/types/routes.d.ts.map +1 -1
  43. package/lib/types/routes.js +131 -3
  44. package/lib/types/service.d.ts +33 -0
  45. package/lib/types/service.d.ts.map +1 -1
  46. package/lib/types/service.js +42 -3
  47. package/lib/types/voice-pack.d.ts +98 -0
  48. package/lib/types/voice-pack.d.ts.map +1 -0
  49. package/lib/types/voice-pack.js +384 -0
  50. package/package.json +11 -10
  51. package/src/chatter.test.ts +89 -2
  52. package/src/chatter.ts +120 -14
  53. package/src/client/PetSettingsCard.tsx +18 -0
  54. package/src/client/PetSprite.test.tsx +254 -12
  55. package/src/client/PetSprite.tsx +142 -25
  56. package/src/client/locales.ts +4 -0
  57. package/src/client/renderers/live2d.test.ts +23 -2
  58. package/src/client/renderers/live2d.ts +14 -1
  59. package/src/client/settings-form.ts +8 -6
  60. package/src/contracts/status-decoration.ts +78 -0
  61. package/src/decoration.test.ts +178 -0
  62. package/src/decoration.ts +220 -0
  63. package/src/event-projection.ts +10 -5
  64. package/src/index.ts +2 -0
  65. package/src/registry.test.ts +223 -0
  66. package/src/registry.ts +235 -15
  67. package/src/routes.ts +128 -3
  68. package/src/service.ts +59 -3
  69. package/src/voice-pack.test.ts +216 -0
  70. package/src/voice-pack.ts +413 -0
@@ -1 +1 @@
1
- {"version":3,"file":"settings-form.d.ts","sourceRoot":"","sources":["../../../src/client/settings-form.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAyB,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAGjH,yEAAyE;AACzE,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAA;AAErB,0EAA0E;AA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;IAIjB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,MAAM;IAKd,OAAO,CAAC,OAAO;CAGhB"}
@@ -184,9 +184,12 @@ export class CardForm {
184
184
  if (plan.length === 0 || this.saving || valid.length !== plan.length)
185
185
  return;
186
186
  const plannedWrites = valid.map(item => item.op);
187
- // Snapshot the fields this save writes, so edits staged while it is in
188
- // flight survive: only the staged keys this save actually wrote are cleared.
189
- const fields = new Set(plan.map(item => item.field));
187
+ // Snapshot the staged entries this save writes, so an edit staged while it
188
+ // is in flight (which replaces the same key) survives: only delete the key
189
+ // when the entry is still the one this save started from.
190
+ const pending = new Map();
191
+ for (const item of plan)
192
+ pending.set(item.field, this.staged.get(item.field));
190
193
  this.saving = true;
191
194
  this.failed = false;
192
195
  this.failedReason = undefined;
@@ -211,12 +214,12 @@ export class CardForm {
211
214
  landed.add(item.field);
212
215
  }
213
216
  }
214
- for (const field of fields) {
215
- if (landed.has(field))
217
+ for (const [field, before] of pending) {
218
+ if (landed.has(field) && this.staged.get(field) === before)
216
219
  this.staged.delete(field);
217
220
  }
218
221
  this.saving = false;
219
- this.failed = landed.size !== fields.size;
222
+ this.failed = landed.size !== pending.size;
220
223
  this.publish();
221
224
  }
222
225
  /** The scope's batch surface when it supports one; undefined conservatively otherwise. */
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Status-decoration contract — the L3 extension slot for small status
3
+ * ornaments (issue #623 milestone M5, protocol #567, first reference
4
+ * implementation #463). A decoration is an INDEPENDENT content entry (own
5
+ * id, own directory, own descriptor) whose PNG/WebP sprite strip ornaments
6
+ * the pet center's status bubble chrome; it never touches the pet
7
+ * manifests and never changes the bubble's semantics.
8
+ *
9
+ * Adopted disciplines (#623): entry assets are PNG/WebP sprite strips only
10
+ * (no SVG, no CSS animation); the bubble's own role=status/aria-live (or
11
+ * session-bubble button semantics) always stays intact and the ornament is
12
+ * aria-hidden; load failure or prefers-reduced-motion degrades to no
13
+ * ornament or the static first frame.
14
+ *
15
+ * The ActivityPhase stream the pet center owns drives the ornament: each
16
+ * phase binds to a frame segment (inclusive from/to indices into the
17
+ * strip) or to 'hide' (no ornament for that phase; the default).
18
+ * @module @linxin666/dsh-pet/contracts/status-decoration
19
+ */
20
+ import type { ActivityPhase } from '../state.ts';
21
+ /** Contract version decorations declare against (independent of manifests). */
22
+ export declare const PET_DECORATION_API_VERSION: 'x-org.linxin666.pet-center/status-decoration-v1';
23
+ /** One phase binding: a frame segment, or hidden. */
24
+ export type PhaseSegment = {
25
+ from: number;
26
+ to: number;
27
+ } | 'hide';
28
+ /** The ActivityPhase -> frame-segment binding table (unmapped phases hide). */
29
+ export type PhaseBindings = Partial<Record<ActivityPhase, PhaseSegment>>;
30
+ /** Normalized decoration descriptor as the registry consumes it. */
31
+ export interface DecorationManifest {
32
+ decorationManifestVersion: 1;
33
+ id: string;
34
+ displayName: string;
35
+ license: string;
36
+ /** Strip path relative to the descriptor directory (PNG/WebP). */
37
+ entry: string;
38
+ cell: {
39
+ width: number;
40
+ height: number;
41
+ };
42
+ columns: number;
43
+ /** Per-frame duration ms (same length as columns, or a single constant). */
44
+ durations: number[];
45
+ loop: boolean;
46
+ phases: PhaseBindings;
47
+ }
48
+ /** One structured diagnostic emitted while parsing a descriptor. */
49
+ export interface DecorationDiagnostic {
50
+ level: 'error' | 'warning';
51
+ message: string;
52
+ }
53
+ /** Parse outcome: a usable descriptor plus diagnostics, or rejection. */
54
+ export type DecorationManifestParse = {
55
+ ok: true;
56
+ manifest: DecorationManifest;
57
+ diagnostics: DecorationDiagnostic[];
58
+ } | {
59
+ ok: false;
60
+ diagnostics: DecorationDiagnostic[];
61
+ };
62
+ /**
63
+ * The decoration block the host serves inside the pet state view — exactly
64
+ * what the browser half needs to render the ornament, nothing more. The
65
+ * apiVersion rides the wire so a future protocol revision can be detected
66
+ * and negotiated by clients (review-spd follow-up, pet-center M5).
67
+ */
68
+ export interface DecorationView {
69
+ /** The protocol version this view speaks (PET_DECORATION_API_VERSION). */
70
+ apiVersion: typeof PET_DECORATION_API_VERSION;
71
+ id: string;
72
+ /** Same-origin URL prefix of the decoration's assets. */
73
+ assetBase: string;
74
+ /** Browser URL of the strip. */
75
+ entryUrl: string;
76
+ cell: {
77
+ width: number;
78
+ height: number;
79
+ };
80
+ columns: number;
81
+ durations: number[];
82
+ loop: boolean;
83
+ phases: PhaseBindings;
84
+ }
85
+ //# sourceMappingURL=status-decoration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-decoration.d.ts","sourceRoot":"","sources":["../../../src/contracts/status-decoration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,+EAA+E;AAC/E,eAAO,MAAM,0BAA0B,EAAG,iDAA0D,CAAA;AAEpG,qDAAqD;AACrD,MAAM,MAAM,YAAY,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAA;AAEhE,+EAA+E;AAC/E,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,CAAA;AAExE,oEAAoE;AACpE,MAAM,WAAW,kBAAkB;IACjC,yBAAyB,EAAE,CAAC,CAAA;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IACvC,OAAO,EAAE,MAAM,CAAA;IACf,4EAA4E;IAC5E,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,aAAa,CAAA;CACtB;AAED,oEAAoE;AACpE,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,OAAO,GAAG,SAAS,CAAA;IAC1B,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,yEAAyE;AACzE,MAAM,MAAM,uBAAuB,GAC/B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,kBAAkB,CAAC;IAAC,WAAW,EAAE,oBAAoB,EAAE,CAAA;CAAE,GAC/E;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,WAAW,EAAE,oBAAoB,EAAE,CAAA;CAAE,CAAA;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,UAAU,EAAE,OAAO,0BAA0B,CAAA;IAC7C,EAAE,EAAE,MAAM,CAAA;IACV,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAA;IACjB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IACvC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,aAAa,CAAA;CACtB"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Status-decoration contract — the L3 extension slot for small status
3
+ * ornaments (issue #623 milestone M5, protocol #567, first reference
4
+ * implementation #463). A decoration is an INDEPENDENT content entry (own
5
+ * id, own directory, own descriptor) whose PNG/WebP sprite strip ornaments
6
+ * the pet center's status bubble chrome; it never touches the pet
7
+ * manifests and never changes the bubble's semantics.
8
+ *
9
+ * Adopted disciplines (#623): entry assets are PNG/WebP sprite strips only
10
+ * (no SVG, no CSS animation); the bubble's own role=status/aria-live (or
11
+ * session-bubble button semantics) always stays intact and the ornament is
12
+ * aria-hidden; load failure or prefers-reduced-motion degrades to no
13
+ * ornament or the static first frame.
14
+ *
15
+ * The ActivityPhase stream the pet center owns drives the ornament: each
16
+ * phase binds to a frame segment (inclusive from/to indices into the
17
+ * strip) or to 'hide' (no ornament for that phase; the default).
18
+ * @module @linxin666/dsh-pet/contracts/status-decoration
19
+ */
20
+ /** Contract version decorations declare against (independent of manifests). */
21
+ export const PET_DECORATION_API_VERSION = 'x-org.linxin666.pet-center/status-decoration-v1';
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Status-decoration manifest v1 — fail-closed structure + warn-and-drop
3
+ * content, mirroring the pet manifest-v2 discipline (issue #623 M5,
4
+ * protocol #567). Unknown top-level fields, unsafe entry paths, out-of-
5
+ * range geometry and unknown renderer content reject the descriptor with
6
+ * human-readable diagnostics; per-phase binding issues drop that binding
7
+ * only. The JSON Schema twin lives at
8
+ * contracts/status-decoration-v1.schema.json; this hand-rolled parser is
9
+ * authoritative. Keep this file erasable-syntax-only (scripts/ import it
10
+ * under node's strip-only mode).
11
+ * @module @linxin666/dsh-pet/decoration
12
+ */
13
+ import type { DecorationManifestParse } from './contracts/status-decoration.ts';
14
+ /** Geometry and content caps (the adopted PNG/WebP sprite-strip bounds). */
15
+ export declare const DECORATION_CELL_MAX = 256;
16
+ export declare const DECORATION_COLUMNS_MAX = 16;
17
+ export declare const DECORATION_DURATION_MAX_MS = 2000;
18
+ export declare const DECORATION_ENTRY_EXTENSIONS: readonly ['.webp', '.png'];
19
+ export declare const DECORATION_DISPLAY_NAME_MAX = 64;
20
+ /** Field allow-list (drift-locked to the schema twin in tests). */
21
+ export declare const KNOWN_DECORATION_TOP_LEVEL: Set<string>;
22
+ /**
23
+ * Validate a descriptor-relative entry path: no absolute paths, no
24
+ * backslashes, no traversal, plain safe segments only, and an exact
25
+ * lowercase PNG/WebP extension (the adopted entry discipline — SVG/CSS are
26
+ * not accepted). The extension match is case-sensitive on purpose: the
27
+ * asset route serves the declared path verbatim, so a case-mismatched
28
+ * suffix (frames.PNG vs frames.png) would pass a lenient check but 403 on
29
+ * case-sensitive filesystems.
30
+ * Returns the normalized path or undefined.
31
+ */
32
+ export declare function safeDecorationEntry(raw: unknown): string | undefined;
33
+ /**
34
+ * Parse and validate one decoration.json document. Fail-closed over the
35
+ * structure (types, key sets, paths, ranges); phase-binding content issues
36
+ * drop that binding only (warn-and-drop, the registry never-throw rule).
37
+ */
38
+ export declare function parseDecorationManifest(raw: unknown, source?: string): DecorationManifestParse;
39
+ //# sourceMappingURL=decoration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decoration.d.ts","sourceRoot":"","sources":["../../src/decoration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAGV,uBAAuB,EAGxB,MAAM,kCAAkC,CAAA;AAEzC,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,MAAM,CAAA;AACtC,eAAO,MAAM,sBAAsB,KAAK,CAAA;AACxC,eAAO,MAAM,0BAA0B,OAAO,CAAA;AAC9C,eAAO,MAAM,2BAA2B,YAAI,OAAO,EAAE,MAAM,CAAU,CAAA;AACrE,eAAO,MAAM,2BAA2B,KAAK,CAAA;AAE7C,mEAAmE;AACnE,eAAO,MAAM,0BAA0B,aAGrC,CAAA;AA6BF;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAYpE;AAsBD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,MAAM,GAAE,MAA0B,GACjC,uBAAuB,CAuGzB"}
@@ -0,0 +1,210 @@
1
+ /**
2
+ * Status-decoration manifest v1 — fail-closed structure + warn-and-drop
3
+ * content, mirroring the pet manifest-v2 discipline (issue #623 M5,
4
+ * protocol #567). Unknown top-level fields, unsafe entry paths, out-of-
5
+ * range geometry and unknown renderer content reject the descriptor with
6
+ * human-readable diagnostics; per-phase binding issues drop that binding
7
+ * only. The JSON Schema twin lives at
8
+ * contracts/status-decoration-v1.schema.json; this hand-rolled parser is
9
+ * authoritative. Keep this file erasable-syntax-only (scripts/ import it
10
+ * under node's strip-only mode).
11
+ * @module @linxin666/dsh-pet/decoration
12
+ */
13
+ import { isAbsolute } from 'node:path';
14
+ import { PET_ACTIVITY_PHASES } from './manifest-v2.js';
15
+ /** Geometry and content caps (the adopted PNG/WebP sprite-strip bounds). */
16
+ export const DECORATION_CELL_MAX = 256;
17
+ export const DECORATION_COLUMNS_MAX = 16;
18
+ export const DECORATION_DURATION_MAX_MS = 2000;
19
+ export const DECORATION_ENTRY_EXTENSIONS = ['.webp', '.png'];
20
+ export const DECORATION_DISPLAY_NAME_MAX = 64;
21
+ /** Field allow-list (drift-locked to the schema twin in tests). */
22
+ export const KNOWN_DECORATION_TOP_LEVEL = new Set([
23
+ '$schema', 'decorationManifestVersion', 'id', 'displayName', 'license',
24
+ 'entry', 'cell', 'columns', 'frameMs', 'durations', 'loop', 'phases',
25
+ ]);
26
+ const PET_ID_PATTERN = /^[a-z0-9][a-z0-9-]*$/;
27
+ const PATH_SEGMENT_PATTERN = /^[A-Za-z0-9._-]+$/;
28
+ class Diagnostics {
29
+ list = [];
30
+ source;
31
+ constructor(source) { this.source = source; }
32
+ error(message) { this.list.push({ level: 'error', message: this.source + ': ' + message }); }
33
+ warn(message) { this.list.push({ level: 'warning', message: this.source + ': ' + message }); }
34
+ get hasErrors() { return this.list.some(d => d.level === 'error'); }
35
+ }
36
+ function isRecord(value) {
37
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
38
+ }
39
+ function unknownKeys(source, known) {
40
+ return Object.keys(source).filter(key => !known.has(key));
41
+ }
42
+ /** Positive integer in [min, max], else undefined. */
43
+ function finiteInt(value, min, max) {
44
+ return typeof value === 'number' && Number.isInteger(value) && value >= min && value <= max
45
+ ? value
46
+ : undefined;
47
+ }
48
+ /**
49
+ * Validate a descriptor-relative entry path: no absolute paths, no
50
+ * backslashes, no traversal, plain safe segments only, and an exact
51
+ * lowercase PNG/WebP extension (the adopted entry discipline — SVG/CSS are
52
+ * not accepted). The extension match is case-sensitive on purpose: the
53
+ * asset route serves the declared path verbatim, so a case-mismatched
54
+ * suffix (frames.PNG vs frames.png) would pass a lenient check but 403 on
55
+ * case-sensitive filesystems.
56
+ * Returns the normalized path or undefined.
57
+ */
58
+ export function safeDecorationEntry(raw) {
59
+ if (typeof raw !== 'string' || raw.trim() === '')
60
+ return undefined;
61
+ const value = raw.trim();
62
+ if (value.length > 256)
63
+ return undefined;
64
+ if (isAbsolute(value) || value.includes('\\') || /^[a-z][a-z0-9+.-]*:/i.test(value))
65
+ return undefined;
66
+ const segments = value.split('/').filter(segment => segment !== '');
67
+ if (segments.length === 0)
68
+ return undefined;
69
+ if (segments.some(segment => segment === '.' || segment === '..' || !PATH_SEGMENT_PATTERN.test(segment)))
70
+ return undefined;
71
+ const last = segments[segments.length - 1];
72
+ const dot = last.lastIndexOf('.');
73
+ if (dot <= 0 || !DECORATION_ENTRY_EXTENSIONS.includes(last.slice(dot)))
74
+ return undefined;
75
+ return segments.join('/');
76
+ }
77
+ /** Normalize one phase binding value; undefined (warning) on bad content. */
78
+ function normalizeSegment(raw, columns, diag) {
79
+ if (raw === 'hide')
80
+ return 'hide';
81
+ if (!isRecord(raw)) {
82
+ diag.warn('phase binding must be "hide" or { from, to }; binding dropped');
83
+ return undefined;
84
+ }
85
+ const from = finiteInt(raw.from, 0, columns - 1);
86
+ const to = finiteInt(raw.to, 0, columns - 1);
87
+ if (from === undefined || to === undefined || from > to) {
88
+ diag.warn('phase frame segment out of range; binding dropped');
89
+ return undefined;
90
+ }
91
+ return { from, to };
92
+ }
93
+ /**
94
+ * Parse and validate one decoration.json document. Fail-closed over the
95
+ * structure (types, key sets, paths, ranges); phase-binding content issues
96
+ * drop that binding only (warn-and-drop, the registry never-throw rule).
97
+ */
98
+ export function parseDecorationManifest(raw, source = 'decoration.json') {
99
+ const diag = new Diagnostics(source);
100
+ if (!isRecord(raw)) {
101
+ diag.error('descriptor must be a JSON object');
102
+ return { ok: false, diagnostics: diag.list };
103
+ }
104
+ for (const key of unknownKeys(raw, KNOWN_DECORATION_TOP_LEVEL)) {
105
+ diag.error('unknown top-level field ' + JSON.stringify(key));
106
+ }
107
+ if (raw.decorationManifestVersion !== 1) {
108
+ diag.error('decorationManifestVersion must be 1');
109
+ }
110
+ const id = typeof raw.id === 'string' ? raw.id.trim() : '';
111
+ if (!PET_ID_PATTERN.test(id)) {
112
+ diag.error('id must be a lowercase kebab id');
113
+ }
114
+ if (id.length > 64) {
115
+ diag.error('id must be at most 64 characters');
116
+ }
117
+ const license = typeof raw.license === 'string' ? raw.license.trim() : '';
118
+ if (license === '')
119
+ diag.error('license is required (asset provenance)');
120
+ if (license.length > 128) {
121
+ diag.error('license must be at most 128 characters');
122
+ }
123
+ const entry = safeDecorationEntry(raw.entry);
124
+ if (entry === undefined) {
125
+ diag.error('entry must be a safe relative PNG/WebP path');
126
+ }
127
+ const rawCell = isRecord(raw.cell) ? raw.cell : {};
128
+ for (const key of Object.keys(rawCell)) {
129
+ if (key !== 'width' && key !== 'height')
130
+ diag.warn('unknown cell field ' + JSON.stringify(key) + ' ignored');
131
+ }
132
+ const cellWidth = finiteInt(rawCell.width, 1, DECORATION_CELL_MAX);
133
+ const cellHeight = finiteInt(rawCell.height, 1, DECORATION_CELL_MAX);
134
+ if (cellWidth === undefined || cellHeight === undefined) {
135
+ diag.error('cell width/height must be integers in [1, ' + DECORATION_CELL_MAX + ']');
136
+ }
137
+ const columns = finiteInt(raw.columns, 1, DECORATION_COLUMNS_MAX);
138
+ if (columns === undefined) {
139
+ diag.error('columns must be an integer in [1, ' + DECORATION_COLUMNS_MAX + ']');
140
+ }
141
+ if (diag.hasErrors || id === '' || entry === undefined || columns === undefined) {
142
+ return { ok: false, diagnostics: diag.list };
143
+ }
144
+ const displayName = typeof raw.displayName === 'string' && raw.displayName.trim() !== ''
145
+ ? raw.displayName.trim().slice(0, DECORATION_DISPLAY_NAME_MAX)
146
+ : id;
147
+ let loop;
148
+ if (raw.loop === undefined || typeof raw.loop === 'boolean') {
149
+ loop = raw.loop ?? true;
150
+ }
151
+ else {
152
+ diag.warn('loop must be a boolean; defaulting to true');
153
+ loop = true;
154
+ }
155
+ const rawDurations = raw.durations;
156
+ let durations;
157
+ if (Array.isArray(rawDurations)) {
158
+ const usable = rawDurations.filter((v) => typeof v === 'number' && Number.isInteger(v) && v >= 1 && v <= DECORATION_DURATION_MAX_MS);
159
+ if (usable.length !== columns) {
160
+ diag.warn('durations length must equal columns; using the constant frameMs instead');
161
+ durations = [];
162
+ }
163
+ else {
164
+ durations = usable;
165
+ }
166
+ }
167
+ else if (rawDurations !== undefined) {
168
+ diag.warn('durations must be an array; using the constant frameMs instead');
169
+ durations = [];
170
+ }
171
+ else {
172
+ durations = [];
173
+ }
174
+ if (durations.length === 0) {
175
+ const frameMs = finiteInt(raw.frameMs, 1, DECORATION_DURATION_MAX_MS) ?? 120;
176
+ durations = Array.from({ length: columns }, () => frameMs);
177
+ }
178
+ const phases = {};
179
+ const rawPhases = raw.phases;
180
+ if (isRecord(rawPhases)) {
181
+ for (const [key, value] of Object.entries(rawPhases)) {
182
+ if (!PET_ACTIVITY_PHASES.includes(key)) {
183
+ diag.warn('unknown phase ' + JSON.stringify(key) + '; binding ignored');
184
+ continue;
185
+ }
186
+ const segment = normalizeSegment(value, columns, diag);
187
+ if (segment !== undefined)
188
+ phases[key] = segment;
189
+ }
190
+ }
191
+ else if (rawPhases !== undefined) {
192
+ diag.warn('phases must be an object; all phases hide');
193
+ }
194
+ const visible = Object.values(phases).some(segment => segment !== 'hide');
195
+ if (!visible)
196
+ diag.warn('no phase shows the ornament; the decoration stays hidden');
197
+ const manifest = {
198
+ decorationManifestVersion: 1,
199
+ id,
200
+ displayName,
201
+ license,
202
+ entry,
203
+ cell: { width: cellWidth, height: cellHeight },
204
+ columns,
205
+ durations,
206
+ loop,
207
+ phases,
208
+ };
209
+ return { ok: true, manifest, diagnostics: diag.list };
210
+ }
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import type { SessionEvent } from '@deepseek-ai/dsh-session';
14
14
  import type { PetStateInput } from './state.ts';
15
- import { StatusVoice, WhisperEngine } from './chatter.ts';
15
+ import { StatusVoice, WhisperEngine, type VoicePoolsProvider } from './chatter.ts';
16
16
  /** Runtime shape of the optional legacy activity event. */
17
17
  export interface ActivityStatusEventLike {
18
18
  phase?: string;
@@ -36,8 +36,13 @@ export interface PetActivityTransition {
36
36
  /** A fresh inner whisper woken by this event's model output, when any. */
37
37
  whisper?: string;
38
38
  }
39
- /** Fresh projection runtime for a newly seen session. */
40
- export declare function emptyProjectionRuntime(): ProjectionRuntime;
39
+ /**
40
+ * Fresh projection runtime for a newly seen session. The optional voice-pack
41
+ * provider (pet-center M4, issue #677) hands both chatter engines their
42
+ * pools; engines resolve overrides at draw time, so swapping the provider's
43
+ * pack re-voices live runtimes without rebuilding them.
44
+ */
45
+ export declare function emptyProjectionRuntime(pools?: VoicePoolsProvider): ProjectionRuntime;
41
46
  /** Whether a legacy phase is part of the pet's supported vocabulary. */
42
47
  export declare function isActivityPhase(phase: string): phase is PetStateInput['phase'];
43
48
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"event-projection.d.ts","sourceRoot":"","sources":["../../src/event-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAe,aAAa,EAAE,MAAM,cAAc,CAAA;AAEtE,2DAA2D;AAC3D,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,qEAAqE;AACrE,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACxB,kBAAkB,EAAE,OAAO,CAAA;IAC3B,cAAc,EAAE,OAAO,CAAA;IACvB,qE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QAAQ,EAAE,aAAa,CAAA;CACxB;AAED,kFAAkF;AAClF,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,aAAa,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,CAAC,EAAE,kBAAkB,GAAG,iBAAiB,CAQpF;AAQD,wEAAwE;AACxE,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa,CAAC,OAAO,CAAC,CAE9E;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,iBAAiB,EAC1B,KAAK,GAAE,MAAmB,GACzB,qBAAqB,GAAG,SAAS,CAwFnC"}
@@ -11,14 +11,19 @@
11
11
  * @module @linxin666/dsh-pet/event-projection
12
12
  */
13
13
  import { StatusVoice, toolArgHint, WhisperEngine } from './chatter.js';
14
- /** Fresh projection runtime for a newly seen session. */
15
- export function emptyProjectionRuntime() {
14
+ /**
15
+ * Fresh projection runtime for a newly seen session. The optional voice-pack
16
+ * provider (pet-center M4, issue #677) hands both chatter engines their
17
+ * pools; engines resolve overrides at draw time, so swapping the provider's
18
+ * pack re-voices live runtimes without rebuilding them.
19
+ */
20
+ export function emptyProjectionRuntime(pools) {
16
21
  return {
17
22
  activeTools: new Set(),
18
23
  officialEventsSeen: false,
19
24
  stepHadFailure: false,
20
- voice: new StatusVoice(),
21
- whispers: new WhisperEngine(),
25
+ voice: new StatusVoice(pools),
26
+ whispers: new WhisperEngine(pools),
22
27
  };
23
28
  }
24
29
  /** Keep tool names readable inside the compact status bubble. */
@@ -47,6 +47,7 @@ export declare function makePetSettingsSchema(fallbackPetId: string): z<Schemast
47
47
  bottom: z<number, number>;
48
48
  petId: z<string, string>;
49
49
  enabled: z<boolean, boolean>;
50
+ decorationEnabled: z<boolean, boolean>;
50
51
  }>, Schemastery.ObjectT<{
51
52
  visible: z<boolean, boolean>;
52
53
  size: z<number, number>;
@@ -54,6 +55,7 @@ export declare function makePetSettingsSchema(fallbackPetId: string): z<Schemast
54
55
  bottom: z<number, number>;
55
56
  petId: z<string, string>;
56
57
  enabled: z<boolean, boolean>;
58
+ decorationEnabled: z<boolean, boolean>;
57
59
  }>>;
58
60
  /** Register the pet service and its API + asset routes on the context. */
59
61
  export declare const apply: typeof applyImpl;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAG7C,OAAO,CAAC,MAAM,aAAa,CAAA;AAC3B,OAAO,EAAsC,KAAK,SAAS,EAA2B,MAAM,cAAc,CAAA;AAM1G,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAC9D,YAAY,EACV,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,YAAY,GACb,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,MAAM,GACP,MAAM,eAAe,CAAA;AACtB,YAAY,EACV,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,cAAc,GACf,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,KAAK,GACN,MAAM,YAAY,CAAA;AACnB,YAAY,EACV,aAAa,EACb,YAAY,EACZ,cAAc,EACd,aAAa,EACb,gBAAgB,GACjB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAA;AACpB,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC5E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AAqB,EACrB,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,cAAc,EACd,kBAAkB,GACnB,MAAM,eAAe,CAAA;AACtB,YAAY,EACV,aAAa,EACb,QAAQ,EACR,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAA;AAEtB,OAAO,EACL,aAAa,EACb,cAAc,EACd,gBAAgB,GACjB,MAAM,aAAa,CAAA;AAEpB,sEAAsE;AACtE,eAAO,MAAM,IAAI,QAAQ,CAAA;AAEzB,+DAA+D;AAC/D,eAAO,MAAM,MAAM,UAAgB,CAAA;AAEnC;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,MAAM;;;;;;;;;;;;;;;;IAU1D;AAED,0EAA0E;AAC1E,eAAO,MAAM,KAAK,kBAA6C,CAAA;AAE/D,iBAAS,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,SAAc,GAAG,IAAI,CAgE7D"}
@@ -45,6 +45,7 @@ export function makePetSettingsSchema(fallbackPetId) {
45
45
  bottom: z.number().step(1).min(0).max(DISPLAY_INSET_MAX).default(20),
46
46
  petId: z.string().default(fallbackPetId),
47
47
  enabled: z.boolean().default(true),
48
+ decorationEnabled: z.boolean().default(true),
48
49
  });
49
50
  }
50
51
  /** Register the pet service and its API + asset routes on the context. */
@@ -71,6 +72,7 @@ function applyImpl(ctx, config = {}) {
71
72
  bottom: service.display().bottom,
72
73
  petId: service.selectedPetId(),
73
74
  enabled: config.enabled ?? true,
75
+ decorationEnabled: config.decorationEnabled ?? true,
74
76
  };
75
77
  // The browser half talks to the pet through same-origin JSON endpoints and
76
78
  // loads each pet's atlas from the registry's own media route (RPC domains
@@ -28,6 +28,8 @@
28
28
  */
29
29
  import type { ActivityPhase, PetAnimation } from './state.ts';
30
30
  import { type PetRemarks, type PetRemarksManifest } from './remarks.ts';
31
+ import { type PetPanelView, type VoicePack } from './voice-pack.ts';
32
+ import { type DecorationView } from './contracts/status-decoration.ts';
31
33
  import { type PetRendererKind } from './manifest-v2.ts';
32
34
  /** Fixed row order of the 9-state animation contract. */
33
35
  export declare const PET_ROW_ORDER: readonly PetAnimation[];
@@ -158,6 +160,8 @@ export interface PetDefinition {
158
160
  atlasUrl: string;
159
161
  /** Browser URL of the manifest (served by the host asset route). */
160
162
  manifestUrl: string;
163
+ /** Hover-panel chrome overrides (voice.json 'panel'; pet-center M4). */
164
+ panel?: PetPanelView;
161
165
  }
162
166
  /** A resolved pet plus its host-side file location. */
163
167
  export interface PetEntry extends PetDefinition {
@@ -173,6 +177,11 @@ export interface PetEntry extends PetDefinition {
173
177
  servable: readonly string[];
174
178
  /** Normalized per-pet remark pools (manifest 'remarks'), when declared. */
175
179
  remarks?: PetRemarks;
180
+ /**
181
+ * Normalized per-pet voice pack (the directory's voice.json; pet-center
182
+ * M4). Host-side only — the browser half receives its 'panel' slice.
183
+ */
184
+ voice?: VoicePack;
176
185
  }
177
186
  /** Registry load result: resolved entries plus load warnings. */
178
187
  export interface PetRegistry {
@@ -183,6 +192,31 @@ export interface PetRegistry {
183
192
  byId(id: string): PetEntry | undefined;
184
193
  /** The pet an installation falls back to when the selection is unknown. */
185
194
  defaultEntry(): PetEntry;
195
+ /**
196
+ * The global voice override ('$DSH_HOME/pets/.voice.json'), when present —
197
+ * layers under every per-pet pack and over the built-in pools (M4, #677).
198
+ */
199
+ globalVoice?: VoicePack;
200
+ /**
201
+ * Status decorations (pet-center M5, #567): built-in 'assets/decorations'
202
+ * entries overridden by same-id user entries under
203
+ * '$DSH_HOME/pets/decorations'. Independent of the pet entries. Optional
204
+ * so prebuilt test registries without decorations keep compiling.
205
+ */
206
+ decorations?: DecorationEntry[];
207
+ /** Look up one decoration by id. */
208
+ decorationById?(id: string): DecorationEntry | undefined;
209
+ }
210
+ /** One resolved status decoration plus its host-side file location. */
211
+ export interface DecorationEntry extends DecorationView {
212
+ /** Absolute directory holding the descriptor and strip. */
213
+ dir: string;
214
+ /** Strip path relative to 'dir' (declared by the descriptor). */
215
+ entryPath: string;
216
+ /** Descriptor-relative files the decoration asset route may serve. */
217
+ servable: readonly string[];
218
+ /** Asset license identifier (required by the descriptor). */
219
+ license: string;
186
220
  }
187
221
  /** One structured registry diagnostic (manifest-v2 era). */
188
222
  export interface PetRegistryDiagnostic {
@@ -212,6 +246,16 @@ export declare function resolvePetManifest(raw: unknown, dir: string, options?:
212
246
  assetPrefix?: string;
213
247
  warnings?: string[];
214
248
  }): PetEntry | undefined;
249
+ /**
250
+ * Scan-time read ceiling for user-authored JSON descriptors (voice.json,
251
+ * .voice.json, decoration.json): the registry reads these synchronously at
252
+ * plugin startup, and a pathological file — multi-GB, or a FIFO/device
253
+ * symlink — must not hang or exhaust the host before the warn-and-drop
254
+ * discipline can apply (review-spd follow-up, pet-center M4/M5).
255
+ */
256
+ export declare const PET_SCAN_JSON_CAP: number;
257
+ /** Decoration asset URL prefix (served by the decoration route, M5). */
258
+ export declare const DECORATION_ASSET_PREFIX = "/api/pet/decoration";
215
259
  /**
216
260
  * Load the pet registry: built-in 'assets/*' first, then the hatch-pet
217
261
  * custom pets directory, then composed 'extra' manifests (each later source
@@ -219,8 +263,17 @@ export declare function resolvePetManifest(raw: unknown, dir: string, options?:
219
263
  * bad manifest: it skips it and records a warning.
220
264
  */
221
265
  export declare function loadPetRegistry(options: PetRegistryOptions): PetRegistry;
222
- /** Strip host-only fields, leaving the client-visible definition. */
223
- export declare function petEntryView(entry: PetEntry): PetDefinition;
266
+ /** The built-in default decoration id (M5): the first reference ornament. */
267
+ export declare const DEFAULT_DECORATION_ID = "whale";
268
+ /** Strip host-only fields, leaving the browser-visible decoration view. */
269
+ export declare function decorationView(entry: DecorationEntry): DecorationView;
270
+ /**
271
+ * Strip host-only fields, leaving the client-visible definition. When the
272
+ * registry carries a global voice pack, its panel chrome layers under the
273
+ * entry's own pack (per-slot merge, pet > global), mirroring the voice-pool
274
+ * layering (pet-center M4, issue #677).
275
+ */
276
+ export declare function petEntryView(entry: PetEntry, globalVoice?: VoicePack): PetDefinition;
224
277
  /** The absolute file a pet's atlas resolves to (host asset route). */
225
278
  export declare function petAtlasFile(entry: PetEntry): string;
226
279
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAMH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC7D,OAAO,EAAuB,KAAK,UAAU,EAAE,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAE5F,OAAO,EAAgE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAGrH,yDAAyD;AACzD,eAAO,MAAM,aAAa,EAAE,SAAS,YAAY,EAUhD,CAAA;AAED,6BAA6B;AAC7B,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAED,wDAAwD;AACxD,eAAO,MAAM,gBAAgB,EAAE,OAAqC,CAAA;AACpE,8CAA8C;AAC9C,eAAO,MAAM,mBAAmB,IAAI,CAAA;AACpC,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,IAAI,CAAA;AAEtC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAAgC,CAAA;AAElF,wEAAwE;AACxE,wBAAgB,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,4EAA4E;AAC5E,wBAAgB,YAAY,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,EAAE,IAAI,GAAE,MAAkB,GAAG,MAAM,CAQnG;AAeD,yDAAyD;AACzD,MAAM,WAAW,WAAW;IAC1B,+CAA+C;IAC/C,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,uDAAuD;IACvD,SAAS,EAAE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