flowcollab 0.3.12 → 0.3.13

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/bin/edit.mjs +9 -3
  2. package/package.json +1 -1
package/bin/edit.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  /* flow:edit — update task fields from the CLI.
3
3
  Usage:
4
4
  flow-edit <id> --title="new title"
5
- flow-edit <id> --priority=p1 --area=backend
5
+ flow-edit <id> --priority=P1-soon --area=backend (p0/p1/p2 shorthand also accepted)
6
6
  flow-edit <id> --due=2026-07-01
7
7
  flow-edit <id> --milestone="v1.0"
8
8
  flow-edit <id> --blocked-by=<uuid>
@@ -10,9 +10,15 @@
10
10
 
11
11
  import { flowFetch, resolveTaskId, positional, arg, die } from './_client.mjs';
12
12
 
13
+ // B16: the server enum is P0-now / P1-soon / P2-later. Accept p0/p1/p2 (and any case of the
14
+ // canonical form) so the documented shorthand isn't rejected; pass anything else through for
15
+ // the server to validate.
16
+ const PRIORITY_CANON = { p0: 'P0-now', p1: 'P1-soon', p2: 'P2-later', 'p0-now': 'P0-now', 'p1-soon': 'P1-soon', 'p2-later': 'P2-later' };
17
+ const normalizePriority = v => PRIORITY_CANON[String(v).toLowerCase()] || v;
18
+
13
19
  const FIELD_MAP = {
14
20
  title: v => ({ title: v }),
15
- priority: v => ({ priority: v }),
21
+ priority: v => ({ priority: normalizePriority(v) }),
16
22
  area: v => ({ area: v }),
17
23
  due: v => ({ due_at: /^\d{4}-\d{2}-\d{2}$/.test(v) ? v + 'T12:00:00Z' : v }),
18
24
  milestone: v => ({ milestone: v }),
@@ -29,7 +35,7 @@ async function main() {
29
35
  if (val !== undefined && val !== '') Object.assign(changes, toField(val));
30
36
  }
31
37
 
32
- if (Object.keys(changes).length === 0) die('No fields to update. Pass at least one flag like --title="..." or --priority=p1');
38
+ if (Object.keys(changes).length === 0) die('No fields to update. Pass at least one flag like --title="..." or --priority=P1-soon');
33
39
 
34
40
  const id = await resolveTaskId(raw);
35
41
  const res = await flowFetch(`/api/flow/tasks/${id}`, { method: 'PATCH', body: changes });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowcollab",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "description": "Multi-Claude coordination layer — shared task board + CLI for teams running Claude Code",
5
5
  "type": "module",
6
6
  "files": [