@zibby/mcp-cli 0.3.2 → 0.3.5
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/index.js +18 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -479,11 +479,13 @@ server.tool(
|
|
|
479
479
|
appType: z.string().min(1).optional().describe('Catalog id (e.g. "grafana", "gastown"). MUTUALLY EXCLUSIVE with goal — pass exactly one. Use this when the user wants something from the curated catalog.'),
|
|
480
480
|
goal: z.string().min(1).optional().describe('Free-form description of what to install (e.g. "install n8n on port 5678 with sqlite persistence"). MUTUALLY EXCLUSIVE with appType. Use this when the user wants something NOT in catalog OR has custom config needs — the agent-ops bootstrap will follow the description to install whatever it describes. Examples: "install n8n", "set up an Outline wiki at /wiki", "deploy a basic Rails app from <repo URL>". The user is responsible for any license terms of software they install via this path.'),
|
|
481
481
|
projectId: z.string().min(1).describe('Project the instance attaches to'),
|
|
482
|
-
name: z.string().min(1).optional().describe('Display name for the instance (
|
|
482
|
+
name: z.string().min(1).optional().describe('Display name for the instance (shown as the dashboard header). ALWAYS pick a meaningful name based on WHAT is being installed and its purpose, NOT the install command. Good examples: `n8n-workflows`, `team-wiki`, `vaultwarden-secrets`, `rails-blog`. Bad examples: `test`, `goal-test`, `instance-1`, `install-n8n`. Max 80 chars, alphanumeric + dashes. Defaults to appType on catalog deploys; for goal deploys you MUST provide one or the server falls back to the first line of the goal text which is usually ugly.'),
|
|
483
483
|
provider: z.enum(['claude', 'codex']).optional().describe('Agent provider. Default "claude" (Anthropic). "codex" runs the OpenAI Codex agent and requires an OpenAI API key in workspace-credentials.'),
|
|
484
484
|
architecture: z.enum(['x86_64', 'arm64']).optional().describe('CPU architecture for the Fargate task. "arm64" runs on AWS Graviton — ~20% cheaper compute (same price to user). "x86_64" is the historical default + widest catalog compatibility. Omit to accept the catalog tile\'s preferred arch (first entry in its `architectures` array — usually arm64 for tiles that support it).'),
|
|
485
|
+
model: z.string().min(1).optional().describe('Claude model identifier (e.g. claude-sonnet-4-6). Overrides the agent-ops bootstrap default. Use a stronger model (Opus) for complex installs; cheaper (Haiku) for trivial.'),
|
|
486
|
+
anthropicToken: z.string().regex(/^sk-ant-(oat01|api03)-/, 'must be sk-ant-oat01-* or sk-ant-api03-*').optional().describe('Per-deploy Claude credential override. Defaults to the workspace-stored token. SENSITIVE — never log or persist.'),
|
|
485
487
|
},
|
|
486
|
-
async ({ appType, goal, projectId, name, provider, architecture }) => {
|
|
488
|
+
async ({ appType, goal, projectId, name, provider, architecture, model, anthropicToken }) => {
|
|
487
489
|
// Enforce mutual exclusivity client-side so the agent gets a clear
|
|
488
490
|
// error before we burn an HTTP round-trip. Backend enforces the
|
|
489
491
|
// same invariant (apps.js::deployApp) but this gives a faster
|
|
@@ -507,7 +509,14 @@ server.tool(
|
|
|
507
509
|
if (name) args.push('--name', name);
|
|
508
510
|
if (provider) args.push('--provider', provider);
|
|
509
511
|
if (architecture) args.push('--arch', architecture);
|
|
510
|
-
|
|
512
|
+
if (model) args.push('--model', model);
|
|
513
|
+
// anthropicToken is SENSITIVE. Forwarded to the @zibby/cli subprocess
|
|
514
|
+
// via ZIBBY_ANTHROPIC_TOKEN env (NOT argv) so the token never lands
|
|
515
|
+
// in /proc/<pid>/cmdline or argv-scraping ps tools. The CLI sees the
|
|
516
|
+
// env, applies the same regex check, and passes it as a body field.
|
|
517
|
+
const extraEnv = { ZIBBY_API_KEY: apiKey };
|
|
518
|
+
if (anthropicToken) extraEnv.ZIBBY_ANTHROPIC_TOKEN = anthropicToken;
|
|
519
|
+
return cliResult(await runCli(args, { extraEnv }));
|
|
511
520
|
}
|
|
512
521
|
);
|
|
513
522
|
|
|
@@ -515,7 +524,7 @@ server.tool(
|
|
|
515
524
|
// resources, app version, project.
|
|
516
525
|
server.tool(
|
|
517
526
|
'zibby_get_app',
|
|
518
|
-
'Show one deployed app instance: status (running / pending / failed), running task count, app type+version, resources, public URL, project. Use when the user asks "is my app up?" or "what URL is it on?".',
|
|
527
|
+
'Show one deployed app instance: status (running / pending / failed), running task count, app type+version, resources, public URL, project. For multi-container apps the output also includes a per-service table (name/status/health/exit code) so the agent can diagnose which sidecar is unhealthy. Use when the user asks "is my app up?" or "what URL is it on?".',
|
|
519
528
|
{
|
|
520
529
|
instanceId: z.string().min(1).describe('Instance ID returned from zibby_deploy_app or zibby_list_apps'),
|
|
521
530
|
projectId: z.string().min(1).optional()
|
|
@@ -535,14 +544,16 @@ server.tool(
|
|
|
535
544
|
// (no streaming over MCP — agents can call again for fresh batches).
|
|
536
545
|
server.tool(
|
|
537
546
|
'zibby_get_app_logs',
|
|
538
|
-
'Fetch the most recent log lines from a deployed app instance. One-shot snapshot (the user should call again for new lines). Useful for diagnosing why an app is stuck, failed to provision, or to confirm a feature works end-to-end. Returns a string with one event per line, prefixed by ISO timestamp.',
|
|
547
|
+
'Fetch the most recent log lines from a deployed app instance. One-shot snapshot (the user should call again for new lines). Useful for diagnosing why an app is stuck, failed to provision, or to confirm a feature works end-to-end. Returns a string with one event per line, prefixed by ISO timestamp. For multi-container apps pass `service` to narrow to one container (e.g. `db`, `web`, `agent-ops`); without it, lines from all containers are interleaved by timestamp.',
|
|
539
548
|
{
|
|
540
549
|
instanceId: z.string().min(1).describe('Instance ID returned from zibby_deploy_app or zibby_list_apps'),
|
|
541
550
|
projectId: z.string().min(1).optional().describe('Project the instance belongs to (picks the right cached API token)'),
|
|
542
551
|
lines: z.number().int().min(1).max(5000).optional().default(200)
|
|
543
552
|
.describe('Max number of recent lines to fetch (default 200, max 5000)'),
|
|
553
|
+
service: z.string().min(1).max(40).optional()
|
|
554
|
+
.describe('Multi-container apps only: limit logs to one service name (e.g. "db", "web", "agent-ops"). Defaults to interleaved across every container in the task.'),
|
|
544
555
|
},
|
|
545
|
-
async ({ instanceId, projectId, lines }) => {
|
|
556
|
+
async ({ instanceId, projectId, lines, service }) => {
|
|
546
557
|
const extraEnv = {};
|
|
547
558
|
if (projectId) {
|
|
548
559
|
const apiKey = getProjectApiToken(projectId);
|
|
@@ -550,6 +561,7 @@ server.tool(
|
|
|
550
561
|
}
|
|
551
562
|
const args = ['app', 'logs', instanceId];
|
|
552
563
|
if (lines) args.push('--lines', String(lines));
|
|
564
|
+
if (service) args.push('--service', service);
|
|
553
565
|
return cliResult(await runCli(args, { extraEnv }));
|
|
554
566
|
}
|
|
555
567
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zibby/mcp-cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Zibby local-essential MCP Server — local workflow scaffold/validate/run + deploy/download (bundles local files). Pure-API tools live in the Zibby Remote MCP (api-prod.zibby.app/mcp).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|