@cortexkit/aft-opencode 0.31.0 → 0.32.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"bg-notifications.d.ts","sourceRoot":"","sources":["../src/bg-notifications.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAWhD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAG3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,eAAe,GAAG,WAAW,CAAC;IACvC,qFAAqF;IACrF,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE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O,CAAC,IAAI,CAAC,CAwEf;AAED,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,YAAY,GAAG;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GAC/C,OAAO,CAAC,IAAI,CAAC,CAGf;AAyND,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,SAAS,YAAY,EAAE,GAAG,MAAM,CASjF;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,SAAS,qBAAqB,EAAE,GAAG,MAAM,CAQ7F;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,GAAG,MAAM,CAWxF;AAcD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAcnE;AAED,wBAAgB,kCAAkC,IAAI,IAAI,CAKzD"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAwMlD;;;;;;;;;;;;;;;;;;GAkBG;AAQH,QAAA,MAAM,MAAM,EAAE,MAA6D,CAAC;AAwyB5E,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAwMlD;;;;;;;;;;;;;;;;;;GAkBG;AAQH,QAAA,MAAM,MAAM,EAAE,MAA6D,CAAC;AAgzB5E,eAAe,MAAM,CAAC"}
package/dist/index.js CHANGED
@@ -12947,7 +12947,7 @@ async function ensureStorageMigrated(opts) {
12947
12947
  import { execFileSync } from "node:child_process";
12948
12948
  import { createHash as createHash2 } from "node:crypto";
12949
12949
  import { chmodSync as chmodSync3, closeSync as closeSync2, copyFileSync as copyFileSync2, createWriteStream as createWriteStream2, existsSync as existsSync5, lstatSync, mkdirSync as mkdirSync5, openSync as openSync2, readdirSync, readFileSync as readFileSync3, readlinkSync, realpathSync, rmSync as rmSync2, statSync as statSync2, symlinkSync, unlinkSync as unlinkSync2, writeFileSync as writeFileSync2 } from "node:fs";
12950
- import { basename, dirname as dirname3, join as join6, relative, resolve } from "node:path";
12950
+ import { basename, dirname as dirname3, isAbsolute, join as join6, relative, resolve, win32 } from "node:path";
12951
12951
  import { Readable as Readable2 } from "node:stream";
12952
12952
  import { pipeline as pipeline2 } from "node:stream/promises";
12953
12953
  var ORT_VERSION = "1.24.4";
@@ -13153,6 +13153,29 @@ function isOnnxVersionCompatible(version) {
13153
13153
  return false;
13154
13154
  return minor >= REQUIRED_ORT_MIN_MINOR;
13155
13155
  }
13156
+ function pathEnvValue() {
13157
+ return process.env.PATH ?? process.env.Path ?? process.env.path ?? "";
13158
+ }
13159
+ function pathEntriesForPlatform() {
13160
+ const delimiter = process.platform === "win32" ? ";" : ":";
13161
+ return pathEnvValue().split(delimiter).map((entry) => entry.trim().replace(/^"|"$/g, "")).filter((entry) => {
13162
+ if (!entry || entry === "." || entry.includes("\x00"))
13163
+ return false;
13164
+ return isAbsolute(entry) || win32.isAbsolute(entry);
13165
+ });
13166
+ }
13167
+ function directoryContainsLibrary(dir, libName) {
13168
+ try {
13169
+ const entries = readdirSync(dir);
13170
+ if (process.platform === "win32") {
13171
+ const expected = libName.toLowerCase();
13172
+ return entries.some((entry) => entry.toLowerCase() === expected);
13173
+ }
13174
+ return entries.includes(libName);
13175
+ } catch {
13176
+ return false;
13177
+ }
13178
+ }
13156
13179
  function findSystemOnnxRuntime(libName) {
13157
13180
  if (!libName)
13158
13181
  return null;
@@ -13161,9 +13184,15 @@ function findSystemOnnxRuntime(libName) {
13161
13184
  searchPaths.push("/opt/homebrew/lib", "/usr/local/lib");
13162
13185
  } else if (process.platform === "linux") {
13163
13186
  searchPaths.push("/usr/lib", "/usr/lib/x86_64-linux-gnu", "/usr/lib/aarch64-linux-gnu", "/usr/local/lib");
13187
+ } else if (process.platform === "win32") {
13188
+ searchPaths.push(...pathEntriesForPlatform());
13164
13189
  }
13190
+ const seen = new Set;
13165
13191
  for (const dir of searchPaths) {
13166
- if (!existsSync5(join6(dir, libName)))
13192
+ if (seen.has(dir))
13193
+ continue;
13194
+ seen.add(dir);
13195
+ if (!directoryContainsLibrary(dir, libName))
13167
13196
  continue;
13168
13197
  const version = detectOnnxVersion(dir, libName);
13169
13198
  if (version && !isOnnxVersionCompatible(version)) {
@@ -13811,6 +13840,9 @@ function write(level, message, data, sessionId) {
13811
13840
  function log2(message, data) {
13812
13841
  write("INFO", message, data);
13813
13842
  }
13843
+ function debug(message, data) {
13844
+ write("DEBUG", message, data);
13845
+ }
13814
13846
  function warn2(message, data) {
13815
13847
  write("WARN", message, data);
13816
13848
  }
@@ -13820,6 +13852,9 @@ function error2(message, data) {
13820
13852
  function sessionLog(sessionId, message, data) {
13821
13853
  write("INFO", message, data, sessionId);
13822
13854
  }
13855
+ function sessionDebug(sessionId, message, data) {
13856
+ write("DEBUG", message, data, sessionId);
13857
+ }
13823
13858
  function sessionWarn(sessionId, message, data) {
13824
13859
  write("WARN", message, data, sessionId);
13825
13860
  }
@@ -14279,7 +14314,8 @@ async function triggerWakeIfPending(drainContext, skipDrain, includeDeferredComp
14279
14314
  body
14280
14315
  });
14281
14316
  } catch (err) {
14282
- sessionWarn(drainContext.sessionID, `${LOG_PREFIX} wake promptAsync error`, {
14317
+ const logPromptError = clientPath === "live-server" ? sessionDebug : sessionWarn;
14318
+ logPromptError(drainContext.sessionID, `${LOG_PREFIX} wake promptAsync error`, {
14283
14319
  event: "bash_completion_wake_prompt_async_error",
14284
14320
  delivery_id: deliveryID2,
14285
14321
  attempt: state.wakeRetryAttempts + 1,
@@ -14306,7 +14342,7 @@ async function triggerWakeIfPending(drainContext, skipDrain, includeDeferredComp
14306
14342
  return;
14307
14343
  } catch (err) {
14308
14344
  setLiveServerWakeAvailable(drainContext.serverUrl, false);
14309
- sessionWarn(drainContext.sessionID, `${LOG_PREFIX} live-server wake failed; falling back`, {
14345
+ sessionDebug(drainContext.sessionID, `${LOG_PREFIX} live-server wake failed; falling back`, {
14310
14346
  event: "bash_completion_wake_live_server_fallback",
14311
14347
  task_ids: taskIDs,
14312
14348
  directory: drainContext.directory,
@@ -28889,7 +28925,7 @@ import { basename as basename2, dirname as dirname5, join as join11 } from "node
28889
28925
  var import_comment_json2 = __toESM(require_src2(), 1);
28890
28926
  import { existsSync as existsSync7, readFileSync as readFileSync5, statSync as statSync3, writeFileSync as writeFileSync4 } from "node:fs";
28891
28927
  import { homedir as homedir7 } from "node:os";
28892
- import { dirname as dirname4, isAbsolute, join as join10, resolve as resolve2 } from "node:path";
28928
+ import { dirname as dirname4, isAbsolute as isAbsolute2, join as join10, resolve as resolve2 } from "node:path";
28893
28929
  import { fileURLToPath } from "node:url";
28894
28930
 
28895
28931
  // src/hooks/auto-update-checker/constants.ts
@@ -28984,7 +29020,7 @@ function resolvePathPluginSpec(spec, configPath) {
28984
29020
  return spec.replace(/^file:\/\//, "");
28985
29021
  }
28986
29022
  }
28987
- if (isAbsolute(spec) || /^[A-Za-z]:[\\/]/.test(spec))
29023
+ if (isAbsolute2(spec) || /^[A-Za-z]:[\\/]/.test(spec))
28988
29024
  return spec;
28989
29025
  return resolve2(dirname4(configPath), spec);
28990
29026
  }
@@ -28998,7 +29034,7 @@ function getLocalDevPath(directory) {
28998
29034
  for (const entry of plugins) {
28999
29035
  if (entry === PACKAGE_NAME || entry.startsWith(`${PACKAGE_NAME}@`))
29000
29036
  continue;
29001
- if (entry.startsWith("file://") || entry.startsWith(".") || isAbsolute(entry)) {
29037
+ if (entry.startsWith("file://") || entry.startsWith(".") || isAbsolute2(entry)) {
29002
29038
  const localPath = resolvePathPluginSpec(entry, configPath);
29003
29039
  const pkgPath = findPackageJsonUp(localPath);
29004
29040
  if (!pkgPath)
@@ -31954,6 +31990,19 @@ function formatFlag(enabled) {
31954
31990
  function formatCount(value) {
31955
31991
  return value == null ? "—" : value.toLocaleString("en-US");
31956
31992
  }
31993
+ function formatSemanticIndexStatus(status, stage) {
31994
+ if ((status === "loading" || status === "building") && stage === "fingerprint_change") {
31995
+ return "Rebuilding (model changed)";
31996
+ }
31997
+ return status;
31998
+ }
31999
+ function formatSemanticRefreshing(refreshingCount) {
32000
+ if (!Number.isFinite(refreshingCount) || refreshingCount <= 0)
32001
+ return null;
32002
+ if (refreshingCount > 20)
32003
+ return "Ready (many files refreshing)";
32004
+ return `Ready (${refreshingCount} file(s) refreshing)`;
32005
+ }
31957
32006
  function formatBytes(bytes) {
31958
32007
  if (!Number.isFinite(bytes) || bytes <= 0)
31959
32008
  return "0 B";
@@ -32005,6 +32054,7 @@ function coerceAftStatus(response) {
32005
32054
  files: readOptionalNumber(semanticIndex.files),
32006
32055
  entries_done: readOptionalNumber(semanticIndex.entries_done),
32007
32056
  entries_total: readOptionalNumber(semanticIndex.entries_total),
32057
+ refreshing_count: readNumber(semanticIndex.refreshing_count),
32008
32058
  entries: readOptionalNumber(semanticIndex.entries),
32009
32059
  dimension: readOptionalNumber(semanticIndex.dimension),
32010
32060
  error: readNullableString(semanticIndex.error)
@@ -32050,9 +32100,13 @@ function formatStatusMarkdown(status) {
32050
32100
  `- **Trigrams:** ${formatCount(status.search_index.trigrams)}`,
32051
32101
  "",
32052
32102
  "### Semantic index",
32053
- `- **Status:** \`${status.semantic_index.status}\``,
32054
- `- **Entries:** ${formatCount(status.semantic_index.entries)}`
32103
+ `- **Status:** \`${formatSemanticIndexStatus(status.semantic_index.status, status.semantic_index.stage)}\``
32055
32104
  ];
32105
+ const refreshing = formatSemanticRefreshing(status.semantic_index.refreshing_count);
32106
+ if (refreshing) {
32107
+ lines.push(`- **Refresh:** ${refreshing}`);
32108
+ }
32109
+ lines.push(`- **Entries:** ${formatCount(status.semantic_index.entries)}`);
32056
32110
  if (status.semantic_index.backend) {
32057
32111
  lines.push(`- **Backend:** ${status.semantic_index.backend}`);
32058
32112
  }
@@ -32213,6 +32267,17 @@ import * as path2 from "node:path";
32213
32267
  import { tool as tool2 } from "@opencode-ai/plugin";
32214
32268
  var z2 = tool2.schema;
32215
32269
  var optionalInt = (min, max) => z2.number().int().min(min).max(max).optional();
32270
+ function isEmptyParam(value) {
32271
+ if (value === undefined || value === null)
32272
+ return true;
32273
+ if (typeof value === "string")
32274
+ return value.length === 0;
32275
+ if (Array.isArray(value))
32276
+ return value.length === 0;
32277
+ if (typeof value === "object")
32278
+ return Object.keys(value).length === 0;
32279
+ return false;
32280
+ }
32216
32281
  var LONG_RUNNING_COMMAND_TIMEOUT_MS = {
32217
32282
  callers: 60000,
32218
32283
  trace_to: 60000,
@@ -32221,7 +32286,7 @@ var LONG_RUNNING_COMMAND_TIMEOUT_MS = {
32221
32286
  impact: 60000,
32222
32287
  grep: 60000,
32223
32288
  glob: 60000,
32224
- semantic_search: 45000
32289
+ semantic_search: 60000
32225
32290
  };
32226
32291
  function timeoutForCommand(command) {
32227
32292
  return LONG_RUNNING_COMMAND_TIMEOUT_MS[command];
@@ -32533,9 +32598,9 @@ function astTools(ctx) {
32533
32598
  pattern: args.pattern,
32534
32599
  lang: args.lang
32535
32600
  };
32536
- if (args.paths)
32601
+ if (!isEmptyParam(args.paths))
32537
32602
  params.paths = args.paths;
32538
- if (args.globs)
32603
+ if (!isEmptyParam(args.globs))
32539
32604
  params.globs = args.globs;
32540
32605
  if (args.contextLines !== undefined)
32541
32606
  params.context = Number(args.contextLines);
@@ -32653,9 +32718,9 @@ ${hint}`;
32653
32718
  rewrite: args.rewrite,
32654
32719
  lang: args.lang
32655
32720
  };
32656
- if (args.paths)
32721
+ if (!isEmptyParam(args.paths))
32657
32722
  params.paths = args.paths;
32658
- if (args.globs)
32723
+ if (!isEmptyParam(args.globs))
32659
32724
  params.globs = args.globs;
32660
32725
  params.dry_run = args.dryRun === true;
32661
32726
  const response = await callBridge(ctx, context, "ast_replace", params);
@@ -35138,7 +35203,7 @@ function getCallID3(ctx) {
35138
35203
  return c.callID ?? c.callId ?? c.call_id;
35139
35204
  }
35140
35205
  function buildZoomTitle(args) {
35141
- if (args.targets !== undefined && args.targets !== null) {
35206
+ if (!isEmptyParam(args.targets)) {
35142
35207
  if (Array.isArray(args.targets)) {
35143
35208
  if (args.targets.length === 1 && args.targets[0]) {
35144
35209
  return `${args.targets[0].filePath}#${args.targets[0].symbol}`;
@@ -35267,14 +35332,26 @@ function readingTools(ctx) {
35267
35332
  contextLines: optionalInt(1, Number.MAX_SAFE_INTEGER).describe("Lines of context before/after the symbol (default: 3)")
35268
35333
  },
35269
35334
  execute: async (args, context) => {
35270
- const hasFilePath = typeof args.filePath === "string" && args.filePath.length > 0;
35271
- const hasUrl = typeof args.url === "string" && args.url.length > 0;
35272
- const hasTargets = args.targets !== undefined && args.targets !== null;
35273
- const hasSymbols = args.symbols !== undefined && args.symbols !== null && (typeof args.symbols === "string" ? args.symbols.length > 0 : Array.isArray(args.symbols) && args.symbols.length > 0);
35335
+ const hasFilePath = !isEmptyParam(args.filePath);
35336
+ const hasUrl = !isEmptyParam(args.url);
35337
+ const hasTargets = !isEmptyParam(args.targets);
35338
+ const hasSymbols = !isEmptyParam(args.symbols);
35274
35339
  const zoomCallID = getCallID3(context);
35275
35340
  if (zoomCallID) {
35276
35341
  const title = buildZoomTitle(args);
35277
- storeToolMetadata(context.sessionID, zoomCallID, { title, metadata: { title } });
35342
+ const display = { title };
35343
+ if (hasFilePath)
35344
+ display.filePath = args.filePath;
35345
+ if (hasUrl)
35346
+ display.url = args.url;
35347
+ if (hasSymbols) {
35348
+ display.symbols = typeof args.symbols === "string" ? args.symbols : JSON.stringify(args.symbols);
35349
+ }
35350
+ if (hasTargets)
35351
+ display.targets = JSON.stringify(args.targets);
35352
+ if (args.contextLines !== undefined)
35353
+ display.contextLines = args.contextLines;
35354
+ storeToolMetadata(context.sessionID, zoomCallID, { title, metadata: display });
35278
35355
  }
35279
35356
  if (hasTargets) {
35280
35357
  if (hasFilePath || hasUrl || hasSymbols) {
@@ -35524,14 +35601,14 @@ function refactoringTools(ctx) {
35524
35601
  },
35525
35602
  execute: async (args, context) => {
35526
35603
  const op = args.op;
35527
- if ((op === "move" || op === "inline") && typeof args.symbol !== "string") {
35604
+ if ((op === "move" || op === "inline") && isEmptyParam(args.symbol)) {
35528
35605
  throw new Error(`'symbol' is required for '${op}' op`);
35529
35606
  }
35530
- if (op === "move" && typeof args.destination !== "string") {
35607
+ if (op === "move" && isEmptyParam(args.destination)) {
35531
35608
  throw new Error("'destination' is required for 'move' op");
35532
35609
  }
35533
35610
  if (op === "extract") {
35534
- if (typeof args.name !== "string")
35611
+ if (isEmptyParam(args.name))
35535
35612
  throw new Error("'name' is required for 'extract' op");
35536
35613
  if (args.startLine === undefined)
35537
35614
  throw new Error("'startLine' is required for 'extract' op");
@@ -35914,32 +35991,46 @@ function arg2(schema) {
35914
35991
  function semanticTools(ctx) {
35915
35992
  const searchTool = {
35916
35993
  description: [
35917
- "Find symbols by concept using hybrid semantic + lexical search. Returns ranked code matches with similarity scores and provenance tags.",
35994
+ "Find code with unified semantic, lexical, literal, and regex search. Returns ranked symbol/file results or exact matching lines, with routing metadata.",
35918
35995
  "",
35919
35996
  "When to reach for it:",
35920
35997
  "- Exploring an unfamiliar area: 'where is rate limiting handled', 'how does auth flow work'",
35921
35998
  "- Concept doesn't appear as a literal string: 'retry logic', 'cache invalidation', 'graceful shutdown'",
35922
35999
  "- Filename-shaped concepts: 'the bridge spawn helper', 'the session detection module'",
35923
- "- After 2+ grep attempts that came back empty or noisy",
36000
+ "- Regex-shaped or exact text queries when you want AFT to classify and route automatically",
35924
36001
  "- You know roughly what the function does but not what it's named",
35925
36002
  "",
35926
36003
  "When NOT to use:",
35927
- "- You have an error message or stack trace → use grep",
36004
+ "- You need exhaustive literal enumeration → use grep directly",
35928
36005
  "- You want the file/module structure → use aft_outline",
35929
36006
  "- You're following a call chain → use aft_navigate",
35930
36007
  "",
35931
- "Each result tags `source` as one of: 'semantic' (embedding match only), 'lexical' (trigram exact-token match the embedding lane missed), or 'hybrid' (both lanes agreed strongest signal)."
36008
+ "Set hint to 'regex', 'literal', 'semantic', or 'auto' to override or document routing intent."
35932
36009
  ].join(`
35933
36010
  `),
35934
36011
  args: {
35935
- 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'.")),
35936
- topK: arg2(optionalInt(1, 100).describe("Number of results (default: 10, max: 100)"))
36012
+ query: arg2(z14.string().describe("Concept, regex, literal text, filename, or capability to find. Examples: 'fuzzy match with whitespace tolerance', '^export', 'Cargo.lock'.")),
36013
+ topK: arg2(optionalInt(1, 100).describe("Number of results (default: 10, max: 100)")),
36014
+ hint: arg2(z14.enum(["regex", "literal", "semantic", "auto"]).optional().describe("Optional routing hint. Defaults to 'auto'."))
35937
36015
  },
35938
36016
  execute: async (args, context) => {
35939
- const response = await callBridge(ctx, context, "semantic_search", {
35940
- query: args.query,
36017
+ if (typeof args.query !== "string" || args.query.length === 0) {
36018
+ throw new Error("semantic_search: invalid params: missing field `query`");
36019
+ }
36020
+ const query = args.query;
36021
+ const hint = typeof args.hint === "string" ? args.hint : undefined;
36022
+ if (hint !== "semantic") {
36023
+ const denied = await askGrepPermission(context, query);
36024
+ if (denied)
36025
+ return permissionDeniedResponse(denied);
36026
+ }
36027
+ const bridgeParams = {
36028
+ query,
35941
36029
  top_k: args.topK ?? 10
35942
- });
36030
+ };
36031
+ if (hint)
36032
+ bridgeParams.hint = hint;
36033
+ const response = await callBridge(ctx, context, "semantic_search", bridgeParams);
35943
36034
  if (response.success === false) {
35944
36035
  if (response.code === "semantic_search_unavailable" && typeof response.message === "string") {
35945
36036
  return response.message;
@@ -36086,8 +36177,12 @@ function buildWorkflowHints(opts) {
36086
36177
  sections.push(`**Web/URL access**: \`aft_outline({ target: url })\` first for structure, then \`aft_zoom({ url, symbols: "<heading>" })\` for the specific section.`);
36087
36178
  }
36088
36179
  if (hasOutline && hasZoom && (hasGrep || hasSearch)) {
36089
- const locator = hasGrep ? `\`${grepName}\`` : "`aft_search`";
36090
- sections.push(hasGrep && hasSearch ? `**Code exploration**: For exact identifiers (\`useState\`, function names, env vars), error messages, or path-shaped queries → \`${grepName}\` first. For broad concepts ('where is X handled', 'how does Y work') \`aft_search\`. Then use \`aft_outline\` for structure → \`aft_zoom\` for symbol(s).` : `**Code exploration**: ${locator} to locate → \`aft_outline\` for structure → \`aft_zoom\` for symbol(s).`);
36180
+ if (hasSearch) {
36181
+ const grepFallback = hasGrep ? ` Use \`${grepName}\` directly only when you need exhaustive enumeration of literal text (every TODO, every import of X) without ranking.` : "";
36182
+ sections.push(`**Code exploration**: \`aft_search\` is the primary code-search tool. It auto-routes by query shape — exact identifiers, regex, error messages, natural language all use the same call. Pass \`hint: "regex"\` / \`hint: "literal"\` / \`hint: "semantic"\` to override routing if needed. Then \`aft_outline\` for structure → \`aft_zoom\` for symbol(s).${grepFallback}`);
36183
+ } else {
36184
+ sections.push(`**Code exploration**: \`${grepName}\` to locate → \`aft_outline\` for structure → \`aft_zoom\` for symbol(s).`);
36185
+ }
36091
36186
  }
36092
36187
  if (hasNavigate) {
36093
36188
  sections.push([
@@ -36208,13 +36303,13 @@ var PLUGIN_VERSION = (() => {
36208
36303
  return "0.0.0";
36209
36304
  }
36210
36305
  })();
36211
- var ANNOUNCEMENT_VERSION = "0.31.0";
36306
+ var ANNOUNCEMENT_VERSION = "0.32.0";
36212
36307
  var ANNOUNCEMENT_FEATURES = [
36213
- "`aft_navigate` has a new `trace_to_symbol` op for path-between-symbols queries. One call returns the shortest call path from one function to another with file + line for every hop. Honest errors for ambiguous, missing, or unreachable targets — including a candidate list to disambiguate.",
36214
- '`aft_outline target: "<dir>", files: true` returns an indexed file tree with language, symbol count, and byte size per file. Lets agents pick which files to actually open without first reading symbol bodies. Honest truncation (`complete: false` + `walk_truncated`/`unchecked_files`) when the directory exceeds the walk cap.',
36215
- '`aft_zoom` adds `targets` for cross-file batches — pull bodies from different files in one call. Schema breaking change: `symbol` is removed; pass `symbols: "name"` (string) or `symbols: ["a", "b"]` (array). Same shape works for `url` mode so you can grab multiple sections from one URL fetch.',
36216
- "Bun/npm/pnpm test compressors now match on output shape, not just on the head token. Wrapper invocations like `bun run --cwd packages/foo test`, `npm test`, and `pnpm test` keep failing-test bodies on the first run instead of dropping them to a generic summary.",
36217
- "Tool descriptions trimmed: ~1.2K agent-facing tokens removed (-19% on OpenCode, -2% on Pi) by dropping redundant `Returns:` blocks and compressing `lsp_diagnostics` while preserving its load-bearing honesty guidance."
36308
+ "`aft_search` is now the primary code-search tool auto-routes regex / literal / semantic / hybrid by query shape, with a `hint` override.",
36309
+ 'Semantic search stays queryable through edits no more "rebuilding" fallback after every save.',
36310
+ "Workflow hints promote `aft_search` as primary; `grep` is positioned as the specialized fallback.",
36311
+ "Bare `\\n`, `\\t`, `\\r` queries correctly route to regex mode.",
36312
+ 'Empty params (`targets: []`, `url: ""`) no longer trigger misleading mutual-exclusion errors.'
36218
36313
  ];
36219
36314
  var ANNOUNCEMENT_FOOTER = "Join us on Discord: https://discord.gg/F2uWxjGnU";
36220
36315
  var plugin = async (input) => initializePluginForDirectory(input);
@@ -36405,7 +36500,11 @@ ${lines}
36405
36500
  };
36406
36501
  probeServerReachable(input.serverUrl?.toString()).then((reachable) => {
36407
36502
  setLiveServerWakeAvailable(reachable);
36408
- log2(reachable ? "Live OpenCode HTTP listener reachable; bg-notifications wake path = live-server (anomalyco/opencode#28202 workaround active)." : "Live OpenCode HTTP listener unreachable; bg-notifications wake path = in-process-fallback. Wakes will still arrive but the upstream duplicate-runner bug (anomalyco/opencode#28202) is not worked around. Launch with `opencode --port 0` in TUI mode to activate the workaround.");
36503
+ if (reachable) {
36504
+ log2("Live OpenCode HTTP listener reachable; bg-notifications wake path = live-server (anomalyco/opencode#28202 workaround active).");
36505
+ } else {
36506
+ debug("Live OpenCode HTTP listener unreachable; bg-notifications wake path = in-process-fallback. Wakes will still arrive but the upstream duplicate-runner bug (anomalyco/opencode#28202) is not worked around. Launch with `opencode --port 0` in TUI mode to activate the workaround.");
36507
+ }
36409
36508
  }).catch(() => {
36410
36509
  setLiveServerWakeAvailable(false);
36411
36510
  });
package/dist/logger.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export declare function log(message: string, data?: unknown): void;
2
+ export declare function debug(message: string, data?: unknown): void;
2
3
  export declare function warn(message: string, data?: unknown): void;
3
4
  export declare function error(message: string, data?: unknown): void;
4
5
  /**
@@ -8,6 +9,7 @@ export declare function error(message: string, data?: unknown): void;
8
9
  * project-scoped, not session-scoped — use `log`/`warn`/`error` for those.
9
10
  */
10
11
  export declare function sessionLog(sessionId: string | undefined, message: string, data?: unknown): void;
12
+ export declare function sessionDebug(sessionId: string | undefined, message: string, data?: unknown): void;
11
13
  export declare function sessionWarn(sessionId: string | undefined, message: string, data?: unknown): void;
12
14
  export declare function sessionError(sessionId: string | undefined, message: string, data?: unknown): void;
13
15
  export declare function getLogFilePath(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAuEA,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAEzD;AAED,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAE1D;AAED,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAE/F;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAEhG;AAED,wBAAgB,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EhG;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAEjG;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY;iBACV,MAAM,SAAS;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;kBAGpC,MAAM,SAAS;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;mBAGpC,MAAM,SAAS;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;;CAIrD,CAAC"}
@@ -44,6 +44,7 @@ export interface AftStatusSnapshot {
44
44
  files?: number | null;
45
45
  entries_done?: number | null;
46
46
  entries_total?: number | null;
47
+ refreshing_count: number;
47
48
  entries: number | null;
48
49
  dimension: number | null;
49
50
  error?: string | null;
@@ -78,6 +79,8 @@ export interface AftStatusSnapshot {
78
79
  */
79
80
  message: string;
80
81
  }
82
+ export declare function formatSemanticIndexStatus(status: string, stage?: string | null): string;
83
+ export declare function formatSemanticRefreshing(refreshingCount: number): string | null;
81
84
  export declare function formatBytes(bytes: number): string;
82
85
  export declare function coerceAftStatus(response: Record<string, unknown>): AftStatusSnapshot;
83
86
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/shared/status.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,0BAA0B,CAAC;IACpC,OAAO,EAAE,0BAA0B,CAAC;CACrC;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,GAAG,IAA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,4DAA4D;IAC5D,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,aAAa,EAAE,MAAM,CAAC;QACtB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,wEAAwE;IACxE,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAqDD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAKvF;AAED,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/E;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAajD;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,iBAAiB,CAoEpF;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CA2E3E;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CA8EtE"}
@@ -56,6 +56,19 @@ export declare const optionalInt: (min: number, max: number) => any;
56
56
  * declared more permissively.
57
57
  */
58
58
  export declare function coerceOptionalInt(v: unknown, paramName: string, min: number, max: number): number | undefined;
59
+ /**
60
+ * True when a value represents "agent did not provide this param".
61
+ *
62
+ * GPT-family models send empty strings / empty arrays / null instead of
63
+ * omitting optional params entirely. Use this BEFORE mutual-exclusion
64
+ * checks so an empty `targets: []` or `url: ""` doesn't get counted as
65
+ * present and trigger a misleading "X is mutually exclusive with Y" error.
66
+ *
67
+ * Treats undefined / null / "" / [] / {} as empty. Booleans and numbers
68
+ * (including 0 and false) are NOT empty by themselves — only string and
69
+ * collection sentinels qualify.
70
+ */
71
+ export declare function isEmptyParam(value: unknown): boolean;
59
72
  /**
60
73
  * Per-command timeout overrides (milliseconds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AC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA0S3E"}
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,CA8S3E"}
@@ -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;AAGvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAsCjD,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,CAmS/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;AA+CD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CA2ChF"}
1
+ {"version":3,"file":"reading.d.ts","sourceRoot":"","sources":["../../src/tools/reading.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA0CjD,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,CA2S/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;AA+CD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CA2ChF"}
@@ -1 +1 @@
1
- {"version":3,"file":"refactoring.d.ts","sourceRoot":"","sources":["../../src/tools/refactoring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAcjD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAyInF"}
1
+ {"version":3,"file":"refactoring.d.ts","sourceRoot":"","sources":["../../src/tools/refactoring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAcjD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA4InF"}
@@ -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;AAWjD,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;AAYjD,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA8EhF"}
package/dist/tui.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // src/tui/index.tsx
2
2
  import { createMemo as createMemo2, createSignal as createSignal2, onCleanup as onCleanup2 } from "solid-js";
3
3
  // package.json
4
- var version = "0.31.0";
4
+ var version = "0.32.0";
5
5
 
6
6
  // src/shared/rpc-client.ts
7
7
  import { existsSync, readdirSync, readFileSync, unlinkSync } from "node:fs";
@@ -343,6 +343,19 @@ function readCompression(value) {
343
343
  session: readCompressionAggregate(compression.session)
344
344
  };
345
345
  }
346
+ function formatSemanticIndexStatus(status, stage) {
347
+ if ((status === "loading" || status === "building") && stage === "fingerprint_change") {
348
+ return "Rebuilding (model changed)";
349
+ }
350
+ return status;
351
+ }
352
+ function formatSemanticRefreshing(refreshingCount) {
353
+ if (!Number.isFinite(refreshingCount) || refreshingCount <= 0)
354
+ return null;
355
+ if (refreshingCount > 20)
356
+ return "Ready (many files refreshing)";
357
+ return `Ready (${refreshingCount} file(s) refreshing)`;
358
+ }
346
359
  function formatBytes(bytes) {
347
360
  if (!Number.isFinite(bytes) || bytes <= 0)
348
361
  return "0 B";
@@ -394,6 +407,7 @@ function coerceAftStatus(response) {
394
407
  files: readOptionalNumber(semanticIndex.files),
395
408
  entries_done: readOptionalNumber(semanticIndex.entries_done),
396
409
  entries_total: readOptionalNumber(semanticIndex.entries_total),
410
+ refreshing_count: readNumber(semanticIndex.refreshing_count),
397
411
  entries: readOptionalNumber(semanticIndex.entries),
398
412
  dimension: readOptionalNumber(semanticIndex.dimension),
399
413
  error: readNullableString(semanticIndex.error)
@@ -690,7 +704,15 @@ var SidebarContent = (props) => {
690
704
  const s = () => scopedSidebarSnapshot(status(), currentDirectory(), props.sessionID());
691
705
  const notInitialized = () => s()?.cache_role === "not_initialized";
692
706
  const searchStatus = () => statusDisplay(s()?.search_index?.status ?? "disabled");
693
- const semanticStatus = () => statusDisplay(s()?.semantic_index?.status ?? "disabled");
707
+ const semanticStatus = () => {
708
+ const rawStatus = s()?.semantic_index?.status ?? "disabled";
709
+ const display = statusDisplay(rawStatus);
710
+ return {
711
+ ...display,
712
+ label: formatSemanticIndexStatus(rawStatus, s()?.semantic_index?.stage)
713
+ };
714
+ };
715
+ const semanticRefreshing = () => formatSemanticRefreshing(s()?.semantic_index?.refreshing_count ?? 0);
694
716
  const trigramBytes = () => s()?.disk?.trigram_disk_bytes ?? 0;
695
717
  const semanticBytes = () => s()?.disk?.semantic_disk_bytes ?? 0;
696
718
  const compressionRows = () => formatCompressionSidebarRows(s()?.compression);
@@ -819,6 +841,13 @@ var SidebarContent = (props) => {
819
841
  value: semanticStatus().label,
820
842
  tone: semanticStatus().tone
821
843
  }, undefined, false, undefined, this),
844
+ semanticRefreshing() && /* @__PURE__ */ jsxDEV("box", {
845
+ width: "100%",
846
+ children: /* @__PURE__ */ jsxDEV("text", {
847
+ fg: props.theme.textMuted,
848
+ children: semanticRefreshing()
849
+ }, undefined, false, undefined, this)
850
+ }, undefined, false, undefined, this),
822
851
  s()?.semantic_index?.status === "loading" && s()?.semantic_index?.entries_total != null && s().semantic_index.entries_total > 0 && /* @__PURE__ */ jsxDEV(StatRow, {
823
852
  theme: props.theme,
824
853
  label: "Progress",
@@ -1189,9 +1218,16 @@ var StatusDialog = (props) => {
1189
1218
  /* @__PURE__ */ jsxDEV2(R, {
1190
1219
  theme: t(),
1191
1220
  label: "Status",
1192
- value: status().semantic_index.status,
1221
+ value: formatSemanticIndexStatus(status().semantic_index.status, status().semantic_index.stage),
1193
1222
  tone: statusTone(status().semantic_index.status)
1194
1223
  }, undefined, false, undefined, this),
1224
+ formatSemanticRefreshing(status().semantic_index.refreshing_count) ? /* @__PURE__ */ jsxDEV2("box", {
1225
+ width: "100%",
1226
+ children: /* @__PURE__ */ jsxDEV2("text", {
1227
+ fg: t().textMuted,
1228
+ children: formatSemanticRefreshing(status().semantic_index.refreshing_count)
1229
+ }, undefined, false, undefined, this)
1230
+ }, undefined, false, undefined, this) : null,
1195
1231
  /* @__PURE__ */ jsxDEV2(R, {
1196
1232
  theme: t(),
1197
1233
  label: "Entries",
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-hints.d.ts","sourceRoot":"","sources":["../src/workflow-hints.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,iBAAiB;IAChC,oEAAoE;IACpE,WAAW,EAAE,SAAS,GAAG,aAAa,GAAG,KAAK,CAAC;IAC/C,4EAA4E;IAC5E,aAAa,EAAE,OAAO,CAAC;IACvB,mEAAmE;IACnE,eAAe,EAAE,OAAO,CAAC;IACzB,wEAAwE;IACxE,qBAAqB,EAAE,OAAO,CAAC;IAC/B,4DAA4D;IAC5D,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC5B;AAID;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAwEzE;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAQjG"}
1
+ {"version":3,"file":"workflow-hints.d.ts","sourceRoot":"","sources":["../src/workflow-hints.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,iBAAiB;IAChC,oEAAoE;IACpE,WAAW,EAAE,SAAS,GAAG,aAAa,GAAG,KAAK,CAAC;IAC/C,4EAA4E;IAC5E,aAAa,EAAE,OAAO,CAAC;IACvB,mEAAmE;IACnE,eAAe,EAAE,OAAO,CAAC;IACzB,wEAAwE;IACxE,qBAAqB,EAAE,OAAO,CAAC;IAC/B,4DAA4D;IAC5D,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC5B;AAID;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CA8EzE;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAQjG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/aft-opencode",
3
- "version": "0.31.0",
3
+ "version": "0.32.0",
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.31.0",
32
+ "@cortexkit/aft-bridge": "0.32.0",
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.31.0",
42
- "@cortexkit/aft-darwin-x64": "0.31.0",
43
- "@cortexkit/aft-linux-arm64": "0.31.0",
44
- "@cortexkit/aft-linux-x64": "0.31.0",
45
- "@cortexkit/aft-win32-arm64": "0.31.0",
46
- "@cortexkit/aft-win32-x64": "0.31.0"
41
+ "@cortexkit/aft-darwin-arm64": "0.32.0",
42
+ "@cortexkit/aft-darwin-x64": "0.32.0",
43
+ "@cortexkit/aft-linux-arm64": "0.32.0",
44
+ "@cortexkit/aft-linux-x64": "0.32.0",
45
+ "@cortexkit/aft-win32-arm64": "0.32.0",
46
+ "@cortexkit/aft-win32-x64": "0.32.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/node": "^22.0.0",
package/src/logger.ts CHANGED
@@ -73,6 +73,10 @@ export function log(message: string, data?: unknown): void {
73
73
  write("INFO", message, data);
74
74
  }
75
75
 
76
+ export function debug(message: string, data?: unknown): void {
77
+ write("DEBUG", message, data);
78
+ }
79
+
76
80
  export function warn(message: string, data?: unknown): void {
77
81
  write("WARN", message, data);
78
82
  }
@@ -91,6 +95,10 @@ export function sessionLog(sessionId: string | undefined, message: string, data?
91
95
  write("INFO", message, data, sessionId);
92
96
  }
93
97
 
98
+ export function sessionDebug(sessionId: string | undefined, message: string, data?: unknown): void {
99
+ write("DEBUG", message, data, sessionId);
100
+ }
101
+
94
102
  export function sessionWarn(sessionId: string | undefined, message: string, data?: unknown): void {
95
103
  write("WARN", message, data, sessionId);
96
104
  }
@@ -46,6 +46,7 @@ export interface AftStatusSnapshot {
46
46
  files?: number | null;
47
47
  entries_done?: number | null;
48
48
  entries_total?: number | null;
49
+ refreshing_count: number;
49
50
  entries: number | null;
50
51
  dimension: number | null;
51
52
  error?: string | null;
@@ -132,6 +133,19 @@ function formatCount(value: number | null): string {
132
133
  return value == null ? "—" : value.toLocaleString("en-US");
133
134
  }
134
135
 
136
+ export function formatSemanticIndexStatus(status: string, stage?: string | null): string {
137
+ if ((status === "loading" || status === "building") && stage === "fingerprint_change") {
138
+ return "Rebuilding (model changed)";
139
+ }
140
+ return status;
141
+ }
142
+
143
+ export function formatSemanticRefreshing(refreshingCount: number): string | null {
144
+ if (!Number.isFinite(refreshingCount) || refreshingCount <= 0) return null;
145
+ if (refreshingCount > 20) return "Ready (many files refreshing)";
146
+ return `Ready (${refreshingCount} file(s) refreshing)`;
147
+ }
148
+
135
149
  export function formatBytes(bytes: number): string {
136
150
  if (!Number.isFinite(bytes) || bytes <= 0) return "0 B";
137
151
  const units = ["B", "KB", "MB", "GB", "TB"];
@@ -190,6 +204,7 @@ export function coerceAftStatus(response: Record<string, unknown>): AftStatusSna
190
204
  files: readOptionalNumber(semanticIndex.files),
191
205
  entries_done: readOptionalNumber(semanticIndex.entries_done),
192
206
  entries_total: readOptionalNumber(semanticIndex.entries_total),
207
+ refreshing_count: readNumber(semanticIndex.refreshing_count),
193
208
  entries: readOptionalNumber(semanticIndex.entries),
194
209
  dimension: readOptionalNumber(semanticIndex.dimension),
195
210
  error: readNullableString(semanticIndex.error),
@@ -241,9 +256,13 @@ export function formatStatusDialogMessage(status: AftStatusSnapshot): string {
241
256
  `- trigrams: ${formatCount(status.search_index.trigrams)}`,
242
257
  "",
243
258
  "Semantic index",
244
- `- status: ${status.semantic_index.status}`,
245
- `- entries: ${formatCount(status.semantic_index.entries)}`,
259
+ `- status: ${formatSemanticIndexStatus(status.semantic_index.status, status.semantic_index.stage)}`,
246
260
  ];
261
+ const refreshing = formatSemanticRefreshing(status.semantic_index.refreshing_count);
262
+ if (refreshing) {
263
+ lines.push(`- ${refreshing}`);
264
+ }
265
+ lines.push(`- entries: ${formatCount(status.semantic_index.entries)}`);
247
266
  if (status.semantic_index.backend) {
248
267
  lines.push(`- backend: ${status.semantic_index.backend}`);
249
268
  }
@@ -316,9 +335,13 @@ export function formatStatusMarkdown(status: AftStatusSnapshot): string {
316
335
  `- **Trigrams:** ${formatCount(status.search_index.trigrams)}`,
317
336
  "",
318
337
  "### Semantic index",
319
- `- **Status:** \`${status.semantic_index.status}\``,
320
- `- **Entries:** ${formatCount(status.semantic_index.entries)}`,
338
+ `- **Status:** \`${formatSemanticIndexStatus(status.semantic_index.status, status.semantic_index.stage)}\``,
321
339
  ];
340
+ const refreshing = formatSemanticRefreshing(status.semantic_index.refreshing_count);
341
+ if (refreshing) {
342
+ lines.push(`- **Refresh:** ${refreshing}`);
343
+ }
344
+ lines.push(`- **Entries:** ${formatCount(status.semantic_index.entries)}`);
322
345
  if (status.semantic_index.backend) {
323
346
  lines.push(`- **Backend:** ${status.semantic_index.backend}`);
324
347
  }
package/src/tui/index.tsx CHANGED
@@ -6,7 +6,13 @@ import { createMemo, createSignal, onCleanup } from "solid-js";
6
6
 
7
7
  import { version as packageVersion } from "../../package.json";
8
8
  import { AftRpcClient } from "../shared/rpc-client";
9
- import { type AftStatusSnapshot, coerceAftStatus, formatBytes } from "../shared/status";
9
+ import {
10
+ type AftStatusSnapshot,
11
+ coerceAftStatus,
12
+ formatBytes,
13
+ formatSemanticIndexStatus,
14
+ formatSemanticRefreshing,
15
+ } from "../shared/status";
10
16
  import {
11
17
  createAftSidebarSlot,
12
18
  formatCompressionSidebarRows,
@@ -331,9 +337,19 @@ const StatusDialog = (props: StatusDialogProps) => {
331
337
  <R
332
338
  theme={t()}
333
339
  label="Status"
334
- value={status()!.semantic_index.status}
340
+ value={formatSemanticIndexStatus(
341
+ status()!.semantic_index.status,
342
+ status()!.semantic_index.stage,
343
+ )}
335
344
  tone={statusTone(status()!.semantic_index.status)}
336
345
  />
346
+ {formatSemanticRefreshing(status()!.semantic_index.refreshing_count) ? (
347
+ <box width="100%">
348
+ <text fg={t().textMuted}>
349
+ {formatSemanticRefreshing(status()!.semantic_index.refreshing_count)}
350
+ </text>
351
+ </box>
352
+ ) : null}
337
353
  <R
338
354
  theme={t()}
339
355
  label="Entries"
@@ -11,7 +11,13 @@ import type { TuiPluginApi, TuiSlotPlugin, TuiThemeCurrent } from "@opencode-ai/
11
11
  import { createEffect, createMemo, createSignal, on, onCleanup } from "solid-js";
12
12
 
13
13
  import { AftRpcClient } from "../shared/rpc-client";
14
- import { type AftStatusSnapshot, coerceAftStatus, type StatusCompression } from "../shared/status";
14
+ import {
15
+ type AftStatusSnapshot,
16
+ coerceAftStatus,
17
+ formatSemanticIndexStatus,
18
+ formatSemanticRefreshing,
19
+ type StatusCompression,
20
+ } from "../shared/status";
15
21
  import { resolveCortexKitStorageRoot } from "../shared/storage-paths";
16
22
 
17
23
  const SINGLE_BORDER = { type: "single" } as any;
@@ -341,7 +347,16 @@ const SidebarContent = (props: {
341
347
  // Pre-compute display values so the JSX stays readable. createMemo for
342
348
  // each derived field would be overkill — these are cheap derivations.
343
349
  const searchStatus = () => statusDisplay(s()?.search_index?.status ?? "disabled");
344
- const semanticStatus = () => statusDisplay(s()?.semantic_index?.status ?? "disabled");
350
+ const semanticStatus = () => {
351
+ const rawStatus = s()?.semantic_index?.status ?? "disabled";
352
+ const display = statusDisplay(rawStatus);
353
+ return {
354
+ ...display,
355
+ label: formatSemanticIndexStatus(rawStatus, s()?.semantic_index?.stage),
356
+ };
357
+ };
358
+ const semanticRefreshing = () =>
359
+ formatSemanticRefreshing(s()?.semantic_index?.refreshing_count ?? 0);
345
360
  const trigramBytes = () => s()?.disk?.trigram_disk_bytes ?? 0;
346
361
  const semanticBytes = () => s()?.disk?.semantic_disk_bytes ?? 0;
347
362
  const compressionRows = () => formatCompressionSidebarRows(s()?.compression);
@@ -463,6 +478,11 @@ const SidebarContent = (props: {
463
478
  value={semanticStatus().label}
464
479
  tone={semanticStatus().tone}
465
480
  />
481
+ {semanticRefreshing() && (
482
+ <box width="100%">
483
+ <text fg={props.theme.textMuted}>{semanticRefreshing()}</text>
484
+ </box>
485
+ )}
466
486
  {/* When loading, magic-context-style progress hint helps users see
467
487
  background work is making progress instead of stuck. */}
468
488
  {s()?.semantic_index?.status === "loading" &&