@runflow-ai/cli 0.2.19 → 0.2.21
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/CLI-DOCS.md +23 -132
- package/README.md +354 -41
- package/dist/commands/agents/agents.command.d.ts +1 -0
- package/dist/commands/agents/agents.command.js +39 -20
- package/dist/commands/agents/agents.command.js.map +1 -1
- package/dist/commands/agents/git.service.js +8 -2
- package/dist/commands/agents/git.service.js.map +1 -1
- package/dist/commands/agents/types.d.ts +1 -0
- package/dist/commands/agents/types.js.map +1 -1
- package/dist/commands/create/create.command.d.ts +19 -0
- package/dist/commands/create/create.command.js +316 -0
- package/dist/commands/create/create.command.js.map +1 -0
- package/dist/commands/kb/kb.command.d.ts +27 -0
- package/dist/commands/kb/kb.command.js +596 -0
- package/dist/commands/kb/kb.command.js.map +1 -0
- package/dist/commands/login/login.command.d.ts +2 -0
- package/dist/commands/login/login.command.js +26 -4
- package/dist/commands/login/login.command.js.map +1 -1
- package/dist/commands/profiles/profiles.command.d.ts +7 -0
- package/dist/commands/profiles/profiles.command.js +104 -0
- package/dist/commands/profiles/profiles.command.js.map +1 -0
- package/dist/commands/prompts/prompts.command.d.ts +16 -0
- package/dist/commands/prompts/prompts.command.js +468 -29
- package/dist/commands/prompts/prompts.command.js.map +1 -1
- package/dist/commands/switch/switch.command.d.ts +5 -0
- package/dist/commands/switch/switch.command.js +78 -0
- package/dist/commands/switch/switch.command.js.map +1 -0
- package/dist/common/config.d.ts +25 -2
- package/dist/common/config.js +94 -16
- package/dist/common/config.js.map +1 -1
- package/dist/common/help.d.ts +1 -1
- package/dist/common/help.js +4 -1
- package/dist/common/help.js.map +1 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/package.json +27 -23
- package/QUICK-TEST-GUIDE.md +0 -273
|
@@ -1,10 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
2
18
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
19
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
20
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
21
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
22
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
23
|
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
8
41
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
42
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
43
|
};
|
|
@@ -14,55 +47,425 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
48
|
exports.PromptsCommand = void 0;
|
|
16
49
|
const nest_commander_1 = require("nest-commander");
|
|
50
|
+
const prompts_1 = require("@clack/prompts");
|
|
17
51
|
const config_1 = require("../../common/config");
|
|
18
|
-
const logger_1 = require("../../common/logger");
|
|
19
52
|
const api_client_1 = require("../../common/api-client");
|
|
20
53
|
const chalk_1 = __importDefault(require("chalk"));
|
|
54
|
+
const child_process_1 = require("child_process");
|
|
55
|
+
const os = __importStar(require("os"));
|
|
56
|
+
const fs = __importStar(require("fs"));
|
|
57
|
+
const path = __importStar(require("path"));
|
|
21
58
|
let PromptsCommand = class PromptsCommand extends nest_commander_1.CommandRunner {
|
|
22
59
|
async run(inputs, options) {
|
|
23
60
|
const [action, name, data] = inputs;
|
|
24
|
-
const actions = ['get', 'render'];
|
|
25
61
|
if (!action) {
|
|
26
|
-
|
|
27
|
-
console.log(chalk_1.default.gray('Manage AI prompts and templates\n'));
|
|
28
|
-
console.log(chalk_1.default.cyan('Available actions:'));
|
|
29
|
-
console.log(chalk_1.default.gray(' rf prompts get <name> # Get prompt template'));
|
|
30
|
-
console.log(chalk_1.default.gray(' rf prompts render <name> # Render with variables'));
|
|
31
|
-
console.log(chalk_1.default.cyan('\nQuick start:'));
|
|
32
|
-
console.log(chalk_1.default.white(' rf prompts get my-prompt'));
|
|
33
|
-
return;
|
|
62
|
+
return this.interactiveMode(options);
|
|
34
63
|
}
|
|
64
|
+
const actions = ['list', 'get', 'create', 'update', 'delete', 'render'];
|
|
35
65
|
if (!actions.includes(action)) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
if (!name) {
|
|
40
|
-
(0, logger_1.logError)(config_1.ERROR_MESSAGES.NAME_REQUIRED);
|
|
66
|
+
console.log(chalk_1.default.red(`Unknown action: ${action}`));
|
|
67
|
+
console.log(chalk_1.default.gray('Available actions: ' + actions.join(', ')));
|
|
41
68
|
return;
|
|
42
69
|
}
|
|
43
70
|
try {
|
|
44
71
|
const apiClient = (0, api_client_1.createApiClient)(options.api);
|
|
45
72
|
switch (action) {
|
|
46
|
-
case '
|
|
47
|
-
|
|
48
|
-
const res = await apiClient.get(`/prompts/${name}`);
|
|
49
|
-
(0, logger_1.logJson)([res.data]);
|
|
73
|
+
case 'list':
|
|
74
|
+
await this.listPrompts(apiClient);
|
|
50
75
|
break;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
76
|
+
case 'get':
|
|
77
|
+
if (!name) {
|
|
78
|
+
console.log(chalk_1.default.red('Prompt name required'));
|
|
79
|
+
console.log(chalk_1.default.gray('Usage: rf prompts get <name>'));
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
await this.getPrompt(apiClient, name);
|
|
83
|
+
break;
|
|
84
|
+
case 'create':
|
|
85
|
+
await this.createPrompt(apiClient, name, data, options);
|
|
86
|
+
break;
|
|
87
|
+
case 'update':
|
|
88
|
+
if (!name) {
|
|
89
|
+
console.log(chalk_1.default.red('Prompt name required'));
|
|
55
90
|
return;
|
|
56
91
|
}
|
|
57
|
-
|
|
58
|
-
const res = await apiClient.post(`/prompts/${name}`, JSON.parse(data));
|
|
59
|
-
(0, logger_1.logJson)([res.data]);
|
|
92
|
+
await this.updatePrompt(apiClient, name, data, options);
|
|
60
93
|
break;
|
|
94
|
+
case 'delete':
|
|
95
|
+
if (!name) {
|
|
96
|
+
console.log(chalk_1.default.red('Prompt name required'));
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
await this.deletePrompt(apiClient, name, options);
|
|
100
|
+
break;
|
|
101
|
+
case 'render':
|
|
102
|
+
if (!name || !data) {
|
|
103
|
+
console.log(chalk_1.default.red('Prompt name and variables required'));
|
|
104
|
+
console.log(chalk_1.default.gray('Usage: rf prompts render <name> \'{"var": "value"}\''));
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
await this.renderPrompt(apiClient, name, data);
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
console.log(chalk_1.default.red('Error: ' + (error.response?.data?.message || error.message)));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
async interactiveMode(options) {
|
|
116
|
+
console.log('');
|
|
117
|
+
(0, prompts_1.intro)(chalk_1.default.cyan.bold('📝 Runflow Prompts'));
|
|
118
|
+
const s = (0, prompts_1.spinner)();
|
|
119
|
+
s.start('Fetching prompts...');
|
|
120
|
+
const apiClient = (0, api_client_1.createApiClient)(options.api);
|
|
121
|
+
const res = await apiClient.get('/v1/prompts');
|
|
122
|
+
const prompts = res.data.data?.prompts || [];
|
|
123
|
+
s.stop(chalk_1.default.green(`✓ Found ${prompts.length} prompts`));
|
|
124
|
+
if (prompts.length === 0) {
|
|
125
|
+
const createNew = await (0, prompts_1.confirm)({
|
|
126
|
+
message: 'No prompts found. Create one now?',
|
|
127
|
+
initialValue: true,
|
|
128
|
+
});
|
|
129
|
+
if (createNew) {
|
|
130
|
+
await this.createPrompt(apiClient);
|
|
131
|
+
}
|
|
132
|
+
(0, prompts_1.outro)(chalk_1.default.gray('Done'));
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const choices = [
|
|
136
|
+
...prompts.map((p) => ({
|
|
137
|
+
value: p.id,
|
|
138
|
+
label: p.name,
|
|
139
|
+
hint: p.isGlobal ? '🌍 Global' : '👤 Your prompt',
|
|
140
|
+
})),
|
|
141
|
+
{ value: '__create__', label: '+ Create new prompt', hint: 'Create a new prompt' },
|
|
142
|
+
];
|
|
143
|
+
const selectedId = await (0, prompts_1.select)({
|
|
144
|
+
message: 'Select a prompt:',
|
|
145
|
+
options: choices,
|
|
146
|
+
});
|
|
147
|
+
if (typeof selectedId === 'symbol') {
|
|
148
|
+
(0, prompts_1.outro)(chalk_1.default.gray('Cancelled'));
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (selectedId === '__create__') {
|
|
152
|
+
await this.createPrompt(apiClient);
|
|
153
|
+
(0, prompts_1.outro)(chalk_1.default.green('✓ Prompt created'));
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const selectedPrompt = prompts.find((p) => p.id === selectedId);
|
|
157
|
+
const actionChoices = [
|
|
158
|
+
{ value: 'view', label: '👁️ View content' },
|
|
159
|
+
{ value: 'copy', label: '📋 Copy to clipboard' },
|
|
160
|
+
{ value: 'render', label: '🔧 Render with variables' },
|
|
161
|
+
];
|
|
162
|
+
if (!selectedPrompt.isGlobal) {
|
|
163
|
+
actionChoices.push({ value: 'edit', label: '✏️ Edit' }, { value: 'delete', label: '🗑️ Delete' });
|
|
164
|
+
}
|
|
165
|
+
actionChoices.push({ value: 'cancel', label: '❌ Cancel' });
|
|
166
|
+
const actionChoice = await (0, prompts_1.select)({
|
|
167
|
+
message: `What would you like to do with "${selectedPrompt.name}"?`,
|
|
168
|
+
options: actionChoices,
|
|
169
|
+
});
|
|
170
|
+
if (typeof actionChoice === 'symbol' || actionChoice === 'cancel') {
|
|
171
|
+
(0, prompts_1.outro)(chalk_1.default.gray('Cancelled'));
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
switch (actionChoice) {
|
|
175
|
+
case 'view':
|
|
176
|
+
console.log('');
|
|
177
|
+
console.log(chalk_1.default.cyan.bold('Content:'));
|
|
178
|
+
console.log(chalk_1.default.white(selectedPrompt.content));
|
|
179
|
+
console.log('');
|
|
180
|
+
break;
|
|
181
|
+
case 'copy':
|
|
182
|
+
await this.copyToClipboard(selectedPrompt.content);
|
|
183
|
+
console.log(chalk_1.default.green('✓ Copied to clipboard'));
|
|
184
|
+
break;
|
|
185
|
+
case 'render':
|
|
186
|
+
const variables = await (0, prompts_1.text)({
|
|
187
|
+
message: 'Variables (JSON):',
|
|
188
|
+
placeholder: '{"username": "John", "product": "Runflow"}',
|
|
189
|
+
validate: (value) => {
|
|
190
|
+
if (!value)
|
|
191
|
+
return undefined;
|
|
192
|
+
try {
|
|
193
|
+
JSON.parse(value);
|
|
194
|
+
return undefined;
|
|
195
|
+
}
|
|
196
|
+
catch {
|
|
197
|
+
return 'Invalid JSON';
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
});
|
|
201
|
+
if (typeof variables === 'string' && variables) {
|
|
202
|
+
await this.renderPrompt(apiClient, selectedPrompt.name, variables);
|
|
61
203
|
}
|
|
204
|
+
break;
|
|
205
|
+
case 'edit':
|
|
206
|
+
await this.editPrompt(apiClient, selectedPrompt);
|
|
207
|
+
break;
|
|
208
|
+
case 'delete':
|
|
209
|
+
await this.deletePrompt(apiClient, selectedPrompt.name);
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
(0, prompts_1.outro)(chalk_1.default.green('✓ Done'));
|
|
213
|
+
}
|
|
214
|
+
async listPrompts(apiClient) {
|
|
215
|
+
const res = await apiClient.get('/v1/prompts');
|
|
216
|
+
const prompts = res.data.data?.prompts || [];
|
|
217
|
+
console.log(chalk_1.default.cyan.bold(`\n📝 Prompts (${prompts.length} total)\n`));
|
|
218
|
+
if (prompts.length === 0) {
|
|
219
|
+
console.log(chalk_1.default.gray(' No prompts found'));
|
|
220
|
+
console.log(chalk_1.default.gray(' Create one with: rf prompts create\n'));
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
prompts.forEach((p) => {
|
|
224
|
+
const tag = p.isGlobal ? chalk_1.default.gray('[Global]') : chalk_1.default.blue('[Yours]');
|
|
225
|
+
console.log(` ${tag} ${chalk_1.default.white(p.name)}`);
|
|
226
|
+
if (p.metadata?.description) {
|
|
227
|
+
console.log(chalk_1.default.gray(` ${p.metadata.description}`));
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
console.log('');
|
|
231
|
+
}
|
|
232
|
+
async getPrompt(apiClient, name) {
|
|
233
|
+
const res = await apiClient.get(`/v1/prompts/${name}`);
|
|
234
|
+
const prompt = res.data.data;
|
|
235
|
+
if (!prompt) {
|
|
236
|
+
console.log(chalk_1.default.red('Prompt not found'));
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
console.log(chalk_1.default.cyan.bold('\n📝 Prompt Details\n'));
|
|
240
|
+
console.log(chalk_1.default.gray('Name: ') + chalk_1.default.white(prompt.name));
|
|
241
|
+
console.log(chalk_1.default.gray('ID: ') + chalk_1.default.white(prompt.id));
|
|
242
|
+
console.log(chalk_1.default.gray('Type: ') + (prompt.isGlobal ? chalk_1.default.gray('Global') : chalk_1.default.blue('Tenant')));
|
|
243
|
+
console.log('');
|
|
244
|
+
console.log(chalk_1.default.cyan.bold('Content:'));
|
|
245
|
+
console.log(chalk_1.default.white(prompt.content));
|
|
246
|
+
console.log('');
|
|
247
|
+
}
|
|
248
|
+
async createPrompt(apiClient, name, content, options) {
|
|
249
|
+
let promptName = name;
|
|
250
|
+
let promptContent = content;
|
|
251
|
+
if (options?.content) {
|
|
252
|
+
promptContent = options.content;
|
|
253
|
+
}
|
|
254
|
+
else if (options?.file) {
|
|
255
|
+
if (!fs.existsSync(options.file)) {
|
|
256
|
+
console.log(chalk_1.default.red(`File not found: ${options.file}`));
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
promptContent = fs.readFileSync(options.file, 'utf8');
|
|
260
|
+
}
|
|
261
|
+
if ((options?.content || options?.file) && !promptName) {
|
|
262
|
+
console.log(chalk_1.default.red('Name required with --content or --file'));
|
|
263
|
+
console.log(chalk_1.default.gray('Usage: rf prompts create <name> --content "Your prompt" | --file prompt.txt'));
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
if (!promptName) {
|
|
267
|
+
const nameInput = await (0, prompts_1.text)({
|
|
268
|
+
message: 'Prompt name:',
|
|
269
|
+
placeholder: 'my-instructions',
|
|
270
|
+
validate: (value) => {
|
|
271
|
+
if (!value || !value.trim())
|
|
272
|
+
return 'Name is required';
|
|
273
|
+
if (!/^[a-z0-9-_]+$/i.test(value.trim())) {
|
|
274
|
+
return 'Use only letters, numbers, hyphens, and underscores';
|
|
275
|
+
}
|
|
276
|
+
return undefined;
|
|
277
|
+
},
|
|
278
|
+
});
|
|
279
|
+
if (typeof nameInput === 'symbol')
|
|
280
|
+
return;
|
|
281
|
+
promptName = nameInput.trim();
|
|
282
|
+
}
|
|
283
|
+
if (!promptContent) {
|
|
284
|
+
const contentChoice = await (0, prompts_1.select)({
|
|
285
|
+
message: 'How would you like to enter the content?',
|
|
286
|
+
options: [
|
|
287
|
+
{ value: 'editor', label: 'Open in editor ($EDITOR)' },
|
|
288
|
+
{ value: 'inline', label: 'Type inline' },
|
|
289
|
+
],
|
|
290
|
+
});
|
|
291
|
+
if (typeof contentChoice === 'symbol')
|
|
292
|
+
return;
|
|
293
|
+
if (contentChoice === 'editor') {
|
|
294
|
+
promptContent = await this.openEditor('');
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
const contentInput = await (0, prompts_1.text)({
|
|
298
|
+
message: 'Prompt content:',
|
|
299
|
+
placeholder: 'You are a helpful assistant...',
|
|
300
|
+
});
|
|
301
|
+
if (typeof contentInput === 'symbol')
|
|
302
|
+
return;
|
|
303
|
+
promptContent = contentInput;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
console.log(chalk_1.default.gray('Creating prompt...'));
|
|
307
|
+
try {
|
|
308
|
+
await apiClient.post('/v1/prompts', {
|
|
309
|
+
name: promptName,
|
|
310
|
+
content: promptContent,
|
|
311
|
+
});
|
|
312
|
+
console.log(chalk_1.default.green('✓ Prompt created: ' + promptName));
|
|
313
|
+
console.log('');
|
|
314
|
+
console.log(chalk_1.default.cyan.bold('Use in your agent:'));
|
|
315
|
+
console.log(chalk_1.default.white(` import { loadPrompt } from '@runflow-ai/sdk/prompts';`));
|
|
316
|
+
console.log(chalk_1.default.white(` instructions: loadPrompt('${promptName}')`));
|
|
317
|
+
console.log('');
|
|
318
|
+
}
|
|
319
|
+
catch (error) {
|
|
320
|
+
console.log(chalk_1.default.red('✗ Failed to create prompt'));
|
|
321
|
+
throw error;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
async updatePrompt(apiClient, name, content, options) {
|
|
325
|
+
let newContent = content;
|
|
326
|
+
if (options?.content) {
|
|
327
|
+
newContent = options.content;
|
|
328
|
+
}
|
|
329
|
+
else if (options?.file) {
|
|
330
|
+
if (!fs.existsSync(options.file)) {
|
|
331
|
+
console.log(chalk_1.default.red(`File not found: ${options.file}`));
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
newContent = fs.readFileSync(options.file, 'utf8');
|
|
335
|
+
}
|
|
336
|
+
console.log(chalk_1.default.gray('Fetching prompt...'));
|
|
337
|
+
const getRes = await apiClient.get(`/v1/prompts/${name}`);
|
|
338
|
+
const prompt = getRes.data.data;
|
|
339
|
+
if (!prompt) {
|
|
340
|
+
console.log(chalk_1.default.red('Prompt not found'));
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
if (prompt.isGlobal) {
|
|
344
|
+
console.log(chalk_1.default.red('Cannot edit global prompts'));
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
if (!newContent) {
|
|
348
|
+
const editChoice = await (0, prompts_1.select)({
|
|
349
|
+
message: 'How would you like to edit?',
|
|
350
|
+
options: [
|
|
351
|
+
{ value: 'editor', label: 'Open in editor ($EDITOR)' },
|
|
352
|
+
{ value: 'inline', label: 'Replace content inline' },
|
|
353
|
+
],
|
|
354
|
+
});
|
|
355
|
+
if (typeof editChoice === 'symbol')
|
|
356
|
+
return;
|
|
357
|
+
if (editChoice === 'editor') {
|
|
358
|
+
newContent = await this.openEditor(prompt.content);
|
|
62
359
|
}
|
|
360
|
+
else {
|
|
361
|
+
const contentInput = await (0, prompts_1.text)({
|
|
362
|
+
message: 'New content:',
|
|
363
|
+
placeholder: prompt.content,
|
|
364
|
+
});
|
|
365
|
+
if (typeof contentInput === 'symbol')
|
|
366
|
+
return;
|
|
367
|
+
newContent = contentInput;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
if (!newContent || newContent === prompt.content) {
|
|
371
|
+
console.log(chalk_1.default.gray('No changes'));
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
console.log(chalk_1.default.gray('Updating prompt...'));
|
|
375
|
+
await apiClient.patch(`/v1/prompts/${name}`, {
|
|
376
|
+
content: newContent,
|
|
377
|
+
});
|
|
378
|
+
console.log(chalk_1.default.green('✓ Prompt updated'));
|
|
379
|
+
}
|
|
380
|
+
async deletePrompt(apiClient, name, options) {
|
|
381
|
+
if (!options?.yes) {
|
|
382
|
+
const shouldDelete = await (0, prompts_1.confirm)({
|
|
383
|
+
message: `Delete prompt "${name}"?`,
|
|
384
|
+
initialValue: false,
|
|
385
|
+
});
|
|
386
|
+
if (typeof shouldDelete !== 'boolean' || !shouldDelete) {
|
|
387
|
+
console.log(chalk_1.default.gray('Cancelled'));
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
console.log(chalk_1.default.gray('Deleting prompt...'));
|
|
392
|
+
try {
|
|
393
|
+
await apiClient.delete(`/v1/prompts/${name}`);
|
|
394
|
+
console.log(chalk_1.default.green('✓ Prompt deleted'));
|
|
63
395
|
}
|
|
64
396
|
catch (error) {
|
|
65
|
-
(
|
|
397
|
+
console.log(chalk_1.default.red('✗ Failed to delete'));
|
|
398
|
+
throw error;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
async renderPrompt(apiClient, name, variablesJson) {
|
|
402
|
+
const variables = JSON.parse(variablesJson);
|
|
403
|
+
const s = (0, prompts_1.spinner)();
|
|
404
|
+
s.start('Rendering prompt...');
|
|
405
|
+
const res = await apiClient.post(`/prompts/${name}/render`, variables);
|
|
406
|
+
s.stop(chalk_1.default.green('✓ Rendered'));
|
|
407
|
+
console.log('');
|
|
408
|
+
console.log(chalk_1.default.cyan.bold('Rendered Content:'));
|
|
409
|
+
console.log(chalk_1.default.white(res.data.data.rendered));
|
|
410
|
+
console.log('');
|
|
411
|
+
}
|
|
412
|
+
async editPrompt(apiClient, prompt) {
|
|
413
|
+
const newContent = await this.openEditor(prompt.content);
|
|
414
|
+
if (!newContent || newContent === prompt.content) {
|
|
415
|
+
console.log(chalk_1.default.gray('No changes'));
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
const s = (0, prompts_1.spinner)();
|
|
419
|
+
s.start('Updating prompt...');
|
|
420
|
+
await apiClient.patch(`/v1/prompts/${prompt.name}`, {
|
|
421
|
+
content: newContent,
|
|
422
|
+
});
|
|
423
|
+
s.stop(chalk_1.default.green('✓ Prompt updated'));
|
|
424
|
+
}
|
|
425
|
+
async openEditor(initialContent) {
|
|
426
|
+
const tmpFile = path.join(os.tmpdir(), `runflow-prompt-${Date.now()}.txt`);
|
|
427
|
+
fs.writeFileSync(tmpFile, initialContent);
|
|
428
|
+
const editor = process.env.EDITOR || process.env.VISUAL || 'nano';
|
|
429
|
+
try {
|
|
430
|
+
(0, child_process_1.execSync)(`${editor} ${tmpFile}`, {
|
|
431
|
+
stdio: 'inherit',
|
|
432
|
+
});
|
|
433
|
+
const newContent = fs.readFileSync(tmpFile, 'utf8');
|
|
434
|
+
fs.unlinkSync(tmpFile);
|
|
435
|
+
return newContent;
|
|
436
|
+
}
|
|
437
|
+
catch (error) {
|
|
438
|
+
console.log(chalk_1.default.yellow('\nEditor failed, falling back to inline mode'));
|
|
439
|
+
if (fs.existsSync(tmpFile)) {
|
|
440
|
+
fs.unlinkSync(tmpFile);
|
|
441
|
+
}
|
|
442
|
+
const contentInput = await (0, prompts_1.text)({
|
|
443
|
+
message: 'Prompt content:',
|
|
444
|
+
placeholder: initialContent,
|
|
445
|
+
});
|
|
446
|
+
return typeof contentInput === 'string' ? contentInput : initialContent;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
async copyToClipboard(content) {
|
|
450
|
+
const platform = os.platform();
|
|
451
|
+
try {
|
|
452
|
+
if (platform === 'darwin') {
|
|
453
|
+
(0, child_process_1.execSync)('pbcopy', { input: content });
|
|
454
|
+
}
|
|
455
|
+
else if (platform === 'linux') {
|
|
456
|
+
(0, child_process_1.execSync)('xclip -selection clipboard', { input: content });
|
|
457
|
+
}
|
|
458
|
+
else if (platform === 'win32') {
|
|
459
|
+
(0, child_process_1.execSync)('clip', { input: content });
|
|
460
|
+
}
|
|
461
|
+
else {
|
|
462
|
+
throw new Error('Clipboard not supported');
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
catch {
|
|
466
|
+
console.log(chalk_1.default.yellow('Clipboard not available'));
|
|
467
|
+
console.log(chalk_1.default.gray('Content:'));
|
|
468
|
+
console.log(content);
|
|
66
469
|
}
|
|
67
470
|
}
|
|
68
471
|
parseApiKey(val) {
|
|
@@ -71,12 +474,21 @@ let PromptsCommand = class PromptsCommand extends nest_commander_1.CommandRunner
|
|
|
71
474
|
parseApi(val) {
|
|
72
475
|
return val;
|
|
73
476
|
}
|
|
477
|
+
parseContent(val) {
|
|
478
|
+
return val;
|
|
479
|
+
}
|
|
480
|
+
parseFile(val) {
|
|
481
|
+
return val;
|
|
482
|
+
}
|
|
483
|
+
parseYes() {
|
|
484
|
+
return true;
|
|
485
|
+
}
|
|
74
486
|
};
|
|
75
487
|
exports.PromptsCommand = PromptsCommand;
|
|
76
488
|
__decorate([
|
|
77
489
|
(0, nest_commander_1.Option)({
|
|
78
490
|
flags: '--api-key <key>',
|
|
79
|
-
description: 'API key override
|
|
491
|
+
description: 'API key override',
|
|
80
492
|
}),
|
|
81
493
|
__metadata("design:type", Function),
|
|
82
494
|
__metadata("design:paramtypes", [String]),
|
|
@@ -91,12 +503,39 @@ __decorate([
|
|
|
91
503
|
__metadata("design:paramtypes", [String]),
|
|
92
504
|
__metadata("design:returntype", String)
|
|
93
505
|
], PromptsCommand.prototype, "parseApi", null);
|
|
506
|
+
__decorate([
|
|
507
|
+
(0, nest_commander_1.Option)({
|
|
508
|
+
flags: '-c, --content <content>',
|
|
509
|
+
description: 'Prompt content (non-interactive mode)',
|
|
510
|
+
}),
|
|
511
|
+
__metadata("design:type", Function),
|
|
512
|
+
__metadata("design:paramtypes", [String]),
|
|
513
|
+
__metadata("design:returntype", String)
|
|
514
|
+
], PromptsCommand.prototype, "parseContent", null);
|
|
515
|
+
__decorate([
|
|
516
|
+
(0, nest_commander_1.Option)({
|
|
517
|
+
flags: '-f, --file <path>',
|
|
518
|
+
description: 'Read content from file (non-interactive mode)',
|
|
519
|
+
}),
|
|
520
|
+
__metadata("design:type", Function),
|
|
521
|
+
__metadata("design:paramtypes", [String]),
|
|
522
|
+
__metadata("design:returntype", String)
|
|
523
|
+
], PromptsCommand.prototype, "parseFile", null);
|
|
524
|
+
__decorate([
|
|
525
|
+
(0, nest_commander_1.Option)({
|
|
526
|
+
flags: '-y, --yes',
|
|
527
|
+
description: 'Skip confirmation prompts',
|
|
528
|
+
}),
|
|
529
|
+
__metadata("design:type", Function),
|
|
530
|
+
__metadata("design:paramtypes", []),
|
|
531
|
+
__metadata("design:returntype", Boolean)
|
|
532
|
+
], PromptsCommand.prototype, "parseYes", null);
|
|
94
533
|
exports.PromptsCommand = PromptsCommand = __decorate([
|
|
95
534
|
(0, nest_commander_1.Command)({
|
|
96
535
|
name: 'prompts',
|
|
97
536
|
aliases: ['prompt'],
|
|
98
537
|
arguments: '[action] [name] [data]',
|
|
99
|
-
description: 'Manage prompts (run without action for
|
|
538
|
+
description: 'Manage prompts (run without action for interactive mode)',
|
|
100
539
|
})
|
|
101
540
|
], PromptsCommand);
|
|
102
541
|
//# sourceMappingURL=pr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