@agentconnect.md/daemon 1.0.0-rc.105 → 1.0.0-rc.107
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 +20 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -81597,20 +81597,25 @@ var OutputConverger = class {
|
|
|
81597
81597
|
hasBuffered() {
|
|
81598
81598
|
return this.buf.trim().length > 0 || this.reasoningDirty;
|
|
81599
81599
|
}
|
|
81600
|
-
/** Flush pending output for the idle timer:
|
|
81601
|
-
*
|
|
81602
|
-
*
|
|
81603
|
-
*
|
|
81600
|
+
/** Flush pending output for the idle timer: in high mode one in-place `reasoning` update
|
|
81601
|
+
* carrying the reasoning accumulated since the last flush, THEN the buffered body
|
|
81602
|
+
* (verbatim markdown split into ≤block-limit `post` sections — each a Block Kit
|
|
81603
|
+
* `markdown` block, no mrkdwn conversion). Reasoning is emitted first so its in-place
|
|
81604
|
+
* block is first-posted ABOVE the reply: thinking precedes the answer (§9.1), so the
|
|
81605
|
+
* Thinking block must sit above it, not below. */
|
|
81604
81606
|
flushBuffered() {
|
|
81605
|
-
|
|
81606
|
-
|
|
81607
|
-
|
|
81608
|
-
|
|
81609
|
-
|
|
81610
|
-
|
|
81611
|
-
|
|
81612
|
-
|
|
81613
|
-
return
|
|
81607
|
+
return [...this.drainReasoning(), ...this.flush()];
|
|
81608
|
+
}
|
|
81609
|
+
/** Drain reasoning buffered since the last flush into a 0-or-1-length action list (only
|
|
81610
|
+
* high mode ever sets `reasoningDirty`). Callers place it before the body flush so the
|
|
81611
|
+
* Thinking block posts above the reply. */
|
|
81612
|
+
drainReasoning() {
|
|
81613
|
+
if (!this.reasoningDirty) return [];
|
|
81614
|
+
this.reasoningDirty = false;
|
|
81615
|
+
return [{
|
|
81616
|
+
kind: "reasoning",
|
|
81617
|
+
text: renderReasoning(this.reasoningBuf)
|
|
81618
|
+
}];
|
|
81614
81619
|
}
|
|
81615
81620
|
flush() {
|
|
81616
81621
|
const text = this.buf;
|
|
@@ -81700,21 +81705,14 @@ var OutputConverger = class {
|
|
|
81700
81705
|
text: ""
|
|
81701
81706
|
};
|
|
81702
81707
|
if (this.mode === "low") return [...this.flush(), clear];
|
|
81703
|
-
const reasoning =
|
|
81704
|
-
if (this.reasoningDirty) {
|
|
81705
|
-
this.reasoningDirty = false;
|
|
81706
|
-
reasoning.push({
|
|
81707
|
-
kind: "reasoning",
|
|
81708
|
-
text: renderReasoning(this.reasoningBuf)
|
|
81709
|
-
});
|
|
81710
|
-
}
|
|
81708
|
+
const reasoning = this.drainReasoning();
|
|
81711
81709
|
const footer = link ? [{
|
|
81712
81710
|
kind: "notice",
|
|
81713
81711
|
text: `:white_check_mark: done — [details](${link})`
|
|
81714
81712
|
}] : [];
|
|
81715
81713
|
return [
|
|
81716
|
-
...this.flush(),
|
|
81717
81714
|
...reasoning,
|
|
81715
|
+
...this.flush(),
|
|
81718
81716
|
clear,
|
|
81719
81717
|
...footer
|
|
81720
81718
|
];
|