pub.techne.draft.commons.defs

Shared views for the Commons API. Draft tier. Every record view is a record some repo published, as the commons indexed it; the operator views (releases) are the commons' own state; a takedown is an operator's own verdict record.

Details · defs
Kinddefs
Authoritycommons.draft.techne.pub
Commit rev3n3iob3ai3g2u
Indexed

#chainStage

object

Properties

rules

requiredarray

Rule names, in the order they run.

itemsstring

stage

requiredstring
  • knownValues: source | curated

#clusterView

object

A cluster as the curator published it: the curated record, its provenance, and the member records the provenance names. Only clusters whose curated record sits in the curator's own repo, and whose curator is trusted for both the curated record's collection and provenance, appear.

Properties

curated

requiredref
Reference

labels

array

Trusted labels on the curated record now (unnegated, from a `src` whose declaration an admin writer (the commons root, or an operator the root names) vouches for with that value in `labels`). Shown only: labels hide nothing (a `spam` or `obscene` verdict does).

itemsref
Reference

members

requiredarray

The provenance's `sources` that are still visible. A deleted member, or one whose account is not active, is left out.

itemsref
Reference

provenance

requiredref
Reference

readiness

requiredstring

Copied from the provenance.

  • knownValues: complete | partial | superseded

rollup

requiredref
Reference

supersededBy

string · at-uri

When `readiness` is `superseded`: the survivor, the other side of the curator's own trusted sameAs naming this curated record. It is set only when that record is visible, in the curator's repo, and of a collection the curator is endorsed for; ties go to the latest sameAs `createdAt`, then its AT-URI. Single hop: the survivor may itself be superseded (follow it with getCluster), and a curator that merged both ways can make two records name each other.

#countGroup

object

Properties

count

requiredinteger

handle

string · handle

groupBy author only: the author's current handle (#identity), when one was announced. For display only.

key

requiredstring

latestAt

string · datetime

When the newest record in this group was first indexed (an edit or a delete never moves it). Absent when unknown.

#criterion

object

One eligibility criterion, as the rules runner declares it.

Properties

anyOf

array

For `anyOf`.

itemsref
Reference

field

string

For `has`.

is

requiredstring

`has`: the field named in `field` is present and not blank. `notEnded`: the event's end (or start + 3 h) is in the future, or it has no schedule. `noRecordLocation`: no location is a place record. `noPoint`: the record states no coordinates of its own. `located`: some location is stated (place record, address, coordinates or cell). `mode`: the event's attendance mode is `mode`. `anyOf`: at least one criterion in `anyOf` holds. `notArea`: the place is not an area (`kind` is not `area`).

  • knownValues: has | notEnded | noRecordLocation | noPoint | located | mode | anyOf | notArea

mode

string

For `mode`.

  • knownValues: virtual | hybrid | inperson

#indexedPart

object

What indexRecord did with one record the chain answer named.

Properties

cid

requiredstring · cid

The CID the chain answer named.

outcome

requiredstring

`indexed`: stored from the author's PDS. `unchanged`: the commons already held it. `stale`: the index holds a newer version. `mismatch`: the author's PDS holds a different CID now (the firehose brings the current one). `missing`: the author's PDS does not hold it. `refused`: the shared check refused it.

  • knownValues: indexed | unchanged | stale | mismatch | missing | refused

uri

requiredstring · at-uri

#labelView

object

A com.atproto.label.defs#label as the commons ingested it, with its trust verdict now.

Properties

cid

string · cid

cts

requiredstring · datetime

neg

requiredboolean

src

requiredstring · did

trusted

requiredboolean

An admin writer (the commons root, or an operator the root names) vouches for `src`'s declaration with this value in `labels` now.

uri

requiredstring · uri

val

requiredstring
  • maxLength: 128

#latencyView

object

Milliseconds over the window. A percentile backed by fewer than five samples is withheld (absent), so no figure is one record's timing.

Properties

count

requiredinteger

maxMs

integer

p50Ms

integer

p95Ms

integer

#metricsView

object

