cortico-world-fun 0.3.0 → 0.7.5
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 +571 -404
- package/PUBLISHING.md +37 -85
- package/README.md +199 -47
- package/assets/home/chibi-cards.webp +0 -0
- package/assets/home/chibi-chatting.webp +0 -0
- package/assets/home/chibi-cooking.webp +0 -0
- package/assets/home/chibi-gaming.webp +0 -0
- package/assets/home/chibi-idle.webp +0 -0
- package/assets/home/chibi-looking_outside.webp +0 -0
- package/assets/home/chibi-painting.webp +0 -0
- package/assets/home/chibi-reading.webp +0 -0
- package/assets/home/chibi-sleeping.webp +0 -0
- package/assets/home/chibi-watching.webp +0 -0
- package/assets/icon.png +0 -0
- package/describe.json +365 -48
- package/dist/webui.js +7515 -848
- package/package.json +16 -10
- package/src/ENV_PROMPT.md +11 -10
- package/src/bridge-echo-solo.json +137 -0
- package/src/config.js +356 -176
- package/src/creek-letter.js +3 -0
- package/src/definition.js +121 -106
- package/src/exploration.js +2 -2
- package/src/home-room.js +895 -0
- package/src/journeys.js +1 -1
- package/src/phases.js +5 -10
- package/src/place-cover.js +176 -0
- package/src/place-library.js +794 -0
- package/src/place-transfer.js +162 -0
- package/src/state.js +717 -596
- package/src/story-canon.js +21 -0
- package/src/story-dm.js +140 -0
- package/src/story-examples.js +597 -78
- package/src/story-free.js +298 -0
- package/src/story-images.js +474 -0
- package/src/story-library.js +187 -20
- package/src/story-node-limit.js +55 -0
- package/src/story-packs.js +333 -16
- package/src/story-panel.js +314 -0
- package/src/story-read.js +113 -0
- package/src/story-reliability.js +95 -0
- package/src/story-secrets.js +485 -0
- package/src/story-venue-migration.js +113 -0
- package/src/swapped-plaque-riddle.json +167 -0
- package/src/time.js +16 -0
- package/src/user-venues.js +44 -15
- package/src/venues.js +93 -9
- package/src/world.js +3690 -1847
- package/dist/artwork.js +0 -64
- package/dist/stories.js +0 -395
package/src/config.js
CHANGED
|
@@ -1,176 +1,356 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* 段名是 `config.json` 的 `worlds.fun`。WebUI 热改就地写这个对象,
|
|
5
|
-
* World 每次用时现读,所以这里只有默认值与 schema,不持有副本。
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
1
|
+
/**
|
|
2
|
+
* 从0开始的肥鱼大冒险的配置段与文案。
|
|
3
|
+
*
|
|
4
|
+
* 段名是 `config.json` 的 `worlds.fun`。WebUI 热改就地写这个对象,
|
|
5
|
+
* World 每次用时现读,所以这里只有默认值与 schema,不持有副本。
|
|
6
|
+
*
|
|
7
|
+
* 目前用户可配的:funOn / funSessionTTLMin / funAskReport / funTasteFromFeast,
|
|
8
|
+
* 加上 0.7.3 归位的故事长度、主持地址与模型、剧情图片来源。
|
|
9
|
+
* **API Key 与自定义工作流不在配置里**:前者只存本机 DPAPI 密文,后者是 32 KB
|
|
10
|
+
* JSON(宿主 string 只渲染单行输入),入口都在「出游 → 设置 → 高级」。
|
|
11
|
+
*
|
|
12
|
+
* 她什么时候出门:`funHomeAutoGo` 是「主人允许她自己出门」的许可,本身不带时段。
|
|
13
|
+
* 几点算她自己的时间由「鱼的每一天」的「她自己的时间」决定;那边叫醒她时,
|
|
14
|
+
* 空着的时段就是她可以出门的许可。去不去、去哪儿、去几次仍由她和主对话定。
|
|
15
|
+
* 本 World 不读「鱼的每一天」的日程、不挑地方、不替她出门,也不再注册自己的叫醒。
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export const ID = 'fun';
|
|
19
|
+
export const LABEL = '从0开始的肥鱼大冒险';
|
|
20
|
+
|
|
21
|
+
/** `worlds.fun` 段的默认值;`enabled` 由框架的 World 开关管理。 */
|
|
22
|
+
export const DEFAULTS = Object.freeze({
|
|
23
|
+
enabled: false,
|
|
24
|
+
/** 总开关。关掉=不注入场所清单,工具与面板还在(想现在去随时能去)。 */
|
|
25
|
+
funOn: true,
|
|
26
|
+
/** 一次出游挂多久自动回家(分钟)。到点不催,只是不再算「正在逛」。 */
|
|
27
|
+
funSessionTTLMin: 90,
|
|
28
|
+
/** 回家回执要不要提醒她 feast_life_play 记一笔、跟主人说一句。 */
|
|
29
|
+
funAskReport: true,
|
|
30
|
+
/**
|
|
31
|
+
* 吃喝的味道去不去「鱼的每一天」拿。
|
|
32
|
+
*
|
|
33
|
+
* **这不是自动探测**:World 不能去探测别的扩展装没装(那本身就是一种依赖,
|
|
34
|
+
* 认证要查)。所以这是用户手动拨的一个意愿开关:
|
|
35
|
+
*
|
|
36
|
+
* true → 吃喝的回执会写「用 feast_menu / feast_eat 去点一道真的,那里才有九维口感」
|
|
37
|
+
* false → 只写「你在这儿喝了什么」,一个字都不提味道
|
|
38
|
+
*
|
|
39
|
+
* 默认 true:装了鱼的每一天是常见情况;没装时她调不到 feast_eat,会自己退回
|
|
40
|
+
* 「只说我喝了什么」——所以开着也不会编味道。
|
|
41
|
+
*/
|
|
42
|
+
funTasteFromFeast: true,
|
|
43
|
+
/**
|
|
44
|
+
* 「家」的「允许她自己出门」:默认关;只是许可,不带自己的叫醒时段。
|
|
45
|
+
* 时段跟着「鱼的每一天」的「她自己的时间」走——本 World 不读它的日程、不挑地方。
|
|
46
|
+
*/
|
|
47
|
+
funHomeAutoGo: false,
|
|
48
|
+
/** 剧情图片独立开关;来源在故事面板设置,默认回执委派,显式本地URL可选直连。 */
|
|
49
|
+
funStoryImages: false,
|
|
50
|
+
/**
|
|
51
|
+
* 不用点按钮:每一处新的场景都自动准备一份「委派参数」递给她,画不画由她定。
|
|
52
|
+
* 只对委派型来源生效(直连 ComfyUI 要花算力,仍然只由面板按钮触发)。
|
|
53
|
+
*/
|
|
54
|
+
funStoryAutoImages: true,
|
|
55
|
+
/** 可选文本主持;默认沿用宿主,面板可配置本机加密的独立接口。 */
|
|
56
|
+
funStoryDM: false,
|
|
57
|
+
/**
|
|
58
|
+
* 文字通道(QQ/控制台聊天)能不能开局和推进故事;面板永远可玩。
|
|
59
|
+
*
|
|
60
|
+
* 默认开:2026-11-23 群友反馈「聊天里玩不了故事」比省 schema 更重要。
|
|
61
|
+
* 关掉仍有效——关着时聊天里只留 candidates / detail,省 6 个工具的开销。
|
|
62
|
+
*/
|
|
63
|
+
funStoryTextOn: true,
|
|
64
|
+
/**
|
|
65
|
+
* 聊天里也能用作者工具 `fun_story`。
|
|
66
|
+
*
|
|
67
|
+
* 默认关:它 1.1k 字符的 schema 是每轮固定开销,而写故事主要在面板里做
|
|
68
|
+
* (面板走 `#invoke`,不依赖这个工具)。要在聊天里让她建/停/导入故事再打开。
|
|
69
|
+
*/
|
|
70
|
+
funStoryAuthorInChat: false,
|
|
71
|
+
/** 自由模式(version 3 场景包):作者写设定,DM 即兴演。 */
|
|
72
|
+
funStoryFree: false,
|
|
73
|
+
/** 自由模式单趟回合上限(1 回合 = 1 次模型调用)。 */
|
|
74
|
+
funStoryFreeTurns: 40,
|
|
75
|
+
/** 鱼自主游玩:每段最多几步(走一步 = 一次真实推进,含不花模型的那一步)。 */
|
|
76
|
+
funAutoSteps: 20,
|
|
77
|
+
/** 鱼自主游玩:每段最多几次「鱼自己决定」(每一次都是一次真实模型请求)。 */
|
|
78
|
+
funAutoCalls: 6,
|
|
79
|
+
/**
|
|
80
|
+
* 故事长度:新建/导入故事最多几个节点。0 = 不限。
|
|
81
|
+
*
|
|
82
|
+
* 0.7.3 从 `fun/story-node-limit.json` 搬进配置(旧文件启动时一次性迁移),
|
|
83
|
+
* 面板不再有输入框。改小不会删掉或阻断已有故事。
|
|
84
|
+
*/
|
|
85
|
+
funStoryNodeLimit: 16,
|
|
86
|
+
/**
|
|
87
|
+
* 文本主持的接口地址(OpenAI 兼容)。留空沿用宿主 cognition.request。
|
|
88
|
+
*
|
|
89
|
+
* 0.7.3 从 `fun/story-secrets.json` 的密文里搬出来(地址不是秘密);
|
|
90
|
+
* **API Key 仍在 story-secrets.json(DPAPI)**,绝不进普通配置。
|
|
91
|
+
*/
|
|
92
|
+
funStoryDmUrl: '',
|
|
93
|
+
/** 文本主持的模型名;留空由接口用自己的默认模型。同样搬自 story-secrets。 */
|
|
94
|
+
funStoryDmModel: '',
|
|
95
|
+
/**
|
|
96
|
+
* 剧情图片来源。留空 = 委派「鱼的生图包」;loopback URL = 直连 ComfyUI;
|
|
97
|
+
* 其他文本 = 交给指定插件。0.7.3 从 `fun/story-images/settings.json` 搬进配置,
|
|
98
|
+
* 那个文件只留自定义工作流。
|
|
99
|
+
*/
|
|
100
|
+
funStoryImageSource: '',
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
const ZH = {
|
|
104
|
+
label: '从0开始的肥鱼大冒险',
|
|
105
|
+
lamp: '从0开始的肥鱼大冒险',
|
|
106
|
+
stopped: '未启动',
|
|
107
|
+
badgeSession: '正在逛',
|
|
108
|
+
badgePlaces: '能去哪儿',
|
|
109
|
+
prompt: '从0开始的肥鱼大冒险 World 的环境说明:她可以真去逛二十处地方——游乐场、海洋馆、庙会、漫展、电影院、动物园、公园、电玩城、KTV、博物馆、猫咖、爬山、咖啡店、奶茶店、餐厅、图书馆、夜市、澡堂、旧货市场、江边。还能在面板上自己加地方、改预设。进门、逛摊位、买纪念品、拍照、回家;回家回执把这一趟收成一句话,交给她记进自己的日程。本插件自己不调用其他 World 的工具、也不读别人的私有状态;她要在家里点吃喝、查日程或配图,仍可以自己调 feast_* / imggen_draw。',
|
|
110
|
+
config: {
|
|
111
|
+
title: '从0开始的肥鱼大冒险',
|
|
112
|
+
funOn: '开着',
|
|
113
|
+
funOnDesc: '总开关。关掉之后不往提示词里注入场所清单;工具和面板照旧可用,她想逛随时能逛。',
|
|
114
|
+
funSessionTTLMin: '一趟逛多久',
|
|
115
|
+
funSessionTTLMinDesc: '一次出游最多挂多少分钟,过了这段时间就不再算「正在逛」。不会催她回家,也不会替她记一笔;下一次游逛时会提醒她这趟已经挂了很久。',
|
|
116
|
+
funAskReport: '回家说一声',
|
|
117
|
+
funAskReportDesc: '开启时,回家回执会提醒她把「今天逛了什么」用 feast_life_play 记进自己的日程,再跟主人说一句。关掉就只给这段文字,不提记账。',
|
|
118
|
+
funTasteFromFeast: '吃喝的味道去「鱼的每一天」拿',
|
|
119
|
+
funTasteFromFeastDesc: '开启时,咖啡店/奶茶店/餐厅/夜市的回执会让她用 feast_menu → feast_eat 去「鱼的每一天」点一道真的,那里才有九维口感、香气和余韵。关掉就只说「在这儿喝了什么」,一个字都不提味道。\n\n注意:这不是自动检测——本插件不会去探测别的扩展装没装(World 契约不允许互相依赖)。所以装没装都要你自己定这一项:装了鱼的每一天建议开着。',
|
|
120
|
+
funHomeAutoGo: '家:允许她自己出门',
|
|
121
|
+
funHomeAutoGoDesc: '打开后,她自己出门的许可跟着「鱼的每一天」的「她自己的时间」走:那边叫醒她时,先看当天日程(feast_life_now),自由就出门、写着上班睡觉就不出门。本插件不再单独设「自己出门的时段」,也不读对方的日程、不挑地方、不会自己把她送出门。默认关闭。',
|
|
122
|
+
funStoryDM: '可选文本主持',
|
|
123
|
+
funStoryDMDesc: '默认关闭。接口地址与模型名就在下面;API Key 不放进配置,请到「出游 → 设置 → 高级」填写,只存本机 DPAPI 密文。地址、模型都留空沿用宿主 cognition.request;填了地址和密钥则由本插件直连 OpenAI 兼容 POST /chat/completions,它们不传给宿主或其他插件。Windows 使用 DPAPI 当前用户加密,其他平台禁用凭据保存;换机器或重装需重填。可立即清除。主持只提议合法选项,当前行动者明确提交才执行。每趟 6 次、每步 2 次(含重试、失败、取消),未知 token 不估算。',
|
|
124
|
+
funStoryNodeLimit: '故事长度(节点上限)',
|
|
125
|
+
funStoryNodeLimitDesc: '新建或导入故事最多几个节点,0 = 不限。单篇 JSON 仍最多 32 KB;改小不会删除或阻断已有故事。',
|
|
126
|
+
funStoryDmUrl: '文本主持接口地址',
|
|
127
|
+
funStoryDmUrlDesc: '留空沿用宿主。填 OpenAI 兼容地址(http/https,不能带账号、查询或片段)。API Key 在「出游 → 设置 → 高级」填写,只存本机密文。',
|
|
128
|
+
funStoryDmModel: '文本主持模型名',
|
|
129
|
+
funStoryDmModelDesc: '留空由接口用自己的默认模型;最长 200 字,不能含控制字符。密钥不进配置。',
|
|
130
|
+
funStoryImageSource: '剧情图片来源',
|
|
131
|
+
funStoryImageSourceDesc: '留空 = 委派「鱼的生图包」;本机 loopback URL = 直连 ComfyUI;其他文本 = 交给指定插件。自定义工作流仍在「出游 → 设置 → 高级」。',
|
|
132
|
+
funStoryTextOn: '文字通道也能玩故事',
|
|
133
|
+
funStoryTextOnDesc: '默认开启:QQ 或控制台聊天里也能开始和推进故事(fun_story_start / fun_story_act),六个只读查询也全部可用。关掉后聊天里只留 fun_story_candidates / fun_story_detail 两个查询应付「有什么故事」,其余故事工具不出现,每轮省下它们的 schema;面板任何时候都能玩。\n\n注意:World 拿不到消息来源,所以这是「允许文字通道」的总开关,不能只对 QQ 生效。',
|
|
134
|
+
funStoryAuthorInChat: '聊天里也能管故事',
|
|
135
|
+
funStoryAuthorInChatDesc: '默认关闭。开启后,聊天里会多一个作者工具 fun_story(模板、校验、预览、导入导出、启停、删除);关着时它不出现——这能省下它每轮约 1.1k 字符的固定开销。面板里的「故事工坊」不靠这个工具,任何时候都能写、能管。',
|
|
136
|
+
funStoryFree: '自由模式(场景包)',
|
|
137
|
+
funStoryFreeDesc: '默认关闭。开启后可以使用 version 3「场景包」:作者只写大方向、正史、人物和结局条件,具体怎么演交给主持即兴。主持只能修改作者登记过的状态,结局由程序按条件判定;旧的选项式故事完全不受影响,两种模式可以同时存在。',
|
|
138
|
+
funStoryFreeTurns: '自由模式一段走多少回合',
|
|
139
|
+
funStoryFreeTurnsDesc: '一段最多多少回合(1 回合 = 1 次模型调用)。场景包自己写了更小的 maxTurns 就按更小的来。用完后这一段的输入框会收起:可以点「再来一段」接着走(一趟最多三段,要你亲手点),也可以收起进回忆;不会自动续。',
|
|
140
|
+
funAutoSteps: '鱼自己玩:每段最多几步',
|
|
141
|
+
funAutoStepsDesc: '「鱼自己游玩」每一段最多自动走几步,默认 20,最多 200。走动、选选项都算一步。用满后这一段停下,轮到你;你可以点「再来一段」把步数和决定次数都重置,一趟最多三段(要你亲手点,不自动续)。这个数只影响鱼自己玩,不影响你手动点。',
|
|
142
|
+
funAutoCalls: '鱼自己玩:每段最多几次决定',
|
|
143
|
+
funAutoCallsDesc: '「鱼自己游玩」每一段最多让鱼自己决定几次,默认 6,最多 120。每一次都是一次真实的模型请求(花的是你自己的模型额度),所以改大会更费。用满后仍然算「走不动」:可以点「再来一段」,也可以你替她选这一步(她会记为「由你替选」)。旧版的 20 步 / 6 次就是这个默认值。',
|
|
144
|
+
storyDmApiUrl: '接口地址', storyDmApiKey: 'API Key', storyDmModel: '模型名(可留空)', storyDmApiSaved: '已保存 / 未设置', storyDmApiClear: '清除密钥',
|
|
145
|
+
storyDmApiInvalid: '接口地址与密钥必须成对设置或成对清空;不支持的加密环境不会保存。',
|
|
146
|
+
storyDmApiHint: '请到「出游」面板设置区填写。地址和密钥仅存本机 DPAPI 密文;模型名按你的服务商填,留空则不发送 model。都不会进入普通配置或故事导出,保存后只显示掩码。',
|
|
147
|
+
funStoryImages: '剧情图片生成', funStoryImagesDesc: '独立总闸,默认关闭。开关在出游页顶部;来源在本页「剧情图片来源」。留空:本插件给主对话 imggen_draw 的 scene/outfits/prompt,由主对话调用「鱼的生图包」,需要该插件;无法确认安装时明确标注,未装则跳过。填本机 loopback URL:本插件按 ComfyUI HTTP 协议直连,需运行 ComfyUI 并有可用 checkpoint;30 秒或超过 8 MiB/格式错误即失败,保留原插画。填其他插件名/说明:只生成委派回执,由主对话或该插件执行,需要你自行准备该能力。委派图片由执行插件管理,直连图片存本插件 dataDir/fun/story-images。关闭不发图片请求,只用预制或显式导入插画;文字故事始终不等图片。',
|
|
148
|
+
funStoryAutoImages: '自动准备配图参数', funStoryAutoImagesDesc: '默认开启。总闸开着、且有进行中的行程时,每走到新的一处(或故事翻到新的一页),本插件自动把这一屏的 scene/outfits/prompt 准备好递给她;45 分钟后自动过期,不会反复催。这个开关也在出游页顶部,无行程或总闸关时禁用。只对委派型来源生效——直连本机 ComfyUI 会花算力,仍然只由「出游 → 设置 → 高级」里的按钮触发。',
|
|
149
|
+
storyImageSource: '图片来源(留空为鱼的生图包)',
|
|
150
|
+
storyImageSourceHint: '留空由主对话调用 imggen_draw;本机 URL 由本插件直连 ComfyUI;其他文本交主对话委派。不会调用其他 World 的工具或读取其私有状态。',
|
|
151
|
+
storyImageDelegated: '已生成委派说明,等待主对话或指定插件执行。', storyImageDirect: '显式本机 URL:由本插件直连 ComfyUI。',
|
|
152
|
+
storyImageNoPlugin: '未安装鱼的生图包;跳过图片,文字故事照常继续。', storyImageUnavailable: '图片暂不可用,继续使用本地插画。',
|
|
153
|
+
storyEditorExpand: '展开', storyEditorCollapse: '收起', storyEditorDirty: '有未保存修改',
|
|
154
|
+
storyEmptyTitle: '还没有故事', storyEmptyBody: '还没有故事,点「编写故事」写第一篇。',
|
|
155
|
+
},
|
|
156
|
+
storage: {
|
|
157
|
+
label: '出游记录',
|
|
158
|
+
note: '清掉之后,正在进行的那一趟和纪念册里的所有趟都会没(逛过哪些地方、买了什么、在哪儿拍过照)。场所库是内置的,不受影响;别的东西一概不动。',
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
const EN = {
|
|
163
|
+
label: 'Adventures of Fat Fish from Scratch',
|
|
164
|
+
lamp: 'Adventures of Fat Fish from Scratch',
|
|
165
|
+
stopped: 'not running',
|
|
166
|
+
badgeSession: 'Out',
|
|
167
|
+
badgePlaces: 'Places',
|
|
168
|
+
prompt: 'Adventures of Fat Fish from Scratch: she can actually go out — amusement park, aquarium, temple fair, fan convention. Walk in, wander the stalls, buy a souvenir, take a photo; the closing receipt turns the trip into one line she can log into her own day, and image generation draws the scene and outfit she actually wore.',
|
|
169
|
+
config: {
|
|
170
|
+
title: 'Adventures of Fat Fish from Scratch',
|
|
171
|
+
funOn: 'Enabled',
|
|
172
|
+
funOnDesc: 'Master switch. Off: no venue list in the prompt; the tools and panel still work, she can go any time.',
|
|
173
|
+
funSessionTTLMin: 'A trip lasts',
|
|
174
|
+
funSessionTTLMinDesc: 'How many minutes an outing stays open. Past this it no longer counts as in progress — she is never nagged to wrap up and nothing is logged for her; the next fun_wander just mentions the trip should close.',
|
|
175
|
+
funAskReport: 'Say something at the end',
|
|
176
|
+
funAskReportDesc: 'When on, the closing receipt reminds her to log the trip with feast_life_play and tell the owner one sentence.',
|
|
177
|
+
funTasteFromFeast: 'Get tastes from Fish Every Day',
|
|
178
|
+
funTasteFromFeastDesc: 'On: receipts at the coffee shop, tea stand, restaurant and night market tell her to order something real via feast_menu → feast_eat in Fish Every Day, where the nine-axis flavour profile lives. Off: she only says what she had, and never describes a taste.\n\nNote: this is not auto-detection — a World must not probe whether another extension is installed (the contract forbids interdependence). Set it yourself; leave it on if you have Fish Every Day.',
|
|
179
|
+
funHomeAutoGo: 'Home: let her go out on her own',
|
|
180
|
+
funHomeAutoGoDesc: 'On: her permission to head out follows "her own time" in Fish Every Day. When that wake-up arrives she checks the day\'s schedule (feast_life_now) first — go out if the stretch is free, stay in if it says work or sleep. This plugin no longer keeps its own time slots, does not read the other world\'s schedule, never picks a place and never sends her out by itself. Off by default.',
|
|
181
|
+
funStoryDM: 'Optional text DM',
|
|
182
|
+
funStoryDMDesc: 'Off by default. The endpoint and model name are right below; the API key is not stored in configuration — enter it in Outing → Settings → Advanced, where only local DPAPI ciphertext is kept. Leave endpoint and model blank to use the host cognition.request, or fill the endpoint and a key to call OpenAI-compatible POST /chat/completions directly from this plugin; neither is sent to the host or other plugins. Windows DPAPI CurrentUser encryption only; saving is disabled elsewhere. Re-enter after changing machines or reinstalling; clear immediately at any time. The current actor must explicitly submit a valid proposal. Limits: 6 calls per run, 2 attempts per step, including retries, failures and cancellations; unknown tokens remain unknown.',
|
|
183
|
+
funStoryNodeLimit: 'Story length (node limit)',
|
|
184
|
+
funStoryNodeLimitDesc: 'Maximum nodes when creating or importing a story; 0 = unlimited. Each story JSON is still capped at 32 KB, and lowering this never deletes or blocks existing stories.',
|
|
185
|
+
funStoryDmUrl: 'Text DM endpoint',
|
|
186
|
+
funStoryDmUrlDesc: 'Blank uses the host. Enter an OpenAI-compatible URL (http/https, no credentials, query or fragment). The API key is entered in Outing → Settings → Advanced and stored only as local ciphertext.',
|
|
187
|
+
funStoryDmModel: 'Text DM model name',
|
|
188
|
+
funStoryDmModelDesc: 'Blank lets the endpoint use its own default; at most 200 characters and no control characters. The key never enters configuration.',
|
|
189
|
+
funStoryImageSource: 'Story image source',
|
|
190
|
+
funStoryImageSourceDesc: 'Blank delegates to Fish Image Studio; a loopback URL connects directly to ComfyUI; other text goes to the named plugin. The custom workflow still lives in Outing → Settings → Advanced.',
|
|
191
|
+
funStoryTextOn: 'Play stories from text',
|
|
192
|
+
funStoryTextOnDesc: 'On by default: stories can be started and advanced from QQ or console chat (fun_story_start / fun_story_act), and all six read-only queries are available. Off: chat keeps only fun_story_candidates / fun_story_detail for "what stories are there", and the other story tools are not offered, saving their schema on every turn. The panel always works.\n\nA World cannot see which channel called it, so this is one switch for all text channels — it cannot be QQ-only.',
|
|
193
|
+
funStoryAuthorInChat: 'Manage stories from chat',
|
|
194
|
+
funStoryAuthorInChatDesc: 'Off by default. On: chat gains the author tool fun_story (template, validate, preview, import/export, enable/disable/remove). Off: it is not offered, saving about 1.1k characters of fixed schema on every turn. The Story Workshop panel does not use this tool and keeps working either way.',
|
|
195
|
+
funStoryFree: 'Free mode (scene packs)',
|
|
196
|
+
funStoryFreeDesc: 'Off by default. On: version 3 scene packs become playable. The author writes only the premise, canon, cast and ending conditions; the host DM improvises. The DM may change only registered state, and endings are decided by the program. Option-based stories are untouched; both modes can coexist.',
|
|
197
|
+
funStoryFreeTurns: 'Free-mode turns per run',
|
|
198
|
+
funStoryFreeTurnsDesc: 'Maximum turns in one run (one turn = one model call). A pack that declares a smaller maxTurns wins. When the segment is spent the input closes: start another segment (at most three per run, always by an explicit click) or wrap the run up. It never continues on its own.',
|
|
199
|
+
funAutoSteps: 'Fish autoplay: steps per segment',
|
|
200
|
+
funAutoStepsDesc: 'How many steps the fish may take on its own in one segment. Default 20, maximum 200. Walking and choosing both count. When spent, the segment stops and it is your turn; you can start another segment (steps and decisions reset, at most three per run, always by an explicit click). This only limits the fish; your own clicks are not counted.',
|
|
201
|
+
funAutoCalls: 'Fish autoplay: decisions per segment',
|
|
202
|
+
funAutoCallsDesc: 'How many times the fish may decide on its own in one segment. Default 6, maximum 120. Every decision is a real model request billed to your own quota, so raising it costs more. When spent the fish is blocked: start another segment, or pick for her yourself (recorded as your substitution). These defaults are the old 20 steps / 6 decisions.',
|
|
203
|
+
storyDmApiUrl: 'API URL', storyDmApiKey: 'API Key', storyDmModel: 'Model name (optional)', storyDmApiSaved: 'Saved / Not set', storyDmApiClear: 'Clear key',
|
|
204
|
+
storyDmApiInvalid: 'Set or clear the URL and key together. Unsupported encryption environments cannot save credentials.',
|
|
205
|
+
storyDmApiHint: 'Use Fish Story World settings. Only local DPAPI ciphertext is stored; the model name is plain and optional (blank sends no model). No credentials enter ordinary configuration or story exports, and saved fields show masks only.',
|
|
206
|
+
funStoryImages: 'Story image generation',
|
|
207
|
+
funStoryImagesDesc: 'Separate master switch, off by default. The toggle sits at the top of the Outing panel; the source is "Story image source" on this page. Blank: this plugin returns imggen_draw scene/outfits/prompt for the main conversation to call Fish Image Studio; that plugin is required, installation uncertainty is explicit and absence skips images. Loopback URL: this plugin calls the local ComfyUI HTTP API; a running server and available checkpoint are required. A 30-second timeout, images over 8 MiB or invalid formats keep the original artwork. Other plugin name/instructions: a receipt delegates execution to that plugin or the main conversation, and you must provide that capability. Delegated images belong to the executing plugin; direct images go to this plugin dataDir/fun/story-images. Off means no image requests, only prebuilt or explicitly imported art. Text never waits for images.',
|
|
208
|
+
funStoryAutoImages: 'Prepare image parameters automatically',
|
|
209
|
+
funStoryAutoImagesDesc: 'On by default. While the master switch is on and a trip is in progress, every new spot (or story page) prepares that scene’s scene/outfits/prompt for her automatically; the offer expires after 45 minutes and is never nagged. The same switch sits at the top of the Outing panel and is disabled without a trip or with the master off. Delegation sources only — a direct local ComfyUI call costs compute and still needs the button in Outing → Settings → Advanced.',
|
|
210
|
+
storyImageSource: 'Image source (blank: Fish Image Studio)',
|
|
211
|
+
storyImageSourceHint: 'Blank delegates imggen_draw to the main conversation; a local URL connects this plugin to ComfyUI; other text delegates to the named plugin. No tools or private state of other Worlds are accessed.',
|
|
212
|
+
storyImageDelegated: 'Drawing instructions are ready for the main conversation or selected plugin.', storyImageDirect: 'Explicit local URL: this plugin connects to ComfyUI.',
|
|
213
|
+
storyImageNoPlugin: 'Fish Image Studio is not installed; skip images and continue the text story.', storyImageUnavailable: 'Images are unavailable; keep local artwork.',
|
|
214
|
+
storyEditorExpand: 'Expand', storyEditorCollapse: 'Collapse', storyEditorDirty: 'Unsaved changes',
|
|
215
|
+
storyEmptyTitle: 'No stories yet', storyEmptyBody: 'No stories yet. Choose Write a story to create the first one.',
|
|
216
|
+
},
|
|
217
|
+
storage: {
|
|
218
|
+
label: 'Outing records',
|
|
219
|
+
note: 'Clearing this erases the trip in progress and every trip in the book (where she went, what she bought, where she took photos). The venue list is built in and unaffected; nothing else is touched.',
|
|
220
|
+
},
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
export function text(language = 'zh') {
|
|
224
|
+
return language === 'en' ? EN : ZH;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* 面板自己的文案。
|
|
229
|
+
*
|
|
230
|
+
* 客户端产物(`dist/webui.js`)不 import 服务端模块,所以面板标题和说明
|
|
231
|
+
* 这里给一份、bundle 里另存一份——改文案时两处一起改(feast 也是这么做的)。
|
|
232
|
+
*/
|
|
233
|
+
export function panelText(language = 'zh') {
|
|
234
|
+
if (language === 'en') {
|
|
235
|
+
return {
|
|
236
|
+
places: {
|
|
237
|
+
title: 'Where to go',
|
|
238
|
+
description: 'The twenty places (plus any you add or edit), whether each is open right now, and the trip she is on.',
|
|
239
|
+
},
|
|
240
|
+
book: {
|
|
241
|
+
title: 'Trip book',
|
|
242
|
+
description: 'Every trip she has taken: where she went, what she wandered and bought.',
|
|
243
|
+
},
|
|
244
|
+
shelf: {
|
|
245
|
+
title: 'Shelf',
|
|
246
|
+
description: 'Everything the trips have gathered, grouped by place: what came from where and when, how many times she has been, and what is still left to wander at each place.',
|
|
247
|
+
},
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
return {
|
|
251
|
+
places: {
|
|
252
|
+
title: '去哪儿',
|
|
253
|
+
description: '二十处地方(还有你自己加的、改过的)这会儿开没开、人多不多,以及她正在逛的那一趟。',
|
|
254
|
+
},
|
|
255
|
+
book: {
|
|
256
|
+
title: '纪念册',
|
|
257
|
+
description: '她去过的每一趟:逛了什么、买了什么、在哪儿拍了照。',
|
|
258
|
+
},
|
|
259
|
+
shelf: {
|
|
260
|
+
title: '纪念品架',
|
|
261
|
+
description: '这些趟攒下来的东西,按地方归着:哪件是在哪儿哪天拿到的、去过几次、每一处还差什么没逛。',
|
|
262
|
+
},
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** WebUI 的配置组;路径必须落在 `worlds.fun.` 段内。 */
|
|
267
|
+
export function configGroup(language = 'zh') {
|
|
268
|
+
const t = text(language).config;
|
|
269
|
+
const K = `worlds.${ID}`;
|
|
270
|
+
return {
|
|
271
|
+
id: `world:${ID}`,
|
|
272
|
+
owner: `world:${ID}`,
|
|
273
|
+
schema: {
|
|
274
|
+
type: 'object',
|
|
275
|
+
title: t.title,
|
|
276
|
+
properties: {
|
|
277
|
+
[`${K}.funOn`]: {
|
|
278
|
+
type: 'boolean',
|
|
279
|
+
title: t.funOn,
|
|
280
|
+
description: t.funOnDesc,
|
|
281
|
+
'x-hot': true,
|
|
282
|
+
},
|
|
283
|
+
[`${K}.funSessionTTLMin`]: {
|
|
284
|
+
type: 'integer',
|
|
285
|
+
title: t.funSessionTTLMin,
|
|
286
|
+
description: t.funSessionTTLMinDesc,
|
|
287
|
+
minimum: 15,
|
|
288
|
+
maximum: 480,
|
|
289
|
+
'x-suffix': ' 分钟',
|
|
290
|
+
'x-hot': true,
|
|
291
|
+
},
|
|
292
|
+
[`${K}.funAskReport`]: {
|
|
293
|
+
type: 'boolean',
|
|
294
|
+
title: t.funAskReport,
|
|
295
|
+
description: t.funAskReportDesc,
|
|
296
|
+
'x-hot': true,
|
|
297
|
+
},
|
|
298
|
+
[`${K}.funTasteFromFeast`]: {
|
|
299
|
+
type: 'boolean',
|
|
300
|
+
title: t.funTasteFromFeast,
|
|
301
|
+
description: t.funTasteFromFeastDesc,
|
|
302
|
+
'x-hot': true,
|
|
303
|
+
},
|
|
304
|
+
[`${K}.funHomeAutoGo`]: {
|
|
305
|
+
type: 'boolean',
|
|
306
|
+
title: t.funHomeAutoGo,
|
|
307
|
+
description: t.funHomeAutoGoDesc,
|
|
308
|
+
'x-hot': true,
|
|
309
|
+
},
|
|
310
|
+
[`${K}.funStoryNodeLimit`]: {
|
|
311
|
+
type: 'integer', title: t.funStoryNodeLimit, description: t.funStoryNodeLimitDesc,
|
|
312
|
+
minimum: 0, maximum: Number.MAX_SAFE_INTEGER, 'x-suffix': ' 个节点', 'x-hot': true,
|
|
313
|
+
},
|
|
314
|
+
[`${K}.funStoryDM`]: {
|
|
315
|
+
type: 'boolean', title: t.funStoryDM, description: t.funStoryDMDesc, 'x-hot': true,
|
|
316
|
+
},
|
|
317
|
+
[`${K}.funStoryDmUrl`]: {
|
|
318
|
+
type: 'string', title: t.funStoryDmUrl, description: t.funStoryDmUrlDesc, 'x-hot': true,
|
|
319
|
+
},
|
|
320
|
+
[`${K}.funStoryDmModel`]: {
|
|
321
|
+
type: 'string', title: t.funStoryDmModel, description: t.funStoryDmModelDesc, 'x-hot': true,
|
|
322
|
+
},
|
|
323
|
+
[`${K}.funStoryImages`]: {
|
|
324
|
+
type: 'boolean', title: t.funStoryImages, description: t.funStoryImagesDesc, 'x-hot': true,
|
|
325
|
+
},
|
|
326
|
+
[`${K}.funStoryAutoImages`]: {
|
|
327
|
+
type: 'boolean', title: t.funStoryAutoImages, description: t.funStoryAutoImagesDesc, 'x-hot': true,
|
|
328
|
+
},
|
|
329
|
+
[`${K}.funStoryImageSource`]: {
|
|
330
|
+
type: 'string', title: t.funStoryImageSource, description: t.funStoryImageSourceDesc, 'x-hot': true,
|
|
331
|
+
},
|
|
332
|
+
[`${K}.funStoryTextOn`]: {
|
|
333
|
+
type: 'boolean', title: t.funStoryTextOn, description: t.funStoryTextOnDesc, 'x-hot': true,
|
|
334
|
+
},
|
|
335
|
+
[`${K}.funStoryAuthorInChat`]: {
|
|
336
|
+
type: 'boolean', title: t.funStoryAuthorInChat, description: t.funStoryAuthorInChatDesc,
|
|
337
|
+
},
|
|
338
|
+
[`${K}.funStoryFree`]: {
|
|
339
|
+
type: 'boolean', title: t.funStoryFree, description: t.funStoryFreeDesc, 'x-hot': true,
|
|
340
|
+
},
|
|
341
|
+
[`${K}.funStoryFreeTurns`]: {
|
|
342
|
+
type: 'integer', title: t.funStoryFreeTurns, description: t.funStoryFreeTurnsDesc,
|
|
343
|
+
minimum: 5, maximum: 120, 'x-suffix': ' 回合', 'x-hot': true,
|
|
344
|
+
},
|
|
345
|
+
[`${K}.funAutoSteps`]: {
|
|
346
|
+
type: 'integer', title: t.funAutoSteps, description: t.funAutoStepsDesc,
|
|
347
|
+
minimum: 1, maximum: 200, 'x-suffix': ' 步', 'x-hot': true,
|
|
348
|
+
},
|
|
349
|
+
[`${K}.funAutoCalls`]: {
|
|
350
|
+
type: 'integer', title: t.funAutoCalls, description: t.funAutoCallsDesc,
|
|
351
|
+
minimum: 1, maximum: 120, 'x-suffix': ' 次', 'x-hot': true,
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
};
|
|
356
|
+
}
|