ce / Cells / live subs
Several subscriptions, one cell per device.
One account cell per device owns that device's login. The gateway picks an account for each task by weekly headroom and says why; it moves tasks, never credentials or model traffic. Each run needs the owner's one-use grant for that exact task.
#[ce::cell(name = "account", version = 1, home = Device, skill = "One subscription login on this device: its usage, and runs of the vendor's own CLI.")]#[record(cell = account)] struct Seen { usage: account::Use }#[record(cell = account)] struct Started { day: u64, result: account::Value }#[op(cap = "account.read")] async fn usage(cx: Cx, _q: ()) -> Result<account::Use> { let usage = account::login_usage()?; cx.twin().put(&Seen { usage: usage.clone() }).await?; Ok(usage) }#[op(cap = "account.run", grant = Passkey)] async fn run(cx: Cx, t: account::Task) -> Result<account::Value> { cx.step("account.run", || async { account::sandbox_start(&t) }).await }#[op(cap = "account.window")] async fn window_start(cx: Cx, _q: ()) -> Result<account::Value> { let (u, day) = (account::login_usage()?, account::today()); let n = cx.twin().all::<Started>().iter().filter(|(_, s)| s.day == day).count() as u32; let result = cx.step("account.window", || async { account::window_start(&u, n) }).await?; cx.twin().put(&Started { day, result: result.clone() }).await?; Ok(result) }
Recorded run, 2026-11-21
pickb in 7 ms: most weekly headroom
run without grantrefused
run with grant259 ms at the client, 245 ms in a CPUQuota=10% sandbox
forced limitb limited for 30 min
movea picked in 5 ms: skipped b, limited for 30 more min
run on a254 ms
schedulerOff: no window started
Run 2, 2026-11-21: the subs cell
windows (no subs:usage)bands only: a: low, b: mid
submit without a tapNeedsGrant: caller, input hash, summary
tapone-use grant for that exact task in 11 ms
submit with the granta picked (most headroom), ran in the capped sandbox, 550 ms
forced limit on aa answered Limited; picked again: b, both reasons stored
second account on one devicerefused: one account per device
Claude on a device row without itNotOnThisDevice
scheduler Off0 window starts
scheduler Queued, one task waitingexactly 1 start
Three subs replicas and three account cells, each under systemd-run with CPUQuota=10%, stopped at the end. Accounts are sim; a fresh test key signed the grant. Record: 2026-11-21-run2.json.
Accounts
alive: the real usage readout for its own device (percent not published)
bsim: stands in for a second device
Not done yet
- Runs use a stand-in task in a systemd-run sandbox; agent.box Start under the account's ai.account lease is wired as a command (ACCOUNT_LEASE_CMD) but the account cell holds no agent.box:start grant yet, so no vendor CLI ran.
- The second device is sim: run 2 ran on one server.
- The phone card that answers NeedsGrant is not wired; a test key signed the grant.
- No Tasks card in the control room yet, and no T3 Code instance behind wrap.auth yet (its catalog entry lints).
- The 10-of-30 chain-quota proof ran through a real gate in sub.gateway's tests; the deployed gateway gets it with the next install.
Raw record: 2026-11-21-live.json. A live system, stopped after the run. Licence: Apache-2.0.