pi-rtk-optimizer 0.5.1 → 0.5.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.5.3] - 2026-04-01
11
+
12
+ ### Changed
13
+ - Updated README.md with new background image source URL
14
+ - Aligned npm keywords for better package discoverability
15
+ - Added Related Pi Extensions cross-linking section to README
16
+
17
+ ## [0.5.2] - 2026-04-01
18
+
19
+ ### Changed
20
+ - Updated `@mariozechner/pi-coding-agent` and `@mariozechner/pi-tui` peer dependencies to ^0.64.0
21
+ - Improved RTK note message to guide users through '/rtk' toggle in Pi TUI
22
+
10
23
  ## [0.5.1] - 2026-03-24
11
24
 
12
25
  ### Fixed
package/README.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  > RTK command rewriting and tool output compaction extension for the Pi coding agent.
4
4
 
5
- ![background](https://raw.githubusercontent.com/MasuRii/pi-rtk-optimizer/main/asset/pi-rtk-optimizer-background.png)
5
+ <img width="1360" height="752" alt="image" src="https://github.com/user-attachments/assets/f4536889-62ec-429a-984e-dc0de9f1f709" />
6
+
6
7
 
7
8
  **pi-rtk-optimizer** automatically rewrites `bash` tool commands to their `rtk` equivalents and compacts noisy tool output (`bash`, `read`, `grep`) to reduce context window usage while preserving actionable information for the AI agent.
8
9
 
@@ -287,6 +288,13 @@ Inspired by:
287
288
  - [mcowger/pi-rtk](https://github.com/mcowger/pi-rtk)
288
289
  - [rtk-ai/rtk](https://github.com/rtk-ai/rtk)
289
290
 
291
+ ## Related Pi Extensions
292
+
293
+ - [pi-tool-display](https://github.com/MasuRii/pi-tool-display) — Compact tool rendering and diff visualization
294
+ - [pi-permission-system](https://github.com/MasuRii/pi-permission-system) — Permission enforcement for tool and command access
295
+ - [pi-smart-voice-notify](https://github.com/MasuRii/pi-smart-voice-notify) — Multi-channel TTS and sound notifications
296
+ - [pi-image-tools](https://github.com/MasuRii/pi-image-tools) — Image attachment and inline preview
297
+
290
298
  ## License
291
299
 
292
300
  [MIT](LICENSE) © MasuRii
package/package.json CHANGED
@@ -1,60 +1,64 @@
1
- {
2
- "name": "pi-rtk-optimizer",
3
- "version": "0.5.1",
4
- "description": "Pi extension that optimizes RTK command rewriting and tool output compaction for the coding agent.",
5
- "type": "module",
6
- "main": "./index.ts",
7
- "exports": {
8
- ".": "./index.ts"
9
- },
10
- "files": [
11
- "index.ts",
12
- "src",
13
- "config/config.example.json",
14
- "README.md",
15
- "CHANGELOG.md",
16
- "LICENSE"
17
- ],
18
- "scripts": {
19
- "build": "npx --yes -p typescript@5.7.3 tsc -p tsconfig.json --noCheck",
20
- "lint": "npm run build",
21
- "typecheck": "npx --yes -p typescript@5.7.3 tsc -p tsconfig.json",
22
- "test": "bun ./src/output-compactor-test.ts && bun ./src/command-rewriter-test.ts && bun ./src/runtime-guard-test.ts && bun ./src/additional-coverage-test.ts && bun ./src/config-modal-test.ts && bun ./src/index-test.ts",
23
- "check": "npm run lint && npm run typecheck && npm run test",
24
- "build:check": "bunx esbuild ./index.ts --bundle --platform=node --format=esm --outfile=./.pi-rtk-optimizer-check.mjs --external:@mariozechner/pi-coding-agent --external:@mariozechner/pi-tui && bun -e \"import { unlinkSync } from 'node:fs'; unlinkSync('./.pi-rtk-optimizer-check.mjs');\""
25
- },
26
- "keywords": [
27
- "pi-package",
28
- "pi",
29
- "pi-extension",
30
- "rtk",
31
- "token-optimization",
32
- "tool-compaction",
33
- "coding-agent"
34
- ],
35
- "author": "MasuRii",
36
- "license": "MIT",
37
- "repository": {
38
- "type": "git",
39
- "url": "git+https://github.com/MasuRii/pi-rtk-optimizer.git"
40
- },
41
- "bugs": {
42
- "url": "https://github.com/MasuRii/pi-rtk-optimizer/issues"
43
- },
44
- "homepage": "https://github.com/MasuRii/pi-rtk-optimizer#readme",
45
- "engines": {
46
- "node": ">=20"
47
- },
48
- "publishConfig": {
49
- "access": "public"
50
- },
51
- "pi": {
52
- "extensions": [
53
- "./index.ts"
54
- ]
55
- },
56
- "peerDependencies": {
57
- "@mariozechner/pi-coding-agent": "^0.62.0",
58
- "@mariozechner/pi-tui": "^0.62.0"
59
- }
60
- }
1
+ {
2
+ "name": "pi-rtk-optimizer",
3
+ "version": "0.5.3",
4
+ "description": "Pi extension that optimizes RTK command rewriting and tool output compaction for the coding agent.",
5
+ "type": "module",
6
+ "main": "./index.ts",
7
+ "exports": {
8
+ ".": "./index.ts"
9
+ },
10
+ "files": [
11
+ "index.ts",
12
+ "src",
13
+ "config/config.example.json",
14
+ "README.md",
15
+ "CHANGELOG.md",
16
+ "LICENSE"
17
+ ],
18
+ "scripts": {
19
+ "build": "npx --yes -p typescript@5.7.3 tsc -p tsconfig.json --noCheck",
20
+ "lint": "npm run build",
21
+ "typecheck": "npx --yes -p typescript@5.7.3 tsc -p tsconfig.json",
22
+ "test": "bun ./src/output-compactor-test.ts && bun ./src/command-rewriter-test.ts && bun ./src/runtime-guard-test.ts && bun ./src/additional-coverage-test.ts && bun ./src/config-modal-test.ts && bun ./src/index-test.ts",
23
+ "check": "npm run lint && npm run typecheck && npm run test",
24
+ "build:check": "bunx esbuild ./index.ts --bundle --platform=node --format=esm --outfile=./.pi-rtk-optimizer-check.mjs --external:@mariozechner/pi-coding-agent --external:@mariozechner/pi-tui && bun -e \"import { unlinkSync } from 'node:fs'; unlinkSync('./.pi-rtk-optimizer-check.mjs');\""
25
+ },
26
+ "keywords": [
27
+ "pi-package",
28
+ "pi",
29
+ "pi-extension",
30
+ "pi-coding-agent",
31
+ "coding-agent",
32
+ "rtk",
33
+ "token-optimization",
34
+ "tool-compaction",
35
+ "output-compaction",
36
+ "command-rewrite",
37
+ "optimization"
38
+ ],
39
+ "author": "MasuRii",
40
+ "license": "MIT",
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/MasuRii/pi-rtk-optimizer.git"
44
+ },
45
+ "bugs": {
46
+ "url": "https://github.com/MasuRii/pi-rtk-optimizer/issues"
47
+ },
48
+ "homepage": "https://github.com/MasuRii/pi-rtk-optimizer#readme",
49
+ "engines": {
50
+ "node": ">=20"
51
+ },
52
+ "publishConfig": {
53
+ "access": "public"
54
+ },
55
+ "pi": {
56
+ "extensions": [
57
+ "./index.ts"
58
+ ]
59
+ },
60
+ "peerDependencies": {
61
+ "@mariozechner/pi-coding-agent": "^0.64.0",
62
+ "@mariozechner/pi-tui": "^0.64.0"
63
+ }
64
+ }
package/src/index.ts CHANGED
@@ -28,7 +28,7 @@ function trimMessage(raw: string, maxLength = 220): string {
28
28
  }
29
29
 
30
30
  const SOURCE_FILTER_TROUBLESHOOTING_NOTE =
31
- "RTK note: If file edits repeatedly fail because old text does not match, run '/rtk', turn off 'Read source filtering enabled', re-read the file, apply the edit, then turn it back on.";
31
+ "RTK note: If file edits repeatedly fail because old text does not match, ask the user to manually run '/rtk' in the Pi TUI, disable 'Read source filtering enabled', re-read the file, apply the edit, then ask the user to manually re-enable it in the Pi TUI.";
32
32
 
33
33
  function mergeCompactionDetails(
34
34
  existingDetails: unknown,