This commit is contained in:
@@ -1 +1 @@
|
||||
93d800013b9bec3087490ae629039724076cf26d9bb9a5f8834c6aa7473b1ca7
|
||||
6a3351b1936a09050428f73f854b2a89c96a98b049657d87bce78cf84d46e9eb
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "BranchList",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"activeBranchId": {
|
||||
"type": "string"
|
||||
},
|
||||
"branches": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/BranchSummary"
|
||||
}
|
||||
},
|
||||
"storyId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"storyId",
|
||||
"activeBranchId",
|
||||
"branches"
|
||||
],
|
||||
"$defs": {
|
||||
"BranchSummary": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"branchId": {
|
||||
"type": "string"
|
||||
},
|
||||
"headLabel": {
|
||||
"type": "string"
|
||||
},
|
||||
"headNodeId": {
|
||||
"type": "string"
|
||||
},
|
||||
"isActive": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"sourceNodeId": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"branchId",
|
||||
"name",
|
||||
"headNodeId",
|
||||
"headLabel",
|
||||
"isActive"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "LappSettings",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"availableModels": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/$defs/LappModelOption"
|
||||
}
|
||||
},
|
||||
"mode": {
|
||||
"$ref": "#/$defs/LappMode"
|
||||
},
|
||||
"selectedModelId": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"selectedProviderId": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"statusMessage": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"mode",
|
||||
"statusMessage"
|
||||
],
|
||||
"$defs": {
|
||||
"LappMode": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"lapp",
|
||||
"demo",
|
||||
"unavailable"
|
||||
]
|
||||
},
|
||||
"LappModelOption": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"modelId": {
|
||||
"type": "string"
|
||||
},
|
||||
"modelName": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"providerId": {
|
||||
"type": "string"
|
||||
},
|
||||
"providerName": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"providerId",
|
||||
"modelId"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "RenameBranchRequest",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"branchId": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"storyId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"storyId",
|
||||
"branchId",
|
||||
"name"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "SwitchBranchRequest",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"branchId": {
|
||||
"type": "string"
|
||||
},
|
||||
"expectedActiveBranchId": {
|
||||
"type": "string"
|
||||
},
|
||||
"storyId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"storyId",
|
||||
"branchId",
|
||||
"expectedActiveBranchId"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,397 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "SwitchBranchResult",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"branchId": {
|
||||
"type": "string"
|
||||
},
|
||||
"playerView": {
|
||||
"$ref": "#/$defs/PlayerView"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"branchId",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "UpdateLappSettingsRequest",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"modelId": {
|
||||
"type": "string"
|
||||
},
|
||||
"providerId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"providerId",
|
||||
"modelId"
|
||||
]
|
||||
}
|
||||
@@ -120,6 +120,24 @@ export type ForkBranchRequest = { storyId: string, currentBranchId: string, expe
|
||||
|
||||
export type ForkBranchResult = { branchId: string, playerView: PlayerView, };
|
||||
|
||||
export type BranchSummary = { branchId: string, name: string, headNodeId: string, headLabel: string, sourceNodeId: string | null, isActive: boolean, };
|
||||
|
||||
export type BranchList = { storyId: string, activeBranchId: string, branches: Array<BranchSummary>, };
|
||||
|
||||
export type SwitchBranchRequest = { storyId: string, branchId: string, expectedActiveBranchId: string, };
|
||||
|
||||
export type SwitchBranchResult = { branchId: string, playerView: PlayerView, };
|
||||
|
||||
export type RenameBranchRequest = { storyId: string, branchId: string, name: string, };
|
||||
|
||||
export type LappModelOption = { providerId: string, providerName: string | null, modelId: string, modelName: string | null, };
|
||||
|
||||
export type LappMode = "lapp" | "demo" | "unavailable";
|
||||
|
||||
export type LappSettings = { mode: LappMode, selectedProviderId: string | null, selectedModelId: string | null, availableModels: Array<LappModelOption>, statusMessage: string, };
|
||||
|
||||
export type UpdateLappSettingsRequest = { providerId: string, modelId: string, };
|
||||
|
||||
export type TurnFailureCode = "stale_node" | "invalid_input" | "invalid_model_output" | "provider_unavailable" | "cancelled" | "timed_out" | "internal";
|
||||
|
||||
export type TurnFailure = { code: TurnFailureCode, message: string, retryable: boolean, };
|
||||
|
||||
Reference in New Issue
Block a user