cortico-world-feast 0.13.0 → 0.14.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 +39 -1
- package/GUIDE.md +13 -17
- package/PUBLISHING.md +17 -9
- package/README.md +23 -31
- package/STORY-QUERY-CONTRACT-F3-F5.md +6 -2
- package/assets/icon.png +0 -0
- package/dist/webui.js +2 -1
- package/package.json +4 -4
- package/src/config.js +15 -40
- package/src/life/free.js +2 -2
- package/src/life/funlink.js +4 -3
- package/src/life/index.js +1 -0
- package/src/life/inject.js +1 -1
- package/src/life/maplink.js +4 -3
- package/src/life/places.js +23 -0
- package/src/life/plan.js +1 -1
- package/src/life/storylink.js +5 -4
- package/src/life/wardrobe.js +1 -1
- package/src/world.js +18 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,46 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## 0.14.0
|
|
4
|
+
|
|
5
|
+
(2026-11-24:把「她自己的时间」里原来三个容易互相打架的联动开关,合并成一个「地点与故事来源」单选;已有配置按原选择自动迁移,手写菜单和候选不变。)
|
|
6
|
+
|
|
7
|
+
**配置结构变化**
|
|
8
|
+
|
|
9
|
+
- 新增 `lifePlaceSource` 单选:`legacy` 沿用原来的旧 fun/map 提示;`story` 只使用「从0开始的肥鱼大冒险」的地点与故事提示,不再叠加旧提示;`off` 不自动追加地点或故事提示,手写内容照常保留。原来分开的三个开关不再出现在设置里。
|
|
10
|
+
- 旧配置自动迁移:原来选过故事(`lifeStoryOn` 开且没有关掉旧出游提示)→ `story`;原来两个旧提示都关掉 → `off`;其余 → `legacy`。迁移仍保留原来的细粒度选择,例如原先只留地图提示的,`legacy` 下仍只留地图提示。
|
|
11
|
+
- 默认值 `null` 只是升级识别用的哨兵:第一次启动时按旧配置解析成上面三种之一并写回磁盘,之后只认这个单选。
|
|
12
|
+
- 安装脚本 `install.ps1` 做同样的迁移,只补缺键、保留已有值,仍是 UTF-8 带 BOM。
|
|
13
|
+
- 配置卡从 43 项变为 41 项(默认值含 `enabled` 从 44 键变为 42 键);写明天计划、到点邀请、聊天入口和面板入口都读同一个选择。
|
|
14
|
+
|
|
15
|
+
**行为与边界**
|
|
16
|
+
|
|
17
|
+
- 明确选 `story` 时,旧出游提示关掉也不再否决它;该来源或工具在当前会话不可用时不回退到旧提示,也不声称能调用工具。
|
|
18
|
+
- 手写菜单、候选、排序和历史日程一律不动,两个地点来源不会自动合并住所。
|
|
19
|
+
- 计划生成时刻、饭点、提醒、忙碌与睡觉时段的原有规则保持不变。
|
|
20
|
+
|
|
21
|
+
## 0.13.1
|
|
22
|
+
|
|
23
|
+
(2026-11-23:文案对齐「从0开始的肥鱼大冒险」0.7.5,跟随上游改名,换新图标,并删掉提示语里的一句。只改文案、简介与图标,不改逻辑、配置键或数据格式。)
|
|
24
|
+
|
|
25
|
+
**对齐 0.7.5 的文案与改名**
|
|
26
|
+
|
|
27
|
+
- 联动提示里的「故事面板」改称「出游」(该世界自 0.4.3 起把它拆成「出游」与「故事工坊」,0.4.4 又新增「家」,页签共 7 个);旧的「没有 `fun_story_start`」「用户打开文字通道后才能聊天开局」表述一并纠正:`fun_story_start` / `fun_story_act` 自 0.4.0 起存在,0.7.2 起「文字通道也能玩故事」默认开启(关掉后聊天里只剩候选与详情),作者工具 `fun_story` 另有开关(默认关)。
|
|
28
|
+
- 世界显示名跟随上游改为「从0开始的肥鱼大冒险」(前称「娱乐时间」);包名 `cortico-world-fun`、世界 id、配置键 `worlds.fun.*`、数据目录、工具前缀一律不变,无迁移。
|
|
29
|
+
- 配置文案与文档里的「生图工作室」统一改称「**鱼的生图包**」(`cortico-world-imggen` 包名、`lifeWardrobe*` 键与素材库路径不变);`wardrobeHintLine` 写给模型的那句指向句同步改名。
|
|
30
|
+
- 简介与用户文档把旧小世界从「停止独立维护」改为**已废弃**:不再更新,地点、住所、画风、封面与浏览能力**已并入从0开始的肥鱼大冒险**;旧提示与 `lifeFreeMapOn` 开关只为兼容保留,新用户不必安装。
|
|
31
|
+
- 同步范围:`storylink.js` 的 `SOURCE_HINT` / `LAUNCH_HINT` / 计划提示,`config.js` 中英文六条与生图两条,`wardrobe.js` 指向句,`plan.js` 场所句,`package.json` 简介与中英文本地化,README / GUIDE / HANDOFF-D1 / PUBLISHING / F3–F5 契约,以及三条测试断言。界面与工具行为不变,`npm test` 651/651。
|
|
32
|
+
|
|
33
|
+
**新图标**
|
|
34
|
+
|
|
35
|
+
- 市场图标换成「天青色瞪鱼」(512×512 PNG,`assets/icon.png`,路径与 `cortico.icon` 不变,无需迁移)。
|
|
36
|
+
|
|
37
|
+
**提示语删掉「聊到时自然带一句」**
|
|
38
|
+
|
|
39
|
+
- 叫醒(`free.js`)、时段推送(`inject.js`)和写日程回执(`world.js`)三处都不再要求她「聊到时自然带一句就好」:自由时间的时间句只留「这是你自己的时间,做不做、做什么都由你」,时段推送只留「(不用回这条。)」,`feast_life_plan` 写成功的回执只留「不用跟主人复述。」。只删这句措辞,不动逻辑分支、配置键与数据格式。
|
|
40
|
+
|
|
3
41
|
## 0.13.0
|
|
4
42
|
|
|
5
|
-
(2026-11-21:D1 + D2,并包含未单独发布的 0.12.1
|
|
43
|
+
(2026-11-21:D1 + D2,并包含未单独发布的 0.12.1 三项界面修复。2026-11-23 已发布到 npm。)
|
|
6
44
|
|
|
7
45
|
**D1:合并协作前的配置可靠性与候选说明**
|
|
8
46
|
|
package/GUIDE.md
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
| **套餐**面板 | 一桌一桌地端:8 套现成的,或者自己勾几道攒一桌存下来 |
|
|
34
34
|
| **吃过什么**面板 | 她吃过多少回、口味画像、最近几口、她自己记的反应 |
|
|
35
35
|
| **今天**面板(默认) | 生活首页:本轮重组为状态卡、当前与接下来、实际记录流、可展开的分类时间轴和明天摘要;保留往期和还想继续的小事,前端待最终验收 |
|
|
36
|
-
| **世界配置** |
|
|
36
|
+
| **世界配置** | 41 项(默认值含世界总开关 `enabled` 共 42 键),按饭点 / 一起吃饭 / 她的一天 / 她自己的时间 / 生图联动 / 天气分成 6 张卡,见第 7 节 |
|
|
37
37
|
|
|
38
38
|
**等待条**是这套东西的核心反馈:你端过去的东西还没被吃掉时,它会一直挂在顶上,右边写着还剩多久。到点没吃就自动收走(不打扰她);**端错了按下「收回」就撤掉**,不用等它过期。
|
|
39
39
|
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
### 从计划到游玩记录
|
|
155
155
|
|
|
156
156
|
1. 写计划时只写下打算做什么。作品或地点还没核实时,可以先留一个弹性安排;当前可用也不保证明天可用。写进日程或到了约定时间,都不会自动开始故事、移动位置或记账。
|
|
157
|
-
2.
|
|
157
|
+
2. 你和她明确决定开始后,先核对最新条件。指定故事有两处入口:**从0开始的肥鱼大冒险「出游」面板**,或聊天里的 `fun_story_start` / `fun_story_act`(「文字通道也能玩故事」默认开启,关掉后聊天里只剩候选与详情;会话里没有这两个工具时同样回面板)。普通 `fun_go` 不是指定故事开局,也不用管理工具 `fun_story` 查询或代开故事。**你明确说选哪个时,她可以按你的原话(含「第二个」这类序号)以你的名义提交,回执记为 owner;含糊的话只给一个待确认提议**。轮到鱼自己的回合,她以 fish 身份提交。结束这一趟仍要你明确确认。
|
|
158
158
|
3. **你明确选择要记生活时**,再请她根据实际摘要调用 `feast_life_play(activity,note)`。例如 `activity` 写「和主人玩了溪边的漂流信故事」,`note` 写「玩到旧木桥后先停下,故事还没结束」。暂停、试玩、未完成或取消都不自动记账,也不能自动算作完成;只记已经发生的游玩,不补写未来剧情,不把虚构情节当成现实经历。核对的是这一趟;不把「最近保存的行程」当成当前或指定行程,无法匹配时不据此确认完成或记账。点击自由时间邀请也不是记账授权。
|
|
159
159
|
4. 等鱼的每一天返回保存成功,才说「记下了」。`feast_life_play` 返回普通 `text`,不是故事查询的 JSON 回执;失败或回执不明时先核实。复制摘要不等于同步,重复提交没有 `sourceRef` 幂等或跨日防重保证。
|
|
160
160
|
|
|
@@ -300,33 +300,31 @@
|
|
|
300
300
|
|
|
301
301
|
改完后,下一次带例子的邀请就会采用新内容。如果你填入具体工具和调用写法,仍需在当前会话确认工具可用。
|
|
302
302
|
|
|
303
|
-
###
|
|
303
|
+
### 可选:用从0开始的肥鱼大冒险的地点和故事(D2)
|
|
304
304
|
|
|
305
|
-
|
|
305
|
+
在「她自己的时间」卡选择 `lifePlaceSource`:`legacy`(默认)沿用旧 fun/map 提示;`story` 明确选择从0开始的肥鱼大冒险作为地点与故事来源;`off` 不自动生成地点或故事提示,手写内容照常保留。`story` 不受旧 fun 提示开关的否决;若所选来源或工具不可用,不自动退回其他来源。旧配置迁移时会按旧三个开关推导选择,旧键保留以供 `legacy` 细粒度兼容。
|
|
306
306
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
关闭 `lifeStoryOn` 即回到下面的旧提示路径;两个旧开关继续各管自己的自动行。新查询只在相关邀请里按需提示,不增加定时催玩或常驻故事目录。准确工具名、版本与回执约定见 [README 开发说明](README.md#d2-故事查询契约开发说明)。
|
|
307
|
+
此选择只控制计划与邀请中的来源提示,不证明当前会话有工具或查询权限。指定故事的开始与生活记账仍需分别选择,见[从计划到游玩记录](#从计划到游玩记录)。
|
|
310
308
|
|
|
311
309
|
### 自动接进来的旧联动提示
|
|
312
310
|
|
|
313
|
-
|
|
311
|
+
`legacy` 沿用旧 fun/map 路径;升级时会把此前各行开关的选择一并迁移。只有对应 World 已启用、且菜单尚未手写相应工具名时,才会追加旧行。`story` 需要肥鱼大冒险已启用;`off` 不追加任何自动地点提示。三种模式都不证明当前会话有工具或查询权限。
|
|
314
312
|
|
|
315
|
-
**①
|
|
313
|
+
**① 从0开始的肥鱼大冒险**(`cortico-world-fun`)。`lifePlaceSource` 选择 `legacy` 且其配置已启用时,可以追加这条旧提示:
|
|
316
314
|
|
|
317
315
|
```
|
|
318
316
|
- 出门去逛逛:fun_places 看今天能去哪 → fun_go 进门 → fun_wander 逛一处 → fun_home 收摊
|
|
319
317
|
```
|
|
320
318
|
|
|
321
|
-
**② 鱼的小世界**(`cortico-world-map`)。旧 World
|
|
319
|
+
**② 鱼的小世界**(`cortico-world-map`)。旧 World 已启用且 `lifePlaceSource` 选择 `legacy` 时,可以追加这条兼容提示:
|
|
322
320
|
|
|
323
321
|
```
|
|
324
322
|
- 看看周围、去个常去的地方:map_places 看有哪些地方 → map_look 看这一处长什么样
|
|
325
323
|
```
|
|
326
324
|
|
|
327
|
-
手写菜单已提到 `fun_*` 或 `map_*`
|
|
325
|
+
手写菜单已提到 `fun_*` 或 `map_*` 时,对应提示不会重复追加。`legacy` 下两行可并存,从0开始的肥鱼大冒险在前、小世界在后;新配置由地点来源单选统一控制。
|
|
328
326
|
|
|
329
|
-
|
|
327
|
+
**小世界迁移**。鱼的小世界已废弃、不再更新,它的地点、住所、画风、封面和浏览能力已并入从0开始的肥鱼大冒险。旧用户可以继续使用已装的小世界,无需卸载;新用户不必为迁移额外安装旧插件。核对当前会话的新查询能力后,可在「她自己的时间」卡选择 `story` 作为新来源;默认保留旧配置迁移行为,不自动导入资料或合并住所。
|
|
330
328
|
|
|
331
329
|
**明天那格写着「等她写」**:说明已经问过她、她还没交回。正常,等她回就行,或者按「请她写明天」再催一次。
|
|
332
330
|
|
|
@@ -365,9 +363,9 @@
|
|
|
365
363
|
|
|
366
364
|
---
|
|
367
365
|
|
|
368
|
-
## 7. 配置(
|
|
366
|
+
## 7. 配置(41 项,在「鱼的每一天」的世界配置里,按 6 张卡分开)
|
|
369
367
|
|
|
370
|
-
配置卡共
|
|
368
|
+
配置卡共 41 项;`DEFAULTS` 加上由宿主管理的世界总开关 `enabled` 共 42 键。
|
|
371
369
|
|
|
372
370
|
配置页不再是一张列到底的长表,按**你脑子里那几件事**切成 6 张卡:
|
|
373
371
|
|
|
@@ -426,9 +424,7 @@
|
|
|
426
424
|
| `lifeFreeBusyCall` | `false` | **忙着的时候也叫**(0.8.0):开=上班/通勤那几档照样叫,但换成报备措辞;关=不叫、面板留痕。睡觉永远不叫 |
|
|
427
425
|
| `lifeFreeMenu` | 4 条通用说法 | 自由时间邀请时给的可选例子,不会自动写入日程。具体工具须在当前会话可用 |
|
|
428
426
|
| `lifeFreeAskReport` | `false` | 做完是否提醒她跟你说一句;默认关闭以减少重复回合 |
|
|
429
|
-
| `
|
|
430
|
-
| `lifeFreeMapOn` | `true` | **看看周围那一行**。旧路径中,旧小世界配置启用且菜单未提到 `map_*` 时追加旧提示;D2 生效时省略自动行但保留此开关,关闭 D2 后仍按其值执行 |
|
|
431
|
-
| `lifeStoryOn` | `false` | **用娱乐时间的地点和故事**。明确选择新来源;还需 `lifeFreeFunOn !== false` 与 `worlds.fun.enabled === true`。仅省略自动旧 fun/map 行,保留手写内容、排序和独立开关;开关及版本不证明工具能力。开始与记账分别确认,见[D2 指南](#可选用娱乐时间的地点和故事d2) |
|
|
427
|
+
| `lifePlaceSource` | `null` → `legacy` | 地点与故事来源:`legacy` 沿用旧 fun/map 提示;`story` 选择故事来源,不因旧开关关闭而降级;`off` 不自动添加,手写菜单不变。安装时旧配置按旧 fun/story/map 开关迁移,原键保留供 legacy 细粒度使用 |
|
|
432
428
|
| `lifeWardrobeOn` | `true` | 生图联动总开关:扫素材库、列给她、自动补穿着、提示词互指 |
|
|
433
429
|
| `lifeWardrobeDir` | 空 | 素材库目录。留空自动跟 imggen 的 `libraryRoot`,再降级到 `<数据目录>/imggen-library`。配置页上有原生选目录按钮 |
|
|
434
430
|
| `lifeWardrobeAutoOutfit` | `true` | 自动补 outfit(情境穿搭 > 情境默认 > 延续上一段 > 场景默认 > 默认服饰) |
|
package/PUBLISHING.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# 发布到 Coo 扩展市场
|
|
2
2
|
|
|
3
|
-
> **当前发布版本:0.
|
|
3
|
+
> **当前发布版本:0.14.0(准备发布,尚未执行 npm 发布)**。npm 上的 `latest` 仍是 `0.13.1`(2026-11-24 实查 registry:已占版本中含 `0.13.1`,`0.14.0` 未被占用)。本版把原来的三个联动开关合并为 `lifePlaceSource` 单选并加入旧配置迁移;`0.13.0` 与 `0.13.1` 的发布记录保留在 [CHANGELOG.md](CHANGELOG.md)。`npm publish` 与 `git push` 由维护者本人执行。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`lifePlaceSource` 枚举为 `legacy`、`story`、`off`,默认值 `null` 是宿主预合并默认值时的迁移哨兵;运行时按默认兼容行为解析并持久化 `legacy`。安装器对缺失/null 值按旧开关映射:旧 story 为 true 且旧 fun 不为 false → `story`;旧 fun 和 map 都为 false → `off`;否则 `legacy`。明确选择 `story` 时旧 fun 关闭不构成 veto,来源不可用不回退;`off` 保留手写菜单内容。旧键可保留以支持 `legacy` 细粒度兼容。当前配置卡为 41 项,默认值含 enabled 共 42 键。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
本版同时包含用户此前未提交的「今天」面板改动:明天没有请求也没有安排时,只显示邀请按钮,不再单独挂一条空白状态行(`dist/webui.js` 与 `panels.test.mjs`),已随全量测试通过。
|
|
8
|
+
|
|
9
|
+
接口和回执约定见 [README 的 D2 开发说明](README.md#d2-故事查询契约开发说明) 及独立 [F3–F5 契约](STORY-QUERY-CONTRACT-F3-F5.md):只读查询的最低构建仍是 `cortico-world-fun@0.3.2-story.2`;聊天开局要 ≥0.4.0,且 0.7.2 起「文字通道也能玩故事」默认开启(关掉后只剩候选与详情)。普通 `fun_go` 不能指定故事,作者工具 `fun_story` 另有开关(默认关)。将来发布前需核对声明、配置计数和新旧路径兼容,并如实记录当次验证;本段没有宣称本轮测试通过。
|
|
8
10
|
|
|
9
11
|
## 三项界面修复的历史补丁版本:0.12.1(未单独发布,随 0.13.0 发布)
|
|
10
12
|
|
|
@@ -18,7 +20,7 @@ D2 新增 `lifeStoryOn`,默认 `false`;配置卡当前 43 项,默认值含
|
|
|
18
20
|
|
|
19
21
|
## 发布前检查
|
|
20
22
|
|
|
21
|
-
版本已在 [package.json](package.json) 和更新日志中同步为 0.
|
|
23
|
+
版本已在 [package.json](package.json) 和更新日志中同步为 0.14.0。正式发布前仍须实时查询 npm 官方 registry;已存在的版本不能覆盖,网络错误也不能当作版本空缺。
|
|
22
24
|
|
|
23
25
|
```powershell
|
|
24
26
|
Set-Location 'E:\deep seek\feed-world'
|
|
@@ -36,8 +38,8 @@ git diff --check
|
|
|
36
38
|
## 打包核对
|
|
37
39
|
|
|
38
40
|
```powershell
|
|
39
|
-
New-Item -ItemType Directory -Force '.tmp/release/0.
|
|
40
|
-
npm.cmd pack --json --pack-destination .tmp/release/0.
|
|
41
|
+
New-Item -ItemType Directory -Force '.tmp/release/0.14.0-final' | Out-Null
|
|
42
|
+
npm.cmd pack --json --pack-destination .tmp/release/0.14.0-final --cache=.tmp/npm-release-cache
|
|
41
43
|
```
|
|
42
44
|
|
|
43
45
|
应包含运行源码、面板、图标、用户文档、自描述和 28 份菜品数据。不应包含测试、工具、运行记录、备份、凭据或 `.tmp`。按实际包清单及 integrity 核对,不复用旧版本归档。
|
|
@@ -64,10 +66,16 @@ npm.cmd publish --access public --tag latest --registry=https://registry.npmjs.o
|
|
|
64
66
|
## 发布后核对
|
|
65
67
|
|
|
66
68
|
```powershell
|
|
67
|
-
npm.cmd view cortico-world-feast@0.
|
|
69
|
+
npm.cmd view cortico-world-feast@0.14.0 version dist.integrity --json --registry=https://registry.npmjs.org
|
|
68
70
|
npm.cmd view cortico-world-feast dist-tags --json --registry=https://registry.npmjs.org
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
核对实际发布版本、`latest` 和归档 integrity。正常提交并推送相关 Git 改动,不强制覆盖远端;npm 发布核对成功后才创建和推送 `v0.
|
|
73
|
+
核对实际发布版本、`latest` 和归档 integrity。正常提交并推送相关 Git 改动,不强制覆盖远端;npm 发布核对成功后才创建和推送 `v0.14.0` 标签。npm 发布成功不代表 Coo 市场索引已更新。
|
|
74
|
+
|
|
75
|
+
在 Coo 中更新后完全退出再重新打开,使进程加载新面板资源。0.14.0 的实机复核重点:
|
|
72
76
|
|
|
73
|
-
|
|
77
|
+
- **设置页只剩一个选择**:「她自己的时间」卡里只有「地点与故事来源」一项,原来三个联动开关不再出现,卡内总数显示 41 项。
|
|
78
|
+
- **旧配置迁移**:升级后打开设置,选中项应与升级前的行为一致——原来开着故事的是「使用肥鱼大冒险」,原来两个旧提示都关掉的是「关闭自动提示」,其余是「沿用旧提示」;手写菜单和候选一字未变。
|
|
79
|
+
- **三个选项的效果**:写明天计划与到点邀请里,`story` 只出现肥鱼大冒险的地点/故事引导;`legacy` 出现原来那两行;`off` 一行都不加。切换后不需要重启。
|
|
80
|
+
- **不可用时不说大话**:`story` 下没有该扩展或当前会话没有对应工具时,只给按需查询的邀请,不声称已经能调用。
|
|
81
|
+
- 指定故事仍要从「出游」面板或 `fun_story_start` / `fun_story_act` 开始,生活记录仍需另行确认且成功回执才显示记下。
|
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
先给她一天,再给她一桌饭。
|
|
4
4
|
|
|
5
|
-
当前发布版本为 `0.13.0
|
|
5
|
+
当前发布版本为 `0.14.0`(准备发布):把「她自己的时间」里原来的三个联动开关合并成一个「地点与故事来源」单选,已有配置自动迁移,详见 [CHANGELOG.md](CHANGELOG.md)。`0.13.0` 已于 2026-11-23 发布:D1 的联动配置读取与候选说明、D2 的地点与故事来源选择,连同未单独发布的 `0.12.1` 三项界面修复一起发布;`0.13.1` 只把文案与图标对齐「从0开始的肥鱼大冒险」0.7.5。npm 发布与推送仍由维护者本人执行。
|
|
6
6
|
|
|
7
|
-
新增两条工具:`feast_life_journal` 按日期回看实际记录、设手动标题、从实际 ID 保存或导出文字卡;`feast_life_style` 列出/预览/按用户明确要求应用三套提醒预设。面板与工具共用实现。记录与日程始终分开,不自动生成纪念卡、完成小事或调用模型;预设只改七项已有提醒设置。当前为 20 个工具、7 个事件、
|
|
7
|
+
新增两条工具:`feast_life_journal` 按日期回看实际记录、设手动标题、从实际 ID 保存或导出文字卡;`feast_life_style` 列出/预览/按用户明确要求应用三套提醒预设。面板与工具共用实现。记录与日程始终分开,不自动生成纪念卡、完成小事或调用模型;预设只改七项已有提醒设置。当前为 20 个工具、7 个事件、41 项配置(默认值含 `enabled` 共 42 键),面板数量不变,详细操作见使用指南。
|
|
8
8
|
|
|
9
9
|
本轮还补齐日期条与按需月历、独立往期阅读、跨面板浏览记忆、仅会话保留的文字草稿,以及就地反馈和稳定局部刷新。浏览偏好按实例隔离;计划、事实、保存结果和读取结果分别说明。UI只读接口不增加模型工具或提醒,详细交互见使用指南。
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
记录正常更新时保留一份上次有效内容的 `.bak`。损坏记录在首页显示异常,支持重新读取;有有效备份才显示恢复,恢复前另存原文件为 `.corrupt-时间戳-标识`。主记录损坏时仍能打开首页恢复,吃饭相关写入暂停。等待她写明天超过十分钟后,可以手动重发邀请,原日程保留。
|
|
14
14
|
|
|
15
|
-
> **只想学会怎么用?** 看 [`GUIDE.md`](GUIDE.md):三分钟上手、四个面板怎么点、一起吃饭怎么玩、
|
|
15
|
+
> **只想学会怎么用?** 看 [`GUIDE.md`](GUIDE.md):三分钟上手、四个面板怎么点、一起吃饭怎么玩、41 项配置(分 6 张卡;默认值含 `enabled` 共 42 键)、常见情况。
|
|
16
16
|
> 这一份 README 讲的是"里面有什么、为什么这么做"。
|
|
17
17
|
|
|
18
18
|
0.7.0 起她有自己的日子:每晚到点请她自己写明天怎么过,第二天按它过;主人能在「今天」面板看此刻她在哪儿、临时改掉某一段。下面「[她的一天](#她的一天)」一节讲这个。0.7.3 起她会看**真实天气**(默认关:填了你自己城市的名字才提,见下面「天气」一节)。
|
|
@@ -21,20 +21,20 @@
|
|
|
21
21
|
|
|
22
22
|
| 扩展 | 联动内容 | 开关 |
|
|
23
23
|
| --- | --- | --- |
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
| 「鱼的小世界」`cortico-world-map` |
|
|
24
|
+
| 「鱼的生图包」`cortico-world-imggen` | 写日程时列出衣柜/场景,发图时穿着、地点对得上 | `lifeWardrobeOn` |
|
|
25
|
+
| 「从0开始的肥鱼大冒险」`cortico-world-fun` | `story` 显式选择故事来源;`legacy` 保留旧提示 | `lifePlaceSource` |
|
|
26
|
+
| 「鱼的小世界」`cortico-world-map` | **已废弃**;旧提示仅由 `legacy` 兼容 | `lifePlaceSource` |
|
|
27
27
|
| 「鱼的每一天」(别的扩展反过来用它) | 可在 `lifeFreeMenu` 里手写自由时间的例子 | — |
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
鱼的小世界已废弃、不再更新,它的地点、住所、画风、封面和浏览能力已并入从0开始的肥鱼大冒险。`lifePlaceSource` 提供 `legacy`、`story`、`off` 三种选择:默认运行时迁移为 `legacy`;`story` 是明确 opt-in,不受旧 fun 提示开关否决,也不会在来源不可用时回退;`off` 不添加自动提示,用户手写内容照常保留。安装器会根据旧开关迁移缺失/null 的选择:旧 story 开且 fun 未关→`story`,fun/map 都关→`off`,其余→`legacy`;既有旧键保留供 legacy 细粒度兼容。
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
旧用户无需卸载小世界,新用户无需为迁移额外安装旧插件。指定故事有两处入口:用户在从0开始的肥鱼大冒险「出游」面板确认开始,或直接在聊天里用 `fun_story_start` / `fun_story_act`(「文字通道也能玩故事」默认开启,关掉后聊天里只剩候选与详情);会话里没有这两个工具或它们报未开启时,回到「出游」面板。你明确说选哪个时,她可以按你的原话(含序号)以你的名义提交并记为 owner;含糊的话只给待确认提议;轮到鱼时以 fish 身份提交;结束仍要你确认。计划、到点和普通 `fun_go` 都不等于指定故事开局。用户明确选择记生活后,才用 `feast_life_play(activity,note)` 留下实际摘要;保存成功才算记下。暂停、试玩、未完成不自动完成或记账,复制摘要不等于同步,也没有 `sourceRef` 幂等保证。操作见[使用指南](GUIDE.md#从计划到游玩记录),准确接口见[D2 开发说明](#d2-故事查询契约开发说明)。
|
|
32
32
|
|
|
33
33
|
### D2 migration (English)
|
|
34
34
|
|
|
35
|
-
`worlds.feast.
|
|
35
|
+
`worlds.feast.lifePlaceSource` is the single visible choice: `legacy` keeps the old fun/map hints, `story` opts into Adventures of Fat Fish from Scratch places and stories, and `off` adds no generated place hints. Story mode does not fall back when the selected source is unavailable. Existing configurations are migrated from the three former switches, preserving their legacy fine-grained preferences.
|
|
36
36
|
|
|
37
|
-
A specific story starts
|
|
37
|
+
A specific story starts either after you confirm it in the Outing panel of Adventures of Fat Fish from Scratch, or directly from the conversation through `fun_story_start` / `fun_story_act` ("play stories from text" is on by default; with it off, chat keeps only the candidate and detail queries). If those tools are absent or report themselves disabled, go back to the Outing panel. When you explicitly say which option to take, the assistant may submit it on your behalf from your own words (including ordinals) and the receipt records `owner`; vague words only produce a proposal to confirm. On the fish's own turn it submits as `fish`, and closing still needs your confirmation. `fun_go` does not launch a specified story, and the management tool `fun_story` is not a query or launch substitute. Match a saved recap to the target trip ID or run ID; the most recent saved recap may be about an earlier trip. A free-time invitation is not consent to record. Record actual play only when you explicitly choose to, using `feast_life_play(activity,note)`. Its receipt is plain `text`; claim success only after saving succeeds. Paused, unfinished and playtest runs are never automatically completed or recorded. Copying a recap is not a sync, and repeated writes have no `sourceRef` idempotency guarantee. See the [developer contract notes](#d2-故事查询契约开发说明) for exact tools and version evidence.
|
|
38
38
|
|
|
39
39
|
桌上是 824 道菜(28 个菜系组),每道都有九维口味分值、上桌的样子、香气、口感、余韵,和一段 40-400 字的实吃描写。她能自己按菜系挑着吃,主人也能从面板把一道菜端到她面前,或者整桌端过去;还能**和她一起吃一顿**——邀请她、互相喂一口,你吃了什么她也知道。**同一道菜每次吃到的都不一样**——温度、状态、配的那口都会变,所以连着吃三次不会说三遍同一句话。吃过什么、对什么反应、攒出来的口味画像跨天留着。饭点提醒默认开着,可以在配置里一键关掉。
|
|
40
40
|
|
|
@@ -278,25 +278,19 @@ Cortico 的 `envPromptVars()` **只在前缀重建时重算**,不是每轮请
|
|
|
278
278
|
- 发一条空间动态(qq_qzone action=post)
|
|
279
279
|
```
|
|
280
280
|
|
|
281
|
-
###
|
|
281
|
+
### 地点来源选择(`lifePlaceSource`)
|
|
282
282
|
|
|
283
|
-
|
|
283
|
+
在「她自己的时间」卡选择一个模式:`legacy` 沿用旧 fun/map 自动提示;`story` 仅在肥鱼大冒险已启用时提供其地点与故事建议,不回退到旧地图;`off` 不自动添加地点提示,手写菜单照常保留。
|
|
284
284
|
|
|
285
|
-
|
|
286
|
-
- 出门去逛逛:fun_places 看今天能去哪 → fun_go 进门 → fun_wander 逛一处 → fun_home 收摊
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
鱼的每一天只读取启用字段。菜单已提到 `fun_*` 时跳过追加。关闭 `lifeFreeFunOn` 只停自动追加,手写内容仍保留。
|
|
290
|
-
|
|
291
|
-
### 和「鱼的小世界」联动(0.7.5,旧路径)
|
|
285
|
+
### 鱼的小世界旧路径(由 `lifePlaceSource` 控制)
|
|
292
286
|
|
|
293
|
-
|
|
287
|
+
旧提示仅在 `lifePlaceSource: legacy` 时参与;手写 `map_*` 时会跳过自动地图行。地图世界已废弃,安装可选。
|
|
294
288
|
|
|
295
289
|
```
|
|
296
290
|
- 看看周围、去个常去的地方:map_places 看有哪些地方 → map_look 看这一处长什么样
|
|
297
291
|
```
|
|
298
292
|
|
|
299
|
-
菜单已提到 `map_*`
|
|
293
|
+
菜单已提到 `map_*` 时跳过追加。两行可并存,从0开始的肥鱼大冒险在前。菜单已提到 `map_*` 时跳过追加。旧 fun/map 提示仅由 `legacy` 来源选择统一控制,是否追加还取决于对应 World 是否启用;工具能否调用以当前会话为准。
|
|
300
294
|
|
|
301
295
|
|
|
302
296
|
**记账单独存一份** `<数据目录>/feast/life/play-YYYY-MM-DD.json`,不写进日程:`feast_life_plan` 会整个重写一天,记进去她下次交回就覆盖了。计划和事实的生命周期不同,就该分开存。
|
|
@@ -348,9 +342,9 @@ D2 未生效时,旧的「鱼的小世界」(`cortico-world-map`)的 `world
|
|
|
348
342
|
|
|
349
343
|
面板**不复用** `momentLine()`——那是给模型看的事件正文,末尾带着「不用特意跟主人汇报」,显示给主人就是一句写给 AI 的话。服务端 `list` 因此返回结构化数据(`nowItem` / `nowMinute` / `nowHm` / `mealSlots` / `eatenToday`),句由面板自己拼。
|
|
350
344
|
|
|
351
|
-
###
|
|
345
|
+
### 鱼的生图包联动(0.7.1)
|
|
352
346
|
|
|
353
|
-
|
|
347
|
+
和鱼的生图包(`cortico-world-imggen`)各跑各的,不调对方工具(World 契约不允许),只靠两件事:
|
|
354
348
|
|
|
355
349
|
1. **共享素材库的文件约定**:双方都读 `<数据目录>/imggen-library/`,feast 扫每个条目的 `entry.json`,拿到人物、衣柜、场景、道具和穿搭习惯。带 mtime 缓存(没变就不重扫);目录自动跟 imggen 的 `libraryRoot`(读不到再降级默认路径,`lifeWardrobeDir` 可手动覆盖,配置页上有原生选目录按钮)。
|
|
356
350
|
2. **提示词里各写一句指向对方**:feast 在 `{{feast_life_block}}` 加一句「想发图时穿着地点按日程来」,imggen 在他们的 ENV_PROMPT 加反向一句。
|
|
@@ -374,7 +368,7 @@ D2 未生效时,旧的「鱼的小世界」(`cortico-world-map`)的 `world
|
|
|
374
368
|
|
|
375
369
|
### 界限
|
|
376
370
|
|
|
377
|
-
- `scene` / `outfit` / `props` 是**日程里的文本字段**,0.7.1
|
|
371
|
+
- `scene` / `outfit` / `props` 是**日程里的文本字段**,0.7.1 起会跟鱼的生图包的素材库联动:库里有正名就归一、模型没填 `outfit` 时按习惯补(见「[鱼的生图包联动](#鱼的生图包联动0-7-1)」)。库读不到就退回纯文本,不做库里没有的校验。
|
|
378
372
|
- 日程存 `<数据目录>/feast/life/YYYY-MM-DD.json`,一天一个文件,`tmp → rename` 原子写(断电不会留半个 JSON)。
|
|
379
373
|
- **清「吃过的记录」不动日程,清「她的一天」也不动 `state.json` / `combos.json`**——存储页因此是三项。
|
|
380
374
|
- 关掉 `lifeEnabled` 时,`envPromptVars()` 返回 `{ feast_life_block: '' }` 而**不是 `null`**:`null` 会把整份 `ENV_PROMPT`(连饭点说明)一起省略。
|
|
@@ -405,7 +399,7 @@ D2 未生效时,旧的「鱼的小世界」(`cortico-world-map`)的 `world
|
|
|
405
399
|
- 应用 15:00 才打开这种:一天一档都没叫过的话,补最近过去的那一顿,不让一整天白过
|
|
406
400
|
- 上一顿挂太久(2 小时)就放掉,但**同一拍还会看下一档**——午饭没吃不该把晚饭一起吞掉
|
|
407
401
|
|
|
408
|
-
配置项(`worlds.feast.*`,全是热改):配置卡
|
|
402
|
+
配置项(`worlds.feast.*`,全是热改):配置卡 41 项,`DEFAULTS` 含宿主管理的 `enabled` 共 42 键。
|
|
409
403
|
|
|
410
404
|
| 键 | 默认 | 说明 |
|
|
411
405
|
| --- | --- | --- |
|
|
@@ -444,9 +438,7 @@ D2 未生效时,旧的「鱼的小世界」(`cortico-world-map`)的 `world
|
|
|
444
438
|
| `lifeFreeBusyCall` | `false` | **忙着的时候也叫**(0.8.0)。开=上班/通勤/开会那几档照样叫,但换成报备措辞;关=不叫、面板留痕。睡觉永远不叫 |
|
|
445
439
|
| `lifeFreeMenu` | 4 条通用说法 | 叫醒时贴给她的菜单。**默认不点名任何别的扩展的工具**;要用具体工具自己填 |
|
|
446
440
|
| `lifeFreeAskReport` | `true` | 做完要不要提醒她跟主人说一句 |
|
|
447
|
-
| `
|
|
448
|
-
| `lifeFreeMapOn` | `true` | **看看周围那一行**。旧路径中,旧小世界配置启用且菜单未提到 `map_*` 时追加旧提示;D2 生效时省略自动行,但保留开关值与手写内容 |
|
|
449
|
-
| `lifeStoryOn` | `false` | **用娱乐时间的地点和故事**。用户明确选择新来源;还需 `lifeFreeFunOn !== false` 和 `worlds.fun.enabled === true`。仅省略自动旧 fun/map 行,保留文本、排序和独立开关;关闭回旧路径,开关与版本不证明会话能力 |
|
|
441
|
+
| `lifePlaceSource` | `legacy` | 地点与故事来源:`legacy` 沿用旧 fun/map 提示;`story` 选择肥鱼大冒险地点与故事,来源不可用时不回退;`off` 不自动添加,保留手写内容。旧配置升级时会迁移已有选择 |
|
|
450
442
|
| `lifeWardrobeOn` | `true` | **生图联动总开关**:扫素材库、列给她、自动补穿着、提示词互指 |
|
|
451
443
|
| `lifeWardrobeDir` | 空 | 素材库目录。留空自动跟 imggen 的 `libraryRoot`,再降级到 `<数据目录>/imggen-library`。配置页上有原生选目录按钮 |
|
|
452
444
|
| `lifeWardrobeAutoOutfit` | `true` | 自动补 outfit(情境穿搭 > 情境默认 > 延续上一段 > 场景默认 > 默认服饰) |
|
|
@@ -489,7 +481,7 @@ powershell -ExecutionPolicy Bypass -File .\install.ps1 -CooRoot "C:\Users\asus\C
|
|
|
489
481
|
|
|
490
482
|
## 从市场装
|
|
491
483
|
|
|
492
|
-
这个包也发在 npm(`cortico-world-feast`),Coo 的市场会收录它。从市场装的话不用跑上面的脚本:市场会把包装进 `data\extensions\node_modules`,启用后在世界的配置里能看到同样的
|
|
484
|
+
这个包也发在 npm(`cortico-world-feast`),Coo 的市场会收录它。从市场装的话不用跑上面的脚本:市场会把包装进 `data\extensions\node_modules`,启用后在世界的配置里能看到同样的 41 项配置(分成 6 张卡;默认值含 `enabled` 共 42 键)。
|
|
493
485
|
|
|
494
486
|
包名和收录的细节、发版步骤见 [PUBLISHING.md](PUBLISHING.md)。
|
|
495
487
|
|
|
@@ -511,7 +503,7 @@ Remove-Item "$ext\vendor\cortico-world-feast" -Recurse -Force
|
|
|
511
503
|
|
|
512
504
|
### D2 故事查询契约(开发说明)
|
|
513
505
|
|
|
514
|
-
本票采用的独立 [F3–F5 契约](STORY-QUERY-CONTRACT-F3-F5.md) 将最低支持构建明确为 `cortico-world-fun@0.3.2-story.2`,六个公开方法均声明 `read,snapshot`。本票另获提供的
|
|
506
|
+
本票采用的独立 [F3–F5 契约](STORY-QUERY-CONTRACT-F3-F5.md) 将最低支持构建明确为 `cortico-world-fun@0.3.2-story.2`,六个公开方法均声明 `read,snapshot`。本票另获提供的 Adventures of Fat Fish from Scratch 源码快照,其包版本是 `0.3.2`、锁文件版本为 `0.3.2-story.2`;没有提供原验收 tgz,不能证明与验收包相同。不能用快照版本替代独立契约的最低版本,也不能据任一材料宣称宿主已安装或本次已验证可用。使用前仍需核对当前会话的实际工具声明与权限。
|
|
515
507
|
|
|
516
508
|
| 只读工具 | 参数 | 用途 |
|
|
517
509
|
| --- | --- | --- |
|
|
@@ -524,7 +516,7 @@ Remove-Item "$ext\vendor\cortico-world-feast" -Recurse -Force
|
|
|
524
516
|
|
|
525
517
|
查询按需由宿主主会话模型调用;每一天代码不调用 fun 工具、不读对方业务文件、不加载整库或增加轮询。标准回执为 `{text:"JSON", failed?:true}`,解析外层 `text` 获取 JSON;其中 schedule 的 `text` 仍只是候选。先检查外层 `failed`,且仅 `ok === true` 视为查询成功;故事卡还要同时 `enabled === true`、`available === true` 才视为当前可用。`failed:true`、`ok:false`、缺失/畸形 `text`、无候选、过期或权限不明都不能推断成功,可重新读取或退回通用邀请。已知存档异常时,其他成功查询不代表可出发。缺版本、作者、条件或时长就说明未知,不从节点数估时,不补未来剧情或私有资料;当前可用不保证目标时段可用。
|
|
526
518
|
|
|
527
|
-
|
|
519
|
+
指定故事可在从0开始的肥鱼大冒险「出游」面板由用户确认 `start`,面板复核当前 `startStamp`、`packId`、`revision`;聊天里也能用 `fun_story_start` / `fun_story_act`(「文字通道也能玩故事」默认开启,关掉后只剩候选与详情)。普通 `fun_go` 不是指定故事开局;管理工具 `fun_story` 不用于查询或替代开局,鱼不替用户编选择或补 owner / joint 中的用户份额。目标行程的已存回顾带目标行程 ID 或 run ID,并核对 `memory.id`/`memory.runId`;无 ID 的回顾只指最近一次已存行程,不可据此推断本局结果。生活记录另行明确选择,沿用 `feast_life_play(activity,note)` 的普通 `text` 回执,保存成功才记账;没有 `sourceRef` 幂等或跨日防重保证。
|
|
528
520
|
|
|
529
521
|
下面是项目原有开发命令,不代表本轮已执行:
|
|
530
522
|
|
|
@@ -31,7 +31,11 @@ The above JSON is inside the standard result's `text` field. Actual card fields
|
|
|
31
31
|
|
|
32
32
|
## Launching and updating a story
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
The supported explicit start on the panel is the **Outing** panel operation `start`, with the current status `startStamp`, `packId`, and current `revision`; the panel rechecks those conditions before starting. Ordinary `fun_go` is not a request to launch a particular story.
|
|
35
|
+
|
|
36
|
+
Starting and advancing from a text channel exists while the world's "play stories from text" switch (`worlds.fun.funStoryTextOn`) is on (it is on by default; with it off, chat keeps only the candidate and detail queries): `fun_story_start {packId, revision, startStamp, confirm}` rechecks the same conditions, and `fun_story_act {tripId, stamp, intent, say}` advances the current trip. Option packs answer a first `say` with `needConfirm` + `proposalId` unless the words exactly match an option label or an explicit ordinal; only a second call with `proposalId` and `optionId` commits. On an owner turn the assistant may submit from the user's own words and the log records `owner`; on a fish turn it submits as `fish`. Free-mode scene packs (`version 3`, user switch `funStoryFree`) commit one turn per `say`. Closing requires `intent: "close"` with `confirm: true`.
|
|
37
|
+
|
|
38
|
+
A World cannot see which channel invoked it, so the switch is a single "text channels allowed" gate, never QQ-only. When the tools are absent or report themselves disabled, fall back to the panel. Fish must never invent an owner decision, but relaying the user's explicit instruction is not invention — keep the user's words and record them. A host integrator should not invent a different launch endpoint.
|
|
35
39
|
|
|
36
40
|
`fun_story` is an author-management tool, not a public query. It supports local list/template/validate/preview/playtest/export/import/enable/disable/remove actions and can write story definitions. Do not use it for read-only candidate lookup.
|
|
37
41
|
|
|
@@ -47,7 +51,7 @@ Version 2 may include up to 24 optional references in the author's advanced JSON
|
|
|
47
51
|
|
|
48
52
|
A reference is eligible only when that exact pack/revision has actually triggered `afterNode`, the run is currently in the reference's `area`, and (if provided) the player actually selected `afterChoice`. At most six eligible entries for one audience are passed at once. Unlocks are derived from this run's persisted story progress and choices; not from node count, guessed future state, or a separate World file.
|
|
49
53
|
|
|
50
|
-
- `player`: rendered as plain text in the current
|
|
54
|
+
- `player`: rendered as plain text in the current **Outing** panel only; never put into public candidate/detail/current/recap/schedule tool responses.
|
|
51
55
|
- `fish`: added to fish's current cognition request only; fish proposals must still select an offered option and cannot progress owner/joint actions. Where private references were supplied, the public choice reason is replaced with a fixed, non-sensitive reason.
|
|
52
56
|
- `dm`: added only to the current optional DM request; DM must propose a current option for owner approval, and private-reference narration is replaced in the public pending proposal with a fixed neutral explanation.
|
|
53
57
|
- A different audience, area, node or unselected choice remains unavailable. The underlying public query does not return reference definitions or trigger conditions. Disabling DM or lacking a cognition interface leaves fixed/manual play available.
|
package/assets/icon.png
CHANGED
|
Binary file
|
package/dist/webui.js
CHANGED
|
@@ -2857,7 +2857,8 @@ const todayPanel = {
|
|
|
2857
2857
|
tomorrowMeta.appendChild(el('span', 'feast-dim', data.tomorrow.source === 'pending'
|
|
2858
2858
|
? t.todayTomorrowRequestAt(formatted) : t.todayTomorrowUpdatedAt(formatted)));
|
|
2859
2859
|
}
|
|
2860
|
-
|
|
2860
|
+
// 没请求、也没有安排时,只显示邀请按钮,不单独挂一条空状态。
|
|
2861
|
+
if (data.tomorrow?.source === 'pending' || data.tomorrow?.items?.length) tomorrow.appendChild(tomorrowMeta);
|
|
2861
2862
|
if (data.tomorrow?.title || data.tomorrow?.dayType?.name || data.tomorrow?.items?.length) {
|
|
2862
2863
|
const summary = el('div', 'feast-tomorrow-state');
|
|
2863
2864
|
summary.appendChild(el('b', null, t.todayTomorrowSummary));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cortico-world-feast",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "鱼的每一天 · 先给她一天,再给她一桌饭:她自己的日程(每晚自己写明天,可以按日型给她备一张「能做的事」清单,到点过自己的时间、做完记一笔)+ 824
|
|
3
|
+
"version": "0.14.0",
|
|
4
|
+
"description": "鱼的每一天 · 先给她一天,再给她一桌饭:她自己的日程(每晚自己写明天,可以按日型给她备一张「能做的事」清单,到点过自己的时间、做完记一笔)+ 824 道菜的桌子,能端一道、端一桌,也能和她一起吃一顿。可选联动「鱼的生图包」和「从0开始的肥鱼大冒险」;旧版「鱼的小世界」已废弃、能力已并入从0开始的肥鱼大冒险,无需再安装,不装也完整可用。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "青",
|
|
7
7
|
"repository": {
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"locales": {
|
|
65
65
|
"zh": {
|
|
66
66
|
"displayName": "鱼的每一天",
|
|
67
|
-
"description": "先给她一天,再给她一桌饭。每天晚上到点请她自己写明天怎么过(零 API Key,用已配的模型),第二天按它过;你还能按日型给她备一张「能做的事」清单,日程里就会写成真能做的一件事,而不是「在家玩」这种空白。上不上班可以一句话翻,几点吃也能由她自己按那天定;到点还有「她自己的时间」,让她挑件事做并记一笔——上班/通勤时段默认不叫,开了开关才照叫,但会换成报备的说法。主人能在「今天」面板看今天和明天的时间线、此刻她在做什么、她做过什么、往前翻往期,也能临时改掉某一段。桌上是 824 道菜(28 个菜系组),每道都有九维口味、香气、口感、余韵和一段实吃描写;她能自己按菜系挑,主人也能从面板端一道或整桌端过去(8 套内置套餐,也能自己勾几道攒成一桌存下来);还能和她一起吃一顿:邀请她、互相喂一口,你吃了什么她也知道。同一道菜每次吃到的都不一样,吃过什么、对什么反应、口味画像跨天攒着。饭点提醒、「她的一天」和自由时间都能在配置里单独关掉。\n\n
|
|
67
|
+
"description": "先给她一天,再给她一桌饭。每天晚上到点请她自己写明天怎么过(零 API Key,用已配的模型),第二天按它过;你还能按日型给她备一张「能做的事」清单,日程里就会写成真能做的一件事,而不是「在家玩」这种空白。上不上班可以一句话翻,几点吃也能由她自己按那天定;到点还有「她自己的时间」,让她挑件事做并记一笔——上班/通勤时段默认不叫,开了开关才照叫,但会换成报备的说法。主人能在「今天」面板看今天和明天的时间线、此刻她在做什么、她做过什么、往前翻往期,也能临时改掉某一段。桌上是 824 道菜(28 个菜系组),每道都有九维口味、香气、口感、余韵和一段实吃描写;她能自己按菜系挑,主人也能从面板端一道或整桌端过去(8 套内置套餐,也能自己勾几道攒成一桌存下来);还能和她一起吃一顿:邀请她、互相喂一口,你吃了什么她也知道。同一道菜每次吃到的都不一样,吃过什么、对什么反应、口味画像跨天攒着。饭点提醒、「她的一天」和自由时间都能在配置里单独关掉。\n\n可选联动:鱼的生图包沿用衣柜和场景;从0开始的肥鱼大冒险提供按需查询和活动例子的提示,实际工具以当前会话为准。旧版「鱼的小世界」已废弃、不再更新,它的地点、住所、画风、封面与浏览能力已并入从0开始的肥鱼大冒险;旧提示与独立开关只为兼容保留,新用户不必安装旧小世界。计划只记打算,故事须明确开始,经历须经每一天工具明确记账。"
|
|
68
68
|
},
|
|
69
69
|
"en": {
|
|
70
70
|
"displayName": "Fish Every Day",
|
|
71
|
-
"description": "First a day of her own, then a table of food. Every evening she is asked to write tomorrow herself (no API key — it uses the model you already have), and the next day she lives it; you can also prepare a list of \"things she can actually do\" per day type, so the day she writes is made of real things instead of a blank \"hanging out at home\". On her own-time slots she picks something to do and logs it — while she is at work or commuting it stays quiet by default, and with one switch on it still speaks but as a check-in rather than \"this time is yours\". The Today panel shows today's and tomorrow's timeline, what she is doing right now, what she has been up to, past days, and lets you change a stretch of it. The table holds 824 dishes across 28 cuisines, each with a nine-axis flavour profile, aroma, texture, aftertaste and a full paragraph of how it actually eats. She can pick by cuisine, or you can put a dish down in front of her from the panel — or serve a whole table at once (8 built-in set meals, plus your own saved tables). You can also share a meal with her: invite her, feed each other a bite, and tell her what you are eating. The same dish never lands the same way twice, and what she ate, how it landed and her taste profile accumulate across days. Whether she works today can be flipped with one word, and she can set that day's meal times herself. Meal reminders, her day, and her own time can each be switched off in config.\n\nOptional integrations retain the image studio wardrobe and scenes, plus activity suggestions for
|
|
71
|
+
"description": "First a day of her own, then a table of food. Every evening she is asked to write tomorrow herself (no API key — it uses the model you already have), and the next day she lives it; you can also prepare a list of \"things she can actually do\" per day type, so the day she writes is made of real things instead of a blank \"hanging out at home\". On her own-time slots she picks something to do and logs it — while she is at work or commuting it stays quiet by default, and with one switch on it still speaks but as a check-in rather than \"this time is yours\". The Today panel shows today's and tomorrow's timeline, what she is doing right now, what she has been up to, past days, and lets you change a stretch of it. The table holds 824 dishes across 28 cuisines, each with a nine-axis flavour profile, aroma, texture, aftertaste and a full paragraph of how it actually eats. She can pick by cuisine, or you can put a dish down in front of her from the panel — or serve a whole table at once (8 built-in set meals, plus your own saved tables). You can also share a meal with her: invite her, feed each other a bite, and tell her what you are eating. The same dish never lands the same way twice, and what she ate, how it landed and her taste profile accumulate across days. Whether she works today can be flipped with one word, and she can set that day's meal times herself. Meal reminders, her day, and her own time can each be switched off in config.\n\nOptional integrations retain the image studio wardrobe and scenes, plus activity suggestions for Adventures of Fat Fish from Scratch. Tool use depends on what the current session actually provides. The legacy Little World is deprecated and no longer updated: its places, home, art style, covers and browsing have been merged into Adventures of Fat Fish from Scratch, and the old hints and switches remain only for compatibility, so new users need not install legacy Little World. Plans express intentions; stories require an explicit start, and experiences are recorded explicitly through Fish Every Day."
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
"tags": [
|
package/src/config.js
CHANGED
|
@@ -112,14 +112,8 @@ export const DEFAULTS = Object.freeze({
|
|
|
112
112
|
].join('\n'),
|
|
113
113
|
/** 做完要不要提醒她跟主人说一句。 */
|
|
114
114
|
lifeFreeAskReport: false,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
lifeFreeFunOn: true,
|
|
118
|
-
// ---- 小地图联动(0.7.4)----
|
|
119
|
-
/** 「看看周围」那一行要不要加。小地图没装/没启用时,这一项写了也不会加。 */
|
|
120
|
-
lifeFreeMapOn: true,
|
|
121
|
-
/** 用户明确选择娱乐时间的合并地点/故事提示;不代表工具能力。 */
|
|
122
|
-
lifeStoryOn: false,
|
|
115
|
+
/** Place/story source selector; null is the migration sentinel for hosts that pre-merge defaults. Runtime resolves and persists legacy by default. */
|
|
116
|
+
lifePlaceSource: null,
|
|
123
117
|
// ---- 生图工作室联动(0.7.1)----
|
|
124
118
|
/** 联动总开关:扫素材库、列给 Coo、自动补 outfit、注入指向句。关掉=纯文本日程,不碰库。 */
|
|
125
119
|
lifeWardrobeOn: true,
|
|
@@ -223,16 +217,12 @@ const ZH = {
|
|
|
223
217
|
lifeFreeMenuDesc: '自由时间邀请时给的例子,选不选都行,不会自动写进日程。默认用通用说法。工具只在当前会话确实提供时使用。',
|
|
224
218
|
lifeFreeAskReport: '做完说一声',
|
|
225
219
|
lifeFreeAskReportDesc: '开启时,叫醒和记账回执都会提醒她「跟主人说一句你刚才玩了什么」。',
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
lifeStoryOn: '用娱乐时间的地点和故事',
|
|
229
|
-
lifeStoryOnDesc: '默认关闭。主动选择后,在写计划和自由时间邀请中使用娱乐时间的地点、故事建议,省略自动追加的旧地图提示;手写内容保留。需开启出游提示及娱乐时间,工具仍以当前会话为准。开始故事请到娱乐时间故事面板确认,记生活另行选择。',
|
|
230
|
-
lifeFreeMapOn: '看看周围那一行',
|
|
231
|
-
lifeFreeMapOnDesc: '开启时,若旧小世界配置已启用且菜单未提到 map_*,追加原有看地点提示。启用不保证工具或会话权限。关闭只停自动追加,手写菜单照常。',
|
|
220
|
+
lifePlaceSource: '地点与故事来源',
|
|
221
|
+
lifePlaceSourceDesc: '控制写计划与自由时间邀请里的自动地点/故事提示:legacy 沿用旧 fun/map 提示(升级会迁移原选择);story 选择肥鱼大冒险地点与故事,仅在该世界已启用时生效,不回退旧提示;off 不自动追加,手写内容照常保留。工具权限仍以当前会话为准。',
|
|
232
222
|
lifeWardrobeOn: '生图联动',
|
|
233
|
-
lifeWardrobeOnDesc: '
|
|
223
|
+
lifeWardrobeOnDesc: '扫鱼的生图包的素材库(<数据目录>/imggen-library),写日程时列出衣柜/场景/道具和穿搭习惯,模型没填 outfit 时按习惯自动补,并在提示词里加一句指向鱼的生图包。关掉=纯文本日程,不碰库、不联动。库读不到时自动静默降级,不影响她的一天。',
|
|
234
224
|
lifeWardrobeDir: '素材库目录',
|
|
235
|
-
lifeWardrobeDirDesc: '
|
|
225
|
+
lifeWardrobeDirDesc: '鱼的生图包的素材库根目录;留空时自动读 imggen 的 libraryRoot(用户在 imggen 那边改了库目录,这边自动跟上),读不到再降级到 <数据目录>/imggen-library。手动填这里只用于 imggen 没配 libraryRoot 又想指定路径的情况。',
|
|
236
226
|
lifeWardrobeAutoOutfit: '自动补穿着',
|
|
237
227
|
lifeWardrobeAutoOutfitDesc: '模型没写 outfit 时按这个顺序补:情境穿搭(睡前→睡衣这种她自己配的)> 情境默认(内置常识表,库里找得到才用)> 延续上一段(睡觉那段不延续、不硬猜)> 场景默认 > 她的默认服饰。关掉=只列库不补,写成什么就是什么。',
|
|
238
228
|
weatherEnabled: '让她知道外面的天气',
|
|
@@ -339,12 +329,8 @@ const EN = {
|
|
|
339
329
|
lifeFreeMenuDesc: 'Optional examples for free-time invitations. They are never added to the schedule automatically. The default uses generic ideas. Use tools only when available in the current session.',
|
|
340
330
|
lifeFreeAskReport: 'Tell the owner',
|
|
341
331
|
lifeFreeAskReportDesc: 'When on, both the wake-up and the logging receipt remind her to say one sentence about what she just did.',
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
lifeStoryOn: 'Use Fun Time places and stories',
|
|
345
|
-
lifeStoryOnDesc: 'Off by default. Opt in to Fun Time place and story suggestions in planning and free-time invitations, omitting automatic legacy map hints while keeping your text. Requires the outing hint switch and enabled Fun Time; tools still depend on this session. Confirm story launch in the Fun Time story panel and choose life recording separately.',
|
|
346
|
-
lifeFreeMapOn: 'Add the look-around line',
|
|
347
|
-
lifeFreeMapOnDesc: 'When on, append the existing place hint if the legacy Little World is enabled in config and the menu does not mention map_*. Enabled status does not guarantee tool access in this session. Turning this off keeps your menu as written.',
|
|
332
|
+
lifePlaceSource: 'Place and story source',
|
|
333
|
+
lifePlaceSourceDesc: 'Choose generated place/story hints for plans and free-time invitations: legacy keeps the old fun/map hints (existing choices are migrated); story opts into Adventures of Fat Fish from Scratch places and stories, only when that world is enabled, with no legacy fallback; off adds none and preserves handwritten text. Tool access still depends on the current session.',
|
|
348
334
|
lifeWardrobeOn: 'Image-gen link',
|
|
349
335
|
lifeWardrobeOnDesc: 'Scans the image-gen studio library (<dataDir>/imggen-library), lists wardrobe/scene/props and outfit habits when she writes her day, auto-fills outfit from habits when the model leaves it blank, and adds one line in the prompt pointing at the studio. Off = plain-text schedule, no library, no link. Degrades silently when the library is missing; her day is never affected.',
|
|
350
336
|
lifeWardrobeDir: 'Library root',
|
|
@@ -623,22 +609,11 @@ function configProperties(language = 'zh') {
|
|
|
623
609
|
description: t.lifeFreeAskReportDesc,
|
|
624
610
|
'x-hot': true,
|
|
625
611
|
},
|
|
626
|
-
[`${K}.
|
|
627
|
-
type: '
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
},
|
|
632
|
-
[`${K}.lifeStoryOn`]: {
|
|
633
|
-
type: 'boolean',
|
|
634
|
-
title: t.lifeStoryOn,
|
|
635
|
-
description: t.lifeStoryOnDesc,
|
|
636
|
-
'x-hot': true,
|
|
637
|
-
},
|
|
638
|
-
[`${K}.lifeFreeMapOn`]: {
|
|
639
|
-
type: 'boolean',
|
|
640
|
-
title: t.lifeFreeMapOn,
|
|
641
|
-
description: t.lifeFreeMapOnDesc,
|
|
612
|
+
[`${K}.lifePlaceSource`]: {
|
|
613
|
+
type: 'string',
|
|
614
|
+
enum: ['legacy', 'story', 'off'],
|
|
615
|
+
title: t.lifePlaceSource,
|
|
616
|
+
description: t.lifePlaceSourceDesc,
|
|
642
617
|
'x-hot': true,
|
|
643
618
|
},
|
|
644
619
|
[`${K}.lifeWardrobeOn`]: {
|
|
@@ -708,11 +683,11 @@ export const CONFIG_GROUPS = Object.freeze([
|
|
|
708
683
|
},
|
|
709
684
|
{
|
|
710
685
|
key: 'life',
|
|
711
|
-
pick: (k) => k.startsWith('life') && !k.startsWith('lifeFree') && !k.startsWith('lifeWardrobe'),
|
|
686
|
+
pick: (k) => k.startsWith('life') && !k.startsWith('lifeFree') && !k.startsWith('lifeWardrobe') && k !== 'lifePlaceSource',
|
|
712
687
|
},
|
|
713
688
|
{
|
|
714
689
|
key: 'free',
|
|
715
|
-
pick: (k) => k.startsWith('lifeFree'),
|
|
690
|
+
pick: (k) => k.startsWith('lifeFree') || k === 'lifePlaceSource',
|
|
716
691
|
},
|
|
717
692
|
{
|
|
718
693
|
key: 'wardrobe',
|
package/src/life/free.js
CHANGED
|
@@ -198,8 +198,8 @@ export function freeEventText({
|
|
|
198
198
|
const logged = play?.done?.length ?? 0;
|
|
199
199
|
const askReport = cfg?.lifeFreeAskReport !== false;
|
|
200
200
|
const nowLine = (freeNow) => (freeNow
|
|
201
|
-
? `(现在 ${nowHm}
|
|
202
|
-
: `(现在 ${nowHm}
|
|
201
|
+
? `(现在 ${nowHm}。这是你自己的时间,做不做、做什么都由你。)`
|
|
202
|
+
: `(现在 ${nowHm}。手头这点空档,做不做都由你。)`);
|
|
203
203
|
|
|
204
204
|
// 被占着(上班/通勤/开会):不假装这是她的时间,也不给「出去转转」这种例子。
|
|
205
205
|
if (kind === 'busy') {
|
package/src/life/funlink.js
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* 绝不让她看到指向不存在工具的例子;
|
|
18
18
|
* · 任何异常都吞掉,**绝不抛错**(抛错会把整个 World 卸载)。
|
|
19
19
|
*/
|
|
20
|
+
import { placeLinks } from './places.js';
|
|
20
21
|
import { readLinkedWorldEnabled } from './linked-config.js';
|
|
21
22
|
|
|
22
23
|
/**
|
|
@@ -52,17 +53,17 @@ export async function readFunEnabled(dataDir, options = {}) {
|
|
|
52
53
|
* 该不该把那一行加进「例子」里。
|
|
53
54
|
*
|
|
54
55
|
* 三个条件都满足才加:
|
|
55
|
-
* 1. `
|
|
56
|
+
* 1. 地点来源包含 `legacy` 时;
|
|
56
57
|
* 2. 娱乐时间装了并且启用着(`worlds.fun.enabled === true`);
|
|
57
58
|
* 3. **现有菜单里还没有指向 fun_* 的一行**——用户自己抄过的话就别再叠一条。
|
|
58
59
|
*
|
|
59
60
|
* @param {string} menu 现有菜单(`cfg.lifeFreeMenu` 或 DEFAULTS)
|
|
60
61
|
* @param {boolean} funOn 娱乐时间是否装了并启用
|
|
61
|
-
* @param {object} cfg
|
|
62
|
+
* @param {object} cfg 配置段(判地点来源)
|
|
62
63
|
* @returns {string} 要追加的一行;不该加就是空串
|
|
63
64
|
*/
|
|
64
65
|
export function funMenuLine(menu, funOn, cfg = {}) {
|
|
65
|
-
if (cfg
|
|
66
|
+
if (!placeLinks(cfg).fun) return '';
|
|
66
67
|
if (!funOn) return '';
|
|
67
68
|
if (HAS_FUN_RE.test(typeof menu === 'string' ? menu : '')) return '';
|
|
68
69
|
return FUN_LINE;
|
package/src/life/index.js
CHANGED
package/src/life/inject.js
CHANGED
|
@@ -106,7 +106,7 @@ export function momentLine({ today, cfg = {}, tz = 'Asia/Shanghai', nowMs = Date
|
|
|
106
106
|
const next = today.items.slice(i + 1, i + 1 + upcoming).map((it) => it.activity).join('、');
|
|
107
107
|
const head = `【鱼的每一天 · 她的一天】${t ? `${t},` : ''}你这会儿在${cur.activity}${placeOf(cur)}`;
|
|
108
108
|
const tail = next ? `;待会儿想${next}` : '';
|
|
109
|
-
return safe(`${head}${tail}
|
|
109
|
+
return safe(`${head}${tail}。(不用回这条。)`);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
/** 时段标识:跨段就变,用来避免同一段里反复推事件。 */
|
package/src/life/maplink.js
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* 绝不让她看到指向不存在工具的例子;
|
|
15
15
|
* · 任何异常都吞掉,**绝不抛错**(抛错会把整个 World 卸载)。
|
|
16
16
|
*/
|
|
17
|
+
import { placeLinks } from './places.js';
|
|
17
18
|
import { readLinkedWorldEnabled } from './linked-config.js';
|
|
18
19
|
|
|
19
20
|
/**
|
|
@@ -51,17 +52,17 @@ export async function readMapEnabled(dataDir, options = {}) {
|
|
|
51
52
|
* 该不该把那一行加进「例子」里。
|
|
52
53
|
*
|
|
53
54
|
* 三个条件都满足才加:
|
|
54
|
-
* 1. `
|
|
55
|
+
* 1. 地点来源包含 `legacy` 时;
|
|
55
56
|
* 2. 小地图装了并且启用着(`worlds.map.enabled === true`);
|
|
56
57
|
* 3. **现有菜单里还没有指向 map_* 的一行**——用户自己抄过的话就别再叠一条。
|
|
57
58
|
*
|
|
58
59
|
* @param {string} menu 现有菜单(`cfg.lifeFreeMenu`、DEFAULTS,或已经被 funlink 拼过的菜单)
|
|
59
60
|
* @param {boolean} mapOn 小地图是否装了并启用
|
|
60
|
-
* @param {object} cfg
|
|
61
|
+
* @param {object} cfg 配置段(判地点来源)
|
|
61
62
|
* @returns {string} 要追加的一行;不该加就是空串
|
|
62
63
|
*/
|
|
63
64
|
export function mapMenuLine(menu, mapOn, cfg = {}) {
|
|
64
|
-
if (cfg
|
|
65
|
+
if (!placeLinks(cfg).map) return '';
|
|
65
66
|
if (!mapOn) return '';
|
|
66
67
|
if (HAS_MAP_RE.test(typeof menu === 'string' ? menu : '')) return '';
|
|
67
68
|
return MAP_LINE;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const LIFE_PLACE_SOURCES = Object.freeze(['legacy', 'story', 'off']);
|
|
2
|
+
|
|
3
|
+
/** Resolve an explicit source or infer the one-time migration choice for old configs. */
|
|
4
|
+
export function resolvePlaceSource(cfg = {}) {
|
|
5
|
+
const value = cfg?.lifePlaceSource;
|
|
6
|
+
if (LIFE_PLACE_SOURCES.includes(value)) return value;
|
|
7
|
+
if (value !== undefined && value !== null) return 'off';
|
|
8
|
+
if (cfg?.lifeStoryOn === true && cfg?.lifeFreeFunOn !== false) return 'story';
|
|
9
|
+
if (cfg?.lifeFreeFunOn === false && cfg?.lifeFreeMapOn === false) return 'off';
|
|
10
|
+
return 'legacy';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** In legacy mode preserve pre-migration per-hint choices; a fresh legacy
|
|
14
|
+
* choice after an old all-off config restores the legacy default pair. */
|
|
15
|
+
export function placeLinks(cfg) {
|
|
16
|
+
const source = resolvePlaceSource(cfg);
|
|
17
|
+
const neither = cfg?.lifeFreeFunOn === false && cfg?.lifeFreeMapOn === false;
|
|
18
|
+
return {
|
|
19
|
+
story: source === 'story',
|
|
20
|
+
fun: source === 'legacy' && (neither || cfg?.lifeFreeFunOn !== false),
|
|
21
|
+
map: source === 'legacy' && (neither || cfg?.lifeFreeMapOn !== false),
|
|
22
|
+
};
|
|
23
|
+
}
|
package/src/life/plan.js
CHANGED
|
@@ -49,7 +49,7 @@ export function planEventText({
|
|
|
49
49
|
lines.push('如果想安排外出,且当前会话确实提供相应工具,交回日程前可按需查地点(启用配置不等于工具权限,也不证明新地点或故事接口可用):');
|
|
50
50
|
if (mapOn) lines.push('- 附近散步、去常去的地方或回家:用 map_places 找登记地点,需要详情时用 map_look,location 用地图正名。');
|
|
51
51
|
if (funOn) lines.push('- 想安排一趟娱乐出游:用 fun_places 查场所和可逛项目,按计划时段参考营业时间,location 写实际打算去的场所正名,activity / detail 写想做的事。现在只做计划,到了那天真要出发时再用 fun_go。');
|
|
52
|
-
if (mapOn && funOn) lines.push('- 如果 map_look
|
|
52
|
+
if (mapOn && funOn) lines.push('- 如果 map_look 提到从0开始的肥鱼大冒险里相近的场所,先用 fun_places 核对。选定去哪儿,location 就写哪一处的正名。');
|
|
53
53
|
lines.push('没有相应工具、没有合适地点或想在家休息,就保留弹性安排。这里只写计划,不开始故事、不移动当前位置,也不登记实际经历。');
|
|
54
54
|
}
|
|
55
55
|
if (recent) lines.push(`最近几天:\n${recent}`);
|
package/src/life/storylink.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
/** Optional host-conversation guidance only. No foreign tool calls or business-file reads. */
|
|
2
|
+
import { resolvePlaceSource } from './places.js';
|
|
2
3
|
import { withFunLine } from './funlink.js';
|
|
3
4
|
import { withMapLine } from './maplink.js';
|
|
4
5
|
|
|
5
6
|
export const STORY_MIN_VERSION = 'cortico-world-fun@0.3.2-story.2';
|
|
6
7
|
export function storyLinkOn(funOn, cfg = {}) {
|
|
7
|
-
return funOn === true && cfg
|
|
8
|
+
return funOn === true && resolvePlaceSource(cfg) === 'story';
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
// Kept in event bodies, never the persistent environment prompt. No catalog is loaded here.
|
|
11
12
|
const RECEIPT_HINT = '仅在宿主当前会话实际声明相应工具且允许查询时按需调用;开关、enabled 和包版本都不是能力证明。先检查外层 failed,再解析 text 中的 JSON;只有内层 ok===true 才是成功查询。failed:true、ok:false、缺失/畸形 text、权限不明、无候选或过期不可用都不推断成功;故事卡须 enabled===true 且 available===true 才作为当前可用。已知存档异常时,其他查询成功也不证明可出发。可重新读取,或改用普通生活邀请或既有可用路径。卡片缺版本、作者、条件、可用性或时长就说明未知;不按节点推算时长,不补写未来情节或私有资料。';
|
|
12
|
-
const SOURCE_HINT = '
|
|
13
|
-
const LAUNCH_HINT = '
|
|
13
|
+
const SOURCE_HINT = '地点来源选用从0开始的肥鱼大冒险;旧小世界是独立来源,不自动合并两个“家”,不修改住所、位置或用户手写的工具提示。';
|
|
14
|
+
const LAUNCH_HINT = '计划和到点只是邀请,不代表出发或游玩。用户与鱼明确决定开始后再核对最新条件;指定作品可在从0开始的肥鱼大冒险「出游」面板由用户确认开始,面板会核对当前 startStamp / packId / revision。聊天里默认也能开局:「文字通道也能玩故事」默认开启,会话里通常有 fun_story_start / fun_story_act;用户明确点名才开始,推进时把用户原话交给 fun_story_act,原话对不上会先给待确认提议,轮到她自己的回合,她以 fish 身份提交,收尾仍要用户确认。开关被关掉或会话没有这两个工具时,回「出游」面板。fun_go 不能指定故事,fun_story 是管理工具,不能代替查询;不能替用户编选择,也不能替用户补上 owner / joint 里没说的份额。available:true 也不证明没有行程冲突,应由面板重新核对。';
|
|
14
15
|
const RECORD_HINT = '收尾按需用 fun_story_current({}) 核对 none/active/draft 和目标行程的 id/runId;none 不表示没有普通出游。只对要回顾的已保存行程用 fun_story_recap({"id":"目标行程ID或runId"}),核对 memory.id/runId,再按 complete、summary、timeline、choices 判断实际进度;不假设存在 state/events。fun_story_recap({}) 只返回最近已存行程,不得当作当前或目标行程。匹配不到时仅复述已确认的事实,不能宣称完成或据此记账。只用已发生摘要,不泄露未来剧情,不当现实通关认证。取消、未出发、暂停、草稿、未完成和试玩都不能称已完成或自动记账。用户明确要记生活时,才用 feast_life_play(activity,note) 写“玩了故事”及实际进度;仅保存成功回执才说记下了。失败或回执不明先核实,复制摘要不等于同步,重复提交没有 sourceRef 幂等或跨日防重保证。';
|
|
15
16
|
|
|
16
17
|
export const STORY_RECORD_TAIL = '其他生活活动做过了可以照常记;故事须由主人另行明确选择记录,才用 feast_life_play 记对应行程的实际经历。这条邀请不是记账授权。';
|
|
@@ -21,7 +22,7 @@ export function storyPlanHint() {
|
|
|
21
22
|
SOURCE_HINT,
|
|
22
23
|
'仅在考虑相关活动时用 fun_story_places({}) 看地点,需详情再用 {"id":"地点ID"};用 fun_story_candidates({}) 看无剧透候选,选定后才用 fun_story_detail({"id":"故事ID"})。需要可复制候选时可用 fun_story_schedule({}) 或 {"id":"故事ID"},其 JSON 内 text 只是候选,不会写日程。按目标时段核对条件,当前可用不保证明天可用;不确定就留弹性。lifeDoings 供明日计划参考,lifeFreeMenu 仅是自由时间邀请。',
|
|
23
24
|
RECEIPT_HINT,
|
|
24
|
-
'现在只用 feast_life_plan
|
|
25
|
+
'现在只用 feast_life_plan 写打算,不加载整篇故事,不在启动或每轮查目录,不新建重复计划;到点仍需明确决定。指定故事可在从0开始的肥鱼大冒险「出游」面板由用户确认开始,聊天里默认也能用 fun_story_start / fun_story_act;开关关掉或会话没有它们时回面板,不能用 fun_go 代开。计划不移动位置,不记录实际经历。',
|
|
25
26
|
].join('\n');
|
|
26
27
|
}
|
|
27
28
|
|
package/src/life/wardrobe.js
CHANGED
|
@@ -445,5 +445,5 @@ export function wardrobeText(lib) {
|
|
|
445
445
|
export function wardrobeHintLine(lib) {
|
|
446
446
|
if (lib?.empty !== false) return '';
|
|
447
447
|
const names = lib.characters.map((c) => c.name).join('、') || '';
|
|
448
|
-
return
|
|
448
|
+
return `(鱼的生图包的素材库在同一个数据目录下。想发图时,穿着、地点、情境按你日程里写的来——${names ? `尤其是 ${names} ` : ''}的穿搭习惯。imggen_draw 的 outfits / scene / props / situation 填你日程里写的名字就行。)`;
|
|
449
449
|
}
|
package/src/world.js
CHANGED
|
@@ -25,14 +25,15 @@ import { readCalendarMonth, isValidCalendarMonth } from './life/calendar.js';
|
|
|
25
25
|
import { LIFE_PRESETS, lifePresetPreview, assertLifePresetRevision } from './life/presets.js';
|
|
26
26
|
import { fileURLToPath } from 'node:url';
|
|
27
27
|
|
|
28
|
+
import { resolvePlaceSource, placeLinks } from './life/places.js';
|
|
28
29
|
import {
|
|
29
30
|
DEFAULTS, EVENT_FEED, EVENT_LIFE_FREE, EVENT_LIFE_MOMENT, EVENT_LIFE_PLAN, EVENT_MEAL, EVENT_TABLE,
|
|
30
31
|
EVENT_TOGETHER, ID, configGroups, panelText, text,
|
|
31
32
|
} from './config.js';
|
|
32
33
|
import {
|
|
33
34
|
DEFAULT_DAY_TYPES, addDays, applyChange, classifyItem, cleanDay, cleanMealSlots, clearDays, clearPlays, dateLabel,
|
|
34
|
-
dayText, doingsFor, envBlock, findItem, freeEventText,
|
|
35
|
-
LIFE_KEEP_DAYS, lifeDir, listDays, MAX_OWN_MEAL_SLOTS,
|
|
35
|
+
dayText, doingsFor, envBlock, findItem, freeEventText, isAsleepActivity, isDateKey, isWorkDayType,
|
|
36
|
+
LIFE_KEEP_DAYS, lifeDir, listDays, MAX_OWN_MEAL_SLOTS, markFreeNudged, markFreeSkipped,
|
|
36
37
|
momentLine, newPlay, nextFreeSlotText, normalizePlan, nowText, parseClock, parseDoings, parseSlots, pendingDay,
|
|
37
38
|
pickDayType, planEventText, planFreeTick, playDoneText, readDay, readFunEnabled, readMapEnabled, readPlay,
|
|
38
39
|
removeWorkEvents, isWorkEvent, workScheduleKey, categoryOf, validCategory, ACTIVITY_CATEGORIES, clock,
|
|
@@ -436,6 +437,7 @@ export class FeastWorld {
|
|
|
436
437
|
// 不让一个漏写的 mealReminder 悄悄把饭点关掉。
|
|
437
438
|
this.#inputCfg = opts.cfg ?? {};
|
|
438
439
|
this.cfg = { ...DEFAULTS, ...this.#inputCfg };
|
|
440
|
+
this.cfg.lifePlaceSource = resolvePlaceSource(this.cfg);
|
|
439
441
|
this.dataDir = opts.dataDir ?? process.cwd();
|
|
440
442
|
this.#botDir = opts.botDir;
|
|
441
443
|
this.#uiScope = createHash('sha256').update(`${resolve(this.dataDir)}\u0000${this.id}`).digest('hex');
|
|
@@ -453,10 +455,9 @@ export class FeastWorld {
|
|
|
453
455
|
|
|
454
456
|
/**
|
|
455
457
|
* 对宿主传入的稀疏配置补充默认值,不覆盖已有值。
|
|
456
|
-
*
|
|
457
|
-
* 没有 persist 或持久化失败时,运行时仍使用合并后的配置。
|
|
458
|
+
* lifePlaceSource 的 null 是旧配置迁移哨兵:将解析后的单选值写回,避免升级后每次启动都重复推导。
|
|
458
459
|
*/
|
|
459
|
-
#ensureConfigSection() {
|
|
460
|
+
async #ensureConfigSection() {
|
|
460
461
|
if (!this.#persist) return;
|
|
461
462
|
try {
|
|
462
463
|
const input = this.#inputCfg ?? {};
|
|
@@ -464,12 +465,13 @@ export class FeastWorld {
|
|
|
464
465
|
for (const [key, value] of Object.entries(DEFAULTS)) {
|
|
465
466
|
// enabled 归宿主管(部署决定),不在这里写。
|
|
466
467
|
if (key === 'enabled') continue;
|
|
467
|
-
if (key
|
|
468
|
-
patch[key] = value;
|
|
468
|
+
if (key === 'lifePlaceSource' && input[key] == null) patch[key] = this.cfg[key];
|
|
469
|
+
else if (!(key in input)) patch[key] = value;
|
|
469
470
|
}
|
|
470
471
|
const keys = Object.keys(patch);
|
|
471
472
|
if (!keys.length) return;
|
|
472
|
-
this.#persist(patch);
|
|
473
|
+
const result = await this.#persist(patch);
|
|
474
|
+
if (result === false || result?.ok === false) throw new Error(result?.message || '配置保存被拒绝');
|
|
473
475
|
// 活对象同步一次:persist 会深合并进同一份 cfg,这里只是保险。
|
|
474
476
|
Object.assign(this.cfg, patch);
|
|
475
477
|
Object.assign(input, patch);
|
|
@@ -630,12 +632,13 @@ export class FeastWorld {
|
|
|
630
632
|
|
|
631
633
|
/** 娱乐时间联动总开关。关掉=不管装没装都不往「例子」里加那一行。 */
|
|
632
634
|
#funLinkOn() {
|
|
633
|
-
|
|
635
|
+
const links = placeLinks(this.cfg);
|
|
636
|
+
return this.#freeOn() && (links.story || links.fun);
|
|
634
637
|
}
|
|
635
638
|
|
|
636
639
|
/** 小地图联动总开关。关掉=不管装没装都不往「例子」里加那一行。 */
|
|
637
640
|
#mapLinkOn() {
|
|
638
|
-
return this.#freeOn() && this.cfg
|
|
641
|
+
return this.#freeOn() && placeLinks(this.cfg).map;
|
|
639
642
|
}
|
|
640
643
|
|
|
641
644
|
/**
|
|
@@ -1959,9 +1962,10 @@ export class FeastWorld {
|
|
|
1959
1962
|
// 主人按日型备的「能做的事」:留空就是空数组,那段整段不出现。
|
|
1960
1963
|
const doings = doingsFor(parseDoings(this.cfg?.lifeDoings), type);
|
|
1961
1964
|
// 写日程的地点联动不依赖自由时间提醒。
|
|
1965
|
+
const links = placeLinks(this.cfg);
|
|
1962
1966
|
const [mapOn, funOn] = await Promise.all([
|
|
1963
|
-
|
|
1964
|
-
|
|
1967
|
+
links.map && readMapEnabled(this.dataDir, { botDir: this.#botDir }),
|
|
1968
|
+
(links.story || links.fun) && readFunEnabled(this.dataDir, { botDir: this.#botDir }),
|
|
1965
1969
|
]);
|
|
1966
1970
|
let continuation = '';
|
|
1967
1971
|
try { continuation = threadHint(await readThreads(this.dataDir)); }
|
|
@@ -2203,7 +2207,7 @@ export class FeastWorld {
|
|
|
2203
2207
|
if (day.mealSlots.length) notes.push(`饭点 ${day.mealSlots.join('、')}`);
|
|
2204
2208
|
if (!isWorkDayType(day.dayType)) notes.push('这天按不上班过');
|
|
2205
2209
|
return {
|
|
2206
|
-
text: `记好了,${dateLabel(day.date)}这一天是你自己想过的样子${notes.length ? `(${notes.join(';')})` : ''}
|
|
2210
|
+
text: `记好了,${dateLabel(day.date)}这一天是你自己想过的样子${notes.length ? `(${notes.join(';')})` : ''}。不用跟主人复述。`,
|
|
2207
2211
|
};
|
|
2208
2212
|
}
|
|
2209
2213
|
|
|
@@ -3431,7 +3435,7 @@ export class FeastWorld {
|
|
|
3431
3435
|
async start(host) {
|
|
3432
3436
|
if (this.#started) return;
|
|
3433
3437
|
this.#host = host;
|
|
3434
|
-
this.#ensureConfigSection();
|
|
3438
|
+
await this.#ensureConfigSection();
|
|
3435
3439
|
this.#lib = await loadDishes(host?.log);
|
|
3436
3440
|
try {
|
|
3437
3441
|
this.#state = await this.#load();
|