@grepai/cli 0.8.2 → 0.8.4
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/index.js +33 -27
- package/index.js.map +9 -9
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -89567,7 +89567,7 @@ var GrepAiConfig = Struct({
|
|
|
89567
89567
|
description: "Database backend for storing chunks and embeddings"
|
|
89568
89568
|
})),
|
|
89569
89569
|
experimental__agentFs: Struct({
|
|
89570
|
-
syncMode: Literal2("push", "pull").pipe(optional
|
|
89570
|
+
syncMode: Literal2("push", "pull").pipe(optional),
|
|
89571
89571
|
url: String$,
|
|
89572
89572
|
authToken: String$
|
|
89573
89573
|
}).pipe(optional)
|
|
@@ -92523,26 +92523,19 @@ class AgentFs extends Service()("@grepai/core/internal/services/agentfs", {
|
|
|
92523
92523
|
const { authToken, url: url3, syncMode } = config3.experimental__agentFs;
|
|
92524
92524
|
const baseAgentFsLocalPath = path4.resolve(config3.cwd, `./.grepai/${config3.project}/agentfs`);
|
|
92525
92525
|
yield* fs2.makeDirectory(baseAgentFsLocalPath, { recursive: true });
|
|
92526
|
-
const db = yield*
|
|
92527
|
-
|
|
92528
|
-
|
|
92529
|
-
|
|
92530
|
-
|
|
92531
|
-
|
|
92532
|
-
clientName: "grepai"
|
|
92533
|
-
}),
|
|
92534
|
-
catch: (cause2) => new AgentFsError({ cause: cause2 })
|
|
92526
|
+
const db = yield* tryPromise2({
|
|
92527
|
+
try: () => connect({
|
|
92528
|
+
path: path4.join(baseAgentFsLocalPath, "local.db"),
|
|
92529
|
+
url: () => syncMode ? url3 : null,
|
|
92530
|
+
authToken,
|
|
92531
|
+
clientName: "grepai"
|
|
92535
92532
|
}),
|
|
92536
|
-
|
|
92537
|
-
|
|
92538
|
-
|
|
92539
|
-
|
|
92540
|
-
|
|
92541
|
-
|
|
92542
|
-
}),
|
|
92543
|
-
catch: (cause2) => new AgentFsError({ cause: cause2 })
|
|
92544
|
-
})
|
|
92545
|
-
]);
|
|
92533
|
+
catch: (cause2) => new AgentFsError({ cause: cause2 })
|
|
92534
|
+
}).pipe(retry({
|
|
92535
|
+
while: (error51) => error51.message.includes("File is locked by another process"),
|
|
92536
|
+
times: 10,
|
|
92537
|
+
schedule: exponential3("50 millis")
|
|
92538
|
+
}));
|
|
92546
92539
|
const agentFs = yield* tryPromise2({
|
|
92547
92540
|
try: () => AgentFS2.openWith(db),
|
|
92548
92541
|
catch: (cause2) => new AgentFsError({ cause: cause2 })
|
|
@@ -109292,13 +109285,13 @@ class Indexer extends Service()("@grepai/core/internal/services/indexer", {
|
|
|
109292
109285
|
filePath,
|
|
109293
109286
|
fileCount: filesToClean.length
|
|
109294
109287
|
}))), {
|
|
109295
|
-
concurrency: value5(config3.storage.type).pipe(when5("turso", () => 1), when5("postgres", () => 100), when5("lancedb", () =>
|
|
109288
|
+
concurrency: value5(config3.storage.type).pipe(when5("turso", () => 1), when5("postgres", () => 100), when5("lancedb", () => 15), exhaustive2)
|
|
109296
109289
|
});
|
|
109297
109290
|
yield* forEach5(filesToIndex, (file8) => fileIndexer.index(file8).pipe(tap2(() => onFileIndexed({
|
|
109298
109291
|
filePath: file8.filePath,
|
|
109299
109292
|
fileCount: filesToIndex.length
|
|
109300
109293
|
}))), {
|
|
109301
|
-
concurrency: value5(config3.storage.type).pipe(when5("turso", () => 1), when5("postgres", () => 100), when5("lancedb", () =>
|
|
109294
|
+
concurrency: value5(config3.storage.type).pipe(when5("turso", () => 1), when5("postgres", () => 100), when5("lancedb", () => 15), exhaustive2)
|
|
109302
109295
|
});
|
|
109303
109296
|
yield* onFinished();
|
|
109304
109297
|
});
|
|
@@ -116767,7 +116760,7 @@ class CommandUtils extends Service()("@grepai/cli-dev/internal/services/command-
|
|
|
116767
116760
|
}
|
|
116768
116761
|
|
|
116769
116762
|
// src/internal/services/config-json.ts
|
|
116770
|
-
function layer24(project2) {
|
|
116763
|
+
function layer24(project2, experimental__agentFsSync = false) {
|
|
116771
116764
|
return effect(Config, gen2(function* () {
|
|
116772
116765
|
const fs2 = yield* exports_FileSystem.FileSystem;
|
|
116773
116766
|
const path4 = yield* exports_Path.Path;
|
|
@@ -116781,7 +116774,19 @@ function layer24(project2) {
|
|
|
116781
116774
|
...config3,
|
|
116782
116775
|
project: project2 ?? "default",
|
|
116783
116776
|
cwd
|
|
116784
|
-
})),
|
|
116777
|
+
})), map16((config3) => {
|
|
116778
|
+
const agentFsConfig = config3.experimental__agentFs;
|
|
116779
|
+
if (agentFsConfig) {
|
|
116780
|
+
return {
|
|
116781
|
+
...config3,
|
|
116782
|
+
experimental__agentFs: {
|
|
116783
|
+
...agentFsConfig,
|
|
116784
|
+
syncMode: experimental__agentFsSync ? agentFsConfig.syncMode : undefined
|
|
116785
|
+
}
|
|
116786
|
+
};
|
|
116787
|
+
}
|
|
116788
|
+
return config3;
|
|
116789
|
+
}), catchTags2({
|
|
116785
116790
|
ParseError: (cause2) => new ConfigLoaderError({ cause: cause2 }),
|
|
116786
116791
|
BadArgument: (cause2) => new ConfigLoaderError({ cause: cause2 }),
|
|
116787
116792
|
SystemError: (cause2) => new ConfigLoaderError({ cause: cause2 })
|
|
@@ -116803,6 +116808,7 @@ function interpolateEnvVars(content) {
|
|
|
116803
116808
|
|
|
116804
116809
|
// src/internal/command-runtime.ts
|
|
116805
116810
|
var layer25 = (project2) => mergeAll5(GrepAi.Default, CommandUtils.Default, Clack.Default).pipe(provideMerge2(layer24(project2)));
|
|
116811
|
+
var grepaiIndexLayer = (project2) => mergeAll5(GrepAi.Default, CommandUtils.Default, Clack.Default).pipe(provideMerge2(layer24(project2, true)));
|
|
116806
116812
|
|
|
116807
116813
|
// src/internal/services/project-scanner.ts
|
|
116808
116814
|
class ProjectNotFound extends TaggedError2()("ProjectNotFound", {}) {
|
|
@@ -116870,7 +116876,7 @@ var IndexCommand = gen2(function* () {
|
|
|
116870
116876
|
},
|
|
116871
116877
|
onFinished: () => clack.spinner.stop("Codebase indexed").pipe(zipRight3(clack.outro("DONE!")))
|
|
116872
116878
|
});
|
|
116873
|
-
}, (effect3, { project: project2 }) => effect3.pipe(provide2(
|
|
116879
|
+
}, (effect3, { project: project2 }) => effect3.pipe(provide2(grepaiIndexLayer(project2))))));
|
|
116874
116880
|
});
|
|
116875
116881
|
|
|
116876
116882
|
// src/internal/commands/glob.ts
|
|
@@ -116955,11 +116961,11 @@ var program = gen2(function* () {
|
|
|
116955
116961
|
const command = exports_Command.make("grepai").pipe(exports_Command.withSubcommands(subcommands));
|
|
116956
116962
|
const cli = exports_Command.run(command, {
|
|
116957
116963
|
name: "GREP AI",
|
|
116958
|
-
version: "v0.8.
|
|
116964
|
+
version: "v0.8.4"
|
|
116959
116965
|
});
|
|
116960
116966
|
yield* cli(process.argv);
|
|
116961
116967
|
});
|
|
116962
116968
|
program.pipe(provide2(ProjectScanner.Default.pipe(provideMerge2(exports_BunContext.layer))), exports_BunRuntime.runMain);
|
|
116963
116969
|
|
|
116964
|
-
//# debugId=
|
|
116970
|
+
//# debugId=BD6B4F3B76E405E164756E2164756E21
|
|
116965
116971
|
//# sourceMappingURL=index.js.map
|