Skip to content

fix(host): keep the directory's service URLs across host restarts - #556

Merged
iamnbutler merged 3 commits into
mainfrom
directory-services
Oct 22, 2026
Merged

iamnbutler merged 3 commits into
mainfrom
directory-services

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Addresses gap g5 from the onboarding map. Part of #543.

The host kept the directory's GET / answer only in memory, so after every Ace Helper restart the team's services (HOSTED, APP, COMPUTE) were missing until the first sync succeeded, and permanently while the directory was unreachable: no "Move to cloud", no "Run in cloud", no web app origin from the directory.

  • <ACE_HOME>/directory.json now also records app, hosted, and compute from the last successful sync; the host loads them at start and each sync rewrites them when they change.
  • Joining, changing, or leaving the directory rewrites the file with only the URL (or removes it), so another directory's services never linger.
  • Services load and save only when the file names the directory being synced, so ACE_DIRECTORY alone never creates the file.
  • The new fields are optional; older hosts read only url. This is host config, not channel data.
  • Shares (also named in Keep the team's service URLs across Ace Helper restarts #543) are left in memory: they gate project access, and serving a stale copy offline is a separate decision.

Smoke test with a source host on port 4412 (isolated ACE_HOME, ACE_CONFIG_HOME, ACE_KEYCHAIN_SERVICE) against services/directory under local wrangler dev with APP/HOSTED/COMPUTE vars: after the first sync directory.json held all three; with the directory stopped, a restarted host still offered the cloud move target and ace web printed the directory's app; ace directory off removed the file, and both disappeared. bun types and bun run ci pass.

Built in Ace

No. Claude Code worked outside Ace, in a lane, while the user was away and unattended work could not run in an Ace channel. See #5.

directory.json now records the app, hosted, and compute URLs from the last
successful sync, so cloud options and the web app origin appear at start and
while the directory is unreachable. Joining, changing, or leaving the directory
rewrites or removes the file, which drops them.

Why: apps/host/src/directory.ts#function remember | only a directory.json naming the synced URL records services; ACE_DIRECTORY alone must not create the file
@iamnbutler
iamnbutler merged commit aacf356 into main Oct 22, 2026
1 check passed
@iamnbutler
iamnbutler deleted the directory-services branch October 22, 2026 00:07
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