Repository navigation
Workstreams rebuild (engine): who added whom, rules in words, undo a person's answer - #2888
Draft
ZeroPoint95 wants to merge 166 commits into
Draft
ZeroPoint95 wants to merge 166 commits into
ZeroPoint95 wants to merge 166 commits into
Conversation
…eps its next-day test Ports the two parts of #2648 (landed on app/v3 only) that dev's #2597 did not already cover. dev fixed #2648's first part, who starts the journal sync, its own way (the writer's journalStop/journalDone loop), so this keeps that design and adds only: - drainUsage and flushUsage also wait, under the same ceiling, until the journal has synced every row it held when they began (usagePending's appended/durable counts, appendedSoFar, syncedThrough, awaitUsageJournals). A sync still waiting out its 100ms interval after a close used to lock, and so recreate, a ledger whose home had just been removed. - TestPendingPreviousDayDoesNotBlockNewDay uses UTC-12 then UTC+12 instead of the host offset plus a day, which on a UTC runner is +24:00 and cannot be marshalled. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
#2650) * engine: chats.read — read a chat on another computer without taking it A chat another computer holds can now be read page by page, newest first, from what that computer last sealed: only the transcript's own objects and the content-defined chunks under the page are fetched, into the store a later take of the chat uses, so continuing it afterwards pays only for the rest. No lease, no materialize, no agent, no workspace folder. - cellstore: want --path [--range], peek, read and a read-side import, run from the store root; ReadsPaths asks furrow --json capabilities. - cellsync: Reader (path-scoped want/gather/import, byte counting) and Pager (pages cut at person lines, opaque head+offset cursor, header line carried so a newer format still says so); FakeEngine chunks files. - syncsetup: Sync.ReadChat over the take's engine and per-chat scope. - appwire/app: chats.read behind feature chats.read, advertised only with a relay and a capable furrow; entries shaped by agents.entries' code. Measured on real furrow: first page of a 16.8 MB chat fetched 644 KB (3.8%), a new turn 294 KB, and a take afterwards refetched nothing. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * docs: change entry for chats.read (#2650) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * cellsync: the oldest page reaches byte 0 instead of leaving an empty page On two GCP machines a chat whose turns split into whole pages ended with one more page holding only the session header: more was true, and the viewer paid a round trip that answered nothing. The cut on the file's first chunk now reaches byte 0 when it lands on the first message. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * docs: what reading a chat on another computer cost on two real machines Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * furrowbin: embed furrow v0.3.7, which reads one file of a relayed snapshot v0.3.7 (Agent-Field/furrow#29, #31) adds want --path [--range], peek and read, the verbs chats.read needs; with v0.3.6 the feature stayed absent from hello. Checksums taken from the release assets and checked against its SHA256SUMS. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * engine: chats.crew — a crew made on another computer shows as one crew (#2653) * engine: chats.crew — a crew made on another computer shows as one crew Chat rows now carry crew, crew_name, crew_manager and crew_kind. A chat held elsewhere takes them from a sealed crew its holder writes into the chat's directory record with every saved turn (Codeaf-Chat-Crews), so they survive the holder going offline; this computer's own teams store wins for any chat it lists. A remote crew stays read-only: no crew verb acts on it, chats.send reaches its manager, agents.take still moves one member as a single chat. The record, not the vault team sync, carries it: the vault merges a crew into the viewer's store as an editable crew it could drive, and the app runs that round only while pairing is pending, which is why the GCP pair saw crews.list [] and three loose member rows. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * docs: change entry for chats.crew (#2653) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> --------- Co-authored-by: CodeAF <267109073+agentfield-bot@users.noreply.github.com> --------- Co-authored-by: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…st publish (#2654) * syncsetup: the background copier no longer displaces a chat's own first publish A chat started before its directory record existed is found by the next sharing pass, which uploads it beside the drive's own first publish, creates the record and releases it at once. With a large working folder the copier won, and the live drive read that free lease (or this computer's own hold) as a chat released from this window: every later send was refused with "This chat is available to continue here." and the pending turns were branched off the record the other computer reads, which is why a restart left the chat orphaned. A drive still at fence 0 has never held the record, so a reading that names no other computer is its first publish still on its way. ConfirmWork, CheckLease and HoldsLease now say so instead of displacing it; the first publish takes the record over through Publisher.resume. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * changes: the copier keeps a new chat's first publish (#2654) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> --------- Co-authored-by: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…) (#2662) Assisted-by: CodeAF Co-authored-by: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…dy has (#2664) * move: a take-back no longer re-reads the folder or the store it already has A take-back of a small change to a chat in a 600 MB folder took 9.8 s on a loopback rig (19 s in the field) while 75 KB crossed the network. Two causes, measured per phase (docs/design/app-v3/MOVE-TIMING.md): - The take's fresh engine had its own empty clean-file ledger, so the secret screen before an in-place restore (and in the dirty check) read every byte of the folder again: 7 s. Every engine a process derives now shares one bounded ledger, honoured only while a file's identity, mode, size and mtime are unchanged. - One-shot engine processes opened a store whose daemon had left a deferred tail, judged the pack checkpoint unusable and re-verified the whole pack: 2 s for admission alone. A spawn now asks a daemon that is already answering to sync the store first (about 10 ms); it never starts one. No timer was on the path: releaseWithin, the 5 s cadences, TailQuiet, holdsLeaseWithin and startWait were measured and never waited on. Take-back 9.8 s -> 0.8-1.2 s, take from an offline holder 13.0 s -> 2.6-3.6 s, cold take unchanged at 4.8-5.7 s for 630 MB (bytes-bound). TestMoveTimelineRig is the on-request rig with PERF.md's ceilings; two unit tests guard the causes on every pull request. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * changes: the take-back entry Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * changes: keep the take-back entry's title on one line Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> --------- Co-authored-by: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Teams routes, storage, operator checks, membership, events and /v1/me teams for the Teams wave (G1). Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Every /v1/workstreams* route of the Teams wave contract: a durable store beside the go-ahead policies, visibility and write rules, rev + If-Match (412 when stale), soft delete with an operator-only purge, owner change, shares with include_linked and its preview, one-shot import of a Personal workstream, workstream.changed / workstream.removed events filtered to the people who could see the workstream, and go-ahead approval on an org workstream now needs write access to it. Team membership is read through serve.TeamMembership (TeamsOf, Members, optional HasTeam), which the teams lane fills; store.TeamOwnsWorkstream answers whether a team owns any workstream. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…anization (#2623) The Teams wave G3 engine methods, factory.me teams, and hello org_teams/org_workstreams. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…ht of the workstream (#2625) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…#2630) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Job write doors need the job person, edit on its workstream or the operator; sight needs repo read and view on its workstream; a profileless sign-in sees no workstream job. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…Yjs updates (E7) (#2636) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
… private (#2637) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…e, per-page revs, versions (E2) (#2639) Storage moves to factory-workstreams.db (migrated from the JSON once). Pages one at a time under their own rev, client-saved versions and restore, plan/wakes/suggestions, job membership (now deciding who reaches a job), unarchive, budget and spend, supersede-not-delete, part-level events and activity, and a factory.org_workstream_<part> engine method per route. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…ne person drives each (#2633) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…he organization's key (#2641) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…s-core (E4) (#2638) The server execs canvas-core's `canvas rpc` for every canvas read and write; routes /v1/canvases*, access through the E1 core, per-person frame hands with a 409 conflict, canvas.changed/removed events, Personal-canvas import, canvas presence, frame text as E7 documents, engine factory.org_canvas* and the org_canvases hello word; the demo server ships `canvas`. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…set (#2651) * factory: the server agent defaults to OpenRouter when no base URL is set On an organization server started without CODEAF_BASE_URL, every server agent turn failed with "provider base URL is required": the runner passed an empty base URL, meaning OpenRouter, and the provider client refuses an empty one. Unset now means OpenRouter's own address (config.DefaultBaseURL), the one provider an organization key is kept for; a set variable is still the operator's own proxy. The server profile's base_url is still not read. Found by the teams demo film rehearsal (defect D9). Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * changes: name #2651's fix Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> --------- Co-authored-by: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…d (E9) (#2646) * factory: an organization's people sign in with a username and password (E9) A team server takes a username and password by default, with GitHub as the second way in. An account is made through the operator link or an invitation, consuming the link in the same locked write that makes the account. Passwords are argon2id (OWASP 46 MiB, t=1, p=1) in PHC strings, NFKC-normalized, 12 characters to 256 bytes, checked against an embedded common-password list and the username. Sign-in is throttled per username and per resolved client address with decaying backoff; unknown, wrong and removed accounts get one sentence and the same hashing cost. Sessions reuse the server's access sessions: 30 days idle, 90 days absolute, ended by a password change, a reset or a sign-out. The operator can make a one-hour, single-use reset link for a password person. Password routes are JSON only, strictly decoded, 8 KiB, no-store, and refused over plain HTTP except on loopback or behind a trusted HTTPS proxy. Every account change is audited and no password reaches a log, record, file or answer. The engine serves factory.access_sign_up, access_reset, password_sign_in and password_change behind the hello word factory_password, holding every session the way access sign-in does. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * changes: name #2646 in its entry Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * changes: end each claim of #2646's entry in a full stop Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * engine: read the sign-in cache under a deferred unlock Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * factory: close the security review's findings on password sign-in H1 A session carries the password generation it was made under; a change or a reset moves the generation, and mintSession re-reads it under the session lock, so no session made with an old password outlives the change. H2 A link made for one GitHub login takes no password and offers none. H3 A try spends its throttle tokens on entry and gets them back only for a right password; one sign-in of a username is verified at a time. M1 Backoff is keyed by (username, address); a looser per-username ceiling skips addresses the person signed in from before, so a stranger cannot keep the owner out. M2 A username already named anywhere on the server (a GitHub login that ever signed in, a share, a team, an owner, a driver, a job, the record) is taken. L1 IPv6 counts by /64; a backing-off key is never evicted, a full set refuses. L2 A transparent rehash compares and swaps on the hash it verified; a change compares on the generation. L3 The common list is NCSC 100k plus xato-net's top million and famous passphrases, compared by letters and digits: about 486,000 entries. L4 A GitHub sign-in checks the name again under joinMu before its session is stored, and remembers the handle for good. L5 accounts.json is cached by mtime and size; a read error refuses the request and keeps the session. L6 Typed passwords are passing secrets: at least 8 bytes, the latest 64 kept. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * factory: trust a person's own machines against a stranger's guesses (second review) M1: every sign-up, reset, change and sign-in without one hands the machine a device token (256-bit, kept server-side as SHA-256 in accounts.json, bound to the person and the password generation, 180 days, 16 per person, revoked by a change, reset or removal, surviving a restart). A try with a valid token skips the username's ceiling and counts by the device and its address. The engine keeps the token beside the session through factory.sessions_take and factory.session_restore and presents it on later sign-ins. The in-memory trusted addresses are gone. A new machine during an attack uses the operator's reset link, which is never throttled. M-new: the changing session is valid at gen+1 before the write, so concurrent requests never sign it out. L-a: refunds are hand-counted credit. L-b: a full set logs once a minute. L-c: punctuation, keyboard runs and few-character passwords are common. L-d: a hash waits up to 500 ms for a slot. POST /v1/me/password answers 200 {device_token}. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * factory: a password person is not said to have signed in with GitHub /v1/me and the password sign-in answer said github_signed_in true for a password person. It is now true only for a GitHub sign-in; sign_in_kind "password" says a password person signed in, and the engine's can_sign_out reads either. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * factory: a device token only when the client can keep it, and none in use is pushed out (re-review #2) N1: a device token is made only on want_device; the engine asks only while the app's core says factory.sessions_store {can_keep: true} (unsaid is false). A device is marked used at every sign-in with it, and a person's sixteen live devices are never evicted: past that a sign-in succeeds with no new token, said once in the log. N2: a signed-in password change counts per session, not against the username's ceiling. N3: a trusted pair is keyed by device and address, so a stolen token used elsewhere backs off only itself. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * factory: one session's or one device's guesses are capped across every address (re-check 3) F1: a password change counts in one bucket per session with no address in the key, so a stolen session spread over 30 addresses gets 10 current passwords checked, not 300. F2: a device token keeps its (device, address) pair bucket and also has a ceiling of 100 across every address; past it the try counts as untrusted, so a stolen token from 30 addresses gets 100 trusted checks plus the username's ceiling, not 300. F3: the concurrent-guess test asserts the real bound, the username's ceiling. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> --------- Co-authored-by: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
… Overview (#2657) * factory: an organization workstream made with no pages starts with an Overview createWorkstream kept whatever pages the request carried, so any client other than the desk made a workstream nobody could write in. The server now adds the desk's own Overview page (title "Overview", kind overview, empty) when the create carries no pages. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * changes: name #2657 in its entry Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> --------- Co-authored-by: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…#2658) The server agent's text on a page edited live is kept as the newest version without being applied, so a client that called the highest version current called a version the page does not hold current, and offered no Restore on it. GET .../versions now answers live_version (the newest version the page held: a snapshot of the live document or a restore) and marks the agent's unapplied versions kept until a restore names them. The agent's words now match what History shows. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…2652) * factory: an organization's people sign in with a passkey, in their own browser (E10) The server offers passkeys (WebAuthn, via github.com/go-webauthn/webauthn) first wherever its address is https with a DNS name. The ceremony runs on a page the server serves, in the person's browser; the engine starts a flow with a PKCE-shaped challenge and polls with its verifier for the session. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * engine: factory.passkey_start/poll/cancel/list/remove and hello factory_passkey (E10) The engine makes and keeps the PKCE verifier, opens nothing itself, checks the ceremony url is on the organization's own origin, and keeps the session a done poll answers exactly as access_sign_in keeps one. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * manual: passkeys on an organization, and a reset replaces every way in (E10) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * factory: passkeys proven end to end in Chromium, WebKit and Firefox against the real binary (E10) scripts/passkey-e2e.sh runs a real codeaf factory serve over TLS at https://localhost, two real codeaf app engines, and Chromium with CDP virtual authenticators on the internal, hybrid and usb transports. The run found that the page's form rule beat the hidden attribute, so a browser with no WebAuthn still showed the button. domain: localhost is now accepted with tls: files. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * factory: a passkey ceremony finishes only on the computer that started it, and taking over an account needs a fresh proof (E10 review) C1: every flow binds a one-shot listener on 127.0.0.1 in the engine; the page hands the browser there with a one-time code, and the poll answers a session only with the verifier and that code. A sign-in, join or add opened on another device never completes (state elsewhere). Joins and adds write the account only at that poll. H1: adding a passkey, a first password and removing a passkey need a proof from the last five minutes: a sign-in, purpose confirm, or factory.password_confirm. Otherwise step_up. An add by a person with passkeys asks for one of them first. M1: pending flows are capped per /64 and starts per /48, sign-ins get at most three quarters of the room, unopened sign-in pages end after two minutes. L1: a default port in the address works. L2: a wrong verifier is counted, not fatal; cancel needs https like the rest. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * manual: finish a passkey on the same computer, and confirm it's you (E10 review) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * factory: the passkey e2e probes a sign-in opened on another device, and a confirmation (E10 review) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * factory: a step-up is only ever its own flow, a flow belongs to one browser, and the loopback takes only its own code (E10 re-review 2) N1: an add no longer asks for an existing passkey along the way; it needs a confirm or the current password beforehand. The first page-origin options binds the flow to that browser (HttpOnly, Secure, SameSite=Strict cookie on /passkey/<flow>); options, finish and the hand-over refuse any other. The finish answer carries no code: the bound browser follows /passkey/<flow>/go once, a 303 to the engine's loopback. N2: a sign-in is never a step-up. N3: the code carries an HMAC under a key the engine sends with the start; the listener checks Host, path and that mark, answers anything else 404 (429 past 20 a second) and keeps waiting until its own code. N4: only a page-origin options opens a flow; opened sign-ins are capped per /24 or /48. The page says where it finishes before the browser's "can't connect". Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * manual: a sign-in is not a confirmation, a passkey page belongs to one browser, and the shared-computer limit (E10 re-review 2) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * factory: the passkey e2e shows our words before the browser's error on another device, and confirms before adding (E10 re-review 2) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * factory: one confirmation for one action, a __Host- browser cookie, fair eviction, codes live a minute (E10 re-review 3) A confirm is started for one action (add a passkey, remove passkey X, set a first password); its page names the action and the computer asking, and it lets that action happen once within five minutes. step_up names the action. The flow binds by a __Host-codeaf_pkb cookie no sibling host can plant; HSTS covers subdomains of a name the operator owns. A full table of opened sign-ins drops the oldest from the busiest network. A code works for 60 s after done, and the loopback answers it with a 303 to a clean /done. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * manual: confirm it's you for one change, once; shared wildcard hosts are for demos (E10 re-review 3) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * factory: the passkey e2e checks the __Host- cookie, a clean /done, and one change per confirmation (E10 re-review 3) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * factory: fair eviction never drains a busy network, few confirmations per session, a quoted computer name, opt-in includeSubDomains (E10 re-review 4) A full table of opened sign-ins takes room only from a network (/24, or /32 for IPv6) holding more than four and more than the newcomer's own plus one, oldest flow first; otherwise the newcomer is refused. A session holds three confirmations at most, a fourth replacing the oldest, and a full table drops the oldest anyone holds. A password confirm for a passkey the person lacks is a 404. The confirm page quotes the engine's computer name beside the session's sign-in date and the address the server saw. HSTS includeSubDomains is the operator's opt-in, hsts_include_subdomains. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * manual: the confirm page quotes the computer's name, three confirmations a session, hsts_include_subdomains (E10 re-review 4) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * factory: an add or confirm with a stray field is a bad request; localhost is a one-machine trial address (E10, X1 browser leg) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * factory: a name cannot reorder or hide the server's words, three confirmations an account, a same-provider flood drains itself (E10 re-check 5) Display names, passkey names and the computer a confirm page names lose every format character (bidi overrides and isolates, zero-width marks); a control character, C1 included, refuses a display name, and the session's raw device label is cleaned the same way. The confirm page sets each such name in its own <bdi>. An account holds three confirmations across its sessions, oldest out. When the busiest network in a full table is an IPv6 /32, the sign-in it gives up comes from its busiest /48. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * manual: a flood from hundreds of networks can refuse new passkey sign-ins while it lasts; passwords are unaffected (E10 re-check 5) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> --------- Co-authored-by: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…out GitHub (film D10) (#2660) * factory: an organization's members make jobs on its repositories without GitHub (film D10) A person who signed in to an organization with a password or a passkey read no repository at all, because a signed-in person's repositories were only what their own GitHub token reached, so Add job had nothing to offer and Create job stayed off. The server's own GitHub grant fed only its poll. The repositories the operator turns on in Repos are now the organization's: every signed-in member reads them, beside whatever their own token reads, which is asked exactly as before. The operator also reads what the server's grant last discovered, so a password operator can choose from it in Repos. Only the operator turns one on or off, as before. A link's join check still judges a GitHub stranger by their own token alone. POST /v1/jobs (factory.job_create) takes workstream: the caller must be able to edit it, and the job joins it in the same request. A job on a repository the caller reads only through the organization must name one, so a view-only member reads jobs and makes none. The manual says how to make a job without a GitHub account and who turns repositories on. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * docs: the change entry for the organization's repositories (film D10) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> --------- Co-authored-by: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…ilm D11) (#2659) * factory: a canvas made in an organization workstream belongs to it (film D11) New canvas inside a team's workstream made the person's own canvas, so the team never saw it. A canvas can now belong to an organization workstream: POST /v1/canvases {workstream} (engine factory.org_canvas_create workstream, hello word org_workstream_canvases) makes it there, and it is reached the way the workstream is, its owner, shares and Private as they stand now, so a share added to the workstream later reaches its canvases too. Putting a canvas in a workstream needs edit on the workstream: a viewer is refused 403 and nothing is made. PATCH /v1/canvases/{id} {workstream} moves one in or ("") out. Canvas rows name their workstream. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * docs: name the D11 change entry after its pull request Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> --------- Co-authored-by: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…ions pointers) (#2661) * factory: a person joins an organization; Settings › Factory is Settings › Organizations The manual gains "join an organization", in the asker's words: joining one organization server brings its workstreams, canvases, chats and Factory at once, the three desktop doors that open it, and where Factory's settings moved. Person-facing pointers to Settings → Factory now say Settings → Organizations, and the CLI's refusal names an organization invite link. The codeaf://factory/join scheme and every wire name are unchanged. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * changes: 2661 join an organization Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> * changes: 2661 names surfaces the check knows Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com> --------- Co-authored-by: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…s (ws_canvas) (#2774) The server's Afi and task runs draw organization canvases with ws_canvas, the same canvas commands and guide as Personal Afi, into the workstream's Files. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Wait for settled test state: deferred team traffic, sleeper cancellation, persisted knowledge failures and worker passes, mark/step concurrency, task work idle/completion, published plan outcome, and joined plan-spend writes. All requested engine cases have count=20 green proof. Full pr-ready and fresh final-source build/vet/laws/changelog checks passed. The gate classified one unrelated usage-writer failure as flaky after a green retry; four original reports were not reproduced and remain unchanged. RED3-owned tests were not edited. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Task owners and workstream stewards can delete stopped tasks with short Undo. Tasks leave live lists and Inbox, dependent waits clear with an explanation, and Files stay. Undo restores unchanged waits. Afi gets no delete tool. Local proof is recorded on the pull request. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…2789) Owner decision 2026-11-17 §12: a Factory job budget is any amount from $1 up, as well as the presets. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…base (#2790) Join command fixture writers before removing test homes; keep macOS check utilities available beside Homebrew Git. Select touched packages and failure-attribution bases from the merge-base, with script acceptance and CI documentation aligned. Merged on local proof per lane policy. Named macOS acceptance and 20/20 rewind stress pass. Build, vet, laws, changelog, runnable tooling and the queued touched-package gate pass; two unrelated initial failures were classified flaky. Full pr-ready namespace acceptance is blocked by the host bubblewrap UID-map restriction. A clean rebase is checked with build and focused acceptance. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
#2788) A held issue says why (Held at import / Held: pick-up is off) and the queue says github: not_connected; app-sidecar records the GitHub client ID. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Merge on the local proof recorded in the pull request, under the owner's lane policy. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…11c) (#2793) A chat stopped mid-turn by a quit or crash reads Interrupted · Continue and never resumes or spends by itself; Continue carries it on once. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…d; Library batches (#2794) Crew wakes are kept until delivered and a moved manager reopens in the app; managers get team_link (crews.json + crew.item); fenced runs may write the existing desk canvas folder; a queued run keeps D1's answered flag across a restart; the decision-check refusal names only who was asked; the Library holds quiet chats while another is busy (max 10m) so a sitting is one compile. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
… Fold decision (#2796) Org tasks made running start, doers tick their tasks, Asks reach their decider, Fold records a decision. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…task back (I1) (#2797) Asks gain reversible; reversible answers stay undoable from the task until done (undo withdraws the decision); Hand to someone else changes an Ask's decider; Take it back makes the owner the doer, stops the agent, keeps what it made. Manual: inbox page and probes. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
W1: retain original decision questions and answers and document the bounded Overview and searchable Decisions. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…ined invites (R1) (#2800) Ask-rule exceptions Afi suggests, a fallback that answers after a set wait, a 3-day Ask for invites who never join, and removal handing tasks to the remover. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Correct the Overview manual after W1 screenshot review, alongside desk PR #615. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…ork (#2802) The chat manual follows the desk's Inbox (lane I1): Set up in the Inbox for an organization's admin with Not now, no Still to set up on Work, chats asking you under the six sections, no Answer together, and no Connect your GitHub promise. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…reens (T1) (#2803) An agent's task comment over 400 characters or 3 lines is kept as a document in Files, made by the task, and the thread gets one made line, which the desk draws with Open. The ws_task_comment description and the task-run prompt say so too. The manual now covers the build spec v2 Tasks screens: search and chips, the 420 list, the Add task row, ⋯ verbs only, Waiting on as a row, and no Uses or Add a step. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…2799) My space Afi reads all accessible workstreams while retaining its own write scope. Update the workstream manual and UI terminology. Local proof and the final trunk rebase are recorded on the PR. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…sk's line (#2806) A words-only answer to an Ask is kept in Decisions as \"Asked “<question>”, answered: <words>\", never as the Ask's own line, so the decision check no longer pauses work against the person's own answer. Manual documents Reply… on an agent's Ask. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…9) (#2808) Afi's card replies never go stale; manual for F2 (sim v3 D2, D5, D8, D9). Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
## Summary Answered Ask → question + answer → task receipt and Decisions Preserve decision provenance and display names through the organization bridge. Retain separate question and answer fields on task events. Keep publishing's retry remedy once. ## Evidence - Before: focused regressions reproduced lost fields and duplicated publishing instructions. - After: all three regressions pass. Build, vet, laws, changelog, both full touched package suites, packed manual and manual gates pass. Desk #639 includes 185 relevant tests and four browser combinations; 32 regression-view PNGs were inspected. ## Merge Danger **Door:** two-way **Blast Radius:** desk Additive wire fields; existing event text stays compatible. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
SIM D1: factory.org_workstreams takes archived (?archived=1), hello org_workstreams_archived; manual says where the archive is and when Archive asks. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…SIM F3) (#2811) Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
- A workstream keeps who added each person or team (people_added_by), shown as added_by on its people, carried through invites - Rules in words (rules.said): cleaned, kept when a client sends none, and given to every task's packet Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bridge's own member and rules types dropped the new fields, so "Ann added you" and a new workstream's rules never reached the app. Rules in words are a pointer so an empty list still clears the server's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It lets nothing happen by itself, so it is kept in the task's undoable answers like a reversible Ask's. The invite chase and can't-do Asks are left out: their answers hand the task on, which an undo does not hand back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed run says who answered - An Ask option can say it needs the person's own words (`words`). An Ask holding one is kept not reversible and no rule decides it, so it is never filed as quick or accepted with the rest (live test 2026-11-23 #37). - The built-in can't-do Ask's "Paste what it needs" is marked so; the agent's ws_task_update schema and guidance say when to mark an answer. - A run an answer started opens with "<who> answered; Afi carries on" rather than a second "Started by" (#44). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ZeroPoint95
force-pushed
the
zeropoint95/workstreams-rebuild
branch
from
November 24, 2026 01:27
ce80c82 to
606a2a4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the engine side of the team Workstreams rebuild: who added each person, rules in words, and Undo on a person's question. Draft, not for merging yet: shared so the team and their agents can see what has changed.
Companion desktop PR: https://github.com/Agent-Field/codeaf-desk/pull/890 (it has the plan and the full list of changes)
What this branch is
dev, so the diff is large (about 165 commits)dev, then the rebuild on top. This PR supersedes that branchdev: rebased and force-pushed whendevmovesDone so far
people_added_by), shown asadded_byon its people and kept through invitesrules.said): a workstream's rules as people wrote them ("Nothing ships without Priya's OK")internal/appwire) carriesadded_byandsaidto the desktopStill open
Tests
go test ./internal/factory -run 'Rules|Undo|Answer|Ask'go test ./internal/factory/serve -run 'Structure|Rules|Invite|Packet|Share|People|Ask|Undo'go test ./internal/appwire -run AddedByAndRulesInWords🤖 Generated with Claude Code