@liangjie559567/ultrapower 7.6.0 → 7.7.1

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.
Files changed (72) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +2 -2
  4. package/bridge/mcp-server.cjs +1 -0
  5. package/dist/hooks/bridge-normalize.d.ts.map +1 -1
  6. package/dist/hooks/bridge-normalize.js +47 -25
  7. package/dist/hooks/bridge-normalize.js.map +1 -1
  8. package/dist/lib/atomic-write.d.ts.map +1 -1
  9. package/dist/lib/atomic-write.js +2 -0
  10. package/dist/lib/atomic-write.js.map +1 -1
  11. package/dist/lib/auditLog.d.ts +6 -7
  12. package/dist/lib/auditLog.d.ts.map +1 -1
  13. package/dist/lib/auditLog.js +10 -7
  14. package/dist/lib/auditLog.js.map +1 -1
  15. package/dist/lib/logger.d.ts.map +1 -1
  16. package/dist/lib/logger.js +9 -4
  17. package/dist/lib/logger.js.map +1 -1
  18. package/dist/lib/path-validator.d.ts.map +1 -1
  19. package/dist/lib/path-validator.js +12 -12
  20. package/dist/lib/path-validator.js.map +1 -1
  21. package/dist/security/concurrency-control.d.ts +7 -0
  22. package/dist/security/concurrency-control.d.ts.map +1 -1
  23. package/dist/security/concurrency-control.js +22 -0
  24. package/dist/security/concurrency-control.js.map +1 -1
  25. package/docs/CLAUDE.md +2 -2
  26. package/docs/CODE_BASED_FLOW.md +12 -12
  27. package/docs/COMPATIBILITY.md +1 -1
  28. package/docs/FEATURES.md +16 -16
  29. package/docs/INSTALL.md +4 -4
  30. package/docs/MIGRATION.md +2 -2
  31. package/docs/OMC-CLAUDE.md +1 -1
  32. package/docs/REFERENCE.md +16 -16
  33. package/docs/UPGRADE_VERIFICATION.md +1 -1
  34. package/docs/agent-templates/README.md +2 -2
  35. package/docs/api/media/INSTALL.md +2 -2
  36. package/docs/api/media/MIGRATION.md +2 -2
  37. package/docs/api/media/REFERENCE.md +14 -14
  38. package/docs/api/media/mcp-server-usage.md +4 -4
  39. package/docs/architecture/ultrapower-flow-analysis.md +1 -1
  40. package/docs/getting-started/quickstart.md +1 -1
  41. package/docs/glossary.md +1 -1
  42. package/docs/guides/mcp-server-usage.md +4 -4
  43. package/docs/guides/tool-name-migration.md +12 -12
  44. package/docs/mcp/configuration.md +5 -5
  45. package/docs/mcp/performance.md +5 -5
  46. package/docs/mcp-compatibility-matrix.md +1 -1
  47. package/docs/partials/agent-tiers.md +24 -24
  48. package/docs/partials/features.md +1 -1
  49. package/docs/partials/verification-tiers.md +2 -2
  50. package/docs/plans/2026-02-24-superpowers-ultrapower-integration-design.md +2 -2
  51. package/docs/plans/2026-03-02-docs-comprehensive-update.md +16 -16
  52. package/docs/plans/2026-03-05-mcp-adoption-atomic-tasks.md +9 -9
  53. package/docs/plans/2026-03-16-tech-debt-fixes.md +222 -0
  54. package/docs/prd/bugs-pain-points-audit-dag.md +297 -297
  55. package/docs/prd/bugs-pain-points-audit-draft.md +154 -154
  56. package/docs/prd/bugs-pain-points-audit-manifest.md +650 -650
  57. package/docs/prd/bugs-pain-points-audit-rough.md +654 -654
  58. package/docs/reports/tech-debt-verification-2026-03-16.md +87 -0
  59. package/docs/reviews/bugs-pain-points-audit/review_critic.md +213 -213
  60. package/docs/reviews/bugs-pain-points-audit/review_domain.md +247 -247
  61. package/docs/reviews/bugs-pain-points-audit/review_product.md +189 -189
  62. package/docs/reviews/bugs-pain-points-audit/review_tech.md +382 -382
  63. package/docs/reviews/bugs-pain-points-audit/review_ux.md +161 -161
  64. package/docs/reviews/bugs-pain-points-audit/summary.md +129 -129
  65. package/docs/reviews/bugs-pain-points-audit/tech-debt-v7.6.0-code-review.md +328 -0
  66. package/docs/shared/agent-tiers.md +24 -24
  67. package/docs/shared/features.md +1 -1
  68. package/docs/shared/verification-tiers.md +2 -2
  69. package/docs/standards/README.md +1 -1
  70. package/docs/standards/runtime-protection.md +7 -0
  71. package/docs/troubleshooting.md +1 -1
  72. package/package.json +1 -1
@@ -311,18 +311,18 @@ Total: **35 tools** exposed via `mcp__plugin_ultrapower_t__` prefix.
311
311
  ### LSP Tools (12)
312
312
 
313
313
  ```
314
- lsp_hover — Type info and docs at position
315
- lsp_goto_definition — Jump to definition
316
- lsp_find_references — Find all usages
317
- lsp_document_symbols — File outline
318
- lsp_workspace_symbols — Cross-workspace symbol search
319
- lsp_diagnostics — Per-file errors/warnings
320
- lsp_diagnostics_directory — Project-level type check
321
- lsp_servers — List available language servers
322
- lsp_prepare_rename — Check if rename is valid
323
- lsp_rename — Preview multi-file rename
324
- lsp_code_actions — Available refactors/fixes
325
- lsp_code_action_resolve — Get action details
314
+ ultrapower:lsp_hover — Type info and docs at position
315
+ ultrapower:lsp_goto_definition — Jump to definition
316
+ ultrapower:lsp_find_references — Find all usages
317
+ ultrapower:lsp_document_symbols — File outline
318
+ ultrapower:lsp_workspace_symbols — Cross-workspace symbol search
319
+ ultrapower:lsp_diagnostics — Per-file errors/warnings
320
+ ultrapower:lsp_diagnostics_directory — Project-level type check
321
+ ultrapower:lsp_servers — List available language servers
322
+ ultrapower:lsp_prepare_rename — Check if rename is valid
323
+ ultrapower:lsp_rename — Preview multi-file rename
324
+ ultrapower:lsp_code_actions — Available refactors/fixes
325
+ ultrapower:lsp_code_action_resolve — Get action details
326
326
  ```
327
327
 
328
328
  Supported languages: TypeScript, Python, Rust, Go, C/C++, Java, JSON, HTML, CSS, YAML
@@ -860,17 +860,17 @@ Directives are the highest-priority memory: they survive context compression and
860
860
 
861
861
  ### LSP Tools (12)
862
862
 
863
- Require a running language server. Use `lsp_servers()` to check availability.
863
+ Require a running language server. Use `ultrapower:lsp_servers()` to check availability.
864
864
 
865
865
  ```typescript
866
866
  // Type info at cursor position
867
- lsp_hover({ file: "src/hooks/bridge.ts", line: 42, character: 15 })
867
+ ultrapower:lsp_hover({ file: "src/hooks/bridge.ts", line: 42, character: 15 })
868
868
 
869
869
  // Find all usages
870
- lsp_find_references({ file: "src/lib/validateMode.ts", symbol: "assertValidMode" })
870
+ ultrapower:lsp_find_references({ file: "src/lib/validateMode.ts", symbol: "assertValidMode" })
871
871
 
872
872
  // Project-wide diagnostics
873
- lsp_diagnostics_directory({ directory: "src/", includeWarnings: false })
873
+ ultrapower:lsp_diagnostics_directory({ directory: "src/", includeWarnings: false })
874
874
  ```
875
875
 
876
876
  ### AST Tools (2)
