create-curb.js 1.16.0-preview.3 → 1.16.0-preview.5
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 +2 -0
- package/bin/create-curb.js +10 -2
- package/package.json +1 -1
- package/templates/default/AGENTS.md +6 -0
- package/templates/default/README.md +5 -2
package/RELEASE_NOTES.md
CHANGED
package/bin/create-curb.js
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
readFileSync,
|
|
13
13
|
readdirSync,
|
|
14
14
|
renameSync,
|
|
15
|
+
statSync,
|
|
15
16
|
writeFileSync,
|
|
16
17
|
} from "node:fs";
|
|
17
18
|
import { basename, dirname, join, resolve } from "node:path";
|
|
@@ -118,6 +119,9 @@ if (!/^[a-z0-9][a-z0-9._-]*$/.test(appName)) {
|
|
|
118
119
|
`"${appName}" is not a valid project name — use lowercase letters, digits, ".", "_", "-" (npm package name rules).`,
|
|
119
120
|
);
|
|
120
121
|
}
|
|
122
|
+
if (existsSync(targetDir) && !statSync(targetDir).isDirectory()) {
|
|
123
|
+
fail(`${targetDir} is a file. Choose a new directory.`);
|
|
124
|
+
}
|
|
121
125
|
if (existsSync(targetDir) && readdirSync(targetDir).length > 0) {
|
|
122
126
|
fail(`${targetDir} already exists and is not empty. Choose a new directory.`);
|
|
123
127
|
}
|
|
@@ -301,8 +305,12 @@ const envValues = finalizeEnv();
|
|
|
301
305
|
|
|
302
306
|
// -------------------------------------------------------------- copy template
|
|
303
307
|
const templateDir = resolve(dirname(fileURLToPath(import.meta.url)), "../templates/default");
|
|
304
|
-
|
|
305
|
-
|
|
308
|
+
try {
|
|
309
|
+
mkdirSync(targetDir, { recursive: true });
|
|
310
|
+
cpSync(templateDir, targetDir, { recursive: true });
|
|
311
|
+
} catch (error) {
|
|
312
|
+
fail(`Cannot create the project in ${targetDir} (${error.code ?? error.message}). Choose a directory you can write to.`);
|
|
313
|
+
}
|
|
306
314
|
|
|
307
315
|
// npm strips .gitignore from published tarballs, so the template ships it without the
|
|
308
316
|
// leading dot. The project carries no .npmrc: hosted builds refuse one.
|
package/package.json
CHANGED
|
@@ -134,6 +134,12 @@ context/*.md knowledge a skill reads with <Text src="file.md" />
|
|
|
134
134
|
|
|
135
135
|
## Deploy to KugelAudio
|
|
136
136
|
|
|
137
|
+
**Hosted deploys do not accept a project that installs Curb from npm yet, and this project
|
|
138
|
+
does.** Tell the user so before you try to deploy, and do not change the `curb` dependency to
|
|
139
|
+
get around it. Today the project runs locally with `npm run dev` and goes live on the user's own
|
|
140
|
+
servers (`node_modules/curb/docs/agent-guide/hosting.md`). The rest of this section applies once
|
|
141
|
+
hosted deploys accept the project.
|
|
142
|
+
|
|
137
143
|
`.mcp.json` registers two MCP servers for Claude Code started in this folder (it asks once
|
|
138
144
|
to use them): `kugelaudio`, your KugelAudio account (sign in from `/mcp`), and
|
|
139
145
|
`kugelaudio-docs`, the docs (no sign-in). Another client adds
|
|
@@ -41,6 +41,10 @@ Type or talk in the preview:
|
|
|
41
41
|
|
|
42
42
|
## Deploy to KugelAudio
|
|
43
43
|
|
|
44
|
+
Hosted deploys do not accept a project that installs Curb from npm yet, and this project does.
|
|
45
|
+
Today it runs locally with `npm run dev` and goes live on your own servers: see
|
|
46
|
+
`node_modules/curb/docs/agent-guide/hosting.md`. Once hosted deploys accept it:
|
|
47
|
+
|
|
44
48
|
```bash
|
|
45
49
|
npx curb login
|
|
46
50
|
npx curb secrets push
|
|
@@ -49,8 +53,7 @@ npx curb deploy
|
|
|
49
53
|
|
|
50
54
|
`deploy` prints the playground URL where you can call the live agent. Your `.env` is
|
|
51
55
|
never uploaded; `secrets push` sends its values and prints only their names. Details:
|
|
52
|
-
`node_modules/curb/docs/agent-guide/deploying.md`.
|
|
53
|
-
see `node_modules/curb/docs/agent-guide/hosting.md`.
|
|
56
|
+
`node_modules/curb/docs/agent-guide/deploying.md`.
|
|
54
57
|
|
|
55
58
|
## Learn more
|
|
56
59
|
|