dsh-agy-link 0.3.3 → 0.3.4
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 +19 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -786,6 +786,12 @@ var EventMapper = class {
|
|
|
786
786
|
text: delta
|
|
787
787
|
};
|
|
788
788
|
}
|
|
789
|
+
/** The honest thinking signal agy exposes: a token-count line. */
|
|
790
|
+
*emitThinkingLine(thoughtTokens) {
|
|
791
|
+
yield* this.ensureBlock("reasoning");
|
|
792
|
+
const d = this.appendDelta("[agy thinking turn · " + thoughtTokens + " thinking tokens]\n");
|
|
793
|
+
if (d) yield d;
|
|
794
|
+
}
|
|
789
795
|
/**
|
|
790
796
|
* Map one event. `absIndex` is the event's position in the run recording;
|
|
791
797
|
* it mints the mirror callId and is what continuation detection parses
|
|
@@ -801,11 +807,16 @@ var EventMapper = class {
|
|
|
801
807
|
const stepTextEmitted = (this.emittedByKey.get(ev.stepKey) ?? "") !== "";
|
|
802
808
|
if (thoughtTokens > 0 && !stepTextEmitted && !this.thinkingAnnounced.has(ev.stepKey)) {
|
|
803
809
|
this.thinkingAnnounced.add(ev.stepKey);
|
|
804
|
-
yield* this.
|
|
805
|
-
|
|
806
|
-
|
|
810
|
+
yield* this.emitThinkingLine(thoughtTokens);
|
|
811
|
+
}
|
|
812
|
+
const deferred = thoughtTokens > 0 && stepTextEmitted && !this.thinkingAnnounced.has(ev.stepKey);
|
|
813
|
+
if (ev.text === "" && !ev.fragment) {
|
|
814
|
+
if (deferred) {
|
|
815
|
+
this.thinkingAnnounced.add(ev.stepKey);
|
|
816
|
+
yield* this.emitThinkingLine(thoughtTokens);
|
|
817
|
+
}
|
|
818
|
+
return;
|
|
807
819
|
}
|
|
808
|
-
if (ev.text === "" && !ev.fragment) return;
|
|
809
820
|
this.sawTextStep = true;
|
|
810
821
|
yield* this.ensureBlock("text");
|
|
811
822
|
let d;
|
|
@@ -819,6 +830,10 @@ var EventMapper = class {
|
|
|
819
830
|
d = this.appendDelta(delta);
|
|
820
831
|
}
|
|
821
832
|
if (d) yield d;
|
|
833
|
+
if (deferred) {
|
|
834
|
+
this.thinkingAnnounced.add(ev.stepKey);
|
|
835
|
+
yield* this.emitThinkingLine(thoughtTokens);
|
|
836
|
+
}
|
|
822
837
|
return;
|
|
823
838
|
}
|
|
824
839
|
if (ev.stepKind === "thinking" || ev.stepKind === "subagent") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-agy-link",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Google Antigravity (agy CLI) models for DeepSeek Harness — stream Gemini/Claude/GPT-OSS subscriptions into DSH with thinking, tool activity, token usage and in-GUI Google OAuth login.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|