A work is either a content file alink renders for you — markdown, PDF, video, audio, image, or a script animation — or a static web bundle: an index.html plus the files it references, served exactly as uploaded, with no build step and no server-side code.
Upload one content file at the root, plus any assets it uses: paper.md with its images, film.mp4 with a .vtt caption track, thesis.pdf, poster.png, main.js for a canvas animation. alink writes the page that presents it. A bundle holding two candidates (two .md files, two PDFs) is rejected rather than guessed at.
A script work is loaded as an ES module and gets a full-viewport canvas at #stage, already sized for devicePixelRatio; window.AlinkStage holds { canvas, shell, size }. Import libraries from the allowed CDNs below, or ship them in the bundle.
A work is served into a sandbox with an opaque origin, so requests for its own files are cross-origin. A plain <script src="./app.js"> is fetched in no-cors mode, which leaves the script without a base URL: any dynamic import("./other.js") inside it resolves against about:blank and fails.
<script src="./app.js"></script>
<script src="./app.js" crossorigin></script> <script type="module" src="./app.js"></script>
Not affected: scripts inlined in a single HTML file, and scripts that never call import(). Generated prototypes typically emit a plain <script src> and need this change.
These limits are fixed. They are not configurable, on any plan:
The sdk is optional. Outside the shell, connect() returns null and the work runs unchanged. Inside the shell, five calls are available:
<script type="module" src="https://works.al.ink/-/sdk/v1.js"></script>
<script>
const alink = await AlinkWork.connect({ timeoutMs: 800 })
if (alink) {
alink.context // { work, owner, viewer: { signedIn, locale, theme } }
alink.on('themechange', (theme) => { /* 'light' | 'night' */ })
alink.requestFullscreen()
alink.openDoor() // takes the visitor to your requests room
alink.share()
}
</script> Current sdk version is v1, served from works.al.ink/-/sdk/v1.js. A future v2 will use a new address; existing references keep working.