Files
shawn 91b878f347 Quaternius weapons, input fixes, sound & path fixes
- Added 6 Quaternius weapon models (Pistol, Revolver, Rifle, Shotgun, P90, SniperRifle)
- Created weapon resource files with balanced stats
- Wired Pistol + Rifle into player.tscn replacing Kenney blasters
- Fixed WASD input (matched input map action names)
- Fixed Escape key toggles mouse capture
- Added Audio autoload singleton
- Fixed broken sound asset paths across all scripts
- Fixed all scene ext_resource text paths (nested under assets/kenney-fps/)
- Fixed all .import source_file paths
- Deleted stale .import files (will be regenerated by editor on open)
2026-07-05 22:53:27 -04:00

36 lines
1.8 KiB
TypeScript

import type { GodotRunner, OperationParams, ToolResponse } from './godot-runner.js';
export declare const MAX_RUNTIME_ERROR_CONTEXT_LINES = 30;
/**
* Wraps the execute + empty-stdout-check + try/catch around a headless GDScript
* operation. Used by the 15 scene/node mutation handlers in tools/scene-tools.ts
* and tools/node-tools.ts to eliminate identical error-handling duplication.
*
* Handlers retain control of: parameter normalization, project/scene validation,
* field validation, and constructing the `params` object — those run before the
* call. Success-shape construction (the JSON wrapping the GDScript stdout) is
* also unchanged: this helper just returns `{ content: [{ type: 'text', text: stdout }] }`,
* which is the exact shape every handler produced previously.
*/
export declare function executeSceneOp(runner: GodotRunner, operation: string, params: OperationParams, projectPath: string, failurePrefix: string, emptyStdoutSolutions: string[], exceptionSolutions?: string[], options?: {
parseStdoutAsJson?: boolean;
}): Promise<ToolResponse>;
export type ParseResult<T> = {
ok: true;
data: T;
} | {
ok: false;
response: ToolResponse;
};
/**
* Parse a JSON frame returned by the McpBridge. On failure, returns a
* structured error response so handlers can short-circuit with one branch.
* `context` should describe which bridge command produced the frame.
*/
export declare function parseBridgeJson<T = unknown>(responseStr: string, context: string): ParseResult<T>;
/**
* Attach captured runtime errors as a `warnings` array on a tool response
* payload. No-op when there are no runtime errors. Truncates to
* `MAX_RUNTIME_ERROR_CONTEXT_LINES` to keep payloads bounded.
*/
export declare function attachRuntimeWarnings(target: Record<string, unknown>, runtimeErrors: string[]): void;
//# sourceMappingURL=handler-helpers.d.ts.map