@@ -40,17 +40,43 @@ actions. Each action reports missing authentication itself.
4040- For a new app, use only this closed flow:
4141 1 . Read the app inventory.
4242 2 . Call ` cloudflare_listWorkersBuildTokens ` for the selected organization.
43- 3 . If the result includes an available ` lastUsedBuildTokenUuid ` , use that UUID without asking. If
44- not, use the only listed token, ask the user to choose by name and UUID when several tokens are
45- listed, or stop and tell the user to complete Workers Builds token setup when none are listed.
46- 4 . Create the app with the selected token UUID.
43+ 3 . If that current token list is confirmed empty, use explicit null. Otherwise, use an available
44+ ` lastUsedBuildTokenUuid ` without asking, use the only listed token, or ask the user to choose
45+ by name and UUID when several tokens are listed.
46+ 4 . Create the app with the required ` cloudflareBuildTokenUuid ` set to the selected exact UUID or
47+ explicit null.
4748 5 . Read only the inventory until source setup is ` ready ` or ` failed ` .
4849 6 . If source setup is ready, separately read only the inventory until provider setup is ` ready ` or
4950 ` failed ` . Authentication-status, browser-handoff, and Cloudflare account-list reads are not
5051 part of this flow. The complete sequence contains only inventory, the Workers Builds token
5152 list, create, and inventory polls. Call create directly after the token list. Do not list
5253 Cloudflare accounts first. Create has no ` accountId ` and uses the connected Cloudflare
5354 provider.
55+ 7 . When the token was null, the managed run creates the GitHub repository and Convex project but
56+ no Cloudflare Worker. A ready provider setup means only that this requested managed work
57+ finished. Confirm that the exact planned Convex project is attached and ` cloudflareWorkers ` is
58+ empty. Report that Cloudflare setup is pending and give the user
59+ [ samebase.com/docs/cloudflare-setup] ( https://samebase.com/docs/cloudflare-setup ) . Do not call
60+ the app fully ready, attach a temporary Worker, or retry the completed managed run.
61+ 8 . The user completes Cloudflare's standard repository setup to create the first account token,
62+ then deletes the temporary Worker. After the user completes those steps and asks to finish the
63+ app, list the current tokens again and call ` vault_cloudflare_createWorker ` with one exact
64+ UUID. Reread inventory, then call ` vault_cloudflare_rotateConvexDeployKeysForWorkersBuilds `
65+ with the new Worker and the attached Convex project.
66+ - For manual Cloudflare Worker creation or Workers Builds configuration, first call
67+ ` cloudflare_listWorkersBuildTokens ` . Pass only an exact UUID from the current non-empty list. If
68+ the list is empty, stop the write and use current inventory to select the next action:
69+ - For the tokenless managed app with its exact planned Convex project and no attached Worker, use
70+ [ samebase.com/docs/cloudflare-setup] ( https://samebase.com/docs/cloudflare-setup ) . After setup,
71+ list tokens again, call ` vault_cloudflare_createWorker ` with one current exact UUID, reread
72+ inventory, then call ` vault_cloudflare_rotateConvexDeployKeysForWorkersBuilds ` .
73+ - When a Worker is already attached, keep it. After token setup, list tokens again and call
74+ ` vault_cloudflare_configureWorkersBuildsForGitHub ` for that attachment. Do not create another
75+ Worker.
76+ - For another manual vault, complete token setup, list tokens again, and continue only with the
77+ action that matches the request and current inventory. Worker creation does not install Convex
78+ deploy keys.
79+ - Never pass null to a manual Worker or Builds action.
5480
5581After you select the route, use live tool descriptions only for the exact tool name and arguments.
5682Match an inventory ` nextAction ` to its action contract at
0 commit comments