@myvillage/cli 1.8.2 → 1.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myvillage/cli",
3
- "version": "1.8.2",
3
+ "version": "1.8.4",
4
4
  "description": "MyVillageOS CLI for community developers",
5
5
  "type": "module",
6
6
  "bin": {
@@ -6,7 +6,6 @@ import { villageSpinner, brand } from '../utils/brand.js';
6
6
  import inquirer from 'inquirer';
7
7
  import { isAuthenticated } from '../utils/auth.js';
8
8
  import { createGameCommand } from './create-game.js';
9
- import { createPortalProject, createDataLabelingProject } from '../utils/app-templates.js';
10
9
  import { createAgenticAppProject } from '../utils/agentic-templates.js';
11
10
  import { registerOAuthClient } from '../utils/api.js';
12
11
 
@@ -161,39 +160,19 @@ async function applicationFlow() {
161
160
  }
162
161
  }
163
162
 
164
- // Determine if we need the agentic backend layer or just the frontend portal
165
- const needsAgenticBackend = includeMcp || includeRestApi;
166
-
167
- // Scaffold project
163
+ // Scaffold project (always Next.js)
168
164
  const spinner = villageSpinner('Creating application...').start();
169
165
  try {
170
- if (needsAgenticBackend) {
171
- // Full-stack: Next.js app with server-side OAuth, MCP, and API integration
172
- createAgenticAppProject(targetDir, {
173
- name: basics.name,
174
- description: basics.description,
175
- authStrategy: oauthCredentials ? authStrategy : (authStrategy === 'oauth' ? 'none' : authStrategy),
176
- features,
177
- includeMcp,
178
- includeRestApi,
179
- mcpToolGroups,
180
- oauthCredentials,
181
- });
182
- } else {
183
- // Frontend-only: React + Vite portal (existing template)
184
- // Map authStrategy to the features array the portal template expects
185
- const portalFeatures = [...features];
186
- if (hasOAuth && oauthCredentials) {
187
- portalFeatures.push('auth');
188
- }
189
-
190
- createPortalProject(targetDir, {
191
- name: basics.name,
192
- description: basics.description,
193
- features: portalFeatures,
194
- oauthCredentials,
195
- });
196
- }
166
+ createAgenticAppProject(targetDir, {
167
+ name: basics.name,
168
+ description: basics.description,
169
+ authStrategy: oauthCredentials ? authStrategy : (authStrategy === 'oauth' ? 'none' : authStrategy),
170
+ features,
171
+ includeMcp,
172
+ includeRestApi,
173
+ mcpToolGroups,
174
+ oauthCredentials,
175
+ });
197
176
 
198
177
  spinner.text = 'Installing dependencies...';
199
178
  execSync('npm install', { cwd: targetDir, stdio: 'pipe' });
@@ -205,14 +184,9 @@ async function applicationFlow() {
205
184
  console.log(brand.teal(' Next steps:'));
206
185
  console.log();
207
186
  console.log(` ${brand.gold('cd')} ${slug}`);
208
- if (needsAgenticBackend) {
209
- console.log(` ${brand.gold('npm run dev')} ${brand.teal('- Start development server')}`);
210
- console.log(` ${brand.gold('npm run build')} ${brand.teal('- Build for production')}`);
211
- console.log(` ${brand.gold('npm start')} ${brand.teal('- Start production server')}`);
212
- } else {
213
- console.log(` ${brand.gold('npm run dev')} ${brand.teal('- Start development server')}`);
214
- console.log(` ${brand.gold('npm run build')} ${brand.teal('- Build for production')}`);
215
- }
187
+ console.log(` ${brand.gold('npm run dev')} ${brand.teal('- Start development server')}`);
188
+ console.log(` ${brand.gold('npm run build')} ${brand.teal('- Build for production')}`);
189
+ console.log(` ${brand.gold('npm start')} ${brand.teal('- Start production server')}`);
216
190
  console.log();
217
191
 
218
192
  // Summary
@@ -86,7 +86,7 @@ export function createAgenticAppProject(targetDir, options) {
86
86
 
87
87
  // Write root files
88
88
  writeFileSync(join(targetDir, 'package.json'), generatePackageJson(slug, description, includeMcp));
89
- writeFileSync(join(targetDir, 'next.config.js'), generateNextConfig());
89
+ writeFileSync(join(targetDir, 'next.config.mjs'), generateNextConfig());
90
90
  writeFileSync(join(targetDir, '.gitignore'), generateGitignore());
91
91
  writeFileSync(join(targetDir, '.env.local'), generateEnv(oauthCredentials, hasOAuth, includeMcp));
92
92
  writeFileSync(join(targetDir, '.env.example'), generateEnvExample(hasOAuth, includeMcp));
@@ -318,7 +318,7 @@ ${includeMcp ? '- **lib/mcp-client.js** — MCP client for MyVillageOS tools\n'
318
318
  ## Brand Colors
319
319
 
320
320
  | Color | Hex |
321
- |------------|-----------||
321
+ |------------|-----------|
322
322
  | Gold | ${BRAND.gold} |
323
323
  | Brown | ${BRAND.brown} |
324
324
  | Green | ${BRAND.green} |
@@ -1398,7 +1398,7 @@ export default function AgentChat() {
1398
1398
  <div className="agent-chat-messages">
1399
1399
  {messages.length === 0 && <p style={{ color: '#999' }}>Ask the agent anything about your village...</p>}
1400
1400
  {messages.map((msg, i) => (
1401
- <div key={i} className={\`message \${msg.role}\`}>
1401
+ <div key={i} className={`message ${msg.role}`}>
1402
1402
  <strong>{msg.role === 'user' ? 'You' : 'Agent'}:</strong> {msg.text}
1403
1403
  </div>
1404
1404
  ))}