@biznetgio/neo-app 0.4.17 → 0.4.18
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 +1 -1
- package/src/mcp/tools.js +46 -1
package/package.json
CHANGED
package/src/mcp/tools.js
CHANGED
|
@@ -105,7 +105,8 @@ export const TOOLS = [
|
|
|
105
105
|
controlPlane,
|
|
106
106
|
resourceTypes,
|
|
107
107
|
// Verbs this MCP build exposes today (no create-DB/queue/cron/bucket, no costed plan/apply yet).
|
|
108
|
-
lifecycleVerbs: ['create', 'list', 'get', 'deploy', 'scale', 'logs', 'get_variables', 'set_variable', 'delete', 'list_approvals', 'get_approval', 'get_credit', 'list_templates'],
|
|
108
|
+
lifecycleVerbs: ['create', 'list', 'get', 'deploy', 'scale', 'logs', 'get_variables', 'set_variable', 'estimate', 'bind', 'unbind', 'run_cron', 'delete', 'list_approvals', 'get_approval', 'get_credit', 'list_templates'],
|
|
109
|
+
bindings: { supported: true, targets: ['neo_db', 'neo_queue'], writeOnly: true, note: 'neo_bind_resource injects DATABASE_URL/NATS_URL server-side at deploy; the secret is never returned (handoff 5)' },
|
|
109
110
|
sourceTypes: ['git', 'image', 'dockerfile', 'local', 'template'],
|
|
110
111
|
environments: ['staging', 'production'],
|
|
111
112
|
pricing,
|
|
@@ -572,6 +573,50 @@ export const TOOLS = [
|
|
|
572
573
|
return redactSecrets((await api.get(`/api/v1/buckets/${args.bucketId}`)).data);
|
|
573
574
|
},
|
|
574
575
|
},
|
|
576
|
+
// --- Typed bindings (handoff 5): attach a DB/queue to a consumer service. The
|
|
577
|
+
// connection string is injected as an env var SERVER-SIDE at the consumer's next
|
|
578
|
+
// deploy (marked a secret) — it is never returned to the agent (write-only). ---
|
|
579
|
+
{
|
|
580
|
+
name: 'neo_bind_resource',
|
|
581
|
+
description:
|
|
582
|
+
'Bind a managed database or queue to a consumer service so its connection is injected as an environment variable at the consumer\'s next deploy — WITHOUT ever exposing the secret to you (handoff 5, write-only). envKey defaults to DATABASE_URL (neo_db) or NATS_URL (neo_queue). After binding, redeploy the consumer (neo_deploy) for it to take effect. The target and consumer must be in the same project.',
|
|
583
|
+
mutating: true,
|
|
584
|
+
schema: {
|
|
585
|
+
type: 'object',
|
|
586
|
+
properties: {
|
|
587
|
+
appId: str('Consumer service/app id that will receive the env var (from neo_list_services)'),
|
|
588
|
+
targetType: { type: 'string', enum: ['neo_db', 'neo_queue'], description: 'neo_db | neo_queue — the resource to attach' },
|
|
589
|
+
targetId: str('The database or queue id to bind'),
|
|
590
|
+
envKey: str('Env var name to inject (optional; default DATABASE_URL for neo_db, NATS_URL for neo_queue)'),
|
|
591
|
+
},
|
|
592
|
+
required: ['appId', 'targetType', 'targetId'],
|
|
593
|
+
},
|
|
594
|
+
async call(api, args) {
|
|
595
|
+
const { appId, ...body } = args;
|
|
596
|
+
const { status, data } = await api.post(`/api/v1/apps/${appId}/bindings`, body);
|
|
597
|
+
return redactSecrets(result(status, data));
|
|
598
|
+
},
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
name: 'neo_list_bindings',
|
|
602
|
+
description: 'List the resource bindings attached to a consumer service — the env keys and target resources, never the secret connection values.',
|
|
603
|
+
mutating: false,
|
|
604
|
+
schema: { type: 'object', properties: { appId: str('Consumer service/app id') }, required: ['appId'] },
|
|
605
|
+
async call(api, args) {
|
|
606
|
+
return redactSecrets((await api.get(`/api/v1/apps/${args.appId}/bindings`)).data);
|
|
607
|
+
},
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
name: 'neo_unbind_resource',
|
|
611
|
+
description: 'Remove a resource binding by id. The env var stops being injected on the consumer\'s next deploy. Removes the wiring only — the database/queue itself is untouched.',
|
|
612
|
+
mutating: true,
|
|
613
|
+
destructive: true,
|
|
614
|
+
schema: { type: 'object', properties: { bindingId: str('Binding id (from neo_list_bindings)') }, required: ['bindingId'] },
|
|
615
|
+
async call(api, args) {
|
|
616
|
+
const { status, data } = await api.del(`/api/v1/bindings/${args.bindingId}`);
|
|
617
|
+
return result(status, data);
|
|
618
|
+
},
|
|
619
|
+
},
|
|
575
620
|
// --- Cleanup (handoff 3.6): MCP can delete every resource type it can reach, so
|
|
576
621
|
// an agent never leaks a resource it created. These are DESTRUCTIVE and permanent;
|
|
577
622
|
// the server hard-deletes the record and tears down the running workload. ---
|