@grepai/cli 0.7.7 → 0.7.8
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 +30 -20
- package/index.js.map +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -89625,26 +89625,26 @@ class AgentFs extends Service()("@grepai/core/internal/services/agentfs", {
|
|
|
89625
89625
|
const { authToken, url: url3, syncMode } = config3.experimental__agentFs;
|
|
89626
89626
|
const baseAgentFsLocalPath = path4.resolve(config3.cwd, "./.grepai/agentfs");
|
|
89627
89627
|
yield* fs2.makeDirectory(baseAgentFsLocalPath, { recursive: true });
|
|
89628
|
-
const db = yield*
|
|
89629
|
-
|
|
89630
|
-
|
|
89628
|
+
const db = yield* firstSuccessOf2([
|
|
89629
|
+
tryPromise2({
|
|
89630
|
+
try: () => connect({
|
|
89631
89631
|
path: path4.join(baseAgentFsLocalPath, "local.db"),
|
|
89632
89632
|
url: url3,
|
|
89633
89633
|
authToken,
|
|
89634
89634
|
clientName: "grepai"
|
|
89635
|
-
})
|
|
89636
|
-
|
|
89637
|
-
|
|
89638
|
-
|
|
89639
|
-
|
|
89640
|
-
|
|
89641
|
-
|
|
89642
|
-
|
|
89643
|
-
|
|
89644
|
-
|
|
89645
|
-
|
|
89646
|
-
|
|
89647
|
-
|
|
89635
|
+
}),
|
|
89636
|
+
catch: (cause2) => new AgentFsError({ cause: cause2 })
|
|
89637
|
+
}),
|
|
89638
|
+
tryPromise2({
|
|
89639
|
+
try: () => connect({
|
|
89640
|
+
path: ":memory:",
|
|
89641
|
+
url: url3,
|
|
89642
|
+
authToken,
|
|
89643
|
+
clientName: "grepai"
|
|
89644
|
+
}),
|
|
89645
|
+
catch: (cause2) => new AgentFsError({ cause: cause2 })
|
|
89646
|
+
})
|
|
89647
|
+
]);
|
|
89648
89648
|
const agentFs = yield* tryPromise2({
|
|
89649
89649
|
try: () => AgentFS2.openWith(db),
|
|
89650
89650
|
catch: (cause2) => new AgentFsError({ cause: cause2 })
|
|
@@ -89655,11 +89655,21 @@ class AgentFs extends Service()("@grepai/core/internal/services/agentfs", {
|
|
|
89655
89655
|
catch: (cause2) => new AgentFsError({ cause: cause2 })
|
|
89656
89656
|
});
|
|
89657
89657
|
const dbPull = () => tryPromise2({
|
|
89658
|
-
try: () =>
|
|
89658
|
+
try: async () => {
|
|
89659
|
+
if (syncMode === "pull") {
|
|
89660
|
+
return db.pull();
|
|
89661
|
+
}
|
|
89662
|
+
throw new Error('`experimental__agentFs.syncMode` is not set to "pull"');
|
|
89663
|
+
},
|
|
89659
89664
|
catch: (cause2) => new AgentFsError({ cause: cause2 })
|
|
89660
89665
|
});
|
|
89661
89666
|
const dbPush = () => tryPromise2({
|
|
89662
|
-
try: () =>
|
|
89667
|
+
try: async () => {
|
|
89668
|
+
if (syncMode === "push") {
|
|
89669
|
+
return db.push();
|
|
89670
|
+
}
|
|
89671
|
+
throw new Error('`experimental__agentFs.syncMode` is not set to "push"');
|
|
89672
|
+
},
|
|
89663
89673
|
catch: (cause2) => new AgentFsError({ cause: cause2 })
|
|
89664
89674
|
});
|
|
89665
89675
|
return {
|
|
@@ -112858,11 +112868,11 @@ var program = gen2(function* () {
|
|
|
112858
112868
|
]));
|
|
112859
112869
|
const cli = exports_Command.run(command, {
|
|
112860
112870
|
name: "GREP AI",
|
|
112861
|
-
version: "v0.7.
|
|
112871
|
+
version: "v0.7.8"
|
|
112862
112872
|
});
|
|
112863
112873
|
yield* cli(process.argv);
|
|
112864
112874
|
});
|
|
112865
112875
|
program.pipe(provide2(mergeAll5(GrepAi.Default).pipe(provideMerge2(Clack.Default), provideMerge2(exports_BunContext.layer))), exports_BunRuntime.runMain);
|
|
112866
112876
|
|
|
112867
|
-
//# debugId=
|
|
112877
|
+
//# debugId=5A46409FBB25BEA164756E2164756E21
|
|
112868
112878
|
//# sourceMappingURL=index.js.map
|