-
-
Notifications
You must be signed in to change notification settings - Fork 90
feat(cursor): integrate cursor provider into config, dashboard, and reserved names #528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Code Review: PR #528 — feat(cursor): integrate cursor provider into config, dashboard, and reserved names📋 SummaryThis PR adds Cursor IDE integration to CCS: a ✅ Strengths
🔍 Observations & Suggestions🔴 P0 — Blocking Issues1. Formatting: Tabs instead of spaces in all The project enforces 2-space indentation via
These will fail 2. Double quotes instead of single quotes in the same files The project uses 3. Non-null assertion operator ( Multiple occurrences across the cursor files:
These are all ESLint errors. Replace with proper null checks or use // Before (violates rule)
const existing = toolCallsMap.get(tc.id)!;
// After
const existing = toolCallsMap.get(tc.id);
if (!existing) continue;4. The six cursor files use 🔴 P1 — Security5. Command injection risk in
const result = execSync(
`sqlite3 "${dbPath}" "SELECT value FROM itemTable WHERE key='${key}'" 2>/dev/null`,
{ encoding: 'utf8', timeout: 5000 }
).trim();Both Recommended fix: Use const result = execFileSync('sqlite3', [
dbPath,
`SELECT value FROM itemTable WHERE key='${key}'`
], { encoding: 'utf8', timeout: 5000 }).trim();6. Plaintext credential storage without restrictive permissions
// Current
fs.writeFileSync(credPath, JSON.stringify(credentials, null, 2), 'utf8');
// Recommended: restrict to owner read/write only
fs.writeFileSync(credPath, JSON.stringify(credentials, null, 2), { encoding: 'utf8', mode: 0o600 });🟡 P2 — Correctness / Design7. Duplicate
These are structurally different and will cause confusion. The executor should import from 8. Duplicate Defined identically in both:
Should be defined once and imported. 9. Port range validation missing
if ('port' in updates && (typeof updates.port !== 'number' || updates.port < 1 || updates.port > 65535)) {
res.status(400).json({ error: 'port must be a number between 1 and 65535' });
return;
}10. The PR description says "Adds cursor section to unified config schema with port, model, auto_start, ghost_mode" but 11. Varint decoder precision for large numbers
🟢 P3 — Minor / Style12. Hardcoded Cursor client version — 13. Unused imports — 🔒 Security Considerations
📊 Code Quality Checklist
💡 Recommendations
🎯 Overall Assessment❌ CHANGES REQUESTEDThe config integration, dashboard routes, and CLI routing are well-designed, follow existing patterns, and are ready to merge. However, the
The security issues in Minimum required for approval:
|
Summary
cursorsection to unified config schema with port, model, auto_start, ghost_modeccs cursorsubcommandFiles Modified (6) / Added (2)
src/ccs.ts,src/commands/help-command.ts,src/config/reserved-names.ts,src/config/unified-config-loader.ts,src/config/unified-config-types.ts,src/web-server/routes/index.tssrc/web-server/routes/cursor-routes.ts,src/web-server/routes/cursor-settings-routes.tssrc/commands/cursor-command.ts(16 lines, replaced by feat: Cursor IDE — daemon lifecycle, models catalog, and CLI commands #520's full impl during merge)Edge Cases Fixed (code review)
Merge Note
src/commands/cursor-command.tsexists as a 16-line stub here. During merge, keep the 239-line implementation from #520.Test plan
cursoras profile name