oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

Places: where a team's code and sites go

Status: 2026-11-26, revision 3, draft for Paul. Drafted by Claude (Opus 5.5) on design-places from main c74fd0ac. Nothing is built.

Paul, 2026-11-26: "Equipo is having trouble publishing the site. Is it not aware of Carloku and its ability to publish both locally within the tailnet and remotely to either Tito CARLOS Platform or Carloku? This again should be config ... every Equipo might have a different set of tools, but I want mine to be aware of where to put things per project, where to publish temporary sites, where to publish sites etc."

0. What happens today

Facts from main c74fd0ac and a read-only copy of production (equipo.oficina.works, carlos db query --app equipo --account oficina, 2026-11-26 09:40 UTC).

  • Publishing is one post-merge card. offerPublish (internal/equipo/chat/publish.go) raises a publish card after a merge whose approved Review found release/preview.json. It returns silently unless the creator's primary runner reports Capabilities.Sites. The runner reports that only when its machine sets EQUIPO_SITE_HOST=carloku and holds the person's own signed-in ~/.carlos/credentials (internal/runner/thin/site.go). Console and account are constants: https://console.carloku.com, account oficina.
  • Neary's never got a card. The production runner (docs-t1) reports preview_host: devbox and no sites capability. For both Neary's tasks (tkbstr6cjl7h, tkzmnycab3ml, repo amadan.net/paulca/nearys) the task is done and merged, publish_asked is empty and the project's site_app is NULL: no card, no step, no audit row, nothing said.
  • Nobody could explain it. The coordinator has no tool that publishes a site or reads its address; it said so, then had Engineering merge a filler "page not found" change (without checks) only to provoke a publish card, which again did not come. The Assistant looked in Base (base_apps), which lists apps installed on Base's own account, found none, and told Paul the site "never appeared there". Base is not where Equipo puts sites.
  • Previews failed on the production runner. Since the injection defences (2026-11-19) every preview export carries a _headers file with Content-Security-Policy, X-Content-Type-Options, Referrer-Policy and X-DNS-Prefetch-Control. CARLOS accepts all four (merged 343a3394 on 2026-11-21, released since v0.43.0, rolled to the flagship), but the production runner's PATH resolved carlos to a stale /usr/local/bin/carlos v0.32.2, which refuses them "not supported yet". The latest preview (tkzmnycab3ml step 4) ended done with reason preview_headers and outcome unconfirmed, and its card still offered a link. The earlier one failed preview_scanner. Correction, 2026-11-26: revision 3 blamed CARLOS; the coordinator set EQUIPO_CARLOS_PATH to ~/.local/bin/carlos v0.43.3 on that runner (11:02Z). Equipo never said which carlos it ran, so slice 1 adds a version guard (section 3).
  • The devbox domain is never learnt. The runner learns its devbox domain from the first successful share's link (preview_devbox.go). No share has succeeded, so the runner logs domain="" at start and Machines cannot show an address.
  • Setup is environment variables. EQUIPO_PREVIEW_HOST, EQUIPO_SITE_HOST, EQUIPO_PREVIEW_CREDENTIAL_PATH and a person's CLI login on the runner machine. A person sets them by hand, per machine, and nothing in Equipo shows them. That breaks the product rule that agents do setup and people confirm.

The CARLOS capabilities that cover this already exist: carlos deploy (static kind, --temporary with --ttl, named destinations in .carlos/config with -d), the deploy service role (one app, named rungs, read from CARLOS_SERVICE_TOKEN with CARLOS_CONSOLE), temporary static sites (live on dev and flagship since 2026-10-24, tmp- names, at most 20 per account), and carlos devbox share --dir for tailnet links. Both consoles Paul uses are reachable from docs-t1: console.carloku.com (the flagship) and console.platform.tito.io (Tito). Equipo should use these and ask CARLOS for what is missing (section 6), not build around them.

1. Places

A place is a named destination the team has confirmed, of one kind, served by one fixed adapter. Places are team records in the instance database: the same for every member, never scope.Owned.

