sigrank 1.0.41 → 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 +15 -3
- package/index.mjs +12 -22
- package/manifest.json +1 -1
- package/package.json +6 -9
- package/submit/preflight.mjs +4 -15
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
|
-
|
|
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 {
|
|
26
|
-
import {
|
|
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(
|
|
73
|
+
server.setRequestHandler('tools/list', async () => ({
|
|
84
74
|
tools: TOOLS,
|
|
85
75
|
}));
|
|
86
|
-
server.setRequestHandler(
|
|
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
|
|
91
|
-
|
|
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(
|
|
127
|
+
server.setRequestHandler('prompts/list', async () => ({
|
|
138
128
|
prompts: PROMPTS,
|
|
139
129
|
}));
|
|
140
|
-
server.setRequestHandler(
|
|
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
|
|
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(
|
|
233
|
+
server.setRequestHandler('resources/list', async () => ({
|
|
244
234
|
resources: RESOURCES,
|
|
245
235
|
}));
|
|
246
|
-
server.setRequestHandler(
|
|
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
|
|
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.
|
|
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.
|
|
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": ">=
|
|
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",
|
package/submit/preflight.mjs
CHANGED
|
@@ -21,12 +21,11 @@
|
|
|
21
21
|
// ── plausibility checks (from gates.ts:86-137) ──────────────────────────────
|
|
22
22
|
|
|
23
23
|
const GATE_LIMITS = {
|
|
24
|
-
TOTALS_TOLERANCE_FRAC: 0.
|
|
24
|
+
TOTALS_TOLERANCE_FRAC: 0.005,
|
|
25
25
|
MAX_OUTPUT_TOKENS_PER_MIN: 20_000,
|
|
26
|
-
//
|
|
27
|
-
MAX_CACHE_REUSE_RATIO:
|
|
26
|
+
// Server-parity range-plausibility bounds.
|
|
27
|
+
MAX_CACHE_REUSE_RATIO: 100,
|
|
28
28
|
MIN_CACHE_WRITE_RATIO: 0.5,
|
|
29
|
-
MIN_INPUT_SHARE_FRAC: 0.0003,
|
|
30
29
|
MAX_CADENCE_PER_MIN: 15,
|
|
31
30
|
};
|
|
32
31
|
|
|
@@ -115,7 +114,7 @@ export function plausibilityCheck(rt, window) {
|
|
|
115
114
|
out.push({
|
|
116
115
|
severity: "flag",
|
|
117
116
|
code: "extreme_cache_ratio",
|
|
118
|
-
detail: `cache_read/cache_creation = ${(rt.tokens_cache_read / rt.tokens_cache_creation).toFixed(1)}:1 (
|
|
117
|
+
detail: `cache_read/cache_creation = ${(rt.tokens_cache_read / rt.tokens_cache_creation).toFixed(1)}:1 (review threshold 100:1)`,
|
|
119
118
|
});
|
|
120
119
|
}
|
|
121
120
|
if (
|
|
@@ -129,16 +128,6 @@ export function plausibilityCheck(rt, window) {
|
|
|
129
128
|
detail: `cache_creation/output = ${(rt.tokens_cache_creation / rt.tokens_output).toFixed(2)}:1 (real min ~1.5:1)`,
|
|
130
129
|
});
|
|
131
130
|
}
|
|
132
|
-
if (
|
|
133
|
-
pillars > 10_000 &&
|
|
134
|
-
rt.tokens_input_fresh / pillars < GATE_LIMITS.MIN_INPUT_SHARE_FRAC
|
|
135
|
-
) {
|
|
136
|
-
out.push({
|
|
137
|
-
severity: "flag",
|
|
138
|
-
code: "implausible_input_share",
|
|
139
|
-
detail: `input is ${((rt.tokens_input_fresh / pillars) * 100).toFixed(3)}% of total (real min ~0.3%)`,
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
131
|
if (
|
|
143
132
|
rt.active_minutes_est > 0 &&
|
|
144
133
|
rt.turns_total / rt.active_minutes_est > GATE_LIMITS.MAX_CADENCE_PER_MIN
|