@lgcyaxi/oh-my-claude 1.0.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Report a bug in oh-my-claude
4
+ title: '[Bug] '
5
+ labels: bug
6
+ ---
7
+
8
+ ## Description
9
+ <!-- Brief summary of the issue -->
10
+
11
+ ## What happened
12
+ <!-- Describe the actual behavior -->
13
+
14
+ ## Expected behavior
15
+ <!-- What you expected to happen -->
16
+
17
+ ## Steps to reproduce
18
+ 1.
19
+ 2.
20
+ 3.
21
+
22
+ ## Environment
23
+ <!-- Run: oh-my-claude doctor (or npx @lgcyaxi/oh-my-claude doctor) -->
24
+
25
+ | Component | Value |
26
+ |-----------|-------|
27
+ | oh-my-claude version | |
28
+ | OS | |
29
+ | Node.js | |
30
+ | Bun | |
31
+ | Installation | global / npx |
32
+
33
+ <details>
34
+ <summary>Doctor output</summary>
35
+
36
+ ```
37
+ <!-- Paste doctor output here (remove any API keys) -->
38
+ ```
39
+
40
+ </details>
41
+
42
+ ## Additional context
43
+ <!-- Any other information that might help diagnose the issue -->
package/CHANGELOG.md CHANGED
@@ -7,6 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  Individual version changelogs are available in the [changelog/](./changelog/) directory.
9
9
 
10
+ ## [1.1.2] - 2026-01-16
11
+
12
+ See [changelog/v1.1.2.md](./changelog/v1.1.2.md) for details.
13
+
14
+ ### Fixed
15
+ - Windows compatibility for `update` command (shell redirection errors)
16
+ - MCP list/remove commands now work on Windows
17
+
18
+ ## [1.1.1] - 2026-01-16
19
+
20
+ See [changelog/v1.1.1.md](./changelog/v1.1.1.md) for details.
21
+
22
+ ### Added
23
+ - Real-time StatusLine showing active agents and provider availability
24
+ - Task tool agent tracking (Claude-Reviewer, Claude-Scout, etc.)
25
+ - StatusLine CLI subcommand (`statusline --enable/--disable/--status`)
26
+ - Multi-line statusline support (merges with existing statusline)
27
+
28
+ ### Changed
29
+ - MCP server now writes status file on startup
30
+ - Doctor command shows statusline status
31
+
32
+ ## [1.1.0] - 2026-01-15
33
+
34
+ See [changelog/v1.1.0.md](./changelog/v1.1.0.md) for details.
35
+
36
+ ### Added
37
+ - Bug reporting command (`/omcx-issue`)
38
+ - GitHub issue template for bug reports
39
+
10
40
  ## [1.0.1] - 2025-01-15
11
41
 
12
42
  See [changelog/v1.0.1.md](./changelog/v1.0.1.md) for details.
package/CLAUDE.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # oh-my-claude Development Guide
2
2
 
3
+ ## Project Overview
4
+
5
+ Multi-provider MCP server for Claude Code with specialized agent workflows. Routes background tasks to DeepSeek, ZhiPu GLM, MiniMax via Anthropic-compatible APIs.
6
+
7
+ **npm package:** `@lgcyaxi/oh-my-claude`
8
+
3
9
  ## Build Commands
4
10
 
5
11
  ```bash
@@ -37,3 +43,57 @@ bun test # Run tests
37
43
  bun run install-local # Build and install to ~/.claude/
38
44
  oh-my-claude doctor # Verify configuration
39
45
  ```
