@biznetgio/neo-app 0.4.19 → 0.4.20

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/package.json +1 -1
  2. package/src/mcp/tools.js +38 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biznetgio/neo-app",
3
- "version": "0.4.19",
3
+ "version": "0.4.20",
4
4
  "description": "NEO App CLI — one-command agent onboarding, MCP server, and project ops for coding agents (Codex, Claude Code).",
5
5
  "type": "module",
6
6
  "bin": {
package/src/mcp/tools.js CHANGED
@@ -304,6 +304,44 @@ export const TOOLS = [
304
304
  return { ...est, priceBook: orgId ? `org:${orgId}` : 'global-defaults' };
305
305
  },
306
306
  },
307
+ {
308
+ name: 'neo_scan_repo',
309
+ description:
310
+ 'Scan a Git repository and return its deployable components (monorepo-aware): each root directory with a build marker, its detected stack, and a suggested service type + build type. Use it to show the user the component inventory and ask which to deploy — never collapse a monorepo into one service without explicit selection (handoff 6). Read-only; deploys nothing.',
311
+ mutating: false,
312
+ schema: {
313
+ type: 'object',
314
+ properties: {
315
+ repoUrl: str('Git repository URL (https://host/owner/repo)'),
316
+ branch: str('Branch (optional; default the repo default branch)'),
317
+ gitProviderId: str('Git profile id for a private repo (optional)'),
318
+ },
319
+ required: ['repoUrl'],
320
+ },
321
+ async call(api, args) {
322
+ const { data } = await api.post('/api/v1/repos/scan', { repoUrl: args.repoUrl, branch: args.branch, gitProviderId: args.gitProviderId });
323
+ const subdirs = data?.subdirs || [];
324
+ const components = subdirs.map((s) => ({
325
+ path: s.path || '.',
326
+ name: s.name,
327
+ stack: s.type, // docker | node | go | python | java | php | ruby | rust | static
328
+ suggestedServiceType: s.type === 'static' ? 'static_site' : 'web',
329
+ suggestedBuildType: s.type === 'docker' ? 'dockerfile' : 'railpack',
330
+ contextDir: s.path || undefined,
331
+ }));
332
+ return {
333
+ repoUrl: args.repoUrl,
334
+ count: components.length,
335
+ components,
336
+ note:
337
+ components.length > 1
338
+ ? 'Monorepo: multiple deployable components. Ask the user which to deploy and create each selected one with its `contextDir` — do NOT collapse them into one service (handoff 6). Worker vs web cannot be inferred from the tree alone; confirm the type with the user.'
339
+ : components.length === 1
340
+ ? 'One deployable component found.'
341
+ : 'No deployable component found (no Dockerfile/package.json/go.mod/requirements.txt/index.html/… at any root).',
342
+ };
343
+ },
344
+ },
307
345
  {
308
346
  name: 'neo_list_templates',
309
347
  description: 'List deployable templates (e.g. wordpress, n8n, redis).',