Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 118 additions & 21 deletions services/ontology/schemas/calendarEvent.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,52 @@
"type": "string",
"description": "Event title"
},
"id": { "type": "string", "description": "Application-level event identifier" },
"userEName": { "type": "string", "description": "eName of the user whose calendar contains the event" },
"provider": { "type": "string", "enum": ["google", "manual"] },
"externalEventId": { "type": "string" },
"calendarId": { "type": "string" },
"canonicalOwnerEName": { "type": "string" },
"description": { "type": "string" },
"location": { "type": "string" },
"id": {
"type": "string",
"description": "Application-level event identifier"
},
"userEName": {
"type": "string",
"description": "eName of the user whose calendar contains the event"
},
"provider": {
"type": "string",
"enum": [
"google",
"manual"
]
},
"externalEventId": {
"type": "string"
},
"calendarId": {
"type": "string"
},
"canonicalOwnerEName": {
"type": "string"
},
"description": {
"type": "string"
},
"location": {
"type": "string"
},
"color": {
"type": "string",
"description": "Event color (hex or named)"
},
"textColor": { "type": "string" },
"providerColorId": { "type": ["string", "null"] },
"canEdit": { "type": "boolean" },
"textColor": {
"type": "string"
},
"providerColorId": {
"type": [
"string",
"null"
]
},
"canEdit": {
"type": "boolean"
},
"start": {
"type": "string",
"format": "date-time",
Expand All @@ -33,16 +64,82 @@
"format": "date-time",
"description": "Event end time (ISO 8601)"
},
"isAllDay": { "type": "boolean" },
"status": { "type": "string", "enum": ["confirmed", "tentative", "cancelled"] },
"attendees": { "type": "array", "items": { "type": "string" } },
"isTransparent": { "type": "boolean" },
"htmlLink": { "type": "string", "format": "uri" },
"sourceUpdatedAt": { "type": "string", "format": "date-time" },
"effectiveAcl": { "type": "array", "items": { "type": "string" } },
"createdAt": { "type": "string", "format": "date-time" },
"updatedAt": { "type": "string", "format": "date-time" }
"isAllDay": {
"type": "boolean"
},
"status": {
"type": "string",
"enum": [
"confirmed",
"tentative",
"cancelled"
]
},
"attendees": {
"type": "array",
"items": {
"type": "string"
}
},
"isTransparent": {
"type": "boolean"
},
"htmlLink": {
"type": "string",
"format": "uri"
},
"sourceUpdatedAt": {
"type": "string",
"format": "date-time"
},
"effectiveAcl": {
"type": "array",
"items": {
"type": "string"
}
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"responseOptions": {
"type": "array",
"description": "Optional RSVP-style choices a reader can respond with. A tap is recorded as a Relation (predicate 'respond', object = this event's uri, value = chosen). Poll/Vote model options natively and do not use this.",
"items": {
"type": "object",
"required": [
"id",
"label"
],
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"value": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"choice"
],
"default": "choice"
}
}
}
}
},
"required": ["title", "start", "end"],
"required": [
"title",
"start",
"end"
],
"additionalProperties": false
}
58 changes: 58 additions & 0 deletions services/ontology/schemas/communityActivity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "c0117a17-1b2c-4d3e-8f4a-5b6c7d8e9f01",
"title": "CommunityActivity",
"type": "object",
"description": "A generic, domain-level 'a platform posted something to a community that members see and may respond to'. NOT a presentation container: activityType follows W3C ActivityStreams and carries the meaning; the renderer decides the look. Prefer a more specific ontology when one fits (CalendarEvent, Poll). CommunityActivity is the general case AND the fallback a renderer uses for any envelope it doesn't specifically know but that carries summary + responseOptions. Responses are recorded as separate Relation envelopes (predicate 'respond'), authored by the responder.",
"properties": {
"id": { "type": "string" },
"chatId": { "type": "string", "description": "The chat this activity surfaces in" },
"activityType": {
"type": "string",
"enum": ["announce", "question", "offer", "invite", "acknowledge"],
"description": "W3C ActivityStreams verb — the semantics of the activity"
Comment on lines +10 to +13

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

sed -n '1,120p' services/ontology/schemas/communityActivity.json

Repository: MetaState-Prototype-Project/prototype

Length of output: 3342


🌐 Web query:

W3C ActivityStreams activity type vocabulary Announce Question Offer Invite Acknowledge

💡 Result:

In the W3C ActivityStreams 2.0 vocabulary, the types Announce, Question, Offer, Invite, and Acknowledge are handled as follows: Announce: This is a defined Activity type [1][2]. It indicates that the actor is calling attention to the object [1]. It inherits all properties from the base Activity type [1][3]. Question: This is a defined Activity type [1][2]. It represents a question being asked [3]. It inherits all properties from the base Activity type [1][4]. Offer: This is a defined Activity type [1][2]. It indicates that the actor is offering the object [1]. If specified, the target indicates the entity to which the object is being offered [1]. It inherits all properties from the base Activity type [1]. Invite: This is a defined Activity type [1][2]. It is a specialization of the Offer activity type [1][3]. It indicates that the actor is extending an invitation for the object to the target [1]. It inherits all properties from the Offer activity type [1]. Acknowledge: This activity type is not part of the W3C ActivityStreams 2.0 vocabulary [1][5][6]. All Activity types in the W3C ActivityStreams 2.0 vocabulary inherit from the base Activity type, which itself is derived from the Object type [1][7]. Specific specializations exist, such as Invite being a form of Offer [1][2].

Citations:


Use canonical ActivityStreams activity names.
activityType claims W3C ActivityStreams semantics, but the enum uses project-local lowercase slugs and includes acknowledge, which is not a W3C ActivityStreams activity type. If this field is meant to interoperate, use the standard terms (Announce, Question, Offer, Invite) and drop acknowledge, or rename the field to make the mapping explicit.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@services/ontology/schemas/communityActivity.json` around lines 10 - 13,
Update the activityType enum in the community activity schema to use canonical
ActivityStreams names with standard capitalization: Announce, Question, Offer,
and Invite. Remove acknowledge, and preserve the existing field and description
unless the implementation instead explicitly renames the field to indicate a
project-local mapping.

},
"summary": { "type": "string", "description": "Human-visible headline (domain field, not 'title')" },
"description": { "type": "string" },
"relatedSubject": {
"type": "object",
"description": "Optional pointer to the domain object this activity is about",
"properties": {
"id": { "type": "string" },
"ontologyId": { "type": "string" },
"canonicalOwnerEName": { "type": "string" },
"canonicalEnvelopeId": { "type": ["string", "null"] },
"type": { "type": "string" }
},
"required": ["id"]
},
"responseOptions": {
"type": "array",
"description": "Optional choices the reader can respond with. A tap is recorded as a Relation (predicate 'respond', object = this envelope's uri, value = the chosen option value/id). Single mutually-exclusive choice only. Poll/Vote do NOT use this — they model options natively.",
"items": {
"type": "object",
"properties": {
"id": { "type": "string", "description": "Stable id; group responses by this (or value) for a tally" },
"label": { "type": "string", "description": "Human-visible button text" },
"value": { "type": "string", "description": "Semantic value recorded in the response (defaults to id)" },
"kind": { "type": "string", "enum": ["choice"], "default": "choice" }
},
"required": ["id", "label"]
}
},
"display": {
"type": "object",
"description": "Presentation HINTS only — renderers MAY ignore. Keeps UI out of the domain fields",
"properties": {
"pinned": { "type": "boolean" },
"removable": { "type": "boolean" },
"category": { "type": "string" }
}
},
"authorEName": { "type": "string", "description": "eName of the producing platform/app" },
"createdAt": { "type": "string", "format": "date-time" },
"isArchived": { "type": "boolean", "default": false }
},
"required": ["id", "chatId", "activityType", "summary", "createdAt"],
"additionalProperties": true
}
Loading