create-jay 0.25.4 → 0.25.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/dist/index.js CHANGED
@@ -264,7 +264,9 @@ async function scaffoldProject(projectDir, name, selectedPlugins) {
264
264
  writeFile(projectDir, ".jay", readTemplate("jay-config.yaml"));
265
265
  writeFile(projectDir, "vite.config.ts", readTemplate("vite.config.ts"));
266
266
  writeFile(projectDir, "tsconfig.json", readTemplate("tsconfig.json"));
267
- writeFile(projectDir, "CLAUDE.md", readTemplate("CLAUDE.md"));
267
+ const agentGuidance = readTemplate("CLAUDE.md");
268
+ writeFile(projectDir, "CLAUDE.md", agentGuidance);
269
+ writeFile(projectDir, "agents.md", agentGuidance);
268
270
  const hasDesignValidator = selectedPlugins.some(
269
271
  (p) => p.name === "@jay-framework/design-system-validator"
270
272
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-jay",
3
- "version": "0.25.4",
3
+ "version": "0.25.5",
4
4
  "type": "module",
5
5
  "description": "Create a new Jay Stack project",
6
6
  "license": "Apache-2.0",
@@ -23,6 +23,21 @@ guides). After scaffolding, read those.
23
23
  server-side via the Claude Agent SDK. Its authentication matches Claude Code: install the `claude`
24
24
  CLI, then either set `ANTHROPIC_API_KEY` in the environment **or** run `claude login`. Without this
25
25
  the project still scaffolds, builds, and runs — only the `/aiditor` route's agent won't run.
26
+ - **For any Wix plugin (`wix-stores` / `wix-members` / `wix-media` / `wix-data` / `wix-deploy`): a Wix
27
+ account + a browser login.** All Wix plugins share one credential owner,
28
+ `@jay-framework/wix-server-client`, which is pulled in automatically when you select any `wix-*`
29
+ plugin. Its setup is **interactive** — during `setup` it shells out to the Wix CLI
30
+ (`npx @wix/cli login`, opening a browser for OAuth) and, if the project isn't connected to a site yet,
31
+ runs `npm create @wix/new init` to connect one. From there it fetches the app secret and writes
32
+ `config/.wix.yaml` for you — you are **not** prompted for an API key, site ID, or client ID (those are
33
+ derived or fetched). Notes:
34
+ - This step **requires interactive mode.** In non-interactive / CI runs it is skipped with a
35
+ `needs-config` note; re-run `yarn setup` in a terminal to complete it.
36
+ - **`wix-deploy` additionally needs a live Wix login at deploy time** (`yarn wix:deploy`) — it uses
37
+ the Wix CLI session in `~/.wix`. If that session is missing it errors with "Run `wix login` first";
38
+ just run `npx @wix/cli login` again.
39
+ - **API key is optional / manual.** The default flow uses the auto-fetched app secret; only hand-edit
40
+ an `apiKey` into `config/.wix.yaml` if you deliberately choose the API-key strategy.
26
41
 
27
42
  ## 1 · Scaffold the project
28
43
 
@@ -54,6 +69,38 @@ The scaffolder then, in order: creates `./<name>/`, installs dependencies, gener
54
69
  complete non-interactively (e.g. a plugin needing credentials) is skipped with a note and can be re-run
55
70
  later with `yarn setup`.
56
71
 
72
+ ### Completing setup non-interactively (agents / CI)
73
+
74
+ `jay-stack-cli setup` has three input modes:
75
+
76
+ - `--interactive` — prompts a human in the terminal.
77
+ - `--answers <file>` — reads answers from a YAML file (for agents).
78
+ - _(neither)_ — surfaces every needed answer instead of prompting.
79
+
80
+ When a plugin needs a value it can't get, setup does **not** hang or guess — it prints a structured,
81
+ machine-readable block and exits that plugin:
82
+
83
+ ```
84
+ setup-needs-answer:
85
+ plugin: @jay-framework/some-plugin
86
+ key: apiKey
87
+ type: input
88
+ message: "Enter your API key"
89
+ choices: # only present for select-type questions
90
+ - us: United States
91
+ ```
92
+
93
+ **The loop for an agent:** run `yarn setup` → for each `setup-needs-answer:` block, add a line
94
+ `<key>: "<value>"` to an `answers.yaml` → re-run `jay-stack-cli setup --answers answers.yaml`. Any value
95
+ still missing surfaces again as another `setup-needs-answer:`; repeat until none remain. The `key` is the
96
+ stable join field between the question and your answer.
97
+
98
+ **Exception — Wix login is not answerable via file.** The Wix plugins' credential setup shells out to
99
+ the Wix CLI for a browser-based OAuth login (`npx @wix/cli login`). In non-interactive mode it returns a
100
+ `needs-config` note ("requires interactive mode"), **not** a `setup-needs-answer:` — there is no key you
101
+ can put in `answers.yaml` for it. A human must run `yarn setup` in a real terminal once to complete the
102
+ Wix login; everything else (app secret, client ID, site ID) is fetched/derived automatically after that.
103
+
57
104
  ## 2 · What you get
58
105
 
59
106
  ```
@@ -6,6 +6,17 @@ This is a Jay Stack project.
6
6
 
7
7
  Run `yarn setup` then `yarn agent-kit` to generate the agent kit.
8
8
 
9
+ ### Plugin setup (credentials)
10
+
11
+ `yarn setup` configures each installed plugin. For agents/CI it is non-interactive: a plugin that needs
12
+ a value exits with a structured `setup-needs-answer:` block (`plugin`/`key`/`type`/`message`/`choices`).
13
+ Put each `<key>: "<value>"` into `answers.yaml` and re-run `jay-stack-cli setup --answers answers.yaml`;
14
+ repeat until every plugin reports `configured`. See `agent-kit/devops/INSTRUCTIONS.md` for the full loop.
15
+
16
+ **Wix plugins are the exception:** their login is a browser OAuth via the Wix CLI, so it can't be
17
+ answered from a file — run `yarn setup` once in a real terminal to complete it. Everything else (app
18
+ secret, client ID, site ID) is fetched automatically afterward.
19
+
9
20
  Read `agent-kit/` for contracts, plugin references, and role guides — this is the authoritative
10
21
  guidance for the agent kit structure, CLI commands, and project organization.
11
22