@akiojin/unity-mcp-server 5.5.0 → 5.5.1
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/package.json
CHANGED
|
@@ -529,7 +529,7 @@ async function runBuild() {
|
|
|
529
529
|
const fastSql = await import('@akiojin/fast-sql');
|
|
530
530
|
Database = fastSql.Database;
|
|
531
531
|
} catch (e) {
|
|
532
|
-
throw new Error(`fast-sql unavailable in worker: ${e.message}
|
|
532
|
+
throw new Error(`fast-sql unavailable in worker: ${e.message}`, { cause: e });
|
|
533
533
|
}
|
|
534
534
|
|
|
535
535
|
// Open or create database using Database.create() for better-sqlite3 support
|
|
@@ -693,7 +693,7 @@ async function runBuild() {
|
|
|
693
693
|
await lsp.start();
|
|
694
694
|
log('info', `[worker] Worker-local LSP initialized`);
|
|
695
695
|
} catch (e) {
|
|
696
|
-
throw new Error(`LSP initialization failed: ${e.message}
|
|
696
|
+
throw new Error(`LSP initialization failed: ${e.message}`, { cause: e });
|
|
697
697
|
}
|
|
698
698
|
|
|
699
699
|
// LSP request with retry
|
|
@@ -132,7 +132,7 @@ export class ScriptEditSnippetToolHandler extends BaseToolHandler {
|
|
|
132
132
|
original = await fs.readFile(absolute, 'utf8');
|
|
133
133
|
} catch (e) {
|
|
134
134
|
if (e && e.code === 'ENOENT') {
|
|
135
|
-
throw new Error(`file not found: ${relative}
|
|
135
|
+
throw new Error(`file not found: ${relative}`, { cause: e });
|
|
136
136
|
}
|
|
137
137
|
throw e;
|
|
138
138
|
}
|
|
@@ -172,8 +172,7 @@ export class ScriptEditSnippetToolHandler extends BaseToolHandler {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
// LSP validation
|
|
175
|
-
|
|
176
|
-
diagnostics = await this.#validateWithLsp(info, relative, working);
|
|
175
|
+
const diagnostics = await this.#validateWithLsp(info, relative, working);
|
|
177
176
|
const hasErrors = diagnostics.some(d => this.#severityIsError(d.severity));
|
|
178
177
|
if (hasErrors) {
|
|
179
178
|
const first = diagnostics.find(d => this.#severityIsError(d.severity));
|
package/src/lsp/LspRpcClient.js
CHANGED
|
@@ -251,7 +251,7 @@ export class LspRpcClient {
|
|
|
251
251
|
} else {
|
|
252
252
|
hint = 'Check request parameters or increase lsp.requestTimeoutMs.';
|
|
253
253
|
}
|
|
254
|
-
throw new Error(`[${method}] failed: ${msg}. ${hint}
|
|
254
|
+
throw new Error(`[${method}] failed: ${msg}. ${hint}`, { cause: e });
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
|