Conversation
全プラグインのmanifest.jsonおよびnode.tsで、snake_caseの設定キー名を JS/TSの慣例に合わせてcamelCaseに変更。 対象プラグイン: - audio-player: wait_for_completion → waitForCompletion, output_device → outputDevice - avatar-configuration: model_url → modelUrl, idle_animation → idleAnimation, vtube_port → vtubePort, vtube_mouth_param → vtubeMouthParam, vtube_expression_map → vtubeExpressionMap, png_config → pngConfig - motion-trigger: motion_url → motionUrl, emit_events → emitEvents - lip-sync: emit_realtime → emitRealtime, frame_rate → frameRate, mouth_values → mouthValues - obs-source-toggle: scene_name → sceneName, source_name → sourceName - obs-scene-switch: scene_name → sceneName, current_scene → currentScene - emotion-analyzer: custom_mappings → customMappings, llm_provider → llmProvider, llm_api_key → llmApiKey, llm_model → llmModel, emit_events → emitEvents - subtitle-display: font_size → fontSize, font_color → fontColor, background_color → backgroundColor, show_speaker → showSpeaker フロントエンド、サーバー、テンプレート、ドキュメントも同期更新。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughThis PR standardizes configuration field naming conventions across the entire codebase from snake_case to camelCase, aligning with JavaScript/TypeScript conventions. Changes affect plugin manifests, node implementations, web editor components, WebSocket event payloads, documentation, and example templates. No new functionality is introduced. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 8
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
plugins/obs-scene-switch/node.ts (1)
28-29:⚠️ Potential issue | 🟠 MajorUse typed config/input/output contracts instead of
Record<string, any>.Method signatures at lines 28, 56-59 use
Record<string, any>, which prevents compile-time type safety. Define explicit interfaces matching manifest types to catch key mismatches at compile time.Proposed typing refactor
+type OBSSceneSwitchConfig = { + host?: string; + port?: number; + password?: string; + sceneName?: string; +}; + +type OBSSceneSwitchInputs = { + sceneName?: string; +}; + +type OBSSceneSwitchResult = { + success: boolean; + currentScene: string; + scenes: string[]; +}; ... - async setup(config: Record<string, any>, context: NodeContext): Promise<void> { + async setup(config: OBSSceneSwitchConfig, context: NodeContext): Promise<void> { ... - async execute( - inputs: Record<string, any>, - context: NodeContext, - ): Promise<Record<string, any>> { + async execute( + inputs: OBSSceneSwitchInputs, + context: NodeContext, + ): Promise<OBSSceneSwitchResult> {Per coding guidelines,
**/*.ts: Use TypeScript type safety - match manifest types with TypeScript implementations for config, inputs, and outputs.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plugins/obs-scene-switch/node.ts` around lines 28 - 29, The setup and other method signatures (e.g., setup, plus the methods around lines 56-59) currently use Record<string, any>, losing compile-time type safety; define TypeScript interfaces that reflect the plugin manifest's config, input and output contracts (e.g., ObsSceneSwitchConfig, ObsSceneSwitchInputs, ObsSceneSwitchOutputs) and replace Record<string, any> in the signatures for setup and any input/output handlers with these explicit types so the compiler enforces correct keys and value types across the plugin implementation.apps/web/components/panels/NodeSettings.tsx (1)
1212-1660:⚠️ Potential issue | 🟠 MajorRenamed field keys need a legacy-config normalization step in the editor.
After this rename, old workflow configs still containing snake_case keys won’t bind to the new fields, so users can open a node, see defaults, and accidentally overwrite valid previous values on save.
💡 Suggested compatibility normalization (apply when loading selected node config)
+const LEGACY_KEY_MAP: Record<string, Record<string, string>> = { + "avatar-configuration": { + model_url: "modelUrl", + idle_animation: "idleAnimation", + vtube_port: "vtubePort", + png_config: "pngConfig", + }, + "motion-trigger": { motion_url: "motionUrl", emit_events: "emitEvents" }, + "emotion-analyzer": { + llm_provider: "llmProvider", + llm_api_key: "llmApiKey", + llm_model: "llmModel", + custom_mappings: "customMappings", + emit_events: "emitEvents", + }, + "lip-sync": { emit_realtime: "emitRealtime", frame_rate: "frameRate" }, + "audio-player": { + output_device: "outputDevice", + wait_for_completion: "waitForCompletion", + }, + "subtitle-display": { + font_size: "fontSize", + font_color: "fontColor", + background_color: "backgroundColor", + show_speaker: "showSpeaker", + }, + "obs-scene-switch": { scene_name: "sceneName" }, + "obs-source-toggle": { scene_name: "sceneName", source_name: "sourceName" }, +}; + +const normalizeLegacyConfig = (nodeType: string, config: Record<string, unknown>) => { + const map = LEGACY_KEY_MAP[nodeType] ?? {}; + const normalized = { ...config }; + for (const [legacyKey, newKey] of Object.entries(map)) { + if (normalized[newKey] === undefined && normalized[legacyKey] !== undefined) { + normalized[newKey] = normalized[legacyKey]; + } + } + return normalized; +};Then use it where
localConfigis initialized fromselectedNode.config.Also applies to: 1878-1881, 1952-1954
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/web/components/panels/NodeSettings.tsx` around lines 1212 - 1660, SelectedNode rename broke binding for older snake_case keys: when initializing localConfig from selectedNode.config you must normalize legacy keys (e.g., model_url -> modelUrl, idle_animation -> idleAnimation, vtube_port -> vtubePort, png_config -> pngConfig, auto_emotion -> auto_emotion -> auto_emotion? map to auto_emotion -> auto_emotion? — map snake_case to their camelCase equivalents used in the fields) so old configs don't get overwritten; implement a small normalization helper called (for example) normalizeLegacyConfig and call it where localConfig is created from selectedNode.config (refer to selectedNode and localConfig in the editor component) to copy/translate snake_case keys to the new camelCase field keys before using them.plugins/motion-trigger/manifest.json (1)
79-83:⚠️ Potential issue | 🟡 MinorUpdate legacy config description text to match new key naming.
The
motiondescription still saysuse motion_url instead, which is outdated after the rename tomotionUrl.✏️ Suggested text fix
- "description": "Motion/animation name to trigger (use motion_url instead)", + "description": "Motion/animation name to trigger (use motionUrl instead)",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plugins/motion-trigger/manifest.json` around lines 79 - 83, The manifest entry for the "motion" config option still instructs users to "use motion_url instead"; update the description for the "motion" key in manifest.json to reference the new camelCase key name ("motionUrl") — e.g., change the text "use motion_url instead" to "use motionUrl instead" while keeping the rest of the description intact so it reflects the new key naming.
🧹 Nitpick comments (3)
plugins/motion-trigger/node.ts (2)
60-60: Stale comment: updatemotion_urltomotionUrl.📝 Suggested fix
- // Emit motion event if configured (motion_url takes priority) + // Emit motion event if configured (motionUrl takes priority)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plugins/motion-trigger/node.ts` at line 60, The inline comment is stale: replace the snake_case reference `motion_url` with the code's actual camelCase name `motionUrl` so the comment matches the implementation; update the comment near the motion emission logic (the line mentioning motion_url) to reference `motionUrl` and ensure any surrounding comments consistently use `motionUrl`.
5-5: Stale documentation: updateemit_eventstoemitEvents.The doc comment still references
emit_events(snake_case) but the config key is nowemitEvents.📝 Suggested fix
-* Can also emit events directly if emit_events is enabled. +* Can also emit events directly if emitEvents is enabled.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plugins/motion-trigger/node.ts` at line 5, Update the stale doc comment that references the old config key `emit_events` to the current camelCase key `emitEvents` in the plugins/motion-trigger/node.ts file; search for the doc comment near the module/class or function that handles emitting events (look for symbols like the motion trigger node class or its configuration usage, e.g., references to emitEvents in the code) and replace `emit_events` with `emitEvents` so the documentation matches the actual config key.apps/web/app/(overlay)/overlay/[id]/client-page.tsx (1)
228-251: Consider extracting only known fields instead of spreadingrestinto state.Line 250 spreads the entire
restobject intoavatarState, which could introduce unexpected fields from the event payload into the component state. While this may be intentional for flexibility, it could lead to subtle bugs if the backend sends additional fields.💡 Suggested fix to explicitly pick known fields
- setAvatarState((prev) => ({ ...prev, ...rest })); + // Only apply known avatar state fields from the event + const { expression, mouthOpen, motion, lookAt } = rest; + setAvatarState((prev) => ({ + ...prev, + ...(expression !== undefined && { expression }), + ...(mouthOpen !== undefined && { mouthOpen }), + ...(motion !== undefined && { motion }), + ...(lookAt !== undefined && { lookAt }), + }));🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/web/app/`(overlay)/overlay/[id]/client-page.tsx around lines 228 - 251, The handler for the 'avatar.update' event currently spreads the entire rest object into state via setAvatarState((prev) => ({ ...prev, ...rest })); instead extract and assign only the known fields (e.g., renderer, modelUrl, idleAnimation/animationUrl, vtubePort, vtubeMouthParam, vtubeExpressionMap, plus any other explicitly allowed keys) and merge those into prev to avoid injecting unexpected properties; update the case block to build a whitelist object from rest and pass that to setAvatarState instead of spreading rest directly, keeping the existing setAvatarConfig logic as-is.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/server-ts/src/engine/executor.ts`:
- Around line 311-316: The avatarConfig reads only camelCase keys (vtubePort,
vtubeMouthParam, vtubeExpressionMap) causing loss of existing snake_case
settings; update the resolution logic around avatarConfig (where port,
mouthParam, rawMap/expressionMap are set) to accept both camelCase and
snake_case keys (vtubePort or vtube_port, vtubeMouthParam or vtube_mouth_param,
vtubeExpressionMap or vtube_expression_map), prefer the camelCase value if
present but fall back to the snake_case equivalent, and coerce types
consistently (number for port, string for mouthParam,
object/Record<string,string> for expressionMap) so existing workflows remain
compatible.
In `@apps/web/app/`(editor)/editor/[id]/client-page.tsx:
- Around line 175-176: The editor preview now only reads camelCase keys and will
drop older snake_case values; update the avatar config reads so modelUrl and
animationUrl fall back to legacy keys: when resolving avatarNode?.config, check
avatarNode?.config?.modelUrl || avatarNode?.config?.model_url ||
DEFAULT_MODEL_URL for modelUrl, and avatarNode?.config?.idleAnimation ||
avatarNode?.config?.idle_animation for animationUrl (keep DEFAULT_MODEL_URL as
final fallback); change the assignments where modelUrl and animationUrl are set
to include these legacy-key fallbacks so existing saved workflows keep their
assets.
In `@apps/web/app/`(editor)/preview/[id]/client-page.tsx:
- Around line 108-115: The preview config only falls back to legacy snake_case
for modelUrl, causing old workflows to lose animationUrl, vtubePort, and
pngConfig; update the setAvatarConfig call (and any reads of avatarNode.config)
to use legacy fallbacks: use avatarNode.config.animationUrl ||
avatarNode.config.animation_url for animationUrl, avatarNode.config.vtubePort ||
avatarNode.config.vtube_port for vtubePort, and avatarNode.config.pngConfig ||
avatarNode.config.png_config for pngConfig (keeping the existing modelUrl/vrm
fallback logic intact).
In `@plugins/lip-sync/node.ts`:
- Around line 21-22: Ensure backward compatibility by accepting snake_case
config keys and emitting snake_case fields in outputs: when setting options,
read both emitRealtime and emit_realtime, and frameRate and frame_rate (e.g.,
replace the assignments around emitRealtime/frameRate to prefer camelCase but
fallback to snake_case); likewise when producing result payloads include both
mouthValues and mouth_values, emitRealtime and emit_realtime, frameRate and
frame_rate. Apply this aliasing consistently in the initialization code (where
emitRealtime and frameRate are set) and in all early/final return payloads
mentioned (the blocks around the other affected lines).
In `@plugins/obs-scene-switch/node.ts`:
- Line 40: Update configuration/read and output paths to support both camelCase
and snake_case keys: when initializing this.sceneName (currently using
config.sceneName) also fallback to config.scene_name if present; likewise,
wherever the code returns or emits currentScene, also populate/emit
current_scene (and accept current_scene when reading inputs) to preserve
compatibility. Search for assignments/returns referencing this.sceneName and the
output key currentScene and add symmetric handling for scene_name/current_scene
(read old key into the same variable, and emit both keys) so existing saved
workflows continue to work while you can deprecate the snake_case names later.
In `@plugins/obs-source-toggle/manifest.json`:
- Around line 44-48: Update the plugin to use camelCase keys everywhere: ensure
manifest.json defines "sourceName" and "sceneName", update the execute method to
return an object with sourceName (not source_name), and update the setup/init
code to read config.sceneName and config.sourceName; to avoid breaking existing
users, add fallback handling in your setup and execute call sites to accept
snake_case inputs (config.source_name/config.scene_name) and map them to the
camelCase variables used by functions like setup and execute.
In `@plugins/obs-source-toggle/node.ts`:
- Around line 42-43: The constructor and all output-return locations currently
only use camelCase config keys and return values (this.sceneName,
this.sourceName, config.sceneName, config.sourceName), which breaks older
configs using snake_case; update the constructor to read legacy keys
(config.scene_name ?? config.sceneName ?? "" and config.source_name ??
config.sourceName ?? ""), and update every execute/return path that emits
sourceName to also include the snake_case aliases in the returned object (emit
both sourceName and source_name, and sceneName and scene_name where applicable)
so existing workflows remain compatible; apply the same alias pattern to the
other return paths referenced (lines around 65-66, 76-77, 82-83, 101-102,
137-141).
In `@plugins/subtitle-display/node.ts`:
- Around line 23-26: The current setup only reads camelCase config keys
(this.fontSize, this.fontColor, this.backgroundColor, this.showSpeaker) and will
ignore older snake_case keys; update the initialization to check camelCase
first, then fall back to snake_case (font_size, font_color, background_color,
show_speaker) before using the default values so existing saved configs are
respected; implement this logic within the same setup/constructor block where
config is read so the precedence is: config.fontSize || config.font_size ||
default, and similarly for fontColor/font_color,
backgroundColor/background_color, and showSpeaker/show_speaker.
---
Outside diff comments:
In `@apps/web/components/panels/NodeSettings.tsx`:
- Around line 1212-1660: SelectedNode rename broke binding for older snake_case
keys: when initializing localConfig from selectedNode.config you must normalize
legacy keys (e.g., model_url -> modelUrl, idle_animation -> idleAnimation,
vtube_port -> vtubePort, png_config -> pngConfig, auto_emotion -> auto_emotion
-> auto_emotion? map to auto_emotion -> auto_emotion? — map snake_case to their
camelCase equivalents used in the fields) so old configs don't get overwritten;
implement a small normalization helper called (for example)
normalizeLegacyConfig and call it where localConfig is created from
selectedNode.config (refer to selectedNode and localConfig in the editor
component) to copy/translate snake_case keys to the new camelCase field keys
before using them.
In `@plugins/motion-trigger/manifest.json`:
- Around line 79-83: The manifest entry for the "motion" config option still
instructs users to "use motion_url instead"; update the description for the
"motion" key in manifest.json to reference the new camelCase key name
("motionUrl") — e.g., change the text "use motion_url instead" to "use motionUrl
instead" while keeping the rest of the description intact so it reflects the new
key naming.
In `@plugins/obs-scene-switch/node.ts`:
- Around line 28-29: The setup and other method signatures (e.g., setup, plus
the methods around lines 56-59) currently use Record<string, any>, losing
compile-time type safety; define TypeScript interfaces that reflect the plugin
manifest's config, input and output contracts (e.g., ObsSceneSwitchConfig,
ObsSceneSwitchInputs, ObsSceneSwitchOutputs) and replace Record<string, any> in
the signatures for setup and any input/output handlers with these explicit types
so the compiler enforces correct keys and value types across the plugin
implementation.
---
Nitpick comments:
In `@apps/web/app/`(overlay)/overlay/[id]/client-page.tsx:
- Around line 228-251: The handler for the 'avatar.update' event currently
spreads the entire rest object into state via setAvatarState((prev) => ({
...prev, ...rest })); instead extract and assign only the known fields (e.g.,
renderer, modelUrl, idleAnimation/animationUrl, vtubePort, vtubeMouthParam,
vtubeExpressionMap, plus any other explicitly allowed keys) and merge those into
prev to avoid injecting unexpected properties; update the case block to build a
whitelist object from rest and pass that to setAvatarState instead of spreading
rest directly, keeping the existing setAvatarConfig logic as-is.
In `@plugins/motion-trigger/node.ts`:
- Line 60: The inline comment is stale: replace the snake_case reference
`motion_url` with the code's actual camelCase name `motionUrl` so the comment
matches the implementation; update the comment near the motion emission logic
(the line mentioning motion_url) to reference `motionUrl` and ensure any
surrounding comments consistently use `motionUrl`.
- Line 5: Update the stale doc comment that references the old config key
`emit_events` to the current camelCase key `emitEvents` in the
plugins/motion-trigger/node.ts file; search for the doc comment near the
module/class or function that handles emitting events (look for symbols like the
motion trigger node class or its configuration usage, e.g., references to
emitEvents in the code) and replace `emit_events` with `emitEvents` so the
documentation matches the actual config key.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (32)
apps/server-ts/src/engine/executor.tsapps/web/app/(editor)/editor/[id]/client-page.tsxapps/web/app/(editor)/preview/[id]/client-page.tsxapps/web/app/(overlay)/overlay/[id]/client-page.tsxapps/web/components/editor/Canvas.tsxapps/web/components/panels/NodeSettings.tsxapps/web/hooks/useWebSocket.tsdocs/api-reference.ja.mddocs/api-reference.mdplugins/audio-player/manifest.jsonplugins/audio-player/node.tsplugins/avatar-configuration/manifest.jsonplugins/avatar-configuration/node.tsplugins/emotion-analyzer/manifest.jsonplugins/emotion-analyzer/node.tsplugins/lip-sync/manifest.jsonplugins/lip-sync/node.tsplugins/motion-trigger/manifest.jsonplugins/motion-trigger/node.tsplugins/obs-scene-switch/manifest.jsonplugins/obs-scene-switch/node.tsplugins/obs-source-toggle/manifest.jsonplugins/obs-source-toggle/node.tsplugins/subtitle-display/manifest.jsonplugins/subtitle-display/node.tstemplates/discord-bot.jsontemplates/simple-vtuber.jsontemplates/streaming-vtuber.jsontemplates/twitch-vtuber.jsontemplates/voice-chatbot.jsontemplates/vtube-studio-vtuber.jsontemplates/youtube-vtuber.json
| const workflowModelUrl = avatarNode.config.modelUrl || avatarNode.config.vrm_model; | ||
| setAvatarConfig((prev) => ({ | ||
| renderer: avatarNode.config.renderer || 'vrm', | ||
| // Keep saved model URL if workflow doesn't have one | ||
| modelUrl: workflowModelUrl || prev.modelUrl, | ||
| animationUrl: avatarNode.config.animation_url, | ||
| vtubePort: avatarNode.config.vtube_port, | ||
| pngConfig: avatarNode.config.png_config, | ||
| animationUrl: avatarNode.config.animationUrl, | ||
| vtubePort: avatarNode.config.vtubePort, | ||
| pngConfig: avatarNode.config.pngConfig, |
There was a problem hiding this comment.
Add legacy key fallback for preview config to prevent migration regressions.
Only modelUrl has a legacy fallback path right now. animationUrl, vtubePort, and pngConfig no longer read snake_case fields, so older workflows can lose expected preview behavior.
💡 Suggested compatibility-safe patch
- const workflowModelUrl = avatarNode.config.modelUrl || avatarNode.config.vrm_model;
+ const workflowModelUrl =
+ avatarNode.config.modelUrl ||
+ avatarNode.config.model_url ||
+ avatarNode.config.vrm_model;
setAvatarConfig((prev) => ({
renderer: avatarNode.config.renderer || 'vrm',
// Keep saved model URL if workflow doesn't have one
modelUrl: workflowModelUrl || prev.modelUrl,
- animationUrl: avatarNode.config.animationUrl,
- vtubePort: avatarNode.config.vtubePort,
- pngConfig: avatarNode.config.pngConfig,
+ animationUrl: avatarNode.config.animationUrl || avatarNode.config.animation_url || avatarNode.config.idle_animation,
+ vtubePort: avatarNode.config.vtubePort || avatarNode.config.vtube_port,
+ pngConfig: avatarNode.config.pngConfig || avatarNode.config.png_config,
}));🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@apps/web/app/`(editor)/preview/[id]/client-page.tsx around lines 108 - 115,
The preview config only falls back to legacy snake_case for modelUrl, causing
old workflows to lose animationUrl, vtubePort, and pngConfig; update the
setAvatarConfig call (and any reads of avatarNode.config) to use legacy
fallbacks: use avatarNode.config.animationUrl || avatarNode.config.animation_url
for animationUrl, avatarNode.config.vtubePort || avatarNode.config.vtube_port
for vtubePort, and avatarNode.config.pngConfig || avatarNode.config.png_config
for pngConfig (keeping the existing modelUrl/vrm fallback logic intact).
| this.emitRealtime = config.emitRealtime ?? true; | ||
| this.frameRate = Number(config.frameRate ?? 30); |
There was a problem hiding this comment.
Keep temporary snake_case compatibility for config and outputs.
Line 21-22 and return payloads now assume camelCase only. Older workflows/integrations using emit_realtime, frame_rate, or mouth_values will regress.
💡 Compatibility bridge example
- this.emitRealtime = config.emitRealtime ?? true;
- this.frameRate = Number(config.frameRate ?? 30);
+ this.emitRealtime = config.emitRealtime ?? config.emit_realtime ?? true;
+ this.frameRate = Number(config.frameRate ?? config.frame_rate ?? 30);- return { mouthValues: [], duration: 0.0, audio: "" };
+ return { mouthValues: [], mouth_values: [], duration: 0.0, audio: "" };(Apply the same aliasing to all early/final returns.)
Also applies to: 50-53, 61-63, 71-73, 86-90
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@plugins/lip-sync/node.ts` around lines 21 - 22, Ensure backward compatibility
by accepting snake_case config keys and emitting snake_case fields in outputs:
when setting options, read both emitRealtime and emit_realtime, and frameRate
and frame_rate (e.g., replace the assignments around emitRealtime/frameRate to
prefer camelCase but fallback to snake_case); likewise when producing result
payloads include both mouthValues and mouth_values, emitRealtime and
emit_realtime, frameRate and frame_rate. Apply this aliasing consistently in the
initialization code (where emitRealtime and frameRate are set) and in all
early/final return payloads mentioned (the blocks around the other affected
lines).
| this.port = config.port ?? 4455; | ||
| this.password = config.password ?? ""; | ||
| this.sceneName = config.scene_name ?? ""; | ||
| this.sceneName = config.sceneName ?? ""; |
There was a problem hiding this comment.
Add temporary snake_case fallbacks to avoid breaking existing saved workflows.
Line 40 and Line 77 now read only camelCase keys, and Lines 61/72/81/97/108/112 return only currentScene. Existing flows using scene_name / current_scene will silently break after upgrade. Please keep a compatibility window (read old+new keys, optionally emit both outputs) and deprecate old keys in a later release.
Proposed compatibility patch
- this.sceneName = config.sceneName ?? "";
+ this.sceneName = config.sceneName ?? config.scene_name ?? "";
...
- const targetScene: string = inputs.sceneName ?? this.sceneName;
+ const targetScene: string =
+ inputs.sceneName ?? inputs.scene_name ?? this.sceneName;
...
- return { success: true, currentScene: currentScene, scenes };
+ return {
+ success: true,
+ currentScene,
+ current_scene: currentScene, // temporary backward compatibility
+ scenes,
+ };
...
- return { success: false, currentScene: "", scenes: [] };
+ return { success: false, currentScene: "", current_scene: "", scenes: [] };Also applies to: 61-61, 72-72, 77-77, 81-81, 97-97, 108-108, 112-112
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@plugins/obs-scene-switch/node.ts` at line 40, Update configuration/read and
output paths to support both camelCase and snake_case keys: when initializing
this.sceneName (currently using config.sceneName) also fallback to
config.scene_name if present; likewise, wherever the code returns or emits
currentScene, also populate/emit current_scene (and accept current_scene when
reading inputs) to preserve compatibility. Search for assignments/returns
referencing this.sceneName and the output key currentScene and add symmetric
handling for scene_name/current_scene (read old key into the same variable, and
emit both keys) so existing saved workflows continue to work while you can
deprecate the snake_case names later.
| this.sceneName = config.sceneName ?? ""; | ||
| this.sourceName = config.sourceName ?? ""; |
There was a problem hiding this comment.
Add legacy config/output aliases to avoid breaking existing workflows.
Line 42 and Line 43 now read only camelCase keys, and all execute returns now expose only sourceName. Existing workflows saved with scene_name / source_name can silently fail after upgrade.
💡 Migration-safe fallback (minimal)
- this.sceneName = config.sceneName ?? "";
- this.sourceName = config.sourceName ?? "";
+ this.sceneName = config.sceneName ?? config.scene_name ?? "";
+ this.sourceName = config.sourceName ?? config.source_name ?? "";- return { success: false, visible: false, sourceName: this.sourceName };
+ return {
+ success: false,
+ visible: false,
+ sourceName: this.sourceName,
+ source_name: this.sourceName,
+ };(Apply the same alias pattern to other return paths.)
Also applies to: 65-66, 76-77, 82-83, 101-102, 137-141
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@plugins/obs-source-toggle/node.ts` around lines 42 - 43, The constructor and
all output-return locations currently only use camelCase config keys and return
values (this.sceneName, this.sourceName, config.sceneName, config.sourceName),
which breaks older configs using snake_case; update the constructor to read
legacy keys (config.scene_name ?? config.sceneName ?? "" and config.source_name
?? config.sourceName ?? ""), and update every execute/return path that emits
sourceName to also include the snake_case aliases in the returned object (emit
both sourceName and source_name, and sceneName and scene_name where applicable)
so existing workflows remain compatible; apply the same alias pattern to the
other return paths referenced (lines around 65-66, 76-77, 82-83, 101-102,
137-141).
既存のワークフローで保存されたsnake_caseキーが新しいcamelCase キーに移行後も正しく読み込まれるよう、全箇所にフォールバック 処理を追加。 - NodeSettings: normalizeLegacyConfig関数で読み込み時に自動変換 - executor.ts: VTube Studio設定のsnake_caseフォールバック - editor/preview/overlay: アバター設定読み込み時のフォールバック - 全プラグインnode.ts: config読み取り時のsnake_caseフォールバック (avatar-configuration, motion-trigger, emotion-analyzer, lip-sync, audio-player, subtitle-display, obs-scene-switch, obs-source-toggle) - overlay: avatar.updateでrest展開ではなくホワイトリスト方式に変更 - motion-trigger: manifest.jsonとコメントの古いsnake_case参照を修正 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
概要
プラグインの
manifest.jsonにおける設定キー名(config keys)がsnake_caseとcamelCaseで混在していた問題を修正し、JS/TSの慣例に合わせてcamelCaseに統一しました。対象プラグイン(8プラグイン)
wait_for_completion,output_devicewaitForCompletion,outputDevicemodel_url,idle_animation,vtube_port,vtube_mouth_param,vtube_expression_map,png_configmodelUrl,idleAnimation,vtubePort,vtubeMouthParam,vtubeExpressionMap,pngConfigmotion_url,emit_eventsmotionUrl,emitEventsemit_realtime,frame_rate,mouth_values(出力)emitRealtime,frameRate,mouthValuesscene_name,source_namesceneName,sourceNamescene_name,current_scene(出力)sceneName,currentScenecustom_mappings,llm_provider,llm_api_key,llm_model,emit_eventscustomMappings,llmProvider,llmApiKey,llmModel,emitEventsfont_size,font_color,background_color,show_speakerfontSize,fontColor,backgroundColor,showSpeaker変更範囲
manifest.jsonとnode.tsテスト計画
npm test)closes #104
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Summary by CodeRabbit