drafted 1.19.28 → 1.19.29
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 +18 -6
- package/package.json +1 -1
package/mcp/server.mjs
CHANGED
|
@@ -3262,13 +3262,25 @@ tool('fs', 'Navigate Drafted like a local filesystem. A FOLDER is the single con
|
|
|
3262
3262
|
{
|
|
3263
3263
|
const orgs = await getOrgList();
|
|
3264
3264
|
if (searchNeedsOrg({ explicitOrg: org, orgFromPath, orgCount: orgs.length })) {
|
|
3265
|
-
|
|
3265
|
+
// Work is almost always org-specific, and this session usually already
|
|
3266
|
+
// knows WHICH — a binding, an open project, or the linked repo of the
|
|
3267
|
+
// checkout you are sitting in. Refusing to SCOPE by that is the whole
|
|
3268
|
+
// point (it would be silent); refusing to NAME it is just unhelpful.
|
|
3269
|
+
// So lead with the likely answer and make the retry a copy-paste.
|
|
3270
|
+
const likelyId = workingOrgId();
|
|
3271
|
+
const likely = likelyId ? orgs.find(o => o.id === likelyId) : null;
|
|
3272
|
+
const addr = (o) => o.slug || o.name || o.id;
|
|
3273
|
+
const others = orgs.filter(o => o.id !== likelyId).map(addr).filter(Boolean);
|
|
3266
3274
|
return err(new Error(
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3275
|
+
(likely
|
|
3276
|
+
? `Which org? Search will not guess. This session is working in "${addr(likely)}" (source: ${workingOrgSource()}) — if that is what you meant, say so:\n` +
|
|
3277
|
+
` fs(search, path="/o/${addr(likely)}", query="${q}")\n` +
|
|
3278
|
+
`Your other ${others.length} org(s): ${others.join(', ')}.\n`
|
|
3279
|
+
: `Which org? Search needs one, and you belong to ${orgs.length}: ${others.join(', ')}.\n` +
|
|
3280
|
+
` fs(search, path="/o/<org>", query="${q}")\n`) +
|
|
3281
|
+
`Naming it is not overhead — a search that quietly scoped itself reports "no matches" for every ` +
|
|
3282
|
+
`org it skipped, which is indistinguishable from "nowhere" and stops you looking.\n` +
|
|
3283
|
+
`(Or org="<name>" on this call. Several orgs = one call each; every result says which org it came from.)`
|
|
3272
3284
|
));
|
|
3273
3285
|
}
|
|
3274
3286
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drafted",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.29",
|
|
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": [
|