Commit e91ee49
docs(cloud-agents): document customizing workspace snapshots (#105)
* docs(cloud-agents): document customizing workspace snapshots
Add a new page under cloud-agents/handoff documenting how to customize
the end-of-run snapshot pipeline that backs local-to-cloud and
cloud-to-cloud handoff. Targets self-hosted and CLI users who run
outside the bundled warp-agent-docker image and need to provide their
own declarations script (or a static declarations file) for handoff
to work.
The page covers:
- When to customize (custom Docker image, Direct backend, unmanaged
oz agent run in CI)
- The two env vars Warp respects (OZ_SNAPSHOT_DECLARATIONS_SCRIPT,
OZ_SNAPSHOT_DECLARATIONS_FILE)
- The JSONL declarations file format (v1 schema, repo vs file kinds)
- A minimal bash script template + the static declarations file
pattern (no script needed)
- --no-snapshot for disabling snapshots per run
Wire the new page into the Handoff sidebar group and add
single-sentence cross-links from local-to-cloud, cloud-to-cloud,
self-hosting/unmanaged, and self-hosting/index so readers arriving
from any of those entry points can find it.
Co-Authored-By: Oz <oz-agent@warp.dev>
* docs(cloud-agents): address self-audit findings on snapshots page
- Drop the "Continue locally" mention from the intro. Cloud-to-local
handoff doesn't apply workspace patches to a local checkout (per
handoff/index.mdx), so the claim was misleading.
- Replace "empty workspace" with "without the prior session's
uncommitted changes". The cloud workspace isn't empty without a
snapshot — the environment still clones repos at HEAD; what's
missing is the uncommitted delta.
- Restructure "How snapshotting works" to lead with the two modes
(script-driven vs static) before walking through each one. Removes
the implicit assumption that the script always runs.
- Drop the setup_command half of the Direct backend tip. setup_command
injects env vars via OZ_ENVIRONMENT_FILE, which is more indirection
than this page should explain — just point at `environment` config.
- Remove the local-to-cloud cross-link to the snapshots page. The
local-to-cloud path uses upload_snapshot_for_handoff() with Vec
arguments, not OZ_SNAPSHOT_DECLARATIONS_SCRIPT, so the cross-link
could mislead readers. cloud-to-cloud, self-hosting/unmanaged, and
self-hosting/index still link to the page.
Co-Authored-By: Oz <oz-agent@warp.dev>
* docs(cloud-agents): address Oz review on snapshots page
Three suggestions from the Oz review on PR #105, all accepted:
1. Add a security caution after the declarations format section.
Explicit warning that declared `file` paths are uploaded verbatim
and `repo` paths upload the git diff (tracked + untracked,
non-gitignored). Tells users to keep secrets, credentials, and
API tokens out of declared `file` entries before copying the
pattern.
2. Escape JSON metacharacters in repo paths in the bash template.
The previous example printf'd `repo_root` straight into JSON; a
path containing `"` or `\` would produce malformed JSON that
Warp skips with a WARN. Added a sed pass that escapes `\` first,
then `"`, matching the bot's suggested patch.
3. Drop the "including the --no-snapshot flag" claim from the Oz
CLI Related pages bullet. /reference/cli/ doesn't document the
flag today, so the claim sent readers somewhere that couldn't
answer the flag-specific question. The flag is already covered
on this page in the Disable snapshots section.
Co-Authored-By: Oz <oz-agent@warp.dev>
* docs(cloud-agents): align 'untracked files' precision with caution
The "Prefer `repo` over `file`" rule said `repo` entries pick up
"tracked changes plus untracked files" while the security caution
right below said "tracked changes plus untracked, non-gitignored
files". The caution is the accurate one (matches
`git ls-files --others --exclude-standard` in
`app/src/ai/agent_sdk/driver/snapshot.rs::build_repo_patch`), so
tighten the rule to match.
Co-Authored-By: Oz <oz-agent@warp.dev>
* docs(cloud-agents): scrub private warp-agent-docker links from snapshots docs
The two GitHub URLs the new snapshots page used were both pointing at
warpdotdev/warp-agent-docker, which is a private repo — anonymous
visitors get HTTP 404. Replaced both with link-free user-facing prose
and reworded all text mentions of the internal repo name.
Specifically:
* snapshots.mdx frontmatter description: "bundled warp-agent-docker
image" → "bundled cloud agent image".
* snapshots.mdx intro paragraph: drop the link to the private repo
root; refer to "Warp's bundled cloud agent image" instead.
* snapshots.mdx "When to customize" intro: replace "bundled
warp-agent-docker image" with "bundled cloud agent image".
* snapshots.mdx env-var reference: same swap for
OZ_SNAPSHOT_DECLARATIONS_SCRIPT description.
* snapshots.mdx "Write a custom declarations script": drop the link
to the private snapshot-declarations.sh file; the sentence now just
introduces the minimal pattern.
* snapshots.mdx: add a :::note callout under the script example
describing what the bundled image's richer implementation does
beyond the minimal pattern (OZ_SNAPSHOT_SCAN_ROOTS override, jq for
JSON encoding, dedup against existing repo declarations) so power
users know what's available without us pointing at private
artifacts.
* unmanaged.mdx Tracking and observability cross-link: drop the
"warp-agent-docker" qualifier.
Verified with grep: no more "warp-agent-docker" references anywhere
in src/content/docs/.
Co-Authored-By: Oz <oz-agent@warp.dev>
* docs(cloud-agents): add full bundled snapshot script alongside minimal example
Per Harry's Slack OK on showing the full script ("from a security POV,
definitely no issues with showing the entire script... any user who
cared could easily find the script by just running a cloud agent and
cat-ing it out"), include the canonical declarations script Warp
invokes inside the bundled cloud agent image in addition to (not
replacing) the minimal sed-based example.
Changes to snapshots.mdx:
* Keep the minimal sed-based example unchanged. It's a clean starting
point for users adapting a custom script.
* Add a new "### The full bundled script" subsection right after the
Direct backend tip. It introduces the canonical script in prose,
then shows it verbatim in a second bash code block.
* Add a :::note flagging that OZ_SNAPSHOT_JQ defaults to /agent/tools/jq
(an image-only path). External users adapting the script need to put
jq on PATH or override OZ_SNAPSHOT_JQ.
* Drop the previous :::note that summarized what the bundled script
did extra — the same information is now visible directly in the
script.
Co-Authored-By: Oz <oz-agent@warp.dev>
* docs(cloud-agents): address Harry's review on snapshots page
Apply Harry's four outstanding review comments on PR #105:
- "When to customize snapshots" no longer duplicates the example list
from the intro paragraph. Reframed around user intent rather than
failure modes: outside-bundled-image, repos/files outside the
workspace, and dynamic scripted behavior.
- Replaced the "snapshot a fixed set of repositories or files" bullet
with a broader "dynamic snapshotting behavior" item that calls out
that the script can implement any logic the operator wants, not just
a fixed list.
- The "Script-driven" bullet under "How snapshotting works" now names
OZ_SNAPSHOT_DECLARATIONS_SCRIPT inline, so readers know the script
path is overridable before they reach the Script-driven flow
subsection. The "Static" bullet now names OZ_SNAPSHOT_DECLARATIONS_FILE
for symmetry.
- The OZ_SNAPSHOT_DECLARATIONS_FILE entry in the Environment variables
section now spells out its relationship with
OZ_SNAPSHOT_DECLARATIONS_SCRIPT: when the script var is set Warp
picks a per-run path and exports it to the script; users can also
override the file path themselves so both Warp and the script use a
path they control (or to drive the static, no-script flow).
Co-Authored-By: Oz <oz-agent@warp.dev>
---------
Co-authored-by: Oz <oz-agent@warp.dev>1 parent 0c9c2f0 commit e91ee49
5 files changed
Lines changed: 238 additions & 1 deletion
File tree
- src
- content/docs/agent-platform/cloud-agents
- handoff
- self-hosting
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
Lines changed: 233 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| 374 | + | |
374 | 375 | | |
375 | 376 | | |
376 | 377 | | |
| |||
0 commit comments