@onlyflows/servicenow-mcp 2.2.0 → 2.3.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 (64) hide show
  1. package/CHANGELOG.md +288 -1
  2. package/README.md +141 -7
  3. package/dist/call-metrics.d.ts +42 -0
  4. package/dist/call-metrics.d.ts.map +1 -0
  5. package/dist/call-metrics.js +89 -0
  6. package/dist/call-metrics.js.map +1 -0
  7. package/dist/client.d.ts +14 -2
  8. package/dist/client.d.ts.map +1 -1
  9. package/dist/client.js +40 -10
  10. package/dist/client.js.map +1 -1
  11. package/dist/encoded-query-policy.d.ts +9 -0
  12. package/dist/encoded-query-policy.d.ts.map +1 -1
  13. package/dist/encoded-query-policy.js +19 -1
  14. package/dist/encoded-query-policy.js.map +1 -1
  15. package/dist/http-runtime.js +16 -0
  16. package/dist/http-runtime.js.map +1 -1
  17. package/dist/metadata-cache.d.ts +97 -7
  18. package/dist/metadata-cache.d.ts.map +1 -1
  19. package/dist/metadata-cache.js +283 -21
  20. package/dist/metadata-cache.js.map +1 -1
  21. package/dist/setup-prompts.js +1 -1
  22. package/dist/setup-prompts.js.map +1 -1
  23. package/dist/setup.d.ts.map +1 -1
  24. package/dist/setup.js +10 -1
  25. package/dist/setup.js.map +1 -1
  26. package/dist/structured-query.d.ts +61 -2
  27. package/dist/structured-query.d.ts.map +1 -1
  28. package/dist/structured-query.js +376 -35
  29. package/dist/structured-query.js.map +1 -1
  30. package/dist/tools/codesearch.d.ts.map +1 -1
  31. package/dist/tools/codesearch.js +24 -4
  32. package/dist/tools/codesearch.js.map +1 -1
  33. package/dist/tools/flow-view-module.js +1 -1
  34. package/dist/tools/flow-view-module.js.map +1 -1
  35. package/dist/tools/get-module.js +1 -1
  36. package/dist/tools/get-module.js.map +1 -1
  37. package/dist/tools/index.d.ts.map +1 -1
  38. package/dist/tools/index.js +24 -11
  39. package/dist/tools/index.js.map +1 -1
  40. package/dist/tools/query-module.d.ts.map +1 -1
  41. package/dist/tools/query-module.js +205 -59
  42. package/dist/tools/query-module.js.map +1 -1
  43. package/dist/tools/result-envelope.d.ts +311 -0
  44. package/dist/tools/result-envelope.d.ts.map +1 -1
  45. package/dist/tools/result-envelope.js +314 -31
  46. package/dist/tools/result-envelope.js.map +1 -1
  47. package/dist/tools/schema-module.d.ts.map +1 -1
  48. package/dist/tools/schema-module.js +1 -1
  49. package/dist/tools/schema-module.js.map +1 -1
  50. package/dist/tools/truncation-hint.d.ts +125 -0
  51. package/dist/tools/truncation-hint.d.ts.map +1 -0
  52. package/dist/tools/truncation-hint.js +298 -0
  53. package/dist/tools/truncation-hint.js.map +1 -0
  54. package/dist/version.d.ts +1 -1
  55. package/dist/version.d.ts.map +1 -1
  56. package/dist/version.js +1 -1
  57. package/dist/version.js.map +1 -1
  58. package/docs/CLIENT-SETUP.md +11 -1
  59. package/docs/PRODUCTION-SECURITY.md +17 -1
  60. package/docs/RELEASE-VALIDATION.md +9 -3
  61. package/package.json +3 -3
  62. package/scripts/release-validate.mjs +6 -6
  63. package/server.json +2 -2
  64. package/tools/inspector/package-lock.json +6 -6
