snow-flow 8.5.7 → 8.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/.mcp.json.template +8 -0
  2. package/CLAUDE.md +52 -4
  3. package/README.md +99 -30
  4. package/{OPENCODE-SETUP.md → SNOWCODE-SETUP.md} +47 -21
  5. package/{OPENCODE-TROUBLESHOOTING.md → SNOWCODE-TROUBLESHOOTING.md} +18 -18
  6. package/dist/cli/auth.d.ts.map +1 -1
  7. package/dist/cli/auth.js +526 -280
  8. package/dist/cli/auth.js.map +1 -1
  9. package/dist/cli/enterprise.d.ts +36 -0
  10. package/dist/cli/enterprise.d.ts.map +1 -0
  11. package/dist/cli/enterprise.js +231 -0
  12. package/dist/cli/enterprise.js.map +1 -0
  13. package/dist/cli.d.ts +1 -1
  14. package/dist/cli.d.ts.map +1 -1
  15. package/dist/cli.js +544 -250
  16. package/dist/cli.js.map +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/mcp/clients/enterprise-remote-client.d.ts +78 -0
  20. package/dist/mcp/clients/enterprise-remote-client.d.ts.map +1 -0
  21. package/dist/mcp/clients/enterprise-remote-client.js +221 -0
  22. package/dist/mcp/clients/enterprise-remote-client.js.map +1 -0
  23. package/dist/mcp/servicenow-mcp-unified/tools/adapters/index.d.ts +0 -5
  24. package/dist/mcp/servicenow-mcp-unified/tools/adapters/index.d.ts.map +1 -1
  25. package/dist/mcp/servicenow-mcp-unified/tools/adapters/index.js +2 -18
  26. package/dist/mcp/servicenow-mcp-unified/tools/adapters/index.js.map +1 -1
  27. package/dist/templates/claude-md-template.d.ts +1 -1
  28. package/dist/templates/claude-md-template.js +1 -1
  29. package/dist/templates/readme-template.d.ts +1 -1
  30. package/dist/templates/readme-template.js +18 -18
  31. package/dist/utils/artifact-local-sync.d.ts +1 -1
  32. package/dist/utils/artifact-local-sync.js +4 -4
  33. package/dist/utils/snow-oauth.d.ts +11 -5
  34. package/dist/utils/snow-oauth.d.ts.map +1 -1
  35. package/dist/utils/snow-oauth.js +337 -90
  36. package/dist/utils/snow-oauth.js.map +1 -1
  37. package/dist/utils/{opencode-output-interceptor.d.ts → snowcode-output-interceptor.d.ts} +7 -7
  38. package/dist/utils/{opencode-output-interceptor.d.ts.map → snowcode-output-interceptor.d.ts.map} +1 -1
  39. package/dist/utils/{opencode-output-interceptor.js → snowcode-output-interceptor.js} +10 -10
  40. package/dist/utils/{opencode-output-interceptor.js.map → snowcode-output-interceptor.js.map} +1 -1
  41. package/package.json +20 -9
  42. package/scripts/{start-opencode.sh → start-snowcode.sh} +28 -28
  43. package/scripts/verify-snowcode-fork.sh +141 -0
  44. package/templates/snowcode-package.json +5 -0
  45. package/THEMES.md +0 -223
  46. package/bin/opencode +0 -17
  47. package/dist/mcp/servicenow-mcp-unified/config/tool-definitions.json +0 -3935
  48. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_automation_discover.js +0 -164
  49. package/dist/mcp/servicenow-mcp-unified/tools/deployment/snow_artifact_transfer.js +0 -282
  50. package/dist/mcp/servicenow-mcp-unified/tools/filters/snow_build_filter.js +0 -171
  51. package/dist/mcp/servicenow-mcp-unified/tools/formatters/snow_format_value.js +0 -164
  52. package/dist/mcp/servicenow-mcp-unified/tools/knowledge/index.js.bak +0 -45
  53. package/dist/mcp/servicenow-mcp-unified/tools/local-sync/snow_artifact_sync.js +0 -172
  54. package/dist/mcp/servicenow-mcp-unified/tools/system-properties/index.js +0 -36
  55. package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib.js +0 -296
  56. package/dist/mcp/servicenow-mcp-unified/tools/workspace/snow_create_ux_component.js +0 -292
  57. package/dist/memory/session-memory.d.ts +0 -80
  58. package/dist/memory/session-memory.d.ts.map +0 -1
  59. package/dist/memory/session-memory.js +0 -468
  60. package/dist/memory/session-memory.js.map +0 -1
  61. package/dist/templates/opencode-agents-template.d.ts +0 -2
  62. package/dist/templates/opencode-agents-template.d.ts.map +0 -1
  63. package/dist/templates/opencode-agents-template.js +0 -469
  64. package/dist/templates/opencode-agents-template.js.map +0 -1
  65. package/scripts/bulk-optimize-tools.js +0 -486
  66. package/scripts/optimize-mcp-tools.ts +0 -410
  67. package/themes/README.md +0 -83
  68. package/themes/servicenow.json +0 -117
  69. /package/{opencode-config.example.json → snowcode-config.example.json} +0 -0
