@onlyflows/servicenow-mcp 2.3.0-dev.2 → 2.3.0-rc.1

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 (61) hide show
  1. package/CHANGELOG.md +0 -253
  2. package/README.md +7 -141
  3. package/dist/client.d.ts +2 -14
  4. package/dist/client.d.ts.map +1 -1
  5. package/dist/client.js +10 -40
  6. package/dist/client.js.map +1 -1
  7. package/dist/encoded-query-policy.d.ts +0 -9
  8. package/dist/encoded-query-policy.d.ts.map +1 -1
  9. package/dist/encoded-query-policy.js +1 -19
  10. package/dist/encoded-query-policy.js.map +1 -1
  11. package/dist/http-runtime.js +0 -16
  12. package/dist/http-runtime.js.map +1 -1
  13. package/dist/metadata-cache.d.ts +7 -97
  14. package/dist/metadata-cache.d.ts.map +1 -1
  15. package/dist/metadata-cache.js +21 -283
  16. package/dist/metadata-cache.js.map +1 -1
  17. package/dist/setup-prompts.js +1 -1
  18. package/dist/setup-prompts.js.map +1 -1
  19. package/dist/setup.d.ts.map +1 -1
  20. package/dist/setup.js +1 -10
  21. package/dist/setup.js.map +1 -1
  22. package/dist/structured-query.d.ts +2 -61
  23. package/dist/structured-query.d.ts.map +1 -1
  24. package/dist/structured-query.js +35 -376
  25. package/dist/structured-query.js.map +1 -1
  26. package/dist/tools/codesearch.d.ts.map +1 -1
  27. package/dist/tools/codesearch.js +4 -24
  28. package/dist/tools/codesearch.js.map +1 -1
  29. package/dist/tools/flow-view-module.js +1 -1
  30. package/dist/tools/flow-view-module.js.map +1 -1
  31. package/dist/tools/get-module.js +1 -1
  32. package/dist/tools/get-module.js.map +1 -1
  33. package/dist/tools/index.d.ts.map +1 -1
  34. package/dist/tools/index.js +11 -24
  35. package/dist/tools/index.js.map +1 -1
  36. package/dist/tools/query-module.d.ts.map +1 -1
  37. package/dist/tools/query-module.js +59 -205
  38. package/dist/tools/query-module.js.map +1 -1
  39. package/dist/tools/result-envelope.d.ts +0 -311
  40. package/dist/tools/result-envelope.d.ts.map +1 -1
  41. package/dist/tools/result-envelope.js +31 -314
  42. package/dist/tools/result-envelope.js.map +1 -1
  43. package/dist/tools/schema-module.d.ts.map +1 -1
  44. package/dist/tools/schema-module.js +1 -1
  45. package/dist/tools/schema-module.js.map +1 -1
  46. package/dist/version.d.ts +1 -1
  47. package/dist/version.d.ts.map +1 -1
  48. package/dist/version.js +1 -1
  49. package/dist/version.js.map +1 -1
  50. package/docs/CLIENT-SETUP.md +1 -11
  51. package/docs/PRODUCTION-SECURITY.md +1 -17
  52. package/package.json +1 -1
  53. package/server.json +2 -2
  54. package/dist/call-metrics.d.ts +0 -42
  55. package/dist/call-metrics.d.ts.map +0 -1
  56. package/dist/call-metrics.js +0 -89
  57. package/dist/call-metrics.js.map +0 -1
  58. package/dist/tools/truncation-hint.d.ts +0 -125
  59. package/dist/tools/truncation-hint.d.ts.map +0 -1
  60. package/dist/tools/truncation-hint.js +0 -298
  61. package/dist/tools/truncation-hint.js.map +0 -1
@@ -26,16 +26,12 @@
26
26
  * watermark refreshes recency for eviction but never extends expiresAt, so the
27
27
  * entry still expires on schedule and forces a genuine refetch.
28
28
  *
29
- * Three memos keep the watermark from costing more than it saves. Within one
29
+ * Two memos keep the watermark from costing more than it saves. Within one
30
30
  * tool call each table's watermark is read once, however many reads of the
31
31
  * table the call makes. Across calls, a table whose watermark proved unusable
32
32
  * is read straight through, without a watermark, for a while: long for causes
33
33
  * that persist (an incomplete or future-dated watermark, a 4xx), short for
34
- * transient ones (429, 5xx, timeouts, network). And a read whose response is
35
- * small (see SMALL_READ_BYTES) is not kept at all: a hit costs a watermark
36
- * round trip, about what the plain read costs, so keeping it saves nothing.
37
- * The key is remembered as small for one TTL, and its later reads go straight
38
- * upstream in a single request.
34
+ * transient ones (429, 5xx, timeouts, network).
39
35
  *
40
36
  * @module metadata-cache
41
37
  */
@@ -47,54 +43,20 @@ export declare const DEFAULT_METADATA_CACHE_TTL_MS: number;
47
43
  * The bar for inclusion is a large payload relative to the watermark read,
48
44
  * not merely "this table changes rarely" -- a cache hit still costs one
