bailian-cli-runtime 2.8.6 → 2.9.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.mts +9 -1
- package/dist/index.mjs +33 -33
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -213,6 +213,8 @@ interface RunContext {
|
|
|
213
213
|
commandPacks: CommandPackManager;
|
|
214
214
|
/** Network surface with the credential baked in — set by {@link authStage}. */
|
|
215
215
|
client: Client;
|
|
216
|
+
/** Rewrite the profile pinned in runtime recovery hints (API Key fallback). */
|
|
217
|
+
setRecoveryConfigName?: (name: string | undefined) => void;
|
|
216
218
|
}
|
|
217
219
|
/** Koa-style onion middleware: do work, call `next()`, do work after it returns. */
|
|
218
220
|
type Middleware = (ctx: RunContext, next: () => Promise<void>) => Promise<void>;
|
|
@@ -261,9 +263,15 @@ interface OutputReporterOptions {
|
|
|
261
263
|
stderr?: OutputWriter;
|
|
262
264
|
localize?: (text: LocalizedText) => string;
|
|
263
265
|
commandPrefix?: string;
|
|
266
|
+
/** Product command existence check for recovery hint capability gating. */
|
|
267
|
+
hasCommand?: (path: string) => boolean;
|
|
268
|
+
/** Profile pinned in recovery hints (via resolveRecoveryConfigName). */
|
|
269
|
+
configName?: string;
|
|
264
270
|
}
|
|
265
271
|
interface OutputReporter {
|
|
266
272
|
output: CommandOutput;
|
|
273
|
+
/** Override the profile pinned in recovery hints (e.g. after API Key fallback). */
|
|
274
|
+
setRecoveryConfigName(name: string | undefined): void;
|
|
267
275
|
/** Runtime-only terminal error rendering. The lifecycle owns process exit. */
|
|
268
276
|
error(error: unknown): ExitCode;
|
|
269
277
|
}
|
|
@@ -273,7 +281,7 @@ export declare function createOutputReporter(options: OutputReporterOptions): Ou
|
|
|
273
281
|
//#region src/error-handler.d.ts
|
|
274
282
|
/** The invocation owns rendering; this boundary owns process termination. */
|
|
275
283
|
export declare function handleError(error: unknown, reporter: Pick<OutputReporter, "error">): never;
|
|
276
|
-
export declare function normalizeError(error: unknown, commandPrefix: string, localize: Localize): BailianError;
|
|
284
|
+
export declare function normalizeError(error: unknown, commandPrefix: string, localize: Localize, configName?: string): BailianError;
|
|
277
285
|
type Localize = (text: LocalizedText) => string;
|
|
278
286
|
//#endregion
|
|
279
287
|
//#region src/version.d.ts
|