@voke-sh/voke 0.1.0 → 0.1.1

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.
@@ -7705,7 +7705,7 @@ var require_dist = __commonJS({
7705
7705
  });
7706
7706
 
7707
7707
  // src/version.ts
7708
- var VOKE_VERSION = "0.1.0";
7708
+ var VOKE_VERSION = "0.1.1";
7709
7709
  var MTQS_VERSION = "0.1";
7710
7710
  var versionString = () => `voke ${VOKE_VERSION} (MTQS v${MTQS_VERSION})`;
7711
7711
 
@@ -7978,48 +7978,52 @@ var ingestLive = async (opts) => {
7978
7978
  const serverUrl = new URL(url);
7979
7979
  const connectResult = await connectWithFallback(serverUrl, headers);
7980
7980
  const { client } = connectResult;
7981
- const serverInfo = client.getServerVersion();
7982
- const negotiatedProtocol = connectResult.transport.protocolVersion ?? "unknown";
7983
- const serverIdentity = {
7984
- url,
7985
- name: serverInfo?.name ?? "unknown",
7986
- version: serverInfo?.version ?? "0.0.0",
7987
- protocolVersion: negotiatedProtocol
7988
- };
7989
- const rawTools = await fetchAllTools(client, timeoutMs);
7990
- const toolSnapshots = rawTools.map((tool) => {
7991
- const depth = schemaDepth(tool.inputSchema);
7992
- if (depth > DEPTH_HARD_CAP) {
7993
- throw new DepthExceededError(tool.name, depth, DEPTH_HARD_CAP);
7994
- }
7995
- return {
7996
- toolId: tool.name,
7997
- contentHash: toolContentHash({
7981
+ try {
7982
+ const serverInfo = client.getServerVersion();
7983
+ const negotiatedProtocol = connectResult.transport.protocolVersion ?? "unknown";
7984
+ const serverIdentity = {
7985
+ url,
7986
+ name: serverInfo?.name ?? "unknown",
7987
+ version: serverInfo?.version ?? "0.0.0",
7988
+ protocolVersion: negotiatedProtocol
7989
+ };
7990
+ const rawTools = await fetchAllTools(client, timeoutMs);
7991
+ const toolSnapshots = rawTools.map((tool) => {
7992
+ const depth = schemaDepth(tool.inputSchema);
7993
+ if (depth > DEPTH_HARD_CAP) {
7994
+ throw new DepthExceededError(tool.name, depth, DEPTH_HARD_CAP);
7995
+ }
7996
+ return {
7997
+ toolId: tool.name,
7998
+ contentHash: toolContentHash({
7999
+ name: tool.name,
8000
+ description: tool.description,
8001
+ inputSchema: tool.inputSchema,
8002
+ outputSchema: tool.outputSchema,
8003
+ annotations: tool.annotations
8004
+ }),
7998
8005
  name: tool.name,
8006
+ title: tool.title,
7999
8007
  description: tool.description,
8000
8008
  inputSchema: tool.inputSchema,
8001
8009
  outputSchema: tool.outputSchema,
8002
8010
  annotations: tool.annotations
8003
- }),
8004
- name: tool.name,
8005
- title: tool.title,
8006
- description: tool.description,
8007
- inputSchema: tool.inputSchema,
8008
- outputSchema: tool.outputSchema,
8009
- annotations: tool.annotations
8011
+ };
8012
+ });
8013
+ const sortedTools = [...toolSnapshots].sort(
8014
+ (a, b) => a.toolId.localeCompare(b.toolId, "en", { sensitivity: "variant" })
8015
+ );
8016
+ const capturedAt = (/* @__PURE__ */ new Date()).toISOString();
8017
+ return {
8018
+ snapshotVersion: "1",
8019
+ mtqsVersion: MTQS_VERSION2,
8020
+ server: serverIdentity,
8021
+ meta: { capturedAt },
8022
+ tools: sortedTools
8010
8023
  };
8011
- });
8012
- const sortedTools = [...toolSnapshots].sort(
8013
- (a, b) => a.toolId.localeCompare(b.toolId, "en", { sensitivity: "variant" })
8014
- );
8015
- const capturedAt = (/* @__PURE__ */ new Date()).toISOString();
8016
- return {
8017
- snapshotVersion: "1",
8018
- mtqsVersion: MTQS_VERSION2,
8019
- server: serverIdentity,
8020
- meta: { capturedAt },
8021
- tools: sortedTools
8022
- };
8024
+ } finally {
8025
+ await client.close();
8026
+ }
8023
8027
  };
8024
8028
 
8025
8029
  // src/ingestion/snapshot-reader.ts
package/dist/cli/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  UsageError,
4
4
  VokeError,
5
5
  buildProgram
6
- } from "../chunk-GPGK6AMR.js";
6
+ } from "../chunk-4GMUNAYC.js";
7
7
 
8
8
  // src/cli/index.ts
9
9
  var main = async () => {
package/dist/index.d.ts CHANGED
@@ -14,7 +14,7 @@ import { Command } from 'commander';
14
14
  * versionString(): returns the canonical CLI --version string.
15
15
  */
16
16
  /** The current linter package version. Update when package.json version changes. */
17
- declare const VOKE_VERSION = "0.1.0";
17
+ declare const VOKE_VERSION = "0.1.1";
18
18
  /** The MTQS spec version implemented by this linter. */
19
19
  declare const MTQS_VERSION = "0.1";
20
20
  /**
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  toolContentHash,
30
30
  versionString,
31
31
  writeSnapshot
32
- } from "./chunk-GPGK6AMR.js";
32
+ } from "./chunk-4GMUNAYC.js";
33
33
  export {
34
34
  MTQS_VERSION,
35
35
  RuleExecutionError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voke-sh/voke",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Deterministic MCP tool quality linter — MTQS v0.1 reference implementation",
5
5
  "type": "module",
6
6
  "private": false,
@@ -11,15 +11,32 @@
11
11
  "url": "https://github.com/voke-sh/voke.git",
12
12
  "directory": "packages/linter"
13
13
  },
14
- "keywords": ["mcp", "linter", "mtqs", "tool-quality", "ci"],
15
- "engines": { "node": ">=22" },
14
+ "keywords": [
15
+ "mcp",
16
+ "linter",
17
+ "mtqs",
18
+ "tool-quality",
19
+ "ci"
20
+ ],
21
+ "engines": {
22
+ "node": ">=22"
23
+ },
16
24
  "publishConfig": {
17
25
  "access": "public",
18
26
  "provenance": true
19
27
  },
20
- "exports": { ".": { "types": "./src/index.ts", "import": "./src/index.ts" } },
21
- "bin": { "voke": "./dist/cli/index.js" },
22
- "files": ["dist"],
28
+ "exports": {
29
+ ".": {
30
+ "types": "./src/index.ts",
31
+ "import": "./src/index.ts"
32
+ }
33
+ },
34
+ "bin": {
35
+ "voke": "./dist/cli/index.js"
36
+ },
37
+ "files": [
38
+ "dist"
39
+ ],
23
40
  "scripts": {
24
41
  "build": "tsup",
25
42
  "typecheck": "tsc --noEmit"