46
+
47
+ ## Slash Commands
48
+
49
+ Commands are defined in `src/commands/`:
50
+
51
+ - **Agent Commands (`/omc-*`)**: Activate specific agents (sisyphus, oracle, librarian, etc.)
52
+ - **Action Commands (`/omcx-*`)**: Quick actions (commit, implement, refactor, docs)
53
+ - **Mode Commands**: `/ulw` (Ultrawork - maximum performance, work until done)
54
+
55
+ When adding new commands:
56
+ 1. Create `.md` file in `src/commands/`
57
+ 2. Add to appropriate array in `src/commands/index.ts`
58
+ 3. Update README documentation
59
+
60
+ ## Fallback System
61
+
62
+ MCP agents automatically fall back to Claude models when provider API keys are not configured:
63
+
64
+ - Oracle → claude-opus-4-5
65
+ - Librarian → claude-sonnet-4-5
66
+ - Explore → claude-haiku-4-5
67
+ - Frontend-UI-UX → claude-sonnet-4-5
68
+ - Document-Writer → claude-sonnet-4-5
69
+
70
+ Configuration in `src/config/schema.ts` with `fallback` field on agents.
71
+
72
+ ## Release Process
73
+
74
+ ```bash
75
+ # 1. Update version in package.json and src/cli.ts
76
+ # 2. Create changelog in changelog/vX.X.X.md
77
+ # 3. Update CHANGELOG.md
78
+ # 4. Commit to dev branch
79
+ # 5. Squash merge to main
80
+ git checkout main && git merge --squash dev
81
+ git commit -m "release: vX.X.X - description"
82
+ git tag vX.X.X
83
+ git push origin main --tags
84
+
85
+ # 6. Publish to npm
86
+ npm publish --access public
87
+ ```
88
+
89
+ ## Git Conventions
90
+
91
+ - `.sisyphus/` directory at project root should NOT be committed (session state files)
92
+ - Always check `git status` before committing to avoid staging unwanted files
93
+
94
+ ## Key Files
95
+
96
+ - `src/config/loader.ts` - Config loading with fallback helpers
97
+ - `src/providers/router.ts` - Routes requests to providers, handles FallbackRequiredError
98
+ - `src/mcp/background-agent-server/server.ts` - MCP server implementation
99
+ - `bin/oh-my-claude.js` - CLI entry point (uses pathToFileURL for Windows compatibility)
package/README.md CHANGED
@@ -11,10 +11,11 @@ Route background tasks to multiple AI providers (DeepSeek, ZhiPu GLM, MiniMax) v
11
11
  - **Multi-Provider MCP Server** - Background task execution with DeepSeek, ZhiPu GLM, MiniMax
12
12
  - **Specialized Agent Workflows** - Pre-configured agents for different task types (Sisyphus, Oracle, Librarian, etc.)
13
13
  - **Slash Commands** - Quick actions (`/omcx-commit`, `/omcx-implement`) and agent activation (`/omc-sisyphus`, `/omc-plan`)
14
+ - **Real-Time StatusLine** - Live status bar showing active agents, task progress, and provider availability
14
15
  - **Planning System** - Strategic planning with Prometheus agent and boulder-state tracking
15
16
  - **Official MCP Setup** - One-command installation for Sequential Thinking, MiniMax, and GLM MCPs
16
17
  - **Concurrent Execution** - Per-provider rate limiting and parallel task management
17
- - **Hook Integration** - Code quality checks and todo tracking
18
+ - **Hook Integration** - Code quality checks, todo tracking, and agent monitoring
18
19
 
19
20
  ## Quick Start
20
21
 
@@ -89,6 +90,7 @@ npx @lgcyaxi/oh-my-claude doctor --detail
89
90
  | `/omc-explore` | Activate Explore - codebase search |
90
91
  | `/omc-plan` | Start strategic planning with Prometheus |
91
92
  | `/omc-start-work` | Begin work on an existing plan |
93
+ | `/omc-status` | Display MCP background agent status dashboard |
92
94
 
93
95
  ### Quick Action Commands (`/omcx-*`)
94
96
 
@@ -98,6 +100,67 @@ npx @lgcyaxi/oh-my-claude doctor --detail
98
100
  | `/omcx-implement` | Implement a feature with best practices |
99
101
  | `/omcx-refactor` | Refactor code with quality improvements |
100
102
  | `/omcx-docs` | Generate or update documentation |
