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
96 changes: 96 additions & 0 deletions services/ontology/schemas/storyListen.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "06025631-8e24-4d74-94d5-c7e99bc9f263",
"title": "StoryListen",
"domain": "travel",
"type": "object",
"description": "One playback of a story by a person. Lives on the listener's vault. Carries no copies of story fields (title, language live in the story itself) and no inline context (the context lives in the referenced StoryRequest). Exactly one of storyRef / tmaticStoryId identifies the story: storyRef for stories that exist as TravelStory envelopes, tmaticStoryId for stories from the tmatic.travel library, which is not yet on W3DS",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier of this listen event"
},
"listenerEName": {
"type": "string",
"description": "@-prefixed eName of the listener"
},
"storyRef": {
"type": "string",
"description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version played, for FWM-created stories"
},
"tmaticStoryId": {
"type": "string",
"format": "uuid",
"description": "tmatic.travel story UUID, for stories played from the tmatic library"
},
"tmaticLanguage": {
"type": "string",
"description": "BCP-47 tag of the tmatic language version played; only with tmaticStoryId (a tmatic story UUID covers all its language versions, so the pair identifies what was actually heard)"
},
"requestRef": {
"type": "string",
"description": "w3ds://envelope reference to the StoryRequest this playback answered"
},
"startedAt": {
"type": "string",
"format": "date-time",
"description": "Playback start, ISO 8601"
},
"completionRate": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Fraction of the audio actually listened to"
},
"rating": {
"type": "integer",
"minimum": 1,
"maximum": 5,
"description": "Listener's rating of this story, if given"
},
"feedbackText": {
"type": "string",
"description": "Free-form listener feedback, if given"
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Record creation timestamp, ISO 8601"
}
},
"required": [
"id",
"listenerEName",
"startedAt",
"createdAt"
],
"additionalProperties": false,
"oneOf": [
{
"required": [
"storyRef"
],
"not": {
"required": [
"tmaticStoryId"
]
}
},
{
"required": [
"tmaticStoryId"
],
"not": {
"required": [
"storyRef"
]
}
}
],
"dependencies": {
"tmaticLanguage": [
"tmaticStoryId"
]
}
}
33 changes: 33 additions & 0 deletions services/ontology/schemas/storyProvenance.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "52662185-59c1-44e5-8519-685796c70a96",
"title": "StoryProvenance",
"domain": "travel",
"type": "object",
"description": "How one TravelStory version came to be: who it was made for, where it was requested, which models produced it, and what it was translated or derived from. Lives next to the story on the content owner's vault. Language versions of one story are reconstructed through provenance: each translation's provenance points at the original version via originalStoryRef. Fields here record the immutable creation event; mutable facts stay in their own ontologies and are referenced",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this provenance record" },
"storyRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version this record describes" },
"requestedForEName": { "type": "string", "description": "@-prefixed eName of the person the story was originally created for" },
"requestRef": { "type": "string", "description": "w3ds://envelope reference to the StoryRequest that triggered creation (lives on the requester's vault)" },
"requestLocation": {
"type": "object",
"description": "Where the requester was at creation time, WGS84. An immutable event fact recorded at creation",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"textModel": { "type": "string", "description": "Model that wrote the text, e.g. 'claude-fable-5'" },
"voiceModel": { "type": "string", "description": "TTS model and voice, e.g. 'eleven_v3/<voiceId>'" },
"promptVersion": { "type": "string", "description": "Version tag of the prompt template used" },
"sourceTmaticStoryId": { "type": "string", "format": "uuid", "description": "tmatic.travel story UUID this version was translated or derived from, when the source is the tmatic library" },
"originalStoryRef": { "type": "string", "description": "w3ds://envelope reference to the TravelStory version this one was translated from, when the source is another FWM story version" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records used to identify the subject (e.g. vision reading of the user's photo)" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" }
},
"required": ["id", "storyRef", "createdAt"],
"additionalProperties": false
}
30 changes: 30 additions & 0 deletions services/ontology/schemas/storyRequest.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "d40d3da4-0999-444a-b23a-9f964a96c964",
"title": "StoryRequest",
"domain": "travel",
"type": "object",
"description": "The context of one story request: a person pressed geo/camera/microphone (or accepted a suggestion) at a place and moment. Lives on the requester's vault. Referenced by StoryListen (what context a story was played in) and by StoryProvenance (what context a story was created in) — the context is written once here, never copied. Machine readings of the request's inputs (photo vision, voice transcript) are FileExtraction records, referenced via extractionRefs",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this request" },
"requesterEName": { "type": "string", "description": "@-prefixed eName of the person who made the request" },
"entryMode": { "type": "string", "enum": ["geo", "camera", "voice", "suggestion"], "description": "How the request was initiated: geo button, camera shot, voice query, or an accepted in-app suggestion" },
"location": {
"type": "object",
"description": "Where the requester was, WGS84",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Detected movement mode at request time" },
"queryText": { "type": "string", "description": "The voice query as text, when entryMode=voice and no FileExtraction transcript record was kept; when one was, reference it via extractionRefs instead of copying" },
"photoFileRef": { "type": "string", "description": "w3ds://file URI of the photo taken, when entryMode=camera" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records made from this request's inputs (vision reading of the photo, transcript of the voice query)" },
"requestedAt": { "type": "string", "format": "date-time", "description": "Request timestamp, ISO 8601" }
},
"required": ["id", "requesterEName", "entryMode", "requestedAt"],
"additionalProperties": false
}
53 changes: 53 additions & 0 deletions services/ontology/schemas/travelStory.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "ba56d2d3-e6bf-4bfd-ac75-6436c56be76f",
"title": "TravelStory",
"domain": "travel",
"type": "object",
"description": "One language version of a location-bound story for travellers. Each language version is its own envelope; versions of the same story are linked through their StoryProvenance records, never by copying fields. Everything about HOW the story came to be (who requested it, where, which models wrote and voiced it, what it was translated from) lives in the referenced StoryProvenance envelope, not here.",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this story version" },
"title": { "type": "string", "description": "Story title in the story language" },
"text": { "type": "string", "description": "Full story text (plain text, no HTML)" },
"language": { "type": "string", "description": "BCP-47 language tag of this version, e.g. 'ru', 'en', 'nl'" },
"subjectName": { "type": "string", "description": "Name of the object/place the story is about, e.g. 'Sint-Janskerk, Maastricht'. Interim field: once landmark entities get their own w3ids, the story-to-object link moves to a dedicated M:N relation and this stays only as a display hint" },
"location": {
"type": "object",
"description": "Anchor point of the story subject, WGS84",
"properties": {
"lat": { "type": "number", "minimum": -90, "maximum": 90, "description": "Latitude" },
"lon": { "type": "number", "minimum": -180, "maximum": 180, "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"triggerZones": {
"type": "array",
"description": "Zones where this story is relevant to play, following tmatic.travel zone semantics. The zone is designed at creation time by the generating AI, which must reason about THIS object's nature and shape: what area a listener would stand or move in for the story to make sense. Illustrative examples, not a closed list: a square → its perimeter buffered ~20 m; a building → a circle of ~30 m; a whole village → its circumscribed circle; a street → a corridor along its full length; a river or embankment → a corridor along the stretch the story concerns; a fountain or monument → a small circle within sight; a viewpoint story about a distant object → the viewpoint, not the object. Stories written for driving carry an additional zone: a corridor along the road segment where playback is intended (~50 m each side)",
"items": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["CIRCLE", "POLYGON"], "description": "Zone geometry kind" },
"centerLat": { "type": "number", "description": "CIRCLE only: center latitude" },
"centerLon": { "type": "number", "description": "CIRCLE only: center longitude" },
"radius": { "type": "number", "description": "CIRCLE only: radius in meters" },
"geometry": { "type": "string", "description": "POLYGON only: WKT polygon string, lon-lat order" }
},
"required": ["type"],
"additionalProperties": false
}
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Movement mode the story was written for" },
"audioUri": { "type": "string", "description": "w3ds://file URI of the narrated audio" },
"audioDuration": { "type": "integer", "description": "Audio duration in seconds" },
"imageUris": { "type": "array", "items": { "type": "string" }, "description": "w3ds://file URIs of related photos" },
"sourceType": { "type": "string", "enum": ["generated", "translated", "derived"], "description": "generated = written from scratch by AI; translated = translation of an existing story; derived = based on existing content. Details of the source are in StoryProvenance" },
"license": { "type": "string", "description": "License of this content, e.g. 'proprietary-minstrel'" },
"provenanceRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the StoryProvenance record of this version. @<ename> is the owning entity's eName (stable), resolved to its current eVault via the registry" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" },
"isArchived": { "type": "boolean", "description": "Soft-delete flag" }
},
"required": ["id", "title", "text", "language", "location", "sourceType", "createdAt"],
"additionalProperties": false
}
34 changes: 34 additions & 0 deletions services/ontology/schemas/travelStoryPreferences.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "5a27dd19-8c2a-4b55-9be5-c7fae8e74530",
"title": "TravelStoryPreferences",
"domain": "travel",
"type": "object",
"description": "A person's taste profile for travel STORIES specifically: content languages, topics, depth and narration style, learned affinity to content providers. One envelope per person, updated in place. Deliberately narrow: general travel preferences (hotels, transport) do not belong here, and a person's free-form notes about plans and wishes belong in PersonalNote records, never in this envelope. The profile language of the person lives in User.inLanguage; contentLanguages here is the (possibly different) priority list for story content",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier; one envelope per person" },
"ownerEName": { "type": "string", "description": "@-prefixed eName of the person these preferences belong to" },
"contentLanguages": { "type": "array", "items": { "type": "string" }, "description": "Languages the person accepts story content in, priority order, BCP-47. Distinct from User.inLanguage (profile/interface language)" },
"interests": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person enjoys, e.g. 'architecture', 'food', 'street-art', 'history'" },
"avoidTopics": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person prefers to skip" },
"storyDepth": { "type": "string", "enum": ["short", "medium", "deep"], "description": "Preferred story length/detail level" },
"narrationStyle": { "type": "string", "description": "Free-form description of preferred narration style, e.g. 'ironic, no pathos'" },
"providerAffinity": {
"type": "array",
"description": "Learned per-person reputation of tmatic content providers",
"items": {
"type": "object",
"properties": {
"spaceId": { "type": "string", "format": "uuid", "description": "tmatic space (content provider) UUID" },
"score": { "type": "number", "minimum": -1, "maximum": 1, "description": "Affinity from -1 (avoid) to 1 (prefer)" }
},
"required": ["spaceId", "score"],
"additionalProperties": false
}
},
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" }
},
"required": ["id", "ownerEName", "createdAt"],
"additionalProperties": false
}
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
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
96 changes: 96 additions & 0 deletions services/ontology/schemas/storyListen.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "06025631-8e24-4d74-94d5-c7e99bc9f263",
"title": "StoryListen",
"domain": "travel",
"type": "object",
"description": "One playback of a story by a person. Lives on the listener's vault. Carries no copies of story fields (title, language live in the story itself) and no inline context (the context lives in the referenced StoryRequest). Exactly one of storyRef / tmaticStoryId identifies the story: storyRef for stories that exist as TravelStory envelopes, tmaticStoryId for stories from the tmatic.travel library, which is not yet on W3DS",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier of this listen event"
},
"listenerEName": {
"type": "string",
"description": "@-prefixed eName of the listener"
},
"storyRef": {
"type": "string",
"description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version played, for FWM-created stories"
},
"tmaticStoryId": {
"type": "string",
"format": "uuid",
"description": "tmatic.travel story UUID, for stories played from the tmatic library"
},
"tmaticLanguage": {
"type": "string",
"description": "BCP-47 tag of the tmatic language version played; only with tmaticStoryId (a tmatic story UUID covers all its language versions, so the pair identifies what was actually heard)"
},
"requestRef": {
"type": "string",
"description": "w3ds://envelope reference to the StoryRequest this playback answered"
},
"startedAt": {
"type": "string",
"format": "date-time",
"description": "Playback start, ISO 8601"
},
"completionRate": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Fraction of the audio actually listened to"
},
"rating": {
"type": "integer",
"minimum": 1,
"maximum": 5,
"description": "Listener's rating of this story, if given"
},
"feedbackText": {
"type": "string",
"description": "Free-form listener feedback, if given"
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Record creation timestamp, ISO 8601"
}
},
"required": [
"id",
"listenerEName",
"startedAt",
"createdAt"
],
"additionalProperties": false,
"oneOf": [
{
"required": [
"storyRef"
],
"not": {
"required": [
"tmaticStoryId"
]
}
},
{
"required": [
"tmaticStoryId"
],
"not": {
"required": [
"storyRef"
]
}
}
],
"dependencies": {
"tmaticLanguage": [
"tmaticStoryId"
]
}
}
33 changes: 33 additions & 0 deletions services/ontology/schemas/storyProvenance.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "52662185-59c1-44e5-8519-685796c70a96",
"title": "StoryProvenance",
"domain": "travel",
"type": "object",
"description": "How one TravelStory version came to be: who it was made for, where it was requested, which models produced it, and what it was translated or derived from. Lives next to the story on the content owner's vault. Language versions of one story are reconstructed through provenance: each translation's provenance points at the original version via originalStoryRef. Fields here record the immutable creation event; mutable facts stay in their own ontologies and are referenced",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this provenance record" },
"storyRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version this record describes" },
"requestedForEName": { "type": "string", "description": "@-prefixed eName of the person the story was originally created for" },
"requestRef": { "type": "string", "description": "w3ds://envelope reference to the StoryRequest that triggered creation (lives on the requester's vault)" },
"requestLocation": {
"type": "object",
"description": "Where the requester was at creation time, WGS84. An immutable event fact recorded at creation",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"textModel": { "type": "string", "description": "Model that wrote the text, e.g. 'claude-fable-5'" },
"voiceModel": { "type": "string", "description": "TTS model and voice, e.g. 'eleven_v3/<voiceId>'" },
"promptVersion": { "type": "string", "description": "Version tag of the prompt template used" },
"sourceTmaticStoryId": { "type": "string", "format": "uuid", "description": "tmatic.travel story UUID this version was translated or derived from, when the source is the tmatic library" },
"originalStoryRef": { "type": "string", "description": "w3ds://envelope reference to the TravelStory version this one was translated from, when the source is another FWM story version" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records used to identify the subject (e.g. vision reading of the user's photo)" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" }
},
"required": ["id", "storyRef", "createdAt"],
"additionalProperties": false
}
30 changes: 30 additions & 0 deletions services/ontology/schemas/storyRequest.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "d40d3da4-0999-444a-b23a-9f964a96c964",
"title": "StoryRequest",
"domain": "travel",
"type": "object",
"description": "The context of one story request: a person pressed geo/camera/microphone (or accepted a suggestion) at a place and moment. Lives on the requester's vault. Referenced by StoryListen (what context a story was played in) and by StoryProvenance (what context a story was created in) — the context is written once here, never copied. Machine readings of the request's inputs (photo vision, voice transcript) are FileExtraction records, referenced via extractionRefs",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this request" },
"requesterEName": { "type": "string", "description": "@-prefixed eName of the person who made the request" },
"entryMode": { "type": "string", "enum": ["geo", "camera", "voice", "suggestion"], "description": "How the request was initiated: geo button, camera shot, voice query, or an accepted in-app suggestion" },
"location": {
"type": "object",
"description": "Where the requester was, WGS84",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Detected movement mode at request time" },
"queryText": { "type": "string", "description": "The voice query as text, when entryMode=voice and no FileExtraction transcript record was kept; when one was, reference it via extractionRefs instead of copying" },
"photoFileRef": { "type": "string", "description": "w3ds://file URI of the photo taken, when entryMode=camera" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records made from this request's inputs (vision reading of the photo, transcript of the voice query)" },
"requestedAt": { "type": "string", "format": "date-time", "description": "Request timestamp, ISO 8601" }
},
"required": ["id", "requesterEName", "entryMode", "requestedAt"],
"additionalProperties": false
}
53 changes: 53 additions & 0 deletions services/ontology/schemas/travelStory.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "ba56d2d3-e6bf-4bfd-ac75-6436c56be76f",
"title": "TravelStory",
"domain": "travel",
"type": "object",
"description": "One language version of a location-bound story for travellers. Each language version is its own envelope; versions of the same story are linked through their StoryProvenance records, never by copying fields. Everything about HOW the story came to be (who requested it, where, which models wrote and voiced it, what it was translated from) lives in the referenced StoryProvenance envelope, not here.",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this story version" },
"title": { "type": "string", "description": "Story title in the story language" },
"text": { "type": "string", "description": "Full story text (plain text, no HTML)" },
"language": { "type": "string", "description": "BCP-47 language tag of this version, e.g. 'ru', 'en', 'nl'" },
"subjectName": { "type": "string", "description": "Name of the object/place the story is about, e.g. 'Sint-Janskerk, Maastricht'. Interim field: once landmark entities get their own w3ids, the story-to-object link moves to a dedicated M:N relation and this stays only as a display hint" },
"location": {
"type": "object",
"description": "Anchor point of the story subject, WGS84",
"properties": {
"lat": { "type": "number", "minimum": -90, "maximum": 90, "description": "Latitude" },
"lon": { "type": "number", "minimum": -180, "maximum": 180, "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"triggerZones": {
"type": "array",
"description": "Zones where this story is relevant to play, following tmatic.travel zone semantics. The zone is designed at creation time by the generating AI, which must reason about THIS object's nature and shape: what area a listener would stand or move in for the story to make sense. Illustrative examples, not a closed list: a square → its perimeter buffered ~20 m; a building → a circle of ~30 m; a whole village → its circumscribed circle; a street → a corridor along its full length; a river or embankment → a corridor along the stretch the story concerns; a fountain or monument → a small circle within sight; a viewpoint story about a distant object → the viewpoint, not the object. Stories written for driving carry an additional zone: a corridor along the road segment where playback is intended (~50 m each side)",
"items": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["CIRCLE", "POLYGON"], "description": "Zone geometry kind" },
"centerLat": { "type": "number", "description": "CIRCLE only: center latitude" },
"centerLon": { "type": "number", "description": "CIRCLE only: center longitude" },
"radius": { "type": "number", "description": "CIRCLE only: radius in meters" },
"geometry": { "type": "string", "description": "POLYGON only: WKT polygon string, lon-lat order" }
},
"required": ["type"],
"additionalProperties": false
}
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Movement mode the story was written for" },
"audioUri": { "type": "string", "description": "w3ds://file URI of the narrated audio" },
"audioDuration": { "type": "integer", "description": "Audio duration in seconds" },
"imageUris": { "type": "array", "items": { "type": "string" }, "description": "w3ds://file URIs of related photos" },
"sourceType": { "type": "string", "enum": ["generated", "translated", "derived"], "description": "generated = written from scratch by AI; translated = translation of an existing story; derived = based on existing content. Details of the source are in StoryProvenance" },
"license": { "type": "string", "description": "License of this content, e.g. 'proprietary-minstrel'" },
"provenanceRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the StoryProvenance record of this version. @<ename> is the owning entity's eName (stable), resolved to its current eVault via the registry" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" },
"isArchived": { "type": "boolean", "description": "Soft-delete flag" }
},
"required": ["id", "title", "text", "language", "location", "sourceType", "createdAt"],
"additionalProperties": false
}
34 changes: 34 additions & 0 deletions services/ontology/schemas/travelStoryPreferences.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "5a27dd19-8c2a-4b55-9be5-c7fae8e74530",
"title": "TravelStoryPreferences",
"domain": "travel",
"type": "object",
"description": "A person's taste profile for travel STORIES specifically: content languages, topics, depth and narration style, learned affinity to content providers. One envelope per person, updated in place. Deliberately narrow: general travel preferences (hotels, transport) do not belong here, and a person's free-form notes about plans and wishes belong in PersonalNote records, never in this envelope. The profile language of the person lives in User.inLanguage; contentLanguages here is the (possibly different) priority list for story content",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier; one envelope per person" },
"ownerEName": { "type": "string", "description": "@-prefixed eName of the person these preferences belong to" },
"contentLanguages": { "type": "array", "items": { "type": "string" }, "description": "Languages the person accepts story content in, priority order, BCP-47. Distinct from User.inLanguage (profile/interface language)" },
"interests": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person enjoys, e.g. 'architecture', 'food', 'street-art', 'history'" },
"avoidTopics": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person prefers to skip" },
"storyDepth": { "type": "string", "enum": ["short", "medium", "deep"], "description": "Preferred story length/detail level" },
"narrationStyle": { "type": "string", "description": "Free-form description of preferred narration style, e.g. 'ironic, no pathos'" },
"providerAffinity": {
"type": "array",
"description": "Learned per-person reputation of tmatic content providers",
"items": {
"type": "object",
"properties": {
"spaceId": { "type": "string", "format": "uuid", "description": "tmatic space (content provider) UUID" },
"score": { "type": "number", "minimum": -1, "maximum": 1, "description": "Affinity from -1 (avoid) to 1 (prefer)" }
},
"required": ["spaceId", "score"],
"additionalProperties": false
}
},
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" }
},
"required": ["id", "ownerEName", "createdAt"],
"additionalProperties": false
}
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
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
96 changes: 96 additions & 0 deletions services/ontology/schemas/storyListen.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "06025631-8e24-4d74-94d5-c7e99bc9f263",
"title": "StoryListen",
"domain": "travel",
"type": "object",
"description": "One playback of a story by a person. Lives on the listener's vault. Carries no copies of story fields (title, language live in the story itself) and no inline context (the context lives in the referenced StoryRequest). Exactly one of storyRef / tmaticStoryId identifies the story: storyRef for stories that exist as TravelStory envelopes, tmaticStoryId for stories from the tmatic.travel library, which is not yet on W3DS",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier of this listen event"
},
"listenerEName": {
"type": "string",
"description": "@-prefixed eName of the listener"
},
"storyRef": {
"type": "string",
"description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version played, for FWM-created stories"
},
"tmaticStoryId": {
"type": "string",
"format": "uuid",
"description": "tmatic.travel story UUID, for stories played from the tmatic library"
},
"tmaticLanguage": {
"type": "string",
"description": "BCP-47 tag of the tmatic language version played; only with tmaticStoryId (a tmatic story UUID covers all its language versions, so the pair identifies what was actually heard)"
},
"requestRef": {
"type": "string",
"description": "w3ds://envelope reference to the StoryRequest this playback answered"
},
"startedAt": {
"type": "string",
"format": "date-time",
"description": "Playback start, ISO 8601"
},
"completionRate": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Fraction of the audio actually listened to"
},
"rating": {
"type": "integer",
"minimum": 1,
"maximum": 5,
"description": "Listener's rating of this story, if given"
},
"feedbackText": {
"type": "string",
"description": "Free-form listener feedback, if given"
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Record creation timestamp, ISO 8601"
}
},
"required": [
"id",
"listenerEName",
"startedAt",
"createdAt"
],
"additionalProperties": false,
"oneOf": [
{
"required": [
"storyRef"
],
"not": {
"required": [
"tmaticStoryId"
]
}
},
{
"required": [
"tmaticStoryId"
],
"not": {
"required": [
"storyRef"
]
}
}
],
"dependencies": {
"tmaticLanguage": [
"tmaticStoryId"
]
}
}
33 changes: 33 additions & 0 deletions services/ontology/schemas/storyProvenance.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "52662185-59c1-44e5-8519-685796c70a96",
"title": "StoryProvenance",
"domain": "travel",
"type": "object",
"description": "How one TravelStory version came to be: who it was made for, where it was requested, which models produced it, and what it was translated or derived from. Lives next to the story on the content owner's vault. Language versions of one story are reconstructed through provenance: each translation's provenance points at the original version via originalStoryRef. Fields here record the immutable creation event; mutable facts stay in their own ontologies and are referenced",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this provenance record" },
"storyRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version this record describes" },
"requestedForEName": { "type": "string", "description": "@-prefixed eName of the person the story was originally created for" },
"requestRef": { "type": "string", "description": "w3ds://envelope reference to the StoryRequest that triggered creation (lives on the requester's vault)" },
"requestLocation": {
"type": "object",
"description": "Where the requester was at creation time, WGS84. An immutable event fact recorded at creation",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"textModel": { "type": "string", "description": "Model that wrote the text, e.g. 'claude-fable-5'" },
"voiceModel": { "type": "string", "description": "TTS model and voice, e.g. 'eleven_v3/<voiceId>'" },
"promptVersion": { "type": "string", "description": "Version tag of the prompt template used" },
"sourceTmaticStoryId": { "type": "string", "format": "uuid", "description": "tmatic.travel story UUID this version was translated or derived from, when the source is the tmatic library" },
"originalStoryRef": { "type": "string", "description": "w3ds://envelope reference to the TravelStory version this one was translated from, when the source is another FWM story version" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records used to identify the subject (e.g. vision reading of the user's photo)" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" }
},
"required": ["id", "storyRef", "createdAt"],
"additionalProperties": false
}
30 changes: 30 additions & 0 deletions services/ontology/schemas/storyRequest.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "d40d3da4-0999-444a-b23a-9f964a96c964",
"title": "StoryRequest",
"domain": "travel",
"type": "object",
"description": "The context of one story request: a person pressed geo/camera/microphone (or accepted a suggestion) at a place and moment. Lives on the requester's vault. Referenced by StoryListen (what context a story was played in) and by StoryProvenance (what context a story was created in) — the context is written once here, never copied. Machine readings of the request's inputs (photo vision, voice transcript) are FileExtraction records, referenced via extractionRefs",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this request" },
"requesterEName": { "type": "string", "description": "@-prefixed eName of the person who made the request" },
"entryMode": { "type": "string", "enum": ["geo", "camera", "voice", "suggestion"], "description": "How the request was initiated: geo button, camera shot, voice query, or an accepted in-app suggestion" },
"location": {
"type": "object",
"description": "Where the requester was, WGS84",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Detected movement mode at request time" },
"queryText": { "type": "string", "description": "The voice query as text, when entryMode=voice and no FileExtraction transcript record was kept; when one was, reference it via extractionRefs instead of copying" },
"photoFileRef": { "type": "string", "description": "w3ds://file URI of the photo taken, when entryMode=camera" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records made from this request's inputs (vision reading of the photo, transcript of the voice query)" },
"requestedAt": { "type": "string", "format": "date-time", "description": "Request timestamp, ISO 8601" }
},
"required": ["id", "requesterEName", "entryMode", "requestedAt"],
"additionalProperties": false
}
53 changes: 53 additions & 0 deletions services/ontology/schemas/travelStory.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "ba56d2d3-e6bf-4bfd-ac75-6436c56be76f",
"title": "TravelStory",
"domain": "travel",
"type": "object",
"description": "One language version of a location-bound story for travellers. Each language version is its own envelope; versions of the same story are linked through their StoryProvenance records, never by copying fields. Everything about HOW the story came to be (who requested it, where, which models wrote and voiced it, what it was translated from) lives in the referenced StoryProvenance envelope, not here.",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this story version" },
"title": { "type": "string", "description": "Story title in the story language" },
"text": { "type": "string", "description": "Full story text (plain text, no HTML)" },
"language": { "type": "string", "description": "BCP-47 language tag of this version, e.g. 'ru', 'en', 'nl'" },
"subjectName": { "type": "string", "description": "Name of the object/place the story is about, e.g. 'Sint-Janskerk, Maastricht'. Interim field: once landmark entities get their own w3ids, the story-to-object link moves to a dedicated M:N relation and this stays only as a display hint" },
"location": {
"type": "object",
"description": "Anchor point of the story subject, WGS84",
"properties": {
"lat": { "type": "number", "minimum": -90, "maximum": 90, "description": "Latitude" },
"lon": { "type": "number", "minimum": -180, "maximum": 180, "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"triggerZones": {
"type": "array",
"description": "Zones where this story is relevant to play, following tmatic.travel zone semantics. The zone is designed at creation time by the generating AI, which must reason about THIS object's nature and shape: what area a listener would stand or move in for the story to make sense. Illustrative examples, not a closed list: a square → its perimeter buffered ~20 m; a building → a circle of ~30 m; a whole village → its circumscribed circle; a street → a corridor along its full length; a river or embankment → a corridor along the stretch the story concerns; a fountain or monument → a small circle within sight; a viewpoint story about a distant object → the viewpoint, not the object. Stories written for driving carry an additional zone: a corridor along the road segment where playback is intended (~50 m each side)",
"items": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["CIRCLE", "POLYGON"], "description": "Zone geometry kind" },
"centerLat": { "type": "number", "description": "CIRCLE only: center latitude" },
"centerLon": { "type": "number", "description": "CIRCLE only: center longitude" },
"radius": { "type": "number", "description": "CIRCLE only: radius in meters" },
"geometry": { "type": "string", "description": "POLYGON only: WKT polygon string, lon-lat order" }
},
"required": ["type"],
"additionalProperties": false
}
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Movement mode the story was written for" },
"audioUri": { "type": "string", "description": "w3ds://file URI of the narrated audio" },
"audioDuration": { "type": "integer", "description": "Audio duration in seconds" },
"imageUris": { "type": "array", "items": { "type": "string" }, "description": "w3ds://file URIs of related photos" },
"sourceType": { "type": "string", "enum": ["generated", "translated", "derived"], "description": "generated = written from scratch by AI; translated = translation of an existing story; derived = based on existing content. Details of the source are in StoryProvenance" },
"license": { "type": "string", "description": "License of this content, e.g. 'proprietary-minstrel'" },
"provenanceRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the StoryProvenance record of this version. @<ename> is the owning entity's eName (stable), resolved to its current eVault via the registry" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" },
"isArchived": { "type": "boolean", "description": "Soft-delete flag" }
},
"required": ["id", "title", "text", "language", "location", "sourceType", "createdAt"],
"additionalProperties": false
}
34 changes: 34 additions & 0 deletions services/ontology/schemas/travelStoryPreferences.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "5a27dd19-8c2a-4b55-9be5-c7fae8e74530",
"title": "TravelStoryPreferences",
"domain": "travel",
"type": "object",
"description": "A person's taste profile for travel STORIES specifically: content languages, topics, depth and narration style, learned affinity to content providers. One envelope per person, updated in place. Deliberately narrow: general travel preferences (hotels, transport) do not belong here, and a person's free-form notes about plans and wishes belong in PersonalNote records, never in this envelope. The profile language of the person lives in User.inLanguage; contentLanguages here is the (possibly different) priority list for story content",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier; one envelope per person" },
"ownerEName": { "type": "string", "description": "@-prefixed eName of the person these preferences belong to" },
"contentLanguages": { "type": "array", "items": { "type": "string" }, "description": "Languages the person accepts story content in, priority order, BCP-47. Distinct from User.inLanguage (profile/interface language)" },
"interests": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person enjoys, e.g. 'architecture', 'food', 'street-art', 'history'" },
"avoidTopics": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person prefers to skip" },
"storyDepth": { "type": "string", "enum": ["short", "medium", "deep"], "description": "Preferred story length/detail level" },
"narrationStyle": { "type": "string", "description": "Free-form description of preferred narration style, e.g. 'ironic, no pathos'" },
"providerAffinity": {
"type": "array",
"description": "Learned per-person reputation of tmatic content providers",
"items": {
"type": "object",
"properties": {
"spaceId": { "type": "string", "format": "uuid", "description": "tmatic space (content provider) UUID" },
"score": { "type": "number", "minimum": -1, "maximum": 1, "description": "Affinity from -1 (avoid) to 1 (prefer)" }
},
"required": ["spaceId", "score"],
"additionalProperties": false
}
},
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" }
},
"required": ["id", "ownerEName", "createdAt"],
"additionalProperties": false
}
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
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
96 changes: 96 additions & 0 deletions services/ontology/schemas/storyListen.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "06025631-8e24-4d74-94d5-c7e99bc9f263",
"title": "StoryListen",
"domain": "travel",
"type": "object",
"description": "One playback of a story by a person. Lives on the listener's vault. Carries no copies of story fields (title, language live in the story itself) and no inline context (the context lives in the referenced StoryRequest). Exactly one of storyRef / tmaticStoryId identifies the story: storyRef for stories that exist as TravelStory envelopes, tmaticStoryId for stories from the tmatic.travel library, which is not yet on W3DS",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier of this listen event"
},
"listenerEName": {
"type": "string",
"description": "@-prefixed eName of the listener"
},
"storyRef": {
"type": "string",
"description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version played, for FWM-created stories"
},
"tmaticStoryId": {
"type": "string",
"format": "uuid",
"description": "tmatic.travel story UUID, for stories played from the tmatic library"
},
"tmaticLanguage": {
"type": "string",
"description": "BCP-47 tag of the tmatic language version played; only with tmaticStoryId (a tmatic story UUID covers all its language versions, so the pair identifies what was actually heard)"
},
"requestRef": {
"type": "string",
"description": "w3ds://envelope reference to the StoryRequest this playback answered"
},
"startedAt": {
"type": "string",
"format": "date-time",
"description": "Playback start, ISO 8601"
},
"completionRate": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Fraction of the audio actually listened to"
},
"rating": {
"type": "integer",
"minimum": 1,
"maximum": 5,
"description": "Listener's rating of this story, if given"
},
"feedbackText": {
"type": "string",
"description": "Free-form listener feedback, if given"
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Record creation timestamp, ISO 8601"
}
},
"required": [
"id",
"listenerEName",
"startedAt",
"createdAt"
],
"additionalProperties": false,
"oneOf": [
{
"required": [
"storyRef"
],
"not": {
"required": [
"tmaticStoryId"
]
}
},
{
"required": [
"tmaticStoryId"
],
"not": {
"required": [
"storyRef"
]
}
}
],
"dependencies": {
"tmaticLanguage": [
"tmaticStoryId"
]
}
}
33 changes: 33 additions & 0 deletions services/ontology/schemas/storyProvenance.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "52662185-59c1-44e5-8519-685796c70a96",
"title": "StoryProvenance",
"domain": "travel",
"type": "object",
"description": "How one TravelStory version came to be: who it was made for, where it was requested, which models produced it, and what it was translated or derived from. Lives next to the story on the content owner's vault. Language versions of one story are reconstructed through provenance: each translation's provenance points at the original version via originalStoryRef. Fields here record the immutable creation event; mutable facts stay in their own ontologies and are referenced",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this provenance record" },
"storyRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version this record describes" },
"requestedForEName": { "type": "string", "description": "@-prefixed eName of the person the story was originally created for" },
"requestRef": { "type": "string", "description": "w3ds://envelope reference to the StoryRequest that triggered creation (lives on the requester's vault)" },
"requestLocation": {
"type": "object",
"description": "Where the requester was at creation time, WGS84. An immutable event fact recorded at creation",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"textModel": { "type": "string", "description": "Model that wrote the text, e.g. 'claude-fable-5'" },
"voiceModel": { "type": "string", "description": "TTS model and voice, e.g. 'eleven_v3/<voiceId>'" },
"promptVersion": { "type": "string", "description": "Version tag of the prompt template used" },
"sourceTmaticStoryId": { "type": "string", "format": "uuid", "description": "tmatic.travel story UUID this version was translated or derived from, when the source is the tmatic library" },
"originalStoryRef": { "type": "string", "description": "w3ds://envelope reference to the TravelStory version this one was translated from, when the source is another FWM story version" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records used to identify the subject (e.g. vision reading of the user's photo)" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" }
},
"required": ["id", "storyRef", "createdAt"],
"additionalProperties": false
}
30 changes: 30 additions & 0 deletions services/ontology/schemas/storyRequest.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "d40d3da4-0999-444a-b23a-9f964a96c964",
"title": "StoryRequest",
"domain": "travel",
"type": "object",
"description": "The context of one story request: a person pressed geo/camera/microphone (or accepted a suggestion) at a place and moment. Lives on the requester's vault. Referenced by StoryListen (what context a story was played in) and by StoryProvenance (what context a story was created in) — the context is written once here, never copied. Machine readings of the request's inputs (photo vision, voice transcript) are FileExtraction records, referenced via extractionRefs",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this request" },
"requesterEName": { "type": "string", "description": "@-prefixed eName of the person who made the request" },
"entryMode": { "type": "string", "enum": ["geo", "camera", "voice", "suggestion"], "description": "How the request was initiated: geo button, camera shot, voice query, or an accepted in-app suggestion" },
"location": {
"type": "object",
"description": "Where the requester was, WGS84",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Detected movement mode at request time" },
"queryText": { "type": "string", "description": "The voice query as text, when entryMode=voice and no FileExtraction transcript record was kept; when one was, reference it via extractionRefs instead of copying" },
"photoFileRef": { "type": "string", "description": "w3ds://file URI of the photo taken, when entryMode=camera" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records made from this request's inputs (vision reading of the photo, transcript of the voice query)" },
"requestedAt": { "type": "string", "format": "date-time", "description": "Request timestamp, ISO 8601" }
},
"required": ["id", "requesterEName", "entryMode", "requestedAt"],
"additionalProperties": false
}
53 changes: 53 additions & 0 deletions services/ontology/schemas/travelStory.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "ba56d2d3-e6bf-4bfd-ac75-6436c56be76f",
"title": "TravelStory",
"domain": "travel",
"type": "object",
"description": "One language version of a location-bound story for travellers. Each language version is its own envelope; versions of the same story are linked through their StoryProvenance records, never by copying fields. Everything about HOW the story came to be (who requested it, where, which models wrote and voiced it, what it was translated from) lives in the referenced StoryProvenance envelope, not here.",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this story version" },
"title": { "type": "string", "description": "Story title in the story language" },
"text": { "type": "string", "description": "Full story text (plain text, no HTML)" },
"language": { "type": "string", "description": "BCP-47 language tag of this version, e.g. 'ru', 'en', 'nl'" },
"subjectName": { "type": "string", "description": "Name of the object/place the story is about, e.g. 'Sint-Janskerk, Maastricht'. Interim field: once landmark entities get their own w3ids, the story-to-object link moves to a dedicated M:N relation and this stays only as a display hint" },
"location": {
"type": "object",
"description": "Anchor point of the story subject, WGS84",
"properties": {
"lat": { "type": "number", "minimum": -90, "maximum": 90, "description": "Latitude" },
"lon": { "type": "number", "minimum": -180, "maximum": 180, "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"triggerZones": {
"type": "array",
"description": "Zones where this story is relevant to play, following tmatic.travel zone semantics. The zone is designed at creation time by the generating AI, which must reason about THIS object's nature and shape: what area a listener would stand or move in for the story to make sense. Illustrative examples, not a closed list: a square → its perimeter buffered ~20 m; a building → a circle of ~30 m; a whole village → its circumscribed circle; a street → a corridor along its full length; a river or embankment → a corridor along the stretch the story concerns; a fountain or monument → a small circle within sight; a viewpoint story about a distant object → the viewpoint, not the object. Stories written for driving carry an additional zone: a corridor along the road segment where playback is intended (~50 m each side)",
"items": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["CIRCLE", "POLYGON"], "description": "Zone geometry kind" },
"centerLat": { "type": "number", "description": "CIRCLE only: center latitude" },
"centerLon": { "type": "number", "description": "CIRCLE only: center longitude" },
"radius": { "type": "number", "description": "CIRCLE only: radius in meters" },
"geometry": { "type": "string", "description": "POLYGON only: WKT polygon string, lon-lat order" }
},
"required": ["type"],
"additionalProperties": false
}
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Movement mode the story was written for" },
"audioUri": { "type": "string", "description": "w3ds://file URI of the narrated audio" },
"audioDuration": { "type": "integer", "description": "Audio duration in seconds" },
"imageUris": { "type": "array", "items": { "type": "string" }, "description": "w3ds://file URIs of related photos" },
"sourceType": { "type": "string", "enum": ["generated", "translated", "derived"], "description": "generated = written from scratch by AI; translated = translation of an existing story; derived = based on existing content. Details of the source are in StoryProvenance" },
"license": { "type": "string", "description": "License of this content, e.g. 'proprietary-minstrel'" },
"provenanceRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the StoryProvenance record of this version. @<ename> is the owning entity's eName (stable), resolved to its current eVault via the registry" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" },
"isArchived": { "type": "boolean", "description": "Soft-delete flag" }
},
"required": ["id", "title", "text", "language", "location", "sourceType", "createdAt"],
"additionalProperties": false
}
34 changes: 34 additions & 0 deletions services/ontology/schemas/travelStoryPreferences.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "5a27dd19-8c2a-4b55-9be5-c7fae8e74530",
"title": "TravelStoryPreferences",
"domain": "travel",
"type": "object",
"description": "A person's taste profile for travel STORIES specifically: content languages, topics, depth and narration style, learned affinity to content providers. One envelope per person, updated in place. Deliberately narrow: general travel preferences (hotels, transport) do not belong here, and a person's free-form notes about plans and wishes belong in PersonalNote records, never in this envelope. The profile language of the person lives in User.inLanguage; contentLanguages here is the (possibly different) priority list for story content",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier; one envelope per person" },
"ownerEName": { "type": "string", "description": "@-prefixed eName of the person these preferences belong to" },
"contentLanguages": { "type": "array", "items": { "type": "string" }, "description": "Languages the person accepts story content in, priority order, BCP-47. Distinct from User.inLanguage (profile/interface language)" },
"interests": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person enjoys, e.g. 'architecture', 'food', 'street-art', 'history'" },
"avoidTopics": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person prefers to skip" },
"storyDepth": { "type": "string", "enum": ["short", "medium", "deep"], "description": "Preferred story length/detail level" },
"narrationStyle": { "type": "string", "description": "Free-form description of preferred narration style, e.g. 'ironic, no pathos'" },
"providerAffinity": {
"type": "array",
"description": "Learned per-person reputation of tmatic content providers",
"items": {
"type": "object",
"properties": {
"spaceId": { "type": "string", "format": "uuid", "description": "tmatic space (content provider) UUID" },
"score": { "type": "number", "minimum": -1, "maximum": 1, "description": "Affinity from -1 (avoid) to 1 (prefer)" }
},
"required": ["spaceId", "score"],
"additionalProperties": false
}
},
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" }
},
"required": ["id", "ownerEName", "createdAt"],
"additionalProperties": false
}
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
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
96 changes: 96 additions & 0 deletions services/ontology/schemas/storyListen.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "06025631-8e24-4d74-94d5-c7e99bc9f263",
"title": "StoryListen",
"domain": "travel",
"type": "object",
"description": "One playback of a story by a person. Lives on the listener's vault. Carries no copies of story fields (title, language live in the story itself) and no inline context (the context lives in the referenced StoryRequest). Exactly one of storyRef / tmaticStoryId identifies the story: storyRef for stories that exist as TravelStory envelopes, tmaticStoryId for stories from the tmatic.travel library, which is not yet on W3DS",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier of this listen event"
},
"listenerEName": {
"type": "string",
"description": "@-prefixed eName of the listener"
},
"storyRef": {
"type": "string",
"description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version played, for FWM-created stories"
},
"tmaticStoryId": {
"type": "string",
"format": "uuid",
"description": "tmatic.travel story UUID, for stories played from the tmatic library"
},
"tmaticLanguage": {
"type": "string",
"description": "BCP-47 tag of the tmatic language version played; only with tmaticStoryId (a tmatic story UUID covers all its language versions, so the pair identifies what was actually heard)"
},
"requestRef": {
"type": "string",
"description": "w3ds://envelope reference to the StoryRequest this playback answered"
},
"startedAt": {
"type": "string",
"format": "date-time",
"description": "Playback start, ISO 8601"
},
"completionRate": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Fraction of the audio actually listened to"
},
"rating": {
"type": "integer",
"minimum": 1,
"maximum": 5,
"description": "Listener's rating of this story, if given"
},
"feedbackText": {
"type": "string",
"description": "Free-form listener feedback, if given"
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Record creation timestamp, ISO 8601"
}
},
"required": [
"id",
"listenerEName",
"startedAt",
"createdAt"
],
"additionalProperties": false,
"oneOf": [
{
"required": [
"storyRef"
],
"not": {
"required": [
"tmaticStoryId"
]
}
},
{
"required": [
"tmaticStoryId"
],
"not": {
"required": [
"storyRef"
]
}
}
],
"dependencies": {
"tmaticLanguage": [
"tmaticStoryId"
]
}
}
33 changes: 33 additions & 0 deletions services/ontology/schemas/storyProvenance.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "52662185-59c1-44e5-8519-685796c70a96",
"title": "StoryProvenance",
"domain": "travel",
"type": "object",
"description": "How one TravelStory version came to be: who it was made for, where it was requested, which models produced it, and what it was translated or derived from. Lives next to the story on the content owner's vault. Language versions of one story are reconstructed through provenance: each translation's provenance points at the original version via originalStoryRef. Fields here record the immutable creation event; mutable facts stay in their own ontologies and are referenced",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this provenance record" },
"storyRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version this record describes" },
"requestedForEName": { "type": "string", "description": "@-prefixed eName of the person the story was originally created for" },
"requestRef": { "type": "string", "description": "w3ds://envelope reference to the StoryRequest that triggered creation (lives on the requester's vault)" },
"requestLocation": {
"type": "object",
"description": "Where the requester was at creation time, WGS84. An immutable event fact recorded at creation",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"textModel": { "type": "string", "description": "Model that wrote the text, e.g. 'claude-fable-5'" },
"voiceModel": { "type": "string", "description": "TTS model and voice, e.g. 'eleven_v3/<voiceId>'" },
"promptVersion": { "type": "string", "description": "Version tag of the prompt template used" },
"sourceTmaticStoryId": { "type": "string", "format": "uuid", "description": "tmatic.travel story UUID this version was translated or derived from, when the source is the tmatic library" },
"originalStoryRef": { "type": "string", "description": "w3ds://envelope reference to the TravelStory version this one was translated from, when the source is another FWM story version" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records used to identify the subject (e.g. vision reading of the user's photo)" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" }
},
"required": ["id", "storyRef", "createdAt"],
"additionalProperties": false
}
30 changes: 30 additions & 0 deletions services/ontology/schemas/storyRequest.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "d40d3da4-0999-444a-b23a-9f964a96c964",
"title": "StoryRequest",
"domain": "travel",
"type": "object",
"description": "The context of one story request: a person pressed geo/camera/microphone (or accepted a suggestion) at a place and moment. Lives on the requester's vault. Referenced by StoryListen (what context a story was played in) and by StoryProvenance (what context a story was created in) — the context is written once here, never copied. Machine readings of the request's inputs (photo vision, voice transcript) are FileExtraction records, referenced via extractionRefs",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this request" },
"requesterEName": { "type": "string", "description": "@-prefixed eName of the person who made the request" },
"entryMode": { "type": "string", "enum": ["geo", "camera", "voice", "suggestion"], "description": "How the request was initiated: geo button, camera shot, voice query, or an accepted in-app suggestion" },
"location": {
"type": "object",
"description": "Where the requester was, WGS84",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Detected movement mode at request time" },
"queryText": { "type": "string", "description": "The voice query as text, when entryMode=voice and no FileExtraction transcript record was kept; when one was, reference it via extractionRefs instead of copying" },
"photoFileRef": { "type": "string", "description": "w3ds://file URI of the photo taken, when entryMode=camera" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records made from this request's inputs (vision reading of the photo, transcript of the voice query)" },
"requestedAt": { "type": "string", "format": "date-time", "description": "Request timestamp, ISO 8601" }
},
"required": ["id", "requesterEName", "entryMode", "requestedAt"],
"additionalProperties": false
}
53 changes: 53 additions & 0 deletions services/ontology/schemas/travelStory.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "ba56d2d3-e6bf-4bfd-ac75-6436c56be76f",
"title": "TravelStory",
"domain": "travel",
"type": "object",
"description": "One language version of a location-bound story for travellers. Each language version is its own envelope; versions of the same story are linked through their StoryProvenance records, never by copying fields. Everything about HOW the story came to be (who requested it, where, which models wrote and voiced it, what it was translated from) lives in the referenced StoryProvenance envelope, not here.",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this story version" },
"title": { "type": "string", "description": "Story title in the story language" },
"text": { "type": "string", "description": "Full story text (plain text, no HTML)" },
"language": { "type": "string", "description": "BCP-47 language tag of this version, e.g. 'ru', 'en', 'nl'" },
"subjectName": { "type": "string", "description": "Name of the object/place the story is about, e.g. 'Sint-Janskerk, Maastricht'. Interim field: once landmark entities get their own w3ids, the story-to-object link moves to a dedicated M:N relation and this stays only as a display hint" },
"location": {
"type": "object",
"description": "Anchor point of the story subject, WGS84",
"properties": {
"lat": { "type": "number", "minimum": -90, "maximum": 90, "description": "Latitude" },
"lon": { "type": "number", "minimum": -180, "maximum": 180, "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"triggerZones": {
"type": "array",
"description": "Zones where this story is relevant to play, following tmatic.travel zone semantics. The zone is designed at creation time by the generating AI, which must reason about THIS object's nature and shape: what area a listener would stand or move in for the story to make sense. Illustrative examples, not a closed list: a square → its perimeter buffered ~20 m; a building → a circle of ~30 m; a whole village → its circumscribed circle; a street → a corridor along its full length; a river or embankment → a corridor along the stretch the story concerns; a fountain or monument → a small circle within sight; a viewpoint story about a distant object → the viewpoint, not the object. Stories written for driving carry an additional zone: a corridor along the road segment where playback is intended (~50 m each side)",
"items": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["CIRCLE", "POLYGON"], "description": "Zone geometry kind" },
"centerLat": { "type": "number", "description": "CIRCLE only: center latitude" },
"centerLon": { "type": "number", "description": "CIRCLE only: center longitude" },
"radius": { "type": "number", "description": "CIRCLE only: radius in meters" },
"geometry": { "type": "string", "description": "POLYGON only: WKT polygon string, lon-lat order" }
},
"required": ["type"],
"additionalProperties": false
}
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Movement mode the story was written for" },
"audioUri": { "type": "string", "description": "w3ds://file URI of the narrated audio" },
"audioDuration": { "type": "integer", "description": "Audio duration in seconds" },
"imageUris": { "type": "array", "items": { "type": "string" }, "description": "w3ds://file URIs of related photos" },
"sourceType": { "type": "string", "enum": ["generated", "translated", "derived"], "description": "generated = written from scratch by AI; translated = translation of an existing story; derived = based on existing content. Details of the source are in StoryProvenance" },
"license": { "type": "string", "description": "License of this content, e.g. 'proprietary-minstrel'" },
"provenanceRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the StoryProvenance record of this version. @<ename> is the owning entity's eName (stable), resolved to its current eVault via the registry" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" },
"isArchived": { "type": "boolean", "description": "Soft-delete flag" }
},
"required": ["id", "title", "text", "language", "location", "sourceType", "createdAt"],
"additionalProperties": false
}
34 changes: 34 additions & 0 deletions services/ontology/schemas/travelStoryPreferences.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "5a27dd19-8c2a-4b55-9be5-c7fae8e74530",
"title": "TravelStoryPreferences",
"domain": "travel",
"type": "object",
"description": "A person's taste profile for travel STORIES specifically: content languages, topics, depth and narration style, learned affinity to content providers. One envelope per person, updated in place. Deliberately narrow: general travel preferences (hotels, transport) do not belong here, and a person's free-form notes about plans and wishes belong in PersonalNote records, never in this envelope. The profile language of the person lives in User.inLanguage; contentLanguages here is the (possibly different) priority list for story content",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier; one envelope per person" },
"ownerEName": { "type": "string", "description": "@-prefixed eName of the person these preferences belong to" },
"contentLanguages": { "type": "array", "items": { "type": "string" }, "description": "Languages the person accepts story content in, priority order, BCP-47. Distinct from User.inLanguage (profile/interface language)" },
"interests": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person enjoys, e.g. 'architecture', 'food', 'street-art', 'history'" },
"avoidTopics": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person prefers to skip" },
"storyDepth": { "type": "string", "enum": ["short", "medium", "deep"], "description": "Preferred story length/detail level" },
"narrationStyle": { "type": "string", "description": "Free-form description of preferred narration style, e.g. 'ironic, no pathos'" },
"providerAffinity": {
"type": "array",
"description": "Learned per-person reputation of tmatic content providers",
"items": {
"type": "object",
"properties": {
"spaceId": { "type": "string", "format": "uuid", "description": "tmatic space (content provider) UUID" },
"score": { "type": "number", "minimum": -1, "maximum": 1, "description": "Affinity from -1 (avoid) to 1 (prefer)" }
},
"required": ["spaceId", "score"],
"additionalProperties": false
}
},
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" }
},
"required": ["id", "ownerEName", "createdAt"],
"additionalProperties": false
}
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
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
96 changes: 96 additions & 0 deletions services/ontology/schemas/storyListen.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "06025631-8e24-4d74-94d5-c7e99bc9f263",
"title": "StoryListen",
"domain": "travel",
"type": "object",
"description": "One playback of a story by a person. Lives on the listener's vault. Carries no copies of story fields (title, language live in the story itself) and no inline context (the context lives in the referenced StoryRequest). Exactly one of storyRef / tmaticStoryId identifies the story: storyRef for stories that exist as TravelStory envelopes, tmaticStoryId for stories from the tmatic.travel library, which is not yet on W3DS",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier of this listen event"
},
"listenerEName": {
"type": "string",
"description": "@-prefixed eName of the listener"
},
"storyRef": {
"type": "string",
"description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version played, for FWM-created stories"
},
"tmaticStoryId": {
"type": "string",
"format": "uuid",
"description": "tmatic.travel story UUID, for stories played from the tmatic library"
},
"tmaticLanguage": {
"type": "string",
"description": "BCP-47 tag of the tmatic language version played; only with tmaticStoryId (a tmatic story UUID covers all its language versions, so the pair identifies what was actually heard)"
},
"requestRef": {
"type": "string",
"description": "w3ds://envelope reference to the StoryRequest this playback answered"
},
"startedAt": {
"type": "string",
"format": "date-time",
"description": "Playback start, ISO 8601"
},
"completionRate": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Fraction of the audio actually listened to"
},
"rating": {
"type": "integer",
"minimum": 1,
"maximum": 5,
"description": "Listener's rating of this story, if given"
},
"feedbackText": {
"type": "string",
"description": "Free-form listener feedback, if given"
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Record creation timestamp, ISO 8601"
}
},
"required": [
"id",
"listenerEName",
"startedAt",
"createdAt"
],
"additionalProperties": false,
"oneOf": [
{
"required": [
"storyRef"
],
"not": {
"required": [
"tmaticStoryId"
]
}
},
{
"required": [
"tmaticStoryId"
],
"not": {
"required": [
"storyRef"
]
}
}
],
"dependencies": {
"tmaticLanguage": [
"tmaticStoryId"
]
}
}
33 changes: 33 additions & 0 deletions services/ontology/schemas/storyProvenance.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "52662185-59c1-44e5-8519-685796c70a96",
"title": "StoryProvenance",
"domain": "travel",
"type": "object",
"description": "How one TravelStory version came to be: who it was made for, where it was requested, which models produced it, and what it was translated or derived from. Lives next to the story on the content owner's vault. Language versions of one story are reconstructed through provenance: each translation's provenance points at the original version via originalStoryRef. Fields here record the immutable creation event; mutable facts stay in their own ontologies and are referenced",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this provenance record" },
"storyRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version this record describes" },
"requestedForEName": { "type": "string", "description": "@-prefixed eName of the person the story was originally created for" },
"requestRef": { "type": "string", "description": "w3ds://envelope reference to the StoryRequest that triggered creation (lives on the requester's vault)" },
"requestLocation": {
"type": "object",
"description": "Where the requester was at creation time, WGS84. An immutable event fact recorded at creation",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"textModel": { "type": "string", "description": "Model that wrote the text, e.g. 'claude-fable-5'" },
"voiceModel": { "type": "string", "description": "TTS model and voice, e.g. 'eleven_v3/<voiceId>'" },
"promptVersion": { "type": "string", "description": "Version tag of the prompt template used" },
"sourceTmaticStoryId": { "type": "string", "format": "uuid", "description": "tmatic.travel story UUID this version was translated or derived from, when the source is the tmatic library" },
"originalStoryRef": { "type": "string", "description": "w3ds://envelope reference to the TravelStory version this one was translated from, when the source is another FWM story version" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records used to identify the subject (e.g. vision reading of the user's photo)" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" }
},
"required": ["id", "storyRef", "createdAt"],
"additionalProperties": false
}
30 changes: 30 additions & 0 deletions services/ontology/schemas/storyRequest.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "d40d3da4-0999-444a-b23a-9f964a96c964",
"title": "StoryRequest",
"domain": "travel",
"type": "object",
"description": "The context of one story request: a person pressed geo/camera/microphone (or accepted a suggestion) at a place and moment. Lives on the requester's vault. Referenced by StoryListen (what context a story was played in) and by StoryProvenance (what context a story was created in) — the context is written once here, never copied. Machine readings of the request's inputs (photo vision, voice transcript) are FileExtraction records, referenced via extractionRefs",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this request" },
"requesterEName": { "type": "string", "description": "@-prefixed eName of the person who made the request" },
"entryMode": { "type": "string", "enum": ["geo", "camera", "voice", "suggestion"], "description": "How the request was initiated: geo button, camera shot, voice query, or an accepted in-app suggestion" },
"location": {
"type": "object",
"description": "Where the requester was, WGS84",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Detected movement mode at request time" },
"queryText": { "type": "string", "description": "The voice query as text, when entryMode=voice and no FileExtraction transcript record was kept; when one was, reference it via extractionRefs instead of copying" },
"photoFileRef": { "type": "string", "description": "w3ds://file URI of the photo taken, when entryMode=camera" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records made from this request's inputs (vision reading of the photo, transcript of the voice query)" },
"requestedAt": { "type": "string", "format": "date-time", "description": "Request timestamp, ISO 8601" }
},
"required": ["id", "requesterEName", "entryMode", "requestedAt"],
"additionalProperties": false
}
53 changes: 53 additions & 0 deletions services/ontology/schemas/travelStory.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "ba56d2d3-e6bf-4bfd-ac75-6436c56be76f",
"title": "TravelStory",
"domain": "travel",
"type": "object",
"description": "One language version of a location-bound story for travellers. Each language version is its own envelope; versions of the same story are linked through their StoryProvenance records, never by copying fields. Everything about HOW the story came to be (who requested it, where, which models wrote and voiced it, what it was translated from) lives in the referenced StoryProvenance envelope, not here.",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this story version" },
"title": { "type": "string", "description": "Story title in the story language" },
"text": { "type": "string", "description": "Full story text (plain text, no HTML)" },
"language": { "type": "string", "description": "BCP-47 language tag of this version, e.g. 'ru', 'en', 'nl'" },
"subjectName": { "type": "string", "description": "Name of the object/place the story is about, e.g. 'Sint-Janskerk, Maastricht'. Interim field: once landmark entities get their own w3ids, the story-to-object link moves to a dedicated M:N relation and this stays only as a display hint" },
"location": {
"type": "object",
"description": "Anchor point of the story subject, WGS84",
"properties": {
"lat": { "type": "number", "minimum": -90, "maximum": 90, "description": "Latitude" },
"lon": { "type": "number", "minimum": -180, "maximum": 180, "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"triggerZones": {
"type": "array",
"description": "Zones where this story is relevant to play, following tmatic.travel zone semantics. The zone is designed at creation time by the generating AI, which must reason about THIS object's nature and shape: what area a listener would stand or move in for the story to make sense. Illustrative examples, not a closed list: a square → its perimeter buffered ~20 m; a building → a circle of ~30 m; a whole village → its circumscribed circle; a street → a corridor along its full length; a river or embankment → a corridor along the stretch the story concerns; a fountain or monument → a small circle within sight; a viewpoint story about a distant object → the viewpoint, not the object. Stories written for driving carry an additional zone: a corridor along the road segment where playback is intended (~50 m each side)",
"items": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["CIRCLE", "POLYGON"], "description": "Zone geometry kind" },
"centerLat": { "type": "number", "description": "CIRCLE only: center latitude" },
"centerLon": { "type": "number", "description": "CIRCLE only: center longitude" },
"radius": { "type": "number", "description": "CIRCLE only: radius in meters" },
"geometry": { "type": "string", "description": "POLYGON only: WKT polygon string, lon-lat order" }
},
"required": ["type"],
"additionalProperties": false
}
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Movement mode the story was written for" },
"audioUri": { "type": "string", "description": "w3ds://file URI of the narrated audio" },
"audioDuration": { "type": "integer", "description": "Audio duration in seconds" },
"imageUris": { "type": "array", "items": { "type": "string" }, "description": "w3ds://file URIs of related photos" },
"sourceType": { "type": "string", "enum": ["generated", "translated", "derived"], "description": "generated = written from scratch by AI; translated = translation of an existing story; derived = based on existing content. Details of the source are in StoryProvenance" },
"license": { "type": "string", "description": "License of this content, e.g. 'proprietary-minstrel'" },
"provenanceRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the StoryProvenance record of this version. @<ename> is the owning entity's eName (stable), resolved to its current eVault via the registry" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" },
"isArchived": { "type": "boolean", "description": "Soft-delete flag" }
},
"required": ["id", "title", "text", "language", "location", "sourceType", "createdAt"],
"additionalProperties": false
}
34 changes: 34 additions & 0 deletions services/ontology/schemas/travelStoryPreferences.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "5a27dd19-8c2a-4b55-9be5-c7fae8e74530",
"title": "TravelStoryPreferences",
"domain": "travel",
"type": "object",
"description": "A person's taste profile for travel STORIES specifically: content languages, topics, depth and narration style, learned affinity to content providers. One envelope per person, updated in place. Deliberately narrow: general travel preferences (hotels, transport) do not belong here, and a person's free-form notes about plans and wishes belong in PersonalNote records, never in this envelope. The profile language of the person lives in User.inLanguage; contentLanguages here is the (possibly different) priority list for story content",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier; one envelope per person" },
"ownerEName": { "type": "string", "description": "@-prefixed eName of the person these preferences belong to" },
"contentLanguages": { "type": "array", "items": { "type": "string" }, "description": "Languages the person accepts story content in, priority order, BCP-47. Distinct from User.inLanguage (profile/interface language)" },
"interests": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person enjoys, e.g. 'architecture', 'food', 'street-art', 'history'" },
"avoidTopics": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person prefers to skip" },
"storyDepth": { "type": "string", "enum": ["short", "medium", "deep"], "description": "Preferred story length/detail level" },
"narrationStyle": { "type": "string", "description": "Free-form description of preferred narration style, e.g. 'ironic, no pathos'" },
"providerAffinity": {
"type": "array",
"description": "Learned per-person reputation of tmatic content providers",
"items": {
"type": "object",
"properties": {
"spaceId": { "type": "string", "format": "uuid", "description": "tmatic space (content provider) UUID" },
"score": { "type": "number", "minimum": -1, "maximum": 1, "description": "Affinity from -1 (avoid) to 1 (prefer)" }
},
"required": ["spaceId", "score"],
"additionalProperties": false
}
},
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" }
},
"required": ["id", "ownerEName", "createdAt"],
"additionalProperties": false
}
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
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
96 changes: 96 additions & 0 deletions services/ontology/schemas/storyListen.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "06025631-8e24-4d74-94d5-c7e99bc9f263",
"title": "StoryListen",
"domain": "travel",
"type": "object",
"description": "One playback of a story by a person. Lives on the listener's vault. Carries no copies of story fields (title, language live in the story itself) and no inline context (the context lives in the referenced StoryRequest). Exactly one of storyRef / tmaticStoryId identifies the story: storyRef for stories that exist as TravelStory envelopes, tmaticStoryId for stories from the tmatic.travel library, which is not yet on W3DS",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier of this listen event"
},
"listenerEName": {
"type": "string",
"description": "@-prefixed eName of the listener"
},
"storyRef": {
"type": "string",
"description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version played, for FWM-created stories"
},
"tmaticStoryId": {
"type": "string",
"format": "uuid",
"description": "tmatic.travel story UUID, for stories played from the tmatic library"
},
"tmaticLanguage": {
"type": "string",
"description": "BCP-47 tag of the tmatic language version played; only with tmaticStoryId (a tmatic story UUID covers all its language versions, so the pair identifies what was actually heard)"
},
"requestRef": {
"type": "string",
"description": "w3ds://envelope reference to the StoryRequest this playback answered"
},
"startedAt": {
"type": "string",
"format": "date-time",
"description": "Playback start, ISO 8601"
},
"completionRate": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Fraction of the audio actually listened to"
},
"rating": {
"type": "integer",
"minimum": 1,
"maximum": 5,
"description": "Listener's rating of this story, if given"
},
"feedbackText": {
"type": "string",
"description": "Free-form listener feedback, if given"
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Record creation timestamp, ISO 8601"
}
},
"required": [
"id",
"listenerEName",
"startedAt",
"createdAt"
],
"additionalProperties": false,
"oneOf": [
{
"required": [
"storyRef"
],
"not": {
"required": [
"tmaticStoryId"
]
}
},
{
"required": [
"tmaticStoryId"
],
"not": {
"required": [
"storyRef"
]
}
}
],
"dependencies": {
"tmaticLanguage": [
"tmaticStoryId"
]
}
}
33 changes: 33 additions & 0 deletions services/ontology/schemas/storyProvenance.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "52662185-59c1-44e5-8519-685796c70a96",
"title": "StoryProvenance",
"domain": "travel",
"type": "object",
"description": "How one TravelStory version came to be: who it was made for, where it was requested, which models produced it, and what it was translated or derived from. Lives next to the story on the content owner's vault. Language versions of one story are reconstructed through provenance: each translation's provenance points at the original version via originalStoryRef. Fields here record the immutable creation event; mutable facts stay in their own ontologies and are referenced",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this provenance record" },
"storyRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version this record describes" },
"requestedForEName": { "type": "string", "description": "@-prefixed eName of the person the story was originally created for" },
"requestRef": { "type": "string", "description": "w3ds://envelope reference to the StoryRequest that triggered creation (lives on the requester's vault)" },
"requestLocation": {
"type": "object",
"description": "Where the requester was at creation time, WGS84. An immutable event fact recorded at creation",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"textModel": { "type": "string", "description": "Model that wrote the text, e.g. 'claude-fable-5'" },
"voiceModel": { "type": "string", "description": "TTS model and voice, e.g. 'eleven_v3/<voiceId>'" },
"promptVersion": { "type": "string", "description": "Version tag of the prompt template used" },
"sourceTmaticStoryId": { "type": "string", "format": "uuid", "description": "tmatic.travel story UUID this version was translated or derived from, when the source is the tmatic library" },
"originalStoryRef": { "type": "string", "description": "w3ds://envelope reference to the TravelStory version this one was translated from, when the source is another FWM story version" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records used to identify the subject (e.g. vision reading of the user's photo)" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" }
},
"required": ["id", "storyRef", "createdAt"],
"additionalProperties": false
}
30 changes: 30 additions & 0 deletions services/ontology/schemas/storyRequest.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "d40d3da4-0999-444a-b23a-9f964a96c964",
"title": "StoryRequest",
"domain": "travel",
"type": "object",
"description": "The context of one story request: a person pressed geo/camera/microphone (or accepted a suggestion) at a place and moment. Lives on the requester's vault. Referenced by StoryListen (what context a story was played in) and by StoryProvenance (what context a story was created in) — the context is written once here, never copied. Machine readings of the request's inputs (photo vision, voice transcript) are FileExtraction records, referenced via extractionRefs",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this request" },
"requesterEName": { "type": "string", "description": "@-prefixed eName of the person who made the request" },
"entryMode": { "type": "string", "enum": ["geo", "camera", "voice", "suggestion"], "description": "How the request was initiated: geo button, camera shot, voice query, or an accepted in-app suggestion" },
"location": {
"type": "object",
"description": "Where the requester was, WGS84",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Detected movement mode at request time" },
"queryText": { "type": "string", "description": "The voice query as text, when entryMode=voice and no FileExtraction transcript record was kept; when one was, reference it via extractionRefs instead of copying" },
"photoFileRef": { "type": "string", "description": "w3ds://file URI of the photo taken, when entryMode=camera" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records made from this request's inputs (vision reading of the photo, transcript of the voice query)" },
"requestedAt": { "type": "string", "format": "date-time", "description": "Request timestamp, ISO 8601" }
},
"required": ["id", "requesterEName", "entryMode", "requestedAt"],
"additionalProperties": false
}
53 changes: 53 additions & 0 deletions services/ontology/schemas/travelStory.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "ba56d2d3-e6bf-4bfd-ac75-6436c56be76f",
"title": "TravelStory",
"domain": "travel",
"type": "object",
"description": "One language version of a location-bound story for travellers. Each language version is its own envelope; versions of the same story are linked through their StoryProvenance records, never by copying fields. Everything about HOW the story came to be (who requested it, where, which models wrote and voiced it, what it was translated from) lives in the referenced StoryProvenance envelope, not here.",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this story version" },
"title": { "type": "string", "description": "Story title in the story language" },
"text": { "type": "string", "description": "Full story text (plain text, no HTML)" },
"language": { "type": "string", "description": "BCP-47 language tag of this version, e.g. 'ru', 'en', 'nl'" },
"subjectName": { "type": "string", "description": "Name of the object/place the story is about, e.g. 'Sint-Janskerk, Maastricht'. Interim field: once landmark entities get their own w3ids, the story-to-object link moves to a dedicated M:N relation and this stays only as a display hint" },
"location": {
"type": "object",
"description": "Anchor point of the story subject, WGS84",
"properties": {
"lat": { "type": "number", "minimum": -90, "maximum": 90, "description": "Latitude" },
"lon": { "type": "number", "minimum": -180, "maximum": 180, "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"triggerZones": {
"type": "array",
"description": "Zones where this story is relevant to play, following tmatic.travel zone semantics. The zone is designed at creation time by the generating AI, which must reason about THIS object's nature and shape: what area a listener would stand or move in for the story to make sense. Illustrative examples, not a closed list: a square → its perimeter buffered ~20 m; a building → a circle of ~30 m; a whole village → its circumscribed circle; a street → a corridor along its full length; a river or embankment → a corridor along the stretch the story concerns; a fountain or monument → a small circle within sight; a viewpoint story about a distant object → the viewpoint, not the object. Stories written for driving carry an additional zone: a corridor along the road segment where playback is intended (~50 m each side)",
"items": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["CIRCLE", "POLYGON"], "description": "Zone geometry kind" },
"centerLat": { "type": "number", "description": "CIRCLE only: center latitude" },
"centerLon": { "type": "number", "description": "CIRCLE only: center longitude" },
"radius": { "type": "number", "description": "CIRCLE only: radius in meters" },
"geometry": { "type": "string", "description": "POLYGON only: WKT polygon string, lon-lat order" }
},
"required": ["type"],
"additionalProperties": false
}
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Movement mode the story was written for" },
"audioUri": { "type": "string", "description": "w3ds://file URI of the narrated audio" },
"audioDuration": { "type": "integer", "description": "Audio duration in seconds" },
"imageUris": { "type": "array", "items": { "type": "string" }, "description": "w3ds://file URIs of related photos" },
"sourceType": { "type": "string", "enum": ["generated", "translated", "derived"], "description": "generated = written from scratch by AI; translated = translation of an existing story; derived = based on existing content. Details of the source are in StoryProvenance" },
"license": { "type": "string", "description": "License of this content, e.g. 'proprietary-minstrel'" },
"provenanceRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the StoryProvenance record of this version. @<ename> is the owning entity's eName (stable), resolved to its current eVault via the registry" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" },
"isArchived": { "type": "boolean", "description": "Soft-delete flag" }
},
"required": ["id", "title", "text", "language", "location", "sourceType", "createdAt"],
"additionalProperties": false
}
34 changes: 34 additions & 0 deletions services/ontology/schemas/travelStoryPreferences.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "5a27dd19-8c2a-4b55-9be5-c7fae8e74530",
"title": "TravelStoryPreferences",
"domain": "travel",
"type": "object",
"description": "A person's taste profile for travel STORIES specifically: content languages, topics, depth and narration style, learned affinity to content providers. One envelope per person, updated in place. Deliberately narrow: general travel preferences (hotels, transport) do not belong here, and a person's free-form notes about plans and wishes belong in PersonalNote records, never in this envelope. The profile language of the person lives in User.inLanguage; contentLanguages here is the (possibly different) priority list for story content",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier; one envelope per person" },
"ownerEName": { "type": "string", "description": "@-prefixed eName of the person these preferences belong to" },
"contentLanguages": { "type": "array", "items": { "type": "string" }, "description": "Languages the person accepts story content in, priority order, BCP-47. Distinct from User.inLanguage (profile/interface language)" },
"interests": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person enjoys, e.g. 'architecture', 'food', 'street-art', 'history'" },
"avoidTopics": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person prefers to skip" },
"storyDepth": { "type": "string", "enum": ["short", "medium", "deep"], "description": "Preferred story length/detail level" },
"narrationStyle": { "type": "string", "description": "Free-form description of preferred narration style, e.g. 'ironic, no pathos'" },
"providerAffinity": {
"type": "array",
"description": "Learned per-person reputation of tmatic content providers",
"items": {
"type": "object",
"properties": {
"spaceId": { "type": "string", "format": "uuid", "description": "tmatic space (content provider) UUID" },
"score": { "type": "number", "minimum": -1, "maximum": 1, "description": "Affinity from -1 (avoid) to 1 (prefer)" }
},
"required": ["spaceId", "score"],
"additionalProperties": false
}
},
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" }
},
"required": ["id", "ownerEName", "createdAt"],
"additionalProperties": false
}
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
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
96 changes: 96 additions & 0 deletions services/ontology/schemas/storyListen.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "06025631-8e24-4d74-94d5-c7e99bc9f263",
"title": "StoryListen",
"domain": "travel",
"type": "object",
"description": "One playback of a story by a person. Lives on the listener's vault. Carries no copies of story fields (title, language live in the story itself) and no inline context (the context lives in the referenced StoryRequest). Exactly one of storyRef / tmaticStoryId identifies the story: storyRef for stories that exist as TravelStory envelopes, tmaticStoryId for stories from the tmatic.travel library, which is not yet on W3DS",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier of this listen event"
},
"listenerEName": {
"type": "string",
"description": "@-prefixed eName of the listener"
},
"storyRef": {
"type": "string",
"description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version played, for FWM-created stories"
},
"tmaticStoryId": {
"type": "string",
"format": "uuid",
"description": "tmatic.travel story UUID, for stories played from the tmatic library"
},
"tmaticLanguage": {
"type": "string",
"description": "BCP-47 tag of the tmatic language version played; only with tmaticStoryId (a tmatic story UUID covers all its language versions, so the pair identifies what was actually heard)"
},
"requestRef": {
"type": "string",
"description": "w3ds://envelope reference to the StoryRequest this playback answered"
},
"startedAt": {
"type": "string",
"format": "date-time",
"description": "Playback start, ISO 8601"
},
"completionRate": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Fraction of the audio actually listened to"
},
"rating": {
"type": "integer",
"minimum": 1,
"maximum": 5,
"description": "Listener's rating of this story, if given"
},
"feedbackText": {
"type": "string",
"description": "Free-form listener feedback, if given"
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Record creation timestamp, ISO 8601"
}
},
"required": [
"id",
"listenerEName",
"startedAt",
"createdAt"
],
"additionalProperties": false,
"oneOf": [
{
"required": [
"storyRef"
],
"not": {
"required": [
"tmaticStoryId"
]
}
},
{
"required": [
"tmaticStoryId"
],
"not": {
"required": [
"storyRef"
]
}
}
],
"dependencies": {
"tmaticLanguage": [
"tmaticStoryId"
]
}
}
33 changes: 33 additions & 0 deletions services/ontology/schemas/storyProvenance.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "52662185-59c1-44e5-8519-685796c70a96",
"title": "StoryProvenance",
"domain": "travel",
"type": "object",
"description": "How one TravelStory version came to be: who it was made for, where it was requested, which models produced it, and what it was translated or derived from. Lives next to the story on the content owner's vault. Language versions of one story are reconstructed through provenance: each translation's provenance points at the original version via originalStoryRef. Fields here record the immutable creation event; mutable facts stay in their own ontologies and are referenced",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this provenance record" },
"storyRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the TravelStory version this record describes" },
"requestedForEName": { "type": "string", "description": "@-prefixed eName of the person the story was originally created for" },
"requestRef": { "type": "string", "description": "w3ds://envelope reference to the StoryRequest that triggered creation (lives on the requester's vault)" },
"requestLocation": {
"type": "object",
"description": "Where the requester was at creation time, WGS84. An immutable event fact recorded at creation",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"textModel": { "type": "string", "description": "Model that wrote the text, e.g. 'claude-fable-5'" },
"voiceModel": { "type": "string", "description": "TTS model and voice, e.g. 'eleven_v3/<voiceId>'" },
"promptVersion": { "type": "string", "description": "Version tag of the prompt template used" },
"sourceTmaticStoryId": { "type": "string", "format": "uuid", "description": "tmatic.travel story UUID this version was translated or derived from, when the source is the tmatic library" },
"originalStoryRef": { "type": "string", "description": "w3ds://envelope reference to the TravelStory version this one was translated from, when the source is another FWM story version" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records used to identify the subject (e.g. vision reading of the user's photo)" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" }
},
"required": ["id", "storyRef", "createdAt"],
"additionalProperties": false
}
30 changes: 30 additions & 0 deletions services/ontology/schemas/storyRequest.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "d40d3da4-0999-444a-b23a-9f964a96c964",
"title": "StoryRequest",
"domain": "travel",
"type": "object",
"description": "The context of one story request: a person pressed geo/camera/microphone (or accepted a suggestion) at a place and moment. Lives on the requester's vault. Referenced by StoryListen (what context a story was played in) and by StoryProvenance (what context a story was created in) — the context is written once here, never copied. Machine readings of the request's inputs (photo vision, voice transcript) are FileExtraction records, referenced via extractionRefs",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this request" },
"requesterEName": { "type": "string", "description": "@-prefixed eName of the person who made the request" },
"entryMode": { "type": "string", "enum": ["geo", "camera", "voice", "suggestion"], "description": "How the request was initiated: geo button, camera shot, voice query, or an accepted in-app suggestion" },
"location": {
"type": "object",
"description": "Where the requester was, WGS84",
"properties": {
"lat": { "type": "number", "description": "Latitude" },
"lon": { "type": "number", "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Detected movement mode at request time" },
"queryText": { "type": "string", "description": "The voice query as text, when entryMode=voice and no FileExtraction transcript record was kept; when one was, reference it via extractionRefs instead of copying" },
"photoFileRef": { "type": "string", "description": "w3ds://file URI of the photo taken, when entryMode=camera" },
"extractionRefs": { "type": "array", "items": { "type": "string" }, "description": "w3ds://envelope references to FileExtraction records made from this request's inputs (vision reading of the photo, transcript of the voice query)" },
"requestedAt": { "type": "string", "format": "date-time", "description": "Request timestamp, ISO 8601" }
},
"required": ["id", "requesterEName", "entryMode", "requestedAt"],
"additionalProperties": false
}
53 changes: 53 additions & 0 deletions services/ontology/schemas/travelStory.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "ba56d2d3-e6bf-4bfd-ac75-6436c56be76f",
"title": "TravelStory",
"domain": "travel",
"type": "object",
"description": "One language version of a location-bound story for travellers. Each language version is its own envelope; versions of the same story are linked through their StoryProvenance records, never by copying fields. Everything about HOW the story came to be (who requested it, where, which models wrote and voiced it, what it was translated from) lives in the referenced StoryProvenance envelope, not here.",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier of this story version" },
"title": { "type": "string", "description": "Story title in the story language" },
"text": { "type": "string", "description": "Full story text (plain text, no HTML)" },
"language": { "type": "string", "description": "BCP-47 language tag of this version, e.g. 'ru', 'en', 'nl'" },
"subjectName": { "type": "string", "description": "Name of the object/place the story is about, e.g. 'Sint-Janskerk, Maastricht'. Interim field: once landmark entities get their own w3ids, the story-to-object link moves to a dedicated M:N relation and this stays only as a display hint" },
"location": {
"type": "object",
"description": "Anchor point of the story subject, WGS84",
"properties": {
"lat": { "type": "number", "minimum": -90, "maximum": 90, "description": "Latitude" },
"lon": { "type": "number", "minimum": -180, "maximum": 180, "description": "Longitude" }
},
"required": ["lat", "lon"],
"additionalProperties": false
},
"triggerZones": {
"type": "array",
"description": "Zones where this story is relevant to play, following tmatic.travel zone semantics. The zone is designed at creation time by the generating AI, which must reason about THIS object's nature and shape: what area a listener would stand or move in for the story to make sense. Illustrative examples, not a closed list: a square → its perimeter buffered ~20 m; a building → a circle of ~30 m; a whole village → its circumscribed circle; a street → a corridor along its full length; a river or embankment → a corridor along the stretch the story concerns; a fountain or monument → a small circle within sight; a viewpoint story about a distant object → the viewpoint, not the object. Stories written for driving carry an additional zone: a corridor along the road segment where playback is intended (~50 m each side)",
"items": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["CIRCLE", "POLYGON"], "description": "Zone geometry kind" },
"centerLat": { "type": "number", "description": "CIRCLE only: center latitude" },
"centerLon": { "type": "number", "description": "CIRCLE only: center longitude" },
"radius": { "type": "number", "description": "CIRCLE only: radius in meters" },
"geometry": { "type": "string", "description": "POLYGON only: WKT polygon string, lon-lat order" }
},
"required": ["type"],
"additionalProperties": false
}
},
"modality": { "type": "string", "enum": ["walking", "cycling", "driving", "boat"], "description": "Movement mode the story was written for" },
"audioUri": { "type": "string", "description": "w3ds://file URI of the narrated audio" },
"audioDuration": { "type": "integer", "description": "Audio duration in seconds" },
"imageUris": { "type": "array", "items": { "type": "string" }, "description": "w3ds://file URIs of related photos" },
"sourceType": { "type": "string", "enum": ["generated", "translated", "derived"], "description": "generated = written from scratch by AI; translated = translation of an existing story; derived = based on existing content. Details of the source are in StoryProvenance" },
"license": { "type": "string", "description": "License of this content, e.g. 'proprietary-minstrel'" },
"provenanceRef": { "type": "string", "description": "w3ds://envelope?id=@<ename>/<metaEnvelopeId> reference to the StoryProvenance record of this version. @<ename> is the owning entity's eName (stable), resolved to its current eVault via the registry" },
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" },
"isArchived": { "type": "boolean", "description": "Soft-delete flag" }
},
"required": ["id", "title", "text", "language", "location", "sourceType", "createdAt"],
"additionalProperties": false
}
34 changes: 34 additions & 0 deletions services/ontology/schemas/travelStoryPreferences.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"schemaId": "5a27dd19-8c2a-4b55-9be5-c7fae8e74530",
"title": "TravelStoryPreferences",
"domain": "travel",
"type": "object",
"description": "A person's taste profile for travel STORIES specifically: content languages, topics, depth and narration style, learned affinity to content providers. One envelope per person, updated in place. Deliberately narrow: general travel preferences (hotels, transport) do not belong here, and a person's free-form notes about plans and wishes belong in PersonalNote records, never in this envelope. The profile language of the person lives in User.inLanguage; contentLanguages here is the (possibly different) priority list for story content",
"properties": {
"id": { "type": "string", "format": "uuid", "description": "Unique identifier; one envelope per person" },
"ownerEName": { "type": "string", "description": "@-prefixed eName of the person these preferences belong to" },
"contentLanguages": { "type": "array", "items": { "type": "string" }, "description": "Languages the person accepts story content in, priority order, BCP-47. Distinct from User.inLanguage (profile/interface language)" },
"interests": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person enjoys, e.g. 'architecture', 'food', 'street-art', 'history'" },
"avoidTopics": { "type": "array", "items": { "type": "string" }, "description": "Story topics the person prefers to skip" },
"storyDepth": { "type": "string", "enum": ["short", "medium", "deep"], "description": "Preferred story length/detail level" },
"narrationStyle": { "type": "string", "description": "Free-form description of preferred narration style, e.g. 'ironic, no pathos'" },
"providerAffinity": {
"type": "array",
"description": "Learned per-person reputation of tmatic content providers",
"items": {
"type": "object",
"properties": {
"spaceId": { "type": "string", "format": "uuid", "description": "tmatic space (content provider) UUID" },
"score": { "type": "number", "minimum": -1, "maximum": 1, "description": "Affinity from -1 (avoid) to 1 (prefer)" }
},
"required": ["spaceId", "score"],
"additionalProperties": false
}
},
"createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp, ISO 8601" },
"updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp, ISO 8601" }
},
"required": ["id", "ownerEName", "createdAt"],
"additionalProperties": false
}
Loading