padrone 1.8.1 → 1.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.
Files changed (38) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/dist/{args-DrCXxXeP.mjs → args-WmyGc59s.mjs} +45 -33
  3. package/dist/{args-DrCXxXeP.mjs.map → args-WmyGc59s.mjs.map} +1 -1
  4. package/dist/codegen/index.mjs +1 -1
  5. package/dist/{commands-DLR0rFgq.mjs → commands-ohEApqIw.mjs} +2 -2
  6. package/dist/commands-ohEApqIw.mjs.map +1 -0
  7. package/dist/{completion-UnBKfGuk.mjs → completion-D8qkAinX.mjs} +2 -2
  8. package/dist/{completion-UnBKfGuk.mjs.map → completion-D8qkAinX.mjs.map} +1 -1
  9. package/dist/docs/index.mjs +2 -2
  10. package/dist/{help-B-ZMYyn-.mjs → help-CeI45CJx.mjs} +3 -3
  11. package/dist/{help-B-ZMYyn-.mjs.map → help-CeI45CJx.mjs.map} +1 -1
  12. package/dist/{index-Guyz-CBm.d.mts → index-C3Ed1LYN.d.mts} +17 -8
  13. package/dist/index-C3Ed1LYN.d.mts.map +1 -0
  14. package/dist/index.d.mts +17 -10
  15. package/dist/index.d.mts.map +1 -1
  16. package/dist/index.mjs +99 -41
  17. package/dist/index.mjs.map +1 -1
  18. package/dist/{mcp-D6PdtjIs.mjs → mcp-wCoVFTXz.mjs} +4 -4
  19. package/dist/{mcp-D6PdtjIs.mjs.map → mcp-wCoVFTXz.mjs.map} +1 -1
  20. package/dist/{serve-PaCLsNoD.mjs → serve-ICZFl3xr.mjs} +4 -4
  21. package/dist/{serve-PaCLsNoD.mjs.map → serve-ICZFl3xr.mjs.map} +1 -1
  22. package/dist/test.d.mts +1 -1
  23. package/dist/zod.d.mts +1 -1
  24. package/package.json +1 -1
  25. package/src/cli/link.ts +51 -19
  26. package/src/core/args.ts +63 -37
  27. package/src/core/exec.ts +8 -1
  28. package/src/core/interceptors.ts +7 -4
  29. package/src/core/runtime.ts +11 -2
  30. package/src/extension/auto-output.ts +28 -3
  31. package/src/extension/progress-renderer.ts +32 -8
  32. package/src/extension/progress.ts +19 -9
  33. package/src/index.ts +1 -1
  34. package/src/types/builder.ts +2 -2
  35. package/src/types/index.ts +1 -0
  36. package/src/types/interceptor.ts +7 -0
  37. package/dist/commands-DLR0rFgq.mjs.map +0 -1
  38. package/dist/index-Guyz-CBm.d.mts.map +0 -1
