@cortexkit/aft-opencode 0.30.0 → 0.30.1

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.
@@ -4,24 +4,13 @@ interface AutoUpdateInstallContext {
4
4
  }
5
5
  export declare function resolveInstallContext(runtimePackageJsonPath?: string | null): AutoUpdateInstallContext | null;
6
6
  export declare function preparePackageUpdate(version: string, packageName?: string, runtimePackageJsonPath?: string | null): string | null;
7
- /**
8
- * Run `npm install` in the install dir to materialize the dependency version
9
- * we just rewrote into package.json. Earlier versions used `bun install`,
10
- * but OpenCode itself installs plugins via npm — the install dir always
11
- * contains `package-lock.json`, never `bun.lock` — so calling npm matches
12
- * the existing lockfile shape and avoids generating a parallel bun.lock
13
- * that drifts from OpenCode's view.
14
- *
15
- * `--no-audit --no-fund --no-progress` keeps the output minimal and avoids
16
- * noisy network calls during background auto-updates.
17
- *
18
- * The default timeout is 60s — long enough for a typical reinstall over a
19
- * mediocre network, short enough that a stuck install doesn't pin the plugin
20
- * process. Caller can override.
21
- */
22
7
  export declare function runNpmInstallSafe(installDir: string, options?: {
23
8
  timeoutMs?: number;
24
9
  signal?: AbortSignal;
25
- }): Promise<boolean>;
10
+ }): Promise<{
11
+ ok: boolean;
12
+ reason?: string;
13
+ stderrTail?: string;
14
+ }>;
26
15
  export {};
27
16
  //# sourceMappingURL=cache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/hooks/auto-update-checker/cache.ts"],"names":[],"mappings":"AAqBA,UAAU,wBAAwB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB;AA4ID,wBAAgB,qBAAqB,CACnC,sBAAsB,GAAE,MAAM,GAAG,IAAyC,GACzE,wBAAwB,GAAG,IAAI,CAoBjC;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,WAAW,GAAE,MAAqB,EAClC,sBAAsB,GAAE,MAAM,GAAG,IAAyC,GACzE,MAAM,GAAG,IAAI,CAmCf;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAAO,GACzD,OAAO,CAAC,OAAO,CAAC,CAyDlB"}
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/hooks/auto-update-checker/cache.ts"],"names":[],"mappings":"AAqBA,UAAU,wBAAwB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB;AA4ID,wBAAgB,qBAAqB,CACnC,sBAAsB,GAAE,MAAM,GAAG,IAAyC,GACzE,wBAAwB,GAAG,IAAI,CAoBjC;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,WAAW,GAAE,MAAqB,EAClC,sBAAsB,GAAE,MAAM,GAAG,IAAyC,GACzE,MAAM,GAAG,IAAI,CAmCf;AAmBD,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAAO,GACzD,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAoFhE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/auto-update-checker/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAYvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE3D,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAiBF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,WAAW,EAChB,OAAO,GAAE,wBAA6B,YAed;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,mBAyCjD;AAiMD,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAYD,YAAY,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/auto-update-checker/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAYvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE3D,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAiBF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,WAAW,EAChB,OAAO,GAAE,wBAA6B,YAed;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,mBAyCjD;AAuMD,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAYD,YAAY,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -51714,15 +51714,25 @@ function preparePackageUpdate(version2, packageName = PACKAGE_NAME, runtimePacka
51714
51714
  return null;
51715
51715
  }
51716
51716
  }
