@onlyflows/servicenow-mcp 1.0.0 → 2.0.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 (281) hide show
  1. package/.env.example +56 -0
  2. package/CHANGELOG.md +153 -0
  3. package/README.md +939 -101
  4. package/dist/auth.d.ts +88 -0
  5. package/dist/auth.d.ts.map +1 -0
  6. package/dist/auth.js +396 -0
  7. package/dist/auth.js.map +1 -0
  8. package/dist/client.d.ts +111 -17
  9. package/dist/client.d.ts.map +1 -1
  10. package/dist/client.js +554 -79
  11. package/dist/client.js.map +1 -1
  12. package/dist/config.d.ts +41 -4
  13. package/dist/config.d.ts.map +1 -1
  14. package/dist/config.js +44 -34
  15. package/dist/config.js.map +1 -1
  16. package/dist/encoded-query-policy.d.ts +72 -0
  17. package/dist/encoded-query-policy.d.ts.map +1 -0
  18. package/dist/encoded-query-policy.js +409 -0
  19. package/dist/encoded-query-policy.js.map +1 -0
  20. package/dist/execution-context.d.ts +235 -0
  21. package/dist/execution-context.d.ts.map +1 -0
  22. package/dist/execution-context.js +439 -0
  23. package/dist/execution-context.js.map +1 -0
  24. package/dist/field-policy.d.ts +117 -0
  25. package/dist/field-policy.d.ts.map +1 -0
  26. package/dist/field-policy.js +1684 -0
  27. package/dist/field-policy.js.map +1 -0
  28. package/dist/http-auth.d.ts +131 -0
  29. package/dist/http-auth.d.ts.map +1 -0
  30. package/dist/http-auth.js +347 -0
  31. package/dist/http-auth.js.map +1 -0
  32. package/dist/http-entrypoint.d.ts +26 -0
  33. package/dist/http-entrypoint.d.ts.map +1 -0
  34. package/dist/http-entrypoint.js +255 -0
  35. package/dist/http-entrypoint.js.map +1 -0
  36. package/dist/http-observability.d.ts +147 -0
  37. package/dist/http-observability.d.ts.map +1 -0
  38. package/dist/http-observability.js +703 -0
  39. package/dist/http-observability.js.map +1 -0
  40. package/dist/http-request-policy.d.ts +72 -0
  41. package/dist/http-request-policy.d.ts.map +1 -0
  42. package/dist/http-request-policy.js +463 -0
  43. package/dist/http-request-policy.js.map +1 -0
  44. package/dist/http-request-signal.d.ts +12 -0
  45. package/dist/http-request-signal.d.ts.map +1 -0
  46. package/dist/http-request-signal.js +39 -0
  47. package/dist/http-request-signal.js.map +1 -0
  48. package/dist/http-runtime.d.ts +77 -0
  49. package/dist/http-runtime.d.ts.map +1 -0
  50. package/dist/http-runtime.js +1321 -0
  51. package/dist/http-runtime.js.map +1 -0
  52. package/dist/incident-journal-policy.d.ts +22 -0
  53. package/dist/incident-journal-policy.d.ts.map +1 -0
  54. package/dist/incident-journal-policy.js +115 -0
  55. package/dist/incident-journal-policy.js.map +1 -0
  56. package/dist/incident-write-policy.d.ts +20 -0
  57. package/dist/incident-write-policy.d.ts.map +1 -0
  58. package/dist/incident-write-policy.js +196 -0
  59. package/dist/incident-write-policy.js.map +1 -0
  60. package/dist/index.d.ts +14 -4
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +140 -36
  63. package/dist/index.js.map +1 -1
  64. package/dist/metadata-cache.d.ts +71 -0
  65. package/dist/metadata-cache.d.ts.map +1 -0
  66. package/dist/metadata-cache.js +397 -0
  67. package/dist/metadata-cache.js.map +1 -0
  68. package/dist/profile-admin.d.ts +64 -0
  69. package/dist/profile-admin.d.ts.map +1 -0
  70. package/dist/profile-admin.js +351 -0
  71. package/dist/profile-admin.js.map +1 -0
  72. package/dist/profile-credentials.d.ts +68 -0
  73. package/dist/profile-credentials.d.ts.map +1 -0
  74. package/dist/profile-credentials.js +329 -0
  75. package/dist/profile-credentials.js.map +1 -0
  76. package/dist/profile-manager.d.ts +187 -0
  77. package/dist/profile-manager.d.ts.map +1 -0
  78. package/dist/profile-manager.js +1026 -0
  79. package/dist/profile-manager.js.map +1 -0
  80. package/dist/record-identifier-policy.d.ts +39 -0
  81. package/dist/record-identifier-policy.d.ts.map +1 -0
  82. package/dist/record-identifier-policy.js +203 -0
  83. package/dist/record-identifier-policy.js.map +1 -0
  84. package/dist/runtime-environment.d.ts +23 -0
  85. package/dist/runtime-environment.d.ts.map +1 -0
  86. package/dist/runtime-environment.js +58 -0
  87. package/dist/runtime-environment.js.map +1 -0
  88. package/dist/server.d.ts +33 -0
  89. package/dist/server.d.ts.map +1 -0
  90. package/dist/server.js +73 -0
  91. package/dist/server.js.map +1 -0
  92. package/dist/servicenow-identifiers.d.ts +8 -0
  93. package/dist/servicenow-identifiers.d.ts.map +1 -0
  94. package/dist/servicenow-identifiers.js +22 -0
  95. package/dist/servicenow-identifiers.js.map +1 -0
  96. package/dist/setup-prompts.d.ts +7 -0
  97. package/dist/setup-prompts.d.ts.map +1 -0
  98. package/dist/setup-prompts.js +123 -0
  99. package/dist/setup-prompts.js.map +1 -0
  100. package/dist/setup.d.ts +109 -0
  101. package/dist/setup.d.ts.map +1 -0
  102. package/dist/setup.js +1903 -0
  103. package/dist/setup.js.map +1 -0
  104. package/dist/startup.d.ts +43 -0
  105. package/dist/startup.d.ts.map +1 -0
  106. package/dist/startup.js +75 -0
  107. package/dist/startup.js.map +1 -0
  108. package/dist/stdio-runtime.d.ts +106 -0
  109. package/dist/stdio-runtime.d.ts.map +1 -0
  110. package/dist/stdio-runtime.js +231 -0
  111. package/dist/stdio-runtime.js.map +1 -0
  112. package/dist/structured-query.d.ts +187 -0
  113. package/dist/structured-query.d.ts.map +1 -0
  114. package/dist/structured-query.js +503 -0
  115. package/dist/structured-query.js.map +1 -0
  116. package/dist/table-defaults.d.ts +28 -0
  117. package/dist/table-defaults.d.ts.map +1 -0
  118. package/dist/table-defaults.js +85 -0
  119. package/dist/table-defaults.js.map +1 -0
  120. package/dist/table-policy.d.ts +71 -0
  121. package/dist/table-policy.d.ts.map +1 -0
  122. package/dist/table-policy.js +290 -0
  123. package/dist/table-policy.js.map +1 -0
  124. package/dist/tool-error.d.ts +48 -0
  125. package/dist/tool-error.d.ts.map +1 -0
  126. package/dist/tool-error.js +139 -0
  127. package/dist/tool-error.js.map +1 -0
  128. package/dist/tool-table-access.d.ts +19 -0
  129. package/dist/tool-table-access.d.ts.map +1 -0
  130. package/dist/tool-table-access.js +388 -0
  131. package/dist/tool-table-access.js.map +1 -0
  132. package/dist/tools/aggregate.d.ts +22 -42
  133. package/dist/tools/aggregate.d.ts.map +1 -1
  134. package/dist/tools/aggregate.js +103 -47
  135. package/dist/tools/aggregate.js.map +1 -1
  136. package/dist/tools/all-fields-cap.d.ts +45 -0
  137. package/dist/tools/all-fields-cap.d.ts.map +1 -0
  138. package/dist/tools/all-fields-cap.js +151 -0
  139. package/dist/tools/all-fields-cap.js.map +1 -0
  140. package/dist/tools/atf.d.ts +21 -60
  141. package/dist/tools/atf.d.ts.map +1 -1
  142. package/dist/tools/atf.js +180 -116
  143. package/dist/tools/atf.js.map +1 -1
  144. package/dist/tools/attach.d.ts +31 -45
  145. package/dist/tools/attach.d.ts.map +1 -1
  146. package/dist/tools/attach.js +175 -137
  147. package/dist/tools/attach.js.map +1 -1
  148. package/dist/tools/batch.d.ts +78 -42
  149. package/dist/tools/batch.d.ts.map +1 -1
  150. package/dist/tools/batch.js +172 -68
  151. package/dist/tools/batch.js.map +1 -1
  152. package/dist/tools/catalog.d.ts +6 -0
  153. package/dist/tools/catalog.d.ts.map +1 -0
  154. package/dist/tools/catalog.js +203 -0
  155. package/dist/tools/catalog.js.map +1 -0
  156. package/dist/tools/codesearch.d.ts +14 -25
  157. package/dist/tools/codesearch.d.ts.map +1 -1
  158. package/dist/tools/codesearch.js +60 -48
  159. package/dist/tools/codesearch.js.map +1 -1
  160. package/dist/tools/create-module.d.ts +48 -0
  161. package/dist/tools/create-module.d.ts.map +1 -0
  162. package/dist/tools/create-module.js +94 -0
  163. package/dist/tools/create-module.js.map +1 -0
  164. package/dist/tools/create.d.ts +2 -38
  165. package/dist/tools/create.d.ts.map +1 -1
  166. package/dist/tools/create.js +9 -41
  167. package/dist/tools/create.js.map +1 -1
  168. package/dist/tools/delete.d.ts +13 -23
  169. package/dist/tools/delete.d.ts.map +1 -1
  170. package/dist/tools/delete.js +30 -33
  171. package/dist/tools/delete.js.map +1 -1
  172. package/dist/tools/discover.d.ts +15 -27
  173. package/dist/tools/discover.d.ts.map +1 -1
  174. package/dist/tools/discover.js +103 -60
  175. package/dist/tools/discover.js.map +1 -1
  176. package/dist/tools/get-module.d.ts +85 -0
  177. package/dist/tools/get-module.d.ts.map +1 -0
  178. package/dist/tools/get-module.js +221 -0
  179. package/dist/tools/get-module.js.map +1 -0
  180. package/dist/tools/get.d.ts +2 -51
  181. package/dist/tools/get.d.ts.map +1 -1
  182. package/dist/tools/get.js +9 -49
  183. package/dist/tools/get.js.map +1 -1
  184. package/dist/tools/handler-result.d.ts +14 -0
  185. package/dist/tools/handler-result.d.ts.map +1 -0
  186. package/dist/tools/handler-result.js +177 -0
  187. package/dist/tools/handler-result.js.map +1 -0
  188. package/dist/tools/health.d.ts +12 -15
  189. package/dist/tools/health.d.ts.map +1 -1
  190. package/dist/tools/health.js +55 -36
  191. package/dist/tools/health.js.map +1 -1
  192. package/dist/tools/incident-journal-module.d.ts +12 -0
  193. package/dist/tools/incident-journal-module.d.ts.map +1 -0
  194. package/dist/tools/incident-journal-module.js +61 -0
  195. package/dist/tools/incident-journal-module.js.map +1 -0
  196. package/dist/tools/incident-write-shared.d.ts +6 -0
  197. package/dist/tools/incident-write-shared.d.ts.map +1 -0
  198. package/dist/tools/incident-write-shared.js +64 -0
  199. package/dist/tools/incident-write-shared.js.map +1 -0
  200. package/dist/tools/index.d.ts +47 -36
  201. package/dist/tools/index.d.ts.map +1 -1
  202. package/dist/tools/index.js +795 -35
  203. package/dist/tools/index.js.map +1 -1
  204. package/dist/tools/nl.d.ts +10 -24
  205. package/dist/tools/nl.d.ts.map +1 -1
  206. package/dist/tools/nl.js +37 -147
  207. package/dist/tools/nl.js.map +1 -1
  208. package/dist/tools/profile.d.ts +37 -0
  209. package/dist/tools/profile.d.ts.map +1 -0
  210. package/dist/tools/profile.js +39 -0
  211. package/dist/tools/profile.js.map +1 -0
  212. package/dist/tools/query-module.d.ts +119 -0
  213. package/dist/tools/query-module.d.ts.map +1 -0
  214. package/dist/tools/query-module.js +324 -0
  215. package/dist/tools/query-module.js.map +1 -0
  216. package/dist/tools/query.d.ts +2 -72
  217. package/dist/tools/query.d.ts.map +1 -1
  218. package/dist/tools/query.js +8 -72
  219. package/dist/tools/query.js.map +1 -1
  220. package/dist/tools/relationships.d.ts +21 -42
  221. package/dist/tools/relationships.d.ts.map +1 -1
  222. package/dist/tools/relationships.js +70 -56
  223. package/dist/tools/relationships.js.map +1 -1
  224. package/dist/tools/result-envelope.d.ts +603 -0
  225. package/dist/tools/result-envelope.d.ts.map +1 -0
  226. package/dist/tools/result-envelope.js +767 -0
  227. package/dist/tools/result-envelope.js.map +1 -0
  228. package/dist/tools/schema-module.d.ts +64 -0
  229. package/dist/tools/schema-module.d.ts.map +1 -0
  230. package/dist/tools/schema-module.js +367 -0
  231. package/dist/tools/schema-module.js.map +1 -0
  232. package/dist/tools/schema.d.ts +2 -37
  233. package/dist/tools/schema.d.ts.map +1 -1
  234. package/dist/tools/schema.js +6 -57
  235. package/dist/tools/schema.js.map +1 -1
  236. package/dist/tools/script.d.ts +33 -27
  237. package/dist/tools/script.d.ts.map +1 -1
  238. package/dist/tools/script.js +43 -37
  239. package/dist/tools/script.js.map +1 -1
  240. package/dist/tools/syslog.d.ts +19 -46
  241. package/dist/tools/syslog.d.ts.map +1 -1
  242. package/dist/tools/syslog.js +101 -67
  243. package/dist/tools/syslog.js.map +1 -1
  244. package/dist/tools/tool-module.d.ts +143 -0
  245. package/dist/tools/tool-module.d.ts.map +1 -0
  246. package/dist/tools/tool-module.js +1095 -0
  247. package/dist/tools/tool-module.js.map +1 -0
  248. package/dist/tools/update-module.d.ts +51 -0
  249. package/dist/tools/update-module.d.ts.map +1 -0
  250. package/dist/tools/update-module.js +107 -0
  251. package/dist/tools/update-module.js.map +1 -0
  252. package/dist/tools/update.d.ts +2 -45
  253. package/dist/tools/update.d.ts.map +1 -1
  254. package/dist/tools/update.js +9 -41
  255. package/dist/tools/update.js.map +1 -1
  256. package/dist/utils.d.ts +68 -1
  257. package/dist/utils.d.ts.map +1 -1
  258. package/dist/utils.js +114 -16
  259. package/dist/utils.js.map +1 -1
  260. package/dist/version.d.ts +10 -0
  261. package/dist/version.d.ts.map +1 -0
  262. package/dist/version.js +13 -0
  263. package/dist/version.js.map +1 -0
  264. package/docs/ADDING-TOOLS.md +227 -0
  265. package/docs/CLIENT-SETUP.md +914 -0
  266. package/docs/CONTAINER-DEPLOYMENT.md +310 -0
  267. package/docs/CROSS-CLIENT-RELEASE-MATRIX.md +63 -0
  268. package/docs/ENTERPRISE-RELEASE-BOUNDARY.md +149 -0
  269. package/docs/OPERATIONS-RUNBOOK.md +383 -0
  270. package/docs/PRIVATE-CHATGPT-CONNECTIVITY.md +347 -0
  271. package/docs/PRODUCTION-SECURITY.md +368 -0
  272. package/docs/PROFILE-CREDENTIALS.md +126 -0
  273. package/docs/RELEASE-VALIDATION.md +140 -0
  274. package/docs/TESTING-OAUTH.md +101 -0
  275. package/docs/V2-MIGRATION.md +493 -0
  276. package/package.json +60 -13
  277. package/scripts/inspector.mjs +140 -0
  278. package/scripts/release-validate.mjs +201 -0
  279. package/scripts/smoke-test.mjs +274 -0
  280. package/tools/inspector/package-lock.json +3812 -0
  281. package/tools/inspector/package.json +12 -0
