# DASL > DASL (Data-Addressed Structures & Links, said "dazzle") is a small set of simple, standard primitives for content-addressed, linked data: identifiers (CIDs), deterministic encoding (DRISL), archives (CAR), metadata (MASL), retrieval and discovery (RASL, FISL), media, and Web Tiles, which are small web apps that run safely anywhere. This file tells you which spec to use for what, where every spec is in Markdown, and, in full, how to make, publish, and embed Web Tiles. DASL builds on content addressing, the approach behind Git and IPFS: an identifier (a CID) is derived from the hash of the content, so anyone who receives content can check that it is exactly what was asked for, from any source, trusted or not. Links are made by hash, which lets you build large graphs of documents and data, such as the one behind the AT Protocol and Bluesky. The specs are deliberately small and independent. Most of the time you use one without pulling in the others; CID, DRISL, and CAR are the foundations the rest reuse. DASL is a strict subset of IPFS CIDs and IPLD, so any library that supports CIDv1 and DAG-CBOR can read DASL data. This document is published at , and it is the body of the DASL skill for coding agents at . Its guide to Web Tiles is also published on its own at . ## Which spec to use - **Identify content by what it is, not where it is**: [CID](https://dasl.ing/cid.md). A CID is a SHA-256 hash with a little metadata. If you only need identifiers, treat the string as opaque. - **Encode structured data so the same data always gives the same bytes, and link to other content natively**: [DRISL](https://dasl.ing/drisl.md), a deterministic profile of CBOR with CIDs as links (tag 42). What IPFS calls DAG-CBOR, tightened. - **Put many content-addressed resources in one file or stream**: [CAR](https://dasl.ing/car.md), a header followed by blocks, each with its CID. - **Stream flat key-value pairs with header metadata**: [STAR](https://dasl.ing/star.md). - **Attach web-style metadata (HTTP headers, app-manifest fields) to content, or describe a bundle of resources by path**: [MASL](https://dasl.ing/masl.md). - **Hash large files, or verify them as they stream**: [BDASL](https://dasl.ing/bdasl.md) (BLAKE3; not available in browsers by default, so not the usual choice). - **Give content a URL and serve it over plain HTTP**: [RASL](https://dasl.ing/rasl.md), `rasl:///?hint=` and `https:///.well-known/rasl/`. - **Find out where a CID can be fetched from, and who announced it**: [FISL](https://dasl.ing/fisl.md) (the HTTP lookup API) and [ATFISL](https://dasl.ing/atfisl.md) (announcing locations in AT Protocol repos). - **Get stable identifiers for video and audio**: [MUXL](https://dasl.ing/muxl.md), a deterministic subset of MP4 (ISO-BMFF). Like DRISL for MP4 files. - **Sign media for decentralised identity systems**: [S2PA](https://dasl.ing/s2pa.md), C2PA with secp256k1 and certificates derived from DIDs. - **Refer to similar media rather than one exact file**: [PFP](https://dasl.ing/pfp.md), perceptual fingerprints. - **Ship a web doc or app that can be embedded safely in social posts, chats, agents, or other apps**: [Web Tiles](https://dasl.ing/tiles.md). See the guide below. ## Facts worth having at hand - A DASL CID string is `b` followed by lowercase base32 (RFC 4648, no padding) of: version `0x01`, codec `0x55` (raw bytes) or `0x71` (DRISL), hash type `0x12` (SHA-256), hash size `0x20`, then the 32-byte digest. In practice raw CIDs start with `bafkrei` and DRISL CIDs with `bafyrei`. - Only CIDv1, only base32 lowercase, only those two codecs, only SHA-256 (BDASL adds BLAKE3). Reject anything else. - DRISL is CBOR with constraints: map keys are strings, sorted as CBOR Core says; no tags other than 42; no indefinite lengths; floats always 64-bit (and best avoided); only `true`, `false`, `null` as simple values. Tag 42 holds the binary CID with a `0x00` byte in front. - In JSON, write a CID link as `{ "$link": "bafy…" }` (the AT Protocol convention). - To check an implementation, see the compliance matrix at (it covers DRISL and CID). ## Specifications Every spec is available as Markdown: replace `.html` with `.md` in its URL. Maturity levels say how much a spec may still change: **Stable** (deployed, not expected to change), **Stabilising** (minor changes; breaking ones need community review), **Hot New Stuff** (unstable, experiment but don't depend on it), **Informative** (not meant to be implemented in code). They are defined in [Governance](https://dasl.ing/governance.md). ### Foundations - [CID — Content Identifiers](https://dasl.ing/cid.md): identifiers for addressing resources by their contents. Stable. - [DRISL — Deterministic Representation for Interoperable Structures & Links](https://dasl.ing/drisl.md): deterministic CBOR with CIDs as compact links. Stable. - [CAR — Content-Addressable aRchives](https://dasl.ing/car.md): a set of content-addressed resources in one stream, with a header that describes it. Stable. - [STAR — STreaming ARchives](https://dasl.ing/star.md): a stream of flat key-value pairs, with flexible header metadata. Hot New Stuff. - [MASL — Metadata for Arbitrary Structures & Links](https://dasl.ing/masl.md): CBOR metadata documents for self-contained, self-certified content distribution. Stabilising. - [BDASL — Big DASL](https://dasl.ing/bdasl.md): a hash type for large files, with streaming verification. Stabilising. ### Retrieval & Discovery - [RASL — Retrieval of Arbitrary Structures & Links](https://dasl.ing/rasl.md): a URL scheme for DASL resources and a simple HTTP way to fetch them. Stabilising. - [FISL — Finding Internet Structures & Links](https://dasl.ing/fisl.md): an HTTP lookup API that maps CIDs to where you can get them and who announced them. Hot New Stuff. - [ATFISL — Content Discovery with the AT Protocol](https://dasl.ing/atfisl.md): publishers announce download locations in their AT repos; indexers gather them for FISL. Hot New Stuff. ### Media - [MUXL — Media Uniform eXact Layout](https://dasl.ing/muxl.md): stable identifiers for video and audio. Stabilising. - [S2PA — Simple Standard for Provenance and Authenticity](https://dasl.ing/s2pa.md): C2PA media signing, extended for decentralised identity systems. Stabilising. - [PFP — Perceptual Fingerprint](https://dasl.ing/pfp.md): perceptual hashes that point at similar content. Stabilising. ### Web Tiles - [Web Tiles](https://dasl.ing/tiles.md): composable web docs and apps that run safely anywhere. Stabilising. - [Tiles Protocols](https://dasl.ing/tiles-protocols.md): how tiles get capabilities from, and talk to, whatever embeds them. Hot New Stuff. - [Tiles Protocol: Data Passing](https://dasl.ing/tp-data.md): passing data to and from tiles. Hot New Stuff. ### Informative - [IPFS Interoperability Considerations](https://dasl.ing/ipfs.md): what to consider when using DASL with IPFS systems. - [Governance of the DASL Project](https://dasl.ing/governance.md): stewards, editors, maturity levels, and new specs. ## Implementations - JS / TS: [atcute](https://github.com/mary-ext/atcute/) (`@atcute/cid`, `@atcute/cbor`, `@atcute/car`: small, and what the tiles tools use), [@dasl/rasl](https://www.npmjs.com/package/@dasl/rasl) (RASL handler for Express), [@dasl/tiles](https://www.npmjs.com/package/@dasl/tiles) (Web Tiles loader, CLI, and server), [Helia](https://helia.io/). - Python: [carbox](https://github.com/snarfed/carbox) (CAR), [dag-cbrrr](https://github.com/DavidBuchanan314/dag-cbrrr) (fast DAG-CBOR), [python-libipld](https://github.com/MarshalX/python-libipld). - Go: [go-dasl](https://github.com/hyphacoop/go-dasl) (DRISL, CID, and more), [go-cid](https://github.com/ipfs/go-cid), [Kubo](https://github.com/ipfs/kubo/) / [Boxo](https://github.com/ipfs/boxo/). - Rust: [dasl](https://github.com/n0-computer/dasl) (CIDs and DRISL), [ipld-core](https://github.com/ipld/rust-ipld-core), [rust_cid_npm](https://salsa.debian.org/debian/rust_cid_npm). - Elixir: [elixir-dasl](https://github.com/cometsh/elixir-dasl) (CID, DRISL, and CAR). The current list is at . Issues and proposals go to . ## Making Web Tiles A tile is a small web app or document (HTML, CSS, JavaScript, images, anything a browser runs) that carries everything it needs and is cut off from the network. Because it cannot phone home, it is safe to run where a normal web page is not: inside a social media post, a private chat, an agent's answer, or another app. Whatever embeds the tile (the *host*) mediates everything the tile exchanges with the outside. Use a tile when you want to hand someone interactive content they can run without trusting you: a game, a poll, a chart, a calculator, an explainer, an article that keeps its look, a little tool an agent builds on the fly. Don't use one for something that must call a server by itself: a tile can't. A tile is three things: 1. **Resources**: files, each addressed by its CID. 2. **A manifest**: a MASL document in bundle mode, with a `name` and a `resources` map from absolute paths to `{ src: , content-type, …other HTTP headers }`. The `/` entry is what gets rendered. 3. **A container**: an AT Protocol record (collection `ing.dasl.masl`, resources as blobs on the author's PDS), or a CAR file with the manifest as its header (a `.tile` file). The fastest path from nothing to a published tile: write a directory with an `index.html` and a `manifest.json`, preview it at , publish it with `atile publish -s `. ### What a tile can and cannot do The host enforces this on every response, whatever the tile declares. The exact headers are in the [spec](https://dasl.ing/tiles.md); what they mean for you: Works: - Any HTML, CSS, and JavaScript, including inline ` ``` `style.css`: ```css :root { color-scheme: light dark; font-family: system-ui, sans-serif; } body { margin: 0; padding: 1rem; } button { font: inherit; padding: .4rem .8rem; } ``` `tile.js`: ```js let pokes = 0; let sendData; // set when the host speaks tp-data document.getElementById('poke').addEventListener('click', () => { document.getElementById('count').textContent = String(++pokes); sendData?.({ pokes }); }); try { const data = await import('/.well-known/web-tiles/data.js'); sendData = data.sendData; data.addDataHandler((payload) => { if (typeof payload?.greeting === 'string') { document.getElementById('status').textContent = payload.greeting; } }); data.listen(); // always call this once the handlers are in place } catch { // No data protocol here. The tile still works on its own. } ``` Always declare the charset in the HTML, and always put a real ``. ### Talking to the host: tiles protocols A tile gets capabilities by importing them from `/.well-known/web-tiles/<protocol>.js`. The host provides the implementation; if it doesn't support the protocol, the import fails. The pattern never changes: ```js try { const api = await import('/.well-known/web-tiles/some-protocol.js'); // use it } catch { // not available here: degrade, or tell the user } ``` Never bundle a copy of a protocol's implementation in the tile: different hosts implement the same protocol differently, and the path is reserved anyway. **Data passing** ([tp-data](https://dasl.ing/tp-data.md)) is the one protocol implemented today, in `/.well-known/web-tiles/data.js`: - `addDataHandler(fn)`: `fn(payload)` is called with whatever the host sends. - `removeDataHandler(fn)`. - `listen()`: tells the host the tile is ready to receive. Call it once your handlers are set; hosts wait for it before sending. - `sendData(payload)`: sends data to the host. Payloads cross the boundary as structured clones: plain objects, arrays, strings, numbers, booleans, `null`, `Date`, typed arrays, `Map`, `Set`. No functions, no DOM nodes. How to use it well: - Define a small message vocabulary and document it. A good tile says what it accepts when it connects, for example `sendData({ ready: true, accepts: ['greeting', 'theme'] })` right after `listen()`. - Validate what you receive. The host is not necessarily your code. - Answer requests with a result (`{ ok: true, … }` or `{ ok: false, error }`) so a host, or an agent driving the tile, can tell what happened. - What the host does with what you send is up to the host: a chat may broadcast it to the other participants' copies of the tile (that is how a poll stays in sync), an agent may read it as the tile's result, a preview tool just logs it. Other names are registered but not usable yet: `store.js` (self-editing tiles, [tp-editable](https://dasl.ing/tp-editable.md)) is reserved and its spec is a placeholder, as are the specs for modes and roles and for sync. Don't build on them. On the wire, in web hosts, these are `postMessage` events with an `action` (`tiles-protocol-up-data-ready`, `tiles-protocol-up-data-payload`, `tiles-protocol-down-data-payload`) and a `payload`. A tile should use the module, not the messages. ### Building with frameworks and bundlers Any toolchain that produces static files works. Build, then point the tile tools at the output directory. - Put `manifest.json` where the build copies it into the output unchanged (the `public/` or `static/` directory in most setups). - Make sure the output's entry point is `index.html` at the top. - Remove every remote URL from the output: CDN scripts, hosted fonts (download the font files and use `@font-face` with a local path), remote images, analytics, error reporting. Search the build for `https://` before publishing. - Prefer a single page with hash routing. If the framework's router uses the History API, switch it to hash mode. - Turn off anything that registers a service worker (PWA plugins). - Keep it small. Every file is uploaded as a blob and every path is listed in one record, and PDSs limit both blob and record sizes. A handful of bundled files beats hundreds of chunks. - Big data (video, datasets) can be resources too, and hosts load resources on demand, which is the point of a manifest rather than a zip. Mind the PDS's blob size limit. ### Previewing and testing **Blastile** is the workbench. On the web at <https://make.webtil.es/>, with nothing to install; as a desktop app from <https://make.webtil.es/download/> (macOS, Windows, Linux). - **Watch tile dir…**: point it at the source directory. The tile renders live and reloads when a file changes. (Folder watching needs Chromium on the web; Firefox and Safari open a snapshot.) - **Data console**, under every preview: the host side of tp-data. It logs what the tile sends, shows the ready signal, and lets you compose and send JSON payloads. Use it to test your message vocabulary. - It opens `.tile` files and `at://` URIs too, and publishes over AT OAuth (below). Tiles run there exactly as they will elsewhere: on a fresh random origin with the real policy. If it works in Blastile, the sandbox is not what will break it elsewhere. When a tile misbehaves, open the browser's developer tools on the tile's frame: a resource that failed to load is either a remote URL (refused by the policy, reported as a CSP violation) or a path missing from the tile (a 404). Other ways to look at a tile: - <https://webtil.es/browser/#url=at://…> renders any published tile, first as a card, then live on click. - <https://webtil.es/host/?tile=at://…> (or `?tile=https://…/some.tile`) runs one tile filling the page. - <https://appmosphe.re/@handle/rkey> is the tile's page on the index. Example tiles to read: the `examples/` directory of [Blastile](https://tangled.org/robin.berjon.com/dasl-tiles/tree/main/blastile) has `hello-tile` (minimal, echoes tp-data), `theme-tile` (themed live over tp-data, answers with `{ ok, applied, ignored, theme }`), and `svelte-tile` (compiles and mounts a component it is sent). On AT, Minesweeper is `at://did:plc:izttpdp3l6vss5crelt5kcux/ing.dasl.masl/3mcjwwoqjqs2v`. ### Bundling into a .tile file A `.tile` is a CAR whose header is the manifest and whose blocks are the resources. It needs no account and no network, and any tile reader can open it. ```sh npx @dasl/atile bundle ./my-tile ./my-tile.tile ``` From code (Node): ```js import TileWriter from '@dasl/tile-writer'; const tw = new TileWriter({ name: 'My Cat', description: 'A picture of my cat.' }); tw.addResource('/', { 'content-type': 'text/html' }, { path: './index.html' }); tw.addResource('/img/cat.jpg', { 'content-type': 'image/jpeg' }, { path: './cat.jpg' }); await tw.write('./my-cat.tile'); ``` `@dasl/tile-car-reader` reads them back (`open()`, `meta`, `resolvePath('/')` giving headers and a stream). ### Publishing to the AT Protocol Publishing means: upload every resource to the author's PDS as a blob, then write one `ing.dasl.masl` record holding the manifest. Anyone with an AT account (a Bluesky account, for instance) can publish. Publishing is public and visible to the whole network at once, so when you are an agent, do it only when the user asked for it. **With `atile`** (the CLI): ```sh npm install -g @dasl/atile # or @dasl/tiles, which includes it atile login you.example.com xxxx-xxxx-xxxx-xxxx # an app password, kept in the OS keychain atile publish -s ./my-tile ``` - Create the app password in the account's settings (for Bluesky: <https://bsky.app/settings/app-passwords>). Never use, or ask for, the account's main password. - `-s` (`--stable-id`) remembers the tile's `at://` URI for that directory in `~/.atile/identifiers.json`, so publishing again updates the same record. Without it every publish makes a new tile. **Use `-s` unless you mean to make a new one.** - `-t <rkey>` (`--tid`) publishes under a record key you choose (it overrides `-s`); `-u <handle>` publishes as another logged-in handle. - `atile delete <at:// URI or directory>` removes a tile; `atile list-users`, `atile default-user <handle>`, `atile logout <handle>` manage logins. - The command prints the tile's `at://` URI. Keep it: it is the tile's address. **With Blastile** (<https://make.webtil.es/> or the desktop app): log in with AT OAuth (no app password), watch the directory, press publish. The desktop app shares `~/.atile/identifiers.json` with `atile`, so a directory keeps the same record whichever tool publishes it. **With appmosphe.re** (<https://appmosphe.re/publish>): sign in, drop a `.tile` or a directory, check and edit the manifest, pick the record key (a fresh one, your own, or an existing tile to update, with `prev` set for you), preview, publish, all from the browser. **From your own code**, it is a short sequence of calls to the author's PDS: 1. For each resource, compute its CID: CIDv1, raw codec, SHA-256 (`create(CODEC_RAW, bytes)` in `@atcute/cid`). Identical bytes share a CID. 2. `com.atproto.repo.uploadBlob` each one with `Content-Type: application/octet-stream`. Check that the blob reference the PDS returns has your CID and your size, then use that reference, `mimeType` included, as the resource's `src`. (`verifyUploadedBlob` in `@dasl/tile-lexicon` does this.) 3. Build the manifest: your fields, plus `resources` mapping each path to `{ src: <blob ref>, "content-type": "…" }`. 4. Compute `cid`, the DRISL CID of the manifest object (`encode` in `@atcute/cbor`, then `create(CODEC_DCBOR, bytes)`). 5. `com.atproto.repo.putRecord` with `collection: "ing.dasl.masl"`, a record key (normally a fresh TID), and the record `{ $type: "ing.dasl.masl", cid, tile: <manifest>, createdAt: <ISO datetime> }`. With OAuth, ask for the scope `atproto repo:ing.dasl.masl blob:*/*`. The record, as it ends up in the repo: ```json { "$type": "ing.dasl.masl", "cid": "bafyrei…", "createdAt": "2026-10-02T15:26:26.697Z", "tile": { "name": "Hello Tile", "description": "Says hello, counts pokes, and talks to its host when it can.", "sizing": { "width": 480, "height": 280 }, "resources": { "/": { "src": { "$type": "blob", "ref": { "$link": "bafkrei…" }, "mimeType": "application/octet-stream", "size": 612 }, "content-type": "text/html" }, "/tile.js": { "src": { "$type": "blob", "ref": { "$link": "bafkrei…" }, "mimeType": "application/octet-stream", "size": 734 }, "content-type": "text/javascript" } } } } ``` Details that bite: - On AT, `src` is a **blob reference**, not a bare CID link: a PDS only keeps blobs that a record references as blobs. In a `.tile` file, `src` is a plain `{ "$link": "…" }`. - `size` must be the exact byte length. `mimeType` in the blob reference is not the resource's type and need not match it; the type the tile is served with is the separate `content-type`. - Some PDSs sniff uploads and store them under the type they detect, then refuse a record that names another type. Uploading as `application/octet-stream` and publishing the reference the PDS answers with is right everywhere. - `cid` is the CID of the `tile` object alone, encoded as DRISL. It is what a later version's `prev` points at. **Updating a tile** means writing the same record key again (`atile publish -s`, or the same `rkey` in `putRecord`). The `at://` URI stays the same and every embed picks up the new version. To keep a chain of versions, set `prev` to the previous manifest's CID; `atile` does not do that for you. ### After publishing: finding and sharing A tile's address is its `at://` URI: `at://<did or handle>/ing.dasl.masl/<rkey>`. - **[appmosphe.re](https://appmosphe.re/)** indexes every tile on the network, with search, authors, and categories. A tile's page is `https://appmosphe.re/@<handle>/<rkey>` (the DID works in place of the handle). New tiles normally show up by themselves; to get one indexed within seconds, `POST https://appmosphe.re/api/index` with `{"actor": "<did or handle>"}`, or use <https://appmosphe.re/index>. - Its JSON API is open to any origin, no key: `GET /api/tiles?page=N`, `GET /api/tiles?category=…`, `GET /api/search?q=…`, `GET /api/tiles/:actor/:rkey` (the full record), `GET /api/authors`, `GET /api/authors/:actor`, `GET /api/stats`. - To give someone a link that runs the tile: `https://webtil.es/browser/#url=<at:// URI>` or its appmosphe.re page. - Without an index: `com.atproto.sync.listReposByCollection?collection=ing.dasl.masl` on a relay lists the repos that have tiles, and `com.atproto.repo.listRecords` on each PDS lists them. ### Embedding tiles in your own app A tile must run on an origin of its own, under the spec's policy. Two ways to get that. **The quick way: the host page.** Frame `https://webtil.es/host/?tile=<url>`, which runs one tile filling the frame: ```html <iframe src="https://webtil.es/host/?tile=at://did:plc:…/ing.dasl.masl/3m…" sandbox="allow-scripts allow-same-origin allow-popups allow-forms" title="Dice Roller"></iframe> ``` It talks to its embedder in JSON strings, each an object with `tilesHost: 1`. Up, to `window.parent` (or `window.ReactNativeWebView` in a React Native WebView): `manifest` (`url`, `name`, `description`, `sizing`; always first), `load`, `title`, `error` (`message`), and `protocol` (`protocol`, `kind`, `payload`) for what the tile sends. Down, with `iframe.contentWindow.postMessage(json, origin)`: `{ tilesHost: 1, action: "send-protocol", protocol, kind, payload }` (for tp-data, `protocol: "data"`, `kind: "payload"`). Use `sizing` from the `manifest` event to size the frame. `@dasl/tile-host/messages` has the types and parsers. In a native app's WebView on iOS, the host page's domain must be in `WKAppBoundDomains` (service workers need it); the [tile-host README](https://tangled.org/robin.berjon.com/dasl-tiles/tree/main/tile-host) has the full WebView recipe. **The full way: the loader**, when you want cards, several tiles, or your own loading server: ```js import { TileMothership } from '@dasl/tile-loader'; import { ATTileLoader } from '@dasl/tile-loader/at'; import { tileData } from '@dasl/tile-loader/data'; const ship = new TileMothership({ loadDomain: 'load.webtil.es' }); // or your own ship.init(); // once per page ship.addLoader(new ATTileLoader()); // at:// URIs; also /car, /webxdc, /memory const tile = await ship.loadTile('at://did:plc:…/ing.dasl.masl/3m…'); if (!tile) throw new Error('No loader recognised that URL'); // A card: name, icon, banner, description. Cheap, metadata only; runs the tile on click. document.body.append(await tile.renderCard()); // Or run it straight away, in a frame of the height you choose. document.body.append(tile.renderContent(tile.manifest.sizing?.height ?? 400)); // tp-data, host side const data = tileData(tile); data.onReady(() => data.send({ greeting: 'Hello from the host' })); data.onData((payload) => console.log('the tile says', payload)); ``` - Render cards in feeds and lists, and run a tile only when the user asks: a card costs nothing, a running tile is a frame with a service worker. - Wait for `onReady` before sending data. - Don't add a `sandbox` attribute to the frame the loader makes; isolation comes from the random origin and the policy. - `MemoryTileLoader` (`@dasl/tile-loader/memory`) runs a manifest whose `src` entries are bytes or strings you hold, at `memory://<id>`. That is how to preview a tile you just generated, before publishing anything. - `load.webtil.es` is a public loading server. It serves only the fixed runtime and never sees tile content. To run your own: `createTileLoadingRouter('tiles.example')` from `@dasl/tile-server` in an Express app (or `npx @dasl/tile-server tiles.example 8080`), with wildcard DNS and a wildcard TLS certificate for `*.tiles.example`, since every tile load is a new hostname. - Check any deployment with the containment tile at <https://webtil.es/check/>: it tries every way out of the sandbox it knows and reports what held. - Don't count on a tile being cut off from the network in every browser. The content policy does not govern WebRTC or connection hints (`preconnect`, `dns-prefetch`). The spec has `Connection-Allowlist: (response-origin)` sent with everything on a tile's origin to close those, and only Chromium-based browsers enforce it. In Firefox and Safari, assume that what you hand a tile can reach its author. If you are a host, the rules that matter: treat everything a tile sends as untrusted data (names, titles, payloads); tell which tile a message comes from by the window that sent it, never by what the message says; and never give a tile a way to reach the network that the user did not ask for. ### For agents making tiles - Generate the whole tile as a directory, with every asset local. Inline small things; no CDN links, no web fonts by URL, no remote images. - Write a real `name` and `description`, add an icon, and set `sizing` to the size the content needs. - Put the result where the user can see it before it goes anywhere: Blastile's watch mode on the directory, or `atile bundle` and hand over the `.tile`. - If the tile is meant to be driven (by a chat, by you), give it a tp-data vocabulary: say what it accepts on connect, validate input, answer with results. - Don't publish unless asked. When asked, use `atile publish -s`, report the `at://` URI and the appmosphe.re link, and say that the tile is public. - Credentials: an app password given by the user for `atile login`, or OAuth in Blastile. Never the main password, and never write either into the tile or the repository. ### Checklist before publishing - `manifest.json` has a `name`, a `description`, an icon; every `icons` and `screenshots` path exists in the directory. - `index.html` is at the top of the directory, declares its charset, and has a `<title>`. - No `http://` or `https://` URL is loaded anywhere in the output (links for the user to click are fine). - No reliance on `localStorage`, IndexedDB, or cookies surviving a reload. - No routing on paths that are not files; no directory URLs. - The directory holds only what should be public. - The layout works at the requested `sizing` and at other sizes. - Every protocol import is in a `try`, with a fallback. - It runs in Blastile. ### Troubleshooting - **Blank tile**: `index.html` is missing from the top of the directory, or the page depends on a remote script that was refused. Check the console for CSP violations. - **A file 404s**: the path is not in the tile. Paths are exact and case-sensitive, and `/dir/` is not `/dir/index.html`. - **Fonts or images missing**: they were remote. Bundle them. - **"Tile icon … is not in resources"**: the `src` in `icons` or `screenshots` does not match a file path, or lacks the leading `/`. - **"Cannot publish tile without name"**: add `name` to `manifest.json`. - **A file is served with the wrong type**: set `content-type` for that path under `resources` in `manifest.json`. - **The PDS refuses the record**: a blob reference doesn't match what the PDS stored (use the reference it returned), a `size` is wrong, or a blob or the record is over the PDS's limit. - **Every publish creates a new tile**: use `-s`, or pass the record key with `-t`. - **State disappears on reload**: by design; the origin is new each time. - **The host never sends data**: the tile didn't call `listen()`, or the host doesn't support tp-data and the import failed. - **The tile doesn't show on appmosphe.re**: ask for the repo to be indexed (`POST /api/index`). ### Tools and references - Specs: [Web Tiles](https://dasl.ing/tiles.md), [Tiles Protocols](https://dasl.ing/tiles-protocols.md), [Data Passing](https://dasl.ing/tp-data.md), [MASL](https://dasl.ing/masl.md), [CAR](https://dasl.ing/car.md). The lexicon is `ing.dasl.masl`, in the Web Tiles spec and at <https://dasl.ing/tiles-lexicon.json>. - [webtil.es](https://webtil.es/): the tiles site. [Browser and tutorial](https://webtil.es/browser/), [host page](https://webtil.es/host/), [containment check](https://webtil.es/check/), the public loading server `load.webtil.es`. - [Blastile](https://make.webtil.es/): open, watch, test, and publish tiles, on the web or [on the desktop](https://make.webtil.es/download/). - [appmosphe.re](https://appmosphe.re/): the index of tiles on AT, with [a publish page](https://appmosphe.re/publish), [a developer guide](https://appmosphe.re/developers), and a JSON API. - [dasl-tiles](https://tangled.org/robin.berjon.com/dasl-tiles): the source of all the packages, on npm under `@dasl/`: - `@dasl/atile`: the CLI (`atile`) to bundle, publish, and delete tiles. - `@dasl/tile-loader`: runs tiles in a web page (mothership, shuttle, worker), with loaders for AT, CAR, WebXDC, and in-memory tiles. - `@dasl/tile-server`: the loading server that gives each tile its own origin (`tiles-loading-server`). - `@dasl/tile-host`: the hosted page that runs one tile for iframes and WebViews, and its message schema. - `@dasl/tile-writer`, `@dasl/tile-car-reader`: write and read `.tile` files in Node. - `@dasl/tile-lexicon`: the lexicon, shared TypeScript types, the security policy, and the blob helpers. - `@dasl/containment-tile`: the red-team tile, published at `at://robin.berjon.com/ing.dasl.masl/bad`. - `@dasl/tiles`: a meta-package with all of the above under the older import paths. - [tilers](https://tangled.org/robin.berjon.com/tilers): turns feed entries (RSS, Atom, JSON) into self-contained tiles.