The rules runner's public latency summary (its /v1/metrics). `submitToCurated` is submit to visible for a record whose listing does not wait on moderation; `submitToLabelled` is submit to visible when it does.

Properties

Synchronous chain requests (POST /v1/chain), end to end.

Reference

Chain requests in the window that answered pending.

Holds of the cluster lock within the last hour.

How long each hold of the cluster lock waited for it first.

Reference

Curator jobs still waiting for their record's cluster an hour after that version was stored: a wait no cluster refresh ends (e.g. a component past the size cap).

The latest daily list of places that may be duplicates. Absent before the first one.

The paid provider's daily budgets. Absent when the runner has no paid provider configured.

itemsref

rules

array
itemsref
Reference

windowHours

requiredinteger

#nearDuplicatePair

object

Properties

a

requiredref

b

requiredref

distanceM

requiredinteger

Metres between the closest members of the two.

#nearDuplicatePlace

object

Properties

name

requiredstring

The name of the member that matched.

uri

requiredstring · at-uri

The curated place record.

#nearDuplicatePlacesView

object

Pairs of live curated places within 50 m whose names contain one another (whole words, case and punctuation folded) and that no rule has joined or judged (no distinctFrom, no containedIn between them), computed at most once a day.

Properties

computedAt

requiredstring · datetime

pairs

requiredinteger

How many pairs of curated places.

top

requiredarray

The closest pairs first.

  • maxLength: 50
itemsref
Reference

#providerBudgetView

object

One daily provider budget on the rules runner: its cap (the runaway-loop guard), today's spend (UTC), and the grants that extend it.

Properties

budget

requiredstring
  • knownValues: shared | own | research | summary

cap

requiredinteger

Calls a UTC day may spend without a grant.

grantRemaining

requiredinteger

Calls left in this budget's live grants.

grants

requiredarray

Live grants, and grants that ended in the last 7 days.

itemsref
Reference

spentToday

requiredinteger

Calls reserved today, within the cap and from grants.

#providerGrantView

object

One recorded allowance of paid provider (Jev or Claude) calls beyond the daily cap, granted by an operator for an intentional batch (a backfill). It adds calls only while it is live: before `expiresAt` and with calls left.

Properties

budget

requiredstring

Which daily budget it extends: `shared` (every caller's Jev runs, FEATURES_DAILY_CALL_CAP), `own` (Beacon's own writes, FEATURES_OWN_DAILY_CALL_CAP), `research` (Claude venue research, RESEARCH_DAILY_CALL_CAP) or `summary` (Claude's short line, SUMMARY_DAILY_CALL_CAP).

  • knownValues: shared | own | research | summary

calls

requiredinteger

Calls granted.

createdAt

requiredstring · datetime

expiresAt

requiredstring · datetime

grantedBy

requiredstring

Who granted it: the operator's DID, or `operator-token` for the shared token.

id

requiredinteger

live

requiredboolean

Not expired and not used up: it adds calls now.

reason

requiredstring

used

requiredinteger

Calls spent from it so far.

#recordProof

object

A record's proof from its author's repo, as the commons fetched (com.atproto.sync.getRecord) and verified it when it indexed the record: the CAR holds the repo's signed commit, the MST path to the record's key and the record block. Check it yourself against the #atproto key in the author's DID document (the lexicons repo's techne-lexicon-check, feature `proof`: `proof::verify_record`). Served only when it proves the CID served.

Properties

car

requiredbytes

The CAR file, as the author's PDS answered com.atproto.sync.getRecord.

  • maxLength: 4194304

commit

requiredstring · cid

The signed commit's CID (the CAR's root).

rev

requiredstring

The signed commit's revision: a TID (techne-lexicon-check's verifier refuses a commit whose rev is not one).

#recordView

object

One indexed public record. A record is never returned when its author deleted it, its author's account is not active, a `!takedown` verdict is on it from a verdict writer vouched for `!takedown` (an operator writes one as themselves, in their own repo), a `spam` or `obscene` verdict is on this version from a verdict writer vouched for that value, or it is a curated record every source of which is hidden. Labels hide nothing. A recordView carries no provenance and no trust verdict (see #sidecarView for those). `indexedAt` is when this AppView indexed the record: it is local to this AppView, not a portable order.