@@ -0,0 +1,298 @@
1
+ "use strict";
2
+ /**
3
+ * The recovery hint on a byte-truncated record list.
4
+ *
5
+ * Two stages can drop rows from one response: the tool's own budget check and,
6
+ * after the shared envelope adds its metadata, the envelope's fit. The first
7
+ * writes the hint; the second changes how many rows were dropped and knows
8
+ * what the envelope itself costs. The text is therefore built and parsed here,
9
+ * in one place, so the envelope can rewrite the counts, the continuation (the
10
+ * offset of the first row not returned, which is `next_offset`) and the byte
11
+ * budget that would hold the next row from its final state, and the hint and
12
+ * the fields beside it never disagree. Rendering and parsing are covered by
13
+ * one round-trip test.
14
+ *
15
+ * The hint is a list of fixed clauses joined by "; ", each matched on its own
16
+ * by an anchored pattern, so only text this module wrote is ever rewritten:
17
+ *
18
+ * Dropped 14/22; continue offset=8 limit=8; retry offset=0 with
19
+ * fields="sys_id,name" or max_response_bytes=1500 (fits the next row) or
20
+ * max_response_bytes=31500 (fits all 22).
21
+ *
22
+ * The two budgets are different numbers and the text says which is which:
23
+ * the first holds one more row than this response did (each retry with it
24
+ * buys a row), the second the whole window. The second is left out when it is
25
+ * the first (one row dropped) or when it is more than the maximum.
26
+ *
27
+ * @module truncation-hint
28
+ */
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.neededResponseBytes = neededResponseBytes;
31
+ exports.renderTruncationHint = renderTruncationHint;
32
+ exports.parseTruncationHint = parseTruncationHint;
33
+ exports.refreshTruncationHint = refreshTruncationHint;
34
+ exports.restateContinuationHint = restateContinuationHint;
35
+ const utils_js_1 = require("../utils.js");
36
+ const HINT_MAX_LENGTH = 600;
37
+ /**
38
+ * Bytes added to the measured size of the next row's response before it is
39
+ * offered as `max_response_bytes`, so that a budget with a longer digit count
40
+ * or a slightly longer hint still holds it.
41
+ */
42
+ const NEEDED_BYTES_SLACK = 64;
43
+ const NEEDED_BYTES_STEP = 100;
44
+ /**
45
+ * `max_response_bytes` that would hold the next row: the measured size of the
46
+ * response with that row (`measured`) plus a small margin, rounded up to a
47
+ * whole {@link NEEDED_BYTES_STEP} (but never past `cap`), and always above the
48
+ * budget just used (`current`). Infinity when that is more than `cap`: no
49
+ * value the caller may use would hold the row. `cap` is the largest budget the
50
+ * schema accepts, or less when a raw-read rule holds the call to a smaller one.
51
+ */
52
+ function neededResponseBytes(measured, current, cap = utils_js_1.MAX_RESPONSE_BYTES_MAX) {
53
+ const padded = Math.max(measured + NEEDED_BYTES_SLACK, current + 1, utils_js_1.MAX_RESPONSE_BYTES_MIN);
54
+ if (padded > cap)
55
+ return Number.POSITIVE_INFINITY;
56
+ return Math.min(Math.ceil(padded / NEEDED_BYTES_STEP) * NEEDED_BYTES_STEP, cap);
57
+ }
58
+ /** What a hint names for the rows that fit: the continuation and the `limit` to use. */
59
+ function returnedRows(parts) {
60
+ return parts.total - parts.dropped;
61
+ }
62
+ const EMPTY_CLAUSE = "row too large";
63
+ const NEXT_ROW_NOTE = " (fits the next row)";
64
+ function allRowsNote(total) {
65
+ return ` (fits all ${total})`;
66
+ }
67
+ const SN_GET_OPTION = "sn_get";
68
+ function overMaximumClause(cap) {
69
+ return `the next row exceeds the maximum max_response_bytes (${cap})`;
70
+ }
71
+ function renderHint(parts, withAdvice) {
72
+ const returned = returnedRows(parts);
73
+ const empty = returned <= 0;
74
+ const over = !Number.isFinite(parts.neededBytes) || parts.widest === true;
75
+ // With one row dropped the next row is the whole remainder: one figure.
76
+ const nextRow = parts.widest === true
77
+ ? `max_response_bytes=${utils_js_1.MAX_RESPONSE_BYTES_MAX}${NEXT_ROW_NOTE}`
78
+ : Number.isFinite(parts.neededBytes)
79
+ ? `max_response_bytes=${parts.neededBytes}${NEXT_ROW_NOTE}`
80
+ : undefined;
81
+ const allBytes = parts.dropped > 1 ? parts.allBytes : undefined;
82
+ const options = [
83
+ withAdvice ? parts.advice : undefined,
84
+ nextRow,
85
+ allBytes === undefined
86
+ ? undefined
87
+ // Infinity is the widest form, used while fitting (see finalizeSummaryResult).
88
+ : `max_response_bytes=${Number.isFinite(allBytes) ? allBytes : utils_js_1.MAX_RESPONSE_BYTES_MAX}${allRowsNote(parts.total)}`,
89
+ // When no row fits, a narrower page cannot help; the single-record read can.
90
+ empty ? SN_GET_OPTION : undefined,
91
+ ].filter((option) => option !== undefined);
92
+ const clauses = [`Dropped ${parts.dropped}/${parts.total}`];
93
+ if (empty)
94
+ clauses.push(EMPTY_CLAUSE);
95
+ else
96
+ clauses.push(`continue offset=${parts.offset + returned} limit=${returned}`);
97
+ if (over)
98
+ clauses.push(overMaximumClause(parts.capBytes ?? utils_js_1.MAX_RESPONSE_BYTES_MAX));
99
+ if (options.length > 0) {
100
+ clauses.push(`retry offset=${parts.offset} with ${options.join(" or ")}`);
101
+ }
102
+ return `${clauses.join("; ")}.`;
103
+ }
104
+ /**
105
+ * Render the hint. When no row is left, the row itself exceeds the budget, so
106
+ * a lower limit cannot help and the single-record read is offered instead.
107
+ * Field advice that would push the hint past its length limit, in its widest
108
+ * form, is left out, so the hint always parses back and a longer real text
109
+ * never replaces a shorter one that was used to size the rows.
110
+ */
111
+ function renderTruncationHint(parts) {
112
+ // Whether the advice fits is decided once, from the widest rendering of
113
+ // these parts (the "exceeds the maximum" clause with a 7-digit next-row
114
+ // figure, and a 7-digit page figure: no real figures make a longer text). A
115
+ // fit sizes rows with that widest text and then swaps in the real one, so the
116
+ // two must make the same choice: if the widest dropped the advice and the
117
+ // real text kept it, the real text could be hundreds of characters longer
118
+ // than the one the rows were sized for. The page figure is always in this
119
+ // text, whether or not the real text has one (it has none when the page is
120
+ // over the cap, and a form without it is sized with the same decision), so
121
+ // the choice depends only on what the probe and the real text share.
122
+ const widest = renderHint({
123
+ ...parts,
124
+ widest: true,
125
+ neededBytes: Number.POSITIVE_INFINITY,
126
+ allBytes: Number.POSITIVE_INFINITY,
127
+ }, true);
128
+ return renderHint(parts, widest.length <= HINT_MAX_LENGTH);
129
+ }
130
+ const DROPPED_CLAUSE = /^Dropped (\d+)\/(\d+)$/u;
131
+ const CONTINUE_CLAUSE = /^continue offset=(\d+) limit=(\d+)$/u;
132
+ const RETRY_CLAUSE = /^retry offset=(\d+) with (.+)$/u;
133
+ const ADVICE_OPTION = /^(?:fields="[a-z][a-z0-9_]*(?:,[a-z][a-z0-9_]*)*"|response_format="concise")$/u;
134
+ const NEXT_ROW_OPTION = /^max_response_bytes=([1-9]\d{3,6}) \(fits the next row\)$/u;
135
+ const ALL_ROWS_OPTION = /^max_response_bytes=([1-9]\d{3,6}) \(fits all ([1-9]\d{0,15})\)$/u;
136
+ const OVER_MAXIMUM = /^the next row exceeds the maximum max_response_bytes \(([1-9]\d{3,6})\)$/u;
137
+ /** A byte value the schema could accept: 1000 to 1,000,000. */
138
+ function budgetValue(digits) {
139
+ const value = Number(digits);
140
+ return Number.isSafeInteger(value) && value >= utils_js_1.MAX_RESPONSE_BYTES_MIN && value <= utils_js_1.MAX_RESPONSE_BYTES_MAX
141
+ ? value
142
+ : undefined;
143
+ }
144
+ /** Read back a hint {@link renderTruncationHint} wrote; anything else is undefined. */
145
+ function parseTruncationHint(hint) {
146
+ if (hint.length > HINT_MAX_LENGTH || !hint.endsWith("."))
147
+ return undefined;
148
+ const clauses = hint.slice(0, -1).split("; ");
149
+ let index = 0;
150
+ const dropped = DROPPED_CLAUSE.exec(clauses[index++] ?? "");
151
+ if (dropped === null)
152
+ return undefined;
153
+ const droppedCount = Number(dropped[1]);
154
+ const total = Number(dropped[2]);
155
+ if (!Number.isSafeInteger(droppedCount) || !Number.isSafeInteger(total) || droppedCount > total) {
156
+ return undefined;
157
+ }
158
+ const returned = total - droppedCount;
159
+ const empty = returned === 0;
160
+ let offset;
161
+ if (empty) {
162
+ if (clauses[index++] !== EMPTY_CLAUSE)
163
+ return undefined;
164
+ }
165
+ else {
166
+ const next = CONTINUE_CLAUSE.exec(clauses[index++] ?? "");
167
+ // The clause restates numbers the counts already fix; a hint that
168
+ // disagrees with itself was not written here.
169
+ if (next === null || Number(next[2]) !== returned)
170
+ return undefined;
171
+ offset = Number(next[1]) - returned;
172
+ }
173
+ let neededBytes;
174
+ let allBytes;
175
+ let capBytes;
176
+ const over = OVER_MAXIMUM.exec(clauses[index] ?? "");
177
+ if (over !== null) {
178
+ capBytes = budgetValue(over[1]);
179
+ if (capBytes === undefined)
180
+ return undefined;
181
+ neededBytes = Number.POSITIVE_INFINITY;
182
+ index += 1;
183
+ }
184
+ let advice;
185
+ let sawSnGet = false;
186
+ const retry = clauses[index] === undefined ? null : RETRY_CLAUSE.exec(clauses[index] ?? "");
187
+ if (retry !== null) {
188
+ index += 1;
189
+ const retryOffset = Number(retry[1]);
190
+ if (offset !== undefined && offset !== retryOffset)
191
+ return undefined;
192
+ offset = retryOffset;
193
+ for (const option of (retry[2] ?? "").split(" or ")) {
194
+ const next = NEXT_ROW_OPTION.exec(option);
195
+ const all = next === null ? ALL_ROWS_OPTION.exec(option) : null;
196
+ if (next !== null) {
197
+ const value = budgetValue(next[1]);
198
+ if (neededBytes !== undefined || value === undefined)
199
+ return undefined;
200
+ neededBytes = value;
201
+ }
202
+ else if (all !== null) {
203
+ const value = budgetValue(all[1]);
204
+ // The count restates the window; the figure must follow the next-row
205
+ // one, be no smaller, and exist only when more than one row is left.
206
+ if (allBytes !== undefined ||
207
+ value === undefined ||
208
+ Number(all[2]) !== total ||
209
+ droppedCount < 2 ||
210
+ neededBytes === undefined ||
211
+ !Number.isFinite(neededBytes) ||
212
+ value < neededBytes) {
213
+ return undefined;
214
+ }
215
+ allBytes = value;
216
+ }
217
+ else if (ADVICE_OPTION.test(option) && advice === undefined) {
218
+ advice = option;
219
+ }
220
+ else if (option === SN_GET_OPTION && !sawSnGet) {
221
+ sawSnGet = true;
222
+ }
223
+ else {
224
+ return undefined;
225
+ }
226
+ }
227
+ }
228
+ if (index !== clauses.length ||
229
+ offset === undefined ||
230
+ neededBytes === undefined ||
231
+ sawSnGet !== empty ||
232
+ !Number.isSafeInteger(offset) ||
233
+ offset < 0) {
234
+ return undefined;
235
+ }
236
+ // One row dropped: the next row is the whole remainder, written once.
237
+ if (droppedCount === 1 && Number.isFinite(neededBytes))
238
+ allBytes = neededBytes;
239
+ return {
240
+ dropped: droppedCount,
241
+ total,
242
+ offset,
243
+ ...(advice === undefined ? {} : { advice }),
244
+ neededBytes,
245
+ ...(allBytes === undefined ? {} : { allBytes }),
246
+ ...(capBytes === undefined ? {} : { capBytes }),
247
+ };
248
+ }
249
+ /**
250
+ * Restate a hint for the response's final state: how many rows were dropped
251
+ * from the window, so where to continue and which `limit` fits, and, when the
252
+ * caller supplies it, the byte budget that would hold the next row. Only hints
253
+ * this module wrote are touched; any other text is returned as it came.
254
+ */
255
+ function refreshTruncationHint(hint, final) {
256
+ const parts = parseTruncationHint(hint);
257
+ if (parts === undefined)
258
+ return hint;
259
+ return renderTruncationHint({
260
+ dropped: final.dropped,
261
+ total: final.dropped + final.returned,
262
+ offset: parts.offset,
263
+ ...(parts.advice === undefined || final.withoutAdvice === true ? {} : { advice: parts.advice }),
264
+ neededBytes: final.neededBytes ?? parts.neededBytes,
265
+ ...(final.widest === true ? { widest: true } : {}),
266
+ ...(final.allBytes === null || (final.allBytes ?? parts.allBytes) === undefined
267
+ ? {}
268
+ : { allBytes: (final.allBytes ?? parts.allBytes) }),
269
+ ...(final.capBytes ?? parts.capBytes) === undefined
270
+ ? {}
271
+ : { capBytes: (final.capBytes ?? parts.capBytes) },
272
+ });
273
+ }
274
+ /**
275
+ * The continuation hint a paging tool writes when nothing was dropped:
276
+ * "More records available. Call sn_query again with offset=22." (an
277
+ * all-fields notice may follow). A tool writes it from the page it fetched, so
278
+ * when the shared envelope later drops rows for size, its offset is stale.
279
+ */
280
+ const CONTINUATION_HINT = /^(More records available\. Call sn_[a-z_]+ again with offset=)\d+(\.)((?: .*)?)$/su;
281
+ /**
282
+ * Restate a continuation hint for the final paging state: the offset of the
283
+ * first row not returned, or, when no row fit and there is none, the plain
284
+ * instruction that the request must change. Text that is not a continuation
285
+ * hint comes back as it was.
286
+ */
287
+ function restateContinuationHint(hint, final) {
288
+ const match = CONTINUATION_HINT.exec(hint);
289
+ if (match === null)
290
+ return hint;
291
+ const notice = match[3] ?? "";
292
+ if (final.nextOffset === undefined) {
293
+ return ("More records available, but no row fit; adjust the request (fewer fields, " +
294
+ `a lower limit or a higher max_response_bytes) and retry offset=${final.offset}.${notice}`);
295
+ }
296
+ return `${match[1]}${final.nextOffset}.${notice}`;
297
+ }
298
+ //# sourceMappingURL=truncation-hint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"truncation-hint.js","sourceRoot":"","sources":["../../src/tools/truncation-hint.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;;AAsBH,kDAQC;AAuGD,oDAqBC;AAoBD,kDA8FC;AAQD,sDAmCC;AAiBD,0DAcC;AApVD,0CAA6E;AAE7E,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B;;;;GAIG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,CAAC;AACpD,CAAC"}
package/dist/version.d.ts CHANGED
@@ -6,5 +6,5 @@
6
6
  *
