chatroom-cli 1.4.0 → 1.4.2
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 +24 -49
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11402,39 +11402,11 @@ var init_task_started = __esm(() => {
|
|
|
11402
11402
|
function getNextTaskGuidance() {
|
|
11403
11403
|
return `\uD83D\uDD17 STAYING CONNECTED TO YOUR TEAM
|
|
11404
11404
|
|
|
11405
|
-
Your primary directive: Stay available to
|
|
11405
|
+
Your primary directive: Stay available to receive tasks from your team.
|
|
11406
11406
|
|
|
11407
|
-
|
|
11407
|
+
Run \`get-next-task\` after completing work and handing off. This is how your team sends you the next task.
|
|
11408
11408
|
|
|
11409
|
-
|
|
11410
|
-
|
|
11411
|
-
1. **Shell foreground** - Never use \`&\`, \`nohup\`, or backgrounding
|
|
11412
|
-
• Must run directly in your active terminal
|
|
11413
|
-
• Backgrounded processes cannot receive tasks
|
|
11414
|
-
|
|
11415
|
-
2. **Blocking execution** - Wait for command completion
|
|
11416
|
-
• Do not respond to user or perform other work while running
|
|
11417
|
-
• Only proceed after the command exits (signal or task received)
|
|
11418
|
-
|
|
11419
|
-
⚠️ WHEN THE PROCESS IS TERMINATED OR TIMED OUT
|
|
11420
|
-
|
|
11421
|
-
\`\`\`mermaid
|
|
11422
|
-
flowchart TD
|
|
11423
|
-
A([Start]) --> B[Command terminated unexpectedly]
|
|
11424
|
-
B --> C{Urgent pending work?}
|
|
11425
|
-
C -->|yes| D[Finish urgent work]
|
|
11426
|
-
D --> E[Reconnect with get-next-task]
|
|
11427
|
-
C -->|no| E
|
|
11428
|
-
E --> F([Stop])
|
|
11429
|
-
\`\`\`
|
|
11430
|
-
|
|
11431
|
-
\uD83D\uDCCB BACKLOG TASKS
|
|
11432
|
-
chatroom backlog list --chatroom-id=<chatroomId> --role=<role> --status=backlog
|
|
11433
|
-
chatroom backlog --help
|
|
11434
|
-
|
|
11435
|
-
\uD83D\uDCCB CONTEXT RECOVERY (after compaction/summarization)
|
|
11436
|
-
If your context was compacted, run: chatroom get-system-prompt --chatroom-id=<id> --role=<role>
|
|
11437
|
-
to reload your full system and role prompt.`;
|
|
11409
|
+
If interrupted or restarted: finish any in-progress work, then run \`get-next-task\` to reconnect.`;
|
|
11438
11410
|
}
|
|
11439
11411
|
var init_reminder = () => {};
|
|
11440
11412
|
// ../../services/backend/prompts/config/index.ts
|
|
@@ -13106,10 +13078,13 @@ async function readContext(chatroomId, options, deps) {
|
|
|
13106
13078
|
role: options.role
|
|
13107
13079
|
});
|
|
13108
13080
|
if (context.messages.length === 0 && !context.currentContext) {
|
|
13081
|
+
console.log(`<context role="${options.role}">`);
|
|
13109
13082
|
console.log(`
|
|
13110
13083
|
\uD83D\uDCED No context available`);
|
|
13084
|
+
console.log("</context>");
|
|
13111
13085
|
return;
|
|
13112
13086
|
}
|
|
13087
|
+
console.log(`<context role="${options.role}">`);
|
|
13113
13088
|
console.log(`
|
|
13114
13089
|
\uD83D\uDCDA CONTEXT FOR ${options.role.toUpperCase()}`);
|
|
13115
13090
|
console.log("═".repeat(60));
|
|
@@ -13145,16 +13120,9 @@ async function readContext(chatroomId, options, deps) {
|
|
|
13145
13120
|
\uD83D\uDCAC Chat History:`);
|
|
13146
13121
|
console.log("─".repeat(60));
|
|
13147
13122
|
for (const message of context.messages) {
|
|
13148
|
-
const
|
|
13149
|
-
const
|
|
13150
|
-
console.log(
|
|
13151
|
-
\uD83D\uDD39 Message ID: ${message._id}`);
|
|
13152
|
-
console.log(` Time: ${timestamp}`);
|
|
13153
|
-
console.log(` From: ${message.senderRole}`);
|
|
13154
|
-
if (message.targetRole) {
|
|
13155
|
-
console.log(` To: ${message.targetRole}`);
|
|
13156
|
-
}
|
|
13157
|
-
console.log(` Type: ${message.type}${classificationBadge}`);
|
|
13123
|
+
const toAttr = message.targetRole ? ` to="${message.targetRole}"` : "";
|
|
13124
|
+
const classAttr = message.classification ? ` classification="${message.classification}"` : "";
|
|
13125
|
+
console.log(`<message id="${message._id}" from="${message.senderRole}"${toAttr} type="${message.type}"${classAttr}>`);
|
|
13158
13126
|
if (message.featureTitle) {
|
|
13159
13127
|
console.log(` Feature: ${sanitizeForTerminal(message.featureTitle)}`);
|
|
13160
13128
|
}
|
|
@@ -13166,9 +13134,12 @@ async function readContext(chatroomId, options, deps) {
|
|
|
13166
13134
|
}
|
|
13167
13135
|
if (message.taskContent) {
|
|
13168
13136
|
const safeTaskContent = sanitizeForTerminal(message.taskContent);
|
|
13169
|
-
console.log(` Content
|
|
13170
|
-
|
|
13171
|
-
`
|
|
13137
|
+
console.log(` Content:`);
|
|
13138
|
+
console.log(` <task-content>`);
|
|
13139
|
+
console.log(safeTaskContent.split(`
|
|
13140
|
+
`).map((l) => ` ${l}`).join(`
|
|
13141
|
+
`));
|
|
13142
|
+
console.log(` </task-content>`);
|
|
13172
13143
|
}
|
|
13173
13144
|
}
|
|
13174
13145
|
if (message.attachedTasks && message.attachedTasks.length > 0) {
|
|
@@ -13178,22 +13149,26 @@ async function readContext(chatroomId, options, deps) {
|
|
|
13178
13149
|
console.log(` Type: Task`);
|
|
13179
13150
|
const contentLines = sanitizeForTerminal(task.content).split(`
|
|
13180
13151
|
`);
|
|
13181
|
-
console.log(` Content
|
|
13182
|
-
|
|
13183
|
-
|
|
13184
|
-
|
|
13185
|
-
}
|
|
13152
|
+
console.log(` Content:`);
|
|
13153
|
+
console.log(` <task-content>`);
|
|
13154
|
+
for (const line of contentLines) {
|
|
13155
|
+
console.log(` ${line}`);
|
|
13186
13156
|
}
|
|
13157
|
+
console.log(` </task-content>`);
|
|
13187
13158
|
}
|
|
13188
13159
|
}
|
|
13189
13160
|
console.log(` Content:`);
|
|
13161
|
+
console.log(` <message-content>`);
|
|
13190
13162
|
const safeMessageContent = sanitizeForTerminal(message.content);
|
|
13191
13163
|
console.log(safeMessageContent.split(`
|
|
13192
13164
|
`).map((l) => ` ${l}`).join(`
|
|
13193
13165
|
`));
|
|
13166
|
+
console.log(` </message-content>`);
|
|
13167
|
+
console.log(`</message>`);
|
|
13194
13168
|
}
|
|
13195
13169
|
console.log(`
|
|
13196
13170
|
` + "═".repeat(60));
|
|
13171
|
+
console.log("</context>");
|
|
13197
13172
|
} catch (err) {
|
|
13198
13173
|
console.error(`❌ Failed to read context: ${sanitizeUnknownForTerminal(err.message)}`);
|
|
13199
13174
|
process.exit(1);
|