| Kind | Names | Adapters in v1 | | --- | --- | --- | | Code home | a forge namespace where new projects go | Amadan (the existing project_home setting becomes this place) | | Temporary site | where previews and short-lived sites go | CARLOS devbox on one runner's machine (tailnet only); CARLOS temporary sites on one console and account (public, expires) | | Site | where a project's real site lives | a CARLOS app on one console and account (Carloku, Tito, or any console the runner is signed in to) |

Later kinds (object storage, mail senders, domains, native release channels) add an adapter each. An unknown kind or adapter is refused at the instance and the runner; there is no generic "run this command" place.

Defaults and overrides. Each kind has at most one team default. A project may override any kind. A site is always per project: the team default names the console and account where new sites go, and the project binding names its app. Resolution is project override, else team default, else none, and none means propose (section 2). Code never guesses a place from a name match without a confirmation on record.

Storage. Additive migration 0112 (0108 at draft; main took 0108-0111): chat_places (id, kind, adapter, label, console origin, account sqid and name, app, runner id for adapters that live on a machine, state proposed, confirmed or retired, revision, proposed by, confirmed by and when) and chat_project_places (project, kind, place, app, revision). chat_projects.site_app is copied into the project binding and left in place. Every write checks the current roster inside its transaction, is owner-only, and appends its audit event there.

Credentials, and who holds them. The runner holds every CARLOS secret. The instance holds only metadata: credential name, role, app, rungs, console, account, the runner that holds it, a fingerprint (a hash, to tell rotations apart), minted and last used.

  • Site. One CARLOS deploy credential per site app, minted with --app <app> --rungs edge. It reaches that app only, can ship and promote its edge channel and nothing else, and cannot create apps, hostnames or domains, or touch stable. On carlos/platform main (18d64564, internal/console/deployscope.go) it may promote edge on an app with the default edge-only pipeline, which every new app gets; if someone gives the app another pipeline, the deploy is refused and site_status says so. First-deploy setup is not open to it: creating the app needs a person or an account-wide credential, and minting the first platform host needs a person or a publish credential (routedecls.go, the platform-host door). So a new site's first publish, at the owner's tap on its publish card, runs the existing fixed carlos deploy with the owner's signed-in carlos on that machine, which creates the app and its host as today, and the existing guard still refuses a name the account already holds. Right after it, the runner runs carlos services create --role deploy --app <app> --rungs edge <name> with the same login. Every later publish uses the deploy credential. (carlos v0.43.3 has no --json for this verb; the runner reads its one CARLOS_SERVICE_TOKEN= line and its minted service: line, P6.) The runner process reads the secret from that command's output, never logs the output, and stores it 0600 in its state directory, outside every directory a sandbox mounts. Each later deploy runs one fixed carlos deploy with the secret in CARLOS_SERVICE_TOKEN and the console in CARLOS_CONSOLE, never in argv, a record, a log or a model's context, and with CARLOS_CONFIG naming a runner-written config holding exactly the confirmed destination. The owner's own login is used only for a new site's first publish, the mint, and rotation or revocation (no service credential can revoke or rotate any credential, itself included), each at an owner's tap, until P3 replaces it.
  • Two ways a runner can publish a site. A runner can set up a place when its inventory shows an owner login on the place's console and account; it can publish to a place when it holds that app's deploy credential. Offering the publish card, accepting the tap and dispatching the step each accept either: setup for a site with no app yet, publish for one that has its credential. The runner reports both per place in its hello, replacing today's single sites flag.
  • Ownership evidence. The app name is minted by code, and the first publish's report records that this place created it. A later publish, from any of the team's runners, may deploy to that app only with a deploy credential minted for it, which an owner minted at a tap; the "name already taken" guard applies only to the creating publish. Adopting an app that Equipo did not create is out of scope for v1.
  • A credential minted elsewhere (by Base through carlos platform credentials mint, or by the consent flow in section 6) arrives sealed to the runner's seal key, as API keys do (connections spec §2.4).
  • Devbox temporary site. No credential: the runner's own carlos devbox reaches its registrar over a local socket, as today.
  • CARLOS temporary sites. /new-temporary refuses an app-scoped credential, so --temporary needs an account-wide publish credential, which can also claim, ship, promote and retire every app in that account. Until CARLOS offers a narrower scope (P4), a public temporary place may only name an account the owner dedicates to previews, and the coordinator proposes devbox first.

