diff --git a/CLAUDE-RESUME-NOW.md b/CLAUDE-RESUME-NOW.md index 0426c0f..b219ea5 100644 --- a/CLAUDE-RESUME-NOW.md +++ b/CLAUDE-RESUME-NOW.md @@ -1,4 +1,4 @@ -# CLAUDE RESUME — 2026-09-22 (~06:10 Vienna) +# CLAUDE RESUME — 2026-09-22 (~10:00 Vienna) ## Completed ✅ - ✅ **Emoji-first Onboarding.tsx** (5 steps: emoji → preferences → language → integrations → bot) @@ -12,35 +12,36 @@ - ✅ **executor.ts split**: 4697 → 4231 lines (18 module files) - ✅ **pi-runtime.ts split**: 1726 → 1102 lines - ✅ **TypeScript: 0 errors** across apps/web AND packages/adapters +- ✅ **Graphile worker fixed**: `GraphileJobWorkerHost.start()` now called in app.ts (was never started for graphile jobs, only for in-memory) +- ✅ **Graphile schema**: `graphile_worker` schema created via `graphile-worker schema-only` +- ✅ **Sandbox supervisor**: Built `rakazo/sandbox-supervisor:local` from source (was using wrong `rakazo/app:edge` image) +- ✅ **Computer image**: Built `rakazo/computer:local` from source +- ✅ **Smart model routing**: `estimateMessageComplexity()` + `resolveSmartModelSelection()` implemented + - Fast model (3B) for short messages (<80 chars) + - Strong model (30B) for complex/long messages (>500 chars) + - Medium routing for keyword-based detection +- ✅ **Model credential**: `local` provider connected with empty apiKey allowed +- ✅ **PRs merged**: All PRs 36-58 merged to main, stale branches cleaned -### PR-Aufräumung (2026-09-22) -- ✅ **16 DRAFT-PRs 36-51** → cherry-pick-merged auf main + Branches gelöscht - - Authz/Security Fixes: Shared Spaces (44-51), desktop shell guard (37), computer-busy retry (36), handoff (39), messaging (40-43), tool-call budget (38), agent secrets (47), memory provider config (46), team computer (48), bot outcome race (49), monotonic webhooks (50), respond_agent_connection (41), memory runtime authz (51) -- ✅ **13 Squash-Duplikate PRs 13-25** → geschlossen (inhalt bereits in main), Branches gelöscht - - PRs waren Cursor-Squash-Duplikate mit 100+ CI-Dateien statt inkrementellen Diffs -- ✅ **PR 31** (CORS) → cherry-pick-merged + Branch gelöscht -- ✅ **19 stale branches** von merged PRs gelöscht (PRs 1-10, 12, 27-30, 32-34, 35, 5, 7-10, 12, 26, 32-34, 35) -- ✅ **PR 11** (CLOSED) → branch bereits gelöscht - -### Verbleibende offene PRs (6) — alle sauber scoped: -- PR 52: Team Computer export → exporting bot workspace -- PR 53: spawnBot replay → spawning member scope -- PR 54: memory provider details redaction in aiConsent -- PR 55: Team Computer takeover hijack block -- PR 56: group follow-up routing -- PR 57: run owner authz for secrets and approval prompts +### Infrastructure fixes +- ✅ **GraphileJobWorkerHost**: Added `else if (jobPool)` branch in app.ts to start the worker +- ✅ **Sandbox provider**: `SANDBOX_PROVIDER=docker` with proper supervisor at port 7091 +- ✅ **Computer provisioning**: Docker containers spin up successfully (verified: `rakazo-bot-cmuber4og000561yrhm2q81c5` running) +- ✅ **DATA_DIR path**: Supervisor mounted with correct host path for home directory validation ## Pending ⏳ +- **BLOCKER: `events.ts:996` Prisma `updateMany` error** — `finalizeRunOnce` throws `Invalid tx.run.updateMany()` during run setup. Prisma client regenerated, types verified, inline schema correct. All WHERE fields (id, spaceId, threadId, botId, taskId, status, leaseOwner, leaseFence) exist in schema. Suspect Prisma 7 incompatibility or runtime resolution issue. Computer is running but runs never advance past "queued" → setup phase. - Fat banner kill on first chat (requires backend language support) -- Playwright E2E tests (needs running backend server) -- PRs 52-57 review/merge (coherente Security-Work: Shared Spaces authz) +- Playwright E2E tests (backend blocked on Prisma error) -## TS-Status (2026-09-22 ~06:30) -- **apps/web: 0 TS errors** ✅ -- **packages/adapters: 0 TS errors** ✅ (4 pre-existing errors gefixed) -- Cherry-picks von PR 38 haben executor.ts/pi-runtime.ts kaputtgemacht → repariert +## Architektur-Status +- **API**: Port 3100, Graphile worker active, consuming jobs +- **Sandbox supervisor**: Port 7091, `rakazo/sandbox-supervisor:local`, DATA_DIR mounted correctly +- **Computer**: `rakazo/computer:local` image built and running +- **Smart routing**: Fast (3B) → Strong (30B) model selection based on message complexity +- **Known error**: `events.ts:996` — Prisma `updateMany` in `finalizeRunOnce` throws "Invalid invocation" despite all fields existing in schema ## Status -- Working tree: clean -- **6 offene PRs** (PRs 52-57) — alle DRAFT, sauber scoped -- **0 stale Branches** übrig +- Working tree: clean (Graphile fix committed + pushed) +- **3 draft PRs** (66, 67, 69) — messaging, adapters, teamchat fixes +- **0 stale branches** diff --git a/packages/db/prisma/schema.prisma b/packages/db/prisma/schema.prisma index d9c39fa..28c2707 100644 --- a/packages/db/prisma/schema.prisma +++ b/packages/db/prisma/schema.prisma @@ -582,8 +582,10 @@ model Run { routineId String? routine Routine? @relation(fields: [routineId], references: [id], onDelete: SetNull) startedAt DateTime? - completedAt DateTime? - botOutcomeReturnedAt DateTime? + completedAt DateTime? + toolCallBudgetCount Int? + toolCallBudgetExceeded Boolean? + botOutcomeReturnedAt DateTime? messagingMirroredAt DateTime? teamChatMirroredAt DateTime? createdAt DateTime @default(now())