bloby-bot 0.70.1 → 0.70.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-bloby/assets/{bloby-Dfx1hOe-.js → bloby-CXmOcb1r.js} +4 -4
- package/dist-bloby/assets/{highlighted-body-OFNGDK62-BzAQnLnm.js → highlighted-body-OFNGDK62-D7cU1Y-Z.js} +1 -1
- package/dist-bloby/assets/mermaid-GHXKKRXX-D5YxphBn.js +1 -0
- package/dist-bloby/bloby.html +1 -1
- package/package.json +4 -3
- package/scripts/install +42 -4
- package/scripts/install.ps1 +3 -3
- package/scripts/install.sh +35 -7
- package/scripts/postinstall.js +17 -2
- package/supervisor/chat/bloby-main.tsx +14 -10
- package/supervisor/harnesses/claude.ts +3 -0
- package/supervisor/harnesses/codex.ts +927 -230
- package/vite.bloby.config.ts +0 -8
- package/worker/prompts/bloby-system-prompt-codex.txt +15 -15
- package/workspace/client/index.html +2 -2
- package/workspace/client/public/manifest.json +16 -4
- package/workspace/client/public/morphy-icon-apple-180.png +0 -0
- package/workspace/client/public/morphy-icon-maskable-192.png +0 -0
- package/workspace/client/public/morphy-icon-maskable-512.png +0 -0
- package/dist-bloby/assets/mermaid-GHXKKRXX-CHPqkcxH.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,r as t,t as n}from"./jsx-runtime-C0W9Wf2W.js";import{n as r,r as i,t as a}from"./bloby-
|
|
1
|
+
import{c as e,r as t,t as n}from"./jsx-runtime-C0W9Wf2W.js";import{n as r,r as i,t as a}from"./bloby-CXmOcb1r.js";var o=e(t(),1),s=n(),c=({code:e,language:t,raw:n,className:c,startLine:l,lineNumbers:u,...d})=>{let{shikiTheme:f}=(0,o.useContext)(i),p=r(),[m,h]=(0,o.useState)(n);return(0,o.useEffect)(()=>{if(!p){h(n);return}let r=p.highlight({code:e,language:t,themes:f},e=>{h(e)});r&&h(r)},[e,t,f,p,n]),(0,s.jsx)(a,{className:c,language:t,lineNumbers:u,result:m,startLine:l,...d})};export{c as HighlightedCodeBlockBody};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./bloby-CXmOcb1r.js";export{e as Mermaid};
|
package/dist-bloby/bloby.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, interactive-widget=resizes-content" />
|
|
6
6
|
<title>Bloby Chat</title>
|
|
7
|
-
<script type="module" crossorigin src="/bloby/assets/bloby-
|
|
7
|
+
<script type="module" crossorigin src="/bloby/assets/bloby-CXmOcb1r.js"></script>
|
|
8
8
|
<link rel="modulepreload" crossorigin href="/bloby/assets/jsx-runtime-C0W9Wf2W.js">
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/bloby/assets/globals-DpO5tO92.js">
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/bloby/assets/globals-DyeW509Y.css">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bloby-bot",
|
|
3
|
-
"version": "0.70.
|
|
3
|
+
"version": "0.70.5",
|
|
4
4
|
"releaseNotes": [
|
|
5
5
|
"1. Fix: agent self-update ",
|
|
6
6
|
"1",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"license": "BUSL-1.1",
|
|
12
12
|
"bin": {
|
|
13
|
-
"bloby": "
|
|
13
|
+
"bloby": "bin/cli.js"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"LICENSE",
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
"postinstall": "node scripts/postinstall.js",
|
|
49
49
|
"dev:workspace": "vite",
|
|
50
50
|
"dev:docs": "cd ./docs && npx fumapress",
|
|
51
|
-
"sync:pi-models": "tsx scripts/sync-pi-models.ts"
|
|
51
|
+
"sync:pi-models": "tsx scripts/sync-pi-models.ts",
|
|
52
|
+
"prepublishOnly": "vite build --config vite.bloby.config.ts"
|
|
52
53
|
},
|
|
53
54
|
"dependencies": {
|
|
54
55
|
"@anthropic-ai/claude-agent-sdk": "^0.3.169",
|
package/scripts/install
CHANGED
|
@@ -32,6 +32,20 @@ DIM='\033[2m'
|
|
|
32
32
|
BOLD='\033[1m'
|
|
33
33
|
RESET='\033[0m'
|
|
34
34
|
|
|
35
|
+
# Disable colors if not a terminal
|
|
36
|
+
if [ ! -t 1 ]; then
|
|
37
|
+
BLUE='' PINK='' YELLOW='' RED='' DIM='' BOLD='' RESET='' G1='' G2='' G3='' G4='' G5='' G6='' G7=''
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# Cleanup on exit (restore cursor, reset colors, remove temp files)
|
|
41
|
+
cleanup() {
|
|
42
|
+
printf '\033[?25h' # show cursor
|
|
43
|
+
printf "${RESET}"
|
|
44
|
+
rm -f "$TMPFILE" 2>/dev/null
|
|
45
|
+
rm -rf "$TMPDIR" 2>/dev/null
|
|
46
|
+
}
|
|
47
|
+
trap cleanup EXIT INT TERM
|
|
48
|
+
|
|
35
49
|
printf "\n"
|
|
36
50
|
printf "${G1}${BOLD} █▄ ${RESET}\n"
|
|
37
51
|
printf "${G2}${BOLD} ▄ ▄ ██ ${RESET}\n"
|
|
@@ -147,14 +161,14 @@ install_bloby() {
|
|
|
147
161
|
fi
|
|
148
162
|
|
|
149
163
|
# Fetch version + tarball URL from npm registry
|
|
150
|
-
NPM_VERSION=$("$NPM" view bloby version 2>/dev/null || echo "")
|
|
164
|
+
NPM_VERSION=$("$NPM" view bloby-bot version 2>/dev/null || echo "")
|
|
151
165
|
if [ -n "$NPM_VERSION" ]; then
|
|
152
|
-
printf " ${DIM}Latest npm version: bloby@${NPM_VERSION}${RESET}\n"
|
|
166
|
+
printf " ${DIM}Latest npm version: bloby-bot@${NPM_VERSION}${RESET}\n"
|
|
153
167
|
fi
|
|
154
168
|
|
|
155
169
|
printf " ${BLUE}↓${RESET} Installing bloby...\n"
|
|
156
170
|
|
|
157
|
-
TARBALL_URL=$("$NPM" view bloby dist.tarball 2>/dev/null)
|
|
171
|
+
TARBALL_URL=$("$NPM" view bloby-bot dist.tarball 2>/dev/null || echo "")
|
|
158
172
|
if [ -z "$TARBALL_URL" ]; then
|
|
159
173
|
printf " ${RED}✗${RESET} Failed to fetch package info from npm\n"
|
|
160
174
|
exit 1
|
|
@@ -213,7 +227,30 @@ install_bloby() {
|
|
|
213
227
|
# resolver (ERESOLVE). Persist legacy-peer-deps so npm install resolves cleanly.
|
|
214
228
|
grep -qs '^legacy-peer-deps' "$BLOBY_HOME/.npmrc" 2>/dev/null || printf 'legacy-peer-deps=true\n' >> "$BLOBY_HOME/.npmrc"
|
|
215
229
|
printf " ${BLUE}↓${RESET} Installing dependencies...\n"
|
|
216
|
-
(
|
|
230
|
+
INSTALL_LOG=$(mktemp)
|
|
231
|
+
if ! (cd "$BLOBY_HOME" && "$NPM" install --omit=dev > "$INSTALL_LOG" 2>&1); then
|
|
232
|
+
printf " ${RED}✗${RESET} Dependency install failed:\n"
|
|
233
|
+
cat "$INSTALL_LOG"
|
|
234
|
+
rm -f "$INSTALL_LOG"
|
|
235
|
+
exit 1
|
|
236
|
+
fi
|
|
237
|
+
rm -f "$INSTALL_LOG"
|
|
238
|
+
|
|
239
|
+
# Install workspace dependencies (rebuilds native modules for this platform —
|
|
240
|
+
# workspace/node_modules is intentionally not shipped in the tarball so that
|
|
241
|
+
# better-sqlite3 etc. get a prebuild matching the target OS+arch, not the
|
|
242
|
+
# publisher's machine)
|
|
243
|
+
if [ -f "$BLOBY_HOME/workspace/package.json" ]; then
|
|
244
|
+
printf " ${BLUE}↓${RESET} Installing workspace dependencies...\n"
|
|
245
|
+
WS_INSTALL_LOG=$(mktemp)
|
|
246
|
+
if ! (cd "$BLOBY_HOME/workspace" && "$NPM" install --omit=dev > "$WS_INSTALL_LOG" 2>&1); then
|
|
247
|
+
printf " ${RED}✗${RESET} Workspace dependency install failed:\n"
|
|
248
|
+
cat "$WS_INSTALL_LOG"
|
|
249
|
+
rm -f "$WS_INSTALL_LOG"
|
|
250
|
+
exit 1
|
|
251
|
+
fi
|
|
252
|
+
rm -f "$WS_INSTALL_LOG"
|
|
253
|
+
fi
|
|
217
254
|
|
|
218
255
|
# Verify
|
|
219
256
|
if [ ! -f "$BLOBY_HOME/bin/cli.js" ]; then
|
|
@@ -320,6 +357,7 @@ printf "\n"
|
|
|
320
357
|
printf " ${BLUE}bloby init${RESET} Set up your bot\n"
|
|
321
358
|
printf " ${BLUE}bloby start${RESET} Start your bot\n"
|
|
322
359
|
printf " ${BLUE}bloby status${RESET} Check if it's running\n"
|
|
360
|
+
printf " ${BLUE}bloby help${RESET} All commands\n"
|
|
323
361
|
printf "\n"
|
|
324
362
|
printf " ${PINK}>${RESET} Run ${BLUE}bloby init${RESET} to begin.\n"
|
|
325
363
|
printf " ${DIM}(Open a new terminal if 'bloby' isn't found yet)${RESET}\n"
|
package/scripts/install.ps1
CHANGED
|
@@ -165,14 +165,14 @@ function Install-Bloby {
|
|
|
165
165
|
|
|
166
166
|
# Fetch version + tarball URL from npm registry
|
|
167
167
|
$npmVersion = ""
|
|
168
|
-
try { $npmVersion = (& $NPM view bloby version 2>$null).Trim() } catch {}
|
|
168
|
+
try { $npmVersion = (& $NPM view bloby-bot version 2>$null).Trim() } catch {}
|
|
169
169
|
if ($npmVersion) {
|
|
170
|
-
Write-Host " Latest npm version: bloby@${npmVersion}" -ForegroundColor DarkGray
|
|
170
|
+
Write-Host " Latest npm version: bloby-bot@${npmVersion}" -ForegroundColor DarkGray
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
Write-Down "Installing bloby..."
|
|
174
174
|
|
|
175
|
-
$tarballUrl = (& $NPM view bloby dist.tarball 2>$null).Trim()
|
|
175
|
+
$tarballUrl = (& $NPM view bloby-bot dist.tarball 2>$null).Trim()
|
|
176
176
|
if (-not $tarballUrl) {
|
|
177
177
|
Write-Host " ✗ Failed to fetch package info from npm" -ForegroundColor Red
|
|
178
178
|
exit 1
|
package/scripts/install.sh
CHANGED
|
@@ -32,6 +32,20 @@ DIM='\033[2m'
|
|
|
32
32
|
BOLD='\033[1m'
|
|
33
33
|
RESET='\033[0m'
|
|
34
34
|
|
|
35
|
+
# Disable colors if not a terminal
|
|
36
|
+
if [ ! -t 1 ]; then
|
|
37
|
+
BLUE='' PINK='' YELLOW='' RED='' DIM='' BOLD='' RESET='' G1='' G2='' G3='' G4='' G5='' G6='' G7=''
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# Cleanup on exit (restore cursor, reset colors, remove temp files)
|
|
41
|
+
cleanup() {
|
|
42
|
+
printf '\033[?25h' # show cursor
|
|
43
|
+
printf "${RESET}"
|
|
44
|
+
rm -f "$TMPFILE" 2>/dev/null
|
|
45
|
+
rm -rf "$TMPDIR" 2>/dev/null
|
|
46
|
+
}
|
|
47
|
+
trap cleanup EXIT INT TERM
|
|
48
|
+
|
|
35
49
|
printf "\n"
|
|
36
50
|
printf "${G1}${BOLD} █▄ ${RESET}\n"
|
|
37
51
|
printf "${G2}${BOLD} ▄ ▄ ██ ${RESET}\n"
|
|
@@ -147,14 +161,14 @@ install_bloby() {
|
|
|
147
161
|
fi
|
|
148
162
|
|
|
149
163
|
# Fetch version + tarball URL from npm registry
|
|
150
|
-
NPM_VERSION=$("$NPM" view bloby version 2>/dev/null || echo "")
|
|
164
|
+
NPM_VERSION=$("$NPM" view bloby-bot version 2>/dev/null || echo "")
|
|
151
165
|
if [ -n "$NPM_VERSION" ]; then
|
|
152
|
-
printf " ${DIM}Latest npm version: bloby@${NPM_VERSION}${RESET}\n"
|
|
166
|
+
printf " ${DIM}Latest npm version: bloby-bot@${NPM_VERSION}${RESET}\n"
|
|
153
167
|
fi
|
|
154
168
|
|
|
155
169
|
printf " ${BLUE}↓${RESET} Installing bloby...\n"
|
|
156
170
|
|
|
157
|
-
TARBALL_URL=$("$NPM" view bloby dist.tarball 2>/dev/null)
|
|
171
|
+
TARBALL_URL=$("$NPM" view bloby-bot dist.tarball 2>/dev/null || echo "")
|
|
158
172
|
if [ -z "$TARBALL_URL" ]; then
|
|
159
173
|
printf " ${RED}✗${RESET} Failed to fetch package info from npm\n"
|
|
160
174
|
exit 1
|
|
@@ -213,15 +227,29 @@ install_bloby() {
|
|
|
213
227
|
# resolver (ERESOLVE). Persist legacy-peer-deps so npm install resolves cleanly.
|
|
214
228
|
grep -qs '^legacy-peer-deps' "$BLOBY_HOME/.npmrc" 2>/dev/null || printf 'legacy-peer-deps=true\n' >> "$BLOBY_HOME/.npmrc"
|
|
215
229
|
printf " ${BLUE}↓${RESET} Installing dependencies...\n"
|
|
216
|
-
(
|
|
230
|
+
INSTALL_LOG=$(mktemp)
|
|
231
|
+
if ! (cd "$BLOBY_HOME" && "$NPM" install --omit=dev > "$INSTALL_LOG" 2>&1); then
|
|
232
|
+
printf " ${RED}✗${RESET} Dependency install failed:\n"
|
|
233
|
+
cat "$INSTALL_LOG"
|
|
234
|
+
rm -f "$INSTALL_LOG"
|
|
235
|
+
exit 1
|
|
236
|
+
fi
|
|
237
|
+
rm -f "$INSTALL_LOG"
|
|
217
238
|
|
|
218
|
-
# Install workspace dependencies (rebuilds native modules for this platform
|
|
239
|
+
# Install workspace dependencies (rebuilds native modules for this platform —
|
|
240
|
+
# workspace/node_modules is intentionally not shipped in the tarball so that
|
|
241
|
+
# better-sqlite3 etc. get a prebuild matching the target OS+arch, not the
|
|
242
|
+
# publisher's machine)
|
|
219
243
|
if [ -f "$BLOBY_HOME/workspace/package.json" ]; then
|
|
220
244
|
printf " ${BLUE}↓${RESET} Installing workspace dependencies...\n"
|
|
221
|
-
|
|
222
|
-
|
|
245
|
+
WS_INSTALL_LOG=$(mktemp)
|
|
246
|
+
if ! (cd "$BLOBY_HOME/workspace" && "$NPM" install --omit=dev > "$WS_INSTALL_LOG" 2>&1); then
|
|
247
|
+
printf " ${RED}✗${RESET} Workspace dependency install failed:\n"
|
|
248
|
+
cat "$WS_INSTALL_LOG"
|
|
249
|
+
rm -f "$WS_INSTALL_LOG"
|
|
223
250
|
exit 1
|
|
224
251
|
fi
|
|
252
|
+
rm -f "$WS_INSTALL_LOG"
|
|
225
253
|
fi
|
|
226
254
|
|
|
227
255
|
# Verify
|
package/scripts/postinstall.js
CHANGED
|
@@ -14,8 +14,12 @@ const PKG_ROOT = path.resolve(__dirname, '..');
|
|
|
14
14
|
const BLOBY_HOME = path.join(os.homedir(), '.bloby');
|
|
15
15
|
|
|
16
16
|
// Loop guard: if we're already running inside ~/.bloby/, exit
|
|
17
|
-
// (prevents infinite loop when npm install triggers postinstall again)
|
|
18
|
-
|
|
17
|
+
// (prevents infinite loop when npm install triggers postinstall again).
|
|
18
|
+
// Compare realpaths — npm may run us from a symlinked cwd (e.g. /tmp vs
|
|
19
|
+
// /private/tmp on macOS), and a missed match makes cpSync copy a dir onto
|
|
20
|
+
// itself, which is a hard error on Node 22+.
|
|
21
|
+
const realOrSelf = (p) => { try { return fs.realpathSync(p); } catch { return path.resolve(p); } };
|
|
22
|
+
if (realOrSelf(PKG_ROOT) === realOrSelf(BLOBY_HOME)) {
|
|
19
23
|
process.exit(0);
|
|
20
24
|
}
|
|
21
25
|
|
|
@@ -68,6 +72,14 @@ for (const file of CODE_FILES) {
|
|
|
68
72
|
|
|
69
73
|
// ── Install dependencies in ~/.bloby/ ──
|
|
70
74
|
|
|
75
|
+
// This script runs as an npm lifecycle hook, so the environment carries the
|
|
76
|
+
// parent install's npm_config_* vars (global=true, prefix, etc.). A nested
|
|
77
|
+
// `npm install` inherits them and silently runs in global mode — wiping
|
|
78
|
+
// node_modules instead of installing deps. Strip them.
|
|
79
|
+
const NPM_ENV = Object.fromEntries(
|
|
80
|
+
Object.entries(process.env).filter(([k]) => !/^npm_config_/i.test(k))
|
|
81
|
+
);
|
|
82
|
+
|
|
71
83
|
// claude-agent-sdk 0.3.x moved @anthropic-ai/sdk + @modelcontextprotocol/sdk to
|
|
72
84
|
// peerDependencies; upgrading the existing ~/.bloby tree in place deadlocks npm's
|
|
73
85
|
// resolver (ERESOLVE). Persist legacy-peer-deps so this install — and the manual
|
|
@@ -84,6 +96,7 @@ try {
|
|
|
84
96
|
execSync('npm install --omit=dev', {
|
|
85
97
|
cwd: BLOBY_HOME,
|
|
86
98
|
stdio: 'inherit',
|
|
99
|
+
env: NPM_ENV,
|
|
87
100
|
});
|
|
88
101
|
} catch (e) {
|
|
89
102
|
// Don't swallow this — partial deps leave bloby in a crash loop on first
|
|
@@ -130,6 +143,7 @@ try {
|
|
|
130
143
|
execSync('npm install --omit=dev', {
|
|
131
144
|
cwd: path.join(BLOBY_HOME, 'workspace'),
|
|
132
145
|
stdio: 'inherit',
|
|
146
|
+
env: NPM_ENV,
|
|
133
147
|
});
|
|
134
148
|
} catch {
|
|
135
149
|
console.error('Error: workspace dependency install failed — backend will not start until fixed.');
|
|
@@ -150,6 +164,7 @@ if (fs.existsSync(distSrc)) {
|
|
|
150
164
|
execSync('npm run build:bloby', {
|
|
151
165
|
cwd: BLOBY_HOME,
|
|
152
166
|
stdio: 'ignore',
|
|
167
|
+
env: NPM_ENV,
|
|
153
168
|
});
|
|
154
169
|
} catch {
|
|
155
170
|
// Non-fatal: supervisor will build on first start
|
|
@@ -11,9 +11,6 @@ import InputBar from './src/components/Chat/InputBar';
|
|
|
11
11
|
import HeadphonesAnimation from './src/components/Chat/HeadphonesAnimation';
|
|
12
12
|
import './src/styles/globals.css';
|
|
13
13
|
|
|
14
|
-
// Injected at build time (vite.bloby.config.ts define) — the version this bundle shipped with.
|
|
15
|
-
declare const __BLOBY_VERSION__: string;
|
|
16
|
-
|
|
17
14
|
function BlobyApp() {
|
|
18
15
|
const clientRef = useRef<WsClient | null>(null);
|
|
19
16
|
const [connected, setConnected] = useState(false);
|
|
@@ -227,14 +224,21 @@ function BlobyApp() {
|
|
|
227
224
|
clientRef.current = client;
|
|
228
225
|
|
|
229
226
|
// Version handshake — this chat may be running inside the immortal shell, which (by
|
|
230
|
-
// design) survives self-updates. After a reconnect,
|
|
231
|
-
//
|
|
232
|
-
//
|
|
227
|
+
// design) survives self-updates. After a reconnect, ask the only question that matters:
|
|
228
|
+
// "is the bundle I'm running the one the server currently serves?" — by comparing THIS
|
|
229
|
+
// module's hashed filename (import.meta.url) against the entry referenced by the served
|
|
230
|
+
// /bloby/ HTML. NOT a baked version string: that goes stale whenever a release is
|
|
231
|
+
// published without rebuilding dist-bloby, which made every fresh tab/PWA launch reload
|
|
232
|
+
// once (0.69.3-baked bundle vs 0.70.x server, throttle keyed to per-tab sessionStorage).
|
|
233
233
|
const checkPlatformVersion = () => {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
234
|
+
let mine = '';
|
|
235
|
+
try { mine = new URL(import.meta.url).pathname.split('/').pop() || ''; } catch { return; }
|
|
236
|
+
if (!mine.startsWith('bloby-')) return; // dev server / unexpected layout — never risk a loop
|
|
237
|
+
fetch('/bloby/', { cache: 'no-store' })
|
|
238
|
+
.then((r) => (r.ok ? r.text() : ''))
|
|
239
|
+
.then((html) => {
|
|
240
|
+
const served = html.match(/assets\/(bloby-[A-Za-z0-9_-]+\.js)/)?.[1];
|
|
241
|
+
if (!served || served === mine) return;
|
|
238
242
|
try {
|
|
239
243
|
// Throttle: one auto-reload per 5 min per tab — if something upstream keeps
|
|
240
244
|
// serving a stale bundle, never loop.
|
|
@@ -615,6 +615,9 @@ export async function startBlobyAgentQuery(
|
|
|
615
615
|
const oauthToken = await getClaudeAccessToken();
|
|
616
616
|
if (!oauthToken) {
|
|
617
617
|
onMessage('bot:error', { conversationId, error: 'Claude OAuth token not found. Please authenticate via the dashboard.' });
|
|
618
|
+
// bot:done frees the caller's slot (WhatsApp activeAgents / scheduler) — this
|
|
619
|
+
// early return is the only path that skips the finally's guarantee below.
|
|
620
|
+
onMessage('bot:done', { conversationId, usedFileTools: false });
|
|
618
621
|
return;
|
|
619
622
|
}
|
|
620
623
|
|