update refs
This commit is contained in:
parent
3fd766f63a
commit
4a1b6bc008
11 changed files with 16 additions and 18 deletions
|
|
@ -42,7 +42,7 @@ moltbot acp client
|
||||||
moltbot acp client --server-args --url wss://gateway-host:18789 --token <token>
|
moltbot acp client --server-args --url wss://gateway-host:18789 --token <token>
|
||||||
|
|
||||||
# Override the server command (default: moltbot)
|
# 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
|
## How to use this
|
||||||
|
|
|
||||||
|
|
@ -55,9 +55,9 @@ node --import tsx scripts/repro/tsx-name-repro.ts
|
||||||
- Use Node + tsc watch, then run compiled output:
|
- Use Node + tsc watch, then run compiled output:
|
||||||
```bash
|
```bash
|
||||||
pnpm exec tsc --watch --preserveWatchOutput
|
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.
|
- 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.
|
- Test Node LTS (22/24) with `tsx` to see if the issue is Node 25–specific.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ moltbot health
|
||||||
```
|
```
|
||||||
|
|
||||||
Notes:
|
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 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.
|
- 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.
|
- 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.
|
||||||
|
|
|
||||||
|
|
@ -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`).
|
- [ ] Bump `package.json` version (e.g., `2026.1.26`).
|
||||||
- [ ] Run `pnpm plugins:sync` to align extension package versions + changelogs.
|
- [ ] 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).
|
- [ ] 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.
|
- [ ] If dependencies changed, run `pnpm install` so `pnpm-lock.yaml` is current.
|
||||||
|
|
||||||
2) **Build & artifacts**
|
2) **Build & artifacts**
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ If you don’t have a global install yet, run the onboarding step via `pnpm molt
|
||||||
Gateway (from this repo):
|
Gateway (from this repo):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
node dist/entry.js gateway --port 18789 --verbose
|
node moltbot.mjs gateway --port 18789 --verbose
|
||||||
```
|
```
|
||||||
|
|
||||||
## 7) Verify end-to-end
|
## 7) Verify end-to-end
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
"./plugin-sdk": "./dist/plugin-sdk/index.js",
|
"./plugin-sdk": "./dist/plugin-sdk/index.js",
|
||||||
"./plugin-sdk/*": "./dist/plugin-sdk/*",
|
"./plugin-sdk/*": "./dist/plugin-sdk/*",
|
||||||
"./cli-entry": "./dist/entry.js"
|
"./cli-entry": "./moltbot.mjs"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"moltbot": "./moltbot.mjs",
|
"moltbot": "./moltbot.mjs",
|
||||||
|
|
|
||||||
|
|
@ -81,8 +81,8 @@ LOGINCTL
|
||||||
npm install -g --prefix /tmp/npm-prefix "/app/$pkg_tgz"
|
npm install -g --prefix /tmp/npm-prefix "/app/$pkg_tgz"
|
||||||
|
|
||||||
npm_bin="/tmp/npm-prefix/bin/moltbot"
|
npm_bin="/tmp/npm-prefix/bin/moltbot"
|
||||||
npm_entry="/tmp/npm-prefix/lib/node_modules/moltbot/dist/entry.js"
|
npm_entry="/tmp/npm-prefix/lib/node_modules/moltbot/moltbot.mjs"
|
||||||
git_entry="/app/dist/entry.js"
|
git_entry="/app/moltbot.mjs"
|
||||||
|
|
||||||
assert_entrypoint() {
|
assert_entrypoint() {
|
||||||
local unit_path="$1"
|
local unit_path="$1"
|
||||||
|
|
|
||||||
|
|
@ -96,8 +96,8 @@ for arg in "$@"; do
|
||||||
log " CLAWDBOT_GATEWAY_WAIT_SECONDS=0 Wait time before gateway port check (unsigned only)"
|
log " CLAWDBOT_GATEWAY_WAIT_SECONDS=0 Wait time before gateway port check (unsigned only)"
|
||||||
log ""
|
log ""
|
||||||
log "Unsigned recovery:"
|
log "Unsigned recovery:"
|
||||||
log " node dist/entry.js daemon install --force --runtime node"
|
log " node moltbot.mjs daemon install --force --runtime node"
|
||||||
log " node dist/entry.js daemon restart"
|
log " node moltbot.mjs daemon restart"
|
||||||
log ""
|
log ""
|
||||||
log "Reset unsigned overrides:"
|
log "Reset unsigned overrides:"
|
||||||
log " rm ~/.clawdbot/disable-launchagent"
|
log " rm ~/.clawdbot/disable-launchagent"
|
||||||
|
|
@ -217,8 +217,8 @@ fi
|
||||||
# When unsigned, ensure the gateway LaunchAgent targets the repo CLI (before the app launches).
|
# When unsigned, ensure the gateway LaunchAgent targets the repo CLI (before the app launches).
|
||||||
# This reduces noisy "could not connect" errors during app startup.
|
# This reduces noisy "could not connect" errors during app startup.
|
||||||
if [ "$NO_SIGN" -eq 1 ] && [ "$ATTACH_ONLY" -ne 1 ]; then
|
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 "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 dist/entry.js daemon restart"
|
run_step "restart gateway daemon (unsigned)" bash -lc "cd '${ROOT_DIR}' && node moltbot.mjs daemon restart"
|
||||||
if [[ "${GATEWAY_WAIT_SECONDS}" -gt 0 ]]; then
|
if [[ "${GATEWAY_WAIT_SECONDS}" -gt 0 ]]; then
|
||||||
run_step "wait for gateway (unsigned)" sleep "${GATEWAY_WAIT_SECONDS}"
|
run_step "wait for gateway (unsigned)" sleep "${GATEWAY_WAIT_SECONDS}"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ const logRunner = (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const runNode = () => {
|
const runNode = () => {
|
||||||
const nodeProcess = spawn(process.execPath, ["dist/entry.js", ...args], {
|
const nodeProcess = spawn(process.execPath, ["moltbot.mjs", ...args], {
|
||||||
cwd,
|
cwd,
|
||||||
env,
|
env,
|
||||||
stdio: "inherit",
|
stdio: "inherit",
|
||||||
|
|
@ -95,7 +95,6 @@ const runNode = () => {
|
||||||
nodeProcess.on("exit", (exitCode, exitSignal) => {
|
nodeProcess.on("exit", (exitCode, exitSignal) => {
|
||||||
if (exitSignal) {
|
if (exitSignal) {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
process.exit(exitCode ?? 1);
|
process.exit(exitCode ?? 1);
|
||||||
});
|
});
|
||||||
|
|
@ -128,11 +127,9 @@ if (!shouldBuild()) {
|
||||||
build.on("exit", (code, signal) => {
|
build.on("exit", (code, signal) => {
|
||||||
if (signal) {
|
if (signal) {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (code !== 0 && code !== null) {
|
if (code !== 0 && code !== null) {
|
||||||
process.exit(code);
|
process.exit(code);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
writeBuildStamp();
|
writeBuildStamp();
|
||||||
runNode();
|
runNode();
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ const compilerProcess = spawn("pnpm", ["exec", compiler, ...watchArgs], {
|
||||||
stdio: "inherit",
|
stdio: "inherit",
|
||||||
});
|
});
|
||||||
|
|
||||||
const nodeProcess = spawn(process.execPath, ["--watch", "dist/entry.js", ...args], {
|
const nodeProcess = spawn(process.execPath, ["--watch", "moltbot.mjs", ...args], {
|
||||||
cwd,
|
cwd,
|
||||||
env,
|
env,
|
||||||
stdio: "inherit",
|
stdio: "inherit",
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ function isGatewayArgv(args: string[]): boolean {
|
||||||
"dist/index.js",
|
"dist/index.js",
|
||||||
"dist/index.mjs",
|
"dist/index.mjs",
|
||||||
"dist/entry.js",
|
"dist/entry.js",
|
||||||
|
"moltbot.mjs",
|
||||||
"dist/entry.mjs",
|
"dist/entry.mjs",
|
||||||
"scripts/run-node.mjs",
|
"scripts/run-node.mjs",
|
||||||
"src/index.ts",
|
"src/index.ts",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue