@bastani/atomic 0.8.24-alpha.1 → 0.8.24-alpha.3

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 (63) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +2 -1
  3. package/dist/builtin/intercom/CHANGELOG.md +12 -0
  4. package/dist/builtin/intercom/package.json +1 -1
  5. package/dist/builtin/mcp/CHANGELOG.md +12 -0
  6. package/dist/builtin/mcp/package.json +1 -1
  7. package/dist/builtin/subagents/CHANGELOG.md +16 -0
  8. package/dist/builtin/subagents/README.md +132 -21
  9. package/dist/builtin/subagents/package.json +1 -1
  10. package/dist/builtin/subagents/prompts/parallel-context-build.md +4 -2
  11. package/dist/builtin/subagents/prompts/parallel-handoff-plan.md +3 -1
  12. package/dist/builtin/subagents/skills/subagent/SKILL.md +49 -11
  13. package/dist/builtin/subagents/src/agents/agent-management.ts +79 -16
  14. package/dist/builtin/subagents/src/agents/agents.ts +47 -16
  15. package/dist/builtin/subagents/src/agents/chain-serializer.ts +114 -0
  16. package/dist/builtin/subagents/src/extension/schemas.ts +139 -3
  17. package/dist/builtin/subagents/src/runs/background/async-execution.ts +92 -6
  18. package/dist/builtin/subagents/src/runs/background/async-status.ts +11 -1
  19. package/dist/builtin/subagents/src/runs/background/run-status.ts +4 -1
  20. package/dist/builtin/subagents/src/runs/background/subagent-runner.ts +529 -32
  21. package/dist/builtin/subagents/src/runs/foreground/chain-execution.ts +361 -118
  22. package/dist/builtin/subagents/src/runs/foreground/execution.ts +75 -7
  23. package/dist/builtin/subagents/src/runs/foreground/subagent-executor.ts +33 -0
  24. package/dist/builtin/subagents/src/runs/shared/acceptance.ts +611 -0
  25. package/dist/builtin/subagents/src/runs/shared/chain-outputs.ts +101 -0
  26. package/dist/builtin/subagents/src/runs/shared/dynamic-fanout.ts +293 -0
  27. package/dist/builtin/subagents/src/runs/shared/parallel-utils.ts +29 -1
  28. package/dist/builtin/subagents/src/runs/shared/pi-args.ts +11 -0
  29. package/dist/builtin/subagents/src/runs/shared/structured-output.ts +79 -0
  30. package/dist/builtin/subagents/src/runs/shared/subagent-prompt-runtime.ts +52 -2
  31. package/dist/builtin/subagents/src/runs/shared/workflow-graph.ts +206 -0
  32. package/dist/builtin/subagents/src/shared/formatters.ts +2 -2
  33. package/dist/builtin/subagents/src/shared/settings.ts +53 -4
  34. package/dist/builtin/subagents/src/shared/types.ts +226 -0
  35. package/dist/builtin/subagents/src/shared/utils.ts +2 -1
  36. package/dist/builtin/subagents/src/slash/slash-commands.ts +41 -3
  37. package/dist/builtin/subagents/src/tui/render.ts +152 -34
  38. package/dist/builtin/web-access/CHANGELOG.md +12 -0
  39. package/dist/builtin/web-access/package.json +1 -1
  40. package/dist/builtin/workflows/CHANGELOG.md +16 -0
  41. package/dist/builtin/workflows/ambient.d.ts +36 -0
  42. package/dist/builtin/workflows/package.json +1 -1
  43. package/dist/builtin/workflows/skills/create-spec/SKILL.md +1 -1
  44. package/dist/builtin/workflows/src/authoring.d.ts +197 -0
  45. package/dist/builtin/workflows/src/runs/shared/model-fallback.ts +11 -1
  46. package/dist/builtin/workflows/src/shared/authoring-contract.d.ts +523 -0
  47. package/dist/builtin/workflows/src/tui/stage-chat-view.ts +0 -1
  48. package/dist/core/slash-commands.d.ts.map +1 -1
  49. package/dist/core/slash-commands.js +1 -0
  50. package/dist/core/slash-commands.js.map +1 -1
  51. package/dist/core/system-prompt.d.ts.map +1 -1
  52. package/dist/core/system-prompt.js +4 -3
  53. package/dist/core/system-prompt.js.map +1 -1
  54. package/dist/index.d.ts +1 -0
  55. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  56. package/dist/modes/interactive/interactive-mode.js +1 -1
  57. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  58. package/docs/packages.md +2 -2
  59. package/docs/usage.md +1 -0
  60. package/docs/workflows.md +198 -2
  61. package/package.json +20 -1
  62. package/dist/builtin/workflows/src/authoring.ts +0 -410
  63. package/dist/builtin/workflows/src/shared/authoring-contract.ts +0 -660