7
7
  * @module version
8
8
  */
9
- export declare const VERSION = "2.2.0";
9
+ export declare const VERSION = "2.3.0-dev.2";
10
10
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,OAAO,UAAU,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,OAAO,gBAAgB,CAAC"}
package/dist/version.js CHANGED
@@ -9,5 +9,5 @@
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.VERSION = void 0;
12
- exports.VERSION = "2.2.0";
12
+ exports.VERSION = "2.3.0-dev.2";
13
13
  //# sourceMappingURL=version.js.map
@@ -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"}
@@ -198,7 +198,7 @@ grant is validated with the same loader the server uses at request time, so a
198
198
  rejected policy fails at the CLI rather than at the first tool call.
199
199
 
200
200
  Without `--tools`, each table named with `--read` gets
201
- `sn_query,sn_get,sn_aggregate,sn_schema`, and each table named with `--write`
201
+ `sn_query,sn_get,sn_aggregate,sn_schema,sn_codesearch`, and each table named with `--write`
202
202
  gets `sn_create,sn_update`. A write grant on `incident` also binds
203
203
  `sn_incident_add_comment` and `sn_incident_add_work_note`. Comments are
204
204
  customer-visible, so a comment the agent appends can notify the incident's
@@ -215,6 +215,16 @@ with `--tools`; `--replace` discards every rule on the profile, so grant its
215
215
  other tables again afterwards. `sn_delete`, `sn_batch`, and `sn_atf` are never
