@cerbur/clutch-dsh-worktree 0.1.7 → 0.1.9

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 (159) hide show
  1. package/README.md +47 -32
  2. package/README.zh.md +39 -25
  3. package/lib/client/WorktreeContext.d.ts +1 -1
  4. package/lib/client/WorktreeContext.d.ts.map +1 -1
  5. package/lib/client/WorktreeContext.js +1 -1
  6. package/lib/client/WorktreeContext.js.map +1 -1
  7. package/lib/client/WorktreeHeroContext.d.ts.map +1 -1
  8. package/lib/client/WorktreeHeroContext.js +1 -1
  9. package/lib/client/WorktreeHeroContext.js.map +1 -1
  10. package/lib/client/WorktreeModeAction.d.ts.map +1 -1
  11. package/lib/client/WorktreeModeAction.js.map +1 -1
  12. package/lib/client/WorktreeSurface.d.ts +1 -1
  13. package/lib/client/WorktreeSurface.d.ts.map +1 -1
  14. package/lib/client/WorktreeSurface.js +245 -53
  15. package/lib/client/WorktreeSurface.js.map +1 -1
  16. package/lib/client/dsh-rc1-slot-contract.d.ts +43 -0
  17. package/lib/client/dsh-rc1-slot-contract.d.ts.map +1 -0
  18. package/lib/client/dsh-rc1-slot-contract.js +2 -0
  19. package/lib/client/dsh-rc1-slot-contract.js.map +1 -0
  20. package/lib/client/dsh-slot-contract.d.ts +43 -0
  21. package/lib/client/dsh-slot-contract.d.ts.map +1 -0
  22. package/lib/client/dsh-slot-contract.js +2 -0
  23. package/lib/client/dsh-slot-contract.js.map +1 -0
  24. package/lib/client/entry.d.ts +2 -2
  25. package/lib/client/entry.d.ts.map +1 -1
  26. package/lib/client/entry.js +144 -26
  27. package/lib/client/entry.js.map +1 -1
  28. package/lib/client/locales.d.ts +12 -0
  29. package/lib/client/locales.d.ts.map +1 -1
  30. package/lib/client/locales.js +12 -0
  31. package/lib/client/locales.js.map +1 -1
  32. package/lib/client/view-mode-store.d.ts +1 -1
  33. package/lib/client/view-mode-store.d.ts.map +1 -1
  34. package/lib/client/view-mode-store.js +1 -1
  35. package/lib/client/view-mode-store.js.map +1 -1
  36. package/lib/client/view-mode.d.ts +20 -6
  37. package/lib/client/view-mode.d.ts.map +1 -1
  38. package/lib/client/view-mode.js +35 -10
  39. package/lib/client/view-mode.js.map +1 -1
  40. package/lib/client/virtual-workspace-membership.d.ts +12 -10
  41. package/lib/client/virtual-workspace-membership.d.ts.map +1 -1
  42. package/lib/client/virtual-workspace-membership.js +82 -57
  43. package/lib/client/virtual-workspace-membership.js.map +1 -1
  44. package/lib/client/worktree-context-store.d.ts +7 -15
  45. package/lib/client/worktree-context-store.d.ts.map +1 -1
  46. package/lib/client/worktree-context-store.js +20 -13
  47. package/lib/client/worktree-context-store.js.map +1 -1
  48. package/lib/client/worktree-context.js +1 -1
  49. package/lib/client/worktree-context.js.map +1 -1
  50. package/lib/client/worktree-error-copy.d.ts.map +1 -1
  51. package/lib/client/worktree-error-copy.js +8 -0
  52. package/lib/client/worktree-error-copy.js.map +1 -1
  53. package/lib/client/worktree-expand-state.d.ts +5 -4
  54. package/lib/client/worktree-expand-state.d.ts.map +1 -1
  55. package/lib/client/worktree-expand-state.js.map +1 -1
  56. package/lib/client/worktree-session-fork.d.ts +18 -3
  57. package/lib/client/worktree-session-fork.d.ts.map +1 -1
  58. package/lib/client/worktree-session-fork.js +125 -36
  59. package/lib/client/worktree-session-fork.js.map +1 -1
  60. package/lib/client/worktree-session-order.d.ts +2 -2
  61. package/lib/client/worktree-session-order.d.ts.map +1 -1
  62. package/lib/client/worktree-session.d.ts.map +1 -1
  63. package/lib/client/worktree-session.js +3 -1
  64. package/lib/client/worktree-session.js.map +1 -1
  65. package/lib/client/worktree-surface-rows.d.ts.map +1 -1
  66. package/lib/client/worktree-surface-rows.js +8 -1
  67. package/lib/client/worktree-surface-rows.js.map +1 -1
  68. package/lib/client/worktree-surface-types.d.ts +19 -1
  69. package/lib/client/worktree-surface-types.d.ts.map +1 -1
  70. package/lib/client/worktree-view-read.d.ts +18 -8
  71. package/lib/client/worktree-view-read.d.ts.map +1 -1
  72. package/lib/client/worktree-view-read.js +75 -10
  73. package/lib/client/worktree-view-read.js.map +1 -1
  74. package/lib/client.js +1404 -178
  75. package/lib/client.js.map +1 -1
  76. package/lib/contract/index.d.ts +6 -2
  77. package/lib/contract/index.d.ts.map +1 -1
  78. package/lib/contract/index.js +4 -0
  79. package/lib/contract/index.js.map +1 -1
  80. package/lib/host/dsh-read-adapter.d.ts +1 -0
  81. package/lib/host/dsh-read-adapter.d.ts.map +1 -1
  82. package/lib/host/dsh-read-adapter.js +6 -0
  83. package/lib/host/dsh-read-adapter.js.map +1 -1
  84. package/lib/host/service.d.ts +2 -0
  85. package/lib/host/service.d.ts.map +1 -1
  86. package/lib/host/service.js +6 -1
  87. package/lib/host/service.js.map +1 -1
  88. package/lib/host/worktree-permission-manager.d.ts.map +1 -1
  89. package/lib/host/worktree-permission-manager.js +3 -1
  90. package/lib/host/worktree-permission-manager.js.map +1 -1
  91. package/lib/host/worktree-permission.d.ts +3 -2
  92. package/lib/host/worktree-permission.d.ts.map +1 -1
  93. package/lib/host/worktree-permission.js +29 -5
  94. package/lib/host/worktree-permission.js.map +1 -1
  95. package/lib/index.d.ts +2 -1
  96. package/lib/index.d.ts.map +1 -1
  97. package/lib/index.js +1 -0
  98. package/lib/index.js.map +1 -1
  99. package/lib/manage/manager-context.d.ts +2 -0
  100. package/lib/manage/manager-context.d.ts.map +1 -1
  101. package/lib/manage/manager-worktrees.d.ts +5 -0
  102. package/lib/manage/manager-worktrees.d.ts.map +1 -1
  103. package/lib/manage/manager-worktrees.js +130 -39
  104. package/lib/manage/manager-worktrees.js.map +1 -1
  105. package/lib/manage/manager.d.ts +20 -0
  106. package/lib/manage/manager.d.ts.map +1 -1
  107. package/lib/manage/manager.js +93 -13
  108. package/lib/manage/manager.js.map +1 -1
  109. package/lib/manage/types.d.ts +9 -1
  110. package/lib/manage/types.d.ts.map +1 -1
  111. package/lib/provider/git.d.ts +37 -9
  112. package/lib/provider/git.d.ts.map +1 -1
  113. package/lib/provider/git.js +166 -61
  114. package/lib/provider/git.js.map +1 -1
  115. package/lib/provider/index.d.ts +5 -1
  116. package/lib/provider/index.d.ts.map +1 -1
  117. package/lib/provider/index.js +4 -0
  118. package/lib/provider/index.js.map +1 -1
  119. package/lib/provider/mutation-lock.d.ts +37 -0
  120. package/lib/provider/mutation-lock.d.ts.map +1 -0
  121. package/lib/provider/mutation-lock.js +270 -0
  122. package/lib/provider/mutation-lock.js.map +1 -0
  123. package/lib/provider/mutation-token.d.ts +8 -0
  124. package/lib/provider/mutation-token.d.ts.map +1 -0
  125. package/lib/provider/mutation-token.js +20 -0
  126. package/lib/provider/mutation-token.js.map +1 -0
  127. package/lib/provider/repository-fingerprint.d.ts +8 -0
  128. package/lib/provider/repository-fingerprint.d.ts.map +1 -0
  129. package/lib/provider/repository-fingerprint.js +13 -0
  130. package/lib/provider/repository-fingerprint.js.map +1 -0
  131. package/lib/provider/sidecar-persistence.d.ts +7 -3
  132. package/lib/provider/sidecar-persistence.d.ts.map +1 -1
  133. package/lib/provider/sidecar-persistence.js +118 -44
  134. package/lib/provider/sidecar-persistence.js.map +1 -1
  135. package/lib/provider/sidecar-schema.d.ts +1 -1
  136. package/lib/provider/sidecar-schema.d.ts.map +1 -1
  137. package/lib/provider/sidecar-schema.js +140 -8
  138. package/lib/provider/sidecar-schema.js.map +1 -1
  139. package/lib/provider/sidecar.d.ts +3 -1
  140. package/lib/provider/sidecar.d.ts.map +1 -1
  141. package/lib/provider/sidecar.js +7 -2
  142. package/lib/provider/sidecar.js.map +1 -1
  143. package/lib/provider/subprocess.d.ts +37 -0
  144. package/lib/provider/subprocess.d.ts.map +1 -0
  145. package/lib/provider/subprocess.js +327 -0
  146. package/lib/provider/subprocess.js.map +1 -0
  147. package/lib/provider/transaction.d.ts +65 -0
  148. package/lib/provider/transaction.d.ts.map +1 -0
  149. package/lib/provider/transaction.js +1011 -0
  150. package/lib/provider/transaction.js.map +1 -0
  151. package/lib/provider/types.d.ts +98 -7
  152. package/lib/provider/types.d.ts.map +1 -1
  153. package/lib/provider/types.js +1 -1
  154. package/lib/provider/types.js.map +1 -1
  155. package/lib/typert.host.js +29 -25
  156. package/lib/typert.remote-client.d.ts +2 -2
  157. package/lib/typert.remote-client.d.ts.map +1 -1
  158. package/lib/typert.remote-client.js +29 -25
  159. package/package.json +48 -32
