snow-flow 3.6.1 → 3.6.3

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.
@@ -708,6 +708,9 @@ snow-flow sync status ${widget.sys_id}
708
708
  async pullArtifactBySysId(sys_id) {
709
709
  console.log(`\nšŸ” Auto-detecting artifact type for sys_id: ${sys_id}`);
710
710
  console.log(`šŸ“‹ Checking ${Object.keys(artifact_registry_1.ARTIFACT_REGISTRY).length} supported tables...`);
711
+ // CRITICAL: Add MAXIMUM operation timeout to prevent infinite hanging
712
+ const MAX_OPERATION_TIME = 30000; // 30 seconds max for entire operation
713
+ const operationStart = Date.now();
711
714
  // SMART ORDER: Check most common tables first for better performance
712
715
  const allTables = Object.keys(artifact_registry_1.ARTIFACT_REGISTRY);
713
716
  const commonTables = ['sp_widget', 'sys_script_include', 'sys_script', 'sys_ui_page'];
@@ -716,10 +719,15 @@ snow-flow sync status ${widget.sys_id}
716
719
  const timeoutConfig = (0, mcp_timeout_config_js_1.getMCPTimeoutConfig)();
717
720
  const errors = [];
718
721
  for (const table of tables) {
722
+ // Check if we've exceeded maximum operation time
723
+ if (Date.now() - operationStart > MAX_OPERATION_TIME) {
724
+ console.log(`\nā±ļø Maximum operation time (30s) exceeded. Stopping search.`);
725
+ break;
726
+ }
719
727
  try {
720
728
  console.log(` šŸ”Ž Checking table: ${table}...`);
721
- // Increased timeout for better reliability
722
- const response = await (0, mcp_timeout_config_js_1.withMCPTimeout)(this.client.searchRecords(table, `sys_id=${sys_id}`, 1), 8000, // 8 second timeout per table (was 3s)
729
+ // Reduced timeout per table for faster failure
730
+ const response = await (0, mcp_timeout_config_js_1.withMCPTimeout)(this.client.searchRecords(table, `sys_id=${sys_id}`, 1), 3000, // 3 second timeout per table (reduced from 8s)
723
731
  `Detect table for ${sys_id}`);
724
732
  if (response.result?.[0]) {
725
733
  console.log(` āœ… Found in table: ${table}`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "3.6.1",
4
- "description": "ServiceNow development framework with ABSOLUTE NO MOCK DATA POLICY. v3.6.1 enforces COMPLETE, PRODUCTION-READY implementations with NO placeholders, NO TODO comments, NO test data, and NO shortcuts. EVERY implementation must be fully functional. Enhanced CLAUDE.md template with comprehensive examples of complete implementations. Includes comprehensive audit logging with source 'snow-flow', token tracking, and compliance support. Features robust artifact detection, ultra-conservative wrapper system, and 18 MCP servers. TAKE THE TIME. DO IT RIGHT. NO EXCEPTIONS.",
3
+ "version": "3.6.3",
4
+ "description": "EMERGENCY FIX: Prevents infinite hanging in servicenow-local-development. v3.6.3 adds maximum operation timeouts (30s for artifact detection, 60s for progress indicator) to prevent operations from running forever. Fixes pullArtifactBySysId with fail-fast mechanism. Consolidated CLAUDE.md with ALL 18 MCP servers and 200+ tools. NO MOCK DATA policy enforced. Includes audit logging, token tracking, and ES5 enforcement.",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",
7
7
  "bin": {