@cleocode/contracts 2026.5.38 → 2026.5.40
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.
|
@@ -31,7 +31,7 @@ export interface WorktreeHook {
|
|
|
31
31
|
* - `post-create` — immediately after `git worktree add` succeeds.
|
|
32
32
|
* - `post-start` — after the agent CWD is established (env vars injected).
|
|
33
33
|
*/
|
|
34
|
-
event: 'post-create' | 'post-start';
|
|
34
|
+
event: 'post-create' | 'post-start' | 'pre-remove' | 'post-destroy';
|
|
35
35
|
/**
|
|
36
36
|
* Optional timeout in milliseconds before the hook is killed.
|
|
37
37
|
*
|
|
@@ -161,6 +161,18 @@ export interface CreateWorktreeResult {
|
|
|
161
161
|
hookResults: WorktreeHookResult[];
|
|
162
162
|
/** Include patterns that were applied (empty if none). */
|
|
163
163
|
appliedPatterns: WorktreeIncludePattern[];
|
|
164
|
+
/**
|
|
165
|
+
* Dependency bootstrap results: paths copied via copy-on-write and
|
|
166
|
+
* post-start hook results.
|
|
167
|
+
*/
|
|
168
|
+
bootstrap?: {
|
|
169
|
+
/** Paths successfully copied into the worktree. */
|
|
170
|
+
copiedPaths: string[];
|
|
171
|
+
/** Paths that failed to copy. */
|
|
172
|
+
failedPaths: string[];
|
|
173
|
+
/** Results of post-start hooks. */
|
|
174
|
+
hookResults: WorktreeHookResult[];
|
|
175
|
+
};
|
|
164
176
|
}
|
|
165
177
|
/**
|
|
166
178
|
* Options for destroying a worktree.
|
|
@@ -181,6 +193,14 @@ export interface DestroyWorktreeOptions {
|
|
|
181
193
|
* @default true
|
|
182
194
|
*/
|
|
183
195
|
deleteBranch?: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* When true, force destruction even if the worktree has uncommitted changes.
|
|
198
|
+
*
|
|
199
|
+
* @default false
|
|
200
|
+
*/
|
|
201
|
+
force?: boolean;
|
|
202
|
+
/** Declarative hooks to run during destruction lifecycle. */
|
|
203
|
+
hooks?: WorktreeHook[];
|
|
184
204
|
}
|
|
185
205
|
/**
|
|
186
206
|
* Result of a worktree destroy operation.
|
|
@@ -196,6 +216,12 @@ export interface DestroyWorktreeResult {
|
|
|
196
216
|
branchDeleted: boolean;
|
|
197
217
|
/** Error message if any step failed (non-fatal — caller decides). */
|
|
198
218
|
error?: string;
|
|
219
|
+
/** Whether the worktree had uncommitted changes when destruction was attempted. */
|
|
220
|
+
dirty?: boolean;
|
|
221
|
+
/** Whether force mode was used to override dirty detection. */
|
|
222
|
+
force?: boolean;
|
|
223
|
+
/** Results of pre-remove and post-destroy hooks. */
|
|
224
|
+
hookResults?: WorktreeHookResult[];
|
|
199
225
|
}
|
|
200
226
|
/**
|
|
201
227
|
* A single entry from the worktree listing.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.d.ts","sourceRoot":"","sources":["../../src/operations/worktree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,KAAK,EAAE,aAAa,GAAG,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"worktree.d.ts","sourceRoot":"","sources":["../../src/operations/worktree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,KAAK,EAAE,aAAa,GAAG,YAAY,GAAG,YAAY,GAAG,cAAc,CAAC;IACpE;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,kCAAkC;IAClC,IAAI,EAAE,YAAY,CAAC;IACnB,2CAA2C;IAC3C,OAAO,EAAE,OA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EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,6EAA6E;IAC7E,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,oDAAoD;IACpD,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChD,4CAA4C;IAC5C,WAAW,EAAE,OAAO,CAAC;CACtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleocode/contracts",
|
|
3
|
-
"version": "2026.5.
|
|
3
|
+
"version": "2026.5.40",
|
|
4
4
|
"description": "Domain types, interfaces, and contracts for the CLEO ecosystem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"zod": "^4.3.6",
|
|
84
84
|
"zod-to-json-schema": "^3.25.2",
|
|
85
|
-
"@cleocode/lafs": "2026.5.
|
|
85
|
+
"@cleocode/lafs": "2026.5.40"
|
|
86
86
|
},
|
|
87
87
|
"scripts": {
|
|
88
88
|
"build": "tsc -b --force && node scripts/emit-schemas.mjs",
|
|
@@ -36,7 +36,7 @@ export interface WorktreeHook {
|
|
|
36
36
|
* - `post-create` — immediately after `git worktree add` succeeds.
|
|
37
37
|
* - `post-start` — after the agent CWD is established (env vars injected).
|
|
38
38
|
*/
|
|
39
|
-
event: 'post-create' | 'post-start';
|
|
39
|
+
event: 'post-create' | 'post-start' | 'pre-remove' | 'post-destroy';
|
|
40
40
|
/**
|
|
41
41
|
* Optional timeout in milliseconds before the hook is killed.
|
|
42
42
|
*
|
|
@@ -178,6 +178,18 @@ export interface CreateWorktreeResult {
|
|
|
178
178
|
hookResults: WorktreeHookResult[];
|
|
179
179
|
/** Include patterns that were applied (empty if none). */
|
|
180
180
|
appliedPatterns: WorktreeIncludePattern[];
|
|
181
|
+
/**
|
|
182
|
+
* Dependency bootstrap results: paths copied via copy-on-write and
|
|
183
|
+
* post-start hook results.
|
|
184
|
+
*/
|
|
185
|
+
bootstrap?: {
|
|
186
|
+
/** Paths successfully copied into the worktree. */
|
|
187
|
+
copiedPaths: string[];
|
|
188
|
+
/** Paths that failed to copy. */
|
|
189
|
+
failedPaths: string[];
|
|
190
|
+
/** Results of post-start hooks. */
|
|
191
|
+
hookResults: WorktreeHookResult[];
|
|
192
|
+
};
|
|
181
193
|
}
|
|
182
194
|
|
|
183
195
|
// ---------------------------------------------------------------------------
|
|
@@ -203,6 +215,14 @@ export interface DestroyWorktreeOptions {
|
|
|
203
215
|
* @default true
|
|
204
216
|
*/
|
|
205
217
|
deleteBranch?: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* When true, force destruction even if the worktree has uncommitted changes.
|
|
220
|
+
*
|
|
221
|
+
* @default false
|
|
222
|
+
*/
|
|
223
|
+
force?: boolean;
|
|
224
|
+
/** Declarative hooks to run during destruction lifecycle. */
|
|
225
|
+
hooks?: WorktreeHook[];
|
|
206
226
|
}
|
|
207
227
|
|
|
208
228
|
/**
|
|
@@ -219,6 +239,12 @@ export interface DestroyWorktreeResult {
|
|
|
219
239
|
branchDeleted: boolean;
|
|
220
240
|
/** Error message if any step failed (non-fatal — caller decides). */
|
|
221
241
|
error?: string;
|
|
242
|
+
/** Whether the worktree had uncommitted changes when destruction was attempted. */
|
|
243
|
+
dirty?: boolean;
|
|
244
|
+
/** Whether force mode was used to override dirty detection. */
|
|
245
|
+
force?: boolean;
|
|
246
|
+
/** Results of pre-remove and post-destroy hooks. */
|
|
247
|
+
hookResults?: WorktreeHookResult[];
|
|
222
248
|
}
|
|
223
249
|
|
|
224
250
|
// ---------------------------------------------------------------------------
|