12 Commits

Author SHA1 Message Date
程序员阿江(Relakkes)
da2be1f81b Merge branch 'worktree-feature-scheduled-tasks' into docs/ui-clone-requirements
Resolve PLAN.md conflict by keeping both plans: Provider management
system and Scheduled Tasks enhancement.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 01:48:03 +08:00
程序员阿江(Relakkes)
b1db66ac8c feat: add scheduled task edit UI, CronUpdateTool, wizard components and tests 2026-04-07 01:44:44 +08:00
程序员阿江(Relakkes)
985b1a8b7d feat: add Provider management system — multi-provider CRUD, activation, and connectivity test
Implement a full Provider management layer compatible with Claude Code's settings.json protocol.

- ProviderService: CRUD + activation + settings.json sync + HTTP connectivity test
- Provider REST API: 8 endpoints (list, get, create, update, delete, activate, test)
- API key masking in GET responses (sk-a****xyz)
- Models API refactored to read from active Provider dynamically
- 42 unit tests + 6 real-config integration tests, all passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 01:29:52 +08:00
程序员阿江(Relakkes)
993b96cd39 Stabilize the desktop transcript so long agent sessions stay readable
The desktop app now keeps the composer stable while turns are active,
reduces low-signal tool noise in the transcript, restores project context
under the composer after session creation, and relies on the CLI's own
permission requests instead of injecting broader desktop-side Bash asks.

This also brings in the supporting desktop app source tree and the server
routes/session metadata needed for git info, filesystem browsing, session
resume, slash commands, and SDK-backed permission bridging so the UI can
operate as a coherent feature instead of a partial patch.

Constraint: Desktop transcript needs to stay usable during long multi-tool sessions without hiding file-change diffs
Constraint: Permission prompts must mirror CLI behavior closely enough that read-only commands do not get desktop-only prompts
Rejected: Keep rendering Read/Bash bodies inline | too noisy and unlike the intended transcript model
Rejected: Commit only the touched desktop files | would leave the newly introduced desktop app incomplete in git history
Confidence: medium
Scope-risk: broad
Reversibility: messy
Directive: Treat non-writing tools as summary-first transcript events; do not re-expand them by default without validating the UX against long sessions
Tested: cd desktop && bun run lint
Tested: cd desktop && bun run test -- --run
Tested: bun test src/server/__tests__/conversations.test.ts
Not-tested: Manual visual regression against the exact screenshots in a live desktop session
Not-tested: Full root TypeScript check (repository still has unrelated extracted-native parse failures)
2026-04-06 20:37:44 +08:00
程序员阿江(Relakkes)
52f00a95d6 fix: address Codex review findings — auth, cron CLI, workdir, model IDs
- Enforce auth on API/WS when non-localhost or SERVER_AUTH_REQUIRED=1
- Fix CronScheduler: add --verbose flag and correct stream-json message envelope
- Resolve session workdir from JSONL file instead of hardcoding process.cwd()
- Give Opus 4.6 1M a unique composite ID (claude-opus-4-6-20250610:1m)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 15:21:55 +08:00
程序员阿江(Relakkes)
ce0908a4e0 feat: complete server-side gaps — tool visibility, cron execution engine, team real-time push
- Fix translateCliMessage to return ServerMessage[] with full tool lifecycle
  (tool_result, tool_use_complete, toolInput, thinking, stream_event)
- Add CronScheduler that actually executes scheduled tasks via CLI subprocess,
  with execution log persistence and GET /api/scheduled-tasks/:id/runs API
- Add TeamWatcher polling ~/.claude/teams/ every 3s, broadcasting team_update/
  team_created/team_deleted to all WebSocket clients
- 280 tests pass (51 new), real LLM integration verified via MiniMax API

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 14:42:32 +08:00
程序员阿江(Relakkes)
29c9fb8f4a feat: add CLI subprocess chat, Agent Teams API, and real background tasks
Three new modules completing the server-side functionality:

1. ConversationService: spawns CLI as subprocess with --input-format
   stream-json, forwards WebSocket messages to CLI stdin/stdout.
   CLI handles all AI communication, tool execution, and permissions.
   Graceful fallback to echo mode when CLI unavailable.

2. Agent Teams API: GET/DELETE /api/teams, member listing with status
   derivation (running/idle/completed), transcript reading from
   CLI-generated JSONL files. Teams created by CLI, API is read-only.

3. TaskService: replaces placeholder with real task file scanning
   from ~/.claude/tasks/, supports nested team directories.

229 tests passing (49 new: 12 conversations + 27 teams + 10 tasks).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 14:05:22 +08:00
程序员阿江(Relakkes)
0c6d2754b4 feat: add Desktop UI backend server with full REST API and WebSocket support
Add complete server-side implementation for the Claude Code Desktop App UI:

- REST API: sessions, conversations, settings, models, scheduled tasks,
  search, agents, and status endpoints (9 modules, 30+ endpoints)
- WebSocket: real-time chat streaming with state transitions, ping/pong,
  permission request forwarding, and stop generation support
- Services: sessionService (JSONL read/write, CLI-compatible),
  settingsService (atomic writes), cronService, searchService (ripgrep),
  agentService (YAML management)
- Middleware: CORS (localhost-only), auth, unified error handling
- Tests: 180 tests (unit + E2E + business flow), all passing
- Docs: PRD, UI design spec, server architecture design

Non-invasive: all new code under src/server/, no changes to existing CLI code.
CLI/UI data interop: reads/writes the same JSONL/JSON files as the CLI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 13:23:44 +08:00
程序员阿江(Relakkes)
e8f42840a2 feat: enable Computer Use with Python bridge replacing private native modules
Bypass all three gating layers (compile-time feature flag, subscription
check, GrowthBook remote config) and replace Anthropic's private native
modules (@ant/computer-use-swift, @ant/computer-use-input) with a Python
bridge using pyautogui + mss + pyobjc. Works on any macOS with any
Anthropic-protocol compatible model.
2026-04-03 18:33:31 +08:00
DevinZeng
9233518b11 Enable and fix /buddy command
The /buddy command was completely disabled by bun:bundle feature('BUDDY')
flag which evaluates to false at runtime. Removed all feature('BUDDY')
checks across the codebase to register the command, and added keyboard
event handling (q/Enter to dismiss) which was missing from the UI.
2026-04-03 00:30:56 +08:00
程序员阿江(Relakkes)
124912c71d feat: fix leaked source to be locally runnable
- Restore full Ink TUI startup chain (cli.tsx entry point)
- Create stub .md files for verify skill (Bun text loader hang fix)
- Create stub types for filePersistence and SDK modules
- Fix Enter key not working (modifiers-napi missing, added try-catch)
- Remove overly conservative LOCAL_RECOVERY early return
- Add README with setup instructions
- Add .env.example template
- Add bin/claude-haha entry script and preload.ts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 01:30:48 +08:00
sigridjineth
f5a40b86de init: add source code from src.zip 2026-03-31 01:55:58 -07:00