toolmenu 0.7.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.
- package/LICENSE +21 -0
- package/README.md +311 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +283 -0
- package/dist/compare.d.ts +32 -0
- package/dist/compare.js +108 -0
- package/dist/config.d.ts +19 -0
- package/dist/config.js +27 -0
- package/dist/connect.d.ts +66 -0
- package/dist/connect.js +122 -0
- package/dist/diff.d.ts +58 -0
- package/dist/diff.js +404 -0
- package/dist/history.d.ts +88 -0
- package/dist/history.js +219 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +9 -0
- package/dist/menu.d.ts +9 -0
- package/dist/menu.js +57 -0
- package/dist/report.d.ts +11 -0
- package/dist/report.js +278 -0
- package/dist/routes.d.ts +22 -0
- package/dist/routes.js +76 -0
- package/dist/rules/description.d.ts +28 -0
- package/dist/rules/description.js +158 -0
- package/dist/rules/determinism.d.ts +2 -0
- package/dist/rules/determinism.js +35 -0
- package/dist/rules/ids.d.ts +11 -0
- package/dist/rules/ids.js +138 -0
- package/dist/rules/index.d.ts +11 -0
- package/dist/rules/index.js +42 -0
- package/dist/rules/naming.d.ts +4 -0
- package/dist/rules/naming.js +145 -0
- package/dist/rules/rule.d.ts +33 -0
- package/dist/rules/rule.js +1 -0
- package/dist/rules/spec.d.ts +5 -0
- package/dist/rules/spec.js +102 -0
- package/dist/rules/write.d.ts +3 -0
- package/dist/rules/write.js +55 -0
- package/dist/semver.d.ts +11 -0
- package/dist/semver.js +41 -0
- package/dist/session.d.ts +90 -0
- package/dist/session.js +519 -0
- package/dist/snapshot.d.ts +16 -0
- package/dist/snapshot.js +42 -0
- package/dist/types.d.ts +49 -0
- package/dist/types.js +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +3 -0
- package/dist/words.d.ts +14 -0
- package/dist/words.js +63 -0
- package/package.json +57 -0
- package/schemas/2024-11-05.json +2077 -0
- package/schemas/2025-03-26.json +2139 -0
- package/schemas/2025-06-18.json +2517 -0
- package/schemas/2025-11-25.json +4058 -0
- package/schemas/2026-07-28.json +3963 -0
package/dist/compare.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { toolDefinition } from './menu.js';
|
|
2
|
+
/** JSON with sorted object keys, so key order never counts as a change. */
|
|
3
|
+
export function canonical(value) {
|
|
4
|
+
return JSON.stringify(sortKeys(value));
|
|
5
|
+
}
|
|
6
|
+
function sortKeys(value) {
|
|
7
|
+
if (Array.isArray(value))
|
|
8
|
+
return value.map(sortKeys);
|
|
9
|
+
if (value && typeof value === 'object') {
|
|
10
|
+
return Object.fromEntries(Object.keys(value)
|
|
11
|
+
.sort()
|
|
12
|
+
.map((k) => [k, sortKeys(value[k])]));
|
|
13
|
+
}
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
const FIELDS = ['description', 'inputSchema', 'outputSchema', 'annotations'];
|
|
17
|
+
/** Which parts of one tool changed. Empty when the definitions are identical. */
|
|
18
|
+
export function toolDiff(before, after) {
|
|
19
|
+
const kinds = [];
|
|
20
|
+
for (const field of FIELDS) {
|
|
21
|
+
if (canonical(before[field]) !== canonical(after[field]))
|
|
22
|
+
kinds.push(field);
|
|
23
|
+
}
|
|
24
|
+
const rest = (t) => {
|
|
25
|
+
const def = toolDefinition(t);
|
|
26
|
+
for (const field of FIELDS)
|
|
27
|
+
delete def[field];
|
|
28
|
+
return canonical(def);
|
|
29
|
+
};
|
|
30
|
+
if (rest(before) !== rest(after))
|
|
31
|
+
kinds.push('other');
|
|
32
|
+
// Clients send the tool as serialized, and prompt caches match bytes: a new key
|
|
33
|
+
// or property order is a change even when the content is the same.
|
|
34
|
+
if (kinds.length === 0 && JSON.stringify(toolDefinition(before)) !== JSON.stringify(toolDefinition(after)))
|
|
35
|
+
kinds.push('serialization');
|
|
36
|
+
return kinds;
|
|
37
|
+
}
|
|
38
|
+
export function compareMenus(before, after) {
|
|
39
|
+
const changes = [];
|
|
40
|
+
const beforeByName = new Map(before.map((t, i) => [t.name, { tool: t, index: i }]));
|
|
41
|
+
const afterNames = new Set(after.map((t) => t.name));
|
|
42
|
+
before.forEach((t, i) => {
|
|
43
|
+
if (!afterNames.has(t.name))
|
|
44
|
+
changes.push({ kind: 'removed', tool: t.name, position: i });
|
|
45
|
+
});
|
|
46
|
+
// Tools present in both: the ones outside the longest run that kept its
|
|
47
|
+
// relative order are the ones that moved.
|
|
48
|
+
const common = after
|
|
49
|
+
.map((t, i) => ({ name: t.name, afterIndex: i, beforeIndex: beforeByName.get(t.name)?.index }))
|
|
50
|
+
.filter((c) => c.beforeIndex !== undefined);
|
|
51
|
+
const kept = longestIncreasingRun(common.map((c) => c.beforeIndex));
|
|
52
|
+
common.forEach((c, i) => {
|
|
53
|
+
if (!kept.has(i))
|
|
54
|
+
changes.push({ kind: 'moved', tool: c.name, position: c.afterIndex });
|
|
55
|
+
});
|
|
56
|
+
after.forEach((t, i) => {
|
|
57
|
+
const old = beforeByName.get(t.name);
|
|
58
|
+
if (!old) {
|
|
59
|
+
changes.push({ kind: 'added', tool: t.name, position: i });
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
for (const kind of toolDiff(old.tool, t))
|
|
63
|
+
changes.push({ kind, tool: t.name, position: i });
|
|
64
|
+
});
|
|
65
|
+
return changes;
|
|
66
|
+
}
|
|
67
|
+
/** Indices (into `values`) of one longest strictly increasing subsequence. */
|
|
68
|
+
function longestIncreasingRun(values) {
|
|
69
|
+
const tailIndex = [];
|
|
70
|
+
const previous = new Array(values.length).fill(-1);
|
|
71
|
+
values.forEach((v, i) => {
|
|
72
|
+
let lo = 0;
|
|
73
|
+
let hi = tailIndex.length;
|
|
74
|
+
while (lo < hi) {
|
|
75
|
+
const mid = (lo + hi) >> 1;
|
|
76
|
+
if (values[tailIndex[mid]] < v)
|
|
77
|
+
lo = mid + 1;
|
|
78
|
+
else
|
|
79
|
+
hi = mid;
|
|
80
|
+
}
|
|
81
|
+
if (lo > 0)
|
|
82
|
+
previous[i] = tailIndex[lo - 1];
|
|
83
|
+
tailIndex[lo] = i;
|
|
84
|
+
});
|
|
85
|
+
const result = new Set();
|
|
86
|
+
let k = tailIndex.length ? tailIndex[tailIndex.length - 1] : -1;
|
|
87
|
+
while (k !== -1) {
|
|
88
|
+
result.add(k);
|
|
89
|
+
k = previous[k];
|
|
90
|
+
}
|
|
91
|
+
return result;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Where the tool list itself stops matching between `before` and `after`.
|
|
95
|
+
* Null when `after` only appends to `before`. That keeps the tool list a valid
|
|
96
|
+
* prefix of itself, not the conversation's cache: see session/append.
|
|
97
|
+
*/
|
|
98
|
+
export function cacheBreak(before, after) {
|
|
99
|
+
let i = 0;
|
|
100
|
+
// Byte-exact, not canonical: a prompt cache compares what was sent.
|
|
101
|
+
while (i < before.length && i < after.length && JSON.stringify(toolDefinition(before[i])) === JSON.stringify(toolDefinition(after[i]))) {
|
|
102
|
+
i++;
|
|
103
|
+
}
|
|
104
|
+
if (i === before.length)
|
|
105
|
+
return null;
|
|
106
|
+
const tokensAffected = after.slice(i).reduce((sum, t) => sum + t.tokens, 0);
|
|
107
|
+
return { position: i, tokensAffected };
|
|
108
|
+
}
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Severity } from './types.js';
|
|
2
|
+
export interface Config {
|
|
3
|
+
rules?: Record<string, Severity | 'off'>;
|
|
4
|
+
ignore?: string[];
|
|
5
|
+
routes?: string;
|
|
6
|
+
baseline?: string;
|
|
7
|
+
tokenBudget?: number;
|
|
8
|
+
/** diff checks the semver bump against serverInfo.version (off: it's often not the release version). */
|
|
9
|
+
serverVersionIsRelease?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Where your client cuts tool descriptions: a number of characters, or a
|
|
12
|
+
* known client ("claude-code", "amazon-q"). Default "claude-code" (2,048).
|
|
13
|
+
*/
|
|
14
|
+
descriptionLimit?: number | string;
|
|
15
|
+
/** Tools (names or globs) your client sends with the full description. */
|
|
16
|
+
fullDescriptions?: string[];
|
|
17
|
+
}
|
|
18
|
+
/** Optional: no config file is fine. */
|
|
19
|
+
export declare function loadConfig(path?: string): Promise<Config>;
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import { CLIENT_LIMITS } from './rules/description.js';
|
|
4
|
+
const DEFAULT_PATH = 'toolmenu.config.json';
|
|
5
|
+
/** Optional: no config file is fine. */
|
|
6
|
+
export async function loadConfig(path) {
|
|
7
|
+
const file = path ?? DEFAULT_PATH;
|
|
8
|
+
if (!path && !existsSync(file))
|
|
9
|
+
return {};
|
|
10
|
+
let config;
|
|
11
|
+
try {
|
|
12
|
+
config = JSON.parse(await readFile(file, 'utf8'));
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
throw new Error(`${file}: ${error instanceof Error ? error.message : String(error)}`);
|
|
16
|
+
}
|
|
17
|
+
for (const [id, value] of Object.entries(config.rules ?? {})) {
|
|
18
|
+
if (!['error', 'warn', 'info', 'off'].includes(value)) {
|
|
19
|
+
throw new Error(`${file}: rules["${id}"] must be error, warn, info or off`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const limit = config.descriptionLimit;
|
|
23
|
+
if (limit !== undefined && !(typeof limit === 'number' && limit > 0) && !(typeof limit === 'string' && limit in CLIENT_LIMITS)) {
|
|
24
|
+
throw new Error(`${file}: descriptionLimit must be a positive number or one of ${Object.keys(CLIENT_LIMITS).join(', ')}`);
|
|
25
|
+
}
|
|
26
|
+
return config;
|
|
27
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Client } from '@modelcontextprotocol/client';
|
|
2
|
+
import type { Transport } from '@modelcontextprotocol/client';
|
|
3
|
+
import type { Era } from './types.js';
|
|
4
|
+
export type Target = {
|
|
5
|
+
kind: 'stdio';
|
|
6
|
+
command: string;
|
|
7
|
+
args: string[];
|
|
8
|
+
env?: Record<string, string>;
|
|
9
|
+
cwd?: string;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'http';
|
|
12
|
+
url: string;
|
|
13
|
+
headers?: Record<string, string>;
|
|
14
|
+
};
|
|
15
|
+
export interface WireResponse {
|
|
16
|
+
method: string;
|
|
17
|
+
result?: Record<string, unknown>;
|
|
18
|
+
error?: {
|
|
19
|
+
code: number;
|
|
20
|
+
message: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/** Every response the server sent, matched to the request method, as it came off the wire. */
|
|
24
|
+
export declare class WireLog {
|
|
25
|
+
readonly responses: WireResponse[];
|
|
26
|
+
/** Methods of notifications the server sent, in order. */
|
|
27
|
+
readonly notifications: string[];
|
|
28
|
+
private pending;
|
|
29
|
+
tap(transport: Transport): void;
|
|
30
|
+
/** How many notifications of `method` arrived after the first `mark` notifications. */
|
|
31
|
+
notificationsSince(mark: number, method: string): number;
|
|
32
|
+
/** Responses to `method` received since `mark` (a previous `responses.length`). */
|
|
33
|
+
since(mark: number, method: string): WireResponse[];
|
|
34
|
+
}
|
|
35
|
+
export interface Connection {
|
|
36
|
+
client: Client;
|
|
37
|
+
wire: WireLog;
|
|
38
|
+
protocolVersion?: string;
|
|
39
|
+
era?: Era;
|
|
40
|
+
server: {
|
|
41
|
+
name?: string;
|
|
42
|
+
version?: string;
|
|
43
|
+
};
|
|
44
|
+
capabilities: Record<string, unknown>;
|
|
45
|
+
/** True when the request carried credentials (an Authorization-style header). */
|
|
46
|
+
usedAuth: boolean;
|
|
47
|
+
stderr: () => string;
|
|
48
|
+
close: () => Promise<void>;
|
|
49
|
+
}
|
|
50
|
+
export interface ConnectOptions {
|
|
51
|
+
timeoutMs?: number;
|
|
52
|
+
}
|
|
53
|
+
export declare function connect(target: Target, options?: ConnectOptions): Promise<Connection>;
|
|
54
|
+
export interface ToolList {
|
|
55
|
+
tools: Record<string, unknown>[];
|
|
56
|
+
/** Every page's raw result, for schema validation. */
|
|
57
|
+
pages: Record<string, unknown>[];
|
|
58
|
+
listMeta: {
|
|
59
|
+
ttlMs?: number;
|
|
60
|
+
cacheScope?: string;
|
|
61
|
+
};
|
|
62
|
+
/** Set when the SDK client rejected the result (toolmenu still reads it off the wire). */
|
|
63
|
+
clientError?: string;
|
|
64
|
+
}
|
|
65
|
+
/** One full `tools/list`, bypassing the SDK's cache, read from the wire rather than the SDK's parsed copy. */
|
|
66
|
+
export declare function listTools(connection: Connection, options?: ConnectOptions): Promise<ToolList>;
|
package/dist/connect.js
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { Client, StreamableHTTPClientTransport } from '@modelcontextprotocol/client';
|
|
2
|
+
import { StdioClientTransport, getDefaultEnvironment } from '@modelcontextprotocol/client/stdio';
|
|
3
|
+
import { eraOf } from './menu.js';
|
|
4
|
+
import { VERSION } from './version.js';
|
|
5
|
+
/** Every response the server sent, matched to the request method, as it came off the wire. */
|
|
6
|
+
export class WireLog {
|
|
7
|
+
responses = [];
|
|
8
|
+
/** Methods of notifications the server sent, in order. */
|
|
9
|
+
notifications = [];
|
|
10
|
+
pending = new Map();
|
|
11
|
+
tap(transport) {
|
|
12
|
+
const send = transport.send.bind(transport);
|
|
13
|
+
transport.send = (message, options) => {
|
|
14
|
+
if ('method' in message && 'id' in message && message.id !== undefined) {
|
|
15
|
+
this.pending.set(message.id, message.method);
|
|
16
|
+
}
|
|
17
|
+
return send(message, options);
|
|
18
|
+
};
|
|
19
|
+
const onmessage = transport.onmessage;
|
|
20
|
+
transport.onmessage = (message, extra) => {
|
|
21
|
+
if ('method' in message && !('id' in message && message.id !== undefined)) {
|
|
22
|
+
this.notifications.push(message.method);
|
|
23
|
+
}
|
|
24
|
+
if (!('method' in message) && 'id' in message && message.id !== undefined) {
|
|
25
|
+
const method = this.pending.get(message.id);
|
|
26
|
+
if (method) {
|
|
27
|
+
this.pending.delete(message.id);
|
|
28
|
+
this.responses.push({
|
|
29
|
+
method,
|
|
30
|
+
...('result' in message ? { result: message.result } : {}),
|
|
31
|
+
...('error' in message ? { error: message.error } : {}),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
onmessage?.(message, extra);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/** How many notifications of `method` arrived after the first `mark` notifications. */
|
|
39
|
+
notificationsSince(mark, method) {
|
|
40
|
+
return this.notifications.slice(mark).filter((m) => m === method).length;
|
|
41
|
+
}
|
|
42
|
+
/** Responses to `method` received since `mark` (a previous `responses.length`). */
|
|
43
|
+
since(mark, method) {
|
|
44
|
+
return this.responses.slice(mark).filter((r) => r.method === method);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export async function connect(target, options = {}) {
|
|
48
|
+
const client = new Client({ name: 'toolmenu', version: VERSION }, { versionNegotiation: { mode: 'auto' } });
|
|
49
|
+
let transport;
|
|
50
|
+
let stderrText = '';
|
|
51
|
+
if (target.kind === 'stdio') {
|
|
52
|
+
const stdio = new StdioClientTransport({
|
|
53
|
+
command: target.command,
|
|
54
|
+
args: target.args,
|
|
55
|
+
env: { ...getDefaultEnvironment(), ...target.env },
|
|
56
|
+
cwd: target.cwd,
|
|
57
|
+
stderr: 'pipe',
|
|
58
|
+
});
|
|
59
|
+
stdio.stderr?.on('data', (chunk) => {
|
|
60
|
+
stderrText = (stderrText + chunk.toString()).slice(-4000);
|
|
61
|
+
});
|
|
62
|
+
transport = stdio;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
transport = new StreamableHTTPClientTransport(new URL(target.url), {
|
|
66
|
+
requestInit: { headers: target.headers ?? {} },
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
try {
|
|
70
|
+
await client.connect(transport, { timeout: options.timeoutMs });
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
// Give stderr a moment to arrive: it usually says why the server exited.
|
|
74
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
75
|
+
const stderr = stderrText.trim();
|
|
76
|
+
if (stderr && error instanceof Error)
|
|
77
|
+
error.message += `\nserver stderr:\n${stderr}`;
|
|
78
|
+
await client.close().catch(() => { });
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
81
|
+
const wire = new WireLog();
|
|
82
|
+
wire.tap(transport);
|
|
83
|
+
const protocolVersion = client.getNegotiatedProtocolVersion();
|
|
84
|
+
const server = client.getServerVersion() ?? {};
|
|
85
|
+
return {
|
|
86
|
+
client,
|
|
87
|
+
wire,
|
|
88
|
+
protocolVersion,
|
|
89
|
+
era: eraOf(protocolVersion),
|
|
90
|
+
server: { name: server.name, version: server.version },
|
|
91
|
+
capabilities: (client.getServerCapabilities() ?? {}),
|
|
92
|
+
usedAuth: target.kind === 'http' &&
|
|
93
|
+
Object.keys(target.headers ?? {}).some((h) => /^(authorization|x-api-key|api-key|cookie)$/i.test(h)),
|
|
94
|
+
stderr: () => stderrText,
|
|
95
|
+
close: () => client.close(),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/** One full `tools/list`, bypassing the SDK's cache, read from the wire rather than the SDK's parsed copy. */
|
|
99
|
+
export async function listTools(connection, options = {}) {
|
|
100
|
+
const mark = connection.wire.responses.length;
|
|
101
|
+
let clientError;
|
|
102
|
+
try {
|
|
103
|
+
await connection.client.listTools(undefined, { cacheMode: 'bypass', timeout: options.timeoutMs });
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
clientError = error instanceof Error ? error.message : String(error);
|
|
107
|
+
}
|
|
108
|
+
const responses = connection.wire.since(mark, 'tools/list');
|
|
109
|
+
const pages = responses.flatMap((r) => (r.result ? [r.result] : []));
|
|
110
|
+
if (clientError && pages.length === 0)
|
|
111
|
+
throw new Error(clientError);
|
|
112
|
+
const first = pages[0] ?? {};
|
|
113
|
+
return {
|
|
114
|
+
tools: pages.flatMap((p) => (Array.isArray(p.tools) ? p.tools : [])),
|
|
115
|
+
pages,
|
|
116
|
+
listMeta: {
|
|
117
|
+
...(typeof first.ttlMs === 'number' ? { ttlMs: first.ttlMs } : {}),
|
|
118
|
+
...(typeof first.cacheScope === 'string' ? { cacheScope: first.cacheScope } : {}),
|
|
119
|
+
},
|
|
120
|
+
...(clientError ? { clientError } : {}),
|
|
121
|
+
};
|
|
122
|
+
}
|
package/dist/diff.d.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Finding, Menu, Severity } from './types.js';
|
|
2
|
+
export type ChangeClass = 'breaking' | 'minor' | 'notice';
|
|
3
|
+
export type Bump = 'major' | 'minor' | 'patch' | 'none';
|
|
4
|
+
export interface DiffFinding extends Finding {
|
|
5
|
+
class?: ChangeClass;
|
|
6
|
+
}
|
|
7
|
+
interface DiffRule {
|
|
8
|
+
severity: Severity;
|
|
9
|
+
class?: ChangeClass;
|
|
10
|
+
}
|
|
11
|
+
/** Every diff rule, its default severity and what it means for semver. */
|
|
12
|
+
export declare const DIFF_RULES: Record<string, DiffRule>;
|
|
13
|
+
export interface TokenChange {
|
|
14
|
+
before: number;
|
|
15
|
+
after: number;
|
|
16
|
+
delta: number;
|
|
17
|
+
/** Largest per-tool changes first. */
|
|
18
|
+
tools: {
|
|
19
|
+
name: string;
|
|
20
|
+
before: number;
|
|
21
|
+
after: number;
|
|
22
|
+
delta: number;
|
|
23
|
+
}[];
|
|
24
|
+
}
|
|
25
|
+
export interface DiffResult {
|
|
26
|
+
before: Menu['server'];
|
|
27
|
+
after: Menu['server'];
|
|
28
|
+
findings: DiffFinding[];
|
|
29
|
+
tokens: TokenChange;
|
|
30
|
+
suggestedBump: Bump;
|
|
31
|
+
actualBump?: Bump;
|
|
32
|
+
/** The versions the bump was checked against, and where they came from. */
|
|
33
|
+
release?: {
|
|
34
|
+
before: string;
|
|
35
|
+
after: string;
|
|
36
|
+
source: 'release' | 'server';
|
|
37
|
+
};
|
|
38
|
+
/** Why the bump wasn't checked although versions were given (calendar versions…). */
|
|
39
|
+
bumpNotChecked?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface DiffOptions {
|
|
42
|
+
rules?: Record<string, Severity | 'off'>;
|
|
43
|
+
ignore?: string[];
|
|
44
|
+
tokenBudget?: number;
|
|
45
|
+
/**
|
|
46
|
+
* The release (artifact) versions: npm, a git tag. The server-reported
|
|
47
|
+
* version (serverInfo.version) often isn't one (FINDINGS F5), so the bump is
|
|
48
|
+
* only checked against it when serverVersionIsRelease is set.
|
|
49
|
+
*/
|
|
50
|
+
release?: {
|
|
51
|
+
before: string;
|
|
52
|
+
after: string;
|
|
53
|
+
};
|
|
54
|
+
serverVersionIsRelease?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export declare function diffMenus(before: Menu, after: Menu, options?: DiffOptions): DiffResult;
|
|
57
|
+
export declare function versionBump(before: string | undefined, after: string | undefined): Bump | undefined;
|
|
58
|
+
export {};
|