@zibby/skills 0.2.23 → 0.2.24
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/dist/browser.d.ts +0 -17
- package/dist/browser.js +3 -3
- package/dist/code-scan.d.ts +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +97 -97
- package/dist/jira.d.ts +75 -9
- package/dist/jira.js +4 -4
- package/dist/package.json +1 -1
- package/dist/report.d.ts +51 -276
- package/dist/trackers/index.js +12 -12
- package/dist/trackers/jira-adapter.js +11 -11
- package/package.json +1 -1
- package/docs/analysis.md +0 -109
- package/docs/apps/agent-ops.md +0 -130
- package/docs/apps/auth.md +0 -158
- package/docs/apps/deploy.md +0 -207
- package/docs/apps/goal-mode.md +0 -175
- package/docs/apps/index.md +0 -149
- package/docs/apps/managing.md +0 -121
- package/docs/cli-reference.md +0 -494
- package/docs/cloning-repositories.md +0 -285
- package/docs/cloud/bundles.md +0 -92
- package/docs/cloud/dedicated-egress.md +0 -140
- package/docs/cloud/editing-prompts.md +0 -79
- package/docs/cloud/env-vars.md +0 -144
- package/docs/cloud/limits.md +0 -81
- package/docs/cloud/logs.md +0 -104
- package/docs/cloud/triggering.md +0 -128
- package/docs/concepts/agents.md +0 -112
- package/docs/concepts/designing-agents.md +0 -247
- package/docs/concepts/graph.md +0 -83
- package/docs/concepts/sessions.md +0 -70
- package/docs/concepts/skills.md +0 -86
- package/docs/concepts/state.md +0 -106
- package/docs/concepts/sub-graphs.md +0 -227
- package/docs/custom-workflows.md +0 -358
- package/docs/get-started/deploy.md +0 -75
- package/docs/get-started/install.md +0 -60
- package/docs/get-started/run-locally.md +0 -94
- package/docs/get-started/trigger-and-logs.md +0 -90
- package/docs/get-started/use-from-agents.md +0 -153
- package/docs/get-started/your-first-workflow.md +0 -69
- package/docs/getting-started.md +0 -108
- package/docs/installation.md +0 -127
- package/docs/integrations/github.md +0 -73
- package/docs/integrations/gitlab.md +0 -43
- package/docs/integrations/jira.md +0 -71
- package/docs/integrations/lark.md +0 -41
- package/docs/integrations/linear.md +0 -43
- package/docs/integrations/notion.md +0 -33
- package/docs/integrations/plane.md +0 -46
- package/docs/integrations/sentry.md +0 -42
- package/docs/integrations/slack.md +0 -33
- package/docs/intro.md +0 -86
- package/docs/legacy/test-automation.md +0 -111
- package/docs/packages/agent-workflow.md +0 -88
- package/docs/packages/cli.md +0 -73
- package/docs/packages/core.md +0 -72
- package/docs/packages/mcp-browser.md +0 -110
- package/docs/packages/mcp-cli.md +0 -176
- package/docs/packages/memory.md +0 -223
- package/docs/packages/skills.md +0 -218
- package/docs/packages/ui-memory.md +0 -245
- package/docs/recipes/bug-autofix.md +0 -85
- package/docs/recipes/github-ai-scout.md +0 -61
- package/docs/recipes/index.md +0 -68
- package/docs/recipes/pipeline-supervisor.md +0 -57
- package/docs/recipes/sentry-triage.md +0 -93
- package/docs/recipes/test.md +0 -190
- package/docs/reviewing-results.md +0 -114
- package/docs/running-tests.md +0 -134
- package/docs/self-host/backup-restore.md +0 -53
- package/docs/self-host/custom-sidecars.md +0 -136
- package/docs/self-host/index.md +0 -75
- package/docs/self-host/storage.md +0 -50
- package/docs/self-host/troubleshooting.md +0 -48
- package/docs/self-host/upgrade.md +0 -81
- package/docs/skills/browser.md +0 -97
- package/docs/skills/chat-memory.md +0 -122
- package/docs/skills/core-tools.md +0 -80
- package/docs/skills/function-skill.md +0 -93
- package/docs/skills/github.md +0 -91
- package/docs/skills/index.md +0 -46
- package/docs/skills/jira.md +0 -99
- package/docs/skills/lark.md +0 -85
- package/docs/skills/memory.md +0 -92
- package/docs/skills/sentry.md +0 -80
- package/docs/skills/slack.md +0 -89
- package/docs/tests/memory.md +0 -131
- package/docs/triggering-workflows.md +0 -552
- package/docs/workflow-artifact-layout-evaluation.md +0 -119
- package/docs/workflow.md +0 -558
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 1
|
|
3
|
-
title: '@zibby/agent-workflow'
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# @zibby/agent-workflow
|
|
7
|
-
|
|
8
|
-
[](https://www.npmjs.com/package/@zibby/agent-workflow)
|
|
9
|
-
[](https://github.com/ZibbyHQ/agent-workflow)
|
|
10
|
-
[](https://github.com/ZibbyHQ/agent-workflow/blob/main/LICENSE)
|
|
11
|
-
|
|
12
|
-
The graph engine itself. Zero agent strategies, zero skills bundled — bring your own. This is the package you'd depend on if you want to embed the workflow runtime in your own app without the rest of the Zibby ecosystem.
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npm install @zibby/agent-workflow
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## What's in it
|
|
19
|
-
|
|
20
|
-
| Export | Purpose |
|
|
21
|
-
|---|---|
|
|
22
|
-
| `WorkflowGraph` | The graph builder. `addNode`, `addEdge`, `addConditionalEdges`, `setEntryPoint`, `run`. |
|
|
23
|
-
| `WorkflowAgent` | Base class your `graph.mjs` exports — has `buildGraph()`. |
|
|
24
|
-
| `Node` | Internal node class (rarely used directly). |
|
|
25
|
-
| `WorkflowState` | History-tracked state passed between nodes. |
|
|
26
|
-
| `AgentStrategy` | Base class for custom agent strategies. |
|
|
27
|
-
| `registerStrategy`, `listStrategies`, `getAgentStrategy`, `invokeAgent` | Strategy registry. |
|
|
28
|
-
| `registerSkill`, `getSkill`, `hasSkill`, `getAllSkills` | Skill registry. |
|
|
29
|
-
| `compileGraph` | Build a graph from a JSON config (the format Studio writes). |
|
|
30
|
-
| `ContextLoader` | Walks the spec dir for `CONTEXT.md` / `AGENTS.md` and merges into state. |
|
|
31
|
-
| `timeline`, `WORKFLOW_GRAPH_LOG_MARKER_PREFIX` | CLI progress UX + structured markers consumed by Studio. |
|
|
32
|
-
|
|
33
|
-
## Standalone usage
|
|
34
|
-
|
|
35
|
-
```js
|
|
36
|
-
import { WorkflowGraph, AgentStrategy, registerStrategy } from '@zibby/agent-workflow';
|
|
37
|
-
import { z } from 'zod';
|
|
38
|
-
|
|
39
|
-
class FakeAgent extends AgentStrategy {
|
|
40
|
-
constructor() { super('fake', 'demo', 0); }
|
|
41
|
-
canHandle() { return true; }
|
|
42
|
-
async invoke(prompt, { schema }) {
|
|
43
|
-
return { raw: 'ok', structured: schema.parse({ summary: 'hello' }) };
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
registerStrategy(new FakeAgent());
|
|
47
|
-
|
|
48
|
-
const graph = new WorkflowGraph()
|
|
49
|
-
.addNode('plan', {
|
|
50
|
-
prompt: 'List 3 tasks for: {{input.goal}}',
|
|
51
|
-
outputSchema: z.object({ summary: z.string() }),
|
|
52
|
-
agent: 'fake',
|
|
53
|
-
})
|
|
54
|
-
.setEntryPoint('plan');
|
|
55
|
-
|
|
56
|
-
const { state } = await graph.run(null, {
|
|
57
|
-
input: { goal: 'add dark mode' },
|
|
58
|
-
agentType: 'fake',
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
console.log(state.plan.summary); // → 'hello'
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## What it is *not*
|
|
65
|
-
|
|
66
|
-
`@zibby/agent-workflow` is **just the engine**. It does not:
|
|
67
|
-
|
|
68
|
-
- Ship any agent strategies (no Claude/Cursor/Codex/Gemini implementations)
|
|
69
|
-
- Ship any skills (no Browser/Jira/GitHub MCP)
|
|
70
|
-
- Provide a CLI
|
|
71
|
-
|
|
72
|
-
For the batteries-included experience, use `@zibby/cli` + `@zibby/core` + `@zibby/skills`. For an embeddable engine, this package alone is enough.
|
|
73
|
-
|
|
74
|
-
## Public protocol surface (stable)
|
|
75
|
-
|
|
76
|
-
These constants are part of the public contract and consumed by Zibby Studio + tooling. They won't break across minor versions:
|
|
77
|
-
|
|
78
|
-
- `WORKFLOW_GRAPH_LOG_MARKER_PREFIX` (`__WORKFLOW_GRAPH_LOG__`)
|
|
79
|
-
- `STUDIO_STOP_REQUEST_FILE` (`.zibby-studio-stop`)
|
|
80
|
-
- `ZIBBY_RUN_SOURCE=studio` env trigger
|
|
81
|
-
- `stoppedByStudio: true` return key
|
|
82
|
-
- Marker payload `{ phase: 'node_begin' | 'node_end', node: string }`
|
|
83
|
-
|
|
84
|
-
## Source
|
|
85
|
-
|
|
86
|
-
- npm: [`@zibby/agent-workflow`](https://www.npmjs.com/package/@zibby/agent-workflow)
|
|
87
|
-
- GitHub (public, MIT): [ZibbyHQ/agent-workflow](https://github.com/ZibbyHQ/agent-workflow)
|
|
88
|
-
- Examples: [01-hello-world](https://github.com/ZibbyHQ/agent-workflow/tree/main/examples/01-hello-world) · [02-pipeline](https://github.com/ZibbyHQ/agent-workflow/tree/main/examples/02-pipeline) · [03-conditional-routing](https://github.com/ZibbyHQ/agent-workflow/tree/main/examples/03-conditional-routing) · [04-custom-agent](https://github.com/ZibbyHQ/agent-workflow/tree/main/examples/04-custom-agent) · [05-with-skills](https://github.com/ZibbyHQ/agent-workflow/tree/main/examples/05-with-skills)
|
package/docs/packages/cli.md
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 3
|
|
3
|
-
title: '@zibby/cli'
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# @zibby/cli
|
|
7
|
-
|
|
8
|
-
[](https://www.npmjs.com/package/@zibby/cli)
|
|
9
|
-
|
|
10
|
-
The user-facing entry point — the `zibby` command. Install once globally; it pulls in `@zibby/core`, `@zibby/agent-workflow`, `@zibby/skills` automatically.
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
npm install -g @zibby/cli
|
|
14
|
-
zibby --version
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## What it does
|
|
18
|
-
|
|
19
|
-
- **Scaffolds** agents: `zibby agent new <name>`
|
|
20
|
-
- **Runs** agents locally (one-shot): `zibby agent run <name>`
|
|
21
|
-
- **Deploys** to Zibby Cloud (Heroku-style bundles): `zibby agent deploy <name>`
|
|
22
|
-
- **Triggers** deployed agents: `zibby agent trigger <uuid>`
|
|
23
|
-
- **Tails** logs: `zibby agent logs <uuid> -t`
|
|
24
|
-
- **Manages** auth: `zibby login`, `zibby logout`, `zibby status`
|
|
25
|
-
|
|
26
|
-
The full command catalog lives at [CLI Reference](../cli-reference).
|
|
27
|
-
|
|
28
|
-
## Self-contained agent projects
|
|
29
|
-
|
|
30
|
-
`zibby agent new` creates an agent as a **self-contained npm project** — its own `package.json`, its own `node_modules`. So an agent can pull in arbitrary deps (PDF libraries, custom MCP servers, your own SDK) without polluting the parent project.
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
my-app/
|
|
34
|
-
├── package.json
|
|
35
|
-
├── src/
|
|
36
|
-
└── .zibby/
|
|
37
|
-
└── workflows/
|
|
38
|
-
└── my-agent/
|
|
39
|
-
├── package.json # agent's own deps
|
|
40
|
-
├── node_modules/
|
|
41
|
-
├── graph.mjs
|
|
42
|
-
└── nodes/
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
The cloud bundle build does the same — `npm install` runs *inside* the agent folder, scoped to its own package.json.
|
|
46
|
-
|
|
47
|
-
## Configuration
|
|
48
|
-
|
|
49
|
-
The CLI reads `.zibby.config.mjs` at the project root for defaults:
|
|
50
|
-
|
|
51
|
-
```js
|
|
52
|
-
// .zibby.config.mjs
|
|
53
|
-
export default {
|
|
54
|
-
paths: {
|
|
55
|
-
workflows: '.zibby/workflows', // override if you want a different folder
|
|
56
|
-
output: '.zibby/output',
|
|
57
|
-
},
|
|
58
|
-
agent: {
|
|
59
|
-
default: 'cursor', // fallback agent when no per-node override
|
|
60
|
-
},
|
|
61
|
-
models: {
|
|
62
|
-
default: 'auto',
|
|
63
|
-
execute_live: 'claude-opus-4.6', // per-node model override
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
`zibby agent deploy` resolves this file locally and ships the result as `zibby.config.json` inside the deploy bundle, so the cloud runtime sees the same `agent` block, per-node `models`, and other declarative knobs as your local runs. Function values are dropped at deploy time (config is data, not code) — if you need runtime variation in cloud, use [per-agent env vars](../cloud/env-vars).
|
|
69
|
-
|
|
70
|
-
## Source
|
|
71
|
-
|
|
72
|
-
- npm: [`@zibby/cli`](https://www.npmjs.com/package/@zibby/cli)
|
|
73
|
-
- See [CLI Reference](../cli-reference) for every command + option
|
package/docs/packages/core.md
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 2
|
|
3
|
-
title: '@zibby/core'
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# @zibby/core
|
|
7
|
-
|
|
8
|
-
[](https://www.npmjs.com/package/@zibby/core)
|
|
9
|
-
|
|
10
|
-
The batteries — five built-in agent strategies, the runtime, and a re-export of the `@zibby/agent-workflow` engine. This is what `zibby agent new` scaffolds agents against.
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
npm install @zibby/core
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## What's in it
|
|
17
|
-
|
|
18
|
-
### Built-in agent strategies
|
|
19
|
-
|
|
20
|
-
| Strategy | Backed by |
|
|
21
|
-
|---|---|
|
|
22
|
-
| `CursorAgentStrategy` | `cursor-agent` CLI |
|
|
23
|
-
| `ClaudeAgentStrategy` | `@anthropic-ai/claude-agent-sdk` |
|
|
24
|
-
| `CodexAgentStrategy` | `@openai/codex` CLI |
|
|
25
|
-
| `GeminiAgentStrategy` | `@google/gemini-cli` |
|
|
26
|
-
| `AssistantStrategy` | OpenAI Assistants API |
|
|
27
|
-
|
|
28
|
-
Importing `@zibby/core` registers all five into the `@zibby/agent-workflow` strategy registry automatically. So:
|
|
29
|
-
|
|
30
|
-
```js
|
|
31
|
-
import { WorkflowGraph } from '@zibby/core';
|
|
32
|
-
|
|
33
|
-
const graph = new WorkflowGraph()
|
|
34
|
-
.addNode('plan', { prompt, outputSchema, agent: 'cursor' }) // already registered
|
|
35
|
-
.setEntryPoint('plan');
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Re-exports from agent-workflow
|
|
39
|
-
|
|
40
|
-
So you can do `import { WorkflowGraph, z, AgentStrategy } from '@zibby/core'` without separately importing the engine:
|
|
41
|
-
|
|
42
|
-
- `WorkflowGraph`, `WorkflowAgent`, `Node`, `WorkflowState`
|
|
43
|
-
- `AgentStrategy`, `registerStrategy`, `getAgentStrategy`, `invokeAgent`
|
|
44
|
-
- `registerSkill`, `getSkill`, `getAllSkills`
|
|
45
|
-
- `compileGraph`, `validateGraphConfig`
|
|
46
|
-
- `timeline`, session helpers, constants
|
|
47
|
-
|
|
48
|
-
### z (Zod)
|
|
49
|
-
|
|
50
|
-
Re-exports `zod/v3` so you don't need a separate Zod dep:
|
|
51
|
-
|
|
52
|
-
```js
|
|
53
|
-
import { z } from '@zibby/core';
|
|
54
|
-
|
|
55
|
-
const Plan = z.object({ tasks: z.array(z.string()) });
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Cloud-runtime helpers
|
|
59
|
-
|
|
60
|
-
Functions used by the cloud executor and Studio integration — `ZibbyRuntime`, `StableIdRuntime`, `resolveIntegrationToken`, `cloneRepo`, `patchCursorAgentForCI`, `runPlaywrightTestTool`. Most users don't import these directly.
|
|
61
|
-
|
|
62
|
-
## When to depend on this vs. agent-workflow
|
|
63
|
-
|
|
64
|
-
| Goal | Pick |
|
|
65
|
-
|---|---|
|
|
66
|
-
| Build an agent with built-in strategies (cursor/claude/codex/gemini/assistant) | `@zibby/core` |
|
|
67
|
-
| Embed the engine in your own app with custom agents only | `@zibby/agent-workflow` |
|
|
68
|
-
| Use the CLI | `@zibby/cli` (transitively pulls both) |
|
|
69
|
-
|
|
70
|
-
## Source
|
|
71
|
-
|
|
72
|
-
- npm: [`@zibby/core`](https://www.npmjs.com/package/@zibby/core)
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 4
|
|
3
|
-
title: "@zibby/mcp-browser"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# @zibby/mcp-browser
|
|
7
|
-
|
|
8
|
-
Wrapper around [`@playwright/mcp`](https://github.com/anthropics/playwright-mcp) with stable ID injection, event recording, and session-aware video capture.
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
npm install @zibby/mcp-browser
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
> Installed automatically as a dependency of `@zibby/core`.
|
|
15
|
-
|
|
16
|
-
## Why a Wrapper?
|
|
17
|
-
|
|
18
|
-
The official `@playwright/mcp` provides standard browser automation tools. `@zibby/mcp-browser` adds:
|
|
19
|
-
|
|
20
|
-
| Feature | Description |
|
|
21
|
-
|---|---|
|
|
22
|
-
| **Stable IDs** | Injects deterministic `data-zibby-id` attributes into the DOM, so selectors survive page re-renders |
|
|
23
|
-
| **Event Recording** | Captures every MCP tool call (navigate, click, type) with timestamps for the action timeline |
|
|
24
|
-
| **Session Awareness** | Reads `ZIBBY_SESSION_INFO` to know which session and node is active — saves videos and events to the right directory |
|
|
25
|
-
| **Video Capture** | Records browser sessions as video with configurable resolution |
|
|
26
|
-
|
|
27
|
-
## Usage
|
|
28
|
-
|
|
29
|
-
### As an MCP Server (standalone)
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
npx mcp-browser-zibby --save-video=1280x720 --viewport-size=1280x720 --output-dir=./output
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Via the Browser Skill (recommended)
|
|
36
|
-
|
|
37
|
-
The browser skill in `@zibby/skills` resolves to `@zibby/mcp-browser` automatically:
|
|
38
|
-
|
|
39
|
-
```javascript
|
|
40
|
-
import { SKILLS } from '@zibby/core';
|
|
41
|
-
|
|
42
|
-
export const myNode = {
|
|
43
|
-
name: 'my_node',
|
|
44
|
-
skills: [SKILLS.BROWSER],
|
|
45
|
-
// The framework starts @zibby/mcp-browser as an MCP server
|
|
46
|
-
// and wires it to whichever agent is active
|
|
47
|
-
};
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### Programmatic
|
|
51
|
-
|
|
52
|
-
```javascript
|
|
53
|
-
import { startServer } from '@zibby/mcp-browser';
|
|
54
|
-
|
|
55
|
-
const server = await startServer({
|
|
56
|
-
saveVideo: '1280x720',
|
|
57
|
-
viewportSize: '1280x720',
|
|
58
|
-
outputDir: './test-results',
|
|
59
|
-
});
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Stable IDs
|
|
63
|
-
|
|
64
|
-
Standard CSS selectors break when the DOM changes between renders. Stable IDs solve this by injecting deterministic attributes based on element role, position, and content:
|
|
65
|
-
|
|
66
|
-
```html
|
|
67
|
-
<!-- Before stable ID injection -->
|
|
68
|
-
<button class="btn-primary sc-fEOsli">Submit</button>
|
|
69
|
-
|
|
70
|
-
<!-- After stable ID injection -->
|
|
71
|
-
<button class="btn-primary sc-fEOsli" data-zibby-id="form-submit-button">Submit</button>
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
The stable ID algorithm considers:
|
|
75
|
-
- Element tag and ARIA role
|
|
76
|
-
- Accessible name and label
|
|
77
|
-
- Position relative to landmarks
|
|
78
|
-
- Content hash for disambiguation
|
|
79
|
-
|
|
80
|
-
This gives the AI and generated Playwright scripts more reliable selectors.
|
|
81
|
-
|
|
82
|
-
## Event Recording
|
|
83
|
-
|
|
84
|
-
Every MCP tool call is recorded as a structured event:
|
|
85
|
-
|
|
86
|
-
```json
|
|
87
|
-
{
|
|
88
|
-
"timestamp": 1710784523000,
|
|
89
|
-
"node": "execute_live",
|
|
90
|
-
"tool": "browser_click",
|
|
91
|
-
"arguments": { "element": "Submit button", "ref": "s1e45" },
|
|
92
|
-
"result": "Clicked",
|
|
93
|
-
"duration": 234
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Events are saved to `{sessionPath}/{nodeName}/events.json` and used by:
|
|
98
|
-
- The **action timeline** in the Zibby dashboard
|
|
99
|
-
- The **generate_script** node to produce accurate Playwright scripts
|
|
100
|
-
- The **memory** system to record selector usage
|
|
101
|
-
|
|
102
|
-
## CLI Options
|
|
103
|
-
|
|
104
|
-
| Flag | Default | Description |
|
|
105
|
-
|---|---|---|
|
|
106
|
-
| `--save-video=WxH` | — | Record video at specified resolution |
|
|
107
|
-
| `--viewport-size=WxH` | `1280x720` | Browser viewport size |
|
|
108
|
-
| `--output-dir=PATH` | `test-results/` | Where to save video and event files |
|
|
109
|
-
| `--headed` | `false` | Show the browser window |
|
|
110
|
-
| `--headless` | `true` | Run without a visible window |
|
package/docs/packages/mcp-cli.md
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
sidebar_position: 7
|
|
3
|
-
title: "@zibby/mcp-cli"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# @zibby/mcp-cli
|
|
7
|
-
|
|
8
|
-
A Model Context Protocol (MCP) server that exposes the Zibby CLI surface — deploy, run, debug, trigger — to any MCP-aware AI agent. Install once, drive Zibby from Claude Code / Cursor / OpenAI Codex / Gemini CLI / Continue / Cline / Aider / Goose without leaving chat.
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
# Not installed manually — the agent's `npx` invocation handles it.
|
|
12
|
-
# See "Install" below for per-agent config.
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## What it exposes
|
|
16
|
-
|
|
17
|
-
13 MCP tools, all wrapping the underlying `@zibby/cli`:
|
|
18
|
-
|
|
19
|
-
| Tool | What it does |
|
|
20
|
-
|---|---|
|
|
21
|
-
| `zibby_login` | Opens the user's browser for device-code OAuth. Saves session to `~/.zibby/config.json`. |
|
|
22
|
-
| `zibby_logout` | Clears the saved session. |
|
|
23
|
-
| `zibby_status` | Who is logged in, how many projects are cached, whether the session is still valid. |
|
|
24
|
-
| `zibby_list_projects` | List the Zibby projects the user has access to. |
|
|
25
|
-
| `zibby_list_templates` | List official agent templates (browser-test-automation, code-analysis, generate-test-cases, …). |
|
|
26
|
-
| `zibby_scaffold_agent` | Scaffold `.zibby/workflows/<name>/` from an official template. |
|
|
27
|
-
| `zibby_validate_agent` | Static-check a local agent (~30 ms, no API call). |
|
|
28
|
-
| `zibby_list_agents` | List agents: local, remote, or both. |
|
|
29
|
-
| `zibby_deploy_agent` | Deploy a local agent to a project. |
|
|
30
|
-
| `zibby_trigger_agent` | Trigger a deployed agent by UUID. Returns `jobId`. |
|
|
31
|
-
| `zibby_agent_logs` | Fetch the latest N log lines from a run (one-shot — call again for newer lines). |
|
|
32
|
-
| `zibby_run_agent_local` | Run an agent on the user's machine one-shot, for debugging. No cloud. |
|
|
33
|
-
| `zibby_download_agent` | Pull a deployed agent back to local. Requires explicit `confirm: true` from the agent. |
|
|
34
|
-
|
|
35
|
-
**Destructive operations are intentionally not exposed.** Agent deletion, env-var mutation, schedule changes, and credential management stay in the `zibby` CLI directly. The agent has to involve the user out-of-band for those.
|
|
36
|
-
|
|
37
|
-
## Install
|
|
38
|
-
|
|
39
|
-
`@zibby/mcp-cli` ships as a stdio MCP server. The agent's host process spawns it via `npx -y` — no global install needed. The user just needs **Node.js ≥ 18** on their machine.
|
|
40
|
-
|
|
41
|
-
### Claude Code
|
|
42
|
-
|
|
43
|
-
`~/.claude/settings.json`:
|
|
44
|
-
|
|
45
|
-
```json
|
|
46
|
-
{
|
|
47
|
-
"mcpServers": {
|
|
48
|
-
"zibby": {
|
|
49
|
-
"command": "npx",
|
|
50
|
-
"args": ["-y", "@zibby/mcp-cli"]
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Cursor
|
|
57
|
-
|
|
58
|
-
`~/.cursor/mcp.json`:
|
|
59
|
-
|
|
60
|
-
```json
|
|
61
|
-
{
|
|
62
|
-
"mcpServers": {
|
|
63
|
-
"zibby": {
|
|
64
|
-
"command": "npx",
|
|
65
|
-
"args": ["-y", "@zibby/mcp-cli"]
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### OpenAI Codex CLI
|
|
72
|
-
|
|
73
|
-
`~/.codex/config.toml`:
|
|
74
|
-
|
|
75
|
-
```toml
|
|
76
|
-
[mcp_servers.zibby]
|
|
77
|
-
command = "npx"
|
|
78
|
-
args = ["-y", "@zibby/mcp-cli"]
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### Gemini CLI
|
|
82
|
-
|
|
83
|
-
`~/.gemini/settings.json`:
|
|
84
|
-
|
|
85
|
-
```json
|
|
86
|
-
{
|
|
87
|
-
"mcpServers": {
|
|
88
|
-
"zibby": {
|
|
89
|
-
"command": "npx",
|
|
90
|
-
"args": ["-y", "@zibby/mcp-cli"]
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Claude Desktop (macOS)
|
|
97
|
-
|
|
98
|
-
`~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
99
|
-
|
|
100
|
-
```json
|
|
101
|
-
{
|
|
102
|
-
"mcpServers": {
|
|
103
|
-
"zibby": {
|
|
104
|
-
"command": "npx",
|
|
105
|
-
"args": ["-y", "@zibby/mcp-cli"]
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Windows
|
|
112
|
-
|
|
113
|
-
If your agent on Windows can't find `npx`, wrap with `cmd /c`:
|
|
114
|
-
|
|
115
|
-
```json
|
|
116
|
-
{
|
|
117
|
-
"mcpServers": {
|
|
118
|
-
"zibby": {
|
|
119
|
-
"command": "cmd",
|
|
120
|
-
"args": ["/c", "npx", "-y", "@zibby/mcp-cli"]
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
## A typical agent chat
|
|
127
|
-
|
|
128
|
-
```
|
|
129
|
-
User: Deploy the browser-test template to my "playhouse" project.
|
|
130
|
-
Agent: → zibby_list_projects
|
|
131
|
-
→ zibby_scaffold_agent (browser-test-automation → .zibby/workflows/playhouse-tests/)
|
|
132
|
-
→ zibby_validate_agent
|
|
133
|
-
→ zibby_deploy_agent
|
|
134
|
-
→ "Deployed v1 of playhouse-tests. UUID 988…"
|
|
135
|
-
|
|
136
|
-
User: Run it against staging.zibby.dev.
|
|
137
|
-
Agent: → zibby_trigger_agent (input: { url: "https://staging.zibby.dev" })
|
|
138
|
-
→ zibby_agent_logs (lines: 200, jobId: "abc-123")
|
|
139
|
-
→ "Run completed. Found 0 errors."
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## Auth model
|
|
143
|
-
|
|
144
|
-
Two-stage by design (mirrors how the `zibby` CLI works):
|
|
145
|
-
|
|
146
|
-
1. **Session token** (`zibby_login`) — device-code OAuth via browser. Identifies the user.
|
|
147
|
-
2. **Per-project API tokens** — fetched at login time and cached locally. The MCP server picks the right token automatically when you call a project-scoped tool like `zibby_deploy_agent`.
|
|
148
|
-
|
|
149
|
-
All credentials live in `~/.zibby/config.json` (mode `0600`). The same file `zibby login` writes — so if you've already done `zibby login` from a terminal, the MCP server picks up that session.
|
|
150
|
-
|
|
151
|
-
The user's password never touches the MCP server: login is OAuth in the browser, and only the resulting session token comes back to the local file.
|
|
152
|
-
|
|
153
|
-
## Security guarantees
|
|
154
|
-
|
|
155
|
-
- **No shell interpolation** — every CLI invocation uses `execFile` with argv arrays.
|
|
156
|
-
- **Minimum env passthrough** — only `HOME`, `USER`, `PATH`, and the project-scoped `ZIBBY_API_KEY` reach the child CLI process.
|
|
157
|
-
- **API tokens never returned to the agent** — they live in `~/.zibby/config.json` only, read server-side per call.
|
|
158
|
-
- **Destructive ops excluded** — see the table above.
|
|
159
|
-
- **`zibby_download_agent` requires `confirm: true`** — the schema rejects calls without it. Agents must explicitly opt in after confirming the destination path with the user.
|
|
160
|
-
|
|
161
|
-
## Troubleshooting
|
|
162
|
-
|
|
163
|
-
| Problem | Likely cause |
|
|
164
|
-
|---|---|
|
|
165
|
-
| `Not logged in` on every call | `~/.zibby/config.json` missing or corrupted. Call `zibby_login`. |
|
|
166
|
-
| `No API token cached for project` | Project list out of date. Call `zibby_list_projects` to refresh. |
|
|
167
|
-
| `npx -y` hangs on first install | First-time download. Subsequent invocations are cached by npm. |
|
|
168
|
-
| Tool times out on long deploys | The wrapped CLI command exceeded 10 min. Re-run from a terminal to see live output. |
|
|
169
|
-
|
|
170
|
-
## Versioning
|
|
171
|
-
|
|
172
|
-
`@zibby/mcp-cli` pins a specific `@zibby/cli` version in its `dependencies`. Upgrading the MCP package upgrades the bundled CLI in lockstep. Users get the right CLI automatically — no need to coordinate two installs.
|
|
173
|
-
|
|
174
|
-
## Source
|
|
175
|
-
|
|
176
|
-
[github.com/ZibbyHQ/zibby-agent → packages/mcps/cli](https://github.com/ZibbyHQ/zibby-agent/tree/main/packages/mcps/cli)
|