Skip to content

Commit b2be09e

Browse files
committed
chore: remove legacy backend and npm-app
1 parent fef30b5 commit b2be09e

File tree

191 files changed

+376
-35105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+376
-35105
lines changed

.agents/LESSONS.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Agent Lessons
22

3-
Lessons accumulated across buffbench runs. Each lesson identifies what went wrong (Issue) and what should have been done instead (Fix).
3+
Lessons accumulated across buffbench runs. Each lesson identifies what went wrong (Issue) and what should have been done instead (Fix). Many early notes mention the legacy backend/npm-app/WebSocket stack; those references are now historical with the SDK-first architecture.
44

55
## 2025-10-21T02:19:38.224Z — add-sidebar-fades (257cb37)
66

@@ -1624,4 +1624,3 @@ Do not include implementation details in your response; focus on ensuring all lo
16241624

16251625
- **Issue:** Docs/examples not fixed to valid JSON after removing parentInstructions.
16261626
**Fix:** Remove dangling keys/braces and ensure examples compile; replace spawnableAgents with subagents.
1627-

.agents/__tests__/context-pruner.test.ts

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,15 @@ describe('context-pruner handleSteps', () => {
217217
expect(resultMessages.length).toBeLessThan(messages.length)
218218

219219
// Should contain replacement messages
220-
const hasReplacementMessage = resultMessages.some(
221-
(m: any) =>
222-
typeof m.content === 'string' &&
223-
m.content.includes('Previous message(s) omitted due to length'),
220+
const hasReplacementMessage = resultMessages.some((m: any) =>
221+
Array.isArray(m.content)
222+
? m.content.some(
223+
(part: any) =>
224+
part?.type === 'text' &&
225+
part.text.includes('Previous message(s) omitted due to length'),
226+
)
227+
: typeof m.content === 'string' &&
228+
m.content.includes('Previous message(s) omitted due to length'),
224229
)
225230
expect(hasReplacementMessage).toBe(true)
226231
})
@@ -243,10 +248,14 @@ describe('context-pruner handleSteps', () => {
243248
const resultMessages = results[0].input.messages
244249

245250
// Important message should be preserved
246-
const importantMessage = resultMessages.find(
247-
(m: any) =>
248-
typeof m.content === 'string' &&
249-
m.content.includes('Important message'),
251+
const importantMessage = resultMessages.find((m: any) =>
252+
Array.isArray(m.content)
253+
? m.content.some(
254+
(part: any) =>
255+
part?.type === 'text' && part.text.includes('Important message'),
256+
)
257+
: typeof m.content === 'string' &&
258+
m.content.includes('Important message'),
250259
)
251260
expect(importantMessage).toBeDefined()
252261
})

CONTRIBUTING.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,22 +79,18 @@ Before you begin, you'll need to install a few tools:
7979
8. **Start development services** (requires 3 terminals):
8080

8181
```bash
82-
# Terminal 1 - Backend server (start first)
83-
bun run start-server
84-
# Expected: 🚀 Server is running on port 4242
85-
86-
# Terminal 2 - Web server (start second)
82+
# Terminal 1 - Web server
8783
bun run start-web
8884
# Expected: Ready on http://localhost:3000
8985

90-
# Terminal 3 - CLI client (start last)
86+
# Terminal 2 - CLI client
9187
bun run start-bin
9288
# Expected: Welcome to Codebuff! + agent list
9389
```
9490

9591
Now, you should be able to run the CLI and send commands, but it will error out because you don't have any credits.
9692

97-
**Note**: CLI requires both backend and web server running for authentication.
93+
**Note**: The CLI uses the SDK to talk directly to the web API; no separate backend process is required.
9894

9995
9. **Giving yourself credits**:
10096

@@ -148,9 +144,8 @@ In order to run the CLI from other directories, you need to first publish the ag
148144

149145
Codebuff is organized as a monorepo with these main packages:
150146

151-
- **backend/**: WebSocket server, LLM integration, agent orchestration
152-
- **npm-app/**: CLI application that users interact with
153147
- **web/**: Next.js web application and dashboard
148+
- **cli/**: CLI application that users interact with
154149
- **python-app/**: Python version of the CLI (experimental)
155150
- **common/**: Shared code, database schemas, utilities
156151
- **sdk/**: TypeScript SDK for programmatic usage
@@ -250,15 +245,15 @@ Build specialized agents in `.agents/` for different languages, frameworks, or w
250245

251246
### 🔧 **Tool System**
252247

253-
Add new capabilities in `backend/src/tools.ts` - file operations, API integrations, development environment helpers. The sky's the limit!
248+
Add new capabilities in `sdk/src/tools` or the agent runtime (packages/agent-runtime) - file operations, API integrations, development environment helpers. The sky's the limit!
254249

255250
### 📦 **SDK Improvements**
256251

257252
Make the SDK in `sdk/` even more powerful with new methods, better TypeScript support, or killer integration examples.
258253

259254
### 💻 **CLI Magic**
260255

261-
Enhance the user experience in `npm-app/` with smoother commands, better error messages, or interactive features that make developers smile.
256+
Enhance the user experience in `cli/` with smoother commands, better error messages, or interactive features that make developers smile.
262257

263258
### 🌐 **Web Dashboard**
264259

authentication.knowledge.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
## Overview
44

5-
Codebuff implements secure authentication between CLI (npm-app), backend, and web application using fingerprint-based device identification.
5+
Codebuff implements secure authentication between the CLI, the API, and the web application using fingerprint-based device identification.
66

77
## Core Authentication Flow
88

99
```mermaid
1010
sequenceDiagram
11-
participant CLI as npm-app
11+
participant CLI as CLI
1212
participant Web as web app
1313
participant DB as Database
1414
@@ -30,7 +30,6 @@ sequenceDiagram
3030
### 1. First Time Login / Missing Credentials
3131

3232
- CLI generates fingerprint from hardware info + 8 random bytes
33-
- Uses `calculateFingerprint()` in `npm-app/src/fingerprint.ts`
3433
- Continues to core flow with new fingerprintId
3534

3635
### 2. Logout Flow

backend/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

backend/README.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

backend/knowledge.md

Lines changed: 0 additions & 180 deletions
This file was deleted.

0 commit comments

Comments
 (0)