@xynogen/pix-optimizer 1.1.27 → 1.1.29

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/package.json +2 -2
  2. package/src/rtk.ts +7 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-optimizer",
3
- "version": "1.1.27",
3
+ "version": "1.1.29",
4
4
  "description": "Performance optimization suite for Pi Coding Agent - caveman mode + RTK tool rewriting + ponytail lazy-dev mode",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "files": [
11
11
  "src",
12
- "!src/**/*.test.ts",
12
+ "!src/**/*.test.*",
13
13
  "README.md",
14
14
  "LICENSE"
15
15
  ],
package/src/rtk.ts CHANGED
@@ -90,15 +90,6 @@ export function applyRtkRewrite(
90
90
  return true;
91
91
  }
92
92
 
93
- const RTK_SYSTEM_PROMPT = `# RTK — token-optimized command wrapper
94
-
95
- Prefix shell commands with \`rtk\` (e.g. \`rtk git status\`). RTK compacts output for git, gh, cargo, npm/pnpm/yarn/bun, tsc, lint, vitest/jest/playwright, docker, kubectl, ls, grep, prisma — and passes anything else through unchanged, so it's always safe.
96
-
97
- Prefix EVERY segment in a chain, not just the first:
98
- \`rtk git add . && rtk git commit -m "msg" && rtk git push\`
99
-
100
- RTK also has filtering subcommands the auto-rewriter won't add — reach for these yourself when useful: \`rtk err <cmd>\` (errors only), \`rtk summary <cmd>\`, \`rtk log <file>\` (dedup), \`rtk json <file>\` (structure), \`rtk test <cmd>\` (failures only), \`rtk gain\` (savings stats).`;
101
-
102
93
  // Commands that should be prefixed with rtk
103
94
  const RTK_COMMANDS = new Set([
104
95
  "git",
@@ -256,15 +247,15 @@ export function rtk(pi: ExtensionAPI, status: OptimizerStatus): OptimizerHandle
256
247
  return rtkStatus;
257
248
  };
258
249
 
259
- // Inject RTK system prompt + detect sudo_run tool availability.
260
- pi.on("before_agent_start", async (event) => {
261
- // Detect sudo_run from the active tool list for this session.
250
+ // Detect sudo_run tool availability. No system-prompt injection — the
251
+ // tool_call rewrite hook adds the rtk prefix on its own, so we keep zero
252
+ // always-on context cost (ponytail: manual `rtk err`/`rtk summary`/`rtk
253
+ // test` subcommands are no longer advertised to the model; re-add a prompt
254
+ // here if you want those surfaced).
255
+ pi.on("before_agent_start", (event) => {
262
256
  const tools: string[] = event.systemPromptOptions?.selectedTools ?? [];
263
257
  hasSudoRunTool = tools.includes("sudo_run");
264
-
265
- if (!enabled) return undefined;
266
- const existing = event.systemPrompt ?? "";
267
- return { systemPrompt: `${RTK_SYSTEM_PROMPT}\n\n${existing}` };
258
+ return undefined;
268
259
  });
269
260
 
270
261
  // Keep the status indicator in sync across the agent lifecycle. Probe