genshin-persona 3.8.1 → 3.9.0
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/hooks/hooks.json +1 -1
- package/package.json +7 -4
- package/scripts/genshin.mjs +5 -0
- package/scripts/pick.mjs +5 -0
- package/scripts/speak.mjs +5 -0
- package/scripts/spinner.mjs +5 -0
- package/scripts/status.mjs +5 -0
- package/scripts/voice.mjs +5 -0
- package/skills/genshin/SKILL.md +1 -1
- package/skills/genshin-author/SKILL.md +4 -4
- package/skills/language/SKILL.md +1 -1
- package/skills/mute/SKILL.md +1 -1
- package/skills/pin/SKILL.md +1 -1
- package/skills/reply/SKILL.md +1 -1
- package/skills/roster/SKILL.md +1 -1
- package/skills/setup/SKILL.md +1 -1
- package/skills/status/SKILL.md +1 -1
- package/skills/teardown/SKILL.md +1 -1
- package/skills/today/SKILL.md +1 -1
- package/skills/unmute/SKILL.md +1 -1
- package/skills/unpin/SKILL.md +1 -1
- package/skills/use/SKILL.md +1 -1
- package/skills/voice/SKILL.md +1 -1
- package/skills/volume/SKILL.md +1 -1
- package/src/generated/CharacterLinesLoaderMap.ts +39 -0
- package/src/generated/characterLines/ChineseSimplified.json +4000 -0
- package/src/generated/characterLines/ChineseTraditional.json +4000 -0
- package/src/generated/characterLines/English.json +4000 -0
- package/src/generated/characterLines/French.json +4000 -0
- package/src/generated/characterLines/German.json +4000 -0
- package/src/generated/characterLines/Indonesian.json +4000 -0
- package/src/generated/characterLines/Italian.json +4000 -0
- package/src/generated/characterLines/Japanese.json +4000 -0
- package/src/generated/characterLines/Korean.json +4000 -0
- package/src/generated/characterLines/Portuguese.json +4000 -0
- package/src/generated/characterLines/Russian.json +4000 -0
- package/src/generated/characterLines/Spanish.json +4000 -0
- package/src/generated/characterLines/Thai.json +4000 -0
- package/src/generated/characterLines/Turkish.json +4000 -0
- package/src/generated/characterLines/Vietnamese.json +4000 -0
- package/src/generated/genshinText/generated/GameTextLoaderMap.ts +41 -0
- package/src/generated/genshinText/generated/text/ChineseSimplified.json +18 -0
- package/src/generated/genshinText/generated/text/ChineseTraditional.json +18 -0
- package/src/generated/genshinText/generated/text/English.json +18 -0
- package/src/generated/genshinText/generated/text/French.json +18 -0
- package/src/generated/genshinText/generated/text/German.json +18 -0
- package/src/generated/genshinText/generated/text/Indonesian.json +18 -0
- package/src/generated/genshinText/generated/text/Italian.json +18 -0
- package/src/generated/genshinText/generated/text/Japanese.json +18 -0
- package/src/generated/genshinText/generated/text/Korean.json +18 -0
- package/src/generated/genshinText/generated/text/Portuguese.json +18 -0
- package/src/generated/genshinText/generated/text/Russian.json +18 -0
- package/src/generated/genshinText/generated/text/Spanish.json +18 -0
- package/src/generated/genshinText/generated/text/Thai.json +18 -0
- package/src/generated/genshinText/generated/text/Turkish.json +18 -0
- package/src/generated/genshinText/generated/text/Vietnamese.json +18 -0
- package/src/generated/genshinText/models/GameLanguage.ts +22 -0
- package/src/generated/genshinText/models/GameText.ts +5 -0
- package/src/generated/genshinText/models/GameTextKey.ts +35 -0
- package/src/generated/genshinText/models/TravelerGender.ts +7 -0
- package/src/generated/genshinText/services/GameLanguageTagMap.ts +22 -0
- package/src/generated/genshinText/services/checkIsGameLanguage.ts +9 -0
- package/src/{services → generated/genshinText/services}/fillLinePlaceholders.ts +3 -2
- package/src/generated/genshinText/services/getCanonicalLanguage.ts +14 -0
- package/src/generated/genshinText/services/getLanguageDisplayName.ts +14 -0
- package/src/localizations/chineseSimplified.ts +269 -0
- package/src/localizations/chineseTraditional.ts +270 -0
- package/src/localizations/english.ts +5 -2
- package/src/localizations/french.ts +595 -0
- package/src/localizations/german.ts +595 -0
- package/src/localizations/indonesian.ts +598 -0
- package/src/localizations/italian.ts +630 -0
- package/src/localizations/japanese.ts +2 -2
- package/src/localizations/korean.ts +422 -0
- package/src/localizations/portuguese.ts +618 -0
- package/src/localizations/russian.ts +557 -0
- package/src/localizations/spanish.ts +621 -0
- package/src/localizations/thai.ts +455 -0
- package/src/localizations/turkish.ts +616 -0
- package/src/localizations/vietnamese.ts +627 -0
- package/src/models/GenshinVerb.ts +20 -24
- package/src/models/LocalizationStrings.ts +1 -1
- package/src/models/ResolvedLocalization.ts +5 -2
- package/src/models/SpinnerVerbsMode.ts +4 -4
- package/src/models/TravelerTwin.ts +1 -1
- package/src/models/VoiceLanguage.ts +8 -5
- package/src/models/VoiceRequestType.ts +6 -9
- package/src/models/VoiceStatus.ts +6 -9
- package/src/services/cli/commands/languageCommand.ts +5 -6
- package/src/services/cli/commands/replyCommand.ts +3 -4
- package/src/services/cli/getStatusReport.ts +1 -1
- package/src/services/constants.ts +13 -44
- package/src/services/getBirthdayNote.ts +5 -4
- package/src/services/getPersonaCardName.ts +6 -3
- package/src/services/parseWikiStoryLines.ts +6 -9
- package/src/services/parseWikiTemplateLines.ts +6 -14
- package/src/services/parseWikiTravelerLines.ts +10 -13
- package/src/services/readInterfaceLanguage.ts +9 -7
- package/src/services/readLocalization.ts +12 -5
- package/src/services/readReferenceClip.ts +2 -2
- package/src/services/readRoster.ts +3 -4
- package/src/services/readVoiceLines.ts +28 -28
- package/src/services/readWikiStoryLines.ts +6 -10
- package/src/models/TravelerGender.ts +0 -5
- package/src/models/WikiVoiceOversPage.ts +0 -6
- package/src/services/checkIsLanguageName.ts +0 -8
- package/src/services/getCanonicalLanguage.ts +0 -11
- package/src/services/getLanguageDisplayName.ts +0 -12
- package/src/services/readLanguageNames.ts +0 -8
package/hooks/hooks.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genshin-persona",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "A Claude Code plugin that speaks as the Genshin Impact character whose birthday is nearest: an answer opens with one spoken line in the character's voice and the rest is plain, a joke or a hello is spoken whole, and every line is read aloud in the character's own cloned voice as the reply is written.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
],
|
|
35
35
|
"type": "module",
|
|
36
36
|
"imports": {
|
|
37
|
-
"#src/*": "./src/*.ts"
|
|
37
|
+
"#src/*": "./src/*.ts",
|
|
38
|
+
"#src/*.json": "./src/*.json",
|
|
39
|
+
"#scripts/*": "./scripts/*.ts"
|
|
38
40
|
},
|
|
39
41
|
"publishConfig": {
|
|
40
42
|
"access": "public"
|
|
@@ -51,10 +53,11 @@
|
|
|
51
53
|
"@typesafe-ai/sdk": "^0.6.0",
|
|
52
54
|
"@wasm-audio-decoders/ogg-vorbis": "^0.1.20",
|
|
53
55
|
"citty": "^0.2.2",
|
|
54
|
-
"genshin-db": "^5.2.14"
|
|
56
|
+
"genshin-db": "^5.2.14",
|
|
57
|
+
"tsx": "^4.23.15"
|
|
55
58
|
},
|
|
56
59
|
"engines": {
|
|
57
60
|
"node": ">=26.10.0"
|
|
58
61
|
},
|
|
59
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "f9f6208c35e6cff4ed33910623c798cd88f09301"
|
|
60
63
|
}
|
package/scripts/pick.mjs
ADDED
package/skills/genshin/SKILL.md
CHANGED
|
@@ -9,7 +9,7 @@ user-invocable: false
|
|
|
9
9
|
The plugin picks a character at every session start — by lore through a typed decision when a TypeSafe key is configured, by the nearest birthday otherwise; the verbs below are how the user reads and overrides that. Each verb is its own slash command, `/genshin-persona:<verb>`, for the user to type; this skill is how a request put in words reaches one. Every verb runs the plugin's script and relays its output — the roster is game data the script reads, and nothing about it is known without running it.
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.
|
|
12
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.mjs" <verb> [name]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
| Asked for | Verb |
|
|
@@ -12,9 +12,9 @@ A character with no card is fully usable: the session-start hook prints the name
|
|
|
12
12
|
Newest first, so the queue starts with whoever a player has heard most recently:
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.
|
|
16
|
-
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.
|
|
17
|
-
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.
|
|
15
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.mjs" uncarded # no card at all
|
|
16
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.mjs" unverbed # a card with no verbs
|
|
17
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.mjs" untranslated # no gerunds or greeting in the interface language
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
The third queue is a language's rather than a card's, and it is empty under English, where the gerunds and the greeting are read off the cards themselves. Under any other language they live in one module per language at `src/localizations/<language>.ts`, named the way a card is named for its character: a `characters` map keyed by the character's English name, each entry the person's half of that card — `verbs` and `greeting`, either present once written — beside that language's base Teyvat verbs. A character with no verbs in a module that exists shows the base verbs alone rather than the card's English ones behind localized ones; a language with no module at all inherits English base verbs, so the cards' gerunds show there too. A character with no greeting is greeted in the card's own words, since one line in another script is a queue item where a spinner mixing two is broken. Either way the queue draining is what fills a spinner and a welcome out and never what stops them working.
|
|
@@ -83,7 +83,7 @@ The full reasoning — how a reference is chosen and what its likeness number is
|
|
|
83
83
|
A line is drawn from the character's own in-game lines and story, and one command prints them — the description, then every line the game-data dependency carries, and when it carries none yet, the same lines read off the community wiki's voice-over page for the interface language, which the wiki keeps for the four dubs:
|
|
84
84
|
|
|
85
85
|
```bash
|
|
86
|
-
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.
|
|
86
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.mjs" lines <name>
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
A card is described **in our words** — never a quoted line, never a catchphrase copied verbatim, never a lyric, and never a line reworded closely enough to be recognised. The repository holds no text, image or audio lifted from the game, and a card is the one place that rule is tested by hand. An invented mannerism is not a habit: if the character's lines do not show it, it does not go in, however well it would read.
|
package/skills/language/SKILL.md
CHANGED
|
@@ -8,7 +8,7 @@ disable-model-invocation: true
|
|
|
8
8
|
# Language
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.
|
|
11
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.mjs" language $ARGUMENTS
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Relay its lines as written. The card it prints is the session's card from this reply on.
|
package/skills/mute/SKILL.md
CHANGED
package/skills/pin/SKILL.md
CHANGED
|
@@ -8,7 +8,7 @@ disable-model-invocation: true
|
|
|
8
8
|
# Pin
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.
|
|
11
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.mjs" pin $ARGUMENTS
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Relay its lines as written, and answer as the card it printed from this reply on.
|
package/skills/reply/SKILL.md
CHANGED
|
@@ -8,7 +8,7 @@ disable-model-invocation: true
|
|
|
8
8
|
# Reply
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.
|
|
11
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.mjs" reply $ARGUMENTS
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Relay its lines as written, and write every reply in that language from this one on.
|
package/skills/roster/SKILL.md
CHANGED
package/skills/setup/SKILL.md
CHANGED
package/skills/status/SKILL.md
CHANGED
package/skills/teardown/SKILL.md
CHANGED
package/skills/today/SKILL.md
CHANGED
package/skills/unmute/SKILL.md
CHANGED
package/skills/unpin/SKILL.md
CHANGED
package/skills/use/SKILL.md
CHANGED
|
@@ -8,7 +8,7 @@ disable-model-invocation: true
|
|
|
8
8
|
# Use
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.
|
|
11
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.mjs" use $ARGUMENTS
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Relay its lines as written, and answer as the card it printed from this reply on.
|
package/skills/voice/SKILL.md
CHANGED
|
@@ -8,7 +8,7 @@ disable-model-invocation: true
|
|
|
8
8
|
# Voice
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.
|
|
11
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/genshin.mjs" voice $ARGUMENTS
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Relay its lines as written. The first run downloads the engine's runtime and weights — a couple of gigabytes — and prints its progress; it ends by speaking one sentence as this session's character, so the person hears the voice before the first reply does. It also writes the hook that reads each reply's spoken lines into user settings, which the tool reads once per process, so replies are read from the next session.
|
package/skills/volume/SKILL.md
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { VoiceLine } from "#src/models/VoiceLine";
|
|
2
|
+
|
|
3
|
+
import { GameLanguage } from "#src/generated/genshinText/models/GameLanguage";
|
|
4
|
+
|
|
5
|
+
// Written by `pnpm -C scripts genshin:text write`, never by hand. Each language is a dynamic import on purpose: the
|
|
6
|
+
// Map is the entry every spinner read loads, so the import is the split that keeps the other fourteen languages'
|
|
7
|
+
// Lines, hundreds of kilobytes each, out of it
|
|
8
|
+
export const CharacterLinesLoaderMap: Record<GameLanguage, () => Promise<Record<string, VoiceLine[]>>> = {
|
|
9
|
+
[GameLanguage.ChineseSimplified]: async () =>
|
|
10
|
+
(await import("#src/generated/characterLines/ChineseSimplified.json", { with: { type: "json" } })).default,
|
|
11
|
+
[GameLanguage.ChineseTraditional]: async () =>
|
|
12
|
+
(await import("#src/generated/characterLines/ChineseTraditional.json", { with: { type: "json" } })).default,
|
|
13
|
+
[GameLanguage.English]: async () =>
|
|
14
|
+
(await import("#src/generated/characterLines/English.json", { with: { type: "json" } })).default,
|
|
15
|
+
[GameLanguage.French]: async () =>
|
|
16
|
+
(await import("#src/generated/characterLines/French.json", { with: { type: "json" } })).default,
|
|
17
|
+
[GameLanguage.German]: async () =>
|
|
18
|
+
(await import("#src/generated/characterLines/German.json", { with: { type: "json" } })).default,
|
|
19
|
+
[GameLanguage.Indonesian]: async () =>
|
|
20
|
+
(await import("#src/generated/characterLines/Indonesian.json", { with: { type: "json" } })).default,
|
|
21
|
+
[GameLanguage.Italian]: async () =>
|
|
22
|
+
(await import("#src/generated/characterLines/Italian.json", { with: { type: "json" } })).default,
|
|
23
|
+
[GameLanguage.Japanese]: async () =>
|
|
24
|
+
(await import("#src/generated/characterLines/Japanese.json", { with: { type: "json" } })).default,
|
|
25
|
+
[GameLanguage.Korean]: async () =>
|
|
26
|
+
(await import("#src/generated/characterLines/Korean.json", { with: { type: "json" } })).default,
|
|
27
|
+
[GameLanguage.Portuguese]: async () =>
|
|
28
|
+
(await import("#src/generated/characterLines/Portuguese.json", { with: { type: "json" } })).default,
|
|
29
|
+
[GameLanguage.Russian]: async () =>
|
|
30
|
+
(await import("#src/generated/characterLines/Russian.json", { with: { type: "json" } })).default,
|
|
31
|
+
[GameLanguage.Spanish]: async () =>
|
|
32
|
+
(await import("#src/generated/characterLines/Spanish.json", { with: { type: "json" } })).default,
|
|
33
|
+
[GameLanguage.Thai]: async () =>
|
|
34
|
+
(await import("#src/generated/characterLines/Thai.json", { with: { type: "json" } })).default,
|
|
35
|
+
[GameLanguage.Turkish]: async () =>
|
|
36
|
+
(await import("#src/generated/characterLines/Turkish.json", { with: { type: "json" } })).default,
|
|
37
|
+
[GameLanguage.Vietnamese]: async () =>
|
|
38
|
+
(await import("#src/generated/characterLines/Vietnamese.json", { with: { type: "json" } })).default,
|
|
39
|
+
};
|