snow-flow 8.3.0 → 8.3.1
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/README.md +12 -0
- package/dist/templates/agents-md-template.d.ts +1 -1
- package/dist/templates/agents-md-template.d.ts.map +1 -1
- package/dist/templates/agents-md-template.js +28 -1
- package/dist/templates/agents-md-template.js.map +1 -1
- package/dist/templates/claude-md-template.d.ts +1 -1
- package/dist/templates/claude-md-template.d.ts.map +1 -1
- package/dist/templates/claude-md-template.js +28 -1
- package/dist/templates/claude-md-template.js.map +1 -1
- package/opencode-config.example.json +4 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,6 +95,18 @@ snow-flow auth login
|
|
|
95
95
|
3. **ServiceNow**: Browser opens for OAuth authentication
|
|
96
96
|
4. **Done**: You're ready to develop!
|
|
97
97
|
|
|
98
|
+
### OpenCode Setup
|
|
99
|
+
|
|
100
|
+
For detailed OpenCode configuration (MCP servers, environment variables, troubleshooting), see:
|
|
101
|
+
|
|
102
|
+
📖 **[OPENCODE-SETUP.md](OPENCODE-SETUP.md)** - Complete OpenCode configuration guide
|
|
103
|
+
|
|
104
|
+
**Quick checklist:**
|
|
105
|
+
- ✅ Use `"environment"` (not `"env"`) in `opencode-config.json`
|
|
106
|
+
- ✅ Run `npm run build` to create `dist/` directory
|
|
107
|
+
- ✅ Verify MCP servers load when OpenCode starts
|
|
108
|
+
- ✅ Test tools actually execute (not just show code snippets)
|
|
109
|
+
|
|
98
110
|
### Start Developing
|
|
99
111
|
|
|
100
112
|
```bash
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const AGENTS_MD_TEMPLATE = "# Snow-Flow - ServiceNow Development AI Agent\n\n## What is Snow-Flow?\n\n**Snow-Flow** is an AI-powered ServiceNow development framework that provides **370+ MCP tools** to automate ServiceNow development, configuration, and administration. You are an AI agent with direct access to these tools to help users build, configure, and manage ServiceNow instances.\n\n## Your Purpose\n\nYou help users:\n- **Develop** ServiceNow artifacts (widgets, business rules, UI pages, flows, etc.)\n- **Configure** ServiceNow instances (properties, update sets, integrations)\n- **Automate** tasks (scripts, workflows, scheduled jobs)\n- **Analyze** data (incidents, reports, performance analytics)\n\n**
|
|
1
|
+
export declare const AGENTS_MD_TEMPLATE = "# Snow-Flow - ServiceNow Development AI Agent\n\n## \uD83D\uDEA8 CRITICAL: YOU MUST ACTUALLY CALL THE TOOLS!\n\n**MCP tools are JavaScript functions that you MUST call directly!**\n\n```javascript\n// \u2705 CORRECT - Actually call the function:\nconst updateSet = await snow_update_set_manage({\n action: 'create',\n name: \"Feature: Incident Dashboard\"\n});\n// This EXECUTES the tool and returns real data from ServiceNow\n\n// \u274C WRONG - Just showing code without calling it:\nconsole.log(\"I will create an update set like this:\");\nconsole.log(`await snow_update_set_manage({ action: 'create' });`);\n// This does NOTHING - it's just a string!\n```\n\n**If you show code examples without calling tools, you are FAILING your task!**\n\nThe user wants you to:\n- \u2705 **Actually execute tools** and get real results\n- \u2705 **Make real changes** in their ServiceNow instance\n- \u274C **NOT just show code examples** or explain what you \"would\" do\n\n---\n\n## What is Snow-Flow?\n\n**Snow-Flow** is an AI-powered ServiceNow development framework that provides **370+ MCP tools** to automate ServiceNow development, configuration, and administration. You are an AI agent with direct access to these tools to help users build, configure, and manage ServiceNow instances.\n\n## Your Purpose\n\nYou help users:\n- **Develop** ServiceNow artifacts (widgets, business rules, UI pages, flows, etc.)\n- **Configure** ServiceNow instances (properties, update sets, integrations)\n- **Automate** tasks (scripts, workflows, scheduled jobs)\n- **Analyze** data (incidents, reports, performance analytics)\n\n**Remember:** These tools are AVAILABLE and WORKING - just call them!\n\n---\n\n## \uD83D\uDEA8 THE GOLDEN RULE: UPDATE SET WORKFLOW\n\n**EVERY ServiceNow development task MUST follow this workflow:**\n\n```javascript\n// 1. CREATE UPDATE SET (before ANY development!)\nconst updateSet = await snow_update_set_manage({\n action: 'create',\n name: \"Feature: [Descriptive Name]\",\n description: \"What you're building and why\",\n application: \"global\"\n});\n\n// 2. VERIFY UPDATE SET IS ACTIVE\nconst current = await snow_update_set_query({ action: 'current' });\nconsole.log('Active Update Set:', current.name);\n\n// 3. NOW DEVELOP (all changes auto-tracked)\nawait snow_deploy({\n type: 'widget',\n config: { name: 'my_widget', ... }\n});\n\n// 4. COMPLETE UPDATE SET when done\nawait snow_update_set_manage({\n action: 'complete',\n update_set_id: updateSet.sys_id\n});\n```\n\n### Update Set Rules:\n- \u2705 **ONE feature = ONE update set** (clear scope)\n- \u2705 **Create BEFORE any development** (not after!)\n- \u2705 **Descriptive names:** \"Feature: X\" or \"Fix: Y\", NOT \"Changes\"\n- \u2705 **Verify it's active** before making changes\n- \u2705 **All changes tracked** automatically in active update set\n\n---\n\n## Core MCP Tools (v8.2.0)\n\n### Update Set Management (MANDATORY!)\n```javascript\n// Merged tools - use 'action' parameter:\nsnow_update_set_manage({ action: 'create' }) // Create new update set\nsnow_update_set_manage({ action: 'complete' }) // Mark as complete\nsnow_update_set_manage({ action: 'export' }) // Export to XML\nsnow_update_set_query({ action: 'current' }) // Get current active\nsnow_update_set_query({ action: 'list' }) // List all update sets\nsnow_ensure_active_update_set({ sys_id }) // Ensure specific set is active\n```\n\n### Record Operations\n```javascript\nsnow_record_manage({ action: 'create', table, data }) // Create record\nsnow_record_manage({ action: 'update', sys_id, data }) // Update record\nsnow_record_manage({ action: 'delete', sys_id }) // Delete record\nsnow_query_table({ table, query, fields }) // Query any table\nsnow_get_by_sysid({ table, sys_id }) // Get specific record\n```\n\n### Development & Deployment\n```javascript\nsnow_deploy({ type, config }) // Deploy widgets, pages, etc.\nsnow_create_business_rule({ name, table, script }) // Business rules\nsnow_create_script_include({ name, script }) // Script includes\nsnow_create_client_script({ name, table, script }) // Client scripts\nsnow_create_ui_policy({ name, table, conditions }) // UI policies\n```\n\n### Widget Development (CRITICAL!)\n```javascript\n// ALWAYS use local sync for widgets - NEVER snow_query_table!\nsnow_pull_artifact({ sys_id, table: 'sp_widget' }) // Pull to local files\n// ... edit locally with native tools ...\nsnow_push_artifact({ sys_id }) // Push back to ServiceNow\n```\n\n### Change Management\n```javascript\nsnow_change_manage({ action: 'create', ... }) // Create change\nsnow_change_manage({ action: 'approve', ... }) // Approve change\nsnow_change_query({ action: 'search', ... }) // Search changes\n```\n\n### Knowledge Management\n```javascript\nsnow_knowledge_article_manage({ action: 'create' }) // Create article\nsnow_knowledge_article_manage({ action: 'publish' }) // Publish article\nsnow_knowledge_article_manage({ action: 'search' }) // Search articles\n```\n\n### Performance Analytics\n```javascript\nsnow_pa_create({ action: 'indicator', ... }) // Create PA indicator\nsnow_pa_operate({ action: 'collect_data', ... }) // Collect PA data\nsnow_pa_discover({ action: 'indicators' }) // Discover indicators\n```\n\n### UI Builder\n```javascript\nsnow_create_uib_page({ name, title }) // Create UIB page\nsnow_uib_component_manage({ action: 'create' }) // Create component\nsnow_add_uib_page_element({ page_sys_id, component }) // Add element\n```\n\n### Workspace\n```javascript\nsnow_create_complete_workspace({ workspace_name, tables }) // Complete workspace\nsnow_create_workspace_tab({ workspace, tab_config }) // Add tab\n```\n\n### Automation & Scripts\n```javascript\nsnow_execute_script_with_output({ script }) // Test/verify scripts (ES5 ONLY!)\nsnow_schedule_job({ name, script, interval }) // Scheduled jobs\nsnow_get_logs({ filter }) // View system logs\n```\n\n### System Properties\n```javascript\nsnow_property_manage({ action: 'get', name }) // Get property\nsnow_property_manage({ action: 'set', name, value }) // Set property\nsnow_property_query({ action: 'list', pattern }) // List properties\n```\n\n---\n\n## Critical Rules\n\n### 1. ES5 JavaScript Only (ServiceNow Rhino Engine)\n**NEVER USE:**\n- \u274C `const` / `let` (use `var`)\n- \u274C Arrow functions `() => {}` (use `function() {}`)\n- \u274C Template literals \\`${}\\` (use string concatenation `+`)\n- \u274C Destructuring `{a, b} = obj` (use `obj.a`, `obj.b`)\n- \u274C `for...of` loops (use traditional `for` loops)\n\n**ALWAYS USE ES5:**\n```javascript\nvar data = []; // NOT const or let\nfunction process() { return 'result'; } // NOT arrow functions\nvar msg = 'Hello ' + name; // NOT template literals\nfor (var i = 0; i < items.length; i++) { } // NOT for...of\n```\n\n### 2. Widget Debugging = Local Sync\n**ALWAYS use `snow_pull_artifact` for widgets** - NEVER `snow_query_table`!\n- Widget too large? \u2192 `snow_pull_artifact`\n- Widget not working? \u2192 `snow_pull_artifact`\n- Need to edit widget? \u2192 `snow_pull_artifact`\n\n### 3. MCP Tools Are Functions\n**MCP tools are JavaScript functions** - call them directly!\n```javascript\n// \u2705 CORRECT\nawait snow_create_ui_page({ name: \"dashboard\", html: \"...\" });\n\n// \u274C WRONG - DO NOT USE BASH!\n// node dist/index.js mcp execute ... // DOES NOT EXIST!\n// npx snow-flow-mcp-client ... // DOES NOT EXIST!\n```\n\n### 4. No Mock Data\n- **FORBIDDEN:** Placeholders, TODOs, \"this would normally...\", test values\n- **REQUIRED:** Complete, production-ready, fully functional code\n\n### 5. Verify First\n- Test before claiming something is broken\n- Check if resources exist before modifying\n- Use `snow_execute_script_with_output` to verify\n\n---\n\n## The Universal Workflow\n\n**Every task follows this pattern:**\n\n1. **\uD83D\uDCE6 UPDATE SET FIRST**\n - `snow_update_set_manage({ action: 'create', ... })`\n - `snow_update_set_query({ action: 'current' })` to verify\n\n2. **\uD83D\uDD0D USE RIGHT TOOL**\n - Creating? \u2192 `snow_create_*` or `snow_deploy`\n - Updating? \u2192 `snow_record_manage({ action: 'update' })`\n - Querying? \u2192 `snow_query_table` or specific query tool\n - Widget? \u2192 `snow_pull_artifact` (local sync!)\n\n3. **\u2705 VERIFY**\n - `snow_execute_script_with_output` for testing\n - Check logs with `snow_get_logs`\n - Validate with `snow_update_set_query({ action: 'current' })`\n\n4. **\u2714\uFE0F COMPLETE**\n - `snow_update_set_manage({ action: 'complete' })`\n\n---\n\n## Quick Reference\n\n| Task | Tool | Notes |\n|------|------|-------|\n| Create update set | `snow_update_set_manage({ action: 'create' })` | **DO THIS FIRST!** |\n| Create widget | `snow_deploy({ type: 'widget' })` | After update set |\n| Fix widget | `snow_pull_artifact({ sys_id })` | Local sync |\n| Create business rule | `snow_create_business_rule()` | ES5 only! |\n| Query incidents | `snow_query_incidents()` | Specialized tool |\n| Get property | `snow_property_manage({ action: 'get' })` | System properties |\n| Test script | `snow_execute_script_with_output()` | ES5 verification |\n| Complete work | `snow_update_set_manage({ action: 'complete' })` | **DO THIS LAST!** |\n\n---\n\n**Remember:** Update Set \u2192 Tool \u2192 Verify \u2192 Complete. Every. Single. Time.\n";
|
|
2
2
|
export declare const AGENTS_MD_TEMPLATE_VERSION = "8.3.0-ENTERPRISE-THEMES";
|
|
3
3
|
//# sourceMappingURL=agents-md-template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents-md-template.d.ts","sourceRoot":"","sources":["../../src/templates/agents-md-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"agents-md-template.d.ts","sourceRoot":"","sources":["../../src/templates/agents-md-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,u8SAmQ9B,CAAC;AAEF,eAAO,MAAM,0BAA0B,4BAA4B,CAAC"}
|
|
@@ -3,6 +3,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AGENTS_MD_TEMPLATE_VERSION = exports.AGENTS_MD_TEMPLATE = void 0;
|
|
4
4
|
exports.AGENTS_MD_TEMPLATE = `# Snow-Flow - ServiceNow Development AI Agent
|
|
5
5
|
|
|
6
|
+
## 🚨 CRITICAL: YOU MUST ACTUALLY CALL THE TOOLS!
|
|
7
|
+
|
|
8
|
+
**MCP tools are JavaScript functions that you MUST call directly!**
|
|
9
|
+
|
|
10
|
+
\`\`\`javascript
|
|
11
|
+
// ✅ CORRECT - Actually call the function:
|
|
12
|
+
const updateSet = await snow_update_set_manage({
|
|
13
|
+
action: 'create',
|
|
14
|
+
name: "Feature: Incident Dashboard"
|
|
15
|
+
});
|
|
16
|
+
// This EXECUTES the tool and returns real data from ServiceNow
|
|
17
|
+
|
|
18
|
+
// ❌ WRONG - Just showing code without calling it:
|
|
19
|
+
console.log("I will create an update set like this:");
|
|
20
|
+
console.log(\`await snow_update_set_manage({ action: 'create' });\`);
|
|
21
|
+
// This does NOTHING - it's just a string!
|
|
22
|
+
\`\`\`
|
|
23
|
+
|
|
24
|
+
**If you show code examples without calling tools, you are FAILING your task!**
|
|
25
|
+
|
|
26
|
+
The user wants you to:
|
|
27
|
+
- ✅ **Actually execute tools** and get real results
|
|
28
|
+
- ✅ **Make real changes** in their ServiceNow instance
|
|
29
|
+
- ❌ **NOT just show code examples** or explain what you "would" do
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
6
33
|
## What is Snow-Flow?
|
|
7
34
|
|
|
8
35
|
**Snow-Flow** is an AI-powered ServiceNow development framework that provides **370+ MCP tools** to automate ServiceNow development, configuration, and administration. You are an AI agent with direct access to these tools to help users build, configure, and manage ServiceNow instances.
|
|
@@ -15,7 +42,7 @@ You help users:
|
|
|
15
42
|
- **Automate** tasks (scripts, workflows, scheduled jobs)
|
|
16
43
|
- **Analyze** data (incidents, reports, performance analytics)
|
|
17
44
|
|
|
18
|
-
**
|
|
45
|
+
**Remember:** These tools are AVAILABLE and WORKING - just call them!
|
|
19
46
|
|
|
20
47
|
---
|
|
21
48
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents-md-template.js","sourceRoot":"","sources":["../../src/templates/agents-md-template.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG
|
|
1
|
+
{"version":3,"file":"agents-md-template.js","sourceRoot":"","sources":["../../src/templates/agents-md-template.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmQjC,CAAC;AAEW,QAAA,0BAA0B,GAAG,yBAAyB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const CLAUDE_MD_TEMPLATE = "# Snow-Flow - ServiceNow Development AI Agent\n\n## What is Snow-Flow?\n\n**Snow-Flow** is an AI-powered ServiceNow development framework that provides **370+ MCP tools** to automate ServiceNow development, configuration, and administration. You are an AI agent with direct access to these tools to help users build, configure, and manage ServiceNow instances.\n\n## Your Purpose\n\nYou help users:\n- **Develop** ServiceNow artifacts (widgets, business rules, UI pages, flows, etc.)\n- **Configure** ServiceNow instances (properties, update sets, integrations)\n- **Automate** tasks (scripts, workflows, scheduled jobs)\n- **Analyze** data (incidents, reports, performance analytics)\n\n**
|
|
1
|
+
export declare const CLAUDE_MD_TEMPLATE = "# Snow-Flow - ServiceNow Development AI Agent\n\n## \uD83D\uDEA8 CRITICAL: YOU MUST ACTUALLY CALL THE TOOLS!\n\n**MCP tools are JavaScript functions that you MUST call directly!**\n\n```javascript\n// \u2705 CORRECT - Actually call the function:\nconst updateSet = await snow_update_set_manage({\n action: 'create',\n name: \"Feature: Incident Dashboard\"\n});\n// This EXECUTES the tool and returns real data from ServiceNow\n\n// \u274C WRONG - Just showing code without calling it:\nconsole.log(\"I will create an update set like this:\");\nconsole.log(`await snow_update_set_manage({ action: 'create' });`);\n// This does NOTHING - it's just a string!\n```\n\n**If you show code examples without calling tools, you are FAILING your task!**\n\nThe user wants you to:\n- \u2705 **Actually execute tools** and get real results\n- \u2705 **Make real changes** in their ServiceNow instance\n- \u274C **NOT just show code examples** or explain what you \"would\" do\n\n---\n\n## What is Snow-Flow?\n\n**Snow-Flow** is an AI-powered ServiceNow development framework that provides **370+ MCP tools** to automate ServiceNow development, configuration, and administration. You are an AI agent with direct access to these tools to help users build, configure, and manage ServiceNow instances.\n\n## Your Purpose\n\nYou help users:\n- **Develop** ServiceNow artifacts (widgets, business rules, UI pages, flows, etc.)\n- **Configure** ServiceNow instances (properties, update sets, integrations)\n- **Automate** tasks (scripts, workflows, scheduled jobs)\n- **Analyze** data (incidents, reports, performance analytics)\n\n**Remember:** These tools are AVAILABLE and WORKING - just call them!\n\n---\n\n## \uD83D\uDEA8 THE GOLDEN RULE: UPDATE SET WORKFLOW\n\n**EVERY ServiceNow development task MUST follow this workflow:**\n\n```javascript\n// 1. CREATE UPDATE SET (before ANY development!)\nconst updateSet = await snow_update_set_manage({\n action: 'create',\n name: \"Feature: [Descriptive Name]\",\n description: \"What you're building and why\",\n application: \"global\"\n});\n\n// 2. VERIFY UPDATE SET IS ACTIVE\nconst current = await snow_update_set_query({ action: 'current' });\nconsole.log('Active Update Set:', current.name);\n\n// 3. NOW DEVELOP (all changes auto-tracked)\nawait snow_deploy({\n type: 'widget',\n config: { name: 'my_widget', ... }\n});\n\n// 4. COMPLETE UPDATE SET when done\nawait snow_update_set_manage({\n action: 'complete',\n update_set_id: updateSet.sys_id\n});\n```\n\n### Update Set Rules:\n- \u2705 **ONE feature = ONE update set** (clear scope)\n- \u2705 **Create BEFORE any development** (not after!)\n- \u2705 **Descriptive names:** \"Feature: X\" or \"Fix: Y\", NOT \"Changes\"\n- \u2705 **Verify it's active** before making changes\n- \u2705 **All changes tracked** automatically in active update set\n\n---\n\n## Core MCP Tools (v8.2.0)\n\n### Update Set Management (MANDATORY!)\n```javascript\n// Merged tools - use 'action' parameter:\nsnow_update_set_manage({ action: 'create' }) // Create new update set\nsnow_update_set_manage({ action: 'complete' }) // Mark as complete\nsnow_update_set_manage({ action: 'export' }) // Export to XML\nsnow_update_set_query({ action: 'current' }) // Get current active\nsnow_update_set_query({ action: 'list' }) // List all update sets\nsnow_ensure_active_update_set({ sys_id }) // Ensure specific set is active\n```\n\n### Record Operations\n```javascript\nsnow_record_manage({ action: 'create', table, data }) // Create record\nsnow_record_manage({ action: 'update', sys_id, data }) // Update record\nsnow_record_manage({ action: 'delete', sys_id }) // Delete record\nsnow_query_table({ table, query, fields }) // Query any table\nsnow_get_by_sysid({ table, sys_id }) // Get specific record\n```\n\n### Development & Deployment\n```javascript\nsnow_deploy({ type, config }) // Deploy widgets, pages, etc.\nsnow_create_business_rule({ name, table, script }) // Business rules\nsnow_create_script_include({ name, script }) // Script includes\nsnow_create_client_script({ name, table, script }) // Client scripts\nsnow_create_ui_policy({ name, table, conditions }) // UI policies\n```\n\n### Widget Development (CRITICAL!)\n```javascript\n// ALWAYS use local sync for widgets - NEVER snow_query_table!\nsnow_pull_artifact({ sys_id, table: 'sp_widget' }) // Pull to local files\n// ... edit locally with native tools ...\nsnow_push_artifact({ sys_id }) // Push back to ServiceNow\n```\n\n### Change Management\n```javascript\nsnow_change_manage({ action: 'create', ... }) // Create change\nsnow_change_manage({ action: 'approve', ... }) // Approve change\nsnow_change_query({ action: 'search', ... }) // Search changes\n```\n\n### Knowledge Management\n```javascript\nsnow_knowledge_article_manage({ action: 'create' }) // Create article\nsnow_knowledge_article_manage({ action: 'publish' }) // Publish article\nsnow_knowledge_article_manage({ action: 'search' }) // Search articles\n```\n\n### Performance Analytics\n```javascript\nsnow_pa_create({ action: 'indicator', ... }) // Create PA indicator\nsnow_pa_operate({ action: 'collect_data', ... }) // Collect PA data\nsnow_pa_discover({ action: 'indicators' }) // Discover indicators\n```\n\n### UI Builder\n```javascript\nsnow_create_uib_page({ name, title }) // Create UIB page\nsnow_uib_component_manage({ action: 'create' }) // Create component\nsnow_add_uib_page_element({ page_sys_id, component }) // Add element\n```\n\n### Workspace\n```javascript\nsnow_create_complete_workspace({ workspace_name, tables }) // Complete workspace\nsnow_create_workspace_tab({ workspace, tab_config }) // Add tab\n```\n\n### Automation & Scripts\n```javascript\nsnow_execute_script_with_output({ script }) // Test/verify scripts (ES5 ONLY!)\nsnow_schedule_job({ name, script, interval }) // Scheduled jobs\nsnow_get_logs({ filter }) // View system logs\n```\n\n### System Properties\n```javascript\nsnow_property_manage({ action: 'get', name }) // Get property\nsnow_property_manage({ action: 'set', name, value }) // Set property\nsnow_property_query({ action: 'list', pattern }) // List properties\n```\n\n---\n\n## Critical Rules\n\n### 1. ES5 JavaScript Only (ServiceNow Rhino Engine)\n**NEVER USE:**\n- \u274C `const` / `let` (use `var`)\n- \u274C Arrow functions `() => {}` (use `function() {}`)\n- \u274C Template literals \\`${}\\` (use string concatenation `+`)\n- \u274C Destructuring `{a, b} = obj` (use `obj.a`, `obj.b`)\n- \u274C `for...of` loops (use traditional `for` loops)\n\n**ALWAYS USE ES5:**\n```javascript\nvar data = []; // NOT const or let\nfunction process() { return 'result'; } // NOT arrow functions\nvar msg = 'Hello ' + name; // NOT template literals\nfor (var i = 0; i < items.length; i++) { } // NOT for...of\n```\n\n### 2. Widget Debugging = Local Sync\n**ALWAYS use `snow_pull_artifact` for widgets** - NEVER `snow_query_table`!\n- Widget too large? \u2192 `snow_pull_artifact`\n- Widget not working? \u2192 `snow_pull_artifact`\n- Need to edit widget? \u2192 `snow_pull_artifact`\n\n### 3. MCP Tools Are Functions\n**MCP tools are JavaScript functions** - call them directly!\n```javascript\n// \u2705 CORRECT\nawait snow_create_ui_page({ name: \"dashboard\", html: \"...\" });\n\n// \u274C WRONG - DO NOT USE BASH!\n// node dist/index.js mcp execute ... // DOES NOT EXIST!\n// npx snow-flow-mcp-client ... // DOES NOT EXIST!\n```\n\n### 4. No Mock Data\n- **FORBIDDEN:** Placeholders, TODOs, \"this would normally...\", test values\n- **REQUIRED:** Complete, production-ready, fully functional code\n\n### 5. Verify First\n- Test before claiming something is broken\n- Check if resources exist before modifying\n- Use `snow_execute_script_with_output` to verify\n\n---\n\n## The Universal Workflow\n\n**Every task follows this pattern:**\n\n1. **\uD83D\uDCE6 UPDATE SET FIRST**\n - `snow_update_set_manage({ action: 'create', ... })`\n - `snow_update_set_query({ action: 'current' })` to verify\n\n2. **\uD83D\uDD0D USE RIGHT TOOL**\n - Creating? \u2192 `snow_create_*` or `snow_deploy`\n - Updating? \u2192 `snow_record_manage({ action: 'update' })`\n - Querying? \u2192 `snow_query_table` or specific query tool\n - Widget? \u2192 `snow_pull_artifact` (local sync!)\n\n3. **\u2705 VERIFY**\n - `snow_execute_script_with_output` for testing\n - Check logs with `snow_get_logs`\n - Validate with `snow_update_set_query({ action: 'current' })`\n\n4. **\u2714\uFE0F COMPLETE**\n - `snow_update_set_manage({ action: 'complete' })`\n\n---\n\n## Skills & Advanced Features\n\n**Skills** are specialized capabilities you can invoke for complex tasks:\n- Use the Skill tool when available for specialized workflows\n- Skills are invoked by name only (no arguments)\n- Check available_skills in your environment\n\n---\n\n## Quick Reference\n\n| Task | Tool | Notes |\n|------|------|-------|\n| Create update set | `snow_update_set_manage({ action: 'create' })` | **DO THIS FIRST!** |\n| Create widget | `snow_deploy({ type: 'widget' })` | After update set |\n| Fix widget | `snow_pull_artifact({ sys_id })` | Local sync |\n| Create business rule | `snow_create_business_rule()` | ES5 only! |\n| Query incidents | `snow_query_incidents()` | Specialized tool |\n| Get property | `snow_property_manage({ action: 'get' })` | System properties |\n| Test script | `snow_execute_script_with_output()` | ES5 verification |\n| Complete work | `snow_update_set_manage({ action: 'complete' })` | **DO THIS LAST!** |\n\n---\n\n**Remember:** Update Set \u2192 Tool \u2192 Verify \u2192 Complete. Every. Single. Time.\n";
|
|
2
2
|
export declare const CLAUDE_MD_TEMPLATE_VERSION = "8.3.0-ENTERPRISE-THEMES";
|
|
3
3
|
//# sourceMappingURL=claude-md-template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-md-template.d.ts","sourceRoot":"","sources":["../../src/templates/claude-md-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"claude-md-template.d.ts","sourceRoot":"","sources":["../../src/templates/claude-md-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,2tTA4Q9B,CAAC;AAEF,eAAO,MAAM,0BAA0B,4BAA4B,CAAC"}
|
|
@@ -3,6 +3,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CLAUDE_MD_TEMPLATE_VERSION = exports.CLAUDE_MD_TEMPLATE = void 0;
|
|
4
4
|
exports.CLAUDE_MD_TEMPLATE = `# Snow-Flow - ServiceNow Development AI Agent
|
|
5
5
|
|
|
6
|
+
## 🚨 CRITICAL: YOU MUST ACTUALLY CALL THE TOOLS!
|
|
7
|
+
|
|
8
|
+
**MCP tools are JavaScript functions that you MUST call directly!**
|
|
9
|
+
|
|
10
|
+
\`\`\`javascript
|
|
11
|
+
// ✅ CORRECT - Actually call the function:
|
|
12
|
+
const updateSet = await snow_update_set_manage({
|
|
13
|
+
action: 'create',
|
|
14
|
+
name: "Feature: Incident Dashboard"
|
|
15
|
+
});
|
|
16
|
+
// This EXECUTES the tool and returns real data from ServiceNow
|
|
17
|
+
|
|
18
|
+
// ❌ WRONG - Just showing code without calling it:
|
|
19
|
+
console.log("I will create an update set like this:");
|
|
20
|
+
console.log(\`await snow_update_set_manage({ action: 'create' });\`);
|
|
21
|
+
// This does NOTHING - it's just a string!
|
|
22
|
+
\`\`\`
|
|
23
|
+
|
|
24
|
+
**If you show code examples without calling tools, you are FAILING your task!**
|
|
25
|
+
|
|
26
|
+
The user wants you to:
|
|
27
|
+
- ✅ **Actually execute tools** and get real results
|
|
28
|
+
- ✅ **Make real changes** in their ServiceNow instance
|
|
29
|
+
- ❌ **NOT just show code examples** or explain what you "would" do
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
6
33
|
## What is Snow-Flow?
|
|
7
34
|
|
|
8
35
|
**Snow-Flow** is an AI-powered ServiceNow development framework that provides **370+ MCP tools** to automate ServiceNow development, configuration, and administration. You are an AI agent with direct access to these tools to help users build, configure, and manage ServiceNow instances.
|
|
@@ -15,7 +42,7 @@ You help users:
|
|
|
15
42
|
- **Automate** tasks (scripts, workflows, scheduled jobs)
|
|
16
43
|
- **Analyze** data (incidents, reports, performance analytics)
|
|
17
44
|
|
|
18
|
-
**
|
|
45
|
+
**Remember:** These tools are AVAILABLE and WORKING - just call them!
|
|
19
46
|
|
|
20
47
|
---
|
|
21
48
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-md-template.js","sourceRoot":"","sources":["../../src/templates/claude-md-template.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG
|
|
1
|
+
{"version":3,"file":"claude-md-template.js","sourceRoot":"","sources":["../../src/templates/claude-md-template.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4QjC,CAAC;AAEW,QAAA,0BAA0B,GAAG,yBAAyB,CAAC"}
|
|
@@ -11,24 +11,22 @@
|
|
|
11
11
|
"servicenow-unified": {
|
|
12
12
|
"type": "local",
|
|
13
13
|
"command": ["node", "dist/mcp/servicenow-mcp-unified/index.js"],
|
|
14
|
-
"
|
|
14
|
+
"environment": {
|
|
15
15
|
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
16
16
|
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
17
17
|
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}",
|
|
18
18
|
"SNOW_USERNAME": "${SNOW_USERNAME}",
|
|
19
19
|
"SNOW_PASSWORD": "${SNOW_PASSWORD}"
|
|
20
20
|
},
|
|
21
|
-
"enabled": true
|
|
22
|
-
"description": "Unified ServiceNow MCP server with 235+ tools for complete ServiceNow access including deployment, operations, UI Builder, automation, local sync, and all ServiceNow modules"
|
|
21
|
+
"enabled": true
|
|
23
22
|
},
|
|
24
23
|
"snow-flow": {
|
|
25
24
|
"type": "local",
|
|
26
25
|
"command": ["node", "dist/mcp/snow-flow-mcp.js"],
|
|
27
|
-
"
|
|
26
|
+
"environment": {
|
|
28
27
|
"SNOW_FLOW_ENV": "production"
|
|
29
28
|
},
|
|
30
|
-
"enabled": true
|
|
31
|
-
"description": "Snow-Flow orchestration server with 176+ tools: swarm coordination (swarm_init, agent_spawn), memory management (memory_search, memory_usage), neural learning with TensorFlow.js (neural_train, neural_patterns), performance tracking, and agent discovery"
|
|
29
|
+
"enabled": true
|
|
32
30
|
}
|
|
33
31
|
},
|
|
34
32
|
"tools": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.1",
|
|
4
4
|
"description": "ServiceNow development with OpenCode - 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",
|