@cortexkit/aft 0.52.2 → 0.53.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.
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Run the native finite snapshot command. The npm CLI deliberately forwards no
3
+ * root or index-selection behavior of its own; the Rust command validates that
4
+ * `aft index` remains bare and schedules no future work.
5
+ */
6
+ export declare function runIndex(argv: string[]): number;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAkB/C"}
package/dist/index.js CHANGED
@@ -2135,7 +2135,7 @@ function stripHarnessSpecificConfigKeys(value, keys) {
2135
2135
  }
2136
2136
  var OPENCODE_ONLY_KEYS, PI_ONLY_KEYS;
2137
2137
  var init_config_keys = __esm(() => {
2138
- OPENCODE_ONLY_KEYS = ["hoist_builtin_tools", "auto_update"];
2138
+ OPENCODE_ONLY_KEYS = ["auto_update"];
2139
2139
  PI_ONLY_KEYS = [];
2140
2140
  });
2141
2141
 
@@ -19340,6 +19340,32 @@ var init_setup = __esm(() => {
19340
19340
  init_prompts();
19341
19341
  });
19342
19342
 
19343
+ // src/commands/index.ts
19344
+ var exports_commands = {};
19345
+ __export(exports_commands, {
19346
+ runIndex: () => runIndex
19347
+ });
19348
+ import { spawnSync as spawnSync5 } from "node:child_process";
19349
+ function runIndex(argv) {
19350
+ const binary = findAftBinary();
19351
+ if (!binary) {
19352
+ console.error("aft index requires a native AFT binary; run `aft doctor` to install or repair it.");
19353
+ return 1;
19354
+ }
19355
+ const result = spawnSync5(binary, ["index", ...argv], {
19356
+ stdio: "inherit",
19357
+ env: process.env
19358
+ });
19359
+ if (result.error) {
19360
+ console.error(`aft index failed to start ${binary}: ${result.error.message}`);
19361
+ return 1;
19362
+ }
19363
+ return result.status ?? 1;
19364
+ }
19365
+ var init_commands = __esm(async () => {
19366
+ await init_binary_probe();
19367
+ });
19368
+
19343
19369
  // src/lib/aft-bridge.ts
19344
19370
  import { spawn as spawn3 } from "node:child_process";
19345
19371
  function isResponseForRequest(parsed, expectedIds) {
@@ -21077,7 +21103,7 @@ var init_diagnostics = __esm(async () => {
21077
21103
  });
21078
21104
 
21079
21105
  // src/lib/github.ts
21080
- import { execSync as execSync5, spawnSync as spawnSync5 } from "node:child_process";
21106
+ import { execSync as execSync5, spawnSync as spawnSync6 } from "node:child_process";
21081
21107
  function isGhInstalled() {
21082
21108
  try {
21083
21109
  execSync5("gh --version", { stdio: "ignore" });
@@ -21093,14 +21119,14 @@ function openBrowser(url) {
21093
21119
  const commands = getOpenBrowserCommand(url);
21094
21120
  try {
21095
21121
  const [cmd, args] = commands;
21096
- spawnSync5(cmd, args, { stdio: "ignore" });
21122
+ spawnSync6(cmd, args, { stdio: "ignore" });
21097
21123
  } catch {}
21098
21124
  }
21099
21125
  function createGitHubIssue(repo, title, body) {
21100
21126
  if (!isGhInstalled()) {
21101
21127
  return { url: null, stderr: "gh CLI not installed" };
21102
21128
  }
21103
- const result = spawnSync5("gh", ["issue", "create", "--repo", repo, "--title", title, "--body-file", "-"], {
21129
+ const result = spawnSync6("gh", ["issue", "create", "--repo", repo, "--title", title, "--body-file", "-"], {
21104
21130
  input: body,
21105
21131
  encoding: "utf-8",
21106
21132
  stdio: ["pipe", "pipe", "pipe"]
@@ -22521,6 +22547,7 @@ function printHelp() {
22521
22547
  console.log(" Commands:");
22522
22548
  console.log(" --version Show CLI, binary, and per-harness plugin versions");
22523
22549
  console.log(" setup Interactive setup wizard");
22550
+ console.log(" index Build one configured index snapshot (no scheduler)");
22524
22551
  console.log(" doctor Check and fix configuration issues");
22525
22552
  console.log(" doctor lsp <file> Inspect LSP setup for one file");
22526
22553
  console.log(" doctor --fix Auto-fix common issues (e.g. ONNX Runtime mismatch)");
@@ -22535,6 +22562,7 @@ function printHelp() {
22535
22562
  console.log("");
22536
22563
  console.log(" Usage:");
22537
22564
  console.log(` ${CLI} setup`);
22565
+ console.log(` ${CLI} index`);
22538
22566
  console.log(` ${CLI} doctor`);
22539
22567
  console.log(` ${CLI} doctor lsp ./src/main.py`);
22540
22568
  console.log(` ${CLI} doctor --clear`);
@@ -22551,6 +22579,10 @@ async function main() {
22551
22579
  const { runSetup: runSetup2 } = await Promise.resolve().then(() => (init_setup(), exports_setup));
22552
22580
  return runSetup2(args);
22553
22581
  }
22582
+ if (command === "index") {
22583
+ const { runIndex: runIndex2 } = await init_commands().then(() => exports_commands);
22584
+ return runIndex2(args);
22585
+ }
22554
22586
  if (command === "doctor") {
22555
22587
  if (args[0] === "lsp") {
22556
22588
  const { runLspDoctor: runLspDoctor2 } = await init_lsp().then(() => exports_lsp);
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@cortexkit/aft",
3
- "version": "0.52.2",
3
+ "version": "0.53.0",
4
4
  "type": "module",
5
- "description": "Unified CLI for Agent File Tools (AFT) — setup, doctor, and diagnostics across supported agent harnesses (OpenCode, Pi)",
5
+ "description": "Unified CLI for Agent File Tools (AFT) — setup, one-shot index snapshots, doctor, and diagnostics across supported agent harnesses (OpenCode, Pi)",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@clack/prompts": "^1.6.0",
27
- "@cortexkit/aft-bridge": "0.52.2",
27
+ "@cortexkit/aft-bridge": "0.53.0",
28
28
  "comment-json": "^4.6.2"
29
29
  },
30
30
  "devDependencies": {