bloby-bot 0.21.13 → 0.22.1
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/bin/cli.js +2 -2
- package/cli/commands/start.ts +1 -1
- package/cli/commands/tunnel.ts +1 -1
- package/cli/core/config.ts +1 -1
- package/cli/core/server.ts +1 -1
- package/package.json +1 -1
- package/shared/config.ts +1 -1
- package/supervisor/agents/prompts/coder.txt +1 -1
- package/supervisor/chat/src/components/Chat/MessageBubble.tsx +2 -2
- package/supervisor/chat/src/lib/ws-client.ts +1 -1
- package/supervisor/index.ts +24 -0
- package/vite.config.ts +2 -2
- package/worker/prompts/bloby-system-prompt.txt +7 -7
- package/workspace/backend/index.ts +1 -1
- package/workspace/skills/chrome-extension/.claude-plugin/plugin.json +6 -0
- package/workspace/skills/chrome-extension/SKILL.md +133 -0
- package/workspace/skills/chrome-extension/background.js +239 -0
- package/workspace/skills/chrome-extension/content-script.js +218 -0
- package/workspace/skills/chrome-extension/content-style.css +86 -0
- package/workspace/skills/chrome-extension/icons/icon-128.png +0 -0
- package/workspace/skills/chrome-extension/icons/icon-16.png +0 -0
- package/workspace/skills/chrome-extension/icons/icon-48.png +0 -0
- package/workspace/skills/chrome-extension/manifest.json +46 -0
- package/workspace/skills/chrome-extension/panel/panel.html +74 -0
- package/workspace/skills/chrome-extension/popup/popup.css +124 -0
- package/workspace/skills/chrome-extension/popup/popup.html +47 -0
- package/workspace/skills/chrome-extension/popup/popup.js +115 -0
- package/workspace/skills/chrome-extension/skill.json +15 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bloby Chrome Extension — Popup
|
|
3
|
+
*
|
|
4
|
+
* Shows either:
|
|
5
|
+
* - Pairing screen: 6-digit code input to connect to a Bloby instance
|
|
6
|
+
* - Connected screen: status + disconnect button
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const pairScreen = document.getElementById('pair-screen');
|
|
10
|
+
const connectedScreen = document.getElementById('connected-screen');
|
|
11
|
+
const errorEl = document.getElementById('error');
|
|
12
|
+
const pairingEl = document.getElementById('pairing');
|
|
13
|
+
const inputs = document.querySelectorAll('.code-input input');
|
|
14
|
+
|
|
15
|
+
// ── Init: check current state ──────────────────────────────────────────────
|
|
16
|
+
|
|
17
|
+
chrome.runtime.sendMessage({ type: 'bloby:get-state' }, (state) => {
|
|
18
|
+
if (state?.paired) {
|
|
19
|
+
showConnected(state);
|
|
20
|
+
} else {
|
|
21
|
+
showPairing();
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// ── Pairing Screen ─────────────────────────────────────────────────────────
|
|
26
|
+
|
|
27
|
+
function showPairing() {
|
|
28
|
+
pairScreen.style.display = 'block';
|
|
29
|
+
connectedScreen.style.display = 'none';
|
|
30
|
+
inputs[0].focus();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Auto-advance between code inputs
|
|
34
|
+
inputs.forEach((input, i) => {
|
|
35
|
+
input.addEventListener('input', (e) => {
|
|
36
|
+
const val = e.target.value.replace(/\D/g, '');
|
|
37
|
+
e.target.value = val;
|
|
38
|
+
|
|
39
|
+
if (val) {
|
|
40
|
+
e.target.classList.add('filled');
|
|
41
|
+
if (i < inputs.length - 1) {
|
|
42
|
+
inputs[i + 1].focus();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Check if all filled
|
|
47
|
+
const code = Array.from(inputs).map((inp) => inp.value).join('');
|
|
48
|
+
if (code.length === 6) {
|
|
49
|
+
submitCode(code);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
input.addEventListener('keydown', (e) => {
|
|
54
|
+
if (e.key === 'Backspace' && !e.target.value && i > 0) {
|
|
55
|
+
inputs[i - 1].focus();
|
|
56
|
+
inputs[i - 1].value = '';
|
|
57
|
+
inputs[i - 1].classList.remove('filled');
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// Handle paste
|
|
62
|
+
input.addEventListener('paste', (e) => {
|
|
63
|
+
e.preventDefault();
|
|
64
|
+
const pasted = (e.clipboardData.getData('text') || '').replace(/\D/g, '').slice(0, 6);
|
|
65
|
+
pasted.split('').forEach((char, j) => {
|
|
66
|
+
if (inputs[j]) {
|
|
67
|
+
inputs[j].value = char;
|
|
68
|
+
inputs[j].classList.add('filled');
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
if (pasted.length === 6) {
|
|
72
|
+
submitCode(pasted);
|
|
73
|
+
} else if (pasted.length > 0) {
|
|
74
|
+
inputs[Math.min(pasted.length, 5)].focus();
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
async function submitCode(code) {
|
|
80
|
+
errorEl.textContent = '';
|
|
81
|
+
pairingEl.style.display = 'block';
|
|
82
|
+
inputs.forEach((inp) => { inp.disabled = true; });
|
|
83
|
+
|
|
84
|
+
chrome.runtime.sendMessage({ type: 'bloby:pair', code }, (result) => {
|
|
85
|
+
pairingEl.style.display = 'none';
|
|
86
|
+
|
|
87
|
+
if (result?.success) {
|
|
88
|
+
showConnected({
|
|
89
|
+
config: { serverUrl: result.serverUrl, username: result.username },
|
|
90
|
+
connected: true,
|
|
91
|
+
});
|
|
92
|
+
} else {
|
|
93
|
+
errorEl.textContent = result?.error || 'Pairing failed';
|
|
94
|
+
inputs.forEach((inp) => { inp.disabled = false; inp.value = ''; inp.classList.remove('filled'); });
|
|
95
|
+
inputs[0].focus();
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// ── Connected Screen ───────────────────────────────────────────────────────
|
|
101
|
+
|
|
102
|
+
function showConnected(state) {
|
|
103
|
+
pairScreen.style.display = 'none';
|
|
104
|
+
connectedScreen.style.display = 'block';
|
|
105
|
+
|
|
106
|
+
document.getElementById('connected-name').textContent = state.config?.username || 'Connected';
|
|
107
|
+
document.getElementById('connected-url').textContent = state.config?.serverUrl || '';
|
|
108
|
+
document.getElementById('status-text').textContent = state.connected ? 'Connected' : 'Offline';
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
document.getElementById('disconnect-btn').addEventListener('click', () => {
|
|
112
|
+
chrome.runtime.sendMessage({ type: 'bloby:unpair' }, () => {
|
|
113
|
+
showPairing();
|
|
114
|
+
});
|
|
115
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "chrome-extension",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"bloby_human": "Bruno Bertapeli",
|
|
5
|
+
"bloby": "bloby-bruno",
|
|
6
|
+
"author": "newbot-official",
|
|
7
|
+
"description": "Bloby on every webpage. Browse with your AI agent — transcribe videos, compare prices, summarize articles, and more.",
|
|
8
|
+
"type": "skill",
|
|
9
|
+
"depends": [],
|
|
10
|
+
"env_keys": [],
|
|
11
|
+
"has_telemetry": false,
|
|
12
|
+
"size": "32KB",
|
|
13
|
+
"contains_binaries": false,
|
|
14
|
+
"tags": ["chrome", "extension", "browser", "productivity", "assistant"]
|
|
15
|
+
}
|