@zibby/skills 0.1.11 → 0.1.13

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.
@@ -0,0 +1,90 @@
1
+ ---
2
+ sidebar_position: 5
3
+ title: 5. Trigger & tail logs
4
+ pagination_prev: get-started/deploy
5
+ ---
6
+
7
+ # Run a deployed workflow and watch logs
8
+
9
+ ## Trigger
10
+
11
+ ```bash
12
+ zibby workflow trigger 2b1ea07f-3ede-4bfd-a51d-431f0bab008e
13
+ ```
14
+
15
+ The CLI returns immediately with a job ID:
16
+
17
+ ```
18
+ ✔ Workflow triggered successfully
19
+
20
+ Job Details:
21
+ Job ID: ee333411-22e6-4733-b790-d480af3f662e
22
+ Status: running
23
+ Version: 3
24
+ Triggered: 02/05/2026, 10:23:13
25
+
26
+ Monitor execution:
27
+ zibby workflow logs 2b1ea07f-...
28
+ zibby workflow logs 2b1ea07f-... -t
29
+ ```
30
+
31
+ Pass input the same way as locally:
32
+
33
+ ```bash
34
+ zibby workflow trigger <uuid> -p ticket=BUG-123
35
+ zibby workflow trigger <uuid> --input '{"ticket":"BUG-123"}'
36
+ zibby workflow trigger <uuid> --input-file ./input.json
37
+ ```
38
+
39
+ If you omit the UUID, the CLI shows an interactive picker over your deployed workflows.
40
+
41
+ ## Tail logs (Heroku-style)
42
+
43
+ ```bash
44
+ zibby workflow logs 2b1ea07f-3ede-4bfd-a51d-431f0bab008e -t
45
+ ```
46
+
47
+ `-t` follows live. Without `-t` it dumps the last execution and exits.
48
+
49
+ ```
50
+ Streaming logs for workflow 2b1ea07f-3ede-4bfd-a51d-431f0bab008e...
51
+ Press Ctrl+C to stop.
52
+
53
+ 2026-05-02 23:30:51.345 zibby v0.1.x
54
+ ────────────────────────────────────────────────────────────
55
+ Workflow: my-pipeline
56
+ Job: ee333411-...
57
+ Project: 6b60049d-...
58
+ Agent: cursor (model: auto)
59
+ ────────────────────────────────────────────────────────────
60
+ [setup] Bundle extracted (3.2s)
61
+ [setup] Loaded MyPipelineWorkflow
62
+ [setup] Registered 5 agent strategies (...)
63
+
64
+ ┌ example
65
+ │ ◆ Model: auto | key: ***bc97
66
+ │ ...
67
+ └ done 19.4s
68
+ [done] my-pipeline completed in 19.4s
69
+ ```
70
+
71
+ The stream covers the full execution end-to-end — agent reasoning, tool calls, schema validation, completion summary.
72
+
73
+ ## Multiple executions
74
+
75
+ Workflow UUIDs follow the workflow, not a single run. After one execution finishes, `logs -t` waits for the next trigger of the same workflow and auto-switches to streaming it. Like `heroku logs --tail`.
76
+
77
+ To exit after the current run, just Ctrl+C — there's no "exit on completion" mode (yet).
78
+
79
+ ## Triggering from anywhere
80
+
81
+ The CLI is the easiest way, but workflows expose an HTTP API for programmatic triggering — see [Cloud → Triggering programmatically](../cloud/triggering).
82
+
83
+ ## You're done
84
+
85
+ You've now scaffolded, run locally, deployed, triggered, and tailed a workflow. The rest of the docs go deeper:
86
+
87
+ - [Concepts](../concepts/graph) — how the graph engine works
88
+ - [CLI Reference](../cli-reference) — every command
89
+ - [Cloud](../cloud/triggering) — HTTP triggers, log archives, bundle internals
90
+ - [Packages](../packages/agent-workflow) — package-level docs
@@ -0,0 +1,66 @@
1
+ ---
2
+ sidebar_position: 2
3
+ title: 2. Your first workflow
4
+ pagination_prev: get-started/install
5
+ pagination_next: get-started/run-locally
6
+ ---
7
+
8
+ # Scaffold a workflow
9
+
10
+ ```bash
11
+ zibby workflow new my-pipeline
12
+ ```
13
+
14
+ This creates:
15
+
16
+ ```
17
+ .zibby/workflows/my-pipeline/
18
+ ├── graph.mjs # the workflow definition (entry point)
19
+ ├── nodes/
20
+ │ └── example.mjs # a sample node
21
+ ├── package.json # workflow's own deps (each workflow is a self-contained npm project)
22
+ └── workflow.json # manifest (workflow name, entry class)
23
+ ```
24
+
25
+ If `.zibby/workflows/` doesn't exist yet, the scaffold creates it. If you have a `.zibby.config.mjs` with a custom `paths.workflows`, the scaffold respects it.
26
+
27
+ The first time you run this in a fresh directory, you'll be asked where to keep workflows (default: `.zibby/workflows`). The CLI also runs `npm install` inside the new workflow folder so deps are ready.
28
+
29
+ ## What's in graph.mjs
30
+
31
+ ```js
32
+ import { z } from '@zibby/core';
33
+ import { WorkflowAgent, WorkflowGraph } from '@zibby/agent-workflow';
34
+ import { exampleNode } from './nodes/example.mjs';
35
+
36
+ export class MyPipelineWorkflow extends WorkflowAgent {
37
+ buildGraph() {
38
+ const graph = new WorkflowGraph();
39
+
40
+ graph.addNode('example', {
41
+ prompt: exampleNode.prompt,
42
+ outputSchema: z.object({
43
+ summary: z.string(),
44
+ status: z.enum(['ok', 'warn', 'error']),
45
+ }),
46
+ agent: 'cursor', // per-node agent override
47
+ });
48
+
49
+ graph.setEntryPoint('example');
50
+ return graph;
51
+ }
52
+ }
53
+ ```
54
+
55
+ The shape is:
56
+
57
+ - `graph.addNode(name, config)` — register a node. `prompt` becomes the agent's input; `outputSchema` (Zod) defines the contract for what comes back.
58
+ - `graph.addEdge(from, to)` — wire two nodes together.
59
+ - `graph.addConditionalEdges(from, fn)` — branch on state.
60
+ - `graph.setEntryPoint(name)` — first node to run.
61
+
62
+ ## Picking the agent
63
+
64
+ Each node can specify its own agent via `agent: 'cursor' | 'claude' | 'codex' | 'gemini' | 'assistant'`. If you omit it, the workflow falls back to the project default (set in `.zibby.config.mjs` or `AGENT_TYPE` env var).
65
+
66
+ → Next: [Run it locally](./run-locally)
package/docs/intro.md CHANGED
@@ -2,86 +2,58 @@
2
2
  slug: /
