@lovelybunch/cli 1.0.75-alpha.9 ā 1.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +5 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/events.js +3 -3
- package/dist/commands/events.js.map +1 -1
- package/dist/commands/implement.d.ts.map +1 -1
- package/dist/commands/implement.js +31 -24
- package/dist/commands/implement.js.map +1 -1
- package/dist/commands/init.js +2 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.js +23 -23
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/mail.d.ts +3 -0
- package/dist/commands/mail.d.ts.map +1 -0
- package/dist/commands/mail.js +274 -0
- package/dist/commands/mail.js.map +1 -0
- package/dist/commands/notify.d.ts +3 -0
- package/dist/commands/notify.d.ts.map +1 -0
- package/dist/commands/notify.js +36 -0
- package/dist/commands/notify.js.map +1 -0
- package/dist/commands/propose.js +18 -18
- package/dist/commands/propose.js.map +1 -1
- package/dist/commands/schema.js +2 -2
- package/dist/commands/schema.js.map +1 -1
- package/dist/commands/show.d.ts.map +1 -1
- package/dist/commands/show.js +33 -67
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/task.d.ts.map +1 -1
- package/dist/commands/task.js +87 -64
- package/dist/commands/task.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import ora from 'ora';
|
|
4
|
+
import { table } from 'table';
|
|
5
|
+
import inquirer from 'inquirer';
|
|
6
|
+
import { listMail, getMail, setMailStatus, replyToMail, addMailAction, } from '@lovelybunch/core';
|
|
7
|
+
// ============================================================================
|
|
8
|
+
// Helpers
|
|
9
|
+
// ============================================================================
|
|
10
|
+
const VALID_FOLDERS = ['inbox', 'read', 'sent'];
|
|
11
|
+
function validateFolder(folder) {
|
|
12
|
+
const normalized = folder.toLowerCase();
|
|
13
|
+
if (!VALID_FOLDERS.includes(normalized)) {
|
|
14
|
+
throw new Error(`Invalid folder "${folder}". Must be one of: ${VALID_FOLDERS.join(', ')}`);
|
|
15
|
+
}
|
|
16
|
+
return normalized;
|
|
17
|
+
}
|
|
18
|
+
function truncate(str, maxLen) {
|
|
19
|
+
if (str.length <= maxLen)
|
|
20
|
+
return str;
|
|
21
|
+
return str.slice(0, maxLen - 1) + 'ā¦';
|
|
22
|
+
}
|
|
23
|
+
function formatDate(dateStr) {
|
|
24
|
+
if (!dateStr)
|
|
25
|
+
return '-';
|
|
26
|
+
try {
|
|
27
|
+
const date = new Date(dateStr);
|
|
28
|
+
return date.toLocaleDateString('en-US', {
|
|
29
|
+
month: 'short',
|
|
30
|
+
day: 'numeric',
|
|
31
|
+
hour: '2-digit',
|
|
32
|
+
minute: '2-digit',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return dateStr;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
// ============================================================================
|
|
40
|
+
// Parent Command
|
|
41
|
+
// ============================================================================
|
|
42
|
+
export const mailCommand = new Command('mail')
|
|
43
|
+
.description('Manage emails')
|
|
44
|
+
.addHelpText('after', `
|
|
45
|
+
Examples:
|
|
46
|
+
${chalk.gray('# List emails in inbox (default)')}
|
|
47
|
+
nut mail list
|
|
48
|
+
nut mail list read
|
|
49
|
+
nut mail list sent
|
|
50
|
+
|
|
51
|
+
${chalk.gray('# View a specific email')}
|
|
52
|
+
nut mail get <id>
|
|
53
|
+
|
|
54
|
+
${chalk.gray('# Mark email as read or unread')}
|
|
55
|
+
nut mail set <id> --status read
|
|
56
|
+
nut mail set <id> --status unread
|
|
57
|
+
|
|
58
|
+
${chalk.gray('# Add an agent action summary to an email')}
|
|
59
|
+
nut mail action <id> "Summary of actions taken"
|
|
60
|
+
|
|
61
|
+
${chalk.gray('# Reply to an email')}
|
|
62
|
+
nut mail reply <id>
|
|
63
|
+
|
|
64
|
+
${chalk.gray('# Send an email (coming soon)')}
|
|
65
|
+
nut mail send
|
|
66
|
+
`);
|
|
67
|
+
// ============================================================================
|
|
68
|
+
// mail list [folder]
|
|
69
|
+
// ============================================================================
|
|
70
|
+
mailCommand
|
|
71
|
+
.command('list')
|
|
72
|
+
.description('List emails in a folder (default: inbox)')
|
|
73
|
+
.argument('[folder]', 'Folder to list (inbox, read, sent)', 'inbox')
|
|
74
|
+
.option('--json', 'Output as JSON')
|
|
75
|
+
.action(async (folder, options) => {
|
|
76
|
+
const spinner = ora('Loading emails...').start();
|
|
77
|
+
try {
|
|
78
|
+
const validFolder = validateFolder(folder);
|
|
79
|
+
const messages = await listMail(validFolder);
|
|
80
|
+
spinner.stop();
|
|
81
|
+
if (options.json) {
|
|
82
|
+
console.log(JSON.stringify(messages, null, 2));
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (messages.length === 0) {
|
|
86
|
+
console.log(chalk.gray(`No emails in ${validFolder}.`));
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
console.log(chalk.bold(`\nš§ ${validFolder.charAt(0).toUpperCase() + validFolder.slice(1)} (${messages.length})\n`));
|
|
90
|
+
const tableData = [
|
|
91
|
+
[
|
|
92
|
+
chalk.bold('ID'),
|
|
93
|
+
chalk.bold('From'),
|
|
94
|
+
chalk.bold('Subject'),
|
|
95
|
+
chalk.bold('Date'),
|
|
96
|
+
],
|
|
97
|
+
...messages.map((msg) => [
|
|
98
|
+
chalk.cyan(truncate(msg.id, 20)),
|
|
99
|
+
truncate(msg.from, 30),
|
|
100
|
+
truncate(msg.subject, 40),
|
|
101
|
+
chalk.gray(formatDate(msg.receivedAt)),
|
|
102
|
+
]),
|
|
103
|
+
];
|
|
104
|
+
console.log(table(tableData, {
|
|
105
|
+
border: {
|
|
106
|
+
topBody: '',
|
|
107
|
+
topJoin: '',
|
|
108
|
+
topLeft: '',
|
|
109
|
+
topRight: '',
|
|
110
|
+
bottomBody: '',
|
|
111
|
+
bottomJoin: '',
|
|
112
|
+
bottomLeft: '',
|
|
113
|
+
bottomRight: '',
|
|
114
|
+
bodyLeft: '',
|
|
115
|
+
bodyRight: '',
|
|
116
|
+
bodyJoin: ' ',
|
|
117
|
+
joinBody: '',
|
|
118
|
+
joinLeft: '',
|
|
119
|
+
joinRight: '',
|
|
120
|
+
joinJoin: '',
|
|
121
|
+
},
|
|
122
|
+
drawHorizontalLine: () => false,
|
|
123
|
+
}));
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
spinner.fail('Failed to list emails');
|
|
127
|
+
console.error(chalk.red('Error:'), error.message);
|
|
128
|
+
process.exit(1);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
// ============================================================================
|
|
132
|
+
// mail get <id>
|
|
133
|
+
// ============================================================================
|
|
134
|
+
mailCommand
|
|
135
|
+
.command('get')
|
|
136
|
+
.description('View a specific email')
|
|
137
|
+
.argument('<id>', 'Email ID')
|
|
138
|
+
.option('--json', 'Output as JSON')
|
|
139
|
+
.action(async (id, options) => {
|
|
140
|
+
const spinner = ora('Loading email...').start();
|
|
141
|
+
try {
|
|
142
|
+
const message = await getMail(id);
|
|
143
|
+
spinner.stop();
|
|
144
|
+
if (!message) {
|
|
145
|
+
console.error(chalk.red(`Email "${id}" not found.`));
|
|
146
|
+
process.exit(1);
|
|
147
|
+
}
|
|
148
|
+
if (options.json) {
|
|
149
|
+
console.log(JSON.stringify(message, null, 2));
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
console.log('');
|
|
153
|
+
console.log(chalk.bold('Subject: ') + message.subject);
|
|
154
|
+
console.log(chalk.bold('From: ') + message.from);
|
|
155
|
+
console.log(chalk.bold('To: ') + message.to.join(', '));
|
|
156
|
+
if (message.cc.length > 0) {
|
|
157
|
+
console.log(chalk.bold('CC: ') + message.cc.join(', '));
|
|
158
|
+
}
|
|
159
|
+
console.log(chalk.bold('Date: ') + formatDate(message.receivedAt));
|
|
160
|
+
console.log(chalk.bold('Folder: ') + message.folder);
|
|
161
|
+
console.log(chalk.bold('ID: ') + chalk.gray(message.id));
|
|
162
|
+
if (message.attachments.length > 0) {
|
|
163
|
+
console.log(chalk.bold('Attach: ') + message.attachments.map(a => a.filename).join(', '));
|
|
164
|
+
}
|
|
165
|
+
console.log(chalk.gray('\n' + 'ā'.repeat(60) + '\n'));
|
|
166
|
+
console.log(message.content || chalk.gray('(no body)'));
|
|
167
|
+
console.log('');
|
|
168
|
+
}
|
|
169
|
+
catch (error) {
|
|
170
|
+
spinner.fail('Failed to load email');
|
|
171
|
+
console.error(chalk.red('Error:'), error.message);
|
|
172
|
+
process.exit(1);
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
// ============================================================================
|
|
176
|
+
// mail set <id> --status <read|unread>
|
|
177
|
+
// ============================================================================
|
|
178
|
+
mailCommand
|
|
179
|
+
.command('set')
|
|
180
|
+
.description('Set email status (read or unread)')
|
|
181
|
+
.argument('<id>', 'Email ID')
|
|
182
|
+
.requiredOption('-s, --status <status>', 'Status to set: "read" or "unread"')
|
|
183
|
+
.action(async (id, options) => {
|
|
184
|
+
const status = options.status.toLowerCase();
|
|
185
|
+
if (status !== 'read' && status !== 'unread') {
|
|
186
|
+
console.error(chalk.red('Error: --status must be "read" or "unread"'));
|
|
187
|
+
process.exit(1);
|
|
188
|
+
}
|
|
189
|
+
const spinner = ora(`Marking email as ${status}...`).start();
|
|
190
|
+
try {
|
|
191
|
+
const message = await setMailStatus(id, status);
|
|
192
|
+
spinner.succeed(chalk.green(`Email marked as ${status} (now in ${message.folder})`));
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
spinner.fail(`Failed to set email status`);
|
|
196
|
+
console.error(chalk.red('Error:'), error.message);
|
|
197
|
+
process.exit(1);
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
// ============================================================================
|
|
201
|
+
// mail reply <id>
|
|
202
|
+
// ============================================================================
|
|
203
|
+
mailCommand
|
|
204
|
+
.command('reply')
|
|
205
|
+
.description('Reply to an email')
|
|
206
|
+
.argument('<id>', 'Email ID to reply to')
|
|
207
|
+
.option('-m, --message <message>', 'Reply message (skips interactive prompt)')
|
|
208
|
+
.action(async (id, options) => {
|
|
209
|
+
try {
|
|
210
|
+
const original = await getMail(id);
|
|
211
|
+
if (!original) {
|
|
212
|
+
console.error(chalk.red(`Email "${id}" not found.`));
|
|
213
|
+
process.exit(1);
|
|
214
|
+
}
|
|
215
|
+
console.log('');
|
|
216
|
+
console.log(chalk.gray(`Replying to: ${original.subject}`));
|
|
217
|
+
console.log(chalk.gray(`From: ${original.from}`));
|
|
218
|
+
console.log('');
|
|
219
|
+
let replyContent = options.message;
|
|
220
|
+
if (!replyContent) {
|
|
221
|
+
const answers = await inquirer.prompt([
|
|
222
|
+
{
|
|
223
|
+
type: 'editor',
|
|
224
|
+
name: 'content',
|
|
225
|
+
message: 'Write your reply:',
|
|
226
|
+
},
|
|
227
|
+
]);
|
|
228
|
+
replyContent = answers.content;
|
|
229
|
+
}
|
|
230
|
+
if (!replyContent || replyContent.trim().length === 0) {
|
|
231
|
+
console.log(chalk.yellow('Reply cancelled (empty message).'));
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
const spinner = ora('Sending reply...').start();
|
|
235
|
+
const reply = await replyToMail(id, { content: replyContent });
|
|
236
|
+
spinner.succeed(chalk.green(`Reply saved to sent folder (${reply.id})`));
|
|
237
|
+
}
|
|
238
|
+
catch (error) {
|
|
239
|
+
console.error(chalk.red('Error:'), error.message);
|
|
240
|
+
process.exit(1);
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
// ============================================================================
|
|
244
|
+
// mail action <id> <message>
|
|
245
|
+
// ============================================================================
|
|
246
|
+
mailCommand
|
|
247
|
+
.command('action')
|
|
248
|
+
.description('Add an agent action summary to an email')
|
|
249
|
+
.argument('<id>', 'Email ID')
|
|
250
|
+
.argument('<message>', 'Action summary message')
|
|
251
|
+
.action(async (id, message) => {
|
|
252
|
+
const spinner = ora('Adding action to email...').start();
|
|
253
|
+
try {
|
|
254
|
+
const updated = await addMailAction(id, message);
|
|
255
|
+
spinner.succeed(chalk.green(`Action added to email "${id}" (${updated.folder})`));
|
|
256
|
+
}
|
|
257
|
+
catch (error) {
|
|
258
|
+
spinner.fail('Failed to add action');
|
|
259
|
+
console.error(chalk.red('Error:'), error.message);
|
|
260
|
+
process.exit(1);
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
// ============================================================================
|
|
264
|
+
// mail send
|
|
265
|
+
// ============================================================================
|
|
266
|
+
mailCommand
|
|
267
|
+
.command('send')
|
|
268
|
+
.description('Send an email (coming soon)')
|
|
269
|
+
.action(async () => {
|
|
270
|
+
console.log(chalk.yellow('\nš§ Send email is coming soon.\n'));
|
|
271
|
+
console.log(chalk.gray('This feature will allow you to compose and send emails directly from the CLI.'));
|
|
272
|
+
console.log(chalk.gray('Stay tuned for updates!\n'));
|
|
273
|
+
});
|
|
274
|
+
//# sourceMappingURL=mail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mail.js","sourceRoot":"","sources":["../../src/commands/mail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EACL,QAAQ,EACR,OAAO,EACP,aAAa,EACb,WAAW,EACX,aAAa,GACd,MAAM,mBAAmB,CAAC;AAG3B,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,MAAM,aAAa,GAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE9D,SAAS,cAAc,CAAC,MAAc;IACpC,MAAM,UAAU,GAAG,MAAM,CAAC,WAAW,EAAgB,CAAC;IACtD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GAAG,CAAC,CAAC,CAAC;IACpF,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QACrC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,WAAW;KACR,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,6BAA6B,CAAC;KAC1C,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,mCAAmC,CAAC,CAAC,CAAC;IAC/D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,+EAA+E,CAAC,CAAC,CAAC;IACzG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC;AACvD,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify.d.ts","sourceRoot":"","sources":["../../src/commands/notify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,eAAO,MAAM,aAAa,SASxB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import ora from 'ora';
|
|
4
|
+
import { getSlackService } from '@lovelybunch/core';
|
|
5
|
+
export const notifyCommand = new Command('notify')
|
|
6
|
+
.description('Send notifications to external services')
|
|
7
|
+
.addHelpText('after', `
|
|
8
|
+
Examples:
|
|
9
|
+
${chalk.gray('# Send a message to Slack')}
|
|
10
|
+
nut notify slack "Deployment to staging complete"
|
|
11
|
+
|
|
12
|
+
${chalk.gray('# Send with a title')}
|
|
13
|
+
nut notify slack "All systems operational" --title "Health Check"
|
|
14
|
+
`);
|
|
15
|
+
// nut notify slack <message>
|
|
16
|
+
notifyCommand
|
|
17
|
+
.command('slack')
|
|
18
|
+
.description('Send a message to the configured Slack channel')
|
|
19
|
+
.argument('<message>', 'Message text to send')
|
|
20
|
+
.option('-t, --title <title>', 'Optional bold title/heading for the message')
|
|
21
|
+
.action(async (message, options) => {
|
|
22
|
+
const spinner = ora('Sending Slack message...').start();
|
|
23
|
+
try {
|
|
24
|
+
const slackService = getSlackService();
|
|
25
|
+
await slackService.sendFreeformMessage(message, {
|
|
26
|
+
title: options.title,
|
|
27
|
+
});
|
|
28
|
+
spinner.succeed(chalk.green('Message sent to Slack'));
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
spinner.fail('Failed to send Slack message');
|
|
32
|
+
console.error(chalk.red('Error:'), error.message);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=notify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify.js","sourceRoot":"","sources":["../../src/commands/notify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC/C,WAAW,CAAC,yCAAyC,CAAC;KACtD,WAAW,CAAC,OAAO,EAAE;;IAEpB,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC;;;IAGvC,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC;;CAEpC,CAAC,CAAC;AAEH,6BAA6B;AAC7B,aAAa;KACV,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,gDAAgD,CAAC;KAC7D,QAAQ,CAAC,WAAW,EAAE,sBAAsB,CAAC;KAC7C,MAAM,CAAC,qBAAqB,EAAE,6CAA6C,CAAC;KAC5E,MAAM,CAAC,KAAK,EAAE,OAAe,EAAE,OAA2B,EAAE,EAAE;IAC7D,MAAM,OAAO,GAAG,GAAG,CAAC,0BAA0B,CAAC,CAAC,KAAK,EAAE,CAAC;IAExD,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;QACvC,MAAM,YAAY,CAAC,mBAAmB,CAAC,OAAO,EAAE;YAC9C,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAC;QAEH,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC;IACxD,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;QAC7C,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
package/dist/commands/propose.js
CHANGED
|
@@ -3,7 +3,7 @@ import chalk from 'chalk';
|
|
|
3
3
|
import ora from 'ora';
|
|
4
4
|
import inquirer from 'inquirer';
|
|
5
5
|
import { promises as fs } from 'fs';
|
|
6
|
-
import {
|
|
6
|
+
import { createTask } from '@lovelybunch/core';
|
|
7
7
|
import os from 'os';
|
|
8
8
|
const VALID_PRIORITIES = ['low', 'medium', 'high', 'critical'];
|
|
9
9
|
function parseTags(tagsString) {
|
|
@@ -32,18 +32,18 @@ function interpretEscapeSequences(str) {
|
|
|
32
32
|
.replace(/\\\\/g, '\\');
|
|
33
33
|
}
|
|
34
34
|
export const proposeCommand = new Command('propose')
|
|
35
|
-
.description('Create a new
|
|
36
|
-
.argument('<intent>', 'The intent of the
|
|
35
|
+
.description('Create a new task (deprecated: use "nut task create")')
|
|
36
|
+
.argument('<intent>', 'The intent of the task')
|
|
37
37
|
.option('--author <name>', 'Author name')
|
|
38
38
|
.option('--email <email>', 'Author email')
|
|
39
39
|
.option('--type <type>', 'Author type (human/agent)', 'human')
|
|
40
|
-
.option('--description <text>', 'Detailed description or context for the
|
|
40
|
+
.option('--description <text>', 'Detailed description or context for the task')
|
|
41
41
|
.option('--file <path>', 'Read description from a file')
|
|
42
42
|
.option('--tags <tags>', 'Comma-separated tags (e.g., "ui,feature,priority")')
|
|
43
43
|
.option('--priority <level>', 'Priority (low|medium|high|critical)')
|
|
44
44
|
.option('--spec <ref>', 'Product specification reference')
|
|
45
45
|
.action(async (intent, options) => {
|
|
46
|
-
const spinner = ora('Creating
|
|
46
|
+
const spinner = ora('Creating task...').start();
|
|
47
47
|
try {
|
|
48
48
|
// Get author information
|
|
49
49
|
spinner.stop();
|
|
@@ -90,9 +90,9 @@ export const proposeCommand = new Command('propose')
|
|
|
90
90
|
// Parse and validate options
|
|
91
91
|
const tags = parseTags(options.tags);
|
|
92
92
|
const priority = validatePriority(options.priority);
|
|
93
|
-
spinner.start('Creating
|
|
94
|
-
// Create the
|
|
95
|
-
const
|
|
93
|
+
spinner.start('Creating task...');
|
|
94
|
+
// Create the task (directly persisted to storage)
|
|
95
|
+
const task = await createTask({
|
|
96
96
|
intent,
|
|
97
97
|
content: content || intent, // Use intent as content if no description provided
|
|
98
98
|
author,
|
|
@@ -103,12 +103,12 @@ export const proposeCommand = new Command('propose')
|
|
|
103
103
|
},
|
|
104
104
|
productSpecRef: options.spec,
|
|
105
105
|
});
|
|
106
|
-
spinner.succeed(`
|
|
107
|
-
console.log('\n' + chalk.bold('
|
|
108
|
-
console.log(' ID: ' + chalk.cyan(
|
|
109
|
-
console.log(' Title: ' + chalk.white(
|
|
106
|
+
spinner.succeed(`Task created: ${chalk.cyan(task.id)}`);
|
|
107
|
+
console.log('\n' + chalk.bold('Task Details:'));
|
|
108
|
+
console.log(' ID: ' + chalk.cyan(task.id));
|
|
109
|
+
console.log(' Title: ' + chalk.white(task.title || task.intent));
|
|
110
110
|
console.log(' Author: ' + chalk.white(`${author.name} (${author.type})`));
|
|
111
|
-
console.log(' Status: ' + chalk.yellow(
|
|
111
|
+
console.log(' Status: ' + chalk.yellow(task.status));
|
|
112
112
|
if (priority) {
|
|
113
113
|
const priorityColors = {
|
|
114
114
|
low: chalk.gray,
|
|
@@ -127,14 +127,14 @@ export const proposeCommand = new Command('propose')
|
|
|
127
127
|
if (content) {
|
|
128
128
|
console.log(' Content: ' + chalk.gray(`${content.length} characters`));
|
|
129
129
|
}
|
|
130
|
-
console.log(' Created: ' + chalk.gray(
|
|
130
|
+
console.log(' Created: ' + chalk.gray(task.metadata.createdAt.toLocaleString()));
|
|
131
131
|
console.log('\n' + chalk.cyan('Next steps:'));
|
|
132
|
-
console.log(' ⢠View
|
|
133
|
-
console.log(' ⢠Add plan steps: ' + chalk.yellow(`nut
|
|
134
|
-
console.log(' ⢠List all
|
|
132
|
+
console.log(' ⢠View task details: ' + chalk.yellow(`nut show ${task.id}`));
|
|
133
|
+
console.log(' ⢠Add plan steps: ' + chalk.yellow(`nut task step ${task.id}`));
|
|
134
|
+
console.log(' ⢠List all tasks: ' + chalk.yellow('nut task list'));
|
|
135
135
|
}
|
|
136
136
|
catch (error) {
|
|
137
|
-
spinner.fail('Failed to create
|
|
137
|
+
spinner.fail('Failed to create task');
|
|
138
138
|
console.error(chalk.red('Error:'), error);
|
|
139
139
|
process.exit(1);
|
|
140
140
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propose.js","sourceRoot":"","sources":["../../src/commands/propose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAA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G,CAAC,yBAAyB,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAC7E,OAAO,CAAC,GAAG,CAAC,sBAAsB,GAAG,KAAK,CAAC,MAAM,CAAC,iBAAiB,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAC/E,OAAO,CAAC,GAAG,CAAC,sBAAsB,GAAG,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;IAEtE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;QACtC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC;QAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
package/dist/commands/schema.js
CHANGED
|
@@ -17,12 +17,12 @@ schemaCommand
|
|
|
17
17
|
await maybeReset.call(fileStorage);
|
|
18
18
|
spinner.succeed('Schema reference files refreshed');
|
|
19
19
|
console.log('\n' + chalk.cyan('Updated schema files:'));
|
|
20
|
-
console.log(' ⢠.nut/.schema/
|
|
20
|
+
console.log(' ⢠.nut/.schema/task.schema.md');
|
|
21
21
|
console.log(' ⢠.nut/.schema/project.schema.md');
|
|
22
22
|
console.log(' ⢠.nut/.schema/architecture.schema.md');
|
|
23
23
|
console.log(' ⢠.nut/.schema/agent.schema.md');
|
|
24
24
|
console.log(' ⢠.nut/.schema/knowledge.schema.md');
|
|
25
|
-
console.log('\nUse these as canonical references when updating
|
|
25
|
+
console.log('\nUse these as canonical references when updating tasks, project context, or knowledge.');
|
|
26
26
|
}
|
|
27
27
|
catch (error) {
|
|
28
28
|
spinner.fail('Failed to refresh schema reference files');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/commands/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],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../src/commands/show.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,eAAO,MAAM,WAAW,SA2FpB,CAAC"}
|
package/dist/commands/show.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import ora from 'ora';
|
|
4
|
-
import {
|
|
4
|
+
import { getTask } from '@lovelybunch/core';
|
|
5
5
|
export const showCommand = new Command('show')
|
|
6
|
-
.description('Show details of a
|
|
7
|
-
.argument('<id>', '
|
|
6
|
+
.description('Show details of a task')
|
|
7
|
+
.argument('<id>', 'Task ID')
|
|
8
8
|
.option('--json', 'Output as JSON')
|
|
9
9
|
.action(async (id, options) => {
|
|
10
|
-
const spinner = ora('Loading
|
|
10
|
+
const spinner = ora('Loading task...').start();
|
|
11
11
|
try {
|
|
12
|
-
// Load the specific
|
|
13
|
-
const
|
|
12
|
+
// Load the specific task
|
|
13
|
+
const task = await getTask(id);
|
|
14
14
|
spinner.stop();
|
|
15
|
-
if (!
|
|
16
|
-
console.error(chalk.red(`
|
|
17
|
-
console.log(chalk.gray('Use "nut list" to see all
|
|
15
|
+
if (!task) {
|
|
16
|
+
console.error(chalk.red(`Task '${id}' not found.`));
|
|
17
|
+
console.log(chalk.gray('Use "nut task list" to see all tasks.'));
|
|
18
18
|
process.exit(1);
|
|
19
19
|
}
|
|
20
20
|
// Output as JSON if requested
|
|
21
21
|
if (options.json) {
|
|
22
|
-
console.log(JSON.stringify(
|
|
22
|
+
console.log(JSON.stringify(task, null, 2));
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
// Display formatted output
|
|
26
|
-
console.log('\n' + chalk.bold.underline('
|
|
26
|
+
console.log('\n' + chalk.bold.underline('Task Details'));
|
|
27
27
|
console.log();
|
|
28
28
|
// Basic Information
|
|
29
29
|
console.log(chalk.cyan('Basic Information:'));
|
|
30
|
-
console.log(' ID: ' + chalk.white(
|
|
31
|
-
console.log(' Title: ' + chalk.white(
|
|
32
|
-
console.log(' Status: ' + getStatusColor(
|
|
33
|
-
console.log(' Created: ' + chalk.white(new Date(
|
|
34
|
-
console.log(' Updated: ' + chalk.white(new Date(
|
|
30
|
+
console.log(' ID: ' + chalk.white(task.id));
|
|
31
|
+
console.log(' Title: ' + chalk.white(task.title || task.intent));
|
|
32
|
+
console.log(' Status: ' + getStatusColor(task.status)(task.status.toUpperCase()));
|
|
33
|
+
console.log(' Created: ' + chalk.white(new Date(task.metadata.createdAt).toLocaleString()));
|
|
34
|
+
console.log(' Updated: ' + chalk.white(new Date(task.metadata.updatedAt).toLocaleString()));
|
|
35
35
|
// Author Information
|
|
36
36
|
console.log('\n' + chalk.cyan('Author:'));
|
|
37
|
-
console.log(' Name: ' + chalk.white(
|
|
38
|
-
console.log(' Type: ' + chalk.white(
|
|
39
|
-
if (
|
|
40
|
-
console.log(' Email: ' + chalk.white(
|
|
37
|
+
console.log(' Name: ' + chalk.white(task.author.name));
|
|
38
|
+
console.log(' Type: ' + chalk.white(task.author.type));
|
|
39
|
+
if (task.author.email) {
|
|
40
|
+
console.log(' Email: ' + chalk.white(task.author.email));
|
|
41
41
|
}
|
|
42
42
|
// Product Spec Reference
|
|
43
|
-
if (
|
|
43
|
+
if (task.productSpecRef) {
|
|
44
44
|
console.log('\n' + chalk.cyan('Product Specification:'));
|
|
45
|
-
console.log(' Reference: ' + chalk.white(
|
|
45
|
+
console.log(' Reference: ' + chalk.white(task.productSpecRef));
|
|
46
46
|
}
|
|
47
47
|
// Plan Steps
|
|
48
|
-
if (
|
|
48
|
+
if (task.planSteps.length > 0) {
|
|
49
49
|
console.log('\n' + chalk.cyan('Plan Steps:'));
|
|
50
|
-
|
|
50
|
+
task.planSteps.forEach((step, index) => {
|
|
51
51
|
const statusIcon = getStepStatusIcon(step.status);
|
|
52
52
|
console.log(` ${index + 1}. ${statusIcon} ${step.description}`);
|
|
53
53
|
if (step.command) {
|
|
@@ -58,56 +58,22 @@ export const showCommand = new Command('show')
|
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
// Evidence
|
|
62
|
-
if (proposal.evidence.length > 0) {
|
|
63
|
-
console.log('\n' + chalk.cyan('Evidence:'));
|
|
64
|
-
proposal.evidence.forEach((evidence) => {
|
|
65
|
-
console.log(` ⢠[${evidence.type}] ${evidence.description}`);
|
|
66
|
-
console.log(' ' + chalk.gray(new Date(evidence.timestamp).toLocaleString()));
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
// Feature Flags
|
|
70
|
-
if (proposal.featureFlags.length > 0) {
|
|
71
|
-
console.log('\n' + chalk.cyan('Feature Flags:'));
|
|
72
|
-
proposal.featureFlags.forEach((flag) => {
|
|
73
|
-
console.log(` ⢠${flag.name} (${flag.type})`);
|
|
74
|
-
console.log(' Default: ' + chalk.gray(JSON.stringify(flag.defaultValue)));
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
// Experiments
|
|
78
|
-
if (proposal.experiments.length > 0) {
|
|
79
|
-
console.log('\n' + chalk.cyan('Experiments:'));
|
|
80
|
-
proposal.experiments.forEach((exp) => {
|
|
81
|
-
console.log(` ⢠${exp.name} - ${exp.status}`);
|
|
82
|
-
console.log(' Hypothesis: ' + chalk.gray(exp.hypothesis));
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
// Release Plan
|
|
86
|
-
console.log('\n' + chalk.cyan('Release Plan:'));
|
|
87
|
-
console.log(' Strategy: ' + chalk.white(proposal.releasePlan.strategy));
|
|
88
|
-
if (proposal.releasePlan.schedule) {
|
|
89
|
-
console.log(' Schedule: ' + chalk.white(new Date(proposal.releasePlan.schedule).toLocaleString()));
|
|
90
|
-
}
|
|
91
61
|
// Metadata
|
|
92
|
-
if (
|
|
62
|
+
if (task.metadata.tags && task.metadata.tags.length > 0) {
|
|
93
63
|
console.log('\n' + chalk.cyan('Tags:'));
|
|
94
|
-
console.log(' ' +
|
|
64
|
+
console.log(' ' + task.metadata.tags.map(tag => chalk.magenta(`#${tag}`)).join(' '));
|
|
95
65
|
}
|
|
96
|
-
if (
|
|
97
|
-
console.log('\n' + chalk.cyan('Priority:') + ' ' + getPriorityColor(
|
|
66
|
+
if (task.metadata.priority) {
|
|
67
|
+
console.log('\n' + chalk.cyan('Priority:') + ' ' + getPriorityColor(task.metadata.priority)(task.metadata.priority.toUpperCase()));
|
|
98
68
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
console.log('\n' + chalk.cyan('AI Interactions:'));
|
|
102
|
-
console.log(' Count: ' + chalk.white(proposal.metadata.aiInteractions.length));
|
|
103
|
-
const totalTokens = proposal.metadata.aiInteractions.reduce((sum, ai) => sum + ai.tokens.total, 0);
|
|
104
|
-
console.log(' Total Tokens:' + chalk.white(totalTokens));
|
|
69
|
+
if (task.metadata.readiness != null) {
|
|
70
|
+
console.log(chalk.cyan('Readiness:') + ' ' + chalk.white(`${task.metadata.readiness}%`));
|
|
105
71
|
}
|
|
106
72
|
// Actions
|
|
107
73
|
console.log('\n' + chalk.cyan('Actions:'));
|
|
108
|
-
console.log(' ⢠Update status: ' + chalk.yellow(`nut
|
|
109
|
-
console.log(' ⢠Add plan step: ' + chalk.yellow(`nut
|
|
110
|
-
console.log(' ⢠Delete
|
|
74
|
+
console.log(' ⢠Update status: ' + chalk.yellow(`nut task update ${task.id} --status <status>`));
|
|
75
|
+
console.log(' ⢠Add plan step: ' + chalk.yellow(`nut task step ${task.id}`));
|
|
76
|
+
console.log(' ⢠Delete task: ' + chalk.yellow(`nut task delete ${task.id}`));
|
|
111
77
|
}
|
|
112
78
|
catch (error) {
|
|
113
79
|
spinner.fail('Failed to load Change Proposal');
|