oficina / equipo Public

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

Plain git — no account needed to clone.

Download

Download this file

1# equipo
2
3An Oficina app: a coordinator and a team of AI specialists for running your own apps. The design is on the `design` branch.
4
5<!-- COPY APPROVED BY DELEGATION (Luna pass, 2026-11-01, house rules). -->
6
7## Local startup
8
9Create `.env.local` with the values below. Generate the instance key once with
10`openssl rand -hex 32` and keep that value across restarts.
11
12```sh
13EQUIPO_ORIGIN=http://127.0.0.1:8824
14EQUIPO_INSTANCE_KEY=replace-with-your-generated-key
15EQUIPO_OWNERS=you@example.com
16EQUIPO_ALLOW_LOGGED_MAIL=1
17```
18
19Run `./run.sh`. It builds the app when needed and stores its data in `equipo.db`.
20Owners are seeded on the first boot only when the database has no team. With
21logged mail enabled, sign-in links are written to the local log. The environment
22file, database and `.local` build directory are ignored.
23
24For disposable sample data, run
25`CGO_ENABLED=0 go run ./tools/drive -db "$TMPDIR/equipo-drive.db"`.
26The path must be unused. Open the sign-in link it prints and confirm it in your
27browser. The drive listens on `127.0.0.1:8824` and removes its database when you
28stop it with Ctrl-C.
29
30
31## Deploying
32
33Deploy Equipo to account `oficina` on the flagship console:
34[https://console.carloku.com/a/oficina](https://console.carloku.com/a/oficina).
35Project account labels do not change the deployment target.
36
37Before the first boot, configure app `equipo` in account `oficina`:
38
39- Use `carlos env set` for `EQUIPO_ORIGIN`, the confirmed HTTPS origin people
40 will use, and `EQUIPO_OWNERS`, the comma-separated owner addresses. Owners
41 are seeded only when the database has no team. Use People to change the
42 roster after the first boot.
43- Use `carlos env set` for `EQUIPO_ASSISTANT_HOSTS`, the comma-separated
44 origins of the Base instances whose operations the Assistant may call, for
45 example `https://base.example.com`. A person's Base registers one of them as
46 its host; Equipo calls no other address. Unset, nobody can register one.
47- Use `carlos secrets set` for `EQUIPO_INSTANCE_KEY`. Generate it once and keep
48 it stable across releases and restarts. CARLOS seals app secrets and delivers
49 them to the process as environment variables.
50- Enable the app's email sender with `carlos email enable`. CARLOS verifies the
51 sending domain through SES and delivers `CARLOS_SMTP_HOST`,
52 `CARLOS_SMTP_FROM`, `CARLOS_SMTP_PORT`, `CARLOS_SMTP_USER` and
53 `CARLOS_SMTP_PASS`. Equipo reads these platform settings for sign-in mail.
54
55Leave `EQUIPO_ALLOW_LOGGED_MAIL` unset in production. It is for local use and
56writes sign-in links to the log. Equipo makes no provider calls and needs no
57CARLOS CLI credentials at runtime. The human operator uses their own CARLOS CLI
58access to deploy.
59
60Confirm the target architecture before building. Start from a clean, reviewed
61commit and run:
62
63```sh
64make release
65```
66
67This builds `releases/equipo-linux-arm64` with CGO disabled and stamps the value
68from `git rev-parse --short HEAD` into the binary. Tracked changes block the
69build. For an amd64 target, use `make release RELEASE_GOARCH=amd64` and deploy
70`releases/equipo-linux-amd64` instead.
71
72Confirm that your CLI targets the flagship console. Run this command for the
73default arm64 build:
74
75```sh
76carlos deploy --app equipo --account oficina --channel edge --timeout 5m ./releases/equipo-linux-arm64
77```
78
79With `EQUIPO_EXECUTION_ENABLED=1`, add `--swap hold` (before the binary path). Only one
80process may own execution, so the old build must stop before the new one starts;
81without it the new build exits with "This record changed" and the rollout stops.
82
83`EQUIPO_EXECUTION_MARKER_PATH` is the execution witness. It must sit
84outside the database's directory, on storage that survives a database
85restore on its own. On CARLOS, that is the instance's own directory, for
86example `/data/instances/<instance host>/execution/witness`. If the witness
87is lost or disagrees with the database (a restored snapshot, a replaced
88box), Equipo still starts, but execution comes up quarantined. Every action
89that was in flight is marked uncertain, and no new work is admitted. An
90owner reviews the uncertain actions and releases execution at Settings,
91Recovery (`/settings/recovery`). Equipo never resumes on its own after a
92lost witness.
93
94Equipo also answers `GET /api/team`, the readiness probe Alta reads before
95it activates a team instance in Home's directory. Equipo has no Home roster
96mode, so the probe answers in the seeded mode: the configured
97`EQUIPO_HOME_CONSUMER_ID`, and whether an active owner exists. It carries
98no address, and answers 404 without Oficina ID.
99
100
101Keep the flags before the binary path. After deployment, poll `GET /api/version`
102on the deployed origin until the process reports the stamped commit. The
103router's `X-Carlos-Version` header does not confirm the running process version.
104A successful local build does not confirm a successful deployment.
105
106After deployment, complete these checks:
107
1081. Sign in as a configured owner. Add a second roster member and an account
109 label. Create App, Website and Repository projects, including one with only
110 a repository. Refresh and restart the app, then check that the data persists.
1112. Sign in as the member. Check shared visibility and denied owner edits. Open
112 every empty destination and the phone Work index.
1133. Confirm that no runner is enrolled, no execution job exists, and Equipo made
114 no provider or CARLOS credential request. Record acceptance in the normal
115 review record.
116
1174. Walk the app once with normal motion, with reduced motion turned off, and
118 note any browser console error. The automated walk uses reduced motion.
119