drafted 1.19.45 → 1.19.46
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 -2
- package/package.json +1 -1
package/mcp/server.mjs
CHANGED
|
@@ -2562,15 +2562,22 @@ async function sessionSurfaceBlock() {
|
|
|
2562
2562
|
async function getGoogleDriveAvailability() {
|
|
2563
2563
|
try {
|
|
2564
2564
|
const status = await api('GET', '/api/google/status');
|
|
2565
|
+
const others = Array.isArray(status?.otherConnectedOrgs) ? status.otherConnectedOrgs : [];
|
|
2566
|
+
const otherHint = others.length
|
|
2567
|
+
? ' Google Drive IS connected in org(s) you belong to: '
|
|
2568
|
+
+ others.map((o) => `${o.orgName} (${o.mode}) → address /o/${o.orgSlug}/...`).join('; ')
|
|
2569
|
+
+ '.'
|
|
2570
|
+
: '';
|
|
2565
2571
|
return {
|
|
2566
2572
|
connected: !!status?.connected,
|
|
2567
2573
|
driveRootFolderName: status?.driveRootFolderName || null,
|
|
2574
|
+
otherConnectedOrgs: others,
|
|
2568
2575
|
preference: status?.connected
|
|
2569
2576
|
? 'Google Drive is connected for this org — strongly prefer Google Workspace frames (.google-doc / .google-sheet / .google-slide) for docs, sheets, and decks.'
|
|
2570
|
-
: 'Google Drive is not connected for this org — use normal Drafted frames (.md / .html); Google Workspace writes will fail.',
|
|
2577
|
+
: 'Google Drive is not connected for this org — use normal Drafted frames (.md / .html); Google Workspace writes will fail.' + otherHint,
|
|
2571
2578
|
};
|
|
2572
2579
|
} catch {
|
|
2573
|
-
return { connected: false, driveRootFolderName: null, preference: 'Google Drive status unavailable — use normal Drafted frames.' };
|
|
2580
|
+
return { connected: false, driveRootFolderName: null, otherConnectedOrgs: [], preference: 'Google Drive status unavailable — use normal Drafted frames.' };
|
|
2574
2581
|
}
|
|
2575
2582
|
}
|
|
2576
2583
|
|
|
@@ -4392,6 +4399,7 @@ tool('drive', 'The org\'s Google Drive mirror: its state, and the conflicts a hu
|
|
|
4392
4399
|
connectionMode: conn?.connectionMode || null,
|
|
4393
4400
|
googleEmail: conn?.googleEmail || null,
|
|
4394
4401
|
driveRootFolderName: conn?.driveRootFolderName || null,
|
|
4402
|
+
otherConnectedOrgs: conn?.otherConnectedOrgs || [],
|
|
4395
4403
|
syncEnabled: conn?.syncEnabled ?? null,
|
|
4396
4404
|
openConflicts: rows.length,
|
|
4397
4405
|
openConflictsByType: countByType(rows),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drafted",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.46",
|
|
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": [
|