@boopkit/cli 0.1.14 → 0.1.16
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/capability-versions.json +2 -2
- package/dist/cli.js +1 -0
- package/dist/commands/list.js +1 -1
- package/dist/commands/status.js +2 -3
- package/dist/commands/update.d.ts +1 -0
- package/dist/commands/update.js +9 -4
- package/dist/lib/capability.d.ts +3 -1
- package/dist/lib/capability.js +7 -2
- package/package.json +3 -1
- package/src/templates/kernel/AGENTS.md.hbs +7 -7
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@boopkit/cap-api": "0.1.0",
|
|
3
|
-
"@boopkit/cap-background-jobs": "0.2.
|
|
3
|
+
"@boopkit/cap-background-jobs": "0.2.6",
|
|
4
4
|
"@boopkit/cap-cloud-storage": "0.1.0",
|
|
5
5
|
"@boopkit/cap-coding": "0.1.0",
|
|
6
|
-
"@boopkit/cap-database": "0.1.
|
|
6
|
+
"@boopkit/cap-database": "0.1.4",
|
|
7
7
|
"@boopkit/cap-email": "0.1.0",
|
|
8
8
|
"@boopkit/cap-hello": "0.1.0",
|
|
9
9
|
"@boopkit/cap-noticeboard": "0.1.1",
|
package/dist/cli.js
CHANGED
|
@@ -89,6 +89,7 @@ program
|
|
|
89
89
|
.option('--restore', 'Restore locally deleted scaffold files')
|
|
90
90
|
.option('--prune', 'Remove deprecated scaffold files from disk (creates .bak backup)')
|
|
91
91
|
.option('--skip-npm', 'Skip npm update (only re-scaffold from installed versions)')
|
|
92
|
+
.option('--tag <tag>', 'Use a specific npm dist-tag instead of major-version pinning (e.g. beta)')
|
|
92
93
|
.option('--json', 'Output structured JSON')
|
|
93
94
|
.action(update_1.runUpdate);
|
|
94
95
|
program
|
package/dist/commands/list.js
CHANGED
|
@@ -61,7 +61,7 @@ function listProfilesCommand() {
|
|
|
61
61
|
* Reused by both `boop list capabilities` and `boop add` (no arg).
|
|
62
62
|
*/
|
|
63
63
|
function printGroupedCapabilities() {
|
|
64
|
-
const capabilities = (0, capability_1.listCapabilities)()
|
|
64
|
+
const capabilities = (0, capability_1.listCapabilities)();
|
|
65
65
|
if (capabilities.length === 0) {
|
|
66
66
|
console.log('No capabilities found.');
|
|
67
67
|
return;
|
package/dist/commands/status.js
CHANGED
|
@@ -117,11 +117,10 @@ function getStatusData(manifest, dir) {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
if (allRequiredSet) {
|
|
120
|
-
// Env vars are set — check if capability has setup checks
|
|
120
|
+
// Env vars are set — check if capability has setup checks that enrichWithSetupChecks can resolve
|
|
121
121
|
const capDef = (0, capability_1.getCapability)(capName, [dir]);
|
|
122
122
|
const hasSetupChecks = capDef?.postInstall?.setupChecks?.length;
|
|
123
|
-
|
|
124
|
-
if (hasSetupChecks || hasPostInstall) {
|
|
123
|
+
if (hasSetupChecks) {
|
|
125
124
|
// Mark as 'setup' — dynamic checks will populate steps during enrichment
|
|
126
125
|
capabilities[capName] = { status: 'setup', type: capType, env: envStatus, optionalSteps: optionalSteps.length > 0 ? optionalSteps : undefined };
|
|
127
126
|
}
|
package/dist/commands/update.js
CHANGED
|
@@ -61,7 +61,7 @@ function runUpdate(capabilityName, options) {
|
|
|
61
61
|
}
|
|
62
62
|
// Step 1: npm install capability packages at latest within current major (unless --skip-npm or --dry-run)
|
|
63
63
|
if (!options.skipNpm && !options.dryRun) {
|
|
64
|
-
const packageSpecs = resolveNpmPackageSpecs(capsToUpdate, targetDir);
|
|
64
|
+
const packageSpecs = resolveNpmPackageSpecs(capsToUpdate, targetDir, options.tag);
|
|
65
65
|
if (packageSpecs.length > 0) {
|
|
66
66
|
if (!options.json) {
|
|
67
67
|
console.log(`Updating npm packages: ${packageSpecs.join(', ')}`);
|
|
@@ -224,7 +224,7 @@ function diagnoseMissingPlans(capsToUpdate, requestedCap, targetDir) {
|
|
|
224
224
|
* This allows minor+patch updates within the same major (including 0.x → 0.y)
|
|
225
225
|
* without crossing a major version boundary.
|
|
226
226
|
*/
|
|
227
|
-
function resolveNpmPackageSpecs(capabilities, targetDir) {
|
|
227
|
+
function resolveNpmPackageSpecs(capabilities, targetDir, tag) {
|
|
228
228
|
const specs = [];
|
|
229
229
|
for (const cap of capabilities) {
|
|
230
230
|
const pkgDir = (0, capability_1.getPackageDir)(cap, [targetDir]);
|
|
@@ -235,8 +235,13 @@ function resolveNpmPackageSpecs(capabilities, targetDir) {
|
|
|
235
235
|
continue;
|
|
236
236
|
const pkgJson = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf-8'));
|
|
237
237
|
if (pkgJson.name && pkgJson.boopkit?.capability && pkgJson.version) {
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
if (tag) {
|
|
239
|
+
specs.push(`${pkgJson.name}@${tag}`);
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
const major = pkgJson.version.split('.')[0];
|
|
243
|
+
specs.push(`${pkgJson.name}@${major}`);
|
|
244
|
+
}
|
|
240
245
|
}
|
|
241
246
|
}
|
|
242
247
|
return specs;
|
package/dist/lib/capability.d.ts
CHANGED
|
@@ -16,7 +16,9 @@ export declare function getCatalogEntry(name: string): (CapabilityMetadata & {
|
|
|
16
16
|
* List all capabilities by scanning package directory and capabilities/ source tree (test fixtures only).
|
|
17
17
|
* Package resolution takes priority. Returns metadata for each valid capability.
|
|
18
18
|
*/
|
|
19
|
-
export declare function listCapabilities(
|
|
19
|
+
export declare function listCapabilities(opts?: {
|
|
20
|
+
includeTest?: boolean;
|
|
21
|
+
}): CapabilityMetadata[];
|
|
20
22
|
/**
|
|
21
23
|
* Get a single capability's metadata by name.
|
|
22
24
|
* Tries package resolution first, falls back to source tree.
|
package/dist/lib/capability.js
CHANGED
|
@@ -140,13 +140,14 @@ function getCatalogEntry(name) {
|
|
|
140
140
|
* List all capabilities by scanning package directory and capabilities/ source tree (test fixtures only).
|
|
141
141
|
* Package resolution takes priority. Returns metadata for each valid capability.
|
|
142
142
|
*/
|
|
143
|
-
function listCapabilities() {
|
|
143
|
+
function listCapabilities(opts) {
|
|
144
|
+
const includeTest = opts?.includeTest ?? false;
|
|
144
145
|
const seen = new Set();
|
|
145
146
|
const capabilities = [];
|
|
146
147
|
// Primary source: baked-in catalog (always available in published CLI)
|
|
147
148
|
const catalog = loadCatalog();
|
|
148
149
|
for (const cap of catalog) {
|
|
149
|
-
if (cap.name.startsWith('_'))
|
|
150
|
+
if (!includeTest && cap.name.startsWith('_'))
|
|
150
151
|
continue;
|
|
151
152
|
seen.add(cap.name);
|
|
152
153
|
// Also track the package short name (e.g. "users" from "@boopkit/cap-users")
|
|
@@ -174,6 +175,8 @@ function listCapabilities() {
|
|
|
174
175
|
if ((!entry.isDirectory() && !entry.isSymbolicLink()) || !entry.name.startsWith('cap-'))
|
|
175
176
|
continue;
|
|
176
177
|
const capName = entry.name.replace(/^cap-/, '');
|
|
178
|
+
if (!includeTest && capName.startsWith('_'))
|
|
179
|
+
continue;
|
|
177
180
|
if (seen.has(capName))
|
|
178
181
|
continue;
|
|
179
182
|
const cap = getCapabilityFromPackage(capName, [process.cwd()]);
|
|
@@ -190,6 +193,8 @@ function listCapabilities() {
|
|
|
190
193
|
for (const entry of entries) {
|
|
191
194
|
if (!entry.isDirectory())
|
|
192
195
|
continue;
|
|
196
|
+
if (!includeTest && entry.name.startsWith('_'))
|
|
197
|
+
continue;
|
|
193
198
|
if (seen.has(entry.name))
|
|
194
199
|
continue;
|
|
195
200
|
const cap = getCapabilityFromSourceTree(entry.name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boopkit/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "CLI tool to scaffold new projects from boop profiles and capabilities",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"workspaces": [
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "tsc && node tools/generate-version-manifest.js",
|
|
22
|
+
"build:caps": "./tools/build-caps.sh",
|
|
23
|
+
"publish" : "./tools/publish-caps.sh",
|
|
22
24
|
"dev": "tsx src/cli.ts",
|
|
23
25
|
"start": "node dist/cli.js",
|
|
24
26
|
"test": "jest"
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
This is a **boop**-managed project. Use boop commands — don't reinvent what boop already provides.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Conversational style
|
|
6
|
+
When the user asks a question, it is for informational purpose and not a veiled request for action. Unless the user says a colloquially phrased command like "can you write a test for X" or "can you add a database", you should not take any action. If the user wants you to do something, they will ask you to do it directly.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
2. Follow the setup hints to configure your environment
|
|
9
|
-
3. Run `npm run dev` to start the development server
|
|
8
|
+
Don't confirm a hypothesis (or take action) without observation - logs, tests, and other data are your friends. If you don't have the information you need to answer a question, find it (eg. run db queries, look at logs, add more logging, etc.) or ask for it instead of guessing.
|
|
10
9
|
|
|
11
10
|
## How to work in this project
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
0. **Read the skills index now.** Open [skills/index.md](skills/index.md) before doing anything else in this session. You need to know what skills exist before you can apply rule 1.
|
|
13
|
+
1. **Check skills first.** Before coding, reviewing, testing, designing, debugging, filing issues, or proposing any non-trivial change, check [skills/index.md](skills/index.md) for a matching skill and follow its process. Do not rely on general knowledge when a project skill exists.
|
|
14
|
+
2. **Use boop for capabilities.** Run `boop caps` to see what's available. To add features like database, auth, or other services and infrastructure, run `boop add <capability>` — don't install or wire things manually.
|
|
15
|
+
3. **Check project status.** If the system isn't working or new capabilities need to be added run `boop status` to see what's configured and what needs attention.
|
|
16
16
|
4. **Run `boop --help`** for the full command list.
|
|
17
17
|
|
|
18
18
|
## Boop extension model
|