dsh-agy-link 0.3.1 → 0.3.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 +20 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -543,12 +543,11 @@ var EventMapper = class {
|
|
|
543
543
|
if (ev.kind === "step") {
|
|
544
544
|
if (ev.stepKind === "text") {
|
|
545
545
|
const thoughtTokens = ev.usage?.thinking_tokens ?? 0;
|
|
546
|
-
if (
|
|
546
|
+
if (thoughtTokens > 0 && !this.thinkingAnnounced.has(ev.stepKey)) {
|
|
547
547
|
this.thinkingAnnounced.add(ev.stepKey);
|
|
548
548
|
yield* this.ensureBlock("reasoning");
|
|
549
549
|
const d = this.appendDelta("[agy thinking turn · " + thoughtTokens + " thinking tokens]\n");
|
|
550
550
|
if (d) yield d;
|
|
551
|
-
return;
|
|
552
551
|
}
|
|
553
552
|
if (ev.text === "" && !ev.fragment) return;
|
|
554
553
|
this.sawTextStep = true;
|
|
@@ -3215,12 +3214,13 @@ function apply(ctx, entryConfig = {}) {
|
|
|
3215
3214
|
});
|
|
3216
3215
|
}
|
|
3217
3216
|
}));
|
|
3218
|
-
const
|
|
3217
|
+
const toolsSvcRef = { current: null };
|
|
3219
3218
|
const askToolDispose = { current: null };
|
|
3219
|
+
const mirrorToolDispose = { current: null };
|
|
3220
3220
|
const syncAskTool = () => {
|
|
3221
3221
|
const want = getConfig().askTool && bin() !== null;
|
|
3222
|
-
if (want && askToolDispose.current === null &&
|
|
3223
|
-
const reg =
|
|
3222
|
+
if (want && askToolDispose.current === null && toolsSvcRef.current) {
|
|
3223
|
+
const reg = toolsSvcRef.current.register(defineAgyAskTool({
|
|
3224
3224
|
cfg: getConfig,
|
|
3225
3225
|
bin,
|
|
3226
3226
|
catalog: () => catalog.get()
|
|
@@ -3231,19 +3231,29 @@ function apply(ctx, entryConfig = {}) {
|
|
|
3231
3231
|
askToolDispose.current = null;
|
|
3232
3232
|
}
|
|
3233
3233
|
};
|
|
3234
|
-
syncAskTool();
|
|
3235
|
-
const mirrorToolDispose = { current: null };
|
|
3236
3234
|
const syncMirrorTool = () => {
|
|
3237
3235
|
const want = getConfig().enabled && bin() !== null;
|
|
3238
|
-
if (want && mirrorToolDispose.current === null &&
|
|
3239
|
-
const reg =
|
|
3236
|
+
if (want && mirrorToolDispose.current === null && toolsSvcRef.current) {
|
|
3237
|
+
const reg = toolsSvcRef.current.register(defineAgyMirrorTool({ runs }));
|
|
3240
3238
|
mirrorToolDispose.current = typeof reg === "function" ? reg : null;
|
|
3239
|
+
if (mirrorToolDispose.current !== null) log("agy_tool mirror registered with the tools service");
|
|
3241
3240
|
} else if (!want && mirrorToolDispose.current !== null) {
|
|
3242
3241
|
mirrorToolDispose.current();
|
|
3243
3242
|
mirrorToolDispose.current = null;
|
|
3244
3243
|
}
|
|
3245
3244
|
};
|
|
3246
|
-
|
|
3245
|
+
ctx.inject(["tools"], (sub) => {
|
|
3246
|
+
toolsSvcRef.current = sub.get("tools");
|
|
3247
|
+
syncAskTool();
|
|
3248
|
+
syncMirrorTool();
|
|
3249
|
+
return () => {
|
|
3250
|
+
if (askToolDispose.current !== null) askToolDispose.current();
|
|
3251
|
+
askToolDispose.current = null;
|
|
3252
|
+
if (mirrorToolDispose.current !== null) mirrorToolDispose.current();
|
|
3253
|
+
mirrorToolDispose.current = null;
|
|
3254
|
+
toolsSvcRef.current = null;
|
|
3255
|
+
};
|
|
3256
|
+
});
|
|
3247
3257
|
const registerRoutes = (webServer) => {
|
|
3248
3258
|
const disposers = [];
|
|
3249
3259
|
const reg = (route) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-agy-link",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
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",
|