@atlassian/mcp-compressor 0.38.2 → 0.39.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/README.md +29 -0
- package/dist/rust_core.d.ts +6 -0
- package/dist/rust_core.js +2 -0
- package/dist/transforms.d.ts +8 -2
- package/dist/transforms.js +13 -3
- package/native/index.darwin-arm64.node +0 -0
- package/native/index.darwin-x64.node +0 -0
- package/native/index.linux-arm64-gnu.node +0 -0
- package/native/index.linux-x64-gnu.node +2 -2
- package/native/index.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -391,3 +391,32 @@ import { CompressorRuntime } from "@atlassian/mcp-compressor";
|
|
|
391
391
|
// light: ~zero runtime deps
|
|
392
392
|
import { interpolateString } from "@atlassian/mcp-compressor/config";
|
|
393
393
|
```
|
|
394
|
+
|
|
395
|
+
### Summary-only CLI discovery
|
|
396
|
+
|
|
397
|
+
Host-owned CLI and Just Bash transforms can retain their complete command surface
|
|
398
|
+
while advertising only a short toolset description to the model:
|
|
399
|
+
|
|
400
|
+
```typescript
|
|
401
|
+
const transformed = await transformToolsForCliMode(tools, {
|
|
402
|
+
serverName: "records",
|
|
403
|
+
helpMode: "summary",
|
|
404
|
+
helpSummary: "Search, read and manage enterprise records.",
|
|
405
|
+
});
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
`helpMode` defaults to `"full"` (the existing subcommand catalog). With `"summary"`,
|
|
409
|
+
the model-visible `records_help` description omits that catalog. `helpSummary` is
|
|
410
|
+
optional caller-authored capability text, not an inferred or permission-checked
|
|
411
|
+
capability promise. Missing/blank summaries fall back to a generic CLI description.
|
|
412
|
+
Both `records --help` and calling `records_help` still return full discovery;
|
|
413
|
+
`records <subcommand> --help` and all invocations are unchanged. The same options
|
|
414
|
+
are available on `planToolsForJustBash` / `transformToolsForJustBash`.
|
|
415
|
+
|
|
416
|
+
Hosts using `buildHostTransformPlan` directly can pass the same options. Use
|
|
417
|
+
`plan.helpDescription` for the model-visible description and `plan.helpText` for
|
|
418
|
+
the help tool's execution result. Do **not** use the shortened description as the
|
|
419
|
+
on-demand help response. Artifacts, command registrations, auth and schemas do
|
|
420
|
+
not change. Python/TypeScript code-generation transforms do not support summary
|
|
421
|
+
mode. This is independent of MCP proxy `compressionLevel`; it does not add a new
|
|
422
|
+
standalone CLI flag or change the high-level `CompressorClient` session modes.
|
package/dist/rust_core.d.ts
CHANGED
|
@@ -116,6 +116,10 @@ export interface OAuthStoreEntry {
|
|
|
116
116
|
export declare function listOAuthCredentials(): OAuthStoreEntry[];
|
|
117
117
|
export declare function clearOAuthCredentials(target?: string | null): string[];
|
|
118
118
|
export interface HostTransformPlanConfig {
|
|
119
|
+
/** Model-visible shell help only; commands and full help are unchanged. */
|
|
120
|
+
helpMode?: "full" | "summary";
|
|
121
|
+
/** Optional toolset capability description for summary mode. */
|
|
122
|
+
helpSummary?: string;
|
|
119
123
|
kind: ClientArtifactKind | "just-bash";
|
|
120
124
|
serverName: string;
|
|
121
125
|
tools: ToolSpec[];
|
|
@@ -126,6 +130,8 @@ export interface HostTransformPlanConfig {
|
|
|
126
130
|
sessionPid?: number;
|
|
127
131
|
}
|
|
128
132
|
export interface HostTransformPlan {
|
|
133
|
+
/** Full on-demand help, independent of the model-visible description. */
|
|
134
|
+
helpText: string;
|
|
129
135
|
helpToolName: string;
|
|
130
136
|
helpDescription: string;
|
|
131
137
|
outputDir?: string;
|
package/dist/rust_core.js
CHANGED
|
@@ -138,6 +138,8 @@ export function clearOAuthCredentials(target) {
|
|
|
138
138
|
export function buildHostTransformPlan(config) {
|
|
139
139
|
return JSON.parse(loadNativeCore().buildHostTransformPlanJson(stringify({
|
|
140
140
|
kind: config.kind,
|
|
141
|
+
helpMode: config.helpMode,
|
|
142
|
+
helpSummary: config.helpSummary,
|
|
141
143
|
serverName: config.serverName,
|
|
142
144
|
tools: config.tools.map(toNativeTool),
|
|
143
145
|
outputDir: config.outputDir,
|
package/dist/transforms.d.ts
CHANGED
|
@@ -4,7 +4,13 @@ import { type JustBashCommandRegistration } from "./just_bash_commands.js";
|
|
|
4
4
|
export interface TransformToolOptions extends HostShrinkfitOptions {
|
|
5
5
|
serverName?: string;
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface ShellHelpOptions {
|
|
8
|
+
/** Defaults to full; summary omits the upfront subcommand catalog. */
|
|
9
|
+
helpMode?: "full" | "summary";
|
|
10
|
+
/** Toolset capability summary, used only with helpMode: "summary". */
|
|
11
|
+
helpSummary?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PlanToolsForJustBashOptions extends TransformToolOptions, ShellHelpOptions {
|
|
8
14
|
/**
|
|
9
15
|
* Convert JSON/CSV/YAML tool results to TOON before writing them to stdout.
|
|
10
16
|
* Defaults to ``false`` so Just Bash output matches the generated CLI byte for
|
|
@@ -25,7 +31,7 @@ export interface TransformToolsForCodeModeOptions extends TransformToolOptions {
|
|
|
25
31
|
language: CodeTransformLanguage;
|
|
26
32
|
outputDir?: string;
|
|
27
33
|
}
|
|
28
|
-
export interface TransformToolsForCliModeOptions extends TransformToolOptions {
|
|
34
|
+
export interface TransformToolsForCliModeOptions extends TransformToolOptions, ShellHelpOptions {
|
|
29
35
|
outputDir?: string;
|
|
30
36
|
}
|
|
31
37
|
export interface GeneratedToolTransformResult {
|
package/dist/transforms.js
CHANGED
|
@@ -8,7 +8,13 @@ export function planToolsForJustBash(tools, options = {}) {
|
|
|
8
8
|
const shrinking = shrinkfitTools(tools, options);
|
|
9
9
|
tools = shrinking.tools;
|
|
10
10
|
const toolSpecs = executableToolsToSpecs(tools);
|
|
11
|
-
const plan = buildHostTransformPlan({
|
|
11
|
+
const plan = buildHostTransformPlan({
|
|
12
|
+
kind: "just-bash",
|
|
13
|
+
serverName,
|
|
14
|
+
tools: toolSpecs,
|
|
15
|
+
helpMode: options.helpMode,
|
|
16
|
+
helpSummary: options.helpSummary,
|
|
17
|
+
});
|
|
12
18
|
const registrations = createJustBashCommandRegistrations((plan.justBash?.commands ?? []).map((command) => justBashSource(serverName, command.commandName, command.backendToolName, tools, options.shrinkfit === undefined && (options.toonify ?? false))));
|
|
13
19
|
return {
|
|
14
20
|
registrations,
|
|
@@ -16,7 +22,7 @@ export function planToolsForJustBash(tools, options = {}) {
|
|
|
16
22
|
tools: helpTools({
|
|
17
23
|
name: plan.helpToolName,
|
|
18
24
|
description: plan.helpDescription,
|
|
19
|
-
output: plan.
|
|
25
|
+
output: plan.helpText,
|
|
20
26
|
}),
|
|
21
27
|
};
|
|
22
28
|
}
|
|
@@ -39,6 +45,8 @@ export async function transformToolsForCliMode(tools, options = {}) {
|
|
|
39
45
|
return generatedTransform(tools, {
|
|
40
46
|
shrinkfit: options.shrinkfit,
|
|
41
47
|
kind: "cli",
|
|
48
|
+
helpMode: options.helpMode,
|
|
49
|
+
helpSummary: options.helpSummary,
|
|
42
50
|
serverName,
|
|
43
51
|
outputDir: options.outputDir,
|
|
44
52
|
commandName: serverName,
|
|
@@ -64,6 +72,8 @@ async function generatedTransform(tools, options) {
|
|
|
64
72
|
const bridge = await startLocalToolBridge(tools);
|
|
65
73
|
const plan = buildHostTransformPlan({
|
|
66
74
|
kind: options.kind,
|
|
75
|
+
helpMode: options.helpMode,
|
|
76
|
+
helpSummary: options.helpSummary,
|
|
67
77
|
serverName: options.serverName,
|
|
68
78
|
tools: executableToolsToSpecs(tools),
|
|
69
79
|
outputDir: options.outputDir,
|
|
@@ -80,7 +90,7 @@ async function generatedTransform(tools, options) {
|
|
|
80
90
|
tools: helpTools({
|
|
81
91
|
name: plan.helpToolName,
|
|
82
92
|
description: plan.helpDescription,
|
|
83
|
-
output: plan.
|
|
93
|
+
output: plan.helpText,
|
|
84
94
|
}),
|
|
85
95
|
close: () => {
|
|
86
96
|
shrinking.close();
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/native/index.linux-x64-gnu.node
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 34565744 bytes
|
|
4
|
+
sha256: 0b1036194948f487b1f20406c74da2120b80204477cad5f7134e1aef12c53918
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlassian/mcp-compressor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"description": "TypeScript MCP server wrapper for reducing tokens consumed by MCP tools.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/atlassian-labs/mcp-compressor",
|