snow-flow 10.0.143 β†’ 10.0.145

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "10.0.143",
3
+ "version": "10.0.145",
4
4
  "name": "snow-flow",
5
5
  "description": "Snow-Flow - ServiceNow Multi-Agent Development Framework powered by AI",
6
6
  "license": "Elastic-2.0",
@@ -15,34 +15,6 @@ Transform user intent expressed in natural language into concrete ServiceNow art
15
15
 
16
16
  ---
17
17
 
18
- ## 🌐 WEB TOOLS (Disabled by Default)
19
-
20
- The following tools are **disabled by default** to prevent accidental prompt injection from external web content:
21
-
22
- - **webfetch** – Fetches and reads content from arbitrary URLs
23
- - **websearch** – Searches the web via Exa API
24
- - **codesearch** – Searches code repositories via Exa API
25
-
26
- These tools make external HTTP calls that could expose the agent to untrusted content. They are opt-in only.
27
-
28
- ### Enabling Web Tools
29
-
30
- Users can enable them in their `snow-code.jsonc` configuration:
31
-
32
- ```jsonc
33
- {
34
- "tools": {
35
- "webfetch": true,
36
- "websearch": true,
37
- "codesearch": true
38
- }
39
- }
40
- ```
41
-
42
- Enable only the tools you need. Each can be toggled independently.
43
-
44
- ---
45
-
46
18
  ## πŸ” HOW MCP TOOLS WORK
47
19
 
48
20
  ### CRITICAL: Tools are NOT directly available!
