@basaltkit/ai 1.6.2 → 1.6.4
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/commands.js +18 -1
- package/dist/make/repository.js +1 -1
- package/package.json +3 -3
package/dist/commands.js
CHANGED
|
@@ -73,7 +73,13 @@ export function aiCommands(options = {}) {
|
|
|
73
73
|
}),
|
|
74
74
|
defineCommand({
|
|
75
75
|
name: 'ai:fix',
|
|
76
|
-
description: 'Apply a doctor fix
|
|
76
|
+
description: 'Apply a doctor fix, or every auto-fixable issue',
|
|
77
|
+
usage: '[<diagnostic-id>] [--dry-run] [--yes] [--dir=<path>]',
|
|
78
|
+
flags: {
|
|
79
|
+
'--dry-run': 'Show the edits, write nothing',
|
|
80
|
+
'--yes': 'Skip the confirmation',
|
|
81
|
+
'--dir=<path>': 'Project root (default: the current directory)',
|
|
82
|
+
},
|
|
77
83
|
async handle({ args, flags, io }) {
|
|
78
84
|
const root = rootOf(flags);
|
|
79
85
|
const ctx = detectProject(root);
|
|
@@ -121,6 +127,7 @@ export function aiCommands(options = {}) {
|
|
|
121
127
|
defineCommand({
|
|
122
128
|
name: 'ai:plan',
|
|
123
129
|
description: 'Turn a natural-language request into an architecture plan (read-only)',
|
|
130
|
+
usage: '"<what you want to build>" [--dir=<path>]',
|
|
124
131
|
async handle({ args, flags, io }) {
|
|
125
132
|
const request = args.join(' ').trim();
|
|
126
133
|
if (!request) {
|
|
@@ -153,6 +160,16 @@ export function aiCommands(options = {}) {
|
|
|
153
160
|
defineCommand({
|
|
154
161
|
name: 'ai:make',
|
|
155
162
|
description: 'Plan then implement a feature: scaffold + domain fields, with a review gate',
|
|
163
|
+
usage: '"<what to build>" [--dry-run] [--yes] [--force] [--migrate | --no-migrate] [--review] [--verify]',
|
|
164
|
+
flags: {
|
|
165
|
+
'--dry-run': 'Show what would be generated, write nothing',
|
|
166
|
+
'--yes': 'Skip the confirmation (also runs the migration)',
|
|
167
|
+
'--force': 'Overwrite files that already exist',
|
|
168
|
+
'--migrate': 'Run prisma db push for the new models',
|
|
169
|
+
'--no-migrate': 'Never offer the migration',
|
|
170
|
+
'--review': 'Agent review of the generated code',
|
|
171
|
+
'--verify': 'Typecheck the project afterwards',
|
|
172
|
+
},
|
|
156
173
|
async handle({ args, flags, io }) {
|
|
157
174
|
const request = args.join(' ').trim();
|
|
158
175
|
if (!request) {
|
package/dist/make/repository.js
CHANGED
|
@@ -84,7 +84,7 @@ export function renderPrismaRepository(name, fields, options) {
|
|
|
84
84
|
// A missing tenant is a client error (400) — never a silent 500.
|
|
85
85
|
const currentTenantId = (): string => {
|
|
86
86
|
const id = (tryCtx()?.['tenant'] as { id?: string } | undefined)?.id
|
|
87
|
-
if (!id) throw new HttpError(400, 'TENANT_REQUIRED', 'No tenant in context —
|
|
87
|
+
if (!id) throw new HttpError(400, 'TENANT_REQUIRED', 'No tenant in context — reach this route the way tenancyPlugin resolves tenants (subdomain, domain, route or x-tenant-id header).')
|
|
88
88
|
return id
|
|
89
89
|
}
|
|
90
90
|
`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basaltkit/ai",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=22.5.0"
|
|
6
6
|
},
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"zod": "^4.6.7",
|
|
34
|
-
"@basaltkit/
|
|
35
|
-
"@basaltkit/
|
|
34
|
+
"@basaltkit/generator": "^1.7.0",
|
|
35
|
+
"@basaltkit/cli": "^1.10.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^26.6.5",
|