@shipispec/tsfix 0.4.0 → 0.6.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.
package/dist/index.d.ts CHANGED
@@ -44,6 +44,12 @@
44
44
  * - `mendSingleFile` — single-LLM-call repair via Vercel AI SDK
45
45
  * - `runMendLoop` — bounded retry with no-progress / regression detection
46
46
  * - `parseEditBlocks` / `applyEditBlocks` — Aider-style SEARCH/REPLACE applier
47
+ *
48
+ * ## Layer 4 escape hatch (v0.5.0+)
49
+ *
50
+ * - `stubAndContinue` — insert `// @ts-expect-error - tsfix: ...` above
51
+ * unresolved error sites so the workspace compiles. Opt-in: set
52
+ * `stubOnFailure: true` on `runMendLoop`, or call directly.
47
53
  */
48
54
  export { runInProcessTsc, isInProcessTscEnabled, resetInProcessTscCache } from "./validatorInProcess.js";
49
55
  export type { InProcessTscOptions, InProcessTscResult } from "./validatorInProcess.js";
@@ -150,6 +156,20 @@ export interface MendContext {
150
156
  priorTaskExports?: string;
151
157
  /** Compact type signatures of installed npm dependencies (helps prevent API hallucination). */
152
158
  installedTypes?: string;
159
+ /**
160
+ * Library-migration hints for installed deps whose breaking changes are
161
+ * known to mislead tsc's quick-fix. When non-empty, the Layer 2 prompt
162
+ * leads with these and the `taskDescription` is overridden to name them.
163
+ *
164
+ * Auto-populated by `runMendLoop` from `<workspaceRoot>/package.json` if
165
+ * the caller doesn't set it. Pass `[]` explicitly to opt out.
166
+ *
167
+ * See `libraryMigrations.ts` for the built-in registry.
168
+ */
169
+ libraryMigrations?: Array<{
170
+ name: string;
171
+ hint: string;
172
+ }>;
153
173
  }
154
174
  /**
155
175
  * Per-layer event for streaming telemetry across the validate → fix → mend
@@ -186,3 +206,7 @@ export { mendSingleFile } from "./mendAgent.js";
186
206
  export type { MendSingleFileOptions, MendSingleFileResult, LLMCall } from "./mendAgent.js";
187
207
  export { runMendLoop } from "./runMendLoop.js";
188
208
  export type { RunMendLoopOptions, RunMendLoopResult, MendLoopIteration, StopReason, } from "./runMendLoop.js";
209
+ export { stubAndContinue } from "./stubAndContinue.js";
210
+ export type { StubAndContinueOptions, StubAndContinueResult, AppliedStub, SkippedStub, } from "./stubAndContinue.js";
211
+ export { BUILT_IN_LIBRARY_MIGRATIONS, detectLibraryMigrations, formatLibraryMigrationsBlock, formatLibraryMigrationsTaskDescription, } from "./libraryMigrations.js";
212
+ export type { LibraryMigrationHint } from "./libraryMigrations.js";