216
216
  granted implicitly and must be named with `--tools`.
217
217
 
218
+ `sn_codesearch` is checked against each code table it searches
219
+ (`sys_script`, `sys_script_include`, `sys_ui_script`, `sys_script_client`,
220
+ `sys_ws_operation`), so a plain `--read sys_script_include` is enough to search
221
+ script includes; a search with no `table` needs all five. It does nothing on
222
+ other tables. A profile saved before this default keeps its stored tool list:
223
+ re-run `grant --profile <name> --read <code table>` or add
224
+ `--tools sn_codesearch` to give it the tool. The profile's field policy still
225
+ applies: a code table whose script field is not readable denies `sn_codesearch`
226
+ as it denies `sn_query` for that field.
227
+
218
228
  A grant decides which tools reach a table; the profile's field policy still
219
229
  decides which fields they may write. The journal tools follow it like
220
230
  `sn_update` does: if the incident's effective `writable` list, from
@@ -287,7 +287,7 @@ SN_ALLOWED_READ_TABLES=incident,problem,change_request
287
287
  SN_ALLOWED_WRITE_TABLES=incident,change_request
288
288
  SN_TABLE_ACCESS_TARGETS=<runtime-config:reviewed-target-catalog>
289
289
  SN_METADATA_CACHE_TTL_MS=86400000
