groove-dev 0.17.5 → 0.17.6
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/node_modules/@groove-dev/daemon/integrations-registry.json +6 -6
- package/node_modules/@groove-dev/daemon/src/api.js +10 -0
- package/node_modules/@groove-dev/daemon/src/integrations.js +43 -1
- package/node_modules/@groove-dev/gui/dist/assets/{index-DYqJ7W7j.js → index-CsymvgNh.js} +18 -18
- package/node_modules/@groove-dev/gui/dist/index.html +1 -1
- package/node_modules/@groove-dev/gui/src/views/IntegrationsStore.jsx +38 -1
- package/package.json +1 -1
- package/packages/daemon/integrations-registry.json +6 -6
- package/packages/daemon/src/api.js +10 -0
- package/packages/daemon/src/integrations.js +43 -1
- package/packages/gui/dist/assets/{index-DYqJ7W7j.js → index-CsymvgNh.js} +18 -18
- package/packages/gui/dist/index.html +1 -1
- package/packages/gui/src/views/IntegrationsStore.jsx +38 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>GROOVE</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-CsymvgNh.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-BhjOFLBc.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
@@ -366,7 +366,7 @@ function CredentialModal({ integration, onClose }) {
|
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
// -- Integration Detail Modal --
|
|
369
|
-
function IntegrationDetailModal({ integration, installing, onInstall, onUninstall, onConfigure, onClose }) {
|
|
369
|
+
function IntegrationDetailModal({ integration, installing, onInstall, onUninstall, onConfigure, onAuthenticate, onClose }) {
|
|
370
370
|
if (!integration) return null;
|
|
371
371
|
|
|
372
372
|
const isAutoAuth = integration.authType === 'none' && (integration.envKeys || []).length === 0;
|
|
@@ -406,6 +406,14 @@ function IntegrationDetailModal({ integration, installing, onInstall, onUninstal
|
|
|
406
406
|
<div style={modal.actionBar}>
|
|
407
407
|
{integration.installed ? (
|
|
408
408
|
<div style={{ display: 'flex', gap: 8, flex: 1 }}>
|
|
409
|
+
{isAutoAuth && (
|
|
410
|
+
<button
|
|
411
|
+
onClick={() => onAuthenticate(integration)}
|
|
412
|
+
style={modal.installBtn}
|
|
413
|
+
>
|
|
414
|
+
Sign in with {integration.name.includes('Google') || integration.id.includes('google') || integration.id === 'gmail' ? 'Google' : integration.name}
|
|
415
|
+
</button>
|
|
416
|
+
)}
|
|
409
417
|
{hasCredentials && (
|
|
410
418
|
<button
|
|
411
419
|
onClick={() => onConfigure(integration)}
|
|
@@ -654,6 +662,7 @@ export default function IntegrationsStore() {
|
|
|
654
662
|
const [selectedItem, setSelectedItem] = useState(null);
|
|
655
663
|
const [configuring, setConfiguring] = useState(null);
|
|
656
664
|
const [hovered, setHovered] = useState(null);
|
|
665
|
+
const [statusMsg, setStatusMsg] = useState('');
|
|
657
666
|
|
|
658
667
|
const fetchIntegrations = useCallback(async () => {
|
|
659
668
|
setLoading(true);
|
|
@@ -706,6 +715,26 @@ export default function IntegrationsStore() {
|
|
|
706
715
|
setConfiguring(item);
|
|
707
716
|
}
|
|
708
717
|
|
|
718
|
+
async function handleAuthenticate(item) {
|
|
719
|
+
setSelectedItem(null);
|
|
720
|
+
try {
|
|
721
|
+
const res = await fetch(`/api/integrations/${item.id}/authenticate`, { method: 'POST' });
|
|
722
|
+
const data = await res.json();
|
|
723
|
+
if (data.ok) {
|
|
724
|
+
flash('Sign-in window opened — check your browser');
|
|
725
|
+
} else {
|
|
726
|
+
flash(data.error || 'Authentication failed');
|
|
727
|
+
}
|
|
728
|
+
} catch {
|
|
729
|
+
flash('Authentication failed');
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
function flash(msg) {
|
|
734
|
+
setStatusMsg(msg);
|
|
735
|
+
setTimeout(() => setStatusMsg(''), 4000);
|
|
736
|
+
}
|
|
737
|
+
|
|
709
738
|
function handleConfigureClose() {
|
|
710
739
|
setConfiguring(null);
|
|
711
740
|
fetchIntegrations();
|
|
@@ -752,6 +781,13 @@ export default function IntegrationsStore() {
|
|
|
752
781
|
</div>
|
|
753
782
|
</div>
|
|
754
783
|
|
|
784
|
+
{/* Status message */}
|
|
785
|
+
{statusMsg && (
|
|
786
|
+
<div style={{ padding: '4px 20px', fontSize: 10, color: 'var(--accent)', flexShrink: 0 }}>
|
|
787
|
+
{statusMsg}
|
|
788
|
+
</div>
|
|
789
|
+
)}
|
|
790
|
+
|
|
755
791
|
{/* Toolbar */}
|
|
756
792
|
<div style={styles.toolbar}>
|
|
757
793
|
<div style={styles.searchRow}>
|
|
@@ -845,6 +881,7 @@ export default function IntegrationsStore() {
|
|
|
845
881
|
onInstall={handleInstall}
|
|
846
882
|
onUninstall={handleUninstall}
|
|
847
883
|
onConfigure={handleConfigure}
|
|
884
|
+
onAuthenticate={handleAuthenticate}
|
|
848
885
|
onClose={() => setSelectedItem(null)}
|
|
849
886
|
/>
|
|
850
887
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "groove-dev",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.6",
|
|
4
4
|
"description": "Open-source agent orchestration layer — the AI company OS. 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.",
|
|
5
5
|
"license": "FSL-1.1-Apache-2.0",
|
|
6
6
|
"author": "Groove Dev <hello@groovedev.ai> (https://groovedev.ai)",
|
|
@@ -102,9 +102,9 @@
|
|
|
102
102
|
"authType": "none",
|
|
103
103
|
"envKeys": [],
|
|
104
104
|
"setupSteps": [
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
105
|
+
"Click Install, then click 'Sign in with Google'",
|
|
106
|
+
"A browser window will open — authorize Groove",
|
|
107
|
+
"Done — no API keys or tokens needed"
|
|
108
108
|
],
|
|
109
109
|
"featured": false,
|
|
110
110
|
"downloads": 0,
|
|
@@ -127,9 +127,9 @@
|
|
|
127
127
|
"authType": "none",
|
|
128
128
|
"envKeys": [],
|
|
129
129
|
"setupSteps": [
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
130
|
+
"Click Install, then click 'Sign in with Google'",
|
|
131
|
+
"A browser window will open — authorize Groove",
|
|
132
|
+
"Done — no API keys or tokens needed"
|
|
133
133
|
],
|
|
134
134
|
"featured": false,
|
|
135
135
|
"downloads": 0,
|
|
@@ -506,6 +506,16 @@ export function createApi(app, daemon) {
|
|
|
506
506
|
|
|
507
507
|
// Parameterized :id routes (after specific routes above)
|
|
508
508
|
|
|
509
|
+
app.post('/api/integrations/:id/authenticate', (req, res) => {
|
|
510
|
+
try {
|
|
511
|
+
const handle = daemon.integrations.authenticate(req.params.id);
|
|
512
|
+
res.json({ ok: true, pid: handle.pid });
|
|
513
|
+
// Auto-cleanup tracked by the handle timeout
|
|
514
|
+
} catch (err) {
|
|
515
|
+
res.status(400).json({ error: err.message });
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
|
|
509
519
|
app.post('/api/integrations/:id/install', async (req, res) => {
|
|
510
520
|
try {
|
|
511
521
|
const result = await daemon.integrations.install(req.params.id);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, rmSync } from 'fs';
|
|
5
5
|
import { resolve, dirname } from 'path';
|
|
6
6
|
import { fileURLToPath } from 'url';
|
|
7
|
-
import { execFileSync } from 'child_process';
|
|
7
|
+
import { execFileSync, spawn as cpSpawn } from 'child_process';
|
|
8
8
|
|
|
9
9
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
10
10
|
|
|
@@ -457,6 +457,48 @@ export class IntegrationStore {
|
|
|
457
457
|
return !!(clientId && clientSecret);
|
|
458
458
|
}
|
|
459
459
|
|
|
460
|
+
/**
|
|
461
|
+
* Pre-authenticate an auto-auth integration by running its MCP server briefly.
|
|
462
|
+
* The server will open a browser for OAuth. Once auth completes, the server
|
|
463
|
+
* stores tokens locally so future agent spawns work without prompting.
|
|
464
|
+
* Returns a handle to track the auth process.
|
|
465
|
+
*/
|
|
466
|
+
authenticate(integrationId) {
|
|
467
|
+
const entry = this.registry.find((s) => s.id === integrationId);
|
|
468
|
+
if (!entry) throw new Error(`Integration not found: ${integrationId}`);
|
|
469
|
+
|
|
470
|
+
const command = entry.command || 'npx';
|
|
471
|
+
const args = entry.args || ['-y', entry.npmPackage];
|
|
472
|
+
|
|
473
|
+
// Build env with any configured credentials
|
|
474
|
+
const env = {};
|
|
475
|
+
for (const ek of (entry.envKeys || [])) {
|
|
476
|
+
const val = this.getCredential(integrationId, ek.key);
|
|
477
|
+
if (val) env[ek.key] = val;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
// Spawn the MCP server — it will trigger OAuth on startup
|
|
481
|
+
const proc = cpSpawn(command, args, {
|
|
482
|
+
env: { ...process.env, ...env },
|
|
483
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
484
|
+
detached: false,
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
// Auto-kill after 2 minutes (auth should complete well before that)
|
|
488
|
+
const timeout = setTimeout(() => {
|
|
489
|
+
try { proc.kill('SIGTERM'); } catch { /* ignore */ }
|
|
490
|
+
}, 120_000);
|
|
491
|
+
|
|
492
|
+
proc.on('exit', () => clearTimeout(timeout));
|
|
493
|
+
|
|
494
|
+
this.daemon.audit.log('integration.authenticate', { id: integrationId });
|
|
495
|
+
|
|
496
|
+
return {
|
|
497
|
+
pid: proc.pid,
|
|
498
|
+
kill: () => { clearTimeout(timeout); try { proc.kill('SIGTERM'); } catch { /* ignore */ } },
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
|
|
460
502
|
// --- Internal ---
|
|
461
503
|
|
|
462
504
|
_isInstalled(integrationId) {
|