Properties

author

requiredstring · did

The repo the record lives in.

authorHandle

string · handle

The author's current handle, as the network last announced it (#identity); absent when none was announced. For display only: the author is its DID.

cid

requiredstring · cid

collection

requiredstring · nsid

indexedAt

requiredstring · datetime

rkey

requiredstring · record-key

uri

requiredstring · at-uri

value

requiredunknown

The record body.

#rejectionView

object

Properties

author

requiredstring · did

cid

string · cid

collection

requiredstring · nsid

reason

requiredstring

seenAt

requiredstring · datetime

uri

requiredstring · at-uri

#releaseComponent

object

Properties

commit

requiredstring

A hex commit id.

  • minLength: 7
  • maxLength: 40

digest

string

`sha256:` and 64 hex digits: the digest of the tested build. Required when `service` or `image` is given, so the deploy pulls exactly that build without rebuilding.

  • maxLength: 100

image

string
  • maxLength: 500

repo

requiredstring

e.g. regenos, almanac-mirror, aei.

  • minLength: 1
  • maxLength: 200

service

string
  • maxLength: 100

#releaseView

object

Properties

by

requiredstring

Which operator recorded it: its DID, or `operator-token` for the shared token.

components

requiredarray
itemsref
Reference

createdAt

requiredstring · datetime

id

requiredinteger

name

requiredstring

note

string

#rollupView

object

Whether a curated record is fully processed, rolled up when you read: its provenance (the merge receipt) says `complete`, and every rule at stage `curated` that an admin writer (the commons root, or an operator the root names) vouches for has a trusted pub.techne.draft.receipt for the curated record's current CID.

Properties

complete

requiredboolean

merge

requiredstring

The provenance's readiness.

  • knownValues: complete | partial | superseded

postMerge

requiredarray

The vouched rules at stage `curated` and their receipts (the field keeps its old name).

itemsref
Reference

#ruleLatency

object

Properties

Reference
Reference

rule

requiredstring

The rule's name.

run

requiredref

Claims that got to the rule's run (real, failed or lost), not those put off or finished without a run.

Reference

#ruleOutcomes

object

What the rule's claims in the window came to, by count. `real`: the rule ran; `deferred`: put off without getting anywhere (waiting on an input, or the rule asked to run later having written nothing); `ineligible`: finished without a run; `failed`: the run failed; `lost`: the claim went stale; `unclassified`: recorded before these classes.

Properties

deferred

requiredinteger

failed

requiredinteger

ineligible

requiredinteger

lost

requiredinteger

real

requiredinteger

unclassified

requiredinteger

#rulePhases

object

Where the time of the rule's real runs went: its own run, then the keying its finish did; `lockWait` is the part of the keying spent waiting for the cluster lock.

Properties

keying

requiredref
Reference

lockWait

requiredref
Reference

run

requiredref
Reference

#ruleReceiptView

object

One vouched rule at stage `curated` and its receipt for the curated record, if any.

Properties

current

requiredboolean

The receipt names the curated record's current CID.

Not filled: the commons reads no #atproto_label key from DID documents now (atproto labels are an export only), so no receipt depends on one.

name

string

From the rule's vouched publisher declaration (its `name`).

outputs

array
itemsstring · at-uri

receipt

string · at-uri

The rule's latest trusted receipt for this curated record, at any CID. getRecord on it answers the receipt with its proof (#recordProof).

rule

requiredstring · did

#ruleView

object

A rule: what its host declares and whether an admin writer (the commons root, or an operator the root names) vouches for its declaration now.

Properties

codeRepo

string

commit

string

Which of these the host's live declaration says otherwise than the vouched publisher declaration (lists compared as sets). Only when both exist; absent when they agree. An operator endorses again to bring them together.

itemsstring
  • knownValues: reads | writes | stage | matches | labels

What the rule does, in one or two plain sentences, from its host's declaration, else its publisher declaration.

did

requiredstring · did

endorsed

requiredboolean

The commit the vouched declaration names; differs from `commit` when the host runs newer code than the admin writer vouched for.

