pi-rtk-optimizer 0.3.2 → 0.4.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 CHANGED
@@ -1,283 +1,292 @@
1
- # pi-rtk-optimizer
2
-
3
- > RTK command rewriting and tool output compaction extension for the Pi coding agent.
4
-
5
- ![background](https://raw.githubusercontent.com/MasuRii/pi-rtk-optimizer/main/asset/pi-rtk-optimizer-background.png)
6
-
7
- **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
- ## Features
10
-
11
- ### Command Rewriting
12
-
13
- - **Automatic rewriting** or **suggestion-only** mode for common development workflows
14
- - Supported command categories:
15
- - **Git/GitHub** — `git`, `gh` commands
16
- - **Filesystem** — `cat`, `head`, `tail`, `grep`, `rg`, `ls`, `tree`, `find`, `diff`, `wc`, `bash`, `cmd`, `powershell`
17
- - **Rust** — `cargo` commands
18
- - **JavaScript** — `vitest`, `npm`, `yarn`, `pnpm`, `bun` commands
19
- - **Python** — `pytest`, `python`, `pip`, `uv` commands
20
- - **Go** — `go` commands
21
- - **Containers** — `docker`, `docker-compose`, `podman` commands
22
- - **Network** — `curl`, `wget` commands
23
- - **Package Managers** — `apt`, `brew`, `dnf`, `pacman`, `yum` commands
24
- - Runtime guard when `rtk` binary is unavailable (falls back to original commands)
25
-
26
- ### Output Compaction Pipeline
27
-
28
- Multi-stage pipeline to reduce token consumption:
29
-
30
- | Stage | Description |
31
- |-------|-------------|
32
- | ANSI Stripping | Removes terminal color/formatting codes |
33
- | Test Aggregation | Summarizes test runner output (pass/fail counts) |
34
- | Build Filtering | Extracts errors/warnings from build output |
35
- | Git Compaction | Condenses `git status`, `git log`, `git diff` output |
36
- | Linter Aggregation | Summarizes linting tool output |
37
- | Search Grouping | Groups `grep`/`rg` results by file |
38
- | Source Code Filtering | `none`, `minimal`, or `aggressive` comment/whitespace removal |
39
- | Smart Truncation | Preserves file boundaries and important lines |
40
- | Hard Truncation | Final character limit enforcement |
41
-
42
- ### Interactive Settings
43
-
44
- - TUI settings modal via `/rtk` command
45
- - Real-time configuration changes without restart
46
- - Command completions for all subcommands
47
-
48
- ### Session Metrics
49
-
50
- - Tracks compaction savings per tool type
51
- - View statistics with `/rtk stats`
52
-
53
- ## Installation
54
-
55
- ### Local Extension Folder
56
-
57
- Place this folder in one of the following locations:
58
-
59
- ```
60
- ~/.pi/agent/extensions/pi-rtk-optimizer # Global (all projects)
61
- .pi/extensions/pi-rtk-optimizer # Project-specific
62
- ```
63
-
64
- Pi auto-discovers extensions in these paths on startup.
65
-
66
- ### npm Package
67
-
68
- ```bash
69
- pi install npm:pi-rtk-optimizer
70
- ```
71
-
72
- ### Git Repository
73
-
74
- ```bash
75
- pi install git:github.com/MasuRii/pi-rtk-optimizer
76
- ```
77
-
78
- ## Usage
79
-
80
- ### Settings Modal
81
-
82
- Open the interactive settings modal:
83
-
84
- ```
85
- /rtk
86
- ```
87
-
88
- Use arrow keys to navigate settings, Enter to cycle values, and Escape to close.
89
-
90
- ### Subcommands
91
-
92
- | Command | Description |
93
- |---------|-------------|
94
- | `/rtk` | Open settings modal |
95
- | `/rtk show` | Display current configuration and runtime status |
96
- | `/rtk path` | Show config file path |
97
- | `/rtk verify` | Check if `rtk` binary is available |
98
- | `/rtk stats` | Show output compaction metrics for current session |
99
- | `/rtk clear-stats` | Reset compaction metrics |
100
- | `/rtk reset` | Reset all settings to defaults |
101
- | `/rtk help` | Display usage help |
102
-
103
- ## Configuration
104
-
105
- Configuration is stored at:
106
-
107
- ```
108
- ~/.pi/agent/extensions/pi-rtk-optimizer/config.json
109
- ```
110
-
111
- A starter template is included at `config/config.example.json`.
112
-
113
- ### Configuration Options
114
-
115
- #### Top-Level Settings
116
-
117
- | Option | Type | Default | Description |
118
- |--------|------|---------|-------------|
119
- | `enabled` | boolean | `true` | Master switch for all extension features |
120
- | `mode` | string | `"rewrite"` | `"rewrite"` (auto-rewrite) or `"suggest"` (notify only) |
121
- | `guardWhenRtkMissing` | boolean | `true` | Run original commands when rtk binary unavailable |
122
- | `showRewriteNotifications` | boolean | `true` | Show rewrite notices in TUI |
123
-
124
- #### Rewrite Category Toggles
125
-
126
- | Option | Default | Commands Affected |
127
- |--------|---------|-------------------|
128
- | `rewriteGitGithub` | `true` | `git`, `gh` |
129
- | `rewriteFilesystem` | `true` | `cat`, `head`, `tail`, `grep`, `rg`, `ls`, `tree`, `find`, `diff`, `wc` |
130
- | `rewriteRust` | `true` | `cargo` |
131
- | `rewriteJavaScript` | `true` | `vitest`, `npm`, `yarn`, `pnpm`, `bun` |
132
- | `rewritePython` | `true` | `pytest`, `python`, `pip`, `uv` |
133
- | `rewriteGo` | `true` | `go` |
134
- | `rewriteContainers` | `true` | `docker`, `docker-compose`, `podman` |
135
- | `rewriteNetwork` | `true` | `curl`, `wget` |
136
- | `rewritePackageManagers` | `true` | `apt`, `brew`, `dnf`, `pacman`, `yum` |
137
-
138
- #### Output Compaction Settings
139
-
140
- | Option | Type | Default | Description |
141
- |--------|------|---------|-------------|
142
- | `outputCompaction.enabled` | boolean | `true` | Enable output compaction pipeline |
143
- | `outputCompaction.stripAnsi` | boolean | `true` | Remove ANSI escape codes |
144
- | `outputCompaction.sourceCodeFilteringEnabled` | boolean | `true` | Enable source code filtering for `read` output |
145
- | `outputCompaction.sourceCodeFiltering` | string | `"minimal"` | Filter level: `"none"`, `"minimal"`, `"aggressive"` |
146
- | `outputCompaction.aggregateTestOutput` | boolean | `true` | Summarize test runner output |
147
- | `outputCompaction.filterBuildOutput` | boolean | `true` | Filter build/compile output |
148
- | `outputCompaction.compactGitOutput` | boolean | `true` | Compact git command output |
149
- | `outputCompaction.aggregateLinterOutput` | boolean | `true` | Summarize linter output |
150
- | `outputCompaction.groupSearchOutput` | boolean | `true` | Group search results by file |
151
- | `outputCompaction.trackSavings` | boolean | `true` | Track compaction metrics |
152
-
153
- #### Truncation Settings
154
-
155
- | Option | Type | Default | Range | Description |
156
- |--------|------|---------|-------|-------------|
157
- | `outputCompaction.smartTruncate.enabled` | boolean | `true` | — | Enable smart line-based truncation |
158
- | `outputCompaction.smartTruncate.maxLines` | number | `220` | 40–4000 | Maximum lines after smart truncation |
159
- | `outputCompaction.truncate.enabled` | boolean | `true` | — | Enable hard character truncation |
160
- | `outputCompaction.truncate.maxChars` | number | `12000` | 1000–200000 | Maximum characters in final output |
161
-
162
- ### Source Code Filtering Levels
163
-
164
- | Level | Behavior |
165
- |-------|----------|
166
- | `none` | No filtering applied |
167
- | `minimal` | Removes non-doc comments, collapses blank lines |
168
- | `aggressive` | Also removes imports, keeps only signatures and key logic |
169
-
170
- > **Note:** If file edits fail because "old text does not match," disable source filtering via `/rtk`, re-read the file, apply the edit, then re-enable filtering.
171
-
172
- ### Example Configuration
173
-
174
- ```json
175
- {
176
- "enabled": true,
177
- "mode": "rewrite",
178
- "guardWhenRtkMissing": true,
179
- "showRewriteNotifications": true,
180
- "rewriteGitGithub": true,
181
- "rewriteFilesystem": true,
182
- "rewriteRust": true,
183
- "rewriteJavaScript": true,
184
- "rewritePython": true,
185
- "rewriteGo": true,
186
- "rewriteContainers": true,
187
- "rewriteNetwork": true,
188
- "rewritePackageManagers": true,
189
- "outputCompaction": {
190
- "enabled": true,
191
- "stripAnsi": true,
192
- "sourceCodeFilteringEnabled": true,
193
- "sourceCodeFiltering": "minimal",
194
- "aggregateTestOutput": true,
195
- "filterBuildOutput": true,
196
- "compactGitOutput": true,
197
- "aggregateLinterOutput": true,
198
- "groupSearchOutput": true,
199
- "trackSavings": true,
200
- "smartTruncate": {
201
- "enabled": true,
202
- "maxLines": 220
203
- },
204
- "truncate": {
205
- "enabled": true,
206
- "maxChars": 12000
207
- }
208
- }
209
- }
210
- ```
211
-
212
- ## Technical Details
213
-
214
- ### Architecture
215
-
216
- ```
217
- index.ts # Pi auto-discovery entrypoint
218
- src/
219
- ├── index.ts # Extension bootstrap and event wiring
220
- ├── config-store.ts # Config load/save with normalization
221
- ├── config-modal.ts # TUI settings modal and /rtk handler
222
- ├── command-rewriter.ts # Command tokenization and rewrite logic
223
- ├── rewrite-rules.ts # Rewrite rule catalog
224
- ├── output-compactor.ts # Tool result compaction pipeline
225
- ├── output-metrics.ts # Savings tracking and reporting
226
- ├── command-completions.ts # /rtk subcommand completions
227
- ├── windows-command-helpers.ts # Windows bash compatibility
228
- └── techniques/ # Compaction technique implementations
229
- ├── ansi.ts # ANSI code stripping
230
- ├── build.ts # Build output filtering
231
- ├── test-output.ts # Test output aggregation
232
- ├── linter.ts # Linter output aggregation
233
- ├── git.ts # Git output compaction
234
- ├── search.ts # Search result grouping
235
- ├── source.ts # Source code filtering
236
- └── truncate.ts # Smart and hard truncation
237
- ```
238
-
239
- ### Event Hooks
240
-
241
- The extension hooks into Pi's event system:
242
-
243
- - **`beforeToolCall`** — Rewrites bash commands to rtk equivalents
244
- - **`afterToolResult`** — Compacts tool output before context consumption
245
- - **`command`** — Handles `/rtk` command and subcommands
246
-
247
- ### Windows Compatibility
248
-
249
- Automatic fixes applied on Windows:
250
-
251
- - `cd /d <path>` `cd "<normalized-path>"` (converts backslashes)
252
- - Prepends `PYTHONIOENCODING=utf-8` for Python commands
253
-
254
- ### Dependencies
255
-
256
- - **Peer dependencies:** `@mariozechner/pi-coding-agent`, `@mariozechner/pi-tui`
257
- - **Runtime:** Node.js ≥20, optional `rtk` binary for command rewriting
258
-
259
- ## Development
260
-
261
- ```bash
262
- # Build (TypeScript compilation)
263
- npm run build
264
-
265
- # Lint
266
- npm run lint
267
-
268
- # Run tests
269
- npm run test
270
-
271
- # Full check (lint + test)
272
- npm run check
273
- ```
274
-
275
- ## Credits
276
-
277
- Inspired by:
278
- - [mcowger/pi-rtk](https://github.com/mcowger/pi-rtk)
279
- - [rtk-ai/rtk](https://github.com/rtk-ai/rtk)
280
-
281
- ## License
282
-
283
- [MIT](LICENSE) © MasuRii
1
+ # pi-rtk-optimizer
2
+
3
+ > RTK command rewriting and tool output compaction extension for the Pi coding agent.
4
+
5
+ ![background](https://raw.githubusercontent.com/MasuRii/pi-rtk-optimizer/main/asset/pi-rtk-optimizer-background.png)
6
+
7
+ **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
+ ## Features
10
+
11
+ ### Command Rewriting
12
+
13
+ - **Automatic rewriting** or **suggestion-only** mode for common development workflows
14
+ - Supported command categories:
15
+ - **Git/GitHub** — `git`, `gh` commands
16
+ - **Filesystem** — `cat`, `head`, `tail`, `grep`, `rg`, `ls`, `tree`, `find`, `diff`, `wc`, `bash`, `cmd`, `powershell`
17
+ - **Rust** — `cargo` commands
18
+ - **JavaScript** — `vitest`, `npm`, `yarn`, `pnpm`, `bun` commands
19
+ - **Python** — `pytest`, `python`, `pip`, `uv` commands
20
+ - **Go** — `go` commands
21
+ - **Containers** — `docker`, `docker-compose`, `podman` commands
22
+ - **Network** — `curl`, `wget` commands
23
+ - **Package Managers** — `apt`, `brew`, `dnf`, `pacman`, `yum` commands
24
+ - Runtime guard when `rtk` binary is unavailable (falls back to original commands only in rewrite mode)
25
+ - Safe rewrite bypasses for structured `gh` output commands and non-interactive container shell sessions
26
+ - Improved command parsing for `sed`, shell separators, and `pnpm dlx` proxy rewrites
27
+
28
+ ### Output Compaction Pipeline
29
+
30
+ Multi-stage pipeline to reduce token consumption:
31
+
32
+ | Stage | Description |
33
+ |-------|-------------|
34
+ | ANSI Stripping | Removes terminal color/formatting codes |
35
+ | Test Aggregation | Summarizes test runner output (pass/fail counts) |
36
+ | Build Filtering | Extracts errors/warnings from build output |
37
+ | Git Compaction | Condenses `git status`, `git log`, `git diff` output |
38
+ | Linter Aggregation | Summarizes linting tool output |
39
+ | Search Grouping | Groups `grep`/`rg` results by file |
40
+ | Source Code Filtering | `none`, `minimal`, or `aggressive` comment/whitespace removal with userscript metadata preservation |
41
+ | Smart Truncation | Preserves file boundaries and important lines while keeping 80-line reads exact |
42
+ | Hard Truncation | Final character limit enforcement |
43
+
44
+ ### Interactive Settings
45
+
46
+ - TUI settings modal via `/rtk` command
47
+ - Real-time configuration changes without restart
48
+ - Command completions for all subcommands
49
+
50
+ ### Session Metrics
51
+
52
+ - Tracks compaction savings per tool type
53
+ - View statistics with `/rtk stats`
54
+
55
+ ## Installation
56
+
57
+ ### Local Extension Folder
58
+
59
+ Place this folder in one of the following locations:
60
+
61
+ ```
62
+ ~/.pi/agent/extensions/pi-rtk-optimizer # Global (all projects)
63
+ .pi/extensions/pi-rtk-optimizer # Project-specific
64
+ ```
65
+
66
+ Pi auto-discovers extensions in these paths on startup.
67
+
68
+ ### npm Package
69
+
70
+ ```bash
71
+ pi install npm:pi-rtk-optimizer
72
+ ```
73
+
74
+ ### Git Repository
75
+
76
+ ```bash
77
+ pi install git:github.com/MasuRii/pi-rtk-optimizer
78
+ ```
79
+
80
+ ## Usage
81
+
82
+ ### Settings Modal
83
+
84
+ Open the interactive settings modal:
85
+
86
+ ```
87
+ /rtk
88
+ ```
89
+
90
+ Use arrow keys to navigate settings, Enter to cycle values, and Escape to close.
91
+
92
+ ### Subcommands
93
+
94
+ | Command | Description |
95
+ |---------|-------------|
96
+ | `/rtk` | Open settings modal |
97
+ | `/rtk show` | Display current configuration and runtime status |
98
+ | `/rtk path` | Show config file path |
99
+ | `/rtk verify` | Check if `rtk` binary is available |
100
+ | `/rtk stats` | Show output compaction metrics for current session |
101
+ | `/rtk clear-stats` | Reset compaction metrics |
102
+ | `/rtk reset` | Reset all settings to defaults |
103
+ | `/rtk help` | Display usage help |
104
+
105
+ ## Configuration
106
+
107
+ Configuration is stored at:
108
+
109
+ ```
110
+ ~/.pi/agent/extensions/pi-rtk-optimizer/config.json
111
+ ```
112
+
113
+ A starter template is included at `config/config.example.json`.
114
+
115
+ ### Configuration Options
116
+
117
+ #### Top-Level Settings
118
+
119
+ | Option | Type | Default | Description |
120
+ |--------|------|---------|-------------|
121
+ | `enabled` | boolean | `true` | Master switch for all extension features |
122
+ | `mode` | string | `"rewrite"` | `"rewrite"` (auto-rewrite) or `"suggest"` (notify only) |
123
+ | `guardWhenRtkMissing` | boolean | `true` | Run original commands when rtk binary unavailable |
124
+ | `showRewriteNotifications` | boolean | `true` | Show rewrite notices in TUI |
125
+
126
+ #### Rewrite Category Toggles
127
+
128
+ | Option | Default | Commands Affected |
129
+ |--------|---------|-------------------|
130
+ | `rewriteGitGithub` | `true` | `git`, `gh` |
131
+ | `rewriteFilesystem` | `true` | `cat`, `head`, `tail`, `grep`, `rg`, `ls`, `tree`, `find`, `diff`, `wc` |
132
+ | `rewriteRust` | `true` | `cargo` |
133
+ | `rewriteJavaScript` | `true` | `vitest`, `npm`, `yarn`, `pnpm`, `bun` |
134
+ | `rewritePython` | `true` | `pytest`, `python`, `pip`, `uv` |
135
+ | `rewriteGo` | `true` | `go` |
136
+ | `rewriteContainers` | `true` | `docker`, `docker-compose`, `podman` |
137
+ | `rewriteNetwork` | `true` | `curl`, `wget` |
138
+ | `rewritePackageManagers` | `true` | `apt`, `brew`, `dnf`, `pacman`, `yum` |
139
+
140
+ #### Output Compaction Settings
141
+
142
+ | Option | Type | Default | Description |
143
+ |--------|------|---------|-------------|
144
+ | `outputCompaction.enabled` | boolean | `true` | Enable output compaction pipeline |
145
+ | `outputCompaction.stripAnsi` | boolean | `true` | Remove ANSI escape codes |
146
+ | `outputCompaction.sourceCodeFilteringEnabled` | boolean | `true` | Enable source code filtering for `read` output |
147
+ | `outputCompaction.preserveExactSkillReads` | boolean | `false` | Keep reads under Pi skill directories exact, bypassing read compaction |
148
+ | `outputCompaction.sourceCodeFiltering` | string | `"minimal"` | Filter level: `"none"`, `"minimal"`, `"aggressive"` |
149
+ | `outputCompaction.aggregateTestOutput` | boolean | `true` | Summarize test runner output |
150
+ | `outputCompaction.filterBuildOutput` | boolean | `true` | Filter build/compile output |
151
+ | `outputCompaction.compactGitOutput` | boolean | `true` | Compact git command output |
152
+ | `outputCompaction.aggregateLinterOutput` | boolean | `true` | Summarize linter output |
153
+ | `outputCompaction.groupSearchOutput` | boolean | `true` | Group search results by file |
154
+ | `outputCompaction.trackSavings` | boolean | `true` | Track compaction metrics |
155
+
156
+ #### Truncation Settings
157
+
158
+ | Option | Type | Default | Range | Description |
159
+ |--------|------|---------|-------|-------------|
160
+ | `outputCompaction.smartTruncate.enabled` | boolean | `true` | | Enable smart line-based truncation |
161
+ | `outputCompaction.smartTruncate.maxLines` | number | `220` | 40–4000 | Maximum lines after smart truncation |
162
+ | `outputCompaction.truncate.enabled` | boolean | `true` | — | Enable hard character truncation |
163
+ | `outputCompaction.truncate.maxChars` | number | `12000` | 1000–200000 | Maximum characters in final output |
164
+
165
+ ### Source Code Filtering Levels
166
+
167
+ | Level | Behavior |
168
+ |-------|----------|
169
+ | `none` | No filtering applied |
170
+ | `minimal` | Removes non-doc comments, collapses blank lines |
171
+ | `aggressive` | Also removes imports, keeps only signatures and key logic |
172
+
173
+ > **Note:** If file edits fail because "old text does not match," disable source filtering via `/rtk`, re-read the file, apply the edit, then re-enable filtering.
174
+
175
+ ### Example Configuration
176
+
177
+ ```json
178
+ {
179
+ "enabled": true,
180
+ "mode": "rewrite",
181
+ "guardWhenRtkMissing": true,
182
+ "showRewriteNotifications": true,
183
+ "rewriteGitGithub": true,
184
+ "rewriteFilesystem": true,
185
+ "rewriteRust": true,
186
+ "rewriteJavaScript": true,
187
+ "rewritePython": true,
188
+ "rewriteGo": true,
189
+ "rewriteContainers": true,
190
+ "rewriteNetwork": true,
191
+ "rewritePackageManagers": true,
192
+ "outputCompaction": {
193
+ "enabled": true,
194
+ "stripAnsi": true,
195
+ "sourceCodeFilteringEnabled": true,
196
+ "preserveExactSkillReads": false,
197
+ "sourceCodeFiltering": "minimal",
198
+ "aggregateTestOutput": true,
199
+ "filterBuildOutput": true,
200
+ "compactGitOutput": true,
201
+ "aggregateLinterOutput": true,
202
+ "groupSearchOutput": true,
203
+ "trackSavings": true,
204
+ "smartTruncate": {
205
+ "enabled": true,
206
+ "maxLines": 220
207
+ },
208
+ "truncate": {
209
+ "enabled": true,
210
+ "maxChars": 12000
211
+ }
212
+ }
213
+ }
214
+ ```
215
+
216
+ ## Technical Details
217
+
218
+ ### Architecture
219
+
220
+ ```
221
+ index.ts # Pi auto-discovery entrypoint
222
+ src/
223
+ ├── index.ts # Extension bootstrap and event wiring
224
+ ├── config-store.ts # Config load/save with normalization
225
+ ├── config-modal.ts # TUI settings modal and /rtk handler
226
+ ├── command-rewriter.ts # Command tokenization and rewrite logic
227
+ ├── rewrite-bypass.ts # Rewrite safety bypass rules for interactive/structured commands
228
+ ├── rewrite-rules.ts # Rewrite rule catalog
229
+ ├── runtime-guard.ts # Runtime availability guard helpers for rewrite mode
230
+ ├── output-compactor.ts # Tool result compaction pipeline
231
+ ├── output-metrics.ts # Savings tracking and reporting
232
+ ├── command-completions.ts # /rtk subcommand completions
233
+ ├── windows-command-helpers.ts # Windows bash compatibility
234
+ └── techniques/ # Compaction technique implementations
235
+ ├── ansi.ts # ANSI code stripping
236
+ ├── build.ts # Build output filtering
237
+ ├── test-output.ts # Test output aggregation
238
+ ├── linter.ts # Linter output aggregation
239
+ ├── git.ts # Git output compaction
240
+ ├── search.ts # Search result grouping
241
+ ├── source.ts # Source code filtering
242
+ └── truncate.ts # Smart and hard truncation
243
+ ```
244
+
245
+ ### Event Hooks
246
+
247
+ The extension hooks into Pi's event system:
248
+
249
+ - **`beforeToolCall`** Rewrites bash commands to rtk equivalents
250
+ - **`afterToolResult`** — Compacts tool output before context consumption
251
+ - **`command`** Handles `/rtk` command and subcommands
252
+
253
+ ### Windows Compatibility
254
+
255
+ Automatic fixes applied on Windows:
256
+
257
+ - `cd /d <path>` `cd "<normalized-path>"` (converts backslashes)
258
+ - Prepends `PYTHONIOENCODING=utf-8` for Python commands
259
+
260
+ ### Dependencies
261
+
262
+ - **Peer dependencies:** `@mariozechner/pi-coding-agent`, `@mariozechner/pi-tui`
263
+ - **Runtime:** Node.js ≥20, optional `rtk` binary for command rewriting
264
+
265
+ ## Development
266
+
267
+ ```bash
268
+ # Build
269
+ npm run build
270
+
271
+ # Full typecheck
272
+ npm run typecheck
273
+
274
+ # Run tests
275
+ npm run test
276
+
277
+ # Full verification
278
+ npm run check
279
+
280
+ # Bundle sanity check
281
+ npm run build:check
282
+ ```
283
+
284
+ ## Credits
285
+
286
+ Inspired by:
287
+ - [mcowger/pi-rtk](https://github.com/mcowger/pi-rtk)
288
+ - [rtk-ai/rtk](https://github.com/rtk-ai/rtk)
289
+
290
+ ## License
291
+
292
+ [MIT](LICENSE) © MasuRii