@marktoflow/cli 2.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +567 -0
- package/dist/commands/debug.d.ts +75 -0
- package/dist/commands/debug.d.ts.map +1 -0
- package/dist/commands/debug.js +375 -0
- package/dist/commands/debug.js.map +1 -0
- package/dist/commands/dry-run.d.ts +41 -0
- package/dist/commands/dry-run.d.ts.map +1 -0
- package/dist/commands/dry-run.js +371 -0
- package/dist/commands/dry-run.js.map +1 -0
- package/dist/commands/new.d.ts +14 -0
- package/dist/commands/new.d.ts.map +1 -0
- package/dist/commands/new.js +483 -0
- package/dist/commands/new.js.map +1 -0
- package/dist/commands/update.d.ts +21 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +266 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +809 -0
- package/dist/index.js.map +1 -0
- package/dist/oauth.d.ts +48 -0
- package/dist/oauth.d.ts.map +1 -0
- package/dist/oauth.js +314 -0
- package/dist/oauth.js.map +1 -0
- package/dist/trigger.d.ts +3 -0
- package/dist/trigger.d.ts.map +1 -0
- package/dist/trigger.js +58 -0
- package/dist/trigger.js.map +1 -0
- package/dist/worker.d.ts +3 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +69 -0
- package/dist/worker.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* marktoflow new - Interactive workflow wizard
|
|
3
|
+
*
|
|
4
|
+
* Creates new workflows from templates or from scratch with guided prompts.
|
|
5
|
+
*/
|
|
6
|
+
import { select, input, confirm } from '@inquirer/prompts';
|
|
7
|
+
import chalk from 'chalk';
|
|
8
|
+
import ora from 'ora';
|
|
9
|
+
import { writeFileSync, existsSync, mkdirSync } from 'node:fs';
|
|
10
|
+
import { join, resolve } from 'node:path';
|
|
11
|
+
const templates = [
|
|
12
|
+
{
|
|
13
|
+
id: 'slack-notification',
|
|
14
|
+
name: 'Slack Notification',
|
|
15
|
+
description: 'Send notifications to Slack channels',
|
|
16
|
+
category: 'communication',
|
|
17
|
+
services: ['slack'],
|
|
18
|
+
generate: (answers) => `---
|
|
19
|
+
workflow:
|
|
20
|
+
id: ${answers.id}
|
|
21
|
+
name: "${answers.name}"
|
|
22
|
+
version: "1.0.0"
|
|
23
|
+
description: "${answers.description}"
|
|
24
|
+
|
|
25
|
+
tools:
|
|
26
|
+
slack:
|
|
27
|
+
sdk: '@slack/web-api'
|
|
28
|
+
auth:
|
|
29
|
+
token: '\${SLACK_BOT_TOKEN}'
|
|
30
|
+
|
|
31
|
+
inputs:
|
|
32
|
+
channel:
|
|
33
|
+
type: string
|
|
34
|
+
required: true
|
|
35
|
+
description: 'Target Slack channel'
|
|
36
|
+
message:
|
|
37
|
+
type: string
|
|
38
|
+
required: true
|
|
39
|
+
description: 'Message to send'
|
|
40
|
+
|
|
41
|
+
outputs:
|
|
42
|
+
message_ts:
|
|
43
|
+
type: string
|
|
44
|
+
description: 'Message timestamp'
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
# ${answers.name}
|
|
48
|
+
|
|
49
|
+
${answers.description}
|
|
50
|
+
|
|
51
|
+
## Step 1: Send Message
|
|
52
|
+
|
|
53
|
+
\`\`\`yaml
|
|
54
|
+
action: slack.chat.postMessage
|
|
55
|
+
inputs:
|
|
56
|
+
channel: "{{ inputs.channel }}"
|
|
57
|
+
text: "{{ inputs.message }}"
|
|
58
|
+
output_variable: result
|
|
59
|
+
\`\`\`
|
|
60
|
+
|
|
61
|
+
## Step 2: Set Output
|
|
62
|
+
|
|
63
|
+
\`\`\`yaml
|
|
64
|
+
action: workflow.set_outputs
|
|
65
|
+
inputs:
|
|
66
|
+
message_ts: "{{ result.ts }}"
|
|
67
|
+
\`\`\`
|
|
68
|
+
`,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 'github-pr-notification',
|
|
72
|
+
name: 'GitHub PR to Slack',
|
|
73
|
+
description: 'Notify Slack when PR is opened/updated',
|
|
74
|
+
category: 'development',
|
|
75
|
+
services: ['github', 'slack'],
|
|
76
|
+
generate: (answers) => `---
|
|
77
|
+
workflow:
|
|
78
|
+
id: ${answers.id}
|
|
79
|
+
name: "${answers.name}"
|
|
80
|
+
version: "1.0.0"
|
|
81
|
+
description: "${answers.description}"
|
|
82
|
+
|
|
83
|
+
tools:
|
|
84
|
+
github:
|
|
85
|
+
sdk: '@octokit/rest'
|
|
86
|
+
auth:
|
|
87
|
+
token: '\${GITHUB_TOKEN}'
|
|
88
|
+
|
|
89
|
+
slack:
|
|
90
|
+
sdk: '@slack/web-api'
|
|
91
|
+
auth:
|
|
92
|
+
token: '\${SLACK_BOT_TOKEN}'
|
|
93
|
+
|
|
94
|
+
triggers:
|
|
95
|
+
- type: webhook
|
|
96
|
+
path: /github/pr
|
|
97
|
+
methods: [POST]
|
|
98
|
+
|
|
99
|
+
inputs:
|
|
100
|
+
repo_owner:
|
|
101
|
+
type: string
|
|
102
|
+
required: true
|
|
103
|
+
repo_name:
|
|
104
|
+
type: string
|
|
105
|
+
required: true
|
|
106
|
+
pr_number:
|
|
107
|
+
type: integer
|
|
108
|
+
required: true
|
|
109
|
+
slack_channel:
|
|
110
|
+
type: string
|
|
111
|
+
default: '#dev'
|
|
112
|
+
|
|
113
|
+
outputs:
|
|
114
|
+
notification_sent:
|
|
115
|
+
type: boolean
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
# ${answers.name}
|
|
119
|
+
|
|
120
|
+
${answers.description}
|
|
121
|
+
|
|
122
|
+
## Step 1: Get PR Details
|
|
123
|
+
|
|
124
|
+
\`\`\`yaml
|
|
125
|
+
action: github.pulls.get
|
|
126
|
+
inputs:
|
|
127
|
+
owner: "{{ inputs.repo_owner }}"
|
|
128
|
+
repo: "{{ inputs.repo_name }}"
|
|
129
|
+
pull_number: {{ inputs.pr_number }}
|
|
130
|
+
output_variable: pr
|
|
131
|
+
\`\`\`
|
|
132
|
+
|
|
133
|
+
## Step 2: Notify Slack
|
|
134
|
+
|
|
135
|
+
\`\`\`yaml
|
|
136
|
+
action: slack.chat.postMessage
|
|
137
|
+
inputs:
|
|
138
|
+
channel: "{{ inputs.slack_channel }}"
|
|
139
|
+
text: "New PR: {{ pr.title }}"
|
|
140
|
+
blocks:
|
|
141
|
+
- type: section
|
|
142
|
+
text:
|
|
143
|
+
type: mrkdwn
|
|
144
|
+
text: "*<{{ pr.html_url }}|PR #{{ pr.number }}>*: {{ pr.title }}"
|
|
145
|
+
- type: context
|
|
146
|
+
elements:
|
|
147
|
+
- type: mrkdwn
|
|
148
|
+
text: "By {{ pr.user.login }} ⢠{{ pr.additions }} additions, {{ pr.deletions }} deletions"
|
|
149
|
+
output_variable: notification
|
|
150
|
+
\`\`\`
|
|
151
|
+
|
|
152
|
+
## Step 3: Set Output
|
|
153
|
+
|
|
154
|
+
\`\`\`yaml
|
|
155
|
+
action: workflow.set_outputs
|
|
156
|
+
inputs:
|
|
157
|
+
notification_sent: true
|
|
158
|
+
\`\`\`
|
|
159
|
+
`,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: 'jira-issue-tracker',
|
|
163
|
+
name: 'Jira Issue Tracker',
|
|
164
|
+
description: 'Create and track Jira issues from various sources',
|
|
165
|
+
category: 'operations',
|
|
166
|
+
services: ['jira', 'slack'],
|
|
167
|
+
generate: (answers) => `---
|
|
168
|
+
workflow:
|
|
169
|
+
id: ${answers.id}
|
|
170
|
+
name: "${answers.name}"
|
|
171
|
+
version: "1.0.0"
|
|
172
|
+
description: "${answers.description}"
|
|
173
|
+
|
|
174
|
+
tools:
|
|
175
|
+
jira:
|
|
176
|
+
sdk: 'jira.js'
|
|
177
|
+
auth:
|
|
178
|
+
host: '\${JIRA_HOST}'
|
|
179
|
+
email: '\${JIRA_EMAIL}'
|
|
180
|
+
apiToken: '\${JIRA_API_TOKEN}'
|
|
181
|
+
|
|
182
|
+
slack:
|
|
183
|
+
sdk: '@slack/web-api'
|
|
184
|
+
auth:
|
|
185
|
+
token: '\${SLACK_BOT_TOKEN}'
|
|
186
|
+
|
|
187
|
+
inputs:
|
|
188
|
+
project_key:
|
|
189
|
+
type: string
|
|
190
|
+
required: true
|
|
191
|
+
description: 'Jira project key'
|
|
192
|
+
issue_summary:
|
|
193
|
+
type: string
|
|
194
|
+
required: true
|
|
195
|
+
description: 'Issue summary'
|
|
196
|
+
issue_description:
|
|
197
|
+
type: string
|
|
198
|
+
required: true
|
|
199
|
+
description: 'Issue description'
|
|
200
|
+
issue_type:
|
|
201
|
+
type: string
|
|
202
|
+
default: 'Task'
|
|
203
|
+
description: 'Issue type'
|
|
204
|
+
notify_channel:
|
|
205
|
+
type: string
|
|
206
|
+
default: '#ops'
|
|
207
|
+
|
|
208
|
+
outputs:
|
|
209
|
+
issue_key:
|
|
210
|
+
type: string
|
|
211
|
+
issue_url:
|
|
212
|
+
type: string
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
# ${answers.name}
|
|
216
|
+
|
|
217
|
+
${answers.description}
|
|
218
|
+
|
|
219
|
+
## Step 1: Create Jira Issue
|
|
220
|
+
|
|
221
|
+
\`\`\`yaml
|
|
222
|
+
action: jira.issues.createIssue
|
|
223
|
+
inputs:
|
|
224
|
+
fields:
|
|
225
|
+
project:
|
|
226
|
+
key: "{{ inputs.project_key }}"
|
|
227
|
+
summary: "{{ inputs.issue_summary }}"
|
|
228
|
+
description: "{{ inputs.issue_description }}"
|
|
229
|
+
issuetype:
|
|
230
|
+
name: "{{ inputs.issue_type }}"
|
|
231
|
+
output_variable: jira_issue
|
|
232
|
+
\`\`\`
|
|
233
|
+
|
|
234
|
+
## Step 2: Notify Team
|
|
235
|
+
|
|
236
|
+
\`\`\`yaml
|
|
237
|
+
action: slack.chat.postMessage
|
|
238
|
+
inputs:
|
|
239
|
+
channel: "{{ inputs.notify_channel }}"
|
|
240
|
+
text: "New Jira issue created: {{ jira_issue.key }}"
|
|
241
|
+
blocks:
|
|
242
|
+
- type: section
|
|
243
|
+
text:
|
|
244
|
+
type: mrkdwn
|
|
245
|
+
text: "*Jira Issue Created*\\n<{{ jira_issue.self }}|{{ jira_issue.key }}>: {{ inputs.issue_summary }}"
|
|
246
|
+
output_variable: notification
|
|
247
|
+
\`\`\`
|
|
248
|
+
|
|
249
|
+
## Step 3: Set Outputs
|
|
250
|
+
|
|
251
|
+
\`\`\`yaml
|
|
252
|
+
action: workflow.set_outputs
|
|
253
|
+
inputs:
|
|
254
|
+
issue_key: "{{ jira_issue.key }}"
|
|
255
|
+
issue_url: "{{ jira_issue.self }}"
|
|
256
|
+
\`\`\`
|
|
257
|
+
`,
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
id: 'custom',
|
|
261
|
+
name: 'Custom Workflow (from scratch)',
|
|
262
|
+
description: 'Build a workflow from scratch with step-by-step guidance',
|
|
263
|
+
category: 'custom',
|
|
264
|
+
services: [],
|
|
265
|
+
generate: (answers) => `---
|
|
266
|
+
workflow:
|
|
267
|
+
id: ${answers.id}
|
|
268
|
+
name: "${answers.name}"
|
|
269
|
+
version: "1.0.0"
|
|
270
|
+
description: "${answers.description}"
|
|
271
|
+
|
|
272
|
+
# Add your tools configuration here
|
|
273
|
+
tools: {}
|
|
274
|
+
|
|
275
|
+
# Define inputs your workflow accepts
|
|
276
|
+
inputs: {}
|
|
277
|
+
|
|
278
|
+
# Define outputs your workflow produces
|
|
279
|
+
outputs: {}
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
# ${answers.name}
|
|
283
|
+
|
|
284
|
+
${answers.description}
|
|
285
|
+
|
|
286
|
+
## Step 1: Add Your First Step
|
|
287
|
+
|
|
288
|
+
Replace this with your workflow steps.
|
|
289
|
+
|
|
290
|
+
\`\`\`yaml
|
|
291
|
+
action: your.service.method
|
|
292
|
+
inputs:
|
|
293
|
+
# Add inputs here
|
|
294
|
+
output_variable: step1_result
|
|
295
|
+
\`\`\`
|
|
296
|
+
`,
|
|
297
|
+
},
|
|
298
|
+
];
|
|
299
|
+
// ============================================================================
|
|
300
|
+
// Wizard Functions
|
|
301
|
+
// ============================================================================
|
|
302
|
+
export async function runWorkflowWizard(options) {
|
|
303
|
+
console.log(chalk.bold.cyan('\nš marktoflow Workflow Wizard\n'));
|
|
304
|
+
try {
|
|
305
|
+
// Step 1: Choose template or custom
|
|
306
|
+
let selectedTemplate;
|
|
307
|
+
if (options.template) {
|
|
308
|
+
const template = templates.find((t) => t.id === options.template);
|
|
309
|
+
if (!template) {
|
|
310
|
+
console.error(chalk.red(`Template "${options.template}" not found`));
|
|
311
|
+
process.exit(1);
|
|
312
|
+
}
|
|
313
|
+
selectedTemplate = template;
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
const templateChoice = await select({
|
|
317
|
+
message: 'Choose a workflow template:',
|
|
318
|
+
choices: [
|
|
319
|
+
{
|
|
320
|
+
name: `${chalk.blue('Communication')}`,
|
|
321
|
+
value: 'category-communication',
|
|
322
|
+
disabled: true,
|
|
323
|
+
},
|
|
324
|
+
...templates
|
|
325
|
+
.filter((t) => t.category === 'communication')
|
|
326
|
+
.map((t) => ({
|
|
327
|
+
name: ` ${t.name} - ${chalk.gray(t.description)}`,
|
|
328
|
+
value: t.id,
|
|
329
|
+
})),
|
|
330
|
+
{
|
|
331
|
+
name: `${chalk.green('Development')}`,
|
|
332
|
+
value: 'category-development',
|
|
333
|
+
disabled: true,
|
|
334
|
+
},
|
|
335
|
+
...templates
|
|
336
|
+
.filter((t) => t.category === 'development')
|
|
337
|
+
.map((t) => ({
|
|
338
|
+
name: ` ${t.name} - ${chalk.gray(t.description)}`,
|
|
339
|
+
value: t.id,
|
|
340
|
+
})),
|
|
341
|
+
{
|
|
342
|
+
name: `${chalk.yellow('Operations')}`,
|
|
343
|
+
value: 'category-operations',
|
|
344
|
+
disabled: true,
|
|
345
|
+
},
|
|
346
|
+
...templates
|
|
347
|
+
.filter((t) => t.category === 'operations')
|
|
348
|
+
.map((t) => ({
|
|
349
|
+
name: ` ${t.name} - ${chalk.gray(t.description)}`,
|
|
350
|
+
value: t.id,
|
|
351
|
+
})),
|
|
352
|
+
{
|
|
353
|
+
name: `${chalk.magenta('Custom')}`,
|
|
354
|
+
value: 'category-custom',
|
|
355
|
+
disabled: true,
|
|
356
|
+
},
|
|
357
|
+
...templates
|
|
358
|
+
.filter((t) => t.category === 'custom')
|
|
359
|
+
.map((t) => ({
|
|
360
|
+
name: ` ${t.name} - ${chalk.gray(t.description)}`,
|
|
361
|
+
value: t.id,
|
|
362
|
+
})),
|
|
363
|
+
],
|
|
364
|
+
});
|
|
365
|
+
selectedTemplate = templates.find((t) => t.id === templateChoice);
|
|
366
|
+
}
|
|
367
|
+
console.log(chalk.cyan(`\n⨠Selected: ${selectedTemplate.name}\n`));
|
|
368
|
+
// Step 2: Gather workflow information
|
|
369
|
+
const workflowId = await input({
|
|
370
|
+
message: 'Workflow ID (lowercase, hyphens):',
|
|
371
|
+
default: selectedTemplate.id,
|
|
372
|
+
validate: (value) => {
|
|
373
|
+
if (!/^[a-z0-9-]+$/.test(value)) {
|
|
374
|
+
return 'ID must be lowercase letters, numbers, and hyphens only';
|
|
375
|
+
}
|
|
376
|
+
return true;
|
|
377
|
+
},
|
|
378
|
+
});
|
|
379
|
+
const workflowName = await input({
|
|
380
|
+
message: 'Workflow name:',
|
|
381
|
+
default: selectedTemplate.name,
|
|
382
|
+
});
|
|
383
|
+
const workflowDescription = await input({
|
|
384
|
+
message: 'Description (optional):',
|
|
385
|
+
default: selectedTemplate.description,
|
|
386
|
+
});
|
|
387
|
+
// Step 3: Generate workflow content
|
|
388
|
+
const spinner = ora('Generating workflow...').start();
|
|
389
|
+
const workflowContent = selectedTemplate.generate({
|
|
390
|
+
id: workflowId,
|
|
391
|
+
name: workflowName,
|
|
392
|
+
description: workflowDescription,
|
|
393
|
+
});
|
|
394
|
+
spinner.succeed('Workflow generated');
|
|
395
|
+
// Step 4: Determine output path
|
|
396
|
+
let outputPath;
|
|
397
|
+
if (options.output) {
|
|
398
|
+
outputPath = resolve(options.output);
|
|
399
|
+
}
|
|
400
|
+
else {
|
|
401
|
+
const defaultPath = `.marktoflow/workflows/${workflowId}.md`;
|
|
402
|
+
const customPath = await input({
|
|
403
|
+
message: 'Output path:',
|
|
404
|
+
default: defaultPath,
|
|
405
|
+
});
|
|
406
|
+
outputPath = resolve(customPath);
|
|
407
|
+
}
|
|
408
|
+
// Step 5: Create directories and write file
|
|
409
|
+
const dir = join(outputPath, '..');
|
|
410
|
+
if (!existsSync(dir)) {
|
|
411
|
+
mkdirSync(dir, { recursive: true });
|
|
412
|
+
}
|
|
413
|
+
if (existsSync(outputPath)) {
|
|
414
|
+
const overwrite = await confirm({
|
|
415
|
+
message: `File ${outputPath} already exists. Overwrite?`,
|
|
416
|
+
default: false,
|
|
417
|
+
});
|
|
418
|
+
if (!overwrite) {
|
|
419
|
+
console.log(chalk.yellow('\nWorkflow creation cancelled'));
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
writeFileSync(outputPath, workflowContent, 'utf-8');
|
|
424
|
+
// Step 6: Show success message
|
|
425
|
+
console.log(chalk.green.bold('\nā
Workflow created successfully!\n'));
|
|
426
|
+
console.log(chalk.gray(` Path: ${outputPath}`));
|
|
427
|
+
if (selectedTemplate.services.length > 0) {
|
|
428
|
+
console.log(chalk.gray(`\n Required services: ${selectedTemplate.services.join(', ')}`));
|
|
429
|
+
console.log(chalk.gray(` Make sure to set up the required environment variables\n`));
|
|
430
|
+
}
|
|
431
|
+
// Step 7: Show next steps
|
|
432
|
+
console.log(chalk.cyan('\nš Next steps:\n'));
|
|
433
|
+
console.log(chalk.white(` 1. Configure environment variables for required services`));
|
|
434
|
+
console.log(chalk.white(` 2. Validate: ${chalk.cyan(`marktoflow workflow validate ${outputPath}`)}`));
|
|
435
|
+
console.log(chalk.white(` 3. Run: ${chalk.cyan(`marktoflow run ${outputPath}`)}\n`));
|
|
436
|
+
}
|
|
437
|
+
catch (error) {
|
|
438
|
+
if (error instanceof Error && error.message.includes('User force closed')) {
|
|
439
|
+
console.log(chalk.yellow('\nWorkflow creation cancelled'));
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
throw error;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* List available workflow templates
|
|
447
|
+
*/
|
|
448
|
+
export function listTemplates() {
|
|
449
|
+
console.log(chalk.bold.cyan('\nš Available Workflow Templates\n'));
|
|
450
|
+
const byCategory = templates.reduce((acc, template) => {
|
|
451
|
+
if (!acc[template.category]) {
|
|
452
|
+
acc[template.category] = [];
|
|
453
|
+
}
|
|
454
|
+
acc[template.category].push(template);
|
|
455
|
+
return acc;
|
|
456
|
+
}, {});
|
|
457
|
+
const categoryColors = {
|
|
458
|
+
communication: chalk.blue,
|
|
459
|
+
development: chalk.green,
|
|
460
|
+
operations: chalk.yellow,
|
|
461
|
+
custom: chalk.magenta,
|
|
462
|
+
};
|
|
463
|
+
const categoryNames = {
|
|
464
|
+
communication: 'Communication',
|
|
465
|
+
development: 'Development',
|
|
466
|
+
operations: 'Operations',
|
|
467
|
+
custom: 'Custom',
|
|
468
|
+
};
|
|
469
|
+
for (const [category, templates] of Object.entries(byCategory)) {
|
|
470
|
+
const color = categoryColors[category];
|
|
471
|
+
const name = categoryNames[category];
|
|
472
|
+
console.log(color.bold(`${name}:`));
|
|
473
|
+
for (const template of templates) {
|
|
474
|
+
console.log(` ${chalk.cyan(template.id.padEnd(25))} ${chalk.gray(template.description)}`);
|
|
475
|
+
if (template.services.length > 0) {
|
|
476
|
+
console.log(` ${chalk.dim('Services:')} ${template.services.join(', ')}`);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
console.log();
|
|
480
|
+
}
|
|
481
|
+
console.log(chalk.gray('Use: marktoflow new --template <id>\n'));
|
|
482
|
+
}
|
|
483
|
+
//# sourceMappingURL=new.js.map
|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e how they want to update a workflow,
|
|
5
|
+
* and uses a coding agent to automatically update the workflow markdown file.
|
|
6
|
+
*/
|
|
7
|
+
interface UpdateOptions {
|
|
8
|
+
workflow: string;
|
|
9
|
+
agent?: string;
|
|
10
|
+
prompt?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Main workflow update wizard
|
|
14
|
+
*/
|
|
15
|
+
export declare function runUpdateWizard(options: UpdateOptions): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* List available coding agents
|
|
18
|
+
*/
|
|
19
|
+
export declare function listAgents(): Promise<void>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=update.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4EH,UAAU,aAAa;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAsED;;GAEG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,aAAa,iBAwI3D;AAED;;GAEG;AACH,wBAAsB,UAAU,kBAiC/B"}
|