@aria-cli/tools 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.aria-build-stamp.json +1 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/definitions/code-intelligence.d.ts +9 -0
- package/dist/definitions/code-intelligence.d.ts.map +1 -0
- package/dist/definitions/code-intelligence.js +471 -0
- package/dist/definitions/code-intelligence.js.map +1 -0
- package/dist/definitions/core.d.ts +3 -0
- package/dist/definitions/core.d.ts.map +1 -1
- package/dist/definitions/core.js +13 -1
- package/dist/definitions/core.js.map +1 -1
- package/dist/definitions/filesystem.d.ts +3 -2
- package/dist/definitions/filesystem.d.ts.map +1 -1
- package/dist/definitions/filesystem.js +4 -38
- package/dist/definitions/filesystem.js.map +1 -1
- package/dist/definitions/frg.d.ts +4 -0
- package/dist/definitions/frg.d.ts.map +1 -0
- package/dist/definitions/frg.js +64 -0
- package/dist/definitions/frg.js.map +1 -0
- package/dist/definitions/index.d.ts +3 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/index.js +3 -0
- package/dist/definitions/index.js.map +1 -1
- package/dist/definitions/search.d.ts +10 -0
- package/dist/definitions/search.d.ts.map +1 -0
- package/dist/definitions/search.js +61 -0
- package/dist/definitions/search.js.map +1 -0
- package/dist/executors/apply-patch.d.ts.map +1 -1
- package/dist/executors/apply-patch.js +18 -0
- package/dist/executors/apply-patch.js.map +1 -1
- package/dist/executors/code-intelligence.d.ts +139 -0
- package/dist/executors/code-intelligence.d.ts.map +1 -0
- package/dist/executors/code-intelligence.js +883 -0
- package/dist/executors/code-intelligence.js.map +1 -0
- package/dist/executors/filesystem.d.ts.map +1 -1
- package/dist/executors/filesystem.js +14 -8
- package/dist/executors/filesystem.js.map +1 -1
- package/dist/executors/frg-freshness.d.ts +94 -0
- package/dist/executors/frg-freshness.d.ts.map +1 -0
- package/dist/executors/frg-freshness.js +577 -0
- package/dist/executors/frg-freshness.js.map +1 -0
- package/dist/executors/frg.d.ts +28 -0
- package/dist/executors/frg.d.ts.map +1 -0
- package/dist/executors/frg.js +299 -0
- package/dist/executors/frg.js.map +1 -0
- package/dist/executors/index.d.ts +6 -0
- package/dist/executors/index.d.ts.map +1 -1
- package/dist/executors/index.js +5 -0
- package/dist/executors/index.js.map +1 -1
- package/dist/executors/lsp-client.d.ts +39 -0
- package/dist/executors/lsp-client.d.ts.map +1 -0
- package/dist/executors/lsp-client.js +297 -0
- package/dist/executors/lsp-client.js.map +1 -0
- package/dist/executors/restart.d.ts +4 -9
- package/dist/executors/restart.d.ts.map +1 -1
- package/dist/executors/restart.js +20 -51
- package/dist/executors/restart.js.map +1 -1
- package/dist/executors/search-freshness.d.ts +51 -0
- package/dist/executors/search-freshness.d.ts.map +1 -0
- package/dist/executors/search-freshness.js +196 -0
- package/dist/executors/search-freshness.js.map +1 -0
- package/dist/executors/search.d.ts +12 -0
- package/dist/executors/search.d.ts.map +1 -0
- package/dist/executors/search.js +67 -0
- package/dist/executors/search.js.map +1 -0
- package/dist/headless-control-contract.d.ts +4 -0
- package/dist/headless-control-contract.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/network-runtime/local-control-contract.d.ts +2 -0
- package/dist/network-runtime/local-control-contract.d.ts.map +1 -1
- package/dist/network-runtime/local-control-contract.js +2 -0
- package/dist/network-runtime/local-control-contract.js.map +1 -1
- package/dist-cjs/.tsbuildinfo +1 -1
- package/dist-cjs/definitions/code-intelligence.d.ts +8 -0
- package/dist-cjs/definitions/code-intelligence.js +474 -0
- package/dist-cjs/definitions/code-intelligence.js.map +1 -0
- package/dist-cjs/definitions/core.d.ts +3 -0
- package/dist-cjs/definitions/core.js +17 -2
- package/dist-cjs/definitions/core.js.map +1 -1
- package/dist-cjs/definitions/filesystem.d.ts +3 -2
- package/dist-cjs/definitions/filesystem.js +3 -37
- package/dist-cjs/definitions/filesystem.js.map +1 -1
- package/dist-cjs/definitions/frg.d.ts +3 -0
- package/dist-cjs/definitions/frg.js +67 -0
- package/dist-cjs/definitions/frg.js.map +1 -0
- package/dist-cjs/definitions/index.d.ts +3 -0
- package/dist-cjs/definitions/index.js +7 -1
- package/dist-cjs/definitions/index.js.map +1 -1
- package/dist-cjs/definitions/search.d.ts +9 -0
- package/dist-cjs/definitions/search.js +64 -0
- package/dist-cjs/definitions/search.js.map +1 -0
- package/dist-cjs/executors/apply-patch.js +18 -0
- package/dist-cjs/executors/apply-patch.js.map +1 -1
- package/dist-cjs/executors/code-intelligence.d.ts +138 -0
- package/dist-cjs/executors/code-intelligence.js +926 -0
- package/dist-cjs/executors/code-intelligence.js.map +1 -0
- package/dist-cjs/executors/filesystem.js +17 -8
- package/dist-cjs/executors/filesystem.js.map +1 -1
- package/dist-cjs/executors/frg-freshness.d.ts +93 -0
- package/dist-cjs/executors/frg-freshness.js +628 -0
- package/dist-cjs/executors/frg-freshness.js.map +1 -0
- package/dist-cjs/executors/frg.d.ts +27 -0
- package/dist-cjs/executors/frg.js +335 -0
- package/dist-cjs/executors/frg.js.map +1 -0
- package/dist-cjs/executors/index.d.ts +6 -0
- package/dist-cjs/executors/index.js +34 -2
- package/dist-cjs/executors/index.js.map +1 -1
- package/dist-cjs/executors/lsp-client.d.ts +38 -0
- package/dist-cjs/executors/lsp-client.js +311 -0
- package/dist-cjs/executors/lsp-client.js.map +1 -0
- package/dist-cjs/executors/restart.d.ts +4 -9
- package/dist-cjs/executors/restart.js +19 -50
- package/dist-cjs/executors/restart.js.map +1 -1
- package/dist-cjs/executors/search-freshness.d.ts +50 -0
- package/dist-cjs/executors/search-freshness.js +235 -0
- package/dist-cjs/executors/search-freshness.js.map +1 -0
- package/dist-cjs/executors/search.d.ts +11 -0
- package/dist-cjs/executors/search.js +103 -0
- package/dist-cjs/executors/search.js.map +1 -0
- package/dist-cjs/headless-control-contract.d.ts +15 -11
- package/dist-cjs/index.d.ts +2 -2
- package/dist-cjs/index.js +22 -2
- package/dist-cjs/index.js.map +1 -1
- package/dist-cjs/network-runtime/local-control-contract.d.ts +2 -0
- package/dist-cjs/network-runtime/local-control-contract.js +2 -0
- package/dist-cjs/network-runtime/local-control-contract.js.map +1 -1
- package/package.json +9 -5
- package/src/definitions/code-intelligence.ts +526 -0
- package/src/definitions/core.ts +13 -1
- package/src/definitions/filesystem.ts +3 -39
- package/src/definitions/frg.ts +67 -0
- package/src/definitions/index.ts +3 -0
- package/src/definitions/search.ts +67 -0
- package/src/executors/apply-patch.ts +20 -0
- package/src/executors/code-intelligence.ts +1179 -0
- package/src/executors/filesystem.ts +15 -8
- package/src/executors/frg-freshness.ts +743 -0
- package/src/executors/frg.ts +394 -0
- package/src/executors/index.ts +58 -0
- package/src/executors/lsp-client.ts +355 -0
- package/src/executors/restart.ts +21 -56
- package/src/executors/search-freshness.ts +249 -0
- package/src/executors/search.ts +89 -0
- package/src/index.ts +25 -0
- package/src/network-runtime/local-control-contract.ts +2 -0
- package/tests/definitions/tool-inventory.test.ts +17 -6
- package/tests/executors/frg-freshness.test.ts +136 -0
- package/tests/executors/frg-merge.test.ts +70 -0
- package/tests/executors/frg-session-content.test.ts +40 -0
- package/tests/executors/frg.test.ts +56 -0
- package/tests/integration/headless-control-contract.integration.test.ts +2 -0
- package/tests/loading-tier.test.ts +6 -6
- package/tests/test-lane-manifest.ts +4 -0
- package/tsconfig.cjs.json +9 -1
- package/tsconfig.json +1 -1
|
@@ -10,9 +10,11 @@ import * as nodePath from "node:path";
|
|
|
10
10
|
import * as crypto from "node:crypto";
|
|
11
11
|
import * as readline from "node:readline";
|
|
12
12
|
import { structuredPatch as computePatch } from "diff";
|
|
13
|
-
import
|
|
13
|
+
import fastGlob from "fast-glob";
|
|
14
14
|
import type { ToolContext, ToolResult } from "../types.js";
|
|
15
15
|
import { success, fail, getErrorMessage, isPathWithinBase } from "./utils.js";
|
|
16
|
+
import { recordFrgMutation } from "./frg-freshness.js";
|
|
17
|
+
import { recordSearchMutation } from "./search-freshness.js";
|
|
16
18
|
|
|
17
19
|
/** Media file extensions for binary reading */
|
|
18
20
|
const MEDIA_EXTENSIONS = new Set([
|
|
@@ -684,6 +686,9 @@ export async function executeWriteFile(
|
|
|
684
686
|
structuredPatchData = patch.hunks;
|
|
685
687
|
}
|
|
686
688
|
|
|
689
|
+
recordFrgMutation(filePath, "write", currentContent);
|
|
690
|
+
recordSearchMutation(filePath, "write", currentContent);
|
|
691
|
+
|
|
687
692
|
return success(`Successfully ${action} ${filePath} (${bytesWritten} bytes written)`, {
|
|
688
693
|
filePath,
|
|
689
694
|
action,
|
|
@@ -800,6 +805,8 @@ export async function executeEditFile(input: EditFileInput, ctx: ToolContext): P
|
|
|
800
805
|
}
|
|
801
806
|
|
|
802
807
|
await fs.writeFile(filePath, updated, "utf-8");
|
|
808
|
+
recordFrgMutation(filePath, "write", updated);
|
|
809
|
+
recordSearchMutation(filePath, "write", updated);
|
|
803
810
|
|
|
804
811
|
return success(
|
|
805
812
|
`Edited ${filePath} using strategy=${selected.name} (${replacements} replacement(s))`,
|
|
@@ -958,12 +965,12 @@ export async function executeLs(input: ListDirInput, ctx: ToolContext): Promise<
|
|
|
958
965
|
const retainedRelativePaths: string[] = [];
|
|
959
966
|
let total = 0;
|
|
960
967
|
|
|
961
|
-
for
|
|
968
|
+
for (const relativePath of await fastGlob.glob("**/*", {
|
|
962
969
|
cwd: dirPath,
|
|
963
|
-
|
|
970
|
+
onlyFiles: false,
|
|
964
971
|
absolute: false,
|
|
965
972
|
dot: includeAll,
|
|
966
|
-
|
|
973
|
+
deep: depth,
|
|
967
974
|
ignore: ignore.length > 0 ? ignore : undefined,
|
|
968
975
|
})) {
|
|
969
976
|
total++;
|
|
@@ -1074,9 +1081,9 @@ export async function executeGlob(input: GlobInput, ctx: ToolContext): Promise<T
|
|
|
1074
1081
|
try {
|
|
1075
1082
|
const cwd = input.cwd ? resolvePath(input.cwd, ctx) : ctx.workingDir;
|
|
1076
1083
|
|
|
1077
|
-
const files = await glob(input.pattern, {
|
|
1084
|
+
const files = await fastGlob.glob(input.pattern, {
|
|
1078
1085
|
cwd,
|
|
1079
|
-
|
|
1086
|
+
onlyFiles: true,
|
|
1080
1087
|
absolute: false,
|
|
1081
1088
|
ignore: input.ignore,
|
|
1082
1089
|
});
|
|
@@ -1281,9 +1288,9 @@ export async function executeGrep(input: GrepInput, ctx: ToolContext): Promise<T
|
|
|
1281
1288
|
if (stat.isDirectory()) {
|
|
1282
1289
|
// Search in directory
|
|
1283
1290
|
const globPattern = input.glob ?? "**/*";
|
|
1284
|
-
const files = await glob(globPattern, {
|
|
1291
|
+
const files = await fastGlob.glob(globPattern, {
|
|
1285
1292
|
cwd: targetPath,
|
|
1286
|
-
|
|
1293
|
+
onlyFiles: true,
|
|
1287
1294
|
absolute: true,
|
|
1288
1295
|
});
|
|
1289
1296
|
|