groove-dev 0.27.44 → 0.27.45

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.
Files changed (46) hide show
  1. package/default/groovedev-beta-auth-endpoint.md +166 -0
  2. package/node_modules/@groove-dev/cli/package.json +1 -1
  3. package/node_modules/@groove-dev/daemon/package.json +1 -1
  4. package/node_modules/@groove-dev/daemon/src/api.js +619 -0
  5. package/node_modules/@groove-dev/daemon/src/firstrun.js +11 -0
  6. package/node_modules/@groove-dev/daemon/src/index.js +28 -0
  7. package/node_modules/@groove-dev/daemon/src/providers/claude-code.js +1 -1
  8. package/node_modules/@groove-dev/daemon/src/providers/groove-network.js +114 -0
  9. package/node_modules/@groove-dev/daemon/src/providers/index.js +2 -0
  10. package/node_modules/@groove-dev/gui/dist/assets/index-BoIbnaqa.js +8607 -0
  11. package/node_modules/@groove-dev/gui/dist/assets/index-CyVj0fHl.css +1 -0
  12. package/node_modules/@groove-dev/gui/dist/index.html +2 -2
  13. package/node_modules/@groove-dev/gui/package.json +1 -1
  14. package/node_modules/@groove-dev/gui/src/app.jsx +3 -0
  15. package/node_modules/@groove-dev/gui/src/components/layout/activity-bar.jsx +7 -2
  16. package/node_modules/@groove-dev/gui/src/components/network/network-status.jsx +164 -0
  17. package/node_modules/@groove-dev/gui/src/components/network/node-details.jsx +66 -0
  18. package/node_modules/@groove-dev/gui/src/components/network/node-toggle.jsx +172 -0
  19. package/node_modules/@groove-dev/gui/src/stores/groove.js +190 -0
  20. package/node_modules/@groove-dev/gui/src/views/network.jsx +227 -0
  21. package/node_modules/@groove-dev/gui/src/views/settings.jsx +88 -1
  22. package/package.json +1 -1
  23. package/packages/cli/package.json +1 -1
  24. package/packages/daemon/package.json +1 -1
  25. package/packages/daemon/src/api.js +619 -0
  26. package/packages/daemon/src/firstrun.js +11 -0
  27. package/packages/daemon/src/index.js +28 -0
  28. package/packages/daemon/src/providers/claude-code.js +1 -1
  29. package/packages/daemon/src/providers/groove-network.js +114 -0
  30. package/packages/daemon/src/providers/index.js +2 -0
  31. package/packages/gui/dist/assets/index-BoIbnaqa.js +8607 -0
  32. package/packages/gui/dist/assets/index-CyVj0fHl.css +1 -0
  33. package/packages/gui/dist/index.html +2 -2
  34. package/packages/gui/package.json +1 -1
  35. package/packages/gui/src/app.jsx +3 -0
  36. package/packages/gui/src/components/layout/activity-bar.jsx +7 -2
  37. package/packages/gui/src/components/network/network-status.jsx +164 -0
  38. package/packages/gui/src/components/network/node-details.jsx +66 -0
  39. package/packages/gui/src/components/network/node-toggle.jsx +172 -0
  40. package/packages/gui/src/stores/groove.js +190 -0
  41. package/packages/gui/src/views/network.jsx +227 -0
  42. package/packages/gui/src/views/settings.jsx +88 -1
  43. package/node_modules/@groove-dev/gui/dist/assets/index-B5Uor698.js +0 -8607
  44. package/node_modules/@groove-dev/gui/dist/assets/index-VGmIZurO.css +0 -1
  45. package/packages/gui/dist/assets/index-B5Uor698.js +0 -8607
  46. package/packages/gui/dist/assets/index-VGmIZurO.css +0 -1
@@ -43,6 +43,7 @@ import { LlamaServerManager } from './llama-server.js';
43
43
  import { RepoImporter } from './repo-import.js';
44
44
  import { Toys } from './toys.js';
45
45
  import { isFirstRun, runFirstTimeSetup, loadConfig, saveConfig, printWelcome } from './firstrun.js';
