This enables using [Cloudflare R2][0] as a storage provider.
Cloudflare R2 is an S3-compatible API with a generous free tier; it
looks like it may cost nothing for most Urbit ships’ usage patterns.
The only hitch is that R2’s endpoint is not able to be configured to
be publicly readable; in order to [make a bucket public][1], you must
either use an r2.dev URL, or set up your own custom URL. Caching and
such is only supported on your own URL, so it sounds like that’s the
case they’re encouraging people to target.
This change enables R2 support by adding a configuration option to
set a public URL base. If it is non-empty, it replaces the origin
for any S3 upload URLs. A ship may use either its r2.dev URL or a
custom URL at its discretion. As a nice side benefit, this also
allows wrapping S3 access over a custom domain that you control.
[0]: https://www.cloudflare.com/developer-platform/r2/
[1]: https://developers.cloudflare.com/r2/buckets/public-buckets/
/lib/summarize now supports building summaries off of the new
/app/channels. If that agent is running, it will use the new
summarization logic. If it's not, it will continue on as it has.
There is a (somewhat poorly understood) case where the group associated
with a chat may not actually contain that chat in its channels listing.
Here, instead of assuming the channel is always present, we ask for it
more gently, and simply skip to the next-most-active channel if it turns
out to be missing.
We also remove a stray debug printf, and add a trace print in case
anything else goes wrong here.
Includes the bark/growl system for sharing activity summaries. The growl
agent respects the "activity logging" consent flag used by groups,
defaults to not sharing if that flag is not set, and only shares with
the "bark host" when prompted. (The bark host, in turn, currently only
stores responses for hosted ships.)
Also includes all the groups-side dependencies this has, which it needs
for the chats & groups types. Hard-including those files will save us
some run-around during deploy.
Co-authored-by: midsum-salrux <nathan@tlon.io>