A place with a credential belongs to the runner that holds it, which is the creator's primary today. If that runner is removed, the place shows "needs a machine" and the coordinator proposes setting it up again on another runner. Equipo then revokes the old credential with carlos services revoke through an owner's login, at their tap. A revocation that could not run stays on the Places page as "still live on CARLOS" until one does.

Seeing and changing places. Settings gains Places, state first. One line per kind, then one line per project that overrides or has a site:

> Sites go to Carloku, account paulca. > Neary's: site-nearys-k3x9qa, live at https://... (checked 10 minutes ago). > Temporary sites: docs-t1's devbox, on your tailnet. > New projects go in paulca.

Each line offers Change, Undo (after a change) and Retire. Change opens a chooser listing only what the runner can see (section 2), one tap each, with the destination shown in full before it applies. There are no fields to type into. Proposals from the coordinator appear both as a card in chat and as a pending line here. Phones get the same single-column page.

2. Setup by agents

The coordinator proposes a place the first time one is needed: a merged website with no site place, a preview with no temporary place, a new project with no code home. It also proposes a starting set when it moves in.

What the runner can see. The runner reports a bounded, validated reach inventory in its hello, with no secrets: the consoles its carlos is signed in to (the console origins in its credential file, read by the runner process for their names only, until CARLOS offers a secret-free list, P6), accounts it owns on each (carlos accounts list --console <origin>, owner rows only), apps in an account when asked (carlos apps list), whether a devbox answers (carlos devbox list), and the namespaces it may create repositories in (create_in, as today). A repository's committed .carlos/config destinations are hints only, read as untrusted repository text.

How a proposal is made. Code ranks candidates from the inventory with fixed rules: the account whose name matches the project's namespace on the flagship (amadan.net/paulca/nearys proposes Carloku account paulca); else the account a repository .carlos/config destination names, when the runner owns it; else the person's only owned account. Existing apps are shown for information only; v1 always publishes to a fresh app Equipo creates. The coordinator calls propose_place with a kind, a project and one candidate id from the inventory; it cannot write a console, account or app itself. Equipo raises a card: "Publish Neary's on Carloku, in account paulca?" with the candidates (best first, at most six) and Not now. The owner's tap confirms. Code mints the app name, as projectSite does today. Confirming a place publishes nothing and creates nothing on CARLOS; the app and its credential come with the first publish the person taps (section 1).

3. Coordinator tools

All are runner MCP tools answered by the instance; every CARLOS command runs on the runner, from a fixed template, outside every sandbox.

  • places (read-only): the resolved places for the team or one project, with state, address and last check, returned as quoted data.
  • propose_place: kind, optional project, candidate id. Raises the card in section 2. It cannot confirm, change or retire a place.
  • publish_site: a task, or a project and a commit on its default branch, and a target (site or temporary_site). It raises the publish card, which now names the place ("Publish Neary's to site-nearys-k3x9qa on Carloku, account paulca?"). Only the task creator's tap, while they are an owner, places a publish step, as today. A site takes only a commit Equipo merged into the default branch and Review approved; a temporary site takes an approved candidate, as previews do. With no confirmed place it proposes one first. It may raise a card for an older merged task that was never asked, which is what Neary's needs.
  • site_status: a project's site: app, console, account, address (the URL the deploy printed, confirmed by fetching the marker), the version its edge channel serves (read with the deploy credential), its attached domains once CARLOS lets that credential read them (P7), and the last publish outcome and when.