@@ -1,6 +1,14 @@
1
- import type { GitWorktreeAdapter, GitWorktreeInfo } from './types.js';
2
- interface LocalGitAdapterOptions {
1
+ import type { GitCommandOptions, GitBranchWorktreeInfo, GitSubprocessRuntime, GitWorktreeAdapter, GitWorktreeInfo } from './types.js';
2
+ export interface LocalGitAdapterOptions extends GitCommandOptions {
3
3
  readonly executable?: string;
4
+ /** Test/embedded-runtime prefix; the normal Git executable needs no prefix. */
5
+ readonly executableArgs?: readonly string[];
6
+ readonly timeoutMs?: number;
7
+ readonly graceMs?: number;
8
+ /** Bounded best-effort wait after terminating a Git subprocess tree. */
9
+ readonly cleanupTimeoutMs?: number;
10
+ readonly maxOutputBytes?: number;
11
+ readonly subprocess?: GitSubprocessRuntime;
4
12
  }
5
13
  /**
6
14
  * 本地 Git worktree adapter:所有命令都以 DSH Workspace 根目录为 cwd,并仅使用固定的
@@ -12,39 +20,59 @@ interface LocalGitAdapterOptions {
12
20
  */
13
21
  export declare class LocalGitAdapter implements GitWorktreeAdapter {
14
22
  private readonly executable;
23
+ private readonly executableArgs;
24
+ private readonly timeoutMs;
25
+ private readonly graceMs;
26
+ private readonly cleanupTimeoutMs;
27
+ private readonly maxOutputBytes;
28
+ private readonly defaultSignal?;
29
+ private readonly subprocess?;
15
30
  constructor(options?: LocalGitAdapterOptions);
31
+ private run;
16
32
  /**
17
33
  * 分开验证“位于非 bare working tree”和“已有可解析的首个 commit”,以返回不同修复语义。
18
34
  * Separately verifies “inside a non-bare working tree” and “has a resolvable
19
35
  * initial commit” so callers receive distinct repair semantics.
20
36
  */
21
- validateRepository(workspaceRoot: string): Promise<void>;
37
+ validateRepository(workspaceRoot: string, options?: GitCommandOptions): Promise<void>;
22
38
  /** Resolve the Git worktree/repository root for repository-wide reads. */
23
- resolveRepositoryRoot(workspaceRoot: string): Promise<string>;
39
+ resolveRepositoryRoot(workspaceRoot: string, options?: GitCommandOptions): Promise<string>;
40
+ /** Resolve the canonical linked-worktree and shared Git metadata identity. */
41
+ resolveRepositoryIdentity(workspaceRoot: string, options?: GitCommandOptions): Promise<{
42
+ identity: {
43
+ topLevel: string;
44
+ commonDirectory: string;
45
+ };
46
+ headCommit: string;
47
+ }>;
24
48
  /**
25
49
  * 仅列出 `refs/heads/` 下的本地分支;NUL 分隔避免依赖面向人的展示格式或空白切分。
26
50
  * Lists local branches under `refs/heads/` only; NUL delimiting avoids
27
51
  * depending on human-facing formatting or whitespace tokenization.
28
52
  */
29
- listBranches(workspaceRoot: string): Promise<readonly string[]>;
53
+ listBranches(workspaceRoot: string, options?: GitCommandOptions): Promise<readonly string[]>;
54
+ /**
55
+ * Read local branches and their checkout paths in one Git invocation when the
56
+ * installed Git supports the `worktreepath` format atom.
57
+ */
58
+ listBranchesWithWorktreePaths(workspaceRoot: string, options?: GitCommandOptions): Promise<readonly GitBranchWorktreeInfo[]>;
30
59
  /**
31
60
  * 使用 porcelain 输出枚举已注册 Worktree;无法映射到本地 branch 的条目不会被丢弃。
32
61
  * Enumerates registered Worktrees through porcelain output; entries that do
33
62
  * not map to a local branch are not discarded.
34
63
  */
35
- listWorktrees(workspaceRoot: string): Promise<readonly GitWorktreeInfo[]>;
64
+ listWorktrees(workspaceRoot: string, options?: GitCommandOptions): Promise<readonly GitWorktreeInfo[]>;
36
65
  /**
37
66
  * 执行 `git worktree add`;传入 newBranch 时使用 `-b` 从 base branch 创建本地分支。
38
67
  * Executes `git worktree add`; when newBranch is supplied, `-b` creates a local
39
68
  * branch from the selected base branch.
40
69
  */
41
- createWorktree(workspaceRoot: string, targetPath: string, branch: string, newBranch?: string): Promise<void>;
70
+ createWorktree(workspaceRoot: string, targetPath: string, branch: string, newBranch?: string, options?: GitCommandOptions): Promise<void>;
42
71
  /**
43
72
  * 仅执行非强制 `git worktree remove <targetPath>`;Git 的安全拒绝会原样升级为显式错误。
44
73
  * Executes non-forced `git worktree remove <targetPath>` only; Git safety
45
74
  * refusals are surfaced as explicit errors.
46
75
  */
47
- removeWorktree(workspaceRoot: string, targetPath: string): Promise<void>;
76
+ removeWorktree(workspaceRoot: string, targetPath: string, options?: GitCommandOptions): Promise<void>;
48
77
  }
49
- export {};
50
78
  //# sourceMappingURL=git.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/provider/git.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAUtE,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAoLD;;;;;;;GAOG;AACH,qBAAa,eAAgB,YAAW,kBAAkB;IACxD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;gBAExB,OAAO,GAAE,sBAA2B;IAIhD;;;;OAIG;IACG,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA+C9D,0EAA0E;IACpE,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAuBnE;;;;OAIG;IACG,YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC;IAgBrE;;;;OAIG;IACG,aAAa,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC;IAa/E;;;;OAIG;IACG,cAAc,CAClB,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC;IAWhB;;;;OAIG;IACG,cAAc,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a,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiD/F,0EAA0E;IACpE,qBAAqB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC;IAuBpG,8EAA8E;IACxE,yBAAyB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB;;;;;;;IA+BtF;;;;OAIG;IACG,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC;IAgBtG;;;OAGG;IACG,6BAA6B,CACjC,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,SAAS,qBAAqB,EAAE,CAAC;IA4B5C;;;;OAIG;IACG,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC;IAahH;;;;OAIG;IACG,cAAc,CAClB,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC;IAWhB;;;;OAIG;IACG,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;CAOhH"}
@@ -1,59 +1,34 @@
1
- import { execFile as execFileCallback } from 'node:child_process';
1
+ import { realpath } from 'node:fs/promises';
2
2
  import path from 'node:path';
3
- import { promisify } from 'node:util';
3
+ import { GitCommandError, runGit, } from './subprocess.js';
4
4
  import { WorktreeProviderError, providerError } from './types.js';
5
- const execFile = promisify(execFileCallback);
6
- // Git 的原始进程证据只在本模块内流转;对外统一转换为稳定的 Provider 错误词汇。
7
- // Raw Git process evidence stays inside this module and is normalized to the
8
- // stable Provider error vocabulary at the public boundary.
9
- class GitCommandError extends Error {
10
- args;
11
- cwd;
12
- stdout;
13
- stderr;
14
- exitCode;
15
- constructor(args, cwd, stdout, stderr, exitCode) {
16
- super(stderr || stdout || `git exited with ${String(exitCode)}`);
17
- this.name = 'GitCommandError';
18
- this.args = args;
19
- this.cwd = cwd;
20
- this.stdout = stdout;
21
- this.stderr = stderr;
22
- this.exitCode = exitCode;
23
- }
24
- }
25
- /*
26
- * 所有 Git 调用都使用参数数组和配置好的 executable,不经过 shell;因此路径或分支中的 shell
27
- * 元字符不会被解释。参数的业务合法性仍由上层 Manage 校验。
28
- *
29
- * Every Git call uses an argument vector and a configured executable without a
30
- * shell, so shell metacharacters in paths or branches are never evaluated.
31
- * Semantic validation of those values remains the responsibility of Manage.
32
- */
33
- async function runGit(args, cwd, executable) {
34
- try {
35
- const result = await execFile(executable, [...args], {
36
- cwd,
37
- encoding: 'utf8',
38
- maxBuffer: 4 * 1024 * 1024,
39
- });
40
- return { stdout: result.stdout, stderr: result.stderr };
41
- }
42
- catch (error) {
43
- const commandError = error;
44
- throw new GitCommandError(args, cwd, commandError.stdout ?? '', commandError.stderr ?? '', commandError.code ?? null);
45
- }
46
- }
5
+ const DEFAULT_TIMEOUT_MS = 30_000;
6
+ const DEFAULT_GRACE_MS = 1_000;
7
+ const DEFAULT_CLEANUP_TIMEOUT_MS = 5_000;
8
+ const DEFAULT_MAX_OUTPUT_BYTES = 4 * 1024 * 1024;
9
+ const MAX_TIMEOUT_MS = 2_147_483_647;
10
+ const MAX_GRACE_MS = 2_147_483_647;
11
+ const MAX_DIAGNOSTIC_BYTES = 32 * 1024;
47
12
  // 保留 cwd、参数、stdout、stderr 和退出码,避免稳定错误 code 丢失现场诊断信息。
48
13
  // Preserve cwd, arguments, stdout, stderr, and exit code so a stable error code
49
14
  // does not discard the evidence needed for diagnosis.
15
+ function boundedDiagnostic(value) {
16
+ return value.length <= MAX_DIAGNOSTIC_BYTES
17
+ ? value
18
+ : `${value.slice(0, MAX_DIAGNOSTIC_BYTES)}\n[diagnostic output truncated]`;
19
+ }
50
20
  function gitDetails(error) {
51
21
  return {
52
22
  workspaceRoot: error.cwd,
53
23
  gitArgs: error.args,
54
- gitStdout: error.stdout,
55
- gitStderr: error.stderr,
24
+ gitStdout: boundedDiagnostic(error.stdout),
25
+ gitStderr: boundedDiagnostic(error.stderr),
56
26
  gitExitCode: typeof error.exitCode === 'number' ? error.exitCode : String(error.exitCode),
27
+ ...(error.timedOut ? { gitTimedOut: true } : {}),
28
+ ...(error.aborted ? { gitAborted: true } : {}),
29
+ ...(error.outputTruncated ? { gitOutputTruncated: true } : {}),
30
+ ...(error.processTreeDidNotExit ? { gitProcessTreeDidNotExit: true } : {}),
31
+ ...(error.signal ? { gitSignal: error.signal } : {}),
57
32
  };
58
33
  }
59
34
  function isMissingGit(error) {
@@ -110,6 +85,8 @@ function parseWorktrees(output) {
110
85
  worktrees.push({
111
86
  absolutePath: current.absolutePath,
112
87
  ...(current.branch ? { branch: current.branch } : {}),
88
+ ...(current.headCommit ? { headCommit: current.headCommit } : {}),
89
+ detached: current.detached ?? !current.branch,
113
90
  });
114
91
  }
115
92
  current = {};
@@ -126,11 +103,39 @@ function parseWorktrees(output) {
126
103
  }
127
104
  if (line.startsWith('branch refs/heads/')) {
128
105
  current.branch = line.slice('branch refs/heads/'.length);
106
+ current.detached = false;
107
+ continue;
108
+ }
109
+ if (line.startsWith('HEAD ')) {
110
+ current.headCommit = line.slice('HEAD '.length);
111
+ continue;
112
+ }
113
+ if (line === 'detached') {
114
+ current.detached = true;
129
115
  }
130
116
  }
131
117
  flush();
132
118
  return worktrees;
133
119
  }
