@onlyflows/servicenow-mcp 2.1.0 → 2.2.0-dev.2

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 (133) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +14 -7
  3. package/dist/atf-config.d.ts +72 -0
  4. package/dist/atf-config.d.ts.map +1 -0
  5. package/dist/atf-config.js +179 -0
  6. package/dist/atf-config.js.map +1 -0
  7. package/dist/atf-form.d.ts +27 -0
  8. package/dist/atf-form.d.ts.map +1 -0
  9. package/dist/atf-form.js +110 -0
  10. package/dist/atf-form.js.map +1 -0
  11. package/dist/atf-policy.d.ts +46 -0
  12. package/dist/atf-policy.d.ts.map +1 -0
  13. package/dist/atf-policy.js +85 -0
  14. package/dist/atf-policy.js.map +1 -0
  15. package/dist/atf-result-cache.d.ts +108 -0
  16. package/dist/atf-result-cache.d.ts.map +1 -0
  17. package/dist/atf-result-cache.js +273 -0
  18. package/dist/atf-result-cache.js.map +1 -0
  19. package/dist/client.d.ts +6 -2
  20. package/dist/client.d.ts.map +1 -1
  21. package/dist/client.js +35 -7
  22. package/dist/client.js.map +1 -1
  23. package/dist/config.d.ts +8 -0
  24. package/dist/config.d.ts.map +1 -1
  25. package/dist/config.js +15 -0
  26. package/dist/config.js.map +1 -1
  27. package/dist/execution-context.d.ts +7 -3
  28. package/dist/execution-context.d.ts.map +1 -1
  29. package/dist/execution-context.js +6 -2
  30. package/dist/execution-context.js.map +1 -1
  31. package/dist/field-policy.d.ts.map +1 -1
  32. package/dist/field-policy.js +48 -1
  33. package/dist/field-policy.js.map +1 -1
  34. package/dist/http-entrypoint.d.ts.map +1 -1
  35. package/dist/http-entrypoint.js +3 -0
  36. package/dist/http-entrypoint.js.map +1 -1
  37. package/dist/http-observability.js +2 -1
  38. package/dist/http-observability.js.map +1 -1
  39. package/dist/index.js +3 -0
  40. package/dist/index.js.map +1 -1
  41. package/dist/metadata-cache.d.ts.map +1 -1
  42. package/dist/metadata-cache.js +1 -0
  43. package/dist/metadata-cache.js.map +1 -1
  44. package/dist/profile-manager.d.ts +12 -0
  45. package/dist/profile-manager.d.ts.map +1 -1
  46. package/dist/profile-manager.js +30 -3
  47. package/dist/profile-manager.js.map +1 -1
  48. package/dist/setup-prompts.js +1 -1
  49. package/dist/setup-prompts.js.map +1 -1
  50. package/dist/setup.d.ts.map +1 -1
  51. package/dist/setup.js +11 -4
  52. package/dist/setup.js.map +1 -1
  53. package/dist/structured-query.d.ts +2 -2
  54. package/dist/tool-table-access.js +2 -4
  55. package/dist/tool-table-access.js.map +1 -1
  56. package/dist/tools/aggregate.d.ts +1 -1
  57. package/dist/tools/atf-author-module.d.ts +98 -0
  58. package/dist/tools/atf-author-module.d.ts.map +1 -0
  59. package/dist/tools/atf-author-module.js +140 -0
  60. package/dist/tools/atf-author-module.js.map +1 -0
  61. package/dist/tools/atf-contracts.d.ts +734 -0
  62. package/dist/tools/atf-contracts.d.ts.map +1 -0
  63. package/dist/tools/atf-contracts.js +30 -0
  64. package/dist/tools/atf-contracts.js.map +1 -0
  65. package/dist/tools/atf-readiness-module.d.ts +2 -0
  66. package/dist/tools/atf-readiness-module.d.ts.map +1 -0
  67. package/dist/tools/atf-readiness-module.js +153 -0
  68. package/dist/tools/atf-readiness-module.js.map +1 -0
  69. package/dist/tools/atf-renderers.d.ts +2 -0
  70. package/dist/tools/atf-renderers.d.ts.map +1 -0
  71. package/dist/tools/atf-renderers.js +39 -0
  72. package/dist/tools/atf-renderers.js.map +1 -0
  73. package/dist/tools/atf-results-module.d.ts +2 -0
  74. package/dist/tools/atf-results-module.d.ts.map +1 -0
  75. package/dist/tools/atf-results-module.js +58 -0
  76. package/dist/tools/atf-results-module.js.map +1 -0
  77. package/dist/tools/atf-run-module.d.ts +3 -0
  78. package/dist/tools/atf-run-module.d.ts.map +1 -0
  79. package/dist/tools/atf-run-module.js +96 -0
  80. package/dist/tools/atf-run-module.js.map +1 -0
  81. package/dist/tools/atf-shared.d.ts +31 -0
  82. package/dist/tools/atf-shared.d.ts.map +1 -0
  83. package/dist/tools/atf-shared.js +182 -0
  84. package/dist/tools/atf-shared.js.map +1 -0
  85. package/dist/tools/atf-step-catalog.d.ts +96 -0
  86. package/dist/tools/atf-step-catalog.d.ts.map +1 -0
  87. package/dist/tools/atf-step-catalog.js +237 -0
  88. package/dist/tools/atf-step-catalog.js.map +1 -0
  89. package/dist/tools/atf-step-definitions.json +533 -0
  90. package/dist/tools/atf.d.ts +5 -5
  91. package/dist/tools/atf.d.ts.map +1 -1
  92. package/dist/tools/atf.js +4 -234
  93. package/dist/tools/atf.js.map +1 -1
  94. package/dist/tools/attach.d.ts +1 -1
  95. package/dist/tools/batch.d.ts +2 -2
  96. package/dist/tools/catalog.d.ts +2 -3
  97. package/dist/tools/catalog.d.ts.map +1 -1
  98. package/dist/tools/catalog.js +9 -2
  99. package/dist/tools/catalog.js.map +1 -1
  100. package/dist/tools/discover.d.ts +1 -1
  101. package/dist/tools/index.d.ts +3 -3
  102. package/dist/tools/index.d.ts.map +1 -1
  103. package/dist/tools/index.js +26 -17
  104. package/dist/tools/index.js.map +1 -1
  105. package/dist/tools/markdown.d.ts +77 -0
  106. package/dist/tools/markdown.d.ts.map +1 -0
  107. package/dist/tools/markdown.js +279 -0
  108. package/dist/tools/markdown.js.map +1 -0
  109. package/dist/tools/nl.d.ts +2 -2
  110. package/dist/tools/relationships.d.ts +2 -2
  111. package/dist/tools/result-envelope.d.ts +832 -24
  112. package/dist/tools/result-envelope.d.ts.map +1 -1
  113. package/dist/tools/result-envelope.js +103 -3
  114. package/dist/tools/result-envelope.js.map +1 -1
  115. package/dist/tools/syslog.d.ts +2 -2
  116. package/dist/tools/tool-module.d.ts +13 -3
  117. package/dist/tools/tool-module.d.ts.map +1 -1
  118. package/dist/tools/tool-module.js +1 -0
  119. package/dist/tools/tool-module.js.map +1 -1
  120. package/dist/version.d.ts +1 -1
  121. package/dist/version.d.ts.map +1 -1
  122. package/dist/version.js +1 -1
  123. package/dist/version.js.map +1 -1
  124. package/docs/ATF-WORKFLOW.md +115 -0
  125. package/docs/CLIENT-SETUP.md +2 -2
  126. package/docs/CONTAINER-DEPLOYMENT.md +11 -0
  127. package/docs/CROSS-CLIENT-RELEASE-MATRIX.md +1 -1
  128. package/docs/PROFILE-CREDENTIALS.md +65 -0
  129. package/docs/RELEASE-VALIDATION.md +29 -2
  130. package/docs/TESTING-OAUTH.md +1 -1
  131. package/docs/V2-MIGRATION.md +4 -4
  132. package/package.json +4 -2
  133. package/scripts/release-validate.mjs +14 -4
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEU,QAAA,OAAO,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEU,QAAA,OAAO,GAAG,aAAa,CAAC"}
@@ -0,0 +1,115 @@
1
+ # ATF workflow
2
+
3
+ The server exposes four ATF workflow tools alongside the legacy `sn_atf`
4
+ listing/results interface. Every call requires an explicit `profile`.
5
+
6
+ | Tool | Purpose |
7
+ | --- | --- |
8
+ | `sn_atf_readiness` | Check plugins, runner properties, permissions and optional suite dependencies |
9
+ | `sn_atf_author` | Create tests/suites, add memberships and typed steps |
10
+ | `sn_atf_run` | Submit a suite through CI/CD and optionally wait |
11
+ | `sn_atf_results` | Fetch results, read cached history and compare runs |
12
+
13
+ ## Configure a PDI profile
14
+
15
+ Use the existing setup workflow to save PDI credentials; do not put passwords
16
+ in tool arguments. The authoring preset can be previewed before applying:
17
+
18
+ ```sh
19
+ servicenow-mcp-setup grant --profile pdi --atf --dry-run
20
+ servicenow-mcp-setup grant --profile pdi --atf
21
+ ```
22
+
23
+ Execution additionally requires `"atf": {"execute": true}` on the profile.
24
+ Script-step authoring separately requires `allowScriptSteps: true`. Both default
25
+ to false. Restart the MCP client after changing profile configuration.
26
+
27
+ Grant the selected tools their required read tables and fields. Readiness uses
28
+ `v_plugin`, `sys_properties`, `sys_atf_agent`, `sys_atf_test_suite`,
29
+ `sys_atf_test_suite_test`, `sys_atf_test`, `sys_atf_step` and
30
+ `sys_atf_step_config`; denied probes are reported as unverified.
31
+ Execution reads `sys_atf_test_suite` and the three result tables:
32
+ `sys_atf_test_suite_result`, `sys_atf_test_result`, `sys_atf_test_result_step`.
33
+ Results needs the three result tables, including for cached history.
34
+ Step authoring reads `sys_atf_test`, `sys_atf_step`, `sys_atf_step_config`,
35
+ `var_dictionary`, `sys_variable_value`, and `sys_element_mapping`. Its write plan
36
+ requires `sys_atf_step`, `sys_variable_value`, and `sys_element_mapping`.
37
+ ServiceNow ACLs and CI/CD roles still apply.
38
+
39
+ ## Check and run a suite
40
+
41
+ Call `sn_atf_readiness` with `{"profile":"pdi","suite_name":"Example suite"}`.
42
+ The verdict is `ready`, `blocked`, or `unverified`, with actionable checks.
43
+ A missing browser runner is normal for server-only suites. Readiness checks
44
+ configuration; it cannot guarantee successful execution.
45
+
46
+ Call `sn_atf_run` with:
47
+
48
+ ```json
49
+ {"profile":"pdi","suite_name":"Example suite","wait":true,"timeout":300}
50
+ ```
51
+
52
+ Use exactly one of `suite_name` or `suite_sys_id`. Names must resolve to one
53
+ active suite. `wait:false` returns submission identifiers immediately. Polling
54
+ backs off from 5 to 15 seconds and observes cancellation and the timeout.
55
+ A local timeout or cancellation does not cancel the ServiceNow run. Follow
56
+ returned IDs with `sn_atf_results`; avoid resubmitting an uncertain submission.
57
+ Single-test execution is not supported: add the test to a suite first.
58
+ Legacy `sn_atf run` and `run-suite` return migration guidance without execution.
59
+
60
+ ## Results and history
61
+
62
+ Call `sn_atf_results` with `action:"get"` and exactly one `result_id` or
63
+ `progress_id`. Completed results show roll-up counts, duration and first failing
64
+ steps, including tests in nested suite results. CI/CD IDs must be verified
65
+ against the suite-result table before caching; unavailable mappings are reported.
66
+
67
+ For history use `action:"history"`, `suite_sys_id` (or `test_sys_id`) and
68
+ optional `limit` (default 10, maximum 100). For comparison use `action:"compare"`
69
+ and `suite_sys_id`; optional `result_id` and `previous_result_id` choose the two
70
+ runs. Otherwise the newest two cached runs are used. Comparison identifies new,
71
+ fixed, continuing and intermittent failures and duration regressions (default
72
+ threshold 20%, configurable with `regression_percent`). Comparisons only cover
73
+ visible cached test records. History and comparison make no ServiceNow requests.
74
+
75
+ The cache retains compact summaries, up to 1000 tests per run and 500 characters
76
+ of the first failure per test. Displayed execution detail is bounded to 100 test
77
+ summaries and 20 failures. History shows run summaries. Private cache storage,
78
+ retention and memory fallback are described in [profile configuration](PROFILE-CREDENTIALS.md#atf-authoring-and-result-cache).
79
+ Failure text is untrusted instance content.
80
+
81
+ ## Author typed steps
82
+
83
+ Create a test with `sn_atf_author`:
84
+ `{"profile":"pdi","action":"create_test","name":"Example","application_scope":"global"}`.
85
+ Use `list_step_types` to obtain the supported catalog and input schemas. Supply
86
+ `add_steps`, the created `test_sys_id`, and an ordered `steps` array with
87
+ `type` and `inputs` for each step. Inputs use JSON booleans/numbers where the
88
+ catalog specifies them. Up to 50 steps can be authored per call.
89
+
90
+ All input schemas and field grants are checked before writes. The server then
91
+ verifies each configuration and input definition against the instance, scopes
92
+ input values to each new step, and verifies the stored values. Unknown step
93
+ configurations and metadata mismatches fail closed. Rollback only targets rows
94
+ created during that invocation, including mapping rows that do not cascade; inspect `outcome`, `rolled_back`,
95
+ `rollback_failed`, and `uncertain_insert` before retrying.
96
+
97
+ The catalog supports 13 step types; executable script steps require the
98
+ separate grant. REST headers and query parameters accept a JSON object mapping
99
+ names to string values. Inbound REST requests use their own ATF request
100
+ authentication; the MCP OAuth token is not copied into test steps.
101
+
102
+ Step inputs are saved through ServiceNow's authenticated native ATF form. The
103
+ server parses HTML as data, verifies the test/configuration/scope, and sends only
104
+ requested input controls with the form token and temporary session cookies.
105
+ It requires neither a browser inspector nor an installed scoped application,
106
+ and makes no ACL changes. Parent-step write permissions and all MCP table/field
107
+ grants still apply. Native form contracts can vary by ServiceNow version;
108
+ unrecognized forms fail closed and trigger bounded cleanup of newly created steps.
109
+
110
+ Reference and document inputs can use `{{step['<32-character-step-id>'].first_record}}`.
111
+ The source must be an earlier active step in the same test and expose the named
112
+ output. The server saves the native mapping and verifies both the mapping and
113
+ ordinary input value. Create the source step first to obtain its ID, then add
114
+ the dependent step with a higher `start_order`. Steps inherit the test's scope;
115
+ use `application_scope:"global"` when creating Global tests and suites.
@@ -415,7 +415,7 @@ runtime and immutable image. See `CROSS-CLIENT-RELEASE-MATRIX.md`.
415
415
 
416
416
  ## 5. Profile selection, results, and audit evidence
417
417
 
418
- All 19 tools require a non-empty `profile`. Missing, empty, unknown, or invalid
418
+ All 23 tools require a non-empty `profile`. Missing, empty, unknown, or invalid
419
419
  names fail before credentials or a ServiceNow client. There is no default,
420
420
  active, current, selected-session, or switch-profile operation. To work across
421
421
  instances, make separate calls and include the intended name each time:
@@ -659,7 +659,7 @@ have been separately authorized. The current official OpenAI flow is:
659
659
  create a developer-mode app, choose **Tunnel** under **Connection**, and
660
660
  select the associated tunnel. Do not enter a public MCP URL or a second
661
661
  Authorization value in the app.
662
- 4. Scan tools and compare the 19 names, schemas, and annotations with the
662
+ 4. Scan tools and compare the 23 names, schemas, and annotations with the
663
663
  frozen release manifest. Keep the app private and draft-only.
664
664
  5. On every use, name the profile in the request. For example, instruct the
665
665
  app to invoke `sn_query` with these exact non-secret arguments:
@@ -308,3 +308,14 @@ docker image inspect servicenow-mcp:1.2.0 \
308
308
 
309
309
  Changing an AI client changes only client configuration: the HTTPS MCP URL and
310
310
  bearer token. It never changes the image build inputs.
311
+
312
+ ### ATF result-cache storage
313
+
314
+ The ATF result-cache library defaults to `~/.servicenow-mcp/atf-results` and
315
+ supports a per-profile absolute `atf.resultCacheDir`. Use a dedicated directory
316
+ owned by the runtime user with mode 0700; files are written atomically at 0600.
317
+ It rejects symlink cache files/directories and does not change permissions on
318
+ an existing shared directory. On a read-only or unavailable filesystem it
319
+ warns once on stderr and uses bounded memory until restart. Corrupt or oversized
320
+ files are discarded with a warning. Completed, verified runs from `sn_atf_run` and `sn_atf_results get` populate
321
+ the cache. History and comparison read it without ServiceNow requests.
@@ -3,7 +3,7 @@
3
3
  This is the release contract for the HTTP MCP surface. A release must expose
4
4
  one immutable server artifact at `/mcp` and pass the same contract through both
5
5
  the official Model Context Protocol SDK client and an independent Fetch
6
- JSON-RPC client. The required production catalog contains exactly 19 tools.
6
+ JSON-RPC client. The required production catalog contains exactly 23 tools.
7
7
  User-facing configuration and examples for both clients are in
8
8
  `docs/CLIENT-SETUP.md`.
9
9
 
@@ -124,3 +124,68 @@ rejected instead of being loaded or silently falling back to environment
124
124
  configuration. To recover such a file, keep any backup owner-only, remove every
125
125
  plaintext secret from the active configuration, and recreate or rotate each
126
126
  credential through the protected administration entry point.
127
+
128
+ ## ATF authoring and result cache
129
+
130
+ `sn_atf_author` supports `create_test`, `create_suite`,
131
+ `add_tests_to_suite`, `list_step_types`, and `add_steps`. A profile needs explicit writes for the corresponding
132
+ `sys_atf_test`, `sys_atf_test_suite`, or `sys_atf_test_suite_test` table and
133
+ field grants for the values being written. For example:
134
+
135
+ ```sh
136
+ servicenow-mcp-setup grant --profile pdi --atf --dry-run
137
+ servicenow-mcp-setup grant --profile pdi --atf
138
+ ```
139
+
140
+ The preset binds six authoring tables to `sn_atf_author`: the three above,
141
+ plus `sys_atf_step`, `sys_variable_value`, and `sys_element_mapping` for step
142
+ authoring. Inputs and output mappings are saved through the authenticated native
143
+ ATF form with stored-value verification; no ACL changes or installed app are required.
144
+ It also grants the metadata and read-back tables needed by `add_steps`.
145
+ It does not enable execution or script authoring, and does not add authoring
146
+ to unrelated table targets. Existing grants remain in place.
147
+
148
+ Create a test with `{"profile":"pdi","action":"create_test","name":"Example"}`.
149
+ Creation accepts optional `description`, `active` (default true), and
150
+ `application_scope` (a scope sys_id, or `"global"` for Global). Membership accepts `suite_sys_id`,
151
+ `test_sys_ids` (1–100 unique IDs), and optional `start_order` (default 100).
152
+ Orders increment by one; existing memberships are not deduplicated or reordered.
153
+ The instance enforces reference integrity, application scope, and ACLs.
154
+
155
+ Successful calls report `data.outcome: "created"`. A failed attempt reports
156
+ `data.outcome: "failed"`, `rolled_back`, `rollback_failed`, and
157
+ `uncertain_insert`. Check the outcome before treating the call as successful.
158
+ Rollback deletes only records confirmed created by that invocation. A timeout,
159
+ connection loss, unusable create response, cancellation, or failed delete can
160
+ require manual inspection before retrying; this is not a database transaction.
161
+
162
+ Profiles accept an optional `atf` block:
163
+
164
+ ```json
165
+ {
166
+ "atf": {
167
+ "execute": false,
168
+ "allowScriptSteps": false,
169
+ "resultCacheSize": 10
170
+ }
171
+ }
172
+ ```
173
+
174
+ `resultCacheSize` accepts 1–100; `resultCacheDir` optionally selects an absolute
175
+ owner-only directory. Cache tuning falls back to `SN_ATF_RESULT_CACHE_SIZE`
176
+ and `SN_ATF_RESULT_CACHE_DIR`. `SN_ATF_EXECUTE` and
177
+ `SN_ATF_ALLOW_SCRIPT_STEPS` grant permissions only to an environment-only
178
+ profile, never to stored profiles.
179
+
180
+ `sn_atf_run` and `sn_atf_results get` cache completed, verified suite runs.
181
+ The cache stores compact run summaries and
182
+ at most 500 characters of the first failure per test, without raw step output.
183
+ Files default to `~/.servicenow-mcp/atf-results/<sha256-profile-name>.json`;
184
+ hashed profile names prevent path traversal. Each file is bound to the
185
+ instance origin, credential fingerprint and effective policy, with up to 200 suites and a 16 MiB
186
+ file cap. Least-recently-used suites are evicted when those bounds are reached.
187
+ Changing instance, credentials or policy discards the old history. Cache directories
188
+ and files must be private (0700/0600 on POSIX).
189
+
190
+ See [ATF workflow](ATF-WORKFLOW.md) for readiness, execution, results and typed
191
+ step authoring. Legacy execution actions return migration guidance.
@@ -26,7 +26,7 @@ npm audit --omit=dev --audit-level=moderate
26
26
 
27
27
  The unit and protocol commands are deliberately separate release records even
28
28
  though the complete unit suite contains the focused protocol cases. The
29
- protocol gate includes the all-19-tool missing-profile rejection matrix through
29
+ protocol gate includes the all-23-tool missing-profile rejection matrix through
30
30
  the official SDK and independent Fetch clients, plus the catalog-wide resolved
31
31
  profile/result/audit contract. The profile gate covers encryption,
32
32
  secret-reference resolution, operator administration, and profile isolation.
@@ -68,7 +68,7 @@ bearer header in argv. In the local UI:
68
68
 
69
69
  1. Select Streamable HTTP and enter the exact `MCP_URL` shown by the launcher.
70
70
  2. Enter the bearer directly from the approved secret store in the local UI.
71
- 3. Run `tools/list`; verify exactly 19 tools and required non-empty `profile`
71
+ 3. Run `tools/list`; verify exactly 23 tools and required non-empty `profile`
72
72
  schemas.
73
73
  4. Call `sn_profile` once without `profile` and verify rejection.
74
74
  5. Call it again with the exact `MCP_PROFILE`; verify
@@ -138,3 +138,30 @@ the target; stable-tag publication fails unless the tag exactly matches them.
138
138
 
139
139
  The Inspector operating model and security constraints are documented by the
140
140
  [official MCP Inspector project](https://github.com/modelcontextprotocol/inspector).
141
+
142
+ ## Dev releases
143
+
144
+ A development release uses a unique version such as `2.2.0-dev.1` in
145
+ `package.json`, both root entries in `package-lock.json`, and `src/version.ts`.
146
+ Commit the version and changelog, then push the matching Git tag:
147
+
148
+ ```sh
149
+ git tag -a v2.2.0-dev.1 -m "Development release 2.2.0-dev.1"
150
+ git push origin v2.2.0-dev.1
151
+ ```
152
+
153
+ The existing `publish.yml` workflow runs the release gates and publishes through
154
+ npm trusted publishing. The validator maps stable versions to `latest` and
155
+ `X.Y.Z-dev.N` versions to `dev`; other prerelease channels and mismatched tags
156
+ are rejected. Every published version must be unique. GitHub prereleases can
157
+ be created for these tags without marking them as the latest stable release.
158
+
159
+ Install the newest development build or pin an exact build:
160
+
161
+ ```sh
162
+ npm install -g @onlyflows/servicenow-mcp@dev
163
+ npm install -g @onlyflows/servicenow-mcp@2.2.0-dev.1
164
+ ```
165
+
166
+ Restart the MCP client after updating. To return to the stable channel, install
167
+ `@onlyflows/servicenow-mcp@latest` and restart the client again.
@@ -60,7 +60,7 @@ npm run smoke
60
60
  The smoke client uses the official MCP Streamable HTTP client and verifies:
61
61
 
62
62
  - initialization and discovery over `/mcp`;
63
- - exactly 19 tools;
63
+ - exactly 23 tools;
64
64
  - every discovered schema requires a non-empty `profile`;
65
65
  - `sn_profile` returns `structuredContent.profile` without credentials;
66
66
  - a version health check and a bounded incident query return that same resolved
@@ -446,10 +446,10 @@ refuse any particular table: since 2.0 there is no built-in deny list, so a
446
446
  credential, authentication, or role-grant table configured in `tableAccess` is
447
447
  granted, bounded only by the integration account's ServiceNow roles.
448
448
  Multi-table tools must have their complete operation plan authorized before the
449
- first ServiceNow client access. `sn_nl`
450
- and ATF `run`/`run-suite` are temporarily denied at this boundary because they
451
- do not yet expose complete typed side-effect plans; select typed CRUD/query
452
- tools or non-executing ATF actions directly.
449
+ first ServiceNow client access. `sn_nl` remains denied without a complete typed
450
+ side-effect plan. Legacy ATF execution actions return migration guidance; use
451
+ `sn_atf_run` with the explicit `atf.execute` profile grant. See
452
+ [ATF workflow](ATF-WORKFLOW.md).
453
453
 
454
454
  ### Incident journal migration
455
455
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@onlyflows/servicenow-mcp",
3
- "version": "2.1.0",
4
- "description": "stdio ServiceNow MCP server with 19 tools for CRUD, CMDB traversal, ATF testing, and explicit multi-instance profiles.",
3
+ "version": "2.2.0-dev.2",
4
+ "description": "stdio ServiceNow MCP server with 23 tools for CRUD, CMDB traversal, ATF testing, and explicit multi-instance profiles.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "bin": {
@@ -59,6 +59,7 @@
59
59
  "dependencies": {
60
60
  "@hono/node-server": "2.0.12",
61
61
  "@modelcontextprotocol/sdk": "1.30.0",
62
+ "parse5": "7.3.0",
62
63
  "zod": "^3.25.76"
63
64
  },
64
65
  "overrides": {
@@ -78,6 +79,7 @@
78
79
  ".env.example",
79
80
  "dist",
80
81
  "docs/ADDING-TOOLS.md",
82
+ "docs/ATF-WORKFLOW.md",
81
83
  "docs/CLIENT-SETUP.md",
82
84
  "docs/CONTAINER-DEPLOYMENT.md",
83
85
  "docs/CROSS-CLIENT-RELEASE-MATRIX.md",
@@ -43,7 +43,8 @@ export function validateReleaseContract(options = {}) {
43
43
  const inspectorSource = read("scripts/inspector.mjs");
44
44
  const releaseGuide = read("docs/RELEASE-VALIDATION.md");
45
45
 
46
- assert(/^[0-9]+\.[0-9]+\.[0-9]+$/u.test(packageJson.version), "package version is not stable semver");
46
+ const channel = releaseChannel(packageJson.version);
47
+ assert(read("src/version.ts").includes(`export const VERSION = "${packageJson.version}";`), "runtime version differs from package version");
47
48
  assert(packageLock.version === packageJson.version, "package-lock version differs from package version");
48
49
  assert(
49
50
  packageLock.packages?.[""]?.version === packageJson.version,
@@ -155,6 +156,7 @@ export function validateReleaseContract(options = {}) {
155
156
 
156
157
  return Object.freeze({
157
158
  version: packageJson.version,
159
+ channel,
158
160
  tag: tag ?? null,
159
161
  inspectorVersion: inspectorPackage.dependencies["@modelcontextprotocol/inspector"],
160
162
  portableGateCount: PORTABLE_RELEASE_GATES.length,
@@ -164,11 +166,18 @@ export function validateReleaseContract(options = {}) {
164
166
  });
165
167
  }
166
168
 
169
+ /** Only reviewed stable and dev channels can be published. */
170
+ export function releaseChannel(version) {
171
+ const match = /^(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(-dev\.(?:0|[1-9][0-9]*))?$/u.exec(version);
172
+ assert(typeof version === "string" && match !== null && match[0] === version, "package version must be stable semver or a dev.N prerelease");
173
+ return match[1] === undefined ? "latest" : "dev";
174
+ }
175
+
167
176
  function releaseTagFromEnvironment(environment) {
168
177
  if (environment.GITHUB_REF_TYPE !== "tag") return undefined;
169
178
  const tag = environment.GITHUB_REF_NAME;
170
- if (typeof tag !== "string" || !/^v[0-9]+\.[0-9]+\.[0-9]+$/u.test(tag)) {
171
- throw new Error("tag release is missing a valid stable GITHUB_REF_NAME");
179
+ if (typeof tag !== "string" || !/^v(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-dev\.(?:0|[1-9][0-9]*))?$/u.test(tag)) {
180
+ throw new Error("tag release is missing a valid stable or dev GITHUB_REF_NAME");
172
181
  }
173
182
  return tag;
174
183
  }
@@ -191,7 +200,8 @@ function isMainModule() {
191
200
 
192
201
  if (isMainModule()) {
193
202
  try {
194
- process.stdout.write(`${JSON.stringify(validateReleaseContract())}\n`);
203
+ const result = validateReleaseContract();
204
+ process.stdout.write(`${process.argv.includes("--npm-tag") ? result.channel : JSON.stringify(result)}\n`);
195
205
  } catch (error) {
196
206
  process.stderr.write(
197
207
  `${error instanceof Error ? error.message : "Release contract validation failed"}\n`