dsh-agy-link 0.4.10 → 0.4.11

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.11 (2026-08-21)
4
+
5
+ - **Fixed `Error: unknown tool "agy_tool": only run_code is callable directly` in DSH Code Mode.**
6
+ - Restored the `run_code` wrapper dispatch (`WRAPPER_TOOL_NAME` + `buildMirrorRunCode`) for span cuts.
7
+ - Under DSH's default Code Mode (`agent-presets: default: code`), model-direct tool calls are collapsed unless addressed to `run_code`. Wrapping the mirror invocation in `run_code` allows internal sub-dispatch to `agy_tool` to replay recorded events without being blocked by DSH's dispatch guard.
8
+
3
9
  ## 0.4.10 (2026-08-21)
4
10
 
5
11
  - **Fixed `Error: unknown tool "run_code"` loop (Root Cause).**
package/dist/index.js CHANGED
@@ -457,6 +457,26 @@ var RunRegistry = class {
457
457
  //#endregion
458
458
  //#region src/host/mirror-tool.ts
459
459
  const MIRROR_TOOL_NAME = "agy_tool";
460
+ /** The only tool this DSH deployment lets a model call directly. */
461
+ const WRAPPER_TOOL_NAME = "run_code";
462
+ /**
463
+ * Build the run_code tool-call arguments that replay one recorded agy tool
464
+ * step. The deployment's tool-dispatch policy only allows `run_code` as a
465
+ * direct model call (everything else must be invoked from inside a
466
+ * program), so the span cut addresses run_code with a generated program
467
+ * whose single statement calls the registered mirror tool — the inner
468
+ * dispatch is what renders the native tool card.
469
+ */
470
+ function buildMirrorRunCode(runId, eventIndex, toolName) {
471
+ const invocation = JSON.stringify({
472
+ run: runId,
473
+ step: eventIndex
474
+ });
475
+ return {
476
+ code: "// dsh-agy-link mirror: replay recorded agy tool step " + eventIndex + " (" + toolName + ")\nreturn await tools['agy_tool'](" + invocation + ")",
477
+ description: "replay agy tool step " + eventIndex + " · " + toolName
478
+ };
479
+ }
460
480
  /** agy serializes some tool args as a JSON string; presenters get an object. */
461
481
  function toolInput(args) {
462
482
  const raw = args.input;
@@ -842,12 +862,7 @@ var EventMapper = class {
842
862
  const close = this.closeOpen();
843
863
  if (close) yield close;
844
864
  const idx = this.blockIdx;
845
- const argumentsJson = JSON.stringify({
846
- run: this.opts.runId,
847
- step: absIndex,
848
- tool: ev.tool.name,
849
- input: ev.tool.args
850
- });
865
+ const argumentsJson = JSON.stringify(buildMirrorRunCode(this.opts.runId, absIndex, ev.tool.name));
851
866
  yield {
852
867
  type: "block-start",
853
868
  index: idx,
@@ -859,7 +874,7 @@ var EventMapper = class {
859
874
  block: {
860
875
  type: "tool-call",
861
876
  id: CallId(mirrorCallId(this.opts.runId, absIndex)),
862
- name: MIRROR_TOOL_NAME,
877
+ name: WRAPPER_TOOL_NAME,
863
878
  arguments: argumentsJson
864
879
  }
865
880
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-agy-link",
3
- "version": "0.4.10",
3
+ "version": "0.4.11",
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",