120
+ /** Parse `for-each-ref` branch/path pairs without relying on whitespace delimiters. */
121
+ function parseBranchWorktreePaths(output) {
122
+ const fields = output.split('\0');
123
+ const branches = [];
124
+ for (let index = 0; index + 1 < fields.length; index += 2) {
125
+ const name = (fields[index] ?? '').replace(/^\r?\n/u, '');
126
+ const worktreePath = fields[index + 1] ?? '';
127
+ if (!name)
128
+ continue;
129
+ branches.push({
130
+ name,
131
+ ...(worktreePath ? { worktreePath } : {}),
132
+ });
133
+ }
134
+ return branches;
135
+ }
136
+ function isUnsupportedWorktreePathAtom(error) {
137
+ return error instanceof GitCommandError && /unknown field name:\s*worktreepath/iu.test(error.stderr);
138
+ }
134
139
  /**
135
140
  * 本地 Git worktree adapter:所有命令都以 DSH Workspace 根目录为 cwd,并仅使用固定的
136
141
  * 本地子命令;不使用 `--force`,也不访问 remote。
@@ -141,24 +146,66 @@ function parseWorktrees(output) {
141
146
  */
142
147
  export class LocalGitAdapter {
143
148
  executable;
149
+ executableArgs;
150
+ timeoutMs;
151
+ graceMs;
152
+ cleanupTimeoutMs;
153
+ maxOutputBytes;
154
+ defaultSignal;
155
+ subprocess;
144
156
  constructor(options = {}) {
145
157
  this.executable = options.executable ?? 'git';
158
+ this.executableArgs = options.executableArgs ?? [];
159
+ this.timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
160
+ this.graceMs = options.graceMs ?? DEFAULT_GRACE_MS;
161
+ this.cleanupTimeoutMs = options.cleanupTimeoutMs ?? Math.max(DEFAULT_CLEANUP_TIMEOUT_MS, this.graceMs);
162
+ this.maxOutputBytes = options.maxOutputBytes ?? DEFAULT_MAX_OUTPUT_BYTES;
163
+ this.defaultSignal = options.signal;
164
+ this.subprocess = options.subprocess;
165
+ if (!Number.isInteger(this.timeoutMs) || this.timeoutMs <= 0 || this.timeoutMs > MAX_TIMEOUT_MS ||
166
+ !Number.isInteger(this.graceMs) || this.graceMs <= 0 || this.graceMs > MAX_GRACE_MS ||
167
+ !Number.isInteger(this.cleanupTimeoutMs) || this.cleanupTimeoutMs <= 0 || this.cleanupTimeoutMs > MAX_TIMEOUT_MS ||
168
+ !Number.isInteger(this.maxOutputBytes) || this.maxOutputBytes <= 0) {
169
+ throw providerError('GIT_OPERATION_FAILED', 'Invalid Git subprocess limits', {
170
+ timeoutMs: this.timeoutMs,
171
+ graceMs: this.graceMs,
172
+ cleanupTimeoutMs: this.cleanupTimeoutMs,
173
+ maxOutputBytes: this.maxOutputBytes,
174
+ });
175
+ }
176
+ }
177
+ run(args, cwd, options = {}, readOnly = true) {
178
+ const signal = options.signal ?? this.defaultSignal;
179
+ if (signal?.aborted) {
180
+ return Promise.reject(new GitCommandError(args, cwd, '', '', null, { timedOut: false, aborted: true, outputTruncated: false }));
181
+ }
182
+ return runGit(args, cwd, this.executable, this.executableArgs, {
183
+ timeoutMs: this.timeoutMs,
184
+ graceMs: this.graceMs,
185
+ cleanupTimeoutMs: this.cleanupTimeoutMs,
186
+ maxOutputBytes: this.maxOutputBytes,
187
+ readOnly,
188
+ signal: options.signal ?? this.defaultSignal,
189
+ subprocess: this.subprocess,
190
+ });
146
191
  }
147
192
  /**
148
193
  * 分开验证“位于非 bare working tree”和“已有可解析的首个 commit”,以返回不同修复语义。
149
194
  * Separately verifies “inside a non-bare working tree” and “has a resolvable
150
195
  * initial commit” so callers receive distinct repair semantics.
151
196
  */
152
- async validateRepository(workspaceRoot) {
197
+ async validateRepository(workspaceRoot, options = {}) {
153
198
  let result;
154
199
  try {
155
- result = await runGit(['rev-parse', '--is-inside-work-tree'], workspaceRoot, this.executable);
200
+ result = await this.run(['rev-parse', '--is-inside-work-tree'], workspaceRoot, options);
156
201
  }
157
202
  catch (error) {
158
203
  if (error instanceof GitCommandError) {
159
204
  if (isMissingGit(error)) {
160
205
  throw missingGitError('validate repository', error);
161
206
  }
207
+ if (error.timedOut || error.aborted)
208
+ throw operationError('validate repository', workspaceRoot, undefined, undefined, error);
162
209
  throw providerError('WORKSPACE_NOT_GIT_REPOSITORY', `Workspace is not a Git repository: ${workspaceRoot}`, {
163
210
  ...gitDetails(error),
164
211
  });
@@ -171,22 +218,24 @@ export class LocalGitAdapter {
171
218
  });
172
219
  }
173
220
  try {
174
- await runGit(['rev-parse', '--verify', 'HEAD^{commit}'], workspaceRoot, this.executable);
221
+ await this.run(['rev-parse', '--verify', 'HEAD^{commit}'], workspaceRoot, options);
175
222
  }
176
223
  catch (error) {
177
224
  if (error instanceof GitCommandError) {
178
225
  if (isMissingGit(error)) {
179
226
  throw missingGitError('validate repository', error);
180
227
  }
228
+ if (error.timedOut || error.aborted)
229
+ throw operationError('validate repository', workspaceRoot, undefined, undefined, error);
181
230
  throw providerError('WORKTREE_REQUIRES_INITIAL_COMMIT', `Workspace has no initial commit: ${workspaceRoot}`, { ...gitDetails(error) });
182
231
  }
183
232
  throw error;
184
233
  }
185
234
  }
186
235
  /** Resolve the Git worktree/repository root for repository-wide reads. */
187
- async resolveRepositoryRoot(workspaceRoot) {
236
+ async resolveRepositoryRoot(workspaceRoot, options = {}) {
188
237
  try {
189
- const rootResult = await runGit(['rev-parse', '--show-toplevel'], workspaceRoot, this.executable);
238
+ const rootResult = await this.run(['rev-parse', '--show-toplevel'], workspaceRoot, options);
190
239
  const repositoryRoot = rootResult.stdout.trim();
191
240
  if (repositoryRoot.length === 0) {
192
241
  throw providerError('GIT_OPERATION_FAILED', `Git did not return a repository root: ${workspaceRoot}`, {
@@ -194,9 +243,9 @@ export class LocalGitAdapter {
194
243
  operation: 'resolve repository root',
195
244
  });
196
245
  }
197
- return path.isAbsolute(repositoryRoot)
246
+ return await realpath(path.isAbsolute(repositoryRoot)
198
247
  ? path.resolve(repositoryRoot)
199
- : path.resolve(workspaceRoot, repositoryRoot);
248
+ : path.resolve(workspaceRoot, repositoryRoot));
200
249
  }
201
250
  catch (error) {
202
251
  if (error instanceof WorktreeProviderError)
@@ -204,14 +253,44 @@ export class LocalGitAdapter {
204
253
  throw operationError('resolve repository root', workspaceRoot, undefined, undefined, error);
205
254
  }
206
255
  }
256
+ /** Resolve the canonical linked-worktree and shared Git metadata identity. */
257
+ async resolveRepositoryIdentity(workspaceRoot, options = {}) {
258
+ try {
259
+ const result = await this.run(['rev-parse', '--show-toplevel', '--git-common-dir', '--verify', 'HEAD^{commit}'], workspaceRoot, options);
260
+ const lines = result.stdout.split(/\r?\n/u);
261
+ if (lines.at(-1) === '')
262
+ lines.pop();
263
+ const [topLevel, commonDirectory, headCommit] = lines;
264
+ if (!topLevel || !commonDirectory || !headCommit) {
265
+ throw providerError('GIT_OPERATION_FAILED', `Git returned an incomplete repository identity: ${workspaceRoot}`, {
266
+ workspaceRoot,
267
+ operation: 'resolve repository identity',
268
+ });
269
+ }
270
+ return {
271
+ identity: {
272
+ topLevel: await realpath(path.isAbsolute(topLevel) ? path.resolve(topLevel) : path.resolve(workspaceRoot, topLevel)),
273
+ commonDirectory: await realpath(path.isAbsolute(commonDirectory)
274
+ ? path.resolve(commonDirectory)
275
+ : path.resolve(workspaceRoot, commonDirectory)),
276
+ },
277
+ headCommit,
278
+ };
279
+ }
280
+ catch (error) {
281
+ if (error instanceof WorktreeProviderError)
282
+ throw error;
283
+ throw operationError('resolve repository identity', workspaceRoot, undefined, undefined, error);
284
+ }
285
+ }
207
286
  /**
208
287
  * 仅列出 `refs/heads/` 下的本地分支;NUL 分隔避免依赖面向人的展示格式或空白切分。
209
288
  * Lists local branches under `refs/heads/` only; NUL delimiting avoids
210
289
  * depending on human-facing formatting or whitespace tokenization.
211
290
  */
212
- async listBranches(workspaceRoot) {
291
+ async listBranches(workspaceRoot, options = {}) {
213
292
  try {
214
- const result = await runGit(['for-each-ref', '--format=%(refname:short)%00', 'refs/heads/'], workspaceRoot, this.executable);
293
+ const result = await this.run(['for-each-ref', '--format=%(refname:short)%00', 'refs/heads/'], workspaceRoot, options);
215
294
  return result.stdout
216
295
  .split('\0')
217
296
  .map((branch) => branch.replace(/^\r?\n/, '').replace(/\r?\n$/, ''))
@@ -221,14 +300,40 @@ export class LocalGitAdapter {
221
300
  throw operationError('list branches', workspaceRoot, undefined, undefined, error);
222
301
  }
223
302
  }
303
+ /**
304
+ * Read local branches and their checkout paths in one Git invocation when the
305
+ * installed Git supports the `worktreepath` format atom.
306
+ */
307
+ async listBranchesWithWorktreePaths(workspaceRoot, options = {}) {
308
+ try {
309
+ const result = await this.run(['for-each-ref', '--format=%(refname:short)%00%(worktreepath)%00', 'refs/heads/'], workspaceRoot, options);
310
+ return parseBranchWorktreePaths(result.stdout);
311
+ }
312
+ catch (error) {
313
+ if (!isUnsupportedWorktreePathAtom(error)) {
314
+ throw operationError('list branches', workspaceRoot, undefined, undefined, error);
315
+ }
316
+ const [branches, worktrees] = await Promise.all([
317
+ this.listBranches(workspaceRoot, options),
318
+ this.listWorktrees(workspaceRoot, options),
319
+ ]);
320
+ const worktreePathByBranch = new Map(worktrees.flatMap((worktree) => worktree.branch
321
+ ? [[worktree.branch, worktree.absolutePath]]
322
+ : []));
323
+ return branches.map((name) => ({
324
+ name,
325
+ ...(worktreePathByBranch.has(name) ? { worktreePath: worktreePathByBranch.get(name) } : {}),
326
+ }));
327
+ }
328
+ }
224
329
  /**
225
330
  * 使用 porcelain 输出枚举已注册 Worktree;无法映射到本地 branch 的条目不会被丢弃。
226
331
  * Enumerates registered Worktrees through porcelain output; entries that do
227
332
  * not map to a local branch are not discarded.
228
333
  */
229
- async listWorktrees(workspaceRoot) {
334
+ async listWorktrees(workspaceRoot, options = {}) {
230
335
  try {
231
- const result = await runGit(['worktree', 'list', '--porcelain'], workspaceRoot, this.executable);
336
+ const result = await this.run(['worktree', 'list', '--porcelain'], workspaceRoot, options);
232
337
  return parseWorktrees(result.stdout);
233
338
  }
234
339
  catch (error) {
@@ -240,12 +345,12 @@ export class LocalGitAdapter {
240
345
  * Executes `git worktree add`; when newBranch is supplied, `-b` creates a local
241
346
  * branch from the selected base branch.
242
347
  */
243
- async createWorktree(workspaceRoot, targetPath, branch, newBranch) {
348
+ async createWorktree(workspaceRoot, targetPath, branch, newBranch, options = {}) {
244
349
  try {
245
350
  const args = newBranch
246
351
  ? ['worktree', 'add', '-b', newBranch, targetPath, branch]
247
352
  : ['worktree', 'add', targetPath, branch];
248
- await runGit(args, workspaceRoot, this.executable);
353
+ await this.run(args, workspaceRoot, options, false);
249
354
  }
250
355
  catch (error) {
251
356
  throw operationError('create worktree', workspaceRoot, targetPath, newBranch ?? branch, error);
@@ -256,9 +361,9 @@ export class LocalGitAdapter {
256
361
  * Executes non-forced `git worktree remove <targetPath>` only; Git safety
257
362
  * refusals are surfaced as explicit errors.
258
363
  */
259
- async removeWorktree(workspaceRoot, targetPath) {
364
+ async removeWorktree(workspaceRoot, targetPath, options = {}) {
260
365
  try {
261
- await runGit(['worktree', 'remove', targetPath], workspaceRoot, this.executable);
366
+ await this.run(['worktree', 'remove', targetPath], workspaceRoot, options, false);
262
367
  }
263
368
  catch (error) {
264
369
  throw operationError('remove worktree', workspaceRoot, targetPath, undefined, error);
@@ -1 +1 @@
1
- {"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/provider/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAElE,MAAM,QAAQ,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAAC;AAW7C,gDAAgD;AAChD,6EAA6E;AAC7E,2DAA2D;AAC3D,MAAM,eAAgB,SAAQ,KAAK;IACxB,IAAI,CAAoB;IACxB,GAAG,CAAS;IACZ,MAAM,CAAS;IACf,MAAM,CAAS;IACf,QAAQ,CAAyB;IAE1C,YACE,IAAuB,EACvB,GAAW,EACX,MAAc,EACd,MAAc,EACd,QAAgC;QAEhC,KAAK,CAAC,MAAM,IAAI,MAAM,IAAI,mBAAmB,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACjE,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf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AAE,OAAO,EAAE,KAAK,CAAC,CAAC;QACpF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,cAAc,CAAC,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;QACvF,CAAC;IACH,CAAC;CACF"}
@@ -9,5 +9,9 @@
9
9
  export { LocalGitAdapter } from './git.js';
10
10
  export { WorkspaceShardedSidecarRepository, validateSidecarSnapshot, } from './sidecar.js';
11
11
  export { SIDECAR_SCHEMA_VERSION, LEGACY_SIDECAR_SCHEMA_VERSION, WorktreeProviderError, isWorktreeProviderError, providerError, } from './types.js';
12
- export type { DshReadAdapter, DshSessionSummary, DshWorkspaceSummary, GitWorktreeAdapter, GitWorktreeInfo, SidecarMutation, SidecarSnapshot, SidecarStore, } from './types.js';
12
+ export { CrossProcessMutationLock } from './mutation-lock.js';
13
+ export { createWorktreeMutationToken } from './mutation-token.js';
14
+ export { createRepositoryFingerprint } from './repository-fingerprint.js';
15
+ export { WorktreeMutationTransaction } from './transaction.js';
16
+ export type { DshReadAdapter, DshSessionSummary, DshWorkspaceSummary, GitBranchWorktreeInfo, GitCommandOptions, GitSubprocessRuntime, GitWorktreeAdapter, GitRepositoryInspection, GitWorktreeInfo, LockedSidecarStore, PendingOperation, RecoveryIssue, RepositoryIdentity, SidecarMutation, SidecarSnapshot, SidecarStore, } from './types.js';
13
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EACL,iCAAiC,EACjC,uBAAuB,GACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,YAAY,GACb,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EACL,iCAAiC,EACjC,uBAAuB,GACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,YAAY,EACV,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,YAAY,GACb,MAAM,YAAY,CAAC"}
@@ -9,4 +9,8 @@
9
9
  export { LocalGitAdapter } from './git.js';
10
10
  export { WorkspaceShardedSidecarRepository, validateSidecarSnapshot, } from './sidecar.js';
11
11
  export { SIDECAR_SCHEMA_VERSION, LEGACY_SIDECAR_SCHEMA_VERSION, WorktreeProviderError, isWorktreeProviderError, providerError, } from './types.js';
12
+ export { CrossProcessMutationLock } from './mutation-lock.js';
13
+ export { createWorktreeMutationToken } from './mutation-token.js';
14
+ export { createRepositoryFingerprint } from './repository-fingerprint.js';
15
+ export { WorktreeMutationTransaction } from './transaction.js';
12
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EACL,iCAAiC,EACjC,uBAAuB,GACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,GACd,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EACL,iCAAiC,EACjC,uBAAuB,GACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,37 @@
1
+ export interface MutationLockOptions {
2
+ readonly acquisitionTimeoutMs?: number;
3
+ readonly leaseMs?: number;
4
+ readonly heartbeatMs?: number;
5
+ }
6
+ export interface MutationLockHandle {
7
+ readonly keyHash: string;
8
+ assertHeld(): void;
9
+ release(): Promise<void>;
10
+ }
11
+ /**
12
+ * A small cross-process lease lock backed by an atomically-created directory.
13
+ * An owned directory is never reclaimed based on age alone: its stale owner
14
+ * must also be provably dead on the same host. An ownerless directory is only
15
+ * possible during interrupted lock acquisition, so it can be reclaimed after
16
+ * one lease interval without stealing an alive Git operation.
17
+ */
18
+ export declare class CrossProcessMutationLock {
19
+ readonly lockRoot: string;
20
+ private readonly acquisitionTimeoutMs;
21
+ private readonly leaseMs;
22
+ private readonly heartbeatMs;
23
+ constructor({ lockRoot, acquisitionTimeoutMs, leaseMs, heartbeatMs, }: MutationLockOptions & {
24
+ readonly lockRoot: string;
25
+ });
26
+ getLockPath(key: string): string;
27
+ run<T>(key: string, operation: (handle: MutationLockHandle) => Promise<T>): Promise<T>;
28
+ private acquire;
29
+ private reclaimIfDead;
30
+ private abandon;
31
+ }
32
+ export declare const MUTATION_LOCK_DEFAULTS: Readonly<{
33
+ acquisitionTimeoutMs: 10000;
34
+ leaseMs: 30000;
35
+ heartbeatMs: 5000;
36
+ }>;
37
+ //# sourceMappingURL=mutation-lock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutation-lock.d.ts","sourceRoot":"","sources":["../../src/provider/mutation-lock.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,UAAU,IAAI,IAAI,CAAC;IACnB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAmDD;;;;;;GAMG;AACH,qBAAa,wBAAwB;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAS;IAC9C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,EACV,QAAQ,EACR,oBAAqD,EACrD,OAA0B,EAC1B,WAAkC,GACnC,EAAE,mBAAmB,GAAG;QAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KAAE;IAiBtD,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAK1B,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;YAS9E,OAAO;YAgHP,aAAa;YA+Bb,OAAO;CAetB;AAED,eAAO,MAAM,sBAAsB;;;;EAIjC,CAAC"}