Skip to Content
Concepts

Sites

Your own address, and the one step that makes something public.

A site is an address of your own — https://<handle>.pl4m.site/ — with artifacts mounted at paths on it. Every owner gets one: a person gets a personal site, an org gets an org site, and the difference between them is who may read it.

Readable byNeeds a credential
Personal siteanybody on the internetno
Org siteevery member of the org, and nobody elseyes — a short-lived site token

Mounting is the one step that makes something public. Everything else in pl4m publishes privately. On a personal site, a mounted path is readable by anyone with no credential at all. Un-mounting makes it private again.

Handles

A handle is what the site is called, and it is the hostname label. Lowercase letters, digits and hyphens; at most 32 characters; never a reserved label; and never the shape of an artifact code — handles and artifact codes share one namespace of hostnames, so one cannot be allowed to look like the other. A handle that breaks a rule comes back as a VALIDATION_ERROR naming which.

A handle can be given up and changed. Doing so changes the site's address.

Paths, and the index

Mounting puts an artifact at a path: /, /notes, /tools/invoice. By default a built-in index answers at / and lists the site's artifacts. You can move it (to /work, say), choose which artifacts it shows and in what order, or switch it off.

A route always wins over the index, so an index at / with an artifact mounted at / is a legal state: the artifact answers, and the index is still configured at a path nothing reaches. Nothing refuses it.

Omitting the list of artifacts means every mounted artifact, in path order. An explicit list means exactly those, in that order. An empty list is a VALIDATION_ERROR rather than a third meaning — "show nothing" is switching the index off, and two spellings of one state is how a resolver comes to disagree with itself.

Moving a path

Moving a route leaves a 301 from the old path to the new one, because somebody is usually holding the old link. You can decline the redirect, and you can delete one later.

Both ends of a move are authorised against the person moving it: the new path because that is where the content lands, and the old path because moving something out of a section is a change to that section.

Org sites and member sections

On an org site, members have their own section at /u/<handle>/. Only owners and admins route outside /u/ — the org's index at /, the redirects, and the site's settings are theirs.

An owner or admin may also take a route down, including one inside a member's section. That is a takedown and is recorded as one, separately from an ordinary un-mount.

Opening an org site

get_site_url(handle) — or pl4m site open <handle> — answers "what URL opens this site, and what does it need". One response shape covers both kinds, so a client never has to branch:

  • a personal site needs no credential, so the token comes back null and the URL is just the address;
  • an org site is members-only, so a site token is minted for the caller and the URL is a handshake that carries it.

Three things about that token, because they are what make it safe to hand to an agent:

  • it opens nothing else. It carries the site's handle and the caller, and has nowhere to put an artifact or a version — so it opens no artifact and no other site. The separation is inside the signature, so it cannot be relabelled into a different kind of token.
  • 300 seconds, not configurable. It bounds how long a holder can go without a handshake, not how long access lasts: membership is re-read on every request, so removing somebody from the org stops their existing token within about ten seconds.
  • every refusal is NOT_FOUND — an unclaimed handle, a released one, and an org you do not belong to are one answer. A FORBIDDEN would confirm that an org exists under a guessed name, which is the thing a members-only site exists to keep private.

There is also a plain address with no credential in it. That is the one to log, print or pass on; the handshake URL carries a live token for five minutes.

Why artifacts are not on your account's domain

Artifacts and sites are served from pl4m.site, which is a different registrable domain from the one the dashboard and the API are on. Untrusted HTML and JavaScript must never be served from the origin that holds your session. That is the boundary the whole arrangement is built around: code your agent wrote runs somewhere it cannot reach your account.

Custom domains

Coming soon. Pointing a domain you own at your site is not enabled on any plan yet. pl4m.com/pricing is where it will be announced.

On this page