51717
+ var STDERR_TAIL_BYTES = 16 * 1024;
51717
51718
  async function runNpmInstallSafe(installDir, options = {}) {
51718
51719
  let timeout = null;
51720
+ let stderrTail = "";
51719
51721
  try {
51720
51722
  if (options.signal?.aborted)
51721
- return false;
51722
- const proc = spawn2("npm", ["install", "--no-audit", "--no-fund", "--no-progress"], {
51723
+ return { ok: false, reason: "aborted" };
51724
+ const npmBin = process.platform === "win32" ? "npm.cmd" : "npm";
51725
+ const proc = spawn2(npmBin, ["install", "--no-audit", "--no-fund", "--no-progress", "--ignore-scripts"], {
51723
51726
  cwd: installDir,
51724
- stdio: "ignore"
51727
+ stdio: ["ignore", "pipe", "pipe"]
51728
+ });
51729
+ proc.stderr?.on("data", (chunk) => {
51730
+ stderrTail += chunk.toString("utf8");
51731
+ if (stderrTail.length > STDERR_TAIL_BYTES) {
51732
+ stderrTail = stderrTail.slice(-STDERR_TAIL_BYTES);
51733
+ }
51725
51734
  });
51735
+ proc.stdout?.on("data", () => {});
51726
51736
  const abortProcess = () => {
51727
51737
  try {
51728
51738
  proc.kill();
@@ -51730,8 +51740,8 @@ async function runNpmInstallSafe(installDir, options = {}) {
51730
51740
  };
51731
51741
  options.signal?.addEventListener("abort", abortProcess, { once: true });
51732
51742
  const exitPromise = new Promise((resolveExit) => {
51733
- proc.on("error", () => resolveExit(false));
51734
- proc.on("exit", (code) => resolveExit(code === 0));
51743
+ proc.on("error", (err) => resolveExit({ ok: false, reason: `spawn error: ${String(err)}` }));
51744
+ proc.on("exit", (code) => resolveExit(code === 0 ? { ok: true } : { ok: false, reason: `npm install exited with code ${code ?? "signal/unknown"}` }));
51735
51745
  });
51736
51746
  const timeoutPromise = new Promise((resolveTimeout) => {
51737
51747
  timeout = setTimeout(() => resolveTimeout("timeout"), options.timeoutMs ?? 60000);
@@ -51745,29 +51755,41 @@ async function runNpmInstallSafe(installDir, options = {}) {
51745
51755
  pendingSnapshots.delete(installDir);
51746
51756
  restoreAutoUpdateSnapshot(snapshot2);
51747
51757
  }
51748
- return false;
51758
+ const reason = options.signal?.aborted ? "aborted" : "timeout";
51759
+ warnNpmInstallFailure(reason, stderrTail);
51760
+ return { ok: false, reason, stderrTail: stderrTail || undefined };
51749
51761
  }
51750
51762
  const snapshot = pendingSnapshots.get(installDir);
51751
51763
  pendingSnapshots.delete(installDir);
51752
- if (!result && snapshot) {
51764
+ if (!result.ok && snapshot) {
51753
51765
  restoreAutoUpdateSnapshot(snapshot);
51754
51766
  } else if (snapshot) {
51755
51767
  rmSync3(snapshot.tempDir, { recursive: true, force: true });
51756
51768
  }
51757
- return result;
51769
+ if (!result.ok) {
51770
+ warnNpmInstallFailure(result.reason ?? "npm install failed", stderrTail);
51771
+ }
51772
+ return { ...result, stderrTail: stderrTail || undefined };
51758
51773
  } catch (err) {
51759
51774
  const snapshot = pendingSnapshots.get(installDir);
51760
51775
  if (snapshot) {
51761
51776
  pendingSnapshots.delete(installDir);
51762
51777
  restoreAutoUpdateSnapshot(snapshot);
51763
51778
  }
51764
- warn2(`[auto-update-checker] npm install error: ${String(err)}`);
51765
- return false;
51779
+ const reason = `exception: ${String(err)}`;
51780
+ warnNpmInstallFailure(reason, stderrTail);
51781
+ return { ok: false, reason, stderrTail: stderrTail || undefined };
51766
51782
  } finally {
51767
51783
  if (timeout)
51768
51784
  clearTimeout(timeout);
51769
51785
  }
51770
51786
  }
51787
+ function warnNpmInstallFailure(reason, stderrTail) {
51788
+ const tail2 = stderrTail ? `
51789
+ stderr tail:
51790
+ ${stderrTail}` : "";
51791
+ warn2(`[auto-update-checker] npm install failed (${reason})${tail2}`);
51792
+ }
51771
51793
 
51772
51794
  // src/hooks/auto-update-checker/index.ts
51773
51795
  var DEFAULT_CHECK_INTERVAL_MS = 60 * 60 * 1000;
@@ -51907,15 +51929,19 @@ async function runBackgroundUpdateCheck(ctx, options) {
51907
51929
  warn2("[auto-update-checker] Failed to prepare install root for auto-update");
51908
51930
  return;
51909
51931
  }
51910
- const installSuccess = await runNpmInstallSafe(installDir, { signal: options.signal });
51911
- if (installSuccess) {
51932
+ const installResult = await runNpmInstallSafe(installDir, { signal: options.signal });
51933
+ if (installResult.ok) {
51912
51934
  showToast(ctx, "AFT Updated!", `v${currentVersion} → v${latestVersion}
51913
51935
  Restart OpenCode to apply.`, "success", 8000);
51914
51936
  log2(`[auto-update-checker] Update installed: ${currentVersion} → ${latestVersion}`);
51915
51937
  return;
51916
51938
  }
51917
51939
  showToast(ctx, `AFT ${latestVersion}`, `v${latestVersion} available, but auto-update failed to install it. Check logs or retry manually.`, "error", 8000);
51918
- warn2("[auto-update-checker] npm install failed; update not installed");
51940
+ const failureDetail = installResult.reason ? `: ${installResult.reason}` : "";
51941
+ const stderrDetail = installResult.stderrTail ? `
51942
+ stderr tail:
51943
+ ${installResult.stderrTail}` : "";
51944
+ warn2(`[auto-update-checker] npm install failed; update not installed${failureDetail}${stderrDetail}`);
51919
51945
  }
51920
51946
  function showToast(ctx, title, message, variant = "info", duration3 = 3000) {
51921
51947
  ctx.client.tui.showToast({ body: { title, message, variant, duration: duration3 } }).catch(() => {});
@@ -54522,11 +54548,14 @@ function registerShutdownCleanup(fn) {
54522
54548
  }
54523
54549
 
54524
54550
  // src/tools/ast.ts
54525
- import { tool as tool2 } from "@opencode-ai/plugin";
54551
+ import { tool as tool3 } from "@opencode-ai/plugin";
54526
54552
 
54527
54553
  // src/tools/_shared.ts
54528
54554
  import * as fs3 from "node:fs";
54529
54555
  import * as path2 from "node:path";
54556
+ import { tool as tool2 } from "@opencode-ai/plugin";
54557
+ var z2 = tool2.schema;
54558
+ var optionalInt = (min, max) => z2.number().int().min(min).max(max).optional();
54530
54559
  var LONG_RUNNING_COMMAND_TIMEOUT_MS = {
54531
54560
  callers: 60000,
54532
54561
  trace_to: 60000,
@@ -54739,7 +54768,7 @@ function permissionDeniedResponse(message) {
54739
54768
  }
54740
54769
 
54741
54770
  // src/tools/ast.ts
54742
- var z2 = tool2.schema;
54771
+ var z3 = tool3.schema;
54743
54772
  function showOutputToUser(context, output) {
54744
54773
  const ctx = context;
54745
54774
  ctx.metadata?.({ metadata: { output } });
@@ -54772,11 +54801,11 @@ function astTools(ctx) {
54772
54801
 
54773
54802
  ` + "Returns: Text summary — 'Found N match(es) across M file(s)' followed by file:line blocks with matched text and captured meta-variables.",
54774
54803
  args: {
54775
- pattern: z2.string().describe("AST pattern with meta-variables ($VAR, $$$). Must be complete AST node."),
54776
- lang: z2.enum(SUPPORTED_LANGS).describe("Target language"),
54777
- paths: z2.array(z2.string()).optional().describe("Paths to search (default: ['.'])"),
54778
- globs: z2.array(z2.string()).optional().describe("Include/exclude globs (prefix ! to exclude)"),
54779
- contextLines: z2.number().optional().describe("Number of context lines to show around each match")
54804
+ pattern: z3.string().describe("AST pattern with meta-variables ($VAR, $$$). Must be complete AST node."),
54805
+ lang: z3.enum(SUPPORTED_LANGS).describe("Target language"),
54806
+ paths: z3.array(z3.string()).optional().describe("Paths to search (default: ['.'])"),
54807
+ globs: z3.array(z3.string()).optional().describe("Include/exclude globs (prefix ! to exclude)"),
54808
+ contextLines: optionalInt(1, Number.MAX_SAFE_INTEGER).describe("Number of context lines to show around each match")
54780
54809
  },
54781
54810
  execute: async (args, context) => {
54782
54811
  const externalDenied = await checkAstPathsPermission(context, args.paths);
@@ -54866,12 +54895,12 @@ ${hint}`;
54866
54895
 
54867
54896
  ` + "Returns: Text summary — 'Replaced N match(es) across M file(s)' (or '[DRY RUN] Would replace...') followed by per-file output. In dry-run mode, each file is shown with its unified diff so you can verify the rewrite before applying (e.g. catch literal $$$ from anonymous-variadic typos). Diff preview is capped at 8KB total; remaining files are summarized.",
54868
54897
  args: {
54869
- pattern: z2.string().describe("AST pattern with meta-variables ($VAR, $$$). Must be complete AST node."),
54870
- rewrite: z2.string().describe("Replacement pattern (can use $VAR from pattern)"),
54871
- lang: z2.enum(SUPPORTED_LANGS).describe("Target language"),
54872
- paths: z2.array(z2.string()).optional().describe("Paths to search (default: ['.'])"),
54873
- globs: z2.array(z2.string()).optional().describe("Include/exclude globs (prefix ! to exclude)"),
54874
- dryRun: z2.boolean().optional().describe("Preview changes without applying (default: false)")
54898
+ pattern: z3.string().describe("AST pattern with meta-variables ($VAR, $$$). Must be complete AST node."),
54899
+ rewrite: z3.string().describe("Replacement pattern (can use $VAR from pattern)"),
54900
+ lang: z3.enum(SUPPORTED_LANGS).describe("Target language"),
54901
+ paths: z3.array(z3.string()).optional().describe("Paths to search (default: ['.'])"),
54902
+ globs: z3.array(z3.string()).optional().describe("Include/exclude globs (prefix ! to exclude)"),
54903
+ dryRun: z3.boolean().optional().describe("Preview changes without applying (default: false)")
54875
54904
  },
54876
54905
  execute: async (args, context) => {
54877
54906
  const isDryRun = args.dryRun === true;
@@ -55036,7 +55065,7 @@ function conflictTools(ctx) {
55036
55065
  // src/tools/hoisted.ts
55037
55066
  import * as fs6 from "node:fs";
55038
55067
  import * as path4 from "node:path";
55039
- import { tool as tool6 } from "@opencode-ai/plugin";
55068
+ import { tool as tool7 } from "@opencode-ai/plugin";
55040
55069
 
55041
55070
  // src/patch-parser.ts
55042
55071
  function stripHeredoc(input) {
@@ -55330,7 +55359,7 @@ ${chunk.old_lines.join(`
55330
55359
  }
55331
55360
 
55332
55361
  // src/tools/bash.ts
55333
- import { tool as tool3 } from "@opencode-ai/plugin";
55362
+ import { tool as tool4 } from "@opencode-ai/plugin";
55334
55363
 
55335
55364
  // src/shared/subagent-detect.ts
55336
55365
  var CACHE_MAX_ENTRIES2 = 200;
@@ -55383,7 +55412,7 @@ function setCache2(sessionId, isSubagent) {
55383
55412
  }
55384
55413
 
55385
55414
  // src/tools/bash.ts
55386
- var z3 = tool3.schema;
55415
+ var z4 = tool4.schema;
55387
55416
  var METADATA_PREVIEW_LIMIT = 30 * 1024;
55388
55417
  var FOREGROUND_WAIT_WINDOW_MS = 5000;
55389
55418
  var FOREGROUND_POLL_INTERVAL_MS = 100;
@@ -55416,15 +55445,15 @@ function createBashTool(ctx) {
55416
55445
  return {
55417
55446
  description: BASH_DESCRIPTION,
55418
55447
  args: {
55419
- command: z3.string().describe("Shell command to execute through AFT's unified bash schema. Supports normal shell syntax, pipes, redirection, and command rewriting to dedicated AFT tools when available."),
55420
- timeout: z3.number().int().positive().optional().describe("Hard kill cap in milliseconds (positive integer). When omitted, the task can run up to 30 minutes. Foreground bash returns inline if the command finishes within ~5s; otherwise it's automatically promoted to background and a completion reminder is delivered when the task actually finishes."),
55421
- workdir: z3.string().optional().describe("Working directory for command execution. Relative paths resolve through the bridge; defaults to the current tool context/project root when omitted."),
55422
- description: z3.string().optional().describe("Short 5-10 word human-readable summary shown in OpenCode UI metadata instead of raw shell syntax."),
55423
- background: z3.boolean().optional().describe("When true, spawn the command in the background and return a task_id for bash_status/bash_kill instead of waiting for completion. Defaults to false."),
55424
- compressed: z3.boolean().optional().describe("When true or omitted, return compressed output with noisy terminal control sequences reduced. Set to false for raw output."),
55425
- pty: z3.boolean().optional().describe('When true, spawn the command in a real PTY for interactive programs (python/node/bash REPLs, vim). Requires background: true and is unavailable in subagent sessions. Inspect with bash_status({ taskId, outputMode: "screen" }) and drive interactively with bash_write — its input accepts either a string OR an array like [ "iHello", { key: "esc" }, ":wq", { key: "enter" } ] for atomic text+key sequences.'),
55426
- ptyRows: z3.number().int().min(1).max(60).optional().describe("PTY terminal height in rows. Applies only when pty: true; defaults to 24. Minimum 1, maximum 60."),
55427
- ptyCols: z3.number().int().min(1).max(140).optional().describe("PTY terminal width in columns. Applies only when pty: true; defaults to 80. Minimum 1, maximum 140.")
55448
+ command: z4.string().describe("Shell command to execute through AFT's unified bash schema. Supports normal shell syntax, pipes, redirection, and command rewriting to dedicated AFT tools when available."),
55449
+ timeout: optionalInt(1, Number.MAX_SAFE_INTEGER).describe("Hard kill cap in milliseconds (positive integer). When omitted, the task can run up to 30 minutes. Foreground bash returns inline if the command finishes within ~5s; otherwise it's automatically promoted to background and a completion reminder is delivered when the task actually finishes."),
55450
+ workdir: z4.string().optional().describe("Working directory for command execution. Relative paths resolve through the bridge; defaults to the current tool context/project root when omitted."),
55451
+ description: z4.string().optional().describe("Short 5-10 word human-readable summary shown in OpenCode UI metadata instead of raw shell syntax."),
55452
+ background: z4.boolean().optional().describe("When true, spawn the command in the background and return a task_id for bash_status/bash_kill instead of waiting for completion. Defaults to false."),
55453
+ compressed: z4.boolean().optional().describe("When true or omitted, return compressed output with noisy terminal control sequences reduced. Set to false for raw output."),
55454
+ pty: z4.boolean().optional().describe('When true, spawn the command in a real PTY for interactive programs (python/node/bash REPLs, vim). Implies background: true automatically. Unavailable in subagent sessions. Inspect with bash_status({ taskId, outputMode: "screen" }) and drive interactively with bash_write — its input accepts either a string OR an array like [ "iHello", { key: "esc" }, ":wq", { key: "enter" } ] for atomic text+key sequences.'),
55455
+ ptyRows: optionalInt(1, 60).describe("PTY terminal height in rows ignored when pty is false. Defaults to 24 when pty: true. Minimum 1, maximum 60."),
55456
+ ptyCols: optionalInt(1, 140).describe("PTY terminal width in columns ignored when pty is false. Defaults to 80 when pty: true. Minimum 1, maximum 140.")
55428
55457
  },
55429
55458
  execute: async (args, context) => {
55430
55459
  const bashCfg = resolveBashConfig(ctx.config);
@@ -55434,14 +55463,8 @@ function createBashTool(ctx) {
55434
55463
  const command = args.command;
55435
55464
  const cwd = args.workdir ?? context.directory;
55436
55465
  const isSubagent = await resolveIsSubagent(ctx.client, context.sessionID, context.directory);
55437
- const requestedBackground = args.background === true;
55438
55466
  const requestedPty = args.pty === true;
55439
- if (!requestedPty && (args.ptyRows !== undefined || args.ptyCols !== undefined)) {
55440
- throw new Error("invalid_request: ptyRows/ptyCols require pty: true");
55441
- }
55442
- if (requestedPty && !requestedBackground) {
55443
- throw new Error("PTY mode requires background: true");
55444
- }
55467
+ const requestedBackground = args.background === true || requestedPty;
55445
55468
  if (requestedPty && isSubagent) {
55446
55469
  throw new Error("PTY mode is not available in subagent sessions; subagents cannot drive interactive terminals.");
55447
55470
  }
@@ -55578,8 +55601,8 @@ function createBashStatusTool(ctx) {
55578
55601
  return {
55579
55602
  description: "Read-only snapshot of a background or PTY bash task's current state and output. Returns immediately. Use bash_watch to block on or register for pattern matches and exit events.",
55580
55603
  args: {
55581
- taskId: z3.string().describe("Background task ID returned by bash({ background: true }), e.g. bash-6b454047."),
55582
- outputMode: z3.enum(["screen", "raw", "both"]).optional().describe("PTY output rendering mode. Defaults to screen for PTY tasks and preserves existing behavior for piped tasks when omitted.")
55604
+ taskId: z4.string().describe("Background task ID returned by bash({ background: true }), e.g. bash-6b454047."),
55605
+ outputMode: z4.enum(["screen", "raw", "both"]).optional().describe("PTY output rendering mode. Defaults to screen for PTY tasks and preserves existing behavior for piped tasks when omitted.")
55583
55606
  },
55584
55607
  execute: async (args, context) => {
55585
55608
  const taskId = args.taskId;
@@ -55593,7 +55616,7 @@ function createBashKillTool(ctx) {
55593
55616
  return {
55594
55617
  description: "Terminate a running background bash task spawned with bash({ background: true }). Returns confirmation of kill or an error if the task already finished.",
55595
55618
  args: {
55596
- taskId: z3.string().describe("Background task ID returned by bash({ background: true }), e.g. bash-6b454047.")
55619
+ taskId: z4.string().describe("Background task ID returned by bash({ background: true }), e.g. bash-6b454047.")
55597
55620
  },
55598
55621
  execute: async (args, context) => {
55599
55622
  const data = await callBridge(ctx, context, "bash_kill", {
@@ -55741,8 +55764,8 @@ function shortenCommand(command) {
55741
55764
 
55742
55765
  // src/tools/bash_watch.ts
55743
55766
  import * as fs5 from "node:fs/promises";
55744
- import { tool as tool4 } from "@opencode-ai/plugin";
55745
- var z4 = tool4.schema;
55767
+ import { tool as tool5 } from "@opencode-ai/plugin";
55768
+ var z5 = tool5.schema;
55746
55769
  var BASH_WAIT_POLL_INTERVAL_MS = 100;
55747
55770
  var DEFAULT_BASH_STATUS_WAIT_TIMEOUT_MS = 30000;
55748
55771
  var MAX_BASH_STATUS_WAIT_TIMEOUT_MS = 300000;
@@ -55751,11 +55774,11 @@ function createBashWatchTool(ctx) {
55751
55774
  return {
55752
55775
  description: "Block on a background bash task until a pattern matches, it exits, or timeout elapses; or register an async pattern notification with background:true.",
55753
55776
  args: {
55754
- taskId: z4.string().describe("Background task ID returned by bash({ background: true })."),
55755
- pattern: z4.union([z4.string(), z4.object({ regex: z4.string() })]).optional().describe("Substring or regex pattern. Optional in sync mode; required with background:true."),
55756
- background: z4.boolean().optional().describe("When true, register an async watch and return immediately. Defaults to false (sync wait)."),
55757
- timeoutMs: z4.number().int().positive().optional().describe("Sync-only timeout in milliseconds. Default 30000, max 300000."),
55758
- once: z4.boolean().optional().describe("Async-only. Defaults true; false keeps the watch sticky until task exit.")
55777
+ taskId: z5.string().describe("Background task ID returned by bash({ background: true })."),
55778
+ pattern: z5.union([z5.string(), z5.object({ regex: z5.string() })]).optional().describe("Substring or regex pattern. Optional in sync mode; required with background:true."),
55779
+ background: z5.boolean().optional().describe("When true, register an async watch and return immediately. Defaults to false (sync wait)."),
55780
+ timeoutMs: optionalInt(1, MAX_BASH_STATUS_WAIT_TIMEOUT_MS).describe("Sync-only timeout in milliseconds. Default 30000, max 300000."),
55781
+ once: z5.boolean().optional().describe("Async-only. Defaults true; false keeps the watch sticky until task exit.")
55759
55782
  },
55760
55783
  execute: async (args, context) => {
55761
55784
  const taskId = args.taskId;
@@ -55956,19 +55979,19 @@ function sleep2(ms) {
55956
55979
  }
55957
55980
 
55958
55981
  // src/tools/bash_write.ts
55959
- import { tool as tool5 } from "@opencode-ai/plugin";
55960
- var z5 = tool5.schema;
55982
+ import { tool as tool6 } from "@opencode-ai/plugin";
55983
+ var z6 = tool6.schema;
55961
55984
  function createBashWriteTool(ctx) {
55962
55985
  return {
55963
55986
  description: 'Write input bytes to a running PTY bash task. PTY-only; check bash_status reports mode: "pty" first. ' + 'Input is either a string (verbatim bytes) or an array mixing strings and { key: "esc" | "enter" | "up" | "ctrl-c" | ... } objects ' + 'for atomic text+key sequences such as [ "iHello", { key: "esc" }, ":wq", { key: "enter" } ]. ' + "Named keys cover enter/return/tab/space/backspace/esc/escape, arrows, home/end/page-up/page-down/delete/insert, f1..f12, and ctrl-a..ctrl-z. " + "Maximum 1 MiB per call (post-expansion).",
55964
55987
  args: {
55965
- taskId: z5.string().describe("Background PTY task ID returned by bash({ pty: true, background: true })."),
55966
- input: z5.union([
55967
- z5.string(),
55968
- z5.array(z5.union([
55969
- z5.string(),
55970
- z5.object({
55971
- key: z5.string().describe("Named control key, e.g. 'esc', 'enter', 'up', 'ctrl-c'. Case-insensitive.")
55988
+ taskId: z6.string().describe("Background PTY task ID returned by bash({ pty: true, background: true })."),
55989
+ input: z6.union([
55990
+ z6.string(),
55991
+ z6.array(z6.union([
55992
+ z6.string(),
55993
+ z6.object({
55994
+ key: z6.string().describe("Named control key, e.g. 'esc', 'enter', 'up', 'ctrl-c'. Case-insensitive.")
55972
55995
  })
55973
55996
  ]))
55974
55997
  ]).describe("Either a string of verbatim bytes (e.g. 'print(1)\\n') OR an array mixing strings " + "and { key: '<name>' } objects for atomic text+key sequences. " + "Example: [ 'iHello', { key: 'esc' }, ':wq', { key: 'enter' } ].")
@@ -56195,7 +56218,7 @@ function inferBeforeStart(ops, from, beforeLen) {
56195
56218
  }
56196
56219
  return beforeLen;
56197
56220
  }
56198
- var z6 = tool6.schema;
56221
+ var z7 = tool7.schema;
56199
56222
  var READ_DESCRIPTION = `Read file contents or list directory entries.
56200
56223
 
56201
56224
  Use either startLine/endLine OR offset/limit to read a section of a file.
@@ -56219,11 +56242,11 @@ function createReadTool(ctx) {
56219
56242
  return {
56220
56243
  description: READ_DESCRIPTION,
56221
56244
  args: {
56222
- filePath: z6.string().describe("Path to file or directory (absolute or relative to project root)"),
56223
- startLine: z6.number().optional().describe("1-based line to start reading from"),
56224
- endLine: z6.number().optional().describe("1-based line to stop reading at (inclusive)"),
56225
- limit: z6.number().optional().describe("Max lines to return (default: 2000)"),
56226
- offset: z6.number().optional().describe("1-based line number to start reading from (use with limit). Ignored if startLine is provided")
56245
+ filePath: z7.string().describe("Path to file or directory (absolute or relative to project root)"),
56246
+ startLine: optionalInt(1, Number.MAX_SAFE_INTEGER).describe("1-based line to start reading from"),
56247
+ endLine: optionalInt(1, Number.MAX_SAFE_INTEGER).describe("1-based line to stop reading at (inclusive)"),
56248
+ limit: optionalInt(1, Number.MAX_SAFE_INTEGER).describe("Max lines to return (default: 2000)"),
56249
+ offset: optionalInt(1, Number.MAX_SAFE_INTEGER).describe("1-based line number to start reading from (use with limit). Ignored if startLine is provided")
56227
56250
  },
56228
56251
  execute: async (args, context) => {
56229
56252
  const file2 = args.filePath;
@@ -56355,8 +56378,8 @@ function createWriteTool(ctx, editToolName = "edit") {
56355
56378
  return {
56356
56379
  description: getWriteDescription(editToolName),
56357
56380
  args: {
56358
- filePath: z6.string().describe("Path to the file to write (absolute or relative to project root)"),
56359
- content: z6.string().describe("The full content to write to the file")
56381
+ filePath: z7.string().describe("Path to the file to write (absolute or relative to project root)"),
56382
+ content: z7.string().describe("The full content to write to the file")
56360
56383
  },
56361
56384
  execute: async (args, context) => {
56362
56385
  const file2 = args.filePath;
@@ -56501,16 +56524,16 @@ function createEditTool(ctx, writeToolName = "write") {
56501
56524
  return {
56502
56525
  description: getEditDescription(writeToolName),
56503
56526
  args: {
56504
- filePath: z6.string().optional().describe("Path to the file to edit (absolute or relative to project root). Required for all modes except 'operations' multi-file transactions"),
56505
- oldString: z6.string().optional().describe("Text to find (exact match, with fuzzy fallback)"),
56506
- newString: z6.string().optional().describe("Text to replace with (omit or set to empty string to delete the matched text)"),
56507
- replaceAll: z6.boolean().optional().describe("Replace all occurrences"),
56508
- occurrence: z6.number().optional().describe("0-indexed occurrence to replace when multiple matches exist"),
56509
- symbol: z6.string().optional().describe("Named symbol to replace (function, class, type)"),
56510
- content: z6.string().optional().describe("New content for symbol replace or file write"),
56511
- appendContent: z6.string().optional().describe("Text to append to the end of filePath; creates the file if needed"),
56512
- edits: z6.array(z6.record(z6.string(), z6.unknown())).optional().describe("Batch edits — array of { oldString: string, newString: string } or { startLine: number (1-based), endLine: number (1-based, inclusive), content: string }"),
56513
- operations: z6.array(z6.record(z6.string(), z6.unknown())).optional().describe("Transaction — array of { file: string, command: 'edit_match' | 'write', match?: string, replacement?: string, content?: string } for multi-file edits with rollback. Note: uses 'file'/'match'/'replacement' (not filePath/oldString/newString)")
56527
+ filePath: z7.string().optional().describe("Path to the file to edit (absolute or relative to project root). Required for all modes except 'operations' multi-file transactions"),
56528
+ oldString: z7.string().optional().describe("Text to find (exact match, with fuzzy fallback)"),
56529
+ newString: z7.string().optional().describe("Text to replace with (omit or set to empty string to delete the matched text)"),
56530
+ replaceAll: z7.boolean().optional().describe("Replace all occurrences"),
56531
+ occurrence: optionalInt(0, Number.MAX_SAFE_INTEGER).describe("0-indexed occurrence to replace when multiple matches exist"),
56532
+ symbol: z7.string().optional().describe("Named symbol to replace (function, class, type)"),
56533
+ content: z7.string().optional().describe("New content for symbol replace or file write"),
56534
+ appendContent: z7.string().optional().describe("Text to append to the end of filePath; creates the file if needed"),
56535
+ edits: z7.array(z7.record(z7.string(), z7.unknown())).optional().describe("Batch edits — array of { oldString: string, newString: string } or { startLine: number (1-based), endLine: number (1-based, inclusive), content: string }"),
56536
+ operations: z7.array(z7.record(z7.string(), z7.unknown())).optional().describe("Transaction — array of { file: string, command: 'edit_match' | 'write', match?: string, replacement?: string, content?: string } for multi-file edits with rollback. Note: uses 'file'/'match'/'replacement' (not filePath/oldString/newString)")
56514
56537
  },
56515
56538
  execute: async (args, context) => {
56516
56539
  const argsRecord = args;
@@ -56726,7 +56749,7 @@ function createApplyPatchTool(ctx) {
56726
56749
  return {
56727
56750
  description: APPLY_PATCH_DESCRIPTION,
56728
56751
  args: {
56729
- patchText: z6.string().describe("The full patch text including Begin/End markers")
56752
+ patchText: z7.string().describe("The full patch text including Begin/End markers")
56730
56753
  },
56731
56754
  execute: async (args, context) => {
56732
56755
  const patchText = args.patchText;
@@ -57002,8 +57025,8 @@ function createDeleteTool(ctx) {
57002
57025
  return {
57003
57026
  description: DELETE_DESCRIPTION,
57004
57027
  args: {
57005
- files: z6.array(z6.string()).min(1).describe("Paths to delete (one or more). May include directories when recursive=true."),
57006
- recursive: z6.boolean().optional().describe("Required to delete a directory and its contents. Defaults to false; passing a directory without this returns an error.")
57028
+ files: z7.array(z7.string()).min(1).describe("Paths to delete (one or more). May include directories when recursive=true."),
57029
+ recursive: z7.boolean().optional().describe("Required to delete a directory and its contents. Defaults to false; passing a directory without this returns an error.")
57007
57030
  },
57008
57031
  execute: async (args, context) => {
57009
57032
  const inputs = args.files;
@@ -57056,8 +57079,8 @@ function createMoveTool(ctx) {
57056
57079
  return {
57057
57080
  description: MOVE_DESCRIPTION,
57058
57081
  args: {
57059
- filePath: z6.string().describe("Source file path to move"),
57060
- destination: z6.string().describe("Destination file path")
57082
+ filePath: z7.string().describe("Source file path to move"),
57083
+ destination: z7.string().describe("Destination file path")
57061
57084
  },
57062
57085
  execute: async (args, context) => {
57063
57086
  const filePath = path4.isAbsolute(args.filePath) ? args.filePath : path4.resolve(context.directory, args.filePath);
@@ -57167,8 +57190,8 @@ function aftPrefixedTools(ctx) {
57167
57190
  }
57168
57191
 
57169
57192
  // src/tools/imports.ts
57170
- import { tool as tool7 } from "@opencode-ai/plugin";
57171
- var z7 = tool7.schema;
57193
+ import { tool as tool8 } from "@opencode-ai/plugin";
57194
+ var z8 = tool8.schema;
57172
57195
  function importTools(ctx) {
57173
57196
  return {
57174
57197
  aft_import: {
@@ -57184,14 +57207,14 @@ function importTools(ctx) {
57184
57207
  ` + `- remove: { file, removed, module, name?, formatted, syntax_valid?, format_skipped_reason?, validation_errors?, validate_skipped_reason?, backup_id?, lsp_diagnostics? }
57185
57208
  ` + "- organize: { file, groups: [{ name, count }], removed_duplicates, formatted?, syntax_valid?, format_skipped_reason?, validation_errors?, validate_skipped_reason?, backup_id?, lsp_diagnostics? }",
57186
57209
  args: {
57187
- op: z7.enum(["add", "remove", "organize"]).describe("Import operation"),
57188
- filePath: z7.string().describe("Path to the file (absolute or relative to project root)"),
57189
- module: z7.string().optional().describe("Module path (required for add, remove — e.g. 'react', './utils', 'std::fmt')"),
57190
- names: z7.array(z7.string()).optional().describe("Named imports to add (e.g. ['useState', 'useEffect'])"),
57191
- defaultImport: z7.string().optional().describe("Default import name (e.g. 'React')"),
57192
- typeOnly: z7.boolean().optional().describe("Type-only import (TS only, default: false)"),
57193
- removeName: z7.string().optional().describe("Named import to remove for 'remove' op; omit to remove entire import"),
57194
- validate: z7.enum(["syntax", "full"]).optional().describe("Validation level: 'syntax' (default) or 'full'. Syntax = tree-sitter parse check only. Full = also runs LSP type-checking (slower, catches more errors)")
57210
+ op: z8.enum(["add", "remove", "organize"]).describe("Import operation"),
57211
+ filePath: z8.string().describe("Path to the file (absolute or relative to project root)"),
57212
+ module: z8.string().optional().describe("Module path (required for add, remove — e.g. 'react', './utils', 'std::fmt')"),
57213
+ names: z8.array(z8.string()).optional().describe("Named imports to add (e.g. ['useState', 'useEffect'])"),
57214
+ defaultImport: z8.string().optional().describe("Default import name (e.g. 'React')"),
57215
+ typeOnly: z8.boolean().optional().describe("Type-only import (TS only, default: false)"),
57216
+ removeName: z8.string().optional().describe("Named import to remove for 'remove' op; omit to remove entire import"),
57217
+ validate: z8.enum(["syntax", "full"]).optional().describe("Validation level: 'syntax' (default) or 'full'. Syntax = tree-sitter parse check only. Full = also runs LSP type-checking (slower, catches more errors)")
57195
57218
  },
57196
57219
  execute: async (args, context) => {
57197
57220
  const op = args.op;
@@ -57236,8 +57259,8 @@ function importTools(ctx) {
57236
57259
  }
57237
57260
 
57238
57261
  // src/tools/lsp.ts
57239
- import { tool as tool8 } from "@opencode-ai/plugin";
57240
- var z8 = tool8.schema;
57262
+ import { tool as tool9 } from "@opencode-ai/plugin";
57263
+ var z9 = tool9.schema;
57241
57264
  function lspTools(ctx) {
57242
57265
  const diagnosticsTool = {
57243
57266
  description: "On-demand LSP file/scope check. Spawns the relevant language server (if " + "registered for the file's extension), opens the document, prefers LSP 3.17 " + "pull diagnostics when supported, and falls back to push + waitMs otherwise. " + "NOT a project-wide type checker — for full coverage run `tsc --noEmit`, " + "`cargo check`, `pyright`, etc.\n" + `
@@ -57259,10 +57282,10 @@ function lspTools(ctx) {
57259
57282
  ` + "- `total: 0, complete: true, lsp_servers_used: [{status: 'pull_ok'}]` → file is genuinely clean.\n" + "- `total: 0, lsp_servers_used: []` → **nothing was checked** (no server registered for this extension). Tell the user, don't claim 'no errors'.\n" + "- `lsp_servers_used: [{status: 'binary_not_installed: <name>'}]` → server matched the extension but its binary isn't on PATH. Tell the user to install it.\n" + "- `lsp_servers_used: [{status: 'no_root_marker (...)'}]` → server is registered but couldn't find a workspace root marker walking up from this file. The user's project layout doesn't match what the server expects.\n" + "- `complete: false` (directory mode) → some files in the directory weren't checked; see `unchecked_files`.\n" + `
57260
57283
  ` + "**When this tool gives an unhelpful answer**, run `npx @cortexkit/aft doctor lsp <filePath>` from a terminal to get a full per-server breakdown (registered servers, binary resolution, root-marker resolution, spawn outcome).",
57261
57284
  args: {
57262
- filePath: z8.string().optional().describe("Path to a file to check. Mutually exclusive with 'directory'. Omit both to dump all cached diagnostics."),
57263
- directory: z8.string().optional().describe("Path to a directory. Returns cached diagnostics + workspace pull from active servers; lists files we have no info for in 'unchecked_files'. Capped at 200 walked files."),
57264
- severity: z8.enum(["error", "warning", "information", "hint", "all"]).optional().describe("Filter by severity (default: 'all')."),
57265
- waitMs: z8.number().optional().describe("Wait up to N ms (max 10000, default 0) for push diagnostics to arrive. Only matters for servers that don't support LSP 3.17 pull (bash-language-server, yaml-language-server). Use after an edit to let the server re-analyze.")
57285
+ filePath: z9.string().optional().describe("Path to a file to check. Mutually exclusive with 'directory'. Omit both to dump all cached diagnostics."),
57286
+ directory: z9.string().optional().describe("Path to a directory. Returns cached diagnostics + workspace pull from active servers; lists files we have no info for in 'unchecked_files'. Capped at 200 walked files."),
57287
+ severity: z9.enum(["error", "warning", "information", "hint", "all"]).optional().describe("Filter by severity (default: 'all')."),
57288
+ waitMs: optionalInt(1, 1e4).describe("Wait up to N ms (max 10000, default 0) for push diagnostics to arrive. Only matters for servers that don't support LSP 3.17 pull (bash-language-server, yaml-language-server). Use after an edit to let the server re-analyze.")
57266
57289
  },
57267
57290
  execute: async (args, context) => {
57268
57291
  const filePath = args.filePath || undefined;
@@ -57293,8 +57316,8 @@ function lspTools(ctx) {
57293
57316
  }
57294
57317
 
57295
57318
  // src/tools/navigation.ts
57296
- import { tool as tool9 } from "@opencode-ai/plugin";
57297
- var z9 = tool9.schema;
57319
+ import { tool as tool10 } from "@opencode-ai/plugin";
57320
+ var z10 = tool10.schema;
57298
57321
  function navigationTools(ctx) {
57299
57322
  return {
57300
57323
  aft_navigate: {
@@ -57311,11 +57334,11 @@ function navigationTools(ctx) {
57311
57334
 
57312
57335
  `,
57313
57336
  args: {
57314
- op: z9.enum(["call_tree", "callers", "trace_to", "impact", "trace_data"]).describe("Navigation operation"),
57315
- filePath: z9.string().describe("Path to the source file containing the symbol (absolute or relative to project root)"),
57316
- symbol: z9.string().describe("Name of the symbol to analyze"),
57317
- depth: z9.number().optional().describe("Max traversal depth (default: call_tree=5, callers=1, trace_to=10, impact=5, trace_data=5)"),
57318
- expression: z9.string().optional().describe("Expression to track through data flow (required for trace_data op)")
57337
+ op: z10.enum(["call_tree", "callers", "trace_to", "impact", "trace_data"]).describe("Navigation operation"),
57338
+ filePath: z10.string().describe("Path to the source file containing the symbol (absolute or relative to project root)"),
57339
+ symbol: z10.string().describe("Name of the symbol to analyze"),
57340
+ depth: optionalInt(1, Number.MAX_SAFE_INTEGER).describe("Max traversal depth (default: call_tree=5, callers=1, trace_to=10, impact=5, trace_data=5)"),
57341
+ expression: z10.string().optional().describe("Expression to track through data flow (required for trace_data op)")
57319
57342
  },
57320
57343
  execute: async (args, context) => {
57321
57344
  const params = {
@@ -57341,8 +57364,8 @@ function navigationTools(ctx) {
57341
57364
 
57342
57365
  // src/tools/reading.ts
57343
57366
  import { resolve as resolve8 } from "node:path";
57344
- import { tool as tool10 } from "@opencode-ai/plugin";
57345
- var z10 = tool10.schema;
57367
+ import { tool as tool11 } from "@opencode-ai/plugin";
57368
+ var z11 = tool11.schema;
57346
57369
  function readingTools(ctx) {
57347
57370
  return {
57348
57371
  aft_outline: {
@@ -57353,7 +57376,7 @@ function readingTools(ctx) {
57353
57376
  ` + ` • URL (http:// or https://) → fetch and outline a remote HTML/Markdown document
57354
57377
  ` + " • array of paths → outline multiple files in one call",
57355
57378
  args: {
57356
- target: z10.union([z10.string(), z10.array(z10.string())]).describe("What to outline: a file path, directory path, URL, or array of file paths. The mode is auto-detected: URLs by `http://`/`https://` prefix, directories by stat, arrays as multi-file.")
57379
+ target: z11.union([z11.string(), z11.array(z11.string())]).describe("What to outline: a file path, directory path, URL, or array of file paths. The mode is auto-detected: URLs by `http://`/`https://` prefix, directories by stat, arrays as multi-file.")
57357
57380
  },
57358
57381
  execute: async (args, context) => {
57359
57382
  const target = args.target;
@@ -57408,11 +57431,11 @@ function readingTools(ctx) {
57408
57431
 
57409
57432
  Provide exactly ONE of 'filePath' or 'url'. Pass either 'symbol' for a single lookup or 'symbols' for multiple in one call.`,
57410
57433
  args: {
57411
- filePath: z10.string().optional().describe("Path to file (absolute or relative to project root)"),
57412
- url: z10.string().optional().describe("HTTP/HTTPS URL of an HTML or Markdown document to fetch and zoom into"),
57413
- symbol: z10.string().optional().describe("Symbol name for code, or heading text for Markdown/HTML"),
57414
- symbols: z10.array(z10.string()).optional().describe("Array of symbol names or heading texts for a single batched call"),
57415
- contextLines: z10.number().optional().describe("Lines of context before/after the symbol (default: 3)")
57434
+ filePath: z11.string().optional().describe("Path to file (absolute or relative to project root)"),
57435
+ url: z11.string().optional().describe("HTTP/HTTPS URL of an HTML or Markdown document to fetch and zoom into"),
57436
+ symbol: z11.string().optional().describe("Symbol name for code, or heading text for Markdown/HTML"),
57437
+ symbols: z11.array(z11.string()).optional().describe("Array of symbol names or heading texts for a single batched call"),
57438
+ contextLines: optionalInt(1, Number.MAX_SAFE_INTEGER).describe("Lines of context before/after the symbol (default: 3)")
57416
57439
  },
57417
57440
  execute: async (args, context) => {
57418
57441
  const hasFilePath = typeof args.filePath === "string" && args.filePath.length > 0;
@@ -57494,7 +57517,7 @@ ${lines}`;
57494
57517
  }
57495
57518
 
57496
57519
  // src/tools/refactoring.ts
57497
- import { tool as tool11 } from "@opencode-ai/plugin";
57520
+ import { tool as tool12 } from "@opencode-ai/plugin";
57498
57521
 
57499
57522
  // src/lsp.ts
57500
57523
  var LSP_SYMBOL_KIND_MAP = {
@@ -57553,7 +57576,7 @@ async function queryLspHints(client, symbolName, directory, sessionId) {
57553
57576
  }
57554
57577
 
57555
57578
  // src/tools/refactoring.ts
57556
- var z11 = tool11.schema;
57579
+ var z12 = tool12.schema;
57557
57580
  function refactoringTools(ctx) {
57558
57581
  return {
57559
57582
  aft_refactor: {
@@ -57571,15 +57594,15 @@ function refactoringTools(ctx) {
57571
57594
 
57572
57595
  ` + "Returns: move { ok, files_modified, consumers_updated, checkpoint_name, results }. extract returns { file, name, parameters, return_type, syntax_valid, formatted, ... }. inline returns { file, symbol, call_context, substitutions, conflicts, syntax_valid, formatted, ... }.",
57573
57596
  args: {
57574
- op: z11.enum(["move", "extract", "inline"]).describe("Refactoring operation"),
57575
- filePath: z11.string().describe("Path to the source file (absolute or relative to project root)"),
57576
- symbol: z11.string().optional().describe("Symbol name — required for 'move' and 'inline' ops"),
57577
- destination: z11.string().optional().describe("Target file path — required for 'move' op"),
57578
- scope: z11.string().optional().describe("Disambiguation scope for 'move' op — when multiple top-level symbols share the same name, specify the containing scope to disambiguate (e.g. 'MyClass'). Does NOT enable access to nested symbols or class methods."),
57579
- name: z11.string().optional().describe("New function name — required for 'extract' op"),
57580
- startLine: z11.number().optional().describe("1-based start line — required for 'extract' op"),
57581
- endLine: z11.number().optional().describe("1-based end line (inclusive) — required for 'extract' op"),
57582
- callSiteLine: z11.number().optional().describe("1-based call site line — required for 'inline' op")
57597
+ op: z12.enum(["move", "extract", "inline"]).describe("Refactoring operation"),
57598
+ filePath: z12.string().describe("Path to the source file (absolute or relative to project root)"),
57599
+ symbol: z12.string().optional().describe("Symbol name — required for 'move' and 'inline' ops"),
57600
+ destination: z12.string().optional().describe("Target file path — required for 'move' op"),
57601
+ scope: z12.string().optional().describe("Disambiguation scope for 'move' op — when multiple top-level symbols share the same name, specify the containing scope to disambiguate (e.g. 'MyClass'). Does NOT enable access to nested symbols or class methods."),
57602
+ name: z12.string().optional().describe("New function name — required for 'extract' op"),
57603
+ startLine: optionalInt(1, Number.MAX_SAFE_INTEGER).describe("1-based start line — required for 'extract' op"),
57604
+ endLine: optionalInt(1, Number.MAX_SAFE_INTEGER).describe("1-based end line (inclusive) — required for 'extract' op"),
57605
+ callSiteLine: optionalInt(1, Number.MAX_SAFE_INTEGER).describe("1-based call site line — required for 'inline' op")
57583
57606
  },
57584
57607
  execute: async (args, context) => {
57585
57608
  const op = args.op;
@@ -57660,8 +57683,8 @@ function refactoringTools(ctx) {
57660
57683
 
57661
57684
  // src/tools/safety.ts
57662
57685
  import * as path5 from "node:path";
57663
- import { tool as tool12 } from "@opencode-ai/plugin";
57664
- var z12 = tool12.schema;
57686
+ import { tool as tool13 } from "@opencode-ai/plugin";
57687
+ var z13 = tool13.schema;
57665
57688
  function safetyTools(ctx) {
57666
57689
  return {
57667
57690
  aft_safety: {
@@ -57682,10 +57705,10 @@ function safetyTools(ctx) {
57682
57705
 
57683
57706
  ` + "Returns: undo { path, backup_id }. history { file, entries }. checkpoint { ok, name }. restore { ok, name }. list { checkpoints }.",
57684
57707
  args: {
57685
- op: z12.enum(["undo", "history", "checkpoint", "restore", "list"]).describe("Safety operation"),
57686
- filePath: z12.string().optional().describe("File path (required for history, optional for undo). Absolute or relative to project root"),
57687
- name: z12.string().optional().describe("Checkpoint name (required for checkpoint, restore)"),
57688
- files: z12.array(z12.string()).optional().describe("Specific files to include in checkpoint (optional, defaults to all tracked files)")
57708
+ op: z13.enum(["undo", "history", "checkpoint", "restore", "list"]).describe("Safety operation"),
57709
+ filePath: z13.string().optional().describe("File path (required for history, optional for undo). Absolute or relative to project root"),
57710
+ name: z13.string().optional().describe("Checkpoint name (required for checkpoint, restore)"),
57711
+ files: z13.array(z13.string()).optional().describe("Specific files to include in checkpoint (optional, defaults to all tracked files)")
57689
57712
  },
57690
57713
  execute: async (args, context) => {
57691
57714
  const op = args.op;
@@ -57927,6 +57950,8 @@ function searchTools(ctx) {
57927
57950
  }
57928
57951
 
57929
57952
  // src/tools/semantic.ts
57953
+ import { tool as tool14 } from "@opencode-ai/plugin";
57954
+ var z14 = tool14.schema;
57930
57955
  function arg2(schema) {
57931
57956
  return schema;
57932
57957
  }
@@ -57951,8 +57976,8 @@ function semanticTools(ctx) {
57951
57976
  ].join(`
57952
57977
  `),
57953
57978
  args: {
57954
- query: arg2(exports_external.string().describe("Concept or capability to find, phrased as a programmer would describe the code. Examples: 'fuzzy match with whitespace tolerance', 'undo backup before edit', 'retry failed network request'.")),
57955
- topK: arg2(exports_external.number().optional().describe("Number of results (default: 10, max: 100)"))
57979
+ query: arg2(z14.string().describe("Concept or capability to find, phrased as a programmer would describe the code. Examples: 'fuzzy match with whitespace tolerance', 'undo backup before edit', 'retry failed network request'.")),
57980
+ topK: arg2(optionalInt(1, 100).describe("Number of results (default: 10, max: 100)"))
57956
57981
  },
57957
57982
  execute: async (args, context) => {
57958
57983
  const response = await callBridge(ctx, context, "semantic_search", {
@@ -57977,8 +58002,8 @@ function semanticTools(ctx) {
57977
58002
  }
57978
58003
 
57979
58004
  // src/tools/structure.ts
57980
- import { tool as tool13 } from "@opencode-ai/plugin";
57981
- var z13 = tool13.schema;
58005
+ import { tool as tool15 } from "@opencode-ai/plugin";
58006
+ var z15 = tool15.schema;
57982
58007
  function structureTools(ctx) {
57983
58008
  return {
57984
58009
  aft_transform: {
@@ -58002,19 +58027,19 @@ function structureTools(ctx) {
58002
58027
  ` + `- add_decorator: { file, target, decorator, formatted, syntax_valid?, format_skipped_reason?, validation_errors?, validate_skipped_reason?, backup_id?, lsp_diagnostics? }
58003
58028
  ` + "- add_struct_tags: { file, target, field, tag_string, formatted, syntax_valid?, format_skipped_reason?, validation_errors?, validate_skipped_reason?, backup_id?, lsp_diagnostics? }",
58004
58029
  args: {
58005
- op: z13.enum(["add_member", "add_derive", "wrap_try_catch", "add_decorator", "add_struct_tags"]).describe("Transformation operation"),
58006
- filePath: z13.string().describe("Path to the source file (absolute or relative to project root)"),
58007
- container: z13.string().optional().describe("Container name for add_member — the class, struct, or impl block to insert into. Appears as 'scope' in the response."),
58008
- code: z13.string().optional().describe("Member code to insert (add_member)"),
58009
- position: z13.string().optional().describe("For add_member: 'first', 'last' (default), 'before:name', 'after:name'. For add_decorator: 'first' (default) or 'last' only."),
58010
- target: z13.string().optional().describe("Target symbol name (add_derive: struct/enum, wrap_try_catch: function, add_decorator: function/class, add_struct_tags: struct)"),
58011
- derives: z13.array(z13.string()).optional().describe("Derive macro names (add_derive — e.g. ['Clone', 'Debug'])"),
58012
- catchBody: z13.string().optional().describe("Catch block body (wrap_try_catch — default: 'throw error;')"),
58013
- decorator: z13.string().optional().describe("Decorator text without @ (add_decorator — e.g. 'staticmethod')"),
58014
- field: z13.string().optional().describe("Struct field name (add_struct_tags)"),
58015
- tag: z13.string().optional().describe("Tag key (add_struct_tags — e.g. 'json')"),
58016
- value: z13.string().optional().describe("Tag value (add_struct_tags — e.g. 'user_name,omitempty')"),
58017
- validate: z13.enum(["syntax", "full"]).optional().describe("Validation level: 'syntax' (default) or 'full'. Syntax = tree-sitter parse check only. Full = also runs LSP type-checking (slower, catches more errors)")
58030
+ op: z15.enum(["add_member", "add_derive", "wrap_try_catch", "add_decorator", "add_struct_tags"]).describe("Transformation operation"),
58031
+ filePath: z15.string().describe("Path to the source file (absolute or relative to project root)"),
58032
+ container: z15.string().optional().describe("Container name for add_member — the class, struct, or impl block to insert into. Appears as 'scope' in the response."),
58033
+ code: z15.string().optional().describe("Member code to insert (add_member)"),
58034
+ position: z15.string().optional().describe("For add_member: 'first', 'last' (default), 'before:name', 'after:name'. For add_decorator: 'first' (default) or 'last' only."),
58035
+ target: z15.string().optional().describe("Target symbol name (add_derive: struct/enum, wrap_try_catch: function, add_decorator: function/class, add_struct_tags: struct)"),
58036
+ derives: z15.array(z15.string()).optional().describe("Derive macro names (add_derive — e.g. ['Clone', 'Debug'])"),
58037
+ catchBody: z15.string().optional().describe("Catch block body (wrap_try_catch — default: 'throw error;')"),
58038
+ decorator: z15.string().optional().describe("Decorator text without @ (add_decorator — e.g. 'staticmethod')"),
58039
+ field: z15.string().optional().describe("Struct field name (add_struct_tags)"),
58040
+ tag: z15.string().optional().describe("Tag key (add_struct_tags — e.g. 'json')"),
58041
+ value: z15.string().optional().describe("Tag value (add_struct_tags — e.g. 'user_name,omitempty')"),
58042
+ validate: z15.enum(["syntax", "full"]).optional().describe("Validation level: 'syntax' (default) or 'full'. Syntax = tree-sitter parse check only. Full = also runs LSP type-checking (slower, catches more errors)")
58018
58043
  },
58019
58044
  execute: async (args, context) => {
58020
58045
  const op = args.op;
@@ -17,6 +17,45 @@
17
17
  */
18
18
  import type { BinaryBridge, BridgeRequestOptions } from "@cortexkit/aft-bridge";
19
19
  import type { PluginContext } from "../types.js";
20
+ /**
21
+ * Optional integer with bounds.
22
+ *
23
+ * MUST be JSON-Schema-representable for OpenCode tool registration to
24
+ * succeed: OpenCode wraps plugin args in a host `z.object()` and runs
25
+ * `z.toJSONSchema(args, { io: "input" })` at session start. Any node
26
+ * the host's Zod can't convert (e.g. `.transform()`, `.preprocess()`)
27
+ * throws "Transforms cannot be represented in JSON Schema" and the
28
+ * entire plugin fails to load. Keep this a plain schema — no
29
+ * transforms. Empty-sentinel coercion (null/""/0 → undefined) belongs
30
+ * in tool handlers via `coerceOptionalInt`, not in the schema.
31
+ *
32
+ * Regression guard: `tool-schemas-json-convertible.test.ts` runs
33
+ * `z.toJSONSchema(z.object(args), { io: "input" })` on every plugin
34
+ * tool. If anyone reintroduces a `.transform()` here it fails before
35
+ * shipping.
36
+ *
37
+ * Return type is `any` to suppress TS2742 — Zod's inferred type leaks
38
+ * `.bun/zod@...` paths that aren't portable across the host SDK and
39
+ * our zod version. The type annotation has no runtime effect; the
40
+ * contract test is the real invariant.
41
+ */
42
+ export declare const optionalInt: (min: number, max: number) => any;
43
+ /**
44
+ * Runtime coercion for agent-friendly sentinel handling.
45
+ *
46
+ * Some agents emit null / "" / 0 when they mean "param not provided".
47
+ * Use this inside tool handlers BEFORE relying on the value. Returns
48
+ * `undefined` for all empty sentinels; rejects out-of-bounds with a
49
+ * clear message.
50
+ *
51
+ * Tool handlers that want sentinel tolerance must pass args through
52
+ * this AFTER Zod validation has accepted the value (or for fields
53
+ * declared as `z.unknown().optional()` that bypass type validation).
54
+ * With `optionalInt`'s bounded `z.number().int()` schema, Zod already
55
+ * rejects the sentinels — call this for defense in depth or for fields
56
+ * declared more permissively.
57
+ */
58
+ export declare function coerceOptionalInt(v: unknown, paramName: string, min: number, max: number): number | undefined;
20
59
  /**
21
60
  * Per-command timeout overrides (milliseconds).
22
61
  *
@@ -1 +1 @@
1
- {"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAOhF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQlE,CAAC;AAEF,wFAAwF;AACxF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAErE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAW3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAG,YAAY,CAEhF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,UAAU,CAC9B,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACpC,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA0BlC;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAE9F"}
1
+ {"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAQhF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,KAAK,MAAM,KAAG,GACR,CAAC;AAEhD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC/B,CAAC,EAAE,OAAO,EACV,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,SAAS,CAWpB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQlE,CAAC;AAEF,wFAAwF;AACxF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAErE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAW3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAG,YAAY,CAEhF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,UAAU,CAC9B,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACpC,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA0BlC;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAE9F"}
@@ -1 +1 @@
1
- {"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/tools/ast.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAkDjD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA6S3E"}
1
+ {"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/tools/ast.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAkDjD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA4S3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../src/tools/bash.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAavE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA0EjD,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAmRjE;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAyBvE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAuBrE"}
1
+ {"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../src/tools/bash.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAavE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA0EjD,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAkQjE;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAyBvE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAuBrE"}
@@ -1 +1 @@
1
- {"version":3,"file":"bash_watch.d.ts","sourceRoot":"","sources":["../../src/tools/bash_watch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAavE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AACrD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AACF,KAAK,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAElF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CA4FtE;AAiDD,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,EAAE,eAAe,GAAG,SAAS,EACpC,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,kBAAkB,CAAC,CAmD7B;AAsCD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,SAAS,CAK5E"}
1
+ {"version":3,"file":"bash_watch.d.ts","sourceRoot":"","sources":["../../src/tools/bash_watch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAavE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AACrD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AACF,KAAK,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAElF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAyFtE;AAiDD,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,EAAE,eAAe,GAAG,SAAS,EACpC,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,kBAAkB,CAAC,CAmD7B;AAsCD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,SAAS,CAK5E"}
@@ -1 +1 @@
1
- {"version":3,"file":"hoisted.d.ts","sourceRoot":"","sources":["../../src/tools/hoisted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAK1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAyEjD,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,GAAI,IAAI,MAAM,EAAE,QAAQ,MAAM,EAAE,OAAO,MAAM,KAAG,MAChD,CAAC;AAqRtC;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CA+JjE;AAmmCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA0B/E;AAMD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA8FnF"}
1
+ {"version":3,"file":"hoisted.d.ts","sourceRoot":"","sources":["../../src/tools/hoisted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAK1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAyEjD,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,GAAI,IAAI,MAAM,EAAE,QAAQ,MAAM,EAAE,OAAO,MAAM,KAAG,MAChD,CAAC;AAqRtC;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAkKjE;AAkmCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA0B/E;AAMD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA8FnF"}
@@ -1 +1 @@
1
- {"version":3,"file":"lsp.d.ts","sourceRoot":"","sources":["../../src/tools/lsp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAkF3E"}
1
+ {"version":3,"file":"lsp.d.ts","sourceRoot":"","sources":["../../src/tools/lsp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA+E3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/tools/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAqDlF"}
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/tools/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAkDlF"}
@@ -1 +1 @@
1
- {"version":3,"file":"reading.d.ts","sourceRoot":"","sources":["../../src/tools/reading.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,eAAe;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA2J/E;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EAAE,EACjB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GACnC,eAAe,CAyBjB"}
1
+ {"version":3,"file":"reading.d.ts","sourceRoot":"","sources":["../../src/tools/reading.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,eAAe;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA0J/E;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EAAE,EACjB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GACnC,eAAe,CAyBjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../../src/tools/semantic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAyDhF"}
1
+ {"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../../src/tools/semantic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAWjD,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAyDhF"}
package/dist/tui.js CHANGED
@@ -3,7 +3,7 @@ import { createMemo as createMemo2, createSignal as createSignal2, onCleanup as
3
3
  // package.json
4
4
  var package_default = {
5
5
  name: "@cortexkit/aft-opencode",
6
- version: "0.30.0",
6
+ version: "0.30.1",
7
7
  type: "module",
8
8
  description: "OpenCode plugin for Agent File Tools (AFT) — tree-sitter and lsp powered code analysis",
9
9
  main: "dist/index.js",
@@ -32,7 +32,7 @@ var package_default = {
32
32
  },
33
33
  dependencies: {
34
34
  "@clack/prompts": "^1.2.0",
35
- "@cortexkit/aft-bridge": "0.30.0",
35
+ "@cortexkit/aft-bridge": "0.30.1",
36
36
  "@opencode-ai/plugin": "^1.15.5",
37
37
  "@opencode-ai/sdk": "^1.15.5",
38
38
  "@xterm/headless": "^5.5.0",
@@ -41,12 +41,12 @@ var package_default = {
41
41
  zod: "^4.1.8"
42
42
  },
43
43
  optionalDependencies: {
44
- "@cortexkit/aft-darwin-arm64": "0.30.0",
45
- "@cortexkit/aft-darwin-x64": "0.30.0",
46
- "@cortexkit/aft-linux-arm64": "0.30.0",
47
- "@cortexkit/aft-linux-x64": "0.30.0",
48
- "@cortexkit/aft-win32-arm64": "0.30.0",
49
- "@cortexkit/aft-win32-x64": "0.30.0"
44
+ "@cortexkit/aft-darwin-arm64": "0.30.1",
45
+ "@cortexkit/aft-darwin-x64": "0.30.1",
46
+ "@cortexkit/aft-linux-arm64": "0.30.1",
47
+ "@cortexkit/aft-linux-x64": "0.30.1",
48
+ "@cortexkit/aft-win32-arm64": "0.30.1",
49
+ "@cortexkit/aft-win32-x64": "0.30.1"
50
50
  },
51
51
  devDependencies: {
52
52
  "@types/node": "^22.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/aft-opencode",
3
- "version": "0.30.0",
3
+ "version": "0.30.1",
4
4
  "type": "module",
5
5
  "description": "OpenCode plugin for Agent File Tools (AFT) — tree-sitter and lsp powered code analysis",
6
6
  "main": "dist/index.js",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@clack/prompts": "^1.2.0",
32
- "@cortexkit/aft-bridge": "0.30.0",
32
+ "@cortexkit/aft-bridge": "0.30.1",
33
33
  "@opencode-ai/plugin": "^1.15.5",
34
34
  "@opencode-ai/sdk": "^1.15.5",
35
35
  "@xterm/headless": "^5.5.0",
@@ -38,12 +38,12 @@
38
38
  "zod": "^4.1.8"
39
39
  },
40
40
  "optionalDependencies": {
41
- "@cortexkit/aft-darwin-arm64": "0.30.0",
42
- "@cortexkit/aft-darwin-x64": "0.30.0",
43
- "@cortexkit/aft-linux-arm64": "0.30.0",
44
- "@cortexkit/aft-linux-x64": "0.30.0",
45
- "@cortexkit/aft-win32-arm64": "0.30.0",
46
- "@cortexkit/aft-win32-x64": "0.30.0"
41
+ "@cortexkit/aft-darwin-arm64": "0.30.1",
42
+ "@cortexkit/aft-darwin-x64": "0.30.1",
43
+ "@cortexkit/aft-linux-arm64": "0.30.1",
44
+ "@cortexkit/aft-linux-x64": "0.30.1",
45
+ "@cortexkit/aft-win32-arm64": "0.30.1",
46
+ "@cortexkit/aft-win32-x64": "0.30.1"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/node": "^22.0.0",