Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions dist/bundle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38454,6 +38454,23 @@ class ResponsePruner {
// 3. Standard string cleaning (remove actual newlines and redundant spaces)
return minified.replace(/[\n\r]+/g, ' ').replace(/\s{2,}/g, ' ').trim();
}
/**
* Ensures the result is always a Record (object) for MCP structuredContent compatibility.
* Odoo tools often return Arrays (searches) or Numbers (counts) which violate the
* Record<string, unknown> constraint of the MCP structuredContent field.
*/
static pack(data) {
if (data === null || data === undefined) {
return { value: data };
}
if (Array.isArray(data)) {
return { items: data };
}
if (typeof data !== 'object') {
return { value: data };
}
return data;
}
}

;// CONCATENATED MODULE: ./src/tools/schemas.ts
Expand Down Expand Up @@ -40356,6 +40373,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
text: typeof prunedResult === 'string' ? prunedResult : JSON.stringify(prunedResult),
},
],
structuredContent: ResponsePruner.pack(prunedResult),
};
}
catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion dist/bundle/package.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"brass-monkey","version":"1.4.2","type":"module","main":"dist/index.js","scripts":{"build":"tsc && npm run bundle","bundle":"ncc build src/mcp-server.ts -o dist/bundle","test":"vitest run","test:watch":"vitest","lint":"eslint src/**/*.ts"},"keywords":["odoo","gemini","gemini-cli","cli","extension","mcp","ai-agent","xml-rpc","erp","crm"],"author":"Actinon","license":"MIT","description":"A high-fidelity Gemini CLI extension and MCP bridge for Odoo ERP/CRM.","dependencies":{"@modelcontextprotocol/sdk":"^1.29.0","keytar":"^7.9.0","xmlrpc":"^1.3.2","zod":"^4.3.6","zod-to-json-schema":"^3.25.2"},"devDependencies":{"@types/keytar":"^4.4.0","@types/node":"^25.6.0","@types/xmlrpc":"^1.3.10","@vercel/ncc":"^0.38.4","esbuild":"^0.28.0","typescript":"^6.0.3","vitest":"^4.1.4"}}
{"name":"brass-monkey","version":"1.4.3","type":"module","main":"dist/index.js","scripts":{"build":"tsc && npm run bundle","bundle":"ncc build src/mcp-server.ts -o dist/bundle","test":"vitest run","test:watch":"vitest","lint":"eslint src/**/*.ts"},"keywords":["odoo","gemini","gemini-cli","cli","extension","mcp","ai-agent","xml-rpc","erp","crm"],"author":"Actinon","license":"MIT","description":"A high-fidelity Gemini CLI extension and MCP bridge for Odoo ERP/CRM.","dependencies":{"@modelcontextprotocol/sdk":"^1.29.0","keytar":"^7.9.0","xmlrpc":"^1.3.2","zod":"^4.3.6","zod-to-json-schema":"^3.25.2"},"devDependencies":{"@types/keytar":"^4.4.0","@types/node":"^25.6.0","@types/xmlrpc":"^1.3.10","@vercel/ncc":"^0.38.4","esbuild":"^0.28.0","typescript":"^6.0.3","vitest":"^4.1.4"}}
6 changes: 6 additions & 0 deletions dist/bundle/services/response-pruner.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@ export declare class ResponsePruner {
* Minifies strings, especially XML/HTML content which is common in Odoo.
*/
private static minifyString;
/**
* Ensures the result is always a Record (object) for MCP structuredContent compatibility.
* Odoo tools often return Arrays (searches) or Numbers (counts) which violate the
* Record<string, unknown> constraint of the MCP structuredContent field.
*/
static pack(data: any): Record<string, any>;
}
1 change: 1 addition & 0 deletions dist/mcp-server.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/mcp-server.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions dist/services/response-pruner.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@ export declare class ResponsePruner {
* Minifies strings, especially XML/HTML content which is common in Odoo.
*/
private static minifyString;
/**
* Ensures the result is always a Record (object) for MCP structuredContent compatibility.
* Odoo tools often return Arrays (searches) or Numbers (counts) which violate the
* Record<string, unknown> constraint of the MCP structuredContent field.
*/
static pack(data: any): Record<string, any>;
}
17 changes: 17 additions & 0 deletions dist/services/response-pruner.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading