dsh-vscode-mode 0.38.0 → 0.40.0

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 (66) hide show
  1. package/README.md +38 -33
  2. package/lib/client.js +87 -68
  3. package/lib/client.js.map +1 -1
  4. package/lib/index.js +11406 -4920
  5. package/lib/index.js.map +1 -1
  6. package/package.json +3 -2
  7. package/skills/dsh-vscodemode-html-plan/SKILL.md +44 -42
  8. package/skills/dsh-vscodemode-test-check/SKILL.md +82 -0
  9. package/src/archiveDb.ts +24 -0
  10. package/src/attachmentBytes.ts +84 -0
  11. package/src/client/htmlPlan/HtmlPlanModeChip.ts +181 -0
  12. package/src/client/htmlPlan/HtmlPlanPanel.ts +230 -61
  13. package/src/client/htmlPlan/planActions.ts +38 -8
  14. package/src/client/htmlPlan/planPage.ts +111 -9
  15. package/src/client/index.ts +9 -0
  16. package/src/client/openReceipt.ts +5 -2
  17. package/src/client/planBridge.ts +27 -2
  18. package/src/client/planState.ts +51 -4
  19. package/src/client/sidebar/panels/TestCheckPanel.ts +485 -0
  20. package/src/client/sidebar/panels/useTestCheckData.ts +414 -0
  21. package/src/client/sidebar/types.ts +2 -0
  22. package/src/client/state/diffSummary.ts +3 -0
  23. package/src/client/styles/editor.css +91 -0
  24. package/src/client/testCheck/TestCheckChip.ts +181 -0
  25. package/src/client/testCheck/TestCheckPanel.ts +339 -0
  26. package/src/client/testCheckPanelState.ts +173 -0
  27. package/src/client/ui/EditorView.ts +77 -7
  28. package/src/client/ui/McpSettings.ts +2 -2
  29. package/src/client/ui/OfficialReview.ts +6 -4
  30. package/src/htmlPlanAttachments.ts +4 -1
  31. package/src/htmlPlanCommand.ts +87 -235
  32. package/src/htmlPlanGuidance.ts +67 -0
  33. package/src/htmlPlanMode.ts +547 -0
  34. package/src/index.ts +28 -55
  35. package/src/officialCapture.ts +58 -9
  36. package/src/pending/externalCapture.ts +195 -401
  37. package/src/pending/kernel.ts +24 -1
  38. package/src/pending/persist.ts +109 -22
  39. package/src/pending/provenance.ts +5 -28
  40. package/src/pending/store.ts +109 -100
  41. package/src/pending/tracking.ts +81 -0
  42. package/src/pendingCompat.ts +26 -1
  43. package/src/pendingRpc.ts +8 -56
  44. package/src/planAutoPage.ts +306 -0
  45. package/src/planPagePack.ts +148 -0
  46. package/src/registry.ts +7 -2
  47. package/src/reviewDb.ts +1 -1
  48. package/src/reviewRpc.ts +14 -6
  49. package/src/rpc.ts +34 -0
  50. package/src/shared/htmlPlanMode.ts +26 -0
  51. package/src/shared/pendingReview.ts +15 -7
  52. package/src/shared/review.ts +5 -0
  53. package/src/shared/rpc.ts +53 -7
  54. package/src/shared/testCheck.ts +759 -0
  55. package/src/shared/testCheckHtml.ts +276 -0
  56. package/src/shared/testCheckPolicyDefault.ts +37 -0
  57. package/src/shared/testCheckSnippets.ts +197 -0
  58. package/src/store.ts +17 -1
  59. package/src/testCheckCommand.ts +287 -0
  60. package/src/testCheckGuidance.ts +79 -0
  61. package/src/testCheckMode.ts +654 -0
  62. package/src/testCheckPolicy.ts +141 -0
  63. package/src/testCheckRpc.ts +196 -0
  64. package/src/testCheckStore.ts +822 -0
  65. package/src/pending/externalAlign.ts +0 -297
  66. package/src/pending/vcs.ts +0 -584
@@ -89,6 +89,11 @@ export interface ReviewPage {
89
89
  pending: number
90
90
  nextCursor: number | null
91
91
  gaps: CaptureGap[]
92
+ /**
93
+ * 已被待审窗口接管过的路径(含已关窗条目,路径与身份两种写法):
94
+ * 客户端据此压住同路径的官方概览行与旧工具记录,保证关窗后不再复活。
95
+ */
96
+ pendingCoveredPaths?: string[]
92
97
  }
93
98
  export interface ReviewRequest { sessionId: string }
94
99
  export interface DecideReview extends ReviewRequest {
package/src/shared/rpc.ts CHANGED
@@ -30,9 +30,20 @@ import type { LoggerLevel } from './logger.js'
30
30
  import type { SvnViewRequest, SvnViewPayload } from './svnExplorer.js'
31
31
  import type { DecideReview, KeepAllItem, KeepAllResult, ReviewDetail, ReviewPage, ReviewRequest, UndoAllItem, UndoAllResult } from './review.js'
32
32
  import type {
33
- PendingDecide, PendingDetail, PendingHistoryMove, PendingImport,
33
+ PendingDecide, PendingDetail, PendingHistoryMove,
34
34
  PendingItem, PendingPage, PendingRemove, PendingRequest,
35
35
  } from './pendingReview.js'
36
+ import type { TestCheckSheetSummary, TestCheckView } from './testCheck.js'
37
+
38
+ /** 项目测试规范读写结果(三个 policy 方法共用)。 */
39
+ export interface TestCheckPolicyPayload {
40
+ /** 规范文件绝对路径(`<项目根>/.dsh/test-check/policy.md`)。 */
41
+ path: string
42
+ /** 当前生效正文(有文件用文件内容,否则默认规则;超 8 KB 已截断)。 */
43
+ text: string
44
+ /** true = 用的是默认规则(文件不存在或空白)。 */
45
+ isDefault: boolean
46
+ }
36
47
 
37
48
  /** webServer 精确路由。 */
38
49
  export const RPC_PATH = '/edrv/rpc'
@@ -390,10 +401,8 @@ export interface RpcRequestMap {
390
401
  'edrv.pending.detail': PendingRequest & { id: string }
391
402
  'edrv.pending.decide': PendingDecide
392
403
  'edrv.pending.remove': PendingRemove
393
- 'edrv.pending.refresh': PendingRequest & { id: string }
394
404
  'edrv.pending.history': PendingHistoryMove
395
- 'edrv.pending.import': PendingImport
396
- 'edrv.pending.align': PendingRequest & { includeUntracked?: boolean }
405
+ 'edrv.pending.align': PendingRequest
397
406
  'edrv.pending.purge': PendingRequest & { dryRun?: boolean; sources?: string[]; baseKinds?: string[]; before?: number }
398
407
  'edrv.pending.version': PendingRequest
399
408
  'edrv.list': { sessionId?: string; callIds?: string[]; skipStale?: boolean }
@@ -583,6 +592,34 @@ export interface RpcRequestMap {
583
592
  'edrv.uiState.get': { sessionId?: string }
584
593
  /** 界面状态镜像写入:把客户端改动过的 `edrv.*` 键增量同步到 host 文件。 */
585
594
  'edrv.uiState.set': UiStatePatchInput
595
+ /** HTML 计划模式:把计划正文渲染成独立 HTML 页(插件兜底页)。 */
596
+ 'edrv.planPage.render': { sessionId?: string; markdown: string }
597
+ /** HTML 计划模式:把作者页用技能 pack.mjs 打包成单文件 HTML(只写系统临时文件)。 */
598
+ 'edrv.planPage.pack': { sessionId?: string; path: string }
599
+ /** 测试验收模式:读派生视图(页签与 chip 轮询;force 跳过缓存)。 */
600
+ 'edrv.testCheck.get': { sessionId?: string; id?: string; force?: boolean }
601
+ /** 测试验收模式:手动上报一条结果(页签工具栏;summary 就是证据)。 */
602
+ 'edrv.testCheck.report': {
603
+ sessionId?: string
604
+ id: string
605
+ item: string
606
+ status: 'pass' | 'fail' | 'blocked' | 'skip'
607
+ summary: string
608
+ }
609
+ /** 测试验收模式:导出交付快照到 docs/acceptance-<id>.html。 */
610
+ 'edrv.testCheck.snapshot': { sessionId?: string; id: string }
611
+ /** 测试验收模式:读项目测试规范(有文件用文件,否则默认规则)。 */
612
+ 'edrv.testCheck.policy.get': { sessionId?: string }
613
+ /** 测试验收模式:保存项目测试规范(空文本=删除文件回默认)。 */
614
+ 'edrv.testCheck.policy.save': { sessionId?: string; text: string }
615
+ /** 测试验收模式:重置项目测试规范(删文件回默认)。 */
616
+ 'edrv.testCheck.policy.reset': { sessionId?: string }
617
+ /** 测试验收模式:读随包技能正文(面板只读展示)。 */
618
+ 'edrv.testCheck.skill': {}
619
+ /** 测试验收模式:列出项目内全部验收单与快照状态(force 跳过 30 秒列表缓存)。 */
620
+ 'edrv.testCheck.sheets': { sessionId?: string; force?: boolean }
621
+ /** 测试验收模式:删除一张验收单目录与对应快照。 */
622
+ 'edrv.testCheck.remove': { sessionId?: string; id: string }
586
623
  }
587
624
 
588
625
  export type RpcMethod = keyof RpcRequestMap
@@ -603,10 +640,8 @@ export interface RpcOkMap {
603
640
  'edrv.pending.detail': { detail: PendingDetail }
604
641
  'edrv.pending.decide': { item: PendingItem; wrote: boolean }
605
642
  'edrv.pending.remove': { removed: boolean }
606
- 'edrv.pending.refresh': { item: PendingItem }
607
643
  'edrv.pending.history': { item: PendingItem; wrote: boolean }
608
- 'edrv.pending.import': { imported: number; changes: number }
609
- 'edrv.pending.align': { imported: number; changed: number; gaps: string[] }
644
+ 'edrv.pending.align': { checked: number; folded: number; gaps: string[] }
610
645
  'edrv.pending.purge': { matched: number; removed: number; kept: number; vacuumMs?: number }
611
646
  'edrv.pending.version': { version: number }
612
647
  'edrv.list': { records: RecordView[] }
@@ -787,6 +822,17 @@ export interface RpcOkMap {
787
822
  'edrv.dap.command': object
788
823
  'edrv.uiState.get': UiStateSnapshot
789
824
  'edrv.uiState.set': object
825
+ 'edrv.planPage.render': { html: string }
826
+ 'edrv.planPage.pack': { html: string }
827
+ 'edrv.testCheck.get': { view: TestCheckView }
828
+ 'edrv.testCheck.report': { view: TestCheckView; filed: string }
829
+ 'edrv.testCheck.snapshot': { path: string; view: TestCheckView }
830
+ 'edrv.testCheck.policy.get': TestCheckPolicyPayload
831
+ 'edrv.testCheck.policy.save': TestCheckPolicyPayload
832
+ 'edrv.testCheck.policy.reset': TestCheckPolicyPayload
833
+ 'edrv.testCheck.skill': { name: string; path: string; content: string }
834
+ 'edrv.testCheck.sheets': { root: string; sheets: TestCheckSheetSummary[] }
835
+ 'edrv.testCheck.remove': { removed: string[] }
790
836
  }
791
837
 
792
838
  /** 缺失文件预览的稳定拒绝码:客户端据此显示「已删除」终态,而不是把错误原文当加载失败重试。 */