sigrank 1.0.46 → 1.0.48
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/CHANGELOG.md +14 -0
- package/MCP_SERVER_DESCRIPTION.md +3 -3
- package/README.md +90 -424
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/presentation/cli.mjs +4 -77
- package/presentation/tui-themes.mjs +43 -28
- package/presentation/tui.mjs +958 -268
- package/resources/privacy-model.md +4 -4
- package/tools/watch-tokenpull.mjs +14 -3
package/presentation/cli.mjs
CHANGED
|
@@ -1461,86 +1461,13 @@ async function runSigRank() {
|
|
|
1461
1461
|
resolve();
|
|
1462
1462
|
return;
|
|
1463
1463
|
}
|
|
1464
|
-
// NOT enrolled →
|
|
1464
|
+
// NOT enrolled → nothing is sent. Publishing is signed-only; the old
|
|
1465
|
+
// codename-only paste POST was removed (the endpoint needs a web session).
|
|
1465
1466
|
writeln();
|
|
1466
1467
|
writeln(
|
|
1467
|
-
` ${dim("Not enrolled — run")} ${bold("npx sigrank enroll")} ${dim("to
|
|
1468
|
+
` ${dim("Not enrolled — run")} ${bold("npx sigrank enroll")} ${dim("to publish as a verified operator, or submit at signalaf.com.")}`,
|
|
1468
1469
|
);
|
|
1469
|
-
|
|
1470
|
-
let codename = "";
|
|
1471
|
-
process.stdin.on("data", async function onData(chunk) {
|
|
1472
|
-
if (chunk === "\r" || chunk === "\n") {
|
|
1473
|
-
process.stdin.removeListener("data", onData);
|
|
1474
|
-
codename = codename.trim();
|
|
1475
|
-
if (!codename) {
|
|
1476
|
-
writeln(red(" ✗ codename required"));
|
|
1477
|
-
resolve();
|
|
1478
|
-
return;
|
|
1479
|
-
}
|
|
1480
|
-
writeln();
|
|
1481
|
-
writeln(
|
|
1482
|
-
` ${dim("Submitting all windows for")} ${cyan(codename)}${dim("…")}`,
|
|
1483
|
-
);
|
|
1484
|
-
write(HIDE_CURSOR);
|
|
1485
|
-
try {
|
|
1486
|
-
for (const d of active) {
|
|
1487
|
-
const apiBase = DEFAULT_API_BASE;
|
|
1488
|
-
const WINDOW_TYPE = {
|
|
1489
|
-
"7d": "7d",
|
|
1490
|
-
"30d": "30d",
|
|
1491
|
-
"90d": "90d",
|
|
1492
|
-
all: "all_time",
|
|
1493
|
-
};
|
|
1494
|
-
for (const ww of d.windows ?? []) {
|
|
1495
|
-
const rawPaste = `${ww.pillars.input} ${ww.pillars.output} ${ww.pillars.cacheCreate} ${ww.pillars.cacheRead}`;
|
|
1496
|
-
const windowType = WINDOW_TYPE[ww.window] || ww.window;
|
|
1497
|
-
const now = new Date();
|
|
1498
|
-
const ddmmyy = `${String(now.getDate()).padStart(2, "0")}${String(now.getMonth() + 1).padStart(2, "0")}${String(now.getFullYear()).slice(-2)}`;
|
|
1499
|
-
const content_hash = `sha256:${codename}|${windowType}|${rawPaste}|${ddmmyy}`;
|
|
1500
|
-
const res = await fetch(`${apiBase}/api/v1/ingest-paste`, {
|
|
1501
|
-
method: "POST",
|
|
1502
|
-
headers: {
|
|
1503
|
-
"content-type": "application/json",
|
|
1504
|
-
accept: "application/json",
|
|
1505
|
-
"user-agent": `node/${process.version} sigrank-mcp/cli`,
|
|
1506
|
-
},
|
|
1507
|
-
body: JSON.stringify({
|
|
1508
|
-
codename,
|
|
1509
|
-
raw_paste: rawPaste,
|
|
1510
|
-
window_type: windowType,
|
|
1511
|
-
telemetry: { platform: { primary: d.platform } },
|
|
1512
|
-
content_hash,
|
|
1513
|
-
submitted_ddmmyy: ddmmyy,
|
|
1514
|
-
submitted_at: now.toISOString(),
|
|
1515
|
-
}),
|
|
1516
|
-
}).catch(() => null);
|
|
1517
|
-
const ok = res?.ok ?? false;
|
|
1518
|
-
const status = ok ? green("✓") : red("✗");
|
|
1519
|
-
writeln(
|
|
1520
|
-
` ${status} ${d.platform} ${ww.window}${!ok ? dim(` HTTP ${res?.status ?? "err"}`) : ""}`,
|
|
1521
|
-
);
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
writeln();
|
|
1525
|
-
writeln(
|
|
1526
|
-
` ${green("✓")} Submitted. Visit ${cyan(`signalaf.com/user/${codename}`)}`,
|
|
1527
|
-
);
|
|
1528
|
-
} catch (e) {
|
|
1529
|
-
writeln(red(` ✗ ${e.message}`));
|
|
1530
|
-
}
|
|
1531
|
-
resolve();
|
|
1532
|
-
} else if (chunk === "\u007f") {
|
|
1533
|
-
// backspace
|
|
1534
|
-
if (codename.length > 0) {
|
|
1535
|
-
codename = codename.slice(0, -1);
|
|
1536
|
-
process.stdout.write("\b \b");
|
|
1537
|
-
}
|
|
1538
|
-
} else {
|
|
1539
|
-
codename += chunk;
|
|
1540
|
-
process.stdout.write(chunk);
|
|
1541
|
-
}
|
|
1542
|
-
});
|
|
1543
|
-
process.stdin.resume();
|
|
1470
|
+
resolve();
|
|
1544
1471
|
}
|
|
1545
1472
|
});
|
|
1546
1473
|
});
|
|
@@ -132,40 +132,31 @@ export function getThemeNames() {
|
|
|
132
132
|
// (the default theme). For light theme, darker 256-color variants are used.
|
|
133
133
|
// Monochrome theme returns no color (bold only) — colorblind-safe.
|
|
134
134
|
//
|
|
135
|
-
// Color assignments (dark theme 256-color codes):
|
|
136
|
-
// claude = 75 (blue-cyan)
|
|
137
|
-
// codex = 114 (green)
|
|
138
|
-
// amp = 179 (orange)
|
|
139
|
-
// gemini = 129 (purple-magenta)
|
|
140
|
-
// kimi = 213 (pink)
|
|
141
|
-
// qwen = 68 (steel blue)
|
|
142
|
-
// goose = 142 (olive)
|
|
143
|
-
// kilo = 166 (dark orange)
|
|
144
|
-
// hermes = 96 (plum)
|
|
145
|
-
// droid = 167 (salmon)
|
|
146
|
-
// codebuff = 72 (teal-green)
|
|
147
|
-
// copilot = 33 (bright blue)
|
|
148
|
-
// openclaw = 136 (gold-brown)
|
|
149
|
-
// pi = 177 (light purple)
|
|
150
|
-
// omp = 220 (gold — the "oh my pi" platform gets gold)
|
|
151
|
-
// opencode = 60 (slate)
|
|
152
|
-
// devin = 30 (teal)
|
|
153
|
-
// proxy = 245 (gray — synthetic passthrough)
|
|
154
|
-
// other = 245 (gray — catch-all)
|
|
155
135
|
|
|
136
|
+
// Brand-matched (owner 2026-10-15: "claude orange, devin blue, etc"):
|
|
137
|
+
// claude Anthropic orange · codex OpenAI green · gemini Google blue ·
|
|
138
|
+
// antigravity Google green · devin Cognition blue · copilot GitHub purple ·
|
|
139
|
+
// qwen purple · kilo yellow · grok xAI silver · openclaw lobster red ·
|
|
140
|
+
// amp red · kimi Moonshot blue · hermes Nous blue · droid Factory orange ·
|
|
141
|
+
// codebuff acid green · pi gold (π palette) · zcode Z.ai blue.
|
|
142
|
+
// goose / opencode have monochrome brands → distinct neutral greys.
|
|
143
|
+
// omp keeps its gold. Codes nudged where the nearest brand code collided
|
|
144
|
+
// with another platform (amp 196 vs openclaw 203, droid 208 vs 202, …).
|
|
156
145
|
const PLATFORM_COLORS_DARK = {
|
|
157
|
-
claude:
|
|
158
|
-
qwen:
|
|
159
|
-
codebuff:
|
|
160
|
-
opencode:
|
|
146
|
+
claude: 173, codex: 36, amp: 196, gemini: 69, kimi: 33,
|
|
147
|
+
qwen: 63, goose: 245, kilo: 227, hermes: 27, droid: 208,
|
|
148
|
+
codebuff: 48, copilot: 98, openclaw: 203, pi: 179, omp: 220,
|
|
149
|
+
opencode: 252, devin: 39, proxy: 240, other: 240,
|
|
150
|
+
antigravity: 71, grok: 250, zcode: 111,
|
|
161
151
|
};
|
|
162
152
|
|
|
163
153
|
// Light theme: darker shades of the same hues for contrast on white
|
|
164
154
|
const PLATFORM_COLORS_LIGHT = {
|
|
165
|
-
claude:
|
|
166
|
-
qwen:
|
|
167
|
-
codebuff:
|
|
168
|
-
opencode:
|
|
155
|
+
claude: 130, codex: 29, amp: 160, gemini: 26, kimi: 27,
|
|
156
|
+
qwen: 56, goose: 243, kilo: 136, hermes: 21, droid: 94,
|
|
157
|
+
codebuff: 29, copilot: 55, openclaw: 124, pi: 136, omp: 136,
|
|
158
|
+
opencode: 243, devin: 25, proxy: 242, other: 242,
|
|
159
|
+
antigravity: 28, grok: 240, zcode: 24,
|
|
169
160
|
};
|
|
170
161
|
|
|
171
162
|
/**
|
|
@@ -187,3 +178,27 @@ export function platformColor(platform) {
|
|
|
187
178
|
}
|
|
188
179
|
return (s) => `${ESC}38;5;${code}m${s}${currentTheme.reset}`;
|
|
189
180
|
}
|
|
181
|
+
|
|
182
|
+
// ── Build archetype colors ──────────────────────────────────────────────────
|
|
183
|
+
// Hues follow signalaf.com/field (build archetypes), mapped to 256-color codes.
|
|
184
|
+
// Keys match classifyArchetype().key in presentation/narrate.mjs.
|
|
185
|
+
const ARCHETYPE_COLORS_DARK = {
|
|
186
|
+
convergent: 140, kinetic: 204, amplifier: 209, recursive: 178, builder: 214,
|
|
187
|
+
archivist: 35, "deep-reader": 41, contextual: 79, priming: 74, "input-bound": 33,
|
|
188
|
+
};
|
|
189
|
+
const ARCHETYPE_COLORS_LIGHT = {
|
|
190
|
+
convergent: 97, kinetic: 161, amplifier: 166, recursive: 136, builder: 130,
|
|
191
|
+
archivist: 29, "deep-reader": 28, contextual: 30, priming: 31, "input-bound": 25,
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
/** Paint function for a build archetype key, theme-aware (monochrome → bold). */
|
|
195
|
+
export function archetypeColor(key) {
|
|
196
|
+
const themeName = currentTheme.name;
|
|
197
|
+
if (themeName === "monochrome") {
|
|
198
|
+
return (s) => `${currentTheme.bold}${s}${currentTheme.reset}`;
|
|
199
|
+
}
|
|
200
|
+
const map = themeName === "light" ? ARCHETYPE_COLORS_LIGHT : ARCHETYPE_COLORS_DARK;
|
|
201
|
+
const code = map[key];
|
|
202
|
+
if (code == null) return (s) => `${currentTheme.cyan}${s}${currentTheme.reset}`;
|
|
203
|
+
return (s) => `${ESC}38;5;${code}m${s}${currentTheme.reset}`;
|
|
204
|
+
}
|