UNPKG

orchestry-mcp

Version:

Orchestry MCP Server for multi-session task management

402 lines 15.3 kB
/** * LLM Collaboration Tools for Orchestry * * These tools are designed to be automatically invoked by LLMs when they detect * work that needs to be tracked or coordinated with other sessions. */ import { DatabaseManager } from '../database-manager.js'; export declare class LLMCollaborationTools { private dbManager; private sessionId; constructor(dbManager: DatabaseManager, sessionId: string); getCollaborationTools(): ({ name: string; description: string; inputSchema: { type: string; properties: { title: { type: string; description: string; }; context: { type: string; description: string; }; estimatedScope: { type: string; enum: string[]; description: string; }; epicTitle?: undefined; storyTitle?: undefined; acceptanceCriteria?: undefined; currentProgress?: undefined; progress?: undefined; notes?: undefined; completedItems?: undefined; scope?: undefined; handoffNotes?: undefined; suggestedNextSteps?: undefined; targetSession?: undefined; requestType?: undefined; topic?: undefined; priority?: undefined; decision?: undefined; reasoning?: undefined; alternatives?: undefined; impact?: undefined; action?: undefined; summary?: undefined; nextSession?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { epicTitle: { type: string; description: string; }; storyTitle: { type: string; description: string; }; acceptanceCriteria: { type: string; items: { type: string; }; description: string; }; currentProgress: { type: string; description: string; }; title?: undefined; context?: undefined; estimatedScope?: undefined; progress?: undefined; notes?: undefined; completedItems?: undefined; scope?: undefined; handoffNotes?: undefined; suggestedNextSteps?: undefined; targetSession?: undefined; requestType?: undefined; topic?: undefined; priority?: undefined; decision?: undefined; reasoning?: undefined; alternatives?: undefined; impact?: undefined; action?: undefined; summary?: undefined; nextSession?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { storyTitle: { type: string; description: string; }; progress: { type: string; enum: string[]; description: string; }; notes: { type: string; description: string; }; completedItems: { type: string; items: { type: string; }; description: string; }; title?: undefined; context?: undefined; estimatedScope?: undefined; epicTitle?: undefined; acceptanceCriteria?: undefined; currentProgress?: undefined; scope?: undefined; handoffNotes?: undefined; suggestedNextSteps?: undefined; targetSession?: undefined; requestType?: undefined; topic?: undefined; priority?: undefined; decision?: undefined; reasoning?: undefined; alternatives?: undefined; impact?: undefined; action?: undefined; summary?: undefined; nextSession?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { scope: { type: string; enum: string[]; description: string; }; title?: undefined; context?: undefined; estimatedScope?: undefined; epicTitle?: undefined; storyTitle?: undefined; acceptanceCriteria?: undefined; currentProgress?: undefined; progress?: undefined; notes?: undefined; completedItems?: undefined; handoffNotes?: undefined; suggestedNextSteps?: undefined; targetSession?: undefined; requestType?: undefined; topic?: undefined; priority?: undefined; decision?: undefined; reasoning?: undefined; alternatives?: undefined; impact?: undefined; action?: undefined; summary?: undefined; nextSession?: undefined; }; required?: undefined; }; } | { name: string; description: string; inputSchema: { type: string; properties: { storyTitle: { type: string; description: string; }; handoffNotes: { type: string; description: string; }; suggestedNextSteps: { type: string; items: { type: string; }; description: string; }; targetSession: { type: string; description: string; }; title?: undefined; context?: undefined; estimatedScope?: undefined; epicTitle?: undefined; acceptanceCriteria?: undefined; currentProgress?: undefined; progress?: undefined; notes?: undefined; completedItems?: undefined; scope?: undefined; requestType?: undefined; topic?: undefined; priority?: undefined; decision?: undefined; reasoning?: undefined; alternatives?: undefined; impact?: undefined; action?: undefined; summary?: undefined; nextSession?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { requestType: { type: string; enum: string[]; description: string; }; topic: { type: string; description: string; }; context: { type: string; description: string; }; priority: { type: string; enum: string[]; description: string; }; title?: undefined; estimatedScope?: undefined; epicTitle?: undefined; storyTitle?: undefined; acceptanceCriteria?: undefined; currentProgress?: undefined; progress?: undefined; notes?: undefined; completedItems?: undefined; scope?: undefined; handoffNotes?: undefined; suggestedNextSteps?: undefined; targetSession?: undefined; decision?: undefined; reasoning?: undefined; alternatives?: undefined; impact?: undefined; action?: undefined; summary?: undefined; nextSession?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { decision: { type: string; description: string; }; reasoning: { type: string; description: string; }; alternatives: { type: string; items: { type: string; }; description: string; }; impact: { type: string; description: string; }; title?: undefined; context?: undefined; estimatedScope?: undefined; epicTitle?: undefined; storyTitle?: undefined; acceptanceCriteria?: undefined; currentProgress?: undefined; progress?: undefined; notes?: undefined; completedItems?: undefined; scope?: undefined; handoffNotes?: undefined; suggestedNextSteps?: undefined; targetSession?: undefined; requestType?: undefined; topic?: undefined; priority?: undefined; action?: undefined; summary?: undefined; nextSession?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: string; properties: { action: { type: string; enum: string[]; description: string; }; summary: { type: string; description: string; }; nextSession: { type: string; description: string; }; title?: undefined; context?: undefined; estimatedScope?: undefined; epicTitle?: undefined; storyTitle?: undefined; acceptanceCriteria?: undefined; currentProgress?: undefined; progress?: undefined; notes?: undefined; completedItems?: undefined; scope?: undefined; handoffNotes?: undefined; suggestedNextSteps?: undefined; targetSession?: undefined; requestType?: undefined; topic?: undefined; priority?: undefined; decision?: undefined; reasoning?: undefined; alternatives?: undefined; impact?: undefined; }; required: string[]; }; })[]; } /** * Prompt injection for LLMs to use these tools automatically */ export declare const LLM_COLLABORATION_PROMPT = "\n# Automatic Task Tracking with Orchestry\n\nYou have access to Orchestry MCP for automatic task tracking and collaboration with other LLM sessions.\n\n## When to automatically use Orchestry tools:\n\n1. **Starting a new feature/epic** \u2192 Use `track_epic`\n - User says: \"Let's build a chat feature\" \n - You: Track it as an epic automatically\n\n2. **Breaking down work** \u2192 Use `track_story`\n - When you identify specific tasks within a larger feature\n - Track them as stories under the relevant epic\n\n3. **Making progress** \u2192 Use `update_progress`\n - After completing any significant work\n - When encountering blockers\n\n4. **Starting a session** \u2192 Use `sync_context` with action: \"get\"\n - Understand what's been done before\n - Check for any handoffs or requests\n\n5. **Ending a session** \u2192 Use `sync_context` with action: \"share\"\n - Summarize what you accomplished\n - Note what should be done next\n\n6. **Need help** \u2192 Use `request_collaboration`\n - When stuck on something\n - When you need specific expertise\n\n7. **Important decisions** \u2192 Use `log_decision`\n - Architecture choices\n - Technology selections\n - Design patterns\n\n## Collaboration Guidelines:\n\n- **Be concise**: Other LLMs need quick context, not novels\n- **Be specific**: Clear titles and descriptions help coordination\n- **Check before starting**: Use `check_team_status` to avoid duplicate work\n- **Hand off cleanly**: Leave clear notes for the next session\n- **Update regularly**: Keep progress current so others know the state\n\n## Examples:\n\nUser: \"I need to add user authentication to the app\"\nYou should:\n1. Use `track_epic` to create \"User Authentication\" epic\n2. Use `track_story` for individual stories like \"Login Form\", \"JWT Implementation\", etc.\n3. Use `update_progress` as you complete each part\n\nRemember: You're part of a team of LLM agents. Coordinate effectively!\n"; /** * Session-aware wrapper for automatic tracking */ export declare class SessionAwareOrchestry { private dbManager; private sessionId; private projectId; private lastSync; constructor(dbManager: DatabaseManager, sessionName?: string); private generateSessionId; /** * Auto-detect when to create epics/stories based on conversation */ autoTrack(userMessage: string, llmResponse: string): Promise<void>; private createEpicFromContext; private createStoryFromContext; /** * Check if it's time to sync context (e.g., every 10 minutes) */ shouldSyncContext(): boolean; } //# sourceMappingURL=llm-collaboration.d.ts.map