Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit61a33237e0

README.md

community

The person's community setting and the community notices it decides. Community work is what an agent does for the people whose content it uses and for those who use its person's content: rate what it used, report a defect it found in another author's content, send a fix it made there upstream, answer comments and issues on its person's content, and review contributions sent to it.

The setting is a level (LEVELS: off, rate, report, contribute, full), each granting the kinds of work of the ones before it and its own. It is kept for the person in their home folder (<home>/settings/community.json), so it goes with them from world to world; DEFAULT_LEVEL holds until they set one.

A community notice the level grants says so and is posted for the agent to act on in its turn, waking an idle agent at most WAKES_PER_SESSION times in one engine session. One the level does not grant says that too and is background the agent reads with its next turn. The same notice posted again while it stands reaches the agent once and spends at most one wake. Each decision is logged.

Exports

  • community.setting(store?) — the level and where it is kept.
  • community.setLevel(level, store?) — set the level.
  • community.grants(kind, level?) — whether the level grants one kind of work (KINDS).
  • community.wakes() — the wakes spent this session and the most allowed.
  • community.decide(kind, sentence, params?, level, wakesUsed) — how a notice would be posted, without posting it.
  • community.post(kind, sentence, params?, opts?) — post a community notice.
  • community.withdraw(sentence, replacing?, session?) — withdraw a notice.