zuplo 6.70.33 → 6.70.35
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/docs/build-with-ai.mdx +159 -0
- package/package.json +4 -4
- package/docs/articles/ai-agents.mdx +0 -169
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Build with AI
|
|
3
|
+
sidebar_label: Build with AI
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
AI coding agents — Claude Code, Cursor, GitHub Copilot, Codex, Windsurf, and
|
|
7
|
+
others — have first-class support for building and operating Zuplo APIs. This
|
|
8
|
+
page lists the resources that keep agents grounded in accurate, up-to-date Zuplo
|
|
9
|
+
knowledge instead of stale training data.
|
|
10
|
+
|
|
11
|
+
The pieces are complementary. Start with `AGENTS.md` and the bundled docs, then
|
|
12
|
+
layer on skills and MCP servers as needed.
|
|
13
|
+
|
|
14
|
+
## AGENTS.md and bundled docs
|
|
15
|
+
|
|
16
|
+
The `zuplo` npm package ships the full documentation at
|
|
17
|
+
`node_modules/zuplo/docs/`, version-matched to the Zuplo version installed in
|
|
18
|
+
your project. An `AGENTS.md` file at the repo root tells agents to read those
|
|
19
|
+
docs before writing any code — no network calls required.
|
|
20
|
+
|
|
21
|
+
New projects scaffold both files automatically:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx create-zuplo-api@latest
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
For existing projects on `zuplo` 0.66.0 or later, drop in the default
|
|
28
|
+
`AGENTS.md`:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
curl -o AGENTS.md https://raw.githubusercontent.com/zuplo/tools/main/AGENTS.md
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Claude Code users get the same instructions by importing `AGENTS.md` from
|
|
35
|
+
`CLAUDE.md`:
|
|
36
|
+
|
|
37
|
+
```md title="CLAUDE.md"
|
|
38
|
+
@AGENTS.md
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The bundled `node_modules/zuplo/docs/` tree covers concepts, policies, handlers,
|
|
42
|
+
articles, CLI reference, the developer portal, guides, and the programmable API
|
|
43
|
+
— everything an agent needs to write correct Zuplo code without guessing.
|
|
44
|
+
|
|
45
|
+
## Agent Skills
|
|
46
|
+
|
|
47
|
+
[Agent skills](https://agentskills.io) are structured instruction files that
|
|
48
|
+
agents load automatically. The official Zuplo skills live in
|
|
49
|
+
[`zuplo/tools`](https://github.com/zuplo/tools) and cover gateway configuration,
|
|
50
|
+
monetization, the CLI, and the Zudoku developer portal.
|
|
51
|
+
|
|
52
|
+
Install all of them with the cross-client
|
|
53
|
+
[`skills` CLI](https://github.com/cloudflare/agent-skills-discovery-rfc):
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx skills add zuplo/tools
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
| Skill | Description |
|
|
60
|
+
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
61
|
+
| **zuplo-guide** | Documentation lookup, request pipeline, route and policy configuration, custom handlers, and deployment. Start here. |
|
|
62
|
+
| **zuplo-monetization** | Meters, plans, Stripe billing, subscriptions, usage tracking, private plans, and tax collection. |
|
|
63
|
+
| **zuplo-cli** | Local development, deployment, environment variables, tunnels, OpenAPI tools, mTLS, and project management. |
|
|
64
|
+
| **zudoku-guide** | Zudoku framework — setup, configuration, OpenAPI integration, plugins, auth, theming, troubleshooting, and migrations. |
|
|
65
|
+
|
|
66
|
+
Client-specific installation:
|
|
67
|
+
|
|
68
|
+
- **Claude Code** — register the marketplace, then install:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
/plugin marketplace add zuplo/tools
|
|
72
|
+
/plugin install zuplo-skills@zuplo-tools
|
|
73
|
+
/plugin install zudoku-skills@zuplo-tools
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
- **Cursor** — open **Cursor Settings → Rules → Add Rule → Remote Rule
|
|
77
|
+
(GitHub)** and enter `https://github.com/zuplo/tools`. Skills placed in
|
|
78
|
+
`.cursor/skills/`, `.agents/skills/`, or `~/.cursor/skills/` are
|
|
79
|
+
auto-discovered.
|
|
80
|
+
- **GitHub Copilot, Codex, and other agents** — these read `AGENTS.md` at the
|
|
81
|
+
repo root automatically. The Zuplo `AGENTS.md` (see above) is enough to point
|
|
82
|
+
them at the bundled docs.
|
|
83
|
+
|
|
84
|
+
Skills look up documentation in this order: bundled docs in
|
|
85
|
+
`node_modules/zuplo/docs/`, then the Docs MCP server below, then a URL fetch to
|
|
86
|
+
`https://zuplo.com/docs/` as a fallback.
|
|
87
|
+
|
|
88
|
+
## Docs MCP Server
|
|
89
|
+
|
|
90
|
+
The Docs MCP server exposes the full Zuplo documentation through the
|
|
91
|
+
[Model Context Protocol](https://modelcontextprotocol.io). It's public, with no
|
|
92
|
+
authentication required.
|
|
93
|
+
|
|
94
|
+
**Endpoint:** `https://dev.zuplo.com/mcp/docs`
|
|
95
|
+
|
|
96
|
+
| Tool | Purpose |
|
|
97
|
+
| -------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
98
|
+
| `search-zuplo-docs` | Semantic search across all Zuplo documentation. Useful for finding pages on policies, handlers, and concepts. |
|
|
99
|
+
| `ask-question-about-zuplo` | Ask a natural-language question. Returns a synthesized answer grounded in the docs. |
|
|
100
|
+
|
|
101
|
+
Add it to any MCP-compatible client by pointing the client at the endpoint as a
|
|
102
|
+
streamable HTTP server. For project-local work, prefer the bundled
|
|
103
|
+
`node_modules/zuplo/docs/` — they match your installed version and don't need a
|
|
104
|
+
network round-trip.
|
|
105
|
+
|
|
106
|
+
## Zuplo MCP Server
|
|
107
|
+
|
|
108
|
+
The Zuplo MCP server exposes the [Zuplo Developer API](https://dev.zuplo.com)
|
|
109
|
+
through MCP. Agents can manage accounts, deployments, API keys, custom domains,
|
|
110
|
+
tunnels, audit logs, and analytics in a single authenticated session.
|
|
111
|
+
|
|
112
|
+
**Endpoint:** `https://dev.zuplo.com/mcp`
|
|
113
|
+
|
|
114
|
+
:::caution
|
|
115
|
+
|
|
116
|
+
Unlike the Docs MCP server, this server performs real operations against your
|
|
117
|
+
Zuplo account. Connecting an agent gives it the same permissions as the API key
|
|
118
|
+
you authenticate with — scope the key tightly and treat it like any other
|
|
119
|
+
production credential.
|
|
120
|
+
|
|
121
|
+
:::
|
|
122
|
+
|
|
123
|
+
Authenticate with a [Zuplo API key](./articles/accounts/zuplo-api-keys.md).
|
|
124
|
+
Create one in the Zuplo Portal under
|
|
125
|
+
[**Account Settings → API Keys**](https://portal.zuplo.com/+/account/settings/api-keys),
|
|
126
|
+
then pass it as a bearer token:
|
|
127
|
+
|
|
128
|
+
```http
|
|
129
|
+
Authorization: Bearer <ZUPLO_API_KEY>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Capabilities include:
|
|
133
|
+
|
|
134
|
+
| Area | What agents can do |
|
|
135
|
+
| --------------------- | ------------------------------------------------------------------------------------------ |
|
|
136
|
+
| **Accounts** | List accounts and identify the caller (`WhoAmI`). |
|
|
137
|
+
| **Projects** | List projects and environments in an account. |
|
|
138
|
+
| **Deployments** | List, read, redeploy, and delete deployments. Upload sources and check deployment status. |
|
|
139
|
+
| **API Key Buckets** | Create, list, read, update, and delete API key buckets. |
|
|
140
|
+
| **API Key Consumers** | Create, list, read, update, delete, and roll keys for consumers. Manage consumer managers. |
|
|
141
|
+
| **API Keys** | Create (single or bulk), list, read, update, and delete keys for a consumer. |
|
|
142
|
+
| **Custom Domains** | Create, list, update, and delete custom domains. |
|
|
143
|
+
| **Client mTLS CAs** | Create, list, update, and delete client mTLS CA certificates. |
|
|
144
|
+
| **Tunnels** | Create, list, read, update, and delete tunnels. Configure and inspect tunneled services. |
|
|
145
|
+
| **Variables** | Create and update environment variables on a project branch. |
|
|
146
|
+
| **Audit Logs** | Query audit logs with filtering and pagination. |
|
|
147
|
+
| **Analytics** | Get recent calls and request statistics by status code for a deployment. |
|
|
148
|
+
|
|
149
|
+
The tool catalog is generated from the Developer API's OpenAPI spec, so new
|
|
150
|
+
endpoints become available automatically as the API ships them.
|
|
151
|
+
|
|
152
|
+
Example prompts:
|
|
153
|
+
|
|
154
|
+
- _"List all deployments in the `production` environment of project `my-api`."_
|
|
155
|
+
- _"Create a new API key consumer named `acme-corp` and generate a key that
|
|
156
|
+
expires in 30 days."_
|
|
157
|
+
- _"Show me the request stats by status code for the latest deployment over the
|
|
158
|
+
last 24 hours."_
|
|
159
|
+
- _"Set the environment variable `STRIPE_API_KEY` on the `main` branch."_
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zuplo",
|
|
3
|
-
"version": "6.70.
|
|
3
|
+
"version": "6.70.35",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The programmable API Gateway",
|
|
6
6
|
"author": "Zuplo, Inc.",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"zuplo": "zuplo.js"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@zuplo/cli": "6.70.
|
|
23
|
-
"@zuplo/core": "6.70.
|
|
24
|
-
"@zuplo/runtime": "6.70.
|
|
22
|
+
"@zuplo/cli": "6.70.35",
|
|
23
|
+
"@zuplo/core": "6.70.35",
|
|
24
|
+
"@zuplo/runtime": "6.70.35",
|
|
25
25
|
"@zuplo/test": "1.4.0"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Set up your Zuplo project for AI coding agents
|
|
3
|
-
sidebar_label: AI Coding Agents
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Zuplo ships version-matched documentation inside the `zuplo` npm package,
|
|
7
|
-
allowing AI coding agents to reference accurate, up-to-date APIs and patterns.
|
|
8
|
-
An `AGENTS.md` file at the root of your project directs agents to these bundled
|
|
9
|
-
docs instead of their training data.
|
|
10
|
-
|
|
11
|
-
## How it works
|
|
12
|
-
|
|
13
|
-
When you install `zuplo`, the full Zuplo documentation is bundled at
|
|
14
|
-
`node_modules/zuplo/docs/`. The bundled docs cover policies, handlers, concepts,
|
|
15
|
-
guides, CLI reference, and more:
|
|
16
|
-
|
|
17
|
-
```txt
|
|
18
|
-
node_modules/zuplo/docs/
|
|
19
|
-
├── concepts/ # Core concepts (request lifecycle, project structure)
|
|
20
|
-
├── policies/ # Policy catalog, per-policy docs and JSON schemas
|
|
21
|
-
├── handlers/ # Handler docs (URL forward, custom handler, etc.)
|
|
22
|
-
├── articles/ # Guides (CORS, env vars, auth, deployment, etc.)
|
|
23
|
-
├── cli/ # CLI reference
|
|
24
|
-
├── dev-portal/ # Developer portal / Zudoku docs
|
|
25
|
-
├── guides/ # Step-by-step guides
|
|
26
|
-
└── programmable-api/ # Programmable API reference
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
This means agents always have access to docs that match your installed version
|
|
30
|
-
with no network request or external lookup required.
|
|
31
|
-
|
|
32
|
-
The `AGENTS.md` file at the root of your project tells agents to read these
|
|
33
|
-
bundled docs before writing any code. Most AI coding agents — including Claude
|
|
34
|
-
Code, Cursor, GitHub Copilot, Windsurf, and others — automatically read
|
|
35
|
-
`AGENTS.md` when they start a session.
|
|
36
|
-
|
|
37
|
-
## Getting started
|
|
38
|
-
|
|
39
|
-
### New projects
|
|
40
|
-
|
|
41
|
-
When you create a new project with `create-zuplo-api`, the `AGENTS.md` and
|
|
42
|
-
`CLAUDE.md` files are generated automatically. No additional setup is needed:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
npx create-zuplo-api@latest
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### Existing projects
|
|
49
|
-
|
|
50
|
-
Ensure you are on `zuplo` version `0.66.0` or later, then add the following
|
|
51
|
-
files to the root of your project.
|
|
52
|
-
|
|
53
|
-
`AGENTS.md` contains the instructions that agents read:
|
|
54
|
-
|
|
55
|
-
```md title="AGENTS.md"
|
|
56
|
-
# Zuplo: ALWAYS read docs before coding
|
|
57
|
-
|
|
58
|
-
Before any Zuplo work, find and read the relevant doc in
|
|
59
|
-
`node_modules/zuplo/docs/`. Your training data may be outdated — the bundled
|
|
60
|
-
docs are the source of truth.
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
`CLAUDE.md` uses the `@` import syntax to include `AGENTS.md`, so
|
|
64
|
-
[Claude Code](https://docs.anthropic.com/en/docs/claude-code) users get the same
|
|
65
|
-
instructions without duplicating content:
|
|
66
|
-
|
|
67
|
-
```md title="CLAUDE.md"
|
|
68
|
-
@AGENTS.md
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Understanding AGENTS.md
|
|
72
|
-
|
|
73
|
-
The default `AGENTS.md` contains a single, focused instruction: **read the
|
|
74
|
-
bundled docs before writing code**. This is intentionally minimal — the goal is
|
|
75
|
-
to redirect agents from stale training data to the accurate, version-matched
|
|
76
|
-
documentation in `node_modules/zuplo/docs/`.
|
|
77
|
-
|
|
78
|
-
The bundled docs include guides, API references, policy schemas, and handler
|
|
79
|
-
documentation. When an agent encounters a task involving routing, policies,
|
|
80
|
-
authentication, rate limiting, or any other Zuplo feature, it can look up the
|
|
81
|
-
correct configuration in the bundled docs rather than relying on potentially
|
|
82
|
-
outdated training data.
|
|
83
|
-
|
|
84
|
-
You can add your own project-specific instructions to `AGENTS.md` or `CLAUDE.md`
|
|
85
|
-
alongside the Zuplo defaults.
|
|
86
|
-
|
|
87
|
-
## Install official skills
|
|
88
|
-
|
|
89
|
-
For a richer experience, install the official
|
|
90
|
-
[Zuplo agent skills](https://github.com/zuplo/tools). Skills provide
|
|
91
|
-
specialized, task-specific guidance that goes beyond general documentation
|
|
92
|
-
lookup — they teach agents how to set up projects, configure policies, write
|
|
93
|
-
handlers, set up monetization, and more.
|
|
94
|
-
|
|
95
|
-
### What are agent skills?
|
|
96
|
-
|
|
97
|
-
[Agent skills](https://agentskills.io) are structured instruction files that AI
|
|
98
|
-
coding agents load automatically. Each skill focuses on a specific domain and
|
|
99
|
-
includes step-by-step guidance, code patterns, and references to documentation.
|
|
100
|
-
|
|
101
|
-
### Available skills
|
|
102
|
-
|
|
103
|
-
| Skill | Description |
|
|
104
|
-
| ----------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
105
|
-
| **zuplo-guide** | Comprehensive gateway guide — documentation lookup, request pipeline, route/policy configuration, custom handlers. |
|
|
106
|
-
| **zuplo-project-setup** | Step-by-step new project setup — scaffolding, routes, auth, rate limiting, CORS, env vars, deployment. |
|
|
107
|
-
| **zuplo-policies** | Policy configuration — built-in policy catalog, custom code policies, wiring policies to routes. |
|
|
108
|
-
| **zuplo-handlers** | Request handlers — URL forwarding/rewriting, redirects, custom TypeScript handlers, Lambda, WebSockets, MCP servers. |
|
|
109
|
-
| **zuplo-monetization** | API monetization — meters, plans, Stripe billing, subscriptions, usage tracking. |
|
|
110
|
-
| **zuplo-cli** | CLI reference — local dev, deployment, env vars, tunnels, OpenAPI tools, project management. |
|
|
111
|
-
| **zudoku-guide** | Comprehensive Zudoku framework guide — setup, configuration, OpenAPI integration, plugins, auth, theming. |
|
|
112
|
-
|
|
113
|
-
### Install skills
|
|
114
|
-
|
|
115
|
-
Install the skills from GitHub:
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
npx skills add zuplo/tools
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
Or via `.well-known` discovery:
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
npx skills add https://zuplo.com/
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
After installation, agents automatically load the relevant skills when working
|
|
128
|
-
in your project.
|
|
129
|
-
|
|
130
|
-
## Optional: Add the MCP server
|
|
131
|
-
|
|
132
|
-
For search and Q&A across all Zuplo documentation, you can also add the Zuplo
|
|
133
|
-
MCP server. This gives agents the ability to search docs and ask questions in
|
|
134
|
-
real-time.
|
|
135
|
-
|
|
136
|
-
For **Claude Code**, add to `.claude/settings.json`:
|
|
137
|
-
|
|
138
|
-
```json title=".claude/settings.json"
|
|
139
|
-
{
|
|
140
|
-
"mcpServers": {
|
|
141
|
-
"zuplo-docs": {
|
|
142
|
-
"type": "http",
|
|
143
|
-
"url": "https://dev.zuplo.com/mcp/docs"
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
:::tip
|
|
150
|
-
|
|
151
|
-
The MCP server is optional. The bundled docs in `node_modules/zuplo/docs/`
|
|
152
|
-
provide complete, version-matched documentation without any network requests.
|
|
153
|
-
The MCP server is useful for broader search and Q&A across all Zuplo
|
|
154
|
-
documentation.
|
|
155
|
-
|
|
156
|
-
:::
|
|
157
|
-
|
|
158
|
-
## Summary
|
|
159
|
-
|
|
160
|
-
There are three ways to give AI coding agents access to Zuplo documentation,
|
|
161
|
-
listed in priority order:
|
|
162
|
-
|
|
163
|
-
1. **Bundled docs** (recommended) — always available at
|
|
164
|
-
`node_modules/zuplo/docs/`, version-matched, no setup required beyond
|
|
165
|
-
`AGENTS.md`
|
|
166
|
-
2. **Agent skills** — install from [zuplo/tools](https://github.com/zuplo/tools)
|
|
167
|
-
for task-specific guidance on project setup, policies, handlers,
|
|
168
|
-
monetization, and more
|
|
169
|
-
3. **MCP server** — add the Zuplo docs MCP server for real-time search and Q&A
|