chatroom-cli 1.0.71 → 1.0.72

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/dist/index.js +70 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11749,6 +11749,7 @@ var init_report_progress = __esm(() => {
11749
11749
  // src/commands/backlog.ts
11750
11750
  var exports_backlog = {};
11751
11751
  __export(exports_backlog, {
11752
+ scoreBacklog: () => scoreBacklog,
11752
11753
  resetBacklog: () => resetBacklog,
11753
11754
  reopenBacklog: () => reopenBacklog,
11754
11755
  patchBacklog: () => patchBacklog,
@@ -12047,6 +12048,70 @@ async function patchBacklog(chatroomId, options) {
12047
12048
  process.exit(1);
12048
12049
  }
12049
12050
  }
12051
+ async function scoreBacklog(chatroomId, options) {
12052
+ const client2 = await getConvexClient();
12053
+ const sessionId = getSessionId();
12054
+ if (!sessionId) {
12055
+ console.error(`❌ Not authenticated. Please run: chatroom auth login`);
12056
+ process.exit(1);
12057
+ }
12058
+ if (!chatroomId || typeof chatroomId !== "string" || chatroomId.length < 20 || chatroomId.length > 40) {
12059
+ console.error(`❌ Invalid chatroom ID format: ID must be 20-40 characters (got ${chatroomId?.length || 0})`);
12060
+ process.exit(1);
12061
+ }
12062
+ if (!options.taskId || options.taskId.trim().length === 0) {
12063
+ console.error(`❌ Task ID is required`);
12064
+ process.exit(1);
12065
+ }
12066
+ if (options.complexity === undefined && options.value === undefined && options.priority === undefined) {
12067
+ console.error(`❌ At least one of --complexity, --value, or --priority is required`);
12068
+ console.error(` Example: chatroom backlog score --task-id=... --complexity=medium --value=high`);
12069
+ process.exit(1);
12070
+ }
12071
+ const validComplexity = ["low", "medium", "high"];
12072
+ if (options.complexity !== undefined && !validComplexity.includes(options.complexity)) {
12073
+ console.error(`❌ Invalid complexity: ${options.complexity}. Must be one of: ${validComplexity.join(", ")}`);
12074
+ process.exit(1);
12075
+ }
12076
+ const validValue = ["low", "medium", "high"];
12077
+ if (options.value !== undefined && !validValue.includes(options.value)) {
12078
+ console.error(`❌ Invalid value: ${options.value}. Must be one of: ${validValue.join(", ")}`);
12079
+ process.exit(1);
12080
+ }
12081
+ let priorityNum;
12082
+ if (options.priority !== undefined) {
12083
+ priorityNum = parseInt(options.priority, 10);
12084
+ if (isNaN(priorityNum)) {
12085
+ console.error(`❌ Invalid priority: ${options.priority}. Must be a number.`);
12086
+ process.exit(1);
12087
+ }
12088
+ }
12089
+ try {
12090
+ await client2.mutation(api.tasks.patchTask, {
12091
+ sessionId,
12092
+ taskId: options.taskId,
12093
+ complexity: options.complexity,
12094
+ value: options.value,
12095
+ priority: priorityNum
12096
+ });
12097
+ console.log("");
12098
+ console.log("✅ Task scored");
12099
+ console.log(` ID: ${options.taskId}`);
12100
+ if (options.complexity !== undefined) {
12101
+ console.log(` Complexity: ${options.complexity}`);
12102
+ }
12103
+ if (options.value !== undefined) {
12104
+ console.log(` Value: ${options.value}`);
12105
+ }
12106
+ if (priorityNum !== undefined) {
12107
+ console.log(` Priority: ${priorityNum}`);
12108
+ }
12109
+ console.log("");
12110
+ } catch (error) {
12111
+ console.error(`❌ Failed to score task: ${error.message}`);
12112
+ process.exit(1);
12113
+ }
12114
+ }
12050
12115
  async function markForReviewBacklog(chatroomId, options) {
12051
12116
  const client2 = await getConvexClient();
12052
12117
  const sessionId = getSessionId();
@@ -13949,6 +14014,11 @@ backlogCommand.command("patch-task").description("Update task scoring fields (co
13949
14014
  const { patchBacklog: patchBacklog2 } = await Promise.resolve().then(() => (init_backlog(), exports_backlog));
13950
14015
  await patchBacklog2(options.chatroomId, options);
13951
14016
  });
14017
+ backlogCommand.command("score").description("Score a backlog task by complexity, value, and priority").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role").requiredOption("--task-id <taskId>", "Task ID to score").option("--complexity <level>", "Complexity level: low, medium, high").option("--value <level>", "Value level: low, medium, high").option("--priority <n>", "Priority number (higher = more important)").action(async (options) => {
14018
+ await maybeRequireAuth();
14019
+ const { scoreBacklog: scoreBacklog2 } = await Promise.resolve().then(() => (init_backlog(), exports_backlog));
14020
+ await scoreBacklog2(options.chatroomId, options);
14021
+ });
13952
14022
  backlogCommand.command("reset-task").description("Reset a stuck in_progress task back to pending").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role").requiredOption("--task-id <taskId>", "Task ID to reset").action(async (options) => {
13953
14023
  await maybeRequireAuth();
13954
14024
  const { resetBacklog: resetBacklog2 } = await Promise.resolve().then(() => (init_backlog(), exports_backlog));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatroom-cli",
3
- "version": "1.0.71",
3
+ "version": "1.0.72",
4
4
  "description": "CLI for multi-agent chatroom collaboration",
5
5
  "type": "module",
6
6
  "bin": {