103
+ | `/omcx-issue` | Report a bug to oh-my-claude GitHub Issues |
104
+
105
+ ### Mode Commands
106
+
107
+ | Command | Description |
108
+ |---------|-------------|
109
+ | `/ulw` | **Ultrawork Mode** - Maximum performance, work until done |
110
+
111
+ #### Ultrawork Mode (`/ulw`)
112
+
113
+ Ultrawork mode activates **maximum performance execution** with zero-tolerance completion policy:
114
+
115
+ - **100% Delivery** - No partial completion, no scope reduction, no placeholders
116
+ - **Aggressive Parallelization** - Fire multiple agents simultaneously
117
+ - **Mandatory Verification** - Code compiles, tests pass, build succeeds
118
+ - **Work Until Done** - Continue until ALL tasks are marked complete
119
+
120
+ **Usage:**
121
+ ```bash
122
+ /ulw implement the authentication system from the plan
123
+ /ulw fix all type errors in the codebase
124
+ /ulw add comprehensive test coverage for the API
125
+ ```
126
+
127
+ **Key Features:**
128
+ - Automatically creates comprehensive todo lists
129
+ - Uses sync agents (Task tool) and async agents (MCP) in parallel
130
+ - Verifies each step before marking complete
131
+ - Boulder state persistence for session continuity
132
+
133
+ ## Real-Time StatusLine
134
+
135
+ oh-my-claude provides a real-time status bar that shows active agents and provider availability directly in Claude Code.
136
+
137
+ ### Status Display
138
+
139
+ ```
140
+ omc ready | DS: 10 ZP: 10 MM: 5 # Idle - showing available slots
141
+ omc [Oracle: 32s] [@Scout: 15s] | DS: 1/10 ... # Active tasks with elapsed time
142
+ ```
143
+
144
+ ### Legend
145
+
146
+ - **omc ready** - System is ready, no active tasks
147
+ - **[Oracle: 32s]** - MCP background agent running (via external API)
148
+ - **[@Scout: 15s]** - Task tool agent running (via Claude subscription)
149
+ - **DS: 1/10** - DeepSeek: 1 active / 10 max concurrent slots
150
+ - **ZP: 0/10** - ZhiPu: 0 active / 10 max concurrent
151
+ - **MM: 0/5** - MiniMax: 0 active / 5 max concurrent
152
+
153
+ ### CLI Control
154
+
155
+ ```bash
156
+ npx @lgcyaxi/oh-my-claude statusline --status # Check statusline status
157
+ npx @lgcyaxi/oh-my-claude statusline --enable # Enable statusline
158
+ npx @lgcyaxi/oh-my-claude statusline --disable # Disable statusline
159
+ ```
160
+
161
+ ### Multi-Line Support
162
+
163
+ When you have an existing statusline (like CCometixLine), oh-my-claude automatically creates a wrapper that shows both on separate lines.
101
164
 
102
165
  ## Agent Workflows
103
166
 
@@ -167,6 +230,11 @@ npx @lgcyaxi/oh-my-claude setup-mcp --glm # GLM/ZhiPu servers only
167
230
  # Uninstall
168
231
  npx @lgcyaxi/oh-my-claude uninstall # Remove oh-my-claude
169
232
  npx @lgcyaxi/oh-my-claude uninstall --keep-config # Keep config file
