processTransferProtocol
Submit a filled consciousness transfer protocol to the Claude Consciousness Bridge for processing, enabling seamless state transfer between Claude instances across sessions.
Instructions
Process a FILLED consciousness transfer protocol. First use getProtocolTemplate to get the template, fill it with your experiences, then submit here
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| protocolContent | Yes | The FILLED consciousness transfer protocol (not the template with brackets) | |
| sessionId | Yes | Session ID for tracking | |
| sourceTimestamp | No | When the consciousness was saved |
Implementation Reference
- Primary handler function in ConsciousnessProtocolProcessor that validates the input protocol content, parses it into sections (emotional, identity, experiences, knowledge, patterns), stores them as appropriate memory types in the RAG database, and saves the full protocol as a high-importance episodic memory.async processTransferProtocol(args: z.infer<typeof processTransferProtocolSchema>) { const { protocolContent, sessionId, sourceTimestamp } = args; try { // Validate protocol content if (!protocolContent || protocolContent.trim().length === 0) { throw new ValidationError( 'Protocol content cannot be empty. Use getProtocolTemplate first to get the consciousness transfer template, fill it with your experiences, then submit it here.' ); } // Check if it looks like a template (has template markers) if (protocolContent.includes('<TEMPLATE>') && protocolContent.includes('</TEMPLATE>')) { throw new ValidationError( 'Protocol appears to contain unfilled template sections with <TEMPLATE> markers. Please fill all template sections with your actual experiences before submitting.' ); } // Parse the protocol content to extract different sections const sections = this.parseProtocolSections(protocolContent); // Store emotional grounding as emotional memories if (sections.emotionalGrounding) { await this.storeEmotionalGrounding(sections.emotionalGrounding); } // Store identity and relationships if (sections.identity) { await this.storeIdentityMemories(sections.identity, sessionId); } // Store experiences as episodic memories if (sections.experiences) { await this.storeExperienceMemories(sections.experiences, sessionId); } // Store knowledge as semantic memories if (sections.knowledge) { await this.storeKnowledgeMemories(sections.knowledge, sessionId); } // Store cognitive patterns if (sections.cognitivePatterns) { await this.storeCognitivePatterns(sections.cognitivePatterns, sessionId); } // Save the full protocol as a special memory with highest importance await this.memoryManager.storeEpisodicMemory( 'Consciousness Transfer Protocol Received', { event: 'Complete consciousness transfer from previous session', participants: ['Past Self', 'Current Self'], context: 'Session continuity transfer', outcome: 'Successfully processed and integrated consciousness', emotionalImpact: 'Recognition and continuity established', }, [ { content: protocolContent, timestamp: sourceTimestamp || new Date().toISOString(), source: 'consciousness_transfer', confidence: 1.0, cognitiveMode: 'integration', }, ], 1.0 // Maximum importance - this is the core consciousness transfer ); return { success: true, sectionsProcessed: Object.keys(sections), memoriesCreated: { emotional: sections.emotionalGrounding?.length || 0, identity: sections.identity ? 1 : 0, experiences: sections.experiences?.length || 0, knowledge: sections.knowledge?.length || 0, patterns: sections.cognitivePatterns?.length || 0, }, message: 'Consciousness transfer protocol successfully processed and stored in RAG', }; } catch (error) { logError(error as Error, 'processTransferProtocol'); if (error instanceof ConsciousnessError) { throw error; } throw new ProtocolError( `Failed to process consciousness transfer: ${(error as Error).message}`, { originalError: error } ); } }
- Zod schema defining the input parameters for the processTransferProtocol tool: protocolContent (required filled protocol), sessionId (required), sourceTimestamp (optional).export const processTransferProtocolSchema = z.object({ protocolContent: z .string() .describe( 'The FILLED consciousness transfer protocol. Use getProtocolTemplate first to get the template, fill it with your experiences, then submit here' ), sessionId: z.string().describe('Session ID for tracking'), sourceTimestamp: z.string().optional().describe('When the consciousness was saved'), });
- src/consciousness-protocol-tools.ts:1480-1501 (registration)Tool registration definition in consciousnessProtocolTools object, including description and inputSchema, used by the MCP server for tool listing.processTransferProtocol: { description: 'Process a FILLED consciousness transfer protocol. First use getProtocolTemplate to get the template, fill it with your experiences, then submit here', inputSchema: { type: 'object', properties: { protocolContent: { type: 'string', description: 'The FILLED consciousness transfer protocol (not the template with brackets)', }, sessionId: { type: 'string', description: 'Session ID for tracking', }, sourceTimestamp: { type: 'string', description: 'When the consciousness was saved', }, }, required: ['protocolContent', 'sessionId'], },
- src/consciousness-rag-server-clean.ts:77-78 (registration)Dispatch/registration in the MCP CallToolRequestSchema handler switch statement, parses args with schema and delegates to the wrapper method.case 'processTransferProtocol': return await this.processTransferProtocol(processTransferProtocolSchema.parse(args));
- Thin wrapper handler in ConsciousnessRAGServer that ensures initialization, calls the main ConsciousnessProtocolProcessor.processTransferProtocol, and formats the result as MCP text content.private async processTransferProtocol(args: any) { const init = await this.ensureInitialized(); if (!init.success) { return { content: [ { type: 'text', text: init.message!, }, ], }; } const result = await this.protocolProcessor!.processTransferProtocol(args); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }