source: Klonkt/src/services/guardianship/index.js@ af5b79b

main
Last change on this file since af5b79b was af5b79b, checked in by Robin <roboburr@…>, 7 weeks ago

FEP-633c §2.2: shaer:hasGuardians (outbound stempelen, inbound registreren)

Objecten van een ward krijgen nu de advies-hint shaer:hasGuardians, zodat een
remote server interacties met de post naar de guardians kan routen zonder eerst
de actor op te halen. Veilig te negeren door wie geen shaer spreekt.

Outbound: elke Note die een ward publiceert wordt gestempeld (alle drie de
buildNote-paden: gewone post, paid-teaser, reply/direct), dus ook via buildCreate
in de outbox. Inbound: de hint wordt alleen GEREGISTREERD op het opgeslagen object
(ap_timeline.has_guardians / ap_mentions.has_guardians), nog geen actie. Wordt
later bekendgemaakt bij reddings-boei / escalatie-routing (Robins besluit).

Changed files:
src/services/guardianship/notes.js

  • hasGuardiansProps(slug) (stempel als de site guardians heeft) + objectHasGuardians(o)

src/services/guardianship/index.js

  • beide geexporteerd

src/services/ActivityPubService.js

  • buildNote stempelt in alle drie de return-paden; inbound zet has_guardians op timeline + mention

src/config/database.js

  • ap_timeline.has_guardians + ap_mentions.has_guardians

test/has-guardians.test.js

  • ward stempelt wel, free niet; objectHasGuardians leest de hint

remarks: npm test 170/170. Alleen ward-objecten dragen de hint; niks acteert er nog
op (register-only). Daemon heeft de constante al (dead_code); wiren kan later.

-robo
Co-Authored-By: Claude Opus 4.8 <noreply@…>

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/**
2 * Guardianship (FEP-633c "Guardians") — the module.
3 *
4 * Klonkt's kid-safety feature as one cohesive unit:
5 * - context.js: the shaer JSON-LD namespace + Relationship vocabulary
6 * - offers.js: the multi-party handshake state (a port of the Shaer daemon)
7 * - relations.js: the COMMITTED ward ↔ guardian relations + actor props
8 * - handshake.js: the adoption Offer/Accept/Reject over C2S and S2S
9 * - queues.js: the owner-only dashboard collections (offers/follows/wards)
10 * - notes.js: the shaer:helpRequest flag on direct notes
11 * - delivery.js: the direct-note leg a ward's call-for-help rides
12 *
13 * The shared blocklist (Shaer's "in Orbit") lives NEXT TO this module in
14 * BlocklistService. ActivityPubService wires the AP helpers in once and
15 * delegates; nothing here imports ActivityPubService back.
16 */
17export { SHAER_CONTEXT, GUARDIAN_RELATIONSHIP, GUARDIAN_RELATIONSHIP_COMPACT, isGuardianRelationship } from './context.js';
18export { helpRequestProps, isHelpRequest, waveProps, isWave, hasGuardiansProps, objectHasGuardians } from './notes.js';
19export { wireDelivery, c2sVisibility, deliverDirectNote } from './delivery.js';
20export { wireHandshake, handleOutbox as handleGuardianshipOutbox, handleInbox as handleGuardianshipInbox, parseRelationship } from './handshake.js';
21export { offersCollection, followsCollection, wardsCollection } from './queues.js';
22export * as follows from './follows.js';
23export { listForParty as listOffersForParty, getOffer, findOfferAnywhere } from './offers.js';
24export {
25 listGuardians, listWards, isGuardian, getRelation, removeRelation,
26 actorProps as guardianshipActorProps,
27} from './relations.js';
Note: See TracBrowser for help on using the repository browser.