Skip to content

build(app-server): auto-build on install (prepare) + executable bin#2

Merged
SSFSKIM merged 1 commit into
mainfrom
appserver-prepare-script
Jun 22, 2026
Merged

build(app-server): auto-build on install (prepare) + executable bin#2
SSFSKIM merged 1 commit into
mainfrom
appserver-prepare-script

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Jun 22, 2026

Copy link
Copy Markdown
Owner

What

Makes the cc-codex-appserver bin install cleanly on a fresh machine with no manual build step.

  • prepare scriptnpm install now auto-runs the build. dist/ is gitignored and there was no prepare, so a fresh clone had no dist/bin.js until a manual npm run build.
  • chmod +x dist/bin.js in buildtsc emits the entry at 0644, so any rebuild after npm link reverted the bin to non-executable (Permission denied). Now every build produces an executable bin.

Why

Follows up the symlink-safe bin-guard fix (e72d358) that unblocked on-PATH use by the Director. With these two, the full flow is hands-off:

git clone … && (cd CC-to-SDK/app-server && npm install && npm link)
# -> cc-codex-appserver on PATH, builds + executable automatically

Verified

  • Removed dist/, ran the equivalent of npm install's prepare → dist/bin.js regenerated as -rwxr-xr-x with the symlink-safe guard.
  • cc-codex-appserver app-server over the PATH symlink returns the initialize result.
  • All 36 unit tests pass.

Note (still required, out of scope here)

  • The cc-harness: file:../harness monorepo dep means the sibling harness/ must be present (can't install app-server in isolation).
  • Real turns still need CLAUDE_CODE_OAUTH_TOKEN in the env.

Add a prepare script so npm install builds dist/ automatically — dist/ is
gitignored and there was no prepare, so a fresh clone had no dist/bin.js until
a manual npm run build. Also chmod +x dist/bin.js in build: tsc emits it 0644,
so any rebuild after npm link reverted the bin to non-executable (Permission
denied). Together these make 'clone -> npm install -> npm link' produce a
working cc-codex-appserver on PATH with no manual steps.
@SSFSKIM SSFSKIM merged commit 42eabbe into main Jun 22, 2026
@SSFSKIM SSFSKIM deleted the appserver-prepare-script branch June 22, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant