feat(checkpoint): add -g/--global to list checkpoints across all projects#42
Merged
Conversation
…ects `agentbox checkpoints` only listed the current project's checkpoints. Add a -g/--global flag (mirroring `agentbox list -g`) that enumerates every project's docker + cloud checkpoints, grouped and labeled by project. The checkpoint dirs are the source of truth (a checkpoint can outlive its project's config dir); listProjectsConfigured() supplies the human-readable root for the label and per-project *default resolution. New listAllCheckpoints / listAllCloudCheckpoints scan helpers share the per-dir reader with the existing scoped listers.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
Author
|
bugbot run |
loadEffectiveConfig in checkpoints -g's per-project loop could throw on a corrupt config and abort the whole listing. The *default marker is cosmetic, so fall back to empty defaults (.catch(() => null)) per project — matching the best-effort listing the scan helpers already provide.
Owner
Author
|
Fixed in dd12614 — wrapped bugbot run |
Owner
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit dd12614. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
-g/--globaltoagentbox checkpoints(thelssubcommand), mirroringagentbox list -g. The scoped default is unchanged;-genumerates every project's checkpoints (docker + all cloud backends), grouped and labeled by project.How
CHECKPOINTS_ROOT/CLOUD_CHECKPOINTS_ROOT/<backend>directly.listProjectsConfigured()only supplies the human-readable root (for the label and per-project*defaultresolution). Orphan segments with no config are labeled by their dir segment with no marker.listAllCheckpoints()(docker) andlistAllCloudCheckpoints(backend)(cloud) scan helpers, each sharing the per-dir manifest reader with the existing scoped lister (listCheckpointsInDir/listCloudCheckpointsInDirrefactor).*defaultmarkers in the global view match the scoped view exactly (verified againstexpress-server).Tests
checkpoint-list-all.test.tsin bothsandbox-dockerandsandbox-cloud: assert grouping by segment, items sorted bycreatedAt, bad-schema manifests skipped, empty segment dirs dropped, and cloud listings scoped per backend. Pure fs (stub-HOME dynamic import), no docker/network.pnpm build,pnpm lint, and full suites green (docker 277, cloud 62, cli 378).Note
Low Risk
Read-only listing and filesystem scans; no changes to checkpoint create, restore, or delete behavior.
Overview
Adds
-g/--globaltoagentbox checkpoints(ls), aligned withagentbox list -g. The default project-scoped listing is unchanged; the global path prints docker and all cloud backends (daytona, hetzner, vercel) grouped by project, with labels, paths, and the same*defaultmarkers as the scoped view.Library support:
listAllCheckpoints()andlistAllCloudCheckpoints(backend)scan~/.agentbox/checkpointsand~/.agentbox/cloud-checkpoints/<backend>directly; scoped listers now share internallistCheckpointsInDir/listCloudCheckpointsInDirhelpers.listProjectsConfiguredis only used for display names and default resolution—orphan checkpoint segments still appear when project config is gone.The CLI refactors row formatting into
dockerRow/cloudRowfor both modes. New filesystem tests cover grouping,createdAtsort, invalid manifests, empty segments, and per-backend cloud isolation.Reviewed by Cursor Bugbot for commit dd12614. Configure here.