From 4a1b6bc00806d368fb03ec2eb5095d54acb27e11 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Tue, 27 Jan 2026 16:22:23 +0100 Subject: [PATCH] update refs --- docs/cli/acp.md | 2 +- docs/debug/node-issue.md | 4 ++-- docs/install/updating.md | 2 +- docs/reference/RELEASING.md | 2 +- docs/start/getting-started.md | 2 +- package.json | 2 +- scripts/e2e/doctor-install-switch-docker.sh | 4 ++-- scripts/restart-mac.sh | 8 ++++---- scripts/run-node.mjs | 5 +---- scripts/watch-node.mjs | 2 +- src/infra/gateway-lock.ts | 1 + 11 files changed, 16 insertions(+), 18 deletions(-) diff --git a/docs/cli/acp.md b/docs/cli/acp.md index da2de00b30..a7cb0e1d63 100644 --- a/docs/cli/acp.md +++ b/docs/cli/acp.md @@ -42,7 +42,7 @@ moltbot acp client moltbot acp client --server-args --url wss://gateway-host:18789 --token # Override the server command (default: moltbot) -moltbot acp client --server "node" --server-args dist/entry.js acp --url ws://127.0.0.1:19001 +moltbot acp client --server "node" --server-args moltbot.mjs acp --url ws://127.0.0.1:19001 ``` ## How to use this diff --git a/docs/debug/node-issue.md b/docs/debug/node-issue.md index c71b903f3d..a549ad51b9 100644 --- a/docs/debug/node-issue.md +++ b/docs/debug/node-issue.md @@ -55,9 +55,9 @@ node --import tsx scripts/repro/tsx-name-repro.ts - Use Node + tsc watch, then run compiled output: ```bash pnpm exec tsc --watch --preserveWatchOutput - node --watch dist/entry.js status + node --watch moltbot.mjs status ``` -- Confirmed locally: `pnpm exec tsc -p tsconfig.json` + `node dist/entry.js status` works on Node 25. +- Confirmed locally: `pnpm exec tsc -p tsconfig.json` + `node moltbot.mjs status` works on Node 25. - Disable esbuild keepNames in the TS loader if possible (prevents `__name` helper insertion); tsx does not currently expose this. - Test Node LTS (22/24) with `tsx` to see if the issue is Node 25–specific. diff --git a/docs/install/updating.md b/docs/install/updating.md index 634abfe994..12303cb2a9 100644 --- a/docs/install/updating.md +++ b/docs/install/updating.md @@ -125,7 +125,7 @@ moltbot health ``` Notes: -- `pnpm build` matters when you run the packaged `moltbot` binary ([`dist/entry.js`](https://github.com/moltbot/moltbot/blob/main/dist/entry.js)) or use Node to run `dist/`. +- `pnpm build` matters when you run the packaged `moltbot` binary ([`moltbot.mjs`](https://github.com/moltbot/moltbot/blob/main/moltbot.mjs)) or use Node to run `dist/`. - If you run from a repo checkout without a global install, use `pnpm moltbot ...` for CLI commands. - If you run directly from TypeScript (`pnpm moltbot ...`), a rebuild is usually unnecessary, but **config migrations still apply** → run doctor. - Switching between global and git installs is easy: install the other flavor, then run `moltbot doctor` so the gateway service entrypoint is rewritten to the current install. diff --git a/docs/reference/RELEASING.md b/docs/reference/RELEASING.md index 68d1c0223c..fb7e0a8287 100644 --- a/docs/reference/RELEASING.md +++ b/docs/reference/RELEASING.md @@ -20,7 +20,7 @@ When the operator says “release”, immediately do this preflight (no extra qu - [ ] Bump `package.json` version (e.g., `2026.1.26`). - [ ] Run `pnpm plugins:sync` to align extension package versions + changelogs. - [ ] Update CLI/version strings: [`src/cli/program.ts`](https://github.com/moltbot/moltbot/blob/main/src/cli/program.ts) and the Baileys user agent in [`src/provider-web.ts`](https://github.com/moltbot/moltbot/blob/main/src/provider-web.ts). -- [ ] Confirm package metadata (name, description, repository, keywords, license) and `bin` map points to [`dist/entry.js`](https://github.com/moltbot/moltbot/blob/main/dist/entry.js) for `moltbot`. +- [ ] Confirm package metadata (name, description, repository, keywords, license) and `bin` map points to [`moltbot.mjs`](https://github.com/moltbot/moltbot/blob/main/moltbot.mjs) for `moltbot`. - [ ] If dependencies changed, run `pnpm install` so `pnpm-lock.yaml` is current. 2) **Build & artifacts** diff --git a/docs/start/getting-started.md b/docs/start/getting-started.md index 8ba2ea3f36..239b29966d 100644 --- a/docs/start/getting-started.md +++ b/docs/start/getting-started.md @@ -180,7 +180,7 @@ If you don’t have a global install yet, run the onboarding step via `pnpm molt Gateway (from this repo): ```bash -node dist/entry.js gateway --port 18789 --verbose +node moltbot.mjs gateway --port 18789 --verbose ``` ## 7) Verify end-to-end diff --git a/package.json b/package.json index 34d7dfac35..b3d043659f 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ ".": "./dist/index.js", "./plugin-sdk": "./dist/plugin-sdk/index.js", "./plugin-sdk/*": "./dist/plugin-sdk/*", - "./cli-entry": "./dist/entry.js" + "./cli-entry": "./moltbot.mjs" }, "bin": { "moltbot": "./moltbot.mjs", diff --git a/scripts/e2e/doctor-install-switch-docker.sh b/scripts/e2e/doctor-install-switch-docker.sh index 7c5e96a84a..d5be4fa861 100755 --- a/scripts/e2e/doctor-install-switch-docker.sh +++ b/scripts/e2e/doctor-install-switch-docker.sh @@ -81,8 +81,8 @@ LOGINCTL npm install -g --prefix /tmp/npm-prefix "/app/$pkg_tgz" npm_bin="/tmp/npm-prefix/bin/moltbot" - npm_entry="/tmp/npm-prefix/lib/node_modules/moltbot/dist/entry.js" - git_entry="/app/dist/entry.js" + npm_entry="/tmp/npm-prefix/lib/node_modules/moltbot/moltbot.mjs" + git_entry="/app/moltbot.mjs" assert_entrypoint() { local unit_path="$1" diff --git a/scripts/restart-mac.sh b/scripts/restart-mac.sh index 6dc81bb4e9..b9bf1ab866 100755 --- a/scripts/restart-mac.sh +++ b/scripts/restart-mac.sh @@ -96,8 +96,8 @@ for arg in "$@"; do log " CLAWDBOT_GATEWAY_WAIT_SECONDS=0 Wait time before gateway port check (unsigned only)" log "" log "Unsigned recovery:" - log " node dist/entry.js daemon install --force --runtime node" - log " node dist/entry.js daemon restart" + log " node moltbot.mjs daemon install --force --runtime node" + log " node moltbot.mjs daemon restart" log "" log "Reset unsigned overrides:" log " rm ~/.clawdbot/disable-launchagent" @@ -217,8 +217,8 @@ fi # When unsigned, ensure the gateway LaunchAgent targets the repo CLI (before the app launches). # This reduces noisy "could not connect" errors during app startup. if [ "$NO_SIGN" -eq 1 ] && [ "$ATTACH_ONLY" -ne 1 ]; then - run_step "install gateway launch agent (unsigned)" bash -lc "cd '${ROOT_DIR}' && node dist/entry.js daemon install --force --runtime node" - run_step "restart gateway daemon (unsigned)" bash -lc "cd '${ROOT_DIR}' && node dist/entry.js daemon restart" + run_step "install gateway launch agent (unsigned)" bash -lc "cd '${ROOT_DIR}' && node moltbot.mjs daemon install --force --runtime node" + run_step "restart gateway daemon (unsigned)" bash -lc "cd '${ROOT_DIR}' && node moltbot.mjs daemon restart" if [[ "${GATEWAY_WAIT_SECONDS}" -gt 0 ]]; then run_step "wait for gateway (unsigned)" sleep "${GATEWAY_WAIT_SECONDS}" fi diff --git a/scripts/run-node.mjs b/scripts/run-node.mjs index 0748a5991c..b26f996a67 100644 --- a/scripts/run-node.mjs +++ b/scripts/run-node.mjs @@ -86,7 +86,7 @@ const logRunner = (message) => { }; const runNode = () => { - const nodeProcess = spawn(process.execPath, ["dist/entry.js", ...args], { + const nodeProcess = spawn(process.execPath, ["moltbot.mjs", ...args], { cwd, env, stdio: "inherit", @@ -95,7 +95,6 @@ const runNode = () => { nodeProcess.on("exit", (exitCode, exitSignal) => { if (exitSignal) { process.exit(1); - return; } process.exit(exitCode ?? 1); }); @@ -128,11 +127,9 @@ if (!shouldBuild()) { build.on("exit", (code, signal) => { if (signal) { process.exit(1); - return; } if (code !== 0 && code !== null) { process.exit(code); - return; } writeBuildStamp(); runNode(); diff --git a/scripts/watch-node.mjs b/scripts/watch-node.mjs index 7ed2108536..982a8c773d 100644 --- a/scripts/watch-node.mjs +++ b/scripts/watch-node.mjs @@ -29,7 +29,7 @@ const compilerProcess = spawn("pnpm", ["exec", compiler, ...watchArgs], { stdio: "inherit", }); -const nodeProcess = spawn(process.execPath, ["--watch", "dist/entry.js", ...args], { +const nodeProcess = spawn(process.execPath, ["--watch", "moltbot.mjs", ...args], { cwd, env, stdio: "inherit", diff --git a/src/infra/gateway-lock.ts b/src/infra/gateway-lock.ts index a3c4d12900..aa65e7d81e 100644 --- a/src/infra/gateway-lock.ts +++ b/src/infra/gateway-lock.ts @@ -72,6 +72,7 @@ function isGatewayArgv(args: string[]): boolean { "dist/index.js", "dist/index.mjs", "dist/entry.js", + "moltbot.mjs", "dist/entry.mjs", "scripts/run-node.mjs", "src/index.ts",