@codapult/cli 0.17.0 → 0.17.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.
- package/dist/commands/setup.js +39 -18
- package/package.json +1 -1
package/dist/commands/setup.js
CHANGED
|
@@ -26,6 +26,8 @@ const BUILT_IN_PRESETS = {
|
|
|
26
26
|
ssoProvider: 'none',
|
|
27
27
|
enableAuth: false,
|
|
28
28
|
enableAI: false,
|
|
29
|
+
enableAiChat: false,
|
|
30
|
+
enableRAG: false,
|
|
29
31
|
enableAgents: false,
|
|
30
32
|
enableBatch: false,
|
|
31
33
|
enablePlayground: false,
|
|
@@ -37,7 +39,6 @@ const BUILT_IN_PRESETS = {
|
|
|
37
39
|
enableReferrals: false,
|
|
38
40
|
enableAnalytics: false,
|
|
39
41
|
enableExperiments: false,
|
|
40
|
-
enableRAG: false,
|
|
41
42
|
enableEventStore: false,
|
|
42
43
|
enableOtel: false,
|
|
43
44
|
enableDripCampaigns: false,
|
|
@@ -71,6 +72,8 @@ const DEFAULT_CONFIG = {
|
|
|
71
72
|
jobProvider: 'memory',
|
|
72
73
|
enableAuth: true,
|
|
73
74
|
enableAI: true,
|
|
75
|
+
enableAiChat: true,
|
|
76
|
+
enableRAG: false,
|
|
74
77
|
enableAgents: true,
|
|
75
78
|
enableBatch: true,
|
|
76
79
|
enablePlayground: true,
|
|
@@ -93,7 +96,6 @@ const DEFAULT_CONFIG = {
|
|
|
93
96
|
enableReferrals: true,
|
|
94
97
|
enableAnalytics: true,
|
|
95
98
|
enableChangelog: true,
|
|
96
|
-
enableRAG: false,
|
|
97
99
|
enableWebhooks: true,
|
|
98
100
|
enableAuditLog: true,
|
|
99
101
|
enableReports: true,
|
|
@@ -140,6 +142,7 @@ function resolvePreset(raw) {
|
|
|
140
142
|
config.enableAuth = false;
|
|
141
143
|
}
|
|
142
144
|
if (!config.enableAI) {
|
|
145
|
+
config.enableAiChat = false;
|
|
143
146
|
config.enableRAG = false;
|
|
144
147
|
config.enableAgents = false;
|
|
145
148
|
config.enableBatch = false;
|
|
@@ -160,6 +163,7 @@ const MODULE_REMOVALS = [
|
|
|
160
163
|
`${APP}/(protected)/(dashboard)`,
|
|
161
164
|
`${APP}/(protected)/(admin)`,
|
|
162
165
|
'src/app/api/auth',
|
|
166
|
+
'src/lib/auth/index.test.ts',
|
|
163
167
|
'src/lib/auth/adapters',
|
|
164
168
|
'src/lib/auth/client-adapter.test.ts',
|
|
165
169
|
'src/components/auth/AuthForm.tsx',
|
|
@@ -185,6 +189,28 @@ const MODULE_REMOVALS = [
|
|
|
185
189
|
],
|
|
186
190
|
label: 'AI Chat',
|
|
187
191
|
},
|
|
192
|
+
{
|
|
193
|
+
key: 'enableAiChat',
|
|
194
|
+
paths: [
|
|
195
|
+
`${APP}/(protected)/(dashboard)/dashboard/ai/chat`,
|
|
196
|
+
'src/components/ai/ChatUI.tsx',
|
|
197
|
+
'src/app/api/ai/chat',
|
|
198
|
+
],
|
|
199
|
+
label: 'AI Chat',
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
key: 'enableRAG',
|
|
203
|
+
paths: [
|
|
204
|
+
'src/lib/ai/chunker.ts',
|
|
205
|
+
'src/lib/ai/chunker.test.ts',
|
|
206
|
+
'src/lib/ai/embeddings',
|
|
207
|
+
'src/lib/ai/vector-store',
|
|
208
|
+
'src/lib/ai/rag.ts',
|
|
209
|
+
'src/app/api/ai/index',
|
|
210
|
+
'src/app/api/ai/search',
|
|
211
|
+
],
|
|
212
|
+
label: 'RAG Pipeline',
|
|
213
|
+
},
|
|
188
214
|
{
|
|
189
215
|
key: 'enableAgents',
|
|
190
216
|
paths: [
|
|
@@ -240,8 +266,6 @@ const MODULE_REMOVALS = [
|
|
|
240
266
|
'src/lib/actions/organizations.test.ts',
|
|
241
267
|
'src/lib/payments/seats.ts',
|
|
242
268
|
'src/lib/payments/seats.test.ts',
|
|
243
|
-
'src/lib/guards.ts',
|
|
244
|
-
'src/lib/guards.test.ts',
|
|
245
269
|
'src/app/api/scim',
|
|
246
270
|
],
|
|
247
271
|
label: 'Teams',
|
|
@@ -489,6 +513,7 @@ const FEATURE_ENV_VARS = {
|
|
|
489
513
|
enableFeatureRequests: 'ENABLE_FEATURE_REQUESTS',
|
|
490
514
|
enableCompare: 'ENABLE_COMPARE',
|
|
491
515
|
enableAI: 'ENABLE_AI_CORE',
|
|
516
|
+
enableAiChat: 'ENABLE_AI_CHAT',
|
|
492
517
|
enableRAG: 'ENABLE_AI_RAG',
|
|
493
518
|
enableAgents: 'ENABLE_AI_AGENTS',
|
|
494
519
|
enableBatch: 'ENABLE_AI_BATCH',
|
|
@@ -521,8 +546,10 @@ const PRUNE_MARKER_FILES = [
|
|
|
521
546
|
'src/lib/actions/admin.ts',
|
|
522
547
|
'src/lib/actions/impersonation.ts',
|
|
523
548
|
'src/lib/scheduled-reports/index.ts',
|
|
549
|
+
'src/lib/guards.ts',
|
|
550
|
+
'src/lib/guards.test.ts',
|
|
524
551
|
'src/config/marketing.test.ts',
|
|
525
|
-
'src/config/
|
|
552
|
+
'src/config/env-schema.ts',
|
|
526
553
|
'src/instrumentation.ts',
|
|
527
554
|
];
|
|
528
555
|
function generateEnvFile(root, config) {
|
|
@@ -541,17 +568,10 @@ function generateEnvFile(root, config) {
|
|
|
541
568
|
JOB_PROVIDER: config.jobProvider,
|
|
542
569
|
};
|
|
543
570
|
for (const [cliKey, envVar] of Object.entries(FEATURE_ENV_VARS)) {
|
|
544
|
-
|
|
545
|
-
const enabled = config[key];
|
|
546
|
-
if (!enabled)
|
|
571
|
+
if (config[cliKey] === false) {
|
|
547
572
|
replacements[envVar] = 'false';
|
|
548
|
-
|
|
549
|
-
replacements[envVar] = 'true';
|
|
573
|
+
}
|
|
550
574
|
}
|
|
551
|
-
// The setup command treats AI as a product bundle. Keep chat enabled by
|
|
552
|
-
// default for that bundle, while allowing users to disable it manually
|
|
553
|
-
// after setup without disabling the shared AI core.
|
|
554
|
-
replacements.ENABLE_AI_CHAT = config.enableAI ? 'true' : 'false';
|
|
555
575
|
for (const [key, value] of Object.entries(replacements)) {
|
|
556
576
|
const regex = new RegExp(`^${key}=.*$`, 'm');
|
|
557
577
|
if (regex.test(content)) {
|
|
@@ -728,6 +748,11 @@ async function interactiveSetup() {
|
|
|
728
748
|
enableAuth: authEnabled,
|
|
729
749
|
enableSSO: ssoEnabled,
|
|
730
750
|
enableAI: emptyLine() && (await confirm(iface, 'Enable AI core and chat module?')),
|
|
751
|
+
enableAiChat: await confirm(iface, 'Enable AI Chat?', true),
|
|
752
|
+
enableRAG: await confirm(iface, 'Enable RAG pipeline (vector search)?', false),
|
|
753
|
+
enableAgents: await confirm(iface, 'Enable AI agents and tools?', true),
|
|
754
|
+
enableBatch: await confirm(iface, 'Enable AI batch processing?', true),
|
|
755
|
+
enablePlayground: await confirm(iface, 'Enable AI playground?', true),
|
|
731
756
|
enableBlog: await confirm(iface, 'Enable Blog module?'),
|
|
732
757
|
enableTeams: authEnabled && (await confirm(iface, 'Enable Teams/Organizations?')),
|
|
733
758
|
enableWaitlist: await confirm(iface, 'Enable Waitlist page?'),
|
|
@@ -746,10 +771,6 @@ async function interactiveSetup() {
|
|
|
746
771
|
enableReferrals: authEnabled && (await confirm(iface, 'Enable referral program?')),
|
|
747
772
|
enableAnalytics: await confirm(iface, 'Enable built-in analytics?'),
|
|
748
773
|
enableChangelog: await confirm(iface, 'Enable Changelog page?'),
|
|
749
|
-
enableRAG: await confirm(iface, 'Enable RAG pipeline (vector search)?', false),
|
|
750
|
-
enableAgents: await confirm(iface, 'Enable AI agents and tools?', true),
|
|
751
|
-
enableBatch: await confirm(iface, 'Enable AI batch processing?', true),
|
|
752
|
-
enablePlayground: await confirm(iface, 'Enable AI playground?', true),
|
|
753
774
|
enableWebhooks: authEnabled && (await confirm(iface, 'Enable outgoing webhooks?')),
|
|
754
775
|
enableAuditLog: authEnabled && (await confirm(iface, 'Enable audit log / activity feed?')),
|
|
755
776
|
enableReports: authEnabled && (await confirm(iface, 'Enable scheduled email reports?')),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codapult/cli",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "Codapult CLI — manage, update, and diagnose your Codapult SaaS project",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"packageManager": "pnpm@11.22.0+sha512.1ff870c4c6133dfd88fb2afc46dd13d47f09c9794b438c6fdb47ca98caf3bc16381ee0be93a091b8e3824cf01f889f46d7d9e20910fb0be1ab0fb5baa80dd621",
|