The publish step keeps what is built: export from git objects, the instance's digest-bound publish check right before the deploy, the marker fetched back over https, and published or unconfirmed recorded on the task. Two things change. The console, account, app and credential come from the confirmed place. And the trusted secret scan that previews run (scanPreview) now runs on the exact publish export before its built report; a finding or an unavailable scanner refuses the publish, which today's publish path does not. Published sites carry no Equipo _headers: the preview policy exists to fence unreviewed agent pages, and a published site's own headers are the project's.

Which carlos. The runner records its carlos CLI's version at start and with each capability probe (carlos version, parsed to vX.Y.Z, never raw output). status reports it beside the scanner health. A preview or a publish refuses with the fixed reason carlos_outdated, before it builds anything, when the version is unreadable or older than v0.43.0, the first release whose deploy and devbox share accept the preview headers.

4. What this replaces

  • EQUIPO_SITE_HOST and the siteAccount/siteConsole constants are replaced by the site place. The runner's single sites flag becomes "can set up" and "can publish", reported per place (section 1).
  • EQUIPO_PREVIEW_HOST=devbox becomes a devbox temporary place bound to that runner, and EQUIPO_PREVIEW_CREDENTIAL_PATH becomes the credential of a public temporary place.
  • offerPublish stops returning silently. With no site place it raises a place proposal; with a place whose runner lacks the credential it says what is missing; either way the task shows why nothing was offered.
  • A preview the host refused (preview_headers) shows "The preview host needs a CARLOS update before previews open" and no link. An unconfirmed preview never shows a link as if it works.
  • The devbox domain comes from carlos devbox list once CARLOS reports it (P5), else from the first share, and Places says "address known after the first preview" until then.
  • The Assistant asks Equipo for a site's address (a read-only operation backed by site_status) instead of looking in Base.

Migration. For one release the runner still reads the old variables, but only to report them as observed places. The instance turns them into proposed places, never confirmed ones, and the owner confirms once. The existing per-project site_app names are kept as each project's app. No Carloku app exists for Neary's, so it starts fresh.

5. Security

  • Scope. One deploy credential per site: one app, its edge channel, no app creation, hostnames, domains or stable. An account-wide credential only for a public temporary place on a dedicated account, until P4. The owner's own login is used only for a new site's first publish, the mint, rotation and revocation, each at an owner's tap, until P2 and P3 replace it. A runner with that login can do more than this; Equipo's fixed templates are the limit, so the login stays outside every sandbox and no template takes a model-written argument.
  • Gates. An owner's tap confirms or changes a place. A tap on the publish card, per merged commit, publishes (unchanged). The existing "Publish previews publicly" project setting still gates public temporary places. A place for one project is never used for another.
  • Model text never chooses a place. Tools take inventory ids, and the card shows console, account and app strings that code derived. A tap is bound to the card id, revision, person and a hash of the exact place record, so a stale or altered card is refused. Repository .carlos/config is a quoted hint, never authority.
  • The approval holds to the deploy. The publish step stores the place id, the place and project-binding revisions and the destination hash the person tapped. The dispatch carries them, and the runner's final publish check right before carlos deploy (today bound to app and digest) is also bound to them. If the place or binding changed, or was retired, after the tap, the check refuses and the person is asked again. The runner refuses a dispatch whose console, account or app differs from what it holds the credential for.
  • Audit. Place proposed, confirmed, changed and retired; app created; credential minted, rotated and revoked (name and fingerprint only); and the publish events that exist today. CARLOS audits each credential's use on its side.
  • Revocation. Retiring a place revokes its credential through an owner's login (section 1). CARLOS service credentials belong to the account, not the person, so an owner leaving the team does not revoke them; the Places view lists live credentials and the owner who minted each, and an owner's removal raises a card offering rotation.