49
45
  * upstream round trip (see tableWatermark), so the saving is payload bytes,
50
- * never request count. Why each pattern is here:
51
- *
52
- * - sys_dictionary, sys_db_object: the field and table definitions behind
53
- * sn_schema, the all-fields cap and sn_discover. A table's dictionary alone
54
- * is hundreds of rows, and a hierarchy walk reads them repeatedly.
55
- * - sys_app, sys_plugins, sys_glide_object, sys_metadata*, sys_flow*:
56
- * application, plugin, field-type and application-file listings, and the
57
- * Flow Designer tables. They are large and change rarely. The list is the
58
- * original metadata set; not every table in it has a reader in this
59
- * server today.
60
- * - sys_script, sys_script_include, sys_ui_script, sys_script_client,
61
- * sys_ws_operation: the five code tables sn_codesearch searches, which
62
- * sn_query also reads. Each row carries a full script body, so a repeated
63
- * search or page is among the heaviest reads this server makes. Editing a
64
- * script moves sys_updated_on, which the watermark sees, so a cached search
65
- * never outlives a save. They are not covered by sys_metadata*: patterns
66
- * match a table's name, not its place in the table hierarchy. Unlike
67
- * sys_properties, these can be cached: the scope is the credential, so no
68
- * cross-identity hit is possible, and the payloads are large enough to be
69
- * worth keeping. The bodies may hold hard-coded secrets, though, and an
70
- * entry keeps the whole response in memory; an operator who does not want
71
- * that sets SN_METADATA_CACHE_TABLES (or `metadataCache.tables`) without
72
- * them.
73
- *
74
- * sys_properties is deliberately absent: its rows are ACL-restricted per user
75
- * and routinely hold integration secrets in `value`, and the only reads of it
76
- * here are three single-value build-info lookups whose payloads are far too
77
- * small to be worth retaining for a day. Operators who want it can add it
78
- * through SN_METADATA_CACHE_TABLES.
79
- *
80
- * An explicit SN_METADATA_CACHE_TABLES or `metadataCache.tables` replaces this
81
- * list; it does not extend it, so a profile that sets its own list must name
82
- * the code tables itself to cache them.
46
+ * never request count. sys_properties is deliberately absent: its rows are
47
+ * ACL-restricted per user and routinely hold integration secrets in `value`,
48
+ * and the only reads of it here are three single-value build-info lookups
49
+ * whose payloads are far too small to be worth retaining for a day. Operators
50
+ * who want it can add it through SN_METADATA_CACHE_TABLES.
83
51
  */
84
52
  export declare const DEFAULT_METADATA_CACHE_TABLES: readonly string[];
85
53
  export interface MetadataCacheConfigInput {
86
54
  readonly ttlMs?: number;
87
55
  readonly tables?: readonly string[];
88
- /**
89
- * A response smaller than this many bytes is not cached; its key reads
90
- * straight through. Defaults to SMALL_READ_BYTES; 0 caches every response.
91
- */
92
- readonly smallReadBytes?: number;
93
56
  }
94
57
  export interface MetadataCacheConfig {
95
58
  readonly ttlMs: number;
96
59
  readonly tables: readonly string[];
97
- readonly smallReadBytes: number;
98
60
  }
99
61
  export declare const FORCE_RECACHE_PARAM = "sysparm_force_recache";
100
62
  /** Bounds on process-global cache state. Scopes multiply with credential
@@ -102,57 +64,10 @@ export declare const FORCE_RECACHE_PARAM = "sysparm_force_recache";
102
64
  * so both are capped and evicted in least-recently-used order. */
103
65
  export declare const MAX_METADATA_CACHE_SCOPES = 64;
104
66
  export declare const MAX_METADATA_CACHE_ENTRIES_PER_SCOPE = 512;
105
- /**
106
- * Byte bounds. The entry count is not a memory bound: a code-table entry holds
107
- * a whole response of script bodies, up to the client's 1 MiB ceiling, so 512
108
- * of them would retain about half a GiB in one scope. A response larger than
109
- * the entry cap is returned but never kept (and any older entry under its key
110
- * is dropped); a scope over its budget evicts its least recently used entries;
111
- * the whole cache over its budget evicts from the least recently used scope
112
- * first. Sizes are estimates (serialized body plus key and header overhead),
113
- * not heap measurements.
114
- */
115
- export declare const MAX_METADATA_CACHE_ENTRY_BYTES: number;
116
- export declare const MAX_METADATA_CACHE_SCOPE_BYTES: number;
117
- export declare const MAX_METADATA_CACHE_TOTAL_BYTES: number;
118
67
  /** How long a table goes uncached after its watermark proved unusable; never
119
68
  * longer than the cache TTL. */
120
69
  export declare const STRUCTURAL_UNCACHEABLE_MS: number;
121
70
  export declare const TRANSIENT_UNCACHEABLE_MS: number;