endorsement

string · at-uri

handle

string

The rule DID's current handle, as the network last announced it (#identity); else as its host reports it. For display; never used to identify the rule.

host

requiredstring
  • knownValues: runner | apicoop | endorsed-only

labels

array

The label values the rule may emit, as its host declares them; its publisher declaration lists them, and a reader honours a label only if the src's vouched declaration lists that value.

itemsstring

matches

array

The record collections the rule's sameAs and distinctFrom pairs may join. Absent for a rule that writes neither.

itemsstring

name

requiredstring

paused

boolean

The host has paused the rule (no new jobs).

reads

requiredarray

Generated from the rule's code: its triggers and what its needs read.

itemsstring

stage

string
  • knownValues: source | curated

title

string

What a person reading the pipeline calls the rule, from its host's declaration, else its publisher declaration. Absent: show `name`.

trigger

string

When the rule runs, in words, for a rule no record criteria describe. For the commons' adjudicator and takedowns rules this is `never`: operators write pair decisions and takedowns themselves.

The collections whose records queue a job for the rule, as its host declares them. Absent for an account known only from its publisher declaration, or one no record triggers.

itemsstring

version

string

when

array

The rule's eligibility as its host declares it. Empty or absent: always eligible.

itemsref
Reference

writes

requiredarray
itemsstring

#scraperAlert

object

Properties

floor

requiredboolean

true: the value is below a `min…` floor; false: above a ceiling.

measure

requiredstring
  • knownValues: records | missingLocation | missingStartsAt

source

requiredstring

The source id (or the scraper's name, for a scraper with one account).

threshold

requiredstring

The bound it broke, as a decimal string.

value

requiredstring

The measure's value, as a decimal string.

#scraperRunView

object

Properties

alerts

array

The thresholds the run's measures broke (the scraper type's default, then config.alerts, then config.alerts.sources.<id>). Empty when none.

itemsref
Reference

codeRef

requiredstring

The code reference the run was claimed with.

codeSha

string

The commit or image digest the runner reports it actually ran.

errors

integer

finishedAt

string · datetime

id

requiredinteger

log

string

The end of the run's output, at most 8000 characters.

measures

unknown

An ok run's measures per source it ran: `{source id: {records, missingLocation, missingStartsAt}}`. `records` is the events the run saw (their source sidecars say seen on the run's day); the others are shares of them, null when it saw none.

missing

integer

Known items it did not see this time.

published

integer

Records it wrote.

The operator whose runScraper started it; absent for a scheduled run.

runner

string

Which runner claimed it.

saw

integer

Source items the scraper saw.

scraper

requiredstring

startedAt

requiredstring · datetime

status

requiredstring

`running` until the runner reports; `lost` once a claim finds it has not reported within the commons' 12 h lease.

  • knownValues: running | ok | failed | lost

#scraperView

object

Properties

account

requiredstring · did

The source account it publishes as.

cadenceSecs

requiredinteger

codeRef

requiredstring

The pinned code: a git commit SHA of the scrapers repository, or a container image pinned by digest (`<registry>/<name>@sha256:<64 hex>`) under a registry the commons allows.

config

requiredunknown

The JSON object handed to the scraper.

createdAt

requiredstring · datetime

enabled

requiredboolean

name

requiredstring

nextRunAt

string · datetime

When it is due: while a runScraper request waits, its time (enabled or not); otherwise, while enabled, the start of its last run that was not lost plus its cadence, or now when none was. A lost run does not push it out: the runner does not wait for one either. Absent while it is disabled with no run asked for.

runRequestedAt

string · datetime

An operator asked for a run now (runScraper) that is not claimed yet.

The operator who asked (runScraper): its DID, or `operator-token` for the shared token.

updatedAt

requiredstring · datetime

updatedBy

requiredstring

Which operator last registered or changed it: its DID, or `operator-token` for the shared token.

#serviceHealth

object

Properties

detail

string

Why it is not healthy, in a few words. For an anonymous caller only the reported status or HTTP code, never a connection error.

httpStatus

integer

latencyMs

