| 1 | /** |
| 2 | * @typedef {object} v2DataWorldInfoEntry |
| 3 | * @property {string[]} keys - An array of primary keys associated with the entry. |
| 4 | * @property {string[]} secondary_keys - An array of secondary keys associated with the entry (optional). |
| 5 | * @property {string} comment - A human-readable description or explanation for the entry. |
| 6 | * @property {string} content - The main content or data associated with the entry. |
| 7 | * @property {boolean} constant - Indicates if the entry's content is fixed and unchangeable. |
| 8 | * @property {boolean} selective - Indicates if the entry's inclusion is controlled by specific conditions. |
| 9 | * @property {number} insertion_order - Defines the order in which the entry is inserted during processing. |
| 10 | * @property {boolean} enabled - Controls whether the entry is currently active and used. |
| 11 | * @property {string} position - Specifies the location or context where the entry applies. |
| 12 | * @property {v2DataWorldInfoEntryExtensionInfos} extensions - An object containing additional details for extensions associated with the entry. |
| 13 | * @property {number} id - A unique identifier assigned to the entry. |
| 14 | */ |
| 15 | /** |
| 16 | * @typedef {object} v2DataWorldInfoEntryExtensionInfos |
| 17 | * @property {number} position - The order in which the extension is applied relative to other extensions. |
| 18 | * @property {boolean} exclude_recursion - Prevents the extension from being applied recursively. |
| 19 | * @property {number} probability - The chance (between 0 and 1) of the extension being applied. |
| 20 | * @property {boolean} useProbability - Determines if the `probability` property is used. |
| 21 | * @property {number} depth - The maximum level of nesting allowed for recursive application of the extension. |
| 22 | * @property {number} selectiveLogic - Defines the logic used to determine if the extension is applied selectively. |
| 23 | * @property {string} group - A category or grouping for the extension. |
| 24 | * @property {boolean} group_override - Overrides any existing group assignment for the extension. |
| 25 | * @property {number} group_weight - A value used for prioritizing extensions within the same group. |
| 26 | * @property {boolean} prevent_recursion - Completely disallows recursive application of the extension. |
| 27 | * @property {boolean} delay_until_recursion - Will only be checked during recursion. |
| 28 | * @property {number} scan_depth - The maximum depth to search for matches when applying the extension. |
| 29 | * @property {boolean} match_whole_words - Specifies if only entire words should be matched during extension application. |
| 30 | * @property {boolean} use_group_scoring - Indicates if group weight is considered when selecting extensions. |
| 31 | * @property {boolean} case_sensitive - Controls whether case sensitivity is applied during matching for the extension. |
| 32 | * @property {string} automation_id - An identifier used for automation purposes related to the extension. |
| 33 | * @property {number} role - The specific function or purpose of the extension. |
| 34 | * @property {boolean} vectorized - Indicates if the extension is optimized for vectorized processing. |
| 35 | * @property {number} display_index - The order in which the extension should be displayed for user interfaces. |
| 36 | * @property {boolean} match_persona_description - Wether to match against the persona description. |
| 37 | * @property {boolean} match_character_description - Wether to match against the persona description. |
| 38 | * @property {boolean} match_character_personality - Wether to match against the character personality. |
| 39 | * @property {boolean} match_character_depth_prompt - Wether to match against the character depth prompt. |
| 40 | * @property {boolean} match_scenario - Wether to match against the character scenario. |
| 41 | * @property {boolean} match_creator_notes - Wether to match against the character creator notes. |
| 42 | */ |
| 43 | |
| 44 | /** |
| 45 | * @typedef {object} v2WorldInfoBook |
| 46 | * @property {string} name - the name of the book |
| 47 | * @property {v2DataWorldInfoEntry[]} entries - the entries of the book |
| 48 | */ |
| 49 | |
| 50 | /** |
| 51 | * @typedef {object} v2CharData |
| 52 | * @property {string} name - The character's name. |
| 53 | * @property {string} description - A brief description of the character. |
| 54 | * @property {string} character_version - The character's data version. |
| 55 | * @property {string} personality - A short summary of the character's personality traits. |
| 56 | * @property {string} scenario - A description of the character's background or setting. |
| 57 | * @property {string} first_mes - The character's opening message in a conversation. |
| 58 | * @property {string} mes_example - An example message demonstrating the character's conversation style. |
| 59 | * @property {string} creator_notes - Internal notes or comments left by the character's creator. |
| 60 | * @property {string[]} tags - A list of keywords or labels associated with the character. |
| 61 | * @property {string} system_prompt - The system prompt used to interact with the character. |
| 62 | * @property {string} post_history_instructions - Instructions for handling the character's conversation history. |
| 63 | * @property {string} creator - The name of the person who created the character. |
| 64 | * @property {string[]} alternate_greetings - Additional greeting messages the character can use. |
| 65 | * @property {v2WorldInfoBook} character_book - Data about the character's world or story (if applicable). |
| 66 | * @property {v2CharDataExtensionInfos} extensions - Additional details specific to the character. |
| 67 | */ |
| 68 | /** |
| 69 | * @typedef {object} v2CharDataExtensionInfos |
| 70 | * @property {number} talkativeness - A numerical value indicating the character's propensity to talk. |
| 71 | * @property {boolean} fav - A flag indicating whether the character is a favorite. |
| 72 | * @property {string} world - The fictional world or setting where the character exists (if applicable). |
| 73 | * @property {object} depth_prompt - Prompts used to explore the character's depth and complexity. |
| 74 | * @property {number} depth_prompt.depth - The level of detail or nuance targeted by the prompt. |
| 75 | * @property {string} depth_prompt.prompt - The actual prompt text used for deeper character interaction. |
| 76 | * @property {"system" | "user" | "assistant"} depth_prompt.role - The role the character takes on during the prompted interaction (system, user, or assistant). |
| 77 | * @property {RegexScriptData[]} regex_scripts - Custom regex scripts for the character. |
| 78 | * // Non-standard extensions added by external tools |
| 79 | * @property {string} [pygmalion_id] - The unique identifier assigned to the character by the Pygmalion.chat. |
| 80 | * @property {string} [github_repo] - The gitHub repository associated with the character. |
| 81 | * @property {string} [source_url] - The source URL associated with the character. |
| 82 | * @property {{full_path: string}} [chub] - The Chub-specific data associated with the character. |
| 83 | * @property {{source: string[]}} [risuai] - The RisuAI-specific data associated with the character. |
| 84 | * @property {{positive: string, negative: string}} [sd_character_prompt] - SD-specific data associated with the character. |
| 85 | */ |
| 86 | |
| 87 | /** |
| 88 | * @typedef {object} RegexScriptData |
| 89 | * @property {string} id - UUID of the script |
| 90 | * @property {string} scriptName - The name of the script |
| 91 | * @property {string} findRegex - The regex to find |
| 92 | * @property {string} replaceString - The string to replace |
| 93 | * @property {string[]} trimStrings - The strings to trim |
| 94 | * @property {number[]} placement - The placement of the script |
| 95 | * @property {boolean} disabled - Whether the script is disabled |
| 96 | * @property {boolean} markdownOnly - Whether the script only applies to Markdown |
| 97 | * @property {boolean} promptOnly - Whether the script only applies to prompts |
| 98 | * @property {boolean} runOnEdit - Whether the script runs on edit |
| 99 | * @property {number} substituteRegex - Whether the regex should be substituted |
| 100 | * @property {number} minDepth - The minimum depth |
| 101 | * @property {number} maxDepth - The maximum depth |
| 102 | */ |
| 103 | |
| 104 | /** |
| 105 | * @typedef {object} v1CharData |
| 106 | * @property {string} name - the name of the character |
| 107 | * @property {string} description - the description of the character |
| 108 | * @property {string} personality - a short personality description of the character |
| 109 | * @property {string} scenario - a scenario description of the character |
| 110 | * @property {string} first_mes - the first message in the conversation |
| 111 | * @property {string} mes_example - the example message in the conversation |
| 112 | * @property {string} creatorcomment - creator's notes of the character |
| 113 | * @property {string[]} tags - the tags of the character |
| 114 | * @property {number} talkativeness - talkativeness |
| 115 | * @property {boolean|string} fav - fav |
| 116 | * @property {string} create_date - create_date |
| 117 | * @property {v2CharData} data - v2 data extension |
| 118 | * // Non-standard extensions added by the ST server (not part of the original data) |
| 119 | * @property {string} chat - name of the current chat file chat |
| 120 | * @property {string} avatar - file name of the avatar image (acts as a unique identifier) |
| 121 | * @property {string} json_data - the full raw JSON data of the character |
| 122 | * @property {boolean?} shallow - if the data is shallow (lazy-loaded) |
| 123 | */ |
| 124 | export default 0;// now this file is a module |