openvibers/openvibe.network Commits

Network: Rent may run rent.* workflows on OpenVibe.AI (#212)

OP OpenVibers committed 29 days ago · 094f699844 · 1 file, +3 −0

Rent's AI pillar (the plan's Rent composition: Sources + Search + Watch + AI): Rent screens each posted listing with OpenVibe.AI's `rent.screen_listing` (AI#87) for its staff, with its own service token.

This grants `rent` `ai.run.create` and `ai.run.read` on `openvibe.ai` for namespace `rent.*` only, as Food has for `food.*`. The principals tests pass.

Changes

ddiff --git a/server/identity/principals.js b/server/identity/principals.js
iindex e048af99..df35bedd 100644
---- a/server/identity/principals.js
++++ b/server/identity/principals.js
@@@ -255,6 +255,9 @@ const DEFAULT_GRANTS = [
// Food's recipes pillar: food.suggest_recipes on OpenVibe.AI for the signed-in person (AI#57).
['food', 'ai.run.create', 'openvibe.ai', ['food.*']],
['food', 'ai.run.read', 'openvibe.ai', ['food.*']],
++ // Rent's AI pillar: rent.screen_listing screens each posted listing for scam signs for Rent's staff (AI#87).
++ ['rent', 'ai.run.create', 'openvibe.ai', ['rent.*']],
++ ['rent', 'ai.run.read', 'openvibe.ai', ['rent.*']],
// Plan T13: OpenVibe.Services merges every authority's resource index (ADR-048 section 3): it reads each one's
// GET /api/v1/resources under that authority's <id>.resource.read, with a token for that authority's audience.
['services', 'network.resource.read', SELF_AUDIENCE, []],