package/.env.example ADDED
@@ -0,0 +1,56 @@
1
+ # ServiceNow MCP V2 configuration inventory.
2
+ #
3
+ # This committed file contains non-secret placeholders only. Do not put a
4
+ # bearer token, password, OAuth client secret, API key, encryption key, or
5
+ # provider credential here or in another repository dotenv file. Leave every
6
+ # secret assignment below empty and inject its value at process start through
7
+ # an approved supervisor, orchestrator, OS keychain, or secret manager.
8
+
9
+ # The transport is stdio. An MCP client spawns `servicenow-mcp` and speaks
10
+ # JSON-RPC over that process's stdin/stdout, so there is no host, no port, and
11
+ # no endpoint to configure here.
12
+ #
13
+ # The server also reads ~/.servicenow-mcp/server.env at startup, because the
14
+ # client that spawns it supplies its own environment. Values already present in
15
+ # the environment always win over that file.
16
+
17
+ # Owner identity: non-secret labels that appear in audit records. They are not
18
+ # credentials and are never checked; `servicenow-mcp-setup` generates a
19
+ # per-install pair so records from two installs stay distinguishable.
20
+ MCP_OWNER_ID=example-owner
21
+ MCP_CLIENT_ID=example-client
22
+
23
+ # The boundary is the client list and the grants below, not a network one.
24
+ # Every MCP client registered to spawn this server can read and write whatever
25
+ # the profiles allow, as the configured ServiceNow account. Nothing listens on
26
+ # a port, so nothing off this machine can reach it.
27
+
28
+ # Deny-by-default example policy. This permits only bounded incident reads.
29
+ # For local exploratory read-only testing, SN_ALLOWED_READ_TABLES=* plus the
30
+ # SN_FIELD_POLICY_DEFINITIONS wildcard below allows all non-hard-denied readable
31
+ # tables/fields. Keep writes exact unless you intentionally want broad mutation
32
+ # access.
33
+ SN_ALLOWED_READ_TABLES=incident
34
+ SN_ALLOWED_WRITE_TABLES=
35
+ SN_TABLE_ACCESS_TARGETS=[{"table":"incident","kind":"canonical","tools":["sn_query","sn_get"],"closureComplete":true,"relatedTables":["incident"]}]
36
+ # SN_FIELD_POLICY_DEFINITIONS={"*":{"defaults":["sys_id"],"readable":"*","writable":[]}}
37
+ # SN_ENCODED_QUERY_READ_POLICY is intentionally unset, so raw reads are denied.
38
+
39
+ # One explicit environment-only compatibility profile. Every tool invocation
40
+ # must pass profile="example-dev". For two or more profiles, use the protected
41
+ # out-of-band config/CLI workflow in docs/CLIENT-SETUP.md instead of duplicating
42
+ # plaintext SN_* values in dotenv files.
43
+ SN_PROFILE_NAME=example-dev
44
+ SN_INSTANCE=https://example.invalid
45
+ SN_AUTH_TYPE=oauth
46
+ SN_GRANT_TYPE=client_credentials
47
+ SN_CLIENT_ID=example-non-secret-oauth-client-id
48
+ SN_USER=
49
+ SN_PASSWORD=
50
+ SN_CLIENT_SECRET=
51
+ SN_API_KEY=
52
+ SN_PROFILE_ENCRYPTION_KEY=
53
+ SN_ALLOWED_INSTANCE_HOSTS=example.invalid
54
+ SN_TIMEOUT_MS=30000
55
+ SN_DISPLAY_VALUE=true
56
+ SN_REL_DEPTH=3
package/CHANGELOG.md ADDED
@@ -0,0 +1,153 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here.
4
+
5
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.0.0] — unreleased
9
+
10
+ 2.0 is a local, single-owner stdio server. Your client spawns it and speaks
11
+ over that process's stdin and stdout; nothing listens on a port.
12
+
13
+ **The transport is unchanged from 1.0.0.** A client entry that launches the
14
+ package still launches it. If you configured against a 2.0 pre-release that
15
+ served Streamable HTTP, see [Migrating to 2.0](docs/V2-MIGRATION.md#1-transport-unchanged).
16
+
17
+ Upgrading from 1.0.0 requires two changes on every install: name a profile on
18
+ every tool call, and grant table access. Everything else applies only if you
19
+ used the affected surface.
20
+
21
+ ### Breaking
22
+
23
+ - **Every tool call must name a `profile`.** There is no default, active, or
24
+ session-selected profile and no switch operation. Missing, empty, unknown or
25
+ invalid names fail before credential resolution or client construction.
26
+ Bare `SN_*` environment configuration now requires `SN_PROFILE_NAME` rather
27
+ than inferring a single implicit connection.
28
+ - **Table access is deny-by-default per profile.** A profile with no rules
29
+ denies every call. Grant with `servicenow-mcp-setup grant`. In 1.0.0 a tool
30
+ could reach any table the credential could.
31
+ - **`sn_attach` no longer accepts host filesystem paths.** `file_path` and
32
+ `output_path` are removed with no flag to restore them; uploads take
33
+ `content_base64` and downloads return inline base64. The server touches no
34
+ host filesystem, so behavior is identical whether run locally or in a
35
+ sandbox.
36
+ - **`sn_script` is withdrawn.** It was never functional — it returned "not yet
37
+ supported" while being advertised as destructive. It remains in the tree as
38
+ future work (SNS-39) and is not registered. `tools/list` returns 19 tools.
39
+ - **Incident journal fields moved to dedicated tools.** `sn_update`,
40
+ `sn_create` and `sn_batch` reject generic `comments` and `work_notes` writes
41
+ and point at `sn_incident_add_comment` / `sn_incident_add_work_note`, which
42
+ are append-only.
43
+ - **Raw encoded queries are opt-in per tool and table.** Structured filters are
44
+ the default path.
45
+ - **`MAX_FIELDS_PER_OPERATION` raised from `32` to `10_000`**, and
46
+ `excessive_field_selection` is removed from the exported
47
+ `FieldPolicyFailureReason` union.
48
+ - **One `bin` becomes three**: `servicenow-mcp`, `servicenow-mcp-profile`,
49
+ `servicenow-mcp-setup`.
50
+
51
+ ### Added
52
+
53
+ - **Multi-instance profiles.** Named connections with credentials encrypted at
54
+ rest (AES-256-GCM) in an owner-only `~/.servicenow-mcp`, or referenced from
55
+ the environment.
56
+ - **OAuth 2.0 (`client_credentials` and `password`) and API-key
57
+ authentication**, alongside basic.
58
+ - **`servicenow-mcp-setup`.** Run bare on a terminal it walks through one
59
+ connection end to end: instance, credential, live verification against that
60
+ instance, table grants, profile write, and client registration. Nothing is
61
+ written to the profile until ServiceNow accepts the credential, and the
62
+ profile and its grants are written together so there is no window where a
63
+ profile exists that denies everything.
64
+ - **`servicenow-mcp-setup doctor`.** Diagnoses an install and prints a specific
65
+ remedy per failure — Node version, `servicenow-mcp` resolving on `PATH`, file
66
+ modes, profile completeness, credential resolution, table access.
67
+ - **`servicenow-mcp-setup grant`.** Writes least-privilege table rules onto a
68
+ profile, validated by the same loader the server uses at request time, so a
69
+ bad grant fails at the CLI rather than at the first tool call.
70
+ - **`sn_profile` tool** and the `servicenow-mcp.add-profile` prompt, adding the
71
+ `prompts` capability.
72
+ - **Metadata caching** for dictionary and schema reads, keyed by instance *and*
73
+ credential identity. Off by default for tables you do not name. Requires a
74
+ resolvable session timezone, so it is disabled for OAuth `client_credentials`
75
+ and API-key profiles, which carry no username.
76
+ - **Token-efficient responses** — compact JSON, bounded default field
77
+ selection, pagination metadata, `response_format`, and a
78
+ `max_response_bytes` truncation guard.
79
+ - **MCP tool annotations and display titles** on every tool.
80
+ - **Per-request failures surface as warnings** rather than being swallowed.
81
+
82
+ ### Changed
83
+
84
+ - **`fields=all` and `response_format: "detailed"` are capped at 100 columns**
85
+ rather than dropping `sysparm_fields`, which could exceed the response budget
86
+ and fail the call outright. Columns resolve from `sys_dictionary` including
87
+ inherited fields; sensitive names are excluded from the request rather than
88
+ scrubbed from the response. `sn_query` and `sn_get` both report truncation.
89
+ - **Journal content is readable on request.** `comments` and `work_notes` are
90
+ returned by `fields=all`, `response_format: "detailed"`, an explicit
91
+ `fields=comments`, and `sn_schema`. The default projection still excludes
92
+ them. Journal content routinely contains customer PII, so asking for all
93
+ fields on `incident` now returns customer-visible commentary.
94
+ - **`sn_attach` has no transport size ceiling.** The former ~760 KiB practical
95
+ limit came from the HTTP body cap; the tool's own 10 MiB bound is the only
96
+ one in force.
97
+ - **HTTP authentication is opt-in and off by default**, for the dormant
98
+ transport only. An empty `MCP_BEARER_TOKEN` is a startup failure rather than
99
+ a way to disable it, so a half-applied env file stops the service instead of
100
+ silently opening the port. A non-loopback `MCP_HOST` with no token refuses to
101
+ start.
102
+
103
+ ### Security
104
+
105
+ - **Field policy cannot be widened by configuration into a fail-open.** A
106
+ profile-scoped policy previously discarded the built-in table policies
107
+ wholesale, permitting writes to `sys_script` — arbitrary server-side
108
+ JavaScript executed as the integration account. Configuration now layers onto
109
+ the built-ins and an unspecified `writable` denies rather than permits.
110
+ - **`tableAccess` is the sole table-level authority.** The hard-deny list is
111
+ removed; a profile's grants plus ServiceNow's per-user ACLs decide access.
112
+ Deliberate, and documented in [PRODUCTION-SECURITY.md](docs/PRODUCTION-SECURITY.md).
113
+ - **Sensitive field names are refused for read, write, schema enumeration and
114
+ query filtering.** Filtering was previously reachable under a wildcard
115
+ readable set, which leaks a value one comparison at a time through row counts.
116
+ - **Metadata cache is keyed by credential identity**, so two profiles against
117
+ one instance no longer share cached rows and bypass per-user ACLs.
118
+ - **Setup never echoes a typed secret**, and never places one in argv, shell
119
+ history or a client configuration file.
120
+ - **`--force` no longer regenerates `SN_PROFILE_ENCRYPTION_KEY`**, which
121
+ silently made every stored credential undecryptable. Rotation is a separate,
122
+ explicit flag, refused while a profile file exists.
123
+ - **File modes are repaired on every write**, not only at creation, so a
124
+ pre-existing world-readable env file cannot receive fresh secrets.
125
+ - **`http://` endpoints are restricted to loopback** unless explicitly allowed.
126
+
127
+ ### Fixed
128
+
129
+ - `sn_aggregate` dropped ungrouped `COUNT` results from the Stats API.
130
+ - `sn_syslog` level names did not map to numeric values, and query values were
131
+ not escaped.
132
+ - The metadata cache freshness probe compared `sys_updated_on` in UTC while
133
+ ServiceNow evaluates it in the session user's timezone, so on a non-UTC
134
+ account an updated record could appear unchanged for a full TTL. The zone
135
+ name is now resolved and cached, and the offset computed per instant so DST
136
+ transitions are correct.
137
+ - Inline base64 was decoded before its size was checked, and invalid base64
138
+ raised an internal error rather than a correctable one. Line-wrapped base64
139
+ — what `base64 file.pdf` produces — was rejected.
140
+ - `file_name` accepted Unicode bidirectional overrides, so
141
+ `invoice‮gnp.exe` rendered as `invoiceexe.gnp`.
142
+ - Field-policy denials were reported and audited as table denials, on tables
143
+ the operator had just granted, with the fix in a configuration key the
144
+ message never named.
145
+ - The compiled `bin` entrypoints were not executable, so a globally linked
146
+ install failed with "permission denied" after any rebuild.
147
+ - HTTP rate-limit rejections returned an empty body, which benchmarks could not
148
+ distinguish from a fast success.
149
+
150
+ ## [1.0.0] — 2026-07
151
+
152
+ Initial public release. 17 tools over stdio, single instance configured from
153
+ `SN_*` environment variables.