@@ -0,0 +1,523 @@
1
+ /**
2
+ * Dependency-light workflow authoring contract shared by the runtime type graph
3
+ * and the standalone package typing surface.
4
+ *
5
+ * This module intentionally imports only TypeBox types. Do not import
6
+ * @bastani/atomic, executor internals, stores, or runtime graph modules here.
7
+ */
8
+ import type { Static, TOptional, TSchema } from "typebox";
9
+ export type { Static, TSchema };
10
+ export type WorkflowSerializablePrimitive = string | number | boolean | null;
11
+ export type WorkflowSerializableValue = WorkflowSerializablePrimitive | readonly WorkflowSerializableValue[] | WorkflowSerializableObject;
12
+ export interface WorkflowSerializableObject {
13
+ /**
14
+ * Optional properties use `undefined` at the type level for ergonomic
15
+ * intellisense, but workflow runtime validation rejects actual `undefined`
16
+ * values in returned/input objects. Omit optional keys instead.
17
+ */
18
+ readonly [key: string]: WorkflowSerializableValue | undefined;
19
+ }
20
+ export type WorkflowInputValues = WorkflowSerializableObject;
21
+ export type WorkflowOutputValues = WorkflowSerializableObject;
22
+ export type WorkflowRunOutput = WorkflowOutputValues;
23
+ export type WorkflowInputSchemaMap = Readonly<Record<string, TSchema>>;
24
+ export type WorkflowOutputSchemaMap = Readonly<Record<string, TSchema>>;
25
+ export type WorkflowInputSchema = TSchema;
26
+ export type WorkflowOutputSchema = TSchema;
27
+ export type WorkflowOutputMode = "inline" | "file-only";
28
+ export type WorkflowContextMode = "fresh" | "fork";
29
+ export type WorkflowThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
30
+ export type WorkflowExecutionMode = "interactive" | "non_interactive";
31
+ export type RunStatus = "pending" | "running" | "paused" | "completed" | "failed" | "killed";
32
+ export type WorkflowDetailsMode = "named" | "single" | "parallel" | "chain" | "inspection" | "control";
33
+ export type WorkflowDetailsStatus = "accepted" | "running" | "completed" | "failed" | "killed" | "noop";
34
+ export type WorkflowAction = "list" | "get" | "inputs" | "run" | "status" | "interrupt" | "resume";
35
+ export interface WorkflowModelFallbackFields {
36
+ /** Ordered model IDs to try after `model` fails; entries may use `:off|minimal|low|medium|high|xhigh` reasoning suffixes. */
37
+ readonly fallbackModels?: readonly string[];
38
+ /** Optional deprecated compatibility helper aligned to `fallbackModels`; ignored for entries with a reasoning suffix. */
39
+ readonly fallbackThinkingLevels?: readonly string[];
40
+ }
41
+ export type WorkflowModelValue = string | object;
42
+ export interface WorkflowModelUsage extends WorkflowSerializableObject {
43
+ readonly input?: number;
44
+ readonly output?: number;
45
+ readonly cacheRead?: number;
46
+ readonly cacheWrite?: number;
47
+ readonly cost?: number;
48
+ readonly turns?: number;
49
+ }
50
+ export interface WorkflowModelAttempt extends WorkflowSerializableObject {
51
+ readonly model: string;
52
+ readonly success: boolean;
53
+ readonly reasoningLevel?: WorkflowThinkingLevel;
54
+ readonly error?: string;
55
+ readonly usage?: WorkflowModelUsage;
56
+ }
57
+ export interface WorkflowModelInfo {
58
+ readonly provider: string;
59
+ readonly id: string;
60
+ readonly fullId: string;
61
+ readonly model?: WorkflowModelValue;
62
+ }
63
+ export interface WorkflowModelCatalogPort {
64
+ listModels(): Promise<readonly WorkflowModelInfo[]>;
65
+ readonly currentModel?: WorkflowModelValue;
66
+ readonly preferredProvider?: string;
67
+ recordWarning?: (warning: string) => void;
68
+ }
69
+ export interface WorkflowMaxOutput {
70
+ readonly bytes?: number;
71
+ readonly lines?: number;
72
+ }
73
+ export interface StageMcpOptions {
74
+ readonly allow?: readonly string[];
75
+ readonly deny?: readonly string[];
76
+ }
77
+ export interface WorkflowAgentToolResult<TDetails = unknown> {
78
+ readonly content: unknown;
79
+ readonly details?: TDetails;
80
+ }
81
+ export interface WorkflowCustomToolDefinition<TParams extends TSchema = TSchema, TDetails = unknown> {
82
+ readonly name: string;
83
+ readonly label: string;
84
+ readonly description: string;
85
+ readonly promptSnippet?: string;
86
+ readonly promptGuidelines?: readonly string[];
87
+ readonly parameters: TParams;
88
+ readonly renderShell?: "default" | "self";
89
+ readonly prepareArguments?: (args: unknown) => Static<TParams>;
90
+ readonly executionMode?: "sequential" | "parallel";
91
+ execute(toolCallId: string, params: Static<TParams>, signal: AbortSignal | undefined, onUpdate: ((update: WorkflowAgentToolResult<TDetails>) => void) | undefined, ctx: object): Promise<WorkflowAgentToolResult<TDetails>>;
92
+ }
93
+ export interface WorkflowScopedModel {
94
+ readonly model: WorkflowModelValue;
95
+ /** @deprecated Prefer suffixing model/fallbackModels entries with `:level`; removal is deferred. */
96
+ readonly thinkingLevel?: WorkflowThinkingLevel;
97
+ }
98
+ export interface WorkflowFastModeSettings extends WorkflowSerializableObject {
99
+ readonly enabled?: boolean;
100
+ readonly model?: string;
101
+ }
102
+ export interface WorkflowFastModeSettingsManager {
103
+ getCodexFastModeSettings(): WorkflowFastModeSettings;
104
+ }
105
+ export interface StageOptions extends WorkflowModelFallbackFields {
106
+ readonly model?: WorkflowModelValue;
107
+ readonly mcp?: StageMcpOptions;
108
+ readonly tools?: readonly string[];
109
+ readonly noTools?: "all" | "builtin";
110
+ readonly excludedTools?: readonly string[];
111
+ readonly customTools?: readonly WorkflowCustomToolDefinition[];
112
+ readonly cwd?: string;
113
+ readonly agentDir?: string;
114
+ readonly scopedModels?: readonly WorkflowScopedModel[];
115
+ readonly sessionManager?: never;
116
+ readonly settingsManager?: never;
117
+ readonly context?: WorkflowContextMode;
118
+ readonly forkFromSessionFile?: string;
119
+ readonly gitWorktreeDir?: string;
120
+ readonly baseBranch?: string;
121
+ readonly sessionDir?: string;
122
+ /** @deprecated Prefer suffixing model/fallbackModels entries with `:level`; removal is deferred. */
123
+ readonly thinkingLevel?: WorkflowThinkingLevel;
124
+ }
125
+ export interface CompleteStageOpts extends WorkflowModelFallbackFields {
126
+ readonly model?: WorkflowModelValue;
127
+ readonly maxTokens?: number;
128
+ }
129
+ export interface StageOutputOptions {
130
+ readonly output?: string | false;
131
+ readonly outputMode?: WorkflowOutputMode;
132
+ readonly context?: WorkflowContextMode;
133
+ readonly cwd?: string;
134
+ readonly maxOutput?: WorkflowMaxOutput;
135
+ readonly artifacts?: boolean;
136
+ readonly sessionDir?: string;
137
+ }
138
+ export type WorkflowInputSource = "interactive" | "rpc" | "extension";
139
+ export type WorkflowStreamingBehavior = "steer" | "followUp";
140
+ export type WorkflowImageContent = object;
141
+ export interface PromptOptions {
142
+ readonly expandPromptTemplates?: boolean;
143
+ readonly images?: readonly WorkflowImageContent[];
144
+ readonly streamingBehavior?: WorkflowStreamingBehavior;
145
+ readonly source?: WorkflowInputSource;
146
+ readonly preflightResult?: (success: boolean) => void;
147
+ }
148
+ export type StagePromptOptions = PromptOptions & StageOutputOptions;
149
+ export interface WorkflowExecutionPolicy {
150
+ readonly mode: WorkflowExecutionMode;
151
+ readonly allowHumanInput: boolean;
152
+ readonly awaitTerminalRun: boolean;
153
+ readonly allowInputPicker: boolean;
154
+ }
155
+ export interface WorkflowMcpPort {
156
+ setScope(stageId: string, allow: readonly string[] | null, deny: readonly string[] | null): void;
157
+ clearScope(stageId: string): void;
158
+ }
159
+ export interface WorkflowPersistencePort {
160
+ appendEntry(type: string, payload: Record<string, unknown>): string | undefined;
161
+ setLabel?(entryId: string, label: string): void;
162
+ appendCustomMessageEntry?(content: string, meta?: Record<string, unknown>): string | undefined;
163
+ }
164
+ export interface StageSessionRuntime {
165
+ prompt(text: string, options?: PromptOptions): Promise<string | void>;
166
+ steer(text: string): Promise<void>;
167
+ followUp(text: string): Promise<void>;
168
+ subscribe(listener: (event: never) => void): () => void;
169
+ readonly sessionFile: string | undefined;
170
+ readonly sessionId: string;
171
+ setModel(model: WorkflowSerializableValue): Promise<void>;
172
+ setThinkingLevel(level: WorkflowThinkingLevel): void;
173
+ cycleModel(): WorkflowSerializableValue;
174
+ cycleThinkingLevel(): WorkflowThinkingLevel | undefined;
175
+ readonly agent: WorkflowSerializableValue;
176
+ readonly model: WorkflowSerializableValue;
177
+ readonly thinkingLevel: WorkflowThinkingLevel | undefined;
178
+ readonly messages: readonly WorkflowSerializableValue[];
179
+ readonly isStreaming: boolean;
180
+ readonly pendingMessageCount?: number;
181
+ readonly settingsManager?: WorkflowFastModeSettingsManager;
182
+ navigateTree(targetId: string, options?: {
183
+ readonly summarize?: boolean;
184
+ readonly customInstructions?: string;
185
+ readonly replaceInstructions?: boolean;
186
+ readonly label?: string;
187
+ }): Promise<{
188
+ readonly editorText?: string;
189
+ readonly cancelled: boolean;
190
+ }>;
191
+ compact(customInstructions?: string): Promise<object>;
192
+ abortCompaction(): void;
193
+ abort(): Promise<void>;
194
+ dispose(): void | Promise<void>;
195
+ getLastAssistantText?: () => string | undefined;
196
+ }
197
+ export type StageSessionCreateOptions = StageOptions;
198
+ export interface StageSessionCreateResult {
199
+ readonly session: StageSessionRuntime;
200
+ readonly settingsManager?: WorkflowFastModeSettingsManager;
201
+ }
202
+ export interface StageExecutionMeta {
203
+ readonly runId: string;
204
+ readonly stageId: string;
205
+ readonly stageName: string;
206
+ readonly stageOptions?: StageOptions;
207
+ readonly signal?: AbortSignal;
208
+ readonly executionMode?: WorkflowExecutionMode;
209
+ }
210
+ export interface AgentSessionAdapter {
211
+ create(options: StageSessionCreateOptions, meta?: StageExecutionMeta): Promise<StageSessionRuntime | StageSessionCreateResult>;
212
+ }
213
+ export interface PromptAdapter {
214
+ prompt(text: string, meta?: StageExecutionMeta): Promise<string>;
215
+ }
216
+ export interface CompleteAdapter {
217
+ complete(text: string, opts?: CompleteStageOpts, meta?: StageExecutionMeta): Promise<string>;
218
+ }
219
+ export interface StageAdapters {
220
+ readonly agentSession?: AgentSessionAdapter;
221
+ readonly prompt?: PromptAdapter;
222
+ readonly complete?: CompleteAdapter;
223
+ }
224
+ export interface StageContext {
225
+ readonly name: string;
226
+ prompt(text: string, options?: StagePromptOptions): Promise<string>;
227
+ complete(text: string, options?: CompleteStageOpts): Promise<string>;
228
+ steer(text: string): Promise<void>;
229
+ followUp(text: string): Promise<void>;
230
+ subscribe(listener: (event: never) => void): () => void;
231
+ readonly sessionFile: string | undefined;
232
+ readonly sessionId: string;
233
+ setModel(model: WorkflowModelValue): Promise<void>;
234
+ setThinkingLevel(level: WorkflowThinkingLevel): void;
235
+ cycleModel(): Promise<object | undefined>;
236
+ cycleThinkingLevel(): WorkflowThinkingLevel | undefined;
237
+ readonly agent: object;
238
+ readonly model: WorkflowModelValue | undefined;
239
+ readonly thinkingLevel: WorkflowThinkingLevel | undefined;
240
+ readonly messages: readonly object[];
241
+ readonly isStreaming: boolean;
242
+ navigateTree(targetId: string, options?: {
243
+ readonly summarize?: boolean;
244
+ readonly customInstructions?: string;
245
+ readonly replaceInstructions?: boolean;
246
+ readonly label?: string;
247
+ }): Promise<{
248
+ readonly editorText?: string;
249
+ readonly cancelled: boolean;
250
+ }>;
251
+ compact(customInstructions?: string): Promise<object>;
252
+ abortCompaction(): void;
253
+ abort(): Promise<void>;
254
+ }
255
+ export interface WorkflowArtifact extends WorkflowSerializableObject {
256
+ readonly kind: "output" | "session" | "diff" | "patch";
257
+ readonly path: string;
258
+ readonly taskName?: string;
259
+ readonly branch?: string;
260
+ readonly diffStat?: string;
261
+ readonly filesChanged?: number;
262
+ readonly insertions?: number;
263
+ readonly deletions?: number;
264
+ }
265
+ export interface WorkflowTaskContext extends WorkflowSerializableObject {
266
+ readonly name?: string;
267
+ readonly text: string;
268
+ }
269
+ export type WorkflowTaskContextInput = string | WorkflowTaskContext | WorkflowTaskResult;
270
+ export interface WorkflowTaskResult extends WorkflowTaskContext {
271
+ readonly stageName: string;
272
+ readonly sessionId?: string;
273
+ readonly sessionFile?: string;
274
+ readonly artifacts?: readonly WorkflowArtifact[];
275
+ readonly model?: string;
276
+ readonly fastMode?: boolean;
277
+ readonly attemptedModels?: readonly string[];
278
+ readonly modelAttempts?: readonly WorkflowModelAttempt[];
279
+ readonly warnings?: readonly string[];
280
+ }
281
+ export interface WorkflowTaskSessionFields {
282
+ readonly prompt?: string;
283
+ readonly task?: string;
284
+ readonly output?: string | false;
285
+ readonly outputMode?: WorkflowOutputMode;
286
+ readonly reads?: readonly string[] | false;
287
+ readonly worktree?: boolean;
288
+ readonly gitWorktreeDir?: string;
289
+ readonly baseBranch?: string;
290
+ readonly maxOutput?: WorkflowMaxOutput;
291
+ readonly artifacts?: boolean;
292
+ }
293
+ export interface WorkflowTaskOptions extends StageOptions, WorkflowTaskSessionFields {
294
+ readonly previous?: WorkflowTaskContextInput | readonly WorkflowTaskContextInput[];
295
+ }
296
+ export interface WorkflowTaskStep extends WorkflowTaskOptions {
297
+ readonly name: string;
298
+ }
299
+ export interface WorkflowSharedTaskDefaults extends StageOptions, WorkflowTaskSessionFields {
300
+ }
301
+ export interface WorkflowChainOptions extends WorkflowSharedTaskDefaults {
302
+ readonly chainDir?: string;
303
+ }
304
+ export interface WorkflowParallelOptions extends WorkflowSharedTaskDefaults {
305
+ readonly concurrency?: number;
306
+ readonly failFast?: boolean;
307
+ }
308
+ export interface WorkflowDirectTaskItem extends WorkflowTaskOptions {
309
+ readonly name: string;
310
+ readonly count?: number;
311
+ }
312
+ export interface WorkflowParallelChainStep {
313
+ readonly parallel: readonly WorkflowDirectTaskItem[];
314
+ readonly concurrency?: number;
315
+ readonly failFast?: boolean;
316
+ readonly worktree?: boolean;
317
+ readonly gitWorktreeDir?: string;
318
+ readonly baseBranch?: string;
319
+ }
320
+ export type WorkflowChainStep = WorkflowDirectTaskItem | WorkflowParallelChainStep;
321
+ export type WorkflowTaskSessionOptions = StageOptions & WorkflowTaskSessionFields;
322
+ export interface WorkflowDirectOptions extends StageOptions, WorkflowTaskSessionFields {
323
+ readonly chainName?: string;
324
+ readonly concurrency?: number;
325
+ readonly failFast?: boolean;
326
+ readonly chainDir?: string;
327
+ }
328
+ export interface WorkflowRunChildOptions<TInputs extends WorkflowInputValues = WorkflowInputValues> {
329
+ readonly inputs?: TInputs;
330
+ readonly stageName?: string;
331
+ }
332
+ export interface WorkflowChildResult<TOutputs extends WorkflowOutputValues = WorkflowOutputValues> extends WorkflowSerializableObject {
333
+ readonly workflow: string;
334
+ readonly runId: string;
335
+ readonly status: "completed";
336
+ readonly outputs: TOutputs;
337
+ }
338
+ export interface WorkflowUIContext {
339
+ input(prompt: string): Promise<string>;
340
+ confirm(message: string): Promise<boolean>;
341
+ select<T extends string>(message: string, options: readonly T[]): Promise<T>;
342
+ editor(initial?: string): Promise<string>;
343
+ }
344
+ export type WorkflowUIAdapter = WorkflowUIContext;
345
+ export interface WorkflowRunContext<TInputs extends WorkflowInputValues = WorkflowInputValues, TDefinitionBrand extends object = {}> {
346
+ readonly inputs: Readonly<TInputs>;
347
+ readonly cwd?: string;
348
+ stage(name: string, options?: StageOptions): StageContext;
349
+ task(name: string, options: WorkflowTaskOptions): Promise<WorkflowTaskResult>;
350
+ chain(steps: readonly WorkflowTaskStep[], options?: WorkflowChainOptions): Promise<WorkflowTaskResult[]>;
351
+ parallel(steps: readonly WorkflowTaskStep[], options?: WorkflowParallelOptions): Promise<WorkflowTaskResult[]>;
352
+ workflow<TChildInputs extends WorkflowInputValues, TChildOutputs extends WorkflowOutputValues>(definition: WorkflowDefinition<TChildInputs, TChildOutputs> & TDefinitionBrand, options?: WorkflowRunChildOptions<TChildInputs>): Promise<WorkflowChildResult<TChildOutputs>>;
353
+ readonly ui: WorkflowUIContext;
354
+ }
355
+ export type WorkflowRunFn<TInputs extends WorkflowInputValues = WorkflowInputValues, TOutputs extends WorkflowOutputValues = WorkflowOutputValues, TDefinitionBrand extends object = {}> = (ctx: WorkflowRunContext<TInputs, TDefinitionBrand>) => Promise<TOutputs> | TOutputs;
356
+ export interface WorkflowRuntimeConfig {
357
+ readonly maxDepth: number;
358
+ readonly defaultConcurrency: number;
359
+ readonly persistRuns: boolean;
360
+ readonly statusFile: boolean;
361
+ readonly statusFilePath?: string;
362
+ readonly resumeInFlight: "ask" | "auto" | "never";
363
+ }
364
+ export interface WorkflowWorktreeInputBinding {
365
+ readonly gitWorktreeDir: string;
366
+ readonly baseBranch?: string;
367
+ }
368
+ export interface WorkflowInputBindings {
369
+ readonly worktree?: WorkflowWorktreeInputBinding;
370
+ }
371
+ export interface WorkflowDefinition<TInputs extends WorkflowInputValues = WorkflowInputValues, TOutputs extends WorkflowOutputValues = WorkflowOutputValues, TRunInputs extends WorkflowInputValues = TInputs, TDefinitionBrand extends object = {}> {
372
+ readonly __piWorkflow: true;
373
+ readonly __runInputs?: TRunInputs;
374
+ readonly name: string;
375
+ readonly normalizedName: string;
376
+ readonly description: string;
377
+ readonly inputs: WorkflowInputSchemaMap;
378
+ readonly outputs?: WorkflowOutputSchemaMap;
379
+ readonly inputBindings?: WorkflowInputBindings;
380
+ run(ctx: WorkflowRunContext<TInputs, TDefinitionBrand>): Promise<TOutputs> | TOutputs;
381
+ }
382
+ type DeclaredResolvedEntry<K extends string, S extends TSchema> = S extends TOptional<TSchema> ? {
383
+ readonly [P in K]?: Static<S>;
384
+ } : {
385
+ readonly [P in K]: Static<S>;
386
+ };
387
+ type DeclaredProvidedEntry<K extends string, S extends TSchema> = S extends TOptional<TSchema> | {
388
+ readonly default: WorkflowSerializableValue;
389
+ } ? {
390
+ readonly [P in K]?: Static<S>;
391
+ } : {
392
+ readonly [P in K]: Static<S>;
393
+ };
394
+ type Simplify<T> = {
395
+ [K in keyof T]: T[K];
396
+ } & {};
397
+ export type NoExtraOutputs<TDeclared extends WorkflowOutputValues, TActual extends TDeclared> = TActual & Record<Exclude<keyof TActual, keyof TDeclared>, never>;
398
+ export interface WorkflowBuilder<TInputs extends WorkflowInputValues = {}, TOutputs extends WorkflowOutputValues = {}, TRunInputs extends WorkflowInputValues = TInputs, TDefinitionBrand extends object = {}, TCompiledDefinition extends WorkflowDefinition<TInputs, TOutputs, TRunInputs, TDefinitionBrand> = WorkflowDefinition<TInputs, TOutputs, TRunInputs, TDefinitionBrand>> {
399
+ description(text: string): WorkflowBuilder<TInputs, TOutputs, TRunInputs, TDefinitionBrand, TCompiledDefinition>;
400
+ input<K extends string, S extends TSchema>(key: K, schema: S): WorkflowBuilder<Simplify<TInputs & DeclaredResolvedEntry<K, S>>, TOutputs, Simplify<TRunInputs & DeclaredProvidedEntry<K, S>>, TDefinitionBrand, WorkflowDefinition<Simplify<TInputs & DeclaredResolvedEntry<K, S>>, TOutputs, Simplify<TRunInputs & DeclaredProvidedEntry<K, S>>, TDefinitionBrand> & TDefinitionBrand>;
401
+ output<K extends string, S extends TSchema>(key: K, schema: S): WorkflowBuilder<TInputs, Simplify<TOutputs & (DeclaredResolvedEntry<K, S> & WorkflowOutputValues)>, TRunInputs, TDefinitionBrand, WorkflowDefinition<TInputs, Simplify<TOutputs & (DeclaredResolvedEntry<K, S> & WorkflowOutputValues)>, TRunInputs, TDefinitionBrand> & TDefinitionBrand>;
402
+ worktreeFromInputs(binding: WorkflowWorktreeInputBinding): WorkflowBuilder<TInputs, TOutputs, TRunInputs, TDefinitionBrand, TCompiledDefinition>;
403
+ run<TActualOutputs extends TOutputs>(fn: (ctx: WorkflowRunContext<TInputs, TDefinitionBrand>) => Promise<NoExtraOutputs<TOutputs, TActualOutputs>> | NoExtraOutputs<TOutputs, TActualOutputs>): CompletedWorkflowBuilder<TInputs, TOutputs, TRunInputs, TDefinitionBrand, TCompiledDefinition>;
404
+ }
405
+ export interface CompletedWorkflowBuilder<TInputs extends WorkflowInputValues = {}, TOutputs extends WorkflowOutputValues = {}, TRunInputs extends WorkflowInputValues = TInputs, TDefinitionBrand extends object = {}, TCompiledDefinition extends WorkflowDefinition<TInputs, TOutputs, TRunInputs, TDefinitionBrand> = WorkflowDefinition<TInputs, TOutputs, TRunInputs, TDefinitionBrand>> extends WorkflowBuilder<TInputs, TOutputs, TRunInputs, TDefinitionBrand, TCompiledDefinition> {
406
+ description(text: string): CompletedWorkflowBuilder<TInputs, TOutputs, TRunInputs, TDefinitionBrand, TCompiledDefinition>;
407
+ input<K extends string, S extends TSchema>(key: K, schema: S): CompletedWorkflowBuilder<Simplify<TInputs & DeclaredResolvedEntry<K, S>>, TOutputs, Simplify<TRunInputs & DeclaredProvidedEntry<K, S>>, TDefinitionBrand, WorkflowDefinition<Simplify<TInputs & DeclaredResolvedEntry<K, S>>, TOutputs, Simplify<TRunInputs & DeclaredProvidedEntry<K, S>>, TDefinitionBrand> & TDefinitionBrand>;
408
+ output<K extends string, S extends TSchema>(key: K, schema: S): CompletedWorkflowBuilder<TInputs, Simplify<TOutputs & (DeclaredResolvedEntry<K, S> & WorkflowOutputValues)>, TRunInputs, TDefinitionBrand, WorkflowDefinition<TInputs, Simplify<TOutputs & (DeclaredResolvedEntry<K, S> & WorkflowOutputValues)>, TRunInputs, TDefinitionBrand> & TDefinitionBrand>;
409
+ worktreeFromInputs(binding: WorkflowWorktreeInputBinding): CompletedWorkflowBuilder<TInputs, TOutputs, TRunInputs, TDefinitionBrand, TCompiledDefinition>;
410
+ compile(): TCompiledDefinition;
411
+ }
412
+ export interface WorkflowOverlayAdapter extends WorkflowSerializableObject {
413
+ }
414
+ export interface RunSnapshot extends WorkflowSerializableObject {
415
+ }
416
+ export interface ActiveRunEntry {
417
+ readonly controller: AbortController;
418
+ readonly children: readonly AbortController[];
419
+ }
420
+ export interface CancellationRegistry {
421
+ register(runId: string, controller: AbortController): void;
422
+ registerChild(runId: string, controller: AbortController): void;
423
+ abort(runId: string, reason?: unknown): boolean;
424
+ abortAll(reason?: unknown): number;
425
+ unregister(runId: string): void;
426
+ isAborted(runId: string): boolean;
427
+ }
428
+ export interface RunContinuationOpts {
429
+ readonly source: RunSnapshot;
430
+ readonly resumeFromStageId: string;
431
+ }
432
+ export interface WorkflowParentRunLink {
433
+ readonly runId: string;
434
+ readonly stageId: string;
435
+ readonly rootRunId: string;
436
+ }
437
+ export interface RunOpts {
438
+ readonly adapters?: StageAdapters;
439
+ readonly cwd?: string;
440
+ readonly ui?: WorkflowUIAdapter;
441
+ readonly executionMode?: WorkflowExecutionMode;
442
+ readonly usePromptNodesForUi?: boolean;
443
+ readonly confirmStageReadiness?: (request: {
444
+ readonly runId: string;
445
+ readonly stageId: string;
446
+ readonly stageName: string;
447
+ readonly signal: AbortSignal;
448
+ }) => Promise<boolean>;
449
+ readonly store?: object;
450
+ readonly persistence?: WorkflowPersistencePort;
451
+ readonly mcp?: WorkflowMcpPort;
452
+ readonly cancellation?: CancellationRegistry;
453
+ readonly overlay?: WorkflowOverlayAdapter;
454
+ readonly signal?: AbortSignal;
455
+ readonly deferWorkflowStart?: boolean;
456
+ readonly config?: WorkflowRuntimeConfig;
457
+ readonly models?: WorkflowModelCatalogPort;
458
+ readonly registry?: object;
459
+ readonly depth?: number;
460
+ readonly stageControlRegistry?: object;
461
+ readonly runId?: string;
462
+ readonly continuation?: RunContinuationOpts;
463
+ readonly parentRun?: WorkflowParentRunLink;
464
+ readonly onRunStart?: (snapshot: RunSnapshot) => void;
465
+ readonly onStageStart?: (runId: string, snapshot: StageSnapshot) => void;
466
+ readonly onStageEnd?: (runId: string, snapshot: StageSnapshot) => void;
467
+ readonly onRunEnd?: (runId: string, status: RunStatus, result?: WorkflowOutputValues, error?: string) => void;
468
+ }
469
+ export interface WorkflowProgressSummary extends WorkflowSerializableObject {
470
+ readonly completed?: number;
471
+ readonly total?: number;
472
+ }
473
+ export interface WorkflowControlEvent extends WorkflowSerializableObject {
474
+ readonly type?: "notify" | "needs_attention" | "interrupted" | "resumed";
475
+ readonly message?: string;
476
+ }
477
+ export interface WorkflowIntercomSummary extends WorkflowSerializableObject {
478
+ readonly enabled?: boolean;
479
+ readonly delivery?: "off" | "notify" | "result" | "control-and-result";
480
+ readonly parentSession?: string;
481
+ }
482
+ export interface WorkflowDetails extends WorkflowSerializableObject {
483
+ readonly mode: WorkflowDetailsMode;
484
+ readonly action?: WorkflowAction;
485
+ readonly runId?: string;
486
+ readonly status: WorkflowDetailsStatus;
487
+ readonly context?: WorkflowContextMode;
488
+ readonly results?: readonly WorkflowTaskResult[];
489
+ readonly output?: WorkflowOutputValues;
490
+ readonly progress?: WorkflowProgressSummary;
491
+ readonly artifacts?: readonly WorkflowArtifact[];
492
+ readonly controlEvents?: readonly WorkflowControlEvent[];
493
+ readonly intercom?: WorkflowIntercomSummary;
494
+ readonly warnings?: readonly string[];
495
+ readonly error?: string;
496
+ }
497
+ export type StageStatus = RunStatus | "skipped" | "awaiting_input" | "blocked";
498
+ export interface StageSnapshot extends WorkflowSerializableObject {
499
+ readonly id: string;
500
+ readonly name: string;
501
+ readonly status: StageStatus;
502
+ readonly result?: WorkflowSerializableValue;
503
+ readonly error?: string;
504
+ }
505
+ export interface RunResult<TOutputs extends WorkflowOutputValues = WorkflowOutputValues> extends WorkflowSerializableObject {
506
+ readonly runId: string;
507
+ readonly status: RunStatus;
508
+ readonly result?: TOutputs;
509
+ readonly error?: string;
510
+ readonly stages: readonly StageSnapshot[];
511
+ }
512
+ export type ResolvedInputs<TInputs extends WorkflowInputValues = WorkflowInputValues> = Readonly<TInputs> & WorkflowSerializableObject;
513
+ export interface GitWorktreeSetupOptions extends WorkflowSerializableObject {
514
+ readonly gitWorktreeDir: string;
515
+ readonly baseBranch?: string;
516
+ readonly cwd: string;
517
+ }
518
+ export interface GitWorktreeSetupResult extends WorkflowSerializableObject {
519
+ readonly worktreeRoot: string;
520
+ readonly cwd: string;
521
+ readonly repositoryRoot: string;
522
+ readonly created: boolean;
523
+ }
@@ -642,7 +642,6 @@ export class StageChatView implements Component, Focusable {
642
642
  return true;
643
643
  }
