mirror of
https://github.com/hanzo-inc/tabs.git
synced 2026-11-10 03:09:32 +00:00
New (shell, desktop, browser, cloud machine, and the host's menu) adds a column at the end of the top level and gives every column an equal share (tiles `append`, `balance`); it used to halve the focused pane, so the third terminal got a quarter of the screen. A pane's own Split right / Split down, and the bar's, divide that pane alone and, with a launcher, start a new cloud machine in the new half without asking where. The picker, where it still shows, offers New machine first. A divider now drags against its own split's extent (`ratioAt`): read against the whole box, a nested seam jumped away from the pointer. The terminal is told Zen Mono first, from one constant. Claude-Session: https://claude.ai/code/session_015XYKLnBbrbajqj1GpRydF8
88 lines
2.1 KiB
TypeScript
88 lines
2.1 KiB
TypeScript
/**
|
|
* The workspace, for whoever is hosting it.
|
|
*
|
|
* tabs.hanzo.ai is one host. The desktop shell is another, and hanzo.ai a
|
|
* third — the same tiling of terminals, desktops and pages in each, because it
|
|
* is the same component rather than three that look alike. That is the whole
|
|
* reason this file exists: a second copy of a pane tree is a second set of
|
|
* answers to what a split does, and they drift.
|
|
*
|
|
* WHAT A HOST SUPPLIES is the machines and a way to mint a pane's url. The
|
|
* `Workspace` component holds no token and calls no server: `hosts` and `mint`
|
|
* come in as props, so a host points them at whichever control plane its
|
|
* identity belongs to. The functions in `lib/api` are the ones tabs.hanzo.ai
|
|
* uses for that, offered here because another host most likely wants the same
|
|
* ones — each taking its origin as a parameter.
|
|
*
|
|
* SOURCE IS PUBLISHED, not a build. Both hosts compile TypeScript already, so a
|
|
* build step here would be a second toolchain producing something neither
|
|
* needs, and one more thing to be stale.
|
|
*/
|
|
export { Workspace } from './components/workspace';
|
|
|
|
/**
|
|
* The wiring, so a host supplies a token and nothing else.
|
|
*
|
|
* `useFleet` reads the registry, folds sessions and sandboxes into machines,
|
|
* mints a url per pane and polls on the plane's own clock. It was the web app's
|
|
* page; copied into each host it would be three answers to how often a machine
|
|
* goes stale.
|
|
*/
|
|
export { type Fleet, useFleet } from './lib/fleet';
|
|
|
|
export {
|
|
DEFAULT_SHELL,
|
|
DEADLINE,
|
|
DOT,
|
|
READY,
|
|
type Binding,
|
|
type Shell,
|
|
type TerminalHost,
|
|
host,
|
|
isReady,
|
|
label,
|
|
machineOf,
|
|
mintName,
|
|
proves,
|
|
rescued,
|
|
restore,
|
|
safeName,
|
|
shellUrl,
|
|
web,
|
|
} from './lib/panes';
|
|
|
|
export {
|
|
type Dir,
|
|
type Geometry,
|
|
type Path,
|
|
type Tile,
|
|
append,
|
|
balance,
|
|
closePane,
|
|
geometry,
|
|
pageGeometry,
|
|
pane,
|
|
paneIds,
|
|
ratioAt,
|
|
setRatio,
|
|
splitPane,
|
|
} from './lib/tiles';
|
|
|
|
export {
|
|
API,
|
|
type Class,
|
|
type Door,
|
|
type Machine,
|
|
type SandboxMachine,
|
|
type Session,
|
|
Refusal,
|
|
createSandbox,
|
|
frameUrl,
|
|
grant,
|
|
machineName,
|
|
machines,
|
|
sandboxes,
|
|
sessions,
|
|
unfunded,
|
|
} from './lib/api';
|