groove-dev 0.27.49 → 0.27.51
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/default/security-review-prompt.md +98 -0
- package/node_modules/@groove-dev/cli/package.json +1 -1
- package/node_modules/@groove-dev/daemon/package.json +1 -1
- package/node_modules/@groove-dev/daemon/src/api.js +376 -29
- package/node_modules/@groove-dev/daemon/src/firstrun.js +1 -1
- package/node_modules/@groove-dev/daemon/src/index.js +7 -0
- package/node_modules/@groove-dev/daemon/src/providers/groove-network.js +57 -7
- package/node_modules/@groove-dev/gui/dist/assets/{index-B9oPxmNj.js → index-Dd4u8X70.js} +1723 -1723
- package/node_modules/@groove-dev/gui/dist/index.html +1 -1
- package/node_modules/@groove-dev/gui/package.json +1 -1
- package/node_modules/@groove-dev/gui/src/components/network/network-status.jsx +12 -0
- package/node_modules/@groove-dev/gui/src/components/network/node-toggle.jsx +18 -15
- package/node_modules/@groove-dev/gui/src/stores/groove.js +128 -1
- package/node_modules/@groove-dev/gui/src/views/network.jsx +82 -2
- package/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/daemon/package.json +1 -1
- package/packages/daemon/src/api.js +376 -29
- package/packages/daemon/src/firstrun.js +1 -1
- package/packages/daemon/src/index.js +7 -0
- package/packages/daemon/src/providers/groove-network.js +57 -7
- package/packages/gui/dist/assets/{index-B9oPxmNj.js → index-Dd4u8X70.js} +1723 -1723
- package/packages/gui/dist/index.html +1 -1
- package/packages/gui/package.json +1 -1
- package/packages/gui/src/components/network/network-status.jsx +12 -0
- package/packages/gui/src/components/network/node-toggle.jsx +18 -15
- package/packages/gui/src/stores/groove.js +128 -1
- package/packages/gui/src/views/network.jsx +82 -2
|
@@ -523,6 +523,13 @@ export class Daemon {
|
|
|
523
523
|
this.revalidateBetaCode().catch(() => {});
|
|
524
524
|
}
|
|
525
525
|
|
|
526
|
+
// Non-blocking check for a newer Network package release. Result is
|
|
527
|
+
// stored on daemon.networkUpdateAvailable and broadcast so the GUI
|
|
528
|
+
// can show an update badge without having to poll on open.
|
|
529
|
+
if (typeof this.checkNetworkUpdate === 'function') {
|
|
530
|
+
this.checkNetworkUpdate().catch(() => {});
|
|
531
|
+
}
|
|
532
|
+
|
|
526
533
|
// Classifier broadcasting — batched into a single message per interval
|
|
527
534
|
// Also bridges classifier tier changes to the router for mid-session suggestions
|
|
528
535
|
this._classifierInterval = setInterval(() => {
|
|
@@ -23,10 +23,53 @@ function getConfig() {
|
|
|
23
23
|
return _daemonRef?.config?.networkBeta || null;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
// Parse a version tag like 'v0.1.0' or '0.2.0-rc1' into [major, minor, patch].
|
|
27
|
+
// Non-numeric suffixes are stripped. Returns null if unparseable.
|
|
28
|
+
export function parseSemver(v) {
|
|
29
|
+
if (!v || typeof v !== 'string') return null;
|
|
30
|
+
const m = v.trim().replace(/^v/i, '').match(/^(\d+)\.(\d+)\.(\d+)/);
|
|
31
|
+
if (!m) return null;
|
|
32
|
+
return [parseInt(m[1], 10), parseInt(m[2], 10), parseInt(m[3], 10)];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Returns negative / 0 / positive, like String.prototype.localeCompare.
|
|
36
|
+
// Unparseable versions compare as "lower" than parseable ones.
|
|
37
|
+
export function compareSemver(a, b) {
|
|
38
|
+
const pa = parseSemver(a);
|
|
39
|
+
const pb = parseSemver(b);
|
|
40
|
+
if (!pa && !pb) return 0;
|
|
41
|
+
if (!pa) return -1;
|
|
42
|
+
if (!pb) return 1;
|
|
43
|
+
for (let i = 0; i < 3; i++) {
|
|
44
|
+
if (pa[i] !== pb[i]) return pa[i] - pb[i];
|
|
45
|
+
}
|
|
46
|
+
return 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// v0.2.0+ renamed the `--relay` flag to `--signal`. Older installs still need
|
|
50
|
+
// `--relay` until the user updates. Unparseable / missing versions are treated
|
|
51
|
+
// as pre-0.2.0 to stay compatible with existing v0.1.0 installs.
|
|
52
|
+
export function supportsSignalFlag(version) {
|
|
53
|
+
return compareSemver(version, '0.2.0') >= 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function signalFlagName() {
|
|
57
|
+
const cfg = getConfig() || {};
|
|
58
|
+
return supportsSignalFlag(cfg.version) ? '--signal' : '--relay';
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// The Python client prepends the scheme itself — daemon passes a bare host
|
|
62
|
+
// and adds `--tls` to request wss://. Strip any ws:// or wss:// a user may
|
|
63
|
+
// have left in the stored signalUrl (e.g. from an older daemon default).
|
|
64
|
+
function stripScheme(url) {
|
|
65
|
+
if (!url) return 'signal.groovedev.ai';
|
|
66
|
+
return url.replace(/^wss?:\/\//i, '').replace(/\/.*$/, '');
|
|
67
|
+
}
|
|
68
|
+
|
|
26
69
|
export class GrooveNetworkProvider extends Provider {
|
|
27
70
|
static name = 'groove-network';
|
|
28
71
|
static displayName = 'Groove Network';
|
|
29
|
-
static command = 'python3
|
|
72
|
+
static command = 'python3';
|
|
30
73
|
static authType = 'none';
|
|
31
74
|
|
|
32
75
|
static models = [
|
|
@@ -44,7 +87,7 @@ export class GrooveNetworkProvider extends Provider {
|
|
|
44
87
|
|
|
45
88
|
buildSpawnCommand(agent) {
|
|
46
89
|
const cfg = getConfig() || {};
|
|
47
|
-
const
|
|
90
|
+
const signal = stripScheme(cfg.signalUrl);
|
|
48
91
|
const model = agent.model || GrooveNetworkProvider.models[0].id;
|
|
49
92
|
const maxTokens = agent.maxTokens || 500;
|
|
50
93
|
const prompt = agent.prompt || '';
|
|
@@ -53,14 +96,16 @@ export class GrooveNetworkProvider extends Provider {
|
|
|
53
96
|
|
|
54
97
|
const args = [
|
|
55
98
|
'-m', 'src.consumer.client',
|
|
56
|
-
|
|
99
|
+
signalFlagName(), signal,
|
|
100
|
+
'--tls',
|
|
57
101
|
'--model', model,
|
|
58
102
|
'--prompt', prompt,
|
|
59
103
|
'--max-tokens', String(maxTokens),
|
|
104
|
+
'--json',
|
|
60
105
|
];
|
|
61
106
|
|
|
62
107
|
return {
|
|
63
|
-
command: join(deployPath, 'venv', 'bin', 'python3
|
|
108
|
+
command: join(deployPath, 'venv', 'bin', 'python3'),
|
|
64
109
|
args,
|
|
65
110
|
env: { PYTHONUNBUFFERED: '1' },
|
|
66
111
|
cwd: deployPath,
|
|
@@ -69,17 +114,19 @@ export class GrooveNetworkProvider extends Provider {
|
|
|
69
114
|
|
|
70
115
|
buildHeadlessCommand(prompt, model) {
|
|
71
116
|
const cfg = getConfig() || {};
|
|
72
|
-
const
|
|
117
|
+
const signal = stripScheme(cfg.signalUrl);
|
|
73
118
|
const m = model || GrooveNetworkProvider.models[0].id;
|
|
74
119
|
const deployPath = expandHome(cfg.deployPath) || resolve(homedir(), 'Desktop/groove-deploy');
|
|
75
120
|
return {
|
|
76
|
-
command: join(deployPath, 'venv', 'bin', 'python3
|
|
121
|
+
command: join(deployPath, 'venv', 'bin', 'python3'),
|
|
77
122
|
args: [
|
|
78
123
|
'-m', 'src.consumer.client',
|
|
79
|
-
|
|
124
|
+
signalFlagName(), signal,
|
|
125
|
+
'--tls',
|
|
80
126
|
'--model', m,
|
|
81
127
|
'--prompt', prompt,
|
|
82
128
|
'--max-tokens', '500',
|
|
129
|
+
'--json',
|
|
83
130
|
],
|
|
84
131
|
env: { PYTHONUNBUFFERED: '1' },
|
|
85
132
|
cwd: deployPath,
|
|
@@ -105,6 +152,9 @@ export class GrooveNetworkProvider extends Provider {
|
|
|
105
152
|
sessionId: msg.session_id,
|
|
106
153
|
tokensGenerated: msg.tokens_generated,
|
|
107
154
|
error: msg.error,
|
|
155
|
+
signal: msg.signal,
|
|
156
|
+
nodesAvailable: msg.nodes_available,
|
|
157
|
+
nodes: msg.nodes,
|
|
108
158
|
raw: msg,
|
|
109
159
|
};
|
|
110
160
|
}
|