chatroom-cli 1.8.0 → 1.10.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/dist/index.js +537 -198
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11589,14 +11589,14 @@ var init_register_agent = __esm(() => {
|
|
|
11589
11589
|
init_client2();
|
|
11590
11590
|
init_machine();
|
|
11591
11591
|
});
|
|
11592
|
-
// ../../services/backend/prompts/cli/
|
|
11593
|
-
function
|
|
11592
|
+
// ../../services/backend/prompts/cli/classify/command.ts
|
|
11593
|
+
function classifyCommand(params) {
|
|
11594
11594
|
const prefix = params.cliEnvPrefix || "";
|
|
11595
11595
|
const chatroomId = params.chatroomId || "<chatroom-id>";
|
|
11596
11596
|
const role = params.role || "<role>";
|
|
11597
11597
|
const taskId = params.taskId || "<task-id>";
|
|
11598
11598
|
const classification = params.classification || "<question|new_feature|follow_up>";
|
|
11599
|
-
const baseCmd = `${prefix}chatroom
|
|
11599
|
+
const baseCmd = `${prefix}chatroom classify --chatroom-id="${chatroomId}" --role="${role}" --task-id="${taskId}" --origin-message-classification=${classification}`;
|
|
11600
11600
|
if (params.classification === "new_feature" || classification === "new_feature") {
|
|
11601
11601
|
const title = params.title || "[Feature title]";
|
|
11602
11602
|
const description = params.description || "[Feature description]";
|
|
@@ -11619,6 +11619,30 @@ var init_new_feature = () => {};
|
|
|
11619
11619
|
var init_classification = __esm(() => {
|
|
11620
11620
|
init_new_feature();
|
|
11621
11621
|
});
|
|
11622
|
+
|
|
11623
|
+
// ../../services/backend/prompts/cli/task-started/command.ts
|
|
11624
|
+
function taskStartedCommand(params) {
|
|
11625
|
+
const prefix = params.cliEnvPrefix || "";
|
|
11626
|
+
const chatroomId = params.chatroomId || "<chatroom-id>";
|
|
11627
|
+
const role = params.role || "<role>";
|
|
11628
|
+
const taskId = params.taskId || "<task-id>";
|
|
11629
|
+
const classification = params.classification || "<question|new_feature|follow_up>";
|
|
11630
|
+
const baseCmd = `${prefix}chatroom task-started --chatroom-id="${chatroomId}" --role="${role}" --task-id="${taskId}" --origin-message-classification=${classification}`;
|
|
11631
|
+
if (params.classification === "new_feature" || classification === "new_feature") {
|
|
11632
|
+
const title = params.title || "[Feature title]";
|
|
11633
|
+
const description = params.description || "[Feature description]";
|
|
11634
|
+
const techSpecs = params.techSpecs || "[Technical specifications]";
|
|
11635
|
+
return `${baseCmd} << 'EOF'
|
|
11636
|
+
---TITLE---
|
|
11637
|
+
${title}
|
|
11638
|
+
---DESCRIPTION---
|
|
11639
|
+
${description}
|
|
11640
|
+
---TECH_SPECS---
|
|
11641
|
+
${techSpecs}
|
|
11642
|
+
EOF`;
|
|
11643
|
+
}
|
|
11644
|
+
return baseCmd;
|
|
11645
|
+
}
|
|
11622
11646
|
// ../../services/backend/prompts/cli/task-started/main-prompt.ts
|
|
11623
11647
|
var init_main_prompt = () => {};
|
|
11624
11648
|
|
|
@@ -12259,6 +12283,169 @@ var init_task_started2 = __esm(() => {
|
|
|
12259
12283
|
init_client2();
|
|
12260
12284
|
});
|
|
12261
12285
|
|
|
12286
|
+
// src/commands/classify/index.ts
|
|
12287
|
+
var exports_classify = {};
|
|
12288
|
+
__export(exports_classify, {
|
|
12289
|
+
classify: () => classify
|
|
12290
|
+
});
|
|
12291
|
+
async function createDefaultDeps8() {
|
|
12292
|
+
const client2 = await getConvexClient();
|
|
12293
|
+
return {
|
|
12294
|
+
backend: {
|
|
12295
|
+
mutation: (endpoint, args) => client2.mutation(endpoint, args),
|
|
12296
|
+
query: (endpoint, args) => client2.query(endpoint, args)
|
|
12297
|
+
},
|
|
12298
|
+
session: {
|
|
12299
|
+
getSessionId,
|
|
12300
|
+
getConvexUrl,
|
|
12301
|
+
getOtherSessionUrls
|
|
12302
|
+
}
|
|
12303
|
+
};
|
|
12304
|
+
}
|
|
12305
|
+
async function classify(chatroomId, options, deps) {
|
|
12306
|
+
const d = deps ?? await createDefaultDeps8();
|
|
12307
|
+
const { role, originMessageClassification, rawStdin, taskId } = options;
|
|
12308
|
+
const convexUrl = d.session.getConvexUrl();
|
|
12309
|
+
const cliEnvPrefix = getCliEnvPrefix(convexUrl);
|
|
12310
|
+
const sessionId = d.session.getSessionId();
|
|
12311
|
+
if (!sessionId) {
|
|
12312
|
+
const otherUrls = d.session.getOtherSessionUrls();
|
|
12313
|
+
console.error(`❌ Not authenticated for: ${convexUrl}`);
|
|
12314
|
+
if (otherUrls.length > 0) {
|
|
12315
|
+
console.error(`
|
|
12316
|
+
\uD83D\uDCA1 You have sessions for other environments:`);
|
|
12317
|
+
for (const url of otherUrls) {
|
|
12318
|
+
console.error(` • ${url}`);
|
|
12319
|
+
}
|
|
12320
|
+
console.error(`
|
|
12321
|
+
To use a different environment, set CHATROOM_CONVEX_URL:`);
|
|
12322
|
+
console.error(` CHATROOM_CONVEX_URL=${otherUrls[0]} chatroom classify ...`);
|
|
12323
|
+
console.error(`
|
|
12324
|
+
Or to authenticate for the current environment:`);
|
|
12325
|
+
}
|
|
12326
|
+
console.error(` chatroom auth login`);
|
|
12327
|
+
process.exit(1);
|
|
12328
|
+
}
|
|
12329
|
+
if (!chatroomId || typeof chatroomId !== "string" || chatroomId.length < 20 || chatroomId.length > 40) {
|
|
12330
|
+
console.error(`❌ Invalid chatroom ID format: ID must be 20-40 characters (got ${chatroomId?.length || 0})`);
|
|
12331
|
+
process.exit(1);
|
|
12332
|
+
}
|
|
12333
|
+
const chatroom = await d.backend.query(api.chatrooms.get, {
|
|
12334
|
+
sessionId,
|
|
12335
|
+
chatroomId
|
|
12336
|
+
});
|
|
12337
|
+
if (!chatroom) {
|
|
12338
|
+
console.error(`❌ Chatroom not found: ${chatroomId}`);
|
|
12339
|
+
console.error(` Verify the chatroom ID is correct and you have access.`);
|
|
12340
|
+
process.exit(1);
|
|
12341
|
+
}
|
|
12342
|
+
const entryPoint = chatroom?.teamEntryPoint ?? chatroom?.teamRoles?.[0];
|
|
12343
|
+
if (entryPoint && role.toLowerCase() !== entryPoint.toLowerCase()) {
|
|
12344
|
+
console.error(`❌ \`classify\` is only available to the entry point role (${entryPoint}). Your role is ${role}.`);
|
|
12345
|
+
console.error("");
|
|
12346
|
+
console.error(" Entry point roles receive user messages and must classify them.");
|
|
12347
|
+
console.error(" Other roles receive handoffs and should use:");
|
|
12348
|
+
console.error(` ${cliEnvPrefix}chatroom task-started --chatroom-id=${chatroomId} --role=${role} --task-id=<task-id> --no-classify`);
|
|
12349
|
+
process.exit(1);
|
|
12350
|
+
}
|
|
12351
|
+
if (originMessageClassification === "new_feature") {
|
|
12352
|
+
if (!rawStdin || rawStdin.trim().length === 0) {
|
|
12353
|
+
console.error(`❌ new_feature classification requires stdin with feature metadata`);
|
|
12354
|
+
console.error(" Provide structured stdin with TITLE, DESCRIPTION, and TECH_SPECS");
|
|
12355
|
+
console.error("");
|
|
12356
|
+
console.error(" Example:");
|
|
12357
|
+
console.error(` echo '---TITLE---
|
|
12358
|
+
Feature title
|
|
12359
|
+
---DESCRIPTION---
|
|
12360
|
+
What this feature does
|
|
12361
|
+
---TECH_SPECS---
|
|
12362
|
+
How to implement it' | ${classifyCommand({
|
|
12363
|
+
chatroomId,
|
|
12364
|
+
role,
|
|
12365
|
+
taskId: "<task-id>",
|
|
12366
|
+
classification: "new_feature",
|
|
12367
|
+
cliEnvPrefix
|
|
12368
|
+
})}`);
|
|
12369
|
+
process.exit(1);
|
|
12370
|
+
}
|
|
12371
|
+
}
|
|
12372
|
+
if (!taskId) {
|
|
12373
|
+
console.error(`❌ --task-id is required for classify`);
|
|
12374
|
+
console.error(` Usage: ${classifyCommand({
|
|
12375
|
+
chatroomId: "<chatroomId>",
|
|
12376
|
+
role: "<role>",
|
|
12377
|
+
taskId: "<task-id>",
|
|
12378
|
+
classification: "question",
|
|
12379
|
+
cliEnvPrefix
|
|
12380
|
+
})}`);
|
|
12381
|
+
process.exit(1);
|
|
12382
|
+
}
|
|
12383
|
+
const targetTask = await d.backend.query(api.tasks.getTask, {
|
|
12384
|
+
sessionId,
|
|
12385
|
+
chatroomId,
|
|
12386
|
+
taskId
|
|
12387
|
+
});
|
|
12388
|
+
if (!targetTask) {
|
|
12389
|
+
console.error(`❌ Task with ID "${taskId}" not found in this chatroom`);
|
|
12390
|
+
console.error(` Verify the task ID is correct and you have access to this chatroom`);
|
|
12391
|
+
process.exit(1);
|
|
12392
|
+
}
|
|
12393
|
+
try {
|
|
12394
|
+
await d.backend.mutation(api.tasks.startTask, {
|
|
12395
|
+
sessionId,
|
|
12396
|
+
chatroomId,
|
|
12397
|
+
role,
|
|
12398
|
+
taskId
|
|
12399
|
+
});
|
|
12400
|
+
} catch (error) {
|
|
12401
|
+
const err = error;
|
|
12402
|
+
console.error(`❌ Failed to start task`);
|
|
12403
|
+
console.error(` Error: ${err.message}`);
|
|
12404
|
+
process.exit(1);
|
|
12405
|
+
}
|
|
12406
|
+
try {
|
|
12407
|
+
const result = await d.backend.mutation(api.messages.taskStarted, {
|
|
12408
|
+
sessionId,
|
|
12409
|
+
chatroomId,
|
|
12410
|
+
role,
|
|
12411
|
+
taskId,
|
|
12412
|
+
originMessageClassification,
|
|
12413
|
+
convexUrl: d.session.getConvexUrl(),
|
|
12414
|
+
...rawStdin && { rawStdin }
|
|
12415
|
+
});
|
|
12416
|
+
console.log(`✅ Task acknowledged and classified`);
|
|
12417
|
+
console.log(` Classification: ${originMessageClassification}`);
|
|
12418
|
+
console.log(` Task: ${targetTask.content}`);
|
|
12419
|
+
if (result.reminder) {
|
|
12420
|
+
console.log(`
|
|
12421
|
+
\uD83D\uDCA1 ${result.reminder}`);
|
|
12422
|
+
}
|
|
12423
|
+
} catch (error) {
|
|
12424
|
+
const err = error;
|
|
12425
|
+
console.error(`❌ Failed to acknowledge task`);
|
|
12426
|
+
console.error(` Error: ${err.message}`);
|
|
12427
|
+
if ("stack" in err && err.stack) {
|
|
12428
|
+
const stackLines = err.stack.split(`
|
|
12429
|
+
`).slice(0, 5);
|
|
12430
|
+
console.error(` Stack trace:`);
|
|
12431
|
+
stackLines.forEach((line) => console.error(` ${line}`));
|
|
12432
|
+
}
|
|
12433
|
+
if (typeof error === "object" && error !== null && "data" in error) {
|
|
12434
|
+
const errData = error.data;
|
|
12435
|
+
if (errData) {
|
|
12436
|
+
console.error(` Server details:`, JSON.stringify(errData, null, 2));
|
|
12437
|
+
}
|
|
12438
|
+
}
|
|
12439
|
+
process.exit(1);
|
|
12440
|
+
}
|
|
12441
|
+
}
|
|
12442
|
+
var init_classify = __esm(() => {
|
|
12443
|
+
init_env();
|
|
12444
|
+
init_api3();
|
|
12445
|
+
init_storage();
|
|
12446
|
+
init_client2();
|
|
12447
|
+
});
|
|
12448
|
+
|
|
12262
12449
|
// src/utils/serialization/decode/index.ts
|
|
12263
12450
|
var exports_decode = {};
|
|
12264
12451
|
__export(exports_decode, {
|
|
@@ -12399,7 +12586,7 @@ var exports_handoff = {};
|
|
|
12399
12586
|
__export(exports_handoff, {
|
|
12400
12587
|
handoff: () => handoff
|
|
12401
12588
|
});
|
|
12402
|
-
async function
|
|
12589
|
+
async function createDefaultDeps9() {
|
|
12403
12590
|
const client2 = await getConvexClient();
|
|
12404
12591
|
return {
|
|
12405
12592
|
backend: {
|
|
@@ -12414,7 +12601,7 @@ async function createDefaultDeps8() {
|
|
|
12414
12601
|
};
|
|
12415
12602
|
}
|
|
12416
12603
|
async function handoff(chatroomId, options, deps) {
|
|
12417
|
-
const d = deps ?? await
|
|
12604
|
+
const d = deps ?? await createDefaultDeps9();
|
|
12418
12605
|
const { role, message, nextRole, attachedArtifactIds = [] } = options;
|
|
12419
12606
|
const sessionId = d.session.getSessionId();
|
|
12420
12607
|
if (!sessionId) {
|
|
@@ -12447,7 +12634,7 @@ async function handoff(chatroomId, options, deps) {
|
|
|
12447
12634
|
}
|
|
12448
12635
|
let result;
|
|
12449
12636
|
try {
|
|
12450
|
-
result = await d.backend.mutation(api.messages.
|
|
12637
|
+
result = await d.backend.mutation(api.messages.handoff, {
|
|
12451
12638
|
sessionId,
|
|
12452
12639
|
chatroomId,
|
|
12453
12640
|
senderRole: role,
|
|
@@ -12548,7 +12735,7 @@ var exports_report_progress = {};
|
|
|
12548
12735
|
__export(exports_report_progress, {
|
|
12549
12736
|
reportProgress: () => reportProgress
|
|
12550
12737
|
});
|
|
12551
|
-
async function
|
|
12738
|
+
async function createDefaultDeps10() {
|
|
12552
12739
|
const client2 = await getConvexClient();
|
|
12553
12740
|
return {
|
|
12554
12741
|
backend: {
|
|
@@ -12563,7 +12750,7 @@ async function createDefaultDeps9() {
|
|
|
12563
12750
|
};
|
|
12564
12751
|
}
|
|
12565
12752
|
async function reportProgress(chatroomId, options, deps) {
|
|
12566
|
-
const d = deps ?? await
|
|
12753
|
+
const d = deps ?? await createDefaultDeps10();
|
|
12567
12754
|
const { role, message } = options;
|
|
12568
12755
|
const sessionId = d.session.getSessionId();
|
|
12569
12756
|
if (!sessionId) {
|
|
@@ -12652,10 +12839,11 @@ __export(exports_backlog, {
|
|
|
12652
12839
|
patchBacklog: () => patchBacklog,
|
|
12653
12840
|
markForReviewBacklog: () => markForReviewBacklog,
|
|
12654
12841
|
listBacklog: () => listBacklog,
|
|
12842
|
+
historyBacklog: () => historyBacklog,
|
|
12655
12843
|
completeBacklog: () => completeBacklog,
|
|
12656
12844
|
addBacklog: () => addBacklog
|
|
12657
12845
|
});
|
|
12658
|
-
async function
|
|
12846
|
+
async function createDefaultDeps11() {
|
|
12659
12847
|
const client2 = await getConvexClient();
|
|
12660
12848
|
return {
|
|
12661
12849
|
backend: {
|
|
@@ -12684,174 +12872,111 @@ function validateChatroomId(chatroomId) {
|
|
|
12684
12872
|
}
|
|
12685
12873
|
}
|
|
12686
12874
|
async function listBacklog(chatroomId, options, deps) {
|
|
12687
|
-
const d = deps ?? await
|
|
12875
|
+
const d = deps ?? await createDefaultDeps11();
|
|
12688
12876
|
const sessionId = requireAuth2(d);
|
|
12689
12877
|
validateChatroomId(chatroomId);
|
|
12690
|
-
const
|
|
12691
|
-
"pending",
|
|
12692
|
-
"acknowledged",
|
|
12693
|
-
"in_progress",
|
|
12694
|
-
"backlog",
|
|
12695
|
-
"backlog_acknowledged",
|
|
12696
|
-
"completed",
|
|
12697
|
-
"closed",
|
|
12698
|
-
"active",
|
|
12699
|
-
"pending_review",
|
|
12700
|
-
"archived",
|
|
12701
|
-
"all"
|
|
12702
|
-
];
|
|
12703
|
-
const statusFilter = options.status;
|
|
12704
|
-
if (!statusFilter || !validStatuses.includes(statusFilter)) {
|
|
12705
|
-
console.error(`❌ Invalid or missing status: ${statusFilter || "(none)"}. Must be one of: ${validStatuses.join(", ")}`);
|
|
12706
|
-
process.exit(1);
|
|
12707
|
-
return;
|
|
12708
|
-
}
|
|
12878
|
+
const limit = options.limit ?? 100;
|
|
12709
12879
|
try {
|
|
12710
|
-
const
|
|
12880
|
+
const backlogItems = await d.backend.query(api.backlog.listBacklogItems, {
|
|
12711
12881
|
sessionId,
|
|
12712
|
-
chatroomId
|
|
12882
|
+
chatroomId,
|
|
12883
|
+
statusFilter: "active",
|
|
12884
|
+
limit
|
|
12713
12885
|
});
|
|
12714
|
-
let tasks;
|
|
12715
|
-
if (statusFilter === "active") {
|
|
12716
|
-
tasks = await d.backend.query(api.tasks.listActiveTasks, {
|
|
12717
|
-
sessionId,
|
|
12718
|
-
chatroomId,
|
|
12719
|
-
limit: options.limit || 100
|
|
12720
|
-
});
|
|
12721
|
-
} else if (statusFilter === "archived") {
|
|
12722
|
-
tasks = await d.backend.query(api.tasks.listArchivedTasks, {
|
|
12723
|
-
sessionId,
|
|
12724
|
-
chatroomId,
|
|
12725
|
-
limit: options.limit || 100
|
|
12726
|
-
});
|
|
12727
|
-
} else {
|
|
12728
|
-
tasks = await d.backend.query(api.tasks.listTasks, {
|
|
12729
|
-
sessionId,
|
|
12730
|
-
chatroomId,
|
|
12731
|
-
statusFilter: statusFilter === "all" ? undefined : statusFilter,
|
|
12732
|
-
limit: options.limit || 100
|
|
12733
|
-
});
|
|
12734
|
-
}
|
|
12735
12886
|
console.log("");
|
|
12736
12887
|
console.log("══════════════════════════════════════════════════");
|
|
12737
|
-
console.log("\uD83D\uDCCB
|
|
12888
|
+
console.log("\uD83D\uDCCB ACTIVE BACKLOG");
|
|
12738
12889
|
console.log("══════════════════════════════════════════════════");
|
|
12739
12890
|
console.log(`Chatroom: ${chatroomId}`);
|
|
12740
|
-
console.log(`Filter: ${statusFilter}`);
|
|
12741
12891
|
console.log("");
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
console.log("──────────────────────────────────────────────────");
|
|
12745
|
-
if (counts.pending > 0)
|
|
12746
|
-
console.log(` \uD83D\uDFE2 Pending: ${counts.pending}`);
|
|
12747
|
-
if (counts.in_progress > 0)
|
|
12748
|
-
console.log(` \uD83D\uDD35 In Progress: ${counts.in_progress}`);
|
|
12749
|
-
if (counts.queued > 0)
|
|
12750
|
-
console.log(` \uD83D\uDFE1 Queued: ${counts.queued}`);
|
|
12751
|
-
if (counts.backlog > 0)
|
|
12752
|
-
console.log(` ⚪ Backlog: ${counts.backlog}`);
|
|
12753
|
-
const activeTotal = counts.pending + counts.in_progress + counts.queued + counts.backlog;
|
|
12754
|
-
console.log(` \uD83D\uDCDD Active Total: ${activeTotal}/100`);
|
|
12755
|
-
console.log("");
|
|
12756
|
-
if (tasks.length === 0) {
|
|
12757
|
-
console.log("No tasks found.");
|
|
12892
|
+
if (backlogItems.length === 0) {
|
|
12893
|
+
console.log("No active backlog items.");
|
|
12758
12894
|
} else {
|
|
12759
12895
|
console.log("──────────────────────────────────────────────────");
|
|
12760
|
-
|
|
12761
|
-
|
|
12762
|
-
|
|
12763
|
-
const
|
|
12764
|
-
const statusEmoji = getStatusEmoji(task.status);
|
|
12765
|
-
const date = new Date(task.createdAt).toLocaleString("en-US", {
|
|
12896
|
+
for (let i2 = 0;i2 < backlogItems.length; i2++) {
|
|
12897
|
+
const item = backlogItems[i2];
|
|
12898
|
+
const statusEmoji = getStatusEmoji(item.status);
|
|
12899
|
+
const date = new Date(item.createdAt).toLocaleString("en-US", {
|
|
12766
12900
|
month: "short",
|
|
12767
12901
|
day: "numeric",
|
|
12768
12902
|
hour: "2-digit",
|
|
12769
12903
|
minute: "2-digit",
|
|
12770
12904
|
hour12: false
|
|
12771
12905
|
});
|
|
12772
|
-
|
|
12773
|
-
console.log(
|
|
12774
|
-
console.log(`
|
|
12775
|
-
|
|
12906
|
+
console.log(`#${i2 + 1} [${statusEmoji} ${item.status.toUpperCase()}] ${item.content}`);
|
|
12907
|
+
console.log(` ID: ${item._id}`);
|
|
12908
|
+
console.log(` Created: ${date}${item.assignedTo ? ` | Assigned: ${item.assignedTo}` : ""}`);
|
|
12909
|
+
if (item.complexity !== undefined || item.value !== undefined || item.priority !== undefined) {
|
|
12910
|
+
const parts = [];
|
|
12911
|
+
if (item.complexity)
|
|
12912
|
+
parts.push(`complexity=${item.complexity}`);
|
|
12913
|
+
if (item.value)
|
|
12914
|
+
parts.push(`value=${item.value}`);
|
|
12915
|
+
if (item.priority !== undefined)
|
|
12916
|
+
parts.push(`priority=${item.priority}`);
|
|
12917
|
+
console.log(` Score: ${parts.join(" | ")}`);
|
|
12918
|
+
}
|
|
12776
12919
|
console.log("");
|
|
12777
12920
|
}
|
|
12778
12921
|
}
|
|
12779
12922
|
console.log("──────────────────────────────────────────────────");
|
|
12780
|
-
|
|
12781
|
-
if (statusFilter === "all") {
|
|
12782
|
-
totalForFilter = counts.pending + counts.in_progress + counts.queued + counts.backlog + counts.pending_user_review + counts.completed + counts.closed;
|
|
12783
|
-
} else if (statusFilter === "active") {
|
|
12784
|
-
totalForFilter = counts.pending + counts.in_progress + counts.queued + counts.backlog;
|
|
12785
|
-
} else if (statusFilter === "archived") {
|
|
12786
|
-
totalForFilter = counts.completed + counts.closed;
|
|
12787
|
-
} else if (statusFilter === "pending_review") {
|
|
12788
|
-
totalForFilter = tasks.length;
|
|
12789
|
-
} else {
|
|
12790
|
-
totalForFilter = counts[statusFilter] ?? tasks.length;
|
|
12791
|
-
}
|
|
12792
|
-
if (tasks.length < totalForFilter) {
|
|
12793
|
-
console.log(`Showing ${tasks.length} of ${totalForFilter} task(s) (use --limit=N to see more)`);
|
|
12794
|
-
} else {
|
|
12795
|
-
console.log(`Showing ${tasks.length} task(s)`);
|
|
12796
|
-
}
|
|
12923
|
+
console.log(`Showing ${backlogItems.length} backlog item(s)`);
|
|
12797
12924
|
console.log("");
|
|
12798
12925
|
} catch (error) {
|
|
12799
|
-
console.error(`❌ Failed to list
|
|
12926
|
+
console.error(`❌ Failed to list backlog items: ${error.message}`);
|
|
12800
12927
|
process.exit(1);
|
|
12801
12928
|
return;
|
|
12802
12929
|
}
|
|
12803
12930
|
}
|
|
12804
12931
|
async function addBacklog(chatroomId, options, deps) {
|
|
12805
|
-
const d = deps ?? await
|
|
12932
|
+
const d = deps ?? await createDefaultDeps11();
|
|
12806
12933
|
const sessionId = requireAuth2(d);
|
|
12807
12934
|
validateChatroomId(chatroomId);
|
|
12808
12935
|
if (!options.content || options.content.trim().length === 0) {
|
|
12809
|
-
console.error(`❌
|
|
12936
|
+
console.error(`❌ Backlog item content cannot be empty`);
|
|
12810
12937
|
process.exit(1);
|
|
12811
12938
|
return;
|
|
12812
12939
|
}
|
|
12813
12940
|
try {
|
|
12814
|
-
const
|
|
12941
|
+
const itemId = await d.backend.mutation(api.backlog.createBacklogItem, {
|
|
12815
12942
|
sessionId,
|
|
12816
12943
|
chatroomId,
|
|
12817
12944
|
content: options.content.trim(),
|
|
12818
|
-
createdBy: options.role
|
|
12819
|
-
isBacklog: true
|
|
12945
|
+
createdBy: options.role
|
|
12820
12946
|
});
|
|
12821
12947
|
console.log("");
|
|
12822
|
-
console.log("✅
|
|
12823
|
-
console.log(` ID: ${
|
|
12824
|
-
console.log(` Status:
|
|
12825
|
-
console.log(` Position: ${result.queuePosition}`);
|
|
12948
|
+
console.log("✅ Backlog item added");
|
|
12949
|
+
console.log(` ID: ${itemId}`);
|
|
12950
|
+
console.log(` Status: backlog`);
|
|
12826
12951
|
console.log("");
|
|
12827
12952
|
} catch (error) {
|
|
12828
|
-
console.error(`❌ Failed to add
|
|
12953
|
+
console.error(`❌ Failed to add backlog item: ${error.message}`);
|
|
12829
12954
|
process.exit(1);
|
|
12830
12955
|
return;
|
|
12831
12956
|
}
|
|
12832
12957
|
}
|
|
12833
12958
|
async function completeBacklog(chatroomId, options, deps) {
|
|
12834
|
-
const d = deps ?? await
|
|
12959
|
+
const d = deps ?? await createDefaultDeps11();
|
|
12835
12960
|
const sessionId = requireAuth2(d);
|
|
12836
12961
|
validateChatroomId(chatroomId);
|
|
12837
|
-
if (!options.
|
|
12838
|
-
console.error(`❌
|
|
12962
|
+
if (!options.backlogItemId || options.backlogItemId.trim().length === 0) {
|
|
12963
|
+
console.error(`❌ Backlog item ID is required`);
|
|
12839
12964
|
process.exit(1);
|
|
12840
12965
|
return;
|
|
12841
12966
|
}
|
|
12842
12967
|
try {
|
|
12843
12968
|
const result = await d.backend.mutation(api.tasks.completeTaskById, {
|
|
12844
12969
|
sessionId,
|
|
12845
|
-
taskId: options.
|
|
12970
|
+
taskId: options.backlogItemId,
|
|
12846
12971
|
force: options.force
|
|
12847
12972
|
});
|
|
12848
12973
|
console.log("");
|
|
12849
12974
|
if (result.wasForced) {
|
|
12850
|
-
console.log("⚠️
|
|
12975
|
+
console.log("⚠️ Backlog item force-completed (was in_progress or pending)");
|
|
12851
12976
|
} else {
|
|
12852
|
-
console.log("✅
|
|
12977
|
+
console.log("✅ Backlog item completed");
|
|
12853
12978
|
}
|
|
12854
|
-
console.log(` ID: ${options.
|
|
12979
|
+
console.log(` ID: ${options.backlogItemId}`);
|
|
12855
12980
|
if (result.promoted) {
|
|
12856
12981
|
console.log(` \uD83D\uDCE4 Next task promoted: ${result.promoted}`);
|
|
12857
12982
|
console.log("");
|
|
@@ -12859,44 +12984,44 @@ async function completeBacklog(chatroomId, options, deps) {
|
|
|
12859
12984
|
}
|
|
12860
12985
|
console.log("");
|
|
12861
12986
|
} catch (error) {
|
|
12862
|
-
console.error(`❌ Failed to complete
|
|
12987
|
+
console.error(`❌ Failed to complete backlog item: ${error.message}`);
|
|
12863
12988
|
process.exit(1);
|
|
12864
12989
|
return;
|
|
12865
12990
|
}
|
|
12866
12991
|
}
|
|
12867
12992
|
async function reopenBacklog(chatroomId, options, deps) {
|
|
12868
|
-
const d = deps ?? await
|
|
12993
|
+
const d = deps ?? await createDefaultDeps11();
|
|
12869
12994
|
const sessionId = requireAuth2(d);
|
|
12870
12995
|
validateChatroomId(chatroomId);
|
|
12871
|
-
if (!options.
|
|
12872
|
-
console.error(`❌
|
|
12996
|
+
if (!options.backlogItemId || options.backlogItemId.trim().length === 0) {
|
|
12997
|
+
console.error(`❌ Backlog item ID is required`);
|
|
12873
12998
|
process.exit(1);
|
|
12874
12999
|
return;
|
|
12875
13000
|
}
|
|
12876
13001
|
try {
|
|
12877
|
-
await d.backend.mutation(api.
|
|
13002
|
+
await d.backend.mutation(api.backlog.reopenBacklogItem, {
|
|
12878
13003
|
sessionId,
|
|
12879
|
-
|
|
13004
|
+
itemId: options.backlogItemId
|
|
12880
13005
|
});
|
|
12881
13006
|
console.log("");
|
|
12882
|
-
console.log("✅
|
|
12883
|
-
console.log(` ID: ${options.
|
|
12884
|
-
console.log(` Status:
|
|
13007
|
+
console.log("✅ Backlog item reopened");
|
|
13008
|
+
console.log(` ID: ${options.backlogItemId}`);
|
|
13009
|
+
console.log(` Status: backlog`);
|
|
12885
13010
|
console.log("");
|
|
12886
|
-
console.log("\uD83D\uDCA1 The
|
|
13011
|
+
console.log("\uD83D\uDCA1 The backlog item is now ready for user review again.");
|
|
12887
13012
|
console.log("");
|
|
12888
13013
|
} catch (error) {
|
|
12889
|
-
console.error(`❌ Failed to reopen
|
|
13014
|
+
console.error(`❌ Failed to reopen backlog item: ${error.message}`);
|
|
12890
13015
|
process.exit(1);
|
|
12891
13016
|
return;
|
|
12892
13017
|
}
|
|
12893
13018
|
}
|
|
12894
13019
|
async function patchBacklog(chatroomId, options, deps) {
|
|
12895
|
-
const d = deps ?? await
|
|
13020
|
+
const d = deps ?? await createDefaultDeps11();
|
|
12896
13021
|
const sessionId = requireAuth2(d);
|
|
12897
13022
|
validateChatroomId(chatroomId);
|
|
12898
|
-
if (!options.
|
|
12899
|
-
console.error(`❌
|
|
13023
|
+
if (!options.backlogItemId || options.backlogItemId.trim().length === 0) {
|
|
13024
|
+
console.error(`❌ Backlog item ID is required`);
|
|
12900
13025
|
process.exit(1);
|
|
12901
13026
|
return;
|
|
12902
13027
|
}
|
|
@@ -12927,16 +13052,16 @@ async function patchBacklog(chatroomId, options, deps) {
|
|
|
12927
13052
|
}
|
|
12928
13053
|
}
|
|
12929
13054
|
try {
|
|
12930
|
-
await d.backend.mutation(api.
|
|
13055
|
+
await d.backend.mutation(api.backlog.patchBacklogItem, {
|
|
12931
13056
|
sessionId,
|
|
12932
|
-
|
|
13057
|
+
itemId: options.backlogItemId,
|
|
12933
13058
|
complexity: options.complexity,
|
|
12934
13059
|
value: options.value,
|
|
12935
13060
|
priority: priorityNum
|
|
12936
13061
|
});
|
|
12937
13062
|
console.log("");
|
|
12938
|
-
console.log("✅
|
|
12939
|
-
console.log(` ID: ${options.
|
|
13063
|
+
console.log("✅ Backlog item updated");
|
|
13064
|
+
console.log(` ID: ${options.backlogItemId}`);
|
|
12940
13065
|
if (options.complexity !== undefined) {
|
|
12941
13066
|
console.log(` Complexity: ${options.complexity}`);
|
|
12942
13067
|
}
|
|
@@ -12948,23 +13073,23 @@ async function patchBacklog(chatroomId, options, deps) {
|
|
|
12948
13073
|
}
|
|
12949
13074
|
console.log("");
|
|
12950
13075
|
} catch (error) {
|
|
12951
|
-
console.error(`❌ Failed to patch
|
|
13076
|
+
console.error(`❌ Failed to patch backlog item: ${error.message}`);
|
|
12952
13077
|
process.exit(1);
|
|
12953
13078
|
return;
|
|
12954
13079
|
}
|
|
12955
13080
|
}
|
|
12956
13081
|
async function scoreBacklog(chatroomId, options, deps) {
|
|
12957
|
-
const d = deps ?? await
|
|
13082
|
+
const d = deps ?? await createDefaultDeps11();
|
|
12958
13083
|
const sessionId = requireAuth2(d);
|
|
12959
13084
|
validateChatroomId(chatroomId);
|
|
12960
|
-
if (!options.
|
|
12961
|
-
console.error(`❌
|
|
13085
|
+
if (!options.backlogItemId || options.backlogItemId.trim().length === 0) {
|
|
13086
|
+
console.error(`❌ Backlog item ID is required`);
|
|
12962
13087
|
process.exit(1);
|
|
12963
13088
|
return;
|
|
12964
13089
|
}
|
|
12965
13090
|
if (options.complexity === undefined && options.value === undefined && options.priority === undefined) {
|
|
12966
13091
|
console.error(`❌ At least one of --complexity, --value, or --priority is required`);
|
|
12967
|
-
console.error(` Example: chatroom backlog score --
|
|
13092
|
+
console.error(` Example: chatroom backlog score --backlog-item-id=... --complexity=medium --value=high`);
|
|
12968
13093
|
process.exit(1);
|
|
12969
13094
|
return;
|
|
12970
13095
|
}
|
|
@@ -12990,16 +13115,16 @@ async function scoreBacklog(chatroomId, options, deps) {
|
|
|
12990
13115
|
}
|
|
12991
13116
|
}
|
|
12992
13117
|
try {
|
|
12993
|
-
await d.backend.mutation(api.
|
|
13118
|
+
await d.backend.mutation(api.backlog.patchBacklogItem, {
|
|
12994
13119
|
sessionId,
|
|
12995
|
-
|
|
13120
|
+
itemId: options.backlogItemId,
|
|
12996
13121
|
complexity: options.complexity,
|
|
12997
13122
|
value: options.value,
|
|
12998
13123
|
priority: priorityNum
|
|
12999
13124
|
});
|
|
13000
13125
|
console.log("");
|
|
13001
|
-
console.log("✅
|
|
13002
|
-
console.log(` ID: ${options.
|
|
13126
|
+
console.log("✅ Backlog item scored");
|
|
13127
|
+
console.log(` ID: ${options.backlogItemId}`);
|
|
13003
13128
|
if (options.complexity !== undefined) {
|
|
13004
13129
|
console.log(` Complexity: ${options.complexity}`);
|
|
13005
13130
|
}
|
|
@@ -13011,34 +13136,129 @@ async function scoreBacklog(chatroomId, options, deps) {
|
|
|
13011
13136
|
}
|
|
13012
13137
|
console.log("");
|
|
13013
13138
|
} catch (error) {
|
|
13014
|
-
console.error(`❌ Failed to score
|
|
13139
|
+
console.error(`❌ Failed to score backlog item: ${error.message}`);
|
|
13015
13140
|
process.exit(1);
|
|
13016
13141
|
return;
|
|
13017
13142
|
}
|
|
13018
13143
|
}
|
|
13019
13144
|
async function markForReviewBacklog(chatroomId, options, deps) {
|
|
13020
|
-
const d = deps ?? await
|
|
13145
|
+
const d = deps ?? await createDefaultDeps11();
|
|
13021
13146
|
const sessionId = requireAuth2(d);
|
|
13022
13147
|
validateChatroomId(chatroomId);
|
|
13023
|
-
if (!options.
|
|
13024
|
-
console.error(`❌
|
|
13148
|
+
if (!options.backlogItemId || options.backlogItemId.trim().length === 0) {
|
|
13149
|
+
console.error(`❌ Backlog item ID is required`);
|
|
13025
13150
|
process.exit(1);
|
|
13026
13151
|
return;
|
|
13027
13152
|
}
|
|
13028
13153
|
try {
|
|
13029
|
-
await d.backend.mutation(api.
|
|
13154
|
+
await d.backend.mutation(api.backlog.markBacklogItemForReview, {
|
|
13030
13155
|
sessionId,
|
|
13031
|
-
|
|
13156
|
+
itemId: options.backlogItemId
|
|
13032
13157
|
});
|
|
13033
13158
|
console.log("");
|
|
13034
|
-
console.log("✅
|
|
13035
|
-
console.log(` ID: ${options.
|
|
13159
|
+
console.log("✅ Backlog item marked for review");
|
|
13160
|
+
console.log(` ID: ${options.backlogItemId}`);
|
|
13036
13161
|
console.log(` Status: pending_user_review`);
|
|
13037
13162
|
console.log("");
|
|
13038
|
-
console.log('\uD83D\uDCA1 The
|
|
13163
|
+
console.log('\uD83D\uDCA1 The backlog item is now visible in the "Pending Review" section for user confirmation.');
|
|
13164
|
+
console.log("");
|
|
13165
|
+
} catch (error) {
|
|
13166
|
+
console.error(`❌ Failed to mark backlog item for review: ${error.message}`);
|
|
13167
|
+
process.exit(1);
|
|
13168
|
+
return;
|
|
13169
|
+
}
|
|
13170
|
+
}
|
|
13171
|
+
async function historyBacklog(chatroomId, options, deps) {
|
|
13172
|
+
const d = deps ?? await createDefaultDeps11();
|
|
13173
|
+
const sessionId = requireAuth2(d);
|
|
13174
|
+
validateChatroomId(chatroomId);
|
|
13175
|
+
const now = Date.now();
|
|
13176
|
+
const defaultFrom = now - 30 * 24 * 60 * 60 * 1000;
|
|
13177
|
+
let fromMs;
|
|
13178
|
+
let toMs;
|
|
13179
|
+
if (options.from) {
|
|
13180
|
+
const parsed = Date.parse(options.from);
|
|
13181
|
+
if (isNaN(parsed)) {
|
|
13182
|
+
console.error(`❌ Invalid --from date: "${options.from}". Use YYYY-MM-DD format.`);
|
|
13183
|
+
process.exit(1);
|
|
13184
|
+
return;
|
|
13185
|
+
}
|
|
13186
|
+
fromMs = parsed;
|
|
13187
|
+
}
|
|
13188
|
+
if (options.to) {
|
|
13189
|
+
const parsed = Date.parse(options.to);
|
|
13190
|
+
if (isNaN(parsed)) {
|
|
13191
|
+
console.error(`❌ Invalid --to date: "${options.to}". Use YYYY-MM-DD format.`);
|
|
13192
|
+
process.exit(1);
|
|
13193
|
+
return;
|
|
13194
|
+
}
|
|
13195
|
+
toMs = parsed + 86399999;
|
|
13196
|
+
}
|
|
13197
|
+
try {
|
|
13198
|
+
const tasks = await d.backend.query(api.tasks.listHistoricalTasks, {
|
|
13199
|
+
sessionId,
|
|
13200
|
+
chatroomId,
|
|
13201
|
+
from: fromMs,
|
|
13202
|
+
to: toMs,
|
|
13203
|
+
limit: options.limit
|
|
13204
|
+
});
|
|
13205
|
+
const fromDate = new Date(fromMs ?? defaultFrom).toLocaleDateString("en-US", {
|
|
13206
|
+
month: "short",
|
|
13207
|
+
day: "numeric",
|
|
13208
|
+
year: "numeric"
|
|
13209
|
+
});
|
|
13210
|
+
const toDate = new Date(toMs ?? now).toLocaleDateString("en-US", {
|
|
13211
|
+
month: "short",
|
|
13212
|
+
day: "numeric",
|
|
13213
|
+
year: "numeric"
|
|
13214
|
+
});
|
|
13215
|
+
console.log("");
|
|
13216
|
+
console.log("══════════════════════════════════════════════════");
|
|
13217
|
+
console.log("\uD83D\uDCDC TASK HISTORY");
|
|
13218
|
+
console.log("══════════════════════════════════════════════════");
|
|
13219
|
+
console.log(`Chatroom: ${chatroomId}`);
|
|
13220
|
+
console.log(`Date range: ${fromDate} → ${toDate}`);
|
|
13221
|
+
console.log(`Filter: completed + closed`);
|
|
13222
|
+
console.log("");
|
|
13223
|
+
if (tasks.length === 0) {
|
|
13224
|
+
console.log("No history found for date range.");
|
|
13225
|
+
} else {
|
|
13226
|
+
console.log("──────────────────────────────────────────────────");
|
|
13227
|
+
console.log("\uD83D\uDCDD COMPLETED / CLOSED TASKS");
|
|
13228
|
+
console.log("──────────────────────────────────────────────────");
|
|
13229
|
+
for (let i2 = 0;i2 < tasks.length; i2++) {
|
|
13230
|
+
const task = tasks[i2];
|
|
13231
|
+
const statusEmoji = getStatusEmoji(task.status);
|
|
13232
|
+
const completedTs = task.completedAt ?? task.updatedAt;
|
|
13233
|
+
const date = new Date(completedTs).toLocaleString("en-US", {
|
|
13234
|
+
month: "short",
|
|
13235
|
+
day: "numeric",
|
|
13236
|
+
year: "numeric",
|
|
13237
|
+
hour: "2-digit",
|
|
13238
|
+
minute: "2-digit",
|
|
13239
|
+
hour12: false
|
|
13240
|
+
});
|
|
13241
|
+
console.log(`#${i2 + 1} [${statusEmoji} ${task.status.toUpperCase()}] ${task.content}`);
|
|
13242
|
+
console.log(` ID: ${task._id}`);
|
|
13243
|
+
console.log(` Completed: ${date}${task.assignedTo ? ` | Assigned: ${task.assignedTo}` : ""}`);
|
|
13244
|
+
if (task.complexity !== undefined || task.value !== undefined || task.priority !== undefined) {
|
|
13245
|
+
const parts = [];
|
|
13246
|
+
if (task.complexity)
|
|
13247
|
+
parts.push(`complexity=${task.complexity}`);
|
|
13248
|
+
if (task.value)
|
|
13249
|
+
parts.push(`value=${task.value}`);
|
|
13250
|
+
if (task.priority !== undefined)
|
|
13251
|
+
parts.push(`priority=${task.priority}`);
|
|
13252
|
+
console.log(` Score: ${parts.join(" | ")}`);
|
|
13253
|
+
}
|
|
13254
|
+
console.log("");
|
|
13255
|
+
}
|
|
13256
|
+
}
|
|
13257
|
+
console.log("──────────────────────────────────────────────────");
|
|
13258
|
+
console.log(`Showing ${tasks.length} task(s)`);
|
|
13039
13259
|
console.log("");
|
|
13040
13260
|
} catch (error) {
|
|
13041
|
-
console.error(`❌ Failed to
|
|
13261
|
+
console.error(`❌ Failed to load history: ${error.message}`);
|
|
13042
13262
|
process.exit(1);
|
|
13043
13263
|
return;
|
|
13044
13264
|
}
|
|
@@ -13053,8 +13273,6 @@ function getStatusEmoji(status) {
|
|
|
13053
13273
|
return "\uD83D\uDD35";
|
|
13054
13274
|
case "backlog":
|
|
13055
13275
|
return "⚪";
|
|
13056
|
-
case "backlog_acknowledged":
|
|
13057
|
-
return "\uD83D\uDCCB";
|
|
13058
13276
|
case "completed":
|
|
13059
13277
|
return "✅";
|
|
13060
13278
|
case "pending_user_review":
|
|
@@ -13100,13 +13318,99 @@ function resolveContent(content, filePath, optionName) {
|
|
|
13100
13318
|
}
|
|
13101
13319
|
var init_file_content = () => {};
|
|
13102
13320
|
|
|
13321
|
+
// src/commands/task/read/index.ts
|
|
13322
|
+
var exports_read = {};
|
|
13323
|
+
__export(exports_read, {
|
|
13324
|
+
taskRead: () => taskRead
|
|
13325
|
+
});
|
|
13326
|
+
async function createDefaultDeps12() {
|
|
13327
|
+
const client2 = await getConvexClient();
|
|
13328
|
+
return {
|
|
13329
|
+
backend: {
|
|
13330
|
+
mutation: (endpoint, args) => client2.mutation(endpoint, args),
|
|
13331
|
+
query: (endpoint, args) => client2.query(endpoint, args)
|
|
13332
|
+
},
|
|
13333
|
+
session: {
|
|
13334
|
+
getSessionId,
|
|
13335
|
+
getConvexUrl,
|
|
13336
|
+
getOtherSessionUrls
|
|
13337
|
+
}
|
|
13338
|
+
};
|
|
13339
|
+
}
|
|
13340
|
+
async function taskRead(chatroomId, options, deps) {
|
|
13341
|
+
const d = deps ?? await createDefaultDeps12();
|
|
13342
|
+
const { role, taskId } = options;
|
|
13343
|
+
const convexUrl = d.session.getConvexUrl();
|
|
13344
|
+
const sessionId = d.session.getSessionId();
|
|
13345
|
+
if (!sessionId) {
|
|
13346
|
+
const otherUrls = d.session.getOtherSessionUrls();
|
|
13347
|
+
console.error(`❌ Not authenticated for: ${convexUrl}`);
|
|
13348
|
+
if (otherUrls.length > 0) {
|
|
13349
|
+
console.error(`
|
|
13350
|
+
\uD83D\uDCA1 You have sessions for other environments:`);
|
|
13351
|
+
for (const url of otherUrls) {
|
|
13352
|
+
console.error(` • ${url}`);
|
|
13353
|
+
}
|
|
13354
|
+
console.error(`
|
|
13355
|
+
To use a different environment, set CHATROOM_CONVEX_URL:`);
|
|
13356
|
+
console.error(` CHATROOM_CONVEX_URL=${otherUrls[0]} chatroom task read ...`);
|
|
13357
|
+
console.error(`
|
|
13358
|
+
Or to authenticate for the current environment:`);
|
|
13359
|
+
}
|
|
13360
|
+
console.error(` chatroom auth login`);
|
|
13361
|
+
process.exit(1);
|
|
13362
|
+
}
|
|
13363
|
+
if (!chatroomId || typeof chatroomId !== "string" || chatroomId.length < 20 || chatroomId.length > 40) {
|
|
13364
|
+
console.error(`❌ Invalid chatroom ID format: ID must be 20-40 characters (got ${chatroomId?.length || 0})`);
|
|
13365
|
+
process.exit(1);
|
|
13366
|
+
}
|
|
13367
|
+
if (!taskId || typeof taskId !== "string" || taskId.length < 20 || taskId.length > 40) {
|
|
13368
|
+
console.error(`❌ Invalid task ID format: ID must be 20-40 characters (got ${taskId?.length || 0})`);
|
|
13369
|
+
process.exit(1);
|
|
13370
|
+
}
|
|
13371
|
+
try {
|
|
13372
|
+
const result = await d.backend.mutation(api.tasks.readTask, {
|
|
13373
|
+
sessionId,
|
|
13374
|
+
chatroomId,
|
|
13375
|
+
role,
|
|
13376
|
+
taskId
|
|
13377
|
+
});
|
|
13378
|
+
console.log(`✅ Task content:`);
|
|
13379
|
+
console.log(` Task ID: ${result.taskId}`);
|
|
13380
|
+
console.log(` Status: ${result.status}`);
|
|
13381
|
+
console.log(`
|
|
13382
|
+
${result.content}`);
|
|
13383
|
+
} catch (error) {
|
|
13384
|
+
const err = error;
|
|
13385
|
+
console.error(`❌ Failed to read task`);
|
|
13386
|
+
console.error(` Error: ${err.message}`);
|
|
13387
|
+
if (err.message.includes("not found")) {
|
|
13388
|
+
console.error(`
|
|
13389
|
+
Verify the task ID is correct and you have access to this chatroom.`);
|
|
13390
|
+
} else if (err.message.includes("assigned to")) {
|
|
13391
|
+
console.error(`
|
|
13392
|
+
This task is not assigned to your role. Use the correct --role flag.`);
|
|
13393
|
+
} else if (err.message.includes("acknowledged")) {
|
|
13394
|
+
console.error(`
|
|
13395
|
+
Tasks must be in 'acknowledged' status to be read.`);
|
|
13396
|
+
console.error(` If this task is already in_progress, this might be a recovery situation.`);
|
|
13397
|
+
}
|
|
13398
|
+
process.exit(1);
|
|
13399
|
+
}
|
|
13400
|
+
}
|
|
13401
|
+
var init_read = __esm(() => {
|
|
13402
|
+
init_api3();
|
|
13403
|
+
init_storage();
|
|
13404
|
+
init_client2();
|
|
13405
|
+
});
|
|
13406
|
+
|
|
13103
13407
|
// src/commands/skill/index.ts
|
|
13104
13408
|
var exports_skill = {};
|
|
13105
13409
|
__export(exports_skill, {
|
|
13106
13410
|
listSkills: () => listSkills,
|
|
13107
13411
|
activateSkill: () => activateSkill
|
|
13108
13412
|
});
|
|
13109
|
-
async function
|
|
13413
|
+
async function createDefaultDeps13() {
|
|
13110
13414
|
const client2 = await getConvexClient();
|
|
13111
13415
|
return {
|
|
13112
13416
|
backend: {
|
|
@@ -13129,7 +13433,7 @@ function requireAuth3(d) {
|
|
|
13129
13433
|
return sessionId;
|
|
13130
13434
|
}
|
|
13131
13435
|
async function listSkills(chatroomId, options, deps) {
|
|
13132
|
-
const d = deps ?? await
|
|
13436
|
+
const d = deps ?? await createDefaultDeps13();
|
|
13133
13437
|
const sessionId = requireAuth3(d);
|
|
13134
13438
|
try {
|
|
13135
13439
|
const skills = await d.backend.query(api.skills.list, {
|
|
@@ -13157,7 +13461,7 @@ async function listSkills(chatroomId, options, deps) {
|
|
|
13157
13461
|
}
|
|
13158
13462
|
}
|
|
13159
13463
|
async function activateSkill(chatroomId, skillId, options, deps) {
|
|
13160
|
-
const d = deps ?? await
|
|
13464
|
+
const d = deps ?? await createDefaultDeps13();
|
|
13161
13465
|
const sessionId = requireAuth3(d);
|
|
13162
13466
|
try {
|
|
13163
13467
|
const convexUrl = d.session.getConvexUrl();
|
|
@@ -13195,7 +13499,7 @@ __export(exports_messages, {
|
|
|
13195
13499
|
listSinceMessage: () => listSinceMessage,
|
|
13196
13500
|
listBySenderRole: () => listBySenderRole
|
|
13197
13501
|
});
|
|
13198
|
-
async function
|
|
13502
|
+
async function createDefaultDeps14() {
|
|
13199
13503
|
const client2 = await getConvexClient();
|
|
13200
13504
|
return {
|
|
13201
13505
|
backend: {
|
|
@@ -13210,7 +13514,7 @@ async function createDefaultDeps12() {
|
|
|
13210
13514
|
};
|
|
13211
13515
|
}
|
|
13212
13516
|
async function listBySenderRole(chatroomId, options, deps) {
|
|
13213
|
-
const d = deps ?? await
|
|
13517
|
+
const d = deps ?? await createDefaultDeps14();
|
|
13214
13518
|
const sessionId = d.session.getSessionId();
|
|
13215
13519
|
if (!sessionId) {
|
|
13216
13520
|
console.error(`❌ Not authenticated. Please run: chatroom auth login`);
|
|
@@ -13275,7 +13579,7 @@ ${content.split(`
|
|
|
13275
13579
|
}
|
|
13276
13580
|
}
|
|
13277
13581
|
async function listSinceMessage(chatroomId, options, deps) {
|
|
13278
|
-
const d = deps ?? await
|
|
13582
|
+
const d = deps ?? await createDefaultDeps14();
|
|
13279
13583
|
const sessionId = d.session.getSessionId();
|
|
13280
13584
|
if (!sessionId) {
|
|
13281
13585
|
console.error(`❌ Not authenticated. Please run: chatroom auth login`);
|
|
@@ -13351,7 +13655,7 @@ __export(exports_context, {
|
|
|
13351
13655
|
listContexts: () => listContexts,
|
|
13352
13656
|
inspectContext: () => inspectContext
|
|
13353
13657
|
});
|
|
13354
|
-
async function
|
|
13658
|
+
async function createDefaultDeps15() {
|
|
13355
13659
|
const client2 = await getConvexClient();
|
|
13356
13660
|
return {
|
|
13357
13661
|
backend: {
|
|
@@ -13366,7 +13670,7 @@ async function createDefaultDeps13() {
|
|
|
13366
13670
|
};
|
|
13367
13671
|
}
|
|
13368
13672
|
async function readContext(chatroomId, options, deps) {
|
|
13369
|
-
const d = deps ?? await
|
|
13673
|
+
const d = deps ?? await createDefaultDeps15();
|
|
13370
13674
|
const sessionId = d.session.getSessionId();
|
|
13371
13675
|
if (!sessionId) {
|
|
13372
13676
|
console.error(`❌ Not authenticated. Please run: chatroom auth login`);
|
|
@@ -13481,7 +13785,7 @@ async function readContext(chatroomId, options, deps) {
|
|
|
13481
13785
|
}
|
|
13482
13786
|
}
|
|
13483
13787
|
async function newContext(chatroomId, options, deps) {
|
|
13484
|
-
const d = deps ?? await
|
|
13788
|
+
const d = deps ?? await createDefaultDeps15();
|
|
13485
13789
|
const sessionId = d.session.getSessionId();
|
|
13486
13790
|
if (!sessionId) {
|
|
13487
13791
|
console.error(`❌ Not authenticated. Please run: chatroom auth login`);
|
|
@@ -13533,7 +13837,7 @@ async function newContext(chatroomId, options, deps) {
|
|
|
13533
13837
|
}
|
|
13534
13838
|
}
|
|
13535
13839
|
async function listContexts(chatroomId, options, deps) {
|
|
13536
|
-
const d = deps ?? await
|
|
13840
|
+
const d = deps ?? await createDefaultDeps15();
|
|
13537
13841
|
const sessionId = d.session.getSessionId();
|
|
13538
13842
|
if (!sessionId) {
|
|
13539
13843
|
console.error(`❌ Not authenticated. Please run: chatroom auth login`);
|
|
@@ -13585,7 +13889,7 @@ async function listContexts(chatroomId, options, deps) {
|
|
|
13585
13889
|
}
|
|
13586
13890
|
}
|
|
13587
13891
|
async function inspectContext(chatroomId, options, deps) {
|
|
13588
|
-
const d = deps ?? await
|
|
13892
|
+
const d = deps ?? await createDefaultDeps15();
|
|
13589
13893
|
const sessionId = d.session.getSessionId();
|
|
13590
13894
|
if (!sessionId) {
|
|
13591
13895
|
console.error(`❌ Not authenticated. Please run: chatroom auth login`);
|
|
@@ -13645,7 +13949,7 @@ __export(exports_guidelines, {
|
|
|
13645
13949
|
viewGuidelines: () => viewGuidelines,
|
|
13646
13950
|
listGuidelineTypes: () => listGuidelineTypes
|
|
13647
13951
|
});
|
|
13648
|
-
async function
|
|
13952
|
+
async function createDefaultDeps16() {
|
|
13649
13953
|
const client2 = await getConvexClient();
|
|
13650
13954
|
return {
|
|
13651
13955
|
backend: {
|
|
@@ -13660,7 +13964,7 @@ async function createDefaultDeps14() {
|
|
|
13660
13964
|
};
|
|
13661
13965
|
}
|
|
13662
13966
|
async function viewGuidelines(options, deps) {
|
|
13663
|
-
const d = deps ?? await
|
|
13967
|
+
const d = deps ?? await createDefaultDeps16();
|
|
13664
13968
|
const { type } = options;
|
|
13665
13969
|
if (!VALID_TYPES.includes(type)) {
|
|
13666
13970
|
console.error(`❌ Invalid guideline type: "${type}"`);
|
|
@@ -13695,7 +13999,7 @@ ${"═".repeat(60)}
|
|
|
13695
13999
|
}
|
|
13696
14000
|
}
|
|
13697
14001
|
async function listGuidelineTypes(deps) {
|
|
13698
|
-
const d = deps ?? await
|
|
14002
|
+
const d = deps ?? await createDefaultDeps16();
|
|
13699
14003
|
const sessionId = d.session.getSessionId();
|
|
13700
14004
|
if (!sessionId) {
|
|
13701
14005
|
console.error(`❌ Not authenticated. Please run: chatroom auth login`);
|
|
@@ -13737,7 +14041,7 @@ __export(exports_artifact, {
|
|
|
13737
14041
|
viewArtifact: () => viewArtifact,
|
|
13738
14042
|
createArtifact: () => createArtifact
|
|
13739
14043
|
});
|
|
13740
|
-
async function
|
|
14044
|
+
async function createDefaultDeps17() {
|
|
13741
14045
|
const client2 = await getConvexClient();
|
|
13742
14046
|
return {
|
|
13743
14047
|
backend: {
|
|
@@ -13752,7 +14056,7 @@ async function createDefaultDeps15() {
|
|
|
13752
14056
|
};
|
|
13753
14057
|
}
|
|
13754
14058
|
async function createArtifact(chatroomId, options, deps) {
|
|
13755
|
-
const d = deps ?? await
|
|
14059
|
+
const d = deps ?? await createDefaultDeps17();
|
|
13756
14060
|
const sessionId = d.session.getSessionId();
|
|
13757
14061
|
if (!sessionId) {
|
|
13758
14062
|
formatAuthError(d.session.getConvexUrl(), d.session.getOtherSessionUrls());
|
|
@@ -13806,7 +14110,7 @@ async function createArtifact(chatroomId, options, deps) {
|
|
|
13806
14110
|
}
|
|
13807
14111
|
}
|
|
13808
14112
|
async function viewArtifact(chatroomId, options, deps) {
|
|
13809
|
-
const d = deps ?? await
|
|
14113
|
+
const d = deps ?? await createDefaultDeps17();
|
|
13810
14114
|
const sessionId = d.session.getSessionId();
|
|
13811
14115
|
if (!sessionId) {
|
|
13812
14116
|
formatAuthError(d.session.getConvexUrl(), d.session.getOtherSessionUrls());
|
|
@@ -13850,7 +14154,7 @@ async function viewArtifact(chatroomId, options, deps) {
|
|
|
13850
14154
|
}
|
|
13851
14155
|
}
|
|
13852
14156
|
async function viewManyArtifacts(chatroomId, options, deps) {
|
|
13853
|
-
const d = deps ?? await
|
|
14157
|
+
const d = deps ?? await createDefaultDeps17();
|
|
13854
14158
|
const sessionId = d.session.getSessionId();
|
|
13855
14159
|
if (!sessionId) {
|
|
13856
14160
|
formatAuthError(d.session.getConvexUrl(), d.session.getOtherSessionUrls());
|
|
@@ -13916,7 +14220,7 @@ var exports_get_system_prompt = {};
|
|
|
13916
14220
|
__export(exports_get_system_prompt, {
|
|
13917
14221
|
getSystemPrompt: () => getSystemPrompt
|
|
13918
14222
|
});
|
|
13919
|
-
async function
|
|
14223
|
+
async function createDefaultDeps18() {
|
|
13920
14224
|
const client2 = await getConvexClient();
|
|
13921
14225
|
return {
|
|
13922
14226
|
backend: {
|
|
@@ -13931,7 +14235,7 @@ async function createDefaultDeps16() {
|
|
|
13931
14235
|
};
|
|
13932
14236
|
}
|
|
13933
14237
|
async function getSystemPrompt(chatroomId, options, deps) {
|
|
13934
|
-
const d = deps ?? await
|
|
14238
|
+
const d = deps ?? await createDefaultDeps18();
|
|
13935
14239
|
const { role } = options;
|
|
13936
14240
|
const sessionId = d.session.getSessionId();
|
|
13937
14241
|
if (!sessionId) {
|
|
@@ -14453,7 +14757,7 @@ async function discoverModels(agentServices) {
|
|
|
14453
14757
|
}
|
|
14454
14758
|
return results;
|
|
14455
14759
|
}
|
|
14456
|
-
function
|
|
14760
|
+
function createDefaultDeps19() {
|
|
14457
14761
|
return {
|
|
14458
14762
|
backend: {
|
|
14459
14763
|
mutation: async () => {
|
|
@@ -14591,7 +14895,7 @@ async function initDaemon() {
|
|
|
14591
14895
|
const agentServices = new Map(getAllHarnesses().map((s) => [s.id, s]));
|
|
14592
14896
|
const availableModels = await registerCapabilities(client2, typedSessionId, config3, agentServices);
|
|
14593
14897
|
await connectDaemon(client2, typedSessionId, machineId, convexUrl);
|
|
14594
|
-
const deps =
|
|
14898
|
+
const deps = createDefaultDeps19();
|
|
14595
14899
|
deps.backend.mutation = (endpoint, args) => client2.mutation(endpoint, args);
|
|
14596
14900
|
deps.backend.query = (endpoint, args) => client2.query(endpoint, args);
|
|
14597
14901
|
const events = new DaemonEventBus;
|
|
@@ -15657,7 +15961,7 @@ async function isChatroomInstalledDefault() {
|
|
|
15657
15961
|
return false;
|
|
15658
15962
|
}
|
|
15659
15963
|
}
|
|
15660
|
-
async function
|
|
15964
|
+
async function createDefaultDeps20() {
|
|
15661
15965
|
const client2 = await getConvexClient();
|
|
15662
15966
|
const fs = await import("fs/promises");
|
|
15663
15967
|
return {
|
|
@@ -15685,7 +15989,7 @@ async function createDefaultDeps18() {
|
|
|
15685
15989
|
};
|
|
15686
15990
|
}
|
|
15687
15991
|
async function installTool(options = {}, deps) {
|
|
15688
|
-
const d = deps ?? await
|
|
15992
|
+
const d = deps ?? await createDefaultDeps20();
|
|
15689
15993
|
const { checkExisting = true } = options;
|
|
15690
15994
|
const os = await import("os");
|
|
15691
15995
|
const path2 = await import("path");
|
|
@@ -16189,7 +16493,8 @@ program2.command("get-next-task").description("Join a chatroom and get the next
|
|
|
16189
16493
|
role: options.role
|
|
16190
16494
|
});
|
|
16191
16495
|
});
|
|
16192
|
-
program2.command("task-started").description("Acknowledge a task and optionally classify the user message").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role").option("--origin-message-classification <type>", "Original message classification: question, new_feature, or follow_up (for entry point roles)").option("--no-classify", "Skip classification (for handoff recipients - classification already done by entry point)").requiredOption("--task-id <taskId>", "Task ID to acknowledge").action(async (options) => {
|
|
16496
|
+
program2.command("task-started").description("[LEGACY] Acknowledge a task and optionally classify the user message. Use classify instead for entry-point roles.").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role").option("--origin-message-classification <type>", "Original message classification: question, new_feature, or follow_up (for entry point roles)").option("--no-classify", "Skip classification (for handoff recipients - classification already done by entry point)").requiredOption("--task-id <taskId>", "Task ID to acknowledge").action(async (options) => {
|
|
16497
|
+
console.error("⚠️ DEPRECATED: task-started is legacy. Use chatroom classify for entry-point roles.");
|
|
16193
16498
|
await maybeRequireAuth();
|
|
16194
16499
|
const skipClassification = options.classify === false;
|
|
16195
16500
|
if (!skipClassification && !options.originMessageClassification) {
|
|
@@ -16238,6 +16543,36 @@ program2.command("task-started").description("Acknowledge a task and optionally
|
|
|
16238
16543
|
noClassify: skipClassification
|
|
16239
16544
|
});
|
|
16240
16545
|
});
|
|
16546
|
+
program2.command("classify").description("Classify a task's origin message (entry-point role only). Use task-started --no-classify for handoffs.").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role (must be entry-point role)").requiredOption("--task-id <taskId>", "Task ID to acknowledge").requiredOption("--origin-message-classification <type>", "Original message classification: question, new_feature, or follow_up").action(async (options) => {
|
|
16547
|
+
await maybeRequireAuth();
|
|
16548
|
+
const validClassifications = ["question", "new_feature", "follow_up"];
|
|
16549
|
+
if (!validClassifications.includes(options.originMessageClassification)) {
|
|
16550
|
+
console.error(`❌ Invalid classification: ${options.originMessageClassification}. Must be one of: ${validClassifications.join(", ")}`);
|
|
16551
|
+
process.exit(1);
|
|
16552
|
+
}
|
|
16553
|
+
let rawStdin;
|
|
16554
|
+
if (options.originMessageClassification === "new_feature") {
|
|
16555
|
+
const stdinContent = await readStdin();
|
|
16556
|
+
if (!stdinContent.trim()) {
|
|
16557
|
+
console.error(`❌ Stdin is empty. For new_feature classification, provide:
|
|
16558
|
+
---TITLE---
|
|
16559
|
+
[title]
|
|
16560
|
+
---DESCRIPTION---
|
|
16561
|
+
[description]
|
|
16562
|
+
---TECH_SPECS---
|
|
16563
|
+
[specs]`);
|
|
16564
|
+
process.exit(1);
|
|
16565
|
+
}
|
|
16566
|
+
rawStdin = stdinContent;
|
|
16567
|
+
}
|
|
16568
|
+
const { classify: classify2 } = await Promise.resolve().then(() => (init_classify(), exports_classify));
|
|
16569
|
+
await classify2(options.chatroomId, {
|
|
16570
|
+
role: options.role,
|
|
16571
|
+
originMessageClassification: options.originMessageClassification,
|
|
16572
|
+
taskId: options.taskId,
|
|
16573
|
+
rawStdin
|
|
16574
|
+
});
|
|
16575
|
+
});
|
|
16241
16576
|
program2.command("handoff").description("Complete your task and hand off to the next role").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role").requiredOption("--next-role <nextRole>", "Role to hand off to").option("--attach-artifact <artifactId>", "Attach artifact to handoff (can be used multiple times)", (value, previous) => {
|
|
16242
16577
|
return previous ? [...previous, value] : [value];
|
|
16243
16578
|
}, []).action(async (options) => {
|
|
@@ -16294,22 +16629,15 @@ program2.command("report-progress").description("Report progress on current task
|
|
|
16294
16629
|
});
|
|
16295
16630
|
});
|
|
16296
16631
|
var backlogCommand = program2.command("backlog").description("Manage task queue and backlog");
|
|
16297
|
-
backlogCommand.command("list").description("List
|
|
16298
|
-
if (options.status === "all" && !options.limit) {
|
|
16299
|
-
console.error("❌ When using --status=all, you must specify --limit=<n>");
|
|
16300
|
-
console.error(" Example: chatroom backlog list --chatroom-id=<id> --role=builder --status=all --limit=50");
|
|
16301
|
-
process.exit(1);
|
|
16302
|
-
}
|
|
16632
|
+
backlogCommand.command("list").description("List active backlog items").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role").option("--limit <n>", "Maximum number of items to show").action(async (options) => {
|
|
16303
16633
|
await maybeRequireAuth();
|
|
16304
16634
|
const { listBacklog: listBacklog2 } = await Promise.resolve().then(() => (init_backlog(), exports_backlog));
|
|
16305
16635
|
await listBacklog2(options.chatroomId, {
|
|
16306
16636
|
role: options.role,
|
|
16307
|
-
|
|
16308
|
-
limit: options.limit ? parseInt(options.limit, 10) : 20,
|
|
16309
|
-
full: options.full
|
|
16637
|
+
limit: options.limit ? parseInt(options.limit, 10) : undefined
|
|
16310
16638
|
});
|
|
16311
16639
|
});
|
|
16312
|
-
backlogCommand.command("add").description("Add a
|
|
16640
|
+
backlogCommand.command("add").description("Add a backlog item").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role (creator)").requiredOption("--content-file <path>", "Path to file containing task content").action(async (options) => {
|
|
16313
16641
|
await maybeRequireAuth();
|
|
16314
16642
|
const { readFileContent: readFileContent2 } = await Promise.resolve().then(() => (init_file_content(), exports_file_content));
|
|
16315
16643
|
let content;
|
|
@@ -16326,31 +16654,42 @@ backlogCommand.command("add").description("Add a task to the backlog").requiredO
|
|
|
16326
16654
|
const { addBacklog: addBacklog2 } = await Promise.resolve().then(() => (init_backlog(), exports_backlog));
|
|
16327
16655
|
await addBacklog2(options.chatroomId, { role: options.role, content });
|
|
16328
16656
|
});
|
|
16329
|
-
backlogCommand.command("complete").description("Mark a
|
|
16657
|
+
backlogCommand.command("complete").description("Mark a backlog item as complete. Use --force for stuck in_progress/pending tasks.").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role").requiredOption("--backlog-item-id <id>", "Backlog item ID to complete").option("-f, --force", "Force complete a stuck in_progress or pending task").action(async (options) => {
|
|
16330
16658
|
await maybeRequireAuth();
|
|
16331
16659
|
const { completeBacklog: completeBacklog2 } = await Promise.resolve().then(() => (init_backlog(), exports_backlog));
|
|
16332
16660
|
await completeBacklog2(options.chatroomId, options);
|
|
16333
16661
|
});
|
|
16334
|
-
backlogCommand.command("reopen").description("Reopen a
|
|
16662
|
+
backlogCommand.command("reopen").description("Reopen a closed backlog item, returning it to backlog status.").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role").requiredOption("--backlog-item-id <id>", "Backlog item ID to reopen").action(async (options) => {
|
|
16335
16663
|
await maybeRequireAuth();
|
|
16336
16664
|
const { reopenBacklog: reopenBacklog2 } = await Promise.resolve().then(() => (init_backlog(), exports_backlog));
|
|
16337
16665
|
await reopenBacklog2(options.chatroomId, options);
|
|
16338
16666
|
});
|
|
16339
|
-
backlogCommand.command("
|
|
16340
|
-
await maybeRequireAuth();
|
|
16341
|
-
const { patchBacklog: patchBacklog2 } = await Promise.resolve().then(() => (init_backlog(), exports_backlog));
|
|
16342
|
-
await patchBacklog2(options.chatroomId, options);
|
|
16343
|
-
});
|
|
16344
|
-
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) => {
|
|
16667
|
+
backlogCommand.command("score").description("Score a backlog item by complexity, value, and priority").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role").requiredOption("--backlog-item-id <id>", "Backlog item 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) => {
|
|
16345
16668
|
await maybeRequireAuth();
|
|
16346
16669
|
const { scoreBacklog: scoreBacklog2 } = await Promise.resolve().then(() => (init_backlog(), exports_backlog));
|
|
16347
16670
|
await scoreBacklog2(options.chatroomId, options);
|
|
16348
16671
|
});
|
|
16349
|
-
backlogCommand.command("mark-for-review").description("Mark a backlog
|
|
16672
|
+
backlogCommand.command("mark-for-review").description("Mark a backlog item as ready for user review (backlog → pending_user_review)").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role").requiredOption("--backlog-item-id <id>", "Backlog item ID to mark for review").action(async (options) => {
|
|
16350
16673
|
await maybeRequireAuth();
|
|
16351
16674
|
const { markForReviewBacklog: markForReviewBacklog2 } = await Promise.resolve().then(() => (init_backlog(), exports_backlog));
|
|
16352
16675
|
await markForReviewBacklog2(options.chatroomId, options);
|
|
16353
16676
|
});
|
|
16677
|
+
backlogCommand.command("history").description("View completed and closed backlog items by date range (all statuses)").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role").option("--from <date>", "Start date (YYYY-MM-DD), defaults to 30 days ago").option("--to <date>", "End date (YYYY-MM-DD), defaults to today").option("--limit <n>", "Maximum number of items to show").action(async (options) => {
|
|
16678
|
+
await maybeRequireAuth();
|
|
16679
|
+
const { historyBacklog: historyBacklog2 } = await Promise.resolve().then(() => (init_backlog(), exports_backlog));
|
|
16680
|
+
await historyBacklog2(options.chatroomId, {
|
|
16681
|
+
role: options.role,
|
|
16682
|
+
from: options.from,
|
|
16683
|
+
to: options.to,
|
|
16684
|
+
limit: options.limit ? parseInt(options.limit, 10) : undefined
|
|
16685
|
+
});
|
|
16686
|
+
});
|
|
16687
|
+
var taskCommand = program2.command("task").description("Manage tasks");
|
|
16688
|
+
taskCommand.command("read").description("Read a task and mark it as in_progress").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role in the chatroom").requiredOption("--task-id <taskId>", "Task ID to read").action(async (options) => {
|
|
16689
|
+
await maybeRequireAuth();
|
|
16690
|
+
const { taskRead: taskRead2 } = await Promise.resolve().then(() => (init_read(), exports_read));
|
|
16691
|
+
await taskRead2(options.chatroomId, { role: options.role, taskId: options.taskId });
|
|
16692
|
+
});
|
|
16354
16693
|
var skillCommand = program2.command("skill").description("Manage and activate chatroom skills");
|
|
16355
16694
|
skillCommand.command("list").description("List available skills for a chatroom").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role").action(async (options) => {
|
|
16356
16695
|
await maybeRequireAuth();
|