Open a Git push for a service
create_pushOpen a Git push on a website, app, agent, or skill that exists: a branch of its repository, writable for one hour, that you push source to before you publish. Use it when you can run git with network access; it sends only what changed, so a large service publishes without carrying its files through the conversation. Otherwise publish with files. The service must exist first: create_service makes it.
A push needs the SHA-256 of a Git key that stays on your machine, as key_sha256; never send the key or put it in a command. This recipe makes a new key for this push in its own mode-600 file, never reusing one, and prints the file's path, then the hash: umask 077; d="$HOME/.config/valet/git-keys"; mkdir -p "$d"; chmod 700 "$d"; f=$(mktemp "$d/key.XXXXXX") && head -c 32 /dev/urandom | od -An -tx1 | tr -d ' \n' > "$f" && echo "$f" && (sha256sum 2>/dev/null || shasum -a 256) < "$f" | cut -d' ' -f1
The result carries a Git URL with no credential, the push's id and branch, the commit it starts from, the name and email to commit as, the limits, and two recipes that read your key from the file: clone the branch and edit, or push a directory as it stands. A push over the limits is refused. Run a recipe, then call publish_site, publish_app, publish_agent, or publish_skill with push: {id, commit}, where commit is the sha the recipe prints. When the push is published, delete this push's key file, and only it: rm -f "$VALET_GIT_KEY_FILE". Only you can publish a push you opened. The key writes only this push's branch, cannot force-push, and expires with the push. Calling again with the same idempotency_key and a different key_sha256 replaces the push's key, so the earlier key stops working for that push. A service holds ten open pushes at once. Requires connecting a Valet account.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"key_sha256": "<key_sha256>"
},
"name": "create_push"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The website's, app's, agent's, or skill's name, as list_services shows it: the one to push to. | |
| org_name | No | The Valet organization it belongs to. Omit to use the organization the account joined first. | |
| key_sha256 | Yes | The SHA-256 of the new Git key you generated on your machine for this push, which the recipe in this tool's description prints second. The push accepts only that key. The key itself is never sent. | |
| idempotency_key | No | An opaque key of your choosing. Repeating a call with the same key returns the same push instead of opening a second one. A repeat with a different key_sha256 replaces the push's key, so the earlier key stops working for that push. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org | Yes | Name of the Valet organization the call acted in. | |
| url | Yes | Git URL of the push branch. It holds no credential: the recipes authenticate with your key file. | |
| name | No | Name of the website, app, or agent the push is on. Absent for a skill push. | |
| skill | No | Name of the skill the push is on. Absent for a website, app, or agent push. | |
| branch | Yes | The push branch, draft/<push_id>. Your key writes only this branch. | |
| limits | Yes | The bounds a push published to this service must stay within. A push over them is refused. | |
| push_id | Yes | ID of the push. Pass it to the publish tool as push.id. | |
| commands | Yes | Two shell recipes that read your key from its file. The first clones the branch so you can edit; the second pushes a directory as it stands. Each prints the commit sha to pass to the publish tool. | |
| expires_at | Yes | When the push and its key stop working, as an RFC 3339 time. Publish before then. | |
| author_name | Yes | Name to commit as. | |
| base_commit | Yes | Commit sha of main when the push opened. The branch starts here. | |
| author_email | Yes | Email to commit as. | |
| active_commit | No | Commit sha of the deployed release, or for a skill its latest version. Absent when nothing is deployed or published. |