flowcat 1.9.0 → 1.11.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/core/addTask.ts CHANGED
@@ -14,6 +14,7 @@ import { taskTypes } from "./types";
14
14
  export type AddTaskInput = {
15
15
  type: TaskType;
16
16
  title?: string;
17
+ description?: string;
17
18
  url?: string;
18
19
  workspaceRoot: string;
19
20
  };
@@ -38,6 +39,7 @@ export class AddTaskError extends Error {
38
39
  const addTaskInputSchema = z.object({
39
40
  type: z.enum(taskTypes),
40
41
  title: z.string().optional(),
42
+ description: z.string().optional(),
41
43
  url: z.string().optional(),
42
44
  workspaceRoot: z.string(),
43
45
  });
@@ -86,6 +88,7 @@ export const addTask = async (input: AddTaskInput): Promise<AddTaskResult> => {
86
88
  const task = buildTask({
87
89
  type: parsedInput.type,
88
90
  title: finalTitle,
91
+ description: parsedInput.description,
89
92
  metadata,
90
93
  });
91
94
 
package/core/format.ts CHANGED
@@ -23,6 +23,9 @@ export const formatTaskDetails = (task: Task, alias?: string): string => {
23
23
  lines.push(`id: ${task.id}`);
24
24
  lines.push(`type: ${task.type}`);
25
25
  lines.push(`status: ${task.status}`);
26
+ if (task.description) {
27
+ lines.push(`description: ${task.description}`);
28
+ }
26
29
  lines.push(`created: ${task.created_at}`);
27
30
  lines.push(`updated: ${task.updated_at}`);
28
31
 
@@ -16,6 +16,7 @@ export const taskSchema = z
16
16
  ref: z.string(),
17
17
  type: z.enum(taskTypes),
18
18
  title: z.string(),
19
+ description: z.string().optional(),
19
20
  status: z.enum(taskStatuses),
20
21
  created_at: z.string(),
21
22
  updated_at: z.string(),
@@ -6,6 +6,7 @@ import type { TaskType } from "./types";
6
6
  export type NewTaskInput = {
7
7
  type: TaskType;
8
8
  title: string;
9
+ description?: string;
9
10
  metadata?: TaskMetadata;
10
11
  };
11
12
 
@@ -19,6 +20,7 @@ export const buildTask = (input: NewTaskInput): Task => {
19
20
  ref,
20
21
  type: input.type,
21
22
  title: input.title,
23
+ description: input.description,
22
24
  status: "backlog",
23
25
  created_at: timestamp,
24
26
  updated_at: timestamp,
package/dist/fcat.mjs CHANGED
@@ -68006,6 +68006,7 @@ var taskSchema = exports_external.object({
68006
68006
  ref: exports_external.string(),
68007
68007
  type: exports_external.enum(taskTypes),
68008
68008
  title: exports_external.string(),
68009
+ description: exports_external.string().optional(),
68009
68010
  status: exports_external.enum(taskStatuses),
68010
68011
  created_at: exports_external.string(),
68011
68012
  updated_at: exports_external.string(),
@@ -68153,6 +68154,7 @@ var buildTask = (input) => {
68153
68154
  ref,
68154
68155
  type: input.type,
68155
68156
  title: input.title,
68157
+ description: input.description,
68156
68158
  status: "backlog",
68157
68159
  created_at: timestamp,
68158
68160
  updated_at: timestamp,
@@ -68296,6 +68298,7 @@ class AddTaskError extends Error {
68296
68298
  var addTaskInputSchema = exports_external.object({
68297
68299
  type: exports_external.enum(taskTypes),
68298
68300
  title: exports_external.string().optional(),
68301
+ description: exports_external.string().optional(),
68299
68302
  url: exports_external.string().optional(),
68300
68303
  workspaceRoot: exports_external.string()
68301
68304
  });
@@ -68336,6 +68339,7 @@ var addTask = async (input) => {
68336
68339
  const task = buildTask({
68337
68340
  type: parsedInput.type,
68338
68341
  title: finalTitle,
68342
+ description: parsedInput.description,
68339
68343
  metadata
68340
68344
  });
68341
68345
  taskSchema.parse(task);
@@ -68702,6 +68706,9 @@ var formatTaskDetails = (task, alias) => {
68702
68706
  lines.push(`id: ${task.id}`);
68703
68707
  lines.push(`type: ${task.type}`);
68704
68708
  lines.push(`status: ${task.status}`);
68709
+ if (task.description) {
68710
+ lines.push(`description: ${task.description}`);
68711
+ }
68705
68712
  lines.push(`created: ${task.created_at}`);
68706
68713
  lines.push(`updated: ${task.updated_at}`);
68707
68714
  if (task.metadata.url) {
package/dist/fweb CHANGED
Binary file
package/dist/index.mjs CHANGED
@@ -16472,6 +16472,7 @@ var taskSchema = exports_external.object({
16472
16472
  ref: exports_external.string(),
16473
16473
  type: exports_external.enum(taskTypes),
16474
16474
  title: exports_external.string(),
16475
+ description: exports_external.string().optional(),
16475
16476
  status: exports_external.enum(taskStatuses),
16476
16477
  created_at: exports_external.string(),
16477
16478
  updated_at: exports_external.string(),
@@ -16533,6 +16534,7 @@ var buildTask = (input) => {
16533
16534
  ref,
16534
16535
  type: input.type,
16535
16536
  title: input.title,
16537
+ description: input.description,
16536
16538
  status: "backlog",
16537
16539
  created_at: timestamp,
16538
16540
  updated_at: timestamp,
@@ -16676,6 +16678,7 @@ class AddTaskError extends Error {
16676
16678
  var addTaskInputSchema = exports_external.object({
16677
16679
  type: exports_external.enum(taskTypes),
16678
16680
  title: exports_external.string().optional(),
16681
+ description: exports_external.string().optional(),
16679
16682
  url: exports_external.string().optional(),
16680
16683
  workspaceRoot: exports_external.string()
16681
16684
  });
@@ -16716,6 +16719,7 @@ var addTask = async (input) => {
16716
16719
  const task = buildTask({
16717
16720
  type: parsedInput.type,
16718
16721
  title: finalTitle,
16722
+ description: parsedInput.description,
16719
16723
  metadata
16720
16724
  });
16721
16725
  taskSchema.parse(task);
@@ -16736,6 +16740,7 @@ var addTask = async (input) => {
16736
16740
  // schemas/addTask.ts
16737
16741
  var addTaskCliSchema = exports_external.object({
16738
16742
  title: exports_external.string().optional(),
16743
+ description: exports_external.string().optional(),
16739
16744
  type: exports_external.enum(taskTypes),
16740
16745
  url: exports_external.string().optional()
16741
16746
  }).superRefine((data, ctx) => {
@@ -16776,6 +16781,7 @@ var runAddCommand = async ({
16776
16781
  const created = await addTask({
16777
16782
  type: parsed.data.type,
16778
16783
  title: parsed.data.title,
16784
+ description: parsed.data.description,
16779
16785
  url: parsed.data.url,
16780
16786
  workspaceRoot
16781
16787
  });
@@ -16798,9 +16804,10 @@ var runAddCommand = async ({
16798
16804
  }
16799
16805
  };
16800
16806
  var registerAddCommand = (program2, helpers) => {
16801
- program2.command("add").description("add a task").argument("[title]", "task title (optional if --url is provided)").option("--type <type>", "regular|review", "regular").option("--url <url>", "attach URL (PR or link)").action(helpers.handleAction(async (title, options, command) => {
16807
+ program2.command("add").description("add a task").argument("[title]", "task title (optional if --url is provided)").option("--type <type>", "regular|review", "regular").option("--description <description>", "task description").option("--url <url>", "attach URL (PR or link)").action(helpers.handleAction(async (title, options, command) => {
16802
16808
  const input = {
16803
16809
  title,
16810
+ description: options.description,
16804
16811
  type: options.type ?? "regular",
16805
16812
  url: options.url
16806
16813
  };
@@ -17121,6 +17128,9 @@ var formatTaskDetails = (task, alias) => {
17121
17128
  lines.push(`id: ${task.id}`);
17122
17129
  lines.push(`type: ${task.type}`);
17123
17130
  lines.push(`status: ${task.status}`);
17131
+ if (task.description) {
17132
+ lines.push(`description: ${task.description}`);
17133
+ }
17124
17134
  lines.push(`created: ${task.created_at}`);
17125
17135
  lines.push(`updated: ${task.updated_at}`);
17126
17136
  if (task.metadata.url) {
@@ -17302,6 +17312,13 @@ var runListCommand = async ({
17302
17312
  throw new Error(`Invalid status or scope: ${resolvedStatus}`);
17303
17313
  }
17304
17314
  }
17315
+ if (includeUnassigned && (!resolvedStatus || !isListScope(resolvedStatus))) {
17316
+ if (command) {
17317
+ helpers.failWithHelp(command, "--include-unassigned can only be used with date scopes (today, yesterday, this_week, last_week)");
17318
+ return;
17319
+ }
17320
+ throw new Error("--include-unassigned can only be used with date scopes (today, yesterday, this_week, last_week)");
17321
+ }
17305
17322
  if (resolvedStatus && isListScope(resolvedStatus)) {
17306
17323
  const dates = listDatesForScope(resolvedStatus);
17307
17324
  const tasks = await listAllTasks(workspaceRoot);
@@ -17338,7 +17355,7 @@ var runListCommand = async ({
17338
17355
  helpers.printLines(storedEntries.map(buildLine));
17339
17356
  };
17340
17357
  var registerListCommand = (program2, helpers) => {
17341
- program2.command("list").description("list tasks").argument("[status]", "task status or date scope").option("-u, --include-unassigned", "include tasks that were unassigned (for date scopes)").action(helpers.handleAction(async (status, options, command) => {
17358
+ program2.command("list").description("list tasks").argument("[status]", "task status (backlog, active, paused, completed, cancelled) or date scope (today, yesterday, this_week, last_week)").option("-u, --include-unassigned", "include tasks that were unassigned (for date scopes)").action(helpers.handleAction(async (status, options, command) => {
17342
17359
  await runListCommand({
17343
17360
  helpers,
17344
17361
  status,
@@ -18560,6 +18577,7 @@ var commandExamples = {
18560
18577
  "flowcat list",
18561
18578
  "flowcat list active",
18562
18579
  "flowcat list today",
18580
+ "flowcat list today --include-unassigned",
18563
18581
  "flowcat list backlog --json"
18564
18582
  ],
18565
18583
  show: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowcat",
3
- "version": "1.9.0",
3
+ "version": "1.11.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",