@biznetgio/neo-app 0.4.11 → 0.4.12

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 +54 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biznetgio/neo-app",
3
- "version": "0.4.11",
3
+ "version": "0.4.12",
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
@@ -5,6 +5,7 @@
5
5
  import { resolve } from 'node:path';
6
6
  import { statSync } from 'node:fs';
7
7
  import { deploySource } from '../deploySource.js';
8
+ import { pkgVersion } from '../util.js';
8
9
 
9
10
  const str = (description) => ({ type: 'string', description });
10
11
  const int = (description) => ({ type: 'integer', description });
@@ -32,6 +33,59 @@ export const TOOLS = [
32
33
  return api.whoami();
33
34
  },
34
35
  },
36
+ {
37
+ name: 'neo_get_capabilities',
38
+ description:
39
+ 'Discover this MCP server version, the control-plane it targets, and which resource types, lifecycle verbs, source types and environments are actually supported today. Call this FIRST to check compatibility before planning a deployment. The support matrix is honest about current gaps (handoff 3.2).',
40
+ mutating: false,
41
+ schema: { type: 'object', properties: {} },
42
+ async call(api) {
43
+ // Control-plane version (open /version endpoint). Best-effort: a null
44
+ // version just means that probe failed, not that the server is down.
45
+ const controlPlane = { baseUrl: api.baseUrl, version: null, gitCommit: null };
46
+ try {
47
+ const v = (await api.get('/version')).data || {};
48
+ controlPlane.version = v.version ?? null;
49
+ controlPlane.gitCommit = v.gitCommit ?? null;
50
+ } catch { /* leave nulls */ }
51
+
52
+ // Price book is readable by any member; surface whether cost data is
53
+ // available (cost consent / neo_plan_stack will consume it).
54
+ const pricing = { readable: false, version: null };
55
+ try {
56
+ const p = (await api.get('/api/v1/pricing')).data;
57
+ pricing.readable = true;
58
+ pricing.version = (p && !Array.isArray(p) && p.version) || null;
59
+ } catch { /* not readable */ }
60
+
61
+ // Honest support matrix: what THIS build does, not the roadmap. `create`
62
+ // is true, false, or 'via_folder' (created through neo_deploy_folder).
63
+ const resourceTypes = [
64
+ { type: 'web', create: true, deploy: true, scale: true, logs: true, variables: true, delete: false },
65
+ { type: 'template', create: true, deploy: true, scale: false, logs: true, variables: true, delete: false },
66
+ { type: 'static_site', create: false, deploy: true, scale: false, logs: true, variables: true, delete: false, note: 'currently planned/created as web (handoff 4.3)' },
67
+ { type: 'worker', create: false, deploy: true, scale: true, logs: true, variables: true, delete: false, note: 'currently planned/created as web (handoff 4.2)' },
68
+ { type: 'database', create: false, deploy: false, delete: false, note: 'REST exists; no MCP tool yet (handoff 4.4)' },
69
+ { type: 'queue', create: false, deploy: false, delete: false, note: 'REST exists; no MCP tool yet (handoff 4.5)' },
70
+ { type: 'cron', create: false, deploy: false, delete: false, note: 'REST exists; no MCP tool yet (handoff 4.6)' },
71
+ { type: 'object_storage', create: false, deploy: false, delete: false, note: 'REST exists; no MCP tool yet (handoff 4.7)' },
72
+ ];
73
+
74
+ return {
75
+ mcp: { name: 'neo-app', version: pkgVersion() },
76
+ controlPlane,
77
+ resourceTypes,
78
+ // Verbs this MCP build exposes today (no create-DB/queue/cron/bucket, no delete, no costed plan/apply yet).
79
+ lifecycleVerbs: ['list', 'get', 'deploy', 'scale', 'logs', 'get_variables', 'set_variable', 'list_approvals', 'get_approval', 'get_credit', 'list_templates'],
80
+ sourceTypes: ['git', 'image', 'dockerfile', 'local', 'template'],
81
+ environments: ['staging', 'production'],
82
+ pricing,
83
+ costConsent: { planApplyEnforced: false, note: 'neo_plan_stack / Approve & Create not implemented yet (handoff 3.3-3.4)' },
84
+ minClientVersion: pkgVersion(),
85
+ deprecations: [],
86
+ };
87
+ },
88
+ },
35
89
  {
36
90
  name: 'neo_list_projects',
37
91
  description: 'List projects in an organization. Omit orgId to use the first org.',