Repository navigation
Conversation
Add `push-session list` to show sessions in the remembered Space with their links, and `push-session unshare <id|route|url>` to revoke every share link scoped to a session and remove its files (--keep-files keeps them, --yes skips the prompt). Re-sharing a session now reuses an active view-only link for that route instead of minting a new one each time. A deletion-only publish leaves its version at "uploaded", so unshare finalizes it to make the removal live.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Summary
Two new commands manage what you've already shared.
npx push-session listshows the sessions in your remembered Space with their routes, agents, dates and share links.npx push-session unshare <session-id|route|url>revokes every share link scoped to that session and removes its files from the live Space. Re-sharing a session now reuses its active view-only link instead of minting a new one each time.Why this matters
The README warns that anyone with the link can read a session, but until now there was no undo. Re-sharing always created another link, so links piled up and none could be revoked from the CLI. In my Space, one session had collected three live links from three shares.
Demo
Simulated demo (HyperFrames), built from a real run against a signed-in Space:
Changes
src/spacefast.jsaddslistShareLinks,revokeShareLink,listFilesandreadSessionMetadata, plus adeletePathsoption onpublishSession. The files endpoint'sqfilter is a substring match, so results are filtered to the exactsessions/<id>/prefix before anything is deleted.uploaded, and the files stay live.publishSessionnow finalizes that version itself and fails loudly if it doesn't become ready, sounsharenever reports a removal that didn't happen.page.viewon that session. Anything broader gets a fresh link as before.unshareasks for confirmation (--yesskips it,--jsonis non-interactive) and takes--keep-filesto revoke links only. If it stops partway, the error says how many links were revoked and that a rerun finishes the job.sf login" message. Publishing still works and just creates a new link.Testing
npm run checkpasses 76 tests, covering list output, unshare with exact-path deletes, consent and cancellation, partial failure and retry, claim-token degradation, link reuse rules, and the finalize step for deletion-only versions.unshare --yes. The link went from 200 to 403, the page itself returned 403, andlistno longer showed the session.Open questions: can claim tokens manage share links, or should
unsharealways requiresf login? DoesdeletePathsaccept a directory prefix? This PR lists every file under the session route to be safe.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.