@linxin666/dsh-pet 0.2.3 → 0.2.5
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/README.i18n.yaml +2 -2
- package/README.md +65 -2
- package/README.zh.md +65 -2
- package/assets/decorations/whale/decoration.json +20 -0
- package/assets/decorations/whale/whale-frames.png +0 -0
- package/contracts/pet-manifest-v2.schema.json +281 -0
- package/contracts/status-decoration-v1.schema.json +144 -0
- package/contracts/voice-pack-v1.schema.json +234 -0
- package/lib/client.js +251 -43
- package/lib/client.js.map +1 -1
- package/lib/index.js +1139 -100
- package/lib/types/access.d.ts +16 -0
- package/lib/types/access.d.ts.map +1 -0
- package/lib/types/access.js +20 -0
- package/lib/types/chatter.d.ts +61 -3
- package/lib/types/chatter.d.ts.map +1 -1
- package/lib/types/chatter.js +71 -12
- package/lib/types/client/PetSettingsCard.d.ts +4 -0
- package/lib/types/client/PetSettingsCard.d.ts.map +1 -1
- package/lib/types/client/PetSettingsCard.js +11 -3
- package/lib/types/client/PetSprite.d.ts.map +1 -1
- package/lib/types/client/PetSprite.js +111 -4
- package/lib/types/client/locales.d.ts +4 -0
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/client/locales.js +4 -0
- package/lib/types/client/renderers/live2d/Live2dVisualMount.d.ts.map +1 -1
- package/lib/types/client/renderers/live2d/Live2dVisualMount.js +1 -0
- package/lib/types/client/renderers/live2d/runtime.d.ts +13 -1
- package/lib/types/client/renderers/live2d/runtime.d.ts.map +1 -1
- package/lib/types/client/renderers/live2d.d.ts.map +1 -1
- package/lib/types/client/renderers/live2d.js +133 -25
- package/lib/types/client/settings-form.d.ts.map +1 -1
- package/lib/types/client/settings-form.js +9 -6
- package/lib/types/contracts/status-decoration.d.ts +85 -0
- package/lib/types/contracts/status-decoration.d.ts.map +1 -0
- package/lib/types/contracts/status-decoration.js +21 -0
- package/lib/types/decoration.d.ts +39 -0
- package/lib/types/decoration.d.ts.map +1 -0
- package/lib/types/decoration.js +210 -0
- package/lib/types/event-projection.d.ts +8 -3
- package/lib/types/event-projection.d.ts.map +1 -1
- package/lib/types/event-projection.js +9 -4
- package/lib/types/image-dimensions.d.ts +26 -0
- package/lib/types/image-dimensions.d.ts.map +1 -0
- package/lib/types/image-dimensions.js +77 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +3 -1
- package/lib/types/registry.d.ts +55 -2
- package/lib/types/registry.d.ts.map +1 -1
- package/lib/types/registry.js +240 -16
- package/lib/types/routes.d.ts +6 -1
- package/lib/types/routes.d.ts.map +1 -1
- package/lib/types/routes.js +163 -32
- package/lib/types/service.d.ts +33 -0
- package/lib/types/service.d.ts.map +1 -1
- package/lib/types/service.js +42 -3
- package/lib/types/voice-pack.d.ts +98 -0
- package/lib/types/voice-pack.d.ts.map +1 -0
- package/lib/types/voice-pack.js +384 -0
- package/package.json +11 -10
- package/src/access.ts +40 -0
- package/src/chatter.test.ts +89 -2
- package/src/chatter.ts +120 -14
- package/src/client/PetSettingsCard.tsx +26 -2
- package/src/client/PetSprite.test.tsx +325 -12
- package/src/client/PetSprite.tsx +150 -25
- package/src/client/locales.ts +4 -0
- package/src/client/renderers/live2d/Live2dVisualMount.test.tsx +72 -0
- package/src/client/renderers/live2d/Live2dVisualMount.tsx +1 -0
- package/src/client/renderers/live2d/runtime.ts +8 -2
- package/src/client/renderers/live2d.test.ts +233 -9
- package/src/client/renderers/live2d.ts +143 -30
- package/src/client/settings-form.ts +8 -6
- package/src/contracts/status-decoration.ts +78 -0
- package/src/decoration.test.ts +178 -0
- package/src/decoration.ts +220 -0
- package/src/event-projection.ts +10 -5
- package/src/image-dimensions.test.ts +85 -0
- package/src/image-dimensions.ts +76 -0
- package/src/index.ts +3 -1
- package/src/registry.test.ts +276 -0
- package/src/registry.ts +274 -15
- package/src/routes.ts +162 -33
- package/src/service.ts +59 -3
- package/src/voice-pack.test.ts +216 -0
- package/src/voice-pack.ts +413 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://schemas.linxin666.org/dsh-pet/voice-pack-v1.schema.json",
|
|
4
|
+
"title": "DSH Pet Voice Pack v1",
|
|
5
|
+
"description": "Pet-center voice pack (issue #677). Optional voice.json inside a pet directory, or the global $DSH_HOME/pets/.voice.json override — pure JSON content layering status / tool / whisper copy over the built-in pools, plus hover-panel chrome. Structure is fail-closed per file (a non-object root drops the pack); content is warn-and-drop per slot.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"voicePackVersion": {
|
|
13
|
+
"const": 1,
|
|
14
|
+
"description": "Optional; absent reads as v1."
|
|
15
|
+
},
|
|
16
|
+
"status": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"description": "Status copy pools keyed by the eleven StatusScene ids; each key replaces that scene's built-in pool.",
|
|
20
|
+
"properties": {
|
|
21
|
+
"prepare": {
|
|
22
|
+
"$ref": "#/definitions/pool"
|
|
23
|
+
},
|
|
24
|
+
"waiting": {
|
|
25
|
+
"$ref": "#/definitions/pool"
|
|
26
|
+
},
|
|
27
|
+
"thinking": {
|
|
28
|
+
"$ref": "#/definitions/pool"
|
|
29
|
+
},
|
|
30
|
+
"review": {
|
|
31
|
+
"$ref": "#/definitions/pool"
|
|
32
|
+
},
|
|
33
|
+
"toolResult": {
|
|
34
|
+
"$ref": "#/definitions/pool"
|
|
35
|
+
},
|
|
36
|
+
"done": {
|
|
37
|
+
"$ref": "#/definitions/pool"
|
|
38
|
+
},
|
|
39
|
+
"failed": {
|
|
40
|
+
"$ref": "#/definitions/pool"
|
|
41
|
+
},
|
|
42
|
+
"toolFailed": {
|
|
43
|
+
"$ref": "#/definitions/pool"
|
|
44
|
+
},
|
|
45
|
+
"maxTokens": {
|
|
46
|
+
"$ref": "#/definitions/pool"
|
|
47
|
+
},
|
|
48
|
+
"interrupted": {
|
|
49
|
+
"$ref": "#/definitions/pool"
|
|
50
|
+
},
|
|
51
|
+
"blocked": {
|
|
52
|
+
"$ref": "#/definitions/pool"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"tools": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"description": "Tool copy pools keyed by the seventeen ToolCategory ids; {tool} and {hint} interpolate.",
|
|
60
|
+
"properties": {
|
|
61
|
+
"read": {
|
|
62
|
+
"$ref": "#/definitions/pool"
|
|
63
|
+
},
|
|
64
|
+
"write": {
|
|
65
|
+
"$ref": "#/definitions/pool"
|
|
66
|
+
},
|
|
67
|
+
"edit": {
|
|
68
|
+
"$ref": "#/definitions/pool"
|
|
69
|
+
},
|
|
70
|
+
"shell": {
|
|
71
|
+
"$ref": "#/definitions/pool"
|
|
72
|
+
},
|
|
73
|
+
"grep": {
|
|
74
|
+
"$ref": "#/definitions/pool"
|
|
75
|
+
},
|
|
76
|
+
"find": {
|
|
77
|
+
"$ref": "#/definitions/pool"
|
|
78
|
+
},
|
|
79
|
+
"ls": {
|
|
80
|
+
"$ref": "#/definitions/pool"
|
|
81
|
+
},
|
|
82
|
+
"webSearch": {
|
|
83
|
+
"$ref": "#/definitions/pool"
|
|
84
|
+
},
|
|
85
|
+
"webFetch": {
|
|
86
|
+
"$ref": "#/definitions/pool"
|
|
87
|
+
},
|
|
88
|
+
"mcp": {
|
|
89
|
+
"$ref": "#/definitions/pool"
|
|
90
|
+
},
|
|
91
|
+
"memory": {
|
|
92
|
+
"$ref": "#/definitions/pool"
|
|
93
|
+
},
|
|
94
|
+
"subagent": {
|
|
95
|
+
"$ref": "#/definitions/pool"
|
|
96
|
+
},
|
|
97
|
+
"todo": {
|
|
98
|
+
"$ref": "#/definitions/pool"
|
|
99
|
+
},
|
|
100
|
+
"browser": {
|
|
101
|
+
"$ref": "#/definitions/pool"
|
|
102
|
+
},
|
|
103
|
+
"git": {
|
|
104
|
+
"$ref": "#/definitions/pool"
|
|
105
|
+
},
|
|
106
|
+
"ask": {
|
|
107
|
+
"$ref": "#/definitions/pool"
|
|
108
|
+
},
|
|
109
|
+
"generic": {
|
|
110
|
+
"$ref": "#/definitions/pool"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"toolRemaining": {
|
|
115
|
+
"$ref": "#/definitions/pool",
|
|
116
|
+
"description": "The parallel-tools count line pool; {n} interpolates the count."
|
|
117
|
+
},
|
|
118
|
+
"whispers": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"additionalProperties": false,
|
|
121
|
+
"description": "Murmur pools; each section replaces the built-in one as a whole. An explicit empty array mutes that channel.",
|
|
122
|
+
"properties": {
|
|
123
|
+
"generic": {
|
|
124
|
+
"$ref": "#/definitions/pool"
|
|
125
|
+
},
|
|
126
|
+
"rules": {
|
|
127
|
+
"type": "array",
|
|
128
|
+
"maxItems": 32,
|
|
129
|
+
"items": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"additionalProperties": false,
|
|
132
|
+
"required": [
|
|
133
|
+
"keywords",
|
|
134
|
+
"pool"
|
|
135
|
+
],
|
|
136
|
+
"properties": {
|
|
137
|
+
"keywords": {
|
|
138
|
+
"type": "array",
|
|
139
|
+
"maxItems": 16,
|
|
140
|
+
"items": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"maxLength": 40,
|
|
143
|
+
"minLength": 1
|
|
144
|
+
},
|
|
145
|
+
"description": "Lowercase substrings matched against the model's output."
|
|
146
|
+
},
|
|
147
|
+
"pool": {
|
|
148
|
+
"$ref": "#/definitions/pool"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"panel": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"additionalProperties": false,
|
|
158
|
+
"description": "Hover-panel chrome; unset slots keep the client's i18n dictionary copy.",
|
|
159
|
+
"properties": {
|
|
160
|
+
"labels": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"additionalProperties": false,
|
|
163
|
+
"properties": {
|
|
164
|
+
"feed": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"maxLength": 40
|
|
167
|
+
},
|
|
168
|
+
"rename": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"maxLength": 40
|
|
171
|
+
},
|
|
172
|
+
"hide": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"maxLength": 40
|
|
175
|
+
},
|
|
176
|
+
"confirm": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"maxLength": 40
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"stats": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"additionalProperties": false,
|
|
185
|
+
"description": "{rank} / {n} / {points} interpolate the live values.",
|
|
186
|
+
"properties": {
|
|
187
|
+
"rank": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"maxLength": 80
|
|
190
|
+
},
|
|
191
|
+
"treats": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"maxLength": 80
|
|
194
|
+
},
|
|
195
|
+
"points": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"maxLength": 80
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"actions": {
|
|
202
|
+
"type": "array",
|
|
203
|
+
"uniqueItems": true,
|
|
204
|
+
"items": {
|
|
205
|
+
"enum": [
|
|
206
|
+
"feed",
|
|
207
|
+
"rename",
|
|
208
|
+
"hide"
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
"description": "Subset of actions to render in canonical order; absent = all three, [] = none."
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"definitions": {
|
|
217
|
+
"pool": {
|
|
218
|
+
"oneOf": [
|
|
219
|
+
{
|
|
220
|
+
"type": "string",
|
|
221
|
+
"maxLength": 160
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"type": "array",
|
|
225
|
+
"maxItems": 64,
|
|
226
|
+
"items": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"maxLength": 160
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|