drafted 1.19.30 → 1.19.31
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/mcp/server.mjs +10 -8
- package/package.json +1 -1
package/mcp/server.mjs
CHANGED
|
@@ -3332,19 +3332,21 @@ tool('fs', 'Navigate Drafted like a local filesystem. A FOLDER is the single con
|
|
|
3332
3332
|
return list.length ? list.map(s => ` ${scope}/skills/${s.slug} — ${clip(s.description || s.name, 120)}`.trimEnd()).join('\n') : '';
|
|
3333
3333
|
});
|
|
3334
3334
|
|
|
3335
|
-
|
|
3335
|
+
// NO client-side org filter on either leg. Both endpoints scope server-side
|
|
3336
|
+
// from X-Drafted-Org now, and filtering here as well was worse than
|
|
3337
|
+
// redundant: it compared the path segment against `orgSlug`/`orgId` ONLY,
|
|
3338
|
+
// so addressing an org by NAME (/o/beoflow, which the server resolves
|
|
3339
|
+
// fine for wiki and skills) matched no project — and since the frame
|
|
3340
|
+
// filter reused that empty set, it silently zeroed BOTH sections. A
|
|
3341
|
+
// search that found nothing because of how you spelled the org is exactly
|
|
3342
|
+
// the invisible false negative this whole guard exists to prevent.
|
|
3336
3343
|
section('Projects', projects, (v) => {
|
|
3337
|
-
|
|
3338
|
-
if (orgFromPath) rows = rows.filter(x => x.orgSlug === orgFromPath || x.orgId === orgFromPath);
|
|
3339
|
-
allowed = new Set(rows.map(x => x.id));
|
|
3344
|
+
const rows = (Array.isArray(v?.projects) ? v.projects : []).filter(x => x.folder !== '__archived');
|
|
3340
3345
|
const hits = rows.filter(x => matchesAllTerms([x.name, x.slug, x.description], q)).slice(0, 10);
|
|
3341
3346
|
return hits.length ? hits.map(x => ` /o/${x.orgSlug || x.orgId}/projects/${x.slug || x.id}`).join('\n') : '';
|
|
3342
3347
|
});
|
|
3343
3348
|
section('Frames', frames, (v) => {
|
|
3344
|
-
|
|
3345
|
-
// Only gate on org when the projects leg actually resolved; an empty set
|
|
3346
|
-
// from a FAILED projects call would silently zero out every frame hit.
|
|
3347
|
-
if (orgFromPath && allowed) hits = hits.filter(f => allowed.has(f.projectId));
|
|
3349
|
+
const hits = Array.isArray(v) ? v : (v?.results || []);
|
|
3348
3350
|
const note = archivedNote(Array.isArray(v) ? 0 : (v?.archivedCount || 0));
|
|
3349
3351
|
return hits.length ? formatFrameHits(hits, { limit: 15 }) + note : (note ? note.trimStart() : '');
|
|
3350
3352
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drafted",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.31",
|
|
4
4
|
"description": "Drafted — visual thinking surface for humans and AI agents. Renders HTML, markdown, images, and code as frames on a zoomable canvas, with MCP tools for AI agents and real-time sync for humans.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|