6. Platform requests (CARLOS; nothing filed)

  • P1, done. Accept the four security headers in _headers (Content-Security-Policy, X-Content-Type-Options, Referrer-Policy, X-DNS-Prefetch-Control) in ship, deploy and devbox share. Merged as 343a3394 on 2026-11-21, released since v0.43.0, rolled to the flagship. Equipo's part is to run a carlos at least that new (section 3).
  • P2. Let a new app's first deploy run without a person: a credential that may create one named, brand-new app and mint its first platform host, then deploy it as deploy does. Today the app create needs a person or an account-wide credential, and the first host needs a person or publish.
  • P3. A service credential by consent: Equipo asks for deploy on one app (with P2's first-deploy setup), an account owner approves in the console, and the secret is delivered once to the requesting machine, as carlos auth login codes travel. Revocation and rotation by the same consent. This lets teams without an owner's CLI login on the runner set up sites, and removes that login from Paul's runner.
  • P4. A temporary-sites scope: create, ship and delete only tmp- apps in one account, within the existing caps, and nothing else.
  • P5. carlos devbox list reports the devbox's domain before the first share, in a machine-readable form.
  • P6. A secret-free list of the consoles a carlos is signed in to, and JSON from carlos accounts list and carlos apps list, so the runner's inventory parses no human-readable output.
  • P7. Let a deploy credential read its own app's attached domains (today publish and instance may, deploy may not), so site_status can name a custom domain.

7. Slices

  1. Neary's goes live (M). Migration 0112 and the place records; the site kind with the Carloku adapter, console and account taken from the place; propose_place and publish_site for sites; the approval bound through dispatch and the final check; the secret scan on publish exports; a new site's first publish with Paul's existing login on docs-t1, then the app's deploy credential minted and used for later publishes; "can set up" and "can publish" through offer, tap and dispatch; offerPublish says why instead of returning silently; a read-only Places page. Finish line: Paul confirms "Carloku, account paulca" for Neary's, taps Publish on the merged commit c069eae7, and the task shows a confirmed address. Nothing in slice 1 waits on CARLOS.
  2. Temporary places (S; P1 already shipped). Devbox and CARLOS temporary sites as places; the honest preview card; the env variables become observed proposals; the domain from the devbox list once P5 lands.
  3. Places view and status (S). Change, Undo and Retire with revocation; site_status and places tools; the Assistant's read-only site operation; code homes folded in from project_home.
  4. Consent credentials (M, after P2 and P3). First deploys without a person and consent delivery for teams with no owner login on a runner; P4 for public temporary sites when it lands.

8. Open questions for Paul

  1. Where does Neary's live? Recommend Carloku, account paulca, matching the forge namespace; oficina projects go to account oficina. Tito only for projects that are Tito's.
  2. May Equipo use your CLI login on docs-t1 for a new site's first publish, to mint its deploy credential, and to revoke one, each at your tap? Recommend yes for slice 1, and retire that use when P2 and P3 land.
  3. Adopting existing apps. Recommend leaving it out of v1: every site Equipo publishes is an app it created, so a confirmed place can never overwrite a site someone else runs.
  4. Temporary sites default. Recommend docs-t1's devbox (tailnet) as the team default and no public temporary place until P4, or a dedicated previews account if you want public links sooner.
  5. Ship P1 now? Answered: P1 shipped in v0.43.0 (section 6).
  6. Who may confirm places? Recommend owners only, as with project placement and merge policy; a creator still taps their own task's publish card.

Paul's rulings (2026-11-26)

  1. Neary's lives on Carloku, account paulca. oficina projects default to account oficina; Tito's CARLOS platform only for Tito's own projects.
  2. For a new site's first publish, Equipo may use Paul's own CARLOS login on docs-t1 to create the app and its narrow deploy credential, each at his tap, until CARLOS supports P2/P3.
  3. Temporary sites default to the docs-t1 devbox, tailnet only. No public temporary sites until P4.
  4. The CARLOS security-headers fix (headers-security-allowlist, 77637a40) rides the next CARLOS release. Superseded the same day: it had already merged as 343a3394 and shipped in v0.43.0; the production runner ran a stale carlos (section 0).
  5. Adopting existing apps is out of v1; owners confirm places (recommendations accepted).