@tryhamster/gerbil 1.0.1 → 1.0.2
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/README.md +14 -0
- package/dist/cli.mjs +7 -7
- package/dist/cli.mjs.map +1 -1
- package/dist/frameworks/express.mjs +1 -1
- package/dist/frameworks/fastify.mjs +1 -1
- package/dist/frameworks/hono.mjs +1 -1
- package/dist/frameworks/next.mjs +1 -1
- package/dist/frameworks/trpc.mjs +1 -1
- package/dist/gerbil-B-jMOrnE.mjs +4 -0
- package/dist/{gerbil-DNniplr4.mjs → gerbil-CV4VpF4_.mjs} +2 -2
- package/dist/{gerbil-DNniplr4.mjs.map → gerbil-CV4VpF4_.mjs.map} +1 -1
- package/dist/gpu/hooks.d.mts +131 -86
- package/dist/gpu/hooks.d.mts.map +1 -1
- package/dist/gpu/hooks.mjs +28 -1
- package/dist/gpu/hooks.mjs.map +1 -1
- package/dist/gpu/index.mjs +2 -2
- package/dist/{gpu-DFuglcEx.mjs → gpu-836grvrv.mjs} +2 -2
- package/dist/{gpu-DFuglcEx.mjs.map → gpu-836grvrv.mjs.map} +1 -1
- package/dist/index-Dgmb2kE3.d.mts.map +1 -1
- package/dist/index-DukkJRMj.d.mts.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/integrations/ai-sdk.mjs +1 -1
- package/dist/integrations/langchain.mjs +1 -1
- package/dist/integrations/llamaindex.mjs +1 -1
- package/dist/integrations/mcp.mjs +4 -4
- package/dist/{mcp-D2vvH1Xc.mjs → mcp-BVHI5vzD.mjs} +3 -3
- package/dist/{mcp-D2vvH1Xc.mjs.map → mcp-BVHI5vzD.mjs.map} +1 -1
- package/dist/{moonshine-stt-4ojLtMq7.mjs → moonshine-stt-BzQRl-BO.mjs} +22 -16
- package/dist/{moonshine-stt-4ojLtMq7.mjs.map → moonshine-stt-BzQRl-BO.mjs.map} +1 -1
- package/dist/moonshine-stt-CIolM_SX.mjs +4 -0
- package/dist/{one-liner-JhdIPxzF.mjs → one-liner-Cn7IEg1G.mjs} +2 -2
- package/dist/{one-liner-JhdIPxzF.mjs.map → one-liner-Cn7IEg1G.mjs.map} +1 -1
- package/dist/{repl-BDRkwPGX.mjs → repl-CKAf2M7H.mjs} +3 -3
- package/dist/skills/index.d.mts +2 -2
- package/dist/skills/index.mjs +3 -3
- package/dist/{skills-CU694Dc8.mjs → skills-uuU5GONV.mjs} +2 -2
- package/dist/{skills-CU694Dc8.mjs.map → skills-uuU5GONV.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/gerbil-CTZUa8EZ.mjs +0 -4
- 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-
|
|
3
|
+
import { n as BUILTIN_MODELS, r as DEFAULT_MODEL, t as Gerbil } from "./gerbil-CV4VpF4_.mjs";
|
|
4
4
|
import "./utils-DKO55ZmZ.mjs";
|
|
5
|
-
import "./one-liner-
|
|
5
|
+
import "./one-liner-Cn7IEg1G.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-
|
|
8
|
-
import { r as startMCPServer } from "./mcp-
|
|
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-uuU5GONV.mjs";
|
|
8
|
+
import { r as startMCPServer } from "./mcp-BVHI5vzD.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.
|
|
27
|
+
var version = "1.0.2";
|
|
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-
|
|
7704
|
+
import("./repl-CKAf2M7H.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-
|
|
9000
|
+
const { Gerbil: Gerbil$1 } = await import("./gerbil-B-jMOrnE.mjs");
|
|
9001
9001
|
const g = new Gerbil$1();
|
|
9002
9002
|
const spinner = ora("Loading model...").start();
|
|
9003
9003
|
await g.loadModel(opts.model);
|