Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
092e602
serve: list a chat to other people only when it is shared with them
AbirAbbas Nov 24, 2026
efb8a71
engine: bring back the chunk-paged chats.read, under its own hello word
AbirAbbas Nov 24, 2026
bbe2a76
deploy/org: images for the organization server, the factory runner, S…
AbirAbbas Nov 24, 2026
5356f76
deploy/org: build the Go reasoners without cache mounts
AbirAbbas Nov 24, 2026
e7131f8
deploy/org: the Compose file, its environment and a setup script
AbirAbbas Nov 24, 2026
b6b0453
deploy/org: fixes the first run of the images turned up
AbirAbbas Nov 24, 2026
59485ff
Change entry for the self-hosted organization Compose
AbirAbbas Nov 24, 2026
0aeb94a
deploy/org: the walkthrough, and a helper that prints the operator link
AbirAbbas Nov 24, 2026
34ae2dd
deploy/org: the keyless smoke test of the whole stack
AbirAbbas Nov 24, 2026
8e51283
deploy/org: let the runner prove the stack itself where nobody can ex…
AbirAbbas Nov 24, 2026
84ee321
deploy/org: a self-test mode for the check after a restart
AbirAbbas Nov 24, 2026
0dc32fc
acl: a private chat that has been shared stays private to the people …
AbirAbbas Nov 24, 2026
94993e4
deploy/org: the smoke test reads AgentField's runs from the right end…
AbirAbbas Nov 24, 2026
184f4da
deploy/org: the control plane starts as root only to give its volume …
AbirAbbas Nov 24, 2026
e3fbf34
deploy/org: the hand-off says in the log which user the service now r…
AbirAbbas Nov 24, 2026
248e3e9
deploy/org: print the operator link as the server gave it, and docume…
AbirAbbas Nov 24, 2026
fb344e9
Funnel law: the self-hosted organization's scripted model stub is a c…
AbirAbbas Nov 24, 2026
a362f3b
serve: a team factory does not trust its own computer unless told to
AbirAbbas Nov 24, 2026
dd772d3
serve: bots, named identities with a token and never more rights than…
AbirAbbas Nov 24, 2026
21b58f6
engine: the five bot methods, under the org_bots hello word
AbirAbbas Nov 24, 2026
af71eba
manual: bots, the loopback setting, and nothing that says chats are l…
AbirAbbas Nov 24, 2026
31c61d5
executor: a command fence can be required, and then refuses instead o…
AbirAbbas Nov 24, 2026
85d87de
tests: fixtures that act as the host's person on a team handler say so
AbirAbbas Nov 24, 2026
eb9de66
engine: CODEAF_FENCE_REQUIRE fences every hello, and CODEAF_ENGINE_ID…
AbirAbbas Nov 24, 2026
fe8146a
sessionhost: the machine hosted chats run on, one Linux user and one …
AbirAbbas Nov 24, 2026
0c2c782
serve: the organization server's door to hosted chats, and the model …
AbirAbbas Nov 24, 2026
fc1961d
chat: codeaf chat --org opens a chat on the organization's server
AbirAbbas Nov 24, 2026
f5efa92
manual: the chats that run on the organization's server, in the words…
AbirAbbas Nov 24, 2026
360b9de
changes: hosted chats P0 entry
AbirAbbas Nov 24, 2026
22f6180
changes: the entry for the organization server follow-ups
AbirAbbas Nov 24, 2026
06118da
enginehost: SocketPathUnder names the socket path a home leaves room for
AbirAbbas Nov 24, 2026
49f92a2
sessionhost: refuse a data folder with no room for the engine's socke…
AbirAbbas Nov 24, 2026
2c0607f
deploy/org: the model stub can run one scripted bash call, so the smo…
AbirAbbas Nov 24, 2026
a8424e7
deploy/org: a sessionhost service for hosted chats, and a keyless smo…
AbirAbbas Nov 24, 2026
f1159d2
serve: registering a runner follows loopback_trust
AbirAbbas Nov 24, 2026
6278b5f
docs: the chats.read method and dev's hello word are different things
AbirAbbas Nov 24, 2026
73d1c6c
enginehost: compare SocketPathUnder with the real socket path without…
AbirAbbas Nov 24, 2026
8325476
executor: a required fence scopes abstract Unix sockets, and refuses …
AbirAbbas Nov 24, 2026
53b775f
sessionhost: chats start with umask 077, and a kernel that cannot sco…
AbirAbbas Nov 24, 2026
54fe176
manual: what a hosted chat's commands cannot reach, including shared …
AbirAbbas Nov 24, 2026
0d3c07f
deploy/org: the smoke checks what chats share (shared folders, abstra…
AbirAbbas Nov 24, 2026
b50218e
store: a hosted chat's model bearers persist as hashes, and each pers…
AbirAbbas Nov 24, 2026
0722969
serve: hosted chats keep their model bearers across a restart, attach…
AbirAbbas Nov 24, 2026
d2acf3d
store, modelapi: a hosted chat's spend can be summed, and a modelapi …
AbirAbbas Nov 24, 2026
14686ca
deploy/org: the keyless stack's model stub reports usage and can requ…
AbirAbbas Nov 24, 2026
ccbc824
executor: a required fence can limit the TCP ports a command may conn…
AbirAbbas Nov 24, 2026
83c0825
sessionhost: git settings and the bearer fingerprint in the API, the …
AbirAbbas Nov 24, 2026
d62b955
serve: the model door is a metered proxy with caps, and a hosted chat…
AbirAbbas Nov 24, 2026
019d4b8
codeaf: the org server's metered model settings, the hosted chat's gi…
AbirAbbas Nov 24, 2026
07185c6
deploy/org: the Compose stack runs the metered model door and a git s…
AbirAbbas Nov 24, 2026
c41ef4b
manual, protocol, change entry: hosted chats P1 (metered model access…
AbirAbbas Nov 24, 2026
69cc0ce
sessionhost: folders above a chat are readable (names only), so a new…
AbirAbbas Nov 24, 2026
f1cdc12
executor: a read grant survives an unlistable folder, and a refused c…
AbirAbbas Nov 24, 2026
aae3353
hosted P1: satisfy the env, model-spend and default-identity laws
AbirAbbas Nov 24, 2026
60a5ffc
hosted P1: smoke row for the first command, manual and README note on…
AbirAbbas Nov 24, 2026
7add21a
deploy/org: the git stub image carries git-http-backend, and the smok…
AbirAbbas Nov 24, 2026
3be9c73
hosted P1: a rejected model key is a plain refusal, one operator line…
AbirAbbas Nov 24, 2026
72ccecd
hosted P1: manual, README and change entry carry the rejected-key sen…
AbirAbbas Nov 24, 2026
a2e7942
Merge origin/w24/org-follow into hosted chats P1 (bots, loopback_trus…
AbirAbbas Nov 24, 2026
88334ef
hosted P2: an additive Hosting section in the organization's policy
AbirAbbas Nov 24, 2026
10c6495
hosted P2: the spend ledger records who asked
AbirAbbas Nov 24, 2026
cbfd1d4
hosted P2: a hosted chat is a private resource of the access core
AbirAbbas Nov 24, 2026
e987b4d
hosted P1: the upstream-refusal test reads the plain sentence item 0 …
AbirAbbas Nov 24, 2026
8da671b
Merge w24/sessionhost-p1 into hosted chats P2 (the P1_1 test follows …
AbirAbbas Nov 24, 2026
7b36adc
hosted P2: a bot may use the hosted chat routes, and its scope reads …
AbirAbbas Nov 24, 2026
3681d52
hosted P2: the hosting policy explains itself in plain words
AbirAbbas Nov 24, 2026
a866458
hosted P2: a frame-aware wire for guests, verb by verb, re-decided on…
AbirAbbas Nov 24, 2026
ec4ed60
hosted P2: the key-route sign-in test turns loopback trust on, and pi…
AbirAbbas Nov 24, 2026
ed251cd
hosted P2: the operator can set how often a guest window re-checks it…
AbirAbbas Nov 24, 2026
7f27f2e
hosted P2: the manual and the deploy guide say who can see, steer and…
AbirAbbas Nov 24, 2026
0931bd1
hosted P2: the keyless smoke drives guests, the event stream and the …
AbirAbbas Nov 24, 2026
8119fba
hosted P2: the change entry says what was believed and what is true now
AbirAbbas Nov 24, 2026
3d42ee8
deploy/org: pin every base image and the Dockerfile syntax frontend b…
AbirAbbas Nov 24, 2026
dd9a39b
deploy/org: build the codeaf image from source with make build, and d…
AbirAbbas Nov 24, 2026
4efc1b7
deploy/org/gate: a leak gate for the stack's images, and the checks t…
AbirAbbas Nov 24, 2026
c32028b
ci: build, scan and (only with credentials) push the org stack's images
AbirAbbas Nov 24, 2026
e752f29
deploy/org: run Compose from the published images, and make the Railw…
AbirAbbas Nov 24, 2026
2c59641
docs: change entry for the published org images
AbirAbbas Nov 24, 2026
1b718d9
deploy/org/gate: make context-check.sh executable, and make the self-…
AbirAbbas Nov 24, 2026
38e96f1
deploy/org/gate: check the build context the way a build is given one
AbirAbbas Nov 24, 2026
23a2c5f
deploy/org/gate: do not scan the files a package manager installed un…
AbirAbbas Nov 24, 2026
20d63b6
ci: check the sessionhost subcommand by the refusal it prints, not by…
AbirAbbas Nov 24, 2026
c0345e2
ci: ask the sessionhost to serve, so it names the secret it is missing
AbirAbbas Nov 24, 2026
50d2b13
deploy/org: a Railway source build stamps its commit without a SOURCE…
AbirAbbas Nov 24, 2026
616b726
deploy/org: the README's Railway section follows a fresh install, ses…
AbirAbbas Nov 24, 2026
1b6db50
deploy/org/railway: the template script no longer says hosted chats c…
AbirAbbas Nov 24, 2026
e36d000
hosted P2: a guest who cannot start a chat is told so in plain words
AbirAbbas Nov 24, 2026
e450863
hosted P2: the smoke gives the owner a fresh person, reads the comman…
AbirAbbas Nov 24, 2026
d945d9f
org/main: bring in the hosted org stack (sessionhost P0/P1, images, l…
AbirAbbas Nov 24, 2026
6ad765e
ci: gate org/main, the hosted organisation feature line
AbirAbbas Nov 24, 2026
a6f9cc1
cmd/codeaf: the runner-join test's link outlives its lab clock
AbirAbbas Nov 24, 2026
b48c605
org/main: bring in hosted chats P2 (private by default, guest verbs, …
AbirAbbas Nov 24, 2026
af59a88
remote: keep the sentence a server refused with, and let history and …
AbirAbbas Nov 24, 2026
5c5f95e
appwire: the agents.hosted word, org on create, hosted facts on an ag…
AbirAbbas Nov 24, 2026
2849458
chat --org: build the organization door from an address and a held si…
AbirAbbas Nov 24, 2026
ea4a3fc
app: open, list, drive and close hosted chats on an organization's se…
AbirAbbas Nov 24, 2026
45c43a1
manual and change entry: the desktop organization window opens hosted…
AbirAbbas Nov 24, 2026
ff36a52
change entry: the pull request number
AbirAbbas Nov 24, 2026
68e9437
org: one real-binary proof that the desktop app opens hosted chats on…
AbirAbbas Nov 25, 2026
527bf1f
org: the server's hosted chat rows carry the asker's verbs
AbirAbbas Nov 25, 2026
c176fcb
org: the desktop engine shows the verbs the server sent, not its own …
AbirAbbas Nov 25, 2026
0232c12
change entry: hosted chat controls follow the verbs the server sends
AbirAbbas Nov 25, 2026
dbc2966
config: register the hosted-chat environment as operator plumbing
AbirAbbas Nov 25, 2026
ee7001c
cellsync: the real-engine read test takes its home from storetest.Eng…
AbirAbbas Nov 25, 2026
4fed4da
change entry: the full-suite reds on org/main
AbirAbbas Nov 25, 2026
2d18101
change entry: a title that reads as one line
AbirAbbas Nov 25, 2026
d1b34aa
docs: an entry point for organizations, linked from the README
AbirAbbas Nov 25, 2026
b7ef0b3
deploy/org: the README follows compose.yaml and the code
AbirAbbas Nov 25, 2026
2741886
manual: pages that were false after private-by-default, manage and th…
AbirAbbas Nov 25, 2026
bd74458
manual: answer "can my admin read my chats", "who pays for a shared c…
AbirAbbas Nov 25, 2026
348a82f
change entry: organizations get an entry point, a corrected operator …
AbirAbbas Nov 25, 2026
1ffed7b
deploy/org: keep the operator's .env out of git
AbirAbbas Nov 25, 2026
78be765
quit_tail_test: the removed-computer quit takes the removal sentence …
AbirAbbas Nov 25, 2026
c5698dd
deploy/org: the Compose stack builds codeaf from this checkout, so ho…
AbirAbbas Nov 25, 2026
6a1b339
change entry 2900: a person holding `manage` can stop and delete a ho…
AbirAbbas Nov 25, 2026
3da2eac
org: who may move a chat is an organization policy setting, owner onl…
AbirAbbas Nov 25, 2026
55fa182
manual: keep the worker law green on the organization pages
AbirAbbas Nov 25, 2026
0c25d47
change entry 2910: the four org gaps, as what was believed and what i…
AbirAbbas Nov 25, 2026
b242924
knowledge: the opt-in writes its record before the switch, so a scan …
AbirAbbas Nov 25, 2026
774d007
change entry: the Memory opt-in order and the two test fixtures
AbirAbbas Nov 25, 2026
9632951
Merge origin/org/main into org/docs
AbirAbbas Nov 25, 2026
4cf0b89
hosted chats: the refusal to stop or delete names the people who can
AbirAbbas Nov 25, 2026
63f30e1
docs: follow org/main on moves, the build default and the change entry
AbirAbbas Nov 25, 2026
8774113
fix(org): removing a person ends their hosted chats' model and git ac…
AbirAbbas Nov 25, 2026
9c231bd
fix(sessionhost): a connection that just ended no longer refuses the …
AbirAbbas Nov 25, 2026
77274bf
fix(sessionhost): clear what a chat's user left in the shared areas
AbirAbbas Nov 25, 2026
95174ec
test(org): smoke's list-row checks follow the verbs the server sends
AbirAbbas Nov 25, 2026
c9b0fcf
live transfer C13A: the test ends only when the restarted arrival is …
AbirAbbas Nov 25, 2026
2cacf73
app take told: the test ends only when the after-work behind the open…
AbirAbbas Nov 25, 2026
9f37777
change entry: the two arrival-wait test fixes
AbirAbbas Nov 25, 2026
4284846
Railway: a checkout uploads with `railway up` (no tracked symlink poi…
AbirAbbas Nov 25, 2026
41fb10f
Railway: the draft template carries hosted chats, a health check, and…
AbirAbbas Nov 25, 2026
d84db98
docs: the hosted model door's key is CODEAF_HOSTED_MODEL_KEY, never O…
AbirAbbas Nov 25, 2026
b1e738f
docs: the Railway path, as a stranger walks it (source, order, health…
AbirAbbas Nov 25, 2026
00ba3d6
docs: change entry for the Railway walk (#2911)
AbirAbbas Nov 25, 2026
d593a22
docs: shorten the change entry title so the check passes (#2911)
AbirAbbas Nov 25, 2026
e508385
changelog: shorten the 2911 entry title under 100 characters
AbirAbbas Nov 25, 2026
a513f55
fix(org): a removed person's chat the host could not delete is closed…
AbirAbbas Nov 25, 2026
e1a57c2
Merge remote-tracking branch 'origin/org/main' into org/test-round
AbirAbbas Nov 25, 2026
68cf1c2
docs: a service deployed before the service it names can get an empty…
AbirAbbas Nov 25, 2026
700d8b1
Merge remote-tracking branch 'origin/org/main' into org/fullsuite-fixes
AbirAbbas Nov 25, 2026
e9361d7
org images: build and scan on pull requests into org/main, push only …
AbirAbbas Nov 25, 2026
0191af4
change entry 2912: removal ends hosted chats' access, and shared-area…
AbirAbbas Nov 25, 2026
43373a5
Merge remote-tracking branch 'origin/org/main' into org/test-round
AbirAbbas Nov 25, 2026
fb96d8f
org: refuse a websocket upgrade whose Origin is another site
AbirAbbas Nov 25, 2026
1e87d1d
org: a bot starts a hosted chat only when its scope holds run
AbirAbbas Nov 25, 2026
f9e730f
sessionhost: say at start when this machine answers on a cloud metada…
AbirAbbas Nov 25, 2026
6386b68
docs: the hosted chat limits written down, and the doc errors from th…
AbirAbbas Nov 25, 2026
6857626
change entry 2913: origin check, bot scope, hosted limits
AbirAbbas Nov 25, 2026
0207f82
test: a bot's row verbs are read from a chat its person's edit bot made
AbirAbbas Nov 25, 2026
50a547c
fix(deploy/org): operator-link.sh no longer prints a link that was al…
AbirAbbas Nov 25, 2026
cdf4acb
fix(deploy/org): the scripted git host has a profile of its own, so `…
AbirAbbas Nov 25, 2026
1f322cd
fix(cli): `codeaf --help` names --org, the way into an organization's…
AbirAbbas Nov 25, 2026
3327dd9
docs(deploy/org): the operator README, corrected where a stranger's w…
AbirAbbas Nov 25, 2026
a59f2b2
docs: organizations.md and the guide, corrected and given a terminal …
AbirAbbas Nov 25, 2026
9c94d76
manual: how to join an organization from a terminal, and the HTTPS a …
AbirAbbas Nov 25, 2026
2b24163
change entry 2915: the Compose path walked as a stranger
AbirAbbas Nov 25, 2026
5c64821
docs(deploy/org): the needs list says a same-machine password needs H…
AbirAbbas Nov 25, 2026
3b06c2c
fix(cli): no plain-HTTP warning when trusted_proxies names the HTTPS …
AbirAbbas Nov 25, 2026
0ba6bdc
docs: the plain-HTTP warning is quiet behind a trusted proxy, and say…
AbirAbbas Nov 25, 2026
069c1c6
store: keep a durable mark for a removal the chats' host has not fini…
AbirAbbas Nov 25, 2026
8e20b8f
fix(org): a removal the chats' host could not finish is retried until…
AbirAbbas Nov 25, 2026
6658813
docs: removal while the chat machine is down finishes by itself; the …
AbirAbbas Nov 25, 2026
13beb82
change entry 2916: host-down removal retried by the server; no plain-…
AbirAbbas Nov 25, 2026
ad19055
test(provider): routing beat tests wait for their beat to end before …
AbirAbbas Nov 25, 2026
334e88f
change entry 2918: routing beat tests wait for their beat
AbirAbbas Nov 25, 2026
b834867
org: policy settings for who approves a tool call and who starts a ch…
AbirAbbas Nov 25, 2026
a6f85d0
org: a guest cannot approve a tool call through the answer door, and …
AbirAbbas Nov 25, 2026
45a047f
org: wake_by lets an organization keep a guest from starting a chat t…
AbirAbbas Nov 25, 2026
929d10f
org: test that a bot without run never counts as the owner for wake_by
AbirAbbas Nov 25, 2026
00bd0e7
docs: describe chats.approvals_by and chats.wake_by, and write them i…
AbirAbbas Nov 25, 2026
dc1d5f8
change entry 2927: a shared hosted chat's tool approvals stay with th…
AbirAbbas Nov 25, 2026
8973074
provider: read the organization model door's own mark off its error
AbirAbbas Nov 25, 2026
1bd2bba
serve: the model door signs its own errors and writes a limit as the …
AbirAbbas Nov 25, 2026
eb1cf24
chat: a turn that hit the organization's limit says the organization'…
AbirAbbas Nov 25, 2026
48f3f91
manual: a hosted chat at its limit is not a payment failure, and say why
AbirAbbas Nov 25, 2026
4e39da4
change entry 2936: a hosted chat at its spending limit reads the orga…
AbirAbbas Nov 25, 2026
bb6d4b3
org: removing a person ends their place in People and every grant the…
AbirAbbas Nov 25, 2026
5c52c55
sessionhost: deleting a person's last chat removes their empty folder
AbirAbbas Nov 25, 2026
2e15e2c
deploy/org: make-template.sh works with the current Railway CLI
AbirAbbas Nov 25, 2026
880a6a3
deploy/org, docs: Railway volume size, the template draft, a backup r…
AbirAbbas Nov 25, 2026
fa6313e
manual: the chat sandbox's tools, unmetered factory spend, and what r…
AbirAbbas Nov 25, 2026
314e4dd
change entry 2944: removal of link joiners, Railway script, backup re…
AbirAbbas Nov 25, 2026
f65b78d
manual: say factory jobs, not the service names, so the worker law st…
AbirAbbas Nov 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,28 @@ name: PR gate
# every pull request into it was proven by one serial laptop-side `pr-ready`
# lock, which queued forty lanes deep; listing it hands that proof to the
# concurrent touched legs below, the same bar `dev` gets.
#
# `org/main` is the feature line of the hosted organisation work (2026-11-24):
# the org server, hosted chats and the self-hosting stack collect there and
# stay out of `dev` until after the WorkAF release. It is listed for the same
# reason `santosh/work` is — a line work lands on that nothing gates is a line
# nobody can say is green.
on:
pull_request:
branches:
- dev
- app/v3
- santos/dev2
- santosh/work
- org/main
# Also on the push, because a merge of two individually-green branches can
# still be red, and the merge is exactly the moment nobody is watching.
push:
branches:
- dev
- santos/dev2
- santosh/work
- org/main
workflow_dispatch:

permissions:
Expand Down
281 changes: 281 additions & 0 deletions .github/workflows/org-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,281 @@
name: org images

# THE IMAGES OF THE SELF-HOSTED ORGANIZATION STACK (deploy/org), built from the pushed commit, scanned for leaks, and
# pushed to Docker Hub only when the repository has been given credentials to push with.
#
# WHY THEY ARE PUBLISHED. A Railway template takes its services from a GitHub repository through Railway's GitHub App,
# which this organization does not have installed. A template also accepts public Docker images, so the stack is
# published as images and the template (deploy/org/railway/make-template.sh) names them. `docker compose pull && up`
# runs from the same images (deploy/org/images.env).
#
# THE ORDER IS THE POINT: build, then the leak gate (deploy/org/gate/image-gate.py) on the built image, then, and only if
# the gate passed, push THAT SAME LOCAL IMAGE. The bytes the gate read are the bytes that are pushed; nothing is rebuilt
# between the two. A failed gate stops the job before any login.
#
# PUSHING IS OPT-IN. With no DOCKERHUB_USERNAME and DOCKERHUB_TOKEN secret (a fork, a repository that has not been given
# them yet) every job builds and scans and is green, and nothing logs in anywhere. DOCKERHUB_NAMESPACE (a repository
# variable, default `agentfield`) says whose namespace the images go to, so a test run can point at a personal one with no
# code edit. Image names carry the codeaf-org prefix so they cannot be mistaken for agentfield/control-plane.
#
# PLATFORMS: linux/amd64 and linux/arm64, each built and scanned NATIVELY on its own runner (GitHub's arm64 runners), so there
# is no emulation and no cross-compiling to get wrong. Each leg pushes `<short sha>-<arch>`; once every leg of every image has
# passed its gate, the `manifest` job joins the two into the multi-platform tags (`<short sha>`, `dev`, `branch-<name>`), so a
# gate that fails on either platform keeps every public tag where it was.
#
# THIRD-PARTY ACTIONS ARE PINNED TO A COMMIT, not a tag: this workflow can hold a registry token, and a tag can be moved.
# The comment beside each is the release it was resolved from.
# A pull request into `org/main` that touches the stack builds and scans every image without pushing, so the leak gate and
# the context checks are proven before the line moves rather than after; a push to `org/main` builds, scans and (with
# credentials) publishes `branch-org-main`.
on:
push:
branches:
- dev
- org/main
pull_request:
branches:
- org/main
paths:
- "deploy/org/**"
- ".github/workflows/org-images.yml"
workflow_dispatch:

permissions:
contents: read

# One run per ref at a time and none cancelled half way: a run cancelled between two image pushes would leave `:dev` on two
# different commits. A newer push waits, and only the newest waiting one runs.
concurrency:
group: org-images-${{ github.ref }}
cancel-in-progress: false

env:
DOCKERHUB_NAMESPACE: ${{ vars.DOCKERHUB_NAMESPACE || 'agentfield' }}

jobs:
# The gate is proven before it is trusted: throwaway images with fake keys planted in them must FAIL it, a clean one must
# pass, and a planted .env or key file must not be able to enter the codeaf build context. Nothing here is tagged for a
# registry or pushed.
gate-selftest:
name: gate self-test
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Every base image is pinned by digest
run: deploy/org/gate/pins-check.sh
- name: Tracked symlinks resolve for Railway uploads
run: deploy/org/gate/upload-check.sh
- name: Railway scripts pass offline tests
run: deploy/org/railway/railway_scripts_test.sh
- name: The operator link script passes offline tests
run: deploy/org/operator_link_test.sh
- name: Compose profiles turn on the services they should
run: deploy/org/compose_profiles_test.sh
- name: Planted fake secrets must fail the gate
run: deploy/org/gate/selftest.sh
- name: Planted files must not enter the build context
run: deploy/org/gate/context-check.sh

# The commit's short id, the tags it earns, and whether this run may push at all. Nothing secret leaves this job: `push` is
# only the words true or false.
plan:
runs-on: ubuntu-latest
timeout-minutes: 5
env:
HAVE_PUSH_SECRETS: ${{ secrets.DOCKERHUB_USERNAME != '' && secrets.DOCKERHUB_TOKEN != '' }}
outputs:
short: ${{ steps.plan.outputs.short }}
tags: ${{ steps.plan.outputs.tags }}
push: ${{ steps.plan.outputs.push }}
steps:
- name: Names and tags
id: plan
run: |
set -euo pipefail
short="${GITHUB_SHA::12}"
tags="${short}"
if [ "${GITHUB_REF}" = "refs/heads/dev" ]; then
tags="${tags} dev"
else
# branch-<name>: lower case, anything outside [a-z0-9._-] (the slash of a branch name) becomes a dash.
branch="$(printf '%s' "${GITHUB_REF_NAME}" | tr 'A-Z' 'a-z' | tr -c 'a-z0-9._\n-' '-' | cut -c1-100)"
tags="${tags} branch-${branch}"
fi
echo "short=${short}" >> "${GITHUB_OUTPUT}"
echo "tags=${tags}" >> "${GITHUB_OUTPUT}"
# A pull request never publishes, even from a branch of this repository that can read the secrets: only a push
# or a person's dispatch moves a public tag.
if [ "${GITHUB_EVENT_NAME}" = "pull_request" ]; then
echo "push=false" >> "${GITHUB_OUTPUT}"
else
echo "push=${HAVE_PUSH_SECRETS}" >> "${GITHUB_OUTPUT}"
fi
if [ "${HAVE_PUSH_SECRETS}" != "true" ]; then
echo "No registry credentials here (DOCKERHUB_USERNAME and DOCKERHUB_TOKEN are not both set): every image is built and scanned, none is pushed." >> "${GITHUB_STEP_SUMMARY}"
fi

images:
name: ${{ matrix.image }} (${{ matrix.arch }})
needs: [gate-selftest, plan]
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]
image:
- codeaf-org
- codeaf-org-agentfield
- codeaf-org-swe-af
- codeaf-org-pr-af
- codeaf-org-modelstub
- codeaf-org-gitstub
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
# The codeaf image is built from THIS commit's source with `make build` (the organization server, the factory
# runner and the hosted chats' sessionhost all run from it); the build context is the repository root.
- image: codeaf-org
file: deploy/org/codeaf.Dockerfile
context: .
build_args: |
ORG_DIR=deploy/org
CODEAF_BINARY_FROM=source
SOURCE_COMMIT=${{ github.sha }}
# The AgentField control plane: the published, digest-pinned image plus a health check and a volume hand-off.
- image: codeaf-org-agentfield
file: deploy/org/agentfield.Dockerfile
context: deploy/org
- image: codeaf-org-swe-af
file: deploy/org/swe-af.Dockerfile
context: deploy/org
- image: codeaf-org-pr-af
file: deploy/org/pr-af.Dockerfile
context: deploy/org
# The two stubs of the keyless smoke test (compose profile `stub`).
- image: codeaf-org-modelstub
file: deploy/org/modelstub.Dockerfile
context: deploy/org
- image: codeaf-org-gitstub
file: deploy/org/gitstub.Dockerfile
context: deploy/org
env:
SHORT: ${{ needs.plan.outputs.short }}
# Never a registry name: the image exists only on this runner until the gate has passed.
LOCAL_IMAGE: org-gate/${{ matrix.image }}:${{ needs.plan.outputs.short }}-${{ matrix.arch }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1

# Loaded into the local engine, not pushed. The labels name the commit: org.opencontainers.image.revision is the
# one a self-hoster checks (README.md "Published images").
- name: Build
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: ${{ matrix.context }}
file: ${{ matrix.file }}
build-args: ${{ matrix.build_args }}
platforms: linux/${{ matrix.arch }}
load: true
push: false
provenance: false
sbom: false
tags: ${{ env.LOCAL_IMAGE }}
labels: |
org.opencontainers.image.title=${{ matrix.image }}
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.version=${{ needs.plan.outputs.short }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.vendor=Agent-Field
cache-from: type=gha,scope=org-images-${{ matrix.image }}-${{ matrix.arch }}
cache-to: type=gha,scope=org-images-${{ matrix.image }}-${{ matrix.arch }},mode=max

# The codeaf image only: the binary is this commit's, and the sessionhost is in it.
- name: The codeaf binary is this commit's and has the sessionhost
if: matrix.image == 'codeaf-org'
run: |
set -euo pipefail
out="$(docker run --rm --entrypoint codeaf "${LOCAL_IMAGE}" version)"
echo "${out}"
case "${out}" in *"${GITHUB_SHA::10}"*) ;; *) echo "codeaf version does not name ${GITHUB_SHA::10}" >&2; exit 1 ;; esac
# The sessionhost refuses to start without its shared secret, and says which variable: that line proves the
# subcommand is in this binary (an unknown subcommand prints something else) without starting a server.
refusal="$(docker run --rm --entrypoint codeaf "${LOCAL_IMAGE}" sessionhost serve 2>&1 || true)"
echo "${refusal}"
case "${refusal}" in *CODEAF_SESSIONHOST_SECRET*) ;; *) echo "codeaf sessionhost did not ask for its secret" >&2; exit 1 ;; esac

# THE LEAK GATE. A finding fails the job here, before any login. What it checks is written at the top of
# deploy/org/gate/image-gate.py and in deploy/org/README.md "Published images".
- name: Leak gate
run: |
python3 deploy/org/gate/image-gate.py "${LOCAL_IMAGE}" \
--expect-commit "${GITHUB_SHA}" --summary "${GITHUB_STEP_SUMMARY}"

- name: Not pushing (no registry credentials in this repository)
if: needs.plan.outputs.push != 'true'
run: |
echo "### ${{ matrix.image }} (${{ matrix.arch }}): built and scanned, not pushed" >> "${GITHUB_STEP_SUMMARY}"

- name: Log in to Docker Hub
if: needs.plan.outputs.push == 'true'
uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# The gate passed, so the image it read is the image that goes out: tag it and push it, no rebuild. Only the
# per-platform tag is pushed here; the public tags are made by the `manifest` job once every image has passed.
- name: Push
if: needs.plan.outputs.push == 'true'
run: |
set -euo pipefail
target="${DOCKERHUB_NAMESPACE}/${{ matrix.image }}:${SHORT}-${{ matrix.arch }}"
docker tag "${LOCAL_IMAGE}" "${target}"
docker push "${target}"
echo "pushed ${target}" >> "${GITHUB_STEP_SUMMARY}"

# The public tags: one multi-platform manifest per image, made from the two per-platform images that passed the gate. It
# runs only when every leg of every image succeeded and the run may push, so a failed gate leaves every public tag where it
# was. No image bytes move: a manifest list names the pushed ones.
manifest:
name: ${{ matrix.image }} tags
needs: [plan, images]
if: needs.plan.outputs.push == 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
image:
- codeaf-org
- codeaf-org-agentfield
- codeaf-org-swe-af
- codeaf-org-pr-af
- codeaf-org-modelstub
- codeaf-org-gitstub
steps:
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
- uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Tag
env:
SHORT: ${{ needs.plan.outputs.short }}
TAGS: ${{ needs.plan.outputs.tags }}
run: |
set -euo pipefail
repo="${DOCKERHUB_NAMESPACE}/${{ matrix.image }}"
for tag in ${TAGS}; do
docker buildx imagetools create -t "${repo}:${tag}" "${repo}:${SHORT}-amd64" "${repo}:${SHORT}-arm64"
echo "tagged ${repo}:${tag}" >> "${GITHUB_STEP_SUMMARY}"
done
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,14 @@ Still local over a connection: spend, search and memory. Reaching a machine
with no ssh at all, through a relay and a pairing code, is built and switches on
when the hosted relay does. [How it works](docs/REMOTE.md).

## Run it for a team: an organization

An organization is a codeaf server your company hosts. People join it from the desktop app, keep their work in a
separate organization account, and run their chats on the organization's machines: every chat in its own sandbox,
private until its owner shares it, with the model key and git access kept out of the chat. One `docker compose up` in
[`deploy/org`](deploy/org/README.md) brings up the server, the AgentField control plane, SWE-AF and PR-AF.
[What an organization is, and a ten-minute path to a first hosted chat](docs/organizations.md).

## What a copilot does, and what CodeAF does

| | a copilot | CodeAF |
Expand Down Expand Up @@ -308,6 +316,7 @@ Sixteen of ours fit in half a gigabyte; claude's fourth tab alone needs more.
- `codeaf manual`, or `alt+.` for the key map. The manual ships in the binary and the chat reads it too.
- [Guide](docs/GUIDE.md): every flag, key, slash command and exit code.
- [Documentation map](docs/README.md): product manuals, developer architecture, contracts and history.
- [Organizations](docs/organizations.md): host one for your team, or join one; [`deploy/org`](deploy/org/README.md) is the operator's walkthrough.
- [Contributing](CONTRIBUTING.md): setup, validation and pull requests.

## Telemetry
Expand Down
Loading
Loading