@cachly-dev/mcp-server 0.10.71 → 0.10.72
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/README.md +1 -1
- package/dist/src/handlers/brain.js +14 -2
- package/dist/src/handlers/brain.js.map +1 -1
- package/dist/src/handlers/team.d.ts +8 -0
- package/dist/src/handlers/team.js +148 -3
- package/dist/src/handlers/team.js.map +1 -1
- package/dist/src/index.js +29 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/tools.d.ts +56 -0
- package/dist/src/tools.js +50 -0
- package/dist/src/tools.js.map +1 -1
- package/package.json +2 -2
- package/server.json +3 -3
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<img src="https://img.shields.io/badge/GDPR-EU%20servers-green" alt="GDPR: EU servers" />
|
|
23
23
|
</a>
|
|
24
24
|
|
|
25
|
-
<img src="https://img.shields.io/badge/
|
|
25
|
+
<img src="https://img.shields.io/badge/105%20MCP%20tools-violet" alt="105 MCP tools" />
|
|
26
26
|
|
|
27
27
|
<img src="https://img.shields.io/badge/License-Apache--2.0-yellow" alt="License: Apache-2.0" />
|
|
28
28
|
</p>
|
|
@@ -2,12 +2,21 @@ import { execSync } from 'node:child_process';
|
|
|
2
2
|
import { calculateConfidence, confidenceBadge, STRUCTURED_TEMPLATES, CONFIDENCE_WARN_VALUE, CONFIDENCE_STALE_VALUE, CONFIDENCE_WARN_DAYS } from '../confidence.js';
|
|
3
3
|
import { ckgSlug, extractProblemConcept, ckgUpsertNode, ckgUpdateEdge, ckgUpsertPersonNode, ckgUpsertFileNode, ckgRecordCollaboration, ckgUpsertServiceNode } from '../ckg.js';
|
|
4
4
|
import { safeJsonParse, scanKeys } from '../utils.js';
|
|
5
|
+
import { getRole, ROLE_BADGE } from './team.js';
|
|
5
6
|
import { keywordSearch, tokenize, splitMultiQuery, levenshtein, indexVocab as _indexVocab } from '../search.js';
|
|
6
7
|
import { rerankByQuality } from '../rerank.js';
|
|
7
8
|
import { computeEmbedding, hasEmbedProvider } from '../embeddings.js';
|
|
8
9
|
// ── Changelog (shown once per version in session_start) ──────────────────────
|
|
9
|
-
const MCP_VERSION = '0.10.
|
|
10
|
+
const MCP_VERSION = '0.10.72';
|
|
10
11
|
const WHATS_NEW = {
|
|
12
|
+
'0.10.72': [
|
|
13
|
+
`👑 **Role model — admin · reviewer · contributor · viewer (Phase 3)**`,
|
|
14
|
+
` 🆕 \`team_assign_role\` — establish governance; first call bootstraps, admins manage the rest`,
|
|
15
|
+
` 🆕 \`team_whoami\` — see your own role and capabilities`,
|
|
16
|
+
` 🆕 \`team_roster\` — full team role table (👑🛡️✏️👁️)`,
|
|
17
|
+
` 🛡️ \`team_confirm\` is now role-aware — admin/reviewer auto-get senior weight; contributor gets peer; no self-promotion`,
|
|
18
|
+
` 👑 Setup CLI now prompts for governance bootstrap (idempotent). 105 MCP tools`,
|
|
19
|
+
],
|
|
11
20
|
'0.10.71': [
|
|
12
21
|
`🛡️ **Self-healing auth** — no more silent "0 recalls because the token quietly died"`,
|
|
13
22
|
` ♻️ Near-expiry tokens auto-refresh into a long-lived key while still valid (zero interaction)`,
|
|
@@ -2068,7 +2077,10 @@ export async function handleBrainTool(name, args, getConnection, apiFetch) {
|
|
|
2068
2077
|
const conf = (p.avgConfidence * 100).toFixed(0);
|
|
2069
2078
|
const daysSince = Math.floor((Date.now() - new Date(p.lastActive).getTime()) / 86400000);
|
|
2070
2079
|
const recency = daysSince < 1 ? 'today' : daysSince < 7 ? `${daysSince}d ago` : daysSince < 30 ? `${Math.floor(daysSince / 7)}w ago` : `${Math.floor(daysSince / 30)}mo ago`;
|
|
2071
|
-
|
|
2080
|
+
// Show role badge if assigned (non-blocking — role lookup is best-effort)
|
|
2081
|
+
const roleVal = await getRole(redis, instance_id, p.handle).catch(() => null);
|
|
2082
|
+
const roleBadge = roleVal ? ` ${ROLE_BADGE[roleVal]}` : '';
|
|
2083
|
+
lines.push(`${medal} **${p.handle}**${roleBadge} — ${p.lessonCount} lesson${p.lessonCount !== 1 ? 's' : ''} · ${conf}% confidence · last active ${recency}`, ` _domains: ${p.domains}_`, ``);
|
|
2072
2084
|
}
|
|
2073
2085
|
if (topCollaborators.length > 0 && topExpert) {
|
|
2074
2086
|
lines.push(`🤝 **${topExpert.handle}** frequently works with: ${topCollaborators.map(h => `**${h}**`).join(', ')}`, ` _(ask them together — they've solved structurally similar things on shared files)_`, ``);
|