cortico-world-ellen-page-patch 0.0.0-stage → 0.1.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 ADDED
@@ -0,0 +1,16 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ - 首个版本:把艾莲语音扩展原本自带的「装页面补丁」功能拆成独立可选包。本包只做一件事——把
6
+ `patches/speech.js`、`patches/pet-app.js`、`patches/pet.css` 三份文件覆盖进宿主 Coopanion 的
7
+ `resources\app\node_modules\cortico-world-desktop-pet\web`,装完要重启 Coopanion 才生效。
8
+ - 带四项主要修复:
9
+ - 外部声线接入:接本机 TTS,失败三次才冷却 30 秒(以前一次失败就永久闭麦);
10
+ - 短句也出声:两三个字的回复以前整句上屏、走不到逐字路径,所以没有语音;
11
+ - 气泡尾巴等语音念完:不再语音还没播完气泡就先收起;
12
+ - 气泡贴边翻转 + 宽度按内容撑开:贴左右边缘时整块翻转、尾巴指回身上,宽度随内容自适应。
13
+ - 另外把静置后挂起的 AudioContext 自动唤醒,音量改为走配置而不是写死 0.67。
14
+ - 装补丁时自动备份原文件到 `<web 目录>\..\.ellen-patch-backup-<时间戳>\`,内容相同则跳过;
15
+ `dryRun=true` 可以先预演,不写盘。
16
+ - 新增设置项 `hostWebDir`:页面目录特殊(比如便携版)时可以手动指定,留空按安装位置自动推断。
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 deepseek study
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,66 @@
1
- # Temporary Holding Version
1
+ # 艾莲页面补丁(cortico-world-ellen-page-patch)
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 这是一个**可选的手动补丁包**:装上它、调用一次工具,它就会把本包自带的三份桌宠页面文件
4
+
5
+ - `patches/speech.js`
6
+ - `patches/pet-app.js`
7
+ - `patches/pet.css`
8
+
9
+ **整份覆盖**进宿主 Coopanion 的
10
+
11
+ ```
12
+ <Coopanion 安装目录>\resources\app\node_modules\cortico-world-desktop-pet\web
13
+ ```
14
+
15
+ 覆盖之后**要重启 Coopanion**(关掉再开)才生效,页面才会重新加载这三个文件。
16
+
17
+ > 注意:这一步会改动 Coopanion 自己的文件。不想动宿主文件的话,请不要装这个包。
18
+
19
+ ## 为什么单独拆一个包
20
+
21
+ 这些修复改的是宿主应用的**前端文件**(外部声线接入、短句也出声、气泡尾巴、气泡贴边与宽度等),
22
+ 而扩展本身跑在后台进程里,改不到页面。之前这些补丁是塞在 `cortico-world-ellen-voice` 里的,
23
+ 结果因为「扩展会写宿主目录、卸载后文件还留着」被官方扩展市场拉黑(详见 CHANGELOG)。
24
+
25
+ 现在把「装补丁」拆成这个独立包:主包不再碰宿主文件,可以重新上架;需要补丁的人再单独装这个包。
26
+
27
+ 上游(`cortico-world-desktop-pet`)还没有合并这些修复,所以暂时只能这样手动打补丁。
28
+
29
+ ## 怎么用
30
+
31
+ 1. 正常安装本扩展(放进 `data\extensions` 并启用)。
32
+ 2. 让模型调用 `ellen_patch_page`:
33
+ - 不给参数:按 Coopanion 的安装位置自动推断页面目录;
34
+ - `dryRun: true`:只报告会改哪些文件,不写盘;
35
+ - `webDir: "..."`:页面目录特殊(比如便携版)时手动指定。
36
+ 3. 也可以先在扩展设置里填「页面目录」(`hostWebDir`),之后调用就不用再传 `webDir`。
37
+ 4. **重启 Coopanion**。
38
+
39
+ ## 会自动备份
40
+
41
+ 装补丁前会把宿主原文件备份到:
42
+
43
+ ```
44
+ <web 目录>\..\.ellen-patch-backup-<时间戳>\
45
+ ```
46
+
47
+ 内容与补丁完全相同的文件会跳过(不重复覆盖)。想还原就把备份目录里的文件拷回 `web` 目录,
48
+ 再重启 Coopanion。备份目录不会自动清理,确认没问题后可以手动删掉。
49
+
50
+ ## 宿主升级后要重装
51
+
52
+ Coopanion 升级(或重装)会用官方文件覆盖 `web` 目录,补丁会随之丢失。升级后重新调用一次
53
+ `ellen_patch_page` 即可。
54
+
55
+ ## 不提交官方市场
56
+
57
+ 这个包**不会**提交官方扩展市场收录:它的用途就是覆盖宿主文件、绕开「扩展不该写宿主目录」的限制。
58
+ 主包(`cortico-world-ellen-voice`)才是面向市场的那一个。
59
+
60
+ ## English summary
61
+
62
+ An optional, manual patch installer. It copies three bundled desktop-pet page files
63
+ (`speech.js`, `pet-app.js`, `pet.css`) over the host Coopanion `cortico-world-desktop-pet\web`
64
+ folder, backing up the originals to `.ellen-patch-backup-<timestamp>` first. Restart Coopanion
65
+ afterwards. Patches are lost when Coopanion is upgraded, so re-run it after an update. This
66
+ package is not submitted to the official extension marketplace.
package/describe.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "tools": [
3
+ {
4
+ "name": "ellen_patch_page",
5
+ "description": "Install this extension's three page patches (speech.js / pet-app.js / pet.css) into the host Coopanion desktop-pet web folder. They fix external TTS hookup, silent short replies, bubble tails cut off before speech finishes, bubble clipping and width at screen edges, suspended audio contexts and the speech volume setting. Restart Coopanion afterwards. dryRun=true only reports what would change.",
6
+ "parameters": {
7
+ "type": "object",
8
+ "properties": {
9
+ "dryRun": {
10
+ "type": "boolean",
11
+ "description": "Report what would change without writing files."
12
+ },
13
+ "webDir": {
14
+ "type": "string",
15
+ "description": "Desktop-pet web folder; inferred from settings or the install location when omitted."
16
+ }
17
+ },
18
+ "additionalProperties": false
19
+ },
20
+ "tags": ["setup"],
21
+ "summary": {
22
+ "zh": "把三份桌宠页面补丁装进宿主 Coopanion(外部声线、短句出声、气泡尾巴、气泡贴边与宽度、音量)。",
23
+ "en": "Install the page patches into the host Coopanion (external voice, short replies, bubble tail/edge/width, volume)."
24
+ }
25
+ }
26
+ ],
27
+ "events": [],
28
+ "prompts": []
29
+ }
package/package.json CHANGED
@@ -1,6 +1,22 @@
1
1
  {
2
2
  "name": "cortico-world-ellen-page-patch",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "Installs Ellen Joe's desktop-pet page patches into the host Coopanion app.",
6
+ "author": "deepseek study",
7
+ "license": "MIT",
8
+ "main": "./src/index.ts",
9
+ "keywords": ["cortico-world", "cortico", "patch", "desktop-pet"],
10
+ "engines": {
11
+ "node": ">=22"
12
+ },
13
+ "cortico": {
14
+ "kind": "world",
15
+ "api": 6,
16
+ "displayName": "艾莲页面补丁",
17
+ "icon": "src/icon.svg",
18
+ "describe": "describe.json",
19
+ "tags": ["patch", "setup"]
20
+ },
21
+ "files": ["src", "patches", "describe.json", "README.md", "CHANGELOG.md", "LICENSE"]
22
+ }