46
+ import { bindDaemon as bindGrooveNetworkDaemon } from './providers/groove-network.js';
46
47
 
47
48
  const DEFAULT_PORT = 31415;
48
49
  const DEFAULT_HOST = '127.0.0.1';
@@ -150,6 +151,27 @@ export class Daemon {
150
151
  this.authToken = null;
151
152
  this.subscriptionCache = { plan: 'community', status: 'none', features: [], active: false, validatedAt: 0 };
152
153
 
154
+ // Groove Network beta: decentralized inference node/consumer state.
155
+ // Tracked on the daemon (not the agent registry) — this is a background
156
+ // service, not a spawned agent.
157
+ this.networkNode = {
158
+ active: false,
159
+ status: 'stopped', // stopped | starting | connected | error
160
+ pid: null,
161
+ proc: null,
162
+ nodeId: null,
163
+ layers: null,
164
+ model: null,
165
+ sessions: 0,
166
+ hardware: null,
167
+ startedAt: null,
168
+ events: [], // recent log events (capped)
169
+ };
170
+
171
+ // Give the groove-network provider a handle to the daemon so it can read
172
+ // networkBeta config at spawn time without a circular import.
173
+ bindGrooveNetworkDaemon(this);
174
+
153
175
  // HTTP + WebSocket server
154
176
  this.app = express();
155
177
  this.server = createHttpServer(this.app);
@@ -495,6 +517,12 @@ export class Daemon {
495
517
  this._pollSubscription().catch(() => {});
496
518
  }, 30 * 60 * 1000);
497
519
 
520
+ // Re-validate stored Network beta code against groovedev.ai so
521
+ // revoked codes lock the feature without requiring a re-activate.
522
+ if (typeof this.revalidateBetaCode === 'function') {
523
+ this.revalidateBetaCode().catch(() => {});
524
+ }
525
+
498
526
  // Classifier broadcasting — batched into a single message per interval
499
527
  // Also bridges classifier tier changes to the router for mid-session suggestions