290
- SN_METADATA_CACHE_TABLES=sys_glide_object,sys_dictionary,sys_db_object,sys_app,sys_plugins,sys_metadata*,sys_flow*
290
+ SN_METADATA_CACHE_TABLES=sys_glide_object,sys_dictionary,sys_db_object,sys_app,sys_plugins,sys_metadata*,sys_flow*,sys_script,sys_script_include,sys_ui_script,sys_script_client,sys_ws_operation
291
291
  ```
292
292
 
293
293
  Metadata caching works in every auth mode, including the client_credentials
@@ -326,6 +326,22 @@ ACLs on the cached rows are not evaluated on the hit. Do not add it, and review
326
326
  table you do add against the same two questions: are its rows ACL-restricted
327
327
  per user, and would a stale or cross-identity answer be a disclosure?
328
328
 
329
+ The five code tables in the default list (`sys_script`, `sys_script_include`,
330
+ `sys_ui_script`, `sys_script_client`, `sys_ws_operation`) hold script bodies,
331
+ and scripts can contain hard-coded credentials. A cached entry keeps the whole
332
+ response of a read, so it holds the full `script` or `operation_script` of
333
+ every row read, not the 200-character snippet `sn_codesearch` shows. Entries
334
+ live only in process memory, partitioned by instance and credential identity,
335
+ and are never written to disk or to logs. They are kept for up to the cache TTL
336
+ (24 hours by default), within 32 MiB per credential and 128 MiB overall. They
337
+ differ from `sys_properties` in that no cross-identity hit is possible, since
338
+ the partition is the credential, and the payloads are large enough to be worth
339
+ keeping. A script edit moves the table's watermark and refreshes the entry, but
340
+ a tightened ServiceNow ACL does not, so it follows the restart-or-rotate rule
341
+ above. To keep script bodies out of the cache, set `SN_METADATA_CACHE_TABLES`
342
+ (or `metadataCache.tables` on a file-backed profile) to the list without them:
343
+ `sys_glide_object,sys_dictionary,sys_db_object,sys_app,sys_plugins,sys_metadata*,sys_flow*`.
344
+
329
345
  For a named profile, keep the secret out of JSON and reference the same
330
346
  canonical runtime secret:
331
347
 
@@ -152,9 +152,15 @@ git push origin v2.2.0-dev.1
152
152
 
153
153
  The existing `publish.yml` workflow runs the release gates and publishes through
154
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.
155
+ `X.Y.Z-dev.N` versions to `dev`, and `X.Y.Z-rc.N` versions to `next`; other
156
+ prerelease channels and mismatched tags are rejected. Every published version
157
+ must be unique. GitHub prereleases can be created for these tags without
158
+ marking them as the latest stable release.
159
+
160
+ Test releases use `X.Y.Z-rc.N` (for example `2.3.0-rc.1`), are cut on the
161
+ `test` branch by convention (the workflow does not check the branch), and
162
+ publish to the `next` dist-tag with the same steps. Install the newest one with
163
+ `npm install -g @onlyflows/servicenow-mcp@next`.
158
164
 
159
165
  Install the newest development build or pin an exact build:
160
166
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@onlyflows/servicenow-mcp",
3
3
  "mcpName": "io.github.onlyflowstech/servicenow-mcp",
4
- "version": "2.2.0",
4
+ "version": "2.3.0-dev.2",
5
5
  "description": "Governed stdio ServiceNow MCP server for production: 24 tools with per-profile table and field policy, dry-run bulk changes, activity events, multi-instance profiles, CMDB traversal, ATF testing and read-only Flow Designer flow views.",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -69,13 +69,13 @@
69
69
  "node": ">=20"
70
70
  },
71
71
  "dependencies": {
72
- "@hono/node-server": "2.1.3",
72
+ "@hono/node-server": "2.1.7",
73
73
  "@modelcontextprotocol/sdk": "1.32.2",
74
74
  "parse5": "7.3.0",
75
75
  "zod": "4.6.7"
76
76
  },
77
77
  "overrides": {
78
- "@hono/node-server": "2.1.3"
78
+ "@hono/node-server": "2.1.7"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@eslint/js": "9.39.5",
@@ -222,18 +222,18 @@ export function validateServerJson(serverJson, packageJson) {
222
222
  );
223
223
  }
224
224
 
225
- /** Only reviewed stable and dev channels can be published. */
225
+ /** Only reviewed stable, dev, and rc channels can be published. */
226
226
  export function releaseChannel(version) {
227
- 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);
228
- assert(typeof version === "string" && match !== null && match[0] === version, "package version must be stable semver or a dev.N prerelease");
229
- return match[1] === undefined ? "latest" : "dev";
227
+ const match = /^(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-(dev|rc)\.(?:0|[1-9][0-9]*))?$/u.exec(version);
228
+ assert(typeof version === "string" && match !== null && match[0] === version, "package version must be stable semver, a dev.N prerelease, or an rc.N prerelease");
229
+ return match[1] === undefined ? "latest" : match[1] === "rc" ? "next" : "dev";
230
230
  }
231
231
 
232
232
  function releaseTagFromEnvironment(environment) {
233
233
  if (environment.GITHUB_REF_TYPE !== "tag") return undefined;
234
234
  const tag = environment.GITHUB_REF_NAME;
235
- 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)) {
236
- throw new Error("tag release is missing a valid stable or dev GITHUB_REF_NAME");
235
+ if (typeof tag !== "string" || !/^v(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-(?:dev|rc)\.(?:0|[1-9][0-9]*))?$/u.test(tag)) {
236
+ throw new Error("tag release is missing a valid stable, dev, or rc GITHUB_REF_NAME");
237
237
  }
238
238
  return tag;
239
239
  }
package/server.json CHANGED
@@ -7,12 +7,12 @@
7
7
  "url": "https://github.com/onlyflowstech/servicenow-mcp",
8
8
  "source": "github"
9
9
  },
10
- "version": "2.2.0",
10
+ "version": "2.3.0-dev.2",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "@onlyflows/servicenow-mcp",
15
- "version": "2.2.0",
15
+ "version": "2.3.0-dev.2",
16
16
  "runtimeHint": "npx",
17
17
  "transport": {
18
18
  "type": "stdio"
@@ -29,9 +29,9 @@
29
29
  }
30
30
  },
31
31
  "node_modules/@hono/node-server": {
32
- "version": "2.1.5",
33
- "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.5.tgz",
34
- "integrity": "sha512-MgP/I06GdvsilDspMk/qmRzpk8LOUStP6jFAbSRi40W09DhoyUn+Mj7eyKICPqeYKybOjVFLVIAQzvu1bfIa7Q==",
32
+ "version": "2.1.8",
33
+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.8.tgz",
34
+ "integrity": "sha512-jdf7FHh6A1lzjpHHQUgxsg2GeER2vMetnAOfeActzcoli6jamlK+NAwL6Dsr5Fl3BS3tYUQzCdtZjU8Qxv7bEA==",
35
35
  "license": "MIT",
36
36
  "engines": {
37
37
  "node": ">=20"
@@ -1935,9 +1935,9 @@
1935
1935
  }
1936
1936
  },
1937
1937
  "node_modules/hono": {
1938
- "version": "4.13.13",
1939
- "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.13.tgz",
1940
- "integrity": "sha512-CQ46U0ZkAGmbT/4UxdzzGJpacP2IeKgY4a5/tOI9AABbpOMfK739wfDXmv1usCk+3RkKj1hQy4/fjhiwa2xlrA==",
1938
+ "version": "4.13.18",
1939
+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.18.tgz",
1940
+ "integrity": "sha512-H9q/E1XizaWstJxUW881dmLxEj+t/TrGGnyxINkm4+sK0qUwsMtFdo2BWI9Vs3cIS19MU6b6iCijoUoEf4f3DA==",
1941
1941
  "license": "MIT",
1942
1942
  "engines": {
1943
1943
  "node": ">=16.9.0"