You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(openclaw): auto-wire AGENTS.md and register project-scoped agent
Closes#14.
Running `./install.sh openclaw` now:
1. Still drops `.openclaw-system.md` (backward-compat).
2. Safely writes `AGENTS.md` at project root — OpenClaw auto-injects this
from the workspace. Uses pi's collision policy: if AGENTS.md exists
and already references `.agent/`, leave it alone; if it exists and
doesn't, print a mergeable snippet instead of overwriting.
3. Runs `openclaw agents add <basename>-<cksum6> --workspace <abs-path>`
best-effort. This is the step that was missing — OpenClaw's default
workspace is `~/.openclaw/workspace`, not the project, so without
registration OpenClaw never sees the brain no matter what files are
at the project root.
Robustness:
- Agent name is lowercased to match OpenClaw's own id normalization, so
the printed `openclaw --agent <name>` matches what's on disk.
- Stable 6-digit suffix from `cksum` of the absolute path avoids
cross-project collisions (`api`, `backend`, `app`, etc.).
- "Agent already exists" on re-run is treated as idempotent success,
not failure.
- `set -e` is preserved; `openclaw agents add` failure never aborts
the install — it degrades to a printed manual command.
- If `openclaw` isn't on PATH, install.sh still writes both files and
prints the exact registration command to run later.
Mirrored in install.ps1 (SHA1 hash, same collision policy, same
lowercase normalization, same idempotent-retry detection).
Docs: README.md adapter table, adapters/openclaw/README.md, and
docs/per-harness/openclaw.md updated to match the new flow.
0 commit comments