requiredinteger

name

requiredstring

service

string

The service name its /health reports.

sha

string

The commit it reports running.

state

requiredstring
  • knownValues: healthy | failing | unreachable

url

string · uri

The /health URL read. Operator only.

#sidecarView

object

A record about another record (a rule's assertion, a profile, a provenance), with the commons' trust verdict. A sidecar is trusted only while its author's own pub.techne.draft.publisher declaration (rkey `self`) lists the sidecar's collection in `writes` and an admin writer vouches for that declaration: a pub.techne.draft.credential in the repo of the commons root, or of an operator the root names, pinned to the declaration's current CID, with no pub.techne.draft.credentialRevocation at the address it names or at the same rkey in the root's repo. An edited declaration is untrusted until an admin writer re-issues. The verdict is computed when you read, so revoking the credential untrusts every sidecar that account published, past ones included.

Properties

author

requiredstring · did

authorHandle

string · handle

The author's current handle, as the network last announced it (#identity); absent when none was announced. For display only: the author is its DID.

cid

requiredstring · cid

collection

requiredstring · nsid

endorsement

string · at-uri

The vouched declaration (the author's publisher/self) that makes it trusted. Present exactly when `trusted` is true.

indexedAt

requiredstring · datetime

rkey

requiredstring · record-key

trusted

requiredboolean

uri

requiredstring · at-uri

value

requiredunknown

#statusView

object

Properties

Why the accounts could not be signed in to. The text only for an operator; anonymous callers see `unavailable`.

adjudicator

string · did

The commons' adjudicator account. It writes no new pair decisions (operators write them in their own repos); the ones it wrote before stay trusted while an admin writer vouches for it.

apicoop

string · did

The commons' own account.

commonsRoot

string · did

The commons root: its credentials, and those of the operators it names, decide trust.

labels

requiredobject

operatorActions

requiredboolean

An operator credential is configured.

As getMetrics: caps, today's spend and grants. Absent without a runner or a paid provider.

itemsref

rejections

requiredinteger

runner

requiredboolean

A rules runner is configured.

Each staging service the commons is configured to watch (HEALTH_URLS), read from its /health when this was asked.

itemsref
Reference

sha

requiredstring

stewards

string · did

The stewards collective: its open pub.techne.draft.membership records (subject = a steward's DID) are the steward list, public; Beacon's Featured is the stewards' public event listings. Only commons operators change it (setSteward). A steward here is a role-10 (member) membership of the "Stewards" collective, not the role-40 "steward" of membership.json's role registry. Absent when the commons pins none (STEWARDS_DID).

takedowns

requiredinteger

#takedownView

object

Properties

by

requiredstring

The verdict's author: the DID that wrote the `!takedown` verdict in its own repo (an operator; or the Commons API's own account, for takedowns it wrote before operators wrote them as themselves).

createdAt

requiredstring · datetime

reason

requiredstring

uri

requiredstring · at-uri

#visibilityView

object

Submit to visible as the commons measures it: for each curated record that became listable in the commons in the window (a trusted provenance over a visible curated record, as listClusters lists it), from the latest `createdAt` among its source records to when the commons indexed what made it listable (its provenance, its curated record, or the credential that trusted it), the first time only. The PDS to Jetstream delay, the rules and the curator, and the commons' indexing are all inside it. A record whose submit predates the window (a backfill) is counted in `older`, one whose `createdAt` is after it became listable (a skewed or forged clock) in `future`; neither is in the latency.

Properties

future

requiredinteger
  • minimum: 0

older

requiredinteger
  • minimum: 0

submitToVisible

requiredref
Reference

windowHours

requiredinteger

#whenCollection

object

A rule's eligibility for one collection pattern it reads: a record is queued only when every criterion holds. A collection with no entry is always eligible.

Properties

all

requiredarray
itemsref
Reference

collection

requiredstring

An NSID or a `prefix.*` pattern.

outputs

array

Per output collection: what must also hold for the rule to write it.

itemsref
Reference

#whenOutput

object

Properties

all

requiredarray
itemsref
Reference

output

requiredstring

The collection the rule writes.