233
+
234
+ # StatusLine
235
+ npx @lgcyaxi/oh-my-claude statusline --status # Check statusline status
236
+ npx @lgcyaxi/oh-my-claude statusline --enable # Enable statusline
237
+ npx @lgcyaxi/oh-my-claude statusline --disable # Disable statusline
170
238
  ```
171
239
 
172
240
  ## Configuration
package/README.zh-CN.md CHANGED
@@ -89,6 +89,7 @@ npx @lgcyaxi/oh-my-claude doctor --detail
89
89
  | `/omc-explore` | 激活 Explore - 代码库搜索 |
90
90
  | `/omc-plan` | 使用 Prometheus 开始战略规划 |
91
91
  | `/omc-start-work` | 开始执行现有计划 |
92
+ | `/omc-status` | 显示 MCP 后台智能体状态仪表板 |
92
93
 
93
94
  ### 快捷操作命令(`/omcx-*`)
94
95
 
@@ -98,6 +99,35 @@ npx @lgcyaxi/oh-my-claude doctor --detail
98
99
  | `/omcx-implement` | 按最佳实践实现功能 |
99
100
  | `/omcx-refactor` | 重构代码并提升质量 |
100
101
  | `/omcx-docs` | 生成或更新文档 |
102
+ | `/omcx-issue` | 向 oh-my-claude GitHub Issues 报告 Bug |
103
+
104
+ ### 模式命令
105
+
106
+ | 命令 | 描述 |
107
+ |------|------|
108
+ | `/ulw` | **超级工作模式** - 最高性能,工作到完成 |
109
+
110
+ #### 超级工作模式(`/ulw`)
111
+
112
+ 超级工作模式激活**最高性能执行**,采用零容忍完成策略:
113
+
114
+ - **100% 交付** - 不允许部分完成、不允许缩小范围、不允许占位符
115
+ - **激进并行化** - 同时启动多个智能体
116
+ - **强制验证** - 代码编译、测试通过、构建成功
117
+ - **工作到完成** - 持续执行直到所有任务标记完成
118
+
119
+ **使用方法:**
120
+ ```bash
121
+ /ulw 根据计划实现认证系统
122
+ /ulw 修复代码库中的所有类型错误
123
+ /ulw 为 API 添加全面的测试覆盖
124
+ ```
125
+
126
+ **核心特性:**
127
+ - 自动创建全面的待办列表
128
+ - 同步智能体(Task 工具)和异步智能体(MCP)并行使用
129
+ - 每个步骤验证后才标记完成
130
+ - 巨石状态持久化以支持会话延续
101
131
 
102
132
  ## 智能体工作流
103
133
 
@@ -0,0 +1,20 @@
1
+ # v1.1.0 - 2026-01-15
2
+
3
+ Feature release with bug reporting command and GitHub issue templates.
4
+
5
+ ## Added
6
+
7
+ - **Bug reporting command**: `/omcx-issue`
8
+ - Report bugs directly to oh-my-claude GitHub Issues
9
+ - Auto-collects environment diagnostics (version, OS, runtime, installation method)
10
+ - Runs `oh-my-claude doctor` to gather configuration status
11
+ - Interactive draft workflow - review before submitting
12
+ - Uses GitHub MCP tools for issue creation
13
+ - Handles both global and npx installations
14
+ - Falls back to manual reporting URL if GitHub MCP unavailable
15
+
16
+ - **GitHub Issue Templates**: `.github/ISSUE_TEMPLATE/bug_report.md`
17
+ - Structured bug report template for manual submissions
18
+ - Includes environment info table
19
+ - Doctor output section for diagnostics
20
+ - Consistent format with `/omcx-issue` command output
@@ -0,0 +1,71 @@
1
+ # v1.1.1
2
+
3
+ Release date: 2026-01-16
4
+
5
+ ## Features
6
+
7
+ ### Real-Time StatusLine
8
+
9
+ Added a persistent status bar that displays in Claude Code showing:
10
+ - Active MCP background agents with elapsed time
11
+ - Active Task tool agents (Claude-subscription agents) with `@` prefix
12
+ - Provider concurrency slots (DeepSeek, ZhiPu, MiniMax)
13
+ - Idle state with available slots
14
+
15
+ **StatusLine Format:**
16
+ ```
17
+ omc ready | DS: 10 ZP: 10 MM: 5 # Idle
18
+ omc [Oracle: 32s] [@Scout: 15s] | DS: 1/10 ... # Active
19
+ ```
20
+
21
+ ### Task Tool Agent Tracking
22
+
23
+ New `task-tracker` hook monitors Claude Code's Task tool to track:
24
+ - Claude-Reviewer, Claude-Scout, and other Task-based agents
25
+ - Launch and completion times
26
+ - Completion notifications in output
27
+
28
+ ### StatusLine CLI
29
+
30
+ New CLI subcommand for statusline management:
31
+ ```bash
32
+ oh-my-claude statusline --status # Check status
33
+ oh-my-claude statusline --enable # Enable
34
+ oh-my-claude statusline --disable # Disable
35
+ ```
36
+
37
+ ### Multi-Line StatusLine Support
38
+
39
+ When users have an existing statusline (like CCometixLine), oh-my-claude automatically:
40
+ - Creates a wrapper script that calls both
41
+ - Displays outputs on separate lines for visibility
42
+ - Backs up the original configuration
43
+
44
+ ## Changes
45
+
46
+ - Updated `doctor` command to show statusline status
47
+ - StatusLine automatically installed during `oh-my-claude install`
48
+ - Status file written to `~/.claude/oh-my-claude/status.json`
49
+ - MCP server writes initial status on startup
50
+
51
+ ## Hooks
52
+
53
+ New hooks added:
54
+ - `task-tracker` (PreToolUse:Task) - Track Task agent launches
55
+ - `task-tracker` (PostToolUse:Task) - Track Task agent completions
56
+
57
+ ## Files
58
+
59
+ New files:
60
+ - `src/statusline/statusline.ts` - Main statusline script
61
+ - `src/statusline/formatter.ts` - Status formatting utilities
62
+ - `src/hooks/task-tracker.ts` - Task tool tracking hook
63
+ - `src/installer/statusline-merger.ts` - StatusLine configuration merger
64
+
65
+ Modified files:
66
+ - `src/cli.ts` - Added statusline subcommand
67
+ - `src/installer/index.ts` - StatusLine installation
68
+ - `src/installer/settings-merger.ts` - Hook installation for task-tracker
69
+ - `src/mcp/background-agent-server/task-manager.ts` - Status file writer
70
+ - `src/mcp/background-agent-server/server.ts` - Initial status on startup
71
+ - `package.json` - Build scripts for statusline
@@ -0,0 +1,15 @@
1
+ # v1.1.2
2
+
3
+ Release date: 2026-01-16
4
+
5
+ ## Fixed
6
+
7
+ ### Windows Compatibility
8
+ - Fixed `update` command failing on Windows with "The system cannot find the path specified"
9
+ - Replaced Unix-specific shell redirections (`2>/dev/null`) with cross-platform `stdio: 'pipe'` option
10
+ - Fixed MCP list/remove commands for Windows compatibility
11
+ - All `execSync` calls now use proper stdio configuration instead of shell redirections
12
+
13
+ ## Files Changed
14
+ - `src/cli.ts` - Fixed update command and MCP status checks
15
+ - `src/installer/settings-merger.ts` - Fixed MCP list/remove commands
package/dist/cli.js CHANGED
@@ -2,13 +2,18 @@
2
2
  import {
3
3
  __commonJS,
4
4
  __require,
5
+ __toCommonJS,
5
6
  __toESM,
6
7
  checkInstallation,
8
+ exports_installer,
9
+ exports_settings_merger,
7
10
  getProvidersStatus,
11
+ init_installer,
12
+ init_settings_merger,
8
13
  install,
9
14
  loadConfig,
10
15
  uninstall
11
- } from "./index-5ars1tn4.js";
16
+ } from "./index-814gp2s3.js";
12
17
 
13
18
  // node_modules/commander/lib/error.js
14
19
  var require_error = __commonJS((exports) => {
@@ -2120,7 +2125,8 @@ var {
2120
2125
  } = import__.default;
2121
2126
 
2122
2127
  // src/cli.ts
2123
- program.name("oh-my-claude").description("Multi-agent orchestration plugin for Claude Code").version("1.0.1");
2128
+ init_installer();
2129
+ program.name("oh-my-claude").description("Multi-agent orchestration plugin for Claude Code").version("1.1.1");
2124
2130
  program.command("install").description("Install oh-my-claude into Claude Code").option("--skip-agents", "Skip agent file generation").option("--skip-hooks", "Skip hooks installation").option("--skip-mcp", "Skip MCP server installation").option("--force", "Force overwrite existing files").action(async (options) => {
2125
2131
  console.log(`Installing oh-my-claude...
