groove-dev 0.27.42 → 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.
- package/default/groovedev-beta-auth-endpoint.md +166 -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 +619 -0
- package/node_modules/@groove-dev/daemon/src/firstrun.js +11 -0
- package/node_modules/@groove-dev/daemon/src/index.js +28 -0
- package/node_modules/@groove-dev/daemon/src/providers/claude-code.js +1 -1
- package/node_modules/@groove-dev/daemon/src/providers/groove-network.js +114 -0
- package/node_modules/@groove-dev/daemon/src/providers/index.js +2 -0
- package/node_modules/@groove-dev/gui/dist/assets/index-BoIbnaqa.js +8607 -0
- package/node_modules/@groove-dev/gui/dist/assets/index-CyVj0fHl.css +1 -0
- package/node_modules/@groove-dev/gui/dist/index.html +2 -2
- package/node_modules/@groove-dev/gui/package.json +1 -1
- package/node_modules/@groove-dev/gui/src/app.jsx +3 -0
- package/node_modules/@groove-dev/gui/src/components/editor/terminal.jsx +5 -0
- package/node_modules/@groove-dev/gui/src/components/layout/activity-bar.jsx +7 -3
- package/node_modules/@groove-dev/gui/src/components/layout/status-bar.jsx +12 -0
- package/node_modules/@groove-dev/gui/src/components/layout/terminal-panel.jsx +25 -7
- package/node_modules/@groove-dev/gui/src/components/network/network-status.jsx +164 -0
- package/node_modules/@groove-dev/gui/src/components/network/node-details.jsx +66 -0
- package/node_modules/@groove-dev/gui/src/components/network/node-toggle.jsx +172 -0
- package/node_modules/@groove-dev/gui/src/stores/groove.js +191 -0
- package/node_modules/@groove-dev/gui/src/views/agents.jsx +1 -1
- package/node_modules/@groove-dev/gui/src/views/network.jsx +227 -0
- package/node_modules/@groove-dev/gui/src/views/settings.jsx +88 -1
- 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 +619 -0
- package/packages/daemon/src/firstrun.js +11 -0
- package/packages/daemon/src/index.js +28 -0
- package/packages/daemon/src/providers/claude-code.js +1 -1
- package/packages/daemon/src/providers/groove-network.js +114 -0
- package/packages/daemon/src/providers/index.js +2 -0
- package/packages/gui/dist/assets/index-BoIbnaqa.js +8607 -0
- package/packages/gui/dist/assets/index-CyVj0fHl.css +1 -0
- package/packages/gui/dist/index.html +2 -2
- package/packages/gui/package.json +1 -1
- package/packages/gui/src/app.jsx +3 -0
- package/packages/gui/src/components/editor/terminal.jsx +5 -0
- package/packages/gui/src/components/layout/activity-bar.jsx +7 -3
- package/packages/gui/src/components/layout/status-bar.jsx +12 -0
- package/packages/gui/src/components/layout/terminal-panel.jsx +25 -7
- package/packages/gui/src/components/network/network-status.jsx +164 -0
- package/packages/gui/src/components/network/node-details.jsx +66 -0
- package/packages/gui/src/components/network/node-toggle.jsx +172 -0
- package/packages/gui/src/stores/groove.js +191 -0
- package/packages/gui/src/views/agents.jsx +1 -1
- package/packages/gui/src/views/network.jsx +227 -0
- package/packages/gui/src/views/settings.jsx +88 -1
- package/analyist/groove-security-audit.md +0 -323
- package/node_modules/@groove-dev/gui/dist/assets/index-C1C2biHU.js +0 -8607
- package/node_modules/@groove-dev/gui/dist/assets/index-Dx7i-7_K.css +0 -1
- package/packages/gui/dist/assets/index-C1C2biHU.js +0 -8607
- package/packages/gui/dist/assets/index-Dx7i-7_K.css +0 -1
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Groove Network Beta — Auth Endpoint Setup
|
|
2
|
+
|
|
3
|
+
Instructions for setting up the invite code validation endpoint on groovedev.ai.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Endpoint
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
POST https://groovedev.ai/api/beta/validate
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Request
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"code": "GROOVE-NET-ALPHA-001",
|
|
18
|
+
"machineId": "sha256-of-hostname-and-mac"
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- `code` — the invite code the user entered
|
|
23
|
+
- `machineId` — hashed machine identifier so you can track activations per device (the daemon already generates this for credential encryption)
|
|
24
|
+
|
|
25
|
+
## Response — Valid Code
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"valid": true,
|
|
30
|
+
"expiresAt": "2026-07-18T00:00:00Z",
|
|
31
|
+
"features": ["network-node", "network-consumer"],
|
|
32
|
+
"message": "Welcome to the Groove Network beta"
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- `expiresAt` — when this code stops working (null = never expires)
|
|
37
|
+
- `features` — which beta features this code unlocks (future-proofs for gating individual features)
|
|
38
|
+
- `message` — optional message shown to the user on activation
|
|
39
|
+
|
|
40
|
+
## Response — Invalid Code
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"valid": false,
|
|
45
|
+
"message": "Invalid invite code"
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
HTTP 200 for both valid and invalid — don't leak info through status codes.
|
|
50
|
+
|
|
51
|
+
## Response — Rate Limited
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"valid": false,
|
|
56
|
+
"message": "Too many attempts, try again later"
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
HTTP 429. Rate limit: 5 attempts per IP per hour.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Code Management
|
|
65
|
+
|
|
66
|
+
### Database Schema (or KV store, whatever groovedev.ai uses)
|
|
67
|
+
|
|
68
|
+
```sql
|
|
69
|
+
CREATE TABLE beta_codes (
|
|
70
|
+
code TEXT PRIMARY KEY,
|
|
71
|
+
created_at TIMESTAMP DEFAULT NOW(),
|
|
72
|
+
expires_at TIMESTAMP,
|
|
73
|
+
max_uses INTEGER DEFAULT 1,
|
|
74
|
+
used_count INTEGER DEFAULT 0,
|
|
75
|
+
features JSONB DEFAULT '["network-node", "network-consumer"]',
|
|
76
|
+
notes TEXT
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
CREATE TABLE beta_activations (
|
|
80
|
+
id SERIAL PRIMARY KEY,
|
|
81
|
+
code TEXT REFERENCES beta_codes(code),
|
|
82
|
+
machine_id TEXT,
|
|
83
|
+
activated_at TIMESTAMP DEFAULT NOW(),
|
|
84
|
+
ip_address TEXT
|
|
85
|
+
);
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Generating Codes
|
|
89
|
+
|
|
90
|
+
Codes should be human-friendly, uppercase, with dashes. Format: `GROOVE-NET-<WORD>-<3 DIGITS>`
|
|
91
|
+
|
|
92
|
+
Examples:
|
|
93
|
+
- GROOVE-NET-ALPHA-001
|
|
94
|
+
- GROOVE-NET-BETA-042
|
|
95
|
+
- GROOVE-NET-EARLY-777
|
|
96
|
+
|
|
97
|
+
Generate a batch to start:
|
|
98
|
+
|
|
99
|
+
```sql
|
|
100
|
+
INSERT INTO beta_codes (code, expires_at, max_uses, notes) VALUES
|
|
101
|
+
('GROOVE-NET-ALPHA-001', '2026-07-18', 1, 'Rok - testing'),
|
|
102
|
+
('GROOVE-NET-ALPHA-002', '2026-07-18', 1, 'Tommy'),
|
|
103
|
+
('GROOVE-NET-ALPHA-003', '2026-07-18', 1, 'Reserved'),
|
|
104
|
+
('GROOVE-NET-ALPHA-004', '2026-07-18', 1, 'Reserved'),
|
|
105
|
+
('GROOVE-NET-ALPHA-005', '2026-07-18', 1, 'Reserved');
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Validation Logic
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
1. Look up code in beta_codes
|
|
112
|
+
2. If not found → { valid: false }
|
|
113
|
+
3. If expires_at < NOW() → { valid: false, message: "Code expired" }
|
|
114
|
+
4. If used_count >= max_uses → { valid: false, message: "Code already used" }
|
|
115
|
+
5. Insert into beta_activations
|
|
116
|
+
6. Increment used_count
|
|
117
|
+
7. Return { valid: true, expiresAt, features, message }
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Admin
|
|
121
|
+
|
|
122
|
+
You'll want a way to:
|
|
123
|
+
- Generate new codes (one-off or batch)
|
|
124
|
+
- Revoke a code (delete or set expires_at to past)
|
|
125
|
+
- See who activated (query beta_activations)
|
|
126
|
+
- Set max_uses > 1 for codes you want to share more broadly
|
|
127
|
+
|
|
128
|
+
A simple admin page at groovedev.ai/admin/beta or even just direct DB access works for now.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## How the Daemon Uses This
|
|
133
|
+
|
|
134
|
+
The daemon (packages/daemon/src/api.js) calls this endpoint when a user submits an invite code:
|
|
135
|
+
|
|
136
|
+
```javascript
|
|
137
|
+
// POST /api/beta/activate handler
|
|
138
|
+
const response = await fetch('https://groovedev.ai/api/beta/validate', {
|
|
139
|
+
method: 'POST',
|
|
140
|
+
headers: { 'Content-Type': 'application/json' },
|
|
141
|
+
body: JSON.stringify({ code, machineId: daemon.getMachineId() })
|
|
142
|
+
});
|
|
143
|
+
const result = await response.json();
|
|
144
|
+
|
|
145
|
+
if (result.valid) {
|
|
146
|
+
config.set('networkBeta.unlocked', true);
|
|
147
|
+
config.set('networkBeta.code', code);
|
|
148
|
+
config.set('networkBeta.features', result.features);
|
|
149
|
+
config.set('networkBeta.expiresAt', result.expiresAt);
|
|
150
|
+
daemon.broadcast({ type: 'config:updated' });
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Offline fallback: if the daemon can't reach groovedev.ai, it falls back to a hardcoded allowlist (the 5 ALPHA codes). This way beta testers aren't locked out by network issues. The hardcoded list gets removed when the server endpoint is live.
|
|
155
|
+
|
|
156
|
+
Re-validation: on daemon startup, if networkBeta.unlocked is true, optionally re-validate the stored code against the server. If the code was revoked or expired, lock the feature. Don't block startup on this — do it async.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Security Notes
|
|
161
|
+
|
|
162
|
+
- Never log the full code in server logs — log first 10 chars only
|
|
163
|
+
- Rate limit by IP, not by code (prevents enumeration)
|
|
164
|
+
- Codes are not passwords — they're single-use invites. No hashing needed, but don't expose the full list in any public API
|
|
165
|
+
- The machineId is a hash, not PII — safe to store
|
|
166
|
+
- HTTPS only, obviously
|