644
644
  case "/quit":
645
- case "/exit":
646
645
  this.onClose();
647
646
  return true;
648
647
  default:
@@ -1 +1 @@
1
- {"version":3,"file":"slash-commands.d.ts","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAO/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,UAAU,EAAE,UAAU,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,CAAC,EAAE,CACxB,cAAc,EAAE,MAAM,KAClB,gBAAgB,EAAE,GAAG,IAAI,GAAG,OAAO,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,CAAC;CACpE;AAED,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,mBAAmB,CA4BrE,CAAC","sourcesContent":["import type { AutocompleteItem } from \"@earendil-works/pi-tui\";\nimport { APP_NAME } from \"../config.ts\";\nimport {\n\tATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\tATOMIC_GUIDE_COMMAND_NAME,\n\tgetAtomicGuideArgumentCompletions,\n} from \"./atomic-guide-command.ts\";\nimport type { SourceInfo } from \"./source-info.ts\";\n\nexport type SlashCommandSource = \"extension\" | \"prompt\" | \"skill\";\n\nexport interface SlashCommandInfo {\n\tname: string;\n\tdescription?: string;\n\tsource: SlashCommandSource;\n\tsourceInfo: SourceInfo;\n}\n\nexport interface BuiltinSlashCommand {\n\tname: string;\n\tdescription: string;\n\tgetArgumentCompletions?: (\n\t\targumentPrefix: string,\n\t) => AutocompleteItem[] | null | Promise<AutocompleteItem[] | null>;\n}\n\nexport const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{ name: \"settings\", description: \"Open settings menu\" },\n\t{ name: \"model\", description: \"Select model (opens selector UI)\" },\n\t{ name: \"scoped-models\", description: \"Enable/disable models for ctrl+p cycling\" },\n\t{ name: \"fast\", description: \"Configure Codex fast mode for chat and workflows\" },\n\t{ name: \"export\", description: \"Export session (HTML default, or specify path: .html/.jsonl)\" },\n\t{ name: \"import\", description: \"Import and resume a session from a JSONL file\" },\n\t{ name: \"share\", description: \"Share session as a secret GitHub gist\" },\n\t{ name: \"copy\", description: \"Copy last agent message to clipboard\" },\n\t{ name: \"name\", description: \"Set session display name\" },\n\t{ name: \"session\", description: \"Show session info and stats\" },\n\t{ name: \"changelog\", description: \"Show changelog entries\" },\n\t{\n\t\tname: ATOMIC_GUIDE_COMMAND_NAME,\n\t\tdescription: ATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\t\tgetArgumentCompletions: getAtomicGuideArgumentCompletions,\n\t},\n\t{ name: \"hotkeys\", description: \"Show all keyboard shortcuts\" },\n\t{ name: \"fork\", description: \"Create a new fork from a previous user message\" },\n\t{ name: \"clone\", description: \"Duplicate the current session at the current position\" },\n\t{ name: \"tree\", description: \"Navigate session tree (switch branches)\" },\n\t{ name: \"login\", description: \"Configure provider authentication\" },\n\t{ name: \"logout\", description: \"Remove provider authentication\" },\n\t{ name: \"new\", description: \"Start a new session\" },\n\t{ name: \"compact\", description: \"Manually compact the session context\" },\n\t{ name: \"resume\", description: \"Resume a different session\" },\n\t{ name: \"reload\", description: \"Reload keybindings, extensions, skills, prompts, and themes\" },\n\t{ name: \"quit\", description: `Quit ${APP_NAME}` },\n];\n"]}
1
+ {"version":3,"file":"slash-commands.d.ts","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAO/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,UAAU,EAAE,UAAU,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,CAAC,EAAE,CACxB,cAAc,EAAE,MAAM,KAClB,gBAAgB,EAAE,GAAG,IAAI,GAAG,OAAO,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,CAAC;CACpE;AAED,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,mBAAmB,CA6BrE,CAAC","sourcesContent":["import type { AutocompleteItem } from \"@earendil-works/pi-tui\";\nimport { APP_NAME } from \"../config.ts\";\nimport {\n\tATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\tATOMIC_GUIDE_COMMAND_NAME,\n\tgetAtomicGuideArgumentCompletions,\n} from \"./atomic-guide-command.ts\";\nimport type { SourceInfo } from \"./source-info.ts\";\n\nexport type SlashCommandSource = \"extension\" | \"prompt\" | \"skill\";\n\nexport interface SlashCommandInfo {\n\tname: string;\n\tdescription?: string;\n\tsource: SlashCommandSource;\n\tsourceInfo: SourceInfo;\n}\n\nexport interface BuiltinSlashCommand {\n\tname: string;\n\tdescription: string;\n\tgetArgumentCompletions?: (\n\t\targumentPrefix: string,\n\t) => AutocompleteItem[] | null | Promise<AutocompleteItem[] | null>;\n}\n\nexport const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{ name: \"settings\", description: \"Open settings menu\" },\n\t{ name: \"model\", description: \"Select model (opens selector UI)\" },\n\t{ name: \"scoped-models\", description: \"Enable/disable models for ctrl+p cycling\" },\n\t{ name: \"fast\", description: \"Configure Codex fast mode for chat and workflows\" },\n\t{ name: \"export\", description: \"Export session (HTML default, or specify path: .html/.jsonl)\" },\n\t{ name: \"import\", description: \"Import and resume a session from a JSONL file\" },\n\t{ name: \"share\", description: \"Share session as a secret GitHub gist\" },\n\t{ name: \"copy\", description: \"Copy last agent message to clipboard\" },\n\t{ name: \"name\", description: \"Set session display name\" },\n\t{ name: \"session\", description: \"Show session info and stats\" },\n\t{ name: \"changelog\", description: \"Show changelog entries\" },\n\t{\n\t\tname: ATOMIC_GUIDE_COMMAND_NAME,\n\t\tdescription: ATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\t\tgetArgumentCompletions: getAtomicGuideArgumentCompletions,\n\t},\n\t{ name: \"hotkeys\", description: \"Show all keyboard shortcuts\" },\n\t{ name: \"fork\", description: \"Create a new fork from a previous user message\" },\n\t{ name: \"clone\", description: \"Duplicate the current session at the current position\" },\n\t{ name: \"tree\", description: \"Navigate session tree (switch branches)\" },\n\t{ name: \"login\", description: \"Configure provider authentication\" },\n\t{ name: \"logout\", description: \"Remove provider authentication\" },\n\t{ name: \"new\", description: \"Start a new session\" },\n\t{ name: \"compact\", description: \"Manually compact the session context\" },\n\t{ name: \"resume\", description: \"Resume a different session\" },\n\t{ name: \"reload\", description: \"Reload keybindings, extensions, skills, prompts, and themes\" },\n\t{ name: \"exit\", description: `Exit ${APP_NAME}` },\n\t{ name: \"quit\", description: `Quit ${APP_NAME}` },\n];\n"]}
@@ -27,6 +27,7 @@ export const BUILTIN_SLASH_COMMANDS = [
27
27
  { name: "compact", description: "Manually compact the session context" },
28
28
  { name: "resume", description: "Resume a different session" },
29
29
  { name: "reload", description: "Reload keybindings, extensions, skills, prompts, and themes" },
30
+ { name: "exit", description: `Exit ${APP_NAME}` },
30
31
  { name: "quit", description: `Quit ${APP_NAME}` },
31
32
  ];
