create-curb 1.30.0-preview.1 → 1.30.0-preview.10

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/RELEASE_NOTES.md CHANGED
@@ -1,5 +1,18 @@
1
1
 
2
2
  ### Added
3
3
 
4
+ - Curb test answers each model request it has seen before from a reply store (#177)
5
+ - Hermetic test runs, and curb mcp snapshot (#176)
6
+ - Kugelaudio.llm({ model: "auto" }) lets KugelAudio pick the model, and new projects start on it (#181)
7
+ - Start a test inside a skill, and play typed turns (#175)
8
+ - Typed tools and declared skill info (#174)
9
+ - Declare scenario start, spoken, hermetic and now, and the reply store contract (#173)
10
+ - Curb test --changed runs only the scenarios a change can affect (#147)
4
11
  - An agent that cannot work stops at startup and says why (#164)
5
12
 
13
+
14
+ ### Fixed
15
+
16
+ - A line counts as heard only by a caller who stayed and a page that got all of it (#172)
17
+ - A caller is not asked to repeat when the LLM provider refuses the request (#171)
18
+
@@ -12,11 +12,13 @@ import {
12
12
  mkdirSync,
13
13
  readFileSync,
14
14
  readdirSync,
15
+ realpathSync,
15
16
  renameSync,
16
17
  rmSync,
17
18
  statSync,
18
19
  writeFileSync,
19
20
  } from "node:fs";
21
+ import { homedir } from "node:os";
20
22
  import { basename, dirname, join, resolve } from "node:path";
21
23
  import { fileURLToPath } from "node:url";
22
24
  import pc from "picocolors";
@@ -40,7 +42,7 @@ Options:
40
42
  --stt <provider> kugelaudio | azure | deepgram | elevenlabs | openai (default kugelaudio)
41
43
  --llm <provider> kugelaudio | anthropic | openai | openai-compatible (default kugelaudio)
42
44
  --tts <provider> kugelaudio | cartesia | elevenlabs | openai (default kugelaudio)
43
- --model <id> LLM model id (default qwen3.8-27b on KugelAudio)
45
+ --model <id> LLM model id (default auto on KugelAudio: the model KugelAudio picks for the account)
44
46
  --stt-model <id> STT model id (deepgram, elevenlabs, or openai only)
45
47
  --tts-model <id> TTS model id (provider default otherwise)
46
48
  --llm-base-url <url> Endpoint for --llm openai-compatible
@@ -144,9 +146,9 @@ if (existsSync(targetDir) && readdirSync(targetDir).length > 0) {
144
146
  // else's package. A published copy pins its own version, so the two always match. (npm installs
145
147
  // file: directories as symlinks, so a repo-linked project behaves like a workspace member.)
146
148
  const CURB_ON_NPM = "npm:curb.js";
149
+ const { version: ownVersion } = JSON.parse(readFileSync(join(pkgDir, "package.json"), "utf8"));
147
150
  if (!frameworkSpec) {
148
- const { version } = JSON.parse(readFileSync(join(pkgDir, "package.json"), "utf8"));
149
- frameworkSpec = repoCheckout ? `file:${localFramework}` : `${CURB_ON_NPM}@${version}`;
151
+ frameworkSpec = repoCheckout ? `file:${localFramework}` : `${CURB_ON_NPM}@${ownVersion}`;
150
152
  } else if (/^\d/.test(frameworkSpec)) {
151
153
  frameworkSpec = `${CURB_ON_NPM}@${frameworkSpec}`;
152
154
  } else if (/^https?:/i.test(frameworkSpec)) {
@@ -183,8 +185,30 @@ const DEFAULT_TTS_MODEL = {
183
185
  };
184
186
  const defaultSttModel = (provider) => DEFAULT_STT_MODEL[provider] ?? null;
185
187
  const defaultTtsModel = (provider) => DEFAULT_TTS_MODEL[provider] ?? null;
186
- // KugelAudio's EU-hosted LLMs, the models `kugelaudio.llm({ model })` takes (first = default).
187
- const KUGELAUDIO_LLM_MODELS = ["qwen3.8-27b", "mistral-medium-3.5-128b"];
188
+ // KugelAudio's EU-hosted LLMs, the models `kugelaudio.llm({ model })` takes (first = the one a
189
+ // new project starts on). A new project starts on "auto", the model KugelAudio picks for the
190
+ // account. It is written out, because `kugelaudio.llm()` without a model runs qwen3.8-27b.
191
+ // "auto" is new in this release: a project pinned to any other curb.js (another version, or a
192
+ // file: path that is not the framework beside this copy) starts on qwen3.8-27b, as starters
193
+ // did before, since an older one refuses "auto".
194
+ /** The directory npm installs a file: spec from: `~` is the home directory, and a relative path is
195
+ * read from the project's package.json. */
196
+ function fileSpecPath(spec) {
197
+ const path = spec.slice("file:".length);
198
+ if (path === "~" || path.startsWith("~/")) return join(homedir(), path.slice(1));
199
+ return resolve(targetDir, path);
200
+ }
201
+ const sameDirectory = (a, b) => {
202
+ try {
203
+ return realpathSync(a) === realpathSync(b);
204
+ } catch {
205
+ return false; // a path that does not exist is not the framework beside this copy
206
+ }
207
+ };
208
+ const FRAMEWORK_TAKES_AUTO =
209
+ frameworkSpec === `${CURB_ON_NPM}@${ownVersion}` ||
210
+ (repoCheckout && frameworkSpec.startsWith("file:") && sameDirectory(fileSpecPath(frameworkSpec), localFramework));
211
+ const KUGELAUDIO_LLM_MODELS = [...(FRAMEWORK_TAKES_AUTO ? ["auto"] : []), "qwen3.8-27b", "mistral-medium-3.5-128b"];
188
212
  const KUGELAUDIO_LLM_MODEL = KUGELAUDIO_LLM_MODELS[0];
189
213
  const DEFAULT_LLM_BASE_URL = "http://127.0.0.1:11434/v1";
190
214
 
@@ -259,7 +283,7 @@ function providerSource(a) {
259
283
  llm = `openaiCompatible({ baseURL: ${q(a.llmBaseUrl || DEFAULT_LLM_BASE_URL)}, model: ${q(a.agentModel)} })`;
260
284
  } else if (a.llm === "kugelaudio") {
261
285
  factories.add("kugelaudio");
262
- llm = `kugelaudio.llm(${options({ model: changed(a.agentModel, KUGELAUDIO_LLM_MODEL) })})`;
286
+ llm = `kugelaudio.llm(${options({ model: a.agentModel })})`;
263
287
  } else {
264
288
  factories.add(a.llm);
265
289
  llm = `${a.llm}(${q(a.agentModel)})`;
@@ -292,6 +316,9 @@ function applyCliSelections() {
292
316
  }
293
317
  if (cli.tts) answers.tts = validate("tts", cli.tts, TTS_PROVIDERS);
294
318
  if (cli.model) answers.agentModel = cli.model;
319
+ if (answers.llm === "kugelaudio" && answers.agentModel === "auto" && !FRAMEWORK_TAKES_AUTO) {
320
+ fail(`--model auto needs curb.js ${ownVersion}; ${frameworkSpec} does not take it. Choose one of: ${KUGELAUDIO_LLM_MODELS.join(", ")}.`);
321
+ }
295
322
  if (answers.llm === "kugelaudio") validate("model", answers.agentModel, KUGELAUDIO_LLM_MODELS);
296
323
  if (cli.llmBaseUrl) answers.llmBaseUrl = cli.llmBaseUrl;
297
324
  if (cli.sttModel !== undefined && (answers.stt === "kugelaudio" || answers.stt === "azure")) {
@@ -373,7 +400,7 @@ writeFileSync(readmePath, readFileSync(readmePath, "utf8").replaceAll("{{APP_NAM
373
400
  // is replaced whole, so a provider other than the defaults imports its own factory.
374
401
  const TEMPLATE_PROVIDER_IMPORT = 'import { kugelaudio } from "curb/providers";';
375
402
  const TEMPLATE_AGENT_TAG =
376
- '<Agent llm={kugelaudio.llm()} stt={kugelaudio.stt({ language: "en" })} tts={kugelaudio.tts()}>';
403
+ '<Agent llm={kugelaudio.llm({ model: "auto" })} stt={kugelaudio.stt({ language: "en" })} tts={kugelaudio.tts()}>';
377
404
  const agentPath = join(targetDir, "src/agent/agent.tsx");
378
405
  const templateAgent = readFileSync(agentPath, "utf8");
379
406
  if (!templateAgent.includes(TEMPLATE_PROVIDER_IMPORT) || !templateAgent.includes(TEMPLATE_AGENT_TAG)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-curb",
3
- "version": "1.30.0-preview.1",
3
+ "version": "1.30.0-preview.10",
4
4
  "description": "Create a Curb voice agent with one command. Voice agents your coding agent can build and improve.",
5
5
  "keywords": [
6
6
  "curb",
@@ -145,7 +145,7 @@ export function App() {
145
145
  // The providers Lena talks through; their keys live in .env. She listens and speaks in
146
146
  // English: another language sets `language` on both stt and tts, with a voice that speaks it.
147
147
  return (
148
- <Agent llm={kugelaudio.llm()} stt={kugelaudio.stt({ language: "en" })} tts={kugelaudio.tts()}>
148
+ <Agent llm={kugelaudio.llm({ model: "auto" })} stt={kugelaudio.stt({ language: "en" })} tts={kugelaudio.tts()}>
149
149
  <SystemPrompt>{`
150
150
  You are Lena, the booking agent of Birch Street Studio, a hair and beauty studio.
151
151
 
@@ -179,7 +179,7 @@ export function App() {
179
179
  // The providers Juno talks through; their keys live in .env. She listens and speaks in
180
180
  // English: another language sets `language` on both stt and tts, with a voice that speaks it.
181
181
  return (
182
- <Agent llm={kugelaudio.llm()} stt={kugelaudio.stt({ language: "en" })} tts={kugelaudio.tts()}>
182
+ <Agent llm={kugelaudio.llm({ model: "auto" })} stt={kugelaudio.stt({ language: "en" })} tts={kugelaudio.tts()}>
183
183
  <SystemPrompt>{`
184
184
  You are Juno, a personal assistant for daily planning and the demo agent of this project.
185
185
 
@@ -116,7 +116,7 @@ export function App() {
116
116
  // The providers Mara talks through; their keys live in .env. She listens and speaks in
117
117
  // English: another language sets `language` on both stt and tts, with a voice that speaks it.
118
118
  return (
119
- <Agent llm={kugelaudio.llm()} stt={kugelaudio.stt({ language: "en" })} tts={kugelaudio.tts()}>
119
+ <Agent llm={kugelaudio.llm({ model: "auto" })} stt={kugelaudio.stt({ language: "en" })} tts={kugelaudio.tts()}>
120
120
  <SystemPrompt>{`
121
121
  You are Mara, the phone support agent of Northwind Outdoor, an online shop for hiking gear.
122
122