2126
2132
  `);
@@ -2263,6 +2269,7 @@ program.command("doctor").description("Diagnose oh-my-claude configuration").opt
2263
2269
  console.log(` ${status.components.agents ? ok("Agent files generated") : fail("Agent files generated")}`);
2264
2270
  console.log(` ${status.components.hooks ? ok("Hooks configured") : fail("Hooks configured")}`);
2265
2271
  console.log(` ${status.components.mcp ? ok("MCP server configured") : fail("MCP server configured")}`);
2272
+ console.log(` ${status.components.statusLine ? ok("StatusLine configured") : warn("StatusLine not configured")}`);
2266
2273
  console.log(` ${status.components.config ? ok("Configuration file exists") : fail("Configuration file exists")}`);
2267
2274
  if (detail) {
2268
2275
  console.log(`
@@ -2296,10 +2303,12 @@ ${header("Commands (detailed):")}`);
2296
2303
  "omc-explore",
2297
2304
  "omc-plan",
2298
2305
  "omc-start-work",
2306
+ "omc-status",
2299
2307
  "omcx-commit",
2300
2308
  "omcx-implement",
2301
2309
  "omcx-refactor",
2302
- "omcx-docs"
2310
+ "omcx-docs",
2311
+ "omcx-issue"
2303
2312
  ];
2304
2313
  console.log(` ${subheader("Agent commands (omc-):")}`);
2305
2314
  for (const cmd of expectedCommands.filter((c2) => c2.startsWith("omc-"))) {
@@ -2316,7 +2325,7 @@ ${header("Commands (detailed):")}`);
2316
2325
  console.log(`
2317
2326
  ${header("MCP Server (detailed):")}`);
