@captainsafia/stitch 1.0.0-preview.c77f34b → 1.0.0-preview.f2fe33d
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.
- package/dist/api.d.ts +88 -0
- package/dist/api.js +793 -438
- package/dist/cli.js +1357 -784
- package/dist/mcp.js +22839 -22449
- package/package.json +2 -1
package/dist/api.d.ts
CHANGED
|
@@ -89,6 +89,70 @@ export declare class GitError extends StitchError {
|
|
|
89
89
|
export declare class ValidationError extends StitchError {
|
|
90
90
|
constructor(message: string);
|
|
91
91
|
}
|
|
92
|
+
export declare class FinishForceRequiredError extends StitchError {
|
|
93
|
+
constructor(message: string);
|
|
94
|
+
}
|
|
95
|
+
export declare class InvalidSupersededByError extends StitchError {
|
|
96
|
+
constructor();
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Terminal statuses that a stitch can be finished to
|
|
100
|
+
*/
|
|
101
|
+
export type TerminalStatus = "closed" | "superseded" | "abandoned";
|
|
102
|
+
/**
|
|
103
|
+
* Options for finishing a stitch
|
|
104
|
+
*/
|
|
105
|
+
export interface FinishOptions {
|
|
106
|
+
/** Target status (default: "closed", may be auto-detected to "abandoned") */
|
|
107
|
+
status?: TerminalStatus;
|
|
108
|
+
/** For superseded status, the ID of the replacing stitch */
|
|
109
|
+
supersededBy?: StitchId;
|
|
110
|
+
/** Override auto-abandoned detection */
|
|
111
|
+
force?: boolean;
|
|
112
|
+
/** Skip confirmation for cascade closes (for non-interactive mode) */
|
|
113
|
+
skipConfirmation?: boolean;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Result of a finish operation
|
|
117
|
+
*/
|
|
118
|
+
export interface FinishResult {
|
|
119
|
+
/** All stitches that were finished */
|
|
120
|
+
finished: FinishedStitch[];
|
|
121
|
+
/** Warnings generated during the operation */
|
|
122
|
+
warnings: string[];
|
|
123
|
+
/** Whether auto-detection changed the status from the requested one */
|
|
124
|
+
autoDetectedStatus: boolean;
|
|
125
|
+
/** The final status applied */
|
|
126
|
+
finalStatus: TerminalStatus;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Information about a single finished stitch
|
|
130
|
+
*/
|
|
131
|
+
export interface FinishedStitch {
|
|
132
|
+
id: StitchId;
|
|
133
|
+
title: string;
|
|
134
|
+
previousStatus: StitchStatus;
|
|
135
|
+
newStatus: TerminalStatus;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Information needed before confirming a finish operation
|
|
139
|
+
*/
|
|
140
|
+
export interface FinishPreview {
|
|
141
|
+
/** The target stitch */
|
|
142
|
+
target: StitchDoc;
|
|
143
|
+
/** All stitches that will be affected (target + descendants) */
|
|
144
|
+
affected: StitchDoc[];
|
|
145
|
+
/** The final status that will be applied */
|
|
146
|
+
finalStatus: TerminalStatus;
|
|
147
|
+
/** Whether status was auto-detected */
|
|
148
|
+
autoDetected: boolean;
|
|
149
|
+
/** Warnings to show the user */
|
|
150
|
+
warnings: string[];
|
|
151
|
+
/** Whether confirmation is required (cascade affects 2+ stitches) */
|
|
152
|
+
requiresConfirmation: boolean;
|
|
153
|
+
/** Error if the operation cannot proceed without --force */
|
|
154
|
+
forceRequired?: string;
|
|
155
|
+
}
|
|
92
156
|
/**
|
|
93
157
|
* StitchClient is the main public API for interacting with stitch.
|
|
94
158
|
* CLI commands should use this class to perform all operations.
|
|
@@ -157,6 +221,30 @@ export declare class StitchClient {
|
|
|
157
221
|
* Get stitch blame for a file
|
|
158
222
|
*/
|
|
159
223
|
blame(path: string): Promise<BlameLine[]>;
|
|
224
|
+
/**
|
|
225
|
+
* Get direct children of a stitch
|
|
226
|
+
*/
|
|
227
|
+
getChildren(id: StitchId): Promise<StitchId[]>;
|
|
228
|
+
/**
|
|
229
|
+
* Get all descendants (children, grandchildren, etc.) of a stitch
|
|
230
|
+
*/
|
|
231
|
+
getDescendants(id: StitchId): Promise<StitchId[]>;
|
|
232
|
+
/**
|
|
233
|
+
* Prepare a finish operation without executing it.
|
|
234
|
+
* Returns information needed to confirm or abort the operation.
|
|
235
|
+
*/
|
|
236
|
+
prepareFinish(id?: StitchId, options?: FinishOptions): Promise<FinishPreview>;
|
|
237
|
+
/**
|
|
238
|
+
* Execute a prepared finish operation.
|
|
239
|
+
* Clears the current stitch pointer after successful finish.
|
|
240
|
+
*/
|
|
241
|
+
executeFinish(preview: FinishPreview, options?: FinishOptions): Promise<FinishResult>;
|
|
242
|
+
/**
|
|
243
|
+
* Finish a stitch (transition to terminal status).
|
|
244
|
+
* High-level method that prepares and executes in one call.
|
|
245
|
+
* Use prepareFinish + executeFinish separately when confirmation is needed.
|
|
246
|
+
*/
|
|
247
|
+
finish(id?: StitchId, options?: FinishOptions): Promise<FinishResult>;
|
|
160
248
|
/**
|
|
161
249
|
* Dispose of the client (for using with `using` keyword)
|
|
162
250
|
*/
|