@tryhamster/gerbil 1.0.0-rc.12 → 1.0.0-rc.14

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 (62) hide show
  1. package/README.md +24 -0
  2. package/dist/browser/index.d.ts +64 -3
  3. package/dist/browser/index.d.ts.map +1 -1
  4. package/dist/browser/index.js +226 -53
  5. package/dist/browser/index.js.map +1 -1
  6. package/dist/cli.mjs +9 -8
  7. package/dist/cli.mjs.map +1 -1
  8. package/dist/frameworks/express.d.mts +1 -1
  9. package/dist/frameworks/express.mjs +2 -1
  10. package/dist/frameworks/express.mjs.map +1 -1
  11. package/dist/frameworks/fastify.d.mts +1 -1
  12. package/dist/frameworks/fastify.mjs +2 -1
  13. package/dist/frameworks/fastify.mjs.map +1 -1
  14. package/dist/frameworks/hono.d.mts +1 -1
  15. package/dist/frameworks/hono.mjs +2 -1
  16. package/dist/frameworks/hono.mjs.map +1 -1
  17. package/dist/frameworks/next.d.mts +2 -2
  18. package/dist/frameworks/next.mjs +2 -1
  19. package/dist/frameworks/next.mjs.map +1 -1
  20. package/dist/frameworks/react.d.mts +1 -1
  21. package/dist/frameworks/trpc.d.mts +1 -1
  22. package/dist/frameworks/trpc.mjs +2 -1
  23. package/dist/frameworks/trpc.mjs.map +1 -1
  24. package/dist/{gerbil-BcWjCGtM.mjs → gerbil-BZklpDhM.mjs} +207 -1
  25. package/dist/gerbil-BZklpDhM.mjs.map +1 -0
  26. package/dist/gerbil-CAMb_nrK.mjs +5 -0
  27. package/dist/{gerbil-E12cYLNi.d.mts → gerbil-DJygY0sJ.d.mts} +71 -2
  28. package/dist/gerbil-DJygY0sJ.d.mts.map +1 -0
  29. package/dist/index.d.mts +3 -3
  30. package/dist/index.d.mts.map +1 -1
  31. package/dist/index.mjs +2 -2
  32. package/dist/index.mjs.map +1 -1
  33. package/dist/integrations/ai-sdk.d.mts +16 -1
  34. package/dist/integrations/ai-sdk.d.mts.map +1 -1
  35. package/dist/integrations/ai-sdk.mjs +19 -2
  36. package/dist/integrations/ai-sdk.mjs.map +1 -1
  37. package/dist/integrations/langchain.d.mts +1 -1
  38. package/dist/integrations/langchain.mjs +2 -1
  39. package/dist/integrations/langchain.mjs.map +1 -1
  40. package/dist/integrations/llamaindex.d.mts +1 -1
  41. package/dist/integrations/llamaindex.mjs +2 -1
  42. package/dist/integrations/llamaindex.mjs.map +1 -1
  43. package/dist/integrations/mcp.d.mts +2 -2
  44. package/dist/integrations/mcp.mjs +5 -4
  45. package/dist/{mcp-DXqxF7ri.mjs → mcp-ZCC5OR7B.mjs} +3 -3
  46. package/dist/{mcp-DXqxF7ri.mjs.map → mcp-ZCC5OR7B.mjs.map} +1 -1
  47. package/dist/{one-liner-UtQX47IT.mjs → one-liner-mH5SKPvT.mjs} +2 -2
  48. package/dist/{one-liner-UtQX47IT.mjs.map → one-liner-mH5SKPvT.mjs.map} +1 -1
  49. package/dist/{repl-FjIaBVFD.mjs → repl-CSM1IBP1.mjs} +3 -3
  50. package/dist/skills/index.d.mts +2 -2
  51. package/dist/skills/index.mjs +4 -3
  52. package/dist/{skills-BmlseBpJ.mjs → skills-CPB_9YfF.mjs} +2 -2
  53. package/dist/{skills-BmlseBpJ.mjs.map → skills-CPB_9YfF.mjs.map} +1 -1
  54. package/dist/{types-Bgb_89Bh.d.mts → types-evP8RShr.d.mts} +8 -2
  55. package/dist/types-evP8RShr.d.mts.map +1 -0
  56. package/docs/ai-sdk.md +18 -0
  57. package/docs/browser.md +34 -0
  58. package/package.json +1 -1
  59. package/dist/gerbil-BcWjCGtM.mjs.map +0 -1
  60. package/dist/gerbil-CBQkuQ9i.mjs +0 -4
  61. package/dist/gerbil-E12cYLNi.d.mts.map +0 -1
  62. package/dist/types-Bgb_89Bh.d.mts.map +0 -1