@@ -162,11 +162,11 @@ npm install --save-dev @types/node
162
162
 
163
163
  **步骤:**
164
164
  1. 创建 `src/mcp/adapters/lsp-adapter.ts`
165
- 2. 转换 lsp_hover, lsp_goto_definition, lsp_find_references
166
- 3. 转换 lsp_document_symbols, lsp_workspace_symbols
167
- 4. 转换 lsp_diagnostics, lsp_diagnostics_directory
168
- 5. 转换 lsp_servers, lsp_prepare_rename, lsp_rename
169
- 6. 转换 lsp_code_actions, lsp_code_action_resolve
165
+ 2. 转换 ultrapower:lsp_hover, ultrapower:lsp_goto_definition, ultrapower:lsp_find_references
166
+ 3. 转换 ultrapower:lsp_document_symbols, ultrapower:lsp_workspace_symbols
167
+ 4. 转换 ultrapower:lsp_diagnostics, ultrapower:lsp_diagnostics_directory
168
+ 5. 转换 ultrapower:lsp_servers, ultrapower:lsp_prepare_rename, ultrapower:lsp_rename
169
+ 6. 转换 ultrapower:lsp_code_actions, ultrapower:lsp_code_action_resolve
170
170
 
171
171
  **验收:**
172
172
 
@@ -380,7 +380,7 @@ npm install --save-dev @types/node
380
380
  1. 创建 `src/mcp/tool-resolver.ts`
381
381
  2. 实现 `resolveTool(name: string)` 函数
382
382
  3. 支持带前缀:`mcp__plugin_ultrapower_t__lsp_hover`
383
- 4. 支持不带前缀:`lsp_hover`
383
+ 4. 支持不带前缀:`ultrapower:lsp_hover`
384
384
  5. 支持命名空间:`ultrapower:lsp_hover`
385
385
 
386
386
  **验收:**
@@ -530,8 +530,8 @@ npm install --save-dev @types/node
530
530
  **依赖:** 1.4.1
531
531
 
532
532
  **步骤:**
533
- 1. 测试 `lsp_hover` 调用
534
- 2. 测试 `lsp_diagnostics` 调用
533
+ 1. 测试 `ultrapower:lsp_hover` 调用
534
+ 2. 测试 `ultrapower:lsp_diagnostics` 调用
535
535
  3. 验证参数传递正确
536
536
  4. 验证返回结果格式
537
537
 
@@ -581,7 +581,7 @@ npm install --save-dev @types/node
581
581
  **步骤:**
582
582
  1. 使用旧前缀调用工具:`mcp__plugin_ultrapower_t__lsp_hover`
583
583
  2. 使用新前缀调用工具:`ultrapower:lsp_hover`
584
- 3. 使用无前缀调用工具:`lsp_hover`
584
+ 3. 使用无前缀调用工具:`ultrapower:lsp_hover`
585
585
  4. 验证三种方式都能成功
586
586
 
587
587
  **验收:**
