flowcollab 0.3.11 → 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.
package/bin/decisions.mjs CHANGED
@@ -66,7 +66,14 @@ async function watch(rawId) {
66
66
  try {
67
67
  id = await resolveTaskId(rawId);
68
68
  } catch (e) {
69
- die(e.message || String(e), 4);
69
+ // B5: resolveTaskId only sees PENDING decisions, so a prefix for an ALREADY-RESOLVED
70
+ // decision wasn't found → exit 4 instead of its real status. Fall back to the server,
71
+ // which resolves a prefix among all the org's decisions regardless of status.
72
+ try {
73
+ const r = await flowFetch(`/api/flow/decisions/${encodeURIComponent(rawId.replace(/^#/, ''))}`);
74
+ id = r.decision?.id;
75
+ } catch { /* fall through to the original resolve error below */ }
76
+ if (!id) die(e.message || String(e), 4);
70
77
  }
71
78
 
72
79
  // No custom SIGINT handler: registering one and then calling process.exit()
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.11",
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": [
@@ -42,7 +42,10 @@
42
42
  "build": "node scripts/build.mjs",
43
43
  "dev": "node scripts/build.mjs --watch",
44
44
  "start": "node scripts/build.mjs && node --use-system-ca server.js",
45
- "start:prod": "node scripts/build.mjs && node server.js"
45
+ "start:prod": "node scripts/build.mjs && node server.js",
46
+ "test": "node --test test/*.test.js",
47
+ "test:integration": "node --test test/*.integration.test.mjs",
48
+ "test:ui": "node --test test/*.browser.test.mjs"
46
49
  },
47
50
  "dependencies": {
48
51
  "dotenv": "^16.4.7"
@@ -53,6 +56,7 @@
53
56
  "express": "^4.0.0 || ^5.0.0",
54
57
  "express-rate-limit": "^7.5.0",
55
58
  "helmet": "^8.0.0",
59
+ "playwright": "^1.60.0",
56
60
  "stripe": "^22.2.0",
57
61
  "zod": "^3.24.1"
58
62
  },