@frplm/ui 0.1.0-alpha.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/README.md +20 -0
- package/dist/index.js +2034 -0
- package/dist/style.css +1 -0
- package/dist/types/sdk/src/HostSdkBindings.d.ts +45 -0
- package/dist/types/sdk/src/HostSdkBindings.d.ts.map +1 -0
- package/dist/types/sdk/src/components.d.ts +15 -0
- package/dist/types/sdk/src/components.d.ts.map +1 -0
- package/dist/types/src/App.vue.d.ts +4 -0
- package/dist/types/src/App.vue.d.ts.map +1 -0
- package/dist/types/src/app/router.d.ts +4 -0
- package/dist/types/src/app/router.d.ts.map +1 -0
- package/dist/types/src/components/char/CharacterEditor.vue.d.ts +18 -0
- package/dist/types/src/components/char/CharacterEditor.vue.d.ts.map +1 -0
- package/dist/types/src/components/char/CharacterLanding.vue.d.ts +4 -0
- package/dist/types/src/components/char/CharacterLanding.vue.d.ts.map +1 -0
- package/dist/types/src/components/char/StartingLocation.vue.d.ts +12 -0
- package/dist/types/src/components/char/StartingLocation.vue.d.ts.map +1 -0
- package/dist/types/src/components/chat/Chat.vue.d.ts +15 -0
- package/dist/types/src/components/chat/Chat.vue.d.ts.map +1 -0
- package/dist/types/src/components/chat/ChatBar.vue.d.ts +12 -0
- package/dist/types/src/components/chat/ChatBar.vue.d.ts.map +1 -0
- package/dist/types/src/components/chat/ChatMessage.vue.d.ts +15 -0
- package/dist/types/src/components/chat/ChatMessage.vue.d.ts.map +1 -0
- package/dist/types/src/components/chat/ConfigSidebar.vue.d.ts +12 -0
- package/dist/types/src/components/chat/ConfigSidebar.vue.d.ts.map +1 -0
- package/dist/types/src/components/chat/PromptDebug.vue.d.ts +8 -0
- package/dist/types/src/components/chat/PromptDebug.vue.d.ts.map +1 -0
- package/dist/types/src/components/connections/APIKeysPopup.vue.d.ts +8 -0
- package/dist/types/src/components/connections/APIKeysPopup.vue.d.ts.map +1 -0
- package/dist/types/src/components/connections/ConnectionLanding.vue.d.ts +4 -0
- package/dist/types/src/components/connections/ConnectionLanding.vue.d.ts.map +1 -0
- package/dist/types/src/components/connections/LLMEditor.vue.d.ts +12 -0
- package/dist/types/src/components/connections/LLMEditor.vue.d.ts.map +1 -0
- package/dist/types/src/components/errors/GlobalError.vue.d.ts +4 -0
- package/dist/types/src/components/errors/GlobalError.vue.d.ts.map +1 -0
- package/dist/types/src/components/extension/ExtensionConfigs.vue.d.ts +4 -0
- package/dist/types/src/components/extension/ExtensionConfigs.vue.d.ts.map +1 -0
- package/dist/types/src/components/layout/EmptyView.vue.d.ts +4 -0
- package/dist/types/src/components/layout/EmptyView.vue.d.ts.map +1 -0
- package/dist/types/src/components/lorebooks/EntryEditor.vue.d.ts +19 -0
- package/dist/types/src/components/lorebooks/EntryEditor.vue.d.ts.map +1 -0
- package/dist/types/src/components/lorebooks/LorebookEditor.vue.d.ts +18 -0
- package/dist/types/src/components/lorebooks/LorebookEditor.vue.d.ts.map +1 -0
- package/dist/types/src/components/lorebooks/LorebookLanding.vue.d.ts +4 -0
- package/dist/types/src/components/lorebooks/LorebookLanding.vue.d.ts.map +1 -0
- package/dist/types/src/components/primitive-editors/AutoCompleteBox.vue.d.ts +22 -0
- package/dist/types/src/components/primitive-editors/AutoCompleteBox.vue.d.ts.map +1 -0
- package/dist/types/src/components/primitive-editors/BooleanTickBox.vue.d.ts +22 -0
- package/dist/types/src/components/primitive-editors/BooleanTickBox.vue.d.ts.map +1 -0
- package/dist/types/src/components/primitive-editors/BooleanToggle.vue.d.ts +22 -0
- package/dist/types/src/components/primitive-editors/BooleanToggle.vue.d.ts.map +1 -0
- package/dist/types/src/components/primitive-editors/LongTextBox.vue.d.ts +22 -0
- package/dist/types/src/components/primitive-editors/LongTextBox.vue.d.ts.map +1 -0
- package/dist/types/src/components/primitive-editors/NumberInput.vue.d.ts +36 -0
- package/dist/types/src/components/primitive-editors/NumberInput.vue.d.ts.map +1 -0
- package/dist/types/src/components/primitive-editors/NumberSlider.vue.d.ts +28 -0
- package/dist/types/src/components/primitive-editors/NumberSlider.vue.d.ts.map +1 -0
- package/dist/types/src/components/primitive-editors/ShortTextBox.vue.d.ts +20 -0
- package/dist/types/src/components/primitive-editors/ShortTextBox.vue.d.ts.map +1 -0
- package/dist/types/src/components/primitive-editors/SingleAutoComplete.vue.d.ts +26 -0
- package/dist/types/src/components/primitive-editors/SingleAutoComplete.vue.d.ts.map +1 -0
- package/dist/types/src/components/primitive-editors/SingleEnumInput.vue.d.ts +26 -0
- package/dist/types/src/components/primitive-editors/SingleEnumInput.vue.d.ts.map +1 -0
- package/dist/types/src/components/primitive-editors/components.d.ts +10 -0
- package/dist/types/src/components/primitive-editors/components.d.ts.map +1 -0
- package/dist/types/src/components/primitive-editors/index.d.ts +3 -0
- package/dist/types/src/components/primitive-editors/index.d.ts.map +1 -0
- package/dist/types/src/components/primitive-editors/plugin.d.ts +3 -0
- package/dist/types/src/components/primitive-editors/plugin.d.ts.map +1 -0
- package/dist/types/src/components/prompts/PromptSectionEditor.vue.d.ts +17 -0
- package/dist/types/src/components/prompts/PromptSectionEditor.vue.d.ts.map +1 -0
- package/dist/types/src/components/prompts/PromptTemplateEditor.vue.d.ts +12 -0
- package/dist/types/src/components/prompts/PromptTemplateEditor.vue.d.ts.map +1 -0
- package/dist/types/src/components/prompts/PromptTemplatePicker.vue.d.ts +8 -0
- package/dist/types/src/components/prompts/PromptTemplatePicker.vue.d.ts.map +1 -0
- package/dist/types/src/components/session/NewSessionPopUp.vue.d.ts +26 -0
- package/dist/types/src/components/session/NewSessionPopUp.vue.d.ts.map +1 -0
- package/dist/types/src/components/session/SessionList.vue.d.ts +4 -0
- package/dist/types/src/components/session/SessionList.vue.d.ts.map +1 -0
- package/dist/types/src/components/session/SessionTease.vue.d.ts +17 -0
- package/dist/types/src/components/session/SessionTease.vue.d.ts.map +1 -0
- package/dist/types/src/components/settings/Settings.vue.d.ts +4 -0
- package/dist/types/src/components/settings/Settings.vue.d.ts.map +1 -0
- package/dist/types/src/components/settings/ThemeSettings.vue.d.ts +4 -0
- package/dist/types/src/components/settings/ThemeSettings.vue.d.ts.map +1 -0
- package/dist/types/src/components/space/ConnectLocationPrompt.vue.d.ts +16 -0
- package/dist/types/src/components/space/ConnectLocationPrompt.vue.d.ts.map +1 -0
- package/dist/types/src/components/space/EdgeEditor.vue.d.ts +20 -0
- package/dist/types/src/components/space/EdgeEditor.vue.d.ts.map +1 -0
- package/dist/types/src/components/space/LocationEdgesEditor.vue.d.ts +21 -0
- package/dist/types/src/components/space/LocationEdgesEditor.vue.d.ts.map +1 -0
- package/dist/types/src/components/space/LocationEditor.vue.d.ts +21 -0
- package/dist/types/src/components/space/LocationEditor.vue.d.ts.map +1 -0
- package/dist/types/src/components/space/RegionEditor.vue.d.ts +12 -0
- package/dist/types/src/components/space/RegionEditor.vue.d.ts.map +1 -0
- package/dist/types/src/components/space/WorldEdit.vue.d.ts +12 -0
- package/dist/types/src/components/space/WorldEdit.vue.d.ts.map +1 -0
- package/dist/types/src/components/space/WorldLanding.vue.d.ts +4 -0
- package/dist/types/src/components/space/WorldLanding.vue.d.ts.map +1 -0
- package/dist/types/src/components/space/WorldLocationGraph.vue.d.ts +8 -0
- package/dist/types/src/components/space/WorldLocationGraph.vue.d.ts.map +1 -0
- package/dist/types/src/components/tags/TagAutocomplete.vue.d.ts +19 -0
- package/dist/types/src/components/tags/TagAutocomplete.vue.d.ts.map +1 -0
- package/dist/types/src/components/utils/FieldEditorWrapper.vue.d.ts +22 -0
- package/dist/types/src/components/utils/FieldEditorWrapper.vue.d.ts.map +1 -0
- package/dist/types/src/components/utils/PrologValidator.vue.d.ts +11 -0
- package/dist/types/src/components/utils/PrologValidator.vue.d.ts.map +1 -0
- package/dist/types/src/components/utils/SearchBar.vue.d.ts +19 -0
- package/dist/types/src/components/utils/SearchBar.vue.d.ts.map +1 -0
- package/dist/types/src/components/utils/buttons/IconButton.vue.d.ts +30 -0
- package/dist/types/src/components/utils/buttons/IconButton.vue.d.ts.map +1 -0
- package/dist/types/src/components/utils/img/AvatarDisplay.vue.d.ts +4 -0
- package/dist/types/src/components/utils/img/AvatarDisplay.vue.d.ts.map +1 -0
- package/dist/types/src/components/utils/list/Card.vue.d.ts +36 -0
- package/dist/types/src/components/utils/list/Card.vue.d.ts.map +1 -0
- package/dist/types/src/components/utils/list/List.vue.d.ts +28 -0
- package/dist/types/src/components/utils/list/List.vue.d.ts.map +1 -0
- package/dist/types/src/components/utils/list/SimpleList.vue.d.ts +26 -0
- package/dist/types/src/components/utils/list/SimpleList.vue.d.ts.map +1 -0
- package/dist/types/src/components/utils/panels/Expandable.vue.d.ts +57 -0
- package/dist/types/src/components/utils/panels/Expandable.vue.d.ts.map +1 -0
- package/dist/types/src/components/utils/panels/ExpandableSplitPanel.vue.d.ts +58 -0
- package/dist/types/src/components/utils/panels/ExpandableSplitPanel.vue.d.ts.map +1 -0
- package/dist/types/src/components/utils/panels/SplitPanel.vue.d.ts +24 -0
- package/dist/types/src/components/utils/panels/SplitPanel.vue.d.ts.map +1 -0
- package/dist/types/src/components/utils/prompts/EnumPrompt.vue.d.ts +29 -0
- package/dist/types/src/components/utils/prompts/EnumPrompt.vue.d.ts.map +1 -0
- package/dist/types/src/components/utils/prompts/InlinePopover.vue.d.ts +50 -0
- package/dist/types/src/components/utils/prompts/InlinePopover.vue.d.ts.map +1 -0
- package/dist/types/src/components/utils/prompts/WindowPrompt.vue.d.ts +53 -0
- package/dist/types/src/components/utils/prompts/WindowPrompt.vue.d.ts.map +1 -0
- package/dist/types/src/config.d.ts +2 -0
- package/dist/types/src/config.d.ts.map +1 -0
- package/dist/types/src/core/ABSEntity.d.ts +63 -0
- package/dist/types/src/core/ABSEntity.d.ts.map +1 -0
- package/dist/types/src/core/FieldMetadata.d.ts +38 -0
- package/dist/types/src/core/FieldMetadata.d.ts.map +1 -0
- package/dist/types/src/core/GlobalError.d.ts +10 -0
- package/dist/types/src/core/GlobalError.d.ts.map +1 -0
- package/dist/types/src/core/interfaces.d.ts +11 -0
- package/dist/types/src/core/interfaces.d.ts.map +1 -0
- package/dist/types/src/core/queries.d.ts +13 -0
- package/dist/types/src/core/queries.d.ts.map +1 -0
- package/dist/types/src/core/theme.d.ts +45 -0
- package/dist/types/src/core/theme.d.ts.map +1 -0
- package/dist/types/src/domain/Characters.d.ts +52 -0
- package/dist/types/src/domain/Characters.d.ts.map +1 -0
- package/dist/types/src/domain/Connection.d.ts +66 -0
- package/dist/types/src/domain/Connection.d.ts.map +1 -0
- package/dist/types/src/domain/EntityTypes.d.ts +23 -0
- package/dist/types/src/domain/EntityTypes.d.ts.map +1 -0
- package/dist/types/src/domain/Lorebook.d.ts +84 -0
- package/dist/types/src/domain/Lorebook.d.ts.map +1 -0
- package/dist/types/src/domain/Prompts.d.ts +85 -0
- package/dist/types/src/domain/Prompts.d.ts.map +1 -0
- package/dist/types/src/domain/Session.d.ts +61 -0
- package/dist/types/src/domain/Session.d.ts.map +1 -0
- package/dist/types/src/domain/Tag.d.ts +18 -0
- package/dist/types/src/domain/Tag.d.ts.map +1 -0
- package/dist/types/src/domain/World.d.ts +87 -0
- package/dist/types/src/domain/World.d.ts.map +1 -0
- package/dist/types/src/extensions/HostBindings.d.ts +2 -0
- package/dist/types/src/extensions/HostBindings.d.ts.map +1 -0
- package/dist/types/src/extensions/extensions.d.ts +18 -0
- package/dist/types/src/extensions/extensions.d.ts.map +1 -0
- package/dist/types/src/extensions/registerPrimitiveEditors.d.ts +2 -0
- package/dist/types/src/extensions/registerPrimitiveEditors.d.ts.map +1 -0
- package/dist/types/src/services/apiClient.d.ts +34 -0
- package/dist/types/src/services/apiClient.d.ts.map +1 -0
- package/dist/types/src/services/tokenizer.d.ts +30 -0
- package/dist/types/src/services/tokenizer.d.ts.map +1 -0
- package/dist/types/src/types/ChatCompletions.d.ts +14 -0
- package/dist/types/src/types/ChatCompletions.d.ts.map +1 -0
- package/dist/types/src/types/DTOs.d.ts +19 -0
- package/dist/types/src/types/DTOs.d.ts.map +1 -0
- package/dist/types/src/types/Equatable.d.ts +9 -0
- package/dist/types/src/types/Equatable.d.ts.map +1 -0
- package/dist/types/src/utils/CommonFields.d.ts +6 -0
- package/dist/types/src/utils/CommonFields.d.ts.map +1 -0
- package/dist/types/src/utils/CustomSet.d.ts +12 -0
- package/dist/types/src/utils/CustomSet.d.ts.map +1 -0
- package/dist/types/src/utils/PromptThings.d.ts +10 -0
- package/dist/types/src/utils/PromptThings.d.ts.map +1 -0
- package/dist/types/src/utils/ReferenceCodec.d.ts +17 -0
- package/dist/types/src/utils/ReferenceCodec.d.ts.map +1 -0
- package/dist/types/ui/src/index.d.ts +10 -0
- package/dist/types/ui/src/index.d.ts.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../../src/core/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAElF,MAAM,WAAW,WAAW,CAAC,IAAI,SAAS,SAAS,EAAE,IAAI,SAAS,UAAU;IACxE,SAAS,EAAE,WAAW,CAAC,IAAI,EAAC,IAAI,CAAC,CAAC;IAClC,MAAM,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,gBAAgB,CAAC,IAAI,EAAC,IAAI,EAAE,GAAG,CAAC,CAAC;CAC3C;AAED,oBAAY,eAAe;IACvB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,YAAY,iBAAiB;IAC7B,SAAS,cAAc;CAC1B"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export type BaseTheme = "warm" | "dark";
|
|
2
|
+
export type ThemePreference = "system" | "warm" | "dark" | "custom";
|
|
3
|
+
export type ResolvedTheme = BaseTheme;
|
|
4
|
+
export interface CustomThemeDefinition {
|
|
5
|
+
version: 1;
|
|
6
|
+
name: string;
|
|
7
|
+
base: BaseTheme;
|
|
8
|
+
tokens: Record<string, string>;
|
|
9
|
+
cssEnabled: boolean;
|
|
10
|
+
css: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const themePreference: Readonly<import("vue").Ref<ThemePreference, ThemePreference>>;
|
|
13
|
+
export declare const customTheme: Readonly<import("vue").Ref<{
|
|
14
|
+
readonly version: 1;
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly base: BaseTheme;
|
|
17
|
+
readonly tokens: {
|
|
18
|
+
readonly [x: string]: string;
|
|
19
|
+
};
|
|
20
|
+
readonly cssEnabled: boolean;
|
|
21
|
+
readonly css: string;
|
|
22
|
+
}, {
|
|
23
|
+
readonly version: 1;
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly base: BaseTheme;
|
|
26
|
+
readonly tokens: {
|
|
27
|
+
readonly [x: string]: string;
|
|
28
|
+
};
|
|
29
|
+
readonly cssEnabled: boolean;
|
|
30
|
+
readonly css: string;
|
|
31
|
+
}>>;
|
|
32
|
+
export declare const resolvedTheme: import("vue").ComputedRef<BaseTheme>;
|
|
33
|
+
export declare const creativeCssActive: import("vue").ComputedRef<boolean>;
|
|
34
|
+
export declare function initializeTheme(): void;
|
|
35
|
+
export declare function setThemePreference(value: ThemePreference): void;
|
|
36
|
+
export declare function setCustomThemeName(name: string): void;
|
|
37
|
+
export declare function setCustomThemeBase(base: BaseTheme): void;
|
|
38
|
+
export declare function setCustomThemeTokens(tokens: Record<string, unknown>): void;
|
|
39
|
+
export declare function setCustomThemeCss(css: string): void;
|
|
40
|
+
export declare function setCustomCssEnabled(enabled: boolean): void;
|
|
41
|
+
export declare function importCustomThemeJson(source: string): CustomThemeDefinition;
|
|
42
|
+
export declare function exportCustomThemeJson(): string;
|
|
43
|
+
export declare function resetCustomTheme(): void;
|
|
44
|
+
export declare function resetThemePreference(): void;
|
|
45
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../src/core/theme.ts"],"names":[],"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AiBvB;AAED,wBAAgB,qBAAqB,IACjC,MAAM,CAMT;AAED,wBAAgB,gBAAgB,IAAI,IAAI,CAcvC;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAa3C"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ABSEntity } from "@/core/ABSEntity";
|
|
2
|
+
import { EntityTypes } from "@/domain/EntityTypes";
|
|
3
|
+
import { Tag } from "@/domain/Tag";
|
|
4
|
+
import { Lorebook } from "@/domain/Lorebook";
|
|
5
|
+
import { Location, World } from "@/domain/World";
|
|
6
|
+
export type CharacterKey = {
|
|
7
|
+
id: number;
|
|
8
|
+
};
|
|
9
|
+
export type CharacterData = {
|
|
10
|
+
name: string;
|
|
11
|
+
is_archetype: boolean;
|
|
12
|
+
can_be_user: boolean;
|
|
13
|
+
firstMessage: string;
|
|
14
|
+
lorebook_id?: number;
|
|
15
|
+
};
|
|
16
|
+
export type CharacterCreationData = Pick<CharacterData, 'name'>;
|
|
17
|
+
export declare class Character extends ABSEntity<CharacterKey, CharacterData> {
|
|
18
|
+
private tags;
|
|
19
|
+
private lorebook;
|
|
20
|
+
private starting_locations;
|
|
21
|
+
private static readonly REFERENCE_KEY_ORDER;
|
|
22
|
+
getEntityType(): EntityTypes;
|
|
23
|
+
protected getReferenceKeyOrder(): readonly "id"[];
|
|
24
|
+
static getAll(): Promise<Character[]>;
|
|
25
|
+
static getWithID(id: number): Promise<Character>;
|
|
26
|
+
static createNew(initialData: CharacterCreationData): Promise<Character>;
|
|
27
|
+
static getStartingAt(world: World): Promise<Character[]>;
|
|
28
|
+
static fromReference(reference: string): Promise<Character>;
|
|
29
|
+
asReference(): string;
|
|
30
|
+
getLorebook(): Promise<Lorebook>;
|
|
31
|
+
getTags(): Promise<Tag[]>;
|
|
32
|
+
removeTag(tag: Tag): Promise<void>;
|
|
33
|
+
addTag(tag: Tag): Promise<void>;
|
|
34
|
+
getStartingLocations(): Promise<Location[]>;
|
|
35
|
+
markStartingAt(loc: Location): Promise<void>;
|
|
36
|
+
getStartingLocation(loc: Location): Promise<StartingLocation>;
|
|
37
|
+
}
|
|
38
|
+
export type StartingLocationKeys = {
|
|
39
|
+
worldID: number;
|
|
40
|
+
locationID: number;
|
|
41
|
+
characterID: number;
|
|
42
|
+
};
|
|
43
|
+
export type StartingLocationData = {
|
|
44
|
+
reason_why: string;
|
|
45
|
+
is_static: boolean;
|
|
46
|
+
ttl: number;
|
|
47
|
+
};
|
|
48
|
+
export declare class StartingLocation extends ABSEntity<StartingLocationKeys, StartingLocationData> {
|
|
49
|
+
getEntityType(): EntityTypes;
|
|
50
|
+
protected getReferenceKeyOrder(): (keyof StartingLocationKeys & string)[];
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=Characters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Characters.d.ts","sourceRoot":"","sources":["../../../../../src/domain/Characters.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAOZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAC,GAAG,EAAC,MAAM,cAAc,CAAC;AACjC,OAAO,EAAC,QAAQ,EAA4B,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAK/C,MAAM,MAAM,YAAY,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAC1C,MAAM,MAAM,aAAa,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;CACvB,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;AAE/D,qBAAa,SAAU,SAAQ,SAAS,CA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E,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,MAAM,CAAA;CACd,CAAA;AAED,qBAAa,gBAAiB,SAAQ,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IACvF,aAAa,IAAI,WAAW;IAI5B,SAAS,CAAC,oBAAoB,IAAI,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,EAAE;CAI5E"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ABSEntity } from "@/core/ABSEntity";
|
|
2
|
+
import { EntityTypes } from "@/domain/EntityTypes";
|
|
3
|
+
export type LLMConnectionKeys = {
|
|
4
|
+
id: number;
|
|
5
|
+
};
|
|
6
|
+
export type LLMConnectionData = {
|
|
7
|
+
host_id: number;
|
|
8
|
+
name: string;
|
|
9
|
+
modelID: string | null;
|
|
10
|
+
max_tokens: number;
|
|
11
|
+
};
|
|
12
|
+
export declare class LLMConnection extends ABSEntity<LLMConnectionKeys, LLMConnectionData> {
|
|
13
|
+
private static readonly REFERENCE_KEY_ORDER;
|
|
14
|
+
getEntityType(): EntityTypes;
|
|
15
|
+
protected getReferenceKeyOrder(): readonly (keyof LLMConnectionKeys & string)[];
|
|
16
|
+
static getFromReference(reference: string): Promise<LLMConnection>;
|
|
17
|
+
static getAll(): Promise<LLMConnection[]>;
|
|
18
|
+
static getWithId(id: number): Promise<LLMConnection>;
|
|
19
|
+
assignNewKey(key: string): Promise<void>;
|
|
20
|
+
testConnection(): Promise<boolean>;
|
|
21
|
+
getModels(): Promise<ModelResponse[]>;
|
|
22
|
+
}
|
|
23
|
+
export type APIKeys = {
|
|
24
|
+
id: number;
|
|
25
|
+
};
|
|
26
|
+
export declare class ApiKey extends ABSEntity<APIKeys, any> {
|
|
27
|
+
getEntityType(): EntityTypes;
|
|
28
|
+
protected getReferenceKeyOrder(): readonly (keyof APIKeys & string)[];
|
|
29
|
+
static create(key: string, host_id: number): Promise<ApiKey>;
|
|
30
|
+
update<F extends keyof any>(field: F, value: any): Promise<boolean>;
|
|
31
|
+
}
|
|
32
|
+
export type LLMBackend = {
|
|
33
|
+
readonly id: number | null;
|
|
34
|
+
readonly name: string;
|
|
35
|
+
readonly host: string | null;
|
|
36
|
+
};
|
|
37
|
+
export declare const LLMBackends: {
|
|
38
|
+
readonly NANOGPT: {
|
|
39
|
+
readonly id: 0;
|
|
40
|
+
readonly name: "NanoGPT";
|
|
41
|
+
readonly host: "https://nano-gpt.com";
|
|
42
|
+
};
|
|
43
|
+
readonly OPENROUTER: {
|
|
44
|
+
readonly id: 1;
|
|
45
|
+
readonly name: "OpenRouter";
|
|
46
|
+
readonly host: "https://openrouter.ai";
|
|
47
|
+
};
|
|
48
|
+
readonly CUSTOM_OPENAI: {
|
|
49
|
+
readonly id: null;
|
|
50
|
+
readonly name: "OpenAI - Compatible";
|
|
51
|
+
readonly host: null;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export declare const LLMBackendList: readonly LLMBackend[];
|
|
55
|
+
export declare function getBackendFromID(id: number): LLMBackend;
|
|
56
|
+
export interface ModelResponses {
|
|
57
|
+
object: string;
|
|
58
|
+
data: ModelResponse[];
|
|
59
|
+
}
|
|
60
|
+
export interface ModelResponse {
|
|
61
|
+
id: string;
|
|
62
|
+
object: string;
|
|
63
|
+
name: string;
|
|
64
|
+
context_length: number | null;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=Connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Connection.d.ts","sourceRoot":"","sources":["../../../../../src/domain/Connection.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAMZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAKjD,MAAM,MAAM,iBAAiB,GAAG;IAAC,EAAE,EAAC,MAAM,CAAA;CAAC,CAAA;AAC3C,MAAM,MAAM,iBAAiB,GAAG;IAC5B,OAAO,EAAE,M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C3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,CAAC;AACF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;CAgBuB,CAAC;AAChD,eAAO,MAAM,cAAc,EAAE,SAAS,UAAU,EAClB,CAAC;AAE/B,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,CAIvD;AACD,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,EAAE,CAAC;CACzB;AACD,MAAM,WAAW,aAAa;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum EntityTypes {
|
|
2
|
+
TAGS = "tags",
|
|
3
|
+
KEYWORD = "keywords",
|
|
4
|
+
CHARACTERS = "characters",
|
|
5
|
+
STARTING_LOCATIONS = "startingLocations",
|
|
6
|
+
CHARACTER_TAGS = "characterTags",
|
|
7
|
+
ENTRY = "entries",
|
|
8
|
+
LOREBOOKS = "lorebooks",
|
|
9
|
+
ENTRY_KEYWORD = "entriesKeywords",
|
|
10
|
+
OUTLETS = "outlets",
|
|
11
|
+
WORLDS = "worlds",
|
|
12
|
+
REGIONS = "regions",
|
|
13
|
+
LOCATIONS = "locations",
|
|
14
|
+
EDGES = "edges",
|
|
15
|
+
TEMPLATES = "promptTemplates",
|
|
16
|
+
SECTIONS = "promptSections",
|
|
17
|
+
LLM = "llm",
|
|
18
|
+
API_KEY = "apiKeys",
|
|
19
|
+
SESSIONS = "sessions",
|
|
20
|
+
MESSAGES = "messages",
|
|
21
|
+
CURRENT_LOCATION = "currentLocations"
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=EntityTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityTypes.d.ts","sourceRoot":"","sources":["../../../../../src/domain/EntityTypes.ts"],"names":[],"mappings":"AACA,oBAAY,WAAW;IAEnB,IAAI,SAAS;IACb,OAAO,aAAa;IAGpB,UAAU,eAAe;IACzB,kBAAkB,sBAAsB;IACxC,cAAc,kBAAkB;IAGhC,KAAK,YAAY;IACjB,SAAS,cAAc;IACvB,aAAa,oBAAoB;IACjC,OAAO,YAAY;IAGnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,KAAK,UAAU;IAGf,SAAS,oBAAoB;IAC7B,QAAQ,mBAAmB;IAG3B,GAAG,QAAQ;IACX,OAAO,YAAY;IAGnB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,gBAAgB,qBAAqB;CACxC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { ABSEntity } from "@/core/ABSEntity";
|
|
2
|
+
import { EntityTypes } from "@/domain/EntityTypes";
|
|
3
|
+
export type LorebookKey = {
|
|
4
|
+
id: number;
|
|
5
|
+
};
|
|
6
|
+
export type LorebookData = {
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
export declare class Lorebook extends ABSEntity<LorebookKey, LorebookData> {
|
|
10
|
+
private entries;
|
|
11
|
+
private static readonly REFERENCE_KEY_ORDER;
|
|
12
|
+
getEntityType(): EntityTypes;
|
|
13
|
+
protected getReferenceKeyOrder(): readonly (keyof LorebookKey & string)[];
|
|
14
|
+
static getFromReference(reference: string): Promise<Lorebook>;
|
|
15
|
+
static getAll(): Promise<Lorebook[]>;
|
|
16
|
+
getEntries(): Promise<Entry[]>;
|
|
17
|
+
newEntry(name: string): Promise<Entry>;
|
|
18
|
+
deleteEntry(entry: Entry): Promise<boolean>;
|
|
19
|
+
keywords(): Promise<string[]>;
|
|
20
|
+
}
|
|
21
|
+
export declare enum ActivationStrategy {
|
|
22
|
+
/** Always active per message (this doesn't mean it will appear, It's still bound by probabilities) */
|
|
23
|
+
CONSTANT = 0,
|
|
24
|
+
/** Keyword/Regex activation */
|
|
25
|
+
COMMON = 1
|
|
26
|
+
}
|
|
27
|
+
type EntryKey = {
|
|
28
|
+
lorebook_id: number;
|
|
29
|
+
entry_id: number;
|
|
30
|
+
};
|
|
31
|
+
export type EntryData = {
|
|
32
|
+
name: string | null;
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
content: string | null;
|
|
35
|
+
probability: number;
|
|
36
|
+
outlet_id: number | null;
|
|
37
|
+
delay: number;
|
|
38
|
+
cooldown: number;
|
|
39
|
+
stick_through: number;
|
|
40
|
+
injection_order: number;
|
|
41
|
+
strategy: ActivationStrategy | number;
|
|
42
|
+
embed_text: string | null;
|
|
43
|
+
prevent_further_recursion: boolean;
|
|
44
|
+
non_recursable: boolean;
|
|
45
|
+
delay_until_recursion: boolean;
|
|
46
|
+
scan_depth: number | null;
|
|
47
|
+
};
|
|
48
|
+
export declare class Entry extends ABSEntity<EntryKey, EntryData> {
|
|
49
|
+
private static readonly REFERENCE_KEY_ORDER;
|
|
50
|
+
getEntityType(): EntityTypes;
|
|
51
|
+
protected getReferenceKeyOrder(): readonly (keyof EntryKey & string)[];
|
|
52
|
+
static fromReference(reference: string): Promise<Entry>;
|
|
53
|
+
update<F extends keyof EntryData>(field: F, value: EntryData[F]): Promise<boolean>;
|
|
54
|
+
get<K extends keyof EntryData>(key: K): EntryData[K];
|
|
55
|
+
get<K extends keyof EntryKey>(key: K): EntryKey[K];
|
|
56
|
+
static ofLorebook(lorebook: Lorebook | number): Promise<Entry[]>;
|
|
57
|
+
private keywordPath;
|
|
58
|
+
keywords(): Promise<string[]>;
|
|
59
|
+
addKeyword(name: string): Promise<boolean>;
|
|
60
|
+
removeKeyword(keyword: string): Promise<boolean>;
|
|
61
|
+
getOutletName(): Promise<string | null>;
|
|
62
|
+
updateOutlet(outlet: string): Promise<void>;
|
|
63
|
+
clearOutlet(): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Moves this entry to another lorebook.
|
|
66
|
+
* Callers must be aware that <b> this essentially destroys the current reference </b> as entity keys are read-only.
|
|
67
|
+
* As such, it must be discarded after calling this function.
|
|
68
|
+
*/
|
|
69
|
+
moveToLorebook(id: number): Promise<boolean>;
|
|
70
|
+
}
|
|
71
|
+
export declare function getAllKeywords(): Promise<string[]>;
|
|
72
|
+
export type OutletKey = {
|
|
73
|
+
id: number;
|
|
74
|
+
};
|
|
75
|
+
export type OutletData = {
|
|
76
|
+
name: string;
|
|
77
|
+
};
|
|
78
|
+
export declare class Outlet extends ABSEntity<OutletKey, OutletData> {
|
|
79
|
+
protected getReferenceKeyOrder(): (keyof OutletKey & string)[];
|
|
80
|
+
getEntityType(): EntityTypes;
|
|
81
|
+
static outlets(): Promise<string[]>;
|
|
82
|
+
}
|
|
83
|
+
export {};
|
|
84
|
+
//# sourceMappingURL=Lorebook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Lorebook.d.ts","sourceRoot":"","sources":["../../../../../src/domain/Lorebook.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EASZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAMjD,MAAM,MAAM,WAAW,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AACxC,MAAM,MAAM,YAAY,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3C,qBAAa,QAAS,SAAQ,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC;IAC9D,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAA2D;IAEtG,aAAa,IAAI,WAAW;IAI5B,SAAS,CAAC,oBAAoB,IAAI,SAAS,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,EAAE;WAIrD,gBAAgB,CAAC,SA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;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAC1C,qBAAa,MAAO,SAAQ,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;IACxD,SAAS,CAAC,oBAAoB,IAAI,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,EAAE;IAI9D,aAAa,IAAI,WAAW;WAIR,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAInD"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ABSEntity } from "@/core/ABSEntity";
|
|
2
|
+
import { EntityTypes } from "@/domain/EntityTypes";
|
|
3
|
+
import { ChatCompletionRole } from "@/types/ChatCompletions";
|
|
4
|
+
export type REASONING_EFFORT_VALUE = {
|
|
5
|
+
id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const REASONING_EFFORT: {
|
|
9
|
+
readonly NONE: {
|
|
10
|
+
readonly id: 0;
|
|
11
|
+
readonly name: "none";
|
|
12
|
+
};
|
|
13
|
+
readonly MINIMAL: {
|
|
14
|
+
readonly id: 1;
|
|
15
|
+
readonly name: "minimal";
|
|
16
|
+
};
|
|
17
|
+
readonly LOW: {
|
|
18
|
+
readonly id: 2;
|
|
19
|
+
readonly name: "low";
|
|
20
|
+
};
|
|
21
|
+
readonly MEDIUM: {
|
|
22
|
+
readonly id: 3;
|
|
23
|
+
readonly name: "medium";
|
|
24
|
+
};
|
|
25
|
+
readonly HIGH: {
|
|
26
|
+
readonly id: 4;
|
|
27
|
+
readonly name: "high";
|
|
28
|
+
};
|
|
29
|
+
readonly MAXIMUM: {
|
|
30
|
+
readonly id: 5;
|
|
31
|
+
readonly name: "xhigh";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export type ReasoningEffort = typeof REASONING_EFFORT[keyof typeof REASONING_EFFORT];
|
|
35
|
+
export type ReasoningEffortId = ReasoningEffort["id"];
|
|
36
|
+
export declare const REASONING_EFFORT_IDs: (0 | 1 | 2 | 3 | 4 | 5)[];
|
|
37
|
+
export declare const REASONING_EFFORT_NAMEs: ("none" | "medium" | "minimal" | "low" | "high" | "xhigh")[];
|
|
38
|
+
export type PromptTemplateKey = {
|
|
39
|
+
id: number;
|
|
40
|
+
};
|
|
41
|
+
export type PromptTemplateData = {
|
|
42
|
+
connection_id: number | null;
|
|
43
|
+
name: string;
|
|
44
|
+
max_tokens: number;
|
|
45
|
+
streaming: boolean;
|
|
46
|
+
chat_history_budget: number;
|
|
47
|
+
lorebooks_budget: number;
|
|
48
|
+
temperature: number;
|
|
49
|
+
top_p: number;
|
|
50
|
+
frequency_penalty: number;
|
|
51
|
+
presence_penalty: number;
|
|
52
|
+
repetition_penalty: number;
|
|
53
|
+
top_k: number;
|
|
54
|
+
exclude_reasoning: boolean;
|
|
55
|
+
reasoning_effort: ReasoningEffortId;
|
|
56
|
+
};
|
|
57
|
+
export declare class PromptTemplate extends ABSEntity<PromptTemplateKey, PromptTemplateData> {
|
|
58
|
+
private sections;
|
|
59
|
+
private static readonly REFERENCE_KEY_ORDER;
|
|
60
|
+
getEntityType(): EntityTypes;
|
|
61
|
+
protected getReferenceKeyOrder(): readonly (keyof PromptTemplateKey & string)[];
|
|
62
|
+
static getFromReference(reference: string): Promise<PromptTemplate>;
|
|
63
|
+
getSections(): Promise<PromptSection[]>;
|
|
64
|
+
createSection(name: string): Promise<PromptSection>;
|
|
65
|
+
static getAll(): Promise<PromptTemplate[]>;
|
|
66
|
+
}
|
|
67
|
+
export type PromptSectionKey = {
|
|
68
|
+
prompt_id: number;
|
|
69
|
+
section_id: number;
|
|
70
|
+
};
|
|
71
|
+
export type PromptSectionData = {
|
|
72
|
+
name: string;
|
|
73
|
+
active: boolean;
|
|
74
|
+
position: number;
|
|
75
|
+
role: ChatCompletionRole;
|
|
76
|
+
content: string;
|
|
77
|
+
};
|
|
78
|
+
export declare class PromptSection extends ABSEntity<PromptSectionKey, PromptSectionData> {
|
|
79
|
+
private static readonly REFERENCE_KEY_ORDER;
|
|
80
|
+
getEntityType(): EntityTypes;
|
|
81
|
+
protected getReferenceKeyOrder(): readonly (keyof PromptSectionKey & string)[];
|
|
82
|
+
static fetchFromReference(reference: string): Promise<PromptSection>;
|
|
83
|
+
static exchange(parent: PromptTemplate, one: PromptSection, two: PromptSection): Promise<boolean>;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=Prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Prompts.d.ts","sourceRoot":"","sources":["../../../../../src/domain/Prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAA6D,MAAM,kBAAkB,CAAC;AACvG,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAM3D,MAAM,MAAM,sBAAsB,GAAG;IAAC,EAAE,EAAC,MAAM,CAAC;IAAC,IAAI,EAAC,MAAM,CAAA;CAAC,CAAA;AAC7D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;CAO8B,CAAA;AAC3D,MAAM,MAAM,eAAe,GAAG,OAAO,gBAAgB,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AACrF,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;AAEtD,eAAO,MAAM,oBAAoB,2BAAyD,CAAC;AAC3F,eAAO,MAAM,sBAAsB,8DAA2D,CAAC;AAE/F,MAAM,MAAM,iBAAiB,GAAG;IAAC,EAAE,EAAC,MAAM,CAAA;CAAC,CAAA;AAC3C,MAAM,MAAM,kBAAkB,GAAG;IAC7B,aAAa,EAAC,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IAEnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IAEzB,WAAW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AAS,CAAC,oBAAoB,IAAI,SAAS,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,EAAE;WAI1D,kBAAkB,CAAC,SAAS,EAAC,MAAM,GAAI,OAAO,CAAC,aAAa,CAAC;WAO7D,QAAQ,CAAC,MAAM,EAAC,cAAc,EAAE,GAAG,EAAC,aAAa,EAAE,GAAG,EAAC,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC;CAc9G"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ABSEntity } from "@/core/ABSEntity";
|
|
2
|
+
import { EntityTypes } from "@/domain/EntityTypes";
|
|
3
|
+
import { Location, World } from "@/domain/World";
|
|
4
|
+
import { Character } from "@/domain/Characters";
|
|
5
|
+
import { PromptDTO } from "@/types/DTOs";
|
|
6
|
+
import { PromptTemplate } from "@/domain/Prompts";
|
|
7
|
+
import { ChatCompletionRequest, ChatCompletionRole } from "@/types/ChatCompletions";
|
|
8
|
+
export type SessionKey = {
|
|
9
|
+
id: number;
|
|
10
|
+
};
|
|
11
|
+
export type SessionData = {
|
|
12
|
+
name: string;
|
|
13
|
+
template_id: number | null;
|
|
14
|
+
current_tick: number;
|
|
15
|
+
world_id: number;
|
|
16
|
+
user_id: number;
|
|
17
|
+
};
|
|
18
|
+
export declare class Session extends ABSEntity<SessionKey, SessionData> {
|
|
19
|
+
private static readonly REFERENCE_KEY_ORDER;
|
|
20
|
+
getEntityType(): EntityTypes;
|
|
21
|
+
protected getReferenceKeyOrder(): readonly (keyof SessionKey & string)[];
|
|
22
|
+
static getFromReference(reference: string): Promise<Session>;
|
|
23
|
+
getWorld(): Promise<World>;
|
|
24
|
+
getUserCharacter(): Promise<Character>;
|
|
25
|
+
getMessages(): Promise<Message[]>;
|
|
26
|
+
getTemplate(): Promise<PromptTemplate | null>;
|
|
27
|
+
isLastMessage(message: Message): boolean;
|
|
28
|
+
private incrementTick;
|
|
29
|
+
newUserMessage(lastMessage: Message, message: string): Promise<Message>;
|
|
30
|
+
deleteMessage(message: Message): Promise<boolean>;
|
|
31
|
+
getNewPrompt(): Promise<PromptDTO>;
|
|
32
|
+
generateNewMessage(request: ChatCompletionRequest): Promise<Message>;
|
|
33
|
+
static newSession(name: string, world: World, user: Character): Promise<Session>;
|
|
34
|
+
}
|
|
35
|
+
export interface NewMessageOrder {
|
|
36
|
+
prompt: string;
|
|
37
|
+
}
|
|
38
|
+
export type MessagesKey = {
|
|
39
|
+
session_id: number;
|
|
40
|
+
tick_num: number;
|
|
41
|
+
};
|
|
42
|
+
export type MessageData = {
|
|
43
|
+
world_id: number;
|
|
44
|
+
location_id: number;
|
|
45
|
+
time: number;
|
|
46
|
+
prompt?: string;
|
|
47
|
+
role: ChatCompletionRole;
|
|
48
|
+
content: string;
|
|
49
|
+
response_num: number;
|
|
50
|
+
active_response: number;
|
|
51
|
+
};
|
|
52
|
+
export declare class Message extends ABSEntity<MessagesKey, MessageData> {
|
|
53
|
+
private static readonly REFERENCE_KEY_ORDER;
|
|
54
|
+
getEntityType(): EntityTypes;
|
|
55
|
+
protected getReferenceKeyOrder(): readonly (keyof MessagesKey & string)[];
|
|
56
|
+
update<F extends keyof MessageData>(field: F, value: MessageData[F]): Promise<boolean>;
|
|
57
|
+
regenerate(): Promise<void>;
|
|
58
|
+
getLocation(): Promise<Location>;
|
|
59
|
+
getCharacters(): Promise<Character[]>;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=Session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Session.d.ts","sourceRoot":"","sources":["../../../../../src/domain/Session.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAOZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAC,QAAQ,EAA6B,KAAK,EAAsB,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAC,SAAS,EAA8B,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAA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ain/EntityTypes";
|
|
3
|
+
import { EntityField } from "@/types/DTOs";
|
|
4
|
+
import { CharacterKey } from "@/domain/Characters";
|
|
5
|
+
export type TagKey = {
|
|
6
|
+
id: number;
|
|
7
|
+
};
|
|
8
|
+
export type TagData = {
|
|
9
|
+
name: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare class Tag extends ABSEntity<TagKey, TagData> {
|
|
13
|
+
getEntityType(): EntityTypes;
|
|
14
|
+
protected getReferenceKeyOrder(): readonly (keyof TagKey & string)[];
|
|
15
|
+
getIterationArr(): EntityField<TagKey, TagData>[];
|
|
16
|
+
static ofCharacter(key: CharacterKey): Promise<Tag[]>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=Tag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../../src/domain/Tag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAM,WAAW,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAIjD,MAAM,MAAM,MAAM,GAAG;IAAC,EAAE,EAAC,MAAM,CAAA;CAAC,CAAA;AAChC,MAAM,MAAM,OAAO,GAAG;IAAC,IAAI,EAAC,MAAM,CAAC;IAAC,KAAK,CAAC,EAAC,MAAM,CAAA;CAAC,CAAA;AAElD,qBAAa,GAAI,SAAQ,SAAS,CAAC,MAAM,EAAC,OAAO,CAAC;IAC9C,aAAa,IAAI,WAAW;IAI5B,SAAS,CAAC,oBAAoB,IAAI,SAAS,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,EAAE;IAKpE,eAAe,IAAI,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;WAI7B,WAAW,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;CASrE"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ABSEntity } from "@/core/ABSEntity";
|
|
2
|
+
import { EntityTypes } from "@/domain/EntityTypes";
|
|
3
|
+
import { Lorebook } from "@/domain/Lorebook";
|
|
4
|
+
import { Character } from "@/domain/Characters";
|
|
5
|
+
export type WorldKey = {
|
|
6
|
+
id: number;
|
|
7
|
+
};
|
|
8
|
+
export type WorldData = {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
lorebook_id: number;
|
|
12
|
+
};
|
|
13
|
+
export declare class World extends ABSEntity<WorldKey, WorldData> {
|
|
14
|
+
private static readonly REFERENCE_KEY_ORDER;
|
|
15
|
+
private locations;
|
|
16
|
+
private lorebook;
|
|
17
|
+
getEntityType(): EntityTypes;
|
|
18
|
+
protected getReferenceKeyOrder(): readonly (keyof WorldKey & string)[];
|
|
19
|
+
getLorebook(): Promise<Lorebook>;
|
|
20
|
+
getLocations(): Promise<Location[]>;
|
|
21
|
+
addLocation(name: string): Promise<Location>;
|
|
22
|
+
deleteLocation(location_id: number): Promise<boolean>;
|
|
23
|
+
/** @return regions with no parents */
|
|
24
|
+
getRootRegions(): Promise<Region[]>;
|
|
25
|
+
getAllRegions(): Promise<Region[]>;
|
|
26
|
+
/** @return a list of locations with no parent region */
|
|
27
|
+
getFreeLocations(): Promise<Location[]>;
|
|
28
|
+
}
|
|
29
|
+
export type RegionKey = {
|
|
30
|
+
world_id: number;
|
|
31
|
+
id: number;
|
|
32
|
+
};
|
|
33
|
+
export type RegionData = {
|
|
34
|
+
parent_region_id: number;
|
|
35
|
+
lorebook_id: number;
|
|
36
|
+
name: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
export declare class Region extends ABSEntity<RegionKey, RegionData> {
|
|
40
|
+
private static readonly REFERENCE_KEY_ORDER;
|
|
41
|
+
getEntityType(): EntityTypes;
|
|
42
|
+
protected getReferenceKeyOrder(): readonly (keyof RegionKey & string)[];
|
|
43
|
+
getLocations(): Promise<Location[]>;
|
|
44
|
+
getFirstChildren(): Promise<Region[]>;
|
|
45
|
+
getLorebook(): Promise<Lorebook>;
|
|
46
|
+
}
|
|
47
|
+
export type LocationKey = {
|
|
48
|
+
worldID: number;
|
|
49
|
+
id: number;
|
|
50
|
+
};
|
|
51
|
+
export type LocationData = {
|
|
52
|
+
name: string;
|
|
53
|
+
lorebook_id: number;
|
|
54
|
+
description: string;
|
|
55
|
+
region_id: number | null;
|
|
56
|
+
};
|
|
57
|
+
export declare class Location extends ABSEntity<LocationKey, LocationData> {
|
|
58
|
+
private static readonly REFERENCE_KEY_ORDER;
|
|
59
|
+
private lorebook;
|
|
60
|
+
getEntityType(): EntityTypes;
|
|
61
|
+
protected getReferenceKeyOrder(): readonly (keyof LocationKey & string)[];
|
|
62
|
+
getStartingHere(): Promise<Character[]>;
|
|
63
|
+
getLorebook(): Promise<Lorebook>;
|
|
64
|
+
/** @return neighbors ( from this location to other or the inverse) */
|
|
65
|
+
getNeighbours(): Promise<Location[]>;
|
|
66
|
+
getOutEdges(): Promise<LocationEdge[]>;
|
|
67
|
+
getInEdges(): Promise<LocationEdge[]>;
|
|
68
|
+
connect(other: Location, initial_data: Partial<EdgeData>): Promise<LocationEdge>;
|
|
69
|
+
disconnect(other: Location): Promise<boolean>;
|
|
70
|
+
getEdgeInfo(other: Location): Promise<LocationEdge>;
|
|
71
|
+
}
|
|
72
|
+
export type EdgeKey = {
|
|
73
|
+
world_id: number;
|
|
74
|
+
from_id: number;
|
|
75
|
+
to_id: number;
|
|
76
|
+
};
|
|
77
|
+
export type EdgeData = {
|
|
78
|
+
edge_description: string;
|
|
79
|
+
show_destination_name: boolean;
|
|
80
|
+
show_destination_description: boolean;
|
|
81
|
+
is_traversable: boolean;
|
|
82
|
+
};
|
|
83
|
+
export declare class LocationEdge extends ABSEntity<EdgeKey, EdgeData> {
|
|
84
|
+
getEntityType(): EntityTypes;
|
|
85
|
+
protected getReferenceKeyOrder(): (keyof EdgeKey & string)[];
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=World.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"World.d.ts","sourceRoot":"","sources":["../../../../../src/domain/World.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAMZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAC,QAAQ,EAA4B,MAAM,mBAAmB,CAAC;AAEtE,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAG9C,MAAM,MAAM,QAAQ,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AACrC,MAAM,MAAM,SAAS,GAAG;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACvB,CAAA;AAED,qBAAa,KAAM,SAAQ,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC;IACrD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAyD;IAEpG,OAAO,CAAC,SAAS,CAA2B;IAC5C,OAAO,CAAC,QAAQ,CAAyB;IAEzC,aAAa,IAAI,WAAW;IAI5B,SAAS,CAAC,oBAAoB,IAAI,SAAS,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,EAAE;IAKzD,WAAW,IAAI,OAAO,CAAC,QAAQ,CAAC;IAchC,YAAY,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAUnC,WAAW,CAAC,IAAI,EAAC,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAe3C,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAgBlE,sCAAsC;IACzB,cAAc,IAAK,OAAO,CAAC,MAAM,EAAE,CAAC;IAQpC,aAAa,IA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
2
|
+
id: string;
|
|
3
|
+
displayName: string;
|
|
4
|
+
description: string;
|
|
5
|
+
configMap: null;
|
|
6
|
+
};
|
|
7
|
+
export declare function fetchExtensions(): Promise<ExtensionDTO[]>;
|
|
8
|
+
export interface ExtensionField {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string | null;
|
|
11
|
+
kind: 'String' | 'Number' | 'Double' | 'Boolean';
|
|
12
|
+
value: unknown;
|
|
13
|
+
possible_values: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface ExtensionConfig {
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=extensions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/extensions.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,IAAI,CAAA;CAClB,CAAA;AAED,wBAAsB,eAAe,IAAK,OAAO,CAAC,YAAY,EAAE,CAAC,CAOhE;AAID,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IACjD,KAAK,EAAE,OAAO,CAAC;IACf,eAAe,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,eAAe;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerPrimitiveEditors.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/registerPrimitiveEditors.ts"],"names":[],"mappings":"AA4FA,wBAAgB,wBAAwB,IAAI,IAAI,CAoB/C"}
|