tavern-harness 0.1.7 → 0.1.8

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yipeng Wang
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,9 +1,24 @@
1
+ <p align="center">
2
+ <a href="https://rannichan.github.io/Tavern-Harness/">
3
+ <img alt="Tavern Harness logo" src="https://raw.githubusercontent.com/Rannichan/Tavern-Harness/main/public/tavern-harness-logo.png" width="128">
4
+ </a>
5
+ </p>
6
+ <p align="center">
7
+ <a href="https://github.com/Rannichan/Tavern-Harness"><img alt="GitHub Repository" src="https://img.shields.io/badge/github-repository-181717?style=flat-square&logo=github&logoColor=white" /></a>
8
+ <a href="https://discord.gg/kPSWGeaHx"><img alt="Discord" src="https://img.shields.io/badge/discord-community-5865F2?style=flat-square&logo=discord&logoColor=white" /></a>
9
+ <a href="https://rannichan.github.io/Tavern-Harness/wiki.html"><img alt="Wiki" src="https://img.shields.io/badge/wiki-documentation-2563EB?style=flat-square" /></a>
10
+ <a href="https://www.npmjs.com/package/tavern-harness"><img alt="npm" src="https://img.shields.io/npm/v/tavern-harness?style=flat-square" /></a>
11
+ </p>
12
+
1
13
  # Tavern Harness · An AI-Native Role-Playing Sandbox
2
14
 