2318
2327
  try {
2319
- const mcpList = execSync("claude mcp list 2>/dev/null", { encoding: "utf-8" });
2328
+ const mcpList = execSync("claude mcp list", { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] });
2320
2329
  const omcLine = mcpList.split(`
2321
2330
  `).find((line) => line.includes("oh-my-claude-background"));
2322
2331
  if (omcLine) {
@@ -2341,12 +2350,41 @@ ${header("MCP Server (detailed):")}`);
2341
2350
  console.log(`
2342
2351
  ${header("Hooks (detailed):")}`);
2343
2352
  const hooksDir = join(homedir(), ".claude", "oh-my-claude", "hooks");
2344
- const expectedHooks = ["comment-checker.js", "todo-continuation.js"];
2353
+ const expectedHooks = ["comment-checker.js", "todo-continuation.js", "task-notification.js"];
2345
2354
  for (const hook of expectedHooks) {
2346
2355
  const hookPath = join(hooksDir, hook);
2347
2356
  const exists = existsSync(hookPath);
2348
2357
  console.log(` ${exists ? ok(hook) : fail(hook)}`);
2349
2358
  }
2359
+ console.log(`
2360
+ ${header("StatusLine (detailed):")}`);
2361
+ const statusLineDir = join(homedir(), ".claude", "oh-my-claude", "dist", "statusline");
2362
+ const statusLineScript = join(statusLineDir, "statusline.js");
2363
+ const statusFileExists = existsSync(statusLineScript);
2364
+ console.log(` ${statusFileExists ? ok("statusline.js installed") : fail("statusline.js not installed")}`);
2365
+ try {
2366
+ const settingsPath = join(homedir(), ".claude", "settings.json");
2367
+ if (existsSync(settingsPath)) {
2368
+ const settings = JSON.parse(__require("node:fs").readFileSync(settingsPath, "utf-8"));
2369
+ if (settings.statusLine) {
2370
+ const cmd = settings.statusLine.command || "";
2371
+ const isOurs = cmd.includes("oh-my-claude");
2372
+ const isWrapper = cmd.includes("statusline-wrapper");
2373
+ console.log(` ${ok("StatusLine configured in settings.json")}`);
2374
+ if (isWrapper) {
2375
+ console.log(` Mode: ${c.yellow}Merged (wrapper)${c.reset}`);
2376
+ } else if (isOurs) {
2377
+ console.log(` Mode: ${c.green}Direct${c.reset}`);
2378
+ } else {
2379
+ console.log(` Mode: ${c.cyan}External${c.reset}`);
2380
+ }
2381
+ } else {
2382
+ console.log(` ${warn("StatusLine not configured in settings.json")}`);
2383
+ }
2384
+ }
2385
+ } catch {
2386
+ console.log(` ${fail("Failed to read settings.json")}`);
2387
+ }
2350
2388
  }
2351
2389
  console.log(`
2352
2390
  ${header("Providers:")}`);
@@ -2445,8 +2483,9 @@ program.command("update").description("Update oh-my-claude to the latest version
2445
2483
  let latestVersion = "unknown";
2446
2484
  try {
2447
2485
  console.log(`${dimText("Checking npm registry for latest version...")}`);
2448
- const npmInfo = execSync(`npm view ${PACKAGE_NAME} version 2>/dev/null`, {
2449
- encoding: "utf-8"
2486
+ const npmInfo = execSync(`npm view ${PACKAGE_NAME} version`, {
2487
+ encoding: "utf-8",
2488
+ stdio: ["pipe", "pipe", "pipe"]
2450
2489
  }).trim();
2451
2490
  latestVersion = npmInfo;
2452
2491
  console.log(`Latest version: ${c.cyan}${latestVersion}${c.reset}
@@ -2476,7 +2515,10 @@ Run ${c.cyan}npx ${PACKAGE_NAME} update${c.reset} to update.`);
2476
2515
  try {
2477
2516
  console.log(`${dimText("Clearing npx cache...")}`);
2478
2517
  try {
2479
- execSync(`npx --yes clear-npx-cache 2>/dev/null || true`, { stdio: "pipe" });
2518
+ execSync(`npx --yes clear-npx-cache`, {
2519
+ stdio: ["pipe", "pipe", "pipe"],
2520
+ timeout: 1e4
2521
+ });
2480
2522
  } catch {}
2481
2523
  console.log(`${dimText("Downloading latest version...")}`);
2482
2524
  const updateCmd = `npx --yes ${PACKAGE_NAME}@latest install --force`;
@@ -2496,6 +2538,85 @@ ${fail("Update failed")}`);
2496
2538
  process.exit(1);
