snow-flow 8.4.21 → 8.4.23
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/CLAUDE.md +1 -1
- package/README.md +23 -23
- package/{OPENCODE-SETUP.md → SNOWCODE-SETUP.md} +19 -19
- package/{OPENCODE-TROUBLESHOOTING.md → SNOWCODE-TROUBLESHOOTING.md} +18 -18
- package/dist/cli/auth.js +21 -21
- package/dist/cli/auth.js.map +1 -1
- package/dist/cli.js +208 -208
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/templates/claude-md-template.d.ts +1 -1
- package/dist/templates/claude-md-template.js +1 -1
- package/dist/templates/readme-template.d.ts +1 -1
- package/dist/templates/readme-template.js +18 -18
- package/dist/utils/artifact-local-sync.d.ts +1 -1
- package/dist/utils/artifact-local-sync.js +4 -4
- package/dist/utils/snowcode-output-interceptor.d.ts +40 -0
- package/dist/utils/snowcode-output-interceptor.d.ts.map +1 -0
- package/dist/utils/snowcode-output-interceptor.js +258 -0
- package/dist/utils/snowcode-output-interceptor.js.map +1 -0
- package/package.json +14 -6
- package/scripts/{start-opencode.sh → start-snowcode.sh} +28 -28
- /package/{opencode-config.example.json → snowcode-config.example.json} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const README_TEMPLATE = "# Snow-Flow: AI-Powered ServiceNow Development Platform \uD83D\uDE80\n\nSnow-Flow is a powerful AI development platform for ServiceNow that combines **22 specialized MCP servers** with **multi-agent orchestration** to revolutionize ServiceNow development. Build widgets, flows, workspaces, and complete applications using natural language commands.\n\n## \uD83C\uDFAF What Can Snow-Flow Do?\n\n- **Create ServiceNow Widgets** - \"Create an incident dashboard widget with real-time updates\"\n- **Build Agent Workspaces** - \"Create a workspace for IT support agents with incident lists\"\n- **Process Mining** - \"Discover hidden inefficiencies in ITSM workflows\"\n- **Deploy UI Builder Pages** - \"Build a customer portal page with service catalog\"\n- **Manage CMDB** - \"Find all Windows servers and update their maintenance windows\"\n- **Train ML Models** - \"Create a Predictive Intelligence solution to categorize incidents\"\n- **And much more!** - 22 MCP servers with 400+ tools for complete ServiceNow development\n\n## \uD83D\uDE80 Quick Start (5 Minutes)\n\n### 1. Install Snow-Flow\n\n```bash\nnpm install -g snow-flow\n```\n\n### 2. Initialize Your Project\n\n```bash\n# Create a new directory or use existing project\nmkdir my-servicenow-project\ncd my-servicenow-project\n\n# Initialize Snow-Flow (creates .env, CLAUDE.md, MCP config)\nsnow-flow init\n```\n\n### 3. Authenticate\n\n```bash\n# Authenticate with LLM provider (Claude/OpenAI/Gemini) AND ServiceNow\nsnow-flow auth login\n```\n\nThis will:\n- \u2705 Authenticate with your preferred LLM provider (via OpenCode)\n- \u2705 Save your provider choice to .env\n- \u2705 Configure ServiceNow OAuth credentials\n- \u2705 Test the connection and show your username\n\n### 4. Start Building!\n\n```bash\n# Use the swarm command to build anything in ServiceNow\nsnow-flow swarm \"create an incident dashboard widget\"\n\n# Or use OpenCode/Claude Code directly (MCP servers auto-configured)\nopencode # All 22 MCP servers available automatically\n```\n\n## \uD83C\uDFAF Key Features\n\n### \uD83E\uDD16 22 Specialized MCP Servers (400+ Tools)\n\nSnow-Flow includes the most comprehensive ServiceNow MCP server collection:\n\n1. **ServiceNow Deployment** - Widget, flow, and artifact deployment\n2. **ServiceNow Operations** - Core CRUD operations and queries\n3. **ServiceNow Automation** - Background scripts and job scheduling\n4. **ServiceNow Platform Development** - Script includes, business rules, client scripts\n5. **ServiceNow Integration** - REST messages, web services, data imports\n6. **ServiceNow System Properties** - Property management and configuration\n7. **ServiceNow Update Set** - Change management and deployment tracking\n8. **ServiceNow Development Assistant** - Intelligent artifact search and editing\n9. **ServiceNow Security & Compliance** - ACLs, security policies, vulnerability scanning\n10. **ServiceNow Reporting & Analytics** - Reports, dashboards, and KPIs\n11. **ServiceNow Machine Learning** - Predictive Intelligence + TensorFlow.js\n12. **ServiceNow Knowledge & Catalog** - Knowledge base and service catalog\n13. **ServiceNow Change, Virtual Agent & PA** - Change management, chatbots, performance analytics\n14. **ServiceNow Flow, Workspace & Mobile** - Flow Designer, Agent Workspace, UI Builder\n15. **ServiceNow CMDB, Event, HR, CSM & DevOps** - Configuration management, HR services, customer service\n16. **ServiceNow Advanced Features** - Batch operations, query optimization, process mining\n17. **ServiceNow Local Development** - Artifact sync with local files for debugging\n18. **Snow-Flow Orchestration** - Multi-agent coordination and task management\n19. **Snow-Flow Memory** - Persistent memory and context management\n20. **Snow-Flow Neural** - Neural network training with TensorFlow.js\n21. **Snow-Flow Graph** - Relationship tracking and impact analysis\n22. **Snow-Flow Performance** - Performance monitoring and optimization\n\n### \uD83D\uDD04 Multi-Agent Orchestration\n\nThe `swarm` command coordinates multiple specialized agents to handle complex tasks:\n\n```bash\n# Single command handles everything: planning, execution, testing, deployment\nsnow-flow swarm \"build a complete incident management workspace with dashboards\"\n```\n\n### \uD83C\uDFA8 OpenCode + Claude Code Support\n\nSnow-Flow works seamlessly with both AI platforms:\n\n- **OpenCode**: Native Task() integration, all 22 MCP servers auto-configured\n- **Claude Code**: Full MCP support via .claude/config.json\n- **Both**: Share the same CLAUDE.md instructions and .env configuration\n\n### \uD83D\uDD10 Secure Authentication\n\n- **LLM Providers**: Authenticate via OpenCode (supports Claude, OpenAI, Google, Ollama)\n- **ServiceNow**: OAuth 2.0 with automatic token refresh\n- **Credentials**: Stored securely in .env (never committed to git)\n\n### \uD83E\uDDEA Local Development with Artifact Sync\n\nPull ServiceNow artifacts to local files, edit with your favorite tools, and push back:\n\n```bash\n# Example via OpenCode/Claude Code with MCP tools:\n# 1. Pull widget to local files\nsnow_pull_artifact({ sys_id: 'widget_sys_id', table: 'sp_widget' })\n\n# 2. Edit locally with full IDE features (search, refactor, etc.)\n# Files created in /tmp/snow-flow-artifacts/widgets/my_widget/\n\n# 3. Validate coherence\nsnow_validate_artifact_coherence({ sys_id: 'widget_sys_id' })\n\n# 4. Push changes back\nsnow_push_artifact({ sys_id: 'widget_sys_id' })\n```\n\n## \uD83D\uDCDA Usage Examples\n\n### Create a Service Portal Widget\n\n```bash\nsnow-flow swarm \"create a widget showing top 10 open incidents with priority indicators\"\n```\n\n### Build an Agent Workspace\n\n```bash\nsnow-flow swarm \"create an agent workspace for ITIL fulfillment with task lists and approvals\"\n```\n\n### Design a Flow Designer Flow\n\n```bash\nsnow-flow swarm \"create an approval flow for purchase requests over $5000\"\n```\n\n### Train a Machine Learning Model\n\n```bash\nsnow-flow swarm \"create a Predictive Intelligence solution to predict incident categories\"\n```\n\n### Build a UI Builder Page\n\n```bash\nsnow-flow swarm \"create a UI Builder page with a list of incidents and a detail panel\"\n```\n\n### Update CMDB Configuration Items\n\n```bash\nsnow-flow swarm \"find all Linux servers in Boston datacenter and update their support group\"\n```\n\n### Generate Reports and Dashboards\n\n```bash\nsnow-flow swarm \"create a dashboard showing SLA compliance trends for the last 30 days\"\n```\n\n## \uD83D\uDD27 Commands Reference\n\n### Authentication\n```bash\nsnow-flow auth login # Authenticate with LLM provider and ServiceNow\nsnow-flow auth logout # Logout from ServiceNow\nsnow-flow auth status # Check authentication status\n```\n\n### Project Management\n```bash\nsnow-flow init # Initialize Snow-Flow in current directory\nsnow-flow version # Show Snow-Flow version\n```\n\n### Development\n```bash\nsnow-flow swarm \"<task>\" # Multi-agent orchestration for complex tasks\n```\n\n### Direct AI Usage\n```bash\nopencode # Start OpenCode with all 22 MCP servers\nclaude # Start Claude Code with MCP servers (if installed)\n```\n\n## \uD83D\uDEE0\uFE0F Configuration\n\n### .env File\n\nCreated by `snow-flow init`, configure these variables:\n\n```env\n# ServiceNow Instance\nSNOW_INSTANCE=your-instance.service-now.com\nSNOW_CLIENT_ID=your-oauth-client-id\nSNOW_CLIENT_SECRET=your-oauth-client-secret\n\n# LLM Provider (auto-set by auth login)\nDEFAULT_LLM_PROVIDER=anthropic # or openai, google, ollama\n\n# Optional: Direct API key (skips OpenCode auth)\nANTHROPIC_API_KEY=sk-ant-...\n```\n\n### ServiceNow OAuth Setup\n\n1. Log into ServiceNow as admin\n2. Navigate to: **System OAuth > Application Registry**\n3. Click **New** > **Create an OAuth API endpoint for external clients**\n4. Fill in:\n - **Name**: Snow-Flow\n - **Client ID**: (auto-generated, copy this)\n - **Client Secret**: (auto-generated, copy this)\n - **Redirect URL**: http://localhost:3000/oauth/callback\n5. Save and copy Client ID and Secret to your .env file\n6. Run `snow-flow auth login` to complete authentication\n\n## \uD83D\uDCC1 Project Structure\n\nAfter running `snow-flow init`:\n\n```\nyour-project/\n\u251C\u2500\u2500 .env # Environment configuration (DO NOT COMMIT)\n\u251C\u2500\u2500 .env.example # Example environment template\n\u251C\u2500\u2500 CLAUDE.md # AI instructions (primary)\n\u251C\u2500\u2500 AGENTS.md # AI instructions (OpenCode copy)\n\u251C\u2500\u2500 .opencode/ # OpenCode configuration\n\u2502 \u2514\u2500\u2500 config.json # MCP servers for OpenCode\n\u251C\u2500\u2500 .claude/ # Claude Code configuration\n\u2502 \u2514\u2500\u2500 config.json # MCP servers for Claude Code\n\u251C\u2500\u2500 .mcp.json # Unified MCP server configuration\n\u251C\u2500\u2500 .snow-flow/ # Snow-Flow workspace\n\u2502 \u251C\u2500\u2500 memory/ # Persistent agent memory\n\u2502 \u2514\u2500\u2500 artifacts/ # Local artifact cache\n\u2514\u2500\u2500 README.md # This file\n```\n\n## \uD83C\uDF93 Learning Resources\n\n### Documentation Files\n\n- **CLAUDE.md** / **AGENTS.md** - Complete AI instructions and best practices\n- **SERVICENOW-OAUTH-SETUP.md** - Detailed OAuth configuration guide\n- **TRADEMARK.md** - Brand guidelines and usage\n\n### Online Resources\n\n- [ServiceNow Developer Portal](https://developer.servicenow.com)\n- [ServiceNow Flow Designer Documentation](https://docs.servicenow.com/flow-designer)\n- [ServiceNow REST API Reference](https://docs.servicenow.com/rest-api)\n\n## \uD83D\uDD12 Security Best Practices\n\n1. **Never commit .env** - Already in .gitignore\n2. **Use OAuth 2.0** - More secure than basic authentication\n3. **Rotate credentials** - Change OAuth secrets periodically\n4. **Test in dev first** - Always test in development instances\n5. **Use Update Sets** - Track all changes professionally\n6. **Review AI output** - Always review generated code before deployment\n\n## \uD83D\uDC1B Troubleshooting\n\n### \"OpenCode is not installed\"\n\n```bash\nnpm install -g opencode-ai\n```\n\n### \"ServiceNow authentication failed\"\n\n1. Check your .env credentials are correct\n2. Verify OAuth application is configured in ServiceNow\n3. Ensure redirect URL is http://localhost:3000/oauth/callback\n4. Run `snow-flow auth status` to see detailed error\n\n### \"MCP servers not loading\"\n\n1. Make sure you ran `snow-flow init` in your project directory\n2. Check that .opencode/config.json exists\n3. Restart OpenCode/Claude Code after running init\n\n### \"Widget coherence validation failed\"\n\nThis means your widget's HTML, client script, and server script don't communicate properly. Use Local Sync to debug:\n\n```javascript\n// In OpenCode/Claude Code:\nsnow_pull_artifact({ sys_id: 'your_widget_sys_id', table: 'sp_widget' })\n// Edit locally, then push back\nsnow_push_artifact({ sys_id: 'your_widget_sys_id' })\n```\n\n## \uD83E\uDD1D Contributing\n\nWe welcome contributions! Snow-Flow is open source.\n\n## \uD83D\uDCDD License\n\nElastic License 2.0 - see LICENSE file for details\n\n**What this means:**\n- \u2705 Free to use, modify, and redistribute\n- \u2705 Can be used commercially\n- \u2705 Full source code access\n- \u26A0\uFE0F Cannot provide Snow-Flow as a managed service to third parties\n- \u26A0\uFE0F Cannot remove or obscure licensing/copyright notices\n\nFor full license details: https://www.elastic.co/licensing/elastic-license\n\n## \uD83D\uDE4F Acknowledgments\n\nBuilt with \u2764\uFE0F using:\n- [ServiceNow Platform](https://www.servicenow.com)\n- [Anthropic Claude](https://www.anthropic.com/claude)\n- [OpenCode AI](https://opencode.ai)\n- [Model Context Protocol (MCP)](https://modelcontextprotocol.io)\n\n---\n\n**Ready to revolutionize your ServiceNow development?**\n\n```bash\nnpm install -g snow-flow\nsnow-flow init\nsnow-flow auth login\nsnow-flow swarm \"create an awesome ServiceNow widget\"\n```\n\n\uD83D\uDE80 **Happy building!**\n";
|
|
1
|
+
export declare const README_TEMPLATE = "# Snow-Flow: AI-Powered ServiceNow Development Platform \uD83D\uDE80\n\nSnow-Flow is a powerful AI development platform for ServiceNow that combines **22 specialized MCP servers** with **multi-agent orchestration** to revolutionize ServiceNow development. Build widgets, flows, workspaces, and complete applications using natural language commands.\n\n## \uD83C\uDFAF What Can Snow-Flow Do?\n\n- **Create ServiceNow Widgets** - \"Create an incident dashboard widget with real-time updates\"\n- **Build Agent Workspaces** - \"Create a workspace for IT support agents with incident lists\"\n- **Process Mining** - \"Discover hidden inefficiencies in ITSM workflows\"\n- **Deploy UI Builder Pages** - \"Build a customer portal page with service catalog\"\n- **Manage CMDB** - \"Find all Windows servers and update their maintenance windows\"\n- **Train ML Models** - \"Create a Predictive Intelligence solution to categorize incidents\"\n- **And much more!** - 22 MCP servers with 400+ tools for complete ServiceNow development\n\n## \uD83D\uDE80 Quick Start (5 Minutes)\n\n### 1. Install Snow-Flow\n\n```bash\nnpm install -g snow-flow\n```\n\n### 2. Initialize Your Project\n\n```bash\n# Create a new directory or use existing project\nmkdir my-servicenow-project\ncd my-servicenow-project\n\n# Initialize Snow-Flow (creates .env, CLAUDE.md, MCP config)\nsnow-flow init\n```\n\n### 3. Authenticate\n\n```bash\n# Authenticate with LLM provider (Claude/OpenAI/Gemini) AND ServiceNow\nsnow-flow auth login\n```\n\nThis will:\n- \u2705 Authenticate with your preferred LLM provider (via SnowCode)\n- \u2705 Save your provider choice to .env\n- \u2705 Configure ServiceNow OAuth credentials\n- \u2705 Test the connection and show your username\n\n### 4. Start Building!\n\n```bash\n# Use the swarm command to build anything in ServiceNow\nsnow-flow swarm \"create an incident dashboard widget\"\n\n# Or use SnowCode/Claude Code directly (MCP servers auto-configured)\nsnowcode # All 22 MCP servers available automatically\n```\n\n## \uD83C\uDFAF Key Features\n\n### \uD83E\uDD16 22 Specialized MCP Servers (400+ Tools)\n\nSnow-Flow includes the most comprehensive ServiceNow MCP server collection:\n\n1. **ServiceNow Deployment** - Widget, flow, and artifact deployment\n2. **ServiceNow Operations** - Core CRUD operations and queries\n3. **ServiceNow Automation** - Background scripts and job scheduling\n4. **ServiceNow Platform Development** - Script includes, business rules, client scripts\n5. **ServiceNow Integration** - REST messages, web services, data imports\n6. **ServiceNow System Properties** - Property management and configuration\n7. **ServiceNow Update Set** - Change management and deployment tracking\n8. **ServiceNow Development Assistant** - Intelligent artifact search and editing\n9. **ServiceNow Security & Compliance** - ACLs, security policies, vulnerability scanning\n10. **ServiceNow Reporting & Analytics** - Reports, dashboards, and KPIs\n11. **ServiceNow Machine Learning** - Predictive Intelligence + TensorFlow.js\n12. **ServiceNow Knowledge & Catalog** - Knowledge base and service catalog\n13. **ServiceNow Change, Virtual Agent & PA** - Change management, chatbots, performance analytics\n14. **ServiceNow Flow, Workspace & Mobile** - Flow Designer, Agent Workspace, UI Builder\n15. **ServiceNow CMDB, Event, HR, CSM & DevOps** - Configuration management, HR services, customer service\n16. **ServiceNow Advanced Features** - Batch operations, query optimization, process mining\n17. **ServiceNow Local Development** - Artifact sync with local files for debugging\n18. **Snow-Flow Orchestration** - Multi-agent coordination and task management\n19. **Snow-Flow Memory** - Persistent memory and context management\n20. **Snow-Flow Neural** - Neural network training with TensorFlow.js\n21. **Snow-Flow Graph** - Relationship tracking and impact analysis\n22. **Snow-Flow Performance** - Performance monitoring and optimization\n\n### \uD83D\uDD04 Multi-Agent Orchestration\n\nThe `swarm` command coordinates multiple specialized agents to handle complex tasks:\n\n```bash\n# Single command handles everything: planning, execution, testing, deployment\nsnow-flow swarm \"build a complete incident management workspace with dashboards\"\n```\n\n### \uD83C\uDFA8 SnowCode + Claude Code Support\n\nSnow-Flow works seamlessly with both AI platforms:\n\n- **SnowCode**: Native Task() integration, all 22 MCP servers auto-configured\n- **Claude Code**: Full MCP support via .claude/config.json\n- **Both**: Share the same CLAUDE.md instructions and .env configuration\n\n### \uD83D\uDD10 Secure Authentication\n\n- **LLM Providers**: Authenticate via SnowCode (supports Claude, OpenAI, Google, Ollama)\n- **ServiceNow**: OAuth 2.0 with automatic token refresh\n- **Credentials**: Stored securely in .env (never committed to git)\n\n### \uD83E\uDDEA Local Development with Artifact Sync\n\nPull ServiceNow artifacts to local files, edit with your favorite tools, and push back:\n\n```bash\n# Example via SnowCode/Claude Code with MCP tools:\n# 1. Pull widget to local files\nsnow_pull_artifact({ sys_id: 'widget_sys_id', table: 'sp_widget' })\n\n# 2. Edit locally with full IDE features (search, refactor, etc.)\n# Files created in /tmp/snow-flow-artifacts/widgets/my_widget/\n\n# 3. Validate coherence\nsnow_validate_artifact_coherence({ sys_id: 'widget_sys_id' })\n\n# 4. Push changes back\nsnow_push_artifact({ sys_id: 'widget_sys_id' })\n```\n\n## \uD83D\uDCDA Usage Examples\n\n### Create a Service Portal Widget\n\n```bash\nsnow-flow swarm \"create a widget showing top 10 open incidents with priority indicators\"\n```\n\n### Build an Agent Workspace\n\n```bash\nsnow-flow swarm \"create an agent workspace for ITIL fulfillment with task lists and approvals\"\n```\n\n### Design a Flow Designer Flow\n\n```bash\nsnow-flow swarm \"create an approval flow for purchase requests over $5000\"\n```\n\n### Train a Machine Learning Model\n\n```bash\nsnow-flow swarm \"create a Predictive Intelligence solution to predict incident categories\"\n```\n\n### Build a UI Builder Page\n\n```bash\nsnow-flow swarm \"create a UI Builder page with a list of incidents and a detail panel\"\n```\n\n### Update CMDB Configuration Items\n\n```bash\nsnow-flow swarm \"find all Linux servers in Boston datacenter and update their support group\"\n```\n\n### Generate Reports and Dashboards\n\n```bash\nsnow-flow swarm \"create a dashboard showing SLA compliance trends for the last 30 days\"\n```\n\n## \uD83D\uDD27 Commands Reference\n\n### Authentication\n```bash\nsnow-flow auth login # Authenticate with LLM provider and ServiceNow\nsnow-flow auth logout # Logout from ServiceNow\nsnow-flow auth status # Check authentication status\n```\n\n### Project Management\n```bash\nsnow-flow init # Initialize Snow-Flow in current directory\nsnow-flow version # Show Snow-Flow version\n```\n\n### Development\n```bash\nsnow-flow swarm \"<task>\" # Multi-agent orchestration for complex tasks\n```\n\n### Direct AI Usage\n```bash\nsnowcode # Start SnowCode with all 22 MCP servers\nclaude # Start Claude Code with MCP servers (if installed)\n```\n\n## \uD83D\uDEE0\uFE0F Configuration\n\n### .env File\n\nCreated by `snow-flow init`, configure these variables:\n\n```env\n# ServiceNow Instance\nSNOW_INSTANCE=your-instance.service-now.com\nSNOW_CLIENT_ID=your-oauth-client-id\nSNOW_CLIENT_SECRET=your-oauth-client-secret\n\n# LLM Provider (auto-set by auth login)\nDEFAULT_LLM_PROVIDER=anthropic # or openai, google, ollama\n\n# Optional: Direct API key (skips SnowCode auth)\nANTHROPIC_API_KEY=sk-ant-...\n```\n\n### ServiceNow OAuth Setup\n\n1. Log into ServiceNow as admin\n2. Navigate to: **System OAuth > Application Registry**\n3. Click **New** > **Create an OAuth API endpoint for external clients**\n4. Fill in:\n - **Name**: Snow-Flow\n - **Client ID**: (auto-generated, copy this)\n - **Client Secret**: (auto-generated, copy this)\n - **Redirect URL**: http://localhost:3000/oauth/callback\n5. Save and copy Client ID and Secret to your .env file\n6. Run `snow-flow auth login` to complete authentication\n\n## \uD83D\uDCC1 Project Structure\n\nAfter running `snow-flow init`:\n\n```\nyour-project/\n\u251C\u2500\u2500 .env # Environment configuration (DO NOT COMMIT)\n\u251C\u2500\u2500 .env.example # Example environment template\n\u251C\u2500\u2500 CLAUDE.md # AI instructions (primary)\n\u251C\u2500\u2500 AGENTS.md # AI instructions (SnowCode copy)\n\u251C\u2500\u2500 .snowcode/ # SnowCode configuration\n\u2502 \u2514\u2500\u2500 config.json # MCP servers for SnowCode\n\u251C\u2500\u2500 .claude/ # Claude Code configuration\n\u2502 \u2514\u2500\u2500 config.json # MCP servers for Claude Code\n\u251C\u2500\u2500 .mcp.json # Unified MCP server configuration\n\u251C\u2500\u2500 .snow-flow/ # Snow-Flow workspace\n\u2502 \u251C\u2500\u2500 memory/ # Persistent agent memory\n\u2502 \u2514\u2500\u2500 artifacts/ # Local artifact cache\n\u2514\u2500\u2500 README.md # This file\n```\n\n## \uD83C\uDF93 Learning Resources\n\n### Documentation Files\n\n- **CLAUDE.md** / **AGENTS.md** - Complete AI instructions and best practices\n- **SERVICENOW-OAUTH-SETUP.md** - Detailed OAuth configuration guide\n- **TRADEMARK.md** - Brand guidelines and usage\n\n### Online Resources\n\n- [ServiceNow Developer Portal](https://developer.servicenow.com)\n- [ServiceNow Flow Designer Documentation](https://docs.servicenow.com/flow-designer)\n- [ServiceNow REST API Reference](https://docs.servicenow.com/rest-api)\n\n## \uD83D\uDD12 Security Best Practices\n\n1. **Never commit .env** - Already in .gitignore\n2. **Use OAuth 2.0** - More secure than basic authentication\n3. **Rotate credentials** - Change OAuth secrets periodically\n4. **Test in dev first** - Always test in development instances\n5. **Use Update Sets** - Track all changes professionally\n6. **Review AI output** - Always review generated code before deployment\n\n## \uD83D\uDC1B Troubleshooting\n\n### \"SnowCode is not installed\"\n\n```bash\nnpm install -g snowcode-ai\n```\n\n### \"ServiceNow authentication failed\"\n\n1. Check your .env credentials are correct\n2. Verify OAuth application is configured in ServiceNow\n3. Ensure redirect URL is http://localhost:3000/oauth/callback\n4. Run `snow-flow auth status` to see detailed error\n\n### \"MCP servers not loading\"\n\n1. Make sure you ran `snow-flow init` in your project directory\n2. Check that .snowcode/config.json exists\n3. Restart SnowCode/Claude Code after running init\n\n### \"Widget coherence validation failed\"\n\nThis means your widget's HTML, client script, and server script don't communicate properly. Use Local Sync to debug:\n\n```javascript\n// In SnowCode/Claude Code:\nsnow_pull_artifact({ sys_id: 'your_widget_sys_id', table: 'sp_widget' })\n// Edit locally, then push back\nsnow_push_artifact({ sys_id: 'your_widget_sys_id' })\n```\n\n## \uD83E\uDD1D Contributing\n\nWe welcome contributions! Snow-Flow is open source.\n\n## \uD83D\uDCDD License\n\nElastic License 2.0 - see LICENSE file for details\n\n**What this means:**\n- \u2705 Free to use, modify, and redistribute\n- \u2705 Can be used commercially\n- \u2705 Full source code access\n- \u26A0\uFE0F Cannot provide Snow-Flow as a managed service to third parties\n- \u26A0\uFE0F Cannot remove or obscure licensing/copyright notices\n\nFor full license details: https://www.elastic.co/licensing/elastic-license\n\n## \uD83D\uDE4F Acknowledgments\n\nBuilt with \u2764\uFE0F using:\n- [ServiceNow Platform](https://www.servicenow.com)\n- [Anthropic Claude](https://www.anthropic.com/claude)\n- [SnowCode AI](https://snowcode.ai)\n- [Model Context Protocol (MCP)](https://modelcontextprotocol.io)\n\n---\n\n**Ready to revolutionize your ServiceNow development?**\n\n```bash\nnpm install -g snow-flow\nsnow-flow init\nsnow-flow auth login\nsnow-flow swarm \"create an awesome ServiceNow widget\"\n```\n\n\uD83D\uDE80 **Happy building!**\n";
|
|
2
2
|
//# sourceMappingURL=readme-template.d.ts.map
|
|
@@ -42,7 +42,7 @@ snow-flow auth login
|
|
|
42
42
|
\`\`\`
|
|
43
43
|
|
|
44
44
|
This will:
|
|
45
|
-
- ✅ Authenticate with your preferred LLM provider (via
|
|
45
|
+
- ✅ Authenticate with your preferred LLM provider (via SnowCode)
|
|
46
46
|
- ✅ Save your provider choice to .env
|
|
47
47
|
- ✅ Configure ServiceNow OAuth credentials
|
|
48
48
|
- ✅ Test the connection and show your username
|
|
@@ -53,8 +53,8 @@ This will:
|
|
|
53
53
|
# Use the swarm command to build anything in ServiceNow
|
|
54
54
|
snow-flow swarm "create an incident dashboard widget"
|
|
55
55
|
|
|
56
|
-
# Or use
|
|
57
|
-
|
|
56
|
+
# Or use SnowCode/Claude Code directly (MCP servers auto-configured)
|
|
57
|
+
snowcode # All 22 MCP servers available automatically
|
|
58
58
|
\`\`\`
|
|
59
59
|
|
|
60
60
|
## 🎯 Key Features
|
|
@@ -95,17 +95,17 @@ The \`swarm\` command coordinates multiple specialized agents to handle complex
|
|
|
95
95
|
snow-flow swarm "build a complete incident management workspace with dashboards"
|
|
96
96
|
\`\`\`
|
|
97
97
|
|
|
98
|
-
### 🎨
|
|
98
|
+
### 🎨 SnowCode + Claude Code Support
|
|
99
99
|
|
|
100
100
|
Snow-Flow works seamlessly with both AI platforms:
|
|
101
101
|
|
|
102
|
-
- **
|
|
102
|
+
- **SnowCode**: Native Task() integration, all 22 MCP servers auto-configured
|
|
103
103
|
- **Claude Code**: Full MCP support via .claude/config.json
|
|
104
104
|
- **Both**: Share the same CLAUDE.md instructions and .env configuration
|
|
105
105
|
|
|
106
106
|
### 🔐 Secure Authentication
|
|
107
107
|
|
|
108
|
-
- **LLM Providers**: Authenticate via
|
|
108
|
+
- **LLM Providers**: Authenticate via SnowCode (supports Claude, OpenAI, Google, Ollama)
|
|
109
109
|
- **ServiceNow**: OAuth 2.0 with automatic token refresh
|
|
110
110
|
- **Credentials**: Stored securely in .env (never committed to git)
|
|
111
111
|
|
|
@@ -114,7 +114,7 @@ Snow-Flow works seamlessly with both AI platforms:
|
|
|
114
114
|
Pull ServiceNow artifacts to local files, edit with your favorite tools, and push back:
|
|
115
115
|
|
|
116
116
|
\`\`\`bash
|
|
117
|
-
# Example via
|
|
117
|
+
# Example via SnowCode/Claude Code with MCP tools:
|
|
118
118
|
# 1. Pull widget to local files
|
|
119
119
|
snow_pull_artifact({ sys_id: 'widget_sys_id', table: 'sp_widget' })
|
|
120
120
|
|
|
@@ -194,7 +194,7 @@ snow-flow swarm "<task>" # Multi-agent orchestration for complex tasks
|
|
|
194
194
|
|
|
195
195
|
### Direct AI Usage
|
|
196
196
|
\`\`\`bash
|
|
197
|
-
|
|
197
|
+
snowcode # Start SnowCode with all 22 MCP servers
|
|
198
198
|
claude # Start Claude Code with MCP servers (if installed)
|
|
199
199
|
\`\`\`
|
|
200
200
|
|
|
@@ -213,7 +213,7 @@ SNOW_CLIENT_SECRET=your-oauth-client-secret
|
|
|
213
213
|
# LLM Provider (auto-set by auth login)
|
|
214
214
|
DEFAULT_LLM_PROVIDER=anthropic # or openai, google, ollama
|
|
215
215
|
|
|
216
|
-
# Optional: Direct API key (skips
|
|
216
|
+
# Optional: Direct API key (skips SnowCode auth)
|
|
217
217
|
ANTHROPIC_API_KEY=sk-ant-...
|
|
218
218
|
\`\`\`
|
|
219
219
|
|
|
@@ -239,9 +239,9 @@ your-project/
|
|
|
239
239
|
├── .env # Environment configuration (DO NOT COMMIT)
|
|
240
240
|
├── .env.example # Example environment template
|
|
241
241
|
├── CLAUDE.md # AI instructions (primary)
|
|
242
|
-
├── AGENTS.md # AI instructions (
|
|
243
|
-
├── .
|
|
244
|
-
│ └── config.json # MCP servers for
|
|
242
|
+
├── AGENTS.md # AI instructions (SnowCode copy)
|
|
243
|
+
├── .snowcode/ # SnowCode configuration
|
|
244
|
+
│ └── config.json # MCP servers for SnowCode
|
|
245
245
|
├── .claude/ # Claude Code configuration
|
|
246
246
|
│ └── config.json # MCP servers for Claude Code
|
|
247
247
|
├── .mcp.json # Unified MCP server configuration
|
|
@@ -276,10 +276,10 @@ your-project/
|
|
|
276
276
|
|
|
277
277
|
## 🐛 Troubleshooting
|
|
278
278
|
|
|
279
|
-
### "
|
|
279
|
+
### "SnowCode is not installed"
|
|
280
280
|
|
|
281
281
|
\`\`\`bash
|
|
282
|
-
npm install -g
|
|
282
|
+
npm install -g snowcode-ai
|
|
283
283
|
\`\`\`
|
|
284
284
|
|
|
285
285
|
### "ServiceNow authentication failed"
|
|
@@ -292,15 +292,15 @@ npm install -g opencode-ai
|
|
|
292
292
|
### "MCP servers not loading"
|
|
293
293
|
|
|
294
294
|
1. Make sure you ran \`snow-flow init\` in your project directory
|
|
295
|
-
2. Check that .
|
|
296
|
-
3. Restart
|
|
295
|
+
2. Check that .snowcode/config.json exists
|
|
296
|
+
3. Restart SnowCode/Claude Code after running init
|
|
297
297
|
|
|
298
298
|
### "Widget coherence validation failed"
|
|
299
299
|
|
|
300
300
|
This means your widget's HTML, client script, and server script don't communicate properly. Use Local Sync to debug:
|
|
301
301
|
|
|
302
302
|
\`\`\`javascript
|
|
303
|
-
// In
|
|
303
|
+
// In SnowCode/Claude Code:
|
|
304
304
|
snow_pull_artifact({ sys_id: 'your_widget_sys_id', table: 'sp_widget' })
|
|
305
305
|
// Edit locally, then push back
|
|
306
306
|
snow_push_artifact({ sys_id: 'your_widget_sys_id' })
|
|
@@ -328,7 +328,7 @@ For full license details: https://www.elastic.co/licensing/elastic-license
|
|
|
328
328
|
Built with ❤️ using:
|
|
329
329
|
- [ServiceNow Platform](https://www.servicenow.com)
|
|
330
330
|
- [Anthropic Claude](https://www.anthropic.com/claude)
|
|
331
|
-
- [
|
|
331
|
+
- [SnowCode AI](https://snowcode.ai)
|
|
332
332
|
- [Model Context Protocol (MCP)](https://modelcontextprotocol.io)
|
|
333
333
|
|
|
334
334
|
---
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Artifact Local Sync System
|
|
3
3
|
*
|
|
4
|
-
* Creates temporary local files from ServiceNow artifacts so
|
|
4
|
+
* Creates temporary local files from ServiceNow artifacts so SnowCode
|
|
5
5
|
* (or Claude Code) can use its native tools (search, edit, multi-file operations, etc.)
|
|
6
6
|
* Then syncs changes back to ServiceNow.
|
|
7
7
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Artifact Local Sync System
|
|
4
4
|
*
|
|
5
|
-
* Creates temporary local files from ServiceNow artifacts so
|
|
5
|
+
* Creates temporary local files from ServiceNow artifacts so SnowCode
|
|
6
6
|
* (or Claude Code) can use its native tools (search, edit, multi-file operations, etc.)
|
|
7
7
|
* Then syncs changes back to ServiceNow.
|
|
8
8
|
*
|
|
@@ -235,7 +235,7 @@ class ArtifactLocalSync {
|
|
|
235
235
|
console.log(`📁 Location: ${displayPath}`);
|
|
236
236
|
console.log(`📄 Files created:`);
|
|
237
237
|
files.forEach(f => console.log(` - ${f.filename} (${f.type})`));
|
|
238
|
-
console.log(`\n💡
|
|
238
|
+
console.log(`\n💡 SnowCode (or Claude Code) can now use its native tools on these files!`);
|
|
239
239
|
console.log(` Edit, search, refactor - then run 'pushArtifact' to sync back.`);
|
|
240
240
|
return artifact;
|
|
241
241
|
}
|
|
@@ -524,7 +524,7 @@ ${config.coherenceRules.map(rule => `### ${rule.name}\n${rule.description}`).joi
|
|
|
524
524
|
const instructions = `
|
|
525
525
|
## Editing Instructions
|
|
526
526
|
|
|
527
|
-
1. **Edit files** using your AI coding assistant's native tools (
|
|
527
|
+
1. **Edit files** using your AI coding assistant's native tools (SnowCode, Claude Code, etc.)
|
|
528
528
|
2. **Maintain coherence** between related files
|
|
529
529
|
${config.fieldMappings.some(fm => fm.validateES5) ? '3. **Use ES5 only** in server-side scripts (no modern JavaScript)' : ''}
|
|
530
530
|
4. **Test locally** if possible
|
|
@@ -609,7 +609,7 @@ ${files.map(f => `- **${f.filename}** - ${f.field}`).join('\n')}
|
|
|
609
609
|
|
|
610
610
|
## Editing Instructions
|
|
611
611
|
|
|
612
|
-
1. **Edit files** using your AI coding assistant's native tools (
|
|
612
|
+
1. **Edit files** using your AI coding assistant's native tools (SnowCode, Claude Code, etc.)
|
|
613
613
|
2. **Maintain coherence** between template, scripts, and CSS
|
|
614
614
|
3. **Use ES5 only** in server script (no modern JavaScript)
|
|
615
615
|
4. **Test locally** if possible
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SnowCode Output Interceptor
|
|
3
|
+
* Captures and reformats SnowCode's output to show beautiful MCP tool execution
|
|
4
|
+
*
|
|
5
|
+
* Detects patterns like:
|
|
6
|
+
* - Shell Create incident dashboard via MCP server
|
|
7
|
+
* - MCP tool execution scripts
|
|
8
|
+
* - JSON-RPC messages
|
|
9
|
+
*
|
|
10
|
+
* And reformats them using MCPOutputFormatter for clean, structured display
|
|
11
|
+
*/
|
|
12
|
+
import { Transform } from 'stream';
|
|
13
|
+
export declare class SnowCodeOutputInterceptor extends Transform {
|
|
14
|
+
private formatter;
|
|
15
|
+
private buffer;
|
|
16
|
+
private inShellBlock;
|
|
17
|
+
private inMCPExecution;
|
|
18
|
+
private currentExecution?;
|
|
19
|
+
private shellBlockLines;
|
|
20
|
+
private quiet;
|
|
21
|
+
constructor(options?: {
|
|
22
|
+
quiet?: boolean;
|
|
23
|
+
});
|
|
24
|
+
_transform(chunk: Buffer, encoding: string, callback: Function): void;
|
|
25
|
+
_flush(callback: Function): void;
|
|
26
|
+
private processLine;
|
|
27
|
+
private startMCPExecution;
|
|
28
|
+
private handleShellBlock;
|
|
29
|
+
private extractMCPToolCall;
|
|
30
|
+
private tryParseJSONRPC;
|
|
31
|
+
private handleMCPSuccess;
|
|
32
|
+
private handleMCPError;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Convenience function to pipe SnowCode output through the interceptor
|
|
36
|
+
*/
|
|
37
|
+
export declare function interceptSnowCodeOutput(options?: {
|
|
38
|
+
quiet?: boolean;
|
|
39
|
+
}): SnowCodeOutputInterceptor;
|
|
40
|
+
//# sourceMappingURL=snowcode-output-interceptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snowcode-output-interceptor.d.ts","sourceRoot":"","sources":["../../src/utils/snowcode-output-interceptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAYnC,qBAAa,yBAA0B,SAAQ,SAAS;IACtD,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,YAAY,CAAkB;IACtC,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,gBAAgB,CAAC,CAAmB;IAC5C,OAAO,CAAC,eAAe,CAAgB;IACvC,OAAO,CAAC,KAAK,CAAU;gBAEX,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;IAMzC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;IAe9D,MAAM,CAAC,QAAQ,EAAE,QAAQ;IAQzB,OAAO,CAAC,WAAW;IA8DnB,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,gBAAgB;IAmDxB,OAAO,CAAC,kBAAkB;IAkB1B,OAAO,CAAC,eAAe;IAwBvB,OAAO,CAAC,gBAAgB;IAsCxB,OAAO,CAAC,cAAc;CA0BvB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,yBAAyB,CAEhG"}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* SnowCode Output Interceptor
|
|
4
|
+
* Captures and reformats SnowCode's output to show beautiful MCP tool execution
|
|
5
|
+
*
|
|
6
|
+
* Detects patterns like:
|
|
7
|
+
* - Shell Create incident dashboard via MCP server
|
|
8
|
+
* - MCP tool execution scripts
|
|
9
|
+
* - JSON-RPC messages
|
|
10
|
+
*
|
|
11
|
+
* And reformats them using MCPOutputFormatter for clean, structured display
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.SnowCodeOutputInterceptor = void 0;
|
|
15
|
+
exports.interceptSnowCodeOutput = interceptSnowCodeOutput;
|
|
16
|
+
const stream_1 = require("stream");
|
|
17
|
+
const mcp_output_formatter_js_1 = require("./mcp-output-formatter.js");
|
|
18
|
+
class SnowCodeOutputInterceptor extends stream_1.Transform {
|
|
19
|
+
constructor(options) {
|
|
20
|
+
super({ objectMode: false });
|
|
21
|
+
this.buffer = '';
|
|
22
|
+
this.inShellBlock = false;
|
|
23
|
+
this.inMCPExecution = false;
|
|
24
|
+
this.shellBlockLines = [];
|
|
25
|
+
this.formatter = new mcp_output_formatter_js_1.MCPOutputFormatter({ quiet: options?.quiet || false });
|
|
26
|
+
this.quiet = options?.quiet || false;
|
|
27
|
+
}
|
|
28
|
+
_transform(chunk, encoding, callback) {
|
|
29
|
+
const text = chunk.toString();
|
|
30
|
+
this.buffer += text;
|
|
31
|
+
// Process line by line
|
|
32
|
+
const lines = this.buffer.split('\n');
|
|
33
|
+
this.buffer = lines.pop() || ''; // Keep incomplete line in buffer
|
|
34
|
+
for (const line of lines) {
|
|
35
|
+
this.processLine(line + '\n');
|
|
36
|
+
}
|
|
37
|
+
callback();
|
|
38
|
+
}
|
|
39
|
+
_flush(callback) {
|
|
40
|
+
// Process any remaining buffer
|
|
41
|
+
if (this.buffer.length > 0) {
|
|
42
|
+
this.processLine(this.buffer);
|
|
43
|
+
}
|
|
44
|
+
callback();
|
|
45
|
+
}
|
|
46
|
+
processLine(line) {
|
|
47
|
+
// Detect start of shell MCP execution
|
|
48
|
+
if (line.match(/^Shell\s+(Create|Execute|Query|Update|Delete|Test|Validate)\s+.+via\s+MCP/i)) {
|
|
49
|
+
this.startMCPExecution(line);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
// Detect shell command block
|
|
53
|
+
if (line.match(/^\$\s+cat\s+>\s+\/tmp\/.*\.js\s+<<\s+'EOF'/)) {
|
|
54
|
+
this.inShellBlock = true;
|
|
55
|
+
this.shellBlockLines = [];
|
|
56
|
+
return; // Don't output this line
|
|
57
|
+
}
|
|
58
|
+
// Detect end of shell block
|
|
59
|
+
if (this.inShellBlock && line.trim() === 'EOF') {
|
|
60
|
+
this.inShellBlock = false;
|
|
61
|
+
this.handleShellBlock();
|
|
62
|
+
return; // Don't output this line
|
|
63
|
+
}
|
|
64
|
+
// Collect shell block lines
|
|
65
|
+
if (this.inShellBlock) {
|
|
66
|
+
this.shellBlockLines.push(line);
|
|
67
|
+
return; // Don't output during collection
|
|
68
|
+
}
|
|
69
|
+
// Detect MCP tool execution patterns in shell output
|
|
70
|
+
if (line.includes('tools/call') && line.includes('params')) {
|
|
71
|
+
this.extractMCPToolCall(line);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
// Detect MCP server output
|
|
75
|
+
if (line.match(/MCP (Error|Info|Debug):/i) && this.inMCPExecution) {
|
|
76
|
+
// Suppress internal MCP logs during execution
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
// Detect JSON-RPC responses
|
|
80
|
+
if (this.tryParseJSONRPC(line)) {
|
|
81
|
+
return; // Handled by JSON-RPC parser
|
|
82
|
+
}
|
|
83
|
+
// Detect success markers
|
|
84
|
+
if (line.match(/Tool result:|Result:|✓|✅|Success/i) && this.inMCPExecution) {
|
|
85
|
+
this.handleMCPSuccess(line);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
// Detect error markers
|
|
89
|
+
if (line.match(/Error:|❌|Failed|Exception/i) && this.inMCPExecution) {
|
|
90
|
+
this.handleMCPError(line);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
// Pass through other lines unchanged
|
|
94
|
+
if (!this.quiet) {
|
|
95
|
+
this.push(line);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
startMCPExecution(line) {
|
|
99
|
+
this.inMCPExecution = true;
|
|
100
|
+
// Extract tool description from line like:
|
|
101
|
+
// "Shell Create incident dashboard via MCP server"
|
|
102
|
+
const match = line.match(/^Shell\s+(.+?)\s+via\s+MCP/i);
|
|
103
|
+
const description = match ? match[1] : 'MCP tool execution';
|
|
104
|
+
this.currentExecution = {
|
|
105
|
+
description,
|
|
106
|
+
startTime: Date.now(),
|
|
107
|
+
status: 'pending'
|
|
108
|
+
};
|
|
109
|
+
// Don't show the original shell line
|
|
110
|
+
}
|
|
111
|
+
handleShellBlock() {
|
|
112
|
+
// Parse the shell script to extract MCP tool details
|
|
113
|
+
const scriptContent = this.shellBlockLines.join('\n');
|
|
114
|
+
// Extract server name
|
|
115
|
+
const serverMatch = scriptContent.match(/\/([^\/]+)\/index\.js/);
|
|
116
|
+
const server = serverMatch ? serverMatch[1] : 'servicenow-unified';
|
|
117
|
+
// Extract tool call from script
|
|
118
|
+
const toolMatch = scriptContent.match(/name:\s*['"]([^'"]+)['"]/);
|
|
119
|
+
const tool = toolMatch ? toolMatch[1] : 'unknown';
|
|
120
|
+
// Extract parameters
|
|
121
|
+
let params = {};
|
|
122
|
+
const paramsMatch = scriptContent.match(/arguments:\s*({[\s\S]*?})/);
|
|
123
|
+
if (paramsMatch) {
|
|
124
|
+
try {
|
|
125
|
+
// Clean up the params string and parse
|
|
126
|
+
const paramsStr = paramsMatch[1]
|
|
127
|
+
.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?\s*:/g, '"$2":') // Quote keys
|
|
128
|
+
.replace(/'/g, '"'); // Replace single quotes with double quotes
|
|
129
|
+
params = JSON.parse(paramsStr);
|
|
130
|
+
}
|
|
131
|
+
catch (e) {
|
|
132
|
+
// If parsing fails, extract key params manually
|
|
133
|
+
const lines = scriptContent.split('\n');
|
|
134
|
+
for (const line of lines) {
|
|
135
|
+
const kvMatch = line.match(/^\s*([a-zA-Z_]+):\s*['"]?([^'"]+)['"]?/);
|
|
136
|
+
if (kvMatch) {
|
|
137
|
+
params[kvMatch[1]] = kvMatch[2];
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// Update current execution with details
|
|
143
|
+
if (this.currentExecution) {
|
|
144
|
+
this.currentExecution.server = server;
|
|
145
|
+
this.currentExecution.tool = tool;
|
|
146
|
+
this.currentExecution.params = params;
|
|
147
|
+
this.currentExecution.status = 'executing';
|
|
148
|
+
// Show beautiful formatted header
|
|
149
|
+
this.formatter.startToolCall({
|
|
150
|
+
server,
|
|
151
|
+
tool,
|
|
152
|
+
params,
|
|
153
|
+
description: this.currentExecution.description
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
extractMCPToolCall(line) {
|
|
158
|
+
// Try to parse JSON-RPC tool call
|
|
159
|
+
try {
|
|
160
|
+
const jsonMatch = line.match(/({.*})/);
|
|
161
|
+
if (jsonMatch) {
|
|
162
|
+
const rpc = JSON.parse(jsonMatch[1]);
|
|
163
|
+
if (rpc.method === 'tools/call' && rpc.params) {
|
|
164
|
+
if (this.currentExecution) {
|
|
165
|
+
this.currentExecution.tool = rpc.params.name;
|
|
166
|
+
this.currentExecution.params = rpc.params.arguments;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
catch (e) {
|
|
172
|
+
// Ignore parse errors
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
tryParseJSONRPC(line) {
|
|
176
|
+
try {
|
|
177
|
+
const trimmed = line.trim();
|
|
178
|
+
if (!trimmed.startsWith('{'))
|
|
179
|
+
return false;
|
|
180
|
+
const rpc = JSON.parse(trimmed);
|
|
181
|
+
// Handle RPC result
|
|
182
|
+
if (rpc.result && this.inMCPExecution && this.currentExecution) {
|
|
183
|
+
this.handleMCPSuccess(JSON.stringify(rpc.result, null, 2));
|
|
184
|
+
return true;
|
|
185
|
+
}
|
|
186
|
+
// Handle RPC error
|
|
187
|
+
if (rpc.error && this.inMCPExecution) {
|
|
188
|
+
this.handleMCPError(rpc.error.message || JSON.stringify(rpc.error));
|
|
189
|
+
return true;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
catch (e) {
|
|
193
|
+
// Not valid JSON, return false
|
|
194
|
+
}
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
handleMCPSuccess(resultLine) {
|
|
198
|
+
if (!this.currentExecution)
|
|
199
|
+
return;
|
|
200
|
+
const duration = this.currentExecution.startTime
|
|
201
|
+
? (Date.now() - this.currentExecution.startTime) / 1000
|
|
202
|
+
: 0;
|
|
203
|
+
// Try to extract result data
|
|
204
|
+
let resultData;
|
|
205
|
+
try {
|
|
206
|
+
const jsonMatch = resultLine.match(/({[\s\S]*})/);
|
|
207
|
+
if (jsonMatch) {
|
|
208
|
+
resultData = JSON.parse(jsonMatch[1]);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
catch (e) {
|
|
212
|
+
resultData = { message: resultLine.trim() };
|
|
213
|
+
}
|
|
214
|
+
// Show beautiful formatted result
|
|
215
|
+
this.formatter.showToolResult({
|
|
216
|
+
server: this.currentExecution.server || 'servicenow-unified',
|
|
217
|
+
tool: this.currentExecution.tool || 'unknown',
|
|
218
|
+
params: this.currentExecution.params || {},
|
|
219
|
+
description: this.currentExecution.description
|
|
220
|
+
}, {
|
|
221
|
+
success: true,
|
|
222
|
+
data: resultData,
|
|
223
|
+
executionTime: duration
|
|
224
|
+
});
|
|
225
|
+
// Reset state
|
|
226
|
+
this.inMCPExecution = false;
|
|
227
|
+
this.currentExecution = undefined;
|
|
228
|
+
}
|
|
229
|
+
handleMCPError(errorLine) {
|
|
230
|
+
if (!this.currentExecution)
|
|
231
|
+
return;
|
|
232
|
+
const duration = this.currentExecution.startTime
|
|
233
|
+
? (Date.now() - this.currentExecution.startTime) / 1000
|
|
234
|
+
: 0;
|
|
235
|
+
// Show beautiful formatted error
|
|
236
|
+
this.formatter.showToolResult({
|
|
237
|
+
server: this.currentExecution.server || 'servicenow-unified',
|
|
238
|
+
tool: this.currentExecution.tool || 'unknown',
|
|
239
|
+
params: this.currentExecution.params || {},
|
|
240
|
+
description: this.currentExecution.description
|
|
241
|
+
}, {
|
|
242
|
+
success: false,
|
|
243
|
+
error: errorLine.trim(),
|
|
244
|
+
executionTime: duration
|
|
245
|
+
});
|
|
246
|
+
// Reset state
|
|
247
|
+
this.inMCPExecution = false;
|
|
248
|
+
this.currentExecution = undefined;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
exports.SnowCodeOutputInterceptor = SnowCodeOutputInterceptor;
|
|
252
|
+
/**
|
|
253
|
+
* Convenience function to pipe SnowCode output through the interceptor
|
|
254
|
+
*/
|
|
255
|
+
function interceptSnowCodeOutput(options) {
|
|
256
|
+
return new SnowCodeOutputInterceptor(options);
|
|
257
|
+
}
|
|
258
|
+
//# sourceMappingURL=snowcode-output-interceptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snowcode-output-interceptor.js","sourceRoot":"","sources":["../../src/utils/snowcode-output-interceptor.ts"],"names":[],"mappings":";AAAA;;;;;;;;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,OAAO,CAAC,CAAC;AAChD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "8.4.
|
|
4
|
-
"description": "ServiceNow development with
|
|
3
|
+
"version": "8.4.23",
|
|
4
|
+
"description": "ServiceNow development with SnowCode - 75+ LLM providers (Claude, GPT, Gemini, Llama, Mistral, DeepSeek, Groq, Ollama) • 410 Optimized Tools • 2 MCP Servers • Native Predictive Intelligence builder • Multi-agent orchestration • Use ANY AI coding assistant",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"bin": {
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"scripts/",
|
|
14
14
|
".env.example",
|
|
15
15
|
".mcp.json.template",
|
|
16
|
-
"
|
|
16
|
+
"snowcode-config.example.json",
|
|
17
17
|
"themes/",
|
|
18
18
|
"README.md",
|
|
19
19
|
"CLAUDE.md",
|
|
20
20
|
"THEMES.md",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
21
|
+
"SNOWCODE-SETUP.md",
|
|
22
|
+
"SNOWCODE-TROUBLESHOOTING.md",
|
|
23
23
|
"LICENSE"
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"mcp",
|
|
61
61
|
"ai",
|
|
62
62
|
"llm",
|
|
63
|
-
"
|
|
63
|
+
"snowcode",
|
|
64
64
|
"claude",
|
|
65
65
|
"gpt-5",
|
|
66
66
|
"gemini",
|
|
@@ -525,6 +525,14 @@
|
|
|
525
525
|
"ts-jest": "29.4.5",
|
|
526
526
|
"typescript": "5.9.3"
|
|
527
527
|
},
|
|
528
|
+
"peerDependencies": {
|
|
529
|
+
"@groeimetai/snowcode": "^0.15.14"
|
|
530
|
+
},
|
|
531
|
+
"peerDependenciesMeta": {
|
|
532
|
+
"@groeimetai/snowcode": {
|
|
533
|
+
"optional": false
|
|
534
|
+
}
|
|
535
|
+
},
|
|
528
536
|
"lint-staged": {
|
|
529
537
|
"*.ts": [
|
|
530
538
|
"eslint --fix",
|