@tryhamster/gerbil 1.0.1 → 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.
Files changed (38) hide show
  1. package/README.md +14 -0
  2. package/dist/cli.mjs +7 -7
  3. package/dist/cli.mjs.map +1 -1
  4. package/dist/frameworks/express.mjs +1 -1
  5. package/dist/frameworks/fastify.mjs +1 -1
  6. package/dist/frameworks/hono.mjs +1 -1
  7. package/dist/frameworks/next.mjs +1 -1
  8. package/dist/frameworks/trpc.mjs +1 -1
  9. package/dist/{gerbil-DNniplr4.mjs → gerbil-D4eIu8hx.mjs} +2 -2
  10. package/dist/{gerbil-DNniplr4.mjs.map → gerbil-D4eIu8hx.mjs.map} +1 -1
  11. package/dist/gerbil-Dk6sTA7P.mjs +4 -0
  12. package/dist/gpu/hooks.d.mts +131 -86
  13. package/dist/gpu/hooks.d.mts.map +1 -1
  14. package/dist/gpu/hooks.mjs +28 -1
  15. package/dist/gpu/hooks.mjs.map +1 -1
  16. package/dist/gpu/index.mjs +2 -2
  17. package/dist/{gpu-DFuglcEx.mjs → gpu-rziY7czu.mjs} +2 -2
  18. package/dist/{gpu-DFuglcEx.mjs.map → gpu-rziY7czu.mjs.map} +1 -1
  19. package/dist/index-DukkJRMj.d.mts.map +1 -1
  20. package/dist/index.mjs +4 -4
  21. package/dist/integrations/ai-sdk.mjs +1 -1
  22. package/dist/integrations/langchain.mjs +1 -1
  23. package/dist/integrations/llamaindex.mjs +1 -1
  24. package/dist/integrations/mcp.mjs +4 -4
  25. package/dist/{mcp-D2vvH1Xc.mjs → mcp-DujeDKfA.mjs} +3 -3
  26. package/dist/{mcp-D2vvH1Xc.mjs.map → mcp-DujeDKfA.mjs.map} +1 -1
  27. package/dist/{moonshine-stt-4ojLtMq7.mjs → moonshine-stt-BdccCmYH.mjs} +44 -25
  28. package/dist/{moonshine-stt-4ojLtMq7.mjs.map → moonshine-stt-BdccCmYH.mjs.map} +1 -1
  29. package/dist/moonshine-stt-CBX849nI.mjs +4 -0
  30. package/dist/{one-liner-JhdIPxzF.mjs → one-liner-D8cM1Mg2.mjs} +2 -2
  31. package/dist/{one-liner-JhdIPxzF.mjs.map → one-liner-D8cM1Mg2.mjs.map} +1 -1
  32. package/dist/{repl-BDRkwPGX.mjs → repl-DuACpxEj.mjs} +3 -3
  33. package/dist/skills/index.mjs +3 -3
  34. package/dist/{skills-CU694Dc8.mjs → skills-FEBy8-pu.mjs} +2 -2
  35. package/dist/{skills-CU694Dc8.mjs.map → skills-FEBy8-pu.mjs.map} +1 -1
  36. package/package.json +1 -1
  37. package/dist/gerbil-CTZUa8EZ.mjs +0 -4
  38. package/dist/moonshine-stt-17dpP1kr.mjs +0 -4
package/README.md CHANGED
@@ -139,6 +139,20 @@ function Chat() {
139
139
  The same hook exposes `describeImage` (vision), `embed`/`similarity` (embeddings), `stop`,
140
140
  and `dispose`. Pass `enableVision: true` or `embedding: true` to load those modalities.
141
141
 
142
+ **Gate your app behind the download.** Wrap your app in `<GerbilGate>` to show a splash
143
+ until the engine is ready — and keep it warm across navigation (no GPU re-upload):
144
+
145
+ ```tsx
146
+ import { GerbilGate } from "@tryhamster/gerbil/gpu/hooks";
147
+
148
+ <GerbilGate
149
+ model="mlx-community/Qwen3.5-0.8B-4bit"
150
+ fallback={({ progress }) => <Splash percent={progress} />}
151
+ >
152
+ <App />
153
+ </GerbilGate>;
154
+ ```
155
+
142
156
  ## Structured Output
143
157
 
144
158
  `generateObject` makes the model return a JSON object: it generates, extracts the JSON,
package/dist/cli.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as __require } from "./chunk-B9cbKln6.mjs";
3
- import { n as BUILTIN_MODELS, r as DEFAULT_MODEL, t as Gerbil } from "./gerbil-DNniplr4.mjs";
3
+ import { n as BUILTIN_MODELS, r as DEFAULT_MODEL, t as Gerbil } from "./gerbil-D4eIu8hx.mjs";
4
4
  import "./utils-DKO55ZmZ.mjs";
5
- import "./one-liner-JhdIPxzF.mjs";
5
+ import "./one-liner-D8cM1Mg2.mjs";
6
6
  import { n as isArchitectureSupported } from "./architectures-C1I5V3Dt.mjs";
7
- import { A as useSkill, E as getSkillInfo, O as listSkills, a as summarize, f as explain, h as commit, s as review, y as loadProjectSkills } from "./skills-CU694Dc8.mjs";
8
- import { r as startMCPServer } from "./mcp-D2vvH1Xc.mjs";
7
+ import { A as useSkill, E as getSkillInfo, O as listSkills, a as summarize, f as explain, h as commit, s as review, y as loadProjectSkills } from "./skills-FEBy8-pu.mjs";
8
+ import { r as startMCPServer } from "./mcp-DujeDKfA.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-DQ1mPUw5.mjs";
10
10
  import fs, { existsSync, readFileSync, unlinkSync } from "node:fs";
11
11
  import os, { tmpdir } from "node:os";
@@ -24,7 +24,7 @@ import TextInput from "ink-text-input";
24
24
  import http from "node:http";
25
25
 
26
26
  //#region package.json
27
- var version = "1.0.1";
27
+ var version = "1.0.3";
28
28
 
29
29
  //#endregion
30
30
  //#region src/cli/repl/auto-update.ts
@@ -7701,7 +7701,7 @@ function App({ initialView = "menu" } = {}) {
7701
7701
  return () => {
7702
7702
  mounted = false;
7703
7703
  if (gerbilRef.current) {
7704
- import("./repl-BDRkwPGX.mjs").then(({ setCleanupPromise: setCleanupPromise$1 }) => {
7704
+ import("./repl-DuACpxEj.mjs").then(({ setCleanupPromise: setCleanupPromise$1 }) => {
7705
7705
  setCleanupPromise$1(gerbilRef.current?.dispose(true) ?? Promise.resolve());
7706
7706
  });
7707
7707
  gerbilRef.current = null;
@@ -8997,7 +8997,7 @@ program.command("serve").description("Start Gerbil server (use --mcp or --http f
8997
8997
  }
8998
8998
  if (opts.mcp) await startMCPServer({ model: opts.model });
8999
8999
  else {
9000
- const { Gerbil: Gerbil$1 } = await import("./gerbil-CTZUa8EZ.mjs");
9000
+ const { Gerbil: Gerbil$1 } = await import("./gerbil-Dk6sTA7P.mjs");
9001
9001
  const g = new Gerbil$1();
9002
9002
  const spinner = ora("Loading model...").start();
9003
9003
  await g.loadModel(opts.model);