~ knotless Search/
↑↓ move↵ open⇧↵ all results

socialweb.computer/socialweb-computer-kcp

socialweb.computer: a compute market on atproto (kcp)

1 collaborator
0
0

docs: who you run as (associated identity or the account itself); decisions 54, 55

Merged johnandersen777.bsky.social asked to merge into main from socialweb.computer/socialweb-computer-kcp:phase-2
docs/plans/0040-release-pipeline.md+9−0
@@ -527,6 +527,15 @@ All answered 2026-11-17.
If not correct fix it"; the page's `--secrets` example must work as written. Branch `secrets`.
53. (2026-11-19) The site: the root page's background plain white; the Quickstart installs by `curl -sfL <knotless
raw URL>/scripts/install.sh | bash -e` and a PATH line.
54. (2026-11-19, AskUserQuestion) 0013:run on four home hosts (the gate's machine and its rental on one host: UDP
to the host's own addresses is dropped by the per-guest nftables bridge prerouting rules; the router has no NAT
loopback): "nftables: allow WebRTC range": one accept rule per guest: UDP from the guest's tap to the host's own
addresses with destination port in the bidder's WebRTC port range; every other port stays dropped. He asked
for technical terms in place of "fence".
55. (2026-11-19) The site: `curl -sfL https://socialweb.computer/install.sh | bash -e`; every docs page's
background plain white; code highlighted at build time, not client side; `COMPUTE_CONTRACT_FLOW_MAP.md` brought
into docs and updated for the current lexicons; the lexicon and XRPC reference laid out after
cocore.dev/docs/lexicons, "firmly in our theme/css/style".
docs/protocol/identity.md+1−1
@@ -204,4 +204,4 @@ Trust never depends on that cleanup: the grant's `expiresAt`, `vm.delete` and `v
## See Also
- [README.md](README.md), [policy.md](policy.md), [outside.md](outside.md), [market.md](market.md), [guest-events.md](guest-events.md)
- [../SYSTEM.md](../SYSTEM.md#identity-and-auth), [../bidder.md](../bidder.md) (identity + association)
- [../SYSTEM.md](../SYSTEM.md#identity-and-auth); the user commands: [../bidder.md](../bidder.md#who-you-run-as), [../quickstart-prod.md](../quickstart-prod.md#who-you-run-as)
docs/bidder.md+35−8
@@ -82,24 +82,51 @@ sudo kubectl --kubeconfig "$K" get marketbidder app -o jsonpath='{.status.phase}
`check-host` prints only `OK` (and `INFO`) lines; `marketbidder app` stays `Provisioning` until you sign in.
## Who it serves
## Who you run as
The default policy `bidder-tangled-vouch`: the bidder bids only for requesters its operator vouches for
([quickstart-prod.md](quickstart-prod.md#vouches)). Never set `--bidder-policy open`. A bidder can also vouch named DIDs
itself, from a spec file (a `MarketBidderSpec`; `identity: {mode: oauthQr}` makes your own account the bidder instead
of an agent of it):
| mode | the bidder is | use it when |
| --- | --- | --- |
| associated (`--bidder-operator-signin <your handle>`) | a DID of its own, on a PDS it runs, an agent of your account | one account runs several bidders |
| your account (`identity: {mode: oauthQr}`) | your account itself: offering, bids and receipts in your repo | one bidder, no DID of its own |
### Associated
The install above. Open the URL of `marketidentity operator` (a QR session transfer on qr.fedfork.com) and sign in as
`<your handle>`: the bidder writes the grant and the endorsement into your repo and `agent-of` your DID into its own DID
document. Check it (`K` above):
```sh
D=$(sudo kubectl --kubeconfig "$K" get marketidentity bidder -o jsonpath='{.status.did}')
sudo kubectl --kubeconfig "$K" get marketidentity bidder -o jsonpath='{range .status.conditions[*]}{.type}={.status}{"\n"}{end}' | grep Associated
socialweb-computer internal association "$D" | jq -c '{roots, errors}'
```
You see `Associated=True` and `{"roots":["<your DID>"],"errors":null}`; `marketbidder app` turns `Ready <its DID>`.
### Your account
```sh
sudo install -D -m 0644 /dev/stdin /etc/socialweb-computer/bidder.yaml <<'YAML'
identity:
mode: oauthQr
options:
- {name: vouch, value: <requester DID> <requester DID>}
YAML
sudo "$(command -v socialweb-computer)" install bidder --handle <your handle> --bidder-spec-file /etc/socialweb-computer/bidder.yaml
sudo kubectl --kubeconfig "$K" get marketidentity bidder -o jsonpath='{.status.pendingAction.url}{"\n"}'
```
Its sign-in URL is then the one of `marketidentity bidder` (`bidder oauthQr AwaitingScan` until you scan it).
Open that URL and sign in as `<your handle>`: `marketidentity bidder` turns `oauthQr Ready <your DID>` and
`marketbidder app` `Ready <your DID>`, with no PDS of its own.
## Who it serves
The default policy `bidder-tangled-vouch`: the bidder bids only for requesters its operator (your account) vouches for
([quickstart-prod.md](quickstart-prod.md#vouches)). Never set `--bidder-policy open`. A bidder can also vouch named DIDs
itself, from its spec file:
```yaml
options:
- {name: vouch, value: <requester DID> <requester DID>}
```
## Upgrade, rollback, self-update
docs/quickstart-prod.md+46−11
@@ -62,28 +62,63 @@ read stdin, so each is the last line of its block). Without `--expires-in` the b
| `--tunnel ssh:22:webrtc --transport webrtc` | ssh over iroh |
| `--state-dir <dir>` | `~/.local/state/socialweb-computer` |
## Sign in
## Who you run as
Options after `--`:
| mode | the requester is | use it when |
| --- | --- | --- |
| your account (`--atproto-oauth-qr` or `pdsAccount`) | your atproto account itself: its records go to your repo | you rent by hand |
| associated (`--identity <name>` with `--associate-with <your DID>`) | a DID of its own, on a PDS it runs, an agent of your account | a machine rents for you and holds no session of your account |
| option | identity |
| --- | --- |
| `--atproto-oauth-qr` | your account, by a QR code in the terminal |
| `--atproto-oauth` | your account, in a browser |
| `--atproto-identity-mode pdsAccount --atproto-handle <handle> --atproto-pds-url <pds>` | your account, by an app password in `ATPROTO_PASSWORD` |
Bidders serve an associated requester as they serve you: their vouch check walks it to your account. A fresh DID of its
own with no account behind it (`-- --skip-qr`) gets no bids on prod.
### Your account
After `--`: `--atproto-oauth-qr` prints a QR code and its URL (qr.fedfork.com, valid 5 minutes): scan it with a phone
or open it in any browser and sign in. With an app password instead, from a file (mode 0600):
```sh
ATPROTO_PASSWORD="$(cat ~/.config/socialweb-computer/app-password)" socialweb-computer run request --name vm3 --exec id \
-- --atproto-identity-mode pdsAccount --atproto-handle <your handle> --atproto-pds-url <your PDS>
```
An app password, typed (never in the shell history), then the request:
or typed (never in the shell history), then the same command without the `ATPROTO_PASSWORD=...` prefix:
```sh
read -rs ATPROTO_PASSWORD && export ATPROTO_PASSWORD
```
The requester puts the password into its own OpenBao.
### Associated
1. Make the identity: it prints its DID and waits (leave it running).
```sh
socialweb-computer run requester --name me --identity me -- --associate-with <your DID>
```
2. In a second terminal, your account writes the grant and the endorsement, rkey the new DID. With
[goat](https://github.com/bluesky-social/goat) (`go install github.com/bluesky-social/goat@v0.2.3`), signed in as
your account (`goat account login -u <your handle>`, password from `GOAT_PASSWORD`):
```sh
D=$(jq -r .did ~/.local/state/socialweb-computer/requesters/me/ready.json)
echo "{\"\$type\": \"com.publicdomainrelay.temp.market.association\", \"agent\": \"$D\", \"createdAt\": \"$(date -u +%FT%TZ)\"}" \
| goat record create --no-validate --rkey "$D" -
echo "{\"\$type\": \"link.ident.endorsement\", \"agent\": \"$D\"}" | goat record create --no-validate --rkey "$D" -
socialweb-computer internal association "$D" | jq -c '{roots, errors}'
```
You see `{"roots":["<your DID>"],"errors":null}` (before the records: the new DID itself).
3. Ctrl-C the requester of step 1, then rent with the identity; no sign-in:
```sh
socialweb-computer run request --name vm3 --exec id -- --atproto-identity-mode pdsAccount \
--atproto-handle <handle> --atproto-pds-url <your PDS>
socialweb-computer run request --identity me --name vm4 --exec id
```
`unset ATPROTO_PASSWORD` after. The requester puts the password into its own OpenBao.
To end the association, delete both records (`goat record delete -c <collection> -r "$D"`).
## A requester that stays up: run requester
README.md+4−2
@@ -32,7 +32,8 @@ socialweb-computer run request --name vm1 --exec id -- --atproto-oauth-qr
Sign in with the QR code (or the URL under it); you see `uid=0(root) gid=0(root) groups=0(root)` and the VM is
released. A bidder serves you only when its operator vouches for you:
[docs/quickstart-prod.md](docs/quickstart-prod.md#vouches). Hold a VM, ssh in, sizes, app passwords, the long-lived
requester: [docs/quickstart-prod.md](docs/quickstart-prod.md).
requester: [docs/quickstart-prod.md](docs/quickstart-prod.md). As your account or as an identity associated to it:
[Who you run as](docs/quickstart-prod.md#who-you-run-as).
## Run a bidder
@@ -40,7 +41,8 @@ requester: [docs/quickstart-prod.md](docs/quickstart-prod.md).
sudo "$(command -v socialweb-computer)" install bidder --handle <your handle> --bidder-operator-signin <your handle>
```
Linux with `/dev/kvm`: [docs/bidder.md](docs/bidder.md).
Linux with `/dev/kvm`: [docs/bidder.md](docs/bidder.md); an agent of your account or your account itself:
[Who you run as](docs/bidder.md#who-you-run-as).
## Try a local market