@atlassian/mcp-compressor 0.25.0 → 0.26.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.
@@ -6,6 +6,8 @@ export interface TransformToolOptions {
6
6
  export interface TransformToolsForJustBashOptions extends TransformToolOptions {
7
7
  bash: unknown;
8
8
  }
9
+ export interface PlanToolsForJustBashOptions extends TransformToolOptions {
10
+ }
9
11
  export interface JustBashTransformResult {
10
12
  tools: Record<string, ExecutableTool>;
11
13
  registrations: JustBashCommandRegistration[];
@@ -27,6 +29,7 @@ export interface GeneratedToolTransformResult {
27
29
  tools: Record<string, ExecutableTool>;
28
30
  close(): void;
29
31
  }
32
+ export declare function planToolsForJustBash(tools: Record<string, ExecutableTool<unknown>>, options?: PlanToolsForJustBashOptions): JustBashTransformResult;
30
33
  export declare function transformToolsForJustBash(tools: Record<string, ExecutableTool<unknown>>, options: TransformToolsForJustBashOptions): JustBashTransformResult;
31
34
  export declare function transformToolsForCodeMode(tools: Record<string, ExecutableTool<unknown>>, options: TransformToolsForCodeModeOptions): Promise<GeneratedToolTransformResult>;
32
35
  export declare function transformToolsForCliMode(tools: Record<string, ExecutableTool<unknown>>, options?: TransformToolsForCliModeOptions): Promise<GeneratedToolTransformResult>;
@@ -2,12 +2,11 @@ import { createJustBashCommandRegistrations, installJustBashRegistrations, } fro
2
2
  import { startLocalToolBridge } from "./local_tool_bridge.js";
3
3
  import { buildHostTransformPlan, normalizeHostToolResult, } from "./rust_core.js";
4
4
  import { executableToolToSpec, executableToolsToSpecs, normalizeServerName } from "./tool_specs.js";
5
- export function transformToolsForJustBash(tools, options) {
5
+ export function planToolsForJustBash(tools, options = {}) {
6
6
  const serverName = normalizeServerName(options.serverName);
7
7
  const toolSpecs = executableToolsToSpecs(tools);
8
8
  const plan = buildHostTransformPlan({ kind: "just-bash", serverName, tools: toolSpecs });
9
9
  const registrations = createJustBashCommandRegistrations((plan.justBash?.commands ?? []).map((command) => justBashSource(serverName, command.commandName, command.backendToolName, tools)));
10
- installJustBashRegistrations(options.bash, registrations);
11
10
  return {
12
11
  registrations,
13
12
  tools: helpTools({
@@ -17,6 +16,11 @@ export function transformToolsForJustBash(tools, options) {
17
16
  }),
18
17
  };
19
18
  }
19
+ export function transformToolsForJustBash(tools, options) {
20
+ const result = planToolsForJustBash(tools, options);
21
+ installJustBashRegistrations(options.bash, result.registrations);
22
+ return result;
23
+ }
20
24
  export async function transformToolsForCodeMode(tools, options) {
21
25
  const serverName = normalizeServerName(options.serverName);
22
26
  return generatedTransform(tools, {
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlassian/mcp-compressor",
3
- "version": "0.25.0",
3
+ "version": "0.26.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",