feat(pull): reverse-sync evolved skills + agent context files#28
Conversation
…Claw
Adds `gcplane pull -f <tenant> [--kind skill|context-files] [--all] [--dry-run]`
to write self-evolved skill trees and agent context files back into the repo so
runtime changes can be reviewed in a git diff and re-committed.
- DownloadSkill: GET /v1/skills/{id}/files (tree) + per-file ?raw=true (raw bytes).
- DownloadAgentContextFiles: GET /v1/agents/{id}/export?sections=context_files,
untar the context_files/ prefix only.
- skillpkg.UnpackTo: sha256-idempotent writes, rejects traversal/abs paths, skips
hidden/system artifacts, caps MaxFileSize, optional prune.
- Default pulls source in {gcplane,evolution}; --all relaxes (excludes bundled/system).
- ResourceInfo.Source added so the skill source filter works.
- Never writes secrets (read-from-goclaw, write-to-repo only).
|
Warning Review limit reached
More reviews will be available in 13 minutes and 29 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Why
Agents with
skill_evolve/self_evolve(van-anh, lan-runner, and now master's Friday+Juno) mutate their skill source and SOUL/CAPABILITIES at runtime. Those changes diverge from git and get overwritten on the nextapplyunless captured.gcplane pullis the missing reverse direction: read evolved artifacts back into the repo for review + commit.Command
manifest.yaml).source ∈ {gcplane, evolution}already declared locally;--allrelaxes (excludesbundled/system).--dry-runprints a diff, writes nothing.Round-trip
How it reads (full fidelity, no goclaw changes)
GET /v1/skills/{id}/files(tree) + per-file?raw=true(raw bytes → binary-safe).GET /v1/agents/{id}/export?sections=context_files→ untarcontext_files/prefix only (skips per-user files +agent.json).Safety
skillpkg.UnpackTo: sha256-idempotent (clean diffs), rejects../abs paths + zip-slip, skips hidden/system artifacts,MaxFileSizecap, prune off by default.Tests
go build ./... && go vet ./... && go test -race ./...green.skillpkg/unpack_test.go,skill_download_test.go,context_files_download_test.go,cmd/pull_test.go(source-filter, --all, dry-run-writes-nothing, idempotency).Scope (v1)
Skills + agent contextFiles only — the two artifact classes evolution mutates. Providers/channels/MCP/cron/etc. stay git-authoritative (carry write-only secrets; not evolution targets). Design:
goclaw-config/plans/reports/design-260614-0255-gcplane-pull-and-evolution.md.