3
- [Product Site](https://rannichan.github.io/Tavern-Harness/) · [Wiki](https://rannichan.github.io/Tavern-Harness/wiki.html) · [GitHub Repository](https://github.com/Rannichan/Tavern-Harness) · [Discord](https://discord.gg/kPSWGeaHx)
15
+ <a id="demo"></a>
16
+ ## 1 · Gameplay Demos
17
+
18
+ [![Gameplay demos](docs/assets/demo-link-en.png)](https://rannichan.github.io/Tavern-Harness/index.html#demo)
4
19
 
5
20
  <a id="run"></a>
6
- ## 1 · Getting Started
21
+ ## 2 · Getting Started
7
22
 
8
23
  ### Option 1: One-Command Start (Recommended)
9
24
 
@@ -64,7 +79,7 @@ After starting the app, open **Settings → Model Service Provider**:
64
79
  - Data is tied to the browser, port, and site origin. Switching browsers, opening a private window, or using a different port will not show existing data. This is expected browser security behavior; use the same browser and port each time.
65
80
 
66
81
  <a id="features"></a>
67
- ## 2 · Features
82
+ ## 3 · Features
68
83
 
69
84
  ### 🍺 The Tavern Keeper Is Always Ready to Help
70
85
 
@@ -96,11 +111,6 @@ The app supports **OpenAI-format APIs**. Use a hosted API plan or run a model lo
96
111
 
97
112
  The project has no external harness dependency, and its UI is designed for a clean, focused experience.
98
113
 
99
- <a id="gameplay"></a>
100
- ## 3 · Gameplay Examples
101
-
102
- See the [interactive gameplay demos](https://rannichan.github.io/Tavern-Harness/#demo).
103
-
104
114
  <a id="feedback"></a>
105
115
  ## 4 · Community and Feedback
106
116
 
@@ -110,3 +120,7 @@ See the [interactive gameplay demos](https://rannichan.github.io/Tavern-Harness/
110
120
  - 📣 Star or watch the repository to receive updates.
111
121
 
112
122
  > The tavern is open 24 hours a day, and the Keeper is always here to help.
123
+
124
+ ## License
125
+
126
+ This project is licensed under the [MIT License](LICENSE).
package/README.zh.md CHANGED
@@ -1,9 +1,24 @@
1
+ <p align="center">
2
+ <a href="https://rannichan.github.io/Tavern-Harness/">
3
+ <img alt="Tavern Harness logo" src="https://raw.githubusercontent.com/Rannichan/Tavern-Harness/main/public/tavern-harness-logo.png" width="128">
4
+ </a>
5
+ </p>
6
+ <p align="center">
7
+ <a href="https://github.com/Rannichan/Tavern-Harness"><img alt="GitHub 仓库" src="https://img.shields.io/badge/github-repository-181717?style=flat-square&logo=github&logoColor=white" /></a>
8
+ <a href="https://discord.gg/kPSWGeaHx"><img alt="Discord" src="https://img.shields.io/badge/discord-community-5865F2?style=flat-square&logo=discord&logoColor=white" /></a>
9
+ <a href="https://rannichan.github.io/Tavern-Harness/wiki.html"><img alt="Wiki" src="https://img.shields.io/badge/wiki-documentation-2563EB?style=flat-square" /></a>
10
+ <a href="https://www.npmjs.com/package/tavern-harness"><img alt="npm" src="https://img.shields.io/npm/v/tavern-harness?style=flat-square" /></a>
11
+ </p>
12
+
1
13
  # Tavern Harness · AI 原生的角色扮演沙盒
2
14
 
3
- [产品主页](https://rannichan.github.io/Tavern-Harness/) · [Wiki](https://rannichan.github.io/Tavern-Harness/wiki.html) · [GitHub 仓库](https://github.com/Rannichan/Tavern-Harness) · [Discord 交流](https://discord.gg/kPSWGeaHx)
15
+ <a id="demo"></a>
16
+ ## 1 · 玩法演示
17
+
18
+ [![玩法演示](docs/assets/demo-link-zh.png)](https://rannichan.github.io/Tavern-Harness/index.html#demo)
4
19
 
5
20
  <a id="run"></a>
6
- ## 1 · 如何运行
21
+ ## 2 · 如何运行
7
22
 
8
23
  ### 方式一:一键启动(推荐)
9
24
 
@@ -65,7 +80,7 @@ npm run dev # 开发服务器默认端口 5173,被占用时自动顺延
65
80
  - 数据与浏览器、端口、站点绑定:换浏览器 / 开隐身窗 / 换端口看不到旧数据——这是浏览器安全机制,属正常现象。请确保每次在同一个端口启动、并在同一个浏览器打开。
66
81
 
67
82
  <a id="features"></a>
68
- ## 2 · 产品特色
83
+ ## 3 · 产品特色
69
84
 
70
85
  ### 🍺 酒馆老板随时为您服务
71
86
 
@@ -97,11 +112,6 @@ npm run dev # 开发服务器默认端口 5173,被占用时自动顺延
97
112
 
98
113
  项目不依赖任何外部 harness,UI 也经过了精细打磨,提供简洁干净的体验。
99
114
 
100
- <a id="gameplay"></a>
101
- ## 3 · 玩法示例
102
-
103
- 请查看[互动玩法演示](https://rannichan.github.io/Tavern-Harness/#demo)。
104
-
105
115
  <a id="feedback"></a>
106
116
  ## 4 · 交流反馈
107
117
 
@@ -111,3 +121,7 @@ npm run dev # 开发服务器默认端口 5173,被占用时自动顺延
111
121
  - 📣 想第一时间收到更新,点个 Star / Watch 就好
112
122
 
113
123
  > 酒馆24小时营业,老板随时为您服务!
124
+
125
+ ## 开源协议
126
+
127
+ 本项目采用 [MIT License](LICENSE) 开源协议。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tavern-harness",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Tavern Harness — 酒馆模式下的本地 AI Agent 助手(MyAgent-Android 的 Web 复刻)",
5
5
  "private": false,
6
6
  "type": "module",
@@ -239,8 +239,9 @@ function MessageBubble({
239
239
  const turnStreaming = useStore((s) => s.streaming.sessionId === session.id);
240
240
  // System 消息(/new 标记)
241
241
  if (msg.role === 'system') {
242
+ const content = msg.content === '开始新话题' ? t('chat.newTopicMarker') : msg.content;
242
243
  return (
243
- <div className="sys-banner fade-up" data-loop={loopIndex ?? undefined}>⟐ {msg.content}</div>
244
+ <div className="sys-banner fade-up" data-loop={loopIndex ?? undefined}>⟐ {content}</div>
244
245
  );
245
246
  }
246
247
 
package/src/core/i18n.ts CHANGED
@@ -124,6 +124,7 @@ const MESSAGES: Record<LangKey, Record<string, string>> = {
124
124
  'chat.hintMagic': '魔法命令: /new · /pass',
125
125
  'chat.hintMention': ' · @角色名 点名',
126
126
  'chat.cmdNew': '开始新话题(截断上下文)',
127
+ 'chat.newTopicMarker': '开始新话题',
127
128
  'chat.cmdPass': '跳过本轮发言(群聊中,不修改对话历史)',
128
129
  'chat.modelEmpty': '暂无可用模型列表。请先在「设置 → 模型服务 Provider」添加并测试连接。',
129
130
  'chat.noActions': '该消息无可用操作',
@@ -567,6 +568,7 @@ const MESSAGES: Record<LangKey, Record<string, string>> = {
567
568
  'chat.hintMagic': '魔法指令: /new · /pass',
568
569
  'chat.hintMention': ' · @角色名 點名',
569
570
  'chat.cmdNew': '開始新話題(截斷上下文)',
571
+ 'chat.newTopicMarker': '開始新話題',
570
572
  'chat.cmdPass': '跳過本輪發言(群聊中,不修改對話歷史)',
571
573
  'chat.modelEmpty': '暫無可用模型清單。請先在「設定 → 模型服務 Provider」新增並測試連線。',
572
574
  'chat.noActions': '此訊息沒有可用的操作',
@@ -999,6 +1001,7 @@ const MESSAGES: Record<LangKey, Record<string, string>> = {
999
1001
  'chat.hintMagic': 'Magic commands: /new · /pass',
1000
1002
  'chat.hintMention': ' · @name to address',
1001
1003
  'chat.cmdNew': 'Start a new topic (truncates context)',
1004
+ 'chat.newTopicMarker': 'Start a new topic',
1002
1005
  'chat.cmdPass': 'Skip this turn (group chat, keeps history)',
1003
1006
  'chat.modelEmpty': 'No models available. Add and test a connection under Settings → Model Providers first.',
1004
1007
  'chat.noActions': 'No actions available for this message',
@@ -80,17 +80,18 @@
80
80
  padding: 12px 14px;
81
81
  max-height: none;
82
82
  height: 100%;
83
+ border-top-left-radius: 10px;
83
84
  }
84
- /* 角色卡:人设 Prompt 所在的 field 容器弹性增长,textaarea 填满 */
85
+ /* 角色卡:允许 Prompt 输入框扩展,同时让后续字段在正常文档流中下移。 */
85
86
  .modal-editor .prompt-field {
86
- flex: 3;
87
- min-height: 220px;
87
+ flex: 0 0 auto;
88
88
  display: flex;
89
89
  flex-direction: column;
90
90
  }
91
91
  .modal-editor .prompt-field .grow-textarea {
92
- flex: 1;
93
- min-height: 0;
92
+ flex: none;
93
+ height: min(35dvh, 360px);
94
+ min-height: 220px;
94
95
  }
95
96
  .modal-editor .greeting-grow {
96
97
  min-height: 88px;