@tryvira/mcp 0.1.74 → 0.1.76

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.
Files changed (2) hide show
  1. package/dist/cli.js +13 -6
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -9,7 +9,7 @@ import { z } from "zod";
9
9
  // src/tool-registry.ts
10
10
  var read = (permissionClass = "integration.read") => ({ permissionClass, requiredRoles: [permissionClass], effectType: "read", scopePolicy: "environment", approvalRequirement: "none" });
11
11
  var effectful = (permissionClass, approvalRequirement = "server", aliases = []) => ({ permissionClass, requiredRoles: [permissionClass, ...aliases], effectType: "effectful", scopePolicy: "environment", approvalRequirement });
12
- var registry = {};
12
+ var registry = /* @__PURE__ */ Object.create(null);
13
13
  var add = (names, authority) => names.forEach((name) => {
14
14
  registry[name] = authority;
15
15
  });
@@ -30,16 +30,23 @@ add(["create_semantic_task", "create_behavior_point", "activate_behavior_strateg
30
30
  add(["create_behavior_program", "delete_behavior_program", "delete_behavior_program_cascade", "validate_behavior_strategy", "activate_behavior_strategy", "create_behavior_strategy", "create_behavior_strategy_variant"], effectful("behavior.write", "server", ["integration.write", "studio.write", "release.approve", "admin"]));
31
31
  add(["submit_teach_evidence", "create_teach_proposal", "transition_teach_proposal", "accept_teach_recommendation"], effectful("teach.write", "server", ["integration.write", "studio.write", "admin"]));
32
32
  add(["create_teach_analysis", "reject_teach_recommendation", "edit_teach_recommendation", "request_teach_proposal_changes"], effectful("teach.write", "server", ["integration.write", "studio.write", "admin"]));
33
- registry.get_teach_behavior_set = read("teach.write");
33
+ registry.get_teach_behavior_set = read();
34
34
  add(["start_evaluation", "create_evaluation_plan", "seal_evaluation_plan", "create_improvement_proposal", "review_improvement_proposal", "create_behavior_revision_candidate", "evaluate_behavior_revision_candidate", "accept_behavior_revision_candidate"], effectful("evaluation.write", "server", ["integration.write", "studio.write", "admin"]));
35
35
  add(["review_comparative_finding", "edit_improvement_proposal", "transition_behavior_revision_candidate"], effectful("evaluation.write", "server", ["integration.write", "studio.write", "admin"]));
36
36
  add(["create_release"], effectful("release.approve", "human"));
37
- add(["create_signal_discovery_proposal", "review_signal_discovery_proposal", "materialize_signal_discovery", "create_signal_mapping", "review_signal_mapping", "create_observation", "review_discovery_candidate"], effectful("discovery.write"));
37
+ add(["create_signal_discovery_proposal", "review_signal_discovery_proposal", "materialize_signal_discovery", "create_signal_mapping", "review_signal_mapping", "review_discovery_candidate"], effectful("discovery.write"));
38
+ add(["create_observation"], effectful("observation.write"));
38
39
  add(["create_pack_revision", "transition_pack_revision", "materialize_pack_revision", "import_pack", "install_pack", "evaluate_pack", "approve_pack", "release_pack", "preview_pack_upgrade"], effectful("pack.write", "server", ["integration.write", "studio.write", "release.approve", "admin"]));
39
40
  add(["read_control_api"], read());
40
41
  add(["write_control_api"], effectful("integration.write", "server", ["studio.write", "admin"]));
42
+ add(["connect_once"], registry.connect_ai_system);
43
+ add(["feedback"], registry.record_user_feedback);
44
+ add(["outcome"], registry.record_business_outcome);
45
+ add(["connection_health"], registry.get_connection_health);
46
+ add(["connection_inventory"], registry.list_connection_inventory);
47
+ add(["inventory"], registry.list_inventory);
41
48
  var MCP_TOOL_REGISTRY = Object.freeze(registry);
42
- var getMcpToolAuthority = (tool) => MCP_TOOL_REGISTRY[tool] ?? (tool.startsWith("api_get_") ? { requiredRoles: ["integration.read"], scopePolicy: "environment", effectType: "read" } : { requiredRoles: ["integration.write"], scopePolicy: "environment", effectType: "effectful" });
49
+ var getMcpToolAuthority = (tool) => Object.hasOwn(MCP_TOOL_REGISTRY, tool) ? MCP_TOOL_REGISTRY[tool] : void 0;
43
50
  var isKnownMcpTool = (tool) => Boolean(getMcpToolAuthority(tool));
44
51
 
45
52
  // src/cli.ts
@@ -285,7 +292,7 @@ var fullTools = [
285
292
  { name: "evaluate_pack", description: "Evaluate one imported/installed Pack in its Pack lifecycle with server-owned execution. Use before Pack approval/release; it is not the candidate evaluator.", inputSchema: input({ packId: z.string().min(1), evaluation: z.record(z.string(), z.unknown()) }), effectful: true, run: (args) => client.evaluatePack(String(args.packId), args.evaluation) },
286
293
  { name: "approve_pack", description: "Approve a passed Pack evaluation.", inputSchema: input({ packId: z.string().min(1), reason: z.string().optional() }), effectful: true, run: (args) => client.approvePack(String(args.packId), { manualApproval: true, reason: args.reason }) },
287
294
  { name: "compile_behavior_capsule", description: "Compile a Behavior Program capsule.", inputSchema: input({ programId: z.string().min(1), input: z.string().min(1), selection: z.record(z.string(), z.unknown()).optional(), candidates: z.array(z.unknown()).optional() }), effectful: true, run: (args) => client.compileBehaviorCapsule(args) },
288
- { name: "serve_behavior_projection", description: "Serve the active behavior projection for verification.", inputSchema: input({ input: z.string().min(1), provider: z.string().min(1), programId: z.string().optional() }), effectful: true, run: (args) => client.serveBehaviorProjection(args) },
295
+ { name: "serve_behavior_projection", description: "Serve the active behavior projection for verification. Use only after get_scope/list_capabilities, Pack install, evaluation, approval, release, and a verified promotion pointer confirm that the requested Behavior Program is active. Do not use this tool to create, install, evaluate, approve, or release a Pack, to classify input, to call the model, or to execute a host action; it does not call the model or execute tools. Use compile_behavior_capsule when you need pre-model context, resolve_runtime/executeRuntime when you need enforcement, and evaluate_behavior_revision_candidate when testing an unreleased candidate.", inputSchema: input({ input: z.string().min(1), provider: z.string().min(1), programId: z.string().optional() }), effectful: true, run: (args) => client.serveBehaviorProjection(args) },
289
296
  { name: "create_release", description: "Create a governed release for an approved immutable artifact.", inputSchema: input({ release: z.record(z.string(), z.unknown()) }), effectful: true, run: (args) => client.createRelease(args.release) }
290
297
  ];
291
298
  var promotedNames = /* @__PURE__ */ new Set([
@@ -355,7 +362,7 @@ var descriptionOverrides = {
355
362
  get_pack: "PACK DETAIL READ: inspect one Pack\u2019s manifest, digest, status, conflicts, and materialization metadata. Required: packId. Read-only; it never releases.",
356
363
  list_evaluations: "EVALUATION READ: list scoped evaluation records. Pagination and status are optional; use start_evaluation to run one and get_evaluation for full provenance.",
357
364
  mark_inbox_read: "REVIEW STATE: mark one notification returned by list_inbox as read after reviewing it. Required: notificationId. Repeated calls are safe and change only that notification\u2019s read state; use list_inbox first to discover IDs.",
358
- serve_behavior_projection: "RUNTIME PROJECTION: use after Pack install, evaluation, approval, release, and a verified promotion pointer exist. Required: input and provider; programId is optional when the active pointer is unambiguous. Returns the active projected behavior and receipt; it does not call the model or execute tools. Use compile_behavior_capsule for pre-model context, executeRuntime for enforcement, and evaluate_behavior_revision_candidate for candidate testing.",
365
+ serve_behavior_projection: "RUNTIME PROJECTION: use after get_scope/list_capabilities, Pack install, evaluation, approval, release, and a verified promotion pointer confirm that the requested Behavior Program is active. Required: input and provider; programId is optional when the active pointer is unambiguous. Do not use this tool for authoring, classification, candidate evaluation, model calls, or host actions. Use compile_behavior_capsule for pre-model context, resolve_runtime/executeRuntime for enforcement, and evaluate_behavior_revision_candidate for unreleased candidate testing.",
359
366
  resolve_semantic: "ROUTING 1/3: classify input into registered Semantic Tasks and intent candidates. It never resolves runtime authority or executes; follow with resolve_runtime for one selected BehaviorPoint or resolve_task_run for AUTO/multi-task planning.",
360
367
  resolve_runtime: "ROUTING 2/3: resolve one already-selected BehaviorPoint into released runtime authority. It does not classify text or execute; use resolve_task_run/start_task_run for TaskRun execution.",
361
368
  resolve_task_run: "ROUTING 2/3 FOR TASKRUN: preview server-owned AUTO mode and the SINGLE/STRATEGY/COMPOUND/HYBRID child plan. It never executes; call start_task_run after inspection.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvira/mcp",
3
- "version": "0.1.74",
3
+ "version": "0.1.76",
4
4
  "mcpName": "io.github.hrpering/vira",
5
5
  "description": "Vira MCP client and npx-ready JSON-RPC launcher.",
6
6
  "keywords": [
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@modelcontextprotocol/server": "^2.4.0",
41
- "@tryvira/sdk": "^0.1.71",
41
+ "@tryvira/sdk": "^0.1.74",
42
42
  "zod": "^4.2.0"
43
43
  },
44
44
  "scripts": {