@grepai/cli 0.8.2 → 0.8.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.
Files changed (3) hide show
  1. package/index.js +16 -23
  2. package/index.js.map +5 -5
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -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* firstSuccessOf2([
92527
- tryPromise2({
92528
- try: () => connect({
92529
- path: path4.join(baseAgentFsLocalPath, "local.db"),
92530
- url: url3,
92531
- authToken,
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: url3,
92530
+ authToken,
92531
+ clientName: "grepai"
92535
92532
  }),
92536
- tryPromise2({
92537
- try: () => connect({
92538
- path: ":memory:",
92539
- url: url3,
92540
- authToken,
92541
- clientName: "grepai"
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", () => 50), exhaustive2)
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", () => 50), exhaustive2)
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
  });
@@ -116955,11 +116948,11 @@ var program = gen2(function* () {
116955
116948
  const command = exports_Command.make("grepai").pipe(exports_Command.withSubcommands(subcommands));
116956
116949
  const cli = exports_Command.run(command, {
116957
116950
  name: "GREP AI",
116958
- version: "v0.8.2"
116951
+ version: "v0.8.3"
116959
116952
  });
116960
116953
  yield* cli(process.argv);
116961
116954
  });
116962
116955
  program.pipe(provide2(ProjectScanner.Default.pipe(provideMerge2(exports_BunContext.layer))), exports_BunRuntime.runMain);
116963
116956
 
116964
- //# debugId=A0155C6F690116D864756E2164756E21
116957
+ //# debugId=D7E54FA6EF22D56D64756E2164756E21
116965
116958
  //# sourceMappingURL=index.js.map