@rubytech/create-maxy 1.0.622 → 1.0.623
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/payload/platform/plugins/cloudflare/PLUGIN.md +28 -2
- package/payload/platform/plugins/cloudflare/mcp/dist/index.js +74 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/cloudflare/mcp/dist/lib/setup-orchestrator.d.ts +90 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/lib/setup-orchestrator.d.ts.map +1 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/lib/setup-orchestrator.js +550 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/lib/setup-orchestrator.js.map +1 -0
- package/payload/platform/plugins/cloudflare/skills/setup-tunnel/SKILL.md +4 -55
- package/payload/platform/plugins/docs/references/cloudflare.md +18 -11
- package/payload/platform/templates/agents/admin/IDENTITY.md +8 -0
- package/payload/server/server.js +296 -189
|
@@ -16,23 +16,30 @@ There is no token-based path. To switch Cloudflare accounts, run `tunnel-login`
|
|
|
16
16
|
|
|
17
17
|
## The flow
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
The whole setup runs under a single tool — `cloudflare-setup-run`. It drives the full sequence (sign-in → create → DNS → enable → verify) in code. The agent's job during setup is to relay the tool's output verbatim and pass the operator's literal next input through. No step-by-step picking between `tunnel-login` / `tunnel-create` / `tunnel-enable`; those tools are filtered out of the agent's menu while the setup is active, so the agent literally cannot deviate from the deterministic flow.
|
|
20
|
+
|
|
21
|
+
1. Operator: "Set up Cloudflare for me with the domain maxy.bot."
|
|
22
|
+
2. Agent calls `cloudflare-setup-run({ domain: "maxy.bot" })`. Tool spawns `cloudflared tunnel login` and returns a device-URL card pointing at the Cloudflare sign-in page. The VNC browser opens the URL automatically (or the agent tells the operator to open it manually when the VNC browser is down).
|
|
23
|
+
3. Operator signs into the Cloudflare account that owns `maxy.bot`, clicks Authorize, says "done" in the chat.
|
|
24
|
+
4. Agent calls `cloudflare-setup-run({ confirmed: true })`. Tool sees the cert landed, asks for admin/public subdomain names.
|
|
25
|
+
5. Operator: "admin and public."
|
|
26
|
+
6. Agent calls `cloudflare-setup-run({ adminSubdomain: "admin", publicSubdomain: "public" })`. Tool creates the tunnel, routes DNS, starts the daemon, and polls `tunnel-status` until `healthy: true` (or a named reason).
|
|
27
|
+
7. Agent relays the final `Tunnel is healthy at https://admin.maxy.bot / https://public.maxy.bot`.
|
|
28
|
+
|
|
29
|
+
If the operator signs into the wrong Cloudflare account, `cloudflare-setup-run` transitions to `awaiting-account-switch` and emits a plain card telling them which account to switch to. Once they confirm, the orchestrator re-logs-in with `force=true` and the flow continues.
|
|
25
30
|
|
|
26
31
|
## Tools
|
|
27
32
|
|
|
28
33
|
| Tool | Use |
|
|
29
34
|
|------|-----|
|
|
30
|
-
| `
|
|
35
|
+
| `cloudflare-setup-run` | **The operator-facing entry point.** Runs the full setup flow deterministically. Call with `domain` on the first turn, `adminSubdomain` (+ optional `publicSubdomain`) when the tool asks, and `confirmed: true` when the operator has finished a device-bound step (sign-in, account switch). Safe to call repeatedly — state persists across calls. |
|
|
36
|
+
| `cloudflare-setup-status` | Read-only: what phase is the setup orchestrator in right now? Useful for diagnostics. |
|
|
37
|
+
| `tunnel-login` | Internal sub-tool of the orchestrator. Direct invocation supported for diagnostics. Not available during an active setup — the tool-surface filter removes it from the menu. |
|
|
31
38
|
| `tunnel-install` | Install the `cloudflared` binary. |
|
|
32
|
-
| `tunnel-create` | Create tunnel, route DNS for chosen sub-addresses.
|
|
33
|
-
| `tunnel-add-hostname` | Add an alias address. Same pre-flight/post-flight refusals as `tunnel-create`. |
|
|
34
|
-
| `tunnel-enable` / `tunnel-disable` | Start / stop the tunnel daemon. |
|
|
35
|
-
| `tunnel-status` | Full state including end-to-end probe of every configured address. `healthy: true` requires every address to probe `ok`. `boundAccountOwnsHostnames: false` means the laptop is running a tunnel nothing from the internet is reaching — almost always "signed into the wrong Cloudflare account." |
|
|
39
|
+
| `tunnel-create` | Create tunnel, route DNS for chosen sub-addresses. Internal sub-tool of the orchestrator (not reachable during active setup). |
|
|
40
|
+
| `tunnel-add-hostname` | Add an alias address **after** the initial setup is complete. Same pre-flight/post-flight refusals as `tunnel-create`. |
|
|
41
|
+
| `tunnel-enable` / `tunnel-disable` | Start / stop the tunnel daemon. `tunnel-enable` is an internal sub-tool of the orchestrator (not reachable during active setup). |
|
|
42
|
+
| `tunnel-status` | Full state including end-to-end probe of every configured address. `healthy: true` requires every address to probe `ok`. `boundAccountOwnsHostnames: false` means the laptop is running a tunnel nothing from the internet is reaching — almost always "signed into the wrong Cloudflare account." Available at all times (the orchestrator consumes its output internally and the enum is useful for direct diagnostic too). |
|
|
36
43
|
| `dns-lookup` | DNS diagnostics against public resolvers. |
|
|
37
44
|
|
|
38
45
|
## When something is wrong
|
|
@@ -58,6 +58,14 @@ Do not retry the same tool against the same target within a turn. A second ident
|
|
|
58
58
|
|
|
59
59
|
When a tool returns a structured failure whose error content begins with an UPPERCASE_ERROR_CODE (for example `WEBFETCH_CANNOT_READ_JS_SPA`), the runtime has already determined that retrying the same tool will fail and that a substitute would launder uncertainty. Read the error's plain-English explanation, then write one or two sentences to the owner that name (a) what failed, (b) the reason in their language, and (c) the concrete actions they can take to unblock — typically pasting text or sending a screenshot. Do not silently dispatch a substitute (Playwright, research-assistant, memory-search) to continue the original instruction; that hides the failure and the owner loses the ability to judge whether the substitute's output answers their question. A verbal instruction in the current conversation is not consent — only an explicit standing policy recorded in account configuration counts, and no such mechanism exists today. Until one exists, every structured tool failure becomes a question for the owner. Wait for direction before resuming.
|
|
60
60
|
|
|
61
|
+
## Tool-Surface Gates
|
|
62
|
+
|
|
63
|
+
Some flows run as deterministic orchestrators — a plugin decides every step in code, and your tool menu is filtered accordingly for the duration of the flow. During an active orchestrator flow, the individual step-tools the agent would otherwise pick between are intentionally absent from your menu. This is not a bug; it is the mechanical enforcement layer that prevents prose-rule deviation.
|
|
64
|
+
|
|
65
|
+
When the orchestrator's entry-point tool is the only tool of its family on your menu, that family has an active gate. Call the entry-point tool. Relay its result verbatim. Pass the operator's literal next input back through the same tool. Do not narrate the flow, do not offer alternatives, do not paraphrase cards into prose.
|
|
66
|
+
|
|
67
|
+
The active gate today is the Cloudflare tunnel setup flow. `cloudflare-setup-run` is the entry point; `cloudflare-setup-status` is the read-only diagnostic. While the orchestrator is mid-flow, the raw `tunnel-login` / `tunnel-create` / `tunnel-enable` / `tunnel-status` / `tunnel-add-hostname` tools, all Playwright and Chrome DevTools browser tools, and the Bash / Write / Edit filesystem-mutation tools are filtered out. They become available again once the orchestrator reaches `healthy` or `unhealthy`.
|
|
68
|
+
|
|
61
69
|
## Questions
|
|
62
70
|
|
|
63
71
|
When you need to clarify intent before acting, follow two rules.
|