Skip to content

feat(host): export a channel as a seed and import seeds as new channels - #533

Merged
iamnbutler merged 3 commits into
mainfrom
seed-import
Oct 20, 2026
Merged

iamnbutler merged 3 commits into
mainfrom
seed-import

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Adds ace export <channel> <file> and ace import <file> [--project <dir>] [--name <name>] [--now] for demo and fixture channels. This is a true import, not a replay:

  • People's messages carry any author and an ISO time.
  • Agents' turns are the pi messages a real run committed.
  • Reactions, captions, recaps, the summary, and each chat's model come along.

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. --now shifts 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 new export). 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:

  • Ran a real scenario as two synthetic authors with a real Haiku run and tool calls.
  • Exported it and edited the seed: backdated a message from a third person, added reactions and a second chat.
  • Imported it with --now. ace watch, the app UI, the stored timestamps, the reactions and captions docs, and the second chat all check out.
  • A follow-up ask in the imported channel answered from the imported history.
  • Sending export or freeze over a gateway WebSocket now gets "Unknown request", and info still 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.

`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
@iamnbutler
iamnbutler merged commit 8b9fd41 into main Oct 20, 2026
1 check passed
@iamnbutler
iamnbutler deleted the seed-import branch October 20, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant