Skip to content

feat(agent): add claude-internal agent support#7

Open
XingLiu1 wants to merge 1 commit into
yx0716:mainfrom
XingLiu1:feat/claude-internal-agent
Open

feat(agent): add claude-internal agent support#7
XingLiu1 wants to merge 1 commit into
yx0716:mainfrom
XingLiu1:feat/claude-internal-agent

Conversation

@XingLiu1

Copy link
Copy Markdown

Summary

Adds support for claude-internal — a drop-in for forks of Claude Code that use ~/.claude-internal/ as their config directory (e.g. Tencent internal builds). The hook protocol, event map, and JSONL format are identical to claude-code, so the integration is a thin wrapper with no code duplication.

What's included

  • Live pet animation — hooks are registered into ~/.claude-internal/settings.json; the pet reacts to claude-internal sessions in real-time just like claude-code
  • Analytics dashboard — scans ~/.claude-internal/projects/ so sessions appear in the timeline and are available for AI analysis
  • Watcher — polls ~/.claude-internal/projects/ so the dashboard auto-refreshes on new conversations
  • Settings UIclaude-internal appears as a toggleable agent in Settings → Agents with permission and notification hook controls
  • Doctor diagnostics — integration health check covers claude-internal

Files changed

File Change
agents/claude-internal.js New agent config
hooks/install-claude-internal.js New hook installer (delegates to install.js, overrides settingsPath)
agents/registry.js Register new agent
src/prefs.js Add default agent entry
src/integration-sync.js Add syncClaudeInternalHooks
src/settings-actions-agents.js Add to AUTO_REPAIRABLE_AGENT_IDS
src/doctor-detectors/agent-descriptors.js Add descriptor pointing to ~/.claude-internal/
src/analytics-scan.js Scan ~/.claude-internal/projects/; refactor scanClaudeProject to accept agentId param
src/analytics-watcher.js Add ~/.claude-internal/projects to poll roots
README.md / README.zh-CN.md Document new agent

Test plan

  • Enable claude-internal in Settings → Agents; confirm hooks written to ~/.claude-internal/settings.json
  • Run claude-internal on a project; confirm pet animates in real-time
  • Open Analytics Dashboard; confirm sessions from ~/.claude-internal/projects/ appear in the timeline
  • Trigger AI analysis on a claude-internal session; confirm it resolves the JSONL file and returns a summary
  • Confirm existing claude-code sessions are unaffected

🤖 Generated with Claude Code

  - Add claude-internal agent config (same hook protocol as claude-code,
    config dir ~/.claude-internal/settings.json)
  - Add hooks/install-claude-internal.js delegating to install.js with
    overridden settingsPath
  - Wire into registry, prefs defaults, integration-sync, settings-actions,
    and doctor-descriptors
  - Extend analytics-scan to read ~/.claude-internal/projects/ and tag
    sessions as agent 'claude-internal'; refactor scanClaudeProject to
    accept agentId param instead of post-hoc mutation
  - Add ~/.claude-internal/projects to analytics-watcher poll roots
  - Update README.md and README.zh-CN.md to document the new agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant