rsc-kit 0.28.1 → 0.29.1

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.
Files changed (2) hide show
  1. package/dist/index.js +18 -0
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -15,6 +15,11 @@ const HELP = `
15
15
  rsc-kit typegen [--check] write the route types without starting Vite,
16
16
  for a typecheck after a route was added;
17
17
  --check fails if committed ones are stale
18
+ rsc-kit agents bring the rsc-kit section of AGENTS.md up to
19
+ this version's rules; review it in git.
20
+ An older section without a stamp needs
21
+ --host and --source-dir (and --env, --pwa);
22
+ a file with no section needs --replace
18
23
 
19
24
  Run \`rsc-kit init --help\` for what it takes. Freezing pages is part of
20
25
  \`vite build\` and has no command: it needs the bundle the build just wrote,
@@ -58,6 +63,19 @@ else if (command === 'typegen') {
58
63
  exit(1);
59
64
  }
60
65
  }
66
+ else if (command === 'agents') {
67
+ // The rules an agent follows here, as this version writes them. Only the
68
+ // marked section changes; the app's own instructions around it are left be.
69
+ const { agentsFlags, updateAgents } = await import('create-rsc-kit/agents');
70
+ const result = updateAgents(process.cwd(), agentsFlags(rest));
71
+ if (result.kind === 'refused') {
72
+ stdout.write(`\n rsc-kit agents: ${result.reason}\n\n`);
73
+ exit(1);
74
+ }
75
+ stdout.write(result.kind === 'current'
76
+ ? ` AGENTS.md already has rsc-kit ${result.version}'s rules.\n`
77
+ : ` AGENTS.md ${result.kind === 'wrote' ? 'written' : 'updated'} with rsc-kit ${result.version}'s rules. Review the change in git.\n`);
78
+ }
61
79
  else {
62
80
  stdout.write(`\n Not an rsc-kit command: ${command}\n${HELP}`);
63
81
  exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rsc-kit",
3
- "version": "0.28.1",
3
+ "version": "0.29.1",
4
4
  "type": "module",
5
5
  "description": "The rsc-kit command line: add it to a project, and freeze what can be frozen.",
6
6
  "bin": {
@@ -27,8 +27,8 @@
27
27
  },
28
28
  "homepage": "https://rsc-kit.dev",
29
29
  "dependencies": {
30
- "@rsc-kit/core": "^0.28.1",
31
- "create-rsc-kit": "^0.28.1"
30
+ "@rsc-kit/core": "^0.29.1",
31
+ "create-rsc-kit": "^0.29.1"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^24.0.0",