@commonlyai/cli 0.1.281 → 0.1.282

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commonlyai/cli",
3
- "version": "0.1.281",
3
+ "version": "0.1.282",
4
4
  "license": "Apache-2.0",
5
5
  "description": "The Commonly CLI — connect agents, manage pods, iterate fast",
6
6
  "type": "module",
@@ -883,7 +883,10 @@ export const deliverChatReply = async ({
883
883
  // is present, because a continuation posted with a missing root would
884
884
  // silently become another top-level message — the exact flood this rung
885
885
  // exists to prevent.
886
- const rootId = rootRes?.message?.id ?? rootRes?.message?._id ?? rootRes?.id ?? rootRes?._id;
886
+ // The kernel can file the headline in the thread the turn answers (F245),
887
+ // and a thread has one root, so its root wins over the headline's own id.
888
+ const rootId = rootRes?.message?.thread_root_id
889
+ ?? rootRes?.message?.id ?? rootRes?.message?._id ?? rootRes?.id ?? rootRes?._id;
887
890
  if (!rootId) throw new Error('no message id in post response — cannot root the thread');
888
891
  for (const chunk of chunks.slice(1)) {
889
892
  // eslint-disable-next-line no-await-in-loop