@quilltap/plugin-types 2.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +1 -4
- package/dist/{index-DtW7izgw.d.mts → index-BiFtkKWr.d.mts} +2 -244
- package/dist/{index-BXJLgAuZ.d.ts → index-DNgmDKd5.d.ts} +2 -244
- package/dist/index.d.mts +283 -2
- package/dist/index.d.ts +283 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/index.d.mts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.2.0] - 2026-04-09
|
|
9
|
+
|
|
10
|
+
### Removed
|
|
11
|
+
|
|
12
|
+
- **Breaking:** Removed `ROLEPLAY_TEMPLATE` from `PluginCapability` type — roleplay templates are now native first-class entities in Quilltap v4.2.0
|
|
13
|
+
- Removed roleplay template type re-exports from `@quilltap/plugin-types/plugins` barrel
|
|
14
|
+
- Types in `./plugins/roleplay-template` are preserved but deprecated — import directly if backward compat is needed
|
|
15
|
+
|
|
8
16
|
## [1.15.1] - 2026-02-23
|
|
9
17
|
|
|
10
18
|
### Removed
|
package/README.md
CHANGED
|
@@ -143,9 +143,6 @@ logger.error('Failed to connect', { endpoint: 'api.example.com' }, error);
|
|
|
143
143
|
| `SystemPromptPlugin` | System prompt plugin interface |
|
|
144
144
|
| `SystemPromptData` | Individual prompt entry |
|
|
145
145
|
| `SystemPromptMetadata` | System prompt plugin metadata |
|
|
146
|
-
| `RoleplayTemplatePlugin` | Roleplay template plugin interface |
|
|
147
|
-
| `RoleplayTemplateConfig` | Roleplay template configuration |
|
|
148
|
-
|
|
149
146
|
### Common Types
|
|
150
147
|
|
|
151
148
|
| Type | Description |
|
|
@@ -187,7 +184,7 @@ Every Quilltap plugin needs a `quilltap-manifest.json` file:
|
|
|
187
184
|
|
|
188
185
|
- [Plugin Development Guide](https://docs.quilltap.io/plugins/development)
|
|
189
186
|
- [API Reference](https://docs.quilltap.io/plugins/api)
|
|
190
|
-
- [Example Plugins](https://github.com/foundry-9/quilltap/tree/main/plugins/dist)
|
|
187
|
+
- [Example Plugins](https://github.com/foundry-9/quilltap-server/tree/main/plugins/dist)
|
|
191
188
|
|
|
192
189
|
## License
|
|
193
190
|
|
|
@@ -598,7 +598,7 @@ interface ScoringProviderPluginExport {
|
|
|
598
598
|
/**
|
|
599
599
|
* Plugin capability types
|
|
600
600
|
*/
|
|
601
|
-
type PluginCapability = 'LLM_PROVIDER' | 'AUTH_PROVIDER' | 'THEME' | '
|
|
601
|
+
type PluginCapability = 'LLM_PROVIDER' | 'AUTH_PROVIDER' | 'THEME' | 'TOOL_PROVIDER' | 'SEARCH_PROVIDER' | 'MODERATION_PROVIDER' | 'SYSTEM_PROMPT' | 'UTILITY';
|
|
602
602
|
/**
|
|
603
603
|
* Plugin category
|
|
604
604
|
*/
|
|
@@ -1196,248 +1196,6 @@ interface ThemePluginExport {
|
|
|
1196
1196
|
plugin: ThemePlugin;
|
|
1197
1197
|
}
|
|
1198
1198
|
|
|
1199
|
-
/**
|
|
1200
|
-
* Roleplay Template Plugin Interface types for Quilltap plugin development
|
|
1201
|
-
*
|
|
1202
|
-
* @module @quilltap/plugin-types/plugins/roleplay-template
|
|
1203
|
-
*/
|
|
1204
|
-
/**
|
|
1205
|
-
* Configuration for an annotation button in the formatting toolbar.
|
|
1206
|
-
*
|
|
1207
|
-
* Annotation buttons allow users to insert roleplay formatting
|
|
1208
|
-
* (e.g., narration brackets, OOC markers) with a single click.
|
|
1209
|
-
*/
|
|
1210
|
-
interface AnnotationButton {
|
|
1211
|
-
/** Full name displayed in tooltip (e.g., "Narration", "Internal Monologue") */
|
|
1212
|
-
label: string;
|
|
1213
|
-
/** Abbreviated label displayed on button (e.g., "Nar", "Int", "OOC") */
|
|
1214
|
-
abbrev: string;
|
|
1215
|
-
/** Opening delimiter (e.g., "[", "*", "{{") */
|
|
1216
|
-
prefix: string;
|
|
1217
|
-
/** Closing delimiter (e.g., "]", "*", "}}") - empty string for line-end delimiters */
|
|
1218
|
-
suffix: string;
|
|
1219
|
-
}
|
|
1220
|
-
/**
|
|
1221
|
-
* A pattern for styling roleplay text in message content.
|
|
1222
|
-
*
|
|
1223
|
-
* Rendering patterns define how to match and style specific text patterns
|
|
1224
|
-
* in AI responses (e.g., narration, OOC comments, internal monologue).
|
|
1225
|
-
*
|
|
1226
|
-
* @example
|
|
1227
|
-
* ```typescript
|
|
1228
|
-
* // Match *narration* with single asterisks
|
|
1229
|
-
* { pattern: '(?<!\\*)\\*[^*]+\\*(?!\\*)', className: 'qt-chat-narration' }
|
|
1230
|
-
*
|
|
1231
|
-
* // Match ((OOC comments)) with double parentheses
|
|
1232
|
-
* { pattern: '\\(\\([^)]+\\)\\)', className: 'qt-chat-ooc' }
|
|
1233
|
-
*
|
|
1234
|
-
* // Match // OOC at start of line (multiline mode)
|
|
1235
|
-
* { pattern: '^// .+$', className: 'qt-chat-ooc', flags: 'm' }
|
|
1236
|
-
* ```
|
|
1237
|
-
*/
|
|
1238
|
-
interface RenderingPattern {
|
|
1239
|
-
/** Regex pattern as a string (converted to RegExp at runtime) */
|
|
1240
|
-
pattern: string;
|
|
1241
|
-
/**
|
|
1242
|
-
* CSS class to apply to matched text.
|
|
1243
|
-
* Standard classes: qt-chat-dialogue, qt-chat-narration, qt-chat-ooc, qt-chat-inner-monologue
|
|
1244
|
-
*/
|
|
1245
|
-
className: string;
|
|
1246
|
-
/** Optional regex flags (e.g., 'm' for multiline). Default: none */
|
|
1247
|
-
flags?: string;
|
|
1248
|
-
}
|
|
1249
|
-
/**
|
|
1250
|
-
* Configuration for detecting dialogue at the paragraph level.
|
|
1251
|
-
*
|
|
1252
|
-
* When dialogue contains markdown formatting (like **bold**), the text gets split
|
|
1253
|
-
* into multiple children and inline regex patterns can't match. Paragraph-level
|
|
1254
|
-
* detection checks if the entire paragraph starts and ends with quote characters.
|
|
1255
|
-
*
|
|
1256
|
-
* @example
|
|
1257
|
-
* ```typescript
|
|
1258
|
-
* // Standard dialogue with straight and curly quotes
|
|
1259
|
-
* {
|
|
1260
|
-
* openingChars: ['"', '"'],
|
|
1261
|
-
* closingChars: ['"', '"'],
|
|
1262
|
-
* className: 'qt-chat-dialogue'
|
|
1263
|
-
* }
|
|
1264
|
-
* ```
|
|
1265
|
-
*/
|
|
1266
|
-
interface DialogueDetection {
|
|
1267
|
-
/** Opening quote characters to detect (e.g., ['"', '"']) */
|
|
1268
|
-
openingChars: string[];
|
|
1269
|
-
/** Closing quote characters to detect (e.g., ['"', '"']) */
|
|
1270
|
-
closingChars: string[];
|
|
1271
|
-
/** CSS class to apply to dialogue paragraphs */
|
|
1272
|
-
className: string;
|
|
1273
|
-
}
|
|
1274
|
-
/**
|
|
1275
|
-
* Configuration for a single roleplay template
|
|
1276
|
-
*
|
|
1277
|
-
* A roleplay template defines a formatting protocol for AI responses,
|
|
1278
|
-
* such as how dialogue, actions, thoughts, and OOC comments should be formatted.
|
|
1279
|
-
*/
|
|
1280
|
-
interface RoleplayTemplateConfig {
|
|
1281
|
-
/** Display name for the template */
|
|
1282
|
-
name: string;
|
|
1283
|
-
/** Optional description explaining the template's formatting style */
|
|
1284
|
-
description?: string;
|
|
1285
|
-
/**
|
|
1286
|
-
* The system prompt that defines the formatting rules.
|
|
1287
|
-
* This is prepended to character system prompts when the template is active.
|
|
1288
|
-
*/
|
|
1289
|
-
systemPrompt: string;
|
|
1290
|
-
/** Tags for categorization and searchability */
|
|
1291
|
-
tags?: string[];
|
|
1292
|
-
/**
|
|
1293
|
-
* Annotation buttons for the formatting toolbar.
|
|
1294
|
-
* Defines which formatting options are available when document editing mode is enabled.
|
|
1295
|
-
*
|
|
1296
|
-
* @example
|
|
1297
|
-
* ```typescript
|
|
1298
|
-
* annotationButtons: [
|
|
1299
|
-
* { label: 'Narration', abbrev: 'Nar', prefix: '[', suffix: ']' },
|
|
1300
|
-
* { label: 'Internal Monologue', abbrev: 'Int', prefix: '{', suffix: '}' },
|
|
1301
|
-
* { label: 'Out of Character', abbrev: 'OOC', prefix: '// ', suffix: '' },
|
|
1302
|
-
* ]
|
|
1303
|
-
* ```
|
|
1304
|
-
*/
|
|
1305
|
-
annotationButtons?: AnnotationButton[];
|
|
1306
|
-
/**
|
|
1307
|
-
* Patterns for styling roleplay text in message content.
|
|
1308
|
-
* These patterns are matched against text nodes and wrapped in styled spans.
|
|
1309
|
-
*
|
|
1310
|
-
* @example
|
|
1311
|
-
* ```typescript
|
|
1312
|
-
* renderingPatterns: [
|
|
1313
|
-
* // Match *narration* with single asterisks
|
|
1314
|
-
* { pattern: '(?<!\\*)\\*[^*]+\\*(?!\\*)', className: 'qt-chat-narration' },
|
|
1315
|
-
* // Match ((OOC)) with double parentheses
|
|
1316
|
-
* { pattern: '\\(\\([^)]+\\)\\)', className: 'qt-chat-ooc' },
|
|
1317
|
-
* ]
|
|
1318
|
-
* ```
|
|
1319
|
-
*/
|
|
1320
|
-
renderingPatterns?: RenderingPattern[];
|
|
1321
|
-
/**
|
|
1322
|
-
* Optional dialogue detection for paragraph-level styling.
|
|
1323
|
-
* When dialogue contains markdown formatting, inline patterns can't match.
|
|
1324
|
-
* This detects paragraphs that start/end with quote characters.
|
|
1325
|
-
*
|
|
1326
|
-
* @example
|
|
1327
|
-
* ```typescript
|
|
1328
|
-
* dialogueDetection: {
|
|
1329
|
-
* openingChars: ['"', '"'],
|
|
1330
|
-
* closingChars: ['"', '"'],
|
|
1331
|
-
* className: 'qt-chat-dialogue'
|
|
1332
|
-
* }
|
|
1333
|
-
* ```
|
|
1334
|
-
*/
|
|
1335
|
-
dialogueDetection?: DialogueDetection;
|
|
1336
|
-
}
|
|
1337
|
-
/**
|
|
1338
|
-
* Metadata for a roleplay template plugin
|
|
1339
|
-
*/
|
|
1340
|
-
interface RoleplayTemplateMetadata {
|
|
1341
|
-
/**
|
|
1342
|
-
* Unique template identifier (lowercase, hyphens allowed)
|
|
1343
|
-
* This is typically derived from the plugin name
|
|
1344
|
-
*/
|
|
1345
|
-
templateId: string;
|
|
1346
|
-
/** Human-readable display name */
|
|
1347
|
-
displayName: string;
|
|
1348
|
-
/** Template description */
|
|
1349
|
-
description?: string;
|
|
1350
|
-
/** Template author */
|
|
1351
|
-
author?: string | {
|
|
1352
|
-
name: string;
|
|
1353
|
-
email?: string;
|
|
1354
|
-
url?: string;
|
|
1355
|
-
};
|
|
1356
|
-
/** Template tags for categorization */
|
|
1357
|
-
tags?: string[];
|
|
1358
|
-
/** Template version */
|
|
1359
|
-
version?: string;
|
|
1360
|
-
}
|
|
1361
|
-
/**
|
|
1362
|
-
* Main Roleplay Template Plugin Interface
|
|
1363
|
-
*
|
|
1364
|
-
* Plugins implementing this interface can be dynamically loaded
|
|
1365
|
-
* by Quilltap to provide custom roleplay formatting templates.
|
|
1366
|
-
*
|
|
1367
|
-
* A plugin can provide one or more templates. Each template defines
|
|
1368
|
-
* a unique formatting protocol for AI responses.
|
|
1369
|
-
*
|
|
1370
|
-
* @example
|
|
1371
|
-
* ```typescript
|
|
1372
|
-
* import type { RoleplayTemplatePlugin } from '@quilltap/plugin-types';
|
|
1373
|
-
*
|
|
1374
|
-
* export const plugin: RoleplayTemplatePlugin = {
|
|
1375
|
-
* metadata: {
|
|
1376
|
-
* templateId: 'my-rp-format',
|
|
1377
|
-
* displayName: 'My RP Format',
|
|
1378
|
-
* description: 'A custom roleplay formatting style',
|
|
1379
|
-
* tags: ['custom', 'roleplay'],
|
|
1380
|
-
* },
|
|
1381
|
-
* templates: [
|
|
1382
|
-
* {
|
|
1383
|
-
* name: 'My RP Format',
|
|
1384
|
-
* description: 'Custom formatting with specific syntax',
|
|
1385
|
-
* systemPrompt: `[FORMATTING INSTRUCTIONS]
|
|
1386
|
-
* 1. Dialogue: Use quotation marks
|
|
1387
|
-
* 2. Actions: Use asterisks *like this*
|
|
1388
|
-
* ...`,
|
|
1389
|
-
* tags: ['custom'],
|
|
1390
|
-
* },
|
|
1391
|
-
* ],
|
|
1392
|
-
* };
|
|
1393
|
-
* ```
|
|
1394
|
-
*
|
|
1395
|
-
* @example
|
|
1396
|
-
* ```typescript
|
|
1397
|
-
* // Plugin with multiple templates
|
|
1398
|
-
* import type { RoleplayTemplatePlugin } from '@quilltap/plugin-types';
|
|
1399
|
-
*
|
|
1400
|
-
* export const plugin: RoleplayTemplatePlugin = {
|
|
1401
|
-
* metadata: {
|
|
1402
|
-
* templateId: 'format-pack',
|
|
1403
|
-
* displayName: 'RP Format Pack',
|
|
1404
|
-
* description: 'A collection of roleplay formats',
|
|
1405
|
-
* },
|
|
1406
|
-
* templates: [
|
|
1407
|
-
* {
|
|
1408
|
-
* name: 'Screenplay',
|
|
1409
|
-
* systemPrompt: '...',
|
|
1410
|
-
* },
|
|
1411
|
-
* {
|
|
1412
|
-
* name: 'Novel',
|
|
1413
|
-
* systemPrompt: '...',
|
|
1414
|
-
* },
|
|
1415
|
-
* ],
|
|
1416
|
-
* };
|
|
1417
|
-
* ```
|
|
1418
|
-
*/
|
|
1419
|
-
interface RoleplayTemplatePlugin {
|
|
1420
|
-
/** Plugin metadata for UI display and identification */
|
|
1421
|
-
metadata: RoleplayTemplateMetadata;
|
|
1422
|
-
/**
|
|
1423
|
-
* One or more roleplay templates provided by this plugin.
|
|
1424
|
-
* Each template has its own name, description, and system prompt.
|
|
1425
|
-
*/
|
|
1426
|
-
templates: RoleplayTemplateConfig[];
|
|
1427
|
-
/**
|
|
1428
|
-
* Optional initialization function
|
|
1429
|
-
* Called when the plugin is loaded
|
|
1430
|
-
*/
|
|
1431
|
-
initialize?: () => void | Promise<void>;
|
|
1432
|
-
}
|
|
1433
|
-
/**
|
|
1434
|
-
* Standard export type for roleplay template plugins
|
|
1435
|
-
*/
|
|
1436
|
-
interface RoleplayTemplatePluginExport {
|
|
1437
|
-
/** The roleplay template plugin instance */
|
|
1438
|
-
plugin: RoleplayTemplatePlugin;
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
1199
|
/**
|
|
1442
1200
|
* Search Provider Plugin types for Quilltap plugin development
|
|
1443
1201
|
*
|
|
@@ -1702,4 +1460,4 @@ interface ModerationProviderPluginExport {
|
|
|
1702
1460
|
moderationPlugin: ModerationProviderPlugin;
|
|
1703
1461
|
}
|
|
1704
1462
|
|
|
1705
|
-
export type {
|
|
1463
|
+
export type { Typography as $, AttachmentSupport as A, ScoringProviderMetadata as B, CheapModelConfig as C, ScoringProviderPlugin as D, Effects as E, FontDefinition as F, ScoringProviderPluginExport as G, SearchOutput as H, IconProps as I, SearchProviderConfig as J, SearchProviderConfigRequirements as K, LLMProviderPlugin as L, MessageFormatSupport as M, SearchProviderMetadata as N, SearchProviderPlugin as O, PluginAuthor as P, SearchProviderPluginExport as Q, SearchResult as R, ScoringProviderConfigRequirements as S, Spacing as T, SubsystemOverrides as U, TextProviderPlugin as V, ThemeMetadata as W, ThemePlugin as X, ThemePluginExport as Y, ThemeTokens as Z, ToolFormatType as _, ColorPalette as a, ModerationProviderConfig as a0, EmbeddedFont as b, EmbeddingModelInfo as c, ImageGenerationModelInfo as d, ImageProviderConstraints as e, ImageStyleInfo as f, InstalledPluginInfo as g, ModelInfo as h, ModerationCategoryResult as i, ModerationProviderConfigRequirements as j, ModerationProviderMetadata as k, ModerationProviderPlugin as l, ModerationProviderPluginExport as m, ModerationResult as n, PluginCapability as o, PluginCategory as p, PluginCompatibility as q, PluginIconData as r, PluginManifest as s, PluginPermissions as t, PluginStatus as u, ProviderCapabilities as v, ProviderConfig as w, ProviderConfigRequirements as x, ProviderMetadata as y, ProviderPluginExport as z };
|
|
@@ -598,7 +598,7 @@ interface ScoringProviderPluginExport {
|
|
|
598
598
|
/**
|
|
599
599
|
* Plugin capability types
|
|
600
600
|
*/
|
|
601
|
-
type PluginCapability = 'LLM_PROVIDER' | 'AUTH_PROVIDER' | 'THEME' | '
|
|
601
|
+
type PluginCapability = 'LLM_PROVIDER' | 'AUTH_PROVIDER' | 'THEME' | 'TOOL_PROVIDER' | 'SEARCH_PROVIDER' | 'MODERATION_PROVIDER' | 'SYSTEM_PROMPT' | 'UTILITY';
|
|
602
602
|
/**
|
|
603
603
|
* Plugin category
|
|
604
604
|
*/
|
|
@@ -1196,248 +1196,6 @@ interface ThemePluginExport {
|
|
|
1196
1196
|
plugin: ThemePlugin;
|
|
1197
1197
|
}
|
|
1198
1198
|
|
|
1199
|
-
/**
|
|
1200
|
-
* Roleplay Template Plugin Interface types for Quilltap plugin development
|
|
1201
|
-
*
|
|
1202
|
-
* @module @quilltap/plugin-types/plugins/roleplay-template
|
|
1203
|
-
*/
|
|
1204
|
-
/**
|
|
1205
|
-
* Configuration for an annotation button in the formatting toolbar.
|
|
1206
|
-
*
|
|
1207
|
-
* Annotation buttons allow users to insert roleplay formatting
|
|
1208
|
-
* (e.g., narration brackets, OOC markers) with a single click.
|
|
1209
|
-
*/
|
|
1210
|
-
interface AnnotationButton {
|
|
1211
|
-
/** Full name displayed in tooltip (e.g., "Narration", "Internal Monologue") */
|
|
1212
|
-
label: string;
|
|
1213
|
-
/** Abbreviated label displayed on button (e.g., "Nar", "Int", "OOC") */
|
|
1214
|
-
abbrev: string;
|
|
1215
|
-
/** Opening delimiter (e.g., "[", "*", "{{") */
|
|
1216
|
-
prefix: string;
|
|
1217
|
-
/** Closing delimiter (e.g., "]", "*", "}}") - empty string for line-end delimiters */
|
|
1218
|
-
suffix: string;
|
|
1219
|
-
}
|
|
1220
|
-
/**
|
|
1221
|
-
* A pattern for styling roleplay text in message content.
|
|
1222
|
-
*
|
|
1223
|
-
* Rendering patterns define how to match and style specific text patterns
|
|
1224
|
-
* in AI responses (e.g., narration, OOC comments, internal monologue).
|
|
1225
|
-
*
|
|
1226
|
-
* @example
|
|
1227
|
-
* ```typescript
|
|
1228
|
-
* // Match *narration* with single asterisks
|
|
1229
|
-
* { pattern: '(?<!\\*)\\*[^*]+\\*(?!\\*)', className: 'qt-chat-narration' }
|
|
1230
|
-
*
|
|
1231
|
-
* // Match ((OOC comments)) with double parentheses
|
|
1232
|
-
* { pattern: '\\(\\([^)]+\\)\\)', className: 'qt-chat-ooc' }
|
|
1233
|
-
*
|
|
1234
|
-
* // Match // OOC at start of line (multiline mode)
|
|
1235
|
-
* { pattern: '^// .+$', className: 'qt-chat-ooc', flags: 'm' }
|
|
1236
|
-
* ```
|
|
1237
|
-
*/
|
|
1238
|
-
interface RenderingPattern {
|
|
1239
|
-
/** Regex pattern as a string (converted to RegExp at runtime) */
|
|
1240
|
-
pattern: string;
|
|
1241
|
-
/**
|
|
1242
|
-
* CSS class to apply to matched text.
|
|
1243
|
-
* Standard classes: qt-chat-dialogue, qt-chat-narration, qt-chat-ooc, qt-chat-inner-monologue
|
|
1244
|
-
*/
|
|
1245
|
-
className: string;
|
|
1246
|
-
/** Optional regex flags (e.g., 'm' for multiline). Default: none */
|
|
1247
|
-
flags?: string;
|
|
1248
|
-
}
|
|
1249
|
-
/**
|
|
1250
|
-
* Configuration for detecting dialogue at the paragraph level.
|
|
1251
|
-
*
|
|
1252
|
-
* When dialogue contains markdown formatting (like **bold**), the text gets split
|
|
1253
|
-
* into multiple children and inline regex patterns can't match. Paragraph-level
|
|
1254
|
-
* detection checks if the entire paragraph starts and ends with quote characters.
|
|
1255
|
-
*
|
|
1256
|
-
* @example
|
|
1257
|
-
* ```typescript
|
|
1258
|
-
* // Standard dialogue with straight and curly quotes
|
|
1259
|
-
* {
|
|
1260
|
-
* openingChars: ['"', '"'],
|
|
1261
|
-
* closingChars: ['"', '"'],
|
|
1262
|
-
* className: 'qt-chat-dialogue'
|
|
1263
|
-
* }
|
|
1264
|
-
* ```
|
|
1265
|
-
*/
|
|
1266
|
-
interface DialogueDetection {
|
|
1267
|
-
/** Opening quote characters to detect (e.g., ['"', '"']) */
|
|
1268
|
-
openingChars: string[];
|
|
1269
|
-
/** Closing quote characters to detect (e.g., ['"', '"']) */
|
|
1270
|
-
closingChars: string[];
|
|
1271
|
-
/** CSS class to apply to dialogue paragraphs */
|
|
1272
|
-
className: string;
|
|
1273
|
-
}
|
|
1274
|
-
/**
|
|
1275
|
-
* Configuration for a single roleplay template
|
|
1276
|
-
*
|
|
1277
|
-
* A roleplay template defines a formatting protocol for AI responses,
|
|
1278
|
-
* such as how dialogue, actions, thoughts, and OOC comments should be formatted.
|
|
1279
|
-
*/
|
|
1280
|
-
interface RoleplayTemplateConfig {
|
|
1281
|
-
/** Display name for the template */
|
|
1282
|
-
name: string;
|
|
1283
|
-
/** Optional description explaining the template's formatting style */
|
|
1284
|
-
description?: string;
|
|
1285
|
-
/**
|
|
1286
|
-
* The system prompt that defines the formatting rules.
|
|
1287
|
-
* This is prepended to character system prompts when the template is active.
|
|
1288
|
-
*/
|
|
1289
|
-
systemPrompt: string;
|
|
1290
|
-
/** Tags for categorization and searchability */
|
|
1291
|
-
tags?: string[];
|
|
1292
|
-
/**
|
|
1293
|
-
* Annotation buttons for the formatting toolbar.
|
|
1294
|
-
* Defines which formatting options are available when document editing mode is enabled.
|
|
1295
|
-
*
|
|
1296
|
-
* @example
|
|
1297
|
-
* ```typescript
|
|
1298
|
-
* annotationButtons: [
|
|
1299
|
-
* { label: 'Narration', abbrev: 'Nar', prefix: '[', suffix: ']' },
|
|
1300
|
-
* { label: 'Internal Monologue', abbrev: 'Int', prefix: '{', suffix: '}' },
|
|
1301
|
-
* { label: 'Out of Character', abbrev: 'OOC', prefix: '// ', suffix: '' },
|
|
1302
|
-
* ]
|
|
1303
|
-
* ```
|
|
1304
|
-
*/
|
|
1305
|
-
annotationButtons?: AnnotationButton[];
|
|
1306
|
-
/**
|
|
1307
|
-
* Patterns for styling roleplay text in message content.
|
|
1308
|
-
* These patterns are matched against text nodes and wrapped in styled spans.
|
|
1309
|
-
*
|
|
1310
|
-
* @example
|
|
1311
|
-
* ```typescript
|
|
1312
|
-
* renderingPatterns: [
|
|
1313
|
-
* // Match *narration* with single asterisks
|
|
1314
|
-
* { pattern: '(?<!\\*)\\*[^*]+\\*(?!\\*)', className: 'qt-chat-narration' },
|
|
1315
|
-
* // Match ((OOC)) with double parentheses
|
|
1316
|
-
* { pattern: '\\(\\([^)]+\\)\\)', className: 'qt-chat-ooc' },
|
|
1317
|
-
* ]
|
|
1318
|
-
* ```
|
|
1319
|
-
*/
|
|
1320
|
-
renderingPatterns?: RenderingPattern[];
|
|
1321
|
-
/**
|
|
1322
|
-
* Optional dialogue detection for paragraph-level styling.
|
|
1323
|
-
* When dialogue contains markdown formatting, inline patterns can't match.
|
|
1324
|
-
* This detects paragraphs that start/end with quote characters.
|
|
1325
|
-
*
|
|
1326
|
-
* @example
|
|
1327
|
-
* ```typescript
|
|
1328
|
-
* dialogueDetection: {
|
|
1329
|
-
* openingChars: ['"', '"'],
|
|
1330
|
-
* closingChars: ['"', '"'],
|
|
1331
|
-
* className: 'qt-chat-dialogue'
|
|
1332
|
-
* }
|
|
1333
|
-
* ```
|
|
1334
|
-
*/
|
|
1335
|
-
dialogueDetection?: DialogueDetection;
|
|
1336
|
-
}
|
|
1337
|
-
/**
|
|
1338
|
-
* Metadata for a roleplay template plugin
|
|
1339
|
-
*/
|
|
1340
|
-
interface RoleplayTemplateMetadata {
|
|
1341
|
-
/**
|
|
1342
|
-
* Unique template identifier (lowercase, hyphens allowed)
|
|
1343
|
-
* This is typically derived from the plugin name
|
|
1344
|
-
*/
|
|
1345
|
-
templateId: string;
|
|
1346
|
-
/** Human-readable display name */
|
|
1347
|
-
displayName: string;
|
|
1348
|
-
/** Template description */
|
|
1349
|
-
description?: string;
|
|
1350
|
-
/** Template author */
|
|
1351
|
-
author?: string | {
|
|
1352
|
-
name: string;
|
|
1353
|
-
email?: string;
|
|
1354
|
-
url?: string;
|
|
1355
|
-
};
|
|
1356
|
-
/** Template tags for categorization */
|
|
1357
|
-
tags?: string[];
|
|
1358
|
-
/** Template version */
|
|
1359
|
-
version?: string;
|
|
1360
|
-
}
|
|
1361
|
-
/**
|
|
1362
|
-
* Main Roleplay Template Plugin Interface
|
|
1363
|
-
*
|
|
1364
|
-
* Plugins implementing this interface can be dynamically loaded
|
|
1365
|
-
* by Quilltap to provide custom roleplay formatting templates.
|
|
1366
|
-
*
|
|
1367
|
-
* A plugin can provide one or more templates. Each template defines
|
|
1368
|
-
* a unique formatting protocol for AI responses.
|
|
1369
|
-
*
|
|
1370
|
-
* @example
|
|
1371
|
-
* ```typescript
|
|
1372
|
-
* import type { RoleplayTemplatePlugin } from '@quilltap/plugin-types';
|
|
1373
|
-
*
|
|
1374
|
-
* export const plugin: RoleplayTemplatePlugin = {
|
|
1375
|
-
* metadata: {
|
|
1376
|
-
* templateId: 'my-rp-format',
|
|
1377
|
-
* displayName: 'My RP Format',
|
|
1378
|
-
* description: 'A custom roleplay formatting style',
|
|
1379
|
-
* tags: ['custom', 'roleplay'],
|
|
1380
|
-
* },
|
|
1381
|
-
* templates: [
|
|
1382
|
-
* {
|
|
1383
|
-
* name: 'My RP Format',
|
|
1384
|
-
* description: 'Custom formatting with specific syntax',
|
|
1385
|
-
* systemPrompt: `[FORMATTING INSTRUCTIONS]
|
|
1386
|
-
* 1. Dialogue: Use quotation marks
|
|
1387
|
-
* 2. Actions: Use asterisks *like this*
|
|
1388
|
-
* ...`,
|
|
1389
|
-
* tags: ['custom'],
|
|
1390
|
-
* },
|
|
1391
|
-
* ],
|
|
1392
|
-
* };
|
|
1393
|
-
* ```
|
|
1394
|
-
*
|
|
1395
|
-
* @example
|
|
1396
|
-
* ```typescript
|
|
1397
|
-
* // Plugin with multiple templates
|
|
1398
|
-
* import type { RoleplayTemplatePlugin } from '@quilltap/plugin-types';
|
|
1399
|
-
*
|
|
1400
|
-
* export const plugin: RoleplayTemplatePlugin = {
|
|
1401
|
-
* metadata: {
|
|
1402
|
-
* templateId: 'format-pack',
|
|
1403
|
-
* displayName: 'RP Format Pack',
|
|
1404
|
-
* description: 'A collection of roleplay formats',
|
|
1405
|
-
* },
|
|
1406
|
-
* templates: [
|
|
1407
|
-
* {
|
|
1408
|
-
* name: 'Screenplay',
|
|
1409
|
-
* systemPrompt: '...',
|
|
1410
|
-
* },
|
|
1411
|
-
* {
|
|
1412
|
-
* name: 'Novel',
|
|
1413
|
-
* systemPrompt: '...',
|
|
1414
|
-
* },
|
|
1415
|
-
* ],
|
|
1416
|
-
* };
|
|
1417
|
-
* ```
|
|
1418
|
-
*/
|
|
1419
|
-
interface RoleplayTemplatePlugin {
|
|
1420
|
-
/** Plugin metadata for UI display and identification */
|
|
1421
|
-
metadata: RoleplayTemplateMetadata;
|
|
1422
|
-
/**
|
|
1423
|
-
* One or more roleplay templates provided by this plugin.
|
|
1424
|
-
* Each template has its own name, description, and system prompt.
|
|
1425
|
-
*/
|
|
1426
|
-
templates: RoleplayTemplateConfig[];
|
|
1427
|
-
/**
|
|
1428
|
-
* Optional initialization function
|
|
1429
|
-
* Called when the plugin is loaded
|
|
1430
|
-
*/
|
|
1431
|
-
initialize?: () => void | Promise<void>;
|
|
1432
|
-
}
|
|
1433
|
-
/**
|
|
1434
|
-
* Standard export type for roleplay template plugins
|
|
1435
|
-
*/
|
|
1436
|
-
interface RoleplayTemplatePluginExport {
|
|
1437
|
-
/** The roleplay template plugin instance */
|
|
1438
|
-
plugin: RoleplayTemplatePlugin;
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
1199
|
/**
|
|
1442
1200
|
* Search Provider Plugin types for Quilltap plugin development
|
|
1443
1201
|
*
|
|
@@ -1702,4 +1460,4 @@ interface ModerationProviderPluginExport {
|
|
|
1702
1460
|
moderationPlugin: ModerationProviderPlugin;
|
|
1703
1461
|
}
|
|
1704
1462
|
|
|
1705
|
-
export type {
|
|
1463
|
+
export type { Typography as $, AttachmentSupport as A, ScoringProviderMetadata as B, CheapModelConfig as C, ScoringProviderPlugin as D, Effects as E, FontDefinition as F, ScoringProviderPluginExport as G, SearchOutput as H, IconProps as I, SearchProviderConfig as J, SearchProviderConfigRequirements as K, LLMProviderPlugin as L, MessageFormatSupport as M, SearchProviderMetadata as N, SearchProviderPlugin as O, PluginAuthor as P, SearchProviderPluginExport as Q, SearchResult as R, ScoringProviderConfigRequirements as S, Spacing as T, SubsystemOverrides as U, TextProviderPlugin as V, ThemeMetadata as W, ThemePlugin as X, ThemePluginExport as Y, ThemeTokens as Z, ToolFormatType as _, ColorPalette as a, ModerationProviderConfig as a0, EmbeddedFont as b, EmbeddingModelInfo as c, ImageGenerationModelInfo as d, ImageProviderConstraints as e, ImageStyleInfo as f, InstalledPluginInfo as g, ModelInfo as h, ModerationCategoryResult as i, ModerationProviderConfigRequirements as j, ModerationProviderMetadata as k, ModerationProviderPlugin as l, ModerationProviderPluginExport as m, ModerationResult as n, PluginCapability as o, PluginCategory as p, PluginCompatibility as q, PluginIconData as r, PluginManifest as s, PluginPermissions as t, PluginStatus as u, ProviderCapabilities as v, ProviderConfig as w, ProviderConfigRequirements as x, ProviderMetadata as y, ProviderPluginExport as z };
|