sigrank 1.0.42 → 1.0.43

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/bin/sigrank.mjs CHANGED
@@ -26,10 +26,19 @@ function flag(name, fallback = undefined) {
26
26
  return fallback;
27
27
  }
28
28
 
29
- function printStandard() {
29
+ async function printStandard() {
30
+ const { TTEOP_PROTOCOL_VERSION, TTEOP_SPEC_VERSION } = await import(
31
+ "../tools/standard-record.mjs"
32
+ );
33
+
30
34
  const payload = {
31
35
  spec: SPEC,
32
- status: "proposed_open_standard",
36
+ spec_status: "legacy_alias",
37
+ protocol: {
38
+ name: "TTEOP",
39
+ version: TTEOP_PROTOCOL_VERSION,
40
+ authority: TTEOP_SPEC_VERSION,
41
+ },
33
42
  architecture: {
34
43
  brand: "SignalAF",
35
44
  governance: "MO§ES™",
@@ -59,6 +68,9 @@ function printStandard() {
59
68
  }
60
69
 
61
70
  process.stdout.write(`Upsilon measurement engine · compatibility spec ${SPEC}\n`);
71
+ process.stdout.write(
72
+ `Protocol authority: TTEOP ${TTEOP_PROTOCOL_VERSION} (${TTEOP_SPEC_VERSION})\n`,
73
+ );
62
74
  process.stdout.write(`Upsilon measures. SigRank is the public proof surface.\n\n`);
63
75
  process.stdout.write(`Scope: ${payload.scope}\n`);
64
76
  process.stdout.write(`Primitives: input / output / cache_write / cache_read\n`);
@@ -136,7 +148,7 @@ async function exportStandardRecord() {
136
148
  }
137
149
 
138
150
  if (cmd === "standard") {
139
- printStandard();
151
+ await printStandard();
140
152
  } else if (cmd === "export" && args.includes("--standard")) {
141
153
  exportStandardRecord().catch((err) => {
142
154
  process.stderr.write(`[sigrank] ${err?.message || err}\n`);
package/index.mjs CHANGED
@@ -22,18 +22,8 @@
22
22
  * Token-only — no transcript content.
23
23
  */
24
24
 
25
- import { Server } from "@modelcontextprotocol/sdk/server/index.js";
26
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
27
- import {
28
- CallToolRequestSchema,
29
- ListToolsRequestSchema,
30
- ListPromptsRequestSchema,
31
- GetPromptRequestSchema,
32
- ListResourcesRequestSchema,
33
- ReadResourceRequestSchema,
34
- McpError,
35
- ErrorCode,
36
- } from "@modelcontextprotocol/sdk/types.js";
25
+ import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
26
+ import { Server, ProtocolError, ProtocolErrorCode } from "@modelcontextprotocol/server";
37
27
  import { TOOLS, callTool } from "./tools.mjs";
38
28
  import { runCli } from "./cli.mjs";
39
29
  import { readFileSync } from "node:fs";
@@ -80,15 +70,15 @@ async function startMcpServer() {
80
70
  { name: "sigrank", version: serverVersion() },
81
71
  { capabilities: { tools: { listChanged: false }, prompts: { listChanged: false }, resources: { listChanged: false } } },
82
72
  );
83
- server.setRequestHandler(ListToolsRequestSchema, async () => ({
73
+ server.setRequestHandler('tools/list', async () => ({
84
74
  tools: TOOLS,
85
75
  }));
86
- server.setRequestHandler(CallToolRequestSchema, async (req) => {
76
+ server.setRequestHandler('tools/call', async (req) => {
87
77
  // Unknown tool name = a client/host bug → JSON-RPC -32602 protocol error, per the MCP
88
78
  // spec. isError results (below) are reserved for tools that ran and failed.
89
79
  if (!TOOLS.some((t) => t.name === req.params.name)) {
90
- throw new McpError(
91
- ErrorCode.InvalidParams,
80
+ throw new ProtocolError(
81
+ ProtocolErrorCode.InvalidParams,
92
82
  `Unknown tool: ${req.params.name}`,
93
83
  );
94
84
  }
@@ -134,10 +124,10 @@ async function startMcpServer() {
134
124
  },
135
125
  ];
136
126
 
137
- server.setRequestHandler(ListPromptsRequestSchema, async () => ({
127
+ server.setRequestHandler('prompts/list', async () => ({
138
128
  prompts: PROMPTS,
139
129
  }));
140
- server.setRequestHandler(GetPromptRequestSchema, async (req) => {
130
+ server.setRequestHandler('prompts/get', async (req) => {
141
131
  const name = req.params.name;
142
132
  const args = req.params.arguments || {};
143
133
  if (name === "check-my-efficiency") {
@@ -190,7 +180,7 @@ async function startMcpServer() {
190
180
  ],
191
181
  };
192
182
  }
193
- throw new McpError(ErrorCode.InvalidParams, `Unknown prompt: ${name}`);
183
+ throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Unknown prompt: ${name}`);
194
184
  });
195
185
 
196
186
  // --- Resources: static context agents can read without calling a tool ---
@@ -240,14 +230,14 @@ async function startMcpServer() {
240
230
  "sigrank://data-policy": "./resources/data-policy.md",
241
231
  };
242
232
 
243
- server.setRequestHandler(ListResourcesRequestSchema, async () => ({
233
+ server.setRequestHandler('resources/list', async () => ({
244
234
  resources: RESOURCES,
245
235
  }));
246
- server.setRequestHandler(ReadResourceRequestSchema, async (req) => {
236
+ server.setRequestHandler('resources/read', async (req) => {
247
237
  const uri = req.params.uri;
248
238
  const file = RESOURCE_FILES[uri];
249
239
  if (!file) {
250
- throw new McpError(ErrorCode.InvalidParams, `Unknown resource: ${uri}`);
240
+ throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Unknown resource: ${uri}`);
251
241
  }
252
242
  const content = readFileSync(new URL(file, import.meta.url), "utf8");
253
243
  return {
package/manifest.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/anthropics/mcpb/main/schemas/mcpb-manifest-v0.4.schema.json",
3
3
  "manifest_version": "0.4",
4
4
  "name": "sigrank",
5
- "version": "1.0.41",
5
+ "version": "1.0.42",
6
6
  "description": "Ranks AI coding operators by token cascade efficiency (Yield = cache_read \u00d7 output / input\u00b2). 25 tools including SigRank Standard record, yield calculation, local token usage pulls, signed submission, and tokscale-powered analytics (market share, developer profiles, model trends, cost analysis, device profiles, MCP usage, competitive intelligence). Privacy-first: runs locally, only four token counts leave the machine.",
7
7
  "author": {
8
8
  "name": "SunrisesIllNeverSee",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sigrank",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
4
4
  "author": "SunrisesIllNeverSee (https://github.com/SunrisesIllNeverSee)",
5
5
  "description": "Upsilon measurement engine distributed through the sigrank CLI/MCP compatibility package, with SigRank public leaderboard tools.",
6
6
  "mcpName": "io.github.SunrisesIllNeverSee/sigrank-mcp",
@@ -20,16 +20,13 @@
20
20
  },
21
21
  "main": "index.mjs",
22
22
  "engines": {
23
- "node": ">=18"
23
+ "node": ">=20"
24
24
  },
25
25
  "scripts": {
26
26
  "start": "node index.mjs",
27
- "test": "node test.mjs && node --test __tests__/sign.test.mjs __tests__/cascade.test.mjs __tests__/badges.test.mjs __tests__/tui-input.test.mjs __tests__/standard-record.test.mjs __tests__/standard-cli.test.mjs __tests__/product-architecture.test.mjs __tests__/tteop-delegation.test.mjs",
27
+ "test": "node test.mjs && node --test __tests__/sign.test.mjs __tests__/cascade.test.mjs __tests__/badges.test.mjs __tests__/tui-input.test.mjs __tests__/standard-record.test.mjs __tests__/standard-cli.test.mjs __tests__/product-architecture.test.mjs __tests__/tteop-delegation.test.mjs __tests__/mcp-stdio.test.mjs",
28
28
  "test:packaged": "node scripts/packed-artifact-smoke.mjs",
29
- "sync:platforms": "node scripts/sync-platforms.mjs",
30
- "sync:spine": "node scripts/sync-spine.mjs",
31
- "spine:check": "node scripts/sync-spine.mjs --check",
32
- "spine:diff": "node scripts/sync-spine.mjs --dry-run"
29
+ "sync:platforms": "node scripts/sync-platforms.mjs"
33
30
  },
34
31
  "files": [
35
32
  "bin/",
@@ -84,10 +81,10 @@
84
81
  "on-device"
85
82
  ],
86
83
  "dependencies": {
87
- "@modelcontextprotocol/sdk": "^1.0.0",
88
84
  "token-cascade": "^0.2.1",
89
85
  "ccusage": "^20.0.19",
90
- "tokscale": "^4.7.0"
86
+ "tokscale": "^4.7.0",
87
+ "@modelcontextprotocol/server": "^2.3.0"
91
88
  },
92
89
  "devDependencies": {
93
90
  "@resvg/resvg-js": "^2.6.2",