felo-ai 0.2.31 → 0.2.32

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.
@@ -177,7 +177,7 @@ function usage() {
177
177
  ' append-readme <short_id> Append to README (--content required)',
178
178
  ' delete-readme <short_id> Delete README',
179
179
  ' tasks <short_id> List tasks (--status, --labels optional)',
180
- ' create-task <short_id> Create a task (--title, --status, --sort required)',
180
+ ' create-task <short_id> Create a task (--title required; --status default 0, --sort default 0)',
181
181
  ' update-task <short_id> <task_id> Partially update a task',
182
182
  ' delete-task <short_id> <task_id> Delete a task',
183
183
  ' task-records <short_id> <task_id> List task records (comments + history)',
@@ -609,12 +609,12 @@ async function main() {
609
609
  case 'create-task': {
610
610
  if (!shortId) { console.error('ERROR: short_id is required'); break; }
611
611
  if (!args.title) { console.error('ERROR: --title is required'); break; }
612
- if (args.status === '') { console.error('ERROR: --status is required'); break; }
613
- if (args.sort === '') { console.error('ERROR: --sort is required'); break; }
614
612
  spinnerId = startSpinner('Creating task');
615
- const body = { title: args.title, status: parseInt(args.status, 10), sort: parseInt(args.sort, 10) };
613
+ const status = (args.status !== '') ? parseInt(args.status, 10) : 0;
614
+ const sort = (args.sort !== '') ? parseInt(args.sort, 10) : 0;
615
+ const body = { title: args.title, status, sort };
616
616
  if (args.description) body.description = args.description;
617
- if (args.labels) body.labels = args.labels.split(',').map(l => l.trim()).filter(Boolean);
617
+ body.labels = args.labels ? args.labels.split(',').map(l => l.trim()).filter(Boolean) : [];
618
618
  const payload = await apiRequest('POST', `/livedocs/${shortId}/tasks`, body, apiKey, apiBase, timeoutMs);
619
619
  if (json) { console.log(JSON.stringify(payload, null, 2)); }
620
620
  else { process.stdout.write('Task created!\n\n'); process.stdout.write(formatTask(payload?.data)); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "felo-ai",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "description": "Felo AI CLI - real-time search, PPT generation, SuperAgent conversation, LiveDoc management, web fetch, YouTube subtitles, LiveDoc knowledge base, and X (Twitter) search from the terminal",
5
5
  "type": "module",
6
6
  "main": "src/cli.js",
package/src/cli.js CHANGED
@@ -882,8 +882,8 @@ livedocCmd
882
882
  .command("create-task <short_id>")
883
883
  .description("Create a task in a LiveDoc")
884
884
  .requiredOption("--title <title>", "task title")
885
- .requiredOption("--status <n>", "task status: 0=TODO, 1=IN_PROGRESS, 2=DONE")
886
- .requiredOption("--sort <n>", "sort order (non-negative integer)")
885
+ .option("--status <n>", "task status: 0=TODO, 1=IN_PROGRESS, 2=DONE (default: 0)")
886
+ .option("--sort <n>", "sort order (non-negative integer, default: 0)")
887
887
  .option("--description <desc>", "task description")
888
888
  .option("--labels <labels>", "comma-separated labels (max 10)")
889
889
  .option("-j, --json", "output raw JSON")
package/src/livedoc.js CHANGED
@@ -700,17 +700,17 @@ export async function createTask(shortId, opts = {}) {
700
700
  if (!apiKey) { console.error(NO_KEY_MESSAGE.trim()); return 1; }
701
701
  if (!shortId) { process.stderr.write('ERROR: short_id is required.\n'); return 1; }
702
702
  if (!opts.title) { process.stderr.write('ERROR: --title is required.\n'); return 1; }
703
- if (opts.status === undefined || opts.status === '') { process.stderr.write('ERROR: --status is required.\n'); return 1; }
704
- if (opts.sort === undefined || opts.sort === '') { process.stderr.write('ERROR: --sort is required.\n'); return 1; }
705
703
 
706
704
  const apiBase = await getApiBase();
707
705
  const timeoutMs = opts.timeoutMs || DEFAULT_TIMEOUT_MS;
708
706
  const spinnerId = startSpinner('Creating task');
709
707
 
710
708
  try {
711
- const body = { title: opts.title, status: parseInt(opts.status, 10), sort: parseInt(opts.sort, 10) };
709
+ const status = (opts.status !== undefined && opts.status !== '') ? parseInt(opts.status, 10) : 0;
710
+ const sort = (opts.sort !== undefined && opts.sort !== '') ? parseInt(opts.sort, 10) : 0;
711
+ const body = { title: opts.title, status, sort };
712
712
  if (opts.description) body.description = opts.description;
713
- if (opts.labels) body.labels = opts.labels.split(',').map(l => l.trim()).filter(Boolean);
713
+ body.labels = opts.labels ? opts.labels.split(',').map(l => l.trim()).filter(Boolean) : [];
714
714
  const payload = await apiRequest('POST', `/livedocs/${shortId}/tasks`, body, apiKey, apiBase, timeoutMs);
715
715
  if (opts.json) { console.log(JSON.stringify(payload, null, 2)); return 0; }
716
716
  process.stdout.write('Task created!\n\n');