mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
feat(claws): export reviewed native bootstrap (#115371)
* feat(claws): export reviewed native bootstrap Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3cdcdb00-ade8-4e61-85a7-8151b35f216a * fix(claws): fail export when the package bootstrap drifted Export re-emitted BOOTSTRAP.md only while the seeded copy was still pending, so an agent whose bootstrap had been edited, flagged unsafe, or become unreadable exported a package with no bootstrap at all. That is the same class of silent loss the managed workspace files already guard against, so treat it the same way: drifted bootstrap state now fails with `bootstrap_drifted` unless the author supplies a reviewed `--bootstrap` replacement. A consumed bootstrap stays a completed lifecycle state and still exports without BOOTSTRAP.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3cdcdb00-ade8-4e61-85a7-8151b35f216a * fix(claws): bind pending bootstrap export bytes * fix(claws): preserve current export ownership limits --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3cdcdb00-ade8-4e61-85a7-8151b35f216a
This commit is contained in:
@@ -405,6 +405,19 @@ managed state has drifted:
|
||||
openclaw claws export incident-triage --out ./incident-triage-export --json
|
||||
```
|
||||
|
||||
Use `--bootstrap <path>` to attach an explicitly reviewed Markdown file as the
|
||||
package-root `BOOTSTRAP.md`. Export re-emits an unchanged, still-pending package
|
||||
bootstrap automatically. A package bootstrap that drifted in the workspace
|
||||
(edited, unsafe, or unreadable) fails the export with `bootstrap_drifted`, the
|
||||
same way managed workspace files fail with `workspace_files_drifted`; pass
|
||||
`--bootstrap <path>` with a reviewed replacement to export anyway. A bootstrap
|
||||
the agent already consumed is a completed lifecycle state, so export omits
|
||||
`BOOTSTRAP.md` instead of failing. The exporter validates the completed package
|
||||
and removes the new output directory if validation fails. Bootstrap is
|
||||
package-authored prompt content: do not include credentials, tokens, private
|
||||
answers, or machine-specific paths. Export does not infer questions, render
|
||||
personal-data templates, persist answers, or add a separate setup lifecycle.
|
||||
|
||||
The result contains `package.json`, canonical `CLAW.md`, and managed workspace
|
||||
sidecars. Managed `SOUL.md` content is emitted as the `CLAW.md` body when it is
|
||||
non-empty UTF-8 and the combined document fits the manifest limit. Otherwise,
|
||||
|
||||
Reference in New Issue
Block a user