modality-kit 0.5.1 → 0.5.3
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/dist/index.js +15 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,6 +8,13 @@ var __export = (target, all) => {
|
|
|
8
8
|
set: (newValue) => all[name] = () => newValue
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
12
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
13
|
+
}) : x)(function(x) {
|
|
14
|
+
if (typeof require !== "undefined")
|
|
15
|
+
return require.apply(this, arguments);
|
|
16
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
17
|
+
});
|
|
11
18
|
|
|
12
19
|
// src/util_mcp_tools_converter.ts
|
|
13
20
|
var setupAITools = (aiTools, mcpServer) => {
|
|
@@ -159,11 +166,11 @@ class ModalityLogger {
|
|
|
159
166
|
const error = result.error;
|
|
160
167
|
if (error instanceof Error) {
|
|
161
168
|
delete result.error;
|
|
162
|
-
const { message, stack } = error;
|
|
169
|
+
const { message, stack, ...restError } = error;
|
|
163
170
|
if (stack) {
|
|
164
|
-
if (Object.keys(
|
|
171
|
+
if (Object.keys(restError).length) {
|
|
165
172
|
console.error(`
|
|
166
|
-
`, prefix,
|
|
173
|
+
`, prefix, restError, `
|
|
167
174
|
`, stack, `
|
|
168
175
|
`);
|
|
169
176
|
} else {
|
|
@@ -238,13 +245,12 @@ function withErrorHandling(fn, operation) {
|
|
|
238
245
|
} catch (error) {
|
|
239
246
|
if (error instanceof ErrorCode) {
|
|
240
247
|
logger.error(`${operation || "Task operation"} failed: ${error.code}`, {
|
|
241
|
-
|
|
242
|
-
|
|
248
|
+
code: error.code,
|
|
249
|
+
cause: error.cause,
|
|
250
|
+
stack: error.stack
|
|
243
251
|
});
|
|
244
252
|
} else if (error instanceof Error) {
|
|
245
|
-
logger.error(`${operation || "Error"} failed`,
|
|
246
|
-
message: error.message
|
|
247
|
-
});
|
|
253
|
+
logger.error(`${operation || "Error"} failed`, error);
|
|
248
254
|
} else {
|
|
249
255
|
logger.error(`${operation || "Exception"} unexpected error:`, error);
|
|
250
256
|
}
|
|
@@ -4279,10 +4285,8 @@ var fileEntrySchema = exports_external.object({
|
|
|
4279
4285
|
// src/schemas/schemas_empty.ts
|
|
4280
4286
|
var emptySchema = exports_external.object({}).describe("No parameters required");
|
|
4281
4287
|
// src/util_version.ts
|
|
4282
|
-
var {createRequire} = (() => ({}));
|
|
4283
4288
|
async function loadVersion(packageJsonPath) {
|
|
4284
|
-
const
|
|
4285
|
-
const packageJson = require2(packageJsonPath);
|
|
4289
|
+
const packageJson = __require(packageJsonPath);
|
|
4286
4290
|
try {
|
|
4287
4291
|
const version = packageJson.version;
|
|
4288
4292
|
if (/^\d+\.\d+\.\d+$/.test(version))
|
package/package.json
CHANGED