122
- /**
123
- * A response smaller than this (serialized body bytes) is not worth caching.
124
- *
125
- * A hit still costs one watermark round trip, so the cache saves time only
126
- * when the plain read of the rows costs more than that round trip, and the
127
- * plain read grows with the payload while the watermark does not. Live
128
- * measurement (a 2026-11 sweep on a dev instance, read-only, n = 1 per point,
129
- * so indicative): the watermark of sys_script_include cost about 90 ms; its
130
- * plain reads cost about 75 ms at 2 KB and 110 ms at 96 KB (hit: 96 ms). On
131
- * sys_dictionary, whose watermark costs about 490 ms because the table is
132
- * huge, plain reads cost 75, 86, 180 and 218 ms at 6, 17, 33 and 66 KB, so a
133
- * hit lost at every size tried. The crossover is therefore somewhere between
134
- * about 20 KB and 50 KB, depending on the table, and below it the cache only
135
- * adds a request on a miss and holds memory for nothing.
136
- *
137
- * 32 KiB sits in that band. Putting it a little high or low costs a few
138
- * milliseconds per read either way, because near the crossover a hit and a
139
- * plain read cost about the same; what matters is that the many small reads
140
- * (a few KB) go back to one request. The threshold is a size, not a time, so
141
- * it cannot follow a table whose watermark is unusually expensive; a
142
- * per-table rule would need the measured watermark and upstream times.
143
- */
144
- export declare const SMALL_READ_BYTES: number;
145
- /** Most keys one scope remembers as small; the least recently used go first. */
146
- export declare const MAX_SMALL_READ_KEYS_PER_SCOPE = 512;
147
- /**
148
- * Longest cache key the small-read memo holds as it is; a longer one is held
149
- * by its sha256 hex digest, so the memo stays at 512 short strings per scope
150
- * however long a caller's query is, and a long selector is remembered like any
151
- * other. Two keys that collide would only make one of them read through once
152
- * more than needed (or, for a small mark on a large key, be re-measured), so a
153
- * collision costs a request, never a wrong answer.
154
- */
155
- export declare const SMALL_READ_KEY_RAW_LENGTH = 128;
156
71
  interface MetadataCacheEnvironment {
157
72
  readonly SN_METADATA_CACHE_TTL_MS?: string;
158
73
  readonly SN_METADATA_CACHE_TABLES?: string;
@@ -177,10 +92,5 @@ export declare function uncachedOperations(operations: ServiceNowOperations): Se
177
92
  * *and* the credential identity reading from it -- see the module docstring.
178
93
  */
179
94
  export declare function createCachedServiceNowOperations(operations: ServiceNowOperations, scope: string, config: MetadataCacheConfigInput | undefined): ServiceNowOperations;
180
- /**
181
- * Estimated bytes retained for one scope, or for the whole cache when no scope
182
- * is given. For tests and diagnostics; the cache never reads it.
183
- */
184
- export declare function metadataCacheBytes(scope?: string): number;
185
95
  export {};
186
96
  //# sourceMappingURL=metadata-cache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"metadata-cache.d.ts","sourceRoot":"","sources":["../src/metadata-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAKL,KAAK,oBAAoB,EAC1B,MAAM,aAAa,CAAC;AAMrB,eAAO,MAAM,6BAA6B,QAAsB,CAAC;AACjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,6BAA6B,mBAaxC,CAAC;AAEH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AA2DD,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAG3D;;kEAEkE;AAClE,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAC5C,eAAO,MAAM,oCAAoC,MAAM,CAAC;AACxD;;;;;;;;;GASG;AACH,eAAO,MAAM,8BAA8B,QAAa,CAAC;AACzD,eAAO,MAAM,8BAA8B,QAAmB,CAAC;AAC/D,eAAO,MAAM,8BAA8B,QAAoB,CAAC;AAGhE;gCACgC;AAChC,eAAO,MAAM,yBAAyB,QAAiB,CAAC;AACxD,eAAO,MAAM,wBAAwB,Q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AM,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AA4CD,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAG3D;;kEAEkE;AAClE,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAC5C,eAAO,MAAM,oCAAoC,MAAM,CAAC;AACxD;gCACgC;AAChC,eAAO,MAAM,yBAAyB,QAAiB,CAAC;AACxD,eAAO,MAAM,wBAAwB,QAAY,CAAC;AAElD,UAAU,wBAAwB;IAChC,QAAQ,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAC3C,QAAQ,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAC;CAC5C;AAED,wBAAgB,kCAAkC,CAChD,WAAW,GAAE,wBAAkE,GAC9E,wBAAwB,CAW1B;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,wBAAwB,GAAG,SAAS,GAC1C,mBAAmB,CAKrB;AAKD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,oBAAoB,GAAG,oBAAoB,CAEzF;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,oBAAoB,EAChC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,wBAAwB,GAAG,SAAS,GAC3C,oBAAoB,CAwCtB"}
@@ -27,28 +27,22 @@
27
27
  * watermark refreshes recency for eviction but never extends expiresAt, so the
28
28
  * entry still expires on schedule and forces a genuine refetch.
29
29
  *
30
- * Three memos keep the watermark from costing more than it saves. Within one
30
+ * Two memos keep the watermark from costing more than it saves. Within one
31
31
  * tool call each table's watermark is read once, however many reads of the
32
32
  * table the call makes. Across calls, a table whose watermark proved unusable
33
33
  * is read straight through, without a watermark, for a while: long for causes
34
34
  * that persist (an incomplete or future-dated watermark, a 4xx), short for
35
- * transient ones (429, 5xx, timeouts, network). And a read whose response is
36
- * small (see SMALL_READ_BYTES) is not kept at all: a hit costs a watermark
37
- * round trip, about what the plain read costs, so keeping it saves nothing.
38
- * The key is remembered as small for one TTL, and its later reads go straight
39
- * upstream in a single request.
35
+ * transient ones (429, 5xx, timeouts, network).
40
36
  *
41
37
  * @module metadata-cache
42
38
  */
43
39
  Object.defineProperty(exports, "__esModule", { value: true });
44
- exports.SMALL_READ_KEY_RAW_LENGTH = exports.MAX_SMALL_READ_KEYS_PER_SCOPE = exports.SMALL_READ_BYTES = exports.TRANSIENT_UNCACHEABLE_MS = exports.STRUCTURAL_UNCACHEABLE_MS = exports.MAX_METADATA_CACHE_TOTAL_BYTES = exports.MAX_METADATA_CACHE_SCOPE_BYTES = exports.MAX_METADATA_CACHE_ENTRY_BYTES = exports.MAX_METADATA_CACHE_ENTRIES_PER_SCOPE = exports.MAX_METADATA_CACHE_SCOPES = exports.FORCE_RECACHE_PARAM = exports.DEFAULT_METADATA_CACHE_TABLES = exports.DEFAULT_METADATA_CACHE_TTL_MS = void 0;
40
+ exports.TRANSIENT_UNCACHEABLE_MS = exports.STRUCTURAL_UNCACHEABLE_MS = exports.MAX_METADATA_CACHE_ENTRIES_PER_SCOPE = exports.MAX_METADATA_CACHE_SCOPES = exports.FORCE_RECACHE_PARAM = exports.DEFAULT_METADATA_CACHE_TABLES = exports.DEFAULT_METADATA_CACHE_TTL_MS = void 0;
45
41
  exports.metadataCacheConfigFromEnvironment = metadataCacheConfigFromEnvironment;
46
42
  exports.createMetadataCacheConfig = createMetadataCacheConfig;
47
43
  exports.uncachedOperations = uncachedOperations;
48
44
  exports.createCachedServiceNowOperations = createCachedServiceNowOperations;
49
- exports.metadataCacheBytes = metadataCacheBytes;
50
45
  const client_js_1 = require("./client.js");
51
- const node_crypto_1 = require("node:crypto");
52
46
  const config_js_1 = require("./config.js");
53
47
  const tool_error_js_1 = require("./tool-error.js");
54
48
  exports.DEFAULT_METADATA_CACHE_TTL_MS = 24 * 60 * 60 * 1000;
@@ -58,39 +52,11 @@ exports.DEFAULT_METADATA_CACHE_TTL_MS = 24 * 60 * 60 * 1000;
58
52
  * The bar for inclusion is a large payload relative to the watermark read,
59
53
  * not merely "this table changes rarely" -- a cache hit still costs one
60
54
  * upstream round trip (see tableWatermark), so the saving is payload bytes,
61
- * never request count. Why each pattern is here:
62
- *
63
- * - sys_dictionary, sys_db_object: the field and table definitions behind
64
- * sn_schema, the all-fields cap and sn_discover. A table's dictionary alone
65
- * is hundreds of rows, and a hierarchy walk reads them repeatedly.
66
- * - sys_app, sys_plugins, sys_glide_object, sys_metadata*, sys_flow*:
67
- * application, plugin, field-type and application-file listings, and the
68
- * Flow Designer tables. They are large and change rarely. The list is the
69
- * original metadata set; not every table in it has a reader in this
70
- * server today.
71
- * - sys_script, sys_script_include, sys_ui_script, sys_script_client,
72
- * sys_ws_operation: the five code tables sn_codesearch searches, which
73
- * sn_query also reads. Each row carries a full script body, so a repeated
74
- * search or page is among the heaviest reads this server makes. Editing a
75
- * script moves sys_updated_on, which the watermark sees, so a cached search
76
- * never outlives a save. They are not covered by sys_metadata*: patterns
77
- * match a table's name, not its place in the table hierarchy. Unlike
78
- * sys_properties, these can be cached: the scope is the credential, so no
79
- * cross-identity hit is possible, and the payloads are large enough to be
80
- * worth keeping. The bodies may hold hard-coded secrets, though, and an
81
- * entry keeps the whole response in memory; an operator who does not want
82
- * that sets SN_METADATA_CACHE_TABLES (or `metadataCache.tables`) without
83
- * them.
84
- *
85
- * sys_properties is deliberately absent: its rows are ACL-restricted per user
86
- * and routinely hold integration secrets in `value`, and the only reads of it
87
- * here are three single-value build-info lookups whose payloads are far too
88
- * small to be worth retaining for a day. Operators who want it can add it
89
- * through SN_METADATA_CACHE_TABLES.
90
- *
91
- * An explicit SN_METADATA_CACHE_TABLES or `metadataCache.tables` replaces this
92
- * list; it does not extend it, so a profile that sets its own list must name
93
- * the code tables itself to cache them.
55
+ * never request count. sys_properties is deliberately absent: its rows are
56
+ * ACL-restricted per user and routinely hold integration secrets in `value`,
57
+ * and the only reads of it here are three single-value build-info lookups
58
+ * whose payloads are far too small to be worth retaining for a day. Operators
59
+ * who want it can add it through SN_METADATA_CACHE_TABLES.
94
60
  */
95
61
  exports.DEFAULT_METADATA_CACHE_TABLES = Object.freeze([
96
62
  "sys_glide_object",
@@ -100,15 +66,8 @@ exports.DEFAULT_METADATA_CACHE_TABLES = Object.freeze([
100
66
  "sys_plugins",
101
67
  "sys_metadata*",
102
68
  "sys_flow*",
103
- "sys_script",
104
- "sys_script_include",
105
- "sys_ui_script",
106
- "sys_script_client",
107
- "sys_ws_operation",
108
69
  ]);
109
70
  const SCOPED_CACHES = new Map();
110
- /** Sum of every scope's `bytes`; kept in step by storeEntry and removeEntry. */
111
- let totalCachedBytes = 0;
112
71
  const TABLE_NAME = /^[a-z][a-z0-9_]{0,79}$/u;
113
72
  /** sys_updated_on as returned with sysparm_display_value=false (UTC). */
114
73
  const STORED_DATE_TIME = /^(\d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2})$/u;
@@ -121,59 +80,10 @@ const MAX_CACHE_TTL_MS = 7 * 24 * 60 * 60 * 1000;
121
80
  * so both are capped and evicted in least-recently-used order. */
122
81
  exports.MAX_METADATA_CACHE_SCOPES = 64;
123
82
  exports.MAX_METADATA_CACHE_ENTRIES_PER_SCOPE = 512;
124
- /**
125
- * Byte bounds. The entry count is not a memory bound: a code-table entry holds
126
- * a whole response of script bodies, up to the client's 1 MiB ceiling, so 512
127
- * of them would retain about half a GiB in one scope. A response larger than
128
- * the entry cap is returned but never kept (and any older entry under its key
129
- * is dropped); a scope over its budget evicts its least recently used entries;
130
- * the whole cache over its budget evicts from the least recently used scope
131
- * first. Sizes are estimates (serialized body plus key and header overhead),
132
- * not heap measurements.
133
- */
134
- exports.MAX_METADATA_CACHE_ENTRY_BYTES = 512 * 1024;
135
- exports.MAX_METADATA_CACHE_SCOPE_BYTES = 32 * 1024 * 1024;
136
- exports.MAX_METADATA_CACHE_TOTAL_BYTES = 128 * 1024 * 1024;
137
- /** Fixed allowance per entry for the frozen record, watermark and map slot. */
138
- const ENTRY_OVERHEAD_BYTES = 512;
139
83
  /** How long a table goes uncached after its watermark proved unusable; never
140
84
  * longer than the cache TTL. */
141
85
  exports.STRUCTURAL_UNCACHEABLE_MS = 15 * 60 * 1000;
142
86
  exports.TRANSIENT_UNCACHEABLE_MS = 30 * 1000;
143
- /**
144
- * A response smaller than this (serialized body bytes) is not worth caching.
145
- *
146
- * A hit still costs one watermark round trip, so the cache saves time only
147
- * when the plain read of the rows costs more than that round trip, and the
148
- * plain read grows with the payload while the watermark does not. Live
149
- * measurement (a 2026-11 sweep on a dev instance, read-only, n = 1 per point,
150
- * so indicative): the watermark of sys_script_include cost about 90 ms; its
151
- * plain reads cost about 75 ms at 2 KB and 110 ms at 96 KB (hit: 96 ms). On
152
- * sys_dictionary, whose watermark costs about 490 ms because the table is
153
- * huge, plain reads cost 75, 86, 180 and 218 ms at 6, 17, 33 and 66 KB, so a
154
- * hit lost at every size tried. The crossover is therefore somewhere between
155
- * about 20 KB and 50 KB, depending on the table, and below it the cache only
156
- * adds a request on a miss and holds memory for nothing.
157
- *
158
- * 32 KiB sits in that band. Putting it a little high or low costs a few
159
- * milliseconds per read either way, because near the crossover a hit and a
160
- * plain read cost about the same; what matters is that the many small reads
161
- * (a few KB) go back to one request. The threshold is a size, not a time, so
162
- * it cannot follow a table whose watermark is unusually expensive; a
163
- * per-table rule would need the measured watermark and upstream times.
164
- */
165
- exports.SMALL_READ_BYTES = 32 * 1024;
166
- /** Most keys one scope remembers as small; the least recently used go first. */
167
- exports.MAX_SMALL_READ_KEYS_PER_SCOPE = exports.MAX_METADATA_CACHE_ENTRIES_PER_SCOPE;
168
- /**
169
- * Longest cache key the small-read memo holds as it is; a longer one is held
170
- * by its sha256 hex digest, so the memo stays at 512 short strings per scope
171
- * however long a caller's query is, and a long selector is remembered like any
172
- * other. Two keys that collide would only make one of them read through once
173
- * more than needed (or, for a small mark on a large key, be re-measured), so a
174
- * collision costs a request, never a wrong answer.
175
- */
176
- exports.SMALL_READ_KEY_RAW_LENGTH = 128;
177
87
  function metadataCacheConfigFromEnvironment(environment = process.env) {
178
88
  const ttlMs = (0, config_js_1.parsePositiveIntegerEnv)(environment.SN_METADATA_CACHE_TTL_MS, "SN_METADATA_CACHE_TTL_MS", { max: MAX_CACHE_TTL_MS });
179
89
  const tables = parseTablePatterns(environment.SN_METADATA_CACHE_TABLES);
@@ -186,7 +96,6 @@ function createMetadataCacheConfig(input) {
186
96
  return Object.freeze({
187
97
  ttlMs: validateTtlMs(input?.ttlMs ?? exports.DEFAULT_METADATA_CACHE_TTL_MS),
188
98
  tables: normalizeTablePatterns(input?.tables ?? exports.DEFAULT_METADATA_CACHE_TABLES),
189
- smallReadBytes: validateSmallReadBytes(input?.smallReadBytes ?? exports.SMALL_READ_BYTES),
190
99
  });
191
100
  }
192
101
  /** The operations each cached wrapper reads through. */
@@ -262,9 +171,6 @@ async function cachedGetWithMeta(operations, state, watermarks, config, path, pa
262
171
  const uncacheableUntil = state.uncacheable.get(match);
263
172
  if (uncacheableUntil !== undefined) {
264
173
  if (!forceRecache && uncacheableUntil > now) {
265
- // The cache cannot serve this table right now, so the rows come from
266
- // ServiceNow.
267
- recordReadThrough();
268
174
  return operations.getWithMeta(path, cleanParams);
269
175
  }
270
176
  // Expired, or the caller asked for a refresh: try the watermark again.
@@ -273,15 +179,6 @@ async function cachedGetWithMeta(operations, state, watermarks, config, path, pa
273
179
  }
274
180
  const cache = state.entries;
275
181
  const key = cacheKey(path, cleanParams);
276
- const smallKey = smallReadKey(key);
277
- const smallUntil = state.small.get(smallKey);
278
- if (smallUntil !== undefined) {
279
- if (!forceRecache && smallUntil > now) {
280
- return readSmallThrough(operations, state, smallKey, smallUntil, config, path, cleanParams);
281
- }
282
- // Expired, or the caller asked for a refresh: measure the response again.
283
- state.small.delete(smallKey);
284
- }
285
182
  const existing = cache.get(key);
286
183
  // Read on a miss too, and always before the rows. An update landing between
287
184
  // the two reads is then in the rows but not the watermark, which costs one
@@ -297,27 +194,18 @@ async function cachedGetWithMeta(operations, state, watermarks, config, path, pa
297
194
  existing.expiresAt > now &&
298
195
  watermark !== undefined &&
299
196
  sameWatermark(existing.watermark, watermark)) {
300
- // Re-insert to mark the entry most recently used for eviction order. Only
301
- // while it is still the one stored: another call may have evicted or
302
- // replaced it during the awaits above, and putting it back would hold
303
- // bytes the byte totals no longer count.
304
- if (cache.get(key) === existing) {
305
- cache.delete(key);
306
- cache.set(key, existing);
307
- }
308
- (0, client_js_1.recordCacheOutcome)("hit");
197
+ // Re-insert to mark the entry most recently used for eviction order.
198
+ cache.delete(key);
199
+ cache.set(key, existing);
309
200
  return cloneCachedResult(existing);
310
201
  }
311
- // Rows come from ServiceNow from here on: a forced refresh is a bypass, any
312
- // other read a miss (the entry is absent, expired, changed, or unusable).
313
- (0, client_js_1.recordCacheOutcome)(forceRecache ? "bypass" : "miss");
314
202
  // A forced refresh must never leave behind the rows it was asked to replace:
315
203
  // it is how a caller surfaces a write the watermark missed. Any other
316
204
  // refetch leaves the entry until it is replaced -- if these rows cannot be
317
205
  // kept, the old ones are still correct against any later watermark read that
318
206
  // matches theirs, so they serve again once the table is cacheable again.
319
207
  if (forceRecache)
320
- removeEntry(state, key);
208
+ cache.delete(key);
321
209
  const fresh = await operations.getWithMeta(path, cleanParams);
322
210
  // Only a materialized 200 body is reusable. A 204 carries no rows, and a
323
211
  // failed read throws before reaching here, so nothing negative is cached.
@@ -325,145 +213,21 @@ async function cachedGetWithMeta(operations, state, watermarks, config, path, pa
325
213
  if (fresh.status !== 200 || fresh.data === null || watermark === undefined) {
326
214
  return fresh;
327
215
  }
328
- // Serialize once: the string is both the size measure and the copy's source.
329
- const serialized = JSON.stringify(fresh.data);
330
- const bodyBytes = Buffer.byteLength(serialized, "utf8");
331
- if (bodyBytes < config.smallReadBytes) {
332
- // Not worth keeping: a hit would cost a watermark round trip, about what
333
- // this read cost. Remember the key as small so its next reads are one
334
- // plain request, and free any older, larger entry under it.
335
- removeEntry(state, key);
336
- markSmall(state, smallKey, now + config.ttlMs);
337
- return fresh;
338
- }
339
- // A key another call marked small while this read was in flight is large
340
- // now, as far as this read can tell.
341
- state.small.delete(smallKey);
342
- if (bodyBytes > exports.MAX_METADATA_CACHE_ENTRY_BYTES) {
343
- // Too big to keep. The older entry under this key is now known stale or
344
- // superseded, so free it rather than let its body sit until eviction.
345
- removeEntry(state, key);
346
- return fresh;
347
- }
348
- const headers = Object.freeze([...fresh.headers.entries()]);
349
- storeEntry(state, key, Object.freeze({
216
+ cache.delete(key);
217
+ cache.set(key, Object.freeze({
350
218
  expiresAt: now + config.ttlMs,
351
219
  watermark,
352
- data: JSON.parse(serialized),
220
+ data: cloneJson(fresh.data),
353
221
  status: fresh.status,
354
- headers,
355
- bytes: bodyBytes +
356
- key.length +
357
- headers.reduce((sum, [name, value]) => sum + name.length + value.length, 0) +
358
- ENTRY_OVERHEAD_BYTES,
359
- }), now);
360
- return fresh;
361
- }
362
- /**
363
- * Count a read the cache did not serve and did not keep: the rows come from
364
- * ServiceNow, in one request, without a watermark. Reported as a miss, which
365
- * is what it is to the caller; a distinct outcome for it (#30) would change
366
- * only this function.
367
- */
368
- function recordReadThrough() {
369
- (0, client_js_1.recordCacheOutcome)("miss");
370
- }
371
- /**
372
- * Read a key remembered as small: one plain request, no watermark. If the
373
- * response has since grown to the threshold or beyond, forget the mark, so the
374
- * next read of the key takes the cached path and keeps it.
375
- *
376
- * The mark's expiry is not extended: it is one TTL from the read that measured
377
- * the response, so a key is re-measured at least once per TTL.
378
- */
379
- async function readSmallThrough(operations, state, key, smallUntil, config, path, params) {
380
- // Most recently used, with the expiry it already had.
381
- state.small.delete(key);
382
- state.small.set(key, smallUntil);
383
- recordReadThrough();
384
- const fresh = await operations.getWithMeta(path, params);
385
- if (fresh.status === 200 &&
386
- fresh.data !== null &&
387
- Buffer.byteLength(JSON.stringify(fresh.data), "utf8") >= config.smallReadBytes) {
388
- state.small.delete(key);
389
- }
222
+ headers: Object.freeze([...fresh.headers.entries()]),
223
+ }));
224
+ evictOldest(cache, exports.MAX_METADATA_CACHE_ENTRIES_PER_SCOPE);
390
225
  return fresh;
391
226
  }
392
- /** Remember a key as small until `until`, within the memo's bounds. */
393
- function markSmall(state, key, until) {
394
- if (state.detached)
395
- return;
396
- state.small.delete(key);
397
- state.small.set(key, until);
398
- evictOldest(state.small, exports.MAX_SMALL_READ_KEYS_PER_SCOPE);
399
- }
400
- /** The memo's key for a cache key: the key itself when short, else its sha256 hex. */
401
- function smallReadKey(key) {
402
- return key.length <= exports.SMALL_READ_KEY_RAW_LENGTH ? key : (0, node_crypto_1.createHash)("sha256").update(key).digest("hex");
403
- }
404
- /**
405
- * Estimated bytes retained for one scope, or for the whole cache when no scope
406
- * is given. For tests and diagnostics; the cache never reads it.
407
- */
408
- function metadataCacheBytes(scope) {
409
- if (scope === undefined)
410
- return totalCachedBytes;
411
- return SCOPED_CACHES.get(scope)?.bytes ?? 0;
412
- }
413
- /** Drop one entry and release its bytes from the scope and the global total. */
414
- function removeEntry(state, key) {
415
- const entry = state.entries.get(key);
416
- if (entry === undefined)
417
- return;
418
- state.entries.delete(key);
419
- state.bytes -= entry.bytes;
420
- if (!state.detached)
421
- totalCachedBytes -= entry.bytes;
422
- }
423
- /**
424
- * Insert an entry, then enforce every bound. Expired entries at the old end
425
- * go first, since they can never be served again; the walk stops at the first
426
- * live entry, so it examines only what it removes plus one. Then the entry
427
- * count, the scope's byte budget and the global byte budget, each evicting
428
- * least recently used first.
429
- */
430
- function storeEntry(state, key, entry, now) {
431
- if (state.detached)
432
- return;
433
- removeEntry(state, key);
434
- for (const [oldKey, oldEntry] of state.entries) {
435
- if (oldEntry.expiresAt > now)
436
- break;
437
- removeEntry(state, oldKey);
438
- }
439
- state.entries.set(key, entry);
440
- state.bytes += entry.bytes;
441
- totalCachedBytes += entry.bytes;
442
- evictEntries(state, (candidate) => candidate.entries.size > exports.MAX_METADATA_CACHE_ENTRIES_PER_SCOPE ||
443
- candidate.bytes > exports.MAX_METADATA_CACHE_SCOPE_BYTES);
444
- // Over the global budget: the least recently used scope gives up entries
445
- // first (SCOPED_CACHES iterates in recency order, oldest first). A scope
446
- // emptied this way stays registered; it holds no bytes.
447
- for (const scopeState of SCOPED_CACHES.values()) {
448
- if (totalCachedBytes <= exports.MAX_METADATA_CACHE_TOTAL_BYTES)
449
- break;
450
- evictEntries(scopeState, () => totalCachedBytes > exports.MAX_METADATA_CACHE_TOTAL_BYTES);
451
- }
452
- }
453
- /** Evict a scope's oldest entries while `over` holds. */
454
- function evictEntries(state, over) {
455
- while (over(state)) {
456
- const oldest = state.entries.keys().next();
457
- if (oldest.done)
458
- return;
459
- removeEntry(state, oldest.value);
460
- }
461
- }
462
227
  function callWatermark(operations, watermarks, table) {
463
228
  let pending = watermarks.get(table);
464
229
  if (pending === undefined) {
465
- // Counted as watermark time, not as upstream time.
466
- pending = (0, client_js_1.asWatermarkRead)(() => tableWatermark(operations, table));
230
+ pending = tableWatermark(operations, table);
467
231
  watermarks.set(table, pending);
468
232
  }
469
233
  return pending;
@@ -609,26 +373,9 @@ function stateForScope(scope) {
609
373
  SCOPED_CACHES.set(scope, existing);
610
374
  return existing;
611
375
  }
612
- const next = {
613
- entries: new Map(),
614
- uncacheable: new Map(),
615
- small: new Map(),
616
- bytes: 0,
617
- detached: false,
618
- };
376
+ const next = Object.freeze({ entries: new Map(), uncacheable: new Map() });
619
377
  SCOPED_CACHES.set(scope, next);
620
- while (SCOPED_CACHES.size > exports.MAX_METADATA_CACHE_SCOPES) {
621
- const oldest = SCOPED_CACHES.entries().next();
622
- if (oldest.done)
623
- break;
624
- const [oldScope, oldState] = oldest.value;
625
- SCOPED_CACHES.delete(oldScope);
626
- totalCachedBytes -= oldState.bytes;
627
- oldState.entries.clear();
628
- oldState.small.clear();
629
- oldState.bytes = 0;
630
- oldState.detached = true;
631
- }
378
+ evictOldest(SCOPED_CACHES, exports.MAX_METADATA_CACHE_SCOPES);
632
379
  return next;
633
380
  }
634
381
  function cacheKey(path, params) {
@@ -658,15 +405,6 @@ function validateTtlMs(value) {
658
405
  }
659
406
  return value;
660
407
  }
661
- function validateSmallReadBytes(value) {
662
- if (typeof value !== "number" ||
663
- !Number.isSafeInteger(value) ||
664
- value < 0 ||
665
- value > exports.MAX_METADATA_CACHE_ENTRY_BYTES) {
666
- throw new TypeError(`metadata cache smallReadBytes must be between 0 and ${exports.MAX_METADATA_CACHE_ENTRY_BYTES}`);
667
- }
668
- return value;
669
- }
670
408
  function parseTablePatterns(value) {
671
409
  if (value === undefined || value.trim() === "")
672
410
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"metadata-cache.js","sourceRoot":"","sources":["../src/metadata-cache.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;;;AAkNH,gFAaC;AAED,8DAQC;AAiBD,gDAEC;AAMD,4EA4CC;AA6LD,gDAGC;AA5eD,2CAMqB;AACrB,6CAAyC;AAEzC,2CAAsD;AACtD,mDAA6D;AAEhD,QAAA,6BAA6B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACU,QAAA,6BAA6B,GAAG,MAAM,CAAC,MAAM,CAAC;IACzD,kBAAkB;IAClB,gBAAgB;IAChB,eAAe;IACf,SAAS;IACT,aAAa;IACb,eAAe;IACf,WAAW;IACX,YAAY;IACZ,oBAAoB;IACpB,eAAe;IACf,mBAAmB;IACnB,kBAAkB;CACnB,CAAC,CAAC;AAoEH,MAAM,aAAa,GAAG,IAAI,GAAG,EAAsB,CAAC;AACpD,gFAAgF;AAChF,IAAI,gBAAgB,GAAG,CAAC,CAAC;AACzB,MAAM,UAAU,GAAG,yBAAyB,CAAC;AAC7C,yEAAyE;AACzE,MAAM,gBAAgB,GAAG,4CAA4C,CAAC;AACt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