@@ -0,0 +1,221 @@
1
+ "use strict";
2
+ /**
3
+ * Remote MCP client for Snow-Flow Enterprise
4
+ * Connects to enterprise.snow-flow.dev MCP server via SSE
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.EnterpriseRemoteClient = void 0;
8
+ exports.getEnterpriseClient = getEnterpriseClient;
9
+ exports.hasEnterpriseTools = hasEnterpriseTools;
10
+ const eventsource_1 = require("eventsource");
11
+ const enterprise_js_1 = require("../../cli/enterprise.js");
12
+ /**
13
+ * Enterprise MCP Client
14
+ * Connects to remote enterprise MCP server for advanced features
15
+ */
16
+ class EnterpriseRemoteClient {
17
+ constructor() {
18
+ this.eventSource = null;
19
+ this.tools = [];
20
+ this.connected = false;
21
+ this.messageHandlers = new Map();
22
+ this.sseUrl = `${enterprise_js_1.ENTERPRISE_MCP_SERVER_URL}/mcp/sse`;
23
+ }
24
+ /**
25
+ * Connect to enterprise MCP server
26
+ */
27
+ async connect() {
28
+ const token = await (0, enterprise_js_1.getEnterpriseToken)();
29
+ if (!token) {
30
+ throw new Error('Not authenticated with Snow-Flow Enterprise. Run: snow-flow login <license-key>');
31
+ }
32
+ return new Promise((resolve, reject) => {
33
+ try {
34
+ // eventsource package (Node.js) supports headers, browser EventSource does not
35
+ // Cast to any to bypass TypeScript's browser EventSourceInit type
36
+ this.eventSource = new eventsource_1.EventSource(this.sseUrl, {
37
+ headers: {
38
+ 'Authorization': `Bearer ${token}`
39
+ }
40
+ });
41
+ this.eventSource.onopen = () => {
42
+ this.connected = true;
43
+ console.log('🌟 Connected to Snow-Flow Enterprise MCP server');
44
+ resolve();
45
+ };
46
+ this.eventSource.onerror = (error) => {
47
+ this.connected = false;
48
+ console.error('❌ Enterprise MCP connection error:', error);
49
+ reject(new Error('Failed to connect to enterprise MCP server'));
50
+ };
51
+ this.eventSource.onmessage = (event) => {
52
+ try {
53
+ const data = JSON.parse(event.data);
54
+ this.handleMessage(data);
55
+ }
56
+ catch (err) {
57
+ console.error('Failed to parse MCP message:', err);
58
+ }
59
+ };
60
+ // Request tools list after connection
61
+ setTimeout(async () => {
62
+ await this.listTools();
63
+ resolve();
64
+ }, 1000);
65
+ }
66
+ catch (err) {
67
+ reject(err);
68
+ }
69
+ });
70
+ }
71
+ /**
72
+ * Handle incoming SSE messages
73
+ */
74
+ handleMessage(data) {
75
+ const messageId = data.id;
76
+ if (messageId && this.messageHandlers.has(messageId)) {
77
+ const handler = this.messageHandlers.get(messageId);
78
+ if (handler) {
79
+ handler(data);
80
+ this.messageHandlers.delete(messageId);
81
+ }
82
+ }
83
+ // Handle specific message types
84
+ if (data.method === 'tools/list' && data.result) {
85
+ this.tools = data.result.tools || [];
86
+ console.log(`📋 Loaded ${this.tools.length} enterprise tools`);
87
+ }
88
+ }
89
+ /**
90
+ * Send request to MCP server and wait for response
91
+ */
92
+ async sendRequest(method, params) {
93
+ if (!this.connected || !this.eventSource) {
94
+ throw new Error('Not connected to enterprise MCP server');
95
+ }
96
+ const messageId = `msg_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
97
+ return new Promise((resolve, reject) => {
98
+ // Set up response handler
99
+ this.messageHandlers.set(messageId, (data) => {
100
+ if (data.error) {
101
+ reject(new Error(data.error.message || 'Enterprise MCP error'));
102
+ }
103
+ else {
104
+ resolve(data.result);
105
+ }
106
+ });
107
+ // Send request via POST endpoint
108
+ fetch(`${enterprise_js_1.ENTERPRISE_MCP_SERVER_URL}/mcp/messages`, {
109
+ method: 'POST',
110
+ headers: {
111
+ 'Content-Type': 'application/json'
112
+ },
113
+ body: JSON.stringify({
114
+ jsonrpc: '2.0',
115
+ id: messageId,
116
+ method,
117
+ params
118
+ })
119
+ }).catch((err) => {
120
+ this.messageHandlers.delete(messageId);
121
+ reject(err);
122
+ });
123
+ // Timeout after 30 seconds
124
+ setTimeout(() => {
125
+ if (this.messageHandlers.has(messageId)) {
126
+ this.messageHandlers.delete(messageId);
127
+ reject(new Error('Request timeout'));
128
+ }
129
+ }, 30000);
130
+ });
131
+ }
132
+ /**
133
+ * List available enterprise tools
134
+ */
135
+ async listTools() {
136
+ if (this.tools.length > 0) {
137
+ return this.tools;
138
+ }
139
+ const result = await this.sendRequest('tools/list');
140
+ this.tools = result.tools || [];
141
+ return this.tools;
142
+ }
143
+ /**
144
+ * Call an enterprise tool
145
+ */
146
+ async callTool(toolName, args) {
147
+ const result = await this.sendRequest('tools/call', {
148
+ name: toolName,
149
+ arguments: args
150
+ });
151
+ return result;
152
+ }
153
+ /**
154
+ * Check if tool is available
155
+ */
156
+ async hasTool(toolName) {
157
+ const tools = await this.listTools();
158
+ return tools.some(tool => tool.name === toolName);
159
+ }
160
+ /**
161
+ * Get all tools by category
162
+ */
163
+ async getToolsByCategory(category) {
164
+ const tools = await this.listTools();
165
+ return tools.filter(tool => tool.name.startsWith(category.replace('-', '_')));
166
+ }
167
+ /**
168
+ * Disconnect from server
169
+ */
170
+ disconnect() {
171
+ if (this.eventSource) {
172
+ this.eventSource.close();
173
+ this.eventSource = null;
174
+ this.connected = false;
175
+ console.log('🔌 Disconnected from Enterprise MCP server');
176
+ }
177
+ }
178
+ /**
179
+ * Get connection status
180
+ */
181
+ isConnected() {
182
+ return this.connected;
183
+ }
184
+ /**
185
+ * Get available tools list (cached)
186
+ */
187
+ getTools() {
188
+ return this.tools;
189
+ }
190
+ }
191
+ exports.EnterpriseRemoteClient = EnterpriseRemoteClient;
192
+ /**
193
+ * Singleton instance
194
+ */
195
+ let enterpriseClientInstance = null;
196
+ /**
197
+ * Get or create enterprise client instance
198
+ */
199
+ async function getEnterpriseClient() {
200
+ if (!enterpriseClientInstance) {
201
+ enterpriseClientInstance = new EnterpriseRemoteClient();
202
+ await enterpriseClientInstance.connect();
203
+ }
204
+ if (!enterpriseClientInstance.isConnected()) {
205
+ await enterpriseClientInstance.connect();
206
+ }
207
+ return enterpriseClientInstance;
208
+ }
209
+ /**
210
+ * Check if enterprise tools are available
211
+ */
212
+ async function hasEnterpriseTools() {
213
+ try {
214
+ const token = await (0, enterprise_js_1.getEnterpriseToken)();
215
+ return token !== null;
216
+ }
217
+ catch (err) {
218
+ return false;
219
+ }
220
+ }
221
+ //# sourceMappingURL=enterprise-remote-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enterprise-remote-client.js","sourceRoot":"","sources":["../../../src/mcp/clients/enterprise-remote-client.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAoOH,kDAWC;AAKD,gDAOC;AAzPD,6CAA0C;AAC1C,2DAAwF;AAaxF;;;GAGG;AACH,MAAa,sBAAsB;IAOjC;QALQ,gBAAW,GAAuB,IAAI,CAAC;QACvC,UAAK,GAAc,EAAE,CAAC;QACtB,cAAS,GAAY,KAAK,CAAC;QAC3B,oBAAe,GAAqC,IAAI,GAAG,EAAE,CAAC;QAGpE,IAAI,CAAC,MAAM,GAAG,GAAG,yCAAyB,UAAU,CAAC;IACvD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAO;QACX,MAAM,KAAK,GAAG,MAAM,IAAA,kCAAkB,GAAE,CAAC;QAEzC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,iFAAiF,CAAC,CAAC;QACrG,CAAC;QAED,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,CAAC;gBACH,+EAA+E;gBAC/E,kEAAkE;gBAClE,IAAI,CAAC,WAAW,GAAG,IAAI,yBAAW,CAAC,IAAI,CAAC,MAAM,EAAE;oBAC9C,OAAO,EAAE;wBACP,eAAe,EAAE,UAAU,KAAK,EAAE;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U,mBAAmB;IACvC,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAC9B,wBAAwB,GAAG,IAAI,sBAAsB,EAAE,CAAC;QACxD,MAAM,wBAAwB,CAAC,OAAO,EAAE,CAAC;IAC3C,CAAC;IAED,IAAI,CAAC,wBAAwB,CAAC,WAAW,EAAE,EAAE,CAAC;QAC5C,MAAM,wBAAwB,CAAC,OAAO,EAAE,CAAC;IAC3C,CAAC;IAED,OAAO,wBAAwB,CAAC;AAClC,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,kBAAkB;IACtC,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,IAAA,kCAAkB,GAAE,CAAC;QACzC,OAAO,KAAK,KAAK,IAAI,CAAC;IACxB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -1,6 +1 @@
1
- export { toolDefinition as snow_ldap_sync_def, execute as snow_ldap_sync_exec } from './snow_ldap_sync.js';
2
- export { toolDefinition as snow_saml_config_def, execute as snow_saml_config_exec } from './snow_saml_config.js';
3
- export { toolDefinition as snow_oauth_provider_def, execute as snow_oauth_provider_exec } from './snow_oauth_provider.js';
4
- export { toolDefinition as snow_webhook_config_def, execute as snow_webhook_config_exec } from './snow_webhook_config.js';
5
- export { toolDefinition as snow_jira_integration_def, execute as snow_jira_integration_exec } from './snow_jira_integration.js';
6
1
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC3G,OAAO,EAAE,cAAc,IAAI,oBAAoB,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACjH,OAAO,EAAE,cAAc,IAAI,uBAAuB,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAC1H,OAAO,EAAE,cAAc,IAAI,uBAAuB,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAC1H,OAAO,EAAE,cAAc,IAAI,yBAAyB,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/adapters/index.ts"],"names":[],"mappings":""}
@@ -1,19 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.snow_jira_integration_exec = exports.snow_jira_integration_def = exports.snow_webhook_config_exec = exports.snow_webhook_config_def = exports.snow_oauth_provider_exec = exports.snow_oauth_provider_def = exports.snow_saml_config_exec = exports.snow_saml_config_def = exports.snow_ldap_sync_exec = exports.snow_ldap_sync_def = void 0;
4
- var snow_ldap_sync_js_1 = require("./snow_ldap_sync.js");
5
- Object.defineProperty(exports, "snow_ldap_sync_def", { enumerable: true, get: function () { return snow_ldap_sync_js_1.toolDefinition; } });
6
- Object.defineProperty(exports, "snow_ldap_sync_exec", { enumerable: true, get: function () { return snow_ldap_sync_js_1.execute; } });
7
- var snow_saml_config_js_1 = require("./snow_saml_config.js");
8
- Object.defineProperty(exports, "snow_saml_config_def", { enumerable: true, get: function () { return snow_saml_config_js_1.toolDefinition; } });
9
- Object.defineProperty(exports, "snow_saml_config_exec", { enumerable: true, get: function () { return snow_saml_config_js_1.execute; } });
10
- var snow_oauth_provider_js_1 = require("./snow_oauth_provider.js");
11
- Object.defineProperty(exports, "snow_oauth_provider_def", { enumerable: true, get: function () { return snow_oauth_provider_js_1.toolDefinition; } });
12
- Object.defineProperty(exports, "snow_oauth_provider_exec", { enumerable: true, get: function () { return snow_oauth_provider_js_1.execute; } });
13
- var snow_webhook_config_js_1 = require("./snow_webhook_config.js");
14
- Object.defineProperty(exports, "snow_webhook_config_def", { enumerable: true, get: function () { return snow_webhook_config_js_1.toolDefinition; } });
15
- Object.defineProperty(exports, "snow_webhook_config_exec", { enumerable: true, get: function () { return snow_webhook_config_js_1.execute; } });
16
- var snow_jira_integration_js_1 = require("./snow_jira_integration.js");
17
- Object.defineProperty(exports, "snow_jira_integration_def", { enumerable: true, get: function () { return snow_jira_integration_js_1.toolDefinition; } });
18
- Object.defineProperty(exports, "snow_jira_integration_exec", { enumerable: true, get: function () { return snow_jira_integration_js_1.execute; } });
1
+ // Enterprise adapter tools have been moved to snow-flow-enterprise
2
+ // This directory is reserved for future open-source adapter tools
19
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/adapters/index.ts"],"names":[],"mappings":";;;AAAA,yDAA2G;AAAlG,uHAAA,cAAc,OAAsB;AAAE,wHAAA,OAAO,OAAuB;AAC7E,6DAAiH;AAAxG,2HAAA,cAAc,OAAwB;AAAE,4HAAA,OAAO,OAAyB;AACjF,mEAA0H;AAAjH,iIAAA,cAAc,OAA2B;AAAE,kIAAA,OAAO,OAA4B;AACvF,mEAA0H;AAAjH,iIAAA,cAAc,OAA2B;AAAE,kIAAA,OAAO,OAA4B;AACvF,uEAAgI;AAAvH,qIAAA,cAAc,OAA6B;AAAE,sIAAA,OAAO,OAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/adapters/index.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,kEAAkE"}
@@ -1,3 +1,3 @@
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## \uD83D\uDEA8 CRITICAL: NEVER USE BASH/NODE/REQUIRE FOR MCP TOOLS!\n\n**MCP tools are MCP protocol functions - NOT npm packages, NOT CLI commands!**\n\n### \u274C FORBIDDEN - THESE WILL ALWAYS FAIL:\n\n```bash\n# \u274C WRONG - Trying to require() MCP tools (WILL ALWAYS FAIL!)\nnode -e \"\nconst { snow_update_set_manage } = require('./node_modules/@snow-flow/...');\n...\"\n# ERROR: Cannot find module - @snow-flow packages DON'T EXIST!\n\n# \u274C WRONG - Trying to execute MCP tools as CLI commands\ncd /path/to/project && node -e \"const { snow_query_table } = require(...);\"\n# ERROR: Module not found - MCP tools are NOT npm packages!\n\n# \u274C WRONG - Using bash/shell to call tools\nsnow-flow mcp execute --tool snow_create_ui_page\n# ERROR: No such command - MCP tools are NOT CLI commands!\n```\n\n### \u2705 CORRECT - Just call the function directly:\n\n```javascript\n// MCP tools are ALREADY LOADED and AVAILABLE as functions!\nconst updateSet = await snow_update_set_manage({\n action: 'create',\n name: \"Feature: Incident Dashboard\"\n});\n// That's it! No bash, no require, no npm, no CLI!\n```\n\n### Why bash/require NEVER works:\n\n1. **MCP tools are NOT npm packages**\n - They don't exist in node_modules\n - You can't require() them\n - No package.json to install them\n\n2. **MCP tools are NOT CLI commands**\n - They're not executables\n - No bash/shell needed\n - Just direct function calls\n\n3. **MCP tools are loaded via MCP protocol**\n - OpenCode/Claude Code loads them automatically\n - They appear as callable functions\n - No manual loading needed\n\n**REMEMBER: If you think you need bash/node/require, you're WRONG! Just call the function!**\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";
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## \uD83D\uDEA8 CRITICAL: NEVER USE BASH/NODE/REQUIRE FOR MCP TOOLS!\n\n**MCP tools are MCP protocol functions - NOT npm packages, NOT CLI commands!**\n\n### \u274C FORBIDDEN - THESE WILL ALWAYS FAIL:\n\n```bash\n# \u274C WRONG - Trying to require() MCP tools (WILL ALWAYS FAIL!)\nnode -e \"\nconst { snow_update_set_manage } = require('./node_modules/@snow-flow/...');\n...\"\n# ERROR: Cannot find module - @snow-flow packages DON'T EXIST!\n\n# \u274C WRONG - Trying to execute MCP tools as CLI commands\ncd /path/to/project && node -e \"const { snow_query_table } = require(...);\"\n# ERROR: Module not found - MCP tools are NOT npm packages!\n\n# \u274C WRONG - Using bash/shell to call tools\nsnow-flow mcp execute --tool snow_create_ui_page\n# ERROR: No such command - MCP tools are NOT CLI commands!\n```\n\n### \u2705 CORRECT - Just call the function directly:\n\n```javascript\n// MCP tools are ALREADY LOADED and AVAILABLE as functions!\nconst updateSet = await snow_update_set_manage({\n action: 'create',\n name: \"Feature: Incident Dashboard\"\n});\n// That's it! No bash, no require, no npm, no CLI!\n```\n\n### Why bash/require NEVER works:\n\n1. **MCP tools are NOT npm packages**\n - They don't exist in node_modules\n - You can't require() them\n - No package.json to install them\n\n2. **MCP tools are NOT CLI commands**\n - They're not executables\n - No bash/shell needed\n - Just direct function calls\n\n3. **MCP tools are loaded via MCP protocol**\n - SnowCode/Claude Code loads them automatically\n - They appear as callable functions\n - No manual loading needed\n\n**REMEMBER: If you think you need bash/node/require, you're WRONG! Just call the function!**\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
@@ -76,7 +76,7 @@ const updateSet = await snow_update_set_manage({
76
76
  - Just direct function calls
77
77
 
78
78
  3. **MCP tools are loaded via MCP protocol**
79
- - OpenCode/Claude Code loads them automatically
79
+ - SnowCode/Claude Code loads them automatically
80
80
  - They appear as callable functions
81
81
  - No manual loading needed
82
82
 
@@ -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 OpenCode)
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 OpenCode/Claude Code directly (MCP servers auto-configured)
57
- opencode # All 22 MCP servers available automatically
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
- ### 🎨 OpenCode + Claude Code Support
98
+ ### 🎨 SnowCode + Claude Code Support
99
99
 
100
100
  Snow-Flow works seamlessly with both AI platforms:
101
101
 
102
- - **OpenCode**: Native Task() integration, all 22 MCP servers auto-configured
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 OpenCode (supports Claude, OpenAI, Google, Ollama)
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 OpenCode/Claude Code with MCP tools:
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
- opencode # Start OpenCode with all 22 MCP servers
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 OpenCode auth)
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 (OpenCode copy)
243
- ├── .opencode/ # OpenCode configuration
244
- │ └── config.json # MCP servers for OpenCode
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
- ### "OpenCode is not installed"
279
+ ### "SnowCode is not installed"
280
280
 
281
281
  \`\`\`bash
282
- npm install -g opencode-ai
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 .opencode/config.json exists
296
- 3. Restart OpenCode/Claude Code after running init
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 OpenCode/Claude Code:
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
- - [OpenCode AI](https://opencode.ai)
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 OpenCode
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 OpenCode
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💡 OpenCode (or Claude Code) can now use its native tools on these files!`);
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 (OpenCode, Claude Code, etc.)
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 (OpenCode, Claude Code, etc.)
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
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * ServiceNow OAuth Authentication Utility with Dynamic Port
4
- * Handles OAuth2 flow for ServiceNow integration
3
+ * ServiceNow OAuth Authentication Utility with Code Paste Flow
4
+ * Handles OAuth2 flow for ServiceNow integration (Claude-style)
5
5
  */
6
6
  export interface ServiceNowAuthResult {
7
7
  success: boolean;
@@ -45,13 +45,18 @@ export declare class ServiceNowOAuth {
45
45
  * Check if a specific port is available
46
46
  */
47
47
  private checkPortAvailable;
48
- /**
49
- * Initialize OAuth flow - opens browser and handles callback
50
- */
51
48
  /**
52
49
  * 🔧 CRIT-002 FIX: Normalize instance URL to prevent trailing slash 400 errors
53
50
  */
54
51
  private normalizeInstanceUrl;
52
+ /**
53
+ * 🎯 NEW: Simplified OAuth flow with code paste (Claude-style)
54
+ * No local server required - user manually pastes authorization code
55
+ */
56
+ authenticateWithCodePaste(instance: string, clientId: string, clientSecret: string): Promise<ServiceNowAuthResult>;
57
+ /**
58
+ * Original OAuth flow with local server (fallback)
59
+ */
55
60
  authenticate(instance: string, clientId: string, clientSecret: string): Promise<ServiceNowAuthResult>;
56
61
  /**
57
62
  * Generate ServiceNow OAuth authorization URL
@@ -59,6 +64,7 @@ export declare class ServiceNowOAuth {
59
64
  private generateAuthUrl;
60
65
  /**
61
66
  * Start local HTTP server to handle OAuth callback
67
+ * Also supports manual callback URL paste as fallback
62
68
  */
63
69
  private startCallbackServer;
64
70
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"snow-oauth.d.ts","sourceRoot":"","sources":["../../src/utils/snow-oauth.ts"],"names":[],"mappings":";AACA;;;GAGG;AAeH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD,qBAAa,eAAe;IAC1B,OAAO,CAAC,WAAW,CAAC,CAAmB;IACvC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,cAAc,CAAC,CAAS;IAChC,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,aAAa,CAAC,CAAS;IAG/B,OAAO,CAAC,gBAAgB,CAAa;IACrC,OAAO,CAAC,iBAAiB,CAAa;IACtC,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAS;IACjD,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAAM;;IAQpD;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAmBlC;;OAEG;IACH,OAAO,CAAC,aAAa;IAKrB;;OAEG;IACH,OAAO,CAAC,YAAY;IAUpB;;OAEG;YACW,kBAAkB;IAiBhC;;OAEG;IACH;;OAEG;IACH,O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