32
33
  //# sourceMappingURL=slash-commands.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slash-commands.js","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EACN,gCAAgC,EAChC,yBAAyB,EACzB,iCAAiC,GACjC,MAAM,2BAA2B,CAAC;AAoBnC,MAAM,CAAC,MAAM,sBAAsB,GAAuC;IACzE,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,oBAAoB,EAAE;IACvD,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,kCAAkC,EAAE;IAClE,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,0CAA0C,EAAE;IAClF,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,kDAAkD,EAAE;IACjF,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8DAA8D,EAAE;IAC/F,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,+CAA+C,EAAE;IAChF,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,uCAAuC,EAAE;IACvE,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,sCAAsC,EAAE;IACrE,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,0BAA0B,EAAE;IACzD,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,6BAA6B,EAAE;IAC/D,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,wBAAwB,EAAE;IAC5D;QACC,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,gCAAgC;QAC7C,sBAAsB,EAAE,iCAAiC;KACzD;IACD,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,6BAA6B,EAAE;IAC/D,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,gDAAgD,EAAE;IAC/E,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,uDAAuD,EAAE;IACvF,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,yCAAyC,EAAE;IACxE,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,mCAAmC,EAAE;IACnE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gCAAgC,EAAE;IACjE,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE;IACnD,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,sCAAsC,EAAE;IACxE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;IAC7D,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6DAA6D,EAAE;IAC9F,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,QAAQ,EAAE,EAAE;CACjD,CAAC","sourcesContent":["import type { AutocompleteItem } from \"@earendil-works/pi-tui\";\nimport { APP_NAME } from \"../config.ts\";\nimport {\n\tATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\tATOMIC_GUIDE_COMMAND_NAME,\n\tgetAtomicGuideArgumentCompletions,\n} from \"./atomic-guide-command.ts\";\nimport type { SourceInfo } from \"./source-info.ts\";\n\nexport type SlashCommandSource = \"extension\" | \"prompt\" | \"skill\";\n\nexport interface SlashCommandInfo {\n\tname: string;\n\tdescription?: string;\n\tsource: SlashCommandSource;\n\tsourceInfo: SourceInfo;\n}\n\nexport interface BuiltinSlashCommand {\n\tname: string;\n\tdescription: string;\n\tgetArgumentCompletions?: (\n\t\targumentPrefix: string,\n\t) => AutocompleteItem[] | null | Promise<AutocompleteItem[] | null>;\n}\n\nexport const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{ name: \"settings\", description: \"Open settings menu\" },\n\t{ name: \"model\", description: \"Select model (opens selector UI)\" },\n\t{ name: \"scoped-models\", description: \"Enable/disable models for ctrl+p cycling\" },\n\t{ name: \"fast\", description: \"Configure Codex fast mode for chat and workflows\" },\n\t{ name: \"export\", description: \"Export session (HTML default, or specify path: .html/.jsonl)\" },\n\t{ name: \"import\", description: \"Import and resume a session from a JSONL file\" },\n\t{ name: \"share\", description: \"Share session as a secret GitHub gist\" },\n\t{ name: \"copy\", description: \"Copy last agent message to clipboard\" },\n\t{ name: \"name\", description: \"Set session display name\" },\n\t{ name: \"session\", description: \"Show session info and stats\" },\n\t{ name: \"changelog\", description: \"Show changelog entries\" },\n\t{\n\t\tname: ATOMIC_GUIDE_COMMAND_NAME,\n\t\tdescription: ATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\t\tgetArgumentCompletions: getAtomicGuideArgumentCompletions,\n\t},\n\t{ name: \"hotkeys\", description: \"Show all keyboard shortcuts\" },\n\t{ name: \"fork\", description: \"Create a new fork from a previous user message\" },\n\t{ name: \"clone\", description: \"Duplicate the current session at the current position\" },\n\t{ name: \"tree\", description: \"Navigate session tree (switch branches)\" },\n\t{ name: \"login\", description: \"Configure provider authentication\" },\n\t{ name: \"logout\", description: \"Remove provider authentication\" },\n\t{ name: \"new\", description: \"Start a new session\" },\n\t{ name: \"compact\", description: \"Manually compact the session context\" },\n\t{ name: \"resume\", description: \"Resume a different session\" },\n\t{ name: \"reload\", description: \"Reload keybindings, extensions, skills, prompts, and themes\" },\n\t{ name: \"quit\", description: `Quit ${APP_NAME}` },\n];\n"]}
