numo-cli 1.1.0 → 1.2.0

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 (2) hide show
  1. package/dist/cli.cjs +19 -4
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -6803,6 +6803,7 @@ async function createTask(uid, body) {
6803
6803
  dueDate,
6804
6804
  remindDate: null,
6805
6805
  tags: Array.isArray(body.tags) ? body.tags : [],
6806
+ assets: [],
6806
6807
  note: body.note ?? "",
6807
6808
  priority: typeof body.priority === "number" ? body.priority : 0,
6808
6809
  difficulty: body.difficulty ?? null,
@@ -6813,7 +6814,8 @@ async function createTask(uid, body) {
6813
6814
  repeat: body.repeat ?? { type: "none", every: null, end: null, endDate: null, endAfter: null, monthDays: null, weekDays: null },
6814
6815
  subtasks: Array.isArray(body.subtasks) ? body.subtasks.map((s) => ({ id: crypto3.randomUUID(), text: s.text, completed: false })) : [],
6815
6816
  withTime: dueDate != null && !/\b00:00$/.test(dueDate),
6816
- listPosition: null
6817
+ listPosition: null,
6818
+ source: "cli"
6817
6819
  };
6818
6820
  taskData.remindDate = getTaskRemindDate(taskData);
6819
6821
  const taskId = generateTaskId(taskData);
@@ -10268,7 +10270,7 @@ Examples:
10268
10270
  Examples:
10269
10271
  $ numo tasks get abc123
10270
10272
  $ numo tasks get abc123 --json | jq '.text'`);
10271
- tasks.command("create").description("Create a new task").option("--text <text>", "Task text").option("--due <date>", "Due date YYYY-MM-DD").option("--tags <tags>", "Comma-separated tags").option("--private", "Make task private").option("--note <note>", "Task note").option("--priority <n>", "Priority 0.1\u20131.0").option("--difficulty <n>", "Difficulty 0\u20133").option("--duration <n>", "Duration in minutes").action(async function() {
10273
+ tasks.command("create").description("Create a new task").option("--text <text>", "Task text").option("--due <date>", "Due date YYYY-MM-DD").option("--tags <tags>", "Comma-separated tags").option("--public", "Make task public (default)").option("--private", "Make task private").option("--note <note>", "Task note").option("--priority <n>", "Priority 0.1\u20131.0").option("--difficulty <n>", "Difficulty 0\u20133").option("--duration <n>", "Duration in minutes").action(async function() {
10272
10274
  const opts = this.optsWithGlobals();
10273
10275
  const uid = requireUid();
10274
10276
  const text = await promptForMissing({ value: opts.text, message: "Task text", placeholder: "What do you need to do?" });
@@ -10331,6 +10333,16 @@ Examples:
10331
10333
  body.dueDate = fmt(today2);
10332
10334
  }
10333
10335
  }
10336
+ if (!opts.private && !opts.public) {
10337
+ const visibility = await promptSelect({
10338
+ message: "Visibility",
10339
+ options: [
10340
+ { value: "public", label: "Public \u2014 visible to your squad" },
10341
+ { value: "private", label: "Private \u2014 only you can see it" }
10342
+ ]
10343
+ });
10344
+ if (visibility === "private") body.isPublic = false;
10345
+ }
10334
10346
  const addDetails = await promptConfirm({
10335
10347
  message: "Add details? (tags, effort, time, note)",
10336
10348
  initialValue: false
@@ -10376,6 +10388,7 @@ Examples:
10376
10388
  if (note) body.note = note;
10377
10389
  }
10378
10390
  }
10391
+ if (opts.public) body.isPublic = true;
10379
10392
  if (opts.private) body.isPublic = false;
10380
10393
  if (opts.tags && !body.tags) body.tags = opts.tags.split(",");
10381
10394
  if (opts.note && !body.note) body.note = opts.note;
@@ -10390,6 +10403,7 @@ Examples:
10390
10403
  if (opts.priority) body.priority = parseFloat(opts.priority);
10391
10404
  if (opts.difficulty !== void 0) body.difficulty = parseInt(opts.difficulty);
10392
10405
  if (opts.duration) body.duration = parseInt(opts.duration);
10406
+ if (opts.public) body.isPublic = true;
10393
10407
  if (opts.private) body.isPublic = false;
10394
10408
  }
10395
10409
  await runCreate({
@@ -11304,7 +11318,7 @@ function fetchLatestVersion(state) {
11304
11318
  // src/cli/cli.ts
11305
11319
  init_tty();
11306
11320
  init_errors();
11307
- var CLI_VERSION = true ? "1.1.0" : "0.0.0-dev";
11321
+ var CLI_VERSION = true ? "1.2.0" : "0.0.0-dev";
11308
11322
  var program2 = new Command();
11309
11323
  program2.name("numo").description("CLI for Numo \u2014 programmatic access for humans and AI agents").version(CLI_VERSION).option("--json [fields]", "Output as JSON (optionally: comma-separated field names)").option("-q, --quiet", "Suppress interactive output, implies --json").hook("preAction", (thisCommand) => {
11310
11324
  const opts = thisCommand.optsWithGlobals();
@@ -11366,7 +11380,7 @@ program2.command("whoami").description("Show current auth status (no API call)")
11366
11380
  }
11367
11381
  });
11368
11382
  registerTasksCommands(program2);
11369
- program2.command("add [text...]").description("Quick-add a task (today, public, no wizard)").option("--due <date>", "Due date YYYY-MM-DD (default: today)").option("--tags <tags>", "Comma-separated tags").option("--private", "Make task private").action(async function(textParts) {
11383
+ program2.command("add [text...]").description("Quick-add a task (today, public, no wizard)").option("--due <date>", "Due date YYYY-MM-DD (default: today)").option("--tags <tags>", "Comma-separated tags").option("--public", "Make task public (default)").option("--private", "Make task private").action(async function(textParts) {
11370
11384
  const opts = this.optsWithGlobals();
11371
11385
  const uid = requireUid();
11372
11386
  const text = textParts?.join(" ");
@@ -11379,6 +11393,7 @@ program2.command("add [text...]").description("Quick-add a task (today, public,
11379
11393
  dueDate: opts.due ? parseHumanDate(opts.due) ?? opts.due : (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)
11380
11394
  };
11381
11395
  if (opts.tags) body.tags = opts.tags.split(",");
11396
+ if (opts.public) body.isPublic = true;
11382
11397
  if (opts.private) body.isPublic = false;
11383
11398
  await runCreate({
11384
11399
  global: opts,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "numo-cli",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "CLI and programmatic API for Numo ADHD planner — create, complete, and manage tasks from the terminal or AI agents",
5
5
  "type": "module",
6
6
  "bin": {