@box-kite/react 2.2.13 → 2.2.14
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/AGENTS.md +1 -1
- package/README.md +9 -3
- package/create/src/agents.d.ts +22 -0
- package/create/src/agents.test.d.ts +1 -0
- package/create/src/options.d.ts +4 -0
- package/create/src/project.d.ts +2 -0
- package/package.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -19,7 +19,7 @@ BOX_KITE_AI_CONTEXT.md the long-form reference
|
|
|
19
19
|
.cursor/rules/box-kite.mdc the rules as a Cursor rule
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
Inside a consumer's tree they are under `node_modules/@box-kite/react/`.
|
|
22
|
+
Inside a consumer's tree they are under `node_modules/@box-kite/react/`. The repo root's `AGENTS.md` should point here, so this is read on every run rather than when someone thinks to look: `npm create @box-kite@latest -- --agents-only` adds that pointer (into the `AGENTS.md` already there, if there is one), a `CLAUDE.md` and the MCP server to the project.
|
|
23
23
|
|
|
24
24
|
## What a component looks like
|
|
25
25
|
|
package/README.md
CHANGED
|
@@ -728,12 +728,18 @@ behaviour hooks (`docs/a11y.md`). All of it is generated during the build from t
|
|
|
728
728
|
rules file and the built chunks' own exports, so none of it can drift from the library it describes.
|
|
729
729
|
|
|
730
730
|
```shell
|
|
731
|
-
|
|
731
|
+
npm create @box-kite@latest -- --agents-only
|
|
732
732
|
```
|
|
733
733
|
|
|
734
|
+
That adds a root `AGENTS.md` (merged into yours, if you have one) with the four facts a model gets wrong
|
|
735
|
+
and a pointer to the package's own, so an upgrade brings the rules with it; a `CLAUDE.md` importing it;
|
|
736
|
+
and the MCP server below, in `.mcp.json` and in the config of each editor whose folder is there. Run again,
|
|
737
|
+
it updates rather than repeats. `npm create @box-kite` writes all of it into a new app already
|
|
738
|
+
(`--no-agents` leaves it out).
|
|
739
|
+
|
|
734
740
|
Codex, Cursor, Copilot, VS Code, Windsurf, Cline and Zed read a root `AGENTS.md` natively; Claude
|
|
735
|
-
Code reads `CLAUDE.md`,
|
|
736
|
-
|
|
741
|
+
Code reads `CLAUDE.md`, which is why the one line `@AGENTS.md` is there. The long-form
|
|
742
|
+
[BOX_KITE_AI_CONTEXT.md](src/BOX_KITE_AI_CONTEXT.md) ships in the tarball too.
|
|
737
743
|
|
|
738
744
|
The same rules are also a skill, which roughly forty-five coding agents install with one command:
|
|
739
745
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The block a project's `AGENTS.md` carries: the four facts a model gets wrong from memory, then where the
|
|
3
|
+
* whole rules are. It points into `node_modules` rather than copying them, so an upgrade brings the rules with it.
|
|
4
|
+
*/
|
|
5
|
+
export declare function agentsBlock(facts: readonly string[]): string;
|
|
6
|
+
/** An `AGENTS.md` with the block in it: the one already there replaced, or the block added at the end. */
|
|
7
|
+
export declare function withAgentsBlock(existing: string | undefined, block: string): string;
|
|
8
|
+
/** A `CLAUDE.md` that imports `AGENTS.md`, which is how Claude Code reads it; unchanged when it already does. */
|
|
9
|
+
export declare function withClaudeImport(existing: string | undefined): string;
|
|
10
|
+
/** An MCP config with the server in it, or `null` when the file is not JSON we can safely rewrite (VS Code allows comments). */
|
|
11
|
+
export declare function withMcpServer(existing: string | undefined, key: string, entry: object): string | null;
|
|
12
|
+
export interface AgentFilesResult {
|
|
13
|
+
/** The files written or changed; a file already right is left out. */
|
|
14
|
+
written: string[];
|
|
15
|
+
/** Files that needed the server and could not be rewritten, for the reader to edit by hand. */
|
|
16
|
+
skipped: string[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Writes the agent files into a project. `editors: 'all'` writes every tool's MCP config (a new app, where no
|
|
20
|
+
* editor folder exists yet); `'present'` writes only those whose editor folder is there (an existing project).
|
|
21
|
+
*/
|
|
22
|
+
export declare function writeAgentFiles(directory: string, facts: readonly string[], editors: 'all' | 'present'): AgentFilesResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/create/src/options.d.ts
CHANGED
|
@@ -14,6 +14,10 @@ export interface CreateOptions {
|
|
|
14
14
|
overwrite: boolean;
|
|
15
15
|
/** Passed through to create-vite, which swaps Oxlint for ESLint. */
|
|
16
16
|
eslint?: boolean;
|
|
17
|
+
/** `false` leaves out AGENTS.md, CLAUDE.md and the MCP configs. */
|
|
18
|
+
agents: boolean;
|
|
19
|
+
/** Writes only the agent files, into a project that already exists. */
|
|
20
|
+
agentsOnly: boolean;
|
|
17
21
|
help: boolean;
|
|
18
22
|
version: boolean;
|
|
19
23
|
}
|
package/create/src/project.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export interface Templates {
|
|
|
8
8
|
ts: TemplateSet;
|
|
9
9
|
js: TemplateSet;
|
|
10
10
|
fonts: Record<Design, string[]>;
|
|
11
|
+
/** The four facts `AGENTS.md`'s lead block states, for the project's own `AGENTS.md`. */
|
|
12
|
+
facts: string[];
|
|
11
13
|
}
|
|
12
14
|
export interface ApplyOptions {
|
|
13
15
|
template: Template;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box-kite/react",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"pages/**"
|
|
@@ -653,7 +653,7 @@
|
|
|
653
653
|
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
654
654
|
},
|
|
655
655
|
"dependencies": {
|
|
656
|
-
"@box-kite/core": "2.2.
|
|
656
|
+
"@box-kite/core": "2.2.14",
|
|
657
657
|
"csstype": "^3.2.3",
|
|
658
658
|
"use-sync-external-store": "^1.6.0"
|
|
659
659
|
},
|