create-avocado-site 0.13.0 → 0.14.0
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/dist/generator.js +17 -0
- package/dist/templates/agent-skills.d.ts +4 -0
- package/dist/templates/agent-skills.js +21 -0
- package/dist/versions.d.ts +12 -3
- package/dist/versions.js +12 -3
- package/package.json +6 -5
package/dist/generator.js
CHANGED
|
@@ -3,6 +3,7 @@ import { dirname, join } from "node:path";
|
|
|
3
3
|
import { editorApiRoute, revalidateRoute, manifestFile, pageFile, middlewareFile, proxyFile, notFoundFile, envExample, } from "./templates/common.js";
|
|
4
4
|
import { demoAppTemplates } from "./templates/demo-app.js";
|
|
5
5
|
import { demoAssets } from "./templates/assets.js";
|
|
6
|
+
import { agentSkills, agentsMd, claudeMd } from "./templates/agent-skills.js";
|
|
6
7
|
import { sanityTemplates } from "./templates/sanity.js";
|
|
7
8
|
import { contentfulTemplates } from "./templates/contentful.js";
|
|
8
9
|
import { strapiTemplates } from "./templates/strapi.js";
|
|
@@ -38,6 +39,21 @@ export function collectDemoFiles(config) {
|
|
|
38
39
|
{ path: "app/api/editor/[...path]/route.ts", content: editorApiRoute(config) },
|
|
39
40
|
{ path: "lib/manifest.ts", content: manifestFile(config) },
|
|
40
41
|
...cmsTemplates(config),
|
|
42
|
+
...agentInstructions(config),
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
/*
|
|
46
|
+
* The agent's copy of the setup instructions, written into the project.
|
|
47
|
+
*
|
|
48
|
+
* Both modes get it. The demo is where somebody first asks their agent to
|
|
49
|
+
* change something, and the integrate path is where the instructions being
|
|
50
|
+
* wrong costs the most — see `templates/agent-skills.ts`.
|
|
51
|
+
*/
|
|
52
|
+
function agentInstructions(config) {
|
|
53
|
+
return [
|
|
54
|
+
{ path: "AGENTS.md", content: agentsMd(config.siteId) },
|
|
55
|
+
{ path: "CLAUDE.md", content: claudeMd() },
|
|
56
|
+
...agentSkills(),
|
|
41
57
|
];
|
|
42
58
|
}
|
|
43
59
|
/** Wiring for a Next.js app that already exists. Touches nothing it did not create. */
|
|
@@ -57,6 +73,7 @@ export function collectFiles(config) {
|
|
|
57
73
|
: { path: "middleware.ts", content: middlewareFile() });
|
|
58
74
|
files.push({ path: ".env.local.example", content: envExample(config) });
|
|
59
75
|
files.push(...cmsTemplates(config));
|
|
76
|
+
files.push(...agentInstructions(config));
|
|
60
77
|
return files;
|
|
61
78
|
}
|
|
62
79
|
export async function generateFiles(cwd, files) {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { agentsMd, claudeMd, skillFiles } from "@avocadostudio-ai/skills";
|
|
2
|
+
/*
|
|
3
|
+
* The instructions an agent needs, written into the project rather than left on
|
|
4
|
+
* a web page.
|
|
5
|
+
*
|
|
6
|
+
* The bytes live in `@avocadostudio-ai/skills`, which is also what
|
|
7
|
+
* `npx @avocadostudio-ai/skills` installs into a repo that already exists. One
|
|
8
|
+
* copy, two delivery channels: a second copy here would be a second thing to
|
|
9
|
+
* keep true, and keeping two copies of the setup instructions true is the
|
|
10
|
+
* problem this whole arrangement exists to solve.
|
|
11
|
+
*
|
|
12
|
+
* `generateFiles` never clobbers, so re-running the scaffolder over a project
|
|
13
|
+
* that already has skills leaves them alone and reports them skipped. That is
|
|
14
|
+
* the right default *here* — the scaffolder is writing routes and config
|
|
15
|
+
* alongside them. The standalone command has the opposite rule for its own
|
|
16
|
+
* files, because delivering new instructions on upgrade is its entire job.
|
|
17
|
+
*/
|
|
18
|
+
export function agentSkills() {
|
|
19
|
+
return skillFiles().map((file) => ({ path: file.path, source: file.source }));
|
|
20
|
+
}
|
|
21
|
+
export { agentsMd, claudeMd };
|
package/dist/versions.d.ts
CHANGED
|
@@ -17,14 +17,23 @@
|
|
|
17
17
|
* `@avocadostudio-ai/orchestrator-core`, already pinned there; naming it again
|
|
18
18
|
* here is how a project ends up with two.
|
|
19
19
|
*/
|
|
20
|
-
export declare const AVOCADO = "0.
|
|
20
|
+
export declare const AVOCADO = "0.14.0";
|
|
21
21
|
/**
|
|
22
|
-
* Next 15.5.
|
|
22
|
+
* Next 15.5.25 rather than 16, because that is the version every example app
|
|
23
23
|
* and the demo site in this repository build and test against. The SDK
|
|
24
24
|
* supports 16 — `createEditorProxy` exists for exactly that — but a first run
|
|
25
25
|
* should be on the version CI proves, not the newest one.
|
|
26
|
+
*
|
|
27
|
+
* Staying on 15 is the deliberate part. Staying on 15.5.15 was not: an exact
|
|
28
|
+
* pin is a version somebody has to keep moving, and this one sat still while
|
|
29
|
+
* twenty-three advisories accumulated against it, one of them an
|
|
30
|
+
* unauthenticated RCE in the image optimizer. Nothing here noticed, because
|
|
31
|
+
* nothing here looks — `pnpm audit` is not in the gate and the pin is a
|
|
32
|
+
* string constant no test has an opinion about. Bump it to the newest 15.x
|
|
33
|
+
* when you touch this file, and read `npm audit` output from a scaffolded
|
|
34
|
+
* project before a release rather than after one.
|
|
26
35
|
*/
|
|
27
|
-
export declare const NEXT = "15.5.
|
|
36
|
+
export declare const NEXT = "15.5.25";
|
|
28
37
|
export declare const REACT = "^19.0.0";
|
|
29
38
|
export declare const TYPESCRIPT = "^5.7.3";
|
|
30
39
|
export declare const TYPES_NODE = "^22.13.10";
|
package/dist/versions.js
CHANGED
|
@@ -17,14 +17,23 @@
|
|
|
17
17
|
* `@avocadostudio-ai/orchestrator-core`, already pinned there; naming it again
|
|
18
18
|
* here is how a project ends up with two.
|
|
19
19
|
*/
|
|
20
|
-
export const AVOCADO = "0.
|
|
20
|
+
export const AVOCADO = "0.14.0";
|
|
21
21
|
/**
|
|
22
|
-
* Next 15.5.
|
|
22
|
+
* Next 15.5.25 rather than 16, because that is the version every example app
|
|
23
23
|
* and the demo site in this repository build and test against. The SDK
|
|
24
24
|
* supports 16 — `createEditorProxy` exists for exactly that — but a first run
|
|
25
25
|
* should be on the version CI proves, not the newest one.
|
|
26
|
+
*
|
|
27
|
+
* Staying on 15 is the deliberate part. Staying on 15.5.15 was not: an exact
|
|
28
|
+
* pin is a version somebody has to keep moving, and this one sat still while
|
|
29
|
+
* twenty-three advisories accumulated against it, one of them an
|
|
30
|
+
* unauthenticated RCE in the image optimizer. Nothing here noticed, because
|
|
31
|
+
* nothing here looks — `pnpm audit` is not in the gate and the pin is a
|
|
32
|
+
* string constant no test has an opinion about. Bump it to the newest 15.x
|
|
33
|
+
* when you touch this file, and read `npm audit` output from a scaffolded
|
|
34
|
+
* project before a release rather than after one.
|
|
26
35
|
*/
|
|
27
|
-
export const NEXT = "15.5.
|
|
36
|
+
export const NEXT = "15.5.25";
|
|
28
37
|
export const REACT = "^19.0.0";
|
|
29
38
|
export const TYPESCRIPT = "^5.7.3";
|
|
30
39
|
export const TYPES_NODE = "^22.13.10";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-avocado-site",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Bootstrap a runnable Avocado Studio demo site, or wire Avocado into an existing Next.js project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -28,14 +28,15 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@clack/prompts": "^0.9.1"
|
|
31
|
+
"@clack/prompts": "^0.9.1",
|
|
32
|
+
"@avocadostudio-ai/skills": "^0.14.0"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@types/node": "^22.13.10",
|
|
35
36
|
"tsx": "^4.19.0",
|
|
36
37
|
"typescript": "^5.7.3",
|
|
37
|
-
"@avocadostudio-ai/shared": "0.
|
|
38
|
-
"@avocadostudio-ai/site-sdk": "0.
|
|
38
|
+
"@avocadostudio-ai/shared": "0.14.0",
|
|
39
|
+
"@avocadostudio-ai/site-sdk": "0.14.0"
|
|
39
40
|
},
|
|
40
41
|
"license": "Apache-2.0",
|
|
41
42
|
"homepage": "https://docs.avocadostudio.dev",
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
"url": "https://docs.avocadostudio.dev"
|
|
44
45
|
},
|
|
45
46
|
"scripts": {
|
|
46
|
-
"build": "tsc",
|
|
47
|
+
"build": "tsc -p tsconfig.build.json",
|
|
47
48
|
"dev": "tsx src/index.ts",
|
|
48
49
|
"typecheck": "tsc --noEmit",
|
|
49
50
|
"test": "NODE_ENV=test node ../../scripts/run-tests.mjs"
|