restore: import verified wave3 baseline
This commit is contained in:
@@ -1 +1 @@
|
||||
374a325cf1198df128248876fe7f115b41b899777a89609f87cb4ba9e2958239
|
||||
25441c099be603f4bcbe46079868ef851fded230d8bcda6dd627a027d80ba78c
|
||||
|
||||
@@ -2,17 +2,22 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "AppInfo",
|
||||
"type": "object",
|
||||
"required": ["name", "version", "contractVersion"],
|
||||
"properties": {
|
||||
"contractVersion": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"version": {
|
||||
"type": "string"
|
||||
},
|
||||
"contractVersion": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
"required": [
|
||||
"name",
|
||||
"version",
|
||||
"contractVersion"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,6 +2,58 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "CharacterCard",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"boundaries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"default_expression": {
|
||||
"type": "string"
|
||||
},
|
||||
"header": {
|
||||
"$ref": "#/$defs/ResourceHeader"
|
||||
},
|
||||
"identity": {
|
||||
"type": "string"
|
||||
},
|
||||
"initial_relationship": {
|
||||
"$ref": "#/$defs/RelationshipAxes"
|
||||
},
|
||||
"judgment_rules": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/CharacterJudgmentRule"
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"personality": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"skills": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/SkillValue"
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"$ref": "#/$defs/CharacterStyle"
|
||||
},
|
||||
"values": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"header",
|
||||
"name",
|
||||
@@ -11,54 +63,233 @@
|
||||
"boundaries",
|
||||
"style",
|
||||
"initial_relationship",
|
||||
"judgment_rules",
|
||||
"skills",
|
||||
"default_expression"
|
||||
],
|
||||
"properties": {
|
||||
"header": {
|
||||
"$ref": "resource-header.schema.json"
|
||||
"$defs": {
|
||||
"CharacterJudgmentRule": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"meaning": {
|
||||
"type": "string"
|
||||
},
|
||||
"relationship_effects": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/RelationshipAdjustment"
|
||||
}
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"tags",
|
||||
"meaning"
|
||||
]
|
||||
},
|
||||
"name": {
|
||||
"CharacterStyle": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"forbidden_player_assumptions": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"mannerisms": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"speech": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"speech"
|
||||
]
|
||||
},
|
||||
"RelationshipAdjustment": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cause": {
|
||||
"type": "string"
|
||||
},
|
||||
"delta": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"maximum": 32767,
|
||||
"minimum": -32768
|
||||
},
|
||||
"dimension": {
|
||||
"$ref": "#/$defs/RelationshipDimension"
|
||||
},
|
||||
"judgment_rule": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"dimension",
|
||||
"delta",
|
||||
"cause"
|
||||
]
|
||||
},
|
||||
"RelationshipAxes": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"affinity": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"maximum": 32767,
|
||||
"minimum": -32768
|
||||
},
|
||||
"attachment": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"maximum": 32767,
|
||||
"minimum": -32768
|
||||
},
|
||||
"hope": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"maximum": 32767,
|
||||
"minimum": -32768
|
||||
},
|
||||
"intimacy": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"maximum": 32767,
|
||||
"minimum": -32768
|
||||
},
|
||||
"respect": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"maximum": 32767,
|
||||
"minimum": -32768
|
||||
},
|
||||
"trust": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"maximum": 32767,
|
||||
"minimum": -32768
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"affinity",
|
||||
"trust",
|
||||
"hope",
|
||||
"respect",
|
||||
"intimacy",
|
||||
"attachment"
|
||||
]
|
||||
},
|
||||
"RelationshipDimension": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"enum": [
|
||||
"affinity",
|
||||
"trust",
|
||||
"hope",
|
||||
"respect",
|
||||
"intimacy",
|
||||
"attachment"
|
||||
]
|
||||
},
|
||||
"identity": {
|
||||
"ResourceHeader": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content_hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/ResourceRef"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/ResourceKind"
|
||||
},
|
||||
"revision": {
|
||||
"type": "string"
|
||||
},
|
||||
"schema_version": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"schema_version",
|
||||
"revision",
|
||||
"content_hash"
|
||||
]
|
||||
},
|
||||
"ResourceKind": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"enum": [
|
||||
"character",
|
||||
"world_book",
|
||||
"persona",
|
||||
"plot_module",
|
||||
"item_spec"
|
||||
]
|
||||
},
|
||||
"personality": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
"ResourceRef": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content_hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/ResourceKind"
|
||||
},
|
||||
"revision": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"revision",
|
||||
"content_hash"
|
||||
]
|
||||
},
|
||||
"values": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"boundaries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"type": "object"
|
||||
},
|
||||
"initial_relationship": {
|
||||
"type": "object"
|
||||
},
|
||||
"judgment_rules": {
|
||||
"type": "array"
|
||||
},
|
||||
"skills": {
|
||||
"type": "array"
|
||||
},
|
||||
"default_expression": {
|
||||
"type": "string"
|
||||
"SkillValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"skill": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"maximum": 255,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"skill",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,42 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "DemoPackSummary",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"characters": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0
|
||||
},
|
||||
"displayName": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"itemSpecs": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0
|
||||
},
|
||||
"personas": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0
|
||||
},
|
||||
"plotModules": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0
|
||||
},
|
||||
"revision": {
|
||||
"type": "string"
|
||||
},
|
||||
"worldBooks": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"displayName",
|
||||
@@ -11,32 +47,5 @@
|
||||
"personas",
|
||||
"plotModules",
|
||||
"itemSpecs"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"displayName": {
|
||||
"type": "string"
|
||||
},
|
||||
"revision": {
|
||||
"type": "string"
|
||||
},
|
||||
"characters": {
|
||||
"type": "integer"
|
||||
},
|
||||
"worldBooks": {
|
||||
"type": "integer"
|
||||
},
|
||||
"personas": {
|
||||
"type": "integer"
|
||||
},
|
||||
"plotModules": {
|
||||
"type": "integer"
|
||||
},
|
||||
"itemSpecs": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,37 +2,143 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "ItemSpec",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"header": {
|
||||
"$ref": "#/$defs/ResourceHeader"
|
||||
},
|
||||
"hidden_facts": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"lore_refs": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"mechanics": {
|
||||
"$ref": "#/$defs/ItemMechanics"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"header",
|
||||
"name",
|
||||
"description",
|
||||
"tags",
|
||||
"lore_refs",
|
||||
"mechanics",
|
||||
"hidden_facts"
|
||||
"mechanics"
|
||||
],
|
||||
"properties": {
|
||||
"header": {
|
||||
"$ref": "resource-header.schema.json"
|
||||
"$defs": {
|
||||
"ItemMechanics": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"check_modifier": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "int8",
|
||||
"maximum": 127,
|
||||
"minimum": -128
|
||||
},
|
||||
"grants_tags": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"usable": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"usable"
|
||||
]
|
||||
},
|
||||
"name": {
|
||||
"ResourceHeader": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content_hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/ResourceRef"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/ResourceKind"
|
||||
},
|
||||
"revision": {
|
||||
"type": "string"
|
||||
},
|
||||
"schema_version": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"schema_version",
|
||||
"revision",
|
||||
"content_hash"
|
||||
]
|
||||
},
|
||||
"ResourceKind": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"enum": [
|
||||
"character",
|
||||
"world_book",
|
||||
"persona",
|
||||
"plot_module",
|
||||
"item_spec"
|
||||
]
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"type": "array"
|
||||
},
|
||||
"lore_refs": {
|
||||
"type": "array"
|
||||
},
|
||||
"mechanics": {
|
||||
"type": "object"
|
||||
},
|
||||
"hidden_facts": {
|
||||
"type": "array"
|
||||
"ResourceRef": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content_hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/ResourceKind"
|
||||
},
|
||||
"revision": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"revision",
|
||||
"content_hash"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,29 +2,130 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "Persona",
|
||||
"type": "object",
|
||||
"required": ["header", "name", "identity", "traits", "skills", "initial_items"],
|
||||
"properties": {
|
||||
"header": {
|
||||
"$ref": "resource-header.schema.json"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"$ref": "#/$defs/ResourceHeader"
|
||||
},
|
||||
"identity": {
|
||||
"type": "string"
|
||||
},
|
||||
"traits": {
|
||||
"type": "array"
|
||||
},
|
||||
"skills": {
|
||||
"type": "array"
|
||||
},
|
||||
"initial_items": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"skills": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/SkillValue"
|
||||
}
|
||||
},
|
||||
"traits": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"header",
|
||||
"name",
|
||||
"identity"
|
||||
],
|
||||
"$defs": {
|
||||
"ResourceHeader": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content_hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/ResourceRef"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/ResourceKind"
|
||||
},
|
||||
"revision": {
|
||||
"type": "string"
|
||||
},
|
||||
"schema_version": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"schema_version",
|
||||
"revision",
|
||||
"content_hash"
|
||||
]
|
||||
},
|
||||
"ResourceKind": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"character",
|
||||
"world_book",
|
||||
"persona",
|
||||
"plot_module",
|
||||
"item_spec"
|
||||
]
|
||||
},
|
||||
"ResourceRef": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content_hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/ResourceKind"
|
||||
},
|
||||
"revision": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"revision",
|
||||
"content_hash"
|
||||
]
|
||||
},
|
||||
"SkillValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"skill": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"maximum": 255,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"skill",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,87 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "PlayerView",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"beats": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/PresentationBeat"
|
||||
}
|
||||
},
|
||||
"branchId": {
|
||||
"type": "string"
|
||||
},
|
||||
"canContinue": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"characterExpression": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"characterName": {
|
||||
"type": "string"
|
||||
},
|
||||
"characterPose": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"history": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/HistoryNodeView"
|
||||
}
|
||||
},
|
||||
"inventory": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/PlayerItemView"
|
||||
}
|
||||
},
|
||||
"knowledge": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/PlayerKnowledgeView"
|
||||
}
|
||||
},
|
||||
"nodeId": {
|
||||
"type": "string"
|
||||
},
|
||||
"promises": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/PlayerPromiseView"
|
||||
}
|
||||
},
|
||||
"relationship": {
|
||||
"$ref": "#/$defs/RelationshipView"
|
||||
},
|
||||
"sceneId": {
|
||||
"type": "string"
|
||||
},
|
||||
"sceneTitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"storyId": {
|
||||
"type": "string"
|
||||
},
|
||||
"suggestions": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/ActionSuggestion"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"storyId",
|
||||
"nodeId",
|
||||
@@ -10,61 +91,292 @@
|
||||
"sceneTitle",
|
||||
"characterName",
|
||||
"beats",
|
||||
"suggestions",
|
||||
"inventory",
|
||||
"knowledge",
|
||||
"promises",
|
||||
"relationship",
|
||||
"history",
|
||||
"canContinue"
|
||||
],
|
||||
"properties": {
|
||||
"storyId": {
|
||||
"type": "string"
|
||||
"$defs": {
|
||||
"ActionSuggestion": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"draft": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"label": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"label",
|
||||
"draft"
|
||||
]
|
||||
},
|
||||
"nodeId": {
|
||||
"type": "string"
|
||||
"BeatKind": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"narration",
|
||||
"dialogue",
|
||||
"action",
|
||||
"system"
|
||||
]
|
||||
},
|
||||
"branchId": {
|
||||
"type": "string"
|
||||
"HistoryNodeView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"branchId": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"isCurrent": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"parentId": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"branchId",
|
||||
"label",
|
||||
"isCurrent"
|
||||
]
|
||||
},
|
||||
"sceneId": {
|
||||
"type": "string"
|
||||
"ItemPlacement": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"bag",
|
||||
"worn",
|
||||
"hand",
|
||||
"scene",
|
||||
"hidden"
|
||||
]
|
||||
},
|
||||
"sceneTitle": {
|
||||
"type": "string"
|
||||
"KnowledgeCertainty": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"suspected",
|
||||
"reported",
|
||||
"confirmed"
|
||||
]
|
||||
},
|
||||
"characterName": {
|
||||
"type": "string"
|
||||
"PlayerItemView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"condition": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"instanceId": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"placement": {
|
||||
"$ref": "#/$defs/ItemPlacement"
|
||||
},
|
||||
"quantity": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"instanceId",
|
||||
"name",
|
||||
"description",
|
||||
"quantity",
|
||||
"placement",
|
||||
"condition"
|
||||
]
|
||||
},
|
||||
"beats": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["id", "kind", "speaker", "text", "visual"]
|
||||
"PlayerKnowledgeView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"certainty": {
|
||||
"$ref": "#/$defs/KnowledgeCertainty"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"summary": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"summary",
|
||||
"certainty"
|
||||
]
|
||||
},
|
||||
"PlayerPromiseView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/$defs/PromiseStatus"
|
||||
},
|
||||
"weight": {
|
||||
"$ref": "#/$defs/PromiseWeight"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"content",
|
||||
"status",
|
||||
"weight"
|
||||
]
|
||||
},
|
||||
"PresentationBeat": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/BeatKind"
|
||||
},
|
||||
"speaker": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"visual": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/VisualDirective"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"text"
|
||||
]
|
||||
},
|
||||
"PromiseStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"proposed",
|
||||
"accepted",
|
||||
"fulfilled",
|
||||
"broken",
|
||||
"released",
|
||||
"impossible"
|
||||
]
|
||||
},
|
||||
"PromiseWeight": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"minor",
|
||||
"major"
|
||||
]
|
||||
},
|
||||
"RelationshipBand": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"distant",
|
||||
"guarded",
|
||||
"warming",
|
||||
"close",
|
||||
"bonded"
|
||||
]
|
||||
},
|
||||
"RelationshipView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"affinity": {
|
||||
"$ref": "#/$defs/RelationshipBand"
|
||||
},
|
||||
"attachment": {
|
||||
"$ref": "#/$defs/RelationshipBand"
|
||||
},
|
||||
"hope": {
|
||||
"$ref": "#/$defs/RelationshipBand"
|
||||
},
|
||||
"intimacy": {
|
||||
"$ref": "#/$defs/RelationshipBand"
|
||||
},
|
||||
"respect": {
|
||||
"$ref": "#/$defs/RelationshipBand"
|
||||
},
|
||||
"trust": {
|
||||
"$ref": "#/$defs/RelationshipBand"
|
||||
},
|
||||
"updatedAtNode": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"affinity",
|
||||
"trust",
|
||||
"hope",
|
||||
"respect",
|
||||
"intimacy",
|
||||
"attachment"
|
||||
]
|
||||
},
|
||||
"VisualDirective": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"character": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"expression": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"pose": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"scene": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"suggestions": {
|
||||
"type": "array"
|
||||
},
|
||||
"inventory": {
|
||||
"type": "array"
|
||||
},
|
||||
"knowledge": {
|
||||
"type": "array"
|
||||
},
|
||||
"promises": {
|
||||
"type": "array"
|
||||
},
|
||||
"relationship": {
|
||||
"type": "object"
|
||||
},
|
||||
"history": {
|
||||
"type": "array"
|
||||
},
|
||||
"canContinue": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,24 +2,719 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "PlotModule",
|
||||
"type": "object",
|
||||
"required": ["header", "name", "opening_event", "events"],
|
||||
"properties": {
|
||||
"header": {
|
||||
"$ref": "resource-header.schema.json"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"opening_event": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"events": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object"
|
||||
"$ref": "#/$defs/PlotEvent"
|
||||
}
|
||||
},
|
||||
"header": {
|
||||
"$ref": "#/$defs/ResourceHeader"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"opening_event": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"header",
|
||||
"name",
|
||||
"opening_event",
|
||||
"events"
|
||||
],
|
||||
"$defs": {
|
||||
"AcquisitionMode": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"initial",
|
||||
"found",
|
||||
"given",
|
||||
"borrowed",
|
||||
"stolen",
|
||||
"returned"
|
||||
]
|
||||
},
|
||||
"CheckDifficulty": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"regular",
|
||||
"hard",
|
||||
"extreme"
|
||||
]
|
||||
},
|
||||
"CheckRecord": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"actor": {
|
||||
"type": "string"
|
||||
},
|
||||
"bonus_dice": {
|
||||
"type": "integer",
|
||||
"format": "int8",
|
||||
"maximum": 127,
|
||||
"minimum": -128
|
||||
},
|
||||
"difficulty": {
|
||||
"$ref": "#/$defs/CheckDifficulty"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"node_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"pushed_from": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"result": {
|
||||
"$ref": "#/$defs/CheckResult"
|
||||
},
|
||||
"roll": {
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"maximum": 255,
|
||||
"minimum": 0
|
||||
},
|
||||
"skill": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"maximum": 255,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"action_id",
|
||||
"actor",
|
||||
"skill",
|
||||
"target",
|
||||
"difficulty",
|
||||
"bonus_dice",
|
||||
"roll",
|
||||
"result",
|
||||
"node_id"
|
||||
]
|
||||
},
|
||||
"CheckResult": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"critical_success",
|
||||
"extreme_success",
|
||||
"hard_success",
|
||||
"success",
|
||||
"failure",
|
||||
"fumble"
|
||||
]
|
||||
},
|
||||
"ItemAcquisition": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"at_node": {
|
||||
"type": "string"
|
||||
},
|
||||
"from": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mode": {
|
||||
"$ref": "#/$defs/AcquisitionMode"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"mode",
|
||||
"at_node"
|
||||
]
|
||||
},
|
||||
"ItemInstance": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"acquisition": {
|
||||
"$ref": "#/$defs/ItemAcquisition"
|
||||
},
|
||||
"condition": {
|
||||
"type": "string"
|
||||
},
|
||||
"holder": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner": {
|
||||
"type": "string"
|
||||
},
|
||||
"placement": {
|
||||
"$ref": "#/$defs/ItemPlacement"
|
||||
},
|
||||
"quantity": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
},
|
||||
"spec_ref": {
|
||||
"type": "string"
|
||||
},
|
||||
"state_tags": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"spec_ref",
|
||||
"owner",
|
||||
"holder",
|
||||
"placement",
|
||||
"quantity",
|
||||
"condition",
|
||||
"acquisition"
|
||||
]
|
||||
},
|
||||
"ItemPlacement": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"bag",
|
||||
"worn",
|
||||
"hand",
|
||||
"scene",
|
||||
"hidden"
|
||||
]
|
||||
},
|
||||
"KnowledgeCertainty": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"suspected",
|
||||
"reported",
|
||||
"confirmed"
|
||||
]
|
||||
},
|
||||
"KnowledgeRecord": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"certainty": {
|
||||
"$ref": "#/$defs/KnowledgeCertainty"
|
||||
},
|
||||
"fact": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_verified_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"learned_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"observer": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"subject": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"observer",
|
||||
"fact",
|
||||
"certainty",
|
||||
"source",
|
||||
"learned_at"
|
||||
]
|
||||
},
|
||||
"PlotEvent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"outcomes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/PlotOutcome"
|
||||
}
|
||||
},
|
||||
"pressures": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/PlotPressure"
|
||||
}
|
||||
},
|
||||
"required_flags": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"situation": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"tags",
|
||||
"situation",
|
||||
"outcomes"
|
||||
]
|
||||
},
|
||||
"PlotOutcome": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"effects": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/StateOp"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"description"
|
||||
]
|
||||
},
|
||||
"PlotPressure": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"clock_delta": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "uint16",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
},
|
||||
"clock_id": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"description"
|
||||
]
|
||||
},
|
||||
"Promise": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"accepted_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"promisee": {
|
||||
"type": "string"
|
||||
},
|
||||
"promiser": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolved_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/$defs/PromiseStatus"
|
||||
},
|
||||
"weight": {
|
||||
"$ref": "#/$defs/PromiseWeight"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"promiser",
|
||||
"promisee",
|
||||
"content",
|
||||
"status",
|
||||
"weight",
|
||||
"created_at"
|
||||
]
|
||||
},
|
||||
"PromiseStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"proposed",
|
||||
"accepted",
|
||||
"fulfilled",
|
||||
"broken",
|
||||
"released",
|
||||
"impossible"
|
||||
]
|
||||
},
|
||||
"PromiseWeight": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"minor",
|
||||
"major"
|
||||
]
|
||||
},
|
||||
"RelationshipAdjustment": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cause": {
|
||||
"type": "string"
|
||||
},
|
||||
"delta": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"maximum": 32767,
|
||||
"minimum": -32768
|
||||
},
|
||||
"dimension": {
|
||||
"$ref": "#/$defs/RelationshipDimension"
|
||||
},
|
||||
"judgment_rule": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"dimension",
|
||||
"delta",
|
||||
"cause"
|
||||
]
|
||||
},
|
||||
"RelationshipDimension": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"affinity",
|
||||
"trust",
|
||||
"hope",
|
||||
"respect",
|
||||
"intimacy",
|
||||
"attachment"
|
||||
]
|
||||
},
|
||||
"ResourceHeader": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content_hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/ResourceRef"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/ResourceKind"
|
||||
},
|
||||
"revision": {
|
||||
"type": "string"
|
||||
},
|
||||
"schema_version": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"schema_version",
|
||||
"revision",
|
||||
"content_hash"
|
||||
]
|
||||
},
|
||||
"ResourceKind": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"character",
|
||||
"world_book",
|
||||
"persona",
|
||||
"plot_module",
|
||||
"item_spec"
|
||||
]
|
||||
},
|
||||
"ResourceRef": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content_hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/ResourceKind"
|
||||
},
|
||||
"revision": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"revision",
|
||||
"content_hash"
|
||||
]
|
||||
},
|
||||
"StateOp": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "set_world_flag"
|
||||
},
|
||||
"value": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"key",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"adjustment": {
|
||||
"$ref": "#/$defs/RelationshipAdjustment"
|
||||
},
|
||||
"from": {
|
||||
"type": "string"
|
||||
},
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "adjust_relationship"
|
||||
},
|
||||
"to": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"from",
|
||||
"to",
|
||||
"adjustment"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "create_promise"
|
||||
},
|
||||
"promise": {
|
||||
"$ref": "#/$defs/Promise"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"promise"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "update_promise"
|
||||
},
|
||||
"promise_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolved_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/$defs/PromiseStatus"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"promise_id",
|
||||
"status"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "add_knowledge"
|
||||
},
|
||||
"record": {
|
||||
"$ref": "#/$defs/KnowledgeRecord"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"record"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"item": {
|
||||
"$ref": "#/$defs/ItemInstance"
|
||||
},
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "add_item"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"item"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"from": {
|
||||
"type": "string"
|
||||
},
|
||||
"item_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"mode": {
|
||||
"$ref": "#/$defs/AcquisitionMode"
|
||||
},
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "transfer_item"
|
||||
},
|
||||
"placement": {
|
||||
"$ref": "#/$defs/ItemPlacement"
|
||||
},
|
||||
"to": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"item_id",
|
||||
"from",
|
||||
"to",
|
||||
"placement",
|
||||
"mode"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"check": {
|
||||
"$ref": "#/$defs/CheckRecord"
|
||||
},
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "record_check"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"check"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"clock_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"delta": {
|
||||
"type": "integer",
|
||||
"format": "uint16",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
},
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "advance_clock"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"clock_id",
|
||||
"delta"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "PresentationSnapshot",
|
||||
"description": "Player-authorized presentation output committed with a [`StoryNode`].\n\nThe snapshot deliberately contains no runtime facts. Exact relationships,\nhidden checks, NPC knowledge and private inventory remain in `RuntimeState`\nand must pass through the normal `PlayerView` projection boundary.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"beats": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/PresentationBeat"
|
||||
}
|
||||
},
|
||||
"can_continue": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"character": {
|
||||
"$ref": "#/$defs/PresentationCharacter",
|
||||
"default": {
|
||||
"expression": null,
|
||||
"id": "",
|
||||
"name": "",
|
||||
"pose": null
|
||||
}
|
||||
},
|
||||
"scene": {
|
||||
"$ref": "#/$defs/PresentationScene",
|
||||
"default": {
|
||||
"id": "",
|
||||
"title": ""
|
||||
}
|
||||
},
|
||||
"suggestions": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/ActionSuggestion"
|
||||
}
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"ActionSuggestion": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"draft": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"label": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"label",
|
||||
"draft"
|
||||
]
|
||||
},
|
||||
"BeatKind": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"narration",
|
||||
"dialogue",
|
||||
"action",
|
||||
"system"
|
||||
]
|
||||
},
|
||||
"PresentationBeat": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/BeatKind"
|
||||
},
|
||||
"speaker": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"visual": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/VisualDirective"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"text"
|
||||
]
|
||||
},
|
||||
"PresentationCharacter": {
|
||||
"description": "Resolved public visual state for the primary character at a committed node.\n\n`expression` and `pose` are the final values after the node's beats have\nplayed. Persisting the resolved values means restoring a node does not need\nto replay an earlier branch to reconstruct the current portrait.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"expression": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"pose": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"default": null
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"name"
|
||||
]
|
||||
},
|
||||
"PresentationScene": {
|
||||
"description": "Public scene identity frozen at a committed story node.\n\nThis is presentation data, not authoritative world state. In particular it\nmust never contain unrevealed scene facts or trigger conditions.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title"
|
||||
]
|
||||
},
|
||||
"VisualDirective": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"character": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"expression": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"pose": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"scene": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,32 +2,72 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "ResourceHeader",
|
||||
"type": "object",
|
||||
"required": ["id", "kind", "schema_version", "revision", "content_hash", "dependencies"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9_]+(?:\\.[a-z0-9_]+)+$"
|
||||
},
|
||||
"kind": {
|
||||
"enum": ["character", "world_book", "persona", "plot_module", "item_spec"]
|
||||
},
|
||||
"schema_version": {
|
||||
"const": 1
|
||||
},
|
||||
"revision": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
|
||||
},
|
||||
"content_hash": {
|
||||
"type": "string",
|
||||
"pattern": "^sha256:[0-9a-f]{64}$"
|
||||
"type": "string"
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "object"
|
||||
"$ref": "#/$defs/ResourceRef"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/ResourceKind"
|
||||
},
|
||||
"revision": {
|
||||
"type": "string"
|
||||
},
|
||||
"schema_version": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"schema_version",
|
||||
"revision",
|
||||
"content_hash"
|
||||
],
|
||||
"$defs": {
|
||||
"ResourceKind": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"character",
|
||||
"world_book",
|
||||
"persona",
|
||||
"plot_module",
|
||||
"item_spec"
|
||||
]
|
||||
},
|
||||
"ResourceRef": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content_hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/ResourceKind"
|
||||
},
|
||||
"revision": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"revision",
|
||||
"content_hash"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,53 +2,470 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "RuntimeState",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"story_id",
|
||||
"current_node",
|
||||
"current_branch",
|
||||
"world_flags",
|
||||
"relationships",
|
||||
"relationship_states",
|
||||
"promises",
|
||||
"knowledge",
|
||||
"items",
|
||||
"clocks",
|
||||
"checks"
|
||||
],
|
||||
"properties": {
|
||||
"story_id": {
|
||||
"checks": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/CheckRecord"
|
||||
}
|
||||
},
|
||||
"clocks": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/ClockState"
|
||||
}
|
||||
},
|
||||
"current_branch": {
|
||||
"type": "string"
|
||||
},
|
||||
"current_node": {
|
||||
"type": "string"
|
||||
},
|
||||
"current_branch": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/ItemInstance"
|
||||
}
|
||||
},
|
||||
"knowledge": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/KnowledgeRecord"
|
||||
}
|
||||
},
|
||||
"promises": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/Promise"
|
||||
}
|
||||
},
|
||||
"relationship_states": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/RelationshipState"
|
||||
}
|
||||
},
|
||||
"relationships": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/RelationshipAxes"
|
||||
},
|
||||
"default": {}
|
||||
},
|
||||
"story_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"world_flags": {
|
||||
"type": "object"
|
||||
},
|
||||
"relationships": {
|
||||
"type": "object"
|
||||
},
|
||||
"relationship_states": {
|
||||
"type": "array"
|
||||
},
|
||||
"promises": {
|
||||
"type": "array"
|
||||
},
|
||||
"knowledge": {
|
||||
"type": "array"
|
||||
},
|
||||
"items": {
|
||||
"type": "array"
|
||||
},
|
||||
"clocks": {
|
||||
"type": "array"
|
||||
},
|
||||
"checks": {
|
||||
"type": "array"
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
"required": [
|
||||
"story_id",
|
||||
"current_node",
|
||||
"current_branch"
|
||||
],
|
||||
"$defs": {
|
||||
"AcquisitionMode": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"initial",
|
||||
"found",
|
||||
"given",
|
||||
"borrowed",
|
||||
"stolen",
|
||||
"returned"
|
||||
]
|
||||
},
|
||||
"CheckDifficulty": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"regular",
|
||||
"hard",
|
||||
"extreme"
|
||||
]
|
||||
},
|
||||
"CheckRecord": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"actor": {
|
||||
"type": "string"
|
||||
},
|
||||
"bonus_dice": {
|
||||
"type": "integer",
|
||||
"format": "int8",
|
||||
"maximum": 127,
|
||||
"minimum": -128
|
||||
},
|
||||
"difficulty": {
|
||||
"$ref": "#/$defs/CheckDifficulty"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"node_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"pushed_from": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"result": {
|
||||
"$ref": "#/$defs/CheckResult"
|
||||
},
|
||||
"roll": {
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"maximum": 255,
|
||||
"minimum": 0
|
||||
},
|
||||
"skill": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"maximum": 255,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"action_id",
|
||||
"actor",
|
||||
"skill",
|
||||
"target",
|
||||
"difficulty",
|
||||
"bonus_dice",
|
||||
"roll",
|
||||
"result",
|
||||
"node_id"
|
||||
]
|
||||
},
|
||||
"CheckResult": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"critical_success",
|
||||
"extreme_success",
|
||||
"hard_success",
|
||||
"success",
|
||||
"failure",
|
||||
"fumble"
|
||||
]
|
||||
},
|
||||
"ClockState": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"max": {
|
||||
"type": "integer",
|
||||
"format": "uint16",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
},
|
||||
"value": {
|
||||
"type": "integer",
|
||||
"format": "uint16",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"label",
|
||||
"value",
|
||||
"max"
|
||||
]
|
||||
},
|
||||
"ItemAcquisition": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"at_node": {
|
||||
"type": "string"
|
||||
},
|
||||
"from": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mode": {
|
||||
"$ref": "#/$defs/AcquisitionMode"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"mode",
|
||||
"at_node"
|
||||
]
|
||||
},
|
||||
"ItemInstance": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"acquisition": {
|
||||
"$ref": "#/$defs/ItemAcquisition"
|
||||
},
|
||||
"condition": {
|
||||
"type": "string"
|
||||
},
|
||||
"holder": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner": {
|
||||
"type": "string"
|
||||
},
|
||||
"placement": {
|
||||
"$ref": "#/$defs/ItemPlacement"
|
||||
},
|
||||
"quantity": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
},
|
||||
"spec_ref": {
|
||||
"type": "string"
|
||||
},
|
||||
"state_tags": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"spec_ref",
|
||||
"owner",
|
||||
"holder",
|
||||
"placement",
|
||||
"quantity",
|
||||
"condition",
|
||||
"acquisition"
|
||||
]
|
||||
},
|
||||
"ItemPlacement": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"bag",
|
||||
"worn",
|
||||
"hand",
|
||||
"scene",
|
||||
"hidden"
|
||||
]
|
||||
},
|
||||
"KnowledgeCertainty": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"suspected",
|
||||
"reported",
|
||||
"confirmed"
|
||||
]
|
||||
},
|
||||
"KnowledgeRecord": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"certainty": {
|
||||
"$ref": "#/$defs/KnowledgeCertainty"
|
||||
},
|
||||
"fact": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_verified_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"learned_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"observer": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"subject": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"observer",
|
||||
"fact",
|
||||
"certainty",
|
||||
"source",
|
||||
"learned_at"
|
||||
]
|
||||
},
|
||||
"Promise": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"accepted_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"promisee": {
|
||||
"type": "string"
|
||||
},
|
||||
"promiser": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolved_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/$defs/PromiseStatus"
|
||||
},
|
||||
"weight": {
|
||||
"$ref": "#/$defs/PromiseWeight"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"promiser",
|
||||
"promisee",
|
||||
"content",
|
||||
"status",
|
||||
"weight",
|
||||
"created_at"
|
||||
]
|
||||
},
|
||||
"PromiseStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"proposed",
|
||||
"accepted",
|
||||
"fulfilled",
|
||||
"broken",
|
||||
"released",
|
||||
"impossible"
|
||||
]
|
||||
},
|
||||
"PromiseWeight": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"minor",
|
||||
"major"
|
||||
]
|
||||
},
|
||||
"RelationshipAxes": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"affinity": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"maximum": 32767,
|
||||
"minimum": -32768
|
||||
},
|
||||
"attachment": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"maximum": 32767,
|
||||
"minimum": -32768
|
||||
},
|
||||
"hope": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"maximum": 32767,
|
||||
"minimum": -32768
|
||||
},
|
||||
"intimacy": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"maximum": 32767,
|
||||
"minimum": -32768
|
||||
},
|
||||
"respect": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"maximum": 32767,
|
||||
"minimum": -32768
|
||||
},
|
||||
"trust": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"maximum": 32767,
|
||||
"minimum": -32768
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"affinity",
|
||||
"trust",
|
||||
"hope",
|
||||
"respect",
|
||||
"intimacy",
|
||||
"attachment"
|
||||
]
|
||||
},
|
||||
"RelationshipState": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"source_node": {
|
||||
"type": "string"
|
||||
},
|
||||
"tag": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"tag",
|
||||
"description",
|
||||
"source_node",
|
||||
"active"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,45 +1,749 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "StoryNode",
|
||||
"description": "An immutable branch event with its state delta and player-facing presentation.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"story_id",
|
||||
"branch_id",
|
||||
"parent_id",
|
||||
"action_id",
|
||||
"user_input",
|
||||
"beats",
|
||||
"delta",
|
||||
"state_hash"
|
||||
],
|
||||
"properties": {
|
||||
"action_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"beats": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/PresentationBeat"
|
||||
}
|
||||
},
|
||||
"branch_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"can_continue": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"character": {
|
||||
"$ref": "#/$defs/PresentationCharacter",
|
||||
"default": {
|
||||
"expression": null,
|
||||
"id": "",
|
||||
"name": "",
|
||||
"pose": null
|
||||
}
|
||||
},
|
||||
"delta": {
|
||||
"$ref": "#/$defs/StateDelta"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"parent_id": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"scene": {
|
||||
"$ref": "#/$defs/PresentationScene",
|
||||
"default": {
|
||||
"id": "",
|
||||
"title": ""
|
||||
}
|
||||
},
|
||||
"state_hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"story_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"branch_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"parent_id": {
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"action_id": {
|
||||
"type": "string"
|
||||
"suggestions": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/ActionSuggestion"
|
||||
}
|
||||
},
|
||||
"user_input": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"story_id",
|
||||
"branch_id",
|
||||
"action_id",
|
||||
"user_input",
|
||||
"delta",
|
||||
"state_hash"
|
||||
],
|
||||
"$defs": {
|
||||
"AcquisitionMode": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"initial",
|
||||
"found",
|
||||
"given",
|
||||
"borrowed",
|
||||
"stolen",
|
||||
"returned"
|
||||
]
|
||||
},
|
||||
"beats": {
|
||||
"type": "array"
|
||||
"ActionSuggestion": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"draft": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"label": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"label",
|
||||
"draft"
|
||||
]
|
||||
},
|
||||
"delta": {
|
||||
"type": "object"
|
||||
"BeatKind": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"narration",
|
||||
"dialogue",
|
||||
"action",
|
||||
"system"
|
||||
]
|
||||
},
|
||||
"state_hash": {
|
||||
"type": "string"
|
||||
"CheckDifficulty": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"regular",
|
||||
"hard",
|
||||
"extreme"
|
||||
]
|
||||
},
|
||||
"CheckRecord": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"actor": {
|
||||
"type": "string"
|
||||
},
|
||||
"bonus_dice": {
|
||||
"type": "integer",
|
||||
"format": "int8",
|
||||
"maximum": 127,
|
||||
"minimum": -128
|
||||
},
|
||||
"difficulty": {
|
||||
"$ref": "#/$defs/CheckDifficulty"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"node_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"pushed_from": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"result": {
|
||||
"$ref": "#/$defs/CheckResult"
|
||||
},
|
||||
"roll": {
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"maximum": 255,
|
||||
"minimum": 0
|
||||
},
|
||||
"skill": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"maximum": 255,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"action_id",
|
||||
"actor",
|
||||
"skill",
|
||||
"target",
|
||||
"difficulty",
|
||||
"bonus_dice",
|
||||
"roll",
|
||||
"result",
|
||||
"node_id"
|
||||
]
|
||||
},
|
||||
"CheckResult": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"critical_success",
|
||||
"extreme_success",
|
||||
"hard_success",
|
||||
"success",
|
||||
"failure",
|
||||
"fumble"
|
||||
]
|
||||
},
|
||||
"ItemAcquisition": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"at_node": {
|
||||
"type": "string"
|
||||
},
|
||||
"from": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mode": {
|
||||
"$ref": "#/$defs/AcquisitionMode"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"mode",
|
||||
"at_node"
|
||||
]
|
||||
},
|
||||
"ItemInstance": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"acquisition": {
|
||||
"$ref": "#/$defs/ItemAcquisition"
|
||||
},
|
||||
"condition": {
|
||||
"type": "string"
|
||||
},
|
||||
"holder": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner": {
|
||||
"type": "string"
|
||||
},
|
||||
"placement": {
|
||||
"$ref": "#/$defs/ItemPlacement"
|
||||
},
|
||||
"quantity": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
},
|
||||
"spec_ref": {
|
||||
"type": "string"
|
||||
},
|
||||
"state_tags": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"spec_ref",
|
||||
"owner",
|
||||
"holder",
|
||||
"placement",
|
||||
"quantity",
|
||||
"condition",
|
||||
"acquisition"
|
||||
]
|
||||
},
|
||||
"ItemPlacement": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"bag",
|
||||
"worn",
|
||||
"hand",
|
||||
"scene",
|
||||
"hidden"
|
||||
]
|
||||
},
|
||||
"KnowledgeCertainty": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"suspected",
|
||||
"reported",
|
||||
"confirmed"
|
||||
]
|
||||
},
|
||||
"KnowledgeRecord": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"certainty": {
|
||||
"$ref": "#/$defs/KnowledgeCertainty"
|
||||
},
|
||||
"fact": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_verified_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"learned_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"observer": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"subject": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"observer",
|
||||
"fact",
|
||||
"certainty",
|
||||
"source",
|
||||
"learned_at"
|
||||
]
|
||||
},
|
||||
"PresentationBeat": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/BeatKind"
|
||||
},
|
||||
"speaker": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"visual": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/VisualDirective"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"text"
|
||||
]
|
||||
},
|
||||
"PresentationCharacter": {
|
||||
"description": "Resolved public visual state for the primary character at a committed node.\n\n`expression` and `pose` are the final values after the node's beats have\nplayed. Persisting the resolved values means restoring a node does not need\nto replay an earlier branch to reconstruct the current portrait.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"expression": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"pose": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"default": null
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"name"
|
||||
]
|
||||
},
|
||||
"PresentationScene": {
|
||||
"description": "Public scene identity frozen at a committed story node.\n\nThis is presentation data, not authoritative world state. In particular it\nmust never contain unrevealed scene facts or trigger conditions.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title"
|
||||
]
|
||||
},
|
||||
"Promise": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"accepted_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"promisee": {
|
||||
"type": "string"
|
||||
},
|
||||
"promiser": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolved_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/$defs/PromiseStatus"
|
||||
},
|
||||
"weight": {
|
||||
"$ref": "#/$defs/PromiseWeight"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"promiser",
|
||||
"promisee",
|
||||
"content",
|
||||
"status",
|
||||
"weight",
|
||||
"created_at"
|
||||
]
|
||||
},
|
||||
"PromiseStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"proposed",
|
||||
"accepted",
|
||||
"fulfilled",
|
||||
"broken",
|
||||
"released",
|
||||
"impossible"
|
||||
]
|
||||
},
|
||||
"PromiseWeight": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"minor",
|
||||
"major"
|
||||
]
|
||||
},
|
||||
"RelationshipAdjustment": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cause": {
|
||||
"type": "string"
|
||||
},
|
||||
"delta": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"maximum": 32767,
|
||||
"minimum": -32768
|
||||
},
|
||||
"dimension": {
|
||||
"$ref": "#/$defs/RelationshipDimension"
|
||||
},
|
||||
"judgment_rule": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"dimension",
|
||||
"delta",
|
||||
"cause"
|
||||
]
|
||||
},
|
||||
"RelationshipDimension": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"affinity",
|
||||
"trust",
|
||||
"hope",
|
||||
"respect",
|
||||
"intimacy",
|
||||
"attachment"
|
||||
]
|
||||
},
|
||||
"StateDelta": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ops": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/StateOp"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"StateOp": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "set_world_flag"
|
||||
},
|
||||
"value": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"key",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"adjustment": {
|
||||
"$ref": "#/$defs/RelationshipAdjustment"
|
||||
},
|
||||
"from": {
|
||||
"type": "string"
|
||||
},
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "adjust_relationship"
|
||||
},
|
||||
"to": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"from",
|
||||
"to",
|
||||
"adjustment"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "create_promise"
|
||||
},
|
||||
"promise": {
|
||||
"$ref": "#/$defs/Promise"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"promise"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "update_promise"
|
||||
},
|
||||
"promise_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolved_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/$defs/PromiseStatus"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"promise_id",
|
||||
"status"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "add_knowledge"
|
||||
},
|
||||
"record": {
|
||||
"$ref": "#/$defs/KnowledgeRecord"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"record"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"item": {
|
||||
"$ref": "#/$defs/ItemInstance"
|
||||
},
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "add_item"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"item"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"from": {
|
||||
"type": "string"
|
||||
},
|
||||
"item_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"mode": {
|
||||
"$ref": "#/$defs/AcquisitionMode"
|
||||
},
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "transfer_item"
|
||||
},
|
||||
"placement": {
|
||||
"$ref": "#/$defs/ItemPlacement"
|
||||
},
|
||||
"to": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"item_id",
|
||||
"from",
|
||||
"to",
|
||||
"placement",
|
||||
"mode"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"check": {
|
||||
"$ref": "#/$defs/CheckRecord"
|
||||
},
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "record_check"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"check"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"clock_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"delta": {
|
||||
"type": "integer",
|
||||
"format": "uint16",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
},
|
||||
"op": {
|
||||
"type": "string",
|
||||
"const": "advance_clock"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"op",
|
||||
"clock_id",
|
||||
"delta"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"VisualDirective": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"character": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"expression": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"pose": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"scene": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,25 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "TurnFailure",
|
||||
"type": "object",
|
||||
"required": ["code", "message", "retryable"],
|
||||
"properties": {
|
||||
"code": {
|
||||
"$ref": "#/$defs/TurnFailureCode"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"retryable": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"code",
|
||||
"message",
|
||||
"retryable"
|
||||
],
|
||||
"$defs": {
|
||||
"TurnFailureCode": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"stale_node",
|
||||
"invalid_input",
|
||||
@@ -14,13 +30,6 @@
|
||||
"timed_out",
|
||||
"internal"
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"retryable": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,16 +2,8 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "TurnRequest",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"storyId",
|
||||
"branchId",
|
||||
"expectedNodeId",
|
||||
"actionId",
|
||||
"intent",
|
||||
"input"
|
||||
],
|
||||
"properties": {
|
||||
"storyId": {
|
||||
"actionId": {
|
||||
"type": "string"
|
||||
},
|
||||
"branchId": {
|
||||
@@ -20,15 +12,33 @@
|
||||
"expectedNodeId": {
|
||||
"type": "string"
|
||||
},
|
||||
"actionId": {
|
||||
"input": {
|
||||
"type": "string"
|
||||
},
|
||||
"intent": {
|
||||
"enum": ["speak_or_act", "continue", "regenerate", "push_check"]
|
||||
"$ref": "#/$defs/TurnIntent"
|
||||
},
|
||||
"input": {
|
||||
"storyId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
"required": [
|
||||
"storyId",
|
||||
"branchId",
|
||||
"expectedNodeId",
|
||||
"actionId",
|
||||
"intent",
|
||||
"input"
|
||||
],
|
||||
"$defs": {
|
||||
"TurnIntent": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"speak_or_act",
|
||||
"continue",
|
||||
"regenerate",
|
||||
"push_check"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,396 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "TurnResult",
|
||||
"type": "object",
|
||||
"required": ["committedNodeId", "playerView"],
|
||||
"properties": {
|
||||
"committedNodeId": {
|
||||
"type": "string"
|
||||
},
|
||||
"playerView": {
|
||||
"$ref": "player-view.schema.json"
|
||||
"$ref": "#/$defs/PlayerView"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
"required": [
|
||||
"committedNodeId",
|
||||
"playerView"
|
||||
],
|
||||
"$defs": {
|
||||
"ActionSuggestion": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"draft": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"label": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"label",
|
||||
"draft"
|
||||
]
|
||||
},
|
||||
"BeatKind": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"narration",
|
||||
"dialogue",
|
||||
"action",
|
||||
"system"
|
||||
]
|
||||
},
|
||||
"HistoryNodeView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"branchId": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"isCurrent": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"parentId": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"branchId",
|
||||
"label",
|
||||
"isCurrent"
|
||||
]
|
||||
},
|
||||
"ItemPlacement": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"bag",
|
||||
"worn",
|
||||
"hand",
|
||||
"scene",
|
||||
"hidden"
|
||||
]
|
||||
},
|
||||
"KnowledgeCertainty": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"suspected",
|
||||
"reported",
|
||||
"confirmed"
|
||||
]
|
||||
},
|
||||
"PlayerItemView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"condition": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"instanceId": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"placement": {
|
||||
"$ref": "#/$defs/ItemPlacement"
|
||||
},
|
||||
"quantity": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"instanceId",
|
||||
"name",
|
||||
"description",
|
||||
"quantity",
|
||||
"placement",
|
||||
"condition"
|
||||
]
|
||||
},
|
||||
"PlayerKnowledgeView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"certainty": {
|
||||
"$ref": "#/$defs/KnowledgeCertainty"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"summary": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"summary",
|
||||
"certainty"
|
||||
]
|
||||
},
|
||||
"PlayerPromiseView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/$defs/PromiseStatus"
|
||||
},
|
||||
"weight": {
|
||||
"$ref": "#/$defs/PromiseWeight"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"content",
|
||||
"status",
|
||||
"weight"
|
||||
]
|
||||
},
|
||||
"PlayerView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"beats": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/PresentationBeat"
|
||||
}
|
||||
},
|
||||
"branchId": {
|
||||
"type": "string"
|
||||
},
|
||||
"canContinue": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"characterExpression": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"characterName": {
|
||||
"type": "string"
|
||||
},
|
||||
"characterPose": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"default": null
|
||||
},
|
||||
"history": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/HistoryNodeView"
|
||||
}
|
||||
},
|
||||
"inventory": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/PlayerItemView"
|
||||
}
|
||||
},
|
||||
"knowledge": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/PlayerKnowledgeView"
|
||||
}
|
||||
},
|
||||
"nodeId": {
|
||||
"type": "string"
|
||||
},
|
||||
"promises": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/PlayerPromiseView"
|
||||
}
|
||||
},
|
||||
"relationship": {
|
||||
"$ref": "#/$defs/RelationshipView"
|
||||
},
|
||||
"sceneId": {
|
||||
"type": "string"
|
||||
},
|
||||
"sceneTitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"storyId": {
|
||||
"type": "string"
|
||||
},
|
||||
"suggestions": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/ActionSuggestion"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"storyId",
|
||||
"nodeId",
|
||||
"branchId",
|
||||
"sceneId",
|
||||
"sceneTitle",
|
||||
"characterName",
|
||||
"beats",
|
||||
"relationship",
|
||||
"canContinue"
|
||||
]
|
||||
},
|
||||
"PresentationBeat": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/BeatKind"
|
||||
},
|
||||
"speaker": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"visual": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/VisualDirective"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"text"
|
||||
]
|
||||
},
|
||||
"PromiseStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"proposed",
|
||||
"accepted",
|
||||
"fulfilled",
|
||||
"broken",
|
||||
"released",
|
||||
"impossible"
|
||||
]
|
||||
},
|
||||
"PromiseWeight": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"minor",
|
||||
"major"
|
||||
]
|
||||
},
|
||||
"RelationshipBand": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"distant",
|
||||
"guarded",
|
||||
"warming",
|
||||
"close",
|
||||
"bonded"
|
||||
]
|
||||
},
|
||||
"RelationshipView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"affinity": {
|
||||
"$ref": "#/$defs/RelationshipBand"
|
||||
},
|
||||
"attachment": {
|
||||
"$ref": "#/$defs/RelationshipBand"
|
||||
},
|
||||
"hope": {
|
||||
"$ref": "#/$defs/RelationshipBand"
|
||||
},
|
||||
"intimacy": {
|
||||
"$ref": "#/$defs/RelationshipBand"
|
||||
},
|
||||
"respect": {
|
||||
"$ref": "#/$defs/RelationshipBand"
|
||||
},
|
||||
"trust": {
|
||||
"$ref": "#/$defs/RelationshipBand"
|
||||
},
|
||||
"updatedAtNode": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"affinity",
|
||||
"trust",
|
||||
"hope",
|
||||
"respect",
|
||||
"intimacy",
|
||||
"attachment"
|
||||
]
|
||||
},
|
||||
"VisualDirective": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"character": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"expression": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"pose": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"scene": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,20 +2,134 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "WorldBook",
|
||||
"type": "object",
|
||||
"required": ["header", "name", "entries"],
|
||||
"properties": {
|
||||
"header": {
|
||||
"$ref": "resource-header.schema.json"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"entries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object"
|
||||
"$ref": "#/$defs/WorldBookEntry"
|
||||
}
|
||||
},
|
||||
"header": {
|
||||
"$ref": "#/$defs/ResourceHeader"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"header",
|
||||
"name",
|
||||
"entries"
|
||||
],
|
||||
"$defs": {
|
||||
"ResourceHeader": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content_hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/ResourceRef"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/ResourceKind"
|
||||
},
|
||||
"revision": {
|
||||
"type": "string"
|
||||
},
|
||||
"schema_version": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"schema_version",
|
||||
"revision",
|
||||
"content_hash"
|
||||
]
|
||||
},
|
||||
"ResourceKind": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"character",
|
||||
"world_book",
|
||||
"persona",
|
||||
"plot_module",
|
||||
"item_spec"
|
||||
]
|
||||
},
|
||||
"ResourceRef": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content_hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/ResourceKind"
|
||||
},
|
||||
"revision": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"kind",
|
||||
"revision",
|
||||
"content_hash"
|
||||
]
|
||||
},
|
||||
"WorldBookEntry": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"keywords": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required_flags": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"title",
|
||||
"content"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+96
-314
@@ -1,349 +1,131 @@
|
||||
// @generated by crates/nana-contracts; do not edit.
|
||||
|
||||
export type ResourceId = string;
|
||||
export type ResourceKind =
|
||||
| "character"
|
||||
| "world_book"
|
||||
| "persona"
|
||||
| "plot_module"
|
||||
| "item_spec";
|
||||
|
||||
export interface ResourceRef {
|
||||
id: ResourceId;
|
||||
kind: ResourceKind;
|
||||
revision: string;
|
||||
content_hash: string;
|
||||
}
|
||||
export type ResourceKind = "character" | "world_book" | "persona" | "plot_module" | "item_spec";
|
||||
|
||||
export interface ResourceHeader {
|
||||
id: ResourceId;
|
||||
kind: ResourceKind;
|
||||
schema_version: number;
|
||||
revision: string;
|
||||
content_hash: string;
|
||||
dependencies: ResourceRef[];
|
||||
}
|
||||
export type ResourceRef = { id: ResourceId, kind: ResourceKind, revision: string, content_hash: string, };
|
||||
|
||||
export type RelationshipDimension =
|
||||
| "affinity"
|
||||
| "trust"
|
||||
| "hope"
|
||||
| "respect"
|
||||
| "intimacy"
|
||||
| "attachment";
|
||||
export type ResourceHeader = { id: ResourceId, kind: ResourceKind, schema_version: number, revision: string, content_hash: string, dependencies: Array<ResourceRef>, };
|
||||
|
||||
export interface RelationshipAxes {
|
||||
affinity: number;
|
||||
trust: number;
|
||||
hope: number;
|
||||
respect: number;
|
||||
intimacy: number;
|
||||
attachment: number;
|
||||
}
|
||||
export type CharacterStyle = { speech: string, mannerisms: Array<string>, forbidden_player_assumptions: Array<string>, };
|
||||
|
||||
export interface RelationshipAdjustment {
|
||||
dimension: RelationshipDimension;
|
||||
delta: number;
|
||||
cause: string;
|
||||
judgment_rule: string | null;
|
||||
}
|
||||
export type CharacterJudgmentRule = { tags: Array<string>, meaning: string, relationship_effects: Array<RelationshipAdjustment>, };
|
||||
|
||||
export interface SkillValue {
|
||||
skill: string;
|
||||
value: number;
|
||||
}
|
||||
export type SkillValue = { skill: string, value: number, };
|
||||
|
||||
export interface CharacterCard {
|
||||
header: ResourceHeader;
|
||||
name: string;
|
||||
identity: string;
|
||||
personality: string[];
|
||||
values: string[];
|
||||
boundaries: string[];
|
||||
style: {
|
||||
speech: string;
|
||||
mannerisms: string[];
|
||||
forbidden_player_assumptions: string[];
|
||||
};
|
||||
initial_relationship: RelationshipAxes;
|
||||
judgment_rules: Array<{
|
||||
tags: string[];
|
||||
meaning: string;
|
||||
relationship_effects: RelationshipAdjustment[];
|
||||
}>;
|
||||
skills: SkillValue[];
|
||||
default_expression: string;
|
||||
}
|
||||
export type CharacterCard = { header: ResourceHeader, name: string, identity: string, personality: Array<string>, values: Array<string>, boundaries: Array<string>, style: CharacterStyle, initial_relationship: RelationshipAxes, judgment_rules: Array<CharacterJudgmentRule>, skills: Array<SkillValue>, default_expression: string, };
|
||||
|
||||
export interface WorldBook {
|
||||
header: ResourceHeader;
|
||||
name: string;
|
||||
entries: Array<{
|
||||
id: string;
|
||||
title: string;
|
||||
content: string;
|
||||
keywords: string[];
|
||||
tags: string[];
|
||||
required_flags: string[];
|
||||
}>;
|
||||
}
|
||||
export type WorldBookEntry = { id: string, title: string, content: string, keywords: Array<string>, tags: Array<string>, required_flags: Array<string>, };
|
||||
|
||||
export interface Persona {
|
||||
header: ResourceHeader;
|
||||
name: string;
|
||||
identity: string;
|
||||
traits: string[];
|
||||
skills: SkillValue[];
|
||||
initial_items: ResourceId[];
|
||||
}
|
||||
export type WorldBook = { header: ResourceHeader, name: string, entries: Array<WorldBookEntry>, };
|
||||
|
||||
export interface PlotModule {
|
||||
header: ResourceHeader;
|
||||
name: string;
|
||||
opening_event: string;
|
||||
events: Array<{
|
||||
id: string;
|
||||
title: string;
|
||||
tags: string[];
|
||||
situation: string[];
|
||||
required_flags: string[];
|
||||
pressures: Array<{
|
||||
id: string;
|
||||
description: string;
|
||||
clock_id: string | null;
|
||||
clock_delta: number | null;
|
||||
}>;
|
||||
outcomes: Array<{
|
||||
id: string;
|
||||
description: string;
|
||||
effects: StateOp[];
|
||||
}>;
|
||||
}>;
|
||||
}
|
||||
export type Persona = { header: ResourceHeader, name: string, identity: string, traits: Array<string>, skills: Array<SkillValue>, initial_items: Array<ResourceId>, };
|
||||
|
||||
export interface ItemSpec {
|
||||
header: ResourceHeader;
|
||||
name: string;
|
||||
description: string;
|
||||
tags: string[];
|
||||
lore_refs: string[];
|
||||
mechanics: {
|
||||
usable: boolean;
|
||||
grants_tags: string[];
|
||||
check_modifier: number | null;
|
||||
};
|
||||
hidden_facts: string[];
|
||||
}
|
||||
export type PlotPressure = { id: string, description: string, clock_id: string | null, clock_delta: number | null, };
|
||||
|
||||
export interface ResourceBundle {
|
||||
id: string;
|
||||
schema_version: number;
|
||||
revision: string;
|
||||
display_name: string;
|
||||
entry_character: ResourceId;
|
||||
entry_persona: ResourceId;
|
||||
entry_plot_module: ResourceId | null;
|
||||
characters: CharacterCard[];
|
||||
world_books: WorldBook[];
|
||||
personas: Persona[];
|
||||
plot_modules: PlotModule[];
|
||||
item_specs: ItemSpec[];
|
||||
}
|
||||
export type PlotOutcome = { id: string, description: string, effects: Array<StateOp>, };
|
||||
|
||||
export type PromiseStatus =
|
||||
| "proposed"
|
||||
| "accepted"
|
||||
| "fulfilled"
|
||||
| "broken"
|
||||
| "released"
|
||||
| "impossible";
|
||||
export type PromiseWeight = "minor" | "major";
|
||||
export type KnowledgeCertainty = "suspected" | "reported" | "confirmed";
|
||||
export type ItemPlacement = "bag" | "worn" | "hand" | "scene" | "hidden";
|
||||
export type AcquisitionMode = "initial" | "found" | "given" | "borrowed" | "stolen" | "returned";
|
||||
export type PlotEvent = { id: string, title: string, tags: Array<string>, situation: Array<string>, required_flags: Array<string>, pressures: Array<PlotPressure>, outcomes: Array<PlotOutcome>, };
|
||||
|
||||
export interface Promise {
|
||||
id: string;
|
||||
promiser: string;
|
||||
promisee: string;
|
||||
content: string;
|
||||
status: PromiseStatus;
|
||||
weight: PromiseWeight;
|
||||
created_at: string;
|
||||
accepted_at: string | null;
|
||||
resolved_at: string | null;
|
||||
}
|
||||
export type PlotModule = { header: ResourceHeader, name: string, opening_event: string, events: Array<PlotEvent>, };
|
||||
|
||||
export interface KnowledgeRecord {
|
||||
id: string;
|
||||
observer: string;
|
||||
subject: string | null;
|
||||
fact: string;
|
||||
certainty: KnowledgeCertainty;
|
||||
source: string;
|
||||
learned_at: string;
|
||||
last_verified_at: string | null;
|
||||
}
|
||||
export type ItemMechanics = { usable: boolean, grants_tags: Array<string>, check_modifier: number | null, };
|
||||
|
||||
export interface ItemInstance {
|
||||
id: string;
|
||||
spec_ref: ResourceId;
|
||||
owner: string;
|
||||
holder: string;
|
||||
placement: ItemPlacement;
|
||||
quantity: number;
|
||||
condition: string;
|
||||
state_tags: string[];
|
||||
acquisition: {
|
||||
mode: AcquisitionMode;
|
||||
from: string | null;
|
||||
at_node: string;
|
||||
};
|
||||
}
|
||||
export type ItemSpec = { header: ResourceHeader, name: string, description: string, tags: Array<string>, lore_refs: Array<string>, mechanics: ItemMechanics, hidden_facts: Array<string>, };
|
||||
|
||||
export interface RuntimeState {
|
||||
story_id: string;
|
||||
current_node: string;
|
||||
current_branch: string;
|
||||
world_flags: Record<string, boolean>;
|
||||
relationships: Record<string, RelationshipAxes>;
|
||||
relationship_states: unknown[];
|
||||
promises: Promise[];
|
||||
knowledge: KnowledgeRecord[];
|
||||
items: ItemInstance[];
|
||||
clocks: unknown[];
|
||||
checks: unknown[];
|
||||
}
|
||||
export type ResourceBundle = { id: string, schema_version: number, revision: string, display_name: string, entry_character: ResourceId, entry_persona: ResourceId, entry_plot_module: ResourceId | null, characters: Array<CharacterCard>, world_books: Array<WorldBook>, personas: Array<Persona>, plot_modules: Array<PlotModule>, item_specs: Array<ItemSpec>, };
|
||||
|
||||
export type StateOp =
|
||||
| { op: "set_world_flag"; key: string; value: boolean }
|
||||
| { op: "adjust_relationship"; from: string; to: string; adjustment: RelationshipAdjustment }
|
||||
| { op: "create_promise"; promise: Promise }
|
||||
| { op: "update_promise"; promise_id: string; status: PromiseStatus; resolved_at: string | null }
|
||||
| { op: "add_knowledge"; record: KnowledgeRecord }
|
||||
| { op: "add_item"; item: ItemInstance }
|
||||
| {
|
||||
op: "transfer_item";
|
||||
item_id: string;
|
||||
from: string;
|
||||
to: string;
|
||||
placement: ItemPlacement;
|
||||
mode: AcquisitionMode;
|
||||
}
|
||||
| { op: "record_check"; check: unknown }
|
||||
| { op: "advance_clock"; clock_id: string; delta: number };
|
||||
export type RelationshipAxes = { affinity: number, trust: number, hope: number, respect: number, intimacy: number, attachment: number, };
|
||||
|
||||
export type BeatKind = "narration" | "dialogue" | "action" | "system";
|
||||
export type RelationshipAdjustment = { dimension: RelationshipDimension, delta: number, cause: string, judgment_rule: string | null, };
|
||||
|
||||
export interface PresentationBeat {
|
||||
id: string;
|
||||
kind: BeatKind;
|
||||
speaker: string | null;
|
||||
text: string;
|
||||
visual: {
|
||||
character: string | null;
|
||||
expression: string | null;
|
||||
pose: string | null;
|
||||
scene: string | null;
|
||||
} | null;
|
||||
}
|
||||
export type RelationshipDimension = "affinity" | "trust" | "hope" | "respect" | "intimacy" | "attachment";
|
||||
|
||||
export type RelationshipBand = "distant" | "guarded" | "warming" | "close" | "bonded";
|
||||
|
||||
export interface RelationshipView {
|
||||
affinity: RelationshipBand;
|
||||
trust: RelationshipBand;
|
||||
hope: RelationshipBand;
|
||||
respect: RelationshipBand;
|
||||
intimacy: RelationshipBand;
|
||||
attachment: RelationshipBand;
|
||||
updatedAtNode: string | null;
|
||||
}
|
||||
export type RelationshipView = { affinity: RelationshipBand, trust: RelationshipBand, hope: RelationshipBand, respect: RelationshipBand, intimacy: RelationshipBand, attachment: RelationshipBand, updatedAtNode: string | null, };
|
||||
|
||||
export interface PlayerView {
|
||||
storyId: string;
|
||||
nodeId: string;
|
||||
branchId: string;
|
||||
sceneId: string;
|
||||
sceneTitle: string;
|
||||
characterName: string;
|
||||
beats: PresentationBeat[];
|
||||
suggestions: Array<{ id: string; label: string; draft: string }>;
|
||||
inventory: Array<{
|
||||
instanceId: string;
|
||||
name: string;
|
||||
description: string;
|
||||
quantity: number;
|
||||
placement: ItemPlacement;
|
||||
condition: string;
|
||||
}>;
|
||||
knowledge: Array<{
|
||||
id: string;
|
||||
title: string;
|
||||
summary: string;
|
||||
certainty: KnowledgeCertainty;
|
||||
}>;
|
||||
promises: Array<{
|
||||
id: string;
|
||||
content: string;
|
||||
status: PromiseStatus;
|
||||
weight: PromiseWeight;
|
||||
}>;
|
||||
relationship: RelationshipView;
|
||||
history: Array<{
|
||||
id: string;
|
||||
parentId: string | null;
|
||||
branchId: string;
|
||||
label: string;
|
||||
isCurrent: boolean;
|
||||
}>;
|
||||
canContinue: boolean;
|
||||
}
|
||||
export type PromiseStatus = "proposed" | "accepted" | "fulfilled" | "broken" | "released" | "impossible";
|
||||
|
||||
export type PromiseWeight = "minor" | "major";
|
||||
|
||||
export type Promise = { id: string, promiser: string, promisee: string, content: string, status: PromiseStatus, weight: PromiseWeight, created_at: string, accepted_at: string | null, resolved_at: string | null, };
|
||||
|
||||
export type RelationshipState = { id: string, tag: string, description: string, source_node: string, active: boolean, };
|
||||
|
||||
export type KnowledgeCertainty = "suspected" | "reported" | "confirmed";
|
||||
|
||||
export type KnowledgeRecord = { id: string, observer: string, subject: string | null, fact: string, certainty: KnowledgeCertainty, source: string, learned_at: string, last_verified_at: string | null, };
|
||||
|
||||
export type ItemPlacement = "bag" | "worn" | "hand" | "scene" | "hidden";
|
||||
|
||||
export type AcquisitionMode = "initial" | "found" | "given" | "borrowed" | "stolen" | "returned";
|
||||
|
||||
export type ItemAcquisition = { mode: AcquisitionMode, from: string | null, at_node: string, };
|
||||
|
||||
export type ItemInstance = { id: string, spec_ref: ResourceId, owner: string, holder: string, placement: ItemPlacement, quantity: number, condition: string, state_tags: Array<string>, acquisition: ItemAcquisition, };
|
||||
|
||||
export type CheckDifficulty = "regular" | "hard" | "extreme";
|
||||
|
||||
export type CheckResult = "critical_success" | "extreme_success" | "hard_success" | "success" | "failure" | "fumble";
|
||||
|
||||
export type CheckRecord = { id: string, action_id: string, actor: string, skill: string, target: number, difficulty: CheckDifficulty, bonus_dice: number, roll: number, result: CheckResult, pushed_from: string | null, node_id: string, };
|
||||
|
||||
export type ClockState = { id: string, label: string, value: number, max: number, };
|
||||
|
||||
export type StoryBinding = { persona: ResourceRef, characters: Array<ResourceRef>, world_books: Array<ResourceRef>, plot_modules: Array<ResourceRef>, };
|
||||
|
||||
export type Story = { id: string, title: string, ruleset: string, bindings: StoryBinding, root_node: string, active_branch: string, };
|
||||
|
||||
export type StateDelta = { ops: Array<StateOp>, };
|
||||
|
||||
export type StateOp = { "op": "set_world_flag", key: string, value: boolean, } | { "op": "adjust_relationship", from: string, to: string, adjustment: RelationshipAdjustment, } | { "op": "create_promise", promise: Promise, } | { "op": "update_promise", promise_id: string, status: PromiseStatus, resolved_at: string | null, } | { "op": "add_knowledge", record: KnowledgeRecord, } | { "op": "add_item", item: ItemInstance, } | { "op": "transfer_item", item_id: string, from: string, to: string, placement: ItemPlacement, mode: AcquisitionMode, } | { "op": "record_check", check: CheckRecord, } | { "op": "advance_clock", clock_id: string, delta: number, };
|
||||
|
||||
export type StoryNode = { id: string, story_id: string, branch_id: string, parent_id: string | null, action_id: string, user_input: string, delta: StateDelta, state_hash: string, scene: PresentationScene, character: PresentationCharacter, beats: Array<PresentationBeat>, suggestions: Array<ActionSuggestion>, can_continue: boolean, };
|
||||
|
||||
export type RuntimeState = { story_id: string, current_node: string, current_branch: string, world_flags: { [key in string]?: boolean }, relationships: { [key in string]?: RelationshipAxes }, relationship_states: Array<RelationshipState>, promises: Array<Promise>, knowledge: Array<KnowledgeRecord>, items: Array<ItemInstance>, clocks: Array<ClockState>, checks: Array<CheckRecord>, };
|
||||
|
||||
export type BeatKind = "narration" | "dialogue" | "action" | "system";
|
||||
|
||||
export type VisualDirective = { character: string | null, expression: string | null, pose: string | null, scene: string | null, };
|
||||
|
||||
export type PresentationBeat = { id: string, kind: BeatKind, speaker: string | null, text: string, visual: VisualDirective | null, };
|
||||
|
||||
export type ActionSuggestion = { id: string, label: string, draft: string, };
|
||||
|
||||
export type PresentationScene = { id: string, title: string, };
|
||||
|
||||
export type PresentationCharacter = { id: string, name: string, expression: string | null, pose: string | null, };
|
||||
|
||||
export type PresentationSnapshot = { scene: PresentationScene, character: PresentationCharacter, beats: Array<PresentationBeat>, suggestions: Array<ActionSuggestion>, can_continue: boolean, };
|
||||
|
||||
export type PlayerItemView = { instanceId: string, name: string, description: string, quantity: number, placement: ItemPlacement, condition: string, };
|
||||
|
||||
export type PlayerKnowledgeView = { id: string, title: string, summary: string, certainty: KnowledgeCertainty, };
|
||||
|
||||
export type PlayerPromiseView = { id: string, content: string, status: PromiseStatus, weight: PromiseWeight, };
|
||||
|
||||
export type HistoryNodeView = { id: string, parentId: string | null, branchId: string, label: string, isCurrent: boolean, };
|
||||
|
||||
export type PlayerView = { storyId: string, nodeId: string, branchId: string, sceneId: string, sceneTitle: string, characterName: string, characterExpression: string | null, characterPose: string | null, beats: Array<PresentationBeat>, suggestions: Array<ActionSuggestion>, inventory: Array<PlayerItemView>, knowledge: Array<PlayerKnowledgeView>, promises: Array<PlayerPromiseView>, relationship: RelationshipView, history: Array<HistoryNodeView>, canContinue: boolean, };
|
||||
|
||||
export type TurnIntent = "speak_or_act" | "continue" | "regenerate" | "push_check";
|
||||
|
||||
export interface TurnRequest {
|
||||
storyId: string;
|
||||
branchId: string;
|
||||
expectedNodeId: string;
|
||||
actionId: string;
|
||||
intent: TurnIntent;
|
||||
input: string;
|
||||
}
|
||||
export type TurnRequest = { storyId: string, branchId: string, expectedNodeId: string, actionId: string, intent: TurnIntent, input: string, };
|
||||
|
||||
export interface TurnResult {
|
||||
committedNodeId: string;
|
||||
playerView: PlayerView;
|
||||
}
|
||||
export type TurnResult = { committedNodeId: string, playerView: PlayerView, };
|
||||
|
||||
export type TurnFailureCode =
|
||||
| "stale_node"
|
||||
| "invalid_input"
|
||||
| "invalid_model_output"
|
||||
| "provider_unavailable"
|
||||
| "cancelled"
|
||||
| "timed_out"
|
||||
| "internal";
|
||||
export type TurnFailureCode = "stale_node" | "invalid_input" | "invalid_model_output" | "provider_unavailable" | "cancelled" | "timed_out" | "internal";
|
||||
|
||||
export interface TurnFailure {
|
||||
code: TurnFailureCode;
|
||||
message: string;
|
||||
retryable: boolean;
|
||||
}
|
||||
export type TurnFailure = { code: TurnFailureCode, message: string, retryable: boolean, };
|
||||
|
||||
export interface AppInfo {
|
||||
name: string;
|
||||
version: string;
|
||||
contractVersion: number;
|
||||
}
|
||||
export type AppInfo = { name: string, version: string, contractVersion: number, };
|
||||
|
||||
export interface DemoPackSummary {
|
||||
id: string;
|
||||
displayName: string;
|
||||
revision: string;
|
||||
characters: number;
|
||||
worldBooks: number;
|
||||
personas: number;
|
||||
plotModules: number;
|
||||
itemSpecs: number;
|
||||
}
|
||||
export type DemoPackSummary = { id: string, displayName: string, revision: string, characters: number, worldBooks: number, personas: number, plotModules: number, itemSpecs: number, };
|
||||
|
||||
export type ValidationCode = "invalid_id" | "invalid_schema_version" | "invalid_revision" | "invalid_content_hash" | "wrong_resource_kind" | "duplicate_resource" | "missing_reference" | "invalid_relationship_value" | "invalid_skill_value";
|
||||
|
||||
export type ValidationIssue = { code: ValidationCode, path: string, message: string, };
|
||||
|
||||
export type ValidationReport = { issues: Array<ValidationIssue>, };
|
||||
|
||||
Reference in New Issue
Block a user