Hosts

Platform and BYOC compute across all teams.

{#if activeTab === 'platform'} {/if}
{#if !loading && !error}
{totalCount} total
{onlineCount} online
{#if pendingCount > 0}
{pendingCount} pending
{/if}
{/if}
{#each [['platform', 'Platform', platformHosts.length], ['byoc', 'BYOC', byocHosts.length]] as [id, label, count] (id)} {/each}
{#if loading} {@render skeletonRows()} {:else if error}
{error}
{:else if activeTab === 'platform'} {@render hostsTable(platformHosts, false)} {:else} {#if byocHosts.length === 0} {@render emptyState('byoc')} {:else}
{#each byocGroups as group (group.teamId ?? '__none__')} {@const groupPageHosts = byocPageHosts.filter(h => h.team_id === group.teamId || (group.teamId === null && !h.team_id))} {#if groupPageHosts.length > 0}
{group.teamName} {group.hosts.length}
{@render hostsTable(groupPageHosts, false)}
{/if} {/each} {#if byocPageCount > 1}
Page {byocPage + 1} of {byocPageCount} · {byocHosts.length} hosts
{/if}
{/if} {/if}
{#snippet skeletonRows()}
{#each Array(5) as _, i} {/each}
Host Status
{/snippet} {#snippet hostsTable(hosts: Host[], _showTeam: boolean)} {#if hosts.length === 0} {@render emptyState('platform')} {:else}
{#each hosts as host, i (host.id)} {/each}
Host Status
{host.id}
{#if host.address}
{host.address}
{/if} {#if host.provider || host.availability_zone}
{[host.provider, host.availability_zone].filter(Boolean).join(' · ')}
{/if}
{#if host.status === 'online'} {:else} {/if} {host.status}
{/if} {/snippet} {#snippet emptyState(type: 'platform' | 'byoc')}

{type === 'platform' ? 'No platform hosts yet' : 'No BYOC hosts across any team'}

{type === 'platform' ? 'Add a host to start scheduling capsules onto your own compute.' : 'Teams that register their own compute will appear here.'}

{#if type === 'platform'} {/if}
{/snippet} {#if showCreate}
{ if (!creating) showCreate = false; }} onkeydown={(e) => { if (e.key === 'Escape' && !creating) showCreate = false; }} >

Add Platform Host

Register a new platform-managed host. You'll receive a one-time registration token.

{#if createError}
{createError}
{/if}
{/if} {#if createdResult}

Host registered

Pass this token to the host agent to complete registration. It expires in 1 hour and is single-use.

{createdResult.registration_token}

This token will not be shown again. Store it safely before closing.

{/if} {#if deleteTarget}
{ if (!deleting) deleteTarget = null; }} onkeydown={(e) => { if (e.key === 'Escape' && !deleting) deleteTarget = null; }} >

Delete Host

Permanently remove {deleteTarget.id}.

{#if deletePreviewLoading}
Checking active capsules…
{:else if deletePreviewCapsules.length > 0}

{deletePreviewCapsules.length} active capsule{deletePreviewCapsules.length === 1 ? '' : 's'} will be destroyed.

All running workloads on this host will be terminated immediately.

{/if} {#if deleteError}
{deleteError}
{/if}
{/if}