package/src/core/exec.ts CHANGED
@@ -6,6 +6,7 @@ import type {
6
6
  InterceptorExecuteResult,
7
7
  InterceptorParseContext,
8
8
  InterceptorParseResult,
9
+ InterceptorPipelinePhase,
9
10
  InterceptorRouteContext,
10
11
  InterceptorValidateContext,
11
12
  InterceptorValidateResult,
@@ -144,7 +145,9 @@ export function execCommand(
144
145
  const inertSignal = new AbortController().signal;
145
146
 
146
147
  // Pipeline state accumulated as phases complete — propagated to error/shutdown contexts.
147
- const pipelineState: { rawArgs?: Record<string, unknown>; positionalArgs?: string[]; args?: unknown } = {};
148
+ const pipelineState: { phase: InterceptorPipelinePhase; rawArgs?: Record<string, unknown>; positionalArgs?: string[]; args?: unknown } = {
149
+ phase: 'start',
150
+ };
148
151
 
149
152
  const initialContext = evalOptions?.context;
150
153
 
@@ -175,6 +178,7 @@ export function execCommand(
175
178
  // ── Phases 2 & 3 chained after parse ────────────────────────────────
176
179
  const continueAfterParse = (parsed: InterceptorParseResult) => {
177
180
  const { command } = parsed;
181
+ pipelineState.phase = 'parse';
178
182
  pipelineState.rawArgs = parsed.rawArgs;
179
183
  pipelineState.positionalArgs = parsed.positionalArgs;
180
184
  const commandInterceptors = resolveRegisteredInterceptors(collectInterceptorsFn(command), factoryCache);
@@ -193,6 +197,7 @@ export function execCommand(
193
197
  const routedOrPromise = runInterceptorChain('route', commandInterceptors, routeCtx, () => {});
194
198
 
195
199
  const continueAfterRoute = () => {
200
+ pipelineState.phase = 'route';
196
201
  const runValidateAndExecute = () => {
197
202
  // ── Phase 3: Validate ───────────────────────────────────────────
198
203
  const validateCtx: InterceptorValidateContext = {
@@ -221,6 +226,7 @@ export function execCommand(
221
226
 
222
227
  // ── Phase 3: Execute (or handle validation errors) ──────────────
223
228
  const continueAfterValidate = (v: InterceptorValidateResult) => {
229
+ pipelineState.phase = 'validate';
224
230
  pipelineState.args = v.args;
225
231
  if (v.argsResult?.issues) return handleValidationIssues(v.argsResult as StandardSchemaV1.FailureResult, command, errorMode);
226
232
 
@@ -244,6 +250,7 @@ export function execCommand(
244
250
  return { result };
245
251
  };
246
252
 
253
+ pipelineState.phase = 'execute';
247
254
  const executedOrPromise = runInterceptorChain('execute', commandInterceptors, executeCtx, coreExecute);
248
255
 
249
256
  return thenMaybe(executedOrPromise, (e) => {
@@ -6,6 +6,7 @@ import type {
6
6
  InterceptorErrorResult,
7
7
  InterceptorFactory,
8
8
  InterceptorMeta,
9
+ InterceptorPipelinePhase,
9
10
  InterceptorShutdownContext,
10
11
  InterceptorStartContext,
11
12
  PadroneInterceptorFn,
@@ -204,13 +205,15 @@ export function wrapWithLifecycle<T>(
204
205
  runtime?: ResolvedPadroneRuntime,
205
206
  program?: AnyPadroneProgram,
206
207
  caller: 'cli' | 'eval' | 'run' | 'repl' | 'serve' | 'mcp' | 'tool' = 'eval',
207
- pipelineState?: { rawArgs?: Record<string, unknown>; positionalArgs?: string[]; args?: unknown },
208
+ pipelineState?: { phase: InterceptorPipelinePhase; rawArgs?: Record<string, unknown>; positionalArgs?: string[]; args?: unknown },
208
209
  ): T | Promise<T> {
209
210
  const defaultSignal = typeof AbortSignal !== 'undefined' ? AbortSignal.abort() : (undefined as unknown as AbortSignal);
210
211
  const hasStart = interceptors.some((p) => p.start);
211
212
  const hasError = interceptors.some((p) => p.error);
212
213
  const hasShutdown = interceptors.some((p) => p.shutdown);
213
214
 
215
+ const effectivePipelineState = pipelineState ?? { phase: 'start' as const };
216
+
214
217
  // Fast path: no lifecycle interceptors
215
218
  if (!hasStart && !hasError && !hasShutdown) return pipeline(signal ?? defaultSignal, context);
216
219
  // Mutable refs: start-phase interceptors can override signal and context (e.g., signal extension, auth),
@@ -230,7 +233,7 @@ export function wrapWithLifecycle<T>(
230
233
  runtime: runtime!,
231
234
  program: program!,
232
235
  caller,
233
- ...pipelineState,
236
+ ...effectivePipelineState,
234
237
  };
235
238
  return runInterceptorChain('shutdown', interceptors, ctx, () => {});
236
239
  };
@@ -253,7 +256,7 @@ export function wrapWithLifecycle<T>(
253
256
  runtime: runtime!,
254
257
  program: program!,
255
258
  caller,
256
- ...pipelineState,
259
+ ...effectivePipelineState,
257
260
  };
258
261
  const errorResult = runInterceptorChain('error', interceptors, ctx, (): InterceptorErrorResult => ({ error }));
259
262
  return thenMaybe(errorResult, (er) => {
@@ -323,7 +326,7 @@ export function wrapWithCommandLifecycle<T>(
323
326
  runtime: ResolvedPadroneRuntime,
324
327
  program: AnyPadroneProgram,
325
328
  caller: 'cli' | 'eval' | 'run' | 'repl' | 'serve' | 'mcp' | 'tool',
326
- pipelineState: { rawArgs?: Record<string, unknown>; positionalArgs?: string[]; args?: unknown },
329
+ pipelineState: { phase: InterceptorPipelinePhase; rawArgs?: Record<string, unknown>; positionalArgs?: string[]; args?: unknown },
327
330
  ): T | Promise<T> {
328
331
  const hasError = interceptors.some((p) => p.error);
329
332
  const hasShutdown = interceptors.some((p) => p.shutdown);
@@ -4,14 +4,14 @@ import type { HelpFormat } from '../output/formatter.ts';
4
4
  /** Process signals that Padrone can handle for graceful shutdown. */
5
5
  export type PadroneSignal = 'SIGINT' | 'SIGTERM' | 'SIGHUP';
6
6
 
7
- /** Value accepted by `PadroneProgressIndicator.update()`. */
7
+ /** Value accepted by `PadroneProgress.update()`. */
8
8
  export type PadroneProgressUpdate = string | number | { message?: string; progress?: number; indeterminate?: boolean; time?: boolean };
9
9
 
10
10
  /**
11
11
  * A progress indicator instance (spinner, progress bar, etc).
12
12
  * Created by the runtime's `progress` factory and used to show loading state during command execution.
13
13
  */
14
- export type PadroneProgressIndicator = {
14
+ export type PadroneProgress = {
15
15
  /**
16
16
  * Update the indicator.
17
17
  * - `string` — update the displayed message.
@@ -31,6 +31,15 @@ export type PadroneProgressIndicator = {
31
31
  succeed: (message?: string | null, options?: { indicator?: string }) => void;
32
32
  /** Mark as failed and stop. Pass `null` to stop without rendering a final message. */
33
33
  fail: (message?: string | null, options?: { indicator?: string }) => void;
34
+ /** Control ETA (estimated time remaining) display at runtime. */
35
+ eta: {
36
+ /** Enable ETA tracking. Starts collecting samples from subsequent `update()` calls. */
37
+ start: () => void;
38
+ /** Disable ETA display. */
39
+ stop: () => void;
40
+ /** Clear collected samples and restart estimation. Useful between operation phases. */
41
+ reset: () => void;
42
+ };
34
43
  /** Stop without success/fail status. */
35
44
  stop: () => void;
36
45
  /** Temporarily hide the indicator so other output can be written cleanly. */
@@ -3,7 +3,14 @@ import { isAsyncIterator, isIterator } from '../core/results.ts';
3
3
  import type { OutputConfig } from '../output/output-indicator.ts';
4
4
  import { createOutputIndicator, formatDeclarativeOutput } from '../output/output-indicator.ts';
5
5
  import { resolveOutputFormat } from '../output/styling.ts';
6
- import type { AnyPadroneBuilder, CommandTypesBase, InterceptorExecuteContext, InterceptorExecuteResult } from '../types/index.ts';
6
+ import type {
7
+ AnyPadroneBuilder,
8
+ CommandTypesBase,
9
+ InterceptorErrorContext,
10
+ InterceptorErrorResult,
11
+ InterceptorExecuteContext,
12
+ InterceptorExecuteResult,
13
+ } from '../types/index.ts';
7
14
 
8
15
  // ── Helpers ─────────────────────────────────────────────────────────────
9
16
 
@@ -54,8 +61,20 @@ function outputAndCollect(value: unknown, output: (...args: unknown[]) => void):
54
61
 
55
62
  const autoOutputMeta = { id: 'padrone:auto-output', name: 'padrone:auto-output', order: -1100 } as const;
56
63
 
57
- function createAutoOutputInterceptor(outputConfig?: OutputConfig) {
64
+ function createAutoOutputInterceptor(outputConfig?: OutputConfig, errorOutput?: boolean) {
58
65
  return defineInterceptor(autoOutputMeta, () => ({
66
+ error(ctx: InterceptorErrorContext, next: () => InterceptorErrorResult | Promise<InterceptorErrorResult>) {
67
+ const handleResult = (er: InterceptorErrorResult): InterceptorErrorResult => {
68
+ if (!er.error || errorOutput === false || ctx.caller !== 'cli' || ctx.phase !== 'execute') return er;
69
+ const message = er.error instanceof Error ? er.error.message : String(er.error);
70
+ ctx.runtime.error(message);
71
+ return er;
72
+ };
73
+
74
+ const result = next();
75
+ if (result instanceof Promise) return result.then(handleResult);
76
+ return handleResult(result);
77
+ },
59
78
  execute(ctx: InterceptorExecuteContext, next) {
60
79
  const outputCtx = resolveOutputFormat(ctx.runtime, ctx.caller);
61
80
  const indicator = createOutputIndicator(ctx.runtime.output, outputCtx);
@@ -115,6 +134,12 @@ export type PadroneAutoOutputOptions = {
115
134
  * ```
116
135
  */
117
136
  output?: OutputConfig;
137
+ /**
138
+ * Automatically print unhandled errors to stderr in CLI mode.
139
+ * Skips errors already handled by other extensions (routing, validation, signal).
140
+ * @default true
141
+ */
142
+ errorOutput?: boolean;
118
143
  };
119
144
 
120
145
  /**
@@ -141,6 +166,6 @@ export type PadroneAutoOutputOptions = {
141
166
  export function padroneAutoOutput(options?: PadroneAutoOutputOptions): <T extends CommandTypesBase>(builder: T) => T {
142
167
  const interceptor = options?.disabled
143
168
  ? defineInterceptor({ ...autoOutputMeta, disabled: true }, () => ({}))
144
- : createAutoOutputInterceptor(options?.output);
169
+ : createAutoOutputInterceptor(options?.output, options?.errorOutput);
145
170
  return ((builder: AnyPadroneBuilder) => builder.intercept(interceptor)) as any;
146
171
  }
@@ -1,6 +1,6 @@
1
1
  import type {
2
2
  PadroneBarConfig,
3
- PadroneProgressIndicator,
3
+ PadroneProgress,
4
4
  PadroneProgressOptions,
5
5
  PadroneProgressShow,
6
6
  PadroneProgressUpdate,
@@ -134,8 +134,8 @@ function estimateEta(samples: { time: number; progress: number }[]): number | un
134
134
  // Factory type
135
135
  // ---------------------------------------------------------------------------
136
136
 
137
- /** Factory function that creates a `PadroneProgressIndicator`. */
138
- export type PadroneProgressRenderer = (message: string, options?: PadroneProgressOptions) => PadroneProgressIndicator;
137
+ /** Factory function that creates a `PadroneProgress`. */
138
+ export type PadroneProgressRenderer = (message: string, options?: PadroneProgressOptions) => PadroneProgress;
139
139
 
140
140
  // ---------------------------------------------------------------------------
141
141
  // Default terminal renderer
@@ -145,7 +145,7 @@ export type PadroneProgressRenderer = (message: string, options?: PadroneProgres
145
145
  * Creates a terminal progress indicator (spinner, bar, or both).
146
146
  * Returns a no-op indicator in non-TTY/CI environments.
147
147
  */
148
- export function createTerminalProgress(message: string, options?: PadroneProgressOptions): PadroneProgressIndicator {
148
+ export function createTerminalProgress(message: string, options?: PadroneProgressOptions): PadroneProgress {
149
149
  const spinnerCfg = resolveSpinnerConfig(options?.spinner);
150
150
  const successIcon = options?.successIndicator ?? '✔';
151
151
  const errorIcon = options?.errorIndicator ?? '✖';
@@ -154,8 +154,10 @@ export function createTerminalProgress(message: string, options?: PadroneProgres
154
154
  const formatFinal = (icon: string, msg: string) => (icon ? `${icon} ${msg}\n` : `${msg}\n`);
155
155
 
156
156
  if (typeof process === 'undefined' || !process.stderr?.isTTY) {
157
+ const noopEta = { start() {}, stop() {}, reset() {} };
157
158
  return {
158
159
  update() {},
160
+ eta: noopEta,
159
161
  succeed(msg, opts) {
160
162
  if (msg === null) return;
161
163
  const icon = opts?.indicator ?? successIcon;
@@ -176,11 +178,11 @@ export function createTerminalProgress(message: string, options?: PadroneProgres
176
178
  const ansiPattern = /\x1b\[[0-9;]*m/g;
177
179
 
178
180
  if (spinnerCfg.show === 'never' && (!barCfg || barCfg.show === 'never') && !message) {
179
- return { update() {}, succeed() {}, fail() {}, stop() {}, pause() {}, resume() {} };
181
+ return { update() {}, eta: { start() {}, stop() {}, reset() {} }, succeed() {}, fail() {}, stop() {}, pause() {}, resume() {} };
180
182
  }
181
183
 
182
184
  const showTime = options?.time ?? false;
183
- const showEta = options?.eta ?? false;
185
+ let etaEnabled = options?.eta ?? false;
184
186
 
185
187
  let spinnerFrame = 0;
186
188
  let barFrame = 0;
@@ -224,7 +226,7 @@ export function createTerminalProgress(message: string, options?: PadroneProgres
224
226
 
225
227
  let line = '';
226
228
  if (barVisible) line += formatBar(progress, barCfg!, barFrame);
227
- const hasEta = showEta && progress !== undefined && progress < 1 && etaMs !== undefined;
229
+ const hasEta = etaEnabled && progress !== undefined && progress < 1 && etaMs !== undefined;
228
230
  if (timeEnabled || hasEta) {
229
231
  const parts: string[] = [];
230
232
  if (timeEnabled) parts.push(`⏱ ${formatDuration(Date.now() - startTime)}`);
@@ -278,6 +280,27 @@ export function createTerminalProgress(message: string, options?: PadroneProgres
278
280
  clearLines();
279
281
  };
280
282
 
283
+ const eta = {
284
+ start() {
285
+ if (stopped) return;
286
+ etaEnabled = true;
287
+ render();
288
+ },
289
+ stop() {
290
+ if (stopped) return;
291
+ etaEnabled = false;
292
+ etaMs = undefined;
293
+ render();
294
+ },
295
+ reset() {
296
+ if (stopped) return;
297
+ etaSamples.length = 0;
298
+ etaMs = undefined;
299
+ etaCalculatedAt = 0;
300
+ render();
301
+ },
302
+ };
303
+
281
304
  return {
282
305
  update(value) {
283
306
  if (stopped) return;
@@ -285,7 +308,7 @@ export function createTerminalProgress(message: string, options?: PadroneProgres
285
308
  if (parsed.message !== undefined) text = parsed.message;
286
309
  if (parsed.progress !== undefined) {
287
310
  progress = parsed.progress;
288
- if (showEta) {
311
+ if (etaEnabled) {
289
312
  const now = Date.now();
290
313
  etaSamples.push({ time: now, progress: parsed.progress });
291
314
  const estimated = estimateEta(etaSamples);
@@ -309,6 +332,7 @@ export function createTerminalProgress(message: string, options?: PadroneProgres
309
332
  }
310
333
  render();
311
334
  },
335
+ eta,
312
336
  succeed(msg, opts) {
313
337
  clear();
314
338
  if (msg === null) return;
@@ -1,5 +1,5 @@
1
1
  import { defineInterceptor } from '../core/interceptors.ts';
2
- import type { PadroneBarConfig, PadroneProgressIndicator, PadroneProgressOptions, PadroneSpinnerConfig } from '../core/runtime.ts';
2
+ import type { PadroneBarConfig, PadroneProgress, PadroneProgressOptions, PadroneSpinnerConfig } from '../core/runtime.ts';
3
3
  import type { AnyPadroneBuilder, CommandTypesBase } from '../types/index.ts';
4
4
  import type { WithInterceptor } from '../util/type-utils.ts';
5
5
  import type { PadroneProgressRenderer } from './progress-renderer.ts';
@@ -43,6 +43,8 @@ export type PadroneProgressConfig<TRes = unknown> = {
43
43
  * Defaults to the built-in terminal renderer (`createTerminalProgress`).
44
44
  */
45
45
  renderer?: PadroneProgressRenderer;
46
+ /** Suppress all progress output. The `progress` interface is still provided on the context as a no-op. */
47
+ silent?: boolean;
46
48
  };
47
49
 
48
50
  /**
@@ -52,17 +54,19 @@ export type PadroneProgressConfig<TRes = unknown> = {
52
54
  *
53
55
  * Provide via context as `{ progressConfig: PadroneProgressDefaults }`.
54
56
  */
55
- export type PadroneProgressDefaults = Pick<PadroneProgressConfig, 'message' | 'spinner' | 'bar' | 'time' | 'eta' | 'renderer'>;
57
+ export type PadroneProgressDefaults = Pick<PadroneProgressConfig, 'message' | 'spinner' | 'bar' | 'time' | 'eta' | 'renderer' | 'silent'>;
56
58
 
57
- /** Builder/program type after applying `padroneProgress()`. Adds `{ progress: PadroneProgressIndicator }` to the command context. */
58
- export type WithProgress<T> = WithInterceptor<T, { progress: PadroneProgressIndicator }>;
59
+ /** Builder/program type after applying `padroneProgress()`. Adds `{ progress: PadroneProgress }` to the command context. */
60
+ export type WithProgress<T> = WithInterceptor<T, { progress: PadroneProgress }>;
59
61
 
60
62
  // ---------------------------------------------------------------------------
61
63
  // Internal helpers
62
64
  // ---------------------------------------------------------------------------
63
65
 
64
- const noopIndicator: PadroneProgressIndicator = {
66
+ const noopEta = { start() {}, stop() {}, reset() {} };
67
+ const noopIndicator: PadroneProgress = {
65
68
  update() {},
69
+ eta: noopEta,
66
70
  succeed() {},
67
71
  fail() {},
68
72
  stop() {},
@@ -82,7 +86,7 @@ function resolveMessage(field: unknown, value: unknown, fallback?: string): { me
82
86
  }
83
87
 
84
88
  function cleanup(
85
- indicator: PadroneProgressIndicator,
89
+ indicator: PadroneProgress,
86
90
  successConfig: unknown,
87
91
  errorConfig: unknown,
88
92
  error: unknown,
@@ -146,20 +150,23 @@ function progressInterceptor(config: string | PadroneProgressConfig) {
146
150
  const rawRenderer = isObj ? config.renderer : undefined;
147
151
  const rawTime = isObj ? config.time : undefined;
148
152
  const rawEta = isObj ? config.eta : undefined;
153
+ const rawSilent = isObj ? config.silent : undefined;
149
154
 
150
155
  return defineInterceptor({ id: 'padrone:progress', name: 'padrone:progress' })
151
156
  .requires<{ progressConfig?: PadroneProgressDefaults }>()
152
157
  .factory(() => {
153
- let indicator: PadroneProgressIndicator | undefined;
158
+ let indicator: PadroneProgress | undefined;
154
159
  let restoreOutput: (() => void) | undefined;
155
160
  // Lazily resolved from context + constructor args
156
161
  let resolvedRenderer: PadroneProgressRenderer | undefined;
157
162
  let resolvedOptions: PadroneProgressOptions | undefined;
163
+ let resolvedSilent = false;
158
164
  let msgs: ReturnType<typeof resolveMessages> | undefined;
159
165
 
160
166
  function resolve(ctx: { context?: { progressConfig?: PadroneProgressDefaults } }) {
161
167
  if (resolvedRenderer) return;
162
168
  const ctxCfg = (ctx.context as Record<string, unknown> | undefined)?.progressConfig as PadroneProgressDefaults | undefined;
169
+ resolvedSilent = rawSilent ?? ctxCfg?.silent ?? false;
163
170
  const spinner = rawSpinner ?? ctxCfg?.spinner;
164
171
  const bar = rawBar ?? ctxCfg?.bar;
165
172
  const time = rawTime ?? ctxCfg?.time;
@@ -179,6 +186,7 @@ function progressInterceptor(config: string | PadroneProgressConfig) {
179
186
  return {
180
187
  validate(ctx, next) {
181
188
  resolve(ctx);
189
+ if (resolvedSilent) return next();
182
190
  indicator = resolvedRenderer!(msgs!.validation || msgs!.progress, resolvedOptions);
183
191
 
184
192
  const originalOutput = ctx.runtime.output;
@@ -227,6 +235,8 @@ function progressInterceptor(config: string | PadroneProgressConfig) {
227
235
  },
228
236
 
229
237
  execute(_ctx, next) {
238
+ if (resolvedSilent) return next({ context: { progress: noopIndicator } });
239
+
230
240
  // Transition from validation message to progress message
231
241
  if (indicator && msgs!.validation) indicator.update(msgs!.progress);
232
242
 
@@ -295,7 +305,7 @@ function progressInterceptor(config: string | PadroneProgressConfig) {
295
305
  },
296
306
  };
297
307
  })
298
- .provides<{ progress: PadroneProgressIndicator }>();
308
+ .provides<{ progress: PadroneProgress }>();
299
309
  }
300
310
 
301
311
  // ---------------------------------------------------------------------------
@@ -311,7 +321,7 @@ function progressInterceptor(config: string | PadroneProgressConfig) {
311
321
  * The indicator is automatically started before validation, updated at each phase transition,
312
322
  * and stopped on success (`.succeed()`) or failure (`.fail()`).
313
323
  *
314
- * Provides `{ progress: PadroneProgressIndicator }` on the command context.
324
+ * Provides `{ progress: PadroneProgress }` on the command context.
315
325
  * Access it in action handlers as `ctx.context.progress`.
316
326
  *
317
327
  * Uses the built-in terminal renderer by default. Pass a custom `renderer` for non-terminal
package/src/index.ts CHANGED
@@ -11,7 +11,7 @@ export type {
11
11
  PadroneBarAnimation,
12
12
  PadroneBarChar,
13
13
  PadroneBarConfig,
14
- PadroneProgressIndicator,
14
+ PadroneProgress,
15
15
  PadroneProgressOptions,
16
16
  PadroneProgressShow,
17
17
  PadroneProgressUpdate,
@@ -1,6 +1,6 @@
1
1
  import type { StandardSchemaV1 } from '@standard-schema/spec';
2
2
  import type { Tool } from 'ai';
3
- import type { PadroneProgressIndicator, PadroneRuntime } from '../core/runtime.ts';
3
+ import type { PadroneProgress, PadroneRuntime } from '../core/runtime.ts';
4
4
  import type { PadroneLogger } from '../extension/logger.ts';
5
5
  import type { PadroneTracer } from '../extension/tracing.ts';
6
6
  import type { PadroneMcpPreferences } from '../feature/mcp.ts';
@@ -768,7 +768,7 @@ export type PadroneExtension<TIn extends CommandTypesBase = CommandTypesBase, TO
768
768
  export interface DefineCommandContext {
769
769
  logger?: PadroneLogger;
770
770
  tracing?: PadroneTracer;
771
- progress?: PadroneProgressIndicator;
771
+ progress?: PadroneProgress;
772
772
  }
773
773
 
774
774
  /** Error brand returned by `.command()` when a `defineCommand.requires()` context requirement is not satisfied. */
@@ -34,6 +34,7 @@ export type {
34
34
  InterceptorParseContext,
35
35
  InterceptorParseResult,
36
36
  InterceptorPhases,
37
+ InterceptorPipelinePhase,
37
38
  InterceptorRouteContext,
38
39
  InterceptorShutdownContext,
39
40
  InterceptorStartContext,
@@ -75,10 +75,15 @@ export type InterceptorExecuteResult<TResult = unknown> = {
75
75
  /** Context for the start phase. Runs before parsing, wraps the entire pipeline. */
76
76
  export type InterceptorStartContext<TContext = object> = InterceptorBaseContext<TContext>;
77
77
 
78
+ /** The pipeline phase that was executing when an error was thrown or the pipeline completed. */
79
+ export type InterceptorPipelinePhase = 'start' | 'parse' | 'route' | 'validate' | 'execute';
80
+
78
81
  /** Context for the error phase. Called when the pipeline throws. Includes pipeline state accumulated before the error. */
79
82
  export type InterceptorErrorContext<TContext = object> = InterceptorBaseContext<TContext> & {
80
83
  /** The error that was thrown. */
81
84
  error: unknown;
85
+ /** The pipeline phase that was executing when the error was thrown. */
86
+ phase: InterceptorPipelinePhase;
82
87
  /** Raw named arguments (available if parse completed). */
83
88
  rawArgs?: Record<string, unknown>;
84
89
  /** Positional argument strings (available if parse completed). */
@@ -101,6 +106,8 @@ export type InterceptorShutdownContext<TResult = unknown, TContext = object> = I
101
106
  error?: unknown;
102
107
  /** The pipeline result, if it succeeded. */
103
108
  result?: TResult;
109
+ /** The last pipeline phase that was reached before completion or failure. */
110
+ phase: InterceptorPipelinePhase;
104
111
  /** Raw named arguments (available if parse completed). */
105
112
  rawArgs?: Record<string, unknown>;
106
113
  /** Positional argument strings (available if parse completed). */
@@ -1 +0,0 @@
1
- {"version":3,"file":"commands-DLR0rFgq.mjs","names":[],"sources":["../src/core/runtime.ts","../src/core/default-runtime.ts","../src/core/commands.ts"],"sourcesContent":["import type { ColorConfig, ColorTheme } from '../output/colorizer.ts';\nimport type { HelpFormat } from '../output/formatter.ts';\n\n/** Process signals that Padrone can handle for graceful shutdown. */\nexport type PadroneSignal = 'SIGINT' | 'SIGTERM' | 'SIGHUP';\n\n/** Value accepted by `PadroneProgressIndicator.update()`. */\nexport type PadroneProgressUpdate = string | number | { message?: string; progress?: number; indeterminate?: boolean; time?: boolean };\n\n/**\n * A progress indicator instance (spinner, progress bar, etc).\n * Created by the runtime's `progress` factory and used to show loading state during command execution.\n */\nexport type PadroneProgressIndicator = {\n /**\n * Update the indicator.\n * - `string` — update the displayed message.\n * - `number` — set progress ratio (0–1). Values outside this range are clamped.\n * - `{ message?, progress?, indeterminate? }` — update message, progress, or both.\n *\n * Set `indeterminate: true` to force the bar into indeterminate mode (shows animation, no percentage).\n * This makes the bar visible even in `show: 'auto'` mode without providing a number.\n * Omitting `progress` (or passing a string) leaves the bar in its current state.\n * Setting `progress` when bar mode is not enabled is a no-op for the bar portion.\n *\n * Set `time: true` to start the elapsed timer on demand (useful when `time` was not set in options).\n * Set `time: false` to hide the elapsed timer.\n */\n update: (value: PadroneProgressUpdate) => void;\n /** Mark as succeeded and stop. Pass `null` to stop without rendering a final message. */\n succeed: (message?: string | null, options?: { indicator?: string }) => void;\n /** Mark as failed and stop. Pass `null` to stop without rendering a final message. */\n fail: (message?: string | null, options?: { indicator?: string }) => void;\n /** Stop without success/fail status. */\n stop: () => void;\n /** Temporarily hide the indicator so other output can be written cleanly. */\n pause: () => void;\n /** Redraw the indicator after a `pause()`. */\n resume: () => void;\n};\n\n/** Controls when a progress element (spinner or bar) is visible. */\nexport type PadroneProgressShow = 'auto' | 'always' | 'never';\n\n/** Built-in spinner presets. */\nexport type PadroneSpinnerPreset = 'dots' | 'line' | 'arc' | 'bounce';\n\n/**\n * Spinner configuration for progress indicators.\n * - A preset name (e.g., `'dots'`) to use built-in frames.\n * - `true` — default spinner with `show: 'always'` (visible even alongside a bar).\n * - An object with custom `frames`, `interval`, and/or `show`.\n * - `false` to disable the spinner (`show: 'never'`).\n *\n * Default `show` is `'auto'`: visible when the bar is not shown.\n */\nexport type PadroneSpinnerConfig = PadroneSpinnerPreset | boolean | { frames?: string[]; interval?: number; show?: PadroneProgressShow };\n\n/**\n * Options passed to the runtime's `progress` factory.\n */\n/** Common fill/empty character pairs for progress bars. */\nexport type PadroneBarChar = '█' | '░' | '▓' | '▒' | '─' | '━' | '■' | '□' | '#' | '-' | '=' | '·' | '▰' | '▱' | (string & {});\n\n/**\n * Built-in indeterminate bar animation presets.\n * - `'bounce'` — a filled segment slides back and forth (default).\n * - `'slide'` — a filled segment slides left-to-right and wraps around.\n * - `'pulse'` — the entire bar fades in and out using gradient characters (`░▒▓█▓▒░`).\n */\nexport type PadroneBarAnimation = 'bounce' | 'slide' | 'pulse';\n\n/**\n * Progress bar configuration.\n */\nexport type PadroneBarConfig = {\n /** Total width of the bar in characters. Defaults to `20`. */\n width?: number;\n /** Character used for the filled portion of the bar. Defaults to `'█'`. */\n filled?: PadroneBarChar;\n /** Character used for the empty portion of the bar. Defaults to `'░'`. */\n empty?: PadroneBarChar;\n /** Indeterminate animation style. Defaults to `'bounce'`. */\n animation?: PadroneBarAnimation;\n /**\n * When the bar is visible. Defaults to `'always'` when bar is enabled, `'auto'` when bar is not explicitly configured.\n * - `'always'` — bar is always shown (indeterminate until a number is provided).\n * - `'auto'` — bar is shown only after `update()` is called with a number.\n * - `'never'` — bar is never shown.\n */\n show?: PadroneProgressShow;\n};\n\nexport type PadroneProgressOptions = {\n spinner?: PadroneSpinnerConfig;\n /** Enable a progress bar. `true` for defaults (`show: 'always'`), or a `PadroneBarConfig` object. `false` to disable entirely. When omitted, bar defaults to `show: 'auto'` (appears when a number is provided). */\n bar?: boolean | PadroneBarConfig;\n /** Show elapsed time since the indicator started. Defaults to `false`. */\n time?: boolean;\n /** Show estimated time remaining based on progress rate. Requires numeric `update()` calls. Defaults to `false`. */\n eta?: boolean;\n /** Character/string shown before the success message. Defaults to `'✔'`. */\n successIndicator?: string;\n /** Character/string shown before the error message. Defaults to `'✖'`. */\n errorIndicator?: string;\n};\n\n/**\n * Controls interactive prompting capability and default behavior at the runtime level.\n * - `'supported'` — capable; caller decides.\n * - `'unsupported'` — hard veto; nothing can override.\n * - `'forced'` — capable and forces prompts by default.\n * - `'disabled'` — capable but suppresses prompts by default.\n */\nexport type InteractiveMode = 'supported' | 'unsupported' | 'forced' | 'disabled';\n\n/**\n * Configuration passed to the runtime's `prompt` function for interactive field prompting.\n * The prompt type and choices are auto-detected from the field's JSON schema.\n */\nexport type InteractivePromptConfig = {\n /** The field name being prompted. */\n name: string;\n /** Human-readable message/label for the prompt, derived from the field's description or name. */\n message: string;\n /** The prompt type, auto-detected from the JSON schema. */\n type: 'input' | 'confirm' | 'select' | 'multiselect' | 'password';\n /** Available choices for select/multiselect prompts. */\n choices?: { label: string; value: unknown }[];\n /** Default value from the schema. */\n default?: unknown;\n};\n\n/**\n * Defines the execution context for a Padrone program.\n * Abstracts all environment-dependent I/O so the CLI framework\n * can run outside of a terminal (e.g., web UIs, chat interfaces, testing).\n *\n * All fields are optional — unspecified fields fall back to the Node.js/Bun defaults.\n */\nexport type PadroneRuntime = {\n /** Write normal output (replaces console.log). Receives the raw value — runtime handles formatting. */\n output?: (...args: unknown[]) => void;\n /** Write error output (replaces console.error). */\n error?: (text: string) => void;\n /** Return the raw CLI arguments (replaces process.argv.slice(2)). */\n argv?: () => string[];\n /** Return environment variables (replaces process.env). */\n env?: () => Record<string, string | undefined>;\n /** Default help output format. */\n format?: HelpFormat | 'auto';\n /** Color theme for ANSI/console help output. A theme name or partial color config. */\n theme?: ColorTheme | ColorConfig;\n /**\n * Standard input abstraction. Provides methods to read piped data from stdin.\n * When not provided, defaults to reading from `process.stdin`.\n *\n * Used by commands that declare a `stdin` field in their arguments meta.\n * The framework reads stdin automatically during the validate phase and\n * injects the data into the specified argument field.\n */\n stdin?: {\n /** Whether stdin is a TTY (interactive terminal) vs a pipe/file. */\n isTTY?: boolean;\n /** Read all of stdin as a string. */\n text: () => Promise<string>;\n /** Async iterable of lines for streaming. */\n lines: () => AsyncIterable<string>;\n };\n /**\n * Controls interactive prompting capability and default behavior.\n * - `'supported'` — runtime can handle prompts; caller (flag/pref) decides whether to prompt. This is the default when `prompt` is provided.\n * - `'unsupported'` — runtime cannot handle prompts; hard veto that nothing can override.\n * - `'forced'` — runtime supports prompts and forces them by default (prompts even for provided values).\n * - `'disabled'` — runtime supports prompts but suppresses them by default.\n *\n * `'unsupported'` is the only immutable state. For the others, the `--interactive`/`-i` flag\n * and `cli()` preferences can override the default behavior.\n */\n interactive?: InteractiveMode;\n /**\n * Prompt the user for input. Called during `cli()` for fields marked as interactive.\n * When `interactive` is `true` and this is not provided, defaults to an Enquirer-based terminal prompt.\n */\n prompt?: (config: InteractivePromptConfig) => Promise<unknown>;\n /**\n * Read a line of input from the user. Used by `repl()` for custom runtimes\n * (web UIs, chat interfaces, testing).\n * Returns the input string, `null` on EOF (e.g. Ctrl+D, closed connection),\n * or `REPL_SIGINT` when the user presses Ctrl+C.\n *\n * When not provided, `repl()` uses a built-in Node.js readline session\n * with command history (up/down arrows) and tab completion.\n */\n readLine?: (prompt: string) => Promise<string | typeof REPL_SIGINT | null>;\n\n /**\n * Register a callback for process signals. Returns an unsubscribe function.\n * The default runtime wires this to `process.on('SIGINT' | 'SIGTERM' | 'SIGHUP')`.\n * Non-Node runtimes (web UIs, tests) can map their own cancellation semantics.\n *\n * When not provided, signal handling is disabled for this runtime.\n */\n onSignal?: (callback: (signal: PadroneSignal) => void) => () => void;\n\n /**\n * Terminal/output capabilities. Used for ANSI detection, text wrapping, and TTY checks.\n * The default runtime auto-detects from `process.stdout`. Non-terminal runtimes\n * (web UIs, tests) should provide explicit values.\n */\n terminal?: {\n /** Number of columns in the terminal. Used for text wrapping. */\n columns?: number;\n /** Whether stdout is a TTY. Affects ANSI color output and interactive features. */\n isTTY?: boolean;\n };\n\n /**\n * Force-exit the process. The default runtime wires this to `process.exit()`.\n * Non-Node runtimes can throw an error or no-op.\n */\n exit?: (code: number) => never;\n};\n\n/**\n * Internal resolved runtime where all fields are guaranteed to be present.\n * The `prompt`, `interactive`, and `readLine` fields remain optional since not all runtimes provide them.\n */\nexport type ResolvedPadroneRuntime = Required<\n Omit<PadroneRuntime, 'prompt' | 'interactive' | 'readLine' | 'stdin' | 'theme' | 'onSignal' | 'terminal' | 'exit'>\n> &\n Pick<PadroneRuntime, 'prompt' | 'interactive' | 'readLine' | 'stdin' | 'theme' | 'onSignal' | 'terminal' | 'exit'>;\n\n/**\n * Sentinel value returned by the terminal REPL session when Ctrl+C is pressed.\n * Distinguished from empty string (user pressed enter) and null (EOF/Ctrl+D).\n */\nexport const REPL_SIGINT = Symbol('REPL_SIGINT');\n\n/**\n * Internal session config for the REPL's persistent readline interface.\n */\nexport type ReplSessionConfig = {\n completer?: (line: string) => [string[], string];\n history?: string[];\n};\n","import { readStreamAsText } from '../util/stream.ts';\nimport type {\n InteractiveMode,\n InteractivePromptConfig,\n PadroneRuntime,\n PadroneSignal,\n ReplSessionConfig,\n ResolvedPadroneRuntime,\n} from './runtime.ts';\nimport { REPL_SIGINT } from './runtime.ts';\n\n/**\n * Default terminal prompt implementation powered by Enquirer.\n * Lazily imported to avoid loading Enquirer when not needed.\n */\nasync function defaultTerminalPrompt(config: InteractivePromptConfig): Promise<unknown> {\n const Enquirer = (await import('enquirer')).default;\n\n const question: Record<string, unknown> = {\n type: config.type,\n name: config.name,\n message: config.message,\n };\n\n if (config.default !== undefined) {\n question.initial = config.default;\n }\n\n if (config.choices) {\n question.choices = config.choices.map((c) => ({\n name: String(c.value),\n message: c.label,\n }));\n }\n\n const response = (await Enquirer.prompt(question as any)) as Record<string, unknown>;\n return response[config.name];\n}\n\nexport function createTerminalReplSession(config: ReplSessionConfig) {\n // History accumulates across per-call interfaces, giving us\n // up/down arrow navigation without a persistent stdin listener\n // that would conflict with Enquirer or other stdin consumers.\n let history: string[] = config.history ? [...config.history] : [];\n let currentCompleter = config.completer;\n\n return {\n /** Update the tab completer (e.g. when REPL scope changes). Takes effect on the next question. */\n set completer(fn: ((line: string) => [string[], string]) | undefined) {\n currentCompleter = fn;\n },\n async question(prompt: string): Promise<string | typeof REPL_SIGINT | null> {\n const { createInterface } = await import('node:readline');\n const opts: Record<string, unknown> = {\n input: process.stdin,\n output: process.stdout,\n terminal: true,\n history: [...history],\n historySize: Math.max(history.length, 1000),\n };\n if (currentCompleter) {\n opts.completer = currentCompleter;\n }\n const rl = createInterface(opts as any);\n\n return new Promise((resolve) => {\n let resolved = false;\n const settle = (value: string | typeof REPL_SIGINT | null) => {\n if (resolved) return;\n resolved = true;\n rl.close();\n resolve(value);\n };\n\n rl.question(prompt, (answer) => {\n // Grab updated history (includes the new entry) before closing.\n if (Array.isArray((rl as any).history)) history = [...(rl as any).history];\n settle(answer);\n });\n // Ctrl+C: cancel current line, print newline, resolve SIGINT sentinel.\n rl.once('SIGINT', () => {\n process.stdout.write('\\n');\n settle(REPL_SIGINT);\n });\n // EOF (Ctrl+D) fires close without the question callback.\n rl.once('close', () => {\n // Write newline so zsh doesn't show '%' (partial-line indicator).\n process.stdout.write('\\n');\n settle(null);\n });\n });\n },\n close() {\n // No persistent interface to clean up.\n },\n };\n}\n\n/**\n * Auto-detect interactive mode when not explicitly set.\n * Returns 'disabled' in CI environments or non-TTY contexts, 'supported' otherwise.\n */\nfunction detectInteractiveMode(): InteractiveMode {\n if (typeof process === 'undefined') return 'disabled';\n if (process.env.CI || process.env.CONTINUOUS_INTEGRATION) return 'disabled';\n if (!process.stdout?.isTTY) return 'disabled';\n return 'supported';\n}\n\n/**\n * Creates a default stdin reader from `process.stdin`.\n * Only created when a command actually declares a `stdin` meta field.\n */\nfunction createDefaultStdin(): NonNullable<PadroneRuntime['stdin']> {\n return {\n get isTTY() {\n // process.stdin.isTTY is `true` when interactive terminal, `undefined` when piped/redirected.\n // Node.js never sets it to `false` — it's either `true` or absent.\n if (typeof process === 'undefined') return true;\n return process.stdin?.isTTY === true;\n },\n async text() {\n if (typeof process === 'undefined') return '';\n return readStreamAsText(process.stdin);\n },\n async *lines() {\n if (typeof process === 'undefined') return;\n const { createInterface } = await import('node:readline');\n const rl = createInterface({ input: process.stdin });\n try {\n for await (const line of rl) {\n yield line;\n }\n } finally {\n rl.close();\n }\n },\n };\n}\n\n/**\n * Default signal listener that wires to `process.on(signal)`.\n * Returns an unsubscribe function that removes all listeners.\n */\nfunction defaultOnSignal(callback: (signal: PadroneSignal) => void): () => void {\n if (typeof process === 'undefined') return () => {};\n const signals: PadroneSignal[] = ['SIGINT', 'SIGTERM', 'SIGHUP'];\n const handlers = new Map<PadroneSignal, () => void>();\n for (const sig of signals) {\n const handler = () => callback(sig);\n handlers.set(sig, handler);\n process.on(sig, handler);\n }\n return () => {\n for (const [sig, handler] of handlers) {\n process.removeListener(sig, handler);\n }\n };\n}\n\n/**\n * Creates the default Node.js/Bun runtime.\n */\nfunction defaultExit(code: number): never {\n if (typeof process !== 'undefined') process.exit(code);\n throw new Error(`Exit with code ${code}`);\n}\n\nfunction getTerminalInfo(): PadroneRuntime['terminal'] {\n if (typeof process === 'undefined') return undefined;\n return {\n get columns() {\n return process.stdout?.columns;\n },\n get isTTY() {\n return process.stdout?.isTTY === true;\n },\n };\n}\n\nexport function createDefaultRuntime(): ResolvedPadroneRuntime {\n return {\n output: (...args) => console.log(...args),\n error: (text) => console.error(text),\n argv: () => (typeof process !== 'undefined' ? process.argv.slice(2) : []),\n env: () => (typeof process !== 'undefined' ? (process.env as Record<string, string | undefined>) : {}),\n format: 'auto',\n prompt: defaultTerminalPrompt,\n interactive: detectInteractiveMode(),\n onSignal: defaultOnSignal,\n terminal: getTerminalInfo(),\n exit: defaultExit,\n };\n}\n\n/**\n * Returns the stdin abstraction: custom runtime stdin > default process.stdin.\n * Returns `undefined` when no custom stdin is provided and process.stdin is not piped.\n */\nexport function resolveStdin(partial?: PadroneRuntime): NonNullable<PadroneRuntime['stdin']> | undefined {\n if (partial?.stdin) return partial.stdin;\n const defaultStdin = createDefaultStdin();\n // Only use default stdin if it's actually piped (isTTY === false).\n // This avoids accidentally blocking on stdin in tests/CI.\n if (defaultStdin.isTTY) return undefined;\n return defaultStdin;\n}\n\n/**\n * Like `resolveStdin`, but always returns a stdin source even when it's a TTY.\n * Used for async streams which support interactive (non-piped) input.\n */\nexport function resolveStdinAlways(partial?: PadroneRuntime): NonNullable<PadroneRuntime['stdin']> {\n if (partial?.stdin) return partial.stdin;\n return createDefaultStdin();\n}\n\n/**\n * Merges a partial runtime with the default runtime.\n */\nexport function resolveRuntime(partial?: PadroneRuntime): ResolvedPadroneRuntime {\n const defaults = createDefaultRuntime();\n if (!partial) return defaults;\n return {\n output: partial.output ?? defaults.output,\n error: partial.error ?? defaults.error,\n argv: partial.argv ?? defaults.argv,\n env: partial.env ?? defaults.env,\n format: partial.format ?? defaults.format,\n interactive: partial.interactive ?? defaults.interactive,\n prompt: partial.prompt ?? defaults.prompt,\n readLine: partial.readLine ?? defaults.readLine,\n stdin: partial.stdin,\n theme: partial.theme,\n onSignal: partial.onSignal ?? defaults.onSignal,\n terminal: partial.terminal ?? defaults.terminal,\n exit: partial.exit ?? defaults.exit,\n };\n}\n","import type { AnyPadroneCommand } from '../types/index.ts';\nimport { extractSchemaMetadata, getJsonSchema } from './args.ts';\nimport { resolveRuntime } from './default-runtime.ts';\nimport type { ResolvedPadroneRuntime } from './runtime.ts';\n\n// ---------------------------------------------------------------------------\n// Lazy command resolution\n// ---------------------------------------------------------------------------\n\nexport const lazyResolver = Symbol('lazyResolver');\n\n/** Resolves a lazy command in place by calling its stored resolver. No-op if already resolved. */\nexport function resolveCommand(cmd: AnyPadroneCommand): AnyPadroneCommand {\n const resolver = (cmd as any)[lazyResolver];\n if (resolver) {\n delete (cmd as any)[lazyResolver];\n resolver(cmd);\n }\n return cmd;\n}\n\n/** Recursively resolves a command and all its descendants. */\nexport function resolveAllCommands(cmd: AnyPadroneCommand): void {\n resolveCommand(cmd);\n if (cmd.commands) {\n for (const sub of cmd.commands) resolveAllCommands(sub);\n }\n}\n\n/** Checks whether a value is a Padrone program/builder. */\nexport function isPadroneProgram(value: unknown): value is object {\n return !!value && typeof value === 'object' && commandSymbol in value;\n}\n\n/** Extracts the underlying command from a program/builder and resolves the full command tree. */\nexport function getCommand(program: object): AnyPadroneCommand {\n const cmd = commandSymbol in program ? ((program as any)[commandSymbol] as AnyPadroneCommand) : (program as AnyPadroneCommand);\n resolveAllCommands(cmd);\n return cmd;\n}\n\nexport const commandSymbol = Symbol('padrone_command');\n\n/** Config keys that are merged when overriding a command. */\nexport const configKeys = ['title', 'description', 'version', 'deprecated', 'hidden', 'mutation', 'needsApproval'] as const;\n\n/**\n * Merges an existing command with an override.\n * - Config fields are shallow-merged (new overrides old).\n * - Action, arguments, meta, config schema, env schema are taken from the override if set.\n * - Subcommands are recursively merged by name.\n */\nexport function mergeCommands(existing: AnyPadroneCommand, override: AnyPadroneCommand): AnyPadroneCommand {\n resolveCommand(existing);\n resolveCommand(override);\n const merged: AnyPadroneCommand = { ...existing };\n\n // Merge config fields\n for (const key of configKeys) {\n if (override[key] !== undefined) (merged as any)[key] = override[key];\n }\n\n // Override fields: take from override if explicitly set (not inherited from existing via spread)\n if (override.action !== existing.action) merged.action = override.action;\n if (override.argsSchema !== existing.argsSchema) merged.argsSchema = override.argsSchema;\n if (override.meta !== existing.meta) merged.meta = override.meta;\n if (override.isAsync !== existing.isAsync) merged.isAsync = override.isAsync || existing.isAsync;\n if (override.runtime !== existing.runtime) merged.runtime = override.runtime;\n if (override.interceptors !== existing.interceptors) merged.interceptors = override.interceptors;\n if (override.aliases !== existing.aliases) merged.aliases = override.aliases;\n // Recursively merge subcommands by name\n if (override.commands) {\n const baseCommands = [...(existing.commands || [])];\n for (const overrideChild of override.commands) {\n const existingIndex = baseCommands.findIndex((c) => c.name === overrideChild.name);\n if (existingIndex >= 0) {\n baseCommands[existingIndex] = mergeCommands(baseCommands[existingIndex]!, overrideChild);\n } else {\n baseCommands.push(overrideChild);\n }\n }\n merged.commands = baseCommands;\n }\n\n return merged;\n}\n\n/**\n * Resolves the runtime for a command by walking up the parent chain.\n * Returns a fully resolved runtime with all defaults filled in.\n */\nexport function getCommandRuntime(cmd: AnyPadroneCommand): ResolvedPadroneRuntime {\n let current: AnyPadroneCommand | undefined = cmd;\n while (current) {\n if (current.runtime) return resolveRuntime(current.runtime);\n current = current.parent;\n }\n return resolveRuntime();\n}\n\n/**\n * Recursively re-paths a command tree under a new parent path, updating parent references.\n */\nexport function repathCommandTree(\n cmd: AnyPadroneCommand,\n newName: string,\n parentPath: string,\n parent: AnyPadroneCommand,\n): AnyPadroneCommand {\n resolveCommand(cmd);\n const newPath = parentPath ? `${parentPath} ${newName}` : newName;\n const remounted: AnyPadroneCommand = {\n ...cmd,\n name: newName,\n path: newPath,\n parent,\n version: undefined,\n };\n\n if (cmd.commands?.length) {\n remounted.commands = cmd.commands.map((child) => repathCommandTree(child, child.name, newPath, remounted));\n }\n\n return remounted;\n}\n\n/**\n * Builds a completer function for the REPL from the command tree.\n * Completes command names, subcommand names, option names (--foo), and aliases (-f).\n * Also includes dot-prefixed built-in REPL commands (.exit, .clear, .scope, .help, .history).\n */\nexport function buildReplCompleter(\n rootCommand: AnyPadroneCommand,\n builtins: {\n inScope?: boolean;\n },\n): (line: string) => [string[], string] {\n resolveAllCommands(rootCommand);\n return (line: string): [string[], string] => {\n const trimmed = line.trimStart();\n const parts = trimmed.split(/\\s+/);\n const lastPart = parts[parts.length - 1] ?? '';\n\n // If we're completing a dot-command\n if (lastPart.startsWith('.')) {\n const dotCmds = ['.exit', '.clear', '.help', '.history'];\n if (rootCommand.commands?.some((c) => c.commands?.length) || builtins.inScope) dotCmds.push('.scope');\n const hits = dotCmds.filter((c) => c.startsWith(lastPart));\n return [hits.length ? hits : dotCmds, lastPart];\n }\n\n // If we're completing an option (starts with -)\n if (lastPart.startsWith('-')) {\n // Find which command we're in\n const commandParts = parts.slice(0, -1).filter((p) => !p.startsWith('-'));\n let targetCommand = rootCommand;\n for (const part of commandParts) {\n resolveCommand(targetCommand);\n const sub = targetCommand.commands?.find((c) => c.name === part || c.aliases?.includes(part));\n if (sub) {\n resolveCommand(sub);\n targetCommand = sub;\n } else break;\n }\n\n // Get options for this command\n const options: string[] = [];\n if (targetCommand.argsSchema) {\n try {\n const argsMeta = targetCommand.meta?.fields;\n const { flags, aliases } = extractSchemaMetadata(targetCommand.argsSchema, argsMeta, targetCommand.meta?.autoAlias);\n const jsonSchema = getJsonSchema(targetCommand.argsSchema) as Record<string, any>;\n if (jsonSchema.type === 'object' && jsonSchema.properties) {\n for (const key of Object.keys(jsonSchema.properties)) {\n options.push(`--${key}`);\n }\n for (const flag of Object.keys(flags)) {\n options.push(`-${flag}`);\n }\n for (const alias of Object.keys(aliases)) {\n options.push(`--${alias}`);\n }\n }\n } catch {\n // Ignore schema parsing errors\n }\n }\n // Add global flags\n options.push('--help', '-h');\n\n const hits = options.filter((o) => o.startsWith(lastPart));\n return [hits.length ? hits : options, lastPart];\n }\n\n // Completing command names\n const commandParts = parts.filter((p) => !p.startsWith('-'));\n // Walk into subcommands for all but the last token\n let targetCommand = rootCommand;\n for (let i = 0; i < commandParts.length - 1; i++) {\n resolveCommand(targetCommand);\n const sub = targetCommand.commands?.find((c) => c.name === commandParts[i] || c.aliases?.includes(commandParts[i]!));\n if (sub) {\n resolveCommand(sub);\n targetCommand = sub;\n } else break;\n }\n\n const candidates: string[] = [];\n\n // Add subcommand names and aliases\n if (targetCommand.commands) {\n for (const cmd of targetCommand.commands) {\n if (!cmd.hidden) {\n candidates.push(cmd.name);\n if (cmd.aliases) candidates.push(...cmd.aliases);\n }\n }\n }\n\n // Add dot-commands and `..` shorthand at the root level (relative to current scope)\n if (targetCommand === rootCommand) {\n candidates.push('.help', '.exit', '.clear', '.history');\n if (rootCommand.commands?.some((c) => c.commands?.length) || builtins.inScope) candidates.push('.scope');\n if (builtins.inScope) candidates.push('..');\n }\n\n const hits = candidates.filter((c) => c.startsWith(lastPart));\n return [hits.length ? hits : candidates, lastPart];\n };\n}\n\n/**\n * Computes the Levenshtein edit distance between two strings.\n */\nfunction levenshtein(a: string, b: string): number {\n const m = a.length;\n const n = b.length;\n const dp: number[] = Array.from({ length: n + 1 }, (_, i) => i);\n\n for (let i = 1; i <= m; i++) {\n let prev = dp[0]!;\n dp[0] = i;\n for (let j = 1; j <= n; j++) {\n const temp = dp[j]!;\n dp[j] = a[i - 1] === b[j - 1] ? prev : 1 + Math.min(prev, dp[j]!, dp[j - 1]!);\n prev = temp;\n }\n }\n\n return dp[n]!;\n}\n\n/**\n * Finds close matches from a list of candidates using Levenshtein distance\n * and prefix/substring matching (for inputs longer than 3 characters).\n * Returns up to 3 matching candidate names (raw, unformatted).\n */\nexport function suggestSimilar(input: string, candidates: string[]): string[] {\n if (candidates.length === 0) return [];\n\n const lower = input.toLowerCase();\n const matches: { candidate: string; score: number }[] = [];\n\n for (const candidate of candidates) {\n const candidateLower = candidate.toLowerCase();\n if (candidateLower === lower) continue;\n\n const dist = levenshtein(lower, candidateLower);\n const maxLen = Math.max(input.length, candidate.length);\n const threshold = Math.min(3, Math.max(1, Math.ceil(maxLen * 0.4)));\n\n if (dist > 0 && dist <= threshold) {\n matches.push({ candidate, score: dist });\n } else if (lower.length >= 3) {\n // Prefix or substring match for longer inputs\n if (candidateLower.startsWith(lower) || candidateLower.includes(lower)) {\n matches.push({ candidate, score: threshold + 1 });\n }\n }\n }\n\n matches.sort((a, b) => a.score - b.score);\n return matches.slice(0, 3).map((m) => m.candidate);\n}\n\nexport function findCommandByName(name: string, commands?: AnyPadroneCommand[]): AnyPadroneCommand | undefined {\n if (!commands) return undefined;\n\n const foundByName = commands.find((cmd) => cmd.name === name);\n if (foundByName) return resolveCommand(foundByName);\n\n // Check for aliases\n const foundByAlias = commands.find((cmd) => cmd.aliases?.includes(name));\n if (foundByAlias) return resolveCommand(foundByAlias);\n\n for (const cmd of commands) {\n if (name.startsWith(`${cmd.name} `)) {\n resolveCommand(cmd);\n if (cmd.commands) {\n const subCommandName = name.slice(cmd.name.length + 1);\n const subCommand = findCommandByName(subCommandName, cmd.commands);\n if (subCommand) return subCommand;\n }\n }\n // Check aliases for nested commands\n if (cmd.aliases) {\n for (const alias of cmd.aliases) {\n if (name.startsWith(`${alias} `)) {\n resolveCommand(cmd);\n if (cmd.commands) {\n const subCommandName = name.slice(alias.length + 1);\n const subCommand = findCommandByName(subCommandName, cmd.commands);\n if (subCommand) return subCommand;\n }\n }\n }\n }\n }\n return undefined;\n}\n\n// ---------------------------------------------------------------------------\n// Shared utilities for MCP and serve\n// ---------------------------------------------------------------------------\n\nexport type CollectedEndpoint = { name: string; command: AnyPadroneCommand };\n\n/** Collect all actionable commands recursively. Hidden commands are excluded. */\nexport function collectEndpoints(commands: AnyPadroneCommand[] | undefined, prefix: string): CollectedEndpoint[] {\n if (!commands) return [];\n const endpoints: CollectedEndpoint[] = [];\n for (const cmd of commands) {\n resolveCommand(cmd);\n if (cmd.hidden) continue;\n const path = cmd.name ? (prefix ? `${prefix}.${cmd.name}` : cmd.name) : prefix;\n if (cmd.action || cmd.argsSchema) {\n endpoints.push({ name: path, command: cmd });\n }\n if (cmd.commands?.length) {\n endpoints.push(...collectEndpoints(cmd.commands, path));\n }\n }\n return endpoints;\n}\n\n/** Build the JSON Schema for a command's arguments. */\nexport function buildInputSchema(cmd: AnyPadroneCommand): Record<string, unknown> {\n if (!cmd.argsSchema) {\n return { type: 'object', additionalProperties: false };\n }\n try {\n return getJsonSchema(cmd.argsSchema) as Record<string, unknown>;\n } catch {\n return { type: 'object', additionalProperties: false };\n }\n}\n\n/** Serialize a record of args into CLI flag strings. */\nexport function serializeArgsToFlags(args: Record<string, unknown>): string[] {\n const parts: string[] = [];\n for (const [key, value] of Object.entries(args)) {\n if (value === undefined) continue;\n if (typeof value === 'boolean') {\n parts.push(value ? `--${key}` : `--no-${key}`);\n } else if (Array.isArray(value)) {\n for (const v of value) parts.push(`--${key}=${String(v)}`);\n } else {\n const strVal = String(value);\n parts.push(strVal.includes(' ') ? `--${key}=\"${strVal}\"` : `--${key}=${strVal}`);\n }\n }\n return parts;\n}\n"],"m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,SAAgB,iBAAiB,UAA2C,QAAqC;AAC/G,KAAI,CAAC,SAAU,QAAO,EAAE;CACxB,MAAM,YAAiC,EAAE;AACzC,MAAK,MAAM,OAAO,UAAU;AAC1B,iBAAe,IAAI;AACnB,MAAI,IAAI,OAAQ;EAChB,MAAM,OAAO,IAAI,OAAQ,SAAS,GAAG,OAAO,GAAG,IAAI,SAAS,IAAI,OAAQ;AACxE,MAAI,IAAI,UAAU,IAAI,WACpB,WAAU,KAAK;GAAE,MAAM;GAAM,SAAS;GAAK,CAAC;AAE9C,MAAI,IAAI,UAAU,OAChB,WAAU,KAAK,GAAG,iBAAiB,IAAI,UAAU,KAAK,CAAC;;AAG3D,QAAO;;;AAIT,SAAgB,iBAAiB,KAAiD;AAChF,KAAI,CAAC,IAAI,WACP,QAAO;EAAE,MAAM;EAAU,sBAAsB;EAAO;AAExD,KAAI;AACF,SAAO,cAAc,IAAI,WAAW;SAC9B;AACN,SAAO;GAAE,MAAM;GAAU,sBAAsB;GAAO;;;;AAK1D,SAAgB,qBAAqB,MAAyC;CAC5E,MAAM,QAAkB,EAAE;AAC1B,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,KAAK,EAAE;AAC/C,MAAI,UAAU,KAAA,EAAW;AACzB,MAAI,OAAO,UAAU,UACnB,OAAM,KAAK,QAAQ,KAAK,QAAQ,QAAQ,MAAM;WACrC,MAAM,QAAQ,MAAM,CAC7B,MAAK,MAAM,KAAK,MAAO,OAAM,KAAK,KAAK,IAAI,GAAG,OAAO,EAAE,GAAG;OACrD;GACL,MAAM,SAAS,OAAO,MAAM;AAC5B,SAAM,KAAK,OAAO,SAAS,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,IAAI,GAAG,SAAS;;;AAGpF,QAAO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-Guyz-CBm.d.mts","names":[],"sources":["../src/types/args-meta.ts","../src/core/runtime.ts","../src/types/schema.ts","../src/util/type-utils.ts","../src/extension/logger.ts","../src/extension/tracing.ts","../src/feature/mcp.ts","../src/feature/serve.ts","../src/feature/wrap.ts","../src/output/help.ts","../src/types/interceptor.ts","../src/types/command.ts","../src/types/preferences.ts","../src/types/result.ts","../src/types/builder.ts"],"mappings":";;;;;KAAK,MAAA;;KA6BO,UAAA,GAAa,MAAA,GAAS,SAAA,CAAU,MAAA;AAAA,UAE3B,gBAAA;EACf,WAAA;EAhCG;EAkCH,KAAA,YAAiB,UAAA,KAAe,UAAA;;EAEhC,KAAA;EApCS;AA6BX;;;;;;;;EAiBE,QAAA;EACA,UAAA;EACA,MAAA;EACA,QAAA;EApBgD;EAsBhD,KAAA;AAAA;AAAA,KAGG,cAAA,SACH,IAAA,SAAa,MAAA,8BAEK,IAAA,GAAO,WAAA,CAAY,IAAA,CAAK,CAAA,WAAY,KAAA,cAAmB,CAAA,eAAgB,CAAA,aAAc,CAAA,kBAC3F,IAAA;;;;;;;;;;;;AANb;;;;;;;KA2BW,WAAA,QAAmB,MAAA,uBAA6B,IAAA;AAAA,UAE3C,qBAAA,QAA6B,MAAA;EAxBU;;;;;EA8BtD,UAAA,YAAsB,cAAA,CAAe,IAAA;EA7BrB;;;EAiChB,MAAA,iBAAuB,IAAA,IAAQ,gBAAA;EAlCN;;;;;;;;;;AAsB3B;;;;;EA4BE,SAAA;EA5B0D;;;AAE5D;;;;;;;;;;;;;;;;EA8CE,KAAA,GAAQ,WAAA,CAAY,IAAA;EAxCE;;;;;;;;;;;;;;;;EAyDtB,WAAA,0BAAqC,IAAA;;;AC5IvC;;;;;AAGA;;;;;;;EDwJE,mBAAA,0BAA6C,IAAA;AAAA;;;;KC3JnC,aAAA;;KAGA,qBAAA;EAA4C,OAAA;EAAkB,QAAA;EAAmB,aAAA;EAAyB,IAAA;AAAA;;;;;KAM1G,wBAAA;EDgB+B;;;;;;;AAE3C;;;;;;;ECHE,MAAA,GAAS,KAAA,EAAO,qBAAA,WDQhB;ECNA,OAAA,GAAU,OAAA,kBAAyB,OAAA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