1
+ {"version":3,"file":"slash-commands.js","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EACN,gCAAgC,EAChC,yBAAyB,EACzB,iCAAiC,GACjC,MAAM,2BAA2B,CAAC;AAoBnC,MAAM,CAAC,MAAM,sBAAsB,GAAuC;IACzE,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,oBAAoB,EAAE;IACvD,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,kCAAkC,EAAE;IAClE,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,0CAA0C,EAAE;IAClF,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,kDAAkD,EAAE;IACjF,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8DAA8D,EAAE;IAC/F,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,+CAA+C,EAAE;IAChF,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,uCAAuC,EAAE;IACvE,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,sCAAsC,EAAE;IACrE,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,0BAA0B,EAAE;IACzD,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,6BAA6B,EAAE;IAC/D,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,wBAAwB,EAAE;IAC5D;QACC,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,gCAAgC;QAC7C,sBAAsB,EAAE,iCAAiC;KACzD;IACD,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,6BAA6B,EAAE;IAC/D,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,gDAAgD,EAAE;IAC/E,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,uDAAuD,EAAE;IACvF,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,yCAAyC,EAAE;IACxE,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,mCAAmC,EAAE;IACnE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gCAAgC,EAAE;IACjE,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE;IACnD,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,sCAAsC,EAAE;IACxE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;IAC7D,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6DAA6D,EAAE;IAC9F,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,QAAQ,EAAE,EAAE;IACjD,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,QAAQ,EAAE,EAAE;CACjD,CAAC","sourcesContent":["import type { AutocompleteItem } from \"@earendil-works/pi-tui\";\nimport { APP_NAME } from \"../config.ts\";\nimport {\n\tATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\tATOMIC_GUIDE_COMMAND_NAME,\n\tgetAtomicGuideArgumentCompletions,\n} from \"./atomic-guide-command.ts\";\nimport type { SourceInfo } from \"./source-info.ts\";\n\nexport type SlashCommandSource = \"extension\" | \"prompt\" | \"skill\";\n\nexport interface SlashCommandInfo {\n\tname: string;\n\tdescription?: string;\n\tsource: SlashCommandSource;\n\tsourceInfo: SourceInfo;\n}\n\nexport interface BuiltinSlashCommand {\n\tname: string;\n\tdescription: string;\n\tgetArgumentCompletions?: (\n\t\targumentPrefix: string,\n\t) => AutocompleteItem[] | null | Promise<AutocompleteItem[] | null>;\n}\n\nexport const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{ name: \"settings\", description: \"Open settings menu\" },\n\t{ name: \"model\", description: \"Select model (opens selector UI)\" },\n\t{ name: \"scoped-models\", description: \"Enable/disable models for ctrl+p cycling\" },\n\t{ name: \"fast\", description: \"Configure Codex fast mode for chat and workflows\" },\n\t{ name: \"export\", description: \"Export session (HTML default, or specify path: .html/.jsonl)\" },\n\t{ name: \"import\", description: \"Import and resume a session from a JSONL file\" },\n\t{ name: \"share\", description: \"Share session as a secret GitHub gist\" },\n\t{ name: \"copy\", description: \"Copy last agent message to clipboard\" },\n\t{ name: \"name\", description: \"Set session display name\" },\n\t{ name: \"session\", description: \"Show session info and stats\" },\n\t{ name: \"changelog\", description: \"Show changelog entries\" },\n\t{\n\t\tname: ATOMIC_GUIDE_COMMAND_NAME,\n\t\tdescription: ATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\t\tgetArgumentCompletions: getAtomicGuideArgumentCompletions,\n\t},\n\t{ name: \"hotkeys\", description: \"Show all keyboard shortcuts\" },\n\t{ name: \"fork\", description: \"Create a new fork from a previous user message\" },\n\t{ name: \"clone\", description: \"Duplicate the current session at the current position\" },\n\t{ name: \"tree\", description: \"Navigate session tree (switch branches)\" },\n\t{ name: \"login\", description: \"Configure provider authentication\" },\n\t{ name: \"logout\", description: \"Remove provider authentication\" },\n\t{ name: \"new\", description: \"Start a new session\" },\n\t{ name: \"compact\", description: \"Manually compact the session context\" },\n\t{ name: \"resume\", description: \"Resume a different session\" },\n\t{ name: \"reload\", description: \"Reload keybindings, extensions, skills, prompts, and themes\" },\n\t{ name: \"exit\", description: `Exit ${APP_NAME}` },\n\t{ name: \"quit\", description: `Quit ${APP_NAME}` },\n];\n"]}