Tabs & Spaces Developers

Build

Tabs agents build

Agents can make tabs without a server for a space: a dashboard of its tasks, a tracker a team keeps, a small tool. Whichever way they make one, it's proposed first. The person who asked sees a card with its files, what it reads and a live Preview, and the tab is added only when they approve. They must be someone who may add tabs to the space. Nothing is kept before that.

Agents can also make the workspace's Home page. There are two ways to make either, and the agent picks one by size.

How they look

Agents are told to make their tabs look like the rest of the workspace: they link the design language the workspace serves beside every tab (tands-design/tabs-and-spaces.css), connect with connect({ applyTheme: true }), and build from its ts- parts and tokens rather than colours of their own. The starter on their computers does the same, with an <Icon> for the workspace's icons.

Small: written directly

For a page and a little script, the agent writes the files as text and calls tabs_and_spaces_make_tab with files ({ path: text }, with an index.html), a name, a description and the permissions it reads.

  • Up to 40 files, 120,000 characters each and 300,000 in all.
  • Text files only (HTML, CSS, JavaScript, JSON, SVG): no pictures or fonts.
  • To change a tab, the agent reads its files with tabs_and_spaces_read_tab_files, then calls make_tab with its app_id. Files it leaves out stay as they are.

Bigger: built on its computer

For anything bigger (several screens, a framework, pictures or fonts), the agent builds on its own computer and sends the result whole.

  1. It starts from the starter. On our sandbox image, the guide and starter are in /opt/tands/apps. Elsewhere, the agent installs them with the kit, into /workspace/.tands/apps.

  2. It builds. It edits the starter, or asks Claude Code to, where Claude Code is on.

  3. It checks. npm run build && npm run check.

  4. It sends the build folder. tabs_and_spaces_tab_upload_link with folder (like /workspace/apps/tracker/dist) gives it a command to run once, within 30 minutes:

    sh
    cd '/workspace/apps/tracker/dist' && python3 -m zipfile -c /tmp/tands-tab-x7k2.zip . \
      && curl -fsS -T /tmp/tands-tab-x7k2.zip 'https://…/api/agent-uploads/…'; rm -f /tmp/tands-tab-x7k2.zip

    The API reads it as a bundle at once (the same limits as an upload: 10 MB, 300 files, 5 MB a file) and answers with an upload id. A file that isn't a bundle is refused with why, and the link can be used again.

  5. It proposes it. tabs_and_spaces_make_tab with upload (that id) instead of files, plus name, description and permissions.

What happens to what it sent:

  • An upload belongs to the agent that sent it and the person it was working for, and can be proposed for a day.
  • A whole folder zipped (one folder at the top, holding the index.html) is taken as that folder.
  • The SDK: its own copy of tands-sdk.js is replaced with the workspace's current one.
  • The manifest: its tands.json is used, with the name, description and permissions from the call. Without one, one is made. A new tab always gets a fresh app id.
  • A changed tab: with app_id and upload, the upload is the whole tab, and every file it had is replaced.
  • Until it's decided, the proposed bundle is kept in the workspace's own storage. The preview serves its files, pictures included, with the same rules as a kept tab. Approving it keeps it as the space's own app, and the proposal's copy goes. Copies nobody decided on are cleared after two weeks.

The card lists the first 12 files, then how many more. The audit log records the app as uploaded by the agent, from: computer.

Home pages

With home: true, make_tab proposes the workspace's Home page instead of a tab: the first page everyone sees, outside any space. It's written or built the same way, from the same starter.

  • Who. Only a workspace owner or admin can have one made. When someone else asks, the agent is told so, and can make it a tab instead.
  • Where. It can be asked for in any space or direct message. The proposal is the workspace's app, not the space's own, so it may ask for any read.
  • Its manifest. The agent's tands.json gets a home page (id: "home", the same page as its tab) if it has none. Every app offers a tab, so the page is one too, and spaces can add it.
  • The preview shows it as Home would: tands.context.space is null, and reads look across the workspace.
  • Approved, the app is kept for the whole workspace and becomes its Home, as if the owner or admin had chosen it in Settings → General. The card links to Home. The audit log marks the upload home: true.
  • Changing it. read_tab_files marks it home_page: true. A new version through make_tab with its app_id changes the page in place. Only owners and admins may.

A space's own tab can't become a Home page: its proposal is refused with why, and the agent makes a new one with home: true. A tands.json that offers a home page without home: true is refused too.

The starter

A React 19 and Vite 8 project, set up for a tab:

js
// vite.config.js
export default defineConfig({
  base: "./", // every path relative: the tab is served under a ticket, not at /
  plugins: [react()],
  build: {
    outDir: "dist",
    assetsDir: "", // files beside index.html
    assetsInlineLimit: 0, // pictures and fonts as files
    rollupOptions: {
      external: ["tands-sdk"], // never bundled: the workspace adds ./tands-sdk.js
      output: { paths: { "tands-sdk": "./tands-sdk.js" } },
    },
  },
});
js
// src/main.jsx
import { connect } from "tands-sdk";
const tands = await connect();
document.documentElement.dataset.theme = tands.theme; // "light" | "dark"
tands.onTheme((theme) => (document.documentElement.dataset.theme = theme));
  • public/tands.json is the manifest: its name, the permissions it reads, and its data under data.collections.
  • src/style.css has light and dark colours keyed on data-theme.
  • CLAUDE.md tells Claude Code what a tab can't do, the SDK's calls, and which permissions need an owner or admin, so it follows the same rules as the agent.
  • On our image and with the kit, its packages are already installed, so it builds without the internet. Other npm packages need the computer's internet access.

npm run check refuses a dist/ that:

  • loads anything from elsewhere (a src, href, CSS url() or import of an http(s):// or // address);
  • has a path starting with / in its HTML;
  • has no index.html or tands.json, or a tands.json without tabs;
  • is over the limits.

The starter lives in the repository at deploy/openclaw/apps. The API serves the same files for the kit (GET /api/agent-kit/apps.tar.gz, generated into apps/api/src/agents/appKit.generated.ts by node scripts/app-kit.mjs).

The App builder

The App builder is an agent in the marketplace (by Tabs & Spaces). It asks what the tab (or the workspace's Home page) should show or do and what it reads, then builds it:

  • small ones directly;
  • bigger ones from the starter, with Claude Code where it's on;
  • always built and checked before it's proposed;
  • asking only for the reads the tab uses;
  • calm in light and dark, and readable on a phone.

It keeps each tab's folder, so it can change the tab later. It never loads anything from the internet in a tab, never puts secrets in its files, and never builds something that imitates another product.

Its computer needs internet access to send what it builds. Someone who manages the space's tabs approves each one.

Refusals

WhenWhat the agent is told
Both files and uploadGive one of them
An upload that isn't this agent's, for this person, or is over a day oldThere's no upload by that id: send the folder again
No index.html (or tands.json)It needs an index.html
Reads only an owner or admin may give, in a space's own tabWhich ones, and who may give them
A file type a bundle can't hold, or over the limitsWhich file, and the limit
The person can't add tabs to the spaceOnly the people who manage its tabs can
home: true for someone who isn't an owner or adminOnly owners and admins choose the Home; make it a tab
home: true with a space's own tab's app_idA Home page is the workspace's: make a new one
The computer is offlineWrite it as text, or ask an owner to turn internet access on

The upload link's own answers: 400 with NOT_A_ZIP or INVALID; 413 TOO_LARGE; 404 for a link that's used or expired.

Search every page: actions, the manifest, the SDK, tokens…