@@ -464,32 +436,21 @@ function($scope) {
464
436
 
465
437
  ## πŸ› οΈ DEVELOPMENT WORKFLOWS
466
438
 
467
- ### Workflow 1: Standard Development
439
+ ### Workflow 1: Standard Development (widgets, business rules, scoped apps, etc.)
468
440
 
469
441
  Before creating ANY ServiceNow artifact, follow these steps IN ORDER:
470
442
 
471
- 1. **Decide Application Scope** - Scoped app or global?
472
- 2. **Create Update Set** - With descriptive name, ensure auto_switch=true. Get the sys_id from the response!
473
- 3. **Start Activity Tracking** - Use activity_start with the ACTUAL Update Set sys_id (never use placeholders like "pending")
474
- 4. **Do Your Development Work** - Create widgets, business rules, etc.
475
- 5. **Log Each Artifact** - Use activity_add_artifact after each creation
476
- 6. **Complete Activity and Update Set** - Use activity_complete and mark Update Set complete
443
+ 1. **Decide Application Scope** β€” Scoped app (x_vendor_appname format) or global? For scoped apps: use auto_create_update_set=true and auto_switch_scope=true
444
+ 2. **Create Update Set** β€” Descriptive name (e.g., "Feature: Incident Dashboard Widget"), ensure auto_switch=true. Get the sys_id from the response!
445
+ 3. **Start Activity Tracking** β€” Use activity_start with the ACTUAL Update Set sys_id (never use placeholders like "pending")
446
+ 4. **Develop** β€” Create your artifact(s). For widgets: ensure coherent HTML/Client/Server scripts (ES5 only!). For business rules: specify table, timing (before/after), ES5 script
447
+ 5. **Log Each Artifact** β€” Use activity_add_artifact after each creation (include artifactSysId!)
448
+ 6. **Test** β€” Verify behavior. For widgets: get instance URL for preview
449
+ 7. **Complete** β€” Use activity_complete and mark Update Set complete
477
450
 
478
- **⚠️ CRITICAL: Activity tracking requires REAL sys_ids!**
479
- - Always create the Update Set FIRST to get its sys_id
480
- - NEVER use placeholder values like "pending" for updateSetSysId
481
- - The activity_start call must include the actual 32-character sys_id from ServiceNow
451
+ **⚠️ CRITICAL: Activity tracking requires REAL 32-character sys_ids from ServiceNow responses β€” NEVER placeholders!**
482
452
 
483
- ### Workflow 2: Widget Development
484
-
485
- 1. Create Update Set with descriptive name (e.g., "Feature: Incident Dashboard Widget") - get the sys_id!
486
- 2. Start activity tracking with the ACTUAL Update Set sys_id (never use "pending")
487
- 3. Create the widget with coherent HTML/Client/Server scripts (ES5 only!)
488
- 4. Log the widget artifact with activity_add_artifact (include artifactSysId!)
489
- 5. Get instance URL for preview
490
- 6. Complete activity and Update Set
491
-
492
- ### Workflow 3: Widget Debugging
453
+ ### Workflow 2: Widget Debugging
493
454
 
494
455
  1. Create Update Set for the fix
495
456
  2. Pull the widget to local filesystem for editing
@@ -497,35 +458,47 @@ Before creating ANY ServiceNow artifact, follow these steps IN ORDER:
497
458
  4. Push changes back to ServiceNow
498
459
  5. Complete Update Set
499
460
 
500
- ### Workflow 4: Business Rule Creation
501
-
502
- 1. Create Update Set
503
- 2. Create business rule with:
504
- - Descriptive name
505
- - Target table
506
- - When to run (before/after insert/update/delete)
507
- - Script in ES5 ONLY!
508
- 3. Test the business rule
509
- 4. Complete Update Set
510
-
511
- ### Workflow 5: Data Query (No Update Set Needed)
461
+ ### Workflow 3: Data Query (No Update Set Needed)
512
462
 
513
463
  For read-only operations, no Update Set is needed:
514
464
  - Query incidents, users, or any table
515
465
  - Analyze data patterns
516
466
  - Generate reports
517
467
 
518
- ### Workflow 6: Scoped Application Development
519
-
520
- 1. Create the application:
521
- - Provide name, scope (x_vendor_appname format), version
522
- - auto_create_update_set=true creates Update Set automatically
523
- - auto_switch_scope=true switches to new scope automatically
524
- - IMPORTANT: Get the sys_id of the created Update Set from the response!
525
- 2. Start activity tracking with the ACTUAL Update Set sys_id (never use "pending")
526
- 3. Log the application as an artifact with activity_add_artifact (include artifactSysId!)
527
- 4. Create widgets, business rules, etc. (all tracked in application scope)
528
- 5. Complete activity and Update Set
468
+ ### Workflow 4: Tool Debugging & Mutation Inspection
469
+
470
+ When debugging MCP tool behavior or verifying what actually happened on the instance, use these debugging tools:
471
+
472
+ **Available debugging tools:**
473
+ - `snow_get_logs` β€” Syslog queries (errors/warnings/info) with time filter
474
+ - `snow_trace_execution` β€” Script execution tracing
475
+ - `snow_get_script_output` β€” Output of previously executed scripts
476
+ - `snow_get_flow_execution_logs` β€” Flow Designer execution history
477
+ - `snow_get_inbound_http_logs` / `snow_get_outbound_http_logs` β€” REST API call logs
478
+ - `snow_audit_trail_analysis` β€” Audit trail analysis with anomaly detection
479
+ - `snow_inspect_mutations` β€” **(NEW)** Mutation inspection after tool execution
480
+
481
+ **Self-debugging workflow:**
482
+ 1. Note the current timestamp (or use relative like "30s")
483
+ 2. Execute the tool being tested (e.g. `snow_manage_flow action=create`)
484
+ 3. Call `snow_inspect_mutations` with `since=<timestamp>` or `since="30s"`
485
+ 4. Review: which records were INSERT/UPDATE/DELETE, which fields changed, old→new values
486
+ 5. Compare expected vs. actual mutations and adjust tool code accordingly
487
+
488
+ **When to use which debugging tool:**
489
+ - Script errors β†’ `snow_get_logs` with `level="error"`
490
+ - What changed? β†’ `snow_inspect_mutations` with time window
491
+ - What FAILED? β†’ `snow_inspect_mutations` with `include_syslog=true` and `include_transactions=true`
492
+ - Flow not started? β†’ `snow_get_flow_execution_logs`
493
+ - REST call failed? β†’ `snow_get_outbound_http_logs`
494
+ - Who did what when? β†’ `snow_audit_trail_analysis`
495
+
496
+ **Important notes on `snow_inspect_mutations`:**
497
+ - `sys_audit` only captures SUCCESSFUL record changes. Failed operations leave no audit trail.
498
+ - For failed operations, check syslog (errors) and sys_transaction_log (HTTP 4xx/5xx responses).
499
+ - `sys_audit` field values are limited to 255 characters β€” the tool warns when values appear truncated.
500
+ - Use `snapshot_record` to fetch the current state of a record alongside the audit trail.
501
+ - Use `tables` filter to focus on specific tables and reduce noise.
529
502
 
530
503
  ---
531
504