@tryvira/mcp 0.1.50 → 0.1.51
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/README.md +2 -2
- package/dist/cli.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ An npx-ready MCP server for Vira's existing scoped authority boundary.
|
|
|
8
8
|
## Run it
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
npx -y @tryvira/mcp@0.1.
|
|
11
|
+
npx -y @tryvira/mcp@0.1.51
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
The package is a thin stdio MCP adapter over the public Vira API. It uses the
|
|
@@ -45,7 +45,7 @@ policy, evaluation, and release eligibility. The server does not bypass those ch
|
|
|
45
45
|
|
|
46
46
|
## What a client can discover
|
|
47
47
|
|
|
48
|
-
Version `0.1.
|
|
48
|
+
Version `0.1.51` exposes API-backed tools including `list_packs`, `import_pack`,
|
|
49
49
|
`install_pack`, `release_pack`, `start_strategy_execution`, `list_host_tools`, and
|
|
50
50
|
`authorize_host_tool`, in addition to `list_capabilities`,
|
|
51
51
|
`list_semantic_tasks`, `list_behavior_points`, `list_behavior_programs`,
|
package/dist/cli.js
CHANGED
|
@@ -102,11 +102,11 @@ var tools = [
|
|
|
102
102
|
{ name: "release_pack", description: "Release a separately evaluated and approved Pack.", inputSchema: input({ packId: z.string().min(1) }), effectful: true, run: (args) => client.releasePack(String(args.packId)) },
|
|
103
103
|
{ name: "start_strategy_execution", description: "Start a server-authorized immutable Strategy execution.", inputSchema: input({ artifactDigest: z.string().min(1), revisionId: z.string().min(1), idempotencyKey: z.string().min(1), nonce: z.string().min(1), expiresAt: z.number().positive(), decisionPlanId: z.string().min(1), candidates: z.array(z.record(z.string(), z.unknown())), policy: z.string().min(1), behaviorPoint: z.string().optional(), executionBoundary: z.record(z.string(), z.unknown()).optional() }), effectful: true, run: (args) => client.startStrategyExecution(args) },
|
|
104
104
|
{ name: "list_host_tools", description: "List host tools registered dynamically by the host with their ActionDefinition bindings; this MCP server defines no domain tools.", inputSchema: input(), run: async () => ({ tools: hostToolDefinitions }) },
|
|
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), context: z.record(z.string(), z.unknown()), proposal: z.record(z.string(), z.unknown()), approval: z.record(z.string(), z.unknown()).optional()
|
|
106
|
-
const { toolName, executionId, sessionId, context, proposal, approval
|
|
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
|
+
const { toolName, executionId, sessionId, dataVersion, context, proposal, approval } = args;
|
|
107
107
|
const registered = hostToolDefinition(String(toolName));
|
|
108
108
|
if (String(proposal.tool_key ?? "") !== registered.name) throw new Error("MCP_HOST_TOOL_DEFINITION_MISMATCH");
|
|
109
|
-
return client.authorizeHostAction({ executionId: String(executionId), sessionId: String(sessionId), scope, context, proposal, approval
|
|
109
|
+
return client.authorizeHostAction({ executionId: String(executionId), sessionId: String(sessionId), dataVersion: String(dataVersion), scope, context, proposal, ...approval ? { approval } : {} });
|
|
110
110
|
} }
|
|
111
111
|
];
|
|
112
112
|
var authorize = async (tool, args) => {
|
|
@@ -119,7 +119,7 @@ var authorize = async (tool, args) => {
|
|
|
119
119
|
const decision = await response.json().catch(() => null);
|
|
120
120
|
if (!response.ok || decision?.allowed !== true) throw new Error(decision?.reason ?? "MCP_AUTHORITY_DENIED");
|
|
121
121
|
};
|
|
122
|
-
var server = new McpServer({ name: process.env.VIRA_MCP_SERVER_NAME ?? "vira-behavior-control", version: "0.1.
|
|
122
|
+
var server = new McpServer({ name: process.env.VIRA_MCP_SERVER_NAME ?? "vira-behavior-control", version: "0.1.51" }, { capabilities: { tools: {} } });
|
|
123
123
|
for (const tool of tools) {
|
|
124
124
|
server.registerTool(tool.name, { description: tool.description, inputSchema: tool.inputSchema }, async (raw) => {
|
|
125
125
|
const args = raw;
|