Commit Graph
20 Commits
Author SHA1 Message Date
0chencc 3d85565cb0 ci: add Release workflow triggered by v* tags
Pushing a tag matching v* now creates / updates a GitHub release with
install.sh and install.ps1 attached, plus auto-generated changelog
(commit log between prev and current tag) and standard install
snippets in the body. Idempotent: re-pushing a tag updates the
existing release rather than failing.

For routine patch releases this replaces the manual `gh release create`
flow. For larger releases that need a hand-written narrative, you can
still overwrite the body via `gh release edit` afterward.
2026-04-27 15:28:01 +09:00
0chencc 2cfa74e7c0 feat: native binary support for v2.1.113+ Claude Code
Anthropic stopped shipping cli.js in the npm package starting v2.1.113;
the package became a thin loader that dispatches to a per-platform Bun
standalone binary. The previous installer cp'd cli.js from the npm
tarball, which is why every install on v2.1.113+ fails with ENOENT.

This release rewrites the install pipeline to extract cli.js source
directly from the user's locally-installed Bun standalone binary
(__BUN segment, anchored on the file:///$bunfs/.../cli.js path),
rewrites virtual /$bunfs paths to local vendor/, runs cli.js under Bun
runtime instead of Node, and reapplies the existing 23 regex patches.

Highlights

- Extract cli.js from Mach-O / ELF / PE __BUN segment (the same source
  Bun bundled at build time — not stale, not injected).
- Auto-install Bun runtime; require ripgrep up front (Bun's bundled rg
  is unreachable when running extracted cli.js outside the standalone
  bundle, so we depend on system rg).
- Wrapper now stamps the source version and detects drift on every
  launch. When the user upgrades Claude Code, ClawGod transparently
  re-extracts and re-patches before invoking the user's command.
- Patcher made resilient: regex tokens widened to [\\w$]+ for Bun's
  newer minified identifiers; updated message-list filter and
  auto-mode patches for v2.1.119 source shape; sentinel-based
  verification catches future silent regex misses.
- New `clawgod` command alongside `claude` — unambiguous entry point
  that survives Windows .exe / .cmd shadowing and official
  self-update overwriting `claude`.
- Critical fix: launcher write no longer follows symlinks. Previously
  `echo > $CLAUDE_BIN` clobbered the real binary when $CLAUDE_BIN was
  the official symlink to ~/.local/share/claude/versions/<v>; we now
  rm the entry first.
- Default features.json adds tengu_prompt_cache_1h_config allowlist
  so 1h prompt cache actually engages (fixes silent 5m TTL fallback
  that drove cache_creation token waste).

Verified: macOS arm64 against v2.1.117/2.1.118/2.1.119 native binaries;
23 patches applied with 0 failures; auto-repatch correctly handles
version transitions; claude / clawgod / claude.orig coexist cleanly.

Closes #40
Closes #41
Closes #42
Closes #43
Closes #45
2026-04-27 15:14:44 +09:00
0chencc 286e9cb3ea fix: guard against silent patch failures on newer cli.js versions
- Patcher now requires sentinel absence (not just 0 regex matches) to
  declare a patch "already applied", catching the v2.1.110 regression
  where filter regexes silently missed their targets and the patcher
  still reported success.
- Attachment filter regex extended to match v2.1.92+ form
  (fn()!=="ant"&&paY.has(...)); marked optional since paY is empty in
  current versions, making the filter effectively a no-op.
- Message list filter split into legacy ternary and v2.1.92+ s_8
  branches so both old and new source shapes patch cleanly.
- Unique check only fails on >1 matches; 0 matches now fall through to
  sentinel verification instead of being reported as success.
- Added sentinels for USER_TYPE, CYBER_RISK_INSTRUCTION, URL
  restriction, and cautious-actions patches.

Verified: v2.1.92 and v2.1.110 both patch clean (23 applied, 0 failed);
re-running on a patched file correctly reports "already applied" via
sentinel without false positives.
2026-04-16 18:00:12 +09:00
0chencc 02cc3178b2 docs: clarify API key path, remove OAuth-required framing
- Requirements now lists OAuth login OR an API key in
  ~/.clawgod/provider.json as valid startup paths, instead of
  implying claude auth login is mandatory
- New Configuration / 配置 / 設定 section documents provider.json
  fields (apiKey / baseURL / model / smallModel / timeoutMs) and
  explains the two wrapper paths: forced env override + config
  isolation when apiKey is set vs OAuth reuse of ~/.claude when
  apiKey is empty, plus auto-injected ANTHROPIC_AUTH_TOKEN for
  non-Anthropic baseURL gateways
- Applied identically to README.md, README_ZH.md, README_JP.md

Fixes #38
Closes #38
2026-04-16 14:56:04 +09:00
0chencc 02da917d31 fix: launcher self-heal, auto-mode unlock, provider config isolation
- Launcher now prints a clean error + reinstall hint when
  ~/.clawgod/cli.js is missing, instead of the Node module loader
  stack trace users see after deleting the install dir.
- Patcher drops the firstParty/anthropicAws gate in iG6 so
  third-party API users can use auto-mode.
- Wrapper force-sets CLAUDE_CONFIG_DIR=~/.clawgod when provider.json
  has an apiKey, preventing ~/.claude/settings.json from shadowing
  base URL / model. OAuth users keep ~/.claude so subagents and
  skills continue to work.

Closes #19
Closes #23
Closes #27
Closes #31
Refs #22
Refs #29
Refs #30
2026-04-08 22:55:45 +09:00
0chencc 9448a9a6e4 feat: extract native modules + fix 1h prompt cache downgrade
- Embed extract-natives.mjs in install.sh/install.ps1 to pull
  image-processor, audio-capture, computer-use-*, url-handler .node
  modules out of the user's local Bun single-file binary
  (Mach-O/ELF/PE), enabling Voice Mode / Computer Use on the npm build
- Add tengu_prompt_cache_1h_config allowlist ["*"] to default
  features.json so IuY() grants 1h TTL; previously empty allowlist
  silently downgraded all requests to 5m cache, causing heavy
  cache_creation token burn after short idle periods
2026-04-08 16:53:22 +09:00
0chencc 1fa6b01a90 Merge pull request #25 from b1ank1108/main
fix: symlink vendor dir so runtime finds vendored ripgrep
2026-04-06 11:04:50 +08:00
b1ank1108 701bd2ea03 fix: symlink vendor dir so runtime finds vendored ripgrep 2026-04-05 16:08:04 +08:00
0chencc 29960e5d81 fix: uninstall fails to detect launcher, add Computer Use & Voice patches
- Fix: grep whole file instead of head -1 when checking if claude
  is a ClawGod launcher (head -1 only reads #!/bin/bash, never
  matches "clawgod" which is on line 2)
- Add: Computer Use gate bypass (bypass GrowthBook override)
- Add: Voice Mode enable (bypass GrowthBook kill switch)
- Add: tengu_malort_pedway and tengu_amber_quartz_disabled to
  default features.json

Fixes #20
2026-04-05 03:56:46 +09:00
0chencc b1020f00ab fix: Windows repeated install leaves multiple claude.exe files
- Clean up all claude.*.exe (except claude.orig.exe) before each install
- First install: rename claude.exe → claude.orig.exe
- Repeat install: delete claude.exe, fallback to timestamp rename if locked
- No more accumulation of claude.old.exe / claude.timestamp.exe

Fixes #17
2026-04-03 21:19:33 +09:00
0chencc 4851095646 fix: uninstall hash-r hint, shell detection in README, simplify issue templates
- Uninstall: add hash -r + restart terminal hint after cleanup
- README (EN/ZH/JP): add hash -r to uninstall commands, add note
  about restarting terminal after install/uninstall
- Issue templates: simplify to OS, Claude version, error, optional screenshot
2026-04-03 14:05:04 +09:00
0chencc 82b36db641 fix: uninstall cleanup, shell detection, issue templates
- Uninstall: remove our launcher when no claude.orig exists,
  instead of leaving a broken script pointing to deleted cli.js
- PATH hint: detect actual shell (bash/zsh/fish) instead of
  hardcoding ~/.zshrc
- Add GitHub issue templates (bug report + feature request)
  requiring OS, Claude version, install method, and logs

Fixes #12, fixes #14, fixes #5
2026-04-03 13:52:54 +09:00
0chencc 8a27466fa0 fix: detect claude path via which, fix set -e exit on grep failure
- Use `which claude` to detect actual binary location instead of
  hardcoding ~/.local/bin/ — supports pnpm, npm, yarn global installs
- Add `|| true` to prevent set -e from killing script when
  grep fails to match Mach-O/ELF in versions directory
- Backup and restore now handle both detected path and default path
- Uninstall checks both locations for claude.orig

Fixes #7
2026-04-03 13:46:20 +09:00
0chencc 349d3b1b21 fix: Windows patch not taking effect, clarify project nature
Windows fixes:
- Rename claude.exe → claude.orig.exe instead of delete (works even
  if exe is running, handles repeated installs safely)
- Fix package.json: merge "type":"module" instead of overwriting
  (was destroying npm dependencies)
- Fix launcher path: proper expansion for paths with spaces

README (EN/ZH/JP):
- Clarify this is NOT a third-party client, but a runtime patch
  on top of official Claude Code that works across versions
2026-04-02 13:32:37 +09:00
0chencc 8779ed8a23 fix: ESM module warning, shell cache, cautious actions syntax error
- Add "type": "module" to package.json after npm install (fixes #2)
- Run hash -r after install + warn user to restart terminal (fixes #1)
- Fix cautious actions removal: replace entire function body instead
  of deleting template content (was causing SyntaxError)
- Remove 'lin' alias from public release

Closes #1, closes #2
2026-04-02 12:32:42 +09:00
0chencc 6944d3bced feat: add landing page for clawgod.0chen.cc 2026-04-02 00:13:46 +09:00
0chencc 25715cfa9b docs: update all install URLs to GitHub Release direct links 2026-04-02 00:10:10 +09:00
0chencc 9ef88a9b1c docs: add bypass screenshot showing green logo after patch 2026-04-01 21:08:41 +09:00
0chencc e3286f3c81 feat: initial release — ClawGod, god mode for Claude Code
- README with i18n (EN / ZH / JP)
- install.sh / install.ps1 redirect to Release assets
- CNAME for clawgod.0chen.cc
2026-04-01 20:42:51 +09:00
0chencc 40c3d9ae1d Initial commit 2026-04-01 19:09:07 +08:00