@tryvira/mcp 0.1.51 → 0.1.52
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/cli.js +4 -2
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -105,8 +105,10 @@ var tools = [
|
|
|
105
105
|
{ name: "authorize_host_tool", description: "Request Vira server authorization for one dynamically registered host tool proposal matched to its ActionDefinition.", inputSchema: input({ toolName: z.string().min(1), executionId: z.string().min(1), sessionId: z.string().min(1), dataVersion: z.string().min(1), context: z.record(z.string(), z.unknown()), proposal: z.record(z.string(), z.unknown()), approval: z.record(z.string(), z.unknown()).optional() }), effectful: true, run: (args) => {
|
|
106
106
|
const { toolName, executionId, sessionId, dataVersion, context, proposal, approval } = args;
|
|
107
107
|
const registered = hostToolDefinition(String(toolName));
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
const contextRecord = context;
|
|
109
|
+
const proposalRecord = proposal;
|
|
110
|
+
if (String(proposalRecord.tool_key ?? "") !== registered.name) throw new Error("MCP_HOST_TOOL_DEFINITION_MISMATCH");
|
|
111
|
+
return client.authorizeHostAction({ executionId: String(executionId), sessionId: String(sessionId), dataVersion: String(dataVersion), scope, context: contextRecord, proposal: proposalRecord, ...approval ? { approval } : {} });
|
|
110
112
|
} }
|
|
111
113
|
];
|
|
112
114
|
var authorize = async (tool, args) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryvira/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.52",
|
|
4
4
|
"description": "Vira MCP client and npx-ready JSON-RPC launcher.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vira",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@modelcontextprotocol/server": "^2.4.0",
|
|
40
|
-
"@tryvira/sdk": "^0.1.
|
|
40
|
+
"@tryvira/sdk": "^0.1.60",
|
|
41
41
|
"zod": "^4.2.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|