Commit Graph
27 Commits
Author SHA1 Message Date
James Peter be3538b98f fix(cli/postinstall): rerun bootstrap when scripts skipped (#369) 2025-10-31 07:54:59 +10:00
James Peter 49d4be4205 fix(cli/postinstall): restore shim detector 2025-09-25 17:01:19 +10:00
James Peter f9e8d6b371 merge code-branch-20250925-045812 via /merge 2025-09-25 16:30:29 +10:00
James Peter 2f9f75ec24 fix(cli/postinstall): avoid overwriting existing code shim 2025-09-25 15:43:26 +10:00
James Peter 6c670bb89f fix(cli/postinstall): preserve external code shims
Closes #239
2025-09-25 14:35:16 +10:00
James Peter d15ed8b929 fix(cli/postinstall): restore code shim on npm global installs
Closes #199.
2025-09-20 06:05:32 +10:00
James Peter 582f290815 fix(codex-cli/install): harden Windows/WSL install paths and locks
- Avoid placing EXE inside node_modules on Windows and WSL-on-NTFS
- Add preinstall cleanup (global-only), limited to our EXE; age-guard stale .code-* dirs
- Atomic cache writes with retries; mirror to node_modules only on Unix filesystems
- Robust Windows unzip fallback chain (powershell.exe→powershell→pwsh→tar)
- Detect WSL drvfs/cifs with realpath mount check; skip taskkill on WSL
- Fallback to per-user cache if tmp staging dir is unavailable
- Package windows-cleanup.ps1 and preinstall script
2025-09-11 19:11:59 +10:00
James Peter 5498f79c15 fix(cli/windows): avoid EBUSY/EPERM on global upgrades by keeping native .exe in per-user cache; launcher prefers cache\n\n- Postinstall: on Windows, install binary to %LocalAppData%\just-every\code\<version> and do not leave a copy in node_modules.\n- Launcher: run from cache when available; mirror into node_modules only on Unix.\n- Outcome: global npm upgrades no longer fail when the CLI is running. 2025-09-11 10:06:49 +10:00
James Peter fa561b773c fix(cli/install): stop publishing 'code' bin; create wrapper only when safe and remove on collision\n\nPrevents overriding VS Code's 'code' CLI. Postinstall now:\n- Detects PATH collisions and removes legacy npm shim if present\n- Creates a 'code' wrapper -> 'coder' only when no conflict exists (npm/bun)\n- Keeps 'coder' as the canonical entrypoint\n\nThis matches the goal: never hijack an existing 'code' while preserving a friendly alias when safe. 2025-08-30 11:56:26 +10:00
James Peter 06379d185b fix(cli/postinstall): print collision guidance to stderr and suggest 'coder' when VS Code's 'code' is on PATH 2025-08-30 10:52:06 +10:00
James Peter b15f6534de feat(tui/file-completion): prioritize CWD matches; related UX fixes
- TUI: prioritize files from current working directory in completions;
  refine redraw debounce for lower latency; history/markdown rendering tweaks.
- Core/web_fetch: safer HTML sanitization, basic GitHub issue extraction,
  and trimmed payload heuristics.
- Core/agent_tool: more robust command_exists on unix/windows; improve fallbacks.
- Fix: remove unused var in JSON-LD scan to silence warning.

Build: verified with ./build-fast.sh (no warnings).
2025-08-30 06:19:34 +10:00
James Peter 453525f8b3 ui(tui/assistant): remove inner top/bottom padding from code cards\n\n- Drop 1-row inner pads; keep only top/bottom border\n- Update height math: +2 (borders) instead of +4\n- Adjust render skip/visible calculations to match\n- Keeps left/right padding and language title logic intact 2025-08-29 17:44:33 +10:00
James Peter f5907a33ee fix(cli/postinstall): if any other 'code' exists on PATH, remove our global shim and log clear guidance\n\n- Detect collisions using all candidates (which -a) not just the first\n- Remove npm global 'code' shim to avoid shadowing VS Code et al.\n- Keep 'coder' as the stable entrypoint; still create code-tui/exec wrappers\n- Offer optional 'vscode' alias to the detected editor path\n\nPairs with runtime change to always exec our bundled binary under npx. 2025-08-29 16:09:11 +10:00
James Peter 35971252dc packaging: move binaries to npm optionalDependencies per target; postinstall resolves platform package before GitHub fallback 2025-08-27 11:51:13 +10:00
James Peter 35a96e0b66 packaging: download single binary + create code-tui/code-exec wrappers; CI builds only 'code' 2025-08-27 11:06:08 +10:00
James Peter 7db34b553b release: slimmer assets + zstd fallback (.zst/.tar.gz)\n\n- Dual-format artifacts for macOS and Linux (.zst + .tar.gz)\n- Postinstall picks one: prefers .zst when zstd available, else .tar.gz\n- Windows stays .zip\n- Trim npm package (no embedded natives)\n- release-prod strips debuginfo; warning cleanup 2025-08-27 10:33:56 +10:00
James Peter 029ce20a38 cli(downloads): verify Content-Length, add retries/timeouts; improve WSL guidance\n\n- postinstall: bytes count vs Content-Length, inactivity/absolute timeouts, retry with backoff\n- coder.js: WSL detection + tailored guidance when binaries missing/invalid 2025-08-20 07:46:25 +10:00
James Peter 48d64f24d5 cli(windows): guard against corrupt/empty downloads and improve spawn errors\n\n- postinstall: robust download + header validation (MZ/ELF/Mach-O), delete on failure\n- coder.js: pre-spawn binary header check; clearer EFTYPE/ENOEXEC/EACCES guidance\n- reduces confusing Windows EFTYPE crashes from partial downloads 2025-08-19 13:51:46 +10:00
James Peter b9adced314 refactor(naming): switch binaries and artifacts from 'coder' to 'code'; keep 'coder' as fallback alias only. Update workflows, scripts, and postinstall. 2025-08-17 20:45:10 +10:00
James Peter f42b65f329 chore(release): nudge workflow by touching postinstall.js (no functional change) 2025-08-17 20:31:10 +10:00
James Peter 2592584130 feat(cli): add 'coder' bin alias and postinstall notice if existing 'code' is not ours 2025-08-17 19:16:42 +10:00
James Peter 5369437229 chore: commit pending changes on main (CLI, TUI, core, docs) 2025-08-17 18:55:58 +10:00
James Peter 9fb5f564a3 feat(cli): switch npm bin to 'code' and handle collisions gracefully
- package.json: expose bin as 'code'
- postinstall: detect existing 'code'; create 'coder' fallback and optional 'vscode' alias to existing editor
- keep Rust binary named 'coder' for builds; wrappers updated accordingly
2025-08-16 12:17:04 +10:00
James Peter 424c9d4153 chore(rebrand): rename user-facing Coder → Code; update links to new repo
- Update TUI titles, labels, messages
- Update onboarding copy and links
- Update MCP titles and human-output banner
- Update README branding and URLs
- postinstall: switch release URL to just-every/code; offer optional 'code' alias without collisions
- package.json repository URL updated

Note: CLI command remains 'coder' to avoid VS Code collision; optional alias offered interactively.
2025-08-16 12:10:29 +10:00
James Peter 3d12d28c8c fix: postinstall script import assertion error
- Replace dynamic import of package.json with readFileSync for Node.js compatibility
- Fixes 'ERR_IMPORT_ATTRIBUTE_MISSING' error during npm install
- Bump version to 0.1.3
2025-08-12 07:58:23 +10:00
James Peter 0cb9e4fedc fix: handle permission errors for binaries on Linux/WSL
- Add automatic chmod +x when running coder.js on Unix systems
- Fix postinstall script to use octal notation for chmod (0o755)
- Add better error messages when binary is not executable
- Always try to fix permissions for existing binaries
- Bump version to 0.1.2 for hotfix release
2025-08-12 06:55:01 +10:00
James Peter 7203071a78 fix: reduce npm package size by downloading binaries on install
- Add postinstall script to download platform-specific binaries from GitHub releases
- Update package.json to exclude binaries from npm package (only include JS wrappers)
- Modify release workflow to upload binaries as GitHub release assets
- Fixes 'Payload Too Large' error when publishing to npm (was 219MB, now <1MB)
2025-08-11 22:49:21 +10:00