@@ -0,0 +1,222 @@
1
+ # Technical Debt Fixes Implementation Plan
2
+
3
+ > **For Claude:** REQUIRED SUB-SKILL: Use ultrapower:executing-plans to implement this plan task-by-task.
4
+
5
+ **Goal:** Fix 4 identified technical debt items from architecture assessment (TD-1 to TD-4)
6
+
7
+ **Architecture:** Prioritize P0 test stability, then address P1 deprecation warnings and platform compatibility, finally unify atomic write protection
8
+
9
+ **Tech Stack:** TypeScript, Vitest, Node.js fs module, cross-platform file operations
10
+
11
+ ---
12
+
13
+ ## Task 1: Fix P0 Test Timeout Issues (TD-1)
14
+
15
+ **Priority:** P0 - Blocking CI pipeline
16
+
17
+ **Files:**
18
+ - Modify: `src/features/__tests__/mcp-integration.test.ts:9`
19
+ - Modify: `src/features/mcp-autodiscovery/__tests__/performance.test.ts:7`
20
+
21
+ **Step 1: Increase timeout for MCP integration tests**
22
+
23
+ ```typescript
24
+ // src/features/__tests__/mcp-integration.test.ts
25
+ beforeAll(async () => {
26
+ contextManager = new UnifiedContextManager();
27
+ await contextManager.initialize();
28
+ }, 30000); // Increase from 10000 to 30000ms
29
+ ```
30
+
31
+ **Step 2: Increase timeout for performance tests**
32
+
33
+ ```typescript
34
+ // src/features/mcp-autodiscovery/__tests__/performance.test.ts
35
+ beforeAll(async () => {
36
+ // Setup code
37
+ }, 30000); // Increase from 10000 to 30000ms
38
+ ```
39
+
40
+ **Step 3: Run tests to verify fixes**
41
+
42
+ Run: `npm test -- mcp-integration.test.ts performance.test.ts`
43
+ Expected: All tests pass without timeout
44
+
45
+ **Step 4: Commit**
46
+
47
+ ```bash
48
+ git add src/features/__tests__/mcp-integration.test.ts src/features/mcp-autodiscovery/__tests__/performance.test.ts
49
+ git commit -m "fix(test): increase timeout for MCP integration tests to 30s
50
+
51
+ Resolves TD-1: Test timeout issues blocking CI pipeline"
52
+ ```
53
+
54
+ ---
55
+
56
+ ## Task 2: Remove LSP Tool Deprecation Warnings (TD-2)
57
+
58
+ **Priority:** P1 - User experience and maintenance
59
+
60
+ **Files:**
61
+ - Modify: `src/tools/lsp-tools.ts`
62
+ - Modify: `docs/REFERENCE.md`
63
+ - Modify: `README.md`
64
+
65
+ **Step 1: Update all documentation to use new naming**
66
+
67
+ Search and replace in documentation:
68
+ - `ultrapower:lsp_diagnostics` → `ultrapower:lsp_diagnostics`
69
+ - `ultrapower:lsp_hover` → `ultrapower:lsp_hover`
70
+ - (repeat for all 12 LSP tools)
71
+
72
+ **Step 2: Add deprecation timeline to CHANGELOG**
73
+
74
+ ```markdown
75
+ ## [Unreleased]
76
+
77
+ ### Deprecated
78
+ - Old LSP tool naming (without `ultrapower:` prefix) will be removed in v8.0.0
79
+ - Users should migrate to new naming: `ultrapower:lsp_*`
80
+ ```
81
+
82
+ **Step 3: Verify no old naming in docs**
83
+
84
+ Run: `grep -r "ultrapower:lsp_diagnostics" docs/ README.md`
85
+ Expected: No matches (all should use `ultrapower:lsp_diagnostics`)
86
+
87
+ **Step 4: Commit**
88
+
89
+ ```bash
90
+ git add docs/ README.md CHANGELOG.md
91
+ git commit -m "docs: migrate LSP tool naming to ultrapower: prefix
92
+
93
+ Resolves TD-2: Prepare for v8.0.0 deprecation removal"
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Task 3: Add Windows Platform Compatibility Tests (TD-3)
99
+
100
+ **Priority:** P1 - Platform compatibility
101
+
102
+ **Files:**
103
+ - Create: `tests/platform/windows-atomic-write.test.ts`
104
+ - Modify: `src/lib/atomic-write.ts`
105
+
106
+ **Step 1: Create Windows-specific test file**
107
+
108
+ ```typescript
109
+ // tests/platform/windows-atomic-write.test.ts
110
+ import { describe, it, expect } from 'vitest';
111
+ import { atomicWriteJsonSyncWithRetry } from '../../src/lib/atomic-write';
112
+ import { existsSync, readFileSync } from 'node:fs';
113
+ import { join } from 'node:path';
114
+
115
+ describe.skipIf(process.platform !== 'win32')('Windows atomic write', () => {
116
+ it('should handle locked files gracefully', async () => {
117
+ const testPath = join(process.cwd(), '.test-windows-lock.json');
118
+ const data = { test: 'value' };
119
+
120
+ // Write should succeed even if file is temporarily locked
121
+ atomicWriteJsonSyncWithRetry(testPath, data);
122
+
123
+ expect(existsSync(testPath)).toBe(true);
124
+ const content = JSON.parse(readFileSync(testPath, 'utf-8'));
125
+ expect(content).toEqual(data);
126
+ });
127
+ });
128
+ ```
129
+
130
+ **Step 2: Run Windows tests**
131
+
132
+ Run: `npm test -- windows-atomic-write.test.ts`
133
+ Expected: Tests pass on Windows, skipped on other platforms
134
+
135
+ **Step 3: Document platform differences**
136
+
137
+ Add to `docs/standards/runtime-protection.md`:
138
+
139
+ ```markdown
140
+ ### Windows Platform Notes
141
+
142
+ - `renameSync` is not atomic when target file is locked
143
+ - Directory-level `fsync` silently fails
144
+ - Use `maxRetries` parameter in `atomicWriteJsonSyncWithRetry` for robustness
145
+ ```
146
+
147
+ **Step 4: Commit**
148
+
149
+ ```bash
150
+ git add tests/platform/windows-atomic-write.test.ts docs/standards/runtime-protection.md
151
+ git commit -m "test(platform): add Windows atomic write compatibility tests
152
+
153
+ Resolves TD-3: Windows platform compatibility validation"
154
+ ```
155
+
156
+ ---
157
+
158
+ ## Task 4: Unify Atomic Write Protection (TD-4)
159
+
160
+ **Priority:** P2 - Consistency and safety
161
+
162
+ **Files:**
163
+ - Modify: `src/hooks/subagent-tracker/index.ts`
164
+
165
+ **Step 1: Replace immediate write with atomic write**
166
+
167
+ ```typescript
168
+ // src/hooks/subagent-tracker/index.ts
169
+ import { atomicWriteJsonSyncWithRetry } from '../../lib/atomic-write';
170
+
171
+ // Replace this:
172
+ // writeFileSync(statePath, JSON.stringify(state, null, 2), "utf-8");
173
+
174
+ // With this:
175
+ atomicWriteJsonSyncWithRetry(statePath, state);
176
+ ```
177
+
178
+ **Step 2: Remove writeTrackingStateImmediate function**
179
+
180
+ Remove the `writeTrackingStateImmediate()` function entirely, replace all calls with `atomicWriteJsonSyncWithRetry`.
181
+
182
+ **Step 3: Run tests to verify no regressions**
183
+
184
+ Run: `npm test -- subagent-tracker`
185
+ Expected: All tests pass
186
+
187
+ **Step 4: Update difference documentation**
188
+
189
+ Remove D-07 from `docs/standards/runtime-protection.md` (no longer a difference).
190
+
191
+ **Step 5: Commit**
192
+
193
+ ```bash
194
+ git add src/hooks/subagent-tracker/index.ts docs/standards/runtime-protection.md
195
+ git commit -m "refactor(hooks): unify atomic write protection in subagent-tracker
196
+
197
+ Resolves TD-4: Remove immediate write bypass, use atomic write consistently"
198
+ ```
199
+
200
+ ---
201
+
202
+ ## Verification Checklist
203
+
204
+ After completing all tasks:
205
+
206
+ - [ ] All tests pass: `npm test`
207
+ - [ ] No TypeScript errors: `npm run build`
208
+ - [ ] No lint errors: `npm run lint`
209
+ - [ ] CI pipeline passes on GitHub Actions
210
+ - [ ] Documentation updated for all changes
211
+ - [ ] CHANGELOG.md includes all fixes
212
+
213
+ ---
214
+
215
+ ## Estimated Timeline
216
+
217
+ - Task 1 (P0): 30 minutes
218
+ - Task 2 (P1): 1 hour
219
+ - Task 3 (P1): 2 hours
220
+ - Task 4 (P2): 1 hour
221
+
222
+ **Total:** ~4.5 hours