groove-dev 0.26.7 → 0.26.8
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.
|
@@ -148,9 +148,23 @@ export function createApi(app, daemon) {
|
|
|
148
148
|
app.post('/api/providers/ollama/pull', async (req, res) => {
|
|
149
149
|
const { model } = req.body;
|
|
150
150
|
if (!model) return res.status(400).json({ error: 'model is required' });
|
|
151
|
-
if (!OllamaProvider.isInstalled()) return res.status(400).json({ error: 'Ollama is not installed' });
|
|
152
|
-
const broadcast = daemon.broadcast
|
|
151
|
+
if (!OllamaProvider.isInstalled()) return res.status(400).json({ error: 'Ollama is not installed. Install with: brew install ollama' });
|
|
152
|
+
const broadcast = daemon.broadcast.bind(daemon);
|
|
153
153
|
try {
|
|
154
|
+
// Auto-start Ollama server if not running
|
|
155
|
+
const running = await OllamaProvider.isServerRunning();
|
|
156
|
+
if (!running) {
|
|
157
|
+
broadcast({ type: 'ollama:serve:starting' });
|
|
158
|
+
OllamaProvider.startServer();
|
|
159
|
+
// Wait for server to be ready (up to 10s)
|
|
160
|
+
for (let i = 0; i < 20; i++) {
|
|
161
|
+
await new Promise((r) => setTimeout(r, 500));
|
|
162
|
+
if (await OllamaProvider.isServerRunning()) break;
|
|
163
|
+
}
|
|
164
|
+
if (!(await OllamaProvider.isServerRunning())) {
|
|
165
|
+
return res.status(500).json({ error: 'Could not start Ollama server. Run `ollama serve` manually.' });
|
|
166
|
+
}
|
|
167
|
+
}
|
|
154
168
|
broadcast({ type: 'ollama:pull:start', model });
|
|
155
169
|
await OllamaProvider.pullModel(model, (progress) => {
|
|
156
170
|
broadcast({ type: 'ollama:pull:progress', model, progress: progress.trim() });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "groove-dev",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.8",
|
|
4
4
|
"description": "Open-source agent orchestration layer — the AI company OS. Local model agent engine (GGUF/Ollama/llama-server), HuggingFace model browser, MCP integrations (Slack, Gmail, Stripe, 15+), agent scheduling (cron), business roles (CMO, CFO, EA). GUI dashboard, multi-agent coordination, zero cold-start, infinite sessions. Works with Claude Code, Codex, Gemini CLI, Ollama, any local model.",
|
|
5
5
|
"license": "FSL-1.1-Apache-2.0",
|
|
6
6
|
"author": "Groove Dev <hello@groovedev.ai> (https://groovedev.ai)",
|
|
@@ -148,9 +148,23 @@ export function createApi(app, daemon) {
|
|
|
148
148
|
app.post('/api/providers/ollama/pull', async (req, res) => {
|
|
149
149
|
const { model } = req.body;
|
|
150
150
|
if (!model) return res.status(400).json({ error: 'model is required' });
|
|
151
|
-
if (!OllamaProvider.isInstalled()) return res.status(400).json({ error: 'Ollama is not installed' });
|
|
152
|
-
const broadcast = daemon.broadcast
|
|
151
|
+
if (!OllamaProvider.isInstalled()) return res.status(400).json({ error: 'Ollama is not installed. Install with: brew install ollama' });
|
|
152
|
+
const broadcast = daemon.broadcast.bind(daemon);
|
|
153
153
|
try {
|
|
154
|
+
// Auto-start Ollama server if not running
|
|
155
|
+
const running = await OllamaProvider.isServerRunning();
|
|
156
|
+
if (!running) {
|
|
157
|
+
broadcast({ type: 'ollama:serve:starting' });
|
|
158
|
+
OllamaProvider.startServer();
|
|
159
|
+
// Wait for server to be ready (up to 10s)
|
|
160
|
+
for (let i = 0; i < 20; i++) {
|
|
161
|
+
await new Promise((r) => setTimeout(r, 500));
|
|
162
|
+
if (await OllamaProvider.isServerRunning()) break;
|
|
163
|
+
}
|
|
164
|
+
if (!(await OllamaProvider.isServerRunning())) {
|
|
165
|
+
return res.status(500).json({ error: 'Could not start Ollama server. Run `ollama serve` manually.' });
|
|
166
|
+
}
|
|
167
|
+
}
|
|
154
168
|
broadcast({ type: 'ollama:pull:start', model });
|
|
155
169
|
await OllamaProvider.pullModel(model, (progress) => {
|
|
156
170
|
broadcast({ type: 'ollama:pull:progress', model, progress: progress.trim() });
|