@cortexkit/aft-pi 0.23.0 → 0.25.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.
@@ -55,7 +55,6 @@ interface DrainContext {
55
55
  ctx: PluginContext;
56
56
  directory: string;
57
57
  sessionID?: string;
58
- isActive?: () => boolean;
59
58
  }
60
59
  export declare function trackBgTask(sessionID: string | undefined, taskId: string): void;
61
60
  export declare function ingestBgCompletions(sessionID: string | undefined, completions: unknown): BgCompletion[];
@@ -1 +1 @@
1
- {"version":3,"file":"bg-notifications.d.ts","sourceRoot":"","sources":["../src/bg-notifications.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,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;CAC5B;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,KAAK,cAAc,GAAG;IACpB,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,kBAAkB,EAAE,YAAY,EAAE,CAAC;IACnC,kBAAkB,EAAE,qBAAqB,EAAE,CAAC;IAC5C,aAAa,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;IACrC,iBAAiB,EAAE,MAAM,GAAG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B,EAAE,GAAG,MAAM,CAQ7F;AAWD,wBAAgB,kCAAkC,IAAI,IAAI,CAKzD;AAyGD,wBAAgB,wBAAwB,CAAC,GAAG,GAAE,MAAmB,GAAG,IAAI,CAQvE"}
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * /aft-status — show AFT status (version, indexes, LSP, storage).
3
3
  *
4
- * In interactive mode this opens as an input dialog (read-only preview of
5
- * a formatted snapshot). When UI is unavailable (print / RPC mode), we fall
6
- * back to a notification.
4
+ * Interactive mode opens a custom overlay dialog (see ./dialogs/status-dialog
5
+ * for the Component implementation). The dialog refreshes every 1.5s so
6
+ * index status transitions surface live. Non-UI mode (print / RPC) falls
7
+ * back to a notification with a plain-text snapshot.
7
8
  */
8
9
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
9
10
  import type { PluginContext } from "../types.js";
@@ -1 +1 @@
1
- {"version":3,"file":"aft-status.d.ts","sourceRoot":"","sources":["../../src/commands/aft-status.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAA2B,MAAM,iCAAiC,CAAC;AAG7F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CA4BhF"}
1
+ {"version":3,"file":"aft-status.d.ts","sourceRoot":"","sources":["../../src/commands/aft-status.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAA2B,MAAM,iCAAiC,CAAC;AAI7F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CAoChF"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * AFT status dialog for Pi.
3
+ *
4
+ * Mirrors the @cortexkit/opencode-magic-context Pi `/ctx-status` pattern:
5
+ * `ctx.ui.custom<undefined>(...)` opens an overlay backed by a Component
6
+ * that implements its own render + handleInput. Unlike OpenCode's TUI
7
+ * (which uses @opentui/solid with flex primitives), Pi's TUI is
8
+ * line-oriented and monospace — so column alignment via `padEnd` IS the
9
+ * idiomatic approach here, and looks correct because the host renders
10
+ * lines in a fixed-width font.
11
+ *
12
+ * Refresh cadence (REFRESH_INTERVAL_MS) is short enough that status
13
+ * transitions like "loading → ready" surface live in the dialog without
14
+ * the user needing to close and re-open it.
15
+ */
16
+ import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
17
+ import type { PluginContext } from "../types.js";
18
+ export declare function showAftStatusDialog(pi: ExtensionAPI, extCtx: ExtensionCommandContext, pluginCtx: PluginContext): Promise<void>;
19
+ //# sourceMappingURL=status-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-dialog.d.ts","sourceRoot":"","sources":["../../src/dialogs/status-dialog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAS,MAAM,iCAAiC,CAAC;AAWpG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,wBAAsB,mBAAmB,CACvC,EAAE,EAAE,YAAY,EAChB,MAAM,EAAE,uBAAuB,EAC/B,SAAS,EAAE,aAAa,GACvB,OAAO,CAAC,IAAI,CAAC,CAgBf"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAaH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAQpE,OAAO,EACL,KAAK,SAAS,EACd,aAAa,EAGd,MAAM,aAAa,CAAC;AAgGrB,iBAAS,wBAAwB,CAC/B,MAAM,EAAE,IAAI,CAAC,SA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C;CACnB,CAiEA;AAED;;;;GAIG;AACH,yBAA+B,EAAE,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA6Z9D;AAED,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC"}
package/dist/index.js CHANGED
@@ -30623,6 +30623,8 @@ class BinaryBridge {
30623
30623
  onConfigureWarnings;
30624
30624
  onBashCompletion;
30625
30625
  onBashLongRunning;
30626
+ cachedStatus = null;
30627
+ statusListeners = new Set;
30626
30628
  configureWarningClients = new Map;
30627
30629
  restartResetTimer = null;
30628
30630
  errorPrefix;
@@ -30671,6 +30673,21 @@ class BinaryBridge {
30671
30673
  hasPendingRequests() {
30672
30674
  return this.pending.size > 0;
30673
30675
  }
30676
+ getCachedStatus() {
30677
+ return this.cachedStatus;
30678
+ }
30679
+ subscribeStatus(listener) {
30680
+ this.statusListeners.add(listener);
30681
+ if (this.cachedStatus !== null) {
30682
+ this.deliverStatusSnapshot(listener, this.cachedStatus);
30683
+ }
30684
+ return () => {
30685
+ this.statusListeners.delete(listener);
30686
+ };
30687
+ }
30688
+ cacheStatusSnapshot(snapshot) {
30689
+ this.cachedStatus = snapshot;
30690
+ }
30674
30691
  async send(command, params = {}, options) {
30675
30692
  if (this._shuttingDown) {
30676
30693
  throw new Error(`${this.errorPrefix} Bridge is shutting down, cannot send "${command}"`);
@@ -30807,6 +30824,23 @@ class BinaryBridge {
30807
30824
  }
30808
30825
  }
30809
30826
  }
30827
+ handleStatusChangedFrame(frame) {
30828
+ const snapshot = frame.snapshot;
30829
+ if (!snapshot || typeof snapshot !== "object" || Array.isArray(snapshot))
30830
+ return;
30831
+ this.cachedStatus = snapshot;
30832
+ log("Received status_changed push frame; cached AFT status snapshot");
30833
+ for (const listener of this.statusListeners) {
30834
+ this.deliverStatusSnapshot(listener, this.cachedStatus);
30835
+ }
30836
+ }
30837
+ deliverStatusSnapshot(listener, snapshot) {
30838
+ try {
30839
+ listener(snapshot);
30840
+ } catch (err) {
30841
+ warn(`status listener threw: ${err instanceof Error ? err.message : String(err)}`);
30842
+ }
30843
+ }
30810
30844
  async shutdown() {
30811
30845
  this._shuttingDown = true;
30812
30846
  this.clearRestartResetTimer();
@@ -31011,6 +31045,10 @@ class BinaryBridge {
31011
31045
  });
31012
31046
  continue;
31013
31047
  }
31048
+ if (response.type === "status_changed") {
31049
+ this.handleStatusChangedFrame(response);
31050
+ continue;
31051
+ }
31014
31052
  const id = response.id;
31015
31053
  if (id && this.pending.has(id)) {
31016
31054
  const entry = this.pending.get(id);
@@ -32750,8 +32788,6 @@ async function handleTurnEndBgCompletions(drainContext) {
32750
32788
  }
32751
32789
  async function triggerWakeIfPending(drainContext, skipDrain) {
32752
32790
  const state = stateFor(drainContext.sessionID);
32753
- if (drainContext.isActive?.())
32754
- return;
32755
32791
  if (!skipDrain && state.outstandingTaskIds.size > 0) {
32756
32792
  await drainCompletions(drainContext);
32757
32793
  }
@@ -32954,6 +32990,74 @@ function shorten(value, limit) {
32954
32990
  return value.length <= limit ? value : `${value.slice(0, limit - 1)}…`;
32955
32991
  }
32956
32992
 
32993
+ // src/dialogs/status-dialog.ts
32994
+ import {
32995
+ matchesKey,
32996
+ truncateToWidth,
32997
+ visibleWidth
32998
+ } from "@earendil-works/pi-tui";
32999
+ // package.json
33000
+ var package_default = {
33001
+ name: "@cortexkit/aft-pi",
33002
+ version: "0.25.0",
33003
+ type: "module",
33004
+ description: "Pi coding agent extension for Agent File Tools (AFT) — tree-sitter and LSP-powered code analysis",
33005
+ main: "dist/index.js",
33006
+ types: "dist/index.d.ts",
33007
+ license: "MIT",
33008
+ repository: {
33009
+ type: "git",
33010
+ url: "https://github.com/cortexkit/aft"
33011
+ },
33012
+ files: [
33013
+ "dist",
33014
+ "README.md"
33015
+ ],
33016
+ scripts: {
33017
+ build: "bun build src/index.ts --outdir dist --target node --format esm --external @earendil-works/pi-coding-agent --external @earendil-works/pi-ai --external @earendil-works/pi-tui --external typebox --external diff && tsc --emitDeclarationOnly",
33018
+ typecheck: "tsc --noEmit",
33019
+ test: "bun test src/__tests__/",
33020
+ lint: "biome check src",
33021
+ prepublishOnly: "bun run build"
33022
+ },
33023
+ dependencies: {
33024
+ "@cortexkit/aft-bridge": "0.25.0",
33025
+ typebox: "^1.1.24",
33026
+ "comment-json": "^5.0.0",
33027
+ diff: "^8.0.4",
33028
+ zod: "^4.1.8"
33029
+ },
33030
+ optionalDependencies: {
33031
+ "@cortexkit/aft-darwin-arm64": "0.25.0",
33032
+ "@cortexkit/aft-darwin-x64": "0.25.0",
33033
+ "@cortexkit/aft-linux-arm64": "0.25.0",
33034
+ "@cortexkit/aft-linux-x64": "0.25.0",
33035
+ "@cortexkit/aft-win32-x64": "0.25.0"
33036
+ },
33037
+ devDependencies: {
33038
+ "@earendil-works/pi-coding-agent": "*",
33039
+ "@earendil-works/pi-ai": "*",
33040
+ "@earendil-works/pi-tui": "*",
33041
+ "@types/node": "^22.0.0",
33042
+ typescript: "^5.8.0"
33043
+ },
33044
+ peerDependencies: {
33045
+ "@earendil-works/pi-coding-agent": "*",
33046
+ "@earendil-works/pi-tui": "*"
33047
+ },
33048
+ exports: {
33049
+ ".": {
33050
+ types: "./dist/index.d.ts",
33051
+ import: "./dist/index.js"
33052
+ }
33053
+ },
33054
+ pi: {
33055
+ extensions: [
33056
+ "./dist/index.js"
33057
+ ]
33058
+ }
33059
+ };
33060
+
32957
33061
  // src/shared/status.ts
32958
33062
  function asRecord(value) {
32959
33063
  return typeof value === "object" && value !== null ? value : {};
@@ -33002,9 +33106,12 @@ function coerceAftStatus(response) {
33002
33106
  };
33003
33107
  const disk = asRecord(response.disk);
33004
33108
  const symbolCache = asRecord(response.symbol_cache);
33109
+ const session = asRecord(response.session);
33005
33110
  return {
33006
33111
  version: readString(response.version, "unknown"),
33007
33112
  project_root: readNullableString(response.project_root),
33113
+ canonical_root: readNullableString(response.canonical_root),
33114
+ cache_role: readString(response.cache_role, "not_initialized"),
33008
33115
  features: {
33009
33116
  format_on_edit: readBoolean(features.format_on_edit),
33010
33117
  validate_on_edit: readString(features.validate_on_edit, "off"),
@@ -33039,13 +33146,21 @@ function coerceAftStatus(response) {
33039
33146
  local_entries: readNumber(symbolCache.local_entries),
33040
33147
  warm_entries: readNumber(symbolCache.warm_entries)
33041
33148
  },
33042
- storage_dir: readNullableString(response.storage_dir)
33149
+ storage_dir: readNullableString(response.storage_dir),
33150
+ checkpoints_total: readNumber(response.checkpoints_total),
33151
+ session: {
33152
+ id: readString(session.id, "__default__"),
33153
+ tracked_files: readNumber(session.tracked_files),
33154
+ checkpoints: readNumber(session.checkpoints)
33155
+ }
33043
33156
  };
33044
33157
  }
33045
33158
  function formatStatusDialogMessage(status) {
33046
33159
  const lines = [
33047
33160
  `AFT version: ${status.version}`,
33048
33161
  `Project root: ${status.project_root ?? "(not configured)"}`,
33162
+ `Canonical root: ${status.canonical_root ?? "(not configured)"}`,
33163
+ `Cache role: ${status.cache_role}`,
33049
33164
  "",
33050
33165
  "Enabled features",
33051
33166
  `- format_on_edit: ${formatFlag(status.features.format_on_edit)}`,
@@ -33138,26 +33253,261 @@ function textResult(text, details) {
33138
33253
  };
33139
33254
  }
33140
33255
 
33256
+ // src/dialogs/status-dialog.ts
33257
+ var REFRESH_INTERVAL_MS = 1500;
33258
+ var OVERLAY_WIDTH = 84;
33259
+ async function showAftStatusDialog(pi, extCtx, pluginCtx) {
33260
+ await extCtx.ui.custom((tui, theme, _keybindings, done) => new AftStatusDialogComponent({
33261
+ pi,
33262
+ extCtx,
33263
+ pluginCtx,
33264
+ theme,
33265
+ tui,
33266
+ done
33267
+ }), {
33268
+ overlay: true,
33269
+ overlayOptions: { anchor: "center", width: OVERLAY_WIDTH }
33270
+ });
33271
+ }
33272
+
33273
+ class AftStatusDialogComponent {
33274
+ props;
33275
+ snapshot = null;
33276
+ errorMessage = null;
33277
+ refreshTimer = null;
33278
+ closed = false;
33279
+ constructor(props) {
33280
+ this.props = props;
33281
+ this.fetchOnce();
33282
+ this.refreshTimer = setInterval(() => {
33283
+ if (this.closed)
33284
+ return;
33285
+ this.fetchOnce();
33286
+ }, REFRESH_INTERVAL_MS);
33287
+ }
33288
+ async fetchOnce() {
33289
+ try {
33290
+ const bridge = bridgeFor(this.props.pluginCtx, this.props.extCtx.cwd);
33291
+ const cached = bridge.getCachedStatus();
33292
+ const response = cached ? { success: true, ...cached } : await callBridge(bridge, "status", {}, this.props.extCtx);
33293
+ if (!cached) {
33294
+ bridge.cacheStatusSnapshot(response);
33295
+ }
33296
+ if (this.closed)
33297
+ return;
33298
+ this.snapshot = coerceAftStatus(response);
33299
+ this.errorMessage = null;
33300
+ this.props.tui.requestRender();
33301
+ } catch (err) {
33302
+ if (this.closed)
33303
+ return;
33304
+ this.errorMessage = err instanceof Error ? err.message : String(err);
33305
+ this.props.tui.requestRender();
33306
+ }
33307
+ }
33308
+ handleInput(data) {
33309
+ if (matchesKey(data, "escape") || matchesKey(data, "ctrl+c") || matchesKey(data, "return")) {
33310
+ this.close();
33311
+ }
33312
+ }
33313
+ close() {
33314
+ if (this.closed)
33315
+ return;
33316
+ this.closed = true;
33317
+ if (this.refreshTimer) {
33318
+ clearInterval(this.refreshTimer);
33319
+ this.refreshTimer = null;
33320
+ }
33321
+ this.props.done(undefined);
33322
+ }
33323
+ invalidate() {}
33324
+ render(width) {
33325
+ const innerWidth = Math.max(40, width - 4);
33326
+ const inner = renderInner(this.snapshot, this.errorMessage, this.props.theme, innerWidth);
33327
+ return drawBorder(inner, width, this.props.theme);
33328
+ }
33329
+ dispose() {
33330
+ if (this.refreshTimer) {
33331
+ clearInterval(this.refreshTimer);
33332
+ this.refreshTimer = null;
33333
+ }
33334
+ }
33335
+ }
33336
+ function renderInner(s, error3, theme, innerWidth) {
33337
+ const lines = [];
33338
+ lines.push(`${theme.fg("accent", theme.bold("⚡ AFT Status"))} ${theme.fg("muted", `v${s?.version ?? package_default.version}`)}`);
33339
+ lines.push("");
33340
+ if (error3 && !s) {
33341
+ lines.push(theme.fg("warning", error3));
33342
+ lines.push("");
33343
+ lines.push(theme.fg("muted", "Press Escape to close"));
33344
+ return lines;
33345
+ }
33346
+ if (!s) {
33347
+ lines.push(theme.fg("muted", "Connecting to AFT…"));
33348
+ return lines;
33349
+ }
33350
+ lines.push(rowFull("Project root", s.project_root ?? "(not configured)", theme, innerWidth));
33351
+ lines.push(rowFull("Canonical root", s.canonical_root ?? "(not configured)", theme, innerWidth));
33352
+ const cacheTone = s.cache_role === "main" ? "accent" : s.cache_role === "worktree" ? "warning" : "muted";
33353
+ lines.push(rowFull("Cache role", theme.fg(cacheTone, s.cache_role), theme, innerWidth));
33354
+ lines.push("");
33355
+ const colWidth = Math.floor((innerWidth - 2) / 2);
33356
+ const left = [];
33357
+ const right = [];
33358
+ left.push(theme.fg("muted", "Search index"));
33359
+ left.push(kv("status", colorStatus(s.search_index.status, theme), theme));
33360
+ left.push(kv("files", formatCountShort(s.search_index.files), theme));
33361
+ left.push(kv("trigrams", formatCountShort(s.search_index.trigrams), theme));
33362
+ left.push(kv("disk", formatBytes(s.disk.trigram_disk_bytes), theme));
33363
+ right.push(theme.fg("muted", "Semantic index"));
33364
+ right.push(kv("status", colorStatus(s.semantic_index.status, theme), theme));
33365
+ right.push(kv("entries", formatCountShort(s.semantic_index.entries), theme));
33366
+ if (s.semantic_index.backend)
33367
+ right.push(kv("backend", s.semantic_index.backend, theme));
33368
+ if (s.semantic_index.model)
33369
+ right.push(kv("model", s.semantic_index.model, theme));
33370
+ if (s.semantic_index.dimension != null) {
33371
+ right.push(kv("dimension", String(s.semantic_index.dimension), theme));
33372
+ }
33373
+ right.push(kv("disk", formatBytes(s.disk.semantic_disk_bytes), theme));
33374
+ for (const line of renderColumns(left, right, colWidth))
33375
+ lines.push(line);
33376
+ lines.push("");
33377
+ const left2 = [];
33378
+ const right2 = [];
33379
+ left2.push(theme.fg("muted", "Runtime"));
33380
+ left2.push(kv("LSP servers", String(s.lsp_servers), theme));
33381
+ left2.push(kv("symbol cache", `${formatCountShort(s.symbol_cache.local_entries)} local · ${formatCountShort(s.symbol_cache.warm_entries)} warm`, theme));
33382
+ right2.push(theme.fg("muted", "Current session"));
33383
+ right2.push(kv("tracked files", String(s.session.tracked_files), theme));
33384
+ right2.push(kv("checkpoints", String(s.session.checkpoints), theme));
33385
+ right2.push(kv("all-session", String(s.checkpoints_total), theme));
33386
+ for (const line of renderColumns(left2, right2, colWidth))
33387
+ lines.push(line);
33388
+ lines.push("");
33389
+ lines.push(theme.fg("muted", "Features"));
33390
+ lines.push(` ${featureBadge("format_on_edit", s.features.format_on_edit, theme)} ${featureBadge("search_index", s.features.search_index, theme)} ${featureBadge("semantic_search", s.features.semantic_search, theme)}`);
33391
+ if (s.semantic_index.stage) {
33392
+ lines.push("");
33393
+ lines.push(theme.fg("muted", "Semantic build progress"));
33394
+ lines.push(kv("stage", s.semantic_index.stage, theme));
33395
+ if (s.semantic_index.files != null) {
33396
+ lines.push(kv("files seen", formatCountShort(s.semantic_index.files), theme));
33397
+ }
33398
+ if (s.semantic_index.entries_done != null || s.semantic_index.entries_total != null) {
33399
+ lines.push(kv("progress", `${formatCountShort(s.semantic_index.entries_done ?? null)} / ${formatCountShort(s.semantic_index.entries_total ?? null)}`, theme));
33400
+ }
33401
+ }
33402
+ if (s.semantic_index.error) {
33403
+ lines.push("");
33404
+ lines.push(theme.fg("error", `⚠ ${s.semantic_index.error}`));
33405
+ }
33406
+ if (error3) {
33407
+ lines.push("");
33408
+ lines.push(theme.fg("warning", `⚠ ${error3}`));
33409
+ }
33410
+ lines.push("");
33411
+ lines.push(theme.fg("muted", "Press Escape to close"));
33412
+ return lines;
33413
+ }
33414
+ function colorStatus(status, theme) {
33415
+ switch (status) {
33416
+ case "ready":
33417
+ try {
33418
+ return theme.fg("success", status);
33419
+ } catch {
33420
+ return theme.fg("accent", status);
33421
+ }
33422
+ case "loading":
33423
+ case "building":
33424
+ return theme.fg("warning", status);
33425
+ case "failed":
33426
+ case "error":
33427
+ return theme.fg("error", status);
33428
+ case "disabled":
33429
+ return theme.fg("muted", status);
33430
+ default:
33431
+ return status;
33432
+ }
33433
+ }
33434
+ function featureBadge(name, enabled, theme) {
33435
+ const indicator = enabled ? theme.fg("accent", "●") : theme.fg("muted", "○");
33436
+ const label = enabled ? name : theme.fg("muted", name);
33437
+ return `${indicator} ${label}`;
33438
+ }
33439
+ function kv(label, value, theme) {
33440
+ return ` ${theme.fg("muted", `${label}:`)} ${value}`;
33441
+ }
33442
+ function rowFull(label, value, theme, innerWidth) {
33443
+ const labelText = `${label}: `;
33444
+ const remaining = Math.max(10, innerWidth - visibleWidth(labelText));
33445
+ const truncated = truncateToWidth(value, remaining, "…");
33446
+ return `${theme.fg("muted", labelText)}${truncated}`;
33447
+ }
33448
+ function renderColumns(left, right, colWidth) {
33449
+ const rows = Math.max(left.length, right.length);
33450
+ const out = [];
33451
+ for (let i = 0;i < rows; i++) {
33452
+ const l = left[i] ?? "";
33453
+ const r = right[i] ?? "";
33454
+ const visible = visibleWidth(l);
33455
+ const pad = " ".repeat(Math.max(0, colWidth - visible));
33456
+ out.push(`${l}${pad} ${r}`);
33457
+ }
33458
+ return out;
33459
+ }
33460
+ function drawBorder(inner, width, theme) {
33461
+ const innerWidth = Math.max(40, width - 4);
33462
+ const border = (s) => theme.fg("borderMuted", s);
33463
+ const top = border(`╭${"─".repeat(innerWidth + 2)}╮`);
33464
+ const bottom = border(`╰${"─".repeat(innerWidth + 2)}╯`);
33465
+ const side = border("│");
33466
+ const out = [];
33467
+ out.push(top);
33468
+ for (const raw of inner) {
33469
+ const line = truncateToWidth(raw, innerWidth, "…");
33470
+ const visible = visibleWidth(line);
33471
+ const pad = " ".repeat(Math.max(0, innerWidth - visible));
33472
+ out.push(`${side} ${line}${pad} ${side}`);
33473
+ }
33474
+ out.push(bottom);
33475
+ return out;
33476
+ }
33477
+ function formatCountShort(value) {
33478
+ if (value == null || !Number.isFinite(value))
33479
+ return "—";
33480
+ if (value >= 1e6)
33481
+ return `${(value / 1e6).toFixed(1)}M`;
33482
+ if (value >= 1000)
33483
+ return `${Math.round(value / 1000)}K`;
33484
+ return String(value);
33485
+ }
33486
+
33141
33487
  // src/commands/aft-status.ts
33142
33488
  function registerStatusCommand(pi, ctx) {
33143
33489
  pi.registerCommand("aft-status", {
33144
33490
  description: "Show AFT plugin status (search/semantic indexes, LSP, storage)",
33145
33491
  handler: async (_args, extCtx) => {
33146
33492
  try {
33493
+ if (extCtx.hasUI) {
33494
+ await showAftStatusDialog(pi, extCtx, ctx);
33495
+ return;
33496
+ }
33147
33497
  const bridge = bridgeFor(ctx, extCtx.cwd);
33148
- const response = await callBridge(bridge, "status", {}, extCtx);
33498
+ const cached = bridge.getCachedStatus();
33499
+ const response = cached ? { success: true, ...cached } : await callBridge(bridge, "status", {}, extCtx);
33500
+ if (!cached) {
33501
+ bridge.cacheStatusSnapshot(response);
33502
+ }
33149
33503
  const snapshot = coerceAftStatus(response);
33150
33504
  const text = formatStatusDialogMessage(snapshot);
33151
- if (extCtx.hasUI) {
33152
- await extCtx.ui.input("AFT Status", text);
33153
- } else {
33154
- extCtx.ui.notify(text, "info");
33155
- }
33505
+ extCtx.ui.notify(text, "info");
33156
33506
  } catch (err) {
33157
33507
  const message = `AFT status failed: ${err instanceof Error ? err.message : String(err)}`;
33158
- if (extCtx.hasUI) {
33508
+ try {
33159
33509
  extCtx.ui.notify(message, "error");
33160
- } else {
33510
+ } catch {
33161
33511
  console.error(`[aft-plugin] ${message}`);
33162
33512
  }
33163
33513
  }
@@ -49690,9 +50040,12 @@ function registerConflictsTool(pi, ctx) {
49690
50040
  import { Type as Type4 } from "typebox";
49691
50041
  var DeleteParams = Type4.Object({
49692
50042
  files: Type4.Array(Type4.String(), {
49693
- description: "Paths to delete (one or more). Single-file callers pass a single-element array.",
50043
+ description: "Paths to delete (one or more). May include directories when recursive=true.",
49694
50044
  minItems: 1
49695
- })
50045
+ }),
50046
+ recursive: Type4.Optional(Type4.Boolean({
50047
+ description: "Required to delete a directory and its contents. Defaults to false; passing a directory without this returns an error."
50048
+ }))
49696
50049
  });
49697
50050
  var MoveParams = Type4.Object({
49698
50051
  filePath: Type4.String({ description: "Source file path to move" }),
@@ -49740,27 +50093,19 @@ function registerFsTools(pi, ctx, surface) {
49740
50093
  pi.registerTool({
49741
50094
  name: "aft_delete",
49742
50095
  label: "delete",
49743
- description: "Delete one or more files with backup. Each file is backed up before deletion — use `aft_safety undo` to recover any of them. " + "Returns { success, complete, deleted, skipped_files }: partial success is allowed; files that fail are reported in skipped_files.",
50096
+ description: "Delete one or more files (or directories) with backup. Each file is backed up before deletion — use `aft_safety undo` to recover any of them. " + "For directories, every file inside is individually backed up before removal. Directory deletion requires recursive: true. " + "Returns { success, complete, deleted, skipped_files }: partial success is allowed; files that fail are reported in skipped_files.",
49744
50097
  parameters: DeleteParams,
49745
50098
  async execute(_toolCallId, params, _signal, _onUpdate, extCtx) {
49746
50099
  const bridge = bridgeFor(ctx, extCtx.cwd);
49747
50100
  const sessionId = resolveSessionId(extCtx);
49748
- const deleted = [];
49749
- const skipped = [];
49750
- for (const filePath of params.files) {
49751
- const response = await bridge.send("delete_file", {
49752
- file: filePath,
49753
- ...sessionId ? { session_id: sessionId } : {}
49754
- });
49755
- if (response.success === false) {
49756
- skipped.push({
49757
- file: filePath,
49758
- reason: response.message || response.code || "delete failed"
49759
- });
49760
- } else {
49761
- deleted.push(filePath);
49762
- }
49763
- }
50101
+ const response = await bridge.send("delete_file", {
50102
+ files: params.files,
50103
+ recursive: params.recursive === true,
50104
+ ...sessionId ? { session_id: sessionId } : {}
50105
+ });
50106
+ const deletedEntries = response.deleted ?? [];
50107
+ const skipped = response.skipped_files ?? [];
50108
+ const deleted = deletedEntries.map((entry) => entry.file);
49764
50109
  if (deleted.length === 0 && skipped.length > 0) {
49765
50110
  throw new Error(`delete failed for all ${skipped.length} file(s):
49766
50111
  ` + skipped.map((entry) => ` ${entry.file}: ${entry.reason}`).join(`
@@ -51015,7 +51360,7 @@ var SafetyParams = Type11.Object({
51015
51360
  op: StringEnum6(["undo", "history", "checkpoint", "restore", "list"], {
51016
51361
  description: "Safety operation"
51017
51362
  }),
51018
- filePath: Type11.Optional(Type11.String({ description: "File path (required for undo, history)" })),
51363
+ filePath: Type11.Optional(Type11.String({ description: "File path (required for history, optional for undo)" })),
51019
51364
  name: Type11.Optional(Type11.String({ description: "Checkpoint name (required for checkpoint, restore)" })),
51020
51365
  files: Type11.Optional(Type11.Array(Type11.String(), {
51021
51366
  description: "Specific files for checkpoint (optional, defaults to all tracked)"
@@ -51026,6 +51371,12 @@ function buildSafetySections(args, payload, theme) {
51026
51371
  if (!response)
51027
51372
  return [theme.fg("muted", "No safety result.")];
51028
51373
  if (args.op === "undo") {
51374
+ if (response.operation === true) {
51375
+ return [
51376
+ `${theme.fg("success", "restored operation")} ${theme.fg("accent", asString(response.op_id) ?? "(operation)")}`,
51377
+ `${theme.fg("muted", "files")} ${asNumber(response.restored_count) ?? asRecords(response.restored).length}`
51378
+ ];
51379
+ }
51029
51380
  return [
51030
51381
  `${theme.fg("success", "restored")} ${theme.fg("accent", shortenPath(asString(response.path) ?? args.filePath ?? "(file)"))}`,
51031
51382
  `${theme.fg("muted", "backup")} ${asString(response.backup_id) ?? "—"}`
@@ -51097,10 +51448,10 @@ function registerSafetyTool(pi, ctx) {
51097
51448
  pi.registerTool({
51098
51449
  name: "aft_safety",
51099
51450
  label: "safety",
51100
- description: "File safety and recovery operations. Ops: `undo` (pop latest snapshot for a file — irreversible), `history` (list snapshots for a file), `checkpoint` (save named snapshot), `restore` (restore named checkpoint), `list` (list checkpoints). Per-file undo stack is capped at 20.",
51451
+ description: "File safety and recovery operations. Ops: `undo` (omit filePath to undo the entire last tool call; pass filePath to pop latest snapshot for one file — irreversible), `history` (list snapshots for a file), `checkpoint` (save named snapshot), `restore` (restore named checkpoint), `list` (list checkpoints). Per-file undo stack is capped at 20.",
51101
51452
  parameters: SafetyParams,
51102
51453
  async execute(_toolCallId, params, _signal, _onUpdate, extCtx) {
51103
- if ((params.op === "undo" || params.op === "history") && !params.filePath) {
51454
+ if (params.op === "history" && !params.filePath) {
51104
51455
  throw new Error(`op='${params.op}' requires 'filePath'`);
51105
51456
  }
51106
51457
  if ((params.op === "checkpoint" || params.op === "restore") && !params.name) {
@@ -51704,22 +52055,20 @@ ${lines}
51704
52055
  pluginVersion: PLUGIN_VERSION
51705
52056
  });
51706
52057
  },
51707
- onBashCompletion: (completion, bridge) => {
52058
+ onBashCompletion: (completion) => {
51708
52059
  handlePushedBgCompletion({
51709
52060
  ctx,
51710
52061
  directory: process.cwd(),
51711
52062
  sessionID: completion.session_id,
51712
- runtime: pi,
51713
- isActive: () => bridge.hasPendingRequests()
52063
+ runtime: pi
51714
52064
  }, completion);
51715
52065
  },
51716
- onBashLongRunning: (reminder, bridge) => {
52066
+ onBashLongRunning: (reminder) => {
51717
52067
  handlePushedBgLongRunning({
51718
52068
  ctx,
51719
52069
  directory: process.cwd(),
51720
52070
  sessionID: reminder.session_id,
51721
- runtime: pi,
51722
- isActive: () => bridge.hasPendingRequests()
52071
+ runtime: pi
51723
52072
  }, reminder);
51724
52073
  }
51725
52074
  };
@@ -51744,8 +52093,17 @@ ${lines}
51744
52093
  log2(`Eager configure skipped: cwd=${cwd} is the user home directory. ` + `The first real tool call will warm the correct project bridge.`);
51745
52094
  return;
51746
52095
  }
52096
+ if (onnxRuntimePromise) {
52097
+ await Promise.race([
52098
+ onnxRuntimePromise,
52099
+ new Promise((resolve5) => setTimeout(() => resolve5(null), 60000))
52100
+ ]);
52101
+ }
51747
52102
  const bridge = pool.getBridge(cwd);
51748
- await bridge.send("status", {});
52103
+ const response = await bridge.send("status", {});
52104
+ if (response.success !== false) {
52105
+ bridge.cacheStatusSnapshot(response);
52106
+ }
51749
52107
  } catch (err) {
51750
52108
  log2(`eager configure failed: ${err instanceof Error ? err.message : String(err)}`);
51751
52109
  }
@@ -1,6 +1,8 @@
1
1
  export interface AftStatusSnapshot {
2
2
  version: string;
3
3
  project_root: string | null;
4
+ canonical_root: string | null;
5
+ cache_role: string;
4
6
  features: {
5
7
  format_on_edit: boolean;
6
8
  validate_on_edit: string;
@@ -36,6 +38,14 @@ export interface AftStatusSnapshot {
36
38
  warm_entries: number;
37
39
  };
38
40
  storage_dir: string | null;
41
+ /** Total checkpoints across all sessions sharing this bridge. */
42
+ checkpoints_total: number;
43
+ /** Current session's own slice of undo/checkpoint state. */
44
+ session: {
45
+ id: string;
46
+ tracked_files: number;
47
+ checkpoints: number;
48
+ };
39
49
  }
40
50
  export declare function formatBytes(bytes: number): string;
41
51
  export declare function coerceAftStatus(response: Record<string, unknown>): AftStatusSnapshot;
@@ -1 +1 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/shared/status.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE;QACR,cAAc,EAAE,OAAO,CAAC;QACxB,gBAAgB,EAAE,MAAM,CAAC;QACzB,wBAAwB,EAAE,OAAO,CAAC;QAClC,YAAY,EAAE,OAAO,CAAC;QACtB,eAAe,EAAE,OAAO,CAAC;KAC1B,CAAC;IACF,YAAY,EAAE;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,CAAC;IACF,cAAc,EAAE;QACd,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,OAAO,EAAE,MA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M,EAAE,iBAAiB,GAAG,MAAM,CA+D3E;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAiEtE"}
@@ -32,7 +32,7 @@ export declare function buildAstReplaceSections(payload: unknown, theme: Theme):
32
32
  /** Exported for renderer unit tests. */
33
33
  export declare function renderAstCall(toolName: "ast_grep_search" | "ast_grep_replace", args: Static<typeof SearchParams> | Static<typeof ReplaceParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
34
34
  /** Exported for renderer unit tests. */
35
- export declare function renderAstResult(toolName: "ast_grep_search" | "ast_grep_replace", result: AgentToolResult<unknown>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text | import("@earendil-works/pi-tui").Container;
35
+ export declare function renderAstResult(toolName: "ast_grep_search" | "ast_grep_replace", result: AgentToolResult<unknown>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Container | import("@earendil-works/pi-tui").Text;
36
36
  export declare function registerAstTools(pi: ExtensionAPI, ctx: PluginContext, surface: AstSurface): void;
37
37
  export {};
38
38
  //# sourceMappingURL=ast.d.ts.map
@@ -11,6 +11,6 @@ export declare function buildConflictSections(text: string): string[];
11
11
  /** Exported for renderer unit tests. */
12
12
  export declare function renderConflictResult(text: string, theme: Parameters<typeof renderToolCall>[2], context: RenderContextLike): import("@earendil-works/pi-tui").Container;
13
13
  /** Exported for renderer unit tests. */
14
- export declare function renderConflictToolResult(result: Parameters<typeof renderErrorResult>[0], theme: Parameters<typeof renderToolCall>[2], context: RenderContextLike): import("@earendil-works/pi-tui").Text | import("@earendil-works/pi-tui").Container;
14
+ export declare function renderConflictToolResult(result: Parameters<typeof renderErrorResult>[0], theme: Parameters<typeof renderToolCall>[2], context: RenderContextLike): import("@earendil-works/pi-tui").Container | import("@earendil-works/pi-tui").Text;
15
15
  export declare function registerConflictsTool(pi: ExtensionAPI, ctx: PluginContext): void;
16
16
  //# sourceMappingURL=conflicts.d.ts.map
@@ -8,6 +8,7 @@ import type { PluginContext } from "../types.js";
8
8
  import { type RenderContextLike } from "./render-helpers.js";
9
9
  declare const DeleteParams: Type.TObject<{
10
10
  files: Type.TArray<Type.TString>;
11
+ recursive: Type.TOptional<Type.TBoolean>;
11
12
  }>;
12
13
  declare const MoveParams: Type.TObject<{
13
14
  filePath: Type.TString;
@@ -20,7 +21,7 @@ export interface FsSurface {
20
21
  /** Exported for renderer unit tests. */
21
22
  export declare function renderFsCall(toolName: "aft_delete" | "aft_move", args: Static<typeof DeleteParams> | Static<typeof MoveParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
22
23
  /** Exported for renderer unit tests. */
23
- export declare function renderFsResult(toolName: "aft_delete" | "aft_move", args: Static<typeof DeleteParams> | Static<typeof MoveParams>, result: AgentToolResult<unknown>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text | import("@earendil-works/pi-tui").Container;
24
+ export declare function renderFsResult(toolName: "aft_delete" | "aft_move", args: Static<typeof DeleteParams> | Static<typeof MoveParams>, result: AgentToolResult<unknown>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Container | import("@earendil-works/pi-tui").Text;
24
25
  export declare function registerFsTools(pi: ExtensionAPI, ctx: PluginContext, surface: FsSurface): void;
25
26
  export {};
26
27
  //# sourceMappingURL=fs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/tools/fs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAEL,KAAK,iBAAiB,EAKvB,MAAM,qBAAqB,CAAC;AAE7B,QAAA,MAAM,YAAY;;EAKhB,CAAC;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C;CACf;AAED,wCAAwC;AACxC,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,YAAY,GAAG,UAAU,EACnC,IAAI,EAAE,MAAM,CAAC,OAAO,YAAY,CAAC,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,EAC7D,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,yCAkB3B;AAED,wCAAwC;AACxC,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,YAAY,GAAG,UAAU,EACnC,IAAI,EAAE,MAAM,CAAC,OAAO,YAAY,CAAC,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,EAC7D,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,sFAsC3B;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,GAAG,IAAI,CA4F9F"}
@@ -21,7 +21,7 @@ export declare function buildImportSections(args: Static<typeof ImportParams>, p
21
21
  /** Exported for renderer unit tests. */
22
22
  export declare function renderImportCall(args: Static<typeof ImportParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
23
23
  /** Exported for renderer unit tests. */
24
- export declare function renderImportResult(result: AgentToolResult<unknown>, args: Static<typeof ImportParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text | import("@earendil-works/pi-tui").Container;
24
+ export declare function renderImportResult(result: AgentToolResult<unknown>, args: Static<typeof ImportParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Container | import("@earendil-works/pi-tui").Text;
25
25
  export declare function registerImportTools(pi: ExtensionAPI, ctx: PluginContext): void;
26
26
  export {};
27
27
  //# sourceMappingURL=imports.d.ts.map
@@ -18,7 +18,7 @@ export declare function buildDiagnosticsSections(payload: unknown, theme: Theme)
18
18
  /** Exported for renderer unit tests. */
19
19
  export declare function renderDiagnosticsCall(args: Static<typeof LspDiagnosticsParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
20
20
  /** Exported for renderer unit tests. */
21
- export declare function renderDiagnosticsResult(result: AgentToolResult<unknown>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text | import("@earendil-works/pi-tui").Container;
21
+ export declare function renderDiagnosticsResult(result: AgentToolResult<unknown>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Container | import("@earendil-works/pi-tui").Text;
22
22
  export declare function registerLspTools(pi: ExtensionAPI, ctx: PluginContext): void;
23
23
  export {};
24
24
  //# sourceMappingURL=lsp.d.ts.map
@@ -19,7 +19,7 @@ export declare function buildNavigateSections(args: NavigateArgs, payload: unkno
19
19
  /** Exported for renderer unit tests. */
20
20
  export declare function renderNavigateCall(args: NavigateArgs, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
21
21
  /** Exported for renderer unit tests. */
22
- export declare function renderNavigateResult(result: AgentToolResult<unknown>, args: NavigateArgs, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text | import("@earendil-works/pi-tui").Container;
22
+ export declare function renderNavigateResult(result: AgentToolResult<unknown>, args: NavigateArgs, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Container | import("@earendil-works/pi-tui").Text;
23
23
  export declare function registerNavigateTool(pi: ExtensionAPI, ctx: PluginContext): void;
24
24
  export {};
25
25
  //# sourceMappingURL=navigate.d.ts.map
@@ -38,11 +38,11 @@ export declare function buildZoomSections(args: Static<typeof ZoomParams>, paylo
38
38
  /** Exported for renderer unit tests. */
39
39
  export declare function renderOutlineCall(args: Static<typeof OutlineParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
40
40
  /** Exported for renderer unit tests. */
41
- export declare function renderOutlineResult(result: AgentToolResult<unknown>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text | import("@earendil-works/pi-tui").Container;
41
+ export declare function renderOutlineResult(result: AgentToolResult<unknown>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Container | import("@earendil-works/pi-tui").Text;
42
42
  /** Exported for renderer unit tests. */
43
43
  export declare function renderZoomCall(args: Static<typeof ZoomParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
44
44
  /** Exported for renderer unit tests. */
45
- export declare function renderZoomResult(result: AgentToolResult<unknown>, args: Static<typeof ZoomParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text | import("@earendil-works/pi-tui").Container;
45
+ export declare function renderZoomResult(result: AgentToolResult<unknown>, args: Static<typeof ZoomParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Container | import("@earendil-works/pi-tui").Text;
46
46
  export declare function registerReadingTools(pi: ExtensionAPI, ctx: PluginContext, surface: ReadingSurface): void;
47
47
  /**
48
48
  * Format multi-symbol zoom results as plain text. Successful entries use
@@ -22,7 +22,7 @@ export declare function buildRefactorSections(args: Static<typeof RefactorParams
22
22
  /** Exported for renderer unit tests. */
23
23
  export declare function renderRefactorCall(args: Static<typeof RefactorParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
24
24
  /** Exported for renderer unit tests. */
25
- export declare function renderRefactorResult(result: AgentToolResult<unknown>, args: Static<typeof RefactorParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text | import("@earendil-works/pi-tui").Container;
25
+ export declare function renderRefactorResult(result: AgentToolResult<unknown>, args: Static<typeof RefactorParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Container | import("@earendil-works/pi-tui").Text;
26
26
  export declare function registerRefactorTool(pi: ExtensionAPI, ctx: PluginContext): void;
27
27
  export {};
28
28
  //# sourceMappingURL=refactor.d.ts.map
@@ -1,5 +1,5 @@
1
1
  /**
2
- * aft_safety — per-file undo, named checkpoints, restore, list, history.
2
+ * aft_safety — operation undo, per-file history, named checkpoints, restore, list.
3
3
  */
4
4
  import type { AgentToolResult, ExtensionAPI, Theme } from "@earendil-works/pi-coding-agent";
5
5
  import { type Static, Type } from "typebox";
@@ -16,7 +16,7 @@ export declare function buildSafetySections(args: Static<typeof SafetyParams>, p
16
16
  /** Exported for renderer unit tests. */
17
17
  export declare function renderSafetyCall(args: Static<typeof SafetyParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
18
18
  /** Exported for renderer unit tests. */
19
- export declare function renderSafetyResult(result: AgentToolResult<unknown>, args: Static<typeof SafetyParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text | import("@earendil-works/pi-tui").Container;
19
+ export declare function renderSafetyResult(result: AgentToolResult<unknown>, args: Static<typeof SafetyParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Container | import("@earendil-works/pi-tui").Text;
20
20
  export declare function registerSafetyTool(pi: ExtensionAPI, ctx: PluginContext): void;
21
21
  export {};
22
22
  //# sourceMappingURL=safety.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"safety.d.ts","sourceRoot":"","sources":["../../src/tools/safety.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAQL,KAAK,iBAAiB,EAKvB,MAAM,qBAAqB,CAAC;AAE7B,QAAA,MAAM,YAAY;;;;;EAahB,CAAC;AAEH,wCAAwC;AACxC,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,CAAC,OAAO,YAAY,CAAC,EACjC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,GACX,MAAM,EAAE,CAsEV;AAED,wCAAwC;AACxC,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,CAAC,OAAO,YAAY,CAAC,EACjC,KAAK,EAAE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,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CAwD7E"}
@@ -16,7 +16,7 @@ export declare function buildSemanticSections(args: Static<typeof SearchParams>,
16
16
  /** Exported for renderer unit tests. */
17
17
  export declare function renderSemanticCall(args: Static<typeof SearchParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
18
18
  /** Exported for renderer unit tests. */
19
- export declare function renderSemanticResult(result: AgentToolResult<unknown>, args: Static<typeof SearchParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text | import("@earendil-works/pi-tui").Container;
19
+ export declare function renderSemanticResult(result: AgentToolResult<unknown>, args: Static<typeof SearchParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Container | import("@earendil-works/pi-tui").Text;
20
20
  export declare function registerSemanticTool(pi: ExtensionAPI, ctx: PluginContext): void;
21
21
  export {};
22
22
  //# sourceMappingURL=semantic.d.ts.map
@@ -26,7 +26,7 @@ export declare function buildTransformSections(args: Static<typeof TransformPara
26
26
  /** Exported for renderer unit tests. */
27
27
  export declare function renderTransformCall(args: Static<typeof TransformParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text;
28
28
  /** Exported for renderer unit tests. */
29
- export declare function renderTransformResult(result: AgentToolResult<unknown>, args: Static<typeof TransformParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text | import("@earendil-works/pi-tui").Container;
29
+ export declare function renderTransformResult(result: AgentToolResult<unknown>, args: Static<typeof TransformParams>, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Container | import("@earendil-works/pi-tui").Text;
30
30
  export declare function registerStructureTool(pi: ExtensionAPI, ctx: PluginContext): void;
31
31
  export {};
32
32
  //# sourceMappingURL=structure.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/aft-pi",
3
- "version": "0.23.0",
3
+ "version": "0.25.0",
4
4
  "type": "module",
5
5
  "description": "Pi coding agent extension for Agent File Tools (AFT) — tree-sitter and LSP-powered code analysis",
6
6
  "main": "dist/index.js",
@@ -22,18 +22,18 @@
22
22
  "prepublishOnly": "bun run build"
23
23
  },
24
24
  "dependencies": {
25
- "@cortexkit/aft-bridge": "0.23.0",
25
+ "@cortexkit/aft-bridge": "0.25.0",
26
26
  "typebox": "^1.1.24",
27
27
  "comment-json": "^5.0.0",
28
28
  "diff": "^8.0.4",
29
29
  "zod": "^4.1.8"
30
30
  },
31
31
  "optionalDependencies": {
32
- "@cortexkit/aft-darwin-arm64": "0.23.0",
33
- "@cortexkit/aft-darwin-x64": "0.23.0",
34
- "@cortexkit/aft-linux-arm64": "0.23.0",
35
- "@cortexkit/aft-linux-x64": "0.23.0",
36
- "@cortexkit/aft-win32-x64": "0.23.0"
32
+ "@cortexkit/aft-darwin-arm64": "0.25.0",
33
+ "@cortexkit/aft-darwin-x64": "0.25.0",
34
+ "@cortexkit/aft-linux-arm64": "0.25.0",
35
+ "@cortexkit/aft-linux-x64": "0.25.0",
36
+ "@cortexkit/aft-win32-x64": "0.25.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@earendil-works/pi-coding-agent": "*",