package/dist/cli.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as __require } from "./chunk-CkXuGtQK.mjs";
3
- import { n as BUILTIN_MODELS, t as Gerbil } from "./gerbil-BcWjCGtM.mjs";
3
+ import { n as BUILTIN_MODELS, t as Gerbil } from "./gerbil-BZklpDhM.mjs";
4
4
  import { n as getChromeCachedModels, r as refreshCachedModelSizes } from "./chrome-backend-CORwaIyC.mjs";
5
5
  import "./utils-CZBZ8dgR.mjs";
6
- import "./one-liner-UtQX47IT.mjs";
7
- import { D as listSkills, T as getSkillInfo, a as summarize, d as explain, k as useSkill, m as commit, s as review, v as loadProjectSkills } from "./skills-BmlseBpJ.mjs";
8
- import { r as startMCPServer } from "./mcp-DXqxF7ri.mjs";
6
+ import "./one-liner-mH5SKPvT.mjs";
7
+ import { D as listSkills, T as getSkillInfo, a as summarize, d as explain, k as useSkill, m as commit, s as review, v as loadProjectSkills } from "./skills-CPB_9YfF.mjs";
8
+ import { r as startMCPServer } from "./mcp-ZCC5OR7B.mjs";
9
9
  import { a as getToolDefinitions, c as setToolContext, i as getTool, n as executeToolCall, o as loadProjectTools, r as formatToolsForPrompt, s as parseToolCall } from "./tools-Bi1P7Xoy.mjs";
10
10
  import { exec, spawn, spawnSync } from "node:child_process";
11
11
  import fs, { existsSync, readFileSync, unlinkSync } from "node:fs";
@@ -24,7 +24,7 @@ import SelectInput from "ink-select-input";
24
24
  import TextInput from "ink-text-input";
25
25
 
26
26
  //#region package.json
27
- var version = "1.0.0-rc.12";
27
+ var version = "1.0.0-rc.14";
28
28
 
29
29
  //#endregion
30
30
  //#region src/cli/repl/auto-update.ts
@@ -8181,7 +8181,7 @@ function App({ initialView = "menu", forcedDevice } = {}) {
8181
8181
  return () => {
8182
8182
  mounted = false;
8183
8183
  if (gerbilRef.current) {
8184
- import("./repl-FjIaBVFD.mjs").then(({ setCleanupPromise: setCleanupPromise$1 }) => {
8184
+ import("./repl-CSM1IBP1.mjs").then(({ setCleanupPromise: setCleanupPromise$1 }) => {
8185
8185
  setCleanupPromise$1(gerbilRef.current?.dispose(true) ?? Promise.resolve());
8186
8186
  });
8187
8187
  gerbilRef.current = null;
@@ -8714,7 +8714,6 @@ function App({ initialView = "menu", forcedDevice } = {}) {
8714
8714
  downloadStatus: p.file ? `${p.file} ${p.progress || 0}%` : p.status || ""
8715
8715
  }));
8716
8716
  } });
8717
- await tempGerbil.dispose();
8718
8717
  setState((s) => ({
8719
8718
  ...s,
8720
8719
  downloadStatus: `[done] Downloaded ${modelId}`
@@ -8734,6 +8733,8 @@ function App({ initialView = "menu", forcedDevice } = {}) {
8734
8733
  downloadStatus: ""
8735
8734
  })), 3e3);
8736
8735
  return false;
8736
+ } finally {
8737
+ await tempGerbil.dispose();
8737
8738
  }
8738
8739
  };
8739
8740
  return /* @__PURE__ */ jsxs(Box, {
@@ -9508,7 +9509,7 @@ program.command("serve").description("Start Gerbil server (use --mcp or --http f
9508
9509
  }
9509
9510
  if (opts.mcp) await startMCPServer({ model: opts.model });
9510
9511
  else {
9511
- const { Gerbil: Gerbil$1 } = await import("./gerbil-CBQkuQ9i.mjs");
9512
+ const { Gerbil: Gerbil$1 } = await import("./gerbil-CAMb_nrK.mjs");
9512
9513
  const g = new Gerbil$1();
9513
9514
  const spinner = ora("Loading model...").start();
9514
9515
  await g.loadModel(opts.model);