Repository navigation
feat(host): export a channel as a seed and import seeds as new channels - #533
Merged
Merged
Conversation
`ace export` writes a local channel's chats as editable JSON: people's messages by author and time, and agents' turns as the pi messages their runs committed. `ace import` appends a seed through pi into a new channel, optionally moving its times to now, so demos and fixtures get real channels whose agents read the imported history as context. The gateway now refuses worker-only requests (worker, freeze, export), which it previously forwarded to channel workers for any client. Why: apps/host/src/gateway.ts | Worker requests (WORKER) never pass through the gateway; any new WorkerRequest op must be added there Why: packages/channel/src/seed.ts#function importSeed | Imports only into an empty root chat, appending through pi so ids, heads and docs stay pi's
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.
Adds
ace export <channel> <file>andace import <file> [--project <dir>] [--name <name>] [--now]for demo and fixture channels. This is a true import, not a replay:The import appends through pi into a new channel, so the result is an ordinary channel. Its agents read the imported history as context and continue it.
--nowshifts every time so the newest message lands at import. The channel is listed only once the whole seed is in, and a failed import removes its directory.The gateway also refuses worker-only requests (
worker,freeze, and the newexport). It used to forward them to channel workers for any client, so a teammate could freeze someone else's channel.Tested end to end in a throwaway Ace home:
--now.ace watch, the app UI, the stored timestamps, the reactions and captions docs, and the second chat all check out.askin the imported channel answered from the imported history.exportorfreezeover a gateway WebSocket now gets "Unknown request", andinfostill works.Built in Ace
No. I built this with Claude Code outside Ace, at the user's request, as part of a demo-mode session. Screenshots of the test app came from Playwright.