2497
2539
  }
2498
2540
  });
2541
+ program.command("statusline").description("Manage statusline integration").option("--enable", "Enable statusline").option("--disable", "Disable statusline").option("--status", "Show current statusline configuration").action((options) => {
2542
+ const { readFileSync, existsSync } = __require("node:fs");
2543
+ const { join } = __require("node:path");
2544
+ const { homedir } = __require("node:os");
2545
+ const useColor = process.stdout.isTTY;
2546
+ const c = {
2547
+ reset: useColor ? "\x1B[0m" : "",
2548
+ bold: useColor ? "\x1B[1m" : "",
2549
+ dim: useColor ? "\x1B[2m" : "",
2550
+ green: useColor ? "\x1B[32m" : "",
2551
+ red: useColor ? "\x1B[31m" : "",
2552
+ yellow: useColor ? "\x1B[33m" : "",
2553
+ cyan: useColor ? "\x1B[36m" : ""
2554
+ };
2555
+ const ok = (text) => `${c.green}+${c.reset} ${text}`;
2556
+ const fail = (text) => `${c.red}x${c.reset} ${text}`;
2557
+ const warn = (text) => `${c.yellow}!${c.reset} ${text}`;
2558
+ const settingsPath = join(homedir(), ".claude", "settings.json");
2559
+ if (options.status || !options.enable && !options.disable) {
2560
+ console.log(`${c.bold}StatusLine Status${c.reset}
2561
+ `);
2562
+ if (!existsSync(settingsPath)) {
2563
+ console.log(fail("settings.json not found"));
2564
+ process.exit(1);
2565
+ }
2566
+ try {
2567
+ const settings = JSON.parse(readFileSync(settingsPath, "utf-8"));
2568
+ if (!settings.statusLine) {
2569
+ console.log(fail("StatusLine not configured"));
2570
+ console.log(`
2571
+ Run ${c.cyan}oh-my-claude statusline --enable${c.reset} to enable.`);
2572
+ } else {
2573
+ const cmd = settings.statusLine.command || "";
2574
+ const isOurs = cmd.includes("oh-my-claude");
2575
+ const isWrapper = cmd.includes("statusline-wrapper");
2576
+ console.log(ok("StatusLine configured"));
2577
+ console.log(` Command: ${c.dim}${cmd}${c.reset}`);
2578
+ if (isWrapper) {
2579
+ console.log(` Mode: ${c.yellow}Merged (wrapper)${c.reset}`);
2580
+ } else if (isOurs) {
2581
+ console.log(` Mode: ${c.green}Direct${c.reset}`);
2582
+ } else {
2583
+ console.log(` Mode: ${c.cyan}External${c.reset}`);
2584
+ }
2585
+ }
2586
+ } catch (error) {
2587
+ console.log(fail(`Failed to read settings: ${error}`));
2588
+ process.exit(1);
2589
+ }
2590
+ } else if (options.enable) {
2591
+ const { installStatusLine } = (init_settings_merger(), __toCommonJS(exports_settings_merger));
2592
+ const { getStatusLineScriptPath } = (init_installer(), __toCommonJS(exports_installer));
2593
+ try {
2594
+ const result = installStatusLine(getStatusLineScriptPath());
2595
+ if (result.installed) {
2596
+ console.log(ok("StatusLine enabled"));
2597
+ if (result.wrapperCreated) {
2598
+ console.log(warn("Wrapper created to merge with existing statusLine"));
2599
+ }
2600
+ }
2601
+ } catch (error) {
2602
+ console.log(fail(`Failed to enable statusline: ${error}`));
2603
+ process.exit(1);
2604
+ }
2605
+ } else if (options.disable) {
2606
+ const { uninstallStatusLine } = (init_settings_merger(), __toCommonJS(exports_settings_merger));
2607
+ try {
2608
+ const result = uninstallStatusLine();
2609
+ if (result) {
2610
+ console.log(ok("StatusLine disabled"));
2611
+ } else {
2612
+ console.log(warn("StatusLine was not configured"));
2613
+ }
2614
+ } catch (error) {
2615
+ console.log(fail(`Failed to disable statusline: ${error}`));
2616
+ process.exit(1);
2617
+ }
2618
+ }
2619
+ });
2499
2620
  program.command("setup-mcp").description("Install official MCP servers (MiniMax, GLM/ZhiPu)").option("--minimax", "Install MiniMax MCP only").option("--glm", "Install GLM/ZhiPu MCPs only").option("--thinking", "Install Sequential Thinking MCP only").option("--list", "List available MCP servers").action(async (options) => {
2500
2621
  const { execSync, spawnSync } = __require("node:child_process");
2501
2622
  const useColor = process.stdout.isTTY;
@@ -2587,7 +2708,7 @@ program.command("setup-mcp").description("Install official MCP servers (MiniMax,
2587
2708
  if (installThinking) {
2588
2709
  console.log(`${c.bold}Anthropic Official:${c.reset}`);
2589
2710
  try {
2590
- const mcpList = execSync("claude mcp list 2>/dev/null", { encoding: "utf-8" });
2711
+ const mcpList = execSync("claude mcp list", { encoding: "utf-8" });
2591
2712
  if (mcpList.includes("sequential-thinking")) {
2592
2713
  console.log(` ${ok("sequential-thinking already installed")}`);
2593
2714
  } else {
@@ -2608,7 +2729,7 @@ ${c.bold}MiniMax:${c.reset}`);
2608
2729
  console.log(` ${dimText("Set it with: export MINIMAX_API_KEY=your-key")}`);
2609
2730
  } else {
2610
2731
  try {
2611
- const mcpList = execSync("claude mcp list 2>/dev/null", { encoding: "utf-8" });
2732
+ const mcpList = execSync("claude mcp list", { encoding: "utf-8" });
2612
2733
  if (mcpList.includes("MiniMax")) {
2613
2734
  console.log(` ${ok("MiniMax already installed")}`);
2614
2735
  } else {
@@ -2632,7 +2753,7 @@ ${c.bold}GLM/ZhiPu:${c.reset}`);
2632
2753
  const glmServers = Object.entries(mcpServers).filter(([_, s]) => s.envKey === "ZHIPU_API_KEY");
2633
2754
  for (const [key, server] of glmServers) {
2634
2755
  try {
2635
- const mcpList = execSync("claude mcp list 2>/dev/null", { encoding: "utf-8" });
2756
+ const mcpList = execSync("claude mcp list", { encoding: "utf-8" });
2636
2757
  if (mcpList.includes(server.name)) {
2637
2758
  console.log(` ${ok(`${server.name} already installed`)}`);
2638
2759
  } else {
@@ -70,7 +70,7 @@ async function main() {
70
70
  return;
71
71
  }
72
72
  if (toolInput.tool !== "Edit" && toolInput.tool !== "Write") {
73
- const response2 = { decision: "skip" };
73
+ const response2 = { decision: "approve" };
74
74
  console.log(JSON.stringify(response2));
75
75
  return;
76
76
  }