tweakcc-fixed 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Piebald LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # tweakcc-fixed
2
+
3
+ A **temporary fork of [tweakcc](https://github.com/Piebald-AI/tweakcc)** that bundles together several pending upstream fixes, with a few additional fixes on top, so `tweakcc` works cleanly against recent Claude Code releases (through **CC 2.1.113**) while upstream catches up.
4
+
5
+ > [!NOTE]
6
+ > This fork exists only to unblock users while the fixes below are reviewed and merged upstream. Once the relevant PRs land in [Piebald-AI/tweakcc](https://github.com/Piebald-AI/tweakcc), switch back to upstream.
7
+
8
+ For full documentation of what tweakcc is and how to use it, see the [**upstream README**](https://github.com/Piebald-AI/tweakcc#readme).
9
+
10
+ ## Base
11
+
12
+ - **Upstream tweakcc version:** `4.0.11`
13
+ - **Based on upstream commit:** [`2e1d03e`](https://github.com/Piebald-AI/tweakcc/commit/2e1d03e) — _Prompts for 2.1.113_ ([#692](https://github.com/Piebald-AI/tweakcc/pull/692))
14
+ - **Target Claude Code versions:** up to and including **2.1.113**
15
+ - **This package's version:** starts fresh at `1.0.0` on first publish, with its own semver independent of upstream
16
+
17
+ ## Cherry-picked upstream PRs
18
+
19
+ All four PRs below are open (unmerged) upstream at the time of forking. Their fixes are required for tweakcc to function on current CC builds.
20
+
21
+ | PR | Author | What it fixes |
22
+ | ------------------------------------------------------ | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
23
+ | [#601](https://github.com/Piebald-AI/tweakcc/pull/601) | [@signadou](https://github.com/signadou) | Handle `WASMagic` import errors gracefully during native installation detection |
24
+ | [#646](https://github.com/Piebald-AI/tweakcc/pull/646) | [@sla-te](https://github.com/sla-te) | Support the React Compiler output and async refactoring introduced in CC 2.1.85–2.1.88 (affects most patches) |
25
+ | [#655](https://github.com/Piebald-AI/tweakcc/pull/655) | [@LeonFedotov](https://github.com/LeonFedotov) | Fall back to npm source when Bun bytecode extraction produces non-patchable JS, and thread a `clearBytecode` flag through the content API so repack clears stale compiled code |
26
+ | [#664](https://github.com/Piebald-AI/tweakcc/pull/664) | [@mike1858](https://github.com/mike1858) | Resolves [issue #660](https://github.com/Piebald-AI/tweakcc/issues/660) — two patches broke `cli.js` due to literal `\"` sequences in prompt content |
27
+
28
+ ## Additional fixes on top
29
+
30
+ These are not in any upstream PR and are unique to this fork.
31
+
32
+ - **[`bcce70a`](https://github.com/BenIsLegit/tweakcc-fixed/commit/bcce70a) — Scope [PR #664](https://github.com/Piebald-AI/tweakcc/pull/664)'s backslash-doubling to quote contexts.**
33
+ [PR #664](https://github.com/Piebald-AI/tweakcc/pull/664)'s pre-processing ran before every delimiter branch — including backticks. In template-literal content, `escapeDepthZeroBackticks` is already parity-aware, so pre-doubling backslashes inside a template prematurely terminated the template and caused `cli.js` to fail to load with _"Expected CommonJS module to have a function wrapper"_. This fix scopes the doubling to double-quoted and single-quoted strings only. Affects [issue #660](https://github.com/Piebald-AI/tweakcc/issues/660).
34
+
35
+ - **[`207b57c`](https://github.com/BenIsLegit/tweakcc-fixed/commit/207b57c) — Align [PR #664](https://github.com/Piebald-AI/tweakcc/pull/664)'s backtick tests with the scoped-doubling fix.**
36
+ The two backtick-context tests encoded a _literal-text_ interpretation of prompt content, which doesn't match tweakcc's storage format (markdown files hold the JS-source-escaped form extracted from `cli.js` template literals). Tests now assert the scoped behavior.
37
+
38
+ - **[`3c08e0c`](https://github.com/BenIsLegit/tweakcc-fixed/commit/3c08e0c) — Adapt patch regexes to CC 2.1.113's minified shapes.**
39
+ Updates matchers in `opusplan1m`, `patchesAppliedIndication`, `thinkerFormat`, and `verboseProperty` so each patch still locates its target in the 2.1.113 build output.
40
+
41
+ - **[`c87898c`](https://github.com/BenIsLegit/tweakcc-fixed/commit/c87898c) — Don't overwrite `verbose:X` inside destructuring patterns.**
42
+ The `verboseProperty` patch was greedy enough to match `{ verbose: localName }` in destructure targets and replace it with `verbose: true`, which is a syntax error. The fix scopes the replacement to property-value positions only.
43
+
44
+ ## Installation
45
+
46
+ Published to npm as [`tweakcc-fixed`](https://www.npmjs.com/package/tweakcc-fixed). Run without installation:
47
+
48
+ ```bash
49
+ npx tweakcc-fixed@latest # interactive UI
50
+ npx tweakcc-fixed@latest --apply # apply customizations from ~/.tweakcc/config.json
51
+ ```
52
+
53
+ > [!TIP]
54
+ > **Always use `@latest`.** This fork is actively iterating on fixes as new Claude Code versions ship and as more upstream fixes are cherry-picked. Without `@latest`, `npx` will reuse a cached copy from its last run and you may miss newly-published fixes. `@latest` forces a fresh resolve against the npm registry.
55
+
56
+ Or install globally (re-run to upgrade):
57
+
58
+ ```bash
59
+ npm install -g tweakcc-fixed@latest
60
+ # or: pnpm add -g tweakcc-fixed@latest
61
+
62
+ tweakcc-fixed # interactive UI
63
+ tweakcc-fixed --apply # apply customizations
64
+ ```
65
+
66
+ > [!NOTE]
67
+ > The binary is named `tweakcc-fixed` (not `tweakcc`) to avoid conflicting with an upstream `tweakcc` install. Everything else — flags, config format, API, patch list — is identical to upstream. See the [upstream README](https://github.com/Piebald-AI/tweakcc#readme) for full documentation.
68
+
69
+ ## License
70
+
71
+ [MIT](./LICENSE), inherited from upstream. Copyright © 2026 [Piebald LLC](https://piebald.ai). This fork adds only the fixes described above; all core tweakcc code remains under the upstream copyright and license.