drafted 1.19.44 → 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.
Files changed (2) hide show
  1. package/mcp/server.mjs +13 -2
  2. package/package.json +1 -1
package/mcp/server.mjs CHANGED
@@ -469,6 +469,9 @@ const TOOL_ANNOTATIONS = {
469
469
  minion: { title: 'Minions', readOnlyHint: false, destructiveHint: true, openWorldHint: false, description: 'Manage Minions: checklist-driven intake surfaces that guide a consumer through a checklist (via a shareable /c/<slug>-<token> link) and write a producible into the project. Dispatch by `action`: meta, list, get, create, update, enable, disable, delete. QA your own Minions with test_start/test_say/test_resolve — drive the checklist conversation yourself (works even when disabled). Requires the agent allowlist.' },
470
470
  trigger: { title: 'Inbound triggers', readOnlyHint: false, destructiveHint: true, openWorldHint: true, description: 'Manage inbound webhook triggers for the ACTIVE PROJECT: an external system (AppSheet bot, GitHub, form tool) POSTs to the trigger URL and the server runs an agent conversation in the project from the stored prompt template + payload. Dispatch by `action`: create (returns URL + secret token ONCE — relay it to the user immediately, not retrievable later), list, update (enable/disable, edit template, daily limit, executor), rotate (new token), test (fire a synthetic delivery), deliveries (audit log), delete; for executor="queue" triggers, pending/claim/complete let a LOCAL agent poll and work queued deliveries. Requires the agent allowlist.' },
471
471
  fs: { title: 'Filesystem', readOnlyHint: false, destructiveHint: true, openWorldHint: false, description: 'Navigate Drafted like a local filesystem: /wiki/<path> pages, /skills/<slug> procedures, /projects/<folder?>/<project>/<layer>/<lane>/<file> frames. Verbs: ls, read, write, edit, mv, rm, search, link, unlink, links.' },
472
+ // Google Drive mirror triage. Mutating (resolve/retry_all/sync rewrite frame
473
+ // content and re-push files) and openWorld (it reaches Google).
474
+ drive: { title: 'Drive conflicts', readOnlyHint: false, destructiveHint: true, openWorldHint: true },
472
475
  repo: { title: 'Git repos', readOnlyHint: false, destructiveHint: true, openWorldHint: true, description: 'Registered git repos — the org index of .agents/ skills + identities. A connected repo is the source of truth for its skills; EVERY repo connected to ANY folder in the org is searchable and usable org-wide (no org-level repo — the union is the library). Skills from connected repos are readable via fs(read, path="/skills/<slug>") — fetched from git at read time, always fresh. Authoring a Drafted skill whose slug collides with a repo-indexed skill returns 409 repo_owned pointing at the repo. Dispatch by `action`: list (paginated, compact mode), rescan (re-fetch the tracked branch), entries (search the index). Linking and unlinking are NOT here — a human does them in the Drafted UI. Content stays in git; Drafted keeps a read-only index.' },
473
476
  };
474
477
 
@@ -2559,15 +2562,22 @@ async function sessionSurfaceBlock() {
2559
2562
  async function getGoogleDriveAvailability() {
2560
2563
  try {
2561
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
+ : '';
2562
2571
  return {
2563
2572
  connected: !!status?.connected,
2564
2573
  driveRootFolderName: status?.driveRootFolderName || null,
2574
+ otherConnectedOrgs: others,
2565
2575
  preference: status?.connected
2566
2576
  ? 'Google Drive is connected for this org — strongly prefer Google Workspace frames (.google-doc / .google-sheet / .google-slide) for docs, sheets, and decks.'
2567
- : '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,
2568
2578
  };
2569
2579
  } catch {
2570
- 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.' };
2571
2581
  }
2572
2582
  }
2573
2583
 
@@ -4389,6 +4399,7 @@ tool('drive', 'The org\'s Google Drive mirror: its state, and the conflicts a hu
4389
4399
  connectionMode: conn?.connectionMode || null,
4390
4400
  googleEmail: conn?.googleEmail || null,
4391
4401
  driveRootFolderName: conn?.driveRootFolderName || null,
4402
+ otherConnectedOrgs: conn?.otherConnectedOrgs || [],
4392
4403
  syncEnabled: conn?.syncEnabled ?? null,
4393
4404
  openConflicts: rows.length,
4394
4405
  openConflictsByType: countByType(rows),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drafted",
3
- "version": "1.19.44",
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": [