@pecot/workflow-mcp 8.0.1-dev.43 → 8.0.1-dev.45
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.
|
@@ -104,10 +104,6 @@ export interface NextSetNameOptions {
|
|
|
104
104
|
*/
|
|
105
105
|
readonly prefix?: string | undefined;
|
|
106
106
|
/**
|
|
107
|
-
最大番号。既定は 9
|
|
108
|
-
*/
|
|
109
|
-
readonly maxNumber?: number | undefined;
|
|
110
|
-
/**
|
|
111
107
|
使用中の名前(claimedSetNames の結果)。ディレクトリが無くても、参加せず max にも数える
|
|
112
108
|
*/
|
|
113
109
|
readonly claimed?: Iterable<string> | undefined;
|
|
@@ -119,8 +115,6 @@ export interface NextSetNameOptions {
|
|
|
119
115
|
2. 各 wtN について `wtN/<repositoryDirectoryName>` が存在しないものを先頭から探す。見つかったら既存セットに参加させる形でその名前を返す。
|
|
120
116
|
3. 全ての既存 wtN に該当リポが既にあるなら、max(N)+1 で新セット `wt<N+1>` を返す。
|
|
121
117
|
4. 既存セットが無ければ `wt1` を返す。
|
|
122
|
-
|
|
123
|
-
全セットに参加済みで maxNumber を超えるなら WorktreeRuntimeError
|
|
124
118
|
*/
|
|
125
119
|
export declare function getNextSetName(projectRoot: string, repositoryDirectoryName: string, options?: Readonly<NextSetNameOptions>): string;
|
|
126
120
|
/**
|
|
@@ -261,12 +261,9 @@ function existingSetNumbers(projectRoot, prefix) {
|
|
|
261
261
|
2. 各 wtN について `wtN/<repositoryDirectoryName>` が存在しないものを先頭から探す。見つかったら既存セットに参加させる形でその名前を返す。
|
|
262
262
|
3. 全ての既存 wtN に該当リポが既にあるなら、max(N)+1 で新セット `wt<N+1>` を返す。
|
|
263
263
|
4. 既存セットが無ければ `wt1` を返す。
|
|
264
|
-
|
|
265
|
-
全セットに参加済みで maxNumber を超えるなら WorktreeRuntimeError
|
|
266
264
|
*/
|
|
267
265
|
export function getNextSetName(projectRoot, repositoryDirectoryName, options = {}) {
|
|
268
266
|
const prefix = options.prefix ?? 'wt';
|
|
269
|
-
const maxNumber = options.maxNumber ?? 9;
|
|
270
267
|
const claimed = new Set();
|
|
271
268
|
const claimedNames = [...options.claimed ?? []];
|
|
272
269
|
for (const claimedName of claimedNames) {
|
|
@@ -277,14 +274,9 @@ export function getNextSetName(projectRoot, repositoryDirectoryName, options = {
|
|
|
277
274
|
const last = numbers.at(-1);
|
|
278
275
|
if (last === undefined)
|
|
279
276
|
return `${prefix}1`;
|
|
280
|
-
//
|
|
277
|
+
// 既存セットで該当リポが未登場のものに参加し、全セットに参加済みなら新セット
|
|
281
278
|
const joinable = numbers.find(number => !claimed.has(number) && !existsSync(path.join(projectRoot, `${prefix}${String(number)}`, repositoryDirectoryName)));
|
|
282
|
-
|
|
283
|
-
return `${prefix}${String(joinable)}`;
|
|
284
|
-
// 全セットに参加済み → 新セット
|
|
285
|
-
if (last + 1 > maxNumber)
|
|
286
|
-
throw new WorktreeRuntimeError(`all of ${prefix}1 to ${prefix}${String(maxNumber)} are in use: no free set`);
|
|
287
|
-
return `${prefix}${String(last + 1)}`;
|
|
279
|
+
return `${prefix}${String(joinable ?? last + 1)}`;
|
|
288
280
|
}
|
|
289
281
|
// 未追跡ファイル操作
|
|
290
282
|
/**
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pecot/workflow-mcp",
|
|
3
|
-
"version": "8.0.1-dev.
|
|
3
|
+
"version": "8.0.1-dev.45",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@pecot/workflow-mcp",
|
|
9
|
-
"version": "8.0.1-dev.
|
|
9
|
+
"version": "8.0.1-dev.45",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@modelcontextprotocol/server": "^2.4.0",
|