numo-cli 1.0.1 → 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.
package/README.md CHANGED
@@ -3,9 +3,12 @@
3
3
  **The ADHD-friendly CLI for Numo — built for humans and AI agents.**
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/numo-cli)](https://www.npmjs.com/package/numo-cli)
6
+ [![npm downloads](https://img.shields.io/npm/dm/numo-cli)](https://www.npmjs.com/package/numo-cli)
6
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7
8
  [![CI](https://github.com/mindistio/numo-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/mindistio/numo-cli/actions/workflows/ci.yml)
8
9
 
10
+ **npm:** [npmjs.com/package/numo-cli](https://www.npmjs.com/package/numo-cli)
11
+
9
12
  ## Install
10
13
 
11
14
  **npx (no install):**
package/dist/cli.cjs CHANGED
@@ -5761,14 +5761,15 @@ async function commit(writes) {
5761
5761
  const baseUrl = getFirestoreBaseUrl();
5762
5762
  const dbUrl = baseUrl.replace("/documents", "");
5763
5763
  const url2 = `${dbUrl}/documents:commit`;
5764
+ const toResourceName = (path4) => `${baseUrl}/${path4}`.replace("https://firestore.googleapis.com/v1/", "");
5764
5765
  const ops = writes.map((w) => {
5765
5766
  if (w.type === "delete") {
5766
- return { delete: `${baseUrl}/${w.path}`.replace(getFirestoreBaseUrl(), baseUrl) };
5767
+ return { delete: toResourceName(w.path) };
5767
5768
  }
5768
5769
  const op = {};
5769
5770
  if (w.type === "update" && w.data) {
5770
5771
  op.update = {
5771
- name: `${baseUrl}/${w.path}`,
5772
+ name: toResourceName(w.path),
5772
5773
  fields: toFirestoreFields(w.data)
5773
5774
  };
5774
5775
  if (w.fieldMask) {
@@ -5777,7 +5778,7 @@ async function commit(writes) {
5777
5778
  }
5778
5779
  if (w.type === "transform") {
5779
5780
  op.update = {
5780
- name: `${baseUrl}/${w.path}`,
5781
+ name: toResourceName(w.path),
5781
5782
  fields: {}
5782
5783
  };
5783
5784
  op.updateTransforms = (w.transforms ?? []).map((t2) => ({
@@ -6802,6 +6803,7 @@ async function createTask(uid, body) {
6802
6803
  dueDate,
6803
6804
  remindDate: null,
6804
6805
  tags: Array.isArray(body.tags) ? body.tags : [],
6806
+ assets: [],
6805
6807
  note: body.note ?? "",
6806
6808
  priority: typeof body.priority === "number" ? body.priority : 0,
6807
6809
  difficulty: body.difficulty ?? null,
@@ -6812,7 +6814,8 @@ async function createTask(uid, body) {
6812
6814
  repeat: body.repeat ?? { type: "none", every: null, end: null, endDate: null, endAfter: null, monthDays: null, weekDays: null },
6813
6815
  subtasks: Array.isArray(body.subtasks) ? body.subtasks.map((s) => ({ id: crypto3.randomUUID(), text: s.text, completed: false })) : [],
6814
6816
  withTime: dueDate != null && !/\b00:00$/.test(dueDate),
6815
- listPosition: null
6817
+ listPosition: null,
6818
+ source: "cli"
6816
6819
  };
6817
6820
  taskData.remindDate = getTaskRemindDate(taskData);
6818
6821
  const taskId = generateTaskId(taskData);
@@ -10267,7 +10270,7 @@ Examples:
10267
10270
  Examples:
10268
10271
  $ numo tasks get abc123
10269
10272
  $ numo tasks get abc123 --json | jq '.text'`);
10270
- 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() {
10271
10274
  const opts = this.optsWithGlobals();
10272
10275
  const uid = requireUid();
10273
10276
  const text = await promptForMissing({ value: opts.text, message: "Task text", placeholder: "What do you need to do?" });
@@ -10330,6 +10333,16 @@ Examples:
10330
10333
  body.dueDate = fmt(today2);
10331
10334
  }
10332
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
+ }
10333
10346
  const addDetails = await promptConfirm({
10334
10347
  message: "Add details? (tags, effort, time, note)",
10335
10348
  initialValue: false
@@ -10375,6 +10388,7 @@ Examples:
10375
10388
  if (note) body.note = note;
10376
10389
  }
10377
10390
  }
10391
+ if (opts.public) body.isPublic = true;
10378
10392
  if (opts.private) body.isPublic = false;
10379
10393
  if (opts.tags && !body.tags) body.tags = opts.tags.split(",");
10380
10394
  if (opts.note && !body.note) body.note = opts.note;
@@ -10389,6 +10403,7 @@ Examples:
10389
10403
  if (opts.priority) body.priority = parseFloat(opts.priority);
10390
10404
  if (opts.difficulty !== void 0) body.difficulty = parseInt(opts.difficulty);
10391
10405
  if (opts.duration) body.duration = parseInt(opts.duration);
10406
+ if (opts.public) body.isPublic = true;
10392
10407
  if (opts.private) body.isPublic = false;
10393
10408
  }
10394
10409
  await runCreate({
@@ -11303,7 +11318,7 @@ function fetchLatestVersion(state) {
11303
11318
  // src/cli/cli.ts
11304
11319
  init_tty();
11305
11320
  init_errors();
11306
- var CLI_VERSION = true ? "1.0.1" : "0.0.0-dev";
11321
+ var CLI_VERSION = true ? "1.2.0" : "0.0.0-dev";
11307
11322
  var program2 = new Command();
11308
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) => {
11309
11324
  const opts = thisCommand.optsWithGlobals();
@@ -11365,7 +11380,7 @@ program2.command("whoami").description("Show current auth status (no API call)")
11365
11380
  }
11366
11381
  });
11367
11382
  registerTasksCommands(program2);
11368
- 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) {
11369
11384
  const opts = this.optsWithGlobals();
11370
11385
  const uid = requireUid();
11371
11386
  const text = textParts?.join(" ");
@@ -11378,6 +11393,7 @@ program2.command("add [text...]").description("Quick-add a task (today, public,
11378
11393
  dueDate: opts.due ? parseHumanDate(opts.due) ?? opts.due : (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)
11379
11394
  };
11380
11395
  if (opts.tags) body.tags = opts.tags.split(",");
11396
+ if (opts.public) body.isPublic = true;
11381
11397
  if (opts.private) body.isPublic = false;
11382
11398
  await runCreate({
11383
11399
  global: opts,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "numo-cli",
3
- "version": "1.0.1",
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": {