pi-rtk-optimizer 0.3.3 → 0.5.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/CHANGELOG.md +102 -67
- package/README.md +292 -290
- package/config/config.example.json +36 -35
- package/package.json +4 -4
- package/src/additional-coverage-test.ts +278 -0
- package/src/boolean-format.ts +3 -0
- package/src/command-rewriter-test.ts +160 -120
- package/src/command-rewriter.ts +594 -585
- package/src/config-modal-test.ts +168 -0
- package/src/config-modal.ts +613 -600
- package/src/config-store.ts +224 -217
- package/src/index-test.ts +54 -0
- package/src/index.ts +410 -289
- package/src/output-compactor-test.ts +500 -158
- package/src/output-compactor.ts +432 -349
- package/src/record-utils.ts +6 -0
- package/src/rewrite-bypass.ts +332 -173
- package/src/rewrite-pipeline-safety.ts +154 -0
- package/src/rewrite-rules.ts +255 -255
- package/src/rtk-command-environment.ts +64 -0
- package/src/runtime-guard-test.ts +42 -50
- package/src/runtime-guard.ts +14 -14
- package/src/techniques/build.ts +155 -155
- package/src/techniques/emoji.ts +91 -0
- package/src/techniques/git.ts +231 -229
- package/src/techniques/index.ts +10 -16
- package/src/techniques/linter.ts +151 -161
- package/src/techniques/path-utils.ts +67 -0
- package/src/techniques/rtk.ts +136 -0
- package/src/techniques/search.ts +67 -76
- package/src/techniques/source.ts +253 -253
- package/src/techniques/test-output.ts +172 -172
- package/src/test-helpers.ts +10 -0
- package/src/tool-execution-sanitizer.ts +69 -0
- package/src/types-shims.d.ts +192 -183
- package/src/types.ts +103 -114
- package/src/zellij-modal.ts +1001 -1001
- package/src/compat-commands.ts +0 -207
package/CHANGELOG.md
CHANGED
|
@@ -1,67 +1,102 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [Unreleased]
|
|
9
|
-
|
|
10
|
-
## [0.
|
|
11
|
-
|
|
12
|
-
### Added
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
## [0.
|
|
46
|
-
|
|
47
|
-
###
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- Updated
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.5.0] - 2026-03-23
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- RTK_DB_PATH environment variable support for rewritten commands — enables RTK history database isolation per session
|
|
14
|
+
- Tool execution sanitizer to strip RTK self-diagnostics from streamed bash results before TUI rendering
|
|
15
|
+
- Tracking of active bash commands by tool call ID for output sanitization
|
|
16
|
+
- `rtk-command-environment.ts` module for platform-specific temp directory resolution and shell-safe quoting
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- Updated `@mariozechner/pi-coding-agent` and `@mariozechner/pi-tui` peer dependencies to ^0.62.0
|
|
20
|
+
- Simplified RTK hook warning detection — removed unused command-specific patterns and consolidated detection logic
|
|
21
|
+
- Focus on canonical hook warning messages that RTK emits
|
|
22
|
+
- Updated tests to verify simplified behavior and ensure non-hook RTK output is preserved verbatim
|
|
23
|
+
|
|
24
|
+
### Tests
|
|
25
|
+
- Added additional coverage tests for edge cases
|
|
26
|
+
- Added tests for output compactor behavior with RTK diagnostics
|
|
27
|
+
- Added tests for emoji stripping in RTK output
|
|
28
|
+
|
|
29
|
+
## [0.4.0] - 2026-03-12
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
- Command rewrite bypass system with safety patterns for dangerous operations
|
|
33
|
+
- `shouldBypassWholeCommandRewrite` to prevent rewriting of unsafe compound commands
|
|
34
|
+
- Bypass patterns for `find`, `grep`, `rg`, `ls` with action detection
|
|
35
|
+
- Inline command flag detection for `bash`, `powershell`, and `cmd` shells
|
|
36
|
+
- `path-utils` module for cross-technique path handling
|
|
37
|
+
- Comprehensive test coverage with shared test helpers
|
|
38
|
+
- Additional coverage tests for edge cases
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
- Extended `rewrite-bypass` with bypass patterns for interactive container shells
|
|
42
|
+
- Improved command rewriter test coverage
|
|
43
|
+
- Removed deprecated `compat-commands` module
|
|
44
|
+
|
|
45
|
+
## [0.3.3] - 2026-03-07
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
- Added rewrite bypass rules for structured `gh` output commands and non-interactive container shell sessions.
|
|
49
|
+
- Added dedicated runtime guard helpers and test coverage for rewrite-mode availability behavior.
|
|
50
|
+
- Added repository lockfile plus additional command rewriter and runtime guard tests.
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
- Updated README documentation to reflect rewrite bypass behavior, runtime guard semantics, source filtering details, and expanded development verification commands.
|
|
54
|
+
- Added a dedicated `typecheck` script and expanded `check` to run typecheck plus the full test suite.
|
|
55
|
+
- Routed `pnpm dlx` commands through the RTK proxy path instead of the generic pnpm wrapper.
|
|
56
|
+
|
|
57
|
+
### Fixed
|
|
58
|
+
- Improved command tokenization so `sed` scripts, shell separators, redirects, and background operators do not break later rewrites.
|
|
59
|
+
- Preserved exact `read` output at the 80-line smart-truncation threshold instead of compacting boundary-sized results.
|
|
60
|
+
- Preserved userscript metadata blocks during source filtering.
|
|
61
|
+
- Limited RTK-missing command suppression to rewrite mode so suggest mode still produces guidance.
|
|
62
|
+
|
|
63
|
+
## [0.3.2] - 2026-03-04
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
- Use absolute GitHub raw URL for README image to fix npm display
|
|
67
|
+
|
|
68
|
+
## [0.3.1] - 2026-03-04
|
|
69
|
+
|
|
70
|
+
### Changed
|
|
71
|
+
- Rewrote README.md with professional documentation standards
|
|
72
|
+
- Added comprehensive feature documentation, configuration reference, and usage examples
|
|
73
|
+
|
|
74
|
+
## [0.3.0] - 2026-03-02
|
|
75
|
+
|
|
76
|
+
### Changed
|
|
77
|
+
- Renamed extension/package from `rtk-integration` to `pi-rtk-optimizer` to better reflect its full purpose: RTK command rewrite plus tool-output compaction optimization.
|
|
78
|
+
- Updated extension identity references across config path resolution, modal UI labeling, installation commands, package metadata, and build check artifact naming.
|
|
79
|
+
|
|
80
|
+
## [0.2.0] - 2026-03-02
|
|
81
|
+
|
|
82
|
+
### Changed
|
|
83
|
+
- Reorganized extension into a publish-ready package layout:
|
|
84
|
+
- moved implementation modules into `src/`
|
|
85
|
+
- kept root `index.ts` as stable Pi auto-discovery entrypoint
|
|
86
|
+
- added `config/config.example.json` for distributable config starter
|
|
87
|
+
- Vendored modal UI dependency as `src/zellij-modal.ts` so the package no longer depends on sibling extension paths.
|
|
88
|
+
- Updated TypeScript project includes for the new modular layout.
|
|
89
|
+
|
|
90
|
+
### Added
|
|
91
|
+
- Public repository scaffolding:
|
|
92
|
+
- `README.md`
|
|
93
|
+
- `CHANGELOG.md`
|
|
94
|
+
- `LICENSE`
|
|
95
|
+
- `.gitignore`
|
|
96
|
+
- `.npmignore`
|
|
97
|
+
- Distribution metadata in `package.json`:
|
|
98
|
+
- `description`, `keywords`, `files`, `engines`, `publishConfig`, repository links
|
|
99
|
+
- standard `build`, `lint`, `test`, and `check` scripts
|
|
100
|
+
- Credits section referencing upstream inspiration projects:
|
|
101
|
+
- `mcowger/pi-rtk`
|
|
102
|
+
- `rtk-ai/rtk`
|