@tryvira/mcp 0.1.44 → 0.1.46

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 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.44
11
+ npx -y @tryvira/mcp@0.1.45
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.44` exposes these API-backed tools: `list_capabilities`,
48
+ Version `0.1.45` exposes these API-backed tools: `list_capabilities`,
49
49
  `list_semantic_tasks`, `list_behavior_points`, `list_behavior_programs`,
50
50
  `list_behavior_strategies`, `resolve_semantic`, `resolve_runtime`,
51
51
  `create_semantic_task`, `create_behavior_point`, `submit_teach_evidence`, and
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // packages/mcp/src/cli.ts
3
+ // src/cli.ts
4
4
  import { McpServer } from "@modelcontextprotocol/server";
5
5
  import { serveStdio } from "@modelcontextprotocol/server/stdio";
6
6
  import { ViraClient } from "@tryvira/sdk";
@@ -54,6 +54,14 @@ var tools = [
54
54
  { name: "list_behavior_strategies", description: "List behavior strategies in the API key scope.", inputSchema: input(), run: () => client.listBehaviorStrategies() },
55
55
  { name: "resolve_semantic", description: "Resolve text using Vira semantic routing.", inputSchema: input({ input: z.string().min(1), profile: z.record(z.string(), z.unknown()).optional(), sessionId: z.string().optional(), selection: z.record(z.string(), z.unknown()).optional(), candidates: z.array(z.string()).optional(), timeoutMs: z.number().positive().optional(), requestId: z.string().optional(), executionBoundary: z.record(z.string(), z.unknown()).optional(), idempotencyKey: z.string().min(1).optional() }), run: (args) => client.resolveSemantic(args) },
56
56
  { name: "resolve_runtime", description: "Resolve a BehaviorPoint through the governed runtime.", inputSchema: input({ behaviorPoint: z.string().min(1).optional(), executionBoundary: z.record(z.string(), z.unknown()).optional(), semanticContext: z.record(z.string(), z.unknown()).optional(), idempotencyKey: z.string().min(1).optional() }), effectful: true, run: (args) => client.resolveRuntime(args) },
57
+ { name: "resolve_task_run", description: "Preview the server-owned TaskRun route; AUTO is the default everyday mode.", inputSchema: input({ input: z.string().min(1), requestedMode: z.enum(["AUTO", "SINGLE", "STRATEGY", "COMPOUND", "HYBRID"]).optional(), intentCount: z.number().int().positive().optional(), hostCapabilities: z.array(z.string()).optional(), hybridPlan: z.array(z.object({ semanticTaskKey: z.string().min(1), mode: z.enum(["SINGLE", "STRATEGY"]) })).optional() }), run: (args) => client.resolveTaskRun(args) },
58
+ { name: "start_task_run", description: "Admit a registered TaskRun after server-side scope, release and authority checks; omit mode for AUTO.", inputSchema: input({ taskRunId: z.string().min(1), requestId: z.string().min(1), input: z.unknown(), ownerActorRef: z.string().min(1), requestedMode: z.enum(["AUTO", "SINGLE", "STRATEGY", "COMPOUND", "HYBRID"]).optional(), hybridPlan: z.array(z.object({ semanticTaskKey: z.string().min(1), mode: z.enum(["SINGLE", "STRATEGY"]) })).optional(), compoundPlanId: z.string().optional(), conversationId: z.string().optional(), episodeId: z.string().optional(), traceRootRef: z.string().optional(), budget: z.object({ maxChildren: z.number().int().positive().optional(), maxCalls: z.number().int().positive().optional(), maxLatencyMs: z.number().int().positive().optional(), maxCostMicros: z.number().int().positive().optional() }).optional(), hostCapabilities: z.array(z.string()).optional(), idempotencyKey: z.string().min(1).optional() }), effectful: true, run: (args) => {
59
+ const { idempotencyKey, ...request } = args;
60
+ return client.startTaskRun(request, { idempotencyKey });
61
+ } },
62
+ { name: "continue_task_run", description: "Continue a paused TaskRun with an expected state version.", inputSchema: input({ taskRunId: z.string().min(1), expectedVersion: z.number().int().nonnegative(), cursor: z.string().optional(), idempotencyKey: z.string().min(1).optional() }), effectful: true, run: (args) => client.continueTaskRun(String(args.taskRunId), Number(args.expectedVersion), { cursor: args.cursor, idempotencyKey: args.idempotencyKey }) },
63
+ { name: "cancel_task_run", description: "Cancel a TaskRun using optimistic state-version fencing.", inputSchema: input({ taskRunId: z.string().min(1), expectedVersion: z.number().int().nonnegative(), idempotencyKey: z.string().min(1).optional() }), effectful: true, run: (args) => client.cancelTaskRun(String(args.taskRunId), Number(args.expectedVersion), { idempotencyKey: args.idempotencyKey }) },
64
+ { name: "retry_task_run", description: "Retry a failed, blocked, or partial TaskRun using the same immutable plan and authority fencing.", inputSchema: input({ taskRunId: z.string().min(1), expectedVersion: z.number().int().nonnegative(), idempotencyKey: z.string().min(1).optional() }), effectful: true, run: (args) => client.retryTaskRun(String(args.taskRunId), Number(args.expectedVersion), { idempotencyKey: args.idempotencyKey }) },
57
65
  { name: "create_semantic_task", description: "Create a Semantic Task for review in the API key scope.", inputSchema: input({ id: z.string().optional(), taskKey: z.string().min(1), description: z.string().optional(), version: z.number().int().positive().optional(), aliases: z.array(z.string()).optional(), examples: z.array(z.string()).optional(), negativeExamples: z.array(z.string()).optional(), idempotencyKey: z.string().min(1).optional() }), effectful: true, run: (args) => {
58
66
  const { id, idempotencyKey, ...task } = args;
59
67
  return client.createSemanticTask(task, { id, idempotencyKey });
@@ -81,7 +89,7 @@ var authorize = async (tool, args) => {
81
89
  const decision = await response.json().catch(() => null);
82
90
  if (!response.ok || decision?.allowed !== true) throw new Error(decision?.reason ?? "MCP_AUTHORITY_DENIED");
83
91
  };
84
- var server = new McpServer({ name: process.env.VIRA_MCP_SERVER_NAME ?? "vira-behavior-control", version: "0.1.44" }, { capabilities: { tools: {} } });
92
+ var server = new McpServer({ name: process.env.VIRA_MCP_SERVER_NAME ?? "vira-behavior-control", version: "0.1.46" }, { capabilities: { tools: {} } });
85
93
  for (const tool of tools) {
86
94
  server.registerTool(tool.name, { description: tool.description, inputSchema: tool.inputSchema }, async (raw) => {
87
95
  const args = raw;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // packages/mcp/src/index.ts
1
+ // src/index.ts
2
2
  import { ViraClient } from "@tryvira/sdk";
3
3
  export {
4
4
  ViraClient
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvira/mcp",
3
- "version": "0.1.44",
3
+ "version": "0.1.46",
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.43",
40
+ "@tryvira/sdk": "^0.1.46",
41
41
  "zod": "^4.2.0"
42
42
  },
43
43
  "scripts": {