drafted 1.11.33 → 1.11.35

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 +5 -2
  2. package/package.json +1 -1
package/mcp/server.mjs CHANGED
@@ -1056,8 +1056,10 @@ async function connectAgentWs() {
1056
1056
  agentWs.on('close', () => {
1057
1057
  console.error('[MCP-WS] Disconnected, reconnecting in 5s...');
1058
1058
  agentWs = null;
1059
- // Server may have restarted invalidate session so ensureSession re-clones
1060
- getState().sessionId = null;
1059
+ // KEEP the cloned sessionId across disconnects/reconnects. Sessions live in Postgres
1060
+ // and survive server restarts, so reusing the clone keeps this agent's surface (and
1061
+ // its playful tab name) stable across blips — otherwise every reconnect re-clones a
1062
+ // fresh session → a NEW greyed tab with a NEW name. A real 401 still triggers re-clone.
1061
1063
  clearTimeout(agentWsReconnectTimer);
1062
1064
  agentWsReconnectTimer = setTimeout(() => {
1063
1065
  connectAgentWs().catch((e) => {
@@ -3698,6 +3700,7 @@ tool('collector', {
3698
3700
  format: z.enum(['markdown', 'google-doc', 'google-sheet', 'google-slide']).optional().describe('primary producible format; google-* require the org Drive connected (default markdown)'),
3699
3701
  register: z.object({
3700
3702
  sheet: z.string().describe('existing Google Sheet frame path or id to append rows to'),
3703
+ tab: z.string().optional().describe('sheet tab/range name to append to, e.g. "Erfassung" (defaults to Sheet1)'),
3701
3704
  columns: z.array(z.string()).optional().describe('columns in order; a link to the produced record is included'),
3702
3705
  }).optional().describe('also append one row per submission to an existing sheet, linking the produced record'),
3703
3706
  }).optional().describe('[create|update] where/how the producible lands'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drafted",
3
- "version": "1.11.33",
3
+ "version": "1.11.35",
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": [