500
528
  this._classifierInterval = setInterval(() => {
@@ -17,8 +17,8 @@ export class ClaudeCodeProvider extends Provider {
17
17
  static authType = 'subscription';
18
18
  static managesOwnContext = true; // Claude Code compacts context internally (~25-37% → 2-8%)
19
19
  static models = [
20
- { id: 'claude-opus-4-7', name: 'Claude Opus 4.7', tier: 'heavy', contextWindow: 1_000_000 },
21
20
  { id: 'claude-opus-4-6', name: 'Claude Opus 4.6', tier: 'heavy', contextWindow: 1_000_000 },
21
+ { id: 'claude-opus-4-7', name: 'Claude Opus 4.7', tier: 'heavy', contextWindow: 1_000_000 },
22
22
  { id: 'claude-sonnet-4-6', name: 'Claude Sonnet 4.6', tier: 'medium', contextWindow: 200_000 },
23
23
  { id: 'claude-haiku-4-5-20251001', name: 'Claude Haiku 4.5', tier: 'light', contextWindow: 200_000 },
24
24
  ];
@@ -0,0 +1,114 @@
1
+ // GROOVE — Groove Network Provider (Decentralized Inference)
2
+ // FSL-1.1-Apache-2.0 — see LICENSE
3
+
4
+ import { homedir } from 'os';
5
+ import { resolve } from 'path';
6
+ import { existsSync } from 'fs';
7
+ import { Provider } from './base.js';
8
+
9
+ // Resolve ~/... paths to absolute paths
10
+ function expandHome(p) {
11
+ if (!p) return p;
12
+ if (p.startsWith('~/')) return resolve(homedir(), p.slice(2));
13
+ if (p === '~') return homedir();
14
+ return p;
15
+ }
16
+
17
+ // The daemon sets this reference so the provider can read live config.
18
+ // Avoids a circular import with index.js.
19
+ let _daemonRef = null;
20
+ export function bindDaemon(daemon) { _daemonRef = daemon; }
21
+
22
+ function getConfig() {
23
+ return _daemonRef?.config?.networkBeta || null;
24
+ }
25
+
26
+ export class GrooveNetworkProvider extends Provider {
27
+ static name = 'groove-network';
28
+ static displayName = 'Groove Network';
29
+ static command = 'python';
30
+ static authType = 'none';
31
+
32
+ static models = [
33
+ { id: 'Qwen/Qwen2.5-0.5B', name: 'Qwen 2.5 0.5B (Network)', context: 4096 },
34
+ ];
35
+
36
+ static isInstalled() {
37
+ const cfg = getConfig();
38
+ return !!(cfg && cfg.unlocked);
39
+ }
40
+
41
+ static installCommand() {
42
+ return { command: 'Activate via beta code', platform: 'any' };
43
+ }
44
+
45
+ buildSpawnCommand(agent) {
46
+ const cfg = getConfig() || {};
47
+ const relay = cfg.relayUrl || 'localhost:8770';
48
+ const model = agent.model || GrooveNetworkProvider.models[0].id;
49
+ const maxTokens = agent.maxTokens || 500;
50
+ const prompt = agent.prompt || '';
51
+
52
+ const deployPath = expandHome(cfg.deployPath) || resolve(homedir(), 'Desktop/groove-deploy');
53
+
54
+ const args = [
55
+ '-m', 'src.consumer.client',
56
+ '--relay', relay,
57
+ '--model', model,
58
+ '--prompt', prompt,
59
+ '--max-tokens', String(maxTokens),
60
+ ];
61
+
62
+ return {
63
+ command: 'python',
64
+ args,
65
+ env: { PYTHONUNBUFFERED: '1' },
66
+ cwd: deployPath,
67
+ };
68
+ }
69
+
70
+ buildHeadlessCommand(prompt, model) {
71
+ const cfg = getConfig() || {};
72
+ const relay = cfg.relayUrl || 'localhost:8770';
73
+ const m = model || GrooveNetworkProvider.models[0].id;
74
+ const deployPath = expandHome(cfg.deployPath) || resolve(homedir(), 'Desktop/groove-deploy');
75
+ return {
76
+ command: 'python',
77
+ args: [
78
+ '-m', 'src.consumer.client',
79
+ '--relay', relay,
80
+ '--model', m,
81
+ '--prompt', prompt,
82
+ '--max-tokens', '500',
83
+ ],
84
+ env: { PYTHONUNBUFFERED: '1' },
85
+ cwd: deployPath,
86
+ };
87
+ }
88
+
89
+ switchModel(agent, newModel) {
90
+ return false;
91
+ }
92
+
93
+ parseOutput(line) {
94
+ const trimmed = (line || '').trim();
95
+ if (!trimmed) return null;
96
+ if (trimmed[0] !== '{') {
97
+ return { type: 'activity', data: trimmed };
98
+ }
99
+ try {
100
+ const msg = JSON.parse(trimmed);
101
+ if (msg && typeof msg === 'object' && typeof msg.type === 'string') {
102
+ return {
103
+ type: msg.type,
104
+ text: msg.text,
105
+ sessionId: msg.session_id,
106
+ tokensGenerated: msg.tokens_generated,
107
+ error: msg.error,
108
+ raw: msg,
109
+ };
110
+ }
111
+ } catch { /* not JSON, fall through */ }
112
+ return { type: 'activity', data: trimmed };
113
+ }
114
+ }
@@ -7,6 +7,7 @@ import { CodexProvider } from './codex.js';
7
7
  import { GeminiProvider } from './gemini.js';
8
8
  import { OllamaProvider } from './ollama.js';
9
9
  import { LocalProvider } from './local.js';
10
+ import { GrooveNetworkProvider } from './groove-network.js';
10
11
 
11
12
  // Electron forks may not inherit the full shell PATH, causing `which` to miss
12
13
  // globally-installed CLI tools. Augment PATH with common npm global bin dirs.
@@ -30,6 +31,7 @@ const providers = {
30
31
  'gemini': new GeminiProvider(),
31
32
  'ollama': new OllamaProvider(),
32
33
  'local': new LocalProvider(),
34
+ 'groove-network': new GrooveNetworkProvider(),
33
35
  };
34
36
 
35
37
  export function getProvider(name) {