@vibetasks/cli 0.6.4 → 0.6.6

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.
@@ -672,6 +672,12 @@ var addCommand = new Command2("add").description("Add a new task").argument("<ti
672
672
  title: subtaskTitle,
673
673
  done: false
674
674
  })) || [];
675
+ let sessionId;
676
+ if (createdBy === "ai") {
677
+ const sessionManager2 = getSessionManager();
678
+ const session = await sessionManager2.getOrCreateSession(projectTag);
679
+ sessionId = session.id;
680
+ }
675
681
  const task = await taskOps.createTask({
676
682
  title,
677
683
  notes: options.notes,
@@ -685,7 +691,9 @@ var addCommand = new Command2("add").description("Add a new task").argument("<ti
685
691
  status: createdBy === "ai" ? "vibing" : "todo",
686
692
  // AI tasks start vibing
687
693
  energy_required: options.energy,
688
- subtasks_json: subtasksJson
694
+ subtasks_json: subtasksJson,
695
+ session_id: sessionId
696
+ // Link to AI session for ownership tracking
689
697
  });
690
698
  if (options.tags && options.tags.length > 0) {
691
699
  const tagIds = [];
@@ -840,7 +848,7 @@ var ShortIdManager = class {
840
848
  };
841
849
 
842
850
  // src/commands/list.ts
843
- var listCommand = new Command3("list").description("List tasks").argument("[filter]", "Filter: all, today, upcoming, completed", "all").option("-l, --limit <number>", "Maximum number of tasks to show", "50").option("--project <name>", "Filter by project tag").option("--created-by <source>", "Filter by creator: ai or human").option("--status <status>", "Filter by status: todo, vibing, done").option("--short-ids", "Show short numeric IDs (1-99) for easy reference").action(async (filter, options) => {
851
+ var listCommand = new Command3("list").description("List tasks").argument("[filter]", "Filter: all, today, upcoming, completed", "all").option("-l, --limit <number>", "Maximum number of tasks to show", "50").option("--project <name>", "Filter by project tag").option("--created-by <source>", "Filter by creator: ai or human").option("--status <status>", "Filter by status: todo, vibing, done").option("--session [id]", "Filter by session (current session if no ID given)").option("--my-session", "Only show tasks from current AI session").option("--short-ids", "Show short numeric IDs (1-99) for easy reference").action(async (filter, options) => {
844
852
  try {
845
853
  const validFilters = ["all", "today", "upcoming", "completed"];
846
854
  if (!validFilters.includes(filter)) {
@@ -870,6 +878,32 @@ var listCommand = new Command3("list").description("List tasks").argument("[filt
870
878
  }
871
879
  tasks = tasks.filter((t) => t.status === options.status);
872
880
  }
881
+ if (options.mySession || options.session !== void 0) {
882
+ const sessionManager2 = getSessionManager();
883
+ let targetSessionId;
884
+ if (options.session && typeof options.session === "string") {
885
+ const session = await sessionManager2.getSession(options.session);
886
+ if (session) {
887
+ targetSessionId = session.id;
888
+ } else {
889
+ console.error(chalk4.red(`Session "${options.session}" not found`));
890
+ process.exit(1);
891
+ }
892
+ } else {
893
+ const currentSession = await sessionManager2.getCurrentSession();
894
+ if (currentSession) {
895
+ targetSessionId = currentSession.id;
896
+ } else {
897
+ console.log(chalk4.yellow("No active session. Start one with: vibetasks session start"));
898
+ process.exit(0);
899
+ }
900
+ }
901
+ if (targetSessionId) {
902
+ tasks = tasks.filter((t) => t.session_id === targetSessionId);
903
+ console.log(chalk4.gray(`Filtering by session: ${chalk4.cyan(targetSessionId)}
904
+ `));
905
+ }
906
+ }
873
907
  if (tasks.length === 0) {
874
908
  const filterMessages = {
875
909
  all: "No active tasks found",
@@ -1043,7 +1077,6 @@ import chalk6 from "chalk";
1043
1077
  import ora4 from "ora";
1044
1078
  import inquirer from "inquirer";
1045
1079
  import { AuthManager as AuthManager5, TaskOperations as TaskOperations4 } from "@vibetasks/core";
1046
- var WIP_LIMIT = 3;
1047
1080
  var vibingCommand = new Command5("vibing").alias("start").alias("v").description("Start working on a task (move to vibing status)").argument("[task-id]", "Task ID or short # (1-99) to start vibing on").option("-p, --pick", "Pick from todo tasks interactively").action(async (taskIdInput, options) => {
1048
1081
  const spinner = ora4();
1049
1082
  try {
@@ -1056,25 +1089,9 @@ var vibingCommand = new Command5("vibing").alias("start").alias("v").description
1056
1089
  }
1057
1090
  const allTasks = await taskOps.getTasks("all");
1058
1091
  const vibingTasks = allTasks.filter((t) => t.status === "vibing" && !t.completed);
1059
- if (vibingTasks.length >= WIP_LIMIT) {
1060
- console.log(chalk6.yellow("\n\u26A0 WIP Limit Warning"));
1061
- console.log(chalk6.gray(` You already have ${vibingTasks.length} tasks in progress.`));
1062
- console.log(chalk6.gray(" Research shows 3+ concurrent tasks = 40% productivity loss.\n"));
1063
- console.log(chalk6.white("Currently vibing:"));
1064
- vibingTasks.forEach((t, i) => {
1065
- console.log(chalk6.magenta(` ${i + 1}. ${t.title}`));
1066
- });
1067
- console.log("");
1068
- const { proceed } = await inquirer.prompt([{
1069
- type: "confirm",
1070
- name: "proceed",
1071
- message: "Start another task anyway?",
1072
- default: false
1073
- }]);
1074
- if (!proceed) {
1075
- console.log(chalk6.gray("\nFocus on finishing what you started! Run `vibetasks done <id>` when ready.\n"));
1076
- process.exit(0);
1077
- }
1092
+ if (vibingTasks.length > 0) {
1093
+ console.log(chalk6.gray(`
1094
+ Currently vibing on ${vibingTasks.length} task(s)`));
1078
1095
  }
1079
1096
  if (!taskId || options.pick) {
1080
1097
  const todoTasks = allTasks.filter((t) => t.status === "todo" && !t.completed);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibetasks/cli",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "description": "VibeTasks CLI - Lightning-fast task management from your terminal. Works with Claude Code, Cursor, and all AI coding tools.",
5
5
  "author": "Vyas",
6
6
  "license": "MIT",
@@ -45,8 +45,8 @@
45
45
  "typecheck": "tsc --noEmit"
46
46
  },
47
47
  "dependencies": {
48
- "@vibetasks/core": "^0.5.6",
49
- "@vibetasks/shared": "^1.4.5",
48
+ "@vibetasks/core": "^0.5.6",
49
+ "@vibetasks/shared": "^1.4.5",
50
50
  "commander": "^11.1.0",
51
51
  "chalk": "^5.3.0",
52
52
  "ora": "^8.0.1",