3
3
  sidebar_position: 1
4
4
  title: Introduction
5
+ pagination_next: get-started/install
5
6
  ---
6
7
 
7
8
  # Zibby
8
9
 
9
- Zibby is an AI-powered test automation platform. Write plain-text test instructions, and Zibby drives a real browser, records video, and generates Playwright scripts no manual test code required.
10
+ **The cloud pipeline for Claude Code, Cursor, Codex, and Gemini.** Compose them into structured workflows with Zod-validated handoff between nodes. Vendor-neutral. JavaScript-first.
10
11
 
11
- ## Quick Start
12
-
13
- ```bash
14
- npm install -g @zibby/cli
15
- echo "Go to example.com and verify the page title" > test.txt
16
- zibby test test.txt --agent cursor
17
12
  ```
18
-
19
- That's it. No `zibby init` required — the CLI uses a built-in workflow by default.
20
-
21
- ## How It Works
22
-
13
+ ┌──────────┐ ┌──────────┐ ┌──────────┐
14
+ trigger → │ plan │ → │ implement│ → │ verify │ result
15
+ │ (claude) │ │ (cursor) │ │ (codex) │
16
+ └──────────┘ └──────────┘ └──────────┘
17
+ │ │ │
18
+ Zod out Zod out Zod out
23
19
  ```
24
- Plain Text Spec → AI Agent → Browser Automation → Video + Playwright Script
25
- ```
26
-
27
- 1. **Write a test spec** — plain text describing what to test
28
- 2. **Run it** — `zibby test spec.txt` launches an AI agent (Cursor, Claude, or Codex)
29
- 3. **AI drives the browser** — navigates, clicks, fills forms, asserts results
30
- 4. **Get artifacts** — video recording, action timeline, generated Playwright script
31
- 5. **Upload to cloud** (optional) — review results in the [Zibby dashboard](https://zibby.app)
32
-
33
- ## Architecture
34
-
35
- Zibby is a monorepo with five published npm packages, each with a distinct responsibility:
36
-
37
- | Package | Version | Description |
38
- |---|---|---|
39
- | [`@zibby/cli`](https://www.npmjs.com/package/@zibby/cli) | 0.1.27 | CLI entry point — the `zibby` command. Orchestrates runs, init, login, uploads, and workflow management. |
40
- | [`@zibby/core`](https://www.npmjs.com/package/@zibby/core) | 0.1.22 | Core engine — workflow graph runtime, agent strategy framework, graph compiler, state management, and template workflows. |
41
- | [`@zibby/skills`](https://www.npmjs.com/package/@zibby/skills) | 0.1.4 | Skill catalog — built-in skill definitions (Browser, Jira, GitHub, Slack, Memory) plus the `skill()` factory for custom MCP and function skills. |
42
- | [`@zibby/memory`](https://www.npmjs.com/package/@zibby/memory) | 0.1.4 | Test memory database — version-controlled (Dolt-backed) knowledge base that learns from every run. Stores selectors, page models, navigation patterns, and insights. |
43
- | [`@zibby/mcp-browser`](https://www.npmjs.com/package/@zibby/mcp-browser) | 0.1.6 | Browser MCP server — wrapper around `@playwright/mcp` with stable ID injection, event recording, and session-aware video capture. |
44
20
 
45
- Users only install `@zibby/cli` — it pulls in the others automatically.
46
-
47
- ## Two Modes
48
-
49
- ### Local Mode (no account needed)
50
-
51
- Run tests locally, get generated Playwright scripts:
52
-
53
- ```bash
54
- zibby test test-specs/login.txt --agent cursor
21
+ ```js
22
+ graph
23
+ .addNode('plan', { prompt, outputSchema: Plan, agent: 'claude' })
24
+ .addNode('implement', { prompt, outputSchema: Diff, agent: 'cursor' })
25
+ .addNode('verify', { prompt, outputSchema: Result, agent: 'codex' });
55
26
  ```
56
27
 
57
- ### Cloud Mode (with Zibby account)
58
-
59
- Upload results to the dashboard for video replay, team sharing, and CI integration:
28
+ ## Try it now
60
29
 
61
30
  ```bash
62
- zibby test test-specs/login.txt --agent cursor --sync
63
- ```
31
+ npm install -g @zibby/cli
32
+ zibby workflow new my-pipeline # scaffold
33
+ zibby workflow run my-pipeline # run locally (one-shot)
64
34
 
65
- ## Supported AI Agents
35
+ zibby login
36
+ zibby workflow deploy my-pipeline # ship to cloud
37
+ zibby workflow trigger <uuid> -t # fire + tail logs
38
+ ```
66
39
 
67
- Zibby's workflow engine is **agent-agnostic** — the same workflow graph runs identically across all three supported agents:
40
+ Next: [Install](./get-started/install)
68
41
 
69
- | Agent | Provider | How It Works | Setup |
70
- |---|---|---|---|
71
- | **Cursor** | Cursor IDE | Uses Cursor's built-in agent with MCP tool access | Install [Cursor](https://cursor.com) or set `CURSOR_API_KEY` |
72
- | **Claude** | Anthropic | Uses Claude Agent SDK with native MCP integration | Set `ANTHROPIC_API_KEY` in `.env` |
73
- | **Codex** | OpenAI | Uses Codex SDK with full tool/file/bash access | Install `@openai/codex` CLI + set `OPENAI_API_KEY` |
42
+ ## What you get
74
43
 
75
- ```bash
76
- # Pick your agent
77
- zibby test test.txt --agent cursor
78
- zibby test test.txt --agent claude
79
- zibby test test.txt --agent codex
80
- ```
44
+ - **Multi-vendor** — mix Claude Code + Codex + Cursor + Gemini in one pipeline. Anthropic will never help you orchestrate Codex; multi-vendor neutrality is structural.
45
+ - **Schema-enforced handoff** — Zod validates every node's output before the next runs. No prompt-stuffing.
46
+ - **Run anywhere** local with hot reload, or cloud with Heroku-style bundles (~3s cold start).
47
+ - **Session replay** — every run lands as on-disk JSONL + artifacts. Re-run any node via `--session <id> --node <name>`.
48
+ - **Cloud-native** SSE log streaming, dedicated egress IPs for firewalled GitLab / GitHub Enterprise / Salesforce.
81
49
 
82
- ## Who Is Zibby For?
50
+ ## How it compares
83
51
 
84
- - **QA Engineers** who want AI-generated test cases from plain-text specs
85
- - **Developers** who want Playwright scripts without writing them manually
86
- - **Teams** adopting test automation without the upfront investment
87
- - **CI/CD pipelines** that need automated browser testing
52
+ | | Zibby | Claude Code Agent Teams | Devin | Mastra / LangGraph / CrewAI |
53
+ |---|---|---|---|---|
54
+ | Wraps real coding-agent CLIs | Claude + Codex + Cursor + Gemini | ❌ Claude only | ❌ proprietary agent | ❌ wraps LLM APIs |
55
+ | Multi-vendor | | | | N/A |
56
+ | Cloud-hosted | ✅ | ❌ local IDE | ✅ | varies |
57
+ | Schema-enforced handoff | ✅ Zod | ❌ free-form | proprietary | ✅ |
58
+ | Session replay | ✅ on-disk JSONL | ❌ | partial | partial |
59
+ | Static egress IP | ✅ addon | ❌ | ❌ | ❌ |
@@ -0,0 +1,110 @@
1
+ ---
2
+ sidebar_position: 1
3
+ title: Test automation (legacy)
4
+ ---
5
+
6
+ # Test automation (legacy)
7
+
8
+ > **The `zibby test` flow predates the workflow engine.** It still works, but new users should start with [Get Started](/get-started/install) — the workflow engine is the headline product. This page is kept for users with existing test-automation pipelines.
9
+
10
+ Drive a real browser from a plain-text spec, get a Playwright script back.
11
+
12
+ ## Prerequisites
13
+
14
+ - Node.js 18 or later
15
+ - [Cursor](https://cursor.com) IDE installed (for `--agent cursor`), **or** an Anthropic API key (for `--agent claude`), **or** OpenAI API key + Codex CLI (for `--agent codex`)
16
+
17
+ ## Option A: Zero Setup (npx)
18
+
19
+ No install needed — run directly:
20
+
21
+ ```bash
22
+ echo "Go to example.com and verify the page title says Example Domain" > test.txt
23
+ npx @zibby/cli run test.txt --agent cursor
24
+ ```
25
+
26
+ ## Option B: Global Install
27
+
28
+ ```bash
29
+ npm install -g @zibby/cli
30
+ ```
31
+
32
+ ### 1. Create a test spec
33
+
34
+ Create a plain-text file with your test instructions:
35
+
36
+ ```text title="test-specs/login.txt"
37
+ 1. Navigate to https://myapp.com/login
38
+ 2. Enter email: test@example.com
39
+ 3. Enter password: TestPass123
40
+ 4. Click the Sign In button
41
+ 5. Verify the dashboard page loads
42
+ 6. Verify the user's name appears in the header
43
+ ```
44
+
45
+ ### 2. Run it
46
+
47
+ ```bash
48
+ zibby test test-specs/login.txt --agent cursor
49
+ ```
50
+
51
+ You'll see:
52
+ - A browser window open
53
+ - The AI agent navigate and interact with your app
54
+ - A generated Playwright script saved to `tests/`
55
+
56
+ ### 3. Run the generated test
57
+
58
+ ```bash
59
+ npx playwright test tests/login.spec.js
60
+ ```
61
+
62
+ ## Customizing Your Setup (Optional)
63
+
64
+ If you want to customize the workflow, config, or nodes:
65
+
66
+ ```bash
67
+ zibby init --agent cursor
68
+ ```
69
+
70
+ This scaffolds:
71
+
72
+ ```
73
+ .zibby.config.js # Project configuration (ESM)
74
+ .zibby/
75
+ ├── graph.js # Workflow definition (customizable)
76
+ ├── nodes/ # Node implementations
77
+ │ ├── execute-live.js
78
+ │ ├── generate-script.js
79
+ │ └── preflight.js
80
+ └── result-handler.js # Post-execution hooks
81
+ ```
82
+
83
+ Without `zibby init`, the CLI uses the built-in default workflow automatically.
84
+
85
+ ## Environment Variables
86
+
87
+ | Variable | When needed |
88
+ |---|---|
89
+ | `CURSOR_API_KEY` | CI/CD with `--agent cursor` (locally uses Cursor IDE credentials) |
90
+ | `ANTHROPIC_API_KEY` | Using `--agent claude` |
91
+ | `OPENAI_API_KEY` | Using `--agent codex` |
92
+ | `ZIBBY_API_KEY` | Cloud sync (`--sync` flag) |
93
+
94
+ For local development, add these to a `.env` file in your project root.
95
+
96
+ ## Cloud Sync (Optional)
97
+
98
+ To upload results to the [Zibby dashboard](https://zibby.app):
99
+
100
+ 1. Create an account at [zibby.app](https://zibby.app)
101
+ 2. Get your API key from **Project Settings**
102
+ 3. Add to `.env`: `ZIBBY_API_KEY=zby_your_key_here`
103
+ 4. Login: `zibby login`
104
+ 5. Run with sync: `zibby test test-specs/login.txt --sync`
105
+
106
+ ## Next Steps
107
+
108
+ - [Installation](/installation) — detailed setup and configuration
109
+ - [Running Tests](/running-tests) — all run modes and options
110
+ - [CLI Reference](/cli-reference) — every command and flag
@@ -0,0 +1,88 @@
1
+ ---
2
+ sidebar_position: 1
3
+ title: '@zibby/agent-workflow'
4
+ ---
5
+
6
+ # @zibby/agent-workflow
7
+
8
+ [![npm](https://img.shields.io/npm/v/@zibby/agent-workflow.svg)](https://www.npmjs.com/package/@zibby/agent-workflow)
9
+ [![GitHub](https://img.shields.io/badge/github-ZibbyHQ%2Fagent--workflow-blue)](https://github.com/ZibbyHQ/agent-workflow)
10
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](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`, `ConditionalNode` | Internal node classes (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)