@sitrozyi/repomix-semantic-compressor 0.1.2 → 0.1.3

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 (2) hide show
  1. package/README.md +6 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![test](https://github.com/Sitrozyi/repomix-semantic-compressor/actions/workflows/test.yml/badge.svg)](https://github.com/Sitrozyi/repomix-semantic-compressor/actions/workflows/test.yml)
4
4
 
5
- Context compressor for Repomix. On tested repositories it reduces prompt tokens by 45–80% by replacing function bodies while preserving type contracts, interfaces, docstrings, and database schemas ([Benchmark](#benchmark)).
5
+ Context compressor for Repomix. Reduces prompt tokens by 45–70% typically (up to 80%+) by stubbing function bodies while preserving type contracts, interfaces, docstrings, and database schemas ([Benchmark](https://github.com/Sitrozyi/repomix-semantic-compressor#benchmark)).
6
6
 
7
7
  - **TypeScript / JavaScript**: Full AST-based compression via Babel. Function bodies are replaced with `throw new Error(...)` (inferred `never` return type), so strict type checkers pass without `any` escapes. React hook dependency arrays (`useEffect`, `useMemo`) are retained. Constructors and setters are the exception: constructors are emptied while preserving `super()` calls, and setters are emptied, since injecting `throw` there would break class initialization or violate the `set` contract.
8
8
  - **Python / Go**: Line-based function stubbing. Signatures and leading `"""docstrings"""` are preserved; Python bodies become `raise NotImplementedError`, Go bodies become `panic(...)`.
@@ -25,7 +25,7 @@ Context compressor for Repomix. On tested repositories it reduces prompt tokens
25
25
  Run in your repository root. Auto-pack is enabled by default: if `repomix-output.xml` does not exist, it runs `npx repomix` automatically. Pass `--no-auto-pack` to disable this.
26
26
 
27
27
  ```bash
28
- npx repomix-semantic-compressor
28
+ npx @sitrozyi/repomix-semantic-compressor
29
29
  ```
30
30
 
31
31
  ### Options
@@ -39,12 +39,14 @@ npx repomix-semantic-compressor
39
39
  | `-e, --exact-tokens` | Use the exact `cl100k_base` BPE tokenizer instead of byte approximation |
40
40
  | `--no-auto-pack` | Disable automatic Repomix execution if artifact is missing |
41
41
 
42
+ #### 2. Focus Mode(フォーカスモード)
43
+ ```markdown
42
44
  ### Focus Mode
43
45
 
44
46
  Keep full code for the module you are editing and reduce everything else to skeletons or summaries:
45
47
 
46
48
  ```bash
47
- npx repomix-semantic-compressor --focus src/auth -o auth-context.md
49
+ npx @sitrozyi/repomix-semantic-compressor --focus src/auth -o auth-context.md
48
50
  ```
49
51
 
50
52
  Dependency tracing (import resolution, 1-hop dependency skeletons) is currently implemented for TypeScript / JavaScript. Files matching type/contract paths (`types/`, `interfaces/`, `models/`, `schemas/`, `constants/`, `contracts/`, `entities/`, and `*.d.ts`) are transitively followed so that type information stays complete. For Python and Go, Focus Mode still emits full implementations for matched files, but non-focused files are not dependency-resolved.
@@ -58,7 +60,7 @@ Exposes semantic skeleton extraction and file inspection as MCP tools. Add to yo
58
60
  "mcpServers": {
59
61
  "repomix-semantic-compressor": {
60
62
  "command": "npx",
61
- "args": ["-y", "repomix-semantic-compressor", "--mcp"]
63
+ "args": ["-y", "@sitrozyi/repomix-semantic-compressor", "--mcp"]
62
64
  }
63
65
  }
64
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitrozyi/repomix-semantic-compressor",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "AST-powered semantic compressor for Repomix. Drastically reduce LLM context token usage while preserving complete schema integrity and core logic.